You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you accidentally define two rules with the same name, the parser generator will generate faulty code making it very difficult to troubleshoot. It should throw an error instead.
Example grammar:
#go:build grammars
# +build grammars
package experiments
type Test Peg {}
Expression <-
FOO { fmt.Println("FOO") }
BAR { fmt.Println("BAR") } !.
FOO <- "foo"
BAR <- "bar"
FOO <- "foo"
More specifically, the parser generator seems to omit one of the rules from the rule array, causing subsequent indices to mismatch and the wrong rules being invoked.
The text was updated successfully, but these errors were encountered:
If you accidentally define two rules with the same name, the parser generator will generate faulty code making it very difficult to troubleshoot. It should throw an error instead.
Example grammar:
More specifically, the parser generator seems to omit one of the rules from the rule array, causing subsequent indices to mismatch and the wrong rules being invoked.
The text was updated successfully, but these errors were encountered: