bug-bison
[Top][All Lists]
Advanced

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

bison-2 bug


From: twlevo
Subject: bison-2 bug
Date: Thu, 27 Jan 2005 04:50:58 +0100 (CET)
User-agent: SquirrelMail/1.4.3a

in bison-2 and bison cvs :

in vcg.c output_graph() is a line calling get_view_str():
  if (g->view != G_VIEW) { ... }

static const char * get_view_str (enum view view)
{
  switch (view)
    {
    case normal_view:   return "normal_view"; <--
    case cfish:         return "cfish";
    case pfish:         return "pfish";
    case fcfish:        return "fcfish";
    case fpfish:        return "fpfish";
    default:            abort (); return NULL;
    }
}

in vcg graph language `view: normal_view' does not exist
and to do that there should be a empty line.

the vcg view is normal by default.

bison-2 currently distributed will actually never generate
such line and generates always correct vcg graphs.

still better to fix. did it with this on bison-cvs-version:

341c341
<     case normal_view: return "normal_view";
---
>     case normal_view: abort (); return NULL; /* `view: normal_view' does
not exist in vcg-1.30 */
811,813c811,819
<   if (g->view != G_VIEW)
<     fprintf (fout, "\tview:\t%s\n", get_view_str (g->view));
<
---
>   if (g->view != G_VIEW) {
>     if (g->view==normal_view) {
>       /* vcg view is normal by default. no extra line needed. */
>     } else {
>         /* one of the vcg fisheye view modes */
>       fprintf (fout, "\tview:\t%s\n", get_view_str (g->view));
>     }
>   }
>

See also vcg-1.30/src/preconf/grammar.l , the lexer src or
http://savannah.nongnu.org/cgi-bin/viewcvs/vcgdotgnu/vcg-1.30/vcg-1.30/src/preconf/grammar.l?rev=1.1.1.1&content-type=text/vnd.viewcvs-markup

Thanks, and bison-2 runs fine btw.






reply via email to

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