KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > daffodilwoods > daffodildb > utils > parser > OptionalProductionRulesWithHashMap


1 package com.daffodilwoods.daffodildb.utils.parser;
2
3 import com.daffodilwoods.database.utility.P;
4
5 public class OptionalProductionRulesWithHashMap extends ProductionRulesWithHashMap{
6
7    public OptionalProductionRulesWithHashMap(ClassLoader JavaDoc classLoader0){
8      super(classLoader0);
9    }
10
11    Object JavaDoc parsePart(ParseElements pe) throws com.daffodilwoods.database.resource.DException {
12       int position = pe.position;
13       ProductionRules object = (ProductionRules)rules[0];
14       Object JavaDoc object1 = object.parse(pe);
15       if(object1 instanceof ParseException)
16          return null;
17
18    /* Done by kaushik :: To Undo -> comment return object1 and enable all lines in dest & dend */
19        /* dest
20             if(checkLookAheadStack(pe))
21                return object1;
22             pe.position = position;
23             return null;
24          dend */

25        return object1;
26    }
27
28    public String JavaDoc toString(){
29       return nameOfRule;
30    }
31 }
32
Popular Tags