[antlr-interest] lexical filters in v4?
Terence Parr
parrt at cs.usfca.edu
Sat Jan 21 09:59:18 PST 2012
nope. i think .* and modes are sufficient now.
Ter
On Jan 20, 2012, at 7:02 PM, Peter Boughton wrote:
> It doesn't seem like v4 supports lexical filters?
>
> Using the example here: http://www.antlr.org/wiki/display/ANTLR3/Lexical+filters
>
> The generated code is:
>
> System.out.println("found var
> "+(_localctx.name!=null?_localctx.name.getText():null));
>
> Which caused the Java error:
>
> "name cannot be resolved or is not a field"
>
>
> I need to be able to match a closing tag against an opening tag (which
> may have assorted nested tags), which means I need some way to extract
> a tagname during the opening rule, and check against it in the closing
> rule.
>
> Any recommendations for how to handle that?
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest
mailing list