Permalink
Browse files

[Pipp]

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...
0 parents commit 351a9f0087b6897c274509193cf11ddc4f0f68e6 bernhard committed Jul 2, 2008
Showing with 49,831 additions and 0 deletions.
  1. +20 −0 CREDITS
  2. +39 −0 ChangeLog
  3. +35 −0 Configure.pl
  4. +4 −0 MAINTAINER
  5. +5 −0 README
  6. +11 −0 TODO
  7. +249 −0 config/makefiles/root.in
  8. +107 −0 docs/antlr3.pod
  9. +79 −0 docs/overview.pod
  10. +38 −0 docs/testing.pod
  11. +65 −0 lib/Parrot/Test/Plumhead.pm
  12. +48 −0 lib/Parrot/Test/Plumhead/Antlr3.pm
  13. +48 −0 lib/Parrot/Test/Plumhead/PCT.pm
  14. +48 −0 lib/Parrot/Test/Plumhead/PHP.pm
  15. +48 −0 lib/Parrot/Test/Plumhead/Phc.pm
  16. +14 −0 past_xml.xsd
  17. +21 −0 plumhead.pl
  18. +243 −0 src/antlr3/GenPastNqp.g
  19. +733 −0 src/antlr3/GenPastNqp.java
  20. +130 −0 src/antlr3/Plumhead.g
  21. +35 −0 src/antlr3/PlumheadAntlr3.java
  22. +2,751 −0 src/antlr3/PlumheadLexer.java
  23. +1,994 −0 src/antlr3/PlumheadParser.java
  24. +338 −0 src/build/genskel.pl
  25. +312 −0 src/common/builtins.pir
  26. +348 −0 src/common/php_API.pir
  27. +144 −0 src/common/php_MACRO.pir
  28. +888 −0 src/common/php_array.pir
  29. +48 −0 src/common/php_assert.pir
  30. +74 −0 src/common/php_base64.pir
  31. +643 −0 src/common/php_basic.pir
  32. +144 −0 src/common/php_bcmath.pir
  33. +38 −0 src/common/php_browscap.pir
  34. +572 −0 src/common/php_builtin.pir
  35. +108 −0 src/common/php_bz2.pir
  36. +192 −0 src/common/php_calendar.pir
  37. +504 −0 src/common/php_com_dotnet.pir
  38. +36 −0 src/common/php_crc32.pir
  39. +36 −0 src/common/php_crypt.pir
  40. +172 −0 src/common/php_ctype.pir
  41. +240 −0 src/common/php_curl.pir
  42. +36 −0 src/common/php_cyr_convert.pir
  43. +475 −0 src/common/php_date.pir
  44. +36 −0 src/common/php_datetime.pir
  45. +207 −0 src/common/php_dba.pir
  46. +168 −0 src/common/php_dbase.pir
  47. +144 −0 src/common/php_dir.pir
  48. +36 −0 src/common/php_dl.pir
  49. +96 −0 src/common/php_dns.pir
  50. +1,650 −0 src/common/php_dom.pir
  51. +108 −0 src/common/php_exec.pir
  52. +72 −0 src/common/php_exif.pir
  53. +468 −0 src/common/php_file.pir
  54. +348 −0 src/common/php_filestat.pir
  55. +113 −0 src/common/php_filter.pir
  56. +96 −0 src/common/php_formatted_print.pir
  57. +48 −0 src/common/php_fsock.pir
  58. +36 −0 src/common/php_ftok.pir
  59. +420 −0 src/common/php_ftp.pir
  60. +1,200 −0 src/common/php_gd.pir
  61. +132 −0 src/common/php_gettext.pir
  62. +492 −0 src/common/php_gmp.pir
  63. +84 −0 src/common/php_head.pir
  64. +84 −0 src/common/php_html.pir
  65. +36 −0 src/common/php_http.pir
  66. +156 −0 src/common/php_iconv.pir
  67. +60 −0 src/common/php_image.pir
  68. +780 −0 src/common/php_imap.pir
  69. +238 −0 src/common/php_info.pir
  70. +612 −0 src/common/php_interbase.pir
  71. +48 −0 src/common/php_iptc.pir
  72. +48 −0 src/common/php_json.pir
  73. +36 −0 src/common/php_lcg.pir
  74. +504 −0 src/common/php_ldap.pir
  75. +36 −0 src/common/php_levenshtein.pir
  76. +72 −0 src/common/php_link.pir
  77. +48 −0 src/common/php_mail.pir
  78. +937 −0 src/common/php_math.pir
  79. +687 −0 src/common/php_mbstring.pir
  80. +456 −0 src/common/php_mcrypt.pir
  81. +116 −0 src/common/php_md5.pir
  82. +36 −0 src/common/php_metaphone.pir
  83. +84 −0 src/common/php_mhash.pir
  84. +60 −0 src/common/php_microtime.pir
  85. +1,587 −0 src/common/php_ming.pir
  86. +360 −0 src/common/php_msql.pir
  87. +384 −0 src/common/php_mssql.pir
  88. +576 −0 src/common/php_mysql.pir
  89. +1,228 −0 src/common/php_mysqli.pir
  90. +852 −0 src/common/php_oci8.pir
  91. +696 −0 src/common/php_odbc.pir
  92. +456 −0 src/common/php_openssl.pir
  93. +48 −0 src/common/php_pack.pir
  94. +84 −0 src/common/php_pageinfo.pir
  95. +192 −0 src/common/php_pcntl.pir
  96. +436 −0 src/common/php_pcre.pir
  97. +480 −0 src/common/php_pdo.pir
  98. +24 −0 src/common/php_pdo_dblib.pir
  99. +60 −0 src/common/php_pdo_pgsql.pir
  100. +1,008 −0 src/common/php_pgsql.pir
  101. +444 −0 src/common/php_posix.pir
  102. +72 −0 src/common/php_proc_open.pir
  103. +252 −0 src/common/php_pspell.pir
  104. +36 −0 src/common/php_quot_print.pir
  105. +177 −0 src/common/php_rand.pir
  106. +48 −0 src/common/php_recode.pir
  107. +1,476 −0 src/common/php_reflection.pir
  108. +108 −0 src/common/php_reg.pir
  109. +252 −0 src/common/php_session.pir
  110. +116 −0 src/common/php_sha1.pir
  111. +96 −0 src/common/php_shmop.pir
  112. +192 −0 src/common/php_simplexml.pir
  113. +312 −0 src/common/php_snmp.pir
  114. +332 −0 src/common/php_soap.pir
  115. +324 −0 src/common/php_sockets.pir
  116. +36 −0 src/common/php_soundex.pir
  117. +2,687 −0 src/common/php_spl.pir
  118. +480 −0 src/common/php_sqlite.pir
  119. +62 −0 src/common/php_standard.pir
  120. +364 −0 src/common/php_streamsfuncs.pir
  121. +1,016 −0 src/common/php_string.pir
  122. +301 −0 src/common/php_sybase_ct.pir
  123. +72 −0 src/common/php_syslog.pir
  124. +96 −0 src/common/php_sysvmsg.pir
  125. +72 −0 src/common/php_sysvsem.pir
  126. +96 −0 src/common/php_sysvshm.pir
  127. +420 −0 src/common/php_tidy.pir
  128. +48 −0 src/common/php_tokenizer.pir
  129. +294 −0 src/common/php_type.pir
  130. +36 −0 src/common/php_uniqid.pir
  131. +96 −0 src/common/php_url.pir
  132. +96 −0 src/common/php_user_filters.pir
  133. +48 −0 src/common/php_uuencode.pir
  134. +185 −0 src/common/php_var.pir
  135. +36 −0 src/common/php_versioning.pir
  136. +96 −0 src/common/php_wddx.pir
  137. +312 −0 src/common/php_xml.pir
  138. +329 −0 src/common/php_xmlreader.pir
  139. +192 −0 src/common/php_xmlrpc.pir
  140. +528 −0 src/common/php_xmlwriter.pir
  141. +136 −0 src/common/php_xsl.pir
  142. +468 −0 src/common/php_zip.pir
  143. +144 −0 src/common/php_zlib.pir
  144. +333 −0 src/common/plumhead.pir
  145. +386 −0 src/pct/actions.pm
  146. +131 −0 src/pct/grammar.pg
  147. +56 −0 src/phc/past_xml_to_past_nqp.xsl
  148. +238 −0 src/phc/phc_xml_to_past_xml.xsl
  149. +99 −0 src/pmc/php.pmc
  150. +25 −0 src/pmc/php_private.h
  151. +93 −0 src/pmc/phparray.pmc
  152. +113 −0 src/pmc/phpboolean.pmc
  153. +188 −0 src/pmc/phpfloat.pmc
  154. +90 −0 src/pmc/phpinteger.pmc
  155. +185 −0 src/pmc/phpstring.pmc
  156. +94 −0 src/pmc/phpundef.pmc
  157. +123 −0 t/harness
  158. +125 −0 t/php/arithmetics.t
  159. +93 −0 t/php/array.t
  160. +102 −0 t/php/base64.t
  161. +62 −0 t/php/basic.t
  162. +82 −0 t/php/builtin.t
  163. +160 −0 t/php/control_flow.t
  164. +61 −0 t/php/ctype.t
  165. +39 −0 t/php/functions.t
  166. +241 −0 t/php/hello.t
  167. +102 −0 t/php/info.t
  168. +394 −0 t/php/math.t
  169. +87 −0 t/php/md5.t
  170. +45 −0 t/php/namespace.t
  171. +43 −0 t/php/oo.t
  172. +75 −0 t/php/pcre.t
  173. +188 −0 t/php/rand.t
  174. +52 −0 t/php/references.t
  175. +263 −0 t/php/relops.t
  176. +14 −0 t/php/selection.txt
  177. +87 −0 t/php/sha1.t
  178. +177 −0 t/php/string.t
  179. +101 −0 t/php/strings.t
  180. +57 −0 t/php/superglobals.t
  181. +248 −0 t/php/type.t
  182. +124 −0 t/php/variables.t
20 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
@@ -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
@@ -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:
@@ -0,0 +1,4 @@
+# $Id$
+
+N: Bernhard Schmalhofer
+E: Bernhard.Schmalhofer@gmx.de
5 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 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
@@ -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
Oops, something went wrong.

0 comments on commit 351a9f0

Please sign in to comment.