Hi,
I believe that in that grammar "root" is the start rule.
so I run this command on the command line
antlr4-parse PostgreSQLParser.g4 root
and then I get around 600 lines of warnings like
warning(125): PostgreSQLParser.g4:51:12: implicit definition of token SEMI in parser
warning(125): PostgreSQLParser.g4:183:6: implicit definition of token MetaCommand in parser
warning(125): PostgreSQLParser.g4:183:18: implicit definition of token EndMetaCommand in parser
warning(125): PostgreSQLParser.g4:187:6: implicit definition of token CALL in parser
warning(125): PostgreSQLParser.g4:191:6: implicit definition of token CREATE in parser
and then I enter a sample sql statement like
select id from person where age > 10;
and press enter.
but that doesn't do anything
I can just a a cursor blinking.
and then when I do ctrl-c a couple of times
I get this message.
Exception in thread "main" java.lang.IllegalStateException: A lexer interpreter can only be created for a lexer or combined grammar.
Am I doing something wrong here?