Author: allison
Date: Fri Feb  3 15:47:30 2006
New Revision: 11418

Added:
   trunk/languages/punie/t/op_goto.t
   trunk/languages/punie/t/problematic.t
Modified:
   trunk/   (props changed)
   trunk/languages/punie/lib/punie.g
Log:
An intermediate commit so others can work on the PGE truncating evals
bug.

Modified: trunk/languages/punie/lib/punie.g
==============================================================================
--- trunk/languages/punie/lib/punie.g   (original)
+++ trunk/languages/punie/lib/punie.g   Fri Feb  3 15:47:30 2006
@@ -2,9 +2,17 @@ grammar PunieGrammar;
 
 rule prog    { ^<PunieGrammar::lineseq>$ }
 
+rule blue { \w* }
+
+rule block { \s* \{ \s*<PunieGrammar::lineseq>\s* \} \s* }
+
 rule lineseq { \s*<PunieGrammar::line>*\s* }
 
-rule line    { \s*<PunieGrammar::expr>;\s* }
+rule line    { <PunieGrammar::label> <PunieGrammar::expr>;\s* }
+
+rule label { \s* [<PunieGrammar::word>\:]? \s* }
+
+rule word { \w[\w|\d]* }
 
 rule expr    { <PunieGrammar::gprint> | <PunieGrammar::cexpr> }
 

Added: trunk/languages/punie/t/op_goto.t
==============================================================================
--- (empty file)
+++ trunk/languages/punie/t/op_goto.t   Fri Feb  3 15:47:30 2006
@@ -0,0 +1,11 @@
+#!/usr/bin/perl
+
+use strict;
+use lib qw(t . lib ../lib ../../lib ../../../lib);
+use Parrot::Test tests => 1;
+
+language_output_is('punie', <<'CODE', <<'OUT', 'a simple label');
+label1: print "ok 1\n";
+CODE
+ok 1
+OUT

Added: trunk/languages/punie/t/problematic.t
==============================================================================
--- (empty file)
+++ trunk/languages/punie/t/problematic.t       Fri Feb  3 15:47:30 2006
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use strict;
+use lib qw(t . lib ../lib ../../lib ../../../lib);
+use Parrot::Test tests => 1;
+
+language_output_is('punie', <<'CODE', <<'OUT', 'printing simple strings');
+print "ok 1\n";
+print "ok 2\n";
+CODE
+ok 1
+ok 2
+OUT

Reply via email to