|WIN3 LEX&YACC PORT firstname.lastname@example.org (David A. Roland) (1992-01-06)|
|On the topic of replacing alloca by malloc. email@example.com (1992-01-08)|
|From:||firstname.lastname@example.org (Willem Jan Withagen)|
|Keywords:||C, storage, MSDOS|
|Date:||Wed, 8 Jan 92 11:30:45 +0100|
In article 92-01-023, email@example.com (David A. Roland) writes:
=> >Has anybody ever ported LEX & YACC generated C code to MS Windows.
=> >Is it possible to do such thing?
=> 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."
It sort of boils down to the discussion we've just finished. When I did
this in TURBO C I could not "self" alloca the pushdown stacks as regular
arrays because the stack is very limited. So then I indeed replace alloca
with malloc, but you then have to modify the exit code as well, and have
them free the occupied space.
So I've hacked the skeleton a little. I've placed it under anon-ftp
Willem Jan Withagen
Eindhoven University of Technology DomainName: firstname.lastname@example.org
Digital Systems Group, Room EH 10.10
P.O. 513 Tel: +31-40-473401
5600 MB Eindhoven The Netherlands
Return to the
Search the comp.compilers archives again.