tt(1)

πŸ“¦
version 1.6.14 Β· 2 versions
, in debian bookworm, debian trixie, fedora 43, fedora 44, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– tt β€” the manual, but make it make sense πŸ’–

okay bestie, you found the page for tt, the lil command-line icon from Treetop v1.4.14 ✨ she's the one who takes your grammars and turns them into Ruby. no cap.


πŸ¦‹ NAME πŸ¦‹

tt β€” compile a treetop grammar file to ruby source code πŸ’…


🌸 SYNOPSIS 🌸

tt [options] grammar_file[.treetop|.tt] ...

like. that's it. that's the whole vibe. πŸŽ€


✨ DESCRIPTION ✨

so tt is a command-line script, and her whole job β€” her entire main character arc β€” is compiling .treetop files into Ruby source code. periodt. πŸ”₯

she takes a list of files with a .treetop extension and compiles each one into a .rb file of the same name. then you can just require those files like any other Ruby script. iconic behavior honestly. πŸ’œ

OR β€” plot twist β€” you can hand her just one .treetop file plus a -o flag to say exactly what the output file should be called. one file, one custom name, chef's kiss. πŸ“

note bestie, this part matters: while treetop grammar files must have a supported filename extension (that's .treetop or .tt), you do not need to type the extension when you're calling the compiler with grammar file names. she's chill like that. πŸ™ˆ

πŸ’… OPTIONS πŸ’…

  • -o, --output FILENAME β€” write the parser source to FILENAME πŸŽ€
  • -f, --force β€” overwrite existing output file(s) 🫢
  • -v, --version β€” show the Treetop version ⭐
  • -h, --help β€” (no description in the original, she just shows up and helps πŸ’€)

🌈 EXAMPLES 🌈

1 grammar β†’ 1 parser source

tt foo.tt

2 grammars β†’ 2 separate parsers

tt foo bar.treetop

alternately named output file

tt -o alterate_name.rb foo

(yes, alterate_name.rb is spelled exactly like that in the original β€” we do not touch the artifacts, we preserve them πŸ›οΈβœ¨)


πŸ‘‘ SEE ALSO πŸ‘‘

the treetop website, literally go look at her:

http://cjheath.github.io/treetop/

mwah πŸ’‹ that's the whole page. Treetop, dated 2013-06-19, section tt(1) β€” and honestly? she ate. bye bestie, go compile something gorgeous πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from