Index: t/compilers/tge/basic.t
===================================================================
--- t/compilers/tge/basic.t	(revision 13401)
+++ t/compilers/tge/basic.t	(working copy)
@@ -15,7 +15,7 @@
 
 =head1 SYNOPSIS
 
-	$ prove t/basic.t
+	$ prove t/compilers/tge/basic.t
 
 =cut
 
Index: t/compilers/tge/grammar.t
===================================================================
--- t/compilers/tge/grammar.t	(revision 13401)
+++ t/compilers/tge/grammar.t	(working copy)
@@ -16,7 +16,7 @@
 
 =head1 SYNOPSIS
 
-    $ prove t/parser.t
+    $ prove t/compilers/tge/grammar.t
 
 =head1 DESCRIPTION
 
Index: t/compilers/tge/parser.t
===================================================================
--- t/compilers/tge/parser.t	(revision 13401)
+++ t/compilers/tge/parser.t	(working copy)
@@ -15,7 +15,7 @@
 
 =head1 SYNOPSIS
 
-	$ prove t/parser.t
+	$ prove t/compilers/tge/parser.t
 
 =cut
 
@@ -66,6 +66,27 @@
 parse succeeded
 OUT
 
+pir_output_like(<<'CODE', qr/Syntax error at line 4, near "transform "/, "parse failure");
 
+.sub _main :main
+    load_bytecode "compilers/tge/TGE.pir"
+
+    .local string source
+    source = <<'GRAMMAR'
+    transform min (Leaf) {
+      # nothing to see here.
+    }
+    transform max {  # missing ()'s
+    }
+
+GRAMMAR
+    .local pmc match
+    .local pmc start_rule
+    start_rule = find_global "TGE::Parser", "start"
+    match = start_rule(source) # should throw.
+.end
+
+CODE
+
 ## remember to change the number of tests :-)
-BEGIN { plan tests => 1; }
+BEGIN { plan tests => 2; }
Index: compilers/tge/TGE/Parser.pg
===================================================================
--- compilers/tge/TGE/Parser.pg	(revision 13401)
+++ compilers/tge/TGE/Parser.pg	(working copy)
@@ -1,6 +1,6 @@
 grammar TGE::Parser;
 
-token start { ^ <TGE::Parser::statements>* $ }
+token start { ^ <TGE::Parser::statements>* [ $ | <syntax_error> ] }
 
 rule statements { 
      <transrule>
@@ -56,3 +56,5 @@
          ]
          [\n|$]
 }
+
+token syntax_error { <?PGE::Util::die Syntax error> }
Index: compilers/tge/TGE.pir
===================================================================
--- compilers/tge/TGE.pir	(revision 13401)
+++ compilers/tge/TGE.pir	(working copy)
@@ -83,6 +83,7 @@
 .sub '__onload' :load
     # use other modules
     load_bytecode 'PGE.pbc'
+    load_bytecode 'PGE/Util.pbc'
     load_bytecode 'compilers/tge/TGE/Rule.pbc'
     load_bytecode 'compilers/tge/TGE/Tree.pbc'
     load_bytecode 'compilers/tge/TGE/Parser.pbc'
