[antlr-interest] Re: unexpected token ... and a new question
lgcraymer
lgc at mail1.jpl.nasa.gov
Tue Feb 10 19:20:33 PST 2004
--- In antlr-interest at yahoogroups.com, "offline314159" <offline at s...>
wrote:
> I want rules to match a few different types of words - there's a few
> literals, some words that begin "X-" and then there's a few places
> where any non-control ascii character is allowed, provided semicolons
> are escaped.
>
> These are three separate types of token, but you can imagine there are
> a few ambiguities - how do i go about handling that?
Sorry--that doesn't give a clear picture. Syntactic predicates are a
good way of brute-forcing your way past ambiguities--you can later go
back and refactor. For keyword-rich specifications, it usually helps
to construct symbol tables, recognize generic tokens, and use semantic
predicates to look up values in the symbol tables to identify specific
use.
--Loring
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list