[Oopic-compiler-devel] Compiler design
Status: Planning
Brought to you by:
ndurant
From: Neil D. <nd...@us...> - 2004-05-12 00:45:40
|
Did either have you have any ideas on the overall design of the compiler? I've been re-reading my book on Flex/Bison, and it would definitely be a big time-saver using those tools. They would generate the C code for parsing the grammar we provide (in a simple notation), and allow us to call functions when the various semantic constructs are encountered. That way we can build up a parse tree and populate symbol tables, and the subsequently walk the tree generating code. We could then add an optimisation stage that checks through the Forth-like codes to see if anything silly is being done. This is the basic idea I have in mind, although I know there's a heck of a lot of detail I've just hopped over! I'd be interested to hear how you guys envisioned how the compiler would be structured. Thoughts? Neil -- Neil Durant <nd...@us...> |