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
@wakita You don't explicitly mention that but I'll assume that you really complain about the fact that one can't start parsing from the eliminated rule. So the bug is that even rules specified in the allowedStartRules option get eliminated. Am I right or do you mean something else?
Thank you for your suggestion. Actually, I was not aware of this option. The version I was using, which is installed from npm, did not understand the "--allowedStartRules" option. I tried another version from the master branch.
And yes, you are right. I specified "--allowed-start-rules H1" for the following grammar.
H = "H"
H1 = H
The generated parser generates an entry for "H1" symbol but fails to generate its parser.
In my previous post, I assumed that any nonterminal symbol can be a starting symbol since it seemed to be so for almost all nonterminals.
One of the rules in my grammar is an alias like
Pegjs fails to generate parser function for H (parse_H) during alias elimination (substituting calls to parse_H by parse_Hexadecimal).
A quick workaround is changing the rule definition with
The text was updated successfully, but these errors were encountered: