help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enable experimental report features?


From: Akim Demaille
Subject: Re: Enable experimental report features?
Date: 06 May 2002 14:17:14 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

| > From: Akim Demaille <address@hidden>
| > Date: 05 May 2002 14:01:37 +0200
| > 
| >     state 0
| >         Core:
| >         $axiom  ->  . input $   (rule 0)
| > 
| >         Derived:
| >         input  ->  . exp   (rule 1)
| >         input  ->  . input exp   (rule 2)
| >         exp  ->  . token1 "1"   (rule 3)
| >         exp  ->  . token2 "2"   (rule 4)
| >         exp  ->  . token3 "3"   (rule 5)
| >         token1  ->  . token   (rule 6)
| >         token2  ->  . token   (rule 7)
| >         token3  ->  . token   (rule 8)
| > 
| >         token       shift, and go to state 1
| > 
| >         input       go to state 2
| >         exp         go to state 3
| >         token1      go to state 4
| >         token2      go to state 5
| >         token3      go to state 6
| 
| Hmm, that looks pretty verbose. 

Yes, it really is.

| I'm inclined to think that the extra
| verbosity should be enabled only with an extra option.  I suspect that
| in most cases, novices will be intimidated by the extra output (even
| more than they are already intimidated :-), and experts won't need it.

There are two kinds of novices: I'm referring to people trying to
understand the theory, and toying with small grammars, and it looks
like you are referring to people working on real grammars, trying to
debug them.

Note that the latter often strip down the grammar to the core which
has problems, and then become members of the formers.

As for novices, when you draw an automaton by hand and then look at
what Bison says, you find it hard to follow, precisely because it
lacks all sort of things (lookaheads, and derived items).

| My suspicion could be wrong, but if so I'd like to know why I'm wrong.

My experience shows that to properly understand a conflict, you have
to find the path in the automaton from the state 0 to the state having
the conflict.  This is _much_ easier to find when you have the whole
item set displayed.



So, it seems clear that it has to be an additional option :)  Now the
question is: one additional option (--report, which I find much better
than -v/--verbose which is definitely what we are used to for
-v/--verbose), or two (--verbose-lookaheads, --verbose-itemsets)?

1. --verbose => traditional
   --report  => verbose

or

2. --verbose
   --verbose + --verbose-lookaheads
   --verbose + --verbose-itemsets
   --verbose + --verbose-lookaheads + --verbose-itemsets

Hm.  There is also the VCG automaton.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]