Permalink
Browse files

rip out tge, and mostly data_json too

parrot still builds, but you cannot generate new NCI thunks. Tough luck.
  • Loading branch information...
1 parent b23f23e commit e5dae265c12e4f7d1b1d31b4bdfc8cf977e1ccf1 @moritz moritz committed Feb 11, 2013
Showing with 4 additions and 3,528 deletions.
  1. +0 −30 MANIFEST
  2. +0 −12 MANIFEST.SKIP
  3. +0 −5 compilers/README.pod
  4. +0 −8 compilers/data_json/Defines.mak
  5. +0 −146 compilers/data_json/JSON.nqp
  6. +0 −31 compilers/data_json/JSON_README.pod
  7. +0 −33 compilers/data_json/Rules.mak
  8. +0 −129 compilers/data_json/data_json.pir
  9. +0 −38 compilers/data_json/data_json/grammar.pg
  10. +0 −217 compilers/data_json/data_json/pge2pir.tg
  11. +0 −2 compilers/tge/Defines.mak
  12. +0 −23 compilers/tge/README.pod
  13. +0 −27 compilers/tge/Rules.mak
  14. +0 −159 compilers/tge/TGE.pir
  15. +0 −450 compilers/tge/TGE/Compiler.pir
  16. +0 −173 compilers/tge/TGE/Grammar.pir
  17. +0 −60 compilers/tge/TGE/Parser.pg
  18. +0 −76 compilers/tge/TGE/Rule.pir
  19. +0 −288 compilers/tge/TGE/Tree.pir
  20. +0 −146 compilers/tge/tgc.pir
  21. +0 −7 config/gen/makefiles/root.in
  22. +0 −1 docs/optable.pod
  23. +0 −2 examples/README.pod
  24. +0 −117 examples/json/postalcodes.pir
  25. +0 −33 examples/json/test.pir
  26. +0 −347 examples/nci/xlibtest.pir
  27. +0 −18 examples/tge/README.pod
  28. +0 −71 examples/tge/branch/branch.g
  29. +0 −27 examples/tge/branch/lib/Branch.pir
  30. +0 −26 examples/tge/branch/lib/Leaf.pir
  31. +0 −178 examples/tge/branch/transform.pir
  32. +0 −1 lib/Parrot/Docs/Section/Compilers.pm
  33. +0 −1 lib/Parrot/Harness/TestSets.pm
  34. +0 −1 lib/Parrot/Install.pm
  35. +0 −1 lib/Parrot/Manifest.pm
  36. +2 −67 runtime/parrot/library/distutils.pir
  37. +0 −31 t/compilers/tge/NoneGrammar.tg
  38. +0 −83 t/compilers/tge/basic.t
  39. +0 −338 t/compilers/tge/grammar.t
  40. +0 −27 t/compilers/tge/harness
  41. +0 −84 t/compilers/tge/parser.t
  42. +0 −1 t/harness.pir
  43. +0 −1 t/tools/install/testlib/dev_generated_pseudo
  44. +1 −1 tools/dev/install_dev_files.pl
  45. +1 −11 tools/install/smoke.pl
View
@@ -26,13 +26,6 @@ TODO [devel]doc
VERSION [devel]
api.yaml []
compilers/README.pod []doc
-compilers/data_json/Defines.mak [data_json]
-compilers/data_json/JSON.nqp [data_json]
-compilers/data_json/JSON_README.pod []doc
-compilers/data_json/Rules.mak [data_json]
-compilers/data_json/data_json.pir [data_json]
-compilers/data_json/data_json/grammar.pg [data_json]
-compilers/data_json/data_json/pge2pir.tg [data_json]
compilers/imcc/Defines.mak [imcc]
compilers/imcc/Rules.in [imcc]
compilers/imcc/api.c [imcc]
@@ -107,16 +100,6 @@ compilers/pge/PGE/builtins.pg [pge]
compilers/pge/README.pod []doc
compilers/pge/Rules.mak [pge]
compilers/pge/STATUS [pge]
-compilers/tge/Defines.mak [tge]
-compilers/tge/README.pod []doc
-compilers/tge/Rules.mak [tge]
-compilers/tge/TGE.pir [tge]
-compilers/tge/TGE/Compiler.pir [tge]
-compilers/tge/TGE/Grammar.pir [tge]
-compilers/tge/TGE/Parser.pg [tge]
-compilers/tge/TGE/Rule.pir [tge]
-compilers/tge/TGE/Tree.pir [tge]
-compilers/tge/tgc.pir [tge]
config/README.pod []doc
config/auto/alignof.pm []
config/auto/alignof/test_c.in []
@@ -540,8 +523,6 @@ examples/io/http.pir [examples]
examples/io/httpd.pir [examples]
examples/io/post.pir [examples]
examples/io/readline.pir [examples]
-examples/json/postalcodes.pir [examples]
-examples/json/test.pir [examples]
examples/languages/abc/MAINTAINER [examples]
examples/languages/abc/README [examples]
examples/languages/abc/TODO [examples]
@@ -607,7 +588,6 @@ examples/nci/sdl_blue_rectangle.pir [examples]
examples/nci/win32api.pir [examples]
examples/nci/xlibtest.nqp [examples]
examples/nci/xlibtest.p6 [examples]
-examples/nci/xlibtest.pir [examples]
examples/nci/xlibtest.rb [examples]
examples/opengl/math.pir [examples]
examples/opengl/shapes.p6 [examples]
@@ -758,11 +738,6 @@ examples/subs/no_retval.pir [examples]
examples/subs/pasm_sub1.pasm [examples]
examples/subs/single_retval.pir [examples]
examples/tcl/tcltkdemo.pir [examples]
-examples/tge/README.pod [examples]
-examples/tge/branch/branch.g [examples]
-examples/tge/branch/lib/Branch.pir [examples]
-examples/tge/branch/lib/Leaf.pir [examples]
-examples/tge/branch/transform.pir [examples]
examples/threads/alloc_test.pir [examples]
examples/threads/chameneos.pir [examples]
examples/threads/matrix_part.winxed [examples]
@@ -1596,11 +1571,6 @@ t/compilers/pge/pge_globs.t [test]
t/compilers/pge/pge_text.t [test]
t/compilers/pge/pge_util.t [test]
t/compilers/pge/regression.t [test]
-t/compilers/tge/NoneGrammar.tg [test]
-t/compilers/tge/basic.t [test]
-t/compilers/tge/grammar.t [test]
-t/compilers/tge/harness [test]
-t/compilers/tge/parser.t [test]
t/configure/001-options.t [test]
t/configure/002-messages.t [test]
t/configure/003-steplist.t [test]
View
@@ -148,10 +148,6 @@
^/compilers/pge/PGE/builtins_gen\.pir/
^/compilers/pge/PGE\.pbc$
^/compilers/pge/PGE\.pbc/
-^/compilers/tge/TGE/Parser\.pir$
-^/compilers/tge/TGE/Parser\.pir/
-^/compilers/tge/tgc\.pbc$
-^/compilers/tge/tgc\.pbc/
^/config_lib\.pir$
^/config_lib\.pir/
^/core.*$
@@ -478,8 +474,6 @@
^/runtime/parrot/include/.*\.pir/
^/runtime/parrot/languages/JSON/JSON\.pir$
^/runtime/parrot/languages/JSON/JSON\.pir/
-^/runtime/parrot/languages/data_json$
-^/runtime/parrot/languages/data_json/
^/runtime/parrot/languages/winxed$
^/runtime/parrot/languages/winxed/
^/runtime/parrot/library/.*\.pbc$
@@ -832,12 +826,6 @@
^/t/benchmark/.*\.pasm/
^/t/benchmark/.*\.pir$
^/t/benchmark/.*\.pir/
-^/t/compilers/data_json/.*\.pbc$
-^/t/compilers/data_json/.*\.pbc/
-^/t/compilers/data_json/.*\.pir$
-^/t/compilers/data_json/.*\.pir/
-^/t/compilers/data_json/.*_pbcexe$
-^/t/compilers/data_json/.*_pbcexe/
^/t/compilers/imcc/.*\.pbc$
^/t/compilers/imcc/.*\.pbc/
^/t/compilers/imcc/reg/.*\.pasm$
View
@@ -11,8 +11,6 @@ compilers/README.pod - Readme file for the 'compilers/' top-level directory.
This directory contains the source files for several compilers:
=over 4
-
-=item data_json - The compiler which generates a JSON representation of a PMC.
=item imcc ("Intermediate Code Compiler") - The compiler which translates PIR
source code into Parrot bytecode.
@@ -25,9 +23,6 @@ files into C source code.
=item pge ("Parrot Grammar Engine") - An implementation of Perl6 regex's for
PCT.
-=item tge ("Tree Grammar Engine") - A tool for transforming a Parrot Abstract
-Syntax Tree (PAST).
-
=back
=head1 COPYRIGHT
@@ -1,8 +0,0 @@
-DATA_JSON_LIB_PBCS = runtime/parrot/languages/data_json/data_json.pbc
-
-JSON_LANG = runtime/parrot/languages/JSON/JSON.pir
-
-DATA_JSON_CLEANUPS = $(DATA_JSON_LIB_PBCS) \
- compilers/data_json/data_json.pbc \
- compilers/data_json/data_json/grammar.pir \
- compilers/data_json/data_json/pge2pir.pir
@@ -1,146 +0,0 @@
-#! parrot-nqp
-
-# Copyright (C) 2011, Parrot Foundation.
-
-# This is the start to rewrite JSON. It starts with rewriting data_json only.
-# data_json depends on the PGE. The rewrite use NQP.
-
-
-=begin Pod
-
-=for NAME
-JSON, a lightweight data-interchange format.
-
-=head1 SYNOPSIS
-
-The C<from_json> method return a PMC that containing the data structure
-for a given valid JSON (JavaScript Object Notation) string.
-For example:
-
-=begin code
-
-.sub 'main' :main
- .local pmc result
-
- load_language 'JSON'
- result = from_json( '[1,2,3]' )
-
- load_bytecode 'dumper.pbc'
- _dumper( result, 'JSON' )
-.end
-
-=end code
-
-For more information about the structure of the JSON representation, see
-the documentation at L<http://www.json.org/>.
-
-=end Pod
-
-
-INIT {
- pir::load_bytecode('P6Regex.pbc');
-}
-
-grammar JSON::Grammar is HLL::Grammar {
- rule TOP { <value> }
-
- proto token value { <...> }
-
- token value:sym<string> { <string> }
-
- token value:sym<number> {
- '-'?
- [ <[1..9]> <[0..9]>+ | <[0..9]> ]
- [ '.' <[0..9]>+ ]?
- [ <[Ee]> <[+\-]>? <[0..9]>+ ]?
-# <.worry('oh, a number!')>
- }
-
- rule value:sym<array> {
- '[' [ <value> ** ',' ]? ']'
- }
-
- rule value:sym<object> {
- '{'
- [ [ <string> ':' <value> ] ** ',' ]?
- '}'
- }
-
- rule value:sym<true> {
- 'true'
- }
-
- rule value:sym<false> {
- 'false'
- }
-
- rule value:sym<null> {
- 'null'
- }
-
- token string {
- <?["]> <quote_EXPR: ':qq'>
- }
-}
-
-
-class JSON::Actions is HLL::Actions {
- method TOP($/) {
- make PAST::Block.new($<value>.ast, :node($/));
- };
-
- method value:sym<string>($/) { make $<string>.ast; }
-
- method value:sym<number>($/) { make +$/; }
-
- method value:sym<array>($/) {
- my $past := PAST::Op.new(:pasttype<list>, :node($/));
- if $<value> {
- for $<value> { $past.push($_.ast); }
- }
- make $past;
- }
-
- method value:sym<object>($/) {
- my $past := PAST::Stmts.new( :node($/) );
- my $hashname := PAST::Compiler.unique('hash');
- my $hash := PAST::Var.new( :scope<register>, :name($hashname),
- :viviself('Hash'), :isdecl );
- my $hashreg := PAST::Var.new( :scope<register>, :name($hashname) );
- $past.'push'($hash);
- # loop through all string/value pairs, add set opcodes for each pair.
- my $n := 0;
- while $n < +$<string> {
- $past.'push'(PAST::Op.new( :pirop<set__vQ~*>, $hashreg,
- $<string>[$n].ast, $<value>[$n].ast ) );
- $n++;
- }
- # return the Hash as the result of this node
- $past.'push'($hashreg);
- make $past;
- }
-
- method value:sym<true>($/) { make 1; }
-
- method value:sym<false>($/) { make 0; }
-
- method string($/) { make $<quote_EXPR>.ast; }
-}
-
-
-class JSON::Compiler is HLL::Compiler {
- INIT {
- JSON::Compiler.language('JSON');
- JSON::Compiler.parsegrammar(JSON::Grammar);
- JSON::Compiler.parseactions(JSON::Actions);
- }
-}
-
-
-sub from_json($value) {
- my $result := JSON::Compiler.eval($value, :actions(JSON::Actions.new));
- return $result;
-}
-
-
-# vim: expandtab shiftwidth=4 ft=perl6:
@@ -1,31 +0,0 @@
-# Copyright (C) 2011, Parrot Foundation.
-
-# This is the start to rewrite JSON. It starts with rewriting data_json only.
-# data_json depends on the PGE. The rewrite use parrot-nqp.
-
-=head1 NAME
-
-JSON, a lightweight data-interchange format.
-
-=head1 DESCRIPTION
-
-The C<from_json> method return a PMC that contains the data structure for
-a given valid JSON (JavaScript Object Notation) string. For example:
-
- .sub 'main' :main
- .local pmc result
-
- load_language 'JSON'
- result = from_json( '[1,2,3]' )
-
- load_bytecode 'dumper.pbc'
- _dumper( result, 'JSON' )
- .end
-
-To generate a JSON representation of a PMC, see
-L<runtime/parrot/library/JSON.pir>.
-
-For more information about the structure of the JSON representation, see
-the documentation at L<http://www.json.org/>.
-
-=cut
@@ -1,33 +0,0 @@
-runtime/parrot/languages/data_json/data_json.pbc: compilers/data_json/data_json.pbc
- $(MKPATH) runtime/parrot/languages/data_json
- $(CP) compilers/data_json/data_json.pbc $@
-
-runtime/parrot/languages/JSON/JSON.pir: compilers/data_json/JSON.nqp $(NQP_RX)
- $(MKPATH) runtime/parrot/languages/JSON
- $(NQP_RX) --target=pir compilers/data_json/JSON.nqp > $@
- @$(ADDGENERATED) "$@" "[data_json]"
-
-compilers/data_json/data_json.pbc : \
- $(LIBRARY_DIR)/PGE.pbc \
- $(LIBRARY_DIR)/PGE/Util.pbc \
- $(LIBRARY_DIR)/TGE.pbc \
- compilers/data_json/data_json/grammar.pir \
- compilers/data_json/data_json/pge2pir.pir
- $(PARROT) -o $@ compilers/data_json/data_json.pir
- @$(ADDGENERATED) "$@" "[data_json]"
-
-compilers/data_json/data_json/grammar.pir : $(PARROT) \
- compilers/data_json/data_json/grammar.pg \
- $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc \
- $(LIBRARY_DIR)/PCT/HLLCompiler.pbc
- $(PARROT) $(LIBRARY_DIR)/PGE/Perl6Grammar.pbc --output=$@ compilers/data_json/data_json/grammar.pg
-
-compilers/data_json/data_json/pge2pir.pir : $(PARROT) \
- compilers/data_json/data_json/pge2pir.tg \
- compilers/tge/tgc.pbc
- $(PARROT) compilers/tge/tgc.pbc --output=$@ compilers/data_json/data_json/pge2pir.tg
-
-# Local variables:
-# mode: makefile
-# End:
-# vim: ft=make:
Oops, something went wrong.

0 comments on commit e5dae26

Please sign in to comment.