Author: bernhard Date: Sun Dec 21 03:41:29 2008 New Revision: 34192 Removed: trunk/languages/pipp/src/phc/ Modified: trunk/MANIFEST trunk/MANIFEST.SKIP trunk/languages/pipp/ (props changed) trunk/languages/pipp/docs/pipp.pod trunk/languages/pipp/lib/Parrot/Test/Pipp/PCT.pm trunk/languages/pipp/src/common/pipp.pir trunk/languages/pipp/t/harness
Log: [Pipp] Remove support for antlr3 variant. Modified: trunk/MANIFEST ============================================================================== --- trunk/MANIFEST (original) +++ trunk/MANIFEST Sun Dec 21 03:41:29 2008 @@ -1,7 +1,7 @@ # ex: set ro: # $Id$ # -# generated by tools/dev/mk_manifest_and_skip.pl Sun Dec 21 11:16:23 2008 UT +# generated by tools/dev/mk_manifest_and_skip.pl Sun Dec 21 11:30:11 2008 UT # # See tools/dev/install_files.pl for documentation on the # format of this file. @@ -2356,8 +2356,6 @@ languages/pipp/src/pct/actions.pm [pipp] languages/pipp/src/pct/grammar.pg [pipp] languages/pipp/src/pct/quote_expression.pir [pipp] -languages/pipp/src/phc/past_xml_to_past_nqp.xsl [pipp] -languages/pipp/src/phc/phc_xml_to_past_xml.xsl [pipp] languages/pipp/src/pipp_hash.c [pipp] languages/pipp/src/pipp_hash.h [pipp] languages/pipp/src/pmc/php.pmc [pipp] Modified: trunk/MANIFEST.SKIP ============================================================================== --- trunk/MANIFEST.SKIP (original) +++ trunk/MANIFEST.SKIP Sun Dec 21 03:41:29 2008 @@ -1,6 +1,6 @@ # ex: set ro: # $Id$ -# generated by tools/dev/mk_manifest_and_skip.pl Sun Dec 21 11:16:23 2008 UT +# generated by tools/dev/mk_manifest_and_skip.pl Sun Dec 21 11:40:12 2008 UT # # This file should contain a transcript of the svn:ignore properties # of the directories in the Parrot subversion repository. (Needed for @@ -1123,14 +1123,6 @@ ^languages/pipp/pipp\.exe/ ^languages/pipp/pipp\.pbc$ ^languages/pipp/pipp\.pbc/ -^languages/pipp/pipp_phc_ast\.xml$ -^languages/pipp/pipp_phc_ast\.xml/ -^languages/pipp/pipp_phc_past\.nqp$ -^languages/pipp/pipp_phc_past\.nqp/ -^languages/pipp/pipp_phc_past\.pir$ -^languages/pipp/pipp_phc_past\.pir/ -^languages/pipp/pipp_phc_past\.xml$ -^languages/pipp/pipp_phc_past\.xml/ ^languages/pipp/pipp_test_run\.tar\.gz$ ^languages/pipp/pipp_test_run\.tar\.gz/ # generated from svn:ignore of 'languages/pipp/src/build/' Modified: trunk/languages/pipp/docs/pipp.pod ============================================================================== --- trunk/languages/pipp/docs/pipp.pod (original) +++ trunk/languages/pipp/docs/pipp.pod Sun Dec 21 03:41:29 2008 @@ -13,9 +13,12 @@ Implement PHP. Support well behaving PHP extensions. +See also L<../ROADMAP>. =head1 Divergences of Pipp +A listing of things that Pipp does differently from the standard PHP. + =over 4 =item builtin function pipp_defined(). @@ -26,15 +29,9 @@ =cut -=head1 Variants - -There are currently two variants of Pipp: - -=over +=head1 Implementation -=item pct - Parrot compiler toolkit, this is the default - -=item phc - take XML output from phc and munge it with XSLT +Pipp is based on the Parrot Compiler Toolkit. =back @@ -46,9 +43,7 @@ =over -=item phc - -xsltproc and phc need to be in PATH. +=item Parrot 0.8.2. =back @@ -60,6 +55,8 @@ =over 4 +=item L<http://pipp.org> + =item L<http://www.perlfoundation.org/parrot/index.cgi?pipp> =item L<http://phpcompiler.org/> Modified: trunk/languages/pipp/lib/Parrot/Test/Pipp/PCT.pm ============================================================================== --- trunk/languages/pipp/lib/Parrot/Test/Pipp/PCT.pm (original) +++ trunk/languages/pipp/lib/Parrot/Test/Pipp/PCT.pm Sun Dec 21 03:41:29 2008 @@ -28,7 +28,7 @@ my $lang_fn = Parrot::Test::per_test( '.php', $count ); $lang_fn =~ s!^pipp/!!; # fix for unified languages testing - return "$self->{relpath}/parrot $self->{relpath}/languages/pipp/pipp.pbc --variant=pct ${lang_fn}"; + return "$self->{relpath}/parrot $self->{relpath}/languages/pipp/pipp.pbc ${lang_fn}"; } # never skip the reference implementation Modified: trunk/languages/pipp/src/common/pipp.pir ============================================================================== --- trunk/languages/pipp/src/common/pipp.pir (original) +++ trunk/languages/pipp/src/common/pipp.pir Sun Dec 21 03:41:29 2008 @@ -2,7 +2,7 @@ =head1 NAME -pipp.pir - three variants of PHP on Parrot +pipp.pir - driver for Pipp =head1 SYNOPSIS @@ -12,28 +12,13 @@ ./pipp t.php - ./pipp --variant=pct t.php - - ./pipp --variant=phc t.php - - ./pipp --variant=antlr3 t.php - ./pipp --run-nqp t.nqp =head1 DESCRIPTION pipp.pbc is the driver for Pipp. -=head1 Variants - -=head2 Pipp pct - -Parse PHP with the Parrot compiler toolkit. This is the default variant. - -=head2 Pipp phc - -Take XML from phc and transform it with XSLT to PIR setting up PAST. -Run the PAST with the help of PCT. +Parse PHP and generate PAST with the Parrot compiler toolkit. =head1 SEE ALSO @@ -155,41 +140,14 @@ output = opt['output'] # look at commandline and decide what to do - .local string cmd, err_msg, variant + .local string cmd, err_msg .local int ret # run the NQP-code when called with --run-nqp $I0 = defined opt['run-nqp'] if $I0 goto RUN_NQP - # check for the variant from the commandline or from the environment - $I0 = defined opt['variant'] - unless $I0 goto GET_VARIANT_FROM_ENV - variant = opt['variant'] - goto GOT_VARIANT -GET_VARIANT_FROM_ENV: - .local pmc env - env = new 'Env' - $I0 = exists env['PIPP_VARIANT'] - unless $I0 goto USE_DEFAULT_VARIANT - variant = env['PIPP_VARIANT'] - goto GOT_VARIANT -USE_DEFAULT_VARIANT: - variant = 'pct' - goto GOT_VARIANT - -GOT_VARIANT: - if variant == 'pct' goto VARIANT_PCT - if variant == 'PCT' goto VARIANT_PCT - if variant == 'phc' goto VARIANT_PHC - if variant == 'PHC' goto VARIANT_PHC - err_msg = "Unknown pipp variant: '" - err_msg .= variant - err_msg .= "'." - goto ERROR - -VARIANT_PCT: - # use the Parrot Compiler Toolkit by default + # use the Parrot Compiler Toolkit .local pmc pipp_compiler pipp_compiler = compreg 'Pipp' @@ -200,38 +158,9 @@ .tailcall pipp_compiler.'command_line'( args, 'target' => target, 'output' => output ) -VARIANT_PHC: - .local string phc_src_dir - phc_src_dir = concat build_dir, '/languages/pipp/src/phc' - - # work with the XML generated by PHC, the PHP Compiler - err_msg = 'Creating XML-AST with phc failed' - cmd = 'phc --dump-ast-xml ' - concat cmd, source_fn - concat cmd, '> pipp_phc_ast.xml' - ret = spawnw cmd - if ret goto ERROR - - err_msg = 'Creating XML-PAST with xsltproc failed' - cmd = 'xsltproc ' - cmd .= phc_src_dir - cmd .= '/phc_xml_to_past_xml.xsl pipp_phc_ast.xml > pipp_phc_past.xml' - ret = spawnw cmd - if ret goto ERROR - - err_msg = 'Creating NQP with xsltproc failed' - cmd = 'xsltproc ' - cmd .= phc_src_dir - cmd .= '/past_xml_to_past_nqp.xsl pipp_phc_past.xml > pipp_phc_past.nqp' - ret = spawnw cmd - if ret goto ERROR - - .tailcall run_nqp( 'pipp_phc_past.nqp', target ) - RUN_NQP: .tailcall run_nqp( source_fn, target ) - ERROR: printerr err_msg printerr "\n" @@ -240,6 +169,7 @@ .end +# currently not used .sub run_nqp .param string nqp_source_fn .param string target @@ -298,7 +228,6 @@ # Pipp specific command line options push getopts, 'f=s' # source file - push getopts, 'variant=s' # switch between variants push getopts, 'target=s' # compilation target, used during development push getopts, 'run-nqp' # run PAST set up in NQP push getopts, 'output|o=s' @@ -375,7 +304,7 @@ # Most of the superglobals are not initialized yet .sub set_superglobals - # the superglobals _GET and _POST need to be set up for any variant + # the superglobals _GET and _POST need to be set up .local pmc parse_get_sub, superglobal_GET parse_get_sub = get_hll_global [ 'CGI'; 'QueryHash' ], 'parse_get' ( superglobal_GET ) = parse_get_sub() Modified: trunk/languages/pipp/t/harness ============================================================================== --- trunk/languages/pipp/t/harness (original) +++ trunk/languages/pipp/t/harness Sun Dec 21 03:41:29 2008 @@ -11,12 +11,6 @@ cd languages/pipp && perl t/harness - cd languages/pipp && perl t/harness --with-phc - - cd languages/pipp && perl t/harness --with-antlr3 - - cd languages/pipp && perl t/harness --with-pct - cd languages/pipp && perl t/harness --verbose t/hello.t =head1 DESCRIPTION @@ -28,9 +22,6 @@ If I'm called with no args, I run the complete suite. Otherwise I run the tests that were passed on the command line. -The options C<--with-pct>, C<--with-phc> and C<--with-antlr3> select -the variant of Pipp. Default is the PCT variant, using the -Parrot Compiler Toolkit. =cut @@ -50,16 +41,14 @@ use Parrot::Test; my ( $files_flag, $master_flag, $send_to_smolder_flag, $archive_flag, $verbose_flag ); -my ( $php_flag, $pct_flag, $antlr3_flag, $phc_flag ); +my ( $php_flag, $pct_flag); GetOptions( 'files' => \$files_flag, 'master' => \$master_flag, # unused, but passed by languages/t/harness 'send-to-smolder' => \$send_to_smolder_flag, 'archive' => \$archive_flag, 'verbose' => \$verbose_flag, - 'with-antlr3' => \$antlr3_flag, 'with-pct' => \$pct_flag, - 'with-phc' => \$phc_flag, 'with-php' => \$php_flag, ); @@ -83,17 +72,8 @@ $ENV{PARROT_PIPP_TEST_MODULE} = 'Parrot::Test::Pipp::PHP'; @cmd = qw{ php-cgi -q -C -n } ; } - elsif ( $phc_flag ) { - $ENV{PARROT_PIPP_TEST_MODULE} = 'Parrot::Test::Pipp::Phc'; - push @cmd, '--variant=phc'; - } - elsif ( $antlr3_flag ) { - $ENV{PARROT_PIPP_TEST_MODULE} = 'Parrot::Test::Pipp::Antlr3'; - push @cmd, '--variant=antlr3'; - } elsif ( $pct_flag ) { $ENV{PARROT_PIPP_TEST_MODULE} = 'Parrot::Test::Pipp::PCT'; - push @cmd, '--variant=pct'; } my @files;
