Paul_J
Member
Registered: 6th Jun 02
Location: London
User status: Offline
|
Does anyone know how to write a C compiler, using Lex + Yacc... That'll take a C file, and compile it into TAC code?
I'm not even sure what to put into Lex to get the lexical analyser, let alone how to implement that into the Compiler and parse it.
Help
Paul J
|
richardworrall
Premium Member
Registered: 20th Sep 05
Location: Derby
User status: Offline
|
was that english??
|
Paul
Member
Registered: 16th Apr 02
Location: Oop north.
User status: Offline
|
Try this link .....
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Online
|
This is for fun I assume.
Moving to Geek Day.
ps. try search for three address code rather than TAC, you'll get more relevant stuff.
[Edited on 23-11-2005 by Ian]
|
Paul_J
Member
Registered: 6th Jun 02
Location: London
User status: Offline
|
Yeh fun
I kinda got it working now, One of my main problems was my actual compiler, wasn't compiling my code correctly.
All my examples were based on using the gcc compiler on a linux system, using -ll and other commands after executing - sadly I was using some dodgy free c compiler for windows which didn't let me do this.
|