Re: Compiler project
OvermindDL1 <[email protected]> Sat, 16 Jan 2010 23:02:41 -0700
| Newsgroups | gmane.comp.parsers.spirit.devel |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Jan 16, 2010 at 9:26 PM, Carl Barron <[email protected]> wrote: > Well I would think that the ast should not contain source code, but should be designed to produce [good] code. Now you are implying there is an error that creates a proper parse, otherwise it will not be necessary to post process the tree before > producing code, to find that error. Assuming few corners there will be few if any such errors and then perhaps they can be handled via peg and the dynamic nature of spirit qi parsers. There are cases that can provide a perfectly good parse, but a post-processing loop over the tree can fail, such as converting functions to continuation-passing style, as some of the languages we talked about would require. Doing the continuation-passing style conversion in-parse is possible, but certainly not what one would ever consider 'pretty'. Hmm, actually I think I came up with an idea to make that 'prettier' in-parse... Remember, not just parsing strings, also working on code chunks. ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Spirit-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-devel