earley-parser-js icon indicating copy to clipboard operation
earley-parser-js copied to clipboard

Extract full parsing forest, even if root production rule consists of few alternatives

Open lagodiuk opened this issue 10 years ago • 1 comments

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).

lagodiuk avatar Dec 06 '15 17:12 lagodiuk

I think it would be helpful if this info was provided in the README.

danmysak avatar Jan 15 '20 22:01 danmysak