changed name of Scanner tokens to names similar in the JDT
[phpeclipse.git] / net.sourceforge.phpeclipse / src / test / PHPParser2.jj
index 66fae21..370824c 100644 (file)
@@ -9,7 +9,7 @@ options {
   ERROR_REPORTING = true;
   JAVA_UNICODE_ESCAPE = false;
   UNICODE_INPUT = false;
-  IGNORE_CASE = false;
+  IGNORE_CASE = true;
   USER_TOKEN_MANAGER = false;
   USER_CHAR_STREAM = false;
   BUILD_PARSER = true;
@@ -188,39 +188,21 @@ TOKEN :
   < STRING_LITERAL: (<STRING_1> | <STRING_2> | <STRING_3>)>
 |    < STRING_1:
       "\""
-      (   (~["\"","\\","\n","\r"])
-        | ("\\"
-            ( ["n","t","b","r","f","\\","'","\""]
-            | ["0"-"7"] ( ["0"-"7"] )?
-            | ["0"-"3"] ["0"-"7"] ["0"-"7"]
-            )
-          )
+      (   (~["\""])
+        | "\\\""
       )*
       "\""
     >
 |    < STRING_2:
       "'"
-      (   (~["\"","\\","\n","\r"])
-        | ("\\"
-            ( ["n","t","b","r","f","\\","'","\""]
-            | ["0"-"7"] ( ["0"-"7"] )?
-            | ["0"-"3"] ["0"-"7"] ["0"-"7"]
-            )
-          )
-      )*
+      (   (~["'"]))*
+
       "'"
     >
 |   < STRING_3:
       "`"
-      (   (~["\"","\\","\n","\r"])
-        | ("\\"
-            ( ["n","t","b","r","f","\\","'","\""]
-            | ["0"-"7"] ( ["0"-"7"] )?
-            | ["0"-"3"] ["0"-"7"] ["0"-"7"]
-            )
-          )
-      )*
-      ""
+      (   (~["`"]))*
+      "`"
     >
 }
 
@@ -361,7 +343,9 @@ void VariableName():
 {
   "this"
 |
-  <IDENTIFIER>
+  "{" Expression() "}"
+|
+  <IDENTIFIER> ("{" Expression() "}") *
 |
   "$" VariableName()
 }
@@ -709,6 +693,8 @@ void Statement() :
   EchoStatement()
 |
   StaticStatement()
+|
+  GlobalStatement()
 }
 
 void EchoStatement() :
@@ -824,6 +810,14 @@ void WhileStatement() :
   "while" "(" Expression() ")" Statement()
 }
 
+void WhileStatement0() :
+{}
+{
+  ":" Statement() "endwhile;"
+|
+  Statement()
+}
+
 void DoStatement() :
 {}
 {