ANTLR(1)

✨ NAME ✨

Okay bestie, welcome to ANTLR(1) πŸŽ€, the General Commands Manual entry that's about to become your new special interest πŸ˜­πŸ’–

ANTLR is short for ANother Tool for Language Recognition, and this is version 3 πŸ¦‹

🌸 SYNOPSIS 🌸

antlr3 [args] file.g [ file2.g file3.g ...]

πŸ’… DESCRIPTION πŸ’…

Okay so ANTLR (ANother Tool for Language Recognition) is a parser generator, and it's literally iconic πŸ‘‘ It's built for reading, processing, executing, or translating structured text or binary files. People use it all the time to build languages, tools, and frameworks, no cap πŸ”₯ You give it a grammar, and it generates a parser that can build parse trees and walk them. Main character energy, fr fr ✨

Here are all the options, bestie. Don't skip any 🫢

  • -o outputDir β€” tell ANTLR where to put ALL the output you generate πŸ“‚
  • -fo outputDir β€” same vibe as -o, but it also forces even files with relative paths into that dir πŸ’ͺ
  • -lib dir β€” tells ANTLR where to find your token files 🧚
  • -depend β€” generates file dependencies πŸ”—
  • -report β€” prints a report about the grammar(s) it processed πŸ“
  • -print β€” prints the grammar without the actions πŸ™ˆ
  • -debug β€” generates a parser that emits debugging events πŸ›
  • -profile β€” generates a parser that computes profiling info ⏱️
  • -trace β€” generates a recognizer that traces rule entry and exit πŸ•΅οΈβ€β™€οΈ
  • -nfa β€” generates an NFA for each rule 🌈
  • -dfa β€” generates a DFA for each decision point πŸ’œ
  • -message-format name β€” picks the output style for messages πŸŽ€
  • -verbose β€” generates ANTLR's version and other extra info πŸ“£
  • -make β€” only builds if the generated files are older than the grammar, so no wasted work ♻️
  • -version β€” prints the ANTLR version and then exits πŸ“
  • -language L β€” overrides the language grammar option, and generates L instead 🌍
  • -X β€” shows the list of extended arguments πŸ‘€
  • -Xgrtree β€” prints the grammar AST 🌳
  • -Xdfa β€” prints the DFA as text πŸ“„
  • -Xnoprune β€” tests lookahead against EBNF block exit branches 🧐
  • -Xnocollapse β€” collapses incident edges into DFA states 🫧
  • -Xdbgconversion β€” dumps lots of info during NFA conversion πŸ˜΅β€πŸ’«
  • -Xconversiontimeout β€” use this to restrict NFA conversion exponentiality ⏳
  • -Xmultithreaded β€” runs the analysis in 2 threads 🧡
  • -Xnomergestopstates β€” do not merge stop states πŸ›‘
  • -Xdfaverbose β€” generates DFA states in DOT with NFA configs πŸ—ΊοΈ
  • -Xwatchconversion β€” prints a message for each NFA before it converts πŸ‘οΈ
  • -XdbgST β€” puts tags at the start and stop of all templates in the output 🏷️
  • -Xnfastates β€” for nondeterminisms, lists the NFA states for each path πŸ›€οΈ
  • -Xm m β€” max number of rule invocations during conversion, default [4] πŸ”’
  • -Xmaxdfaedges m β€” max "comfortable" number of edges for a single DFA state, default [65534] πŸ•ΈοΈ
  • -Xmaxinlinedfastates m β€” max DFA states before a table gets used instead of inlining, default [60] πŸ“Š
  • -Xmaxswitchcaselabels m β€” doesn't generate switch() statements for DFAs bigger than m, default [300] 🚫
  • -Xminswitchalts m β€” doesn't generate switch() statements for DFAs smaller than m, default [3] πŸ™…β€β™€οΈ
  • -Xsavelexer β€” doesn't delete the temporary lexers generated from combined grammars πŸ’Ύ

πŸŽ€ AUTHOR πŸŽ€

This manual page was written by Ludovic Claude <ludovic.claude@laposte.net> πŸ’Œ

πŸ¦‹ SEE ALSO πŸ¦‹

java(1), runantlr(1), http://www.antlr.org/ 🌐


And that's the whole tea, bestie πŸ’…βœ¨ This page is from antlr, dated July 22, 2015, and it's still giving πŸ«ΆπŸ’œ