develooper Front page | perl.cvs.parrot | Postings from November 2008

[svn:parrot] r32608 - in trunk: . t/compilers/imcc/syn t/compilers/pct

From:
bernhard
Date:
November 13, 2008 05:10
Subject:
[svn:parrot] r32608 - in trunk: . t/compilers/imcc/syn t/compilers/pct
Message ID:
20081113131022.E3A1ECB9AF@x12.develooper.com
Author: bernhard
Date: Thu Nov 13 05:10:21 2008
New Revision: 32608

Added:
   trunk/t/compilers/pct/complete_workflow.t   (contents, props changed)
Removed:
   trunk/t/compilers/pct/TestGrammar.pg
Modified:
   trunk/MANIFEST
   trunk/t/compilers/imcc/syn/file.t

Log:
[t] Integrate TestGrammar.pg into new test script complete_workflow.t


Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST	(original)
+++ trunk/MANIFEST	Thu Nov 13 05:10:21 2008
@@ -1,7 +1,7 @@
 # ex: set ro:
 # $Id$
 #
-# generated by tools/dev/mk_manifest_and_skip.pl Thu Nov 13 07:42:11 2008 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Thu Nov 13 13:02:29 2008 UT
 #
 # See tools/dev/install_files.pl for documentation on the
 # format of this file.
@@ -3205,7 +3205,7 @@
 t/compilers/imcc/syn/veracity.t                             []
 t/compilers/json/from_parrot.t                              []
 t/compilers/json/to_parrot.t                                []
-t/compilers/pct/TestGrammar.pg                              []
+t/compilers/pct/complete_workflow.t                         []
 t/compilers/pct/past.t                                      []
 t/compilers/pct/pct_hllcompiler.t                           []
 t/compilers/pct/post.t                                      []

Modified: trunk/t/compilers/imcc/syn/file.t
==============================================================================
--- trunk/t/compilers/imcc/syn/file.t	(original)
+++ trunk/t/compilers/imcc/syn/file.t	Thu Nov 13 05:10:21 2008
@@ -12,7 +12,6 @@
 use Test::More;
 
 use Parrot::Test::Util 'create_tempfile';
-
 use Parrot::Config;
 use Parrot::Test tests => 14;
 

Added: trunk/t/compilers/pct/complete_workflow.t
==============================================================================
--- (empty file)
+++ trunk/t/compilers/pct/complete_workflow.t	Thu Nov 13 05:10:21 2008
@@ -0,0 +1,77 @@
+#!perl
+# Copyright (C) 2008, The Perl Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use 5;
+use lib qw(t . lib ../lib ../../lib ../../../lib);
+
+use Data::Dumper;
+use Test::More tests => 1;
+
+use Parrot::Test::Util 'create_tempfile';
+use Parrot::Config;
+
+=head1 NAME
+
+pct/complete_workflow.t - PCT tests
+
+=head1 SYNOPSIS
+
+    $ prove t/compilers/pct/complete_workflow.t
+
+=head1 DESCRIPTION
+
+This is a test script to try out constructing a grammar from a 
+grammar syntax file. After that is attempted to add acctions
+from a NQP class file. After that the generated compiler is tested.
+Special cases in grammars and actions should also be tested.
+
+=cut
+
+# Do not assume that . is in $PATH
+# places to look for things
+my $BUILD_DIR     = $PConfig{build_dir};
+my $TEST_DIR      = "$BUILD_DIR/t/compilers/pct";
+my $PARROT        = "$BUILD_DIR/parrot$PConfig{exe}";
+my $PERL5         = $PConfig{perl};
+my $PARROT_DYNEXT = "$BUILD_DIR/runtime/parrot/dynext";
+my $PGE_LIBRARY   = "$BUILD_DIR/runtime/parrot/library/PGE";
+my $PERL6GRAMMAR  = "$PGE_LIBRARY/Perl6Grammar.pbc";
+my $NQP           = "$BUILD_DIR/compilers/nqp/nqp.pbc";
+my $PCT           = "$BUILD_DIR/runtime/parrot/library/PCT.pbc";
+
+# set up a file with the grammar
+#my ($PG, $pg_fn) = create_tempfile( SUFFIX => '.pg', DIR => $TEST_DIR );
+my ($PG, $pg_fn) = create_tempfile( SUFFIX => '.pg', DIR => cwd(), UNLINK => 1 );
+print $PG <<'END_PG';
+# DO NOT EDIT.
+# This file was generated by t/compilers/pct/complete_workflow.t
+
+grammar TestGrammar;
+
+token apply { ^<op>$ }
+token op    { test <?ws> <val> <?ws> }
+token val   { thingy }
+END_PG
+
+ok( 'dummy' );
+#diag( Dumper( \%PConfig ) );
+
+
+
+
+
+=head1 AUTHOR
+
+Bernhard Schmalhofer <Bernhard.Schmalhofer@gmx.de>
+
+=cut
+
+# Local Variables:
+#   mode: cperl
+#   cperl-indent-level: 4
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About