------------------------------------------------------------------------------ New Interpretive Packrat Engine ------------------------------------------------------------------------------ * Simplify the grammar-in-ruby specing. * Need not both rule and prod methods only rule. * Short hand "r" instead of "rule" like in old code * Specify grammars as subclasses to Grammar instead of in a block. This makes constants live in the proper namespace and is cleaner and more semantically closer to Ruby. * While porting Java grammar: * What happens if ast trees are only partially specified? Should it mix sexprs with asts? Or should it create anonymous parse trees (ie the class has no fixed name but there is a generic class on which you can specify the name)? * Separate things out into different logical files depending on purpose. * Then we go on to parse Ruby. * Then we release Rockit with MB and Java as a gem and rockit_ruby as a separate gem (with the ruby-related stuff). Possibly also ruby_parser.rb as a separate standalone file for people who just wants a parser (or generate multiple stand-alonoe files from rockit_ruby which includes different parts of the ruby-specific stuff (parser, pretty-printer, analyzer). * Add the simple memoization (always memoize on non-transient prod level) * Then we start adding the adaptive optimizations. * Then we add the automatic creation of pretty-printers ------------------------------------------------------------------------------ OLD ------------------------------------------------------------------------------ Next unfinished --------------- * Allow ast with only names as position indicators if we don't want to skip any position ie ast(:A, :b, :c, :d) is the same as ast(:A, 0=>:b, 1=>:c, 2=>:d) * atest_samples_minibasic.rb needs minibasic test programs. Major ----- * Think about delayed actions. Right now the operators (plus, mult etc) are always expanded which means that their actions will be played out even if we may not need the result at a higher level in the grammar/tree. This should be addressed by having delayed actions which saves the information but do not extract the lexemes etc until they are really needed. Minor ----- Tiny ---- Ideas -----