*** empty log message ***
[phpeclipse.git] / net.sourceforge.phpeclipse / src / test / PHPParser.java
index f0ea36f..aba9b11 100644 (file)
@@ -39,8 +39,6 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon
   private static final String PARSE_WARNING_STRING = "Warning"; //$NON-NLS-1$
   static PHPOutlineInfo outlineInfo;
 
-  private static boolean assigning;
-
   /** The error level of the current ParseException. */
   private static int errorLevel = ERROR;
   /** The message of the current ParseException. If it's null it's because the parse exception wasn't handled */
@@ -363,9 +361,11 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon
  */
   static final public void PhpBlock() throws ParseException {
   final int start = SimpleCharStream.getPosition();
+  final PHPEchoBlock phpEchoBlock;
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case PHPECHOSTART:
-      phpEchoBlock();
+      phpEchoBlock = phpEchoBlock();
+   pushOnAstNodes(phpEchoBlock);
       break;
     case PHPSTARTSHORT:
     case PHPSTARTLONG:
@@ -559,7 +559,7 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon
       jj_consume_token(EXTENDS);
       try {
         superclassName = jj_consume_token(IDENTIFIER);
-       superclassNameImage = superclassName .image.toCharArray();
+       superclassNameImage = superclassName.image.toCharArray();
       } catch (ParseException e) {
       errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', identifier expected";
       errorLevel   = ERROR;
@@ -787,7 +787,7 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon
         jj_la1[11] = jj_gen;
         ;
       }
-    if (expression == null && !assigning) {
+    if (expression == null) {
       {if (true) return token.image.substring(1);}
     }
     buff = new StringBuffer(token.image);
@@ -809,6 +809,10 @@ public final class PHPParser extends PHPParserSuperclass implements PHPParserCon
     throw new Error("Missing return statement in function");
   }
 
+/**
+ * A Variable name (without the $)
+ * @return a variable name String
+ */
   static final public String VariableName() throws ParseException {
   final StringBuffer buff;
   String expr = null;
@@ -5030,24 +5034,6 @@ final int startBlock, endBlock;
     return retval;
   }
 
-  static final private boolean jj_3R_77() {
-    if (jj_scan_token(BOOLEAN)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    return false;
-  }
-
-  static final private boolean jj_3R_76() {
-    if (jj_scan_token(BOOL)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    return false;
-  }
-
-  static final private boolean jj_3R_43() {
-    if (jj_3R_52()) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    return false;
-  }
-
   static final private boolean jj_3R_75() {
     if (jj_scan_token(STRING)) return true;
     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
@@ -5955,41 +5941,41 @@ final int startBlock, endBlock;
     return false;
   }
 
-  static final private boolean jj_3R_94() {
-    if (jj_scan_token(DOLLAR_ID)) return true;
+  static final private boolean jj_3R_48() {
+    if (jj_scan_token(CLASSACCESS)) return true;
+    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+    if (jj_3R_59()) return true;
     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    Token xsp;
-    xsp = jj_scanpos;
-    if (jj_3R_98()) jj_scanpos = xsp;
-    else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
     return false;
   }
 
-  static final private boolean jj_3R_61() {
+  static final private boolean jj_3R_40() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_94()) {
+    if (jj_3R_48()) {
     jj_scanpos = xsp;
-    if (jj_3R_95()) return true;
+    if (jj_3R_49()) return true;
     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
     return false;
   }
 
-  static final private boolean jj_3R_48() {
-    if (jj_scan_token(CLASSACCESS)) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    if (jj_3R_59()) return true;
+  static final private boolean jj_3R_94() {
+    if (jj_scan_token(DOLLAR_ID)) return true;
     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+    Token xsp;
+    xsp = jj_scanpos;
+    if (jj_3R_98()) jj_scanpos = xsp;
+    else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
     return false;
   }
 
-  static final private boolean jj_3R_40() {
+  static final private boolean jj_3R_61() {
     Token xsp;
     xsp = jj_scanpos;
-    if (jj_3R_48()) {
+    if (jj_3R_94()) {
     jj_scanpos = xsp;
-    if (jj_3R_49()) return true;
+    if (jj_3R_95()) return true;
     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
     } else if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
     return false;
@@ -6067,12 +6053,6 @@ final int startBlock, endBlock;
     return false;
   }
 
-  static final private boolean jj_3_1() {
-    if (jj_3R_40()) return true;
-    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    return false;
-  }
-
   static final private boolean jj_3R_187() {
     if (jj_3R_50()) return true;
     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
@@ -6108,15 +6088,9 @@ final int startBlock, endBlock;
     return false;
   }
 
-  static final private boolean jj_3R_50() {
-    if (jj_3R_61()) return true;
+  static final private boolean jj_3_1() {
+    if (jj_3R_40()) return true;
     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    Token xsp;
-    while (true) {
-      xsp = jj_scanpos;
-      if (jj_3_1()) { jj_scanpos = xsp; break; }
-      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
-    }
     return false;
   }
 
@@ -6133,6 +6107,18 @@ final int startBlock, endBlock;
     return false;
   }
 
+  static final private boolean jj_3R_50() {
+    if (jj_3R_61()) return true;
+    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+    Token xsp;
+    while (true) {
+      xsp = jj_scanpos;
+      if (jj_3_1()) { jj_scanpos = xsp; break; }
+      if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+    }
+    return false;
+  }
+
   static final private boolean jj_3R_96() {
     if (jj_3R_102()) return true;
     if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
@@ -6584,6 +6570,24 @@ final int startBlock, endBlock;
     return false;
   }
 
+  static final private boolean jj_3R_77() {
+    if (jj_scan_token(BOOLEAN)) return true;
+    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+    return false;
+  }
+
+  static final private boolean jj_3R_76() {
+    if (jj_scan_token(BOOL)) return true;
+    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+    return false;
+  }
+
+  static final private boolean jj_3R_43() {
+    if (jj_3R_52()) return true;
+    if (jj_la == 0 && jj_scanpos == jj_lastpos) return false;
+    return false;
+  }
+
   static private boolean jj_initialized_once = false;
   static public PHPParserTokenManager token_source;
   static SimpleCharStream jj_input_stream;