Sam Harwell schrieb:
> Based on the current grammar, this rule is not a set:

Do you really want the "not" there? Otherwise the second example has a
double negation.

Johannes
> 
>  
> 
> NUMBER             :               '0'..'9'
> 
>                 |              'A'..'Z'
> 
>                 |              '_'
> 
>                 ;
> 
>  
> 
> But the following is not:
> 
>  
> 
> NUMBER             :               '0'..'9'
> 
>                 |              'A'..'Z'
> 
>                 |              ('_')
> 
>                 ;
> 
>  
> 
> By modifying testBlockAsSet, testSetElement, and testSetRule to return
> [int numAlts], you can keep track of more allowable sets, including
> those that have a fragment rule as an element. Grammar.isValidSet() then
> returns true if no exception is thrown and the returned number of alts
> is greater than 1.
> 
>  
> 
> Sam
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> antlr-dev mailing list
> [email protected]
> http://www.antlr.org:8080/mailman/listinfo/antlr-dev

_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org:8080/mailman/listinfo/antlr-dev

Reply via email to