[antlr-interest] Rule FOLLOW sets

Andrey Desyatov andrey.desyatov at gmail.com
Wed Sep 29 08:51:45 PDT 2010


Hi,

I have a strange behavior with the FOLLOW sets that are generated by antlr.
I have following rule:

variableSyntax
: storageClass* typeModifier* ident ident
 ;

storageClass
: 'extern' | 'nointerpolation' | 'precise' | 'shared' | 'groupshared' |
'static' | 'uniform' | 'volatile'
 ;
typeModifier
: 'const' | 'row_major' | 'column_major'
 ;

ident
        : Identifier
        ;


In this case antlr generate code where FOLLOW_storageClass_in_variableSyntax
and FOLLOW_typeModifier_in_variableSyntax are the same.
Why can this happen? Is it concerning the syntax of the grammar or just
internal implementation of the library?

Best regards,
Andrey



-- 
С уважением,
Десятов Андрей


More information about the antlr-interest mailing list