• commons-configuration
  • cassandra
  • lucene2

EBNF Parser

To generate synatax and diagram from EBNF, you can use:

If you want to generate EBNF from Scala, you can use:

After that you have standalone executable jar ./target/sdg-1.0-jar-with-dependencies.jar

You can use it: java -jar ./target/sdg-1.0-jar-with-dependencies.jar src/main/scala/ebnf/EBNFParser.scala

Or exec mvn scala:run -DaddArgs=<PARSER_SOURCE_FILE>

For example: mvn scala:run -DaddArgs=src/main/scala/ebnf/EBNFParser.scala

I have had issues to get it to run manually via SBT but on CLI can do it with setting CLASSPATH to:


and running:

java -Djava.awt.headless=true net.t32leaves.syntaxDiagramGenerator.Main <INPUT_PARSER_COMBINATOR>

You can test it on the sample included via:

java -Djava.awt.headless=true net.t32leaves.syntaxDiagramGenerator.Main src/main/scala/ebnf/EBNFParser.scala

Creates a whole bunch of files. Have fun!

+ spark-sql (org.apache.spark.sql.catalyst)
+ scala-mahout-binding

Antlr Parser

curl -O
alias antlr4='java -jar $PWD/antlr-4.4-complete.jar'
alias grun='java org.antlr.v4.runtime.misc.TestRig'

vi Expr.g4

grammar Expr;       
prog:   (expr NEWLINE)* ;
expr:   expr ('*'|'/') expr
    |   expr ('+'|'-') expr
    |   INT
    |   '(' expr ')'
NEWLINE : [\r\n]+ ;
INT     : [0-9]+ ;
antlr4 Expr.g4
javac Expr*.java
grun Expr prog -gui
grun Expr prog -tree

Type after the following (^D is CTRL-D - That ^D means EOF on unix; it's ^Z in Windows.)


You should see as output the following:

(prog (expr (expr 100) + (expr (expr 2) * (expr 34))) \n)

results matching ""

    No results matching ""