Are rules in PetitParser distributive?
There were next rules:
integerLiteral --> hexIntegerLiteral / octalIntegerLiteral / decimalIntegerLiteral
hexIntegerLiteral --> hexNumeral , (integerTypeSuffix optional)
octalIntegerLiteral --> octalNumeral , (integerTypeSuffix optional)
decimalIntegerLiteral --> decimalNumeral , (integerTypeSuffix optional)
if I change them to:
integerLiteral --> (hexIntegerLiteral / octalIntegerLiteral / decimalIntegerLiteral) , (integerTypeSuffix optional)
hexIntegerLiteral --> hexNumeral
octalIntegerLiteral --> octalNumeral
decimalIntegerLiteral --> decimalNumeral
then 0777L
is not parsed anymore. It should match octalNumeral , (integerTypeSuffix optional)
or in new version octalIntegerLiteral , (integerTypeSuffix optional)
but that isn't happening.