[antlr-interest] Keywords not context-free
Clifford Heath
clifford.heath at gmail.com
Mon Oct 15 14:32:13 PDT 2007
In a grammar I'm working on, I have a significant subset of the
language that allows arbitrary-length strings of identifiers,
where words that are keywords elsewhere (like "is") may be used
as regular identifiers.
Is there a general way to handle this kind of context-sensitivity
in ANTLR (as in, backup and retry if the grammar reports an error),
or must I explore traditional methods of informing the lexer?
Also, can someone point me to a brief synopsis of the ANTLR method
of handling lexical contexts. I don't have the book yet, so I'd
like an online source.
Clifford Heath.
More information about the antlr-interest
mailing list