https://github.com/teverett/antlr4-cpp-example
Example of Antlr4 C++ Target
https://github.com/teverett/antlr4-cpp-example
antlr4
Last synced: 2 months ago
JSON representation
Example of Antlr4 C++ Target
- Host: GitHub
- URL: https://github.com/teverett/antlr4-cpp-example
- Owner: teverett
- Created: 2017-09-04T18:05:44.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-06T22:47:45.000Z (over 5 years ago)
- Last Synced: 2025-04-04T04:12:59.001Z (6 months ago)
- Topics: antlr4
- Language: C++
- Homepage:
- Size: 12.1 MB
- Stars: 40
- Watchers: 6
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Antlr4 C++ Example
A simple example of using [Antlr4](http://www.antlr.org/) to generate a C++ Parser / Lexer, for [Modelica](https://www.modelica.org/). The Modelica grammar for Antlr4 is from [here](https://github.com/antlr/grammars-v4/tree/master/modelica).
To run the example, simply run `./run.sh` or `make`
The example presumes that the java executable is on your path.
The output includes
`modelicaLexer.*`: Antlr4 Lexer for Modelica
`modelicaParser.*`: Antlr4 Parser for Modelica
`modelicaListener.*`: Antlr4 Listener implementation for Modelica
Note that the Listener classes are optional: not every application of Antlr4 requires a listener.