tree: 68664581edc5ba0bc725fbf6a2c2b62c1ba756ae [path history] [tgz]
  1. Linux/
  2. Mac/
  3. Windows/
  4. CMakeLists.txt
  5. generate.cmd
  6. generate.sh
  7. README.md
  8. TLexer.g4
  9. TParser.g4
cpp/third_party/antlr4-cpp-runtime-4/demo/README.md

Demo application for the ANTLR 4 C++ target

This demo app shows how to build the ANTLR runtime both as dynamic and static library and how to use a parser generated from a simple demo grammar.

A few steps are necessary to get this to work:

  • Download the current ANTLR jar and place it in this folder.
  • Open the generation script for your platform (generate.cmd for Windows, generate.sh for *nix/OSX) and update the LOCATION var to the actual name of the jar you downloaded.
  • Run the generation script. This will generate a test parser + lexer, along with listener + visitor classes in a subfolder named “generated”. This is where the demo application looks for these files.
  • Open the project in the folder that matches your system.
  • Compile and run.

Compilation is done as described in the runtime/cpp/readme.md file.