[antlr-interest] v3: can't seem to work out filter=true
mark.mandel at gmail.com
Mon May 28 17:52:22 PDT 2007
I'm trying to wrap my head around filter=true, and failing.
I'm currently just trying to implement a grammar that will pick up
<tag> 's anywhere in a string, regardless of the string.
I figured a perfect opportunity for filter=true, which I had thought
would ignore what I didn't want, and allow me to filter down a list of
intended tokens in order (which is very handy).. but I can't seem to
get it to work for me.
When I do a test string of '<h>' against the below grammar, I get a
TokenException, but if I take out the filter=true, then it works
fine... I'm confused?
Can someone please point me in the right direction?
/* Parser */
/* Lexer */
/* fragments */
(LETTER)(LETTER | DIGIT | '_')*
'a'..'z' | 'A'..'Z'
/* hidden tokens */
E: mark.mandel at gmail.com
More information about the antlr-interest