View Single Post
Old Dec 10th, 2005, 7:35 AM   #58
Klipt
Hobbyist Programmer
 
Join Date: Dec 2005
Posts: 118
Rep Power: 0 Klipt is an unknown quantity at this point
I remember wanting to write a compiler a few years ago. I didn't manage it, but after getting hold of this tutorial I did write a small interpreter and a calculator program which could read in a maths function, d/dx it and find a root.

That tutorial covers recursive descent parsing which is the easiest to write by hand (i.e. without Flex and Bison or Lexx and Yacc) and it even outputs assembly code, but it's assembly for some Motorola chip so don't expect it to work with an x86 assembler.
Klipt is offline   Reply With Quote