|LEX & YACC code port to MS Windows firstname.lastname@example.org (1992-01-03)|
|WIN3 LEX&YACC PORT email@example.com (David A. Roland) (1992-01-06)|
|On the topic of replacing alloca by malloc. firstname.lastname@example.org (1992-01-08)|
|From:||David A. Roland <email@example.com>|
|Date:||Mon, 6 Jan 92 23:59:44 CST|
>Has anybody ever ported LEX & YACC generated C code to MS Windows.
>Is it possible to do such thing?
I have written a few applications which run under Windows 3.0 and use the
code generated by Lex/Yacc||Flex/Bison. These have been fairly big, using
a full ANSI C grammar.
All I had to do was open files and call yyparse() from the windows app.
Just get rid of all the printf()'s first, and if you use code generated by
BISON redefine "alloca" as "malloc."
(I don't know if this is a correct substitution but it works.)
BTW:I did all of this under Quick C for Windows and just inserted the
yyparse() call in the code generated by QuickCase:W and include the yacc
and lex code in the project make.
So you shouldn't have much trouble doing a port. Feel free to email me if
you have any other questions.
Return to the
Search the comp.compilers archives again.