Hi All, Just wanted to send out a note that I've started work again on the new parser. I'm getting back to my list and current working on if-then style statements. I just now committed a change so that the new parser can parse a single if-then-endif block. Next of course will be looking at parsing elseif's and else statements, as well as making sure there aren't dangling else's and then doing rate checks that all the then statements are of the same rate and that the boolean condition is of the same rate too. Anyways, I've also been looking at some other grammars to get some help. Ruby's parser in YACC based and wow, it's hairy! I found this C grammar today and found it particularly useful to help figure out how to go about doing if-else: http://www.quut.com/c/ANSI-C-grammar-y-1995.html All of this new parser work seems a lot easier than last I was working on it almost a year ago; perhaps some time off made coming back to it more fun and enjoyable. =) Anyways, here's a copy of the last list of todo's I wrote before I stopped last year: Csound New Parser Clean Up FIles (headers, externs) Implement Macro's Implement Polymorphic Opcodes Optimization Constant Folding Dead Code Elimination Inline Constant Irate Variables Implement all Expression types Implement If-Then-Else statements Implement UDO Now, most of the polymoprhic opcode work is already done but if I remember correctly some of the polymorphic types aren't implemented yet. I'm planning on taking the two biggest tasks first, namely the if-then-else statements (already started) and then working on UDO parsing. The clean up files tasks may already have gotten done by John some time back but I'm sure to introduce some code that will need cleaning so will keep on that the list for later. Probably the optimization stuff could be done much later. After most of the above is done, we'll need to start testing and work on Csound failing correctly (i.e. showing what didn't parse correctly, giving line numbers and things like that). The validation pass will probably be a part of the testing work (this is currently just an empty stub function) and optimization will be interesting work but should probably done last (also currently an empty stub function). I hope others will start taking a look and even try to take on some of this. If interested, the relevant files are all in the Engine folder: new_orc_parser.c (recommend to start looking here) csound.l csound.y csound_orc_compile.c csound_orc_semantics.c csound_orc_expressions.c csound_orc_optimize.c Also, I had created a simple test suite in the tests folder that is using CSD files for tests and a simple test.py python script as the test harness. (The test harness does not run on windows currently and there are problems to do so as one can not use &> to redirect all output as one can on *nix systems, so this will need rewriting to perhaps use pythons process running commands). Also, you will need to both compile with the new parser enabled (which in turn requires GNU flex and bison installed) and also will need to turn on the new parser when running csound using --new-parser. Well, that sums up what's going on and I hope others get involved! Thanks, steven ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net