[antlr-interest] Re: Multiple nondeterminism between lexer rules.

Bharath S payasam79 at yahoo.com
Mon Apr 5 09:51:46 PDT 2004


Hi Michael,

I combined the rules as you had suggested and it
worked! However, I still get a non-determinism warning
upon INT and REAL. Is this OK because non-determinism
gets resolved only when the character after INT/REAL
gets scanned? I am including my rules and your
suggestion to resolve multiple non-determinism, just
to refresh your memory :).

-----------------
R1: A|B; 
R2: C|D;
 
A: INT 'a'; 
B: REAL 'a'; 
 
C: INT 'c';
D: REAL 'd';
-----------------
-----------------
R1 : INT 
    ( 'c'   { $setType(R2); }
    | 'a'
    )
    | REAL
    ( 'a'
    | 'd'  { $setType(R2); }
    )
   ;
----------------- 

Thanks much!

Bharath.


> Cheers,
> 
> Micheal
> ANTLR/C#
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
>      antlr-interest-unsubscribe at yahoogroups.com
> 
>  
> 


=====
Bharath Sundararaman
Graduate Assistant, CAHS.
(312)-5606532 (M)
http://www.cs.uic.edu/~bsundara

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/


 
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