[il-antlr-interest: 35019] Re: [antlr-interest] [antlr] Fixed bug where the 'stderr' attribute will never be null leading to the... (#5)

2011-11-25 Thread Terence Parr
Thanks. fixed in antlr 3 main line; will go out with 3.4.1 but can try at website in dir /depot/antlr3/main/tool/target/antlr-3.4.1-SNAPSHOT.jar Ter On Nov 24, 2011, at 10:53 PM, Kieran Simpson wrote: ... method incorrectly failing gunit test cases. See mailing list thread

[il-antlr-interest: 35020] [antlr-interest] Matching compound keywords in the lexer

2011-11-25 Thread franck102
I am trying to match multi-word keywords at the lexer level, I found the pattern below in previous answers but I can't figure out how to make the type assigned to $type visible to parser rules... any suggestion appreciated! I would rather not modify containOperator to get at the token type, this

[il-antlr-interest: 35021] Re: [antlr-interest] Matching compound keywords in the lexer

2011-11-25 Thread Bart Kiers
Hi Franck, On Fri, Nov 25, 2011 at 9:47 PM, franck102 franck...@yahoo.com wrote: ... containOperator : CONTAINS_TEXT | CONTAINS_MATCH CONTAINS_TEXT : 'contains' WS+ ( 'match' { $type=CONTAINS_MATCH } | 'text' ) ; //

[il-antlr-interest: 35022] Re: [antlr-interest] Matching compound keywords in the lexer

2011-11-25 Thread Bart Kiers
On Fri, Nov 25, 2011 at 9:54 PM, Bart Kiers bki...@gmail.com wrote: ... - tokens { CONTAINS_MATCH; } ... CONTAINS_TEXT : 'contains' WS+ ( 'match' CONTAINS_MATCH | 'text' ) ; ... fragment CONTAINS_MATCH : ;

[il-antlr-interest: 35023] Re: [antlr-interest] Matching compound keywords in the lexer

2011-11-25 Thread Jim Idle
You don't need the tokens def. just the lexer fragment. Jim On Nov 25, 2011, at 12:54, Bart Kiers bki...@gmail.com wrote: Hi Franck, On Fri, Nov 25, 2011 at 9:47 PM, franck102 franck...@yahoo.com wrote: ... containOperator : CONTAINS_TEXT | CONTAINS_MATCH CONTAINS_TEXT :

[il-antlr-interest: 35024] Re: [antlr-interest] Matching compound keywords in the lexer

2011-11-25 Thread Benjamin S Wolf
You can do it either way, I guess. I use just the tokens def myself. On Fri, Nov 25, 2011 at 2:07 PM, Jim Idle j...@temporal-wave.com wrote: You don't need the tokens def. just the lexer fragment. Jim On Nov 25, 2011, at 12:54, Bart Kiers bki...@gmail.com wrote: Hi Franck, On Fri, Nov

[il-antlr-interest: 35025] Re: [antlr-interest] Matching compound keywords in the lexer

2011-11-25 Thread Franck Mangin
Thanks all for the replies. As far as I know just the tokens won't work, the parser complains that no *rule* defines token xxx - which is why I hadn't tried fragments, I assumed I would get the same complaint, but that actually works perfectly. Franck From:

[il-antlr-interest: 35026] [antlr-interest] Possible bug with backtrack-generated predicate methods

2011-11-25 Thread franck102
The grammar below won't compile, this looks like a bug to me? It seems that the syntactic predicate automatically generated by the backtrack option includes the rule parameter but doesn't have a declaration for it. The error I get is: [08:49:44] 1 error [08:50:01]