Skip to content

Commit

Permalink
[Pipp]
Browse files Browse the repository at this point in the history
First round of renaming Plumhead to Pipp.


git-svn-id: http://svn.perl.org/parrot/trunk@28952 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
bernhard committed Jul 2, 2008
0 parents commit 351a9f0
Show file tree
Hide file tree
Showing 182 changed files with 49,831 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CREDITS
@@ -0,0 +1,20 @@
# $Id$

List of people who have contributes to Plumhead.
----------
N: Paul Cochrane
E: paultcochrane@gmail.com
D: Coding standards
D: Subversion file metadata

N: Will "Coke" Coleda
E: will@coleda.com
D: Subversion file metadata

N: Jerry Gay a.k.a. particle
E: Jerry.Gay@gmail.com
D: Generate the Makefile from Makefile.in

N: Bernhard Schmalhofer
E: Bernhard.Schmalhofer@gmx.de
D: Maintainer
39 changes: 39 additions & 0 deletions ChangeLog
@@ -0,0 +1,39 @@
# $Id$

2007-12-02 Bernhard Schmalhofer
* Port to PCT

2006-12-31 Bernhard Schmalhofer
* Add stub for the partridge variant
* Add the file ChangeLog, and add fill it with info from 'svn log'

2006-12-30 Bernhard Schmalhofer
* Add dummy implementation of 'antlr3' variant

2006-12-06 Bernhard Schmalhofer
* Add stubs for the variants 'antlr3' and 'partridge'

2006-12-06 Bernhard Schmalhofer
* Start with standard lib, src/builtins.pir

2006-12-02 Bernhard Schmalhofer
* Add list of tests from standard PHP test suite, that are expected to succeed

2006-12-01 Bernhard Schmalhofer
* Use [ 'CGI'; 'QueryHash' ] for parsing CGI params

2006-11-14 Bernhard Schmalhofer
* Start to use Patrick Michauds PAST-pm

2006-11-09 Bernhard Schmalhofer
* Convert the main program from Perl5 to PIR

2006-10-30 Bernhard Schmalhofer
* Use a seperate stylesheet for generating PAST

2006-09-19 Bernhard Schmalhofer
* Use module [ 'MIME'; 'Bas364' ] for decoding strings from phc

2006-09-09 Bernhard Schmalhofer
* Add languages/plumhead to the Parrot subversion repository
* Start with phc variant
35 changes: 35 additions & 0 deletions Configure.pl
@@ -0,0 +1,35 @@
# $Id$

# Copyright (C) 2006-2007, The Perl Foundation.

# Configuration script for Plumhead.

# RT#31633: need to steal from gen::languages and tools/dev/reconfigure.pl
# in order to make this work

package main;

# pragmata
use strict;
use warnings;
use 5.008;
use FindBin;
use lib "$FindBin::Bin/../../lib";

# Parrot specific Perl modules
use Parrot::Configure::Step ();

# RT#31633: This is too simplistic
# Parrot::Configure::Step::genfile( 'config/makefiles/root.in' => 'Makefile' );

print <<'END_TEXT';
Hi,
I'm Configure.pl. Eventually I'll generate Makefile.
END_TEXT

# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
4 changes: 4 additions & 0 deletions MAINTAINER
@@ -0,0 +1,4 @@
# $Id$

N: Bernhard Schmalhofer
E: Bernhard.Schmalhofer@gmx.de
5 changes: 5 additions & 0 deletions README
@@ -0,0 +1,5 @@
# $Id$

The plum-headed Parakeet is a gregarious and noisy species with range of raucous calls.

For more information see docs/overview.pod.
11 changes: 11 additions & 0 deletions TODO
@@ -0,0 +1,11 @@
# $Id$

# Just some notes, on what might be next:
---
- Eliminate unneeded test modules
- Turn commented out tests into proper TODO tests, or fix the problem
- add --target option for the non-pct variants
- Support for floating point numbers
- Support for the superglobals _POST and _GET
- Implement var_dump()
- distinguish between subs and keywords
249 changes: 249 additions & 0 deletions config/makefiles/root.in
@@ -0,0 +1,249 @@
# $Id$

# config settings
LOAD_EXT = @load_ext@
O = @o@

# Set up directories
BUILD_DIR = @build_dir@
LIBRARY_DIR = $(BUILD_DIR)/runtime/parrot/library
PMCDIR = src/pmc
PARROT_DYNEXT = @build_dir@/runtime/parrot/dynext

# Set up commands
PARROT = $(BUILD_DIR)/parrot@exe@
PERL = @perl@
RM_F = @rm_f@
RECONFIGURE = $(PERL) $(BUILD_DIR)/tools/dev/reconfigure.pl
PMCBUILD = $(PERL) @build_dir@/tools/build/dynpmc.pl
NQP = $(BUILD_DIR)/compilers/nqp/nqp.pbc
PCT = $(BUILD_DIR)/runtime/parrot/library/PCT.pbc

PMCS = \
php \
phparray \
phpboolean \
phpfloat \
phpinteger \
phpstring \
phpundef

PMC_SOURCES = \
$(PMCDIR)/php.pmc \
$(PMCDIR)/phparray.pmc \
$(PMCDIR)/phpboolean.pmc \
$(PMCDIR)/phpfloat.pmc \
$(PMCDIR)/phpinteger.pmc \
$(PMCDIR)/phpstring.pmc \
$(PMCDIR)/phpundef.pmc

PHP_GROUP=$(PMCDIR)/php_group$(LOAD_EXT)

PHP_SRC_STD_EXT= \
src/common/php_API.pir \
src/common/php_array.pir \
src/common/php_assert.pir \
src/common/php_base64.pir \
src/common/php_basic.pir \
src/common/php_builtin.pir \
src/common/php_browscap.pir \
src/common/php_crc32.pir \
src/common/php_crypt.pir \
src/common/php_cyr_convert.pir \
src/common/php_datetime.pir \
src/common/php_dir.pir \
src/common/php_dl.pir \
src/common/php_dns.pir \
src/common/php_exec.pir \
src/common/php_file.pir \
src/common/php_filestat.pir \
src/common/php_formatted_print.pir \
src/common/php_fsock.pir \
src/common/php_ftok.pir \
src/common/php_head.pir \
src/common/php_html.pir \
src/common/php_http.pir \
src/common/php_image.pir \
src/common/php_info.pir \
src/common/php_iptc.pir \
src/common/php_lcg.pir \
src/common/php_levenshtein.pir \
src/common/php_link.pir \
src/common/php_mail.pir \
src/common/php_math.pir \
src/common/php_md5.pir \
src/common/php_metaphone.pir \
src/common/php_microtime.pir \
src/common/php_pack.pir \
src/common/php_pageinfo.pir \
src/common/php_proc_open.pir \
src/common/php_quot_print.pir \
src/common/php_rand.pir \
src/common/php_reg.pir \
src/common/php_sha1.pir \
src/common/php_soundex.pir \
src/common/php_streamsfuncs.pir \
src/common/php_string.pir \
src/common/php_syslog.pir \
src/common/php_type.pir \
src/common/php_uniqid.pir \
src/common/php_url.pir \
src/common/php_user_filters.pir \
src/common/php_uuencode.pir \
src/common/php_var.pir \
src/common/php_versioning.pir

PHP_EXT= \
src/common/php_ctype.pbc \
src/common/php_pcre.pbc

# default
all: build

# This is a listing of all targets, that are meant to be called by users
help:
@echo ""
@echo "Following targets are available for the user:"
@echo ""
@echo "Building:"
@echo " all: Build plumhead.pbc"
@echo " with support for variant 'Plumhead pct'."
@echo " This is the default."
@echo " build Same as 'all'."
@echo " build-all Build all three variants"
@echo " build-pct Same as 'build', which is same as 'all'."
@echo " build-phc Build support for variant 'Plumhead phc'."
@echo " Current this has nothing to do."
@echo " build-antlr3 Build support for variant 'Plumhead antlr3'."
@echo " Needs javac and a proper CLASSPATH."
@echo " pmc Build all PMCs."
@echo ""
@echo "Testing:"
@echo " test: Run the test suite for 'Plumhead pct'."
@echo " test-all: Run the test suite for the reference and all variants."
@echo " test-php: Run the test suite for the reference implementation."
@echo " test-phc: Run the test suite for 'Plumhead phc'."
@echo " test-antlr3: Run the test suite for 'Plumhead antlr3'."
@echo " test-pct: Run the test suite for 'Plumhead pct'."
@echo " test-pmc: Run the test suite for Plumhead's PMCs."
@echo ""
@echo "Cleaning:"
@echo " clean: Clean up."
@echo " clean-test: Clean up temporary files from testing."
@echo " clean-pmc: Clean up temporary files from the PMC build process."
@echo " realclean: Clean and remove Makefile."
@echo ""
@echo "Misc:"
@echo " help: Print this help message."
@echo ""
@echo "Only for maintainer:"
@echo " maintain: Maintainance for 'Plumhead antlr3'."
@echo " The other variants need no maintainance."
@echo " maintain-antlr3: Generate Java source files with ANTLR 3."
@echo ""

# regenerate the Makefile
Makefile: config/makefiles/root.in
cd $(BUILD_DIR) && $(RECONFIGURE) --step=gen::languages --languages=plumhead

maintain: maintain-antlr3

maintain-antlr3: src/antlr3/Plumhead.g src/antlr3/GenPastNqp.g
@echo 'Be sure to set CLASSPATH first, see docs/antlr3.pod'
java org.antlr.Tool src/antlr3/Plumhead.g
java org.antlr.Tool -lib src/antlr3 src/antlr3/GenPastNqp.g

build: build-pct

build-all: build-pct build-phc build-antlr3

build-common: pmc src/common/plumheadlib.pbc plumhead.pbc $(PHP_EXT)

build-pct: build-common

build-phc: build-common

build-antlr3: build-common
@echo 'Be sure to have set CLASSPATH as laid out in docs/antlr3.pod'
javac src/antlr3/*.java

src/common/plumheadlib.pbc: src/common/builtins.pir src/common/php_standard.pir $(PHP_SRC_STD_EXT) src/common/php_API.pir src/common/php_MACRO.pir
$(PARROT) -o src/common/plumheadlib.pbc src/common/builtins.pir

src/common/php_ctype.pbc: src/common/php_ctype.pir src/common/php_MACRO.pir
$(PARROT) -o src/common/php_ctype.pbc src/common/php_ctype.pir

src/common/php_pcre.pbc: src/common/php_pcre.pir src/common/php_MACRO.pir
$(PARROT) -o src/common/php_pcre.pbc src/common/php_pcre.pir

src/pct/gen_grammar.pir: $(LIBRARY_DIR)/PGE/Perl6Grammar.pir src/pct/grammar.pg
$(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pir \
--output=src/pct/gen_grammar.pir src/pct/grammar.pg

src/pct/gen_actions.pir: $(NQP) $(PCT) src/pct/actions.pm
$(PARROT) $(NQP) --output=src/pct/gen_actions.pir \
--target=pir src/pct/actions.pm

plumhead.pbc: \
src/common/plumhead.pir \
src/pct/gen_grammar.pir \
src/pct/gen_actions.pir
$(PARROT) -o plumhead.pbc src/common/plumhead.pir

pmc: $(PHP_GROUP)

$(PHP_GROUP): $(PARROT) $(PMC_SOURCES)
@cd $(PMCDIR) && $(PMCBUILD) generate $(PMCS)
@cd $(PMCDIR) && $(PMCBUILD) compile $(PMCS)
@cd $(PMCDIR) && $(PMCBUILD) linklibs $(PMCS)
@cd $(PMCDIR) && $(PMCBUILD) copy "--destination=$(PARROT_DYNEXT)" $(PMCS)

test: all test-pct

test-all: all test-php test-phc test-antlr3 test-pct test-pmc

test-php:
- cd .. && $(PERL) -I../lib -I plumhead/lib plumhead/t/harness --with-php

test-phc:
- cd .. && $(PERL) -I../lib -I plumhead/lib plumhead/t/harness --with-phc

test-antlr3:
- cd .. && $(PERL) -I../lib -I plumhead/lib plumhead/t/harness --with-antlr3

test-pct:
- cd .. && $(PERL) -I../lib -I plumhead/lib plumhead/t/harness --with-pct

test-pmc:
- $(PERL) -I../../lib t/pmc/*t

clean: clean-common clean-pct clean-antlr3 clean-test

clean-common: clean-pmc
$(RM_F) \
src/common/plumheadlib.pbc \
src/common/*.pbc \
plumhead.pbc

clean-pmc:
$(RM_F) "$(PMCDIR)/*dump" "$(PMCDIR)/*.c" "$(PMCDIR)/pmc_*h" "$(PMCDIR)/php_group.h" "$(PMCDIR)/*$(O)" "$(PMCDIR)/*$(LOAD_EXT)"

clean-pct:
$(RM_F) \
src/pct/gen_grammar.pir \
src/pct/gen_actions.pir

clean-antlr3:
$(RM_F) src/antlr3/*.class

clean-test:
$(RM_F) \
t/php/*.php \
t/php/*.pir \
t/php/*.out \
t/pmc/*.pir \
../../plumhead_*


realclean: clean
$(RM_F) Makefile

0 comments on commit 351a9f0

Please sign in to comment.