From: <jen...@us...> - 2010-09-21 10:53:20
|
Revision: 2318 http://dl-learner.svn.sourceforge.net/dl-learner/?rev=2318&view=rev Author: jenslehmann Date: 2010-09-21 10:53:10 +0000 (Tue, 21 Sep 2010) Log Message: ----------- - extracted gui and cli out of components-core - some code has been moved to interfaces - warning: some compile errors remaining Modified Paths: -------------- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java trunk/components-core/src/main/java/org/dllearner/utilities/JamonMonitorLogger.java trunk/sparql-query-generator/.settings/org.eclipse.jdt.core.prefs trunk/sparql-query-generator/.settings/org.maven.ide.eclipse.prefs Added Paths: ----------- trunk/interfaces/src/main/java/org/dllearner/cli/DocumentationGenerator.java trunk/interfaces/src/main/java/org/dllearner/confparser/ trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParser.java trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserConstants.java trunk/interfaces/src/main/java/org/dllearner/confparser/ConfParserTokenManager.java trunk/interfaces/src/main/java/org/dllearner/confparser/conf.jj trunk/interfaces/src/test/java/org/dllearner/test/ trunk/interfaces/src/test/java/org/dllearner/test/junit/ trunk/interfaces/src/test/java/org/dllearner/test/junit/ExampleTests.java trunk/interfaces/src/test/java/org/dllearner/test/junit/OWLlinkTest.java trunk/interfaces/src/test/java/org/dllearner/test/junit/ReasonerTests.java Removed Paths: ------------- trunk/components-core/src/main/java/org/dllearner/cli/ trunk/components-core/src/main/java/org/dllearner/gui/ trunk/components-core/src/main/java/org/dllearner/parser/ConfParser.java trunk/components-core/src/main/java/org/dllearner/parser/ConfParserConstants.java trunk/components-core/src/main/java/org/dllearner/parser/ConfParserTokenManager.java trunk/components-core/src/main/java/org/dllearner/parser/conf.jj trunk/components-core/src/main/java/org/dllearner/test/junit/ExampleTests.java trunk/components-core/src/main/java/org/dllearner/test/junit/OWLlinkTest.java trunk/components-core/src/main/java/org/dllearner/test/junit/ReasonerTests.java trunk/interfaces/src/test/java/org/dllearner/junit/ Modified: trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/main/java/org/dllearner/core/ComponentManager.java 2010-09-21 10:53:10 UTC (rev 2318) @@ -21,7 +21,6 @@ import java.io.BufferedReader; import java.io.DataInputStream; -import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; @@ -43,12 +42,9 @@ import java.util.Map.Entry; import org.apache.log4j.Logger; -import org.dllearner.cli.ConfMapper; import org.dllearner.core.options.ConfigEntry; import org.dllearner.core.options.ConfigOption; import org.dllearner.core.options.InvalidConfigOptionValueException; -import org.dllearner.kb.sparql.SparqlKnowledgeSource; -import org.dllearner.utilities.Files; import org.dllearner.utilities.datastructures.Maps; /** @@ -118,8 +114,6 @@ private static Map<Class<? extends LearningAlgorithm>, Collection<Class<? extends LearningProblem>>> algorithmProblemsMapping; private static Map<Class<? extends LearningProblem>, Collection<Class<? extends LearningAlgorithm>>> problemAlgorithmsMapping; - private ConfMapper confMapper = new ConfMapper(); - // list of default values of config options // private static Map<ConfigOption<?>,Object> configOptionDefaults; @@ -540,79 +534,6 @@ return getConfigOptionValue(component, option); } - /** - * Writes documentation for all components available in this - * <code>ComponentManager</code> instance. It goes through - * all components (sorted by their type) and all the configuration - * options of the components. Explanations, default values, allowed - * values for the options are collected and the obtained string is - * written in a file. - * @param file The documentation file. - */ - public void writeConfigDocumentation(File file) { - String doc = ""; - doc += "This file contains an automatically generated files of all components and their config options.\n\n"; - - // go through all types of components and write down their documentation - doc += "*********************\n"; - doc += "* Knowledge Sources *\n"; - doc += "*********************\n\n"; - doc += "BEGIN MANUAL PART\n"; - doc += "END MANUAL PART\n\n"; - for(Class<? extends Component> component : knowledgeSources) { - if(component != SparqlKnowledgeSource.class){continue;} - doc += getComponentConfigString(component, KnowledgeSource.class); - } - - doc += "*************\n"; - doc += "* Reasoners *\n"; - doc += "*************\n\n"; - for(Class<? extends Component> component : reasonerComponents) { - doc += getComponentConfigString(component, ReasonerComponent.class); - } - - doc += "*********************\n"; - doc += "* Learning Problems *\n"; - doc += "*********************\n\n"; - for(Class<? extends Component> component : learningProblems) { - doc += getComponentConfigString(component, LearningProblem.class); - } - - doc += "***********************\n"; - doc += "* Learning Algorithms *\n"; - doc += "***********************\n\n"; - for(Class<? extends Component> component : learningAlgorithms) { - doc += getComponentConfigString(component, LearningAlgorithm.class); - } - - Files.createFile(file, doc); - } - - private String getComponentConfigString(Class<? extends Component> component, Class<? extends Component> componentType) { - String componentDescription = "component: " + invokeStaticMethod(component, "getName") + " (" + component.getName() + ")"; - String str = componentDescription + "\n"; - String cli = confMapper.getComponentTypeString(componentType); - String usage = confMapper.getComponentString(component); - - for(int i=0; i<componentDescription.length(); i++) { - str += "="; - } - str += "\n\n"; - if (componentType.equals(KnowledgeSource.class)){ - str += "conf file usage: "+cli+" (\"$url\", \""+usage.toUpperCase()+"\");\n\n"; - }else{ - str += "conf file usage: "+cli+" = "+usage+";\n\n"; - } - - for(ConfigOption<?> option : componentOptions.get(component)) { - String val = (option.getDefaultValue()==null)?"":option.getDefaultValue()+""; - str += option.toString() + - "conf file usage: "+usage+"." - + option.getName()+" = "+val+";\n\n"; - } - return str+"\n"; - } - // convenience method for invoking a static method; // used as a central point for exception handling for Java reflection // static method calls Deleted: trunk/components-core/src/main/java/org/dllearner/parser/ConfParser.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/ConfParser.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/main/java/org/dllearner/parser/ConfParser.java 2010-09-21 10:53:10 UTC (rev 2318) @@ -1,1050 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ConfParser.java */ -package org.dllearner.parser; - -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -import java.util.Map; -import java.util.Set; -import java.util.HashSet; -import java.util.SortedSet; -import java.util.TreeSet; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; - -import org.dllearner.Info; - -import org.dllearner.cli.*; -import org.dllearner.utilities.datastructures.*; - -@SuppressWarnings("all") -public class ConfParser implements ConfParserConstants { - - // examples - private SortedSet<String> positiveExamples = new TreeSet<String>(); - private SortedSet<String> negativeExamples = new TreeSet<String>(); - - // conf file options - private List<ConfFileOption> confOptions = new LinkedList<ConfFileOption>(); - private Map<String,ConfFileOption> confOptionsByName = new HashMap<String,ConfFileOption>(); - private Map<String,List<ConfFileOption>> confOptionsByPrefix = new HashMap<String,List<ConfFileOption>>(); - - // Funktionsaufrufe (die gleiche Funktion darf mehrmals mit unterschiedlichen - // Argumenten aufgerufen werden) - // private static Map<String,Set<String>> functionCallsAlt = new TreeMap<String,Set<String>>(); - // jeder Funktionsaufruf hat eine Liste von n Argumenten; alle Funktionsaufrufe - // werden in einer Liste gespeichert - // private List<List<String>> functionCalls = new LinkedList<List<String>>(); - // => irgendwie Funktionsname + Argumente speichern - // => d.h. man bräuchte für jede Funktion so eine Liste oder das erste Element - // der Liste ist der Funktionsname <= ist noch die praktikabelste Variante - - private Map<String,List<List<String>>> functionCalls = new HashMap<String,List<List<String>>>(); - - private void addFunctionCall(String name, List<String> arguments) { - if(functionCalls.containsKey(name)) - functionCalls.get(name).add(arguments); - else { - List<List<String>> calls = new LinkedList<List<String>>(); - calls.add(arguments); - functionCalls.put(name,calls); - } - } - - private void addConfOption(ConfFileOption confOption) { - confOptions.add(confOption); - confOptionsByName.put(confOption.getFullName(), confOption); - String prefix = confOption.getOption(); - if(confOptionsByPrefix.containsKey(prefix)) - confOptionsByPrefix.get(prefix).add(confOption); - else { - LinkedList<ConfFileOption> optionList = new LinkedList<ConfFileOption>(); - optionList.add(confOption); - confOptionsByPrefix.put(prefix,optionList); - } - } - - public SortedSet<String> getPositiveExamples() { - return positiveExamples; - } - - public SortedSet<String> getNegativeExamples() { - return negativeExamples; - } - - public List<ConfFileOption> getConfOptions() { - return confOptions; - } - - public Map<String,ConfFileOption> getConfOptionsByName() { - return confOptionsByName; - } - - public ConfFileOption getConfOptionsByName(String name) { - return confOptionsByName.get(name); - } - - public Map<String,List<ConfFileOption>> getConfOptionsByPrefix() { - return confOptionsByPrefix; - } - - public List<ConfFileOption> getConfOptionsByPrefix(String prefix) { - return confOptionsByPrefix.get(prefix); - } - - public Map<String,List<List<String>>> getFunctionCalls() { - return functionCalls; - } - - /* - private static void addFunctionCall(String functionName, String argument) { - if(functionCalls.containsKey(functionName)) { - functionCalls.get(functionName).add(argument); - } else { - Set<String> newFunction = new TreeSet<String>(); - newFunction.add(argument); - functionCalls.put(functionName,newFunction); - } - } - */ - - - /* - public static SimpleNode parseString(String str) throws ParseException { - StringReader sr = new StringReader(str); - DLLearner learner = new DLLearner(sr); - SimpleNode n = learner.Start(); - return n; - } - */ - - public static ConfParser parseFile(File filename) throws FileNotFoundException, ParseException { - ConfParser learner = null; -// try { - learner = new ConfParser(new FileInputStream(filename)); - learner.Start(); -// } catch(FileNotFoundException e) { -// e.printStackTrace(); -// } catch(ParseException e) { -// e.printStackTrace(); -// } - return learner; - } - - public static void main(String args[]) { - - if(args.length==0) { - System.out.println("Please specify an input file."); - System.exit(0); - } - - System.out.println("Starting DL-Learner (Build " + Info.build + ")"); - // System.out.println(args); - - // System.out.println(args[0]); - // System.out.println(args[1]); - // System.out.println(args.length); - - File f = new File(args[args.length-1]); -// String baseDir = ""; - - System.out.print("Parsing " + f.getName() + " ... "); - long parseStartTime = System.currentTimeMillis(); - - // SimpleNode n = null; - ConfParser learner = null; - try { - learner = new ConfParser(new FileInputStream(args[args.length-1])); -// baseDir = f.getParentFile().getPath(); - } catch(IOException e) { - System.err.println(e); - System.exit(0); - } - try { - learner.Start(); - // n.dump(""); - // System.out.println("Thank you."); - } catch (Exception e) { - System.out.println("\u005cnParse exception occurred. Please follow the advise given below."); - System.out.println(e.getMessage()); - e.printStackTrace(); - System.exit(0); - } - - long parseDuration = System.currentTimeMillis() - parseStartTime; - System.out.println("OK (" + parseDuration + " ms)"); - -// boolean queryMode = false; - // solution test mode wird nicht unbedingt gebraucht, da man die covers - // gleich standardmäßig beim query mit anzeigen kann - // boolean solutionTestMode = false; - -// if(args.length>1 && args[0].equals("-q")) -// queryMode = true; - - //if(args.length>1 && args[0].equals("-qt")) { - // queryMode = true; - // solutionTestMode = true; - //} - - // new Main(n, baseDir, queryMode); - // Parser erstmal Standalone testen - // n.dump(""); - - // neuer Aufruf des Hauptprogramms - // TODO: remove (in the future, the parser will be called from whatever method - // needs it, instead of starting the learning process itself) - // new Main(kb,positiveExamples,negativeExamples,confOptions,functionCalls,baseDir,queryMode); - } - - final public void Start() throws ParseException { - ConfFileOption confOption; - label_1: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case POS_EX: - case NEG_EX: - case ID: - ; - break; - default: - jj_la1[0] = jj_gen; - break label_1; - } - if (jj_2_1(2147483647)) { - confOption = ConfOption(); - addConfOption(confOption); - } else if (jj_2_2(2147483647)) { - FunctionCall(); - } else if (jj_2_3(2147483647)) { - PosExample(); - } else if (jj_2_4(2147483647)) { - NegExample(); - } else { - jj_consume_token(-1); - throw new ParseException(); - } - } - jj_consume_token(0); - } - - final public ConfFileOption ConfOption() throws ParseException { - boolean containsSubOption=false, isNumeric=false, isDouble=false, isSet=false, isList=false; - String option="", subOption="", value="", tmp="", tmp2=""; - int number = 0; - double numberDouble = 0; - ConfFileOption confOption; - Set<String> values = new HashSet<String>(); - List<StringTuple> tuples = new LinkedList<StringTuple>(); - option = Id(); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case COMMAND_END: - jj_consume_token(COMMAND_END); - subOption = Id(); - containsSubOption=true; - break; - default: - jj_la1[1] = jj_gen; - ; - } - jj_consume_token(25); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - value = Id(); - break; - case STRING: - value = String(); - break; - case NUMBER: - number = Integer(); - isNumeric=true; - break; - case DOUBLE: - numberDouble = Double(); - isNumeric=true; isDouble=true; - break; - default: - jj_la1[8] = jj_gen; - if (jj_2_7(2147483647)) { - jj_consume_token(26); - jj_consume_token(31); - isSet=true; - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 26: - jj_consume_token(26); - label_2: - while (true) { - if (jj_2_5(2)) { - ; - } else { - break label_2; - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp = String(); - break; - case ID: - tmp = Id(); - break; - default: - jj_la1[2] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - values.add(tmp); - jj_consume_token(29); - } - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp = String(); - break; - case ID: - tmp = Id(); - break; - default: - jj_la1[3] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - values.add(tmp); - jj_consume_token(31); - isSet=true; - break; - default: - jj_la1[9] = jj_gen; - if (jj_2_8(2147483647)) { - jj_consume_token(27); - jj_consume_token(32); - isList=true; - } else { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 27: - jj_consume_token(27); - label_3: - while (true) { - if (jj_2_6(6)) { - ; - } else { - break label_3; - } - jj_consume_token(28); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp = String(); - break; - case ID: - tmp = Id(); - break; - default: - jj_la1[4] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(29); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp2 = String(); - break; - case ID: - tmp2 = Id(); - break; - default: - jj_la1[5] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(30); - tuples.add(new StringTuple(tmp,tmp2)); - jj_consume_token(29); - } - jj_consume_token(28); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp = String(); - break; - case ID: - tmp = Id(); - break; - default: - jj_la1[6] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(29); - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case STRING: - tmp2 = String(); - break; - case ID: - tmp2 = Id(); - break; - default: - jj_la1[7] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(30); - tuples.add(new StringTuple(tmp,tmp2)); - jj_consume_token(32); - isList=true; - break; - default: - jj_la1[10] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - } - } - } - } - jj_consume_token(CONF_END); - if(containsSubOption) { - if(isNumeric) - if(isDouble) - confOption = new ConfFileOption(option,subOption,numberDouble); - else - confOption = new ConfFileOption(option,subOption,number); - else - if(isSet) - confOption = new ConfFileOption(option,subOption,values); - else if(isList) - confOption = new ConfFileOption(option,subOption,tuples); - else - confOption = new ConfFileOption(option,subOption,value); - } else { - if(isNumeric) - if(isDouble) - confOption = new ConfFileOption(option,numberDouble); - else - confOption = new ConfFileOption(option,number); - else - if(isSet) - confOption = new ConfFileOption(option,values); - else if(isList) - confOption = new ConfFileOption(option,tuples); - else - confOption = new ConfFileOption(option,value); - } - {if (true) return confOption;} - // confOptions.add(confOption); - - throw new Error("Missing return statement in function"); - } - - final public void FunctionCall() throws ParseException { - String s, s1, s2; - List<String> list = new LinkedList<String>(); - s1 = Id(); - jj_consume_token(28); - s2 = String(); - list.add(s2); - label_4: - while (true) { - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case 29: - ; - break; - default: - jj_la1[11] = jj_gen; - break label_4; - } - jj_consume_token(29); - s = String(); - list.add(s); - } - jj_consume_token(30); - jj_consume_token(CONF_END); - addFunctionCall(s1,list); - } - - final public void PosExample() throws ParseException { - String i; - jj_consume_token(POS_EX); - i = Individual(); - positiveExamples.add(i); - } - - final public void NegExample() throws ParseException { - String i; - jj_consume_token(NEG_EX); - i = Individual(); - negativeExamples.add(i); - } - - final public String Individual() throws ParseException { - String name; - switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { - case ID: - name = Id(); - break; - case STRING: - name = String(); - break; - default: - jj_la1[12] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - {if (true) return KBParser.getInternalURI(name);} - throw new Error("Missing return statement in function"); - } - - final public String Id() throws ParseException { - Token t; - t = jj_consume_token(ID); - {if (true) return t.image;} - throw new Error("Missing return statement in function"); - } - - final public double Double() throws ParseException { - Token t; - t = jj_consume_token(DOUBLE); - {if (true) return new Double(t.image);} - throw new Error("Missing return statement in function"); - } - - final public int Integer() throws ParseException { - Token t; - t = jj_consume_token(NUMBER); - {if (true) return new Integer(t.image);} - throw new Error("Missing return statement in function"); - } - - final public String String() throws ParseException { - Token t; - String s; - t = jj_consume_token(STRING); - // enclosing "" are removed - s = t.image; - s = s.substring(1, s.length() - 1); - {if (true) return s;} - throw new Error("Missing return statement in function"); - } - - private boolean jj_2_1(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_1(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(0, xla); } - } - - private boolean jj_2_2(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_2(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(1, xla); } - } - - private boolean jj_2_3(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_3(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(2, xla); } - } - - private boolean jj_2_4(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_4(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(3, xla); } - } - - private boolean jj_2_5(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_5(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(4, xla); } - } - - private boolean jj_2_6(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_6(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(5, xla); } - } - - private boolean jj_2_7(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_7(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(6, xla); } - } - - private boolean jj_2_8(int xla) { - jj_la = xla; jj_lastpos = jj_scanpos = token; - try { return !jj_3_8(); } - catch(LookaheadSuccess ls) { return true; } - finally { jj_save(7, xla); } - } - - private boolean jj_3R_11() { - if (jj_scan_token(STRING)) return true; - return false; - } - - private boolean jj_3_8() { - if (jj_scan_token(27)) return true; - if (jj_scan_token(32)) return true; - return false; - } - - private boolean jj_3R_7() { - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3_7() { - if (jj_scan_token(26)) return true; - if (jj_scan_token(31)) return true; - return false; - } - - private boolean jj_3R_12() { - if (jj_scan_token(29)) return true; - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3R_17() { - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3_6() { - if (jj_scan_token(28)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_15()) { - jj_scanpos = xsp; - if (jj_3R_16()) return true; - } - if (jj_scan_token(29)) return true; - xsp = jj_scanpos; - if (jj_3R_17()) { - jj_scanpos = xsp; - if (jj_3R_18()) return true; - } - if (jj_scan_token(30)) return true; - if (jj_scan_token(29)) return true; - return false; - } - - private boolean jj_3_5() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_13()) { - jj_scanpos = xsp; - if (jj_3R_14()) return true; - } - if (jj_scan_token(29)) return true; - return false; - } - - private boolean jj_3R_19() { - if (jj_scan_token(NUMBER)) return true; - return false; - } - - private boolean jj_3R_10() { - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3R_6() { - if (jj_scan_token(COMMAND_END)) return true; - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3R_16() { - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3_4() { - if (jj_scan_token(NEG_EX)) return true; - return false; - } - - private boolean jj_3_3() { - if (jj_scan_token(POS_EX)) return true; - return false; - } - - private boolean jj_3R_20() { - if (jj_scan_token(DOUBLE)) return true; - return false; - } - - private boolean jj_3_2() { - if (jj_3R_5()) return true; - if (jj_scan_token(28)) return true; - if (jj_3R_11()) return true; - Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_12()) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(30)) return true; - if (jj_scan_token(CONF_END)) return true; - return false; - } - - private boolean jj_3R_14() { - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3_1() { - if (jj_3R_5()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_6()) jj_scanpos = xsp; - if (jj_scan_token(25)) return true; - xsp = jj_scanpos; - if (jj_3R_7()) { - jj_scanpos = xsp; - if (jj_3R_8()) { - jj_scanpos = xsp; - if (jj_3R_9()) { - jj_scanpos = xsp; - if (jj_3R_10()) { - jj_scanpos = xsp; - if (jj_scan_token(26)) { - jj_scanpos = xsp; - if (jj_scan_token(27)) return true; - } - } - } - } - } - return false; - } - - private boolean jj_3R_9() { - if (jj_3R_20()) return true; - return false; - } - - private boolean jj_3R_5() { - if (jj_scan_token(ID)) return true; - return false; - } - - private boolean jj_3R_15() { - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3R_18() { - if (jj_3R_5()) return true; - return false; - } - - private boolean jj_3R_13() { - if (jj_3R_11()) return true; - return false; - } - - private boolean jj_3R_8() { - if (jj_3R_19()) return true; - return false; - } - - /** Generated Token Manager. */ - public ConfParserTokenManager token_source; - SimpleCharStream jj_input_stream; - /** Current token. */ - public Token token; - /** Next token. */ - public Token jj_nt; - private int jj_ntk; - private Token jj_scanpos, jj_lastpos; - private int jj_la; - private int jj_gen; - final private int[] jj_la1 = new int[13]; - static private int[] jj_la1_0; - static private int[] jj_la1_1; - static { - jj_la1_init_0(); - jj_la1_init_1(); - } - private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0x1c00,0x100,0x1001000,0x1001000,0x1001000,0x1001000,0x1001000,0x1001000,0x1007000,0x4000000,0x8000000,0x20000000,0x1001000,}; - } - private static void jj_la1_init_1() { - jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; - } - final private JJCalls[] jj_2_rtns = new JJCalls[8]; - private boolean jj_rescan = false; - private int jj_gc = 0; - - /** Constructor with InputStream. */ - public ConfParser(java.io.InputStream stream) { - this(stream, null); - } - /** Constructor with InputStream and supplied encoding */ - public ConfParser(java.io.InputStream stream, String encoding) { - try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source = new ConfParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Reinitialise. */ - public void ReInit(java.io.InputStream stream) { - ReInit(stream, null); - } - /** Reinitialise. */ - public void ReInit(java.io.InputStream stream, String encoding) { - try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); } - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Constructor. */ - public ConfParser(java.io.Reader stream) { - jj_input_stream = new SimpleCharStream(stream, 1, 1); - token_source = new ConfParserTokenManager(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Reinitialise. */ - public void ReInit(java.io.Reader stream) { - jj_input_stream.ReInit(stream, 1, 1); - token_source.ReInit(jj_input_stream); - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Constructor with generated Token Manager. */ - public ConfParser(ConfParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - /** Reinitialise. */ - public void ReInit(ConfParserTokenManager tm) { - token_source = tm; - token = new Token(); - jj_ntk = -1; - jj_gen = 0; - for (int i = 0; i < 13; i++) jj_la1[i] = -1; - for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); - } - - private Token jj_consume_token(int kind) throws ParseException { - Token oldToken; - if ((oldToken = token).next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - if (token.kind == kind) { - jj_gen++; - if (++jj_gc > 100) { - jj_gc = 0; - for (int i = 0; i < jj_2_rtns.length; i++) { - JJCalls c = jj_2_rtns[i]; - while (c != null) { - if (c.gen < jj_gen) c.first = null; - c = c.next; - } - } - } - return token; - } - token = oldToken; - jj_kind = kind; - throw generateParseException(); - } - - static private final class LookaheadSuccess extends java.lang.Error { } - final private LookaheadSuccess jj_ls = new LookaheadSuccess(); - private boolean jj_scan_token(int kind) { - if (jj_scanpos == jj_lastpos) { - jj_la--; - if (jj_scanpos.next == null) { - jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken(); - } else { - jj_lastpos = jj_scanpos = jj_scanpos.next; - } - } else { - jj_scanpos = jj_scanpos.next; - } - if (jj_rescan) { - int i = 0; Token tok = token; - while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; } - if (tok != null) jj_add_error_token(kind, i); - } - if (jj_scanpos.kind != kind) return true; - if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls; - return false; - } - - -/** Get the next Token. */ - final public Token getNextToken() { - if (token.next != null) token = token.next; - else token = token.next = token_source.getNextToken(); - jj_ntk = -1; - jj_gen++; - return token; - } - -/** Get the specific Token. */ - final public Token getToken(int index) { - Token t = token; - for (int i = 0; i < index; i++) { - if (t.next != null) t = t.next; - else t = t.next = token_source.getNextToken(); - } - return t; - } - - private int jj_ntk() { - if ((jj_nt=token.next) == null) - return (jj_ntk = (token.next=token_source.getNextToken()).kind); - else - return (jj_ntk = jj_nt.kind); - } - - private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>(); - private int[] jj_expentry; - private int jj_kind = -1; - private int[] jj_lasttokens = new int[100]; - private int jj_endpos; - - private void jj_add_error_token(int kind, int pos) { - if (pos >= 100) return; - if (pos == jj_endpos + 1) { - jj_lasttokens[jj_endpos++] = kind; - } else if (jj_endpos != 0) { - jj_expentry = new int[jj_endpos]; - for (int i = 0; i < jj_endpos; i++) { - jj_expentry[i] = jj_lasttokens[i]; - } - jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) { - int[] oldentry = (int[])(it.next()); - if (oldentry.length == jj_expentry.length) { - for (int i = 0; i < jj_expentry.length; i++) { - if (oldentry[i] != jj_expentry[i]) { - continue jj_entries_loop; - } - } - jj_expentries.add(jj_expentry); - break jj_entries_loop; - } - } - if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind; - } - } - - /** Generate ParseException. */ - public ParseException generateParseException() { - jj_expentries.clear(); - boolean[] la1tokens = new boolean[33]; - if (jj_kind >= 0) { - la1tokens[jj_kind] = true; - jj_kind = -1; - } - for (int i = 0; i < 13; i++) { - if (jj_la1[i] == jj_gen) { - for (int j = 0; j < 32; j++) { - if ((jj_la1_0[i] & (1<<j)) != 0) { - la1tokens[j] = true; - } - if ((jj_la1_1[i] & (1<<j)) != 0) { - la1tokens[32+j] = true; - } - } - } - } - for (int i = 0; i < 33; i++) { - if (la1tokens[i]) { - jj_expentry = new int[1]; - jj_expentry[0] = i; - jj_expentries.add(jj_expentry); - } - } - jj_endpos = 0; - jj_rescan_token(); - jj_add_error_token(0, 0); - int[][] exptokseq = new int[jj_expentries.size()][]; - for (int i = 0; i < jj_expentries.size(); i++) { - exptokseq[i] = jj_expentries.get(i); - } - return new ParseException(token, exptokseq, tokenImage); - } - - /** Enable tracing. */ - final public void enable_tracing() { - } - - /** Disable tracing. */ - final public void disable_tracing() { - } - - private void jj_rescan_token() { - jj_rescan = true; - for (int i = 0; i < 8; i++) { - try { - JJCalls p = jj_2_rtns[i]; - do { - if (p.gen > jj_gen) { - jj_la = p.arg; jj_lastpos = jj_scanpos = p.first; - switch (i) { - case 0: jj_3_1(); break; - case 1: jj_3_2(); break; - case 2: jj_3_3(); break; - case 3: jj_3_4(); break; - case 4: jj_3_5(); break; - case 5: jj_3_6(); break; - case 6: jj_3_7(); break; - case 7: jj_3_8(); break; - } - } - p = p.next; - } while (p != null); - } catch(LookaheadSuccess ls) { } - } - jj_rescan = false; - } - - private void jj_save(int index, int xla) { - JJCalls p = jj_2_rtns[index]; - while (p.gen > jj_gen) { - if (p.next == null) { p = p.next = new JJCalls(); break; } - p = p.next; - } - p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla; - } - - static final class JJCalls { - int gen; - Token first; - int arg; - JJCalls next; - } - -} Deleted: trunk/components-core/src/main/java/org/dllearner/parser/ConfParserConstants.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/ConfParserConstants.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/main/java/org/dllearner/parser/ConfParserConstants.java 2010-09-21 10:53:10 UTC (rev 2318) @@ -1,95 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ConfParserConstants.java */ -package org.dllearner.parser; - - -/** - * Token literal values and constants. - * Generated by org.javacc.parser.OtherFilesGen#start() - */ -@SuppressWarnings("all") -public interface ConfParserConstants { - - /** End of File. */ - int EOF = 0; - /** RegularExpression Id. */ - int SINGLE_LINE_COMMENT = 5; - /** RegularExpression Id. */ - int FORMAL_COMMENT = 6; - /** RegularExpression Id. */ - int MULTI_LINE_COMMENT = 7; - /** RegularExpression Id. */ - int COMMAND_END = 8; - /** RegularExpression Id. */ - int CONF_END = 9; - /** RegularExpression Id. */ - int POS_EX = 10; - /** RegularExpression Id. */ - int NEG_EX = 11; - /** RegularExpression Id. */ - int ID = 12; - /** RegularExpression Id. */ - int NUMBER = 13; - /** RegularExpression Id. */ - int DOUBLE = 14; - /** RegularExpression Id. */ - int TOP = 15; - /** RegularExpression Id. */ - int BOTTOM = 16; - /** RegularExpression Id. */ - int AND = 17; - /** RegularExpression Id. */ - int OR = 18; - /** RegularExpression Id. */ - int EXISTS = 19; - /** RegularExpression Id. */ - int ALL = 20; - /** RegularExpression Id. */ - int NOT = 21; - /** RegularExpression Id. */ - int GE = 22; - /** RegularExpression Id. */ - int LE = 23; - /** RegularExpression Id. */ - int STRING = 24; - - /** Lexical state. */ - int DEFAULT = 0; - - /** Literal token values. */ - String[] tokenImage = { - "<EOF>", - "\" \"", - "\"\\t\"", - "\"\\n\"", - "\"\\r\"", - "<SINGLE_LINE_COMMENT>", - "<FORMAL_COMMENT>", - "<MULTI_LINE_COMMENT>", - "\".\"", - "\";\"", - "\"+\"", - "\"-\"", - "<ID>", - "<NUMBER>", - "<DOUBLE>", - "\"TOP\"", - "\"BOTTOM\"", - "\"AND\"", - "\"OR\"", - "<EXISTS>", - "<ALL>", - "<NOT>", - "\">=\"", - "\"<=\"", - "<STRING>", - "\"=\"", - "\"{\"", - "\"[\"", - "\"(\"", - "\",\"", - "\")\"", - "\"}\"", - "\"]\"", - }; - -} Deleted: trunk/components-core/src/main/java/org/dllearner/parser/ConfParserTokenManager.java =================================================================== --- trunk/components-core/src/main/java/org/dllearner/parser/ConfParserTokenManager.java 2010-09-17 19:15:29 UTC (rev 2317) +++ trunk/components-core/src/main/java/org/dllearner/parser/ConfParserTokenManager.java 2010-09-21 10:53:10 UTC (rev 2318) @@ -1,772 +0,0 @@ -/* Generated By:JavaCC: Do not edit this line. ConfParserTokenManager.java */ -package org.dllearner.parser; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -import java.util.Map; -import java.util.Set; -import java.util.HashSet; -import java.util.SortedSet; -import java.util.TreeSet; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import org.dllearner.Info; -import org.dllearner.cli.*; -import org.dllearner.utilities.datastructures.*; - -/** Token Manager. */ -@SuppressWarnings("all") -public class ConfParserTokenManager implements ConfParserConstants -{ - - /** Debug output. */ - public java.io.PrintStream debugStream = System.out; - /** Set debug output. */ - public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_0(int pos, long active0) -{ - switch (pos) - { - case 0: - if ((active0 & 0x20000L) != 0L) - return 13; - return -1; - default : - return -1; - } -} -private final int jjStartNfa_0(int pos, long active0) -{ - return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1); -} -private int jjStopAtPos(int pos, int kind) -{ - jjmatchedKind = kind; - jjmatchedPos = pos; - return pos + 1; -} -private int jjMoveStringLiteralDfa0_0() -{ - switch(curChar) - { - case 40: - return jjStopAtPos(0, 28); - case 41: - return jjStopAtPos(0, 30); - case 43: - return jjStopAtPos(0, 10); - case 44: - return jjStopAtPos(0, 29); - case 45: - return jjStopAtPos(0, 11); - case 46: - return jjStopAtPos(0, 8); - case 59: - return jjStopAtPos(0, 9); - case 60: - return jjMoveStringLiteralDfa1_0(0x800000L); - case 61: - return jjStopAtPos(0, 25); - case 62: - return jjMoveStringLiteralDfa1_0(0x400000L); - case 65: - return jjMoveStringLiteralDfa1_0(0x20000L); - case 66: - return jjMoveStringLiteralDfa1_0(0x10000L); - case 79: - return jjMoveStringLiteralDfa1_0(0x40000L); - case 84: - return jjMoveStringLiteralDfa1_0(0x8000L); - case 91: - return jjStopAtPos(0, 27); - case 93: - return jjStopAtPos(0, 32); - case 123: - return jjStopAtPos(0, 26); - case 125: - return jjStopAtPos(0, 31); - default : - return jjMoveNfa_0(0, 0); - } -} -private int jjMoveStringLiteralDfa1_0(long active0) -{ - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(0, active0); - return 1; - } - switch(curChar) - { - case 61: - if ((active0 & 0x400000L) != 0L) - return jjStopAtPos(1, 22); - else if ((active0 & 0x800000L) != 0L) - return jjStopAtPos(1, 23); - break; - case 78: - return jjMoveStringLiteralDfa2_0(active0, 0x20000L); - case 79: - return jjMoveStringLiteralDfa2_0(active0, 0x18000L); - case 82: - if ((active0 & 0x40000L) != 0L) - return jjStopAtPos(1, 18); - break; - default : - break; - } - return jjStartNfa_0(0, active0); -} -private int jjMoveStringLiteralDfa2_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(0, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(1, active0); - return 2; - } - switch(curChar) - { - case 68: - if ((active0 & 0x20000L) != 0L) - return jjStopAtPos(2, 17); - break; - case 80: - if ((active0 & 0x8000L) != 0L) - return jjStopAtPos(2, 15); - break; - case 84: - return jjMoveStringLiteralDfa3_0(active0, 0x10000L); - default : - break; - } - return jjStartNfa_0(1, active0); -} -private int jjMoveStringLiteralDfa3_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(1, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(2, active0); - return 3; - } - switch(curChar) - { - case 84: - return jjMoveStringLiteralDfa4_0(active0, 0x10000L); - default : - break; - } - return jjStartNfa_0(2, active0); -} -private int jjMoveStringLiteralDfa4_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(2, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(3, active0); - return 4; - } - switch(curChar) - { - case 79: - return jjMoveStringLiteralDfa5_0(active0, 0x10000L); - default : - break; - } - return jjStartNfa_0(3, active0); -} -private int jjMoveStringLiteralDfa5_0(long old0, long active0) -{ - if (((active0 &= old0)) == 0L) - return jjStartNfa_0(3, old0); - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { - jjStopStringLiteralDfa_0(4, active0); - return 5; - } - switch(curChar) - { - case 77: - if ((active0 & 0x10000L) != 0L) - return jjStopAtPos(5, 16); - break; - default : - break; - } - return jjStartNfa_0(4, active0); -} -static final long[] jjbitVec0 = { - 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL -}; -private int jjMoveNfa_0(int startState, int curPos) -{ - int startsAt = 0; - jjnewStateCnt = 53; - int i = 1; - jjstateSet[0] = startState; - int kind = 0x7fffffff; - for (;;) - { - if (++jjround == 0x7fffffff) - ReInitRounds(); - if (curChar < 64) - { - long l = 1L << curChar; - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0x3fe000000000000L & l) != 0L) - { - if (kind > 13) - kind = 13; - jjCheckNAddStates(0, 2); - } - else if (curChar == 48) - { - if (kind > 13) - kind = 13; - jjCheckNAdd(50); - } - else if (curChar == 47) - jjAddStates(3, 5); - else if (curChar == 34) - jjCheckNAddTwoStates(21, 22); - break; - case 1: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 12) - kind = 12; - jjstateSet[jjnewStateCnt++] = 1; - break; - case 20: - if (curChar == 34) - jjCheckNAddTwoStates(21, 22); - break; - case 21: - if ((0xfffffffbffffdbffL & l) != 0L) - jjCheckNAddTwoStates(21, 22); - break; - case 22: - if (curChar == 34 && kind > 24) - kind = 24; - break; - case 28: - if (curChar == 47) - jjAddStates(3, 5); - break; - case 29: - if (curChar == 47) - jjCheckNAddStates(6, 8); - break; - case 30: - if ((0xffffffffffffdbffL & l) != 0L) - jjCheckNAddStates(6, 8); - break; - case 31: - if ((0x2400L & l) != 0L && kind > 5) - kind = 5; - break; - case 32: - if (curChar == 10 && kind > 5) - kind = 5; - break; - case 33: - if (curChar == 13) - jjstateSet[jjnewStateCnt++] = 32; - break; - case 34: - if (curChar == 42) - jjCheckNAddTwoStates(35, 36); - break; - case 35: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(35, 36); - break; - case 36: - if (curChar == 42) - jjCheckNAddStates(9, 11); - break; - case 37: - if ((0xffff7bffffffffffL & l) != 0L) - jjCheckNAddTwoStates(38, 36); - break; - case 38: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(38, 36); - break; - case 39: - if (curChar == 47 && kind > 6) - kind = 6; - break; - case 40: - if (curChar == 42) - jjstateSet[jjnewStateCnt++] = 34; - break; - case 41: - if (curChar == 42) - jjCheckNAddTwoStates(42, 43); - break; - case 42: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(42, 43); - break; - case 43: - if (curChar == 42) - jjCheckNAddStates(12, 14); - break; - case 44: - if ((0xffff7bffffffffffL & l) != 0L) - jjCheckNAddTwoStates(45, 43); - break; - case 45: - if ((0xfffffbffffffffffL & l) != 0L) - jjCheckNAddTwoStates(45, 43); - break; - case 46: - if (curChar == 47 && kind > 7) - kind = 7; - break; - case 47: - if ((0x3fe000000000000L & l) == 0L) - break; - if (kind > 13) - kind = 13; - jjCheckNAddStates(0, 2); - break; - case 48: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 13) - kind = 13; - jjCheckNAdd(48); - break; - case 49: - if ((0x3ff000000000000L & l) != 0L) - jjCheckNAddTwoStates(49, 50); - break; - case 50: - if (curChar != 46) - break; - if (kind > 14) - kind = 14; - jjCheckNAdd(51); - break; - case 51: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 14) - kind = 14; - jjCheckNAdd(51); - break; - case 52: - if (curChar != 48) - break; - if (kind > 13) - kind = 13; - jjCheckNAdd(50); - break; - default : break; - } - } while(i != startsAt); - } - else if (curChar < 128) - { - long l = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 0: - if ((0x7fffffe00000000L & l) != 0L) - { - if (kind > 12) - kind = 12; - jjCheckNAdd(1); - } - else if (curChar == 78) - jjAddStates(15, 16); - else if (curChar == 70) - jjstateSet[jjnewStateCnt++] = 18; - else if (curChar == 65) - jjstateSet[jjnewStateCnt++] = 13; - else if (curChar == 83) - jjstateSet[jjnewStateCnt++] = 10; - else if (curChar == 69) - jjstateSet[jjnewStateCnt++] = 6; - break; - case 1: - if ((0x7fffffe87fffffeL & l) == 0L) - break; - if (kind > 12) - kind = 12; - jjCheckNAdd(1); - break; - case 2: - if (curChar == 83 && kind > 19) - kind = 19; - break; - case 3: - if (curChar == 84) - jjstateSet[jjnewStateCnt++] = 2; - break; - case 4: - if (curChar == 83) - jjstateSet[jjnewStateCnt++] = 3; - break; - case 5: - if (curChar == 73) - jjstateSet[jjnewStateCnt++] = 4; - break; - case 6: - if (curChar == 88) - jjstateSet[jjnewStateCnt++] = 5; - break; - case 7: - if (curChar == 69) - jjstateSet[jjnewStateCnt++] = 6; - break; - case 8: - if (curChar == 69 && kind > 19) - kind = 19; - break; - case 9: - if (curChar == 77) - jjstateSet[jjnewStateCnt++] = 8; - break; - case 10: - if (curChar == 79) - jjstateSet[jjnewStateCnt++] = 9; - break; - case 11: - if (curChar == 83) - jjstateSet[jjnewStateCnt++] = 10; - break; - case 12: - if (curChar == 76 && kind > 20) - kind = 20; - break; - case 13: - case 15: - if (curChar == 76) - jjCheckNAdd(12); - break; - case 14: - if (curChar == 65) - jjstateSet[jjnewStateCnt++] = 13; - break; - case 16: - if (curChar == 65) - jjstateSet[jjnewStateCnt++] = 15; - break; - case 17: - if (curChar == 82) - jjstateSet[jjnewStateCnt++] = 16; - break; - case 18: - if (curChar == 79) - jjstateSet[jjnewStateCnt++] = 17; - break; - case 19: - if (curChar == 70) - jjstateSet[jjnewStateCnt++] = 18; - break; - case 21: - if ((0xffffffffefffffffL & l) != 0L) - jjAddStates(17, 18); - break; - case 23: - if (curChar == 78) - jjAddStates(15, 16); - break; - case 24: - if (curChar == 71 && kind > 21) - kind = 21; - break; - case 25: - if (curChar == 69) - jjstateSet[jjnewStateCnt++] = 24; - break; - case 26: - if (curChar == 84 && kind > 21) - kind = 21; - break; - case 27: - if (curChar == 79) - jjstateSet[jjnewStateCnt++] = 26; - break; - case 30: - jjAddStates(6, 8); - break; - case 35: - jjCheckNAddTwoStates(35, 36); - break; - case 37: - case 38: - jjCheckNAddTwoStates(38, 36); - break; - case 42: - jjCheckNAddTwoStates(42, 43); - break; - case 44: - case 45: - jjCheckNAddTwoStates(45, 43); - break; - default : break; - } - } while(i != startsAt); - } - else - { - int i2 = (curChar & 0xff) >> 6; - long l2 = 1L << (curChar & 077); - do - { - switch(jjstateSet[--i]) - { - case 21: - if ((jjbitVec0[i2] & l2) != 0L) - jjAddStates(17, 18); - break; - case 30: - if ((jjbitVec0[i2] & l2) != 0L) - jjAddStates(6, 8); - break; - case 35: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(35, 36); - break; - case 37: - case 38: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(38, 36); - break; - case 42: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(42, 43); - break; - case 44: - case 45: - if ((jjbitVec0[i2] & l2) != 0L) - jjCheckNAddTwoStates(45, 43); - break; - default : break; - } - } while(i != startsAt); - } - if (kind != 0x7fffffff) - { - jjmatchedKind = kind; - jjmatchedPos = curPos; - kind = 0x7fffffff; - } - ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 53 - (jjnewStateCnt = startsAt))) - return curPos; - try { curChar = input_stream.readChar(); } - catch(java.io.IOException e) { return curPos; } - } -} -static final int[] jjnextStates = { - 48, 49, 50, 29, 40, 41, 30, 31, 33, 36, 37, 39, 43, 44, 46, 25, - 27, 21, 22, -}; - -/** Token literal values. */ -public static final String[] jjstrLiteralImages = { -"", null, null, null, null, null, null, null, "\56", "\73", "\53", "\55", null, -null, null, "\124\117\120", "\102\117\124\124\117\115", "\101\116\104", "\117\122", -null, null, null, "\76\75", "\74\75", null, "\75", "\173", "\133", "\50", "\54", -"\51", "\175", "\135", }; - -/** Lexer sta... [truncated message content] |