bison-patches
[Top][All Lists]
Advanced

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

Re: VCG patch


From: akim
Subject: Re: VCG patch
Date: Wed, 8 Aug 2001 20:58:33 +0200
User-agent: Mutt/1.3.18i

On Wed, Aug 08, 2001 at 08:38:27PM +0000, marc-alexandre autret wrote:
> 
> Hi,
> 
> It's the last VCG patch plus two or
> tree things.
> 
> I wait for your confirmation Akim.

Sounds good to me, thanks.  Please, install, but change a few things
below:

> +2001-08-07  Marc Autret  <address@hidden>

Today is the eighth :)

> +
> +     * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
> +     * src/vcg.c (output_node): Fix.
> +     * src/vcg.h: Cleanup.
> +     * src/print_graph.c: Add comments.
> +     (node_output_size): New global variable. Simplify the formatting of 
> +     the VCG graph output.
> +     (print_actions): Unsed code is now used. It notifies the final state 

s/unsed/unused/.

> +     and no action states in the VCG graph. It also give the reduce actions.
> +     The `shift and goto' edges are red and the `go to state' edges are 
> +     blue.
> +     Get the current node name and node_obstack by argument.
> +     (node_obstack): New variable.
> +     (print_state): Manage node_obstack.
> +     (print_core): Use node_obstack given by argument.
> +     A node is not only computed here but in print_actions also.
> +     (print_graph): CPP out useless code instead of commenting it.
> +
>  2001-08-07  Pascal Bart  <address@hidden>
>  
>       * tests/atconfig.in (CPPFLAGS): Fix.
> @@ -7,7 +26,7 @@
>       * src/print_graph.c (quote): New.
>       (print_core): Use it.
>  
> -2001-08-06  Akim Demaille  <address@hidden>, Marc Autret  <address@hidden>
> +2001-08-06  Akim Demaille  <address@hidden>, Marc Autret  <address@hidden>

I'd prefer that ChangeLog fixes be commited alone please.

> -2001-08-06  Marc Autret   <address@hidden>
> +2001-08-06  Marc Autret   <address@hidden>

And BTW, there are only 2 spaces before the email.

> -     fprintf (f, "    $default\taccept\n");
> +     obstack_sgrow(node_obstack, "$default: accept");

Try not to forget that there is a space before the paren.

> @@ -168,13 +167,25 @@
>         if (!errp->errs[j])
>           continue;
>         symbol = errp->errs[j];
> +       /* If something have been added in the node_obstack after

s/have/has/

It is traditional to use capitalized names in comments when referring
to entity names: NODE_OBSTACK.

>    if (consistent[state] && redp)
>      {
>        rule = redp->rules[0];
>        symbol = rlhs[rule];
> +      if (obstack_object_size (node_obstack) > node_output_size)
> +     obstack_sgrow (node_obstack, "\\n");
> +      obstack_fgrow2 (node_obstack, _("$default\treduce using rule %d (%s)"),
> +                   rule, tags[symbol]);

Be sure not to use too long a string here.  You might be right, I dunno,
but check that it does pollutes too much the graph.  Up to now we have
something very concise, almost mathematical, no English at all.  See
if you can find something equivalent with no text.

> +  { /* Here we begin to compute the node label. */

Gross!  You may use more than 25l per function :)  Please, insert
a new line before the comment.

> +    /* Keep the size of node_obstack before computing the label. It is 
> +       usefull to format the label.  */

s/usefull/useful/

Could you tell me what you think remains to be done?



reply via email to

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