-
Install Antlr4 Tools on MacOS 2.
pip3 install antlr4-tools
-
Clone Antlr4 Repository 3. URL:
git clone [email protected]:antlr/grammars-v4.git
-
Getting Started with Antlr4 4. URL:
https://github.com/antlr/antlr4/blob/master/doc/getting-started.md
5. Java Target:https://github.com/antlr/antlr4/blob/master/doc/java-target.md
-
Go to Antlr4-Lab
-
Introduce to Grammar File 6. ```antlrv4 /** Optional javadoc style comment */ [lexer|parser] grammar Name; options {...} import ...; tokens {...} channels {...} // lexer only @actionName {...} rule1 // parser and lexer rules, possibly intermingled ... ruleN