Skip to content

eric-guerin/antlr4-cpp-example

 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.1%
  • ANTLR 1.7%
  • Other 0.2%