-
November 9th, 2007, 08:42 PM
#1
Senior Member
Need Help Writing a C compiler...
Alright, I'm writing a C compiler "for the hell of it", and I'm using Flex/Bison as my lexer/parser combo. It works pretty well so far, but I'm rather lost when it comes to the abstract syntax tree implementation.
All I really want to do is have a simple translator from C to MMIX assembly language that has absolutely no optimization. My motivation is because I'd like to: 1) have a C-to-MMIXAL "compiler", 2) have it demonstrate the efficiency of algorithms and code.
That's why I don't want to use the GCC, because even if you write crappy code it will be optimized so you wouldn't notice unless you wrote really crappy code.
Perhaps using Yacc/Bison is too heavy duty for this job, perhaps a simple perl/python/<insert your favorite scripting language> script would do? (It could even use the system's preprocessor that way...) I heard through the grapevine that it would be a "solid day of Perl hacking" to write something like this, so perhaps this would be the way to go?
Thoughts and feedback would be greatly appreciated
"The Texan turned out to be good-natured, generous and likeable. In three days no one could stand him." Catch 22 by Joseph Heller.
Buddies? I have no buddies...
Give the BSD daemon some love (proud FreeBSD user)
Similar Threads
-
By Tiger Shark in forum The Security Tutorials Forum
Replies: 24
Last Post: January 19th, 2011, 12:40 AM
-
By SDK in forum Miscellaneous Security Discussions
Replies: 4
Last Post: January 28th, 2005, 05:54 PM
-
By foxdie in forum AntiVirus Discussions
Replies: 11
Last Post: April 4th, 2004, 02:52 AM
-
By progme in forum Other Tutorials Forum
Replies: 11
Last Post: November 2nd, 2003, 04:43 PM
-
By tampabay420 in forum Programming Security
Replies: 2
Last Post: February 14th, 2003, 02:36 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|