Author: pmichaud
Date: Fri Mar 28 10:55:44 2008
New Revision: 26594
Modified:
trunk/compilers/tge/TGE/Parser.pg
trunk/config/gen/makefiles/tge.in
Log:
[tge]:
* Convert TGE to use Perl6Grammar and Perl6Regex instead of
deprecated pgc/P6Regex (RT#48028).
Modified: trunk/compilers/tge/TGE/Parser.pg
==============================================================================
--- trunk/compilers/tge/TGE/Parser.pg (original)
+++ trunk/compilers/tge/TGE/Parser.pg Fri Mar 28 10:55:44 2008
@@ -8,7 +8,7 @@
}
rule grammardec {
- grammar <type> <inherit>?;
+ grammar <type> <inherit>?';'
}
rule inherit {
@@ -17,26 +17,26 @@
rule transrule {
transform <name>
- \( <type> \)
+ '(' <type> ')'
<parent>?
<language>?
<action>
}
rule parent {
- \:applyto \( \'(<-[']>*)\' \)
+ ':applyto' '(' \'(<-[']>*)\' ')'
}
rule language {
- \:language \( \'(\w+)\' \)
+ ':language' '(' \'(\w+)\' ')'
}
token action {
- \{ (<-[}]>*) \}
+ '{' (<-[}]>*) '}'
}
token type {
- [ \:\: ]? \w+ [ \:\: \w+ ]*
+ [ '::' ]? \w+ [ '::' \w+ ]*
}
token name { \w+ }
@@ -50,11 +50,11 @@
regex pod_comment {
- ^^ = [ [ cut \h*: | end [\h\N*]? ]
- | for [ \h\N+: ] \n [ \N+\n ]*:
- | \w\N*: \n .*? \n = [ cut \h*: | end [\h\N*:]? ]
- ]
- [\n|$]
+ ^^ '=' [ [ cut \h*: | end [\h\N*]? ]
+ | for [ \h\N+: ] \n [ \N+\n ]*:
+ | \w\N*: \n .*? \n '=' [ cut \h*: | end [\h\N*:]? ]
+ ]
+ [\n|$]
}
token syntax_error { <?die: Syntax error> }
Modified: trunk/config/gen/makefiles/tge.in
==============================================================================
--- trunk/config/gen/makefiles/tge.in (original)
+++ trunk/config/gen/makefiles/tge.in Fri Mar 28 10:55:44 2008
@@ -5,11 +5,11 @@
PERL = @perl@
RM_F = @rm_f@
PARROT = ../../[EMAIL PROTECTED]@
-PGE_DIR = ../../compilers/pge
CP = @cp@
# Where to put things
PARROT_LIBRARY = ../../runtime/parrot/library
+PERL6GRAMMAR = $(PARROT_LIBRARY)/PGE/Perl6Grammar.pbc
# the default target
all: $(PARROT_LIBRARY)/TGE.pbc
@@ -36,7 +36,7 @@
$(PARROT) -o TGE/Parser.pbc --output-pbc TGE/Parser.pir
TGE/Parser.pir: TGE/Parser.pg
- $(PARROT) $(PGE_DIR)/pgc.pir --output=TGE//Parser.pir TGE//Parser.pg
+ $(PARROT) $(PERL6GRAMMAR) --output=TGE//Parser.pir TGE//Parser.pg
# This is a listing of all targets, that are meant to be called by users
help: