parser multiple times called recursively

anand akhare <[email protected]> Tue, 26 Mar 2024 17:19:21 +0000
Newsgroups gmane.comp.parsers.bison.general
Message-ID <KL1PR04MB77920E059D021A42875A3D9EBE352@KL1PR04MB7792.apcprd04.prod.outlook.com>
hello,
    with pure option, bison parser can be multithreaded. however, i want to=
 call parser recursively by iitself. Below is small code snippet to exempli=
fy:


token1: token2 token3
     {
                   // .... switch yylex buffer state
                   yyparse();
                  // .... switch back to previous yylex buffer state
}

In this yylex() is used with buffer state.  Will this be fine or is there i=
ssue in this? This is called in single context and no multi threading. yyle=
x() will have  parameter for YYSTYPE.  flex code has to be reentrant. This =
is not multi threaded though recursively calling parser within itself is so=
mething I am not sure. Pls clarify if this is fine.

Regards
Anand