ANLTR stucks during generation of a PLSQL grammar

223 views
Skip to first unread message

Martin Jiřička

unread,
Feb 20, 2014, 3:39:20 AM2/20/14
to antlr-di...@googlegroups.com

Hi all!

I am trying to use ANTLR for parsing PLSQL code using Mr. Porcelli's parser: https://github.com/porcelli/plsql-parser. This is my first experience with ANTLR, but I already made some smaller parsers using Lex+Bison.

So I made some super easy expression evaluator to get into ANTLR and then I tried to generate PLSQL grammar. Generating a lexer grammar ("lexer grammar PLSQLLexer;")  was successful, but generation of a parser grammar ("parser grammar PLSQLParser;") never ended. It almost looks like a deadlock or never ending cycle in ANTLR. No relevant output is written before generation gets stuck. At least nothing that would help me to understand what went wrong.

I tried both ANTLRv3.3 (for this version of ANTLR the parser was made) and the latest 3.5.1. I even tried both java6 and java7, but without any change.

Can somebody give me a hint, where could be a problem?


Thank you very much for all advices!

Martin Jiricka

Terence Parr

unread,
Feb 20, 2014, 12:04:26 PM2/20/14
to antlr-di...@googlegroups.com
Hi. No doubt you will need to give antlr 3 too a huge amount of RAM. try that.
Ter
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Martin Jiřička

unread,
Feb 21, 2014, 9:07:39 AM2/21/14
to antlr-di...@googlegroups.com

I used a private reply accidentaly. Sorry for that!

Second try to finish this topic.

This command:

java -Xms8G -Xmx16G -Xss8G -jar ../../antlr-3.3-complete.jar PLSQLParser.g

compiled the parser after a few minutes and around 4GB of allocated memory.

Thank you very much again!

Best regards
Martin Jiricka

 
Reply all
Reply to author
Forward
0 new messages