help-bison
[Top][All Lists]
Advanced

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

Re: "Recursive parsing"


From: Hans Aberg
Subject: Re: "Recursive parsing"
Date: Fri, 7 Mar 2003 11:05:57 +0100

At 16:34 -0800 2003/03/06, Xinan Tang wrote:
>  In O reilly book   Lex & yacc   written by John R. Levine etc., it
>discussed a way to support recursive parsing, i.e. during parsing grammar
>A yyparse() is called again to parse grammar B. This is very typical in
>parsing a HTML file, in which some script program may be embedded in the
>same HTML file. However the way that is suggested is to manually rename
>some C variables and make them local to yyparse() (page 209 -210 in the
>book).

I think that this might be handled typically (like in WWW browsers) by
letting the subcomponents be handled by DLL's (dynamically linked library).
So one writes libraries of pure parsers, and hands over the text
subportions to them.

Perhaps you can get more info in a newsgroup, such as comp.compilers (which
is moderated by John R. Levine).

  Hans Aberg






reply via email to

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