Skip to content

Need help redefining some of these rules as non-left-recursive #756

Answered by ethindp
ethindp asked this question in Q&A
Discussion options

You must be logged in to vote

Okay so I just resolved it, and it was a lot easier than I thought. I just translated:

Name = { DirectName | ExplicitDereference | IndexedComponent | Slice | SelectedComponent | AttributeReference | TypeConversion | FunctionCall | CharacterLiteral | QualifiedExpression | GeneralizedReference | GeneralizedIndexing | TargetName }

Into:

Name = _{ DirectName ~ NamePrime }
NamePrime = _{ ((ExplicitDereference ~ NamePrime) | (IndexedComponent ~ NamePrime) | (Slice ~ NamePrime) | (SelectedComponent ~ NamePrime) | (AttributeReference ~ NamePrime) | (TypeConversion ~ NamePrime) | (FunctionCall ~ NamePrime) | (CharacterLiteral ~ NamePrime) | (QualifiedExpression ~ NamePrime) | (GeneralizedReferenc…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ethindp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #755 on December 29, 2022 01:34.