2004/01/08 05:32:44
[org.ibex.core.git] / src / org / xwt / js / Parser.java
index 66084e0..ee04b7e 100644 (file)
@@ -319,9 +319,9 @@ class Parser extends Lexer implements ByteCodes {
         if (g != null)
             switch(tok) {
                 case BITOR: return new Grammar.Alternative(g, parseGrammar(null));
-                case ADD:   return new Grammar.Repetition(g, 1, Integer.MAX_VALUE);
-                case MUL:   return new Grammar.Repetition(g, 0, Integer.MAX_VALUE);
-                case HOOK:  return new Grammar.Repetition(g, 0, 1);
+                case ADD:   return parseGrammar(new Grammar.Repetition(g, 1, Integer.MAX_VALUE));
+                case MUL:   return parseGrammar(new Grammar.Repetition(g, 0, Integer.MAX_VALUE));
+                case HOOK:  return parseGrammar(new Grammar.Repetition(g, 0, 1));
             }
         Grammar g0 = null;
         switch(tok) {
@@ -342,7 +342,7 @@ class Parser extends Lexer implements ByteCodes {
             default:     pushBackToken(); return g;
         }
         if (g == null) return parseGrammar(g0);
-        return new Grammar.Juxtaposition(g, g0);
+        return parseGrammar(new Grammar.Juxtaposition(g, g0));
     }
 
     /**