correct. it's looking for a pattern.  we could do ((((('_'))))) as well.
Ter
On Nov 3, 2008, at 8:18 PM, Sam Harwell wrote:

> Based on the current grammar, this rule is not a set:
>
> 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