RE: Visual C++/MFC Lex and Yacc

"Rao, Venkateswara (MIS, GEFanuc, NA)" <>
3 May 1997 00:50:58 -0400

          From comp.compilers

Related articles
Visual C++/MFC Lex and Yacc (JUKKA) (1997-04-18)
Re: Visual C++/MFC Lex and Yacc (1997-04-22)
RE: Visual C++/MFC Lex and Yacc (Rao, Venkateswara (MIS, GEFanuc, NA)) (1997-05-03)
| List of all articles for this month |

From: "Rao, Venkateswara (MIS, GEFanuc, NA)" <>
Newsgroups: comp.compilers
Date: 3 May 1997 00:50:58 -0400
Organization: Compilers Central
References: 97-04-120 97-04-157
Keywords: parse, C++


Actually, I had fair amount of success in custmizing skeleton
files.There are not quite many
changes in skeleton files (viz, yaccpar.c, lexscan.c).
1. replacing usage of yyin, yyout, yyerr with CFile object. Using Read,
Write methods of
        CFile instead fread/fwrite
2. replacing all calls to fprintf/printf with calls.
3. implementing yyerror() to do application specific stuff.
4. Reinitializing all global variables between invocations of the

I think that is pretty much it.


Chris Clark USG wrote:
>> 1. I tried to convert Bison++ and Flex++ to Visual C++ in WIndows ..
>> but it is such a preprosessor code junk .. and I cannot put my
>> precompiled headers there without touching the generators .. and would
>> not like to do that. Have sombody generators for Windows Visual C++?
>To answer the specific request, Yacc++(r) and the Language Ojbects
>Library incorporates a solution to that specific problem. The is a
>"-microsoft_precompiled_header filename" option (or -mph filename for
>short), which prefixes the generated files with a #include "filename"
>(where filename defaults to stdafx.h for convenience to Visual C++
>> 2. Is there no better tools available today than the old Lex/Yacc,
>> Bison/Flex etc. variants?
>In my opinion (but I am certainly biased on this part, being one of
>the developers) it also answers part 2 since it has regular
>expressions, grammar inheritance, a complete object oriented model,
>. . . (and looks pretty close to normal yacc to ease the learning
>curve). It is however a commercial product and not shareware or
>public domain, if that is germane to your decision.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.