ASDLGEN(1)

πŸ“¦ version 110.99.9, in arch rolling

πŸ‘‘ asdlgen(1) β€” the compiler for the Abstract Syntax Description Language (ASDL), bestie edition πŸ’…

okay so literally welcome to asdlgen(1), the man page you're gonna actually read because it's fun now. it's a compiler for ASDL, the Abstract Syntax Description Language. yes. that one. πŸ¦‹


✨ NAME ✨

asdlgen β€” a compiler for the Abstract Syntax Description Language (ASDL). periodt.


🌸 SYNOPSIS 🌸

asdlgen COMMAND [ OPTIONS ] FILE ...

where COMMAND is one of these iconic little numbers:

  • help β€” prints info about the available options to the standard output. your "what does this even do" bestie 🫢
  • version β€” prints the version of asdlgen to the standard output. iykyk.
  • c++ or cxx β€” generate C++ code. two names, same slay ✨
  • sml β€” generate SML code.
  • check β€” check the correctness of the input specifications, but do not generate output. it's giving vibe check, honestly πŸ’€

πŸŽ€ DESCRIPTION πŸŽ€

So basically asdlgen reads the files you specify β€” those should contain ASDL module and view declarations β€” and produces pickling and unpickling code. that's the whole gig. no cap. πŸ”₯


πŸ’œ OPTIONS πŸ’œ

🌈 COMMON OPTIONS

  • -n β€” do not write any output files. instead, write the list of files that would have been written to the standard output. it's a little window-shopping moment πŸ™ˆ
  • -d DIR, --output-directory=DIR β€” specify the output directory to place the generated files. by default the output goes in the same directory as the input file from which it was produced. cozy, right? 🏠
  • --gen=NAMES β€” specifies the components to generate, where NAMES is a comma-separated list of names taken from the following:
    • types β€” generate the type definitions from the ASDL specification. the main character πŸ‘‘
    • memory β€” generate the memory pickler.
    • file β€” generate the file pickler.
    • sexp β€” generate the S-Expression pickler (SML only). SML girlies only, sorry 🧚

πŸ¦‹ C++ OPTIONS

  • --base-include=FILE β€” specify the name of the C++ header file that defines the primitive ASDL types and functions. the default value is asdl/asdl.hxx. yes, that's the default, don't come for me πŸ’…

⭐ SML OPTIONS

  • --cm=FILE β€” generate a CM file for the pickler; this will define a CM library. heads up though (and this is lowkey important): note that if the ASDL specification includes primitive modules, these will be included in the list of exported structures, but the supporting source files will have to be added to the CM file by hand. by hand, bestie. no automation. 😭
  • --mlb=FILE β€” generate an MLB file for the pickler. and same warning energy: note that if the ASDL specification includes primitive modules, these will be included in the list of exported structures, but the supporting source files will have to be added to the MLB file by hand. again. by hand. 🫠

🌸 AUTHOR 🌸

the original version of asdlgen was written by Dan Wang as part of the National Compiler Infrastructure Project at Princeton University. this version of the tool was implemented by John Reppy. legends, both of them 🫢✨


πŸ’– SEE-ALSO πŸ’–

ASDL Reference Manual (included in the SML/NJ documentation). go read it, it's the source material fr fr πŸ“š


πŸ’€ COPYING πŸ’€

Copyright Β© 2020 The Fellowship of SML/NJ

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

no warranty, babes. NO warranty. not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dramatic but true πŸ™ˆ

and that's the whole page! πŸ’…βœ¨ this beauty is from SML/NJ, dated 2025-11-04 β€” take care of her, she's iconic πŸŽ€πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from