[antlr-interest] handling a common prefix

thrutchy eric_mahurin at yahoo.com
Fri Jul 16 06:10:04 PDT 2004


I'm parsing verilog 2000 that allows almost every construct to be
optionally prefixed by something like this:

(* attribute = expression *)

Because it can appear in front of just about any construct and it has
an indeterminate number of tokens (due to expression), it is causing
ambiguities all over the place.

I think one possible solution would be to treat this whole thing as a
token by the lexer.  I don't really like this solution because I will
eventually have to go parse what's inside.

Is there something else I can do?  I want something in between a token
and a parser rule - psuedo token, where the rest of the parser treats
it as a token so that it can easily look ahead and resolve
ambiguities, but it can still be parsed into it's individual components.

Eric




 
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