[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] cex: fix reporting of null nonterminals
From: |
Akim Demaille |
Subject: |
Re: [PATCH] cex: fix reporting of null nonterminals |
Date: |
Tue, 23 Jun 2020 07:01:43 +0200 |
Hi Vincent,
Yes, indeed, it was the empty rules that made the reports confusing.
Good hunch, good catch!
> Le 21 juin 2020 à 22:20, Vincent Imbimbo <vmi6@cornell.edu> a écrit :
>
> I implemented this to print A ::= [ ], but A ::= [ %empty ] might be clearer.
I tend to prefer %empty, indeed.
It is true though that it looks heavier
Example B . b c
First derivation S ::=[ B ::=[ A ::=[ B . ] b A ::=[ ] ] C ::=[ A ::=[ ] c
A ::=[ ] ] ]
Second derivation S ::=[ B C ::=[ A ::=[ B ::=[ A ::=[ . ] b A ::=[ ] ] ] c
A ::=[ ] ] ]
Example B . b c
First derivation S ::=[ B ::=[ A ::=[ B . ] b A ::=[ %empty ] ] C ::=[ A
::=[ %empty ] c A ::=[ %empty ] ] ]
Second derivation S ::=[ B C ::=[ A ::=[ B ::=[ A ::=[ %empty . ] b A ::=[
%empty ] ] ] c A ::=[ %empty ] ] ]
but this example is artificial. With "real world" symbol names, it's
probably more natural.
Let's wait for a possible other opinion, but eventually, I think I'll
use %empty instead.
Thanks a lot for this fix, Vincent, installed.