[vtk-developers] vtkParse.y seems to work okay.

Bill Hoffman bill.hoffman at kitware.com
Thu Jun 14 09:35:15 EDT 2001


There is a readme in the wrap directory.  If you don't have access to
these types of machines, we do, and GE does, so one of us could fix it.

-Bill

wrap/README.txt:

Notes on usage of LEX and YACC to generate VTK parse files
----------------------------------------------------------
LEX:
----
1. vtkParse.l is edited as necessary
2. LEX is run (on an SGI Irix 6.4 on 1/14/00 by W. Schroeder): lex vtkParse.l
3. LEX spits out lex.yy.c
4. Manually edit lex.yy.c:
The line:
FILE *yyin = {stdin}, *yyout = {stdout};
should be changed to:
FILE *yyin, *yyout;

YACC:
-----
1. vtkParse.y is edited as necessary
2. yacc is run: "yacc -b vtkParse vtkParse.y" and spits out vtkParse.tab.c
   (Note: yacc was run RedHat Linux 5.2 1/14/00 by W. Schroeder)
3. Build vtkHTML.exe, vtkWrapTcl.exe, vtkParseJava.exe,vtkWrapJava.exe, 
   vtkWrapPython.exe on the PC and check them in.
4. Check in vtkParse.l, lex.yy.c, vtkParse.y, vtkParse.tab.c



At 11:29 AM 6/14/2001 +0530, Prabhu Ramachandran wrote:
>>>>>> "LW" == "Lorensen, William E (CRD)" <lorensen at crd.ge.com> writes:
>
>    LW> They don't work everywhere... The HP is busted.  Your new
>    LW> vtkParse.tab.c is not correct for HPUX 10.0 Rather than
>    LW> defining alloca, you must #include <alloca.h>
>
>Thanks for waking me up! I just saw the error on the dashboard.
>*Sigh*
>
>    LW> This seems to be a known problem since at least 1997.
>    LW> http://www.fm.cornell.edu/usr/doc/bison-1.27/ChangeLog
>
>    LW> Are you using an old Bison?
>
>Indeed, I am using bison 1.22.  Any newer versions seem to have
>trouble with producing vtkParse.tab.c at all.  Here is a snippet from
>my original mail of long ago (28 Apr 2001):
>
>   Under GNU Bison version 1.28, while running yacc through the
>   vtkParse.y I got the foll error.
>
>   $ yacc -b vtkParse vtkParse.y
>   vtkParse.y:854: type clash (`' `str') on default action
>   vtkParse.y:854: type clash (`' `integer') on default action
>   $
>
>The vtkParse.y mentioned above refers to the original vtkParse.y
>before *any* of my modifications.  Which meant that vtkParse.y was
>broken already.  Bison v 1.22 produced a warning instead of an error
>and happily produced the vtkParse.tab.c.
>
>I dont know how I should fix these type clash errors (which is why I
>reported them in the first place asking for help from the yacc gurus).
>If these errors can be fixed I think vtkParse.tab.c can be produced
>using bison 1.28.  If they cannot be then I will have to manually edit
>vtkParse.tab.c and include alloca.h at the appropriate place.  I'd
>obviously prefer using a fixed vtkParse.y.
>
>Would appreciate any help.  Dont you think having a vtkParse.y that
>works with the latest bison is a good thing??  Please note that
>vtkParse.y was buggy w.r.t bison versions > 1.22 _before_ I made any
>of my chages.  So this bug has been there for quite a long while.
>
>Many thanks in advance.
>
>prabhu
>
>_______________________________________________
>vtk-developers mailing list
>vtk-developers at public.kitware.com
>http://public.kitware.com/mailman/listinfo/vtk-developers 





More information about the vtk-developers mailing list