earley-parser-js
earley-parser-js copied to clipboard
Extract full parsing forest, even if root production rule consists of few alternatives
Description of existing behaviour:
Currently parser generates full parsing forest only in case, if root production rule doesn't have alternatives.
Described specificity requires, that root production rule should be defined without alternatives. For example:
Root -> X
X -> A | B | C
A -> ...
B -> ...
...
On the other hand, parser will generate only subset of the parsing forest - if grammar will be expressed in the following form:
Root -> A | B | C
A -> ...
B -> ...
...
TODO: This limitation can be relaxed by careful refactoring of existing code (no algorithmic changes needed).
I think it would be helpful if this info was provided in the README.