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 10:02:23 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

| On the one hand, the closure is essential for the computations of the LR
| algorithms, on the other hand, these are easily computed from the "core
| set", and may be viewed as a nuisance due to unnecessary information
| overflow.

I agree, I personally don't need this information, but while teaching
LALR, I could notice that it's much easier for students if they can
find the whote item set described.


| So perhaps this should be a special "show closures" operation: It should
| perhaps be turned off, but I figure in debugging and for comments on the
| Bison Help list one should be able to turn it on.

I tend to agree, changing my mind as compared to my previous message.
In particular because G++'s output is 1.6Mb long without the option,
and 5.7M with --trace enabled...  That's certainly way too much.

A pity that we don't have .output browser: Hans would have said that
he has a check box to display or not to display the full item set :)



| If it is turned off, the mathematically correct way would be to somehow
| indicate that, i.e., one would write either (option off)
|       state 0
|           closure($axiom  ->  . input $   (rule 0))
|             ...

Nah, the point is to make it easier to reader, not more complex.

| or perhaps
|       state 0
|          $axiom  ->  . input $   (rule 0)
|            closure(input)
|            ...
| 
| And when option on, perhaps:
|       state 0
|           Core: $axiom  ->  . input $   (rule 0))
| 
|           Derived:
|           input  ->  . exp   (rule 1)
|           input  ->  . input exp   (rule 2)
|             ...

I'd suggest to leave it as it was when disabled, and as Core and
Derived when enabled.


Now, there remains the question of the lookaheads.

For instance, still on G++, here is without, and then with.

state 44

    extdef  ->  extern_lang_string . '{' extdefs_opt '}'   (rule 20)
    extdef  ->  extern_lang_string . .hush_warning fndef .warning_ok eat_saved_i
nput   (rule 21)
    extdef  ->  extern_lang_string . .hush_warning datadef .warning_ok   (rule 2
2)
    extern_lang_string  ->  extern_lang_string . EXTERN_LANG_STRING   (rule 48)

    '{'         shift, and go to state 171
    EXTERN_LANG_STRING  shift, and go to state 172

    $default    reduce using rule 8 (.hush_warning)

    .hush_warning       go to state 173



state 44

    .hush_warning  ->  .  [error, IDENTIFIER, TYPENAME, SELFNAME, PFUNCNAME, SCS
PEC, TYPESPEC, CV_QUALIFIER, ENUM, TYPEOF, SIGOF, ATTRIBUTE, AGGR, OPERATOR, TYP
ENAME_KEYWORD, TEMPLATE, SCOPE, PTYPENAME, NSNAME, ';', '&', '*', '~', '(']   (r
ule 8)
    extdef  ->  extern_lang_string . '{' extdefs_opt '}'   (rule 20)
    extdef  ->  extern_lang_string . .hush_warning fndef .warning_ok eat_saved_i
nput   (rule 21)
    extdef  ->  extern_lang_string . .hush_warning datadef .warning_ok   (rule 2
2)
    extern_lang_string  ->  extern_lang_string . EXTERN_LANG_STRING   (rule 48)

    '{'         shift, and go to state 171
    EXTERN_LANG_STRING  shift, and go to state 172

    $default    reduce using rule 8 (.hush_warning)

    .hush_warning       go to state 173



reply via email to

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