Skip to content

Ambuguity and Lookahead #222

Answered by alecthomas
glebarez asked this question in Q&A
Apr 26, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

This is correctly failing, AFAICT, because Condition -> ConditionTerm and ConditionTerm has the following:

type ConditionTerm struct {
	Call       *Call       ` @@`
	Comparison *Comparison `| @@ `
}

The Call matches, but not Comparison which is what would allow = to be parsed correctly. So basically your grammar is not structured correctly for the input.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@alecthomas
Comment options

Answer selected by glebarez
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