+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
/* Generated By:JavaCC: Do not edit this line. ExpressionParser.java */\r
package org.simantics.sysdyn.expressionParser;\r
\r
+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
/* Generated By:JavaCC: Do not edit this line. ExpressionParserConstants.java */\r
package org.simantics.sysdyn.expressionParser;\r
\r
+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
/* Generated By:JavaCC: Do not edit this line. ExpressionParserTokenManager.java */\r
package org.simantics.sysdyn.expressionParser;\r
import java.util.Set;\r
+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 5.0 */\r
/* JavaCCOptions:KEEP_LINE_COL=null */\r
package org.simantics.sysdyn.tableParser;\r
+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
/* 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.tableParser;\r
final public void table() throws ParseException {\r
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
case 64:\r
- jj_consume_token(64);\r
- table_element();\r
- label_1:\r
- while (true) {\r
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
- case 71:\r
- ;\r
- break;\r
- default:\r
- jj_la1[0] = jj_gen;\r
- break label_1;\r
- }\r
- jj_consume_token(71);\r
- table_element();\r
+ case 66:\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 64:\r
+ curlyTable();\r
+ break;\r
+ case 66:\r
+ bracketTable();\r
+ break;\r
+ default:\r
+ jj_la1[0] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
}\r
- jj_consume_token(65);\r
break;\r
default:\r
jj_la1[1] = jj_gen;\r
jj_consume_token(0);\r
}\r
\r
- final public void table_element() throws ParseException {\r
+ final public void curlyTable() throws ParseException {\r
+ jj_consume_token(64);\r
jj_consume_token(64);\r
+ table_element();\r
+ jj_consume_token(65);\r
+ label_1:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 71:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[2] = jj_gen;\r
+ break label_1;\r
+ }\r
+ jj_consume_token(71);\r
+ jj_consume_token(64);\r
+ table_element();\r
+ jj_consume_token(65);\r
+ }\r
+ jj_consume_token(65);\r
+ }\r
+\r
+ final public void bracketTable() throws ParseException {\r
+ jj_consume_token(66);\r
+ table_element();\r
+ label_2:\r
+ while (true) {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 70:\r
+ ;\r
+ break;\r
+ default:\r
+ jj_la1[3] = jj_gen;\r
+ break label_2;\r
+ }\r
+ jj_consume_token(70);\r
+ table_element();\r
+ }\r
+ jj_consume_token(67);\r
+ }\r
+\r
+ final public void table_element() throws ParseException {\r
x_value();\r
jj_consume_token(71);\r
y_value();\r
- jj_consume_token(65);\r
}\r
\r
final public void x_value() throws ParseException {\r
jj_consume_token(SIGNED_NUMBER);\r
break;\r
default:\r
- jj_la1[2] = jj_gen;\r
+ jj_la1[4] = jj_gen;\r
jj_consume_token(-1);\r
throw new ParseException();\r
}\r
public Token jj_nt;\r
private int jj_ntk;\r
private int jj_gen;\r
- final private int[] jj_la1 = new int[3];\r
+ final private int[] jj_la1 = new int[5];\r
static private int[] jj_la1_0;\r
static private int[] jj_la1_1;\r
static private int[] jj_la1_2;\r
jj_la1_init_2();\r
}\r
private static void jj_la1_init_0() {\r
- jj_la1_0 = new int[] {0x0,0x0,0x0,};\r
+ jj_la1_0 = new int[] {0x0,0x0,0x0,0x0,0x0,};\r
}\r
private static void jj_la1_init_1() {\r
- jj_la1_1 = new int[] {0x0,0x0,0x0,};\r
+ jj_la1_1 = new int[] {0x0,0x0,0x0,0x0,0x0,};\r
}\r
private static void jj_la1_init_2() {\r
- jj_la1_2 = new int[] {0x80,0x1,0x70000000,};\r
+ jj_la1_2 = new int[] {0x5,0x5,0x80,0x40,0x70000000,};\r
}\r
\r
/** Constructor with InputStream. */\r
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 3; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 5; i++) jj_la1[i] = -1;\r
}\r
\r
/** Reinitialise. */\r
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 3; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 5; i++) jj_la1[i] = -1;\r
}\r
\r
/** Constructor. */\r
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 3; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 5; i++) jj_la1[i] = -1;\r
}\r
\r
/** Reinitialise. */\r
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 3; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 5; i++) jj_la1[i] = -1;\r
}\r
\r
/** Constructor with generated Token Manager. */\r
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 3; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 5; i++) jj_la1[i] = -1;\r
}\r
\r
/** Reinitialise. */\r
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 3; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 5; i++) jj_la1[i] = -1;\r
}\r
\r
private Token jj_consume_token(int kind) throws ParseException {\r
la1tokens[jj_kind] = true;\r
jj_kind = -1;\r
}\r
- for (int i = 0; i < 3; i++) {\r
+ for (int i = 0; i < 5; 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
\r
void table() : {\r
} {\r
- ( "{" table_element() ( "," table_element() )* "}" )? <EOF>\r
+ ( curlyTable() | bracketTable())? <EOF>\r
}\r
\r
+void curlyTable() : {\r} {\r
+ ( "{" "{" table_element() "}" ( "," "{" table_element() "}" )* "}" )\r
+} \r\r
+void bracketTable() : {\r} {\r
+ ( "[" table_element() ( ";" table_element() )* "]" )\r
+}\r \r
+\r
void table_element() : {\r
} {\r
- "{" x_value() "," y_value() "}"\r
+ (x_value() "," y_value())\r
} \r
\r
void x_value() : {\r
+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
/* 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.tableParser;\r
+/*******************************************************************************\r
+ * Copyright (c) 2010 Association for Decentralized Information Management in\r
+ * Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 5.0 */\r
/* JavaCCOptions: */\r
package org.simantics.sysdyn.tableParser;\r