tt(1)
π 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.treetopor.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,--outputFILENAMEβ write the parser source toFILENAMEπ-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
- debian bookworm: treetop 1.6.8-1.1 Β· MIT
- debian trixie: treetop 1.6.12-1 Β· MIT
- fedora 43: rubygem-treetop 1.6.12-7.fc43 Β· MIT
- fedora 44: rubygem-treetop 1.6.12-9.fc44 Β· MIT
- ubuntu jammy: treetop 1.6.8-1 Β· MIT
- ubuntu noble: treetop 1.6.12-1 Β· MIT
- ubuntu questing: treetop 1.6.12-1
- ubuntu resolute: treetop 1.6.14-1 Β· MIT
- ubuntu stonking: treetop 1.6.14-1 Β· MIT
- Copyright (c) 2007 Nathan Sobo
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms