Skip to content

kdefombelle/sqlparser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sqlparser

To test class generation from command line, go to antlr installation directory containing $ANTLR_HOME

  • antlr-4.7.2-complete.jar
  • antlr4.bat
  • grun.bat

Then rely on resource found [here|]

  • Copy to $ANTLR_HOME grammar files PlSqlLexer.g4 and PlSqlParser.g4
  • Copy to $ANTLR_HOME Lexer and Parser Java classes from here
  • Run
     antlr4 PlSqlLexer.g4
     java org.antlr.v4.Tool PlSqlLexer.g4
     antlr4 PlSqlParser.g4
     java org.antlr.v4.Tool PlSqlParser.g4
     javac Pl*.java

Then you can test via grun PlSql r -tree or grun PlSql r -gui

It prompts you for an input you can enter as follows

java org.antlr.v4.gui.TestRig PlSql r -gui
SELECT FIELD1 FROM TABLE1;
^Z

cf. https://stackoverflow.com/questions/56660700/how-to-use-antlr4-plsql-grammar-java-and-org-antlr-v4-gui-testrig

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published