On Sun, Jul 09, 2006 at 07:15:07PM -0700, Kevin Tew wrote: > ../../parrot ../../compilers/pge/pgc.pir > --output=lib/pruby_grammar_gen.pir lib/pruby.pg > Method 'reduce' not found > current instr.: 'parrot;PGE::Exp::Quant;reduce' pc 4358 > (compilers/pge/PGE/Exp.pir:402) > ... > pruby.pg is available at http://tewk.com/pruby.pg
This is probably due to a syntax error in the pruby.pg grammar itself. In particular, the line token EXPONENT { ( e | E ) ( + | - )? <PRubyGrammar::DIGITS> } should probably read token EXPONENT { ( e | E ) ( \+ | - )? <PRubyGrammar::DIGITS> } After making this change on my system the grammar appears to compile correctly. I totally agree that PGE probably needs to provide better syntax error checking in situations such as this, thus I'm leaving this ticket open, or will add a new more descriptive one soon. Also, FWIW, I think that the grammar will read much more cleanly if the "PRubyGrammar::" qualifiers are taken out of the rules -- they aren't needed if the initial match call is coded correctly. (Punie uses these in its grammar, and isn't a good model in this respect.) For example, I would write the above EXPONENT token as: token EXPONENT { ( e | E ) ( \+ | - )? <DIGITS> } or perhaps better is: token EXPONENT { <[eE]> <[+\-]>? <DIGITS> } Thanks, Pm