[il-antlr-interest: 28209] Re: [antlr-interest] Using previously matched parser rule in decision making

2010-03-09 Thread Kieran Simpson
I agree Ron. Ron Burk wrote: It is an interesting idea for a top-down parser generator to just make the parsing stack of non-terminals available to user actions. Whether that's easy or hard depends on the details of how the tool generates parser code. But certainly knowing the context you

[il-antlr-interest: 28210] Re: [antlr-interest] Using previously matched parser rule in decision making

2010-03-09 Thread Gavin Lambert
At 15:47 9/03/2010, Ron Burk wrote: It is an interesting idea for a top-down parser generator to just make the parsing stack of non-terminals available to user actions. Whether that's easy or hard depends on the details of how the tool generates parser code. But certainly knowing the context

[il-antlr-interest: 28216] Re: [antlr-interest] Unexpected behavior - Error?

2010-03-09 Thread Christoph Schinko
Hi Bart! Thanks for the quick answer! Adding an EOF to the rule solves the issue in the toy example. Unfortunately we are using custom token label types and are now getting a ClassCastException. It seems that we now have the problem mentioned here:

[il-antlr-interest: 28217] Re: [antlr-interest] Unexpected behavior - Error?

2010-03-09 Thread Bart Kiers
Hi Chris, sorry, forgot to send to the list the first time! On Tue, Mar 9, 2010 at 4:41 PM, Christoph Schinko c.schi...@cgv.tugraz.atwrote: Hi Bart! Thanks for the quick answer! Adding an EOF to the rule solves the issue in the toy example. Unfortunately we are using custom token label

[il-antlr-interest: 28218] Re: [antlr-interest] Using previously matched parser rule in decision making

2010-03-09 Thread Jim Idle
From anywhere in the parser: java.util.List stack = getRuleInvocationStack(e, getParserName()); But this only works for Java and other targets that copy it (I think C# might do it). I don't do it in C because I prefer to take the view that the C stuff should be as close to the metal as it can

[il-antlr-interest: 28219] [antlr-interest] MismatchedTokenException in simple grammar

2010-03-09 Thread Parker, Joel J. K. (GSFC-5950)
Hi all, I'm completely new to ANTLR and EBNF grammars to begin with, so this is probably a basic issue I'm simply not understanding. I have a rule such as: version_line : WS? 'VERS' WS? '=' WS? '1.0' WS? EOL ; WS : ' '+ ; EOL : '\r' | '\n' | '\r\n' | '\n\r' ; that matches a statement in my

[il-antlr-interest: 28220] Re: [antlr-interest] MismatchedTokenException in simple grammar

2010-03-09 Thread Bart Kiers
FYI: http://stackoverflow.com/questions/2412440/antlr-mismatchedtokenexception-on-simple-grammar List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are

[il-antlr-interest: 28221] [antlr-interest] AntLRWorks Rule Debugging Error

2010-03-09 Thread Rahul Mehta
I am trying to test whenDescriptor rule in following grammar in AntLRWorks. I keep getting following exception as soon as I start debugging. Input text for testing is when order : OrderBll then [16:45:07] C:\Documents and Settings\RM\My Documents\My Tools\AntLRWorks\output\__Test__.java:14:

[il-antlr-interest: 28223] [antlr-interest] Unicode lexing

2010-03-09 Thread Jonathan S. Shapiro
I know this topic has come up before, and sorry to bring it up again. Context: I'm bringing up BitC on CLI, and planning to use antlr to do it. BitC characters cover the full unicode (20 bit) range. The good news: haracters above U+ can only appear in character and string literals. List:

[il-antlr-interest: 28224] [antlr-interest] Stopping parser and lexer at first error

2010-03-09 Thread Corrado Campisano
Hi all, I needed to catch any syntax error (letting the lexer insert/delete chars or the parser keeping parsing with the sys.err message only could be very dangerous to my application), so I took a look on the reference (which reports information not valid anymore) and on the internet and I found

[il-antlr-interest: 28226] Re: [antlr-interest] Using previously matched parser rule in decision making

2010-03-09 Thread Gokulakannan Somasundaram
java.util.List stack = getRuleInvocationStack(e, getParserName()); But this only works for Java and other targets that copy it (I think C# might do it). I don't do it in C because I prefer to take the view that the C stuff should be as close to the metal as it can be and the programmer