# New Ticket Created by Will Coleda # Please include the string: [perl #39897] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39897 >
This patch updates TGE slightly to use PGE::Util::die to generate some indication of where parse errors in TGE grammars are, adds a test. With this, in my sandbox, instead of: $ ../../parrot ../../compilers/tge/tgc.pir --output=src/grammar/expr/ pge2past.pir src/grammar/expr/pge2past.tg Unable to parse the tree grammar. I get: $ ../../parrot ../../compilers/tge/tgc.pir --output=src/grammar/expr/ pge2past.pir src/grammar/expr/pge2past.tg Syntax error at line 8, near "transform " current instr.: 'parrot;PGE::Util;die' pc 131 (runtime/parrot/library/ PGE/Util.pir:88) called from Sub 'parrot;TGE::Parser;syntax_error' pc 7533 (TGE/ Parser.pir:3002) called from Sub 'parrot;TGE::Parser;start' pc 332 (TGE/Parser.pir:137) called from Sub 'parrot;TGE::Compiler;parse_grammar' pc 28 (TGE/ Compiler.pir:34) called from Sub 'parrot;TGE::Compiler;precompile' pc 616 (TGE/ Compiler.pir:278) called from Sub 'main' pc 100 (../../compilers/tge/tgc.pir:87) all punie tests pass. Future TODOs might include more than one syntax error for more helpful error messages.
tge.patch
Description: Binary data
-- Will "Coke" Coleda [EMAIL PROTECTED]