PetitParser 中的规则是可分配的吗?
有以下规则:
integerLiteral --> hexIntegerLiteral / octalIntegerLiteral / decimalIntegerLiteral
hexIntegerLiteral --> hexNumeral , (integerTypeSuffix optional)
octalIntegerLiteral --> octalNumeral , (integerTypeSuffix optional)
decimalIntegerLiteral --> decimalNumeral , (integerTypeSuffix optional)
如果我将它们更改为:
integerLiteral --> (hexIntegerLiteral / octalIntegerLiteral / decimalIntegerLiteral) , (integerTypeSuffix optional)
hexIntegerLiteral --> hexNumeral
octalIntegerLiteral --> octalNumeral
decimalIntegerLiteral --> decimalNumeral
then0777L
不再被解析。它应该匹配octalNumeral , (integerTypeSuffix optional)
或在新版本octalIntegerLiteral , (integerTypeSuffix optional)
中,但没有发生。