[il-antlr-interest: 34902] [antlr-interest] ANTLRWorks supporting of import

2011-11-15 Thread yushang
Hi everyone, Does ANTLRWorks support the import command? When I open a grammar with import command ANTLRWorks complain something like Undefined import ... Thanks in advance List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe:

[il-antlr-interest: 34906] Re: [antlr-interest] init bug

2011-11-15 Thread Douglas Godfrey
create a testParser.cpp file which consists of 1 line #include testParser.c When your project compiles testParser.cpp the generated code for declaring flag will work. NOTE: you cannot use the variable flag in any predicate or production before the first token is consumed. code before the

[il-antlr-interest: 34907] Re: [antlr-interest] missing MATCHRANGE macro

2011-11-15 Thread Douglas Godfrey
try using the Number lexer rule from the Sun Java lexer posted on the Antlr site. The Number rule handles Float and Int as well as hex and octal values. The resulting tokens are Float or Int. On 11/7/11 4:47 PM, John B. Brodie j...@acm.org wrote: On 11/07/2011 12:32 PM, Jim Idle wrote:

[il-antlr-interest: 34909] Re: [antlr-interest] Having trouble with creating a parser for my desired grammar. Running afoul of multiple alternatives warnings

2011-11-15 Thread Jarrod Roberson
Thanks to Bart's persistence in explaining where I was going astray, I understand where my logic error was with my ambiguity being at the end of the my `function` definition. My question now is, how do I define a nested function without introducing a bunch of cruft, like braces or other block

[il-antlr-interest: 34910] Re: [antlr-interest] Having trouble with creating a parser for my desired grammar. Running afoul of multiple alternatives warnings

2011-11-15 Thread John B. Brodie
Greetings! I think you have issues with your function, number, and ATOM rules. see below... I have attached my complete, modified, grammar that successfully parses your input sample. On 11/14/2011 11:47 PM, Jarrod Roberson wrote: I am trying to write a parser for the following syntax

[il-antlr-interest: 34911] Re: [antlr-interest] Having trouble with creating a parser for my desired grammar. Running afoul of multiple alternatives warnings

2011-11-15 Thread Jarrod Roberson
thanks for the indepth review and comments, I really appreciate the help ... -- Jarrod Roberson 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: 34912] [antlr-interest] This should be easy - but I can't figure it out

2011-11-15 Thread Voelkel, Andy
Hi, I keep running into questions like this, and don't know how to answer them. Could anyone look at this simple example and tell me how I would accomplish my goal? I think I've got a central concept mixed up in my head. What I'm trying to do is under the array rule below, where I'm trying to

[il-antlr-interest: 34914] Re: [antlr-interest] This should be easy - but I can't figure it out

2011-11-15 Thread John B. Brodie
Greetings! First 2 caveats then see discussion below: 1) I do not know C#. all of my suggestions are based on the Java target. 2) My suggestions are from memory. I have not actually tested them (or rather I have tested them in the past on other problems and hope memory works). On 11/15/2011