When parsing strings that contain the result of epsilon productions with EarleyParser,
the parsed subtree containing the nullable nonterminal has an empty children list,
as if the nonterminal was a terminal.
(see description of Derivation Trees at https://www.fuzzingbook.org/html/GrammarFuzzer.html#Derivation-Trees)
To Reproduce
Steps to reproduce the behavior:
Run
from fuzzingbook.Parser import EarleyParser
next(EarleyParser({"<start>": [""]}).parse(""))
The return value is
Expected behavior
The return value is expected to be
Additional context
This issue might cause #153
When parsing strings that contain the result of epsilon productions with EarleyParser,
the parsed subtree containing the nullable nonterminal has an empty children list,
as if the nonterminal was a terminal.
(see description of Derivation Trees at https://www.fuzzingbook.org/html/GrammarFuzzer.html#Derivation-Trees)
To Reproduce
Steps to reproduce the behavior:
Run
The return value is
Expected behavior
The return value is expected to be
Additional context
This issue might cause #153