Hi,
When using %glr-parser directive, if an ambiguity is found,
yyreportAmbiguity only reports two options. One denoted by yybest and
the other by yyp (or something like that). Do you think it might be
possible to list all parse possibilities for an ambiguous sentence ?
P.S. I am willing to do the same myself but could you instruct me on how
to proceed with that ?
P.P.S. I am using bison for NLP.
Sincerely,
Shashwat
India
************************************************************************
DEMO OUTPUT
I ATE THE APPLES IN THE CAR AT THE HOSPITAL.
N2(I,5) -> NP1
Ambiguity detected.
Option 1,
VP2 -> <Rule 52, tokens 2 .. 10>
V <tokens 2 .. 2>
NP3 -> <Rule 9, tokens 3 .. 7>
ART <tokens 3 .. 3>
N <tokens 4 .. 4>
PP -> <Rule 56, tokens 5 .. 7>
P <tokens 5 .. 5>
NP3 -> <Rule 8, tokens 6 .. 7>
ART <tokens 6 .. 6>
N <tokens 7 .. 7>
PP -> <Rule 56, tokens 8 .. 10>
P <tokens 8 .. 8>
NP3 -> <Rule 8, tokens 9 .. 10>
ART <tokens 9 .. 9>
N <tokens 10 .. 10>
Option 2,
VP2 -> <Rule 52, tokens 2 .. 10>
V <tokens 2 .. 2>
NP3 -> <Rule 8, tokens 3 .. 4>
ART <tokens 3 .. 3>
N <tokens 4 .. 4>
PP -> <Rule 56, tokens 5 .. 10>
P <tokens 5 .. 5>
NP3 -> <Rule 9, tokens 6 .. 10>
ART <tokens 6 .. 6>
N <tokens 7 .. 7>
PP -> <Rule 56, tokens 8 .. 10>
P <tokens 8 .. 8>
NP3 -> <Rule 8, tokens 9 .. 10>
ART <tokens 9 .. 9>
N <tokens 10 .. 10>
_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison