[il-antlr-interest: 28983] [antlr-interest] Please, help to write a tree walker

2010-05-24 Thread Ламер
Hi, can you help me to write Tree grammar. ClassCastException is thrown while my Test runs. Here is the code of Combined grammar and Tree grammar that doesn't work. Combined grammar:

[il-antlr-interest: 28985] Re: [antlr-interest] Please, help to write a tree walker

2010-05-24 Thread John B. Brodie
Greetings! I am unable to compile your combined grammar. On Mon, 2010-05-24 at 12:55 +0400, Ламер wrote: STRING_LITERAL : '' { StringBuilder b = new StringBuilder(); } ( c=~('' | '\r' | '\n'/* | VARIABLE*/) { b.appendCodePoint(c); }

[il-antlr-interest: 28987] [antlr-interest] bug in antlr 3.0

2010-05-24 Thread Nishanth singh
Hello, I was trying to parse the following string 220v/60/1-ph, 2.8kw, 12.7 amps, NEMA 6-20P, 550 slices or bun halves per hour (nc) . It is succesffully parsing. But Instead of 550 if it is an 850 or instead of 12.7 if it is an 8.7 then it is showing some error. Except the number 8 all the other

[il-antlr-interest: 28988] Re: [antlr-interest] bug in antlr 3.0

2010-05-24 Thread Kaiser, Roger
You don't normally see that kind of behavior in a major appliance. Could you post your grammar? -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest-boun...@antlr.org] On Behalf Of Nishanth singh Sent: Monday, May 24, 2010 12:39 PM To: antlr-interest@antlr.org

[il-antlr-interest: 0] Re: [antlr-interest] Dynamic scope for lexer rule

2010-05-24 Thread Junkman
Greetings, Let me raise the question again. Sorry that this is becoming something of pattern for me. Adding a dynamically scoped attribute to a lexer rule seems to generate the error message (shown at the bottom as part of my previous post on this subject) when generating recognizers. The

[il-antlr-interest: 28991] Re: [antlr-interest] Dynamic scope for lexer rule

2010-05-24 Thread Jim Idle
Scopes are not supported for lexer rules, you need to implement your own things to do this, but try to leave any kind of context out of the lexer if you can. You want to push such things as high up the tool chain as you can. IT isn't always possible though. Jim -Original Message-