polserver/lib/antlr/demo
turleypol 62fa91ec8e
Antlr external project (#204)
Build antlr as external project inside of lib/antlr.
Cache in Ci the antlr folder to speed up compilation times.

* replace ERROR with ANTLR_ERROR, fix clang build
* added missing define needed to link on windows
* different lib name with clang on windows
2020-08-10 14:53:29 -07:00
..
Linux Antlr external project (#204) 2020-08-10 14:53:29 -07:00
Mac Antlr external project (#204) 2020-08-10 14:53:29 -07:00
Windows Antlr external project (#204) 2020-08-10 14:53:29 -07:00
CMakeLists.txt Antlr external project (#204) 2020-08-10 14:53:29 -07:00
generate.cmd Antlr external project (#204) 2020-08-10 14:53:29 -07:00
generate.sh Antlr external project (#204) 2020-08-10 14:53:29 -07:00
README.md Antlr external project (#204) 2020-08-10 14:53:29 -07:00
TLexer.g4 Antlr external project (#204) 2020-08-10 14:53:29 -07:00
TParser.g4 Antlr external project (#204) 2020-08-10 14:53:29 -07:00

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.