Author: bernhard
Date: Sat Mar 3 13:46:59 2007
New Revision: 17313
Modified:
trunk/languages/plumhead/src/antlr3/GenPastPir.g
trunk/languages/plumhead/src/antlr3/GenPastPir.java
trunk/languages/plumhead/src/antlr3/Plumhead.g
trunk/languages/plumhead/src/antlr3/PlumheadLexer.java
trunk/languages/plumhead/src/antlr3/PlumheadParser.java
trunk/languages/plumhead/t/superglobals.t
Log:
[Plumhead antlr3]
Support for $_GET.
Modified: trunk/languages/plumhead/src/antlr3/GenPastPir.g
==============================================================================
--- trunk/languages/plumhead/src/antlr3/GenPastPir.g (original)
+++ trunk/languages/plumhead/src/antlr3/GenPastPir.g Sat Mar 3 13:46:59 2007
@@ -55,11 +55,11 @@
+ " # the superglobals
\n"
+ " .local pmc superglobal_GET
\n"
+ " ( superglobal_GET ) = parse_get_sub()
\n"
- + " set_global '_GET', superglobal_GET
\n"
+ + " set_global '\$_GET', superglobal_GET
\n"
+ "
\n"
+ " .local pmc superglobal_POST
\n"
+ " ( superglobal_POST ) = parse_post_sub()
\n"
- + " set_global '_POST', superglobal_POST
\n"
+ + " set_global '\$_POST', superglobal_POST
\n"
+ "
\n"
+ " # The root node of PAST.
\n"
+ " .local pmc past_root
\n"
Modified: trunk/languages/plumhead/src/antlr3/GenPastPir.java
==============================================================================
--- trunk/languages/plumhead/src/antlr3/GenPastPir.java (original)
+++ trunk/languages/plumhead/src/antlr3/GenPastPir.java Sat Mar 3 13:46:59 2007
@@ -1,4 +1,4 @@
-// $ANTLR 3.0b6 src/antlr3/GenPastPir.g 2007-03-03 21:45:40
+// $ANTLR 3.0b6 src/antlr3/GenPastPir.g 2007-03-03 22:38:32
import java.util.regex.*;
@@ -94,11 +94,11 @@
+ " # the superglobals
\n"
+ " .local pmc superglobal_GET
\n"
+ " ( superglobal_GET ) = parse_get_sub()
\n"
- + " set_global '_GET', superglobal_GET
\n"
+ + " set_global '$_GET', superglobal_GET
\n"
+ "
\n"
+ " .local pmc superglobal_POST
\n"
+ " ( superglobal_POST ) = parse_post_sub()
\n"
- + " set_global '_POST', superglobal_POST
\n"
+ + " set_global '$_POST', superglobal_POST
\n"
+ "
\n"
+ " # The root node of PAST.
\n"
+ " .local pmc past_root
\n"
Modified: trunk/languages/plumhead/src/antlr3/Plumhead.g
==============================================================================
--- trunk/languages/plumhead/src/antlr3/Plumhead.g (original)
+++ trunk/languages/plumhead/src/antlr3/Plumhead.g Sat Mar 3 13:46:59 2007
@@ -42,7 +42,7 @@
PAREN_OPEN : { codeMode }?=> '(' ;
PAREN_CLOSE : { codeMode }?=> ')' ;
-fragment IDENT : { codeMode }?=> ( 'a'..'z' | 'A'..'Z' )( 'a'..'z' |
'A'..'Z' | '_' | '0'..'9' )*;
+fragment IDENT : { codeMode }?=> ( 'a'..'z' | 'A'..'Z' | '_' )(
'a'..'z' | 'A'..'Z' | '_' | '0'..'9' )*;
VAR_NAME : { codeMode }?=> '$' IDENT ;
fragment DIGITS : { codeMode }?=> ('0'..'9' )+ ;
Modified: trunk/languages/plumhead/src/antlr3/PlumheadLexer.java
==============================================================================
--- trunk/languages/plumhead/src/antlr3/PlumheadLexer.java (original)
+++ trunk/languages/plumhead/src/antlr3/PlumheadLexer.java Sat Mar 3
13:46:59 2007
@@ -1,4 +1,4 @@
-// $ANTLR 3.0b6 src/antlr3/Plumhead.g 2007-03-03 21:45:37
+// $ANTLR 3.0b6 src/antlr3/Plumhead.g 2007-03-03 22:38:29
import org.antlr.runtime.*;
import java.util.Stack;
@@ -684,13 +684,13 @@
public void mIDENT() throws RecognitionException {
try {
ruleNestingLevel++;
- // src/antlr3/Plumhead.g:45:23: ({...}? => ('a'..'z'|'A'..'Z') (
('a'..'z'|'A'..'Z'|'_'|'0'..'9'))* )
- // src/antlr3/Plumhead.g:45:23: {...}? => ('a'..'z'|'A'..'Z') (
('a'..'z'|'A'..'Z'|'_'|'0'..'9'))*
+ // src/antlr3/Plumhead.g:45:23: ({...}? => ('a'..'z'|'A'..'Z'|'_')
( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'))* )
+ // src/antlr3/Plumhead.g:45:23: {...}? => ('a'..'z'|'A'..'Z'|'_')
( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'))*
{
if ( !( codeMode ) ) {
throw new FailedPredicateException(input, "IDENT", " codeMode
");
}
- if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' &&
input.LA(1)<='z') ) {
+ if ( (input.LA(1)>='A' &&
input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
input.consume();
}
@@ -700,7 +700,7 @@
recover(mse); throw mse;
}
- // src/antlr3/Plumhead.g:45:64: (
('a'..'z'|'A'..'Z'|'_'|'0'..'9'))*
+ // src/antlr3/Plumhead.g:45:70: (
('a'..'z'|'A'..'Z'|'_'|'0'..'9'))*
loop6:
do {
int alt6=2;
@@ -712,7 +712,7 @@
switch (alt6) {
case 1 :
- // src/antlr3/Plumhead.g:45:66:
('a'..'z'|'A'..'Z'|'_'|'0'..'9')
+ // src/antlr3/Plumhead.g:45:72:
('a'..'z'|'A'..'Z'|'_'|'0'..'9')
{
if ( (input.LA(1)>='0' &&
input.LA(1)<='9')||(input.LA(1)>='A' &&
input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
input.consume();
@@ -1549,7 +1549,7 @@
"\1\57",
"\74\35\1\uffff\uffc2\35",
"\74\35\1\uffff\uffc2\35",
- "\32\62\6\uffff\32\62",
+ "\32\62\4\uffff\1\62\1\uffff\32\62",
"\56\35\1\21\1\35\12\20\2\35\1\uffff\uffc2\35",
"\12\64",
"\74\35\1\uffff\uffc2\35",
@@ -2178,7 +2178,7 @@
case 53 :
int LA12_15 = input.LA(1);
s = -1;
- if ( ((LA12_15>='A' && LA12_15<='Z')||(LA12_15>='a' &&
LA12_15<='z')) && (( codeMode || !codeMode ))) {s = 50;}
+ if ( ((LA12_15>='A' &&
LA12_15<='Z')||LA12_15=='_'||(LA12_15>='a' && LA12_15<='z')) && (( codeMode ||
!codeMode ))) {s = 50;}
else s = 29;
Modified: trunk/languages/plumhead/src/antlr3/PlumheadParser.java
==============================================================================
--- trunk/languages/plumhead/src/antlr3/PlumheadParser.java (original)
+++ trunk/languages/plumhead/src/antlr3/PlumheadParser.java Sat Mar 3
13:46:59 2007
@@ -1,4 +1,4 @@
-// $ANTLR 3.0b6 src/antlr3/Plumhead.g 2007-03-03 21:45:36
+// $ANTLR 3.0b6 src/antlr3/Plumhead.g 2007-03-03 22:38:29
import org.antlr.runtime.*;
import java.util.Stack;
@@ -82,7 +82,7 @@
// src/antlr3/Plumhead.g:66:5: ( sea_or_code -> ^( PROGRAM
sea_or_code ) )
// src/antlr3/Plumhead.g:66:5: sea_or_code
{
- pushFollow(FOLLOW_sea_or_code_in_program828);
+ pushFollow(FOLLOW_sea_or_code_in_program832);
sea_or_code1=sea_or_code();
_fsp--;
@@ -169,7 +169,7 @@
case 1 :
// src/antlr3/Plumhead.g:70:7: sea
{
- pushFollow(FOLLOW_sea_in_sea_or_code853);
+ pushFollow(FOLLOW_sea_in_sea_or_code857);
sea2=sea();
_fsp--;
@@ -180,7 +180,7 @@
case 2 :
// src/antlr3/Plumhead.g:70:13: code
{
- pushFollow(FOLLOW_code_in_sea_or_code857);
+ pushFollow(FOLLOW_code_in_sea_or_code861);
code3=code();
_fsp--;
@@ -239,7 +239,7 @@
// src/antlr3/Plumhead.g:74:5: SEA
{
SEA4=(Token)input.LT(1);
- match(input,SEA,FOLLOW_SEA_in_sea874);
+ match(input,SEA,FOLLOW_SEA_in_sea878);
list_SEA.add(SEA4);
@@ -309,10 +309,10 @@
// src/antlr3/Plumhead.g:78:5: CODE_START statements ( CODE_END )?
{
CODE_START5=(Token)input.LT(1);
- match(input,CODE_START,FOLLOW_CODE_START_in_code898);
+ match(input,CODE_START,FOLLOW_CODE_START_in_code902);
list_CODE_START.add(CODE_START5);
- pushFollow(FOLLOW_statements_in_code900);
+ pushFollow(FOLLOW_statements_in_code904);
statements6=statements();
_fsp--;
@@ -328,7 +328,7 @@
// src/antlr3/Plumhead.g:78:27: CODE_END
{
CODE_END7=(Token)input.LT(1);
- match(input,CODE_END,FOLLOW_CODE_END_in_code902);
+ match(input,CODE_END,FOLLOW_CODE_END_in_code906);
list_CODE_END.add(CODE_END7);
@@ -395,7 +395,7 @@
{
root_0 = (CommonTree)adaptor.nil();
- pushFollow(FOLLOW_expression_in_relational_expression921);
+ pushFollow(FOLLOW_expression_in_relational_expression925);
expression8=expression();
_fsp--;
@@ -411,11 +411,11 @@
// src/antlr3/Plumhead.g:82:18: REL_OP^ expression
{
REL_OP9=(Token)input.LT(1);
-
match(input,REL_OP,FOLLOW_REL_OP_in_relational_expression925);
+
match(input,REL_OP,FOLLOW_REL_OP_in_relational_expression929);
REL_OP9_tree = (CommonTree)adaptor.create(REL_OP9);
root_0 = (CommonTree)adaptor.becomeRoot(REL_OP9_tree,
root_0);
- pushFollow(FOLLOW_expression_in_relational_expression928);
+ pushFollow(FOLLOW_expression_in_relational_expression932);
expression10=expression();
_fsp--;
@@ -495,7 +495,7 @@
case 1 :
// src/antlr3/Plumhead.g:86:7: statement
{
- pushFollow(FOLLOW_statement_in_statements946);
+ pushFollow(FOLLOW_statement_in_statements950);
statement11=statement();
_fsp--;
@@ -668,16 +668,16 @@
// src/antlr3/Plumhead.g:90:5: ECHO expression ';'
{
ECHO12=(Token)input.LT(1);
- match(input,ECHO,FOLLOW_ECHO_in_statement962);
+ match(input,ECHO,FOLLOW_ECHO_in_statement966);
list_ECHO.add(ECHO12);
- pushFollow(FOLLOW_expression_in_statement964);
+ pushFollow(FOLLOW_expression_in_statement968);
expression13=expression();
_fsp--;
list_expression.add(expression13.getTree());
char_literal14=(Token)input.LT(1);
- match(input,34,FOLLOW_34_in_statement966);
+ match(input,34,FOLLOW_34_in_statement970);
list_34.add(char_literal14);
@@ -707,24 +707,24 @@
// src/antlr3/Plumhead.g:91:5: VAR_DUMP PAREN_OPEN
expression PAREN_CLOSE ';'
{
VAR_DUMP15=(Token)input.LT(1);
- match(input,VAR_DUMP,FOLLOW_VAR_DUMP_in_statement1026);
+ match(input,VAR_DUMP,FOLLOW_VAR_DUMP_in_statement1030);
list_VAR_DUMP.add(VAR_DUMP15);
PAREN_OPEN16=(Token)input.LT(1);
-
match(input,PAREN_OPEN,FOLLOW_PAREN_OPEN_in_statement1028);
+
match(input,PAREN_OPEN,FOLLOW_PAREN_OPEN_in_statement1032);
list_PAREN_OPEN.add(PAREN_OPEN16);
- pushFollow(FOLLOW_expression_in_statement1031);
+ pushFollow(FOLLOW_expression_in_statement1035);
expression17=expression();
_fsp--;
list_expression.add(expression17.getTree());
PAREN_CLOSE18=(Token)input.LT(1);
-
match(input,PAREN_CLOSE,FOLLOW_PAREN_CLOSE_in_statement1033);
+
match(input,PAREN_CLOSE,FOLLOW_PAREN_CLOSE_in_statement1037);
list_PAREN_CLOSE.add(PAREN_CLOSE18);
char_literal19=(Token)input.LT(1);
- match(input,34,FOLLOW_34_in_statement1035);
+ match(input,34,FOLLOW_34_in_statement1039);
list_34.add(char_literal19);
@@ -754,33 +754,33 @@
// src/antlr3/Plumhead.g:92:5: IF PAREN_OPEN
relational_expression PAREN_CLOSE '{' s1= statements '}' ( ELSE '{' s2=
statements '}' -> ^( IF relational_expression ^( STMTS $s1) ^( STMTS $s2) ) |
-> ^( IF relational_expression ^( STMTS $s1) ) )
{
IF20=(Token)input.LT(1);
- match(input,IF,FOLLOW_IF_in_statement1067);
+ match(input,IF,FOLLOW_IF_in_statement1071);
list_IF.add(IF20);
PAREN_OPEN21=(Token)input.LT(1);
-
match(input,PAREN_OPEN,FOLLOW_PAREN_OPEN_in_statement1069);
+
match(input,PAREN_OPEN,FOLLOW_PAREN_OPEN_in_statement1073);
list_PAREN_OPEN.add(PAREN_OPEN21);
- pushFollow(FOLLOW_relational_expression_in_statement1071);
+ pushFollow(FOLLOW_relational_expression_in_statement1075);
relational_expression22=relational_expression();
_fsp--;
list_relational_expression.add(relational_expression22.getTree());
PAREN_CLOSE23=(Token)input.LT(1);
-
match(input,PAREN_CLOSE,FOLLOW_PAREN_CLOSE_in_statement1073);
+
match(input,PAREN_CLOSE,FOLLOW_PAREN_CLOSE_in_statement1077);
list_PAREN_CLOSE.add(PAREN_CLOSE23);
char_literal24=(Token)input.LT(1);
- match(input,35,FOLLOW_35_in_statement1075);
+ match(input,35,FOLLOW_35_in_statement1079);
list_35.add(char_literal24);
- pushFollow(FOLLOW_statements_in_statement1079);
+ pushFollow(FOLLOW_statements_in_statement1083);
s1=statements();
_fsp--;
list_statements.add(s1.getTree());
char_literal25=(Token)input.LT(1);
- match(input,36,FOLLOW_36_in_statement1081);
+ match(input,36,FOLLOW_36_in_statement1085);
list_36.add(char_literal25);
// src/antlr3/Plumhead.g:93:5: ( ELSE '{' s2= statements
'}' -> ^( IF relational_expression ^( STMTS $s1) ^( STMTS $s2) ) | -> ^( IF
relational_expression ^( STMTS $s1) ) )
@@ -803,20 +803,20 @@
// src/antlr3/Plumhead.g:93:7: ELSE '{' s2=
statements '}'
{
ELSE26=(Token)input.LT(1);
- match(input,ELSE,FOLLOW_ELSE_in_statement1089);
+ match(input,ELSE,FOLLOW_ELSE_in_statement1093);
list_ELSE.add(ELSE26);
char_literal27=(Token)input.LT(1);
- match(input,35,FOLLOW_35_in_statement1091);
+ match(input,35,FOLLOW_35_in_statement1095);
list_35.add(char_literal27);
- pushFollow(FOLLOW_statements_in_statement1095);
+ pushFollow(FOLLOW_statements_in_statement1099);
s2=statements();
_fsp--;
list_statements.add(s2.getTree());
char_literal28=(Token)input.LT(1);
- match(input,36,FOLLOW_36_in_statement1097);
+ match(input,36,FOLLOW_36_in_statement1101);
list_36.add(char_literal28);
@@ -905,15 +905,15 @@
// src/antlr3/Plumhead.g:96:5: CODE_END SEA CODE_START
{
CODE_END29=(Token)input.LT(1);
- match(input,CODE_END,FOLLOW_CODE_END_in_statement1260);
+ match(input,CODE_END,FOLLOW_CODE_END_in_statement1264);
list_CODE_END.add(CODE_END29);
SEA30=(Token)input.LT(1);
- match(input,SEA,FOLLOW_SEA_in_statement1262);
+ match(input,SEA,FOLLOW_SEA_in_statement1266);
list_SEA.add(SEA30);
CODE_START31=(Token)input.LT(1);
-
match(input,CODE_START,FOLLOW_CODE_START_in_statement1264);
+
match(input,CODE_START,FOLLOW_CODE_START_in_statement1268);
list_CODE_START.add(CODE_START31);
@@ -943,20 +943,20 @@
// src/antlr3/Plumhead.g:97:5: VAR_NAME ASSIGN_OP val=
expression ';'
{
VAR_NAME32=(Token)input.LT(1);
- match(input,VAR_NAME,FOLLOW_VAR_NAME_in_statement1321);
+ match(input,VAR_NAME,FOLLOW_VAR_NAME_in_statement1325);
list_VAR_NAME.add(VAR_NAME32);
ASSIGN_OP33=(Token)input.LT(1);
- match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_statement1323);
+ match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_statement1327);
list_ASSIGN_OP.add(ASSIGN_OP33);
- pushFollow(FOLLOW_expression_in_statement1327);
+ pushFollow(FOLLOW_expression_in_statement1331);
val=expression();
_fsp--;
list_expression.add(val.getTree());
char_literal34=(Token)input.LT(1);
- match(input,34,FOLLOW_34_in_statement1329);
+ match(input,34,FOLLOW_34_in_statement1333);
list_34.add(char_literal34);
@@ -987,33 +987,33 @@
// src/antlr3/Plumhead.g:98:5: VAR_NAME '[' key=
expression ']' ASSIGN_OP val= expression ';'
{
VAR_NAME35=(Token)input.LT(1);
- match(input,VAR_NAME,FOLLOW_VAR_NAME_in_statement1376);
+ match(input,VAR_NAME,FOLLOW_VAR_NAME_in_statement1380);
list_VAR_NAME.add(VAR_NAME35);
char_literal36=(Token)input.LT(1);
- match(input,37,FOLLOW_37_in_statement1378);
+ match(input,37,FOLLOW_37_in_statement1382);
list_37.add(char_literal36);
- pushFollow(FOLLOW_expression_in_statement1382);
+ pushFollow(FOLLOW_expression_in_statement1386);
key=expression();
_fsp--;
list_expression.add(key.getTree());
char_literal37=(Token)input.LT(1);
- match(input,38,FOLLOW_38_in_statement1384);
+ match(input,38,FOLLOW_38_in_statement1388);
list_38.add(char_literal37);
ASSIGN_OP38=(Token)input.LT(1);
- match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_statement1386);
+ match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_statement1390);
list_ASSIGN_OP.add(ASSIGN_OP38);
- pushFollow(FOLLOW_expression_in_statement1390);
+ pushFollow(FOLLOW_expression_in_statement1394);
val=expression();
_fsp--;
list_expression.add(val.getTree());
char_literal39=(Token)input.LT(1);
- match(input,34,FOLLOW_34_in_statement1392);
+ match(input,34,FOLLOW_34_in_statement1396);
list_34.add(char_literal39);
@@ -1145,7 +1145,7 @@
root_0 = (CommonTree)adaptor.nil();
DOUBLEQUOTE_STRING40=(Token)input.LT(1);
-
match(input,DOUBLEQUOTE_STRING,FOLLOW_DOUBLEQUOTE_STRING_in_expression1429);
+
match(input,DOUBLEQUOTE_STRING,FOLLOW_DOUBLEQUOTE_STRING_in_expression1433);
DOUBLEQUOTE_STRING40_tree =
(CommonTree)adaptor.create(DOUBLEQUOTE_STRING40);
adaptor.addChild(root_0, DOUBLEQUOTE_STRING40_tree);
@@ -1158,7 +1158,7 @@
root_0 = (CommonTree)adaptor.nil();
SINGLEQUOTE_STRING41=(Token)input.LT(1);
-
match(input,SINGLEQUOTE_STRING,FOLLOW_SINGLEQUOTE_STRING_in_expression1435);
+
match(input,SINGLEQUOTE_STRING,FOLLOW_SINGLEQUOTE_STRING_in_expression1439);
SINGLEQUOTE_STRING41_tree =
(CommonTree)adaptor.create(SINGLEQUOTE_STRING41);
adaptor.addChild(root_0, SINGLEQUOTE_STRING41_tree);
@@ -1170,7 +1170,7 @@
{
root_0 = (CommonTree)adaptor.nil();
- pushFollow(FOLLOW_bitwise_expression_in_expression1441);
+ pushFollow(FOLLOW_bitwise_expression_in_expression1445);
bitwise_expression42=bitwise_expression();
_fsp--;
@@ -1182,20 +1182,20 @@
// src/antlr3/Plumhead.g:105:5: VAR_NAME '[' key=
expression ']'
{
VAR_NAME43=(Token)input.LT(1);
- match(input,VAR_NAME,FOLLOW_VAR_NAME_in_expression1447);
+ match(input,VAR_NAME,FOLLOW_VAR_NAME_in_expression1451);
list_VAR_NAME.add(VAR_NAME43);
char_literal44=(Token)input.LT(1);
- match(input,37,FOLLOW_37_in_expression1449);
+ match(input,37,FOLLOW_37_in_expression1453);
list_37.add(char_literal44);
- pushFollow(FOLLOW_expression_in_expression1453);
+ pushFollow(FOLLOW_expression_in_expression1457);
key=expression();
_fsp--;
list_expression.add(key.getTree());
char_literal45=(Token)input.LT(1);
- match(input,38,FOLLOW_38_in_expression1455);
+ match(input,38,FOLLOW_38_in_expression1459);
list_38.add(char_literal45);
@@ -1225,7 +1225,7 @@
// src/antlr3/Plumhead.g:106:5: VAR_NAME
{
VAR_NAME46=(Token)input.LT(1);
- match(input,VAR_NAME,FOLLOW_VAR_NAME_in_expression1476);
+ match(input,VAR_NAME,FOLLOW_VAR_NAME_in_expression1480);
list_VAR_NAME.add(VAR_NAME46);
@@ -1288,7 +1288,7 @@
{
root_0 = (CommonTree)adaptor.nil();
- pushFollow(FOLLOW_adding_expression_in_bitwise_expression1520);
+ pushFollow(FOLLOW_adding_expression_in_bitwise_expression1524);
adding_expression47=adding_expression();
_fsp--;
@@ -1308,11 +1308,11 @@
// src/antlr3/Plumhead.g:110:25: BITWISE_OP^
adding_expression
{
BITWISE_OP48=(Token)input.LT(1);
-
match(input,BITWISE_OP,FOLLOW_BITWISE_OP_in_bitwise_expression1524);
+
match(input,BITWISE_OP,FOLLOW_BITWISE_OP_in_bitwise_expression1528);
BITWISE_OP48_tree =
(CommonTree)adaptor.create(BITWISE_OP48);
root_0 = (CommonTree)adaptor.becomeRoot(BITWISE_OP48_tree,
root_0);
-
pushFollow(FOLLOW_adding_expression_in_bitwise_expression1527);
+
pushFollow(FOLLOW_adding_expression_in_bitwise_expression1531);
adding_expression49=adding_expression();
_fsp--;
@@ -1374,7 +1374,7 @@
{
root_0 = (CommonTree)adaptor.nil();
- pushFollow(FOLLOW_multiplying_expression_in_adding_expression1543);
+ pushFollow(FOLLOW_multiplying_expression_in_adding_expression1547);
multiplying_expression50=multiplying_expression();
_fsp--;
@@ -1413,7 +1413,7 @@
// src/antlr3/Plumhead.g:114:32: PLUS^
{
PLUS51=(Token)input.LT(1);
-
match(input,PLUS,FOLLOW_PLUS_in_adding_expression1549);
+
match(input,PLUS,FOLLOW_PLUS_in_adding_expression1553);
PLUS51_tree = (CommonTree)adaptor.create(PLUS51);
root_0 =
(CommonTree)adaptor.becomeRoot(PLUS51_tree, root_0);
@@ -1424,7 +1424,7 @@
// src/antlr3/Plumhead.g:114:40: MINUS^
{
MINUS52=(Token)input.LT(1);
-
match(input,MINUS,FOLLOW_MINUS_in_adding_expression1554);
+
match(input,MINUS,FOLLOW_MINUS_in_adding_expression1558);
MINUS52_tree = (CommonTree)adaptor.create(MINUS52);
root_0 =
(CommonTree)adaptor.becomeRoot(MINUS52_tree, root_0);
@@ -1434,7 +1434,7 @@
}
-
pushFollow(FOLLOW_multiplying_expression_in_adding_expression1559);
+
pushFollow(FOLLOW_multiplying_expression_in_adding_expression1563);
multiplying_expression53=multiplying_expression();
_fsp--;
@@ -1494,7 +1494,7 @@
{
root_0 = (CommonTree)adaptor.nil();
- pushFollow(FOLLOW_unary_expression_in_multiplying_expression1576);
+ pushFollow(FOLLOW_unary_expression_in_multiplying_expression1580);
unary_expression54=unary_expression();
_fsp--;
@@ -1514,11 +1514,11 @@
// src/antlr3/Plumhead.g:118:24: MUL_OP^ unary_expression
{
MUL_OP55=(Token)input.LT(1);
-
match(input,MUL_OP,FOLLOW_MUL_OP_in_multiplying_expression1580);
+
match(input,MUL_OP,FOLLOW_MUL_OP_in_multiplying_expression1584);
MUL_OP55_tree = (CommonTree)adaptor.create(MUL_OP55);
root_0 = (CommonTree)adaptor.becomeRoot(MUL_OP55_tree,
root_0);
-
pushFollow(FOLLOW_unary_expression_in_multiplying_expression1583);
+
pushFollow(FOLLOW_unary_expression_in_multiplying_expression1587);
unary_expression56=unary_expression();
_fsp--;
@@ -1595,7 +1595,7 @@
{
root_0 = (CommonTree)adaptor.nil();
-
pushFollow(FOLLOW_postfix_expression_in_unary_expression1599);
+
pushFollow(FOLLOW_postfix_expression_in_unary_expression1603);
postfix_expression57=postfix_expression();
_fsp--;
@@ -1607,10 +1607,10 @@
// src/antlr3/Plumhead.g:123:5: MINUS postfix_expression
{
MINUS58=(Token)input.LT(1);
- match(input,MINUS,FOLLOW_MINUS_in_unary_expression1605);
+ match(input,MINUS,FOLLOW_MINUS_in_unary_expression1609);
list_MINUS.add(MINUS58);
-
pushFollow(FOLLOW_postfix_expression_in_unary_expression1607);
+
pushFollow(FOLLOW_postfix_expression_in_unary_expression1611);
postfix_expression59=postfix_expression();
_fsp--;
@@ -1710,7 +1710,7 @@
root_0 = (CommonTree)adaptor.nil();
NUMBER60=(Token)input.LT(1);
-
match(input,NUMBER,FOLLOW_NUMBER_in_postfix_expression1631);
+
match(input,NUMBER,FOLLOW_NUMBER_in_postfix_expression1635);
NUMBER60_tree = (CommonTree)adaptor.create(NUMBER60);
adaptor.addChild(root_0, NUMBER60_tree);
@@ -1723,7 +1723,7 @@
root_0 = (CommonTree)adaptor.nil();
INTEGER61=(Token)input.LT(1);
-
match(input,INTEGER,FOLLOW_INTEGER_in_postfix_expression1637);
+
match(input,INTEGER,FOLLOW_INTEGER_in_postfix_expression1641);
INTEGER61_tree = (CommonTree)adaptor.create(INTEGER61);
adaptor.addChild(root_0, INTEGER61_tree);
@@ -1734,16 +1734,16 @@
// src/antlr3/Plumhead.g:129:5: PAREN_OPEN expression
PAREN_CLOSE
{
PAREN_OPEN62=(Token)input.LT(1);
-
match(input,PAREN_OPEN,FOLLOW_PAREN_OPEN_in_postfix_expression1643);
+
match(input,PAREN_OPEN,FOLLOW_PAREN_OPEN_in_postfix_expression1647);
list_PAREN_OPEN.add(PAREN_OPEN62);
- pushFollow(FOLLOW_expression_in_postfix_expression1645);
+ pushFollow(FOLLOW_expression_in_postfix_expression1649);
expression63=expression();
_fsp--;
list_expression.add(expression63.getTree());
PAREN_CLOSE64=(Token)input.LT(1);
-
match(input,PAREN_CLOSE,FOLLOW_PAREN_CLOSE_in_postfix_expression1647);
+
match(input,PAREN_CLOSE,FOLLOW_PAREN_CLOSE_in_postfix_expression1651);
list_PAREN_CLOSE.add(PAREN_CLOSE64);
@@ -1782,75 +1782,75 @@
- public static final BitSet FOLLOW_sea_or_code_in_program828 = new
BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_sea_in_sea_or_code853 = new BitSet(new
long[]{0x0000000000001802L});
- public static final BitSet FOLLOW_code_in_sea_or_code857 = new BitSet(new
long[]{0x0000000000001802L});
- public static final BitSet FOLLOW_SEA_in_sea874 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_CODE_START_in_code898 = new BitSet(new
long[]{0x0000000100462002L});
- public static final BitSet FOLLOW_statements_in_code900 = new BitSet(new
long[]{0x0000000000002002L});
- public static final BitSet FOLLOW_CODE_END_in_code902 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_expression_in_relational_expression921 =
new BitSet(new long[]{0x0000000080000002L});
- public static final BitSet FOLLOW_REL_OP_in_relational_expression925 = new
BitSet(new long[]{0x0000000007498000L});
- public static final BitSet FOLLOW_expression_in_relational_expression928 =
new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_statement_in_statements946 = new
BitSet(new long[]{0x0000000100462002L});
- public static final BitSet FOLLOW_ECHO_in_statement962 = new BitSet(new
long[]{0x0000000007498000L});
- public static final BitSet FOLLOW_expression_in_statement964 = new
BitSet(new long[]{0x0000000400000000L});
- public static final BitSet FOLLOW_34_in_statement966 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_DUMP_in_statement1026 = new
BitSet(new long[]{0x0000000000080000L});
- public static final BitSet FOLLOW_PAREN_OPEN_in_statement1028 = new
BitSet(new long[]{0x0000000007498000L});
- public static final BitSet FOLLOW_expression_in_statement1031 = new
BitSet(new long[]{0x0000000000100000L});
- public static final BitSet FOLLOW_PAREN_CLOSE_in_statement1033 = new
BitSet(new long[]{0x0000000400000000L});
- public static final BitSet FOLLOW_34_in_statement1035 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_IF_in_statement1067 = new BitSet(new
long[]{0x0000000000080000L});
- public static final BitSet FOLLOW_PAREN_OPEN_in_statement1069 = new
BitSet(new long[]{0x0000000007498000L});
- public static final BitSet FOLLOW_relational_expression_in_statement1071 =
new BitSet(new long[]{0x0000000000100000L});
- public static final BitSet FOLLOW_PAREN_CLOSE_in_statement1073 = new
BitSet(new long[]{0x0000000800000000L});
- public static final BitSet FOLLOW_35_in_statement1075 = new BitSet(new
long[]{0x0000001100462000L});
- public static final BitSet FOLLOW_statements_in_statement1079 = new
BitSet(new long[]{0x0000001000000000L});
- public static final BitSet FOLLOW_36_in_statement1081 = new BitSet(new
long[]{0x0000000200000002L});
- public static final BitSet FOLLOW_ELSE_in_statement1089 = new BitSet(new
long[]{0x0000000800000000L});
- public static final BitSet FOLLOW_35_in_statement1091 = new BitSet(new
long[]{0x0000001100462000L});
- public static final BitSet FOLLOW_statements_in_statement1095 = new
BitSet(new long[]{0x0000001000000000L});
- public static final BitSet FOLLOW_36_in_statement1097 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_CODE_END_in_statement1260 = new
BitSet(new long[]{0x0000000000000800L});
- public static final BitSet FOLLOW_SEA_in_statement1262 = new BitSet(new
long[]{0x0000000000001000L});
- public static final BitSet FOLLOW_CODE_START_in_statement1264 = new
BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_NAME_in_statement1321 = new
BitSet(new long[]{0x0000000040000000L});
- public static final BitSet FOLLOW_ASSIGN_OP_in_statement1323 = new
BitSet(new long[]{0x0000000007498000L});
- public static final BitSet FOLLOW_expression_in_statement1327 = new
BitSet(new long[]{0x0000000400000000L});
- public static final BitSet FOLLOW_34_in_statement1329 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_NAME_in_statement1376 = new
BitSet(new long[]{0x0000002000000000L});
- public static final BitSet FOLLOW_37_in_statement1378 = new BitSet(new
long[]{0x0000000007498000L});
- public static final BitSet FOLLOW_expression_in_statement1382 = new
BitSet(new long[]{0x0000004000000000L});
- public static final BitSet FOLLOW_38_in_statement1384 = new BitSet(new
long[]{0x0000000040000000L});
- public static final BitSet FOLLOW_ASSIGN_OP_in_statement1386 = new
BitSet(new long[]{0x0000000007498000L});
- public static final BitSet FOLLOW_expression_in_statement1390 = new
BitSet(new long[]{0x0000000400000000L});
- public static final BitSet FOLLOW_34_in_statement1392 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_DOUBLEQUOTE_STRING_in_expression1429 =
new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_SINGLEQUOTE_STRING_in_expression1435 =
new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_bitwise_expression_in_expression1441 =
new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_NAME_in_expression1447 = new
BitSet(new long[]{0x0000002000000000L});
- public static final BitSet FOLLOW_37_in_expression1449 = new BitSet(new
long[]{0x0000000007498000L});
- public static final BitSet FOLLOW_expression_in_expression1453 = new
BitSet(new long[]{0x0000004000000000L});
- public static final BitSet FOLLOW_38_in_expression1455 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_NAME_in_expression1476 = new
BitSet(new long[]{0x0000000000000002L});
- public static final BitSet
FOLLOW_adding_expression_in_bitwise_expression1520 = new BitSet(new
long[]{0x0000000020000002L});
- public static final BitSet FOLLOW_BITWISE_OP_in_bitwise_expression1524 =
new BitSet(new long[]{0x0000000007080000L});
- public static final BitSet
FOLLOW_adding_expression_in_bitwise_expression1527 = new BitSet(new
long[]{0x0000000020000002L});
- public static final BitSet
FOLLOW_multiplying_expression_in_adding_expression1543 = new BitSet(new
long[]{0x000000000C000002L});
- public static final BitSet FOLLOW_PLUS_in_adding_expression1549 = new
BitSet(new long[]{0x0000000007080000L});
- public static final BitSet FOLLOW_MINUS_in_adding_expression1554 = new
BitSet(new long[]{0x0000000007080000L});
- public static final BitSet
FOLLOW_multiplying_expression_in_adding_expression1559 = new BitSet(new
long[]{0x000000000C000002L});
- public static final BitSet
FOLLOW_unary_expression_in_multiplying_expression1576 = new BitSet(new
long[]{0x0000000010000002L});
- public static final BitSet FOLLOW_MUL_OP_in_multiplying_expression1580 =
new BitSet(new long[]{0x0000000007080000L});
- public static final BitSet
FOLLOW_unary_expression_in_multiplying_expression1583 = new BitSet(new
long[]{0x0000000010000002L});
- public static final BitSet
FOLLOW_postfix_expression_in_unary_expression1599 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_MINUS_in_unary_expression1605 = new
BitSet(new long[]{0x0000000003080000L});
- public static final BitSet
FOLLOW_postfix_expression_in_unary_expression1607 = new BitSet(new
long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NUMBER_in_postfix_expression1631 = new
BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INTEGER_in_postfix_expression1637 = new
BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_PAREN_OPEN_in_postfix_expression1643 =
new BitSet(new long[]{0x0000000007498000L});
- public static final BitSet FOLLOW_expression_in_postfix_expression1645 =
new BitSet(new long[]{0x0000000000100000L});
- public static final BitSet FOLLOW_PAREN_CLOSE_in_postfix_expression1647 =
new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_sea_or_code_in_program832 = new
BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_sea_in_sea_or_code857 = new BitSet(new
long[]{0x0000000000001802L});
+ public static final BitSet FOLLOW_code_in_sea_or_code861 = new BitSet(new
long[]{0x0000000000001802L});
+ public static final BitSet FOLLOW_SEA_in_sea878 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_CODE_START_in_code902 = new BitSet(new
long[]{0x0000000100462002L});
+ public static final BitSet FOLLOW_statements_in_code904 = new BitSet(new
long[]{0x0000000000002002L});
+ public static final BitSet FOLLOW_CODE_END_in_code906 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_expression_in_relational_expression925 =
new BitSet(new long[]{0x0000000080000002L});
+ public static final BitSet FOLLOW_REL_OP_in_relational_expression929 = new
BitSet(new long[]{0x0000000007498000L});
+ public static final BitSet FOLLOW_expression_in_relational_expression932 =
new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_statement_in_statements950 = new
BitSet(new long[]{0x0000000100462002L});
+ public static final BitSet FOLLOW_ECHO_in_statement966 = new BitSet(new
long[]{0x0000000007498000L});
+ public static final BitSet FOLLOW_expression_in_statement968 = new
BitSet(new long[]{0x0000000400000000L});
+ public static final BitSet FOLLOW_34_in_statement970 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_DUMP_in_statement1030 = new
BitSet(new long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_PAREN_OPEN_in_statement1032 = new
BitSet(new long[]{0x0000000007498000L});
+ public static final BitSet FOLLOW_expression_in_statement1035 = new
BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_PAREN_CLOSE_in_statement1037 = new
BitSet(new long[]{0x0000000400000000L});
+ public static final BitSet FOLLOW_34_in_statement1039 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_IF_in_statement1071 = new BitSet(new
long[]{0x0000000000080000L});
+ public static final BitSet FOLLOW_PAREN_OPEN_in_statement1073 = new
BitSet(new long[]{0x0000000007498000L});
+ public static final BitSet FOLLOW_relational_expression_in_statement1075 =
new BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_PAREN_CLOSE_in_statement1077 = new
BitSet(new long[]{0x0000000800000000L});
+ public static final BitSet FOLLOW_35_in_statement1079 = new BitSet(new
long[]{0x0000001100462000L});
+ public static final BitSet FOLLOW_statements_in_statement1083 = new
BitSet(new long[]{0x0000001000000000L});
+ public static final BitSet FOLLOW_36_in_statement1085 = new BitSet(new
long[]{0x0000000200000002L});
+ public static final BitSet FOLLOW_ELSE_in_statement1093 = new BitSet(new
long[]{0x0000000800000000L});
+ public static final BitSet FOLLOW_35_in_statement1095 = new BitSet(new
long[]{0x0000001100462000L});
+ public static final BitSet FOLLOW_statements_in_statement1099 = new
BitSet(new long[]{0x0000001000000000L});
+ public static final BitSet FOLLOW_36_in_statement1101 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_CODE_END_in_statement1264 = new
BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_SEA_in_statement1266 = new BitSet(new
long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_CODE_START_in_statement1268 = new
BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_NAME_in_statement1325 = new
BitSet(new long[]{0x0000000040000000L});
+ public static final BitSet FOLLOW_ASSIGN_OP_in_statement1327 = new
BitSet(new long[]{0x0000000007498000L});
+ public static final BitSet FOLLOW_expression_in_statement1331 = new
BitSet(new long[]{0x0000000400000000L});
+ public static final BitSet FOLLOW_34_in_statement1333 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_NAME_in_statement1380 = new
BitSet(new long[]{0x0000002000000000L});
+ public static final BitSet FOLLOW_37_in_statement1382 = new BitSet(new
long[]{0x0000000007498000L});
+ public static final BitSet FOLLOW_expression_in_statement1386 = new
BitSet(new long[]{0x0000004000000000L});
+ public static final BitSet FOLLOW_38_in_statement1388 = new BitSet(new
long[]{0x0000000040000000L});
+ public static final BitSet FOLLOW_ASSIGN_OP_in_statement1390 = new
BitSet(new long[]{0x0000000007498000L});
+ public static final BitSet FOLLOW_expression_in_statement1394 = new
BitSet(new long[]{0x0000000400000000L});
+ public static final BitSet FOLLOW_34_in_statement1396 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_DOUBLEQUOTE_STRING_in_expression1433 =
new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_SINGLEQUOTE_STRING_in_expression1439 =
new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_bitwise_expression_in_expression1445 =
new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_NAME_in_expression1451 = new
BitSet(new long[]{0x0000002000000000L});
+ public static final BitSet FOLLOW_37_in_expression1453 = new BitSet(new
long[]{0x0000000007498000L});
+ public static final BitSet FOLLOW_expression_in_expression1457 = new
BitSet(new long[]{0x0000004000000000L});
+ public static final BitSet FOLLOW_38_in_expression1459 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_NAME_in_expression1480 = new
BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet
FOLLOW_adding_expression_in_bitwise_expression1524 = new BitSet(new
long[]{0x0000000020000002L});
+ public static final BitSet FOLLOW_BITWISE_OP_in_bitwise_expression1528 =
new BitSet(new long[]{0x0000000007080000L});
+ public static final BitSet
FOLLOW_adding_expression_in_bitwise_expression1531 = new BitSet(new
long[]{0x0000000020000002L});
+ public static final BitSet
FOLLOW_multiplying_expression_in_adding_expression1547 = new BitSet(new
long[]{0x000000000C000002L});
+ public static final BitSet FOLLOW_PLUS_in_adding_expression1553 = new
BitSet(new long[]{0x0000000007080000L});
+ public static final BitSet FOLLOW_MINUS_in_adding_expression1558 = new
BitSet(new long[]{0x0000000007080000L});
+ public static final BitSet
FOLLOW_multiplying_expression_in_adding_expression1563 = new BitSet(new
long[]{0x000000000C000002L});
+ public static final BitSet
FOLLOW_unary_expression_in_multiplying_expression1580 = new BitSet(new
long[]{0x0000000010000002L});
+ public static final BitSet FOLLOW_MUL_OP_in_multiplying_expression1584 =
new BitSet(new long[]{0x0000000007080000L});
+ public static final BitSet
FOLLOW_unary_expression_in_multiplying_expression1587 = new BitSet(new
long[]{0x0000000010000002L});
+ public static final BitSet
FOLLOW_postfix_expression_in_unary_expression1603 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_MINUS_in_unary_expression1609 = new
BitSet(new long[]{0x0000000003080000L});
+ public static final BitSet
FOLLOW_postfix_expression_in_unary_expression1611 = new BitSet(new
long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NUMBER_in_postfix_expression1635 = new
BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INTEGER_in_postfix_expression1641 = new
BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_PAREN_OPEN_in_postfix_expression1647 =
new BitSet(new long[]{0x0000000007498000L});
+ public static final BitSet FOLLOW_expression_in_postfix_expression1649 =
new BitSet(new long[]{0x0000000000100000L});
+ public static final BitSet FOLLOW_PAREN_CLOSE_in_postfix_expression1651 =
new BitSet(new long[]{0x0000000000000002L});
}
\ No newline at end of file
Modified: trunk/languages/plumhead/t/superglobals.t
==============================================================================
--- trunk/languages/plumhead/t/superglobals.t (original)
+++ trunk/languages/plumhead/t/superglobals.t Sat Mar 3 13:46:59 2007
@@ -19,7 +19,7 @@
use Parrot::Config ();
use Parrot::Test;
-use Test::More tests => 2;
+use Test::More tests => 3;
language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'hello' );
<?php
@@ -32,6 +32,7 @@
$ENV{REQUEST_TYPE} = 'GET';
$ENV{QUERY_STRING} = 'as=df';
+
language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'hello' );
<?php
echo $_GET['as'];
@@ -41,3 +42,16 @@
df
END_EXPECTED
+language_output_is( 'Plumhead', <<'END_CODE', <<'END_EXPECTED', 'hello' );
+<?php
+var_dump( $_GET );
+echo "\n";
+?>
+END_CODE
+array(1) {
+ ["as"]=>
+ string(2) "df"
+}
+
+END_EXPECTED
+