--- /dev/null
+/* Generated By:JavaCC: Do not edit this line. JJTUnitParserState.java Version 5.0 */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+public class JJTUnitParserState {\r
+ private java.util.List<Node> nodes;\r
+ private java.util.List<Integer> marks;\r
+\r
+ private int sp; // number of nodes on stack\r
+ private int mk; // current mark\r
+ private boolean node_created;\r
+\r
+ public JJTUnitParserState() {\r
+ nodes = new java.util.ArrayList<Node>();\r
+ marks = new java.util.ArrayList<Integer>();\r
+ sp = 0;\r
+ mk = 0;\r
+ }\r
+\r
+ /* Determines whether the current node was actually closed and\r
+ pushed. This should only be called in the final user action of a\r
+ node scope. */\r
+ public boolean nodeCreated() {\r
+ return node_created;\r
+ }\r
+\r
+ /* Call this to reinitialize the node stack. It is called\r
+ automatically by the parser's ReInit() method. */\r
+ public void reset() {\r
+ nodes.clear();\r
+ marks.clear();\r
+ sp = 0;\r
+ mk = 0;\r
+ }\r
+\r
+ /* Returns the root node of the AST. It only makes sense to call\r
+ this after a successful parse. */\r
+ public Node rootNode() {\r
+ return nodes.get(0);\r
+ }\r
+\r
+ /* Pushes a node on to the stack. */\r
+ public void pushNode(Node n) {\r
+ nodes.add(n);\r
+ ++sp;\r
+ }\r
+\r
+ /* Returns the node on the top of the stack, and remove it from the\r
+ stack. */\r
+ public Node popNode() {\r
+ if (--sp < mk) {\r
+ mk = marks.remove(marks.size()-1);\r
+ }\r
+ return nodes.remove(nodes.size()-1);\r
+ }\r
+\r
+ /* Returns the node currently on the top of the stack. */\r
+ public Node peekNode() {\r
+ return nodes.get(nodes.size()-1);\r
+ }\r
+\r
+ /* Returns the number of children on the stack in the current node\r
+ scope. */\r
+ public int nodeArity() {\r
+ return sp - mk;\r
+ }\r
+\r
+\r
+ public void clearNodeScope(Node n) {\r
+ while (sp > mk) {\r
+ popNode();\r
+ }\r
+ mk = marks.remove(marks.size()-1);\r
+ }\r
+\r
+\r
+ public void openNodeScope(Node n) {\r
+ marks.add(mk);\r
+ mk = sp;\r
+ n.jjtOpen();\r
+ }\r
+\r
+\r
+ /* A definite node is constructed from a specified number of\r
+ children. That number of nodes are popped from the stack and\r
+ made the children of the definite node. Then the definite node\r
+ is pushed on to the stack. */\r
+ public void closeNodeScope(Node n, int num) {\r
+ mk = marks.remove(marks.size()-1);\r
+ while (num-- > 0) {\r
+ Node c = popNode();\r
+ c.jjtSetParent(n);\r
+ n.jjtAddChild(c, num);\r
+ }\r
+ n.jjtClose();\r
+ pushNode(n);\r
+ node_created = true;\r
+ }\r
+\r
+\r
+ /* A conditional node is constructed if its condition is true. All\r
+ the nodes that have been pushed since the node was opened are\r
+ made children of the conditional node, which is then pushed\r
+ on to the stack. If the condition is false the node is not\r
+ constructed and they are left on the stack. */\r
+ public void closeNodeScope(Node n, boolean condition) {\r
+ if (condition) {\r
+ int a = nodeArity();\r
+ mk = marks.remove(marks.size()-1);\r
+ while (a-- > 0) {\r
+ Node c = popNode();\r
+ c.jjtSetParent(n);\r
+ n.jjtAddChild(c, a);\r
+ }\r
+ n.jjtClose();\r
+ pushNode(n);\r
+ node_created = true;\r
+ } else {\r
+ mk = marks.remove(marks.size()-1);\r
+ node_created = false;\r
+ }\r
+ }\r
+}\r
+/* JavaCC - OriginalChecksum=d0c8ac05372006e3b61e33c0a234ef07 (do not edit this line) */\r
--- /dev/null
+/* Generated By:JJTree: Do not edit this line. Node.java Version 4.3 */\r
+/* JavaCCOptions:MULTI=false,NODE_USES_PARSER=false,VISITOR=false,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=UnitCheckingNodeFactory,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+/* All AST nodes must implement this interface. It provides basic\r
+ machinery for constructing the parent and child relationships\r
+ between nodes. */\r
+\r
+public\r
+interface Node {\r
+\r
+ /** This method is called after the node has been made the current\r
+ node. It indicates that child nodes can now be added to it. */\r
+ public void jjtOpen();\r
+\r
+ /** This method is called after all the child nodes have been\r
+ added. */\r
+ public void jjtClose();\r
+\r
+ /** This pair of methods are used to inform the node of its\r
+ parent. */\r
+ public void jjtSetParent(Node n);\r
+ public Node jjtGetParent();\r
+\r
+ /** This method tells the node to add its argument to the node's\r
+ list of children. */\r
+ public void jjtAddChild(Node n, int i);\r
+\r
+ /** This method returns a child node. The children are numbered\r
+ from zero, left to right. */\r
+ public Node jjtGetChild(int i);\r
+\r
+ /** Return the number of children the node has. */\r
+ public int jjtGetNumChildren();\r
+}\r
+/* JavaCC - OriginalChecksum=851e4a7b403fad4367cc9f6859ec9c32 (do not edit this line) */\r
--- /dev/null
+/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */\r
+/* JavaCCOptions:KEEP_LINE_COL=null */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+/**\r
+ * This exception is thrown when parse errors are encountered.\r
+ * You can explicitly create objects of this exception type by\r
+ * calling the method generateParseException in the generated\r
+ * parser.\r
+ *\r
+ * You can modify this class to customize your error reporting\r
+ * mechanisms so long as you retain the public fields.\r
+ */\r
+public class ParseException extends Exception {\r
+\r
+ /**\r
+ * The version identifier for this Serializable class.\r
+ * Increment only if the <i>serialized</i> form of the\r
+ * class changes.\r
+ */\r
+ private static final long serialVersionUID = 1L;\r
+\r
+ /**\r
+ * This constructor is used by the method "generateParseException"\r
+ * in the generated parser. Calling this constructor generates\r
+ * a new object of this type with the fields "currentToken",\r
+ * "expectedTokenSequences", and "tokenImage" set.\r
+ */\r
+ public ParseException(Token currentTokenVal,\r
+ int[][] expectedTokenSequencesVal,\r
+ String[] tokenImageVal\r
+ )\r
+ {\r
+ super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal));\r
+ currentToken = currentTokenVal;\r
+ expectedTokenSequences = expectedTokenSequencesVal;\r
+ tokenImage = tokenImageVal;\r
+ }\r
+\r
+ /**\r
+ * The following constructors are for use by you for whatever\r
+ * purpose you can think of. Constructing the exception in this\r
+ * manner makes the exception behave in the normal way - i.e., as\r
+ * documented in the class "Throwable". The fields "errorToken",\r
+ * "expectedTokenSequences", and "tokenImage" do not contain\r
+ * relevant information. The JavaCC generated code does not use\r
+ * these constructors.\r
+ */\r
+\r
+ public ParseException() {\r
+ super();\r
+ }\r
+\r
+ /** Constructor with message. */\r
+ public ParseException(String message) {\r
+ super(message);\r
+ }\r
+\r
+\r
+ /**\r
+ * This is the last token that has been consumed successfully. If\r
+ * this object has been created due to a parse error, the token\r
+ * followng this token will (therefore) be the first error token.\r
+ */\r
+ public Token currentToken;\r
+\r
+ /**\r
+ * Each entry in this array is an array of integers. Each array\r
+ * of integers represents a sequence of tokens (by their ordinal\r
+ * values) that is expected at this point of the parse.\r
+ */\r
+ public int[][] expectedTokenSequences;\r
+\r
+ /**\r
+ * This is a reference to the "tokenImage" array of the generated\r
+ * parser within which the parse error occurred. This array is\r
+ * defined in the generated ...Constants interface.\r
+ */\r
+ public String[] tokenImage;\r
+\r
+ /**\r
+ * It uses "currentToken" and "expectedTokenSequences" to generate a parse\r
+ * error message and returns it. If this object has been created\r
+ * due to a parse error, and you do not catch it (it gets thrown\r
+ * from the parser) the correct error message\r
+ * gets displayed.\r
+ */\r
+ private static String initialise(Token currentToken,\r
+ int[][] expectedTokenSequences,\r
+ String[] tokenImage) {\r
+ String eol = System.getProperty("line.separator", "\n");\r
+ StringBuffer expected = new StringBuffer();\r
+ int maxSize = 0;\r
+ for (int i = 0; i < expectedTokenSequences.length; i++) {\r
+ if (maxSize < expectedTokenSequences[i].length) {\r
+ maxSize = expectedTokenSequences[i].length;\r
+ }\r
+ for (int j = 0; j < expectedTokenSequences[i].length; j++) {\r
+ expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');\r
+ }\r
+ if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {\r
+ expected.append("...");\r
+ }\r
+ expected.append(eol).append(" ");\r
+ }\r
+ String retval = "Encountered \"";\r
+ Token tok = currentToken.next;\r
+ for (int i = 0; i < maxSize; i++) {\r
+ if (i != 0) retval += " ";\r
+ if (tok.kind == 0) {\r
+ retval += tokenImage[0];\r
+ break;\r
+ }\r
+ retval += " " + tokenImage[tok.kind];\r
+ retval += " \"";\r
+ retval += add_escapes(tok.image);\r
+ retval += " \"";\r
+ tok = tok.next;\r
+ }\r
+ retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;\r
+ retval += "." + eol;\r
+ if (expectedTokenSequences.length == 1) {\r
+ retval += "Was expecting:" + eol + " ";\r
+ } else {\r
+ retval += "Was expecting one of:" + eol + " ";\r
+ }\r
+ retval += expected.toString();\r
+ return retval;\r
+ }\r
+\r
+ /**\r
+ * The end of line string for this machine.\r
+ */\r
+ protected String eol = System.getProperty("line.separator", "\n");\r
+\r
+ /**\r
+ * Used to convert raw characters to their escaped version\r
+ * when these raw version cannot be used as part of an ASCII\r
+ * string literal.\r
+ */\r
+ static String add_escapes(String str) {\r
+ StringBuffer retval = new StringBuffer();\r
+ char ch;\r
+ for (int i = 0; i < str.length(); i++) {\r
+ switch (str.charAt(i))\r
+ {\r
+ case 0 :\r
+ continue;\r
+ case '\b':\r
+ retval.append("\\b");\r
+ continue;\r
+ case '\t':\r
+ retval.append("\\t");\r
+ continue;\r
+ case '\n':\r
+ retval.append("\\n");\r
+ continue;\r
+ case '\f':\r
+ retval.append("\\f");\r
+ continue;\r
+ case '\r':\r
+ retval.append("\\r");\r
+ continue;\r
+ case '\"':\r
+ retval.append("\\\"");\r
+ continue;\r
+ case '\'':\r
+ retval.append("\\\'");\r
+ continue;\r
+ case '\\':\r
+ retval.append("\\\\");\r
+ continue;\r
+ default:\r
+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {\r
+ String s = "0000" + Integer.toString(ch, 16);\r
+ retval.append("\\u" + s.substring(s.length() - 4, s.length()));\r
+ } else {\r
+ retval.append(ch);\r
+ }\r
+ continue;\r
+ }\r
+ }\r
+ return retval.toString();\r
+ }\r
+\r
+}\r
+/* JavaCC - OriginalChecksum=4af9901dc6c68e7e4e08ab85f10baa96 (do not edit this line) */\r
--- /dev/null
+/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 5.0 */\r
+/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+/**\r
+ * An implementation of interface CharStream, where the stream is assumed to\r
+ * contain only ASCII characters (without unicode processing).\r
+ */\r
+\r
+public class SimpleCharStream\r
+{\r
+/** Whether parser is static. */\r
+ public static final boolean staticFlag = false;\r
+ int bufsize;\r
+ int available;\r
+ int tokenBegin;\r
+/** Position in buffer. */\r
+ public int bufpos = -1;\r
+ protected int bufline[];\r
+ protected int bufcolumn[];\r
+\r
+ protected int column = 0;\r
+ protected int line = 1;\r
+\r
+ protected boolean prevCharIsCR = false;\r
+ protected boolean prevCharIsLF = false;\r
+\r
+ protected java.io.Reader inputStream;\r
+\r
+ protected char[] buffer;\r
+ protected int maxNextCharInd = 0;\r
+ protected int inBuf = 0;\r
+ protected int tabSize = 8;\r
+\r
+ protected void setTabSize(int i) { tabSize = i; }\r
+ protected int getTabSize(int i) { return tabSize; }\r
+\r
+\r
+ protected void ExpandBuff(boolean wrapAround)\r
+ {\r
+ char[] newbuffer = new char[bufsize + 2048];\r
+ int newbufline[] = new int[bufsize + 2048];\r
+ int newbufcolumn[] = new int[bufsize + 2048];\r
+\r
+ try\r
+ {\r
+ if (wrapAround)\r
+ {\r
+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);\r
+ System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);\r
+ buffer = newbuffer;\r
+\r
+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);\r
+ System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);\r
+ bufline = newbufline;\r
+\r
+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);\r
+ System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);\r
+ bufcolumn = newbufcolumn;\r
+\r
+ maxNextCharInd = (bufpos += (bufsize - tokenBegin));\r
+ }\r
+ else\r
+ {\r
+ System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);\r
+ buffer = newbuffer;\r
+\r
+ System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);\r
+ bufline = newbufline;\r
+\r
+ System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);\r
+ bufcolumn = newbufcolumn;\r
+\r
+ maxNextCharInd = (bufpos -= tokenBegin);\r
+ }\r
+ }\r
+ catch (Throwable t)\r
+ {\r
+ throw new Error(t.getMessage());\r
+ }\r
+\r
+\r
+ bufsize += 2048;\r
+ available = bufsize;\r
+ tokenBegin = 0;\r
+ }\r
+\r
+ protected void FillBuff() throws java.io.IOException\r
+ {\r
+ if (maxNextCharInd == available)\r
+ {\r
+ if (available == bufsize)\r
+ {\r
+ if (tokenBegin > 2048)\r
+ {\r
+ bufpos = maxNextCharInd = 0;\r
+ available = tokenBegin;\r
+ }\r
+ else if (tokenBegin < 0)\r
+ bufpos = maxNextCharInd = 0;\r
+ else\r
+ ExpandBuff(false);\r
+ }\r
+ else if (available > tokenBegin)\r
+ available = bufsize;\r
+ else if ((tokenBegin - available) < 2048)\r
+ ExpandBuff(true);\r
+ else\r
+ available = tokenBegin;\r
+ }\r
+\r
+ int i;\r
+ try {\r
+ if ((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1)\r
+ {\r
+ inputStream.close();\r
+ throw new java.io.IOException();\r
+ }\r
+ else\r
+ maxNextCharInd += i;\r
+ return;\r
+ }\r
+ catch(java.io.IOException e) {\r
+ --bufpos;\r
+ backup(0);\r
+ if (tokenBegin == -1)\r
+ tokenBegin = bufpos;\r
+ throw e;\r
+ }\r
+ }\r
+\r
+/** Start. */\r
+ public char BeginToken() throws java.io.IOException\r
+ {\r
+ tokenBegin = -1;\r
+ char c = readChar();\r
+ tokenBegin = bufpos;\r
+\r
+ return c;\r
+ }\r
+\r
+ protected void UpdateLineColumn(char c)\r
+ {\r
+ column++;\r
+\r
+ if (prevCharIsLF)\r
+ {\r
+ prevCharIsLF = false;\r
+ line += (column = 1);\r
+ }\r
+ else if (prevCharIsCR)\r
+ {\r
+ prevCharIsCR = false;\r
+ if (c == '\n')\r
+ {\r
+ prevCharIsLF = true;\r
+ }\r
+ else\r
+ line += (column = 1);\r
+ }\r
+\r
+ switch (c)\r
+ {\r
+ case '\r' :\r
+ prevCharIsCR = true;\r
+ break;\r
+ case '\n' :\r
+ prevCharIsLF = true;\r
+ break;\r
+ case '\t' :\r
+ column--;\r
+ column += (tabSize - (column % tabSize));\r
+ break;\r
+ default :\r
+ break;\r
+ }\r
+\r
+ bufline[bufpos] = line;\r
+ bufcolumn[bufpos] = column;\r
+ }\r
+\r
+/** Read a character. */\r
+ public char readChar() throws java.io.IOException\r
+ {\r
+ if (inBuf > 0)\r
+ {\r
+ --inBuf;\r
+\r
+ if (++bufpos == bufsize)\r
+ bufpos = 0;\r
+\r
+ return buffer[bufpos];\r
+ }\r
+\r
+ if (++bufpos >= maxNextCharInd)\r
+ FillBuff();\r
+\r
+ char c = buffer[bufpos];\r
+\r
+ UpdateLineColumn(c);\r
+ return c;\r
+ }\r
+\r
+ @Deprecated\r
+ /**\r
+ * @deprecated\r
+ * @see #getEndColumn\r
+ */\r
+\r
+ public int getColumn() {\r
+ return bufcolumn[bufpos];\r
+ }\r
+\r
+ @Deprecated\r
+ /**\r
+ * @deprecated\r
+ * @see #getEndLine\r
+ */\r
+\r
+ public int getLine() {\r
+ return bufline[bufpos];\r
+ }\r
+\r
+ /** Get token end column number. */\r
+ public int getEndColumn() {\r
+ return bufcolumn[bufpos];\r
+ }\r
+\r
+ /** Get token end line number. */\r
+ public int getEndLine() {\r
+ return bufline[bufpos];\r
+ }\r
+\r
+ /** Get token beginning column number. */\r
+ public int getBeginColumn() {\r
+ return bufcolumn[tokenBegin];\r
+ }\r
+\r
+ /** Get token beginning line number. */\r
+ public int getBeginLine() {\r
+ return bufline[tokenBegin];\r
+ }\r
+\r
+/** Backup a number of characters. */\r
+ public void backup(int amount) {\r
+\r
+ inBuf += amount;\r
+ if ((bufpos -= amount) < 0)\r
+ bufpos += bufsize;\r
+ }\r
+\r
+ /** Constructor. */\r
+ public SimpleCharStream(java.io.Reader dstream, int startline,\r
+ int startcolumn, int buffersize)\r
+ {\r
+ inputStream = dstream;\r
+ line = startline;\r
+ column = startcolumn - 1;\r
+\r
+ available = bufsize = buffersize;\r
+ buffer = new char[buffersize];\r
+ bufline = new int[buffersize];\r
+ bufcolumn = new int[buffersize];\r
+ }\r
+\r
+ /** Constructor. */\r
+ public SimpleCharStream(java.io.Reader dstream, int startline,\r
+ int startcolumn)\r
+ {\r
+ this(dstream, startline, startcolumn, 4096);\r
+ }\r
+\r
+ /** Constructor. */\r
+ public SimpleCharStream(java.io.Reader dstream)\r
+ {\r
+ this(dstream, 1, 1, 4096);\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.Reader dstream, int startline,\r
+ int startcolumn, int buffersize)\r
+ {\r
+ inputStream = dstream;\r
+ line = startline;\r
+ column = startcolumn - 1;\r
+\r
+ if (buffer == null || buffersize != buffer.length)\r
+ {\r
+ available = bufsize = buffersize;\r
+ buffer = new char[buffersize];\r
+ bufline = new int[buffersize];\r
+ bufcolumn = new int[buffersize];\r
+ }\r
+ prevCharIsLF = prevCharIsCR = false;\r
+ tokenBegin = inBuf = maxNextCharInd = 0;\r
+ bufpos = -1;\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.Reader dstream, int startline,\r
+ int startcolumn)\r
+ {\r
+ ReInit(dstream, startline, startcolumn, 4096);\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.Reader dstream)\r
+ {\r
+ ReInit(dstream, 1, 1, 4096);\r
+ }\r
+ /** Constructor. */\r
+ public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,\r
+ int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException\r
+ {\r
+ this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);\r
+ }\r
+\r
+ /** Constructor. */\r
+ public SimpleCharStream(java.io.InputStream dstream, int startline,\r
+ int startcolumn, int buffersize)\r
+ {\r
+ this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);\r
+ }\r
+\r
+ /** Constructor. */\r
+ public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,\r
+ int startcolumn) throws java.io.UnsupportedEncodingException\r
+ {\r
+ this(dstream, encoding, startline, startcolumn, 4096);\r
+ }\r
+\r
+ /** Constructor. */\r
+ public SimpleCharStream(java.io.InputStream dstream, int startline,\r
+ int startcolumn)\r
+ {\r
+ this(dstream, startline, startcolumn, 4096);\r
+ }\r
+\r
+ /** Constructor. */\r
+ public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException\r
+ {\r
+ this(dstream, encoding, 1, 1, 4096);\r
+ }\r
+\r
+ /** Constructor. */\r
+ public SimpleCharStream(java.io.InputStream dstream)\r
+ {\r
+ this(dstream, 1, 1, 4096);\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.InputStream dstream, String encoding, int startline,\r
+ int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException\r
+ {\r
+ ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.InputStream dstream, int startline,\r
+ int startcolumn, int buffersize)\r
+ {\r
+ ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException\r
+ {\r
+ ReInit(dstream, encoding, 1, 1, 4096);\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.InputStream dstream)\r
+ {\r
+ ReInit(dstream, 1, 1, 4096);\r
+ }\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.InputStream dstream, String encoding, int startline,\r
+ int startcolumn) throws java.io.UnsupportedEncodingException\r
+ {\r
+ ReInit(dstream, encoding, startline, startcolumn, 4096);\r
+ }\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.InputStream dstream, int startline,\r
+ int startcolumn)\r
+ {\r
+ ReInit(dstream, startline, startcolumn, 4096);\r
+ }\r
+ /** Get token literal value. */\r
+ public String GetImage()\r
+ {\r
+ if (bufpos >= tokenBegin)\r
+ return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);\r
+ else\r
+ return new String(buffer, tokenBegin, bufsize - tokenBegin) +\r
+ new String(buffer, 0, bufpos + 1);\r
+ }\r
+\r
+ /** Get the suffix. */\r
+ public char[] GetSuffix(int len)\r
+ {\r
+ char[] ret = new char[len];\r
+\r
+ if ((bufpos + 1) >= len)\r
+ System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);\r
+ else\r
+ {\r
+ System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,\r
+ len - bufpos - 1);\r
+ System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);\r
+ }\r
+\r
+ return ret;\r
+ }\r
+\r
+ /** Reset buffer when finished. */\r
+ public void Done()\r
+ {\r
+ buffer = null;\r
+ bufline = null;\r
+ bufcolumn = null;\r
+ }\r
+\r
+ /**\r
+ * Method to adjust line and column numbers for the start of a token.\r
+ */\r
+ public void adjustBeginLineColumn(int newLine, int newCol)\r
+ {\r
+ int start = tokenBegin;\r
+ int len;\r
+\r
+ if (bufpos >= tokenBegin)\r
+ {\r
+ len = bufpos - tokenBegin + inBuf + 1;\r
+ }\r
+ else\r
+ {\r
+ len = bufsize - tokenBegin + bufpos + 1 + inBuf;\r
+ }\r
+\r
+ int i = 0, j = 0, k = 0;\r
+ int nextColDiff = 0, columnDiff = 0;\r
+\r
+ while (i < len && bufline[j = start % bufsize] == bufline[k = ++start % bufsize])\r
+ {\r
+ bufline[j] = newLine;\r
+ nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];\r
+ bufcolumn[j] = newCol + columnDiff;\r
+ columnDiff = nextColDiff;\r
+ i++;\r
+ }\r
+\r
+ if (i < len)\r
+ {\r
+ bufline[j] = newLine++;\r
+ bufcolumn[j] = newCol + columnDiff;\r
+\r
+ while (i++ < len)\r
+ {\r
+ if (bufline[j = start % bufsize] != bufline[++start % bufsize])\r
+ bufline[j] = newLine++;\r
+ else\r
+ bufline[j] = newLine;\r
+ }\r
+ }\r
+\r
+ line = bufline[j];\r
+ column = bufcolumn[j];\r
+ }\r
+\r
+}\r
+/* JavaCC - OriginalChecksum=e3053baa4fc0756909ee8daa9c548c97 (do not edit this line) */\r
--- /dev/null
+/* Generated By:JJTree: Do not edit this line. SimpleNode.java Version 4.3 */\r
+/* JavaCCOptions:MULTI=false,NODE_USES_PARSER=false,VISITOR=false,TRACK_TOKENS=true,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=UnitCheckingNodeFactory,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+public\r
+class SimpleNode implements Node {\r
+\r
+ protected Node parent;\r
+ protected Node[] children;\r
+ protected int id;\r
+ protected Object value;\r
+ protected UnitParser parser;\r
+ protected Token firstToken;\r
+ protected Token lastToken;\r
+\r
+ public SimpleNode(int i) {\r
+ id = i;\r
+ }\r
+\r
+ public SimpleNode(UnitParser p, int i) {\r
+ this(i);\r
+ parser = p;\r
+ }\r
+\r
+ public static Node jjtCreate(int id) {\r
+ return new SimpleNode(id);\r
+ }\r
+\r
+ public static Node jjtCreate(UnitParser p, int id) {\r
+ return new SimpleNode(p, id);\r
+ }\r
+\r
+ public void jjtOpen() {\r
+ }\r
+\r
+ public void jjtClose() {\r
+ }\r
+\r
+ public void jjtSetParent(Node n) { parent = n; }\r
+ public Node jjtGetParent() { return parent; }\r
+\r
+ public void jjtAddChild(Node n, int i) {\r
+ if (children == null) {\r
+ children = new Node[i + 1];\r
+ } else if (i >= children.length) {\r
+ Node c[] = new Node[i + 1];\r
+ System.arraycopy(children, 0, c, 0, children.length);\r
+ children = c;\r
+ }\r
+ children[i] = n;\r
+ }\r
+\r
+ public Node jjtGetChild(int i) {\r
+ return children[i];\r
+ }\r
+\r
+ public int jjtGetNumChildren() {\r
+ return (children == null) ? 0 : children.length;\r
+ }\r
+\r
+ public void jjtSetValue(Object value) { this.value = value; }\r
+ public Object jjtGetValue() { return value; }\r
+\r
+ public Token jjtGetFirstToken() { return firstToken; }\r
+ public void jjtSetFirstToken(Token token) { this.firstToken = token; }\r
+ public Token jjtGetLastToken() { return lastToken; }\r
+ public void jjtSetLastToken(Token token) { this.lastToken = token; }\r
+\r
+ /* You can override these two methods in subclasses of SimpleNode to\r
+ customize the way the node appears when the tree is dumped. If\r
+ your output uses more than one line you should override\r
+ toString(String), otherwise overriding toString() is probably all\r
+ you need to do. */\r
+\r
+ public String toString() { return UnitParserTreeConstants.jjtNodeName[id]; }\r
+ public String toString(String prefix) { return prefix + toString(); }\r
+\r
+ /* Override this method if you want to customize how the node dumps\r
+ out its children. */\r
+\r
+ public void dump(String prefix) {\r
+ System.out.println(toString(prefix));\r
+ if (children != null) {\r
+ for (int i = 0; i < children.length; ++i) {\r
+ SimpleNode n = (SimpleNode)children[i];\r
+ if (n != null) {\r
+ n.dump(prefix + " ");\r
+ }\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
+/* JavaCC - OriginalChecksum=97c0294de1ef3976f0b09baf888d3564 (do not edit this line) */\r
--- /dev/null
+/* Generated By:JavaCC: Do not edit this line. Token.java Version 5.0 */\r
+/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+/**\r
+ * Describes the input token stream.\r
+ */\r
+\r
+public class Token implements java.io.Serializable {\r
+\r
+ /**\r
+ * The version identifier for this Serializable class.\r
+ * Increment only if the <i>serialized</i> form of the\r
+ * class changes.\r
+ */\r
+ private static final long serialVersionUID = 1L;\r
+\r
+ /**\r
+ * An integer that describes the kind of this token. This numbering\r
+ * system is determined by JavaCCParser, and a table of these numbers is\r
+ * stored in the file ...Constants.java.\r
+ */\r
+ public int kind;\r
+\r
+ /** The line number of the first character of this Token. */\r
+ public int beginLine;\r
+ /** The column number of the first character of this Token. */\r
+ public int beginColumn;\r
+ /** The line number of the last character of this Token. */\r
+ public int endLine;\r
+ /** The column number of the last character of this Token. */\r
+ public int endColumn;\r
+\r
+ /**\r
+ * The string image of the token.\r
+ */\r
+ public String image;\r
+\r
+ /**\r
+ * A reference to the next regular (non-special) token from the input\r
+ * stream. If this is the last token from the input stream, or if the\r
+ * token manager has not read tokens beyond this one, this field is\r
+ * set to null. This is true only if this token is also a regular\r
+ * token. Otherwise, see below for a description of the contents of\r
+ * this field.\r
+ */\r
+ public Token next;\r
+\r
+ /**\r
+ * This field is used to access special tokens that occur prior to this\r
+ * token, but after the immediately preceding regular (non-special) token.\r
+ * If there are no such special tokens, this field is set to null.\r
+ * When there are more than one such special token, this field refers\r
+ * to the last of these special tokens, which in turn refers to the next\r
+ * previous special token through its specialToken field, and so on\r
+ * until the first special token (whose specialToken field is null).\r
+ * The next fields of special tokens refer to other special tokens that\r
+ * immediately follow it (without an intervening regular token). If there\r
+ * is no such token, this field is null.\r
+ */\r
+ public Token specialToken;\r
+\r
+ /**\r
+ * An optional attribute value of the Token.\r
+ * Tokens which are not used as syntactic sugar will often contain\r
+ * meaningful values that will be used later on by the compiler or\r
+ * interpreter. This attribute value is often different from the image.\r
+ * Any subclass of Token that actually wants to return a non-null value can\r
+ * override this method as appropriate.\r
+ */\r
+ public Object getValue() {\r
+ return null;\r
+ }\r
+\r
+ /**\r
+ * No-argument constructor\r
+ */\r
+ public Token() {}\r
+\r
+ /**\r
+ * Constructs a new token for the specified Image.\r
+ */\r
+ public Token(int kind)\r
+ {\r
+ this(kind, null);\r
+ }\r
+\r
+ /**\r
+ * Constructs a new token for the specified Image and Kind.\r
+ */\r
+ public Token(int kind, String image)\r
+ {\r
+ this.kind = kind;\r
+ this.image = image;\r
+ }\r
+\r
+ /**\r
+ * Returns the image.\r
+ */\r
+ public String toString()\r
+ {\r
+ return image;\r
+ }\r
+\r
+ /**\r
+ * Returns a new Token object, by default. However, if you want, you\r
+ * can create and return subclass objects based on the value of ofKind.\r
+ * Simply add the cases to the switch for all those special cases.\r
+ * For example, if you have a subclass of Token called IDToken that\r
+ * you want to create if ofKind is ID, simply add something like :\r
+ *\r
+ * case MyParserConstants.ID : return new IDToken(ofKind, image);\r
+ *\r
+ * to the following switch statement. Then you can cast matchedToken\r
+ * variable to the appropriate type and use sit in your lexical actions.\r
+ */\r
+ public static Token newToken(int ofKind, String image)\r
+ {\r
+ switch(ofKind)\r
+ {\r
+ default : return new Token(ofKind, image);\r
+ }\r
+ }\r
+\r
+ public static Token newToken(int ofKind)\r
+ {\r
+ return newToken(ofKind, null);\r
+ }\r
+\r
+}\r
+/* JavaCC - OriginalChecksum=61dd11be23a2b24c2ed31564a8c7855c (do not edit this line) */\r
--- /dev/null
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */\r
+/* JavaCCOptions: */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+/** Token Manager Error. */\r
+public class TokenMgrError extends Error\r
+{\r
+\r
+ /**\r
+ * The version identifier for this Serializable class.\r
+ * Increment only if the <i>serialized</i> form of the\r
+ * class changes.\r
+ */\r
+ private static final long serialVersionUID = 1L;\r
+\r
+ /*\r
+ * Ordinals for various reasons why an Error of this type can be thrown.\r
+ */\r
+\r
+ /**\r
+ * Lexical error occurred.\r
+ */\r
+ static final int LEXICAL_ERROR = 0;\r
+\r
+ /**\r
+ * An attempt was made to create a second instance of a static token manager.\r
+ */\r
+ static final int STATIC_LEXER_ERROR = 1;\r
+\r
+ /**\r
+ * Tried to change to an invalid lexical state.\r
+ */\r
+ static final int INVALID_LEXICAL_STATE = 2;\r
+\r
+ /**\r
+ * Detected (and bailed out of) an infinite loop in the token manager.\r
+ */\r
+ static final int LOOP_DETECTED = 3;\r
+\r
+ /**\r
+ * Indicates the reason why the exception is thrown. It will have\r
+ * one of the above 4 values.\r
+ */\r
+ int errorCode;\r
+\r
+ /**\r
+ * Replaces unprintable characters by their escaped (or unicode escaped)\r
+ * equivalents in the given string\r
+ */\r
+ protected static final String addEscapes(String str) {\r
+ StringBuffer retval = new StringBuffer();\r
+ char ch;\r
+ for (int i = 0; i < str.length(); i++) {\r
+ switch (str.charAt(i))\r
+ {\r
+ case 0 :\r
+ continue;\r
+ case '\b':\r
+ retval.append("\\b");\r
+ continue;\r
+ case '\t':\r
+ retval.append("\\t");\r
+ continue;\r
+ case '\n':\r
+ retval.append("\\n");\r
+ continue;\r
+ case '\f':\r
+ retval.append("\\f");\r
+ continue;\r
+ case '\r':\r
+ retval.append("\\r");\r
+ continue;\r
+ case '\"':\r
+ retval.append("\\\"");\r
+ continue;\r
+ case '\'':\r
+ retval.append("\\\'");\r
+ continue;\r
+ case '\\':\r
+ retval.append("\\\\");\r
+ continue;\r
+ default:\r
+ if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {\r
+ String s = "0000" + Integer.toString(ch, 16);\r
+ retval.append("\\u" + s.substring(s.length() - 4, s.length()));\r
+ } else {\r
+ retval.append(ch);\r
+ }\r
+ continue;\r
+ }\r
+ }\r
+ return retval.toString();\r
+ }\r
+\r
+ /**\r
+ * Returns a detailed message for the Error when it is thrown by the\r
+ * token manager to indicate a lexical error.\r
+ * Parameters :\r
+ * EOFSeen : indicates if EOF caused the lexical error\r
+ * curLexState : lexical state in which this error occurred\r
+ * errorLine : line number when the error occurred\r
+ * errorColumn : column number when the error occurred\r
+ * errorAfter : prefix that was seen before this error occurred\r
+ * curchar : the offending character\r
+ * Note: You can customize the lexical error message by modifying this method.\r
+ */\r
+ protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {\r
+ return("Lexical error at line " +\r
+ errorLine + ", column " +\r
+ errorColumn + ". Encountered: " +\r
+ (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +\r
+ "after : \"" + addEscapes(errorAfter) + "\"");\r
+ }\r
+\r
+ /**\r
+ * You can also modify the body of this method to customize your error messages.\r
+ * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not\r
+ * of end-users concern, so you can return something like :\r
+ *\r
+ * "Internal Error : Please file a bug report .... "\r
+ *\r
+ * from this method for such cases in the release version of your parser.\r
+ */\r
+ public String getMessage() {\r
+ return super.getMessage();\r
+ }\r
+\r
+ /*\r
+ * Constructors of various flavors follow.\r
+ */\r
+\r
+ /** No arg constructor. */\r
+ public TokenMgrError() {\r
+ }\r
+\r
+ /** Constructor with message and reason. */\r
+ public TokenMgrError(String message, int reason) {\r
+ super(message);\r
+ errorCode = reason;\r
+ }\r
+\r
+ /** Full Constructor. */\r
+ public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {\r
+ this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);\r
+ }\r
+}\r
+/* JavaCC - OriginalChecksum=1a840694e4f0cebfb591db26400a3167 (do not edit this line) */\r
--- /dev/null
+/* Generated By:JJTree&JavaCC: Do not edit this line. UnitParser.java */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+public class UnitParser/*@bgen(jjtree)*/implements UnitParserTreeConstants, UnitParserConstants {/*@bgen(jjtree)*/\r
+ protected JJTUnitParserState jjtree = new JJTUnitParserState();\r
+\r
+/*** Parser ********************************************************/\r
+\r
+// https://javacc.dev.java.net/doc/javaccgrm.html\r
+// add_op -> add_op()\r
+// [ add_op ] -> ( add_op() )?\r
+// { add_op term } -> ( add_op() term() )*\r
+ final public SimpleNode expr() throws ParseException {\r
+ /*@bgen(jjtree) expr */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTEXPR);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 0:\r
+ case 6:\r
+ case 12:\r
+ case 33:\r
+ case 35:\r
+ case 60:\r
+ case 62:\r
+ case 64:\r
+ case 76:\r
+ case 77:\r
+ case 78:\r
+ case 79:\r
+ case IDENT:\r
+ case STRING:\r
+ case UNSIGNED_INTEGER:\r
+ case UNSIGNED_NUMBER:\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 6:\r
+ case 12:\r
+ case 33:\r
+ case 35:\r
+ case 60:\r
+ case 62:\r
+ case 64:\r
+ case 76:\r
+ case 77:\r
+ case 78:\r
+ case 79:\r
+ case IDENT:\r
+ case STRING:\r
+ case UNSIGNED_INTEGER:\r
+ case UNSIGNED_NUMBER:\r
+ simple_expression();\r
+ break;\r
+ default:\r
+ jj_la1[0] = jj_gen;\r
+ ;\r
+ }\r
+ jj_consume_token(0);\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtc000 = false;\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ {if (true) return jjtn000;}\r
+ break;\r
+ case 31:\r
+ ifthenelse();\r
+ jj_consume_token(0);\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtc000 = false;\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ {if (true) return jjtn000;}\r
+ break;\r
+ default:\r
+ jj_la1[1] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ throw new Error("Missing return statement in function");\r
+ }\r
+\r
+ final public void expression() throws ParseException {\r
+ /*@bgen(jjtree) expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTEXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 6:\r
+ case 12:\r
+ case 33:\r
+ case 35:\r
+ case 60:\r
+ case 62:\r
+ case 64:\r
+ case 76:\r
+ case 77:\r
+ case 78:\r
+ case 79:\r
+ case IDENT:\r
+ case STRING:\r
+ case UNSIGNED_INTEGER:\r
+ case UNSIGNED_NUMBER:\r
+ simple_expression();\r
+ break;\r
+ case 31:\r
+ ifthenelse();\r
+ break;\r
+ default:\r
+ jj_la1[2] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void ifthenelse() throws ParseException {\r
+ /*@bgen(jjtree) ifthenelse */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTIFTHENELSE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ jj_consume_token(31);\r
+ condition();\r
+ jj_consume_token(28);\r
+ expression();\r
+ label_1:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 20:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[3] = jj_gen;\r
+ break label_1;\r
+ }\r
+ jj_consume_token(20);\r
+ condition();\r
+ jj_consume_token(28);\r
+ expression();\r
+ }\r
+ jj_consume_token(15);\r
+ expression();\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void condition() throws ParseException {\r
+ /*@bgen(jjtree) condition */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTCONDITION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ expression();\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void simple_expression() throws ParseException {\r
+ /*@bgen(jjtree) simple_expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTSIMPLE_EXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ logical_expression();\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 67:\r
+ jj_consume_token(67);\r
+ logical_expression();\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 67:\r
+ jj_consume_token(67);\r
+ logical_expression();\r
+ break;\r
+ default:\r
+ jj_la1[4] = jj_gen;\r
+ ;\r
+ }\r
+ break;\r
+ default:\r
+ jj_la1[5] = jj_gen;\r
+ ;\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void logical_expression() throws ParseException {\r
+ /*@bgen(jjtree) logical_expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTLOGICAL_EXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ logical_term();\r
+ label_2:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 22:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[6] = jj_gen;\r
+ break label_2;\r
+ }\r
+ jj_consume_token(22);\r
+ logical_term();\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void logical_term() throws ParseException {\r
+ /*@bgen(jjtree) logical_term */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTLOGICAL_TERM);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ logical_factor();\r
+ label_3:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 9:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[7] = jj_gen;\r
+ break label_3;\r
+ }\r
+ jj_consume_token(9);\r
+ logical_factor();\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void logical_factor() throws ParseException {\r
+ /*@bgen(jjtree) logical_factor */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTLOGICAL_FACTOR);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 12:\r
+ jj_consume_token(12);\r
+ break;\r
+ default:\r
+ jj_la1[8] = jj_gen;\r
+ ;\r
+ }\r
+ relation();\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void relation() throws ParseException {\r
+ /*@bgen(jjtree) relation */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTRELATION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ arithmetic_expression();\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 70:\r
+ case 71:\r
+ case 72:\r
+ case 73:\r
+ case 74:\r
+ case 75:\r
+ rel_op();\r
+ arithmetic_expression();\r
+ break;\r
+ default:\r
+ jj_la1[9] = jj_gen;\r
+ ;\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void rel_op() throws ParseException {\r
+ /*@bgen(jjtree) rel_op */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTREL_OP);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 70:\r
+ jj_consume_token(70);\r
+ break;\r
+ case 71:\r
+ jj_consume_token(71);\r
+ break;\r
+ case 72:\r
+ jj_consume_token(72);\r
+ break;\r
+ case 73:\r
+ jj_consume_token(73);\r
+ break;\r
+ case 74:\r
+ jj_consume_token(74);\r
+ break;\r
+ case 75:\r
+ jj_consume_token(75);\r
+ break;\r
+ default:\r
+ jj_la1[10] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void arithmetic_expression() throws ParseException {\r
+ /*@bgen(jjtree) arithmetic_expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTARITHMETIC_EXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 76:\r
+ case 77:\r
+ case 78:\r
+ case 79:\r
+ add_op();\r
+ break;\r
+ default:\r
+ jj_la1[11] = jj_gen;\r
+ ;\r
+ }\r
+ term();\r
+ label_4:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 76:\r
+ case 77:\r
+ case 78:\r
+ case 79:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[12] = jj_gen;\r
+ break label_4;\r
+ }\r
+ add_op();\r
+ term();\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void add_op() throws ParseException {\r
+ /*@bgen(jjtree) add_op */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTADD_OP);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 76:\r
+ jj_consume_token(76);\r
+ break;\r
+ case 77:\r
+ jj_consume_token(77);\r
+ break;\r
+ case 78:\r
+ jj_consume_token(78);\r
+ break;\r
+ case 79:\r
+ jj_consume_token(79);\r
+ break;\r
+ default:\r
+ jj_la1[13] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void term() throws ParseException {\r
+ /*@bgen(jjtree) term */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTTERM);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ factor();\r
+ label_5:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 80:\r
+ case 81:\r
+ case 82:\r
+ case 83:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[14] = jj_gen;\r
+ break label_5;\r
+ }\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 80:\r
+ case 82:\r
+ multiplication();\r
+ break;\r
+ case 81:\r
+ case 83:\r
+ divide();\r
+ break;\r
+ default:\r
+ jj_la1[15] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ factor();\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void factor() throws ParseException {\r
+ /*@bgen(jjtree) factor */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFACTOR);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ primary();\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 84:\r
+ case 85:\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 84:\r
+ jj_consume_token(84);\r
+ primary();\r
+ break;\r
+ case 85:\r
+ jj_consume_token(85);\r
+ primary();\r
+ break;\r
+ default:\r
+ jj_la1[16] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ break;\r
+ default:\r
+ jj_la1[17] = jj_gen;\r
+ ;\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void multiplication() throws ParseException {\r
+ /*@bgen(jjtree) multiplication */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTMULTIPLICATION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 80:\r
+ jj_consume_token(80);\r
+ break;\r
+ case 82:\r
+ jj_consume_token(82);\r
+ break;\r
+ default:\r
+ jj_la1[18] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void divide() throws ParseException {\r
+ /*@bgen(jjtree) divide */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTDIVIDE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 81:\r
+ jj_consume_token(81);\r
+ break;\r
+ case 83:\r
+ jj_consume_token(83);\r
+ break;\r
+ default:\r
+ jj_la1[19] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void primary() throws ParseException {\r
+ /*@bgen(jjtree) primary */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTPRIMARY);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 6:\r
+ case 33:\r
+ case STRING:\r
+ case UNSIGNED_INTEGER:\r
+ case UNSIGNED_NUMBER:\r
+ value();\r
+ break;\r
+ default:\r
+ jj_la1[21] = jj_gen;\r
+ if (jj_2_1(2147483647)) {\r
+ function_call();\r
+ } else {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case IDENT:\r
+ component_reference_full();\r
+ break;\r
+ case 60:\r
+ parenthesis_expression();\r
+ break;\r
+ case 64:\r
+ jj_consume_token(64);\r
+ expression_list();\r
+ label_6:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 68:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[20] = jj_gen;\r
+ break label_6;\r
+ }\r
+ jj_consume_token(68);\r
+ expression_list();\r
+ }\r
+ jj_consume_token(65);\r
+ break;\r
+ case 62:\r
+ jj_consume_token(62);\r
+ function_arguments();\r
+ jj_consume_token(63);\r
+ break;\r
+ case 35:\r
+ jj_consume_token(35);\r
+ break;\r
+ default:\r
+ jj_la1[22] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ }\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void component_reference_full() throws ParseException {\r
+ /*@bgen(jjtree) component_reference_full */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTCOMPONENT_REFERENCE_FULL);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ component_reference();\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void function_call() throws ParseException {\r
+ /*@bgen(jjtree) function_call */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFUNCTION_CALL);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ name();\r
+ function_call_args();\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void parenthesis_expression() throws ParseException {\r
+ /*@bgen(jjtree) parenthesis_expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTPARENTHESIS_EXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ parenthesis_open();\r
+ expression();\r
+ parenthesis_close();\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void value() throws ParseException {\r
+ /*@bgen(jjtree) value */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTVALUE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case UNSIGNED_NUMBER:\r
+ jj_consume_token(UNSIGNED_NUMBER);\r
+ break;\r
+ case UNSIGNED_INTEGER:\r
+ jj_consume_token(UNSIGNED_INTEGER);\r
+ break;\r
+ case STRING:\r
+ jj_consume_token(STRING);\r
+ break;\r
+ case 6:\r
+ jj_consume_token(6);\r
+ break;\r
+ case 33:\r
+ jj_consume_token(33);\r
+ break;\r
+ default:\r
+ jj_la1[23] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void parenthesis_open() throws ParseException {\r
+ /*@bgen(jjtree) parenthesis_open */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTPARENTHESIS_OPEN);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ jj_consume_token(60);\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void parenthesis_close() throws ParseException {\r
+ /*@bgen(jjtree) parenthesis_close */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTPARENTHESIS_CLOSE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ jj_consume_token(61);\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void name() throws ParseException {\r
+ /*@bgen(jjtree) name */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTNAME);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ jj_consume_token(IDENT);\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 66:\r
+ jj_consume_token(66);\r
+ name();\r
+ break;\r
+ default:\r
+ jj_la1[24] = jj_gen;\r
+ ;\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void component_reference() throws ParseException {\r
+ /*@bgen(jjtree) component_reference */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTCOMPONENT_REFERENCE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ component_identity();\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 64:\r
+ array_subscripts();\r
+ break;\r
+ default:\r
+ jj_la1[25] = jj_gen;\r
+ ;\r
+ }\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 66:\r
+ jj_consume_token(66);\r
+ component_reference();\r
+ break;\r
+ default:\r
+ jj_la1[26] = jj_gen;\r
+ ;\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void component_identity() throws ParseException {\r
+ /*@bgen(jjtree) component_identity */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTCOMPONENT_IDENTITY);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ jj_consume_token(IDENT);\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void function_call_args() throws ParseException {\r
+ /*@bgen(jjtree) function_call_args */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFUNCTION_CALL_ARGS);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ parenthesis_open();\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 6:\r
+ case 12:\r
+ case 31:\r
+ case 33:\r
+ case 35:\r
+ case 60:\r
+ case 62:\r
+ case 64:\r
+ case 76:\r
+ case 77:\r
+ case 78:\r
+ case 79:\r
+ case IDENT:\r
+ case STRING:\r
+ case UNSIGNED_INTEGER:\r
+ case UNSIGNED_NUMBER:\r
+ function_arguments();\r
+ break;\r
+ default:\r
+ jj_la1[27] = jj_gen;\r
+ ;\r
+ }\r
+ parenthesis_close();\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void function_arguments() throws ParseException {\r
+ /*@bgen(jjtree) function_arguments */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFUNCTION_ARGUMENTS);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ if (jj_2_2(2)) {\r
+ named_argument();\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 69:\r
+ jj_consume_token(69);\r
+ function_arguments();\r
+ break;\r
+ default:\r
+ jj_la1[28] = jj_gen;\r
+ ;\r
+ }\r
+ } else {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 6:\r
+ case 12:\r
+ case 31:\r
+ case 33:\r
+ case 35:\r
+ case 60:\r
+ case 62:\r
+ case 64:\r
+ case 76:\r
+ case 77:\r
+ case 78:\r
+ case 79:\r
+ case IDENT:\r
+ case STRING:\r
+ case UNSIGNED_INTEGER:\r
+ case UNSIGNED_NUMBER:\r
+ expression();\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 21:\r
+ case 69:\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 69:\r
+ jj_consume_token(69);\r
+ function_arguments();\r
+ break;\r
+ case 21:\r
+ jj_consume_token(21);\r
+ for_indices();\r
+ break;\r
+ default:\r
+ jj_la1[29] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ break;\r
+ default:\r
+ jj_la1[30] = jj_gen;\r
+ ;\r
+ }\r
+ break;\r
+ default:\r
+ jj_la1[31] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void for_indices() throws ParseException {\r
+ /*@bgen(jjtree) for_indices */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFOR_INDICES);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ for_index();\r
+ label_7:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 69:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[32] = jj_gen;\r
+ break label_7;\r
+ }\r
+ jj_consume_token(69);\r
+ for_index();\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void for_index() throws ParseException {\r
+ /*@bgen(jjtree) for_index */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFOR_INDEX);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ jj_consume_token(IDENT);\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 41:\r
+ jj_consume_token(41);\r
+ expression();\r
+ break;\r
+ default:\r
+ jj_la1[33] = jj_gen;\r
+ ;\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+/* Removed by Teemu. Refactored in function_arguments)\r
+void named_arguments() : {\r
+} {\r
+ named_argument() ( "," named_arguments() )?\r
+}\r
+*/\r
+ final public void named_argument() throws ParseException {\r
+ /*@bgen(jjtree) named_argument */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTNAMED_ARGUMENT);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ jj_consume_token(IDENT);\r
+ jj_consume_token(86);\r
+ expression();\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void output_expression_list() throws ParseException {\r
+ /*@bgen(jjtree) output_expression_list */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTOUTPUT_EXPRESSION_LIST);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 6:\r
+ case 12:\r
+ case 31:\r
+ case 33:\r
+ case 35:\r
+ case 60:\r
+ case 62:\r
+ case 64:\r
+ case 76:\r
+ case 77:\r
+ case 78:\r
+ case 79:\r
+ case IDENT:\r
+ case STRING:\r
+ case UNSIGNED_INTEGER:\r
+ case UNSIGNED_NUMBER:\r
+ expression();\r
+ break;\r
+ default:\r
+ jj_la1[34] = jj_gen;\r
+ ;\r
+ }\r
+ label_8:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 69:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[35] = jj_gen;\r
+ break label_8;\r
+ }\r
+ jj_consume_token(69);\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 6:\r
+ case 12:\r
+ case 31:\r
+ case 33:\r
+ case 35:\r
+ case 60:\r
+ case 62:\r
+ case 64:\r
+ case 76:\r
+ case 77:\r
+ case 78:\r
+ case 79:\r
+ case IDENT:\r
+ case STRING:\r
+ case UNSIGNED_INTEGER:\r
+ case UNSIGNED_NUMBER:\r
+ expression();\r
+ break;\r
+ default:\r
+ jj_la1[36] = jj_gen;\r
+ ;\r
+ }\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void expression_list() throws ParseException {\r
+ /*@bgen(jjtree) expression_list */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTEXPRESSION_LIST);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ expression();\r
+ label_9:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 69:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[37] = jj_gen;\r
+ break label_9;\r
+ }\r
+ jj_consume_token(69);\r
+ expression();\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void array_subscripts() throws ParseException {\r
+ /*@bgen(jjtree) array_subscripts */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTARRAY_SUBSCRIPTS);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ jj_consume_token(64);\r
+ subscript();\r
+ label_10:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 69:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[38] = jj_gen;\r
+ break label_10;\r
+ }\r
+ jj_consume_token(69);\r
+ subscript();\r
+ }\r
+ jj_consume_token(65);\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void subscript() throws ParseException {\r
+ /*@bgen(jjtree) subscript */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTSUBSCRIPT);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 67:\r
+ jj_consume_token(67);\r
+ break;\r
+ default:\r
+ jj_la1[40] = jj_gen;\r
+ if (jj_2_3(2147483647)) {\r
+ name();\r
+ function_call_args();\r
+ } else {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case IDENT:\r
+ case UNSIGNED_INTEGER:\r
+ rangeIndex();\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 67:\r
+ jj_consume_token(67);\r
+ rangeIndex();\r
+ break;\r
+ default:\r
+ jj_la1[39] = jj_gen;\r
+ ;\r
+ }\r
+ break;\r
+ default:\r
+ jj_la1[41] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ }\r
+ }\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ {if (true) throw (RuntimeException)jjte000;}\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ {if (true) throw (ParseException)jjte000;}\r
+ }\r
+ {if (true) throw (Error)jjte000;}\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ final public void rangeIndex() throws ParseException {\r
+ /*@bgen(jjtree) rangeIndex */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTRANGEINDEX);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+ try {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case UNSIGNED_INTEGER:\r
+ jj_consume_token(UNSIGNED_INTEGER);\r
+ break;\r
+ case IDENT:\r
+ jj_consume_token(IDENT);\r
+ break;\r
+ default:\r
+ jj_la1[42] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+ }\r
+\r
+ private boolean jj_2_1(int xla) {\r
+ jj_la = xla; jj_lastpos = jj_scanpos = token;\r
+ try { return !jj_3_1(); }\r
+ catch(LookaheadSuccess ls) { return true; }\r
+ finally { jj_save(0, xla); }\r
+ }\r
+\r
+ private boolean jj_2_2(int xla) {\r
+ jj_la = xla; jj_lastpos = jj_scanpos = token;\r
+ try { return !jj_3_2(); }\r
+ catch(LookaheadSuccess ls) { return true; }\r
+ finally { jj_save(1, xla); }\r
+ }\r
+\r
+ private boolean jj_2_3(int xla) {\r
+ jj_la = xla; jj_lastpos = jj_scanpos = token;\r
+ try { return !jj_3_3(); }\r
+ catch(LookaheadSuccess ls) { return true; }\r
+ finally { jj_save(2, xla); }\r
+ }\r
+\r
+ private boolean jj_3_2() {\r
+ if (jj_3R_13()) return true;\r
+ return false;\r
+ }\r
+\r
+ private boolean jj_3R_11() {\r
+ if (jj_scan_token(IDENT)) return true;\r
+ Token xsp;\r
+ xsp = jj_scanpos;\r
+ if (jj_3R_14()) jj_scanpos = xsp;\r
+ return false;\r
+ }\r
+\r
+ private boolean jj_3R_14() {\r
+ if (jj_scan_token(66)) return true;\r
+ if (jj_3R_11()) return true;\r
+ return false;\r
+ }\r
+\r
+ private boolean jj_3_3() {\r
+ if (jj_3R_11()) return true;\r
+ if (jj_3R_12()) return true;\r
+ return false;\r
+ }\r
+\r
+ private boolean jj_3R_12() {\r
+ if (jj_scan_token(60)) return true;\r
+ return false;\r
+ }\r
+\r
+ private boolean jj_3R_13() {\r
+ if (jj_scan_token(IDENT)) return true;\r
+ if (jj_scan_token(86)) return true;\r
+ return false;\r
+ }\r
+\r
+ private boolean jj_3_1() {\r
+ if (jj_3R_11()) return true;\r
+ if (jj_3R_12()) return true;\r
+ return false;\r
+ }\r
+\r
+ /** Generated Token Manager. */\r
+ public UnitParserTokenManager token_source;\r
+ SimpleCharStream jj_input_stream;\r
+ /** Current token. */\r
+ public Token token;\r
+ /** Next token. */\r
+ public Token jj_nt;\r
+ private int jj_ntk;\r
+ private Token jj_scanpos, jj_lastpos;\r
+ private int jj_la;\r
+ private int jj_gen;\r
+ final private int[] jj_la1 = new int[43];\r
+ static private int[] jj_la1_0;\r
+ static private int[] jj_la1_1;\r
+ static private int[] jj_la1_2;\r
+ static {\r
+ jj_la1_init_0();\r
+ jj_la1_init_1();\r
+ jj_la1_init_2();\r
+ }\r
+ private static void jj_la1_init_0() {\r
+ jj_la1_0 = new int[] {0x1040,0x80001041,0x80001040,0x100000,0x0,0x0,0x400000,0x200,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x40,0x0,0x0,0x0,0x80001040,0x0,0x200000,0x200000,0x80001040,0x0,0x0,0x80001040,0x0,0x80001040,0x0,0x0,0x0,0x0,0x0,0x0,};\r
+ }\r
+ private static void jj_la1_init_1() {\r
+ jj_la1_1 = new int[] {0x5000000a,0x5000000a,0x5000000a,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x50000008,0x2,0x0,0x0,0x0,0x5000000a,0x0,0x0,0x0,0x5000000a,0x0,0x200,0x5000000a,0x0,0x5000000a,0x0,0x0,0x0,0x0,0x0,0x0,};\r
+ }\r
+ private static void jj_la1_init_2() {\r
+ jj_la1_2 = new int[] {0xf00f001,0xf00f001,0xf00f001,0x0,0x8,0x8,0x0,0x0,0x0,0xfc0,0xfc0,0xf000,0xf000,0xf000,0xf0000,0xf0000,0x300000,0x300000,0x50000,0xa0000,0x10,0xe000000,0x1000001,0xe000000,0x4,0x1,0x4,0xf00f001,0x20,0x20,0x20,0xf00f001,0x20,0x0,0xf00f001,0x20,0xf00f001,0x20,0x20,0x8,0x8,0x5000000,0x5000000,};\r
+ }\r
+ final private JJCalls[] jj_2_rtns = new JJCalls[3];\r
+ private boolean jj_rescan = false;\r
+ private int jj_gc = 0;\r
+\r
+ /** Constructor with InputStream. */\r
+ public UnitParser(java.io.InputStream stream) {\r
+ this(stream, null);\r
+ }\r
+ /** Constructor with InputStream and supplied encoding */\r
+ public UnitParser(java.io.InputStream stream, String encoding) {\r
+ try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\r
+ token_source = new UnitParserTokenManager(jj_input_stream);\r
+ token = new Token();\r
+ jj_ntk = -1;\r
+ jj_gen = 0;\r
+ for (int i = 0; i < 43; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.InputStream stream) {\r
+ ReInit(stream, null);\r
+ }\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.InputStream stream, String encoding) {\r
+ try { jj_input_stream.ReInit(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\r
+ token_source.ReInit(jj_input_stream);\r
+ token = new Token();\r
+ jj_ntk = -1;\r
+ jjtree.reset();\r
+ jj_gen = 0;\r
+ for (int i = 0; i < 43; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\r
+ }\r
+\r
+ /** Constructor. */\r
+ public UnitParser(java.io.Reader stream) {\r
+ jj_input_stream = new SimpleCharStream(stream, 1, 1);\r
+ token_source = new UnitParserTokenManager(jj_input_stream);\r
+ token = new Token();\r
+ jj_ntk = -1;\r
+ jj_gen = 0;\r
+ for (int i = 0; i < 43; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(java.io.Reader stream) {\r
+ jj_input_stream.ReInit(stream, 1, 1);\r
+ token_source.ReInit(jj_input_stream);\r
+ token = new Token();\r
+ jj_ntk = -1;\r
+ jjtree.reset();\r
+ jj_gen = 0;\r
+ for (int i = 0; i < 43; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\r
+ }\r
+\r
+ /** Constructor with generated Token Manager. */\r
+ public UnitParser(UnitParserTokenManager tm) {\r
+ token_source = tm;\r
+ token = new Token();\r
+ jj_ntk = -1;\r
+ jj_gen = 0;\r
+ for (int i = 0; i < 43; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\r
+ }\r
+\r
+ /** Reinitialise. */\r
+ public void ReInit(UnitParserTokenManager tm) {\r
+ token_source = tm;\r
+ token = new Token();\r
+ jj_ntk = -1;\r
+ jjtree.reset();\r
+ jj_gen = 0;\r
+ for (int i = 0; i < 43; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\r
+ }\r
+\r
+ private Token jj_consume_token(int kind) throws ParseException {\r
+ Token oldToken;\r
+ if ((oldToken = token).next != null) token = token.next;\r
+ else token = token.next = token_source.getNextToken();\r
+ jj_ntk = -1;\r
+ if (token.kind == kind) {\r
+ jj_gen++;\r
+ if (++jj_gc > 100) {\r
+ jj_gc = 0;\r
+ for (int i = 0; i < jj_2_rtns.length; i++) {\r
+ JJCalls c = jj_2_rtns[i];\r
+ while (c != null) {\r
+ if (c.gen < jj_gen) c.first = null;\r
+ c = c.next;\r
+ }\r
+ }\r
+ }\r
+ return token;\r
+ }\r
+ token = oldToken;\r
+ jj_kind = kind;\r
+ throw generateParseException();\r
+ }\r
+\r
+ static private final class LookaheadSuccess extends java.lang.Error { }\r
+ final private LookaheadSuccess jj_ls = new LookaheadSuccess();\r
+ private boolean jj_scan_token(int kind) {\r
+ if (jj_scanpos == jj_lastpos) {\r
+ jj_la--;\r
+ if (jj_scanpos.next == null) {\r
+ jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();\r
+ } else {\r
+ jj_lastpos = jj_scanpos = jj_scanpos.next;\r
+ }\r
+ } else {\r
+ jj_scanpos = jj_scanpos.next;\r
+ }\r
+ if (jj_rescan) {\r
+ int i = 0; Token tok = token;\r
+ while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }\r
+ if (tok != null) jj_add_error_token(kind, i);\r
+ }\r
+ if (jj_scanpos.kind != kind) return true;\r
+ if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;\r
+ return false;\r
+ }\r
+\r
+\r
+/** Get the next Token. */\r
+ final public Token getNextToken() {\r
+ if (token.next != null) token = token.next;\r
+ else token = token.next = token_source.getNextToken();\r
+ jj_ntk = -1;\r
+ jj_gen++;\r
+ return token;\r
+ }\r
+\r
+/** Get the specific Token. */\r
+ final public Token getToken(int index) {\r
+ Token t = token;\r
+ for (int i = 0; i < index; i++) {\r
+ if (t.next != null) t = t.next;\r
+ else t = t.next = token_source.getNextToken();\r
+ }\r
+ return t;\r
+ }\r
+\r
+ private int jj_ntk() {\r
+ if ((jj_nt=token.next) == null)\r
+ return (jj_ntk = (token.next=token_source.getNextToken()).kind);\r
+ else\r
+ return (jj_ntk = jj_nt.kind);\r
+ }\r
+\r
+ private java.util.List<int[]> jj_expentries = new java.util.ArrayList<int[]>();\r
+ private int[] jj_expentry;\r
+ private int jj_kind = -1;\r
+ private int[] jj_lasttokens = new int[100];\r
+ private int jj_endpos;\r
+\r
+ private void jj_add_error_token(int kind, int pos) {\r
+ if (pos >= 100) return;\r
+ if (pos == jj_endpos + 1) {\r
+ jj_lasttokens[jj_endpos++] = kind;\r
+ } else if (jj_endpos != 0) {\r
+ jj_expentry = new int[jj_endpos];\r
+ for (int i = 0; i < jj_endpos; i++) {\r
+ jj_expentry[i] = jj_lasttokens[i];\r
+ }\r
+ jj_entries_loop: for (java.util.Iterator<?> it = jj_expentries.iterator(); it.hasNext();) {\r
+ int[] oldentry = (int[])(it.next());\r
+ if (oldentry.length == jj_expentry.length) {\r
+ for (int i = 0; i < jj_expentry.length; i++) {\r
+ if (oldentry[i] != jj_expentry[i]) {\r
+ continue jj_entries_loop;\r
+ }\r
+ }\r
+ jj_expentries.add(jj_expentry);\r
+ break jj_entries_loop;\r
+ }\r
+ }\r
+ if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;\r
+ }\r
+ }\r
+\r
+ /** Generate ParseException. */\r
+ public ParseException generateParseException() {\r
+ jj_expentries.clear();\r
+ boolean[] la1tokens = new boolean[92];\r
+ if (jj_kind >= 0) {\r
+ la1tokens[jj_kind] = true;\r
+ jj_kind = -1;\r
+ }\r
+ for (int i = 0; i < 43; i++) {\r
+ if (jj_la1[i] == jj_gen) {\r
+ for (int j = 0; j < 32; j++) {\r
+ if ((jj_la1_0[i] & (1<<j)) != 0) {\r
+ la1tokens[j] = true;\r
+ }\r
+ if ((jj_la1_1[i] & (1<<j)) != 0) {\r
+ la1tokens[32+j] = true;\r
+ }\r
+ if ((jj_la1_2[i] & (1<<j)) != 0) {\r
+ la1tokens[64+j] = true;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ for (int i = 0; i < 92; i++) {\r
+ if (la1tokens[i]) {\r
+ jj_expentry = new int[1];\r
+ jj_expentry[0] = i;\r
+ jj_expentries.add(jj_expentry);\r
+ }\r
+ }\r
+ jj_endpos = 0;\r
+ jj_rescan_token();\r
+ jj_add_error_token(0, 0);\r
+ int[][] exptokseq = new int[jj_expentries.size()][];\r
+ for (int i = 0; i < jj_expentries.size(); i++) {\r
+ exptokseq[i] = jj_expentries.get(i);\r
+ }\r
+ return new ParseException(token, exptokseq, tokenImage);\r
+ }\r
+\r
+ /** Enable tracing. */\r
+ final public void enable_tracing() {\r
+ }\r
+\r
+ /** Disable tracing. */\r
+ final public void disable_tracing() {\r
+ }\r
+\r
+ private void jj_rescan_token() {\r
+ jj_rescan = true;\r
+ for (int i = 0; i < 3; i++) {\r
+ try {\r
+ JJCalls p = jj_2_rtns[i];\r
+ do {\r
+ if (p.gen > jj_gen) {\r
+ jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;\r
+ switch (i) {\r
+ case 0: jj_3_1(); break;\r
+ case 1: jj_3_2(); break;\r
+ case 2: jj_3_3(); break;\r
+ }\r
+ }\r
+ p = p.next;\r
+ } while (p != null);\r
+ } catch(LookaheadSuccess ls) { }\r
+ }\r
+ jj_rescan = false;\r
+ }\r
+\r
+ private void jj_save(int index, int xla) {\r
+ JJCalls p = jj_2_rtns[index];\r
+ while (p.gen > jj_gen) {\r
+ if (p.next == null) { p = p.next = new JJCalls(); break; }\r
+ p = p.next;\r
+ }\r
+ p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;\r
+ }\r
+\r
+ static final class JJCalls {\r
+ int gen;\r
+ Token first;\r
+ int arg;\r
+ JJCalls next;\r
+ }\r
+\r
+}\r
--- /dev/null
+/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. UnitParser.jj */\r
+/*@egen*/options {\r
+ JDK_VERSION = "1.6";\r
+ STATIC = false;\r
+ \r
+ \r
+ \r
+}\r
+\r
+PARSER_BEGIN(UnitParser)\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+public class UnitParser/*@bgen(jjtree)*/implements UnitParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/\r
+ protected JJTUnitParserState jjtree = new JJTUnitParserState();\r
+\r
+/*@egen*/\r
+\r
+ \r
+ \r
+}\r
+PARSER_END(UnitParser)\r
+\r
+/*** Lexer *********************************************************/\r
+\r
+SKIP:\r
+{ <WHITESPACE: " " | "\n" | "\r" | "\t" > \r
+| <COMMENT1: "/*" (~["*"] | "*" ~["/"])* "*/" > \r
+| <COMMENT2: "//" (~["\n"])* >\r
+}\r
+\r
+TOKEN:\r
+{\r
+"algorithm" | "discrete" | "false" | "model" | "redeclare"\r
+| "and" | "each" | "final" | "not" | "replaceable"\r
+| "annotation" | "else" | "flow" | "operator" | "return"\r
+|"assert" | "elseif" | "for" | "or" | "stream"\r
+| "block" | "elsewhen" | "function" | "outer" | "then"\r
+| "break" | "encapsulated" | "if" | "output" | "true"\r
+| "class" | "end" | "import" | "package" | "type"\r
+| "connect" | "enumeration" | "in" | "parameter" | "when"\r
+| "connector" | "equation" | /*"initial" |*/ "partial" | "while"\r
+| "constant" | "expandable" | "inner" | "protected" | "within"\r
+| "constrainedby" | "extends" | "input" | "public"\r
+| /*"der" |*/ "external" | "loop" | "record"\r
+| "(" | ")" | "{" | "}" | "[" | "]" | "." | ":" | ";" | ","\r
+| "<" | "<=" | ">" | ">=" | "==" | "<>"\r
+| "+" | "-" | ".+" | ".-"\r
+| "*" | "/" | ".*" | "./"\r
+| "^" | ".^"\r
+| "=" | ":=" \r
+| <IDENT: ["a"-"z","A"-"Z","_"] (["a"-"z","A"-"Z","_","0"-"9"])* >\r
+| <STRING: "\"" (~["\"", "\\", "\n"] | "\\" ~["\n"])* "\"">\r
+ { matchedToken.image = matchedToken.image.substring(1,matchedToken.image.length()-1); }\r
+| <UNSIGNED_INTEGER: (["0"-"9"])+ >\r
+| <UNSIGNED_NUMBER: \r
+ ( <UNSIGNED_INTEGER> "." (<UNSIGNED_INTEGER>)? (["e","E"] <UNSIGNED_INTEGER>)?\r
+ | "." <UNSIGNED_INTEGER> (["e","E"] <UNSIGNED_INTEGER>)?\r
+ | <UNSIGNED_INTEGER> ["e","E"] <UNSIGNED_INTEGER>\r
+ ) >\r
+}\r
+\r
+/*** Parser ********************************************************/\r
+\r
+// https://javacc.dev.java.net/doc/javaccgrm.html\r
+// add_op -> add_op()\r
+// [ add_op ] -> ( add_op() )?\r
+// { add_op term } -> ( add_op() term() )*\r
+\r
+SimpleNode expr() : {/*@bgen(jjtree) expr */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTEXPR);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) expr */\r
+ try {\r
+/*@egen*/\r
+ (simple_expression())? <EOF>/*@bgen(jjtree)*/\r
+ {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtc000 = false;\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+/*@egen*/\r
+ {\r
+ return jjtn000;\r
+ }\r
+ |\r
+ ifthenelse() <EOF>/*@bgen(jjtree)*/\r
+ {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtc000 = false;\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+/*@egen*/\r
+ {\r
+ return jjtn000;\r
+ }/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void expression() : {/*@bgen(jjtree) expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTEXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) expression */\r
+ try {\r
+/*@egen*/\r
+ simple_expression()\r
+ | ifthenelse()/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void ifthenelse() : {/*@bgen(jjtree) ifthenelse */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTIFTHENELSE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r} {/*@bgen(jjtree) ifthenelse */\r
+ try {\r
+/*@egen*/\r
+ "if" condition() "then" expression() ( "elseif" condition() "then" expression() )* "else" expression()/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r\r
+void condition() : {/*@bgen(jjtree) condition */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTCONDITION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) condition */\r
+ try {\r
+/*@egen*/\r
+ expression()/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r \r \r
+\r
+void simple_expression() : {/*@bgen(jjtree) simple_expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTSIMPLE_EXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) simple_expression */\r
+ try {\r
+/*@egen*/\r
+ logical_expression() ( ":" logical_expression() ( ":" logical_expression() )? )?/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+} \r
+\r
+void logical_expression() : {/*@bgen(jjtree) logical_expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTLOGICAL_EXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) logical_expression */\r
+ try {\r
+/*@egen*/\r
+ logical_term() ( "or" logical_term() )*/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+} \r
+\r
+void logical_term() : {/*@bgen(jjtree) logical_term */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTLOGICAL_TERM);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) logical_term */\r
+ try {\r
+/*@egen*/\r
+ logical_factor() ( "and" logical_factor() )*/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void logical_factor() : {/*@bgen(jjtree) logical_factor */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTLOGICAL_FACTOR);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) logical_factor */\r
+ try {\r
+/*@egen*/\r
+ ( "not" )? relation()/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void relation() : {/*@bgen(jjtree) relation */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTRELATION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) relation */\r
+ try {\r
+/*@egen*/\r
+ arithmetic_expression() ( rel_op() arithmetic_expression() )?/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void rel_op() : {/*@bgen(jjtree) rel_op */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTREL_OP);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) rel_op */\r
+ try {\r
+/*@egen*/\r
+ "<" | "<=" | ">" | ">=" | "==" | "<>"/*@bgen(jjtree)*/\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void arithmetic_expression() : {/*@bgen(jjtree) arithmetic_expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTARITHMETIC_EXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) arithmetic_expression */\r
+ try {\r
+/*@egen*/\r
+ (add_op())? term() (add_op() term())*/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void add_op() : {/*@bgen(jjtree) add_op */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTADD_OP);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) add_op */\r
+ try {\r
+/*@egen*/\r
+ "+" | "-" | ".+" | ".-"/*@bgen(jjtree)*/\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void term() : {/*@bgen(jjtree) term */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTTERM);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) term */\r
+ try {\r
+/*@egen*/\r
+ factor() ( (multiplication() | divide()) factor() )*/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void factor() : {/*@bgen(jjtree) factor */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFACTOR);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) factor */\r
+ try {\r
+/*@egen*/\r
+ primary() ( "^" primary() | ".^" primary() )?/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void multiplication() : {/*@bgen(jjtree) multiplication */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTMULTIPLICATION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) multiplication */\r
+ try {\r
+/*@egen*/\r
+ "*" | ".*"/*@bgen(jjtree)*/\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void divide() : {/*@bgen(jjtree) divide */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTDIVIDE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) divide */\r
+ try {\r
+/*@egen*/\r
+ "/" | "./"/*@bgen(jjtree)*/\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void primary() : {/*@bgen(jjtree) primary */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTPRIMARY);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) primary */\r
+ try {\r
+/*@egen*/\r
+ value()\r
+ | LOOKAHEAD( name() parenthesis_open() ) function_call() \r
+ | component_reference_full()\r
+ /*| "(" output_expression_list() ")"*/ // Not needed, replaced with following:\r
+ | parenthesis_expression()\r
+ | "[" expression_list() ( ";" expression_list() )* "]"\r
+ | "{" function_arguments() "}"\r
+ | "end"/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void component_reference_full() : {/*@bgen(jjtree) component_reference_full */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTCOMPONENT_REFERENCE_FULL);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) component_reference_full */\r
+ try {\r
+/*@egen*/\r
+ component_reference()/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void function_call() : {/*@bgen(jjtree) function_call */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFUNCTION_CALL);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) function_call */\r
+ try {\r
+/*@egen*/\r
+ name() function_call_args()/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void parenthesis_expression() : {/*@bgen(jjtree) parenthesis_expression */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTPARENTHESIS_EXPRESSION);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r} {/*@bgen(jjtree) parenthesis_expression */\r
+ try {\r
+/*@egen*/\r parenthesis_open() expression() parenthesis_close()/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void value() : {/*@bgen(jjtree) value */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTVALUE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r} {/*@bgen(jjtree) value */\r
+ try {\r
+/*@egen*/\r
+ <UNSIGNED_NUMBER>\r
+ | <UNSIGNED_INTEGER>\r
+ | <STRING>\r
+ | "false"\r
+ | "true"/*@bgen(jjtree)*/\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r \r
+\r
+void parenthesis_open() : {/*@bgen(jjtree) parenthesis_open */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTPARENTHESIS_OPEN);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) parenthesis_open */\r
+ try {\r
+/*@egen*/\r
+ "("/*@bgen(jjtree)*/\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void parenthesis_close() : {/*@bgen(jjtree) parenthesis_close */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTPARENTHESIS_CLOSE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) parenthesis_close */\r
+ try {\r
+/*@egen*/\r
+ ")"/*@bgen(jjtree)*/\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void name() : {/*@bgen(jjtree) name */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTNAME);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) name */\r
+ try {\r
+/*@egen*/\r
+ <IDENT> ( "." name() )?/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void component_reference() : {/*@bgen(jjtree) component_reference */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTCOMPONENT_REFERENCE);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) component_reference */\r
+ try {\r
+/*@egen*/\r
+ //IDENT [ array_subscripts ] [ "." component_reference ]\r
+ component_identity() ( array_subscripts() )? ( "." component_reference() )?/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void component_identity() : {/*@bgen(jjtree) component_identity */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTCOMPONENT_IDENTITY);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) component_identity */\r
+ try {\r
+/*@egen*/\r <IDENT>/*@bgen(jjtree)*/\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r \r
+\r
+void function_call_args() : {/*@bgen(jjtree) function_call_args */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFUNCTION_CALL_ARGS);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) function_call_args */\r
+ try {\r
+/*@egen*/\r
+ parenthesis_open() ( function_arguments() )? parenthesis_close()/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void function_arguments() : {/*@bgen(jjtree) function_arguments */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFUNCTION_ARGUMENTS);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) function_arguments */\r
+ try {\r
+/*@egen*/\r
+ //expression [ "," function_arguments | for for_indices ]\r
+ //| named_arguments\r
+ LOOKAHEAD(2) named_argument() ( "," function_arguments() )?\r
+ | expression() ( "," function_arguments() | "for" for_indices() )?/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+ \r
+}\r
+\r
+void for_indices() : {/*@bgen(jjtree) for_indices */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFOR_INDICES);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) for_indices */\r
+ try {\r
+/*@egen*/\r
+ //for_index {"," for_index}\r
+ for_index() ("," for_index())*/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void for_index() : {/*@bgen(jjtree) for_index */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTFOR_INDEX);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) for_index */\r
+ try {\r
+/*@egen*/\r
+ //IDENT [ in expression ]\r
+ <IDENT> ( "in" expression() )?/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+/* Removed by Teemu. Refactored in function_arguments)\r
+void named_arguments() : {\r
+} {\r
+ named_argument() ( "," named_arguments() )?\r
+}\r
+*/\r
+\r
+void named_argument() : {/*@bgen(jjtree) named_argument */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTNAMED_ARGUMENT);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) named_argument */\r
+ try {\r
+/*@egen*/ \r
+ <IDENT> "=" expression()/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void output_expression_list() : {/*@bgen(jjtree) output_expression_list */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTOUTPUT_EXPRESSION_LIST);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) output_expression_list */\r
+ try {\r
+/*@egen*/\r
+ ( expression() )? ( "," ( expression() )? )*/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+\r
+void expression_list() : {/*@bgen(jjtree) expression_list */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTEXPRESSION_LIST);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) expression_list */\r
+ try {\r
+/*@egen*/\r
+ expression() ( "," expression() )*/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void array_subscripts() : {/*@bgen(jjtree) array_subscripts */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTARRAY_SUBSCRIPTS);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) array_subscripts */\r
+ try {\r
+/*@egen*/\r
+ "[" subscript() ( "," subscript() )* "]"/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void subscript() : {/*@bgen(jjtree) subscript */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTSUBSCRIPT);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) subscript */\r
+ try {\r
+/*@egen*/\r ":"\r
+ | LOOKAHEAD( name() parenthesis_open() ) name() function_call_args()\r
+ | rangeIndex() ( ":" rangeIndex())?/*@bgen(jjtree)*/\r
+ } catch (Throwable jjte000) {\r
+ if (jjtc000) {\r
+ jjtree.clearNodeScope(jjtn000);\r
+ jjtc000 = false;\r
+ } else {\r
+ jjtree.popNode();\r
+ }\r
+ if (jjte000 instanceof RuntimeException) {\r
+ throw (RuntimeException)jjte000;\r
+ }\r
+ if (jjte000 instanceof ParseException) {\r
+ throw (ParseException)jjte000;\r
+ }\r
+ throw (Error)jjte000;\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r
+\r
+void rangeIndex() : {/*@bgen(jjtree) rangeIndex */\r
+ UnitCheckingNode jjtn000 = (UnitCheckingNode)UnitCheckingNodeFactory.jjtCreate(JJTRANGEINDEX);\r
+ boolean jjtc000 = true;\r
+ jjtree.openNodeScope(jjtn000);\r
+ jjtn000.jjtSetFirstToken(getToken(1));\r
+/*@egen*/\r
+} {/*@bgen(jjtree) rangeIndex */\r
+ try {\r
+/*@egen*/\r <UNSIGNED_INTEGER>\r
+ | <IDENT>/*@bgen(jjtree)*/\r
+ } finally {\r
+ if (jjtc000) {\r
+ jjtree.closeNodeScope(jjtn000, true);\r
+ jjtn000.jjtSetLastToken(getToken(0));\r
+ }\r
+ }\r
+/*@egen*/\r
+}\r \r
+\r
--- /dev/null
+/* Generated By:JJTree&JavaCC: Do not edit this line. UnitParserConstants.java */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+\r
+/**\r
+ * Token literal values and constants.\r
+ * Generated by org.javacc.parser.OtherFilesGen#start()\r
+ */\r
+public interface UnitParserConstants {\r
+\r
+ /** End of File. */\r
+ int EOF = 0;\r
+ /** RegularExpression Id. */\r
+ int WHITESPACE = 1;\r
+ /** RegularExpression Id. */\r
+ int COMMENT1 = 2;\r
+ /** RegularExpression Id. */\r
+ int COMMENT2 = 3;\r
+ /** RegularExpression Id. */\r
+ int IDENT = 88;\r
+ /** RegularExpression Id. */\r
+ int STRING = 89;\r
+ /** RegularExpression Id. */\r
+ int UNSIGNED_INTEGER = 90;\r
+ /** RegularExpression Id. */\r
+ int UNSIGNED_NUMBER = 91;\r
+\r
+ /** Lexical state. */\r
+ int DEFAULT = 0;\r
+\r
+ /** Literal token values. */\r
+ String[] tokenImage = {\r
+ "<EOF>",\r
+ "<WHITESPACE>",\r
+ "<COMMENT1>",\r
+ "<COMMENT2>",\r
+ "\"algorithm\"",\r
+ "\"discrete\"",\r
+ "\"false\"",\r
+ "\"model\"",\r
+ "\"redeclare\"",\r
+ "\"and\"",\r
+ "\"each\"",\r
+ "\"final\"",\r
+ "\"not\"",\r
+ "\"replaceable\"",\r
+ "\"annotation\"",\r
+ "\"else\"",\r
+ "\"flow\"",\r
+ "\"operator\"",\r
+ "\"return\"",\r
+ "\"assert\"",\r
+ "\"elseif\"",\r
+ "\"for\"",\r
+ "\"or\"",\r
+ "\"stream\"",\r
+ "\"block\"",\r
+ "\"elsewhen\"",\r
+ "\"function\"",\r
+ "\"outer\"",\r
+ "\"then\"",\r
+ "\"break\"",\r
+ "\"encapsulated\"",\r
+ "\"if\"",\r
+ "\"output\"",\r
+ "\"true\"",\r
+ "\"class\"",\r
+ "\"end\"",\r
+ "\"import\"",\r
+ "\"package\"",\r
+ "\"type\"",\r
+ "\"connect\"",\r
+ "\"enumeration\"",\r
+ "\"in\"",\r
+ "\"parameter\"",\r
+ "\"when\"",\r
+ "\"connector\"",\r
+ "\"equation\"",\r
+ "\"partial\"",\r
+ "\"while\"",\r
+ "\"constant\"",\r
+ "\"expandable\"",\r
+ "\"inner\"",\r
+ "\"protected\"",\r
+ "\"within\"",\r
+ "\"constrainedby\"",\r
+ "\"extends\"",\r
+ "\"input\"",\r
+ "\"public\"",\r
+ "\"external\"",\r
+ "\"loop\"",\r
+ "\"record\"",\r
+ "\"(\"",\r
+ "\")\"",\r
+ "\"{\"",\r
+ "\"}\"",\r
+ "\"[\"",\r
+ "\"]\"",\r
+ "\".\"",\r
+ "\":\"",\r
+ "\";\"",\r
+ "\",\"",\r
+ "\"<\"",\r
+ "\"<=\"",\r
+ "\">\"",\r
+ "\">=\"",\r
+ "\"==\"",\r
+ "\"<>\"",\r
+ "\"+\"",\r
+ "\"-\"",\r
+ "\".+\"",\r
+ "\".-\"",\r
+ "\"*\"",\r
+ "\"/\"",\r
+ "\".*\"",\r
+ "\"./\"",\r
+ "\"^\"",\r
+ "\".^\"",\r
+ "\"=\"",\r
+ "\":=\"",\r
+ "<IDENT>",\r
+ "<STRING>",\r
+ "<UNSIGNED_INTEGER>",\r
+ "<UNSIGNED_NUMBER>",\r
+ };\r
+\r
+}\r
--- /dev/null
+/* Generated By:JJTree&JavaCC: Do not edit this line. UnitParserTokenManager.java */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+/** Token Manager. */\r
+public class UnitParserTokenManager implements UnitParserConstants\r
+{\r
+\r
+ /** Debug output. */\r
+ public java.io.PrintStream debugStream = System.out;\r
+ /** Set debug output. */\r
+ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }\r
+private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1)
+{\r
+ switch (pos)
+ {\r
+ case 0:\r
+ if ((active0 & 0xffffffffffffff0L) != 0L)\r
+ {\r
+ jjmatchedKind = 88;\r
+ return 2;\r
+ }\r
+ if ((active1 & 0x20000L) != 0L)\r
+ return 13;\r
+ if ((active1 & 0x2cc004L) != 0L)\r
+ return 9;\r
+ return -1;\r
+ case 1:\r
+ if ((active0 & 0x84020080400000L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0xf7bfdff7fbffff0L) != 0L)\r
+ {\r
+ if (jjmatchedPos != 1)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 1;\r
+ }\r
+ return 2;\r
+ }\r
+ return -1;\r
+ case 2:\r
+ if ((active0 & 0x800201200L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0xffffdf77f9fedf0L) != 0L)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 2;\r
+ return 2;\r
+ }\r
+ return -1;\r
+ case 3:\r
+ if ((active0 & 0x400084212118400L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0xbfff5b56d8e69f0L) != 0L)\r
+ {\r
+ if (jjmatchedPos != 3)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 3;\r
+ }\r
+ return 2;\r
+ }\r
+ return -1;\r
+ case 4:\r
+ if ((active0 & 0x848004290008c0L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0xb7b75b1469e6130L) != 0L)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 4;\r
+ return 2;\r
+ }\r
+ return -1;\r
+ case 5:\r
+ if ((active0 & 0x9100011009c0000L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0x26b75a046026130L) != 0L)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 5;\r
+ return 2;\r
+ }\r
+ return -1;\r
+ case 6:\r
+ if ((active0 & 0x4050a000000000L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0x22b250046026130L) != 0L)\r
+ {\r
+ if (jjmatchedPos != 6)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 6;\r
+ }\r
+ return 2;\r
+ }\r
+ return -1;\r
+ case 7:\r
+ if ((active0 & 0x201200006020020L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0x2a150040006110L) != 0L)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 7;\r
+ return 2;\r
+ }\r
+ return -1;\r
+ case 8:\r
+ if ((active0 & 0x22010040006000L) != 0L)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 8;\r
+ return 2;\r
+ }\r
+ if ((active0 & 0x8140000000110L) != 0L)\r
+ return 2;\r
+ return -1;\r
+ case 9:\r
+ if ((active0 & 0x2000000004000L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0x20010040002000L) != 0L)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 9;\r
+ return 2;\r
+ }\r
+ return -1;\r
+ case 10:\r
+ if ((active0 & 0x10000002000L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0x20000040000000L) != 0L)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 10;\r
+ return 2;\r
+ }\r
+ return -1;\r
+ case 11:\r
+ if ((active0 & 0x40000000L) != 0L)\r
+ return 2;\r
+ if ((active0 & 0x20000000000000L) != 0L)\r
+ {\r
+ jjmatchedKind = 88;\r
+ jjmatchedPos = 11;\r
+ return 2;\r
+ }\r
+ return -1;\r
+ default :\r
+ return -1;\r
+ }\r
+}\r
+private final int jjStartNfa_0(int pos, long active0, long active1)
+{\r
+ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1);\r
+}\r
+private int jjStopAtPos(int pos, int kind)\r
+{\r
+ jjmatchedKind = kind;\r
+ jjmatchedPos = pos;\r
+ return pos + 1;\r
+}\r
+private int jjMoveStringLiteralDfa0_0()\r
+{\r
+ switch(curChar)\r
+ {\r
+ case 40:\r
+ return jjStopAtPos(0, 60);\r
+ case 41:\r
+ return jjStopAtPos(0, 61);\r
+ case 42:\r
+ return jjStopAtPos(0, 80);\r
+ case 43:\r
+ return jjStopAtPos(0, 76);\r
+ case 44:\r
+ return jjStopAtPos(0, 69);\r
+ case 45:\r
+ return jjStopAtPos(0, 77);\r
+ case 46:\r
+ jjmatchedKind = 66;\r
+ return jjMoveStringLiteralDfa1_0(0x0L, 0x2cc000L);\r
+ case 47:\r
+ return jjStartNfaWithStates_0(0, 81, 13);\r
+ case 58:\r
+ jjmatchedKind = 67;\r
+ return jjMoveStringLiteralDfa1_0(0x0L, 0x800000L);\r
+ case 59:\r
+ return jjStopAtPos(0, 68);\r
+ case 60:\r
+ jjmatchedKind = 70;\r
+ return jjMoveStringLiteralDfa1_0(0x0L, 0x880L);\r
+ case 61:\r
+ jjmatchedKind = 86;\r
+ return jjMoveStringLiteralDfa1_0(0x0L, 0x400L);\r
+ case 62:\r
+ jjmatchedKind = 72;\r
+ return jjMoveStringLiteralDfa1_0(0x0L, 0x200L);\r
+ case 91:\r
+ return jjStopAtPos(0, 64);\r
+ case 93:\r
+ return jjStopAtPos(0, 65);\r
+ case 94:\r
+ return jjStopAtPos(0, 84);\r
+ case 97:\r
+ return jjMoveStringLiteralDfa1_0(0x84210L, 0x0L);\r
+ case 98:\r
+ return jjMoveStringLiteralDfa1_0(0x21000000L, 0x0L);\r
+ case 99:\r
+ return jjMoveStringLiteralDfa1_0(0x21108400000000L, 0x0L);\r
+ case 100:\r
+ return jjMoveStringLiteralDfa1_0(0x20L, 0x0L);\r
+ case 101:\r
+ return jjMoveStringLiteralDfa1_0(0x242210842108400L, 0x0L);\r
+ case 102:\r
+ return jjMoveStringLiteralDfa1_0(0x4210840L, 0x0L);\r
+ case 105:\r
+ return jjMoveStringLiteralDfa1_0(0x84021080000000L, 0x0L);\r
+ case 108:\r
+ return jjMoveStringLiteralDfa1_0(0x400000000000000L, 0x0L);\r
+ case 109:\r
+ return jjMoveStringLiteralDfa1_0(0x80L, 0x0L);\r
+ case 110:\r
+ return jjMoveStringLiteralDfa1_0(0x1000L, 0x0L);\r
+ case 111:\r
+ return jjMoveStringLiteralDfa1_0(0x108420000L, 0x0L);\r
+ case 112:\r
+ return jjMoveStringLiteralDfa1_0(0x108442000000000L, 0x0L);\r
+ case 114:\r
+ return jjMoveStringLiteralDfa1_0(0x800000000042100L, 0x0L);\r
+ case 115:\r
+ return jjMoveStringLiteralDfa1_0(0x800000L, 0x0L);\r
+ case 116:\r
+ return jjMoveStringLiteralDfa1_0(0x4210000000L, 0x0L);\r
+ case 119:\r
+ return jjMoveStringLiteralDfa1_0(0x10880000000000L, 0x0L);\r
+ case 123:\r
+ return jjStopAtPos(0, 62);\r
+ case 125:\r
+ return jjStopAtPos(0, 63);\r
+ default :\r
+ return jjMoveNfa_0(0, 0);\r
+ }\r
+}\r
+private int jjMoveStringLiteralDfa1_0(long active0, long active1)\r
+{\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(0, active0, active1);\r
+ return 1;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 42:\r
+ if ((active1 & 0x40000L) != 0L)\r
+ return jjStopAtPos(1, 82);\r
+ break;\r
+ case 43:\r
+ if ((active1 & 0x4000L) != 0L)\r
+ return jjStopAtPos(1, 78);\r
+ break;\r
+ case 45:\r
+ if ((active1 & 0x8000L) != 0L)\r
+ return jjStopAtPos(1, 79);\r
+ break;\r
+ case 47:\r
+ if ((active1 & 0x80000L) != 0L)\r
+ return jjStopAtPos(1, 83);\r
+ break;\r
+ case 61:\r
+ if ((active1 & 0x80L) != 0L)\r
+ return jjStopAtPos(1, 71);\r
+ else if ((active1 & 0x200L) != 0L)\r
+ return jjStopAtPos(1, 73);\r
+ else if ((active1 & 0x400L) != 0L)\r
+ return jjStopAtPos(1, 74);\r
+ else if ((active1 & 0x800000L) != 0L)\r
+ return jjStopAtPos(1, 87);\r
+ break;\r
+ case 62:\r
+ if ((active1 & 0x800L) != 0L)\r
+ return jjStopAtPos(1, 75);\r
+ break;\r
+ case 94:\r
+ if ((active1 & 0x200000L) != 0L)\r
+ return jjStopAtPos(1, 85);\r
+ break;\r
+ case 97:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x442000000440L, active1, 0L);\r
+ case 101:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x800000000042100L, active1, 0L);\r
+ case 102:\r
+ if ((active0 & 0x80000000L) != 0L)\r
+ return jjStartNfaWithStates_0(1, 31, 2);\r
+ break;\r
+ case 104:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x880010000000L, active1, 0L);\r
+ case 105:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x10000000000820L, active1, 0L);\r
+ case 108:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x403118010L, active1, 0L);\r
+ case 109:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L, active1, 0L);\r
+ case 110:\r
+ if ((active0 & 0x20000000000L) != 0L)\r
+ {\r
+ jjmatchedKind = 41;\r
+ jjmatchedPos = 1;\r
+ }\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x84010840004200L, active1, 0L);\r
+ case 111:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x421108000201080L, active1, 0L);\r
+ case 112:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x20000L, active1, 0L);\r
+ case 113:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L, active1, 0L);\r
+ case 114:\r
+ if ((active0 & 0x400000L) != 0L)\r
+ return jjStartNfaWithStates_0(1, 22, 2);\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x8000220000000L, active1, 0L);\r
+ case 115:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x80000L, active1, 0L);\r
+ case 116:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x800000L, active1, 0L);\r
+ case 117:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x10000010c000000L, active1, 0L);\r
+ case 120:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x242000000000000L, active1, 0L);\r
+ case 121:\r
+ return jjMoveStringLiteralDfa2_0(active0, 0x4000000000L, active1, 0L);\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(0, active0, active1);\r
+}\r
+private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1)\r
+{\r
+ if (((active0 &= old0) | (active1 &= old1)) == 0L)\r
+ return jjStartNfa_0(0, old0, old1);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(1, active0, 0L);\r
+ return 2;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 97:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x400000000L);\r
+ case 98:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x100000000000000L);\r
+ case 99:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x800002040000400L);\r
+ case 100:\r
+ if ((active0 & 0x200L) != 0L)\r
+ return jjStartNfaWithStates_0(2, 9, 2);\r
+ else if ((active0 & 0x800000000L) != 0L)\r
+ return jjStartNfaWithStates_0(2, 35, 2);\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x180L);\r
+ case 101:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x80030020000L);\r
+ case 103:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x10L);\r
+ case 105:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x800000000000L);\r
+ case 108:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x40L);\r
+ case 110:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x25108004004800L);\r
+ case 111:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x408000001010000L);\r
+ case 112:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x82005000002000L);\r
+ case 114:\r
+ if ((active0 & 0x200000L) != 0L)\r
+ return jjStartNfaWithStates_0(2, 21, 2);\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x440000800000L);\r
+ case 115:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x2188020L);\r
+ case 116:\r
+ if ((active0 & 0x1000L) != 0L)\r
+ return jjStartNfaWithStates_0(2, 12, 2);\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x250000108040000L);\r
+ case 117:\r
+ return jjMoveStringLiteralDfa3_0(active0, 0x210200000000L);\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(1, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa3_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(1, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(2, active0, 0L);\r
+ return 3;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 97:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x2240060000800L);\r
+ case 99:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x5000020L);\r
+ case 101:\r
+ if ((active0 & 0x8000L) != 0L)\r
+ {\r
+ jjmatchedKind = 15;\r
+ jjmatchedPos = 3;\r
+ }\r
+ else if ((active0 & 0x200000000L) != 0L)\r
+ return jjStartNfaWithStates_0(3, 33, 2);\r
+ else if ((active0 & 0x4000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(3, 38, 2);\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x24400000a980180L);\r
+ case 104:\r
+ if ((active0 & 0x400L) != 0L)\r
+ return jjStartNfaWithStates_0(3, 10, 2);\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x10000000000000L);\r
+ case 107:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x2000000000L);\r
+ case 108:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x100800000002000L);\r
+ case 109:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x10000000000L);\r
+ case 110:\r
+ if ((active0 & 0x10000000L) != 0L)\r
+ return jjStartNfaWithStates_0(3, 28, 2);\r
+ else if ((active0 & 0x80000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(3, 43, 2);\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x108000000000L);\r
+ case 111:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x800001000004010L);\r
+ case 112:\r
+ if ((active0 & 0x400000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(3, 58, 2);\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x100000000L);\r
+ case 114:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x20000L);\r
+ case 115:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x21000400000040L);\r
+ case 116:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x8400000000000L);\r
+ case 117:\r
+ return jjMoveStringLiteralDfa4_0(active0, 0x80000000040000L);\r
+ case 119:\r
+ if ((active0 & 0x10000L) != 0L)\r
+ return jjStartNfaWithStates_0(3, 16, 2);\r
+ break;\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(2, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa4_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(2, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(3, active0, 0L);\r
+ return 4;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 97:\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x2000822000L);\r
+ case 99:\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x100L);\r
+ case 101:\r
+ if ((active0 & 0x40L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 6, 2);\r
+ else if ((active0 & 0x800000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 47, 2);\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x8118000000000L);\r
+ case 105:\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x110400000100000L);\r
+ case 107:\r
+ if ((active0 & 0x1000000L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 24, 2);\r
+ else if ((active0 & 0x20000000L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 29, 2);\r
+ break;\r
+ case 108:\r
+ if ((active0 & 0x80L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 7, 2);\r
+ else if ((active0 & 0x800L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 11, 2);\r
+ break;\r
+ case 109:\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L);\r
+ case 110:\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x42000000000000L);\r
+ case 112:\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x40000000L);\r
+ case 114:\r
+ if ((active0 & 0x8000000L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 27, 2);\r
+ else if ((active0 & 0x4000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 50, 2);\r
+ return jjMoveStringLiteralDfa5_0(active0, 0xa000010000c0030L);\r
+ case 115:\r
+ if ((active0 & 0x400000000L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 34, 2);\r
+ break;\r
+ case 116:\r
+ if ((active0 & 0x80000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(4, 55, 2);\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x21200004004000L);\r
+ case 117:\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x100000000L);\r
+ case 119:\r
+ return jjMoveStringLiteralDfa5_0(active0, 0x2000000L);\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(3, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa5_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(3, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(4, active0, 0L);\r
+ return 5;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 97:\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x1400000004000L);\r
+ case 99:\r
+ if ((active0 & 0x100000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(5, 56, 2);\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x8108000002000L);\r
+ case 100:\r
+ if ((active0 & 0x800000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(5, 59, 2);\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x42000000000000L);\r
+ case 101:\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x40000000020L);\r
+ case 102:\r
+ if ((active0 & 0x100000L) != 0L)\r
+ return jjStartNfaWithStates_0(5, 20, 2);\r
+ break;\r
+ case 103:\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x2000000000L);\r
+ case 104:\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x2000000L);\r
+ case 105:\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x200004000010L);\r
+ case 108:\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x100L);\r
+ case 109:\r
+ if ((active0 & 0x800000L) != 0L)\r
+ return jjStartNfaWithStates_0(5, 23, 2);\r
+ break;\r
+ case 110:\r
+ if ((active0 & 0x40000L) != 0L)\r
+ return jjStartNfaWithStates_0(5, 18, 2);\r
+ else if ((active0 & 0x10000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(5, 52, 2);\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x200000000000000L);\r
+ case 114:\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x20010000000000L);\r
+ case 115:\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x40000000L);\r
+ case 116:\r
+ if ((active0 & 0x80000L) != 0L)\r
+ return jjStartNfaWithStates_0(5, 19, 2);\r
+ else if ((active0 & 0x100000000L) != 0L)\r
+ return jjStartNfaWithStates_0(5, 32, 2);\r
+ else if ((active0 & 0x1000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(5, 36, 2);\r
+ return jjMoveStringLiteralDfa6_0(active0, 0x20000L);\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(4, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa6_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(4, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(5, active0, 0L);\r
+ return 6;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 97:\r
+ return jjMoveStringLiteralDfa7_0(active0, 0x222010000000100L);\r
+ case 101:\r
+ if ((active0 & 0x2000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(6, 37, 2);\r
+ return jjMoveStringLiteralDfa7_0(active0, 0x2002000L);\r
+ case 108:\r
+ if ((active0 & 0x400000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(6, 46, 2);\r
+ break;\r
+ case 110:\r
+ return jjMoveStringLiteralDfa7_0(active0, 0x1000000000000L);\r
+ case 111:\r
+ return jjMoveStringLiteralDfa7_0(active0, 0x200004020000L);\r
+ case 115:\r
+ if ((active0 & 0x40000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(6, 54, 2);\r
+ break;\r
+ case 116:\r
+ if ((active0 & 0x8000000000L) != 0L)\r
+ {\r
+ jjmatchedKind = 39;\r
+ jjmatchedPos = 6;\r
+ }\r
+ return jjMoveStringLiteralDfa7_0(active0, 0x8140000004030L);\r
+ case 117:\r
+ return jjMoveStringLiteralDfa7_0(active0, 0x40000000L);\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(5, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa7_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(5, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(6, active0, 0L);\r
+ return 7;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 97:\r
+ return jjMoveStringLiteralDfa8_0(active0, 0x2000L);\r
+ case 98:\r
+ return jjMoveStringLiteralDfa8_0(active0, 0x2000000000000L);\r
+ case 101:\r
+ if ((active0 & 0x20L) != 0L)\r
+ return jjStartNfaWithStates_0(7, 5, 2);\r
+ return jjMoveStringLiteralDfa8_0(active0, 0x8040000000000L);\r
+ case 104:\r
+ return jjMoveStringLiteralDfa8_0(active0, 0x10L);\r
+ case 105:\r
+ return jjMoveStringLiteralDfa8_0(active0, 0x20000000004000L);\r
+ case 108:\r
+ if ((active0 & 0x200000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(7, 57, 2);\r
+ return jjMoveStringLiteralDfa8_0(active0, 0x40000000L);\r
+ case 110:\r
+ if ((active0 & 0x2000000L) != 0L)\r
+ return jjStartNfaWithStates_0(7, 25, 2);\r
+ else if ((active0 & 0x4000000L) != 0L)\r
+ return jjStartNfaWithStates_0(7, 26, 2);\r
+ else if ((active0 & 0x200000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(7, 45, 2);\r
+ break;\r
+ case 111:\r
+ return jjMoveStringLiteralDfa8_0(active0, 0x100000000000L);\r
+ case 114:\r
+ if ((active0 & 0x20000L) != 0L)\r
+ return jjStartNfaWithStates_0(7, 17, 2);\r
+ return jjMoveStringLiteralDfa8_0(active0, 0x100L);\r
+ case 116:\r
+ if ((active0 & 0x1000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(7, 48, 2);\r
+ return jjMoveStringLiteralDfa8_0(active0, 0x10000000000L);\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(6, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa8_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(6, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(7, active0, 0L);\r
+ return 8;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 97:\r
+ return jjMoveStringLiteralDfa9_0(active0, 0x40000000L);\r
+ case 98:\r
+ return jjMoveStringLiteralDfa9_0(active0, 0x2000L);\r
+ case 100:\r
+ if ((active0 & 0x8000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(8, 51, 2);\r
+ break;\r
+ case 101:\r
+ if ((active0 & 0x100L) != 0L)\r
+ return jjStartNfaWithStates_0(8, 8, 2);\r
+ break;\r
+ case 105:\r
+ return jjMoveStringLiteralDfa9_0(active0, 0x10000000000L);\r
+ case 108:\r
+ return jjMoveStringLiteralDfa9_0(active0, 0x2000000000000L);\r
+ case 109:\r
+ if ((active0 & 0x10L) != 0L)\r
+ return jjStartNfaWithStates_0(8, 4, 2);\r
+ break;\r
+ case 110:\r
+ return jjMoveStringLiteralDfa9_0(active0, 0x20000000000000L);\r
+ case 111:\r
+ return jjMoveStringLiteralDfa9_0(active0, 0x4000L);\r
+ case 114:\r
+ if ((active0 & 0x40000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(8, 42, 2);\r
+ else if ((active0 & 0x100000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(8, 44, 2);\r
+ break;\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(7, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa9_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(7, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(8, active0, 0L);\r
+ return 9;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 101:\r
+ if ((active0 & 0x2000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(9, 49, 2);\r
+ return jjMoveStringLiteralDfa10_0(active0, 0x20000000000000L);\r
+ case 108:\r
+ return jjMoveStringLiteralDfa10_0(active0, 0x2000L);\r
+ case 110:\r
+ if ((active0 & 0x4000L) != 0L)\r
+ return jjStartNfaWithStates_0(9, 14, 2);\r
+ break;\r
+ case 111:\r
+ return jjMoveStringLiteralDfa10_0(active0, 0x10000000000L);\r
+ case 116:\r
+ return jjMoveStringLiteralDfa10_0(active0, 0x40000000L);\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(8, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa10_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(8, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(9, active0, 0L);\r
+ return 10;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 100:\r
+ return jjMoveStringLiteralDfa11_0(active0, 0x20000000000000L);\r
+ case 101:\r
+ if ((active0 & 0x2000L) != 0L)\r
+ return jjStartNfaWithStates_0(10, 13, 2);\r
+ return jjMoveStringLiteralDfa11_0(active0, 0x40000000L);\r
+ case 110:\r
+ if ((active0 & 0x10000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(10, 40, 2);\r
+ break;\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(9, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa11_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(9, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(10, active0, 0L);\r
+ return 11;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 98:\r
+ return jjMoveStringLiteralDfa12_0(active0, 0x20000000000000L);\r
+ case 100:\r
+ if ((active0 & 0x40000000L) != 0L)\r
+ return jjStartNfaWithStates_0(11, 30, 2);\r
+ break;\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(10, active0, 0L);\r
+}\r
+private int jjMoveStringLiteralDfa12_0(long old0, long active0)\r
+{\r
+ if (((active0 &= old0)) == 0L)\r
+ return jjStartNfa_0(10, old0, 0L);\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) {\r
+ jjStopStringLiteralDfa_0(11, active0, 0L);\r
+ return 12;\r
+ }\r
+ switch(curChar)\r
+ {\r
+ case 121:\r
+ if ((active0 & 0x20000000000000L) != 0L)\r
+ return jjStartNfaWithStates_0(12, 53, 2);\r
+ break;\r
+ default :\r
+ break;\r
+ }\r
+ return jjStartNfa_0(11, active0, 0L);\r
+}\r
+private int jjStartNfaWithStates_0(int pos, int kind, int state)\r
+{\r
+ jjmatchedKind = kind;\r
+ jjmatchedPos = pos;\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) { return pos + 1; }\r
+ return jjMoveNfa_0(state, pos + 1);\r
+}\r
+static final long[] jjbitVec0 = {
+ 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
+};\r
+private int jjMoveNfa_0(int startState, int curPos)\r
+{\r
+ int startsAt = 0;\r
+ jjnewStateCnt = 31;\r
+ int i = 1;\r
+ jjstateSet[0] = startState;\r
+ int kind = 0x7fffffff;\r
+ for (;;)\r
+ {\r
+ if (++jjround == 0x7fffffff)\r
+ ReInitRounds();\r
+ if (curChar < 64)\r
+ {\r
+ long l = 1L << curChar;\r
+ do\r
+ {\r
+ switch(jjstateSet[--i])\r
+ {\r
+ case 13:\r
+ if (curChar == 47)\r
+ {\r
+ if (kind > 3)\r
+ kind = 3;\r
+ jjCheckNAdd(20);\r
+ }\r
+ else if (curChar == 42)\r
+ jjCheckNAddStates(0, 2);\r
+ break;\r
+ case 0:\r
+ if ((0x3ff000000000000L & l) != 0L)\r
+ {\r
+ if (kind > 90)\r
+ kind = 90;\r
+ jjCheckNAddStates(3, 7);\r
+ }\r
+ else if ((0x100002600L & l) != 0L)\r
+ {\r
+ if (kind > 1)\r
+ kind = 1;\r
+ }\r
+ else if (curChar == 47)\r
+ jjAddStates(8, 9);\r
+ else if (curChar == 46)\r
+ jjCheckNAdd(9);\r
+ else if (curChar == 34)\r
+ jjCheckNAddStates(10, 12);\r
+ break;\r
+ case 2:\r
+ if ((0x3ff000000000000L & l) == 0L)\r
+ break;\r
+ if (kind > 88)\r
+ kind = 88;\r
+ jjstateSet[jjnewStateCnt++] = 2;\r
+ break;\r
+ case 3:\r
+ if (curChar == 34)\r
+ jjCheckNAddStates(10, 12);\r
+ break;\r
+ case 4:\r
+ if ((0xfffffffbfffffbffL & l) != 0L)\r
+ jjCheckNAddStates(10, 12);\r
+ break;\r
+ case 6:\r
+ if ((0xfffffffffffffbffL & l) != 0L)\r
+ jjCheckNAddStates(10, 12);\r
+ break;\r
+ case 7:\r
+ if (curChar == 34 && kind > 89)\r
+ kind = 89;\r
+ break;\r
+ case 8:\r
+ if (curChar == 46)\r
+ jjCheckNAdd(9);\r
+ break;\r
+ case 9:\r
+ if ((0x3ff000000000000L & l) == 0L)\r
+ break;\r
+ if (kind > 91)\r
+ kind = 91;\r
+ jjCheckNAddTwoStates(9, 10);\r
+ break;\r
+ case 11:\r
+ if ((0x3ff000000000000L & l) == 0L)\r
+ break;\r
+ if (kind > 91)\r
+ kind = 91;\r
+ jjstateSet[jjnewStateCnt++] = 11;\r
+ break;\r
+ case 12:\r
+ if (curChar == 47)\r
+ jjAddStates(8, 9);\r
+ break;\r
+ case 14:\r
+ if ((0xfffffbffffffffffL & l) != 0L)\r
+ jjCheckNAddStates(0, 2);\r
+ break;\r
+ case 15:\r
+ if (curChar == 42)\r
+ jjstateSet[jjnewStateCnt++] = 16;\r
+ break;\r
+ case 16:\r
+ if ((0xffff7fffffffffffL & l) != 0L)\r
+ jjCheckNAddStates(0, 2);\r
+ break;\r
+ case 17:\r
+ if (curChar == 47 && kind > 2)\r
+ kind = 2;\r
+ break;\r
+ case 18:\r
+ if (curChar == 42)\r
+ jjstateSet[jjnewStateCnt++] = 17;\r
+ break;\r
+ case 19:\r
+ if (curChar != 47)\r
+ break;\r
+ if (kind > 3)\r
+ kind = 3;\r
+ jjCheckNAdd(20);\r
+ break;\r
+ case 20:\r
+ if ((0xfffffffffffffbffL & l) == 0L)\r
+ break;\r
+ if (kind > 3)\r
+ kind = 3;\r
+ jjCheckNAdd(20);\r
+ break;\r
+ case 21:\r
+ if ((0x3ff000000000000L & l) == 0L)\r
+ break;\r
+ if (kind > 90)\r
+ kind = 90;\r
+ jjCheckNAddStates(3, 7);\r
+ break;\r
+ case 22:\r
+ if ((0x3ff000000000000L & l) == 0L)\r
+ break;\r
+ if (kind > 90)\r
+ kind = 90;\r
+ jjCheckNAdd(22);\r
+ break;\r
+ case 23:\r
+ if ((0x3ff000000000000L & l) != 0L)\r
+ jjCheckNAddTwoStates(23, 24);\r
+ break;\r
+ case 24:\r
+ if (curChar != 46)\r
+ break;\r
+ if (kind > 91)\r
+ kind = 91;\r
+ jjCheckNAddTwoStates(25, 26);\r
+ break;\r
+ case 25:\r
+ if ((0x3ff000000000000L & l) == 0L)\r
+ break;\r
+ if (kind > 91)\r
+ kind = 91;\r
+ jjCheckNAddTwoStates(25, 26);\r
+ break;\r
+ case 27:\r
+ if ((0x3ff000000000000L & l) == 0L)\r
+ break;\r
+ if (kind > 91)\r
+ kind = 91;\r
+ jjstateSet[jjnewStateCnt++] = 27;\r
+ break;\r
+ case 28:\r
+ if ((0x3ff000000000000L & l) != 0L)\r
+ jjCheckNAddTwoStates(28, 29);\r
+ break;\r
+ case 30:\r
+ if ((0x3ff000000000000L & l) == 0L)\r
+ break;\r
+ if (kind > 91)\r
+ kind = 91;\r
+ jjstateSet[jjnewStateCnt++] = 30;\r
+ break;\r
+ default : break;\r
+ }\r
+ } while(i != startsAt);\r
+ }\r
+ else if (curChar < 128)\r
+ {\r
+ long l = 1L << (curChar & 077);\r
+ do\r
+ {\r
+ switch(jjstateSet[--i])\r
+ {\r
+ case 0:\r
+ case 2:\r
+ if ((0x7fffffe87fffffeL & l) == 0L)\r
+ break;\r
+ if (kind > 88)\r
+ kind = 88;\r
+ jjCheckNAdd(2);\r
+ break;\r
+ case 4:\r
+ if ((0xffffffffefffffffL & l) != 0L)\r
+ jjCheckNAddStates(10, 12);\r
+ break;\r
+ case 5:\r
+ if (curChar == 92)\r
+ jjstateSet[jjnewStateCnt++] = 6;\r
+ break;\r
+ case 6:\r
+ jjCheckNAddStates(10, 12);\r
+ break;\r
+ case 10:\r
+ if ((0x2000000020L & l) != 0L)\r
+ jjstateSet[jjnewStateCnt++] = 11;\r
+ break;\r
+ case 14:\r
+ case 16:\r
+ jjCheckNAddStates(0, 2);\r
+ break;\r
+ case 20:\r
+ if (kind > 3)\r
+ kind = 3;\r
+ jjstateSet[jjnewStateCnt++] = 20;\r
+ break;\r
+ case 26:\r
+ if ((0x2000000020L & l) != 0L)\r
+ jjstateSet[jjnewStateCnt++] = 27;\r
+ break;\r
+ case 29:\r
+ if ((0x2000000020L & l) != 0L)\r
+ jjstateSet[jjnewStateCnt++] = 30;\r
+ break;\r
+ default : break;\r
+ }\r
+ } while(i != startsAt);\r
+ }\r
+ else\r
+ {\r
+ int i2 = (curChar & 0xff) >> 6;\r
+ long l2 = 1L << (curChar & 077);\r
+ do\r
+ {\r
+ switch(jjstateSet[--i])\r
+ {\r
+ case 4:\r
+ case 6:\r
+ if ((jjbitVec0[i2] & l2) != 0L)\r
+ jjCheckNAddStates(10, 12);\r
+ break;\r
+ case 14:\r
+ case 16:\r
+ if ((jjbitVec0[i2] & l2) != 0L)\r
+ jjCheckNAddStates(0, 2);\r
+ break;\r
+ case 20:\r
+ if ((jjbitVec0[i2] & l2) == 0L)\r
+ break;\r
+ if (kind > 3)\r
+ kind = 3;\r
+ jjstateSet[jjnewStateCnt++] = 20;\r
+ break;\r
+ default : break;\r
+ }\r
+ } while(i != startsAt);\r
+ }\r
+ if (kind != 0x7fffffff)\r
+ {\r
+ jjmatchedKind = kind;\r
+ jjmatchedPos = curPos;\r
+ kind = 0x7fffffff;\r
+ }\r
+ ++curPos;\r
+ if ((i = jjnewStateCnt) == (startsAt = 31 - (jjnewStateCnt = startsAt)))\r
+ return curPos;\r
+ try { curChar = input_stream.readChar(); }\r
+ catch(java.io.IOException e) { return curPos; }\r
+ }\r
+}\r
+static final int[] jjnextStates = {
+ 14, 15, 18, 22, 23, 24, 28, 29, 13, 19, 4, 5, 7,
+};\r
+\r
+/** Token literal values. */\r
+public static final String[] jjstrLiteralImages = {\r
+"", null, null, null, "\141\154\147\157\162\151\164\150\155", \r
+"\144\151\163\143\162\145\164\145", "\146\141\154\163\145", "\155\157\144\145\154", \r
+"\162\145\144\145\143\154\141\162\145", "\141\156\144", "\145\141\143\150", "\146\151\156\141\154", "\156\157\164", \r
+"\162\145\160\154\141\143\145\141\142\154\145", "\141\156\156\157\164\141\164\151\157\156", "\145\154\163\145", \r
+"\146\154\157\167", "\157\160\145\162\141\164\157\162", "\162\145\164\165\162\156", \r
+"\141\163\163\145\162\164", "\145\154\163\145\151\146", "\146\157\162", "\157\162", \r
+"\163\164\162\145\141\155", "\142\154\157\143\153", "\145\154\163\145\167\150\145\156", \r
+"\146\165\156\143\164\151\157\156", "\157\165\164\145\162", "\164\150\145\156", "\142\162\145\141\153", \r
+"\145\156\143\141\160\163\165\154\141\164\145\144", "\151\146", "\157\165\164\160\165\164", "\164\162\165\145", \r
+"\143\154\141\163\163", "\145\156\144", "\151\155\160\157\162\164", "\160\141\143\153\141\147\145", \r
+"\164\171\160\145", "\143\157\156\156\145\143\164", \r
+"\145\156\165\155\145\162\141\164\151\157\156", "\151\156", "\160\141\162\141\155\145\164\145\162", "\167\150\145\156", \r
+"\143\157\156\156\145\143\164\157\162", "\145\161\165\141\164\151\157\156", "\160\141\162\164\151\141\154", \r
+"\167\150\151\154\145", "\143\157\156\163\164\141\156\164", \r
+"\145\170\160\141\156\144\141\142\154\145", "\151\156\156\145\162", "\160\162\157\164\145\143\164\145\144", \r
+"\167\151\164\150\151\156", "\143\157\156\163\164\162\141\151\156\145\144\142\171", \r
+"\145\170\164\145\156\144\163", "\151\156\160\165\164", "\160\165\142\154\151\143", \r
+"\145\170\164\145\162\156\141\154", "\154\157\157\160", "\162\145\143\157\162\144", "\50", "\51", "\173", "\175", \r
+"\133", "\135", "\56", "\72", "\73", "\54", "\74", "\74\75", "\76", "\76\75", \r
+"\75\75", "\74\76", "\53", "\55", "\56\53", "\56\55", "\52", "\57", "\56\52", "\56\57", \r
+"\136", "\56\136", "\75", "\72\75", null, null, null, null, };\r
+\r
+/** Lexer state names. */\r
+public static final String[] lexStateNames = {\r
+ "DEFAULT",\r
+};\r
+static final long[] jjtoToken = {
+ 0xfffffffffffffff1L, 0xfffffffL,
+};\r
+static final long[] jjtoSkip = {
+ 0xeL, 0x0L,
+};\r
+protected SimpleCharStream input_stream;\r
+private final int[] jjrounds = new int[31];\r
+private final int[] jjstateSet = new int[62];\r
+private final StringBuilder jjimage = new StringBuilder();\r
+private StringBuilder image = jjimage;\r
+private int jjimageLen;\r
+private int lengthOfMatch;\r
+protected char curChar;\r
+/** Constructor. */\r
+public UnitParserTokenManager(SimpleCharStream stream){\r
+ if (SimpleCharStream.staticFlag)\r
+ throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");\r
+ input_stream = stream;\r
+}\r
+\r
+/** Constructor. */\r
+public UnitParserTokenManager(SimpleCharStream stream, int lexState){\r
+ this(stream);\r
+ SwitchTo(lexState);\r
+}\r
+\r
+/** Reinitialise parser. */\r
+public void ReInit(SimpleCharStream stream)\r
+{\r
+ jjmatchedPos = jjnewStateCnt = 0;\r
+ curLexState = defaultLexState;\r
+ input_stream = stream;\r
+ ReInitRounds();\r
+}\r
+private void ReInitRounds()\r
+{\r
+ int i;\r
+ jjround = 0x80000001;\r
+ for (i = 31; i-- > 0;)\r
+ jjrounds[i] = 0x80000000;\r
+}\r
+\r
+/** Reinitialise parser. */\r
+public void ReInit(SimpleCharStream stream, int lexState)\r
+{\r
+ ReInit(stream);\r
+ SwitchTo(lexState);\r
+}\r
+\r
+/** Switch to specified lex state. */\r
+public void SwitchTo(int lexState)\r
+{\r
+ if (lexState >= 1 || lexState < 0)\r
+ throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);\r
+ else\r
+ curLexState = lexState;\r
+}\r
+\r
+protected Token jjFillToken()\r
+{\r
+ final Token t;\r
+ final String curTokenImage;\r
+ final int beginLine;\r
+ final int endLine;\r
+ final int beginColumn;\r
+ final int endColumn;\r
+ String im = jjstrLiteralImages[jjmatchedKind];\r
+ curTokenImage = (im == null) ? input_stream.GetImage() : im;\r
+ beginLine = input_stream.getBeginLine();\r
+ beginColumn = input_stream.getBeginColumn();\r
+ endLine = input_stream.getEndLine();\r
+ endColumn = input_stream.getEndColumn();\r
+ t = Token.newToken(jjmatchedKind, curTokenImage);\r
+\r
+ t.beginLine = beginLine;\r
+ t.endLine = endLine;\r
+ t.beginColumn = beginColumn;\r
+ t.endColumn = endColumn;\r
+\r
+ return t;\r
+}\r
+\r
+int curLexState = 0;\r
+int defaultLexState = 0;\r
+int jjnewStateCnt;\r
+int jjround;\r
+int jjmatchedPos;\r
+int jjmatchedKind;\r
+\r
+/** Get the next Token. */\r
+public Token getNextToken() \r
+{\r
+ Token matchedToken;\r
+ int curPos = 0;\r
+\r
+ EOFLoop :
+ for (;;)\r
+ {\r
+ try\r
+ {\r
+ curChar = input_stream.BeginToken();\r
+ }\r
+ catch(java.io.IOException e)\r
+ {\r
+ jjmatchedKind = 0;\r
+ matchedToken = jjFillToken();\r
+ return matchedToken;\r
+ }\r
+ image = jjimage;\r
+ image.setLength(0);\r
+ jjimageLen = 0;\r
+\r
+ jjmatchedKind = 0x7fffffff;\r
+ jjmatchedPos = 0;\r
+ curPos = jjMoveStringLiteralDfa0_0();\r
+ if (jjmatchedKind != 0x7fffffff)\r
+ {\r
+ if (jjmatchedPos + 1 < curPos)\r
+ input_stream.backup(curPos - jjmatchedPos - 1);\r
+ if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\r
+ {\r
+ matchedToken = jjFillToken();\r
+ TokenLexicalActions(matchedToken);\r
+ return matchedToken;\r
+ }\r
+ else\r
+ {\r
+ continue EOFLoop;\r
+ }\r
+ }\r
+ int error_line = input_stream.getEndLine();\r
+ int error_column = input_stream.getEndColumn();\r
+ String error_after = null;\r
+ boolean EOFSeen = false;\r
+ try { input_stream.readChar(); input_stream.backup(1); }\r
+ catch (java.io.IOException e1) {\r
+ EOFSeen = true;\r
+ error_after = curPos <= 1 ? "" : input_stream.GetImage();\r
+ if (curChar == '\n' || curChar == '\r') {\r
+ error_line++;\r
+ error_column = 0;\r
+ }\r
+ else\r
+ error_column++;\r
+ }\r
+ if (!EOFSeen) {\r
+ input_stream.backup(1);\r
+ error_after = curPos <= 1 ? "" : input_stream.GetImage();\r
+ }\r
+ throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\r
+ }\r
+}\r
+\r
+void TokenLexicalActions(Token matchedToken)\r
+{\r
+ switch(jjmatchedKind)\r
+ {\r
+ case 89 :\r
+ image.append(input_stream.GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));\r
+ matchedToken.image = matchedToken.image.substring(1,matchedToken.image.length()-1);\r
+ break;\r
+ default :\r
+ break;\r
+ }\r
+}\r
+private void jjCheckNAdd(int state)\r
+{\r
+ if (jjrounds[state] != jjround)\r
+ {\r
+ jjstateSet[jjnewStateCnt++] = state;\r
+ jjrounds[state] = jjround;\r
+ }\r
+}\r
+private void jjAddStates(int start, int end)\r
+{\r
+ do {\r
+ jjstateSet[jjnewStateCnt++] = jjnextStates[start];\r
+ } while (start++ != end);\r
+}\r
+private void jjCheckNAddTwoStates(int state1, int state2)\r
+{\r
+ jjCheckNAdd(state1);\r
+ jjCheckNAdd(state2);\r
+}\r
+\r
+private void jjCheckNAddStates(int start, int end)\r
+{\r
+ do {\r
+ jjCheckNAdd(jjnextStates[start]);\r
+ } while (start++ != end);\r
+}\r
+\r
+}\r
--- /dev/null
+/* Generated By:JavaCC: Do not edit this line. UnitParserTreeConstants.java Version 5.0 */\r
+package org.simantics.sysdyn.unitParser;\r
+\r
+public interface UnitParserTreeConstants\r
+{\r
+ public int JJTEXPR = 0;\r
+ public int JJTEXPRESSION = 1;\r
+ public int JJTIFTHENELSE = 2;\r
+ public int JJTCONDITION = 3;\r
+ public int JJTSIMPLE_EXPRESSION = 4;\r
+ public int JJTLOGICAL_EXPRESSION = 5;\r
+ public int JJTLOGICAL_TERM = 6;\r
+ public int JJTLOGICAL_FACTOR = 7;\r
+ public int JJTRELATION = 8;\r
+ public int JJTREL_OP = 9;\r
+ public int JJTARITHMETIC_EXPRESSION = 10;\r
+ public int JJTADD_OP = 11;\r
+ public int JJTTERM = 12;\r
+ public int JJTFACTOR = 13;\r
+ public int JJTMULTIPLICATION = 14;\r
+ public int JJTDIVIDE = 15;\r
+ public int JJTPRIMARY = 16;\r
+ public int JJTCOMPONENT_REFERENCE_FULL = 17;\r
+ public int JJTFUNCTION_CALL = 18;\r
+ public int JJTPARENTHESIS_EXPRESSION = 19;\r
+ public int JJTVALUE = 20;\r
+ public int JJTPARENTHESIS_OPEN = 21;\r
+ public int JJTPARENTHESIS_CLOSE = 22;\r
+ public int JJTNAME = 23;\r
+ public int JJTCOMPONENT_REFERENCE = 24;\r
+ public int JJTCOMPONENT_IDENTITY = 25;\r
+ public int JJTFUNCTION_CALL_ARGS = 26;\r
+ public int JJTFUNCTION_ARGUMENTS = 27;\r
+ public int JJTFOR_INDICES = 28;\r
+ public int JJTFOR_INDEX = 29;\r
+ public int JJTNAMED_ARGUMENT = 30;\r
+ public int JJTOUTPUT_EXPRESSION_LIST = 31;\r
+ public int JJTEXPRESSION_LIST = 32;\r
+ public int JJTARRAY_SUBSCRIPTS = 33;\r
+ public int JJTSUBSCRIPT = 34;\r
+ public int JJTRANGEINDEX = 35;\r
+\r
+\r
+ public String[] jjtNodeName = {\r
+ "expr",\r
+ "expression",\r
+ "ifthenelse",\r
+ "condition",\r
+ "simple_expression",\r
+ "logical_expression",\r
+ "logical_term",\r
+ "logical_factor",\r
+ "relation",\r
+ "rel_op",\r
+ "arithmetic_expression",\r
+ "add_op",\r
+ "term",\r
+ "factor",\r
+ "multiplication",\r
+ "divide",\r
+ "primary",\r
+ "component_reference_full",\r
+ "function_call",\r
+ "parenthesis_expression",\r
+ "value",\r
+ "parenthesis_open",\r
+ "parenthesis_close",\r
+ "name",\r
+ "component_reference",\r
+ "component_identity",\r
+ "function_call_args",\r
+ "function_arguments",\r
+ "for_indices",\r
+ "for_index",\r
+ "named_argument",\r
+ "output_expression_list",\r
+ "expression_list",\r
+ "array_subscripts",\r
+ "subscript",\r
+ "rangeIndex",\r
+ };\r
+}\r
+/* JavaCC - OriginalChecksum=e2f99f7df8969b486d8da5159d18ad81 (do not edit this line) */\r