[antlr-interest] Re: lexical nondeterminism between IDENT & LABEL

Paul J. Lucas pauljlucas at mac.com
Wed Nov 3 23:39:10 PST 2004


On Thu, 4 Nov 2004, thoth2487 wrote:

> Now parser work fine with 'ident' & 'label'
> but new WS behaviour make more complex parsers
> rules which must check always also presence of WS. Eg:
> 
> conditional:
>   IF
>   (WS)?
>   expression
>   (WS)?
>   goto
>   ........ and so on
> 
> What I've mistaked ? What do you suggest about ?

	You make the rule include whitespace:

		... ( (WS)? ':' { $setType( LABEL ); } )

	- Paul



 
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