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
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
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' )
;
//
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 : ;
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
:
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
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:
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]