help-bison
[Top][All Lists]
Advanced

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

Re: "Recursive parsing"


From: Akim Demaille
Subject: Re: "Recursive parsing"
Date: Fri, 07 Mar 2003 12:33:57 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2

 Xinan> Hi Carl,
 Xinan> Thanks for your input.

 Xinan> However it doesn't work by simply using '-p' option. 

 Xinan> For example the tables (arrays) such as yytable[], yydefact[], and
 Xinan> yypact[] are still using the same names. Please remember that in the
 Xinan> recursive parsing these tables should be different for different
 Xinan> grammars.
 Xinan> Ideally it should be html_yy_table for HTML and xml_yy_table for XML
 Xinan> parsing.

 Xinan> That is why in the O'reilly book, it suggests using renaming and make
 Xinan> these arrays local to yyparse(). However one has to use 'sed' to do it
 Xinan> :(

Sorry, but I fail to see the problem.  Do not try to have two
grammars, to parser implementations, within the same compilation unit
(*.c).  Rather, have several *.y, several *.c, and in one of them,
just invoke fooparse.




reply via email to

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