[il-antlr-interest: 29000] [antlr-interest] Error in AST

2010-05-26 Thread Nourchn Nor
I wrote one grammar on AntlrWorks but one error is shown when I add same statement, Here is the error: error(211): Essai.g:87:16: [fatal] rule predicate has non-LL(*) decision due to recursive rule invocations reachable from alts 5,6. Resolve by left-factoring or using syntactic predicates or

[il-antlr-interest: 29001] Re: [antlr-interest] Error in AST

2010-05-26 Thread Andrew Haley
On 05/26/2010 11:18 AM, Nourchn Nor wrote: I wrote one grammar on AntlrWorks but one error is shown when I add same statement, Here is the error: error(211): Essai.g:87:16: [fatal] rule predicate has non-LL(*) decision due to recursive rule invocations reachable from alts 5,6. Resolve by

[il-antlr-interest: 29002] [antlr-interest] parsing rules

2010-05-26 Thread George Soom
Hi, I have to rewrite several files with mathematical text in them. Text substitutions are really simple (e.g. 'a=4' - 'a:=4;' and similar). Input is in form: a=4 b=3 draw(a) draw(b) Needed output - a:=4; b:=3; draw(a, constant arguments) draw(b, constant arguments) The best

[il-antlr-interest: 29003] [antlr-interest] Using input.getSourceName() and INCLUDE processing

2010-05-26 Thread Pauba, Kevin L
I have a JAVA language rewrite translator that adds some more modern control constructs to an existing DSL. ANTLR has been invaluable. I've provided include file support using the methods outlined in http://www.antlr.org/wiki/pages/viewpage.action?pageId=557057 but I would like to use the

[il-antlr-interest: 29004] Re: [antlr-interest] parsing rules

2010-05-26 Thread Jim Idle
Your s: rule needs to set $st to something too or it will return an empty template :-) Jim -Original Message- From: antlr-interest-boun...@antlr.org [mailto:antlr-interest- boun...@antlr.org] On Behalf Of George Soom Sent: Wednesday, May 26, 2010 4:01 AM To: antlr-interest@antlr.org

[il-antlr-interest: 29005] Re: [antlr-interest] Inexplicable RewriteEmptyStreamException in parser grammar

2010-05-26 Thread Richard Thrippleton
False alarm. There was some subtle abuse going on deep down in our setup of the parser (our tree adaptor was creating error nodes incorrectly). Apologies! Richard Richard Thrippleton wrote: I'm using the Java target with ANTLR 3.2, and having a problem in a rule in my parser grammar that

[il-antlr-interest: 29006] [antlr-interest] greedy subrule option idiom

2010-05-26 Thread Junkman
Hello, Following is a lexer rule to match quoted string that allows backslash escape sequence. STRING :'' ( options {greedy=false;} : ( ~ '\\' | '\\' . ) )* '' ; It seems to work. But if you put the '*' operator inside the subrule like this: STRING :

[il-antlr-interest: 29007] [antlr-interest] Ambiguous grammar

2010-05-26 Thread Ondrej Krc-Jediny
Hello, I am new to ANTLR and I'd appreciate help with my problem. At first some grammar rules I am going to talk about: DIGIT: '0'..'9'; LETTER: 'a'..'z'|'A'..'Z'; REAL : (DIGIT)+ '.' (DIGIT)* EXPONENT? | '.' (DIGIT)+ EXPONENT? | (DIGIT)+ EXPONENT ; INTEGER: DIGIT+;

[il-antlr-interest: 29008] Re: [antlr-interest] Ambiguous grammar

2010-05-26 Thread Jim Idle
Please see the FAQ: http://www.antlr.org/wiki/display/ANTLR3/Lexer+grammar+for+floating+point%2C+dot%2C+range%2C+time+specs Also note that there is a search engine: http://antlr.markmail.org For this group, and it is really good: http://antlr.markmail.org/search/?q=range Jim

[il-antlr-interest: 29009] [antlr-interest] ANTLR v4 progress

2010-05-26 Thread Terence Parr
Just passing along an example HTML subset lexer/parser using ANTLR v4; thanks to debugging and moral support from Oliver Zeigermann, we got the code generation and runtime support working sufficiently to use the following grammars. generate some really nice code indeed. You will note that,

[il-antlr-interest: 29010] Re: [antlr-interest] ANTLR v4 progress

2010-05-26 Thread kferrio
Way cool! Just curious...is the modal state variable automatically accessible to the parser? Perhaps on a subchannel synced with the token stream? Sorry to be tuning in late...always interested in new paths to semiosis. :) Anyway...I need to take a look at girhub and think up a fun use.

[il-antlr-interest: 29011] Re: [antlr-interest] ANTLR v4 progress // switch fro v2.7.2

2010-05-26 Thread Ruslan Zasukhin
On 27/5/10 2:18 AM, Terence Parr pa...@cs.usfca.edu wrote: Hi Terrence, Just passing along an example HTML subset lexer/parser using ANTLR v4; thanks to debugging and moral support from Oliver Zeigermann, we got the code generation and runtime support working sufficiently to use the