ANTLR4 runtime library
To use this package, put the following dependency into your project's dependencies section:
The D runtime library for ANTLR 4, mainly an adaption of original Java runtime library.
This Software is under development but tested on different grammars of ANTLR version 4.7.1 yet.
- Download or clone the package
- Change directory to the root of the package and call dub.
- You will find the generated ATLR D runtime library in lib/libantlr-d.a
- The ANTLR tool for D will generated by make build_examples in build/antlr4-4.7.1/tool/target/antlr4-4.7.1-complete.jar
- dshould 0.1
- unit-threaded 0.7.50
- java 1.8
grammar Expr; prog: (expr NEWLINE)* ; expr: expr ('*'|'/') expr | expr ('+'|'-') expr | INT | '(' expr ')' ; NEWLINE : [\r\n]+ ; INT : [0-9]+ ;
in the file Expr.g4.
java -jar -Dlanguage=D build/antlr4-4.7.1/tool/target/antlr4-4.7.1-complete.jar Expr.g4
and the correspondig Lexer, Parser and Listener D-Source files are generated.
- UTF-16 support not finished
- Registered by Eugene Wissner
- 1.3.7 released 10 days ago
- Copyright (c) 2012-2018 The ANTLR Project. All rights reserved.