Skip to content

teverett/antlr4-cpp-example

Repository files navigation

CI

Antlr4 C++ Example

A simple example of using Antlr4 to generate a C++ Parser / Lexer, for Modelica. The Modelica grammar for Antlr4 is from here.

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.

About

Example of Antlr4 C++ Target

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages