/* Generated By:JavaCC: Do not edit this line. ExpressionParser.java */\r
package org.simantics.sysdyn.expressionParser;\r
\r
+import java.util.Set;\r
+import java.util.HashSet;\r
import java.util.List;\r
import java.util.ArrayList;\r
import java.util.HashMap;\r
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
case 67:\r
jj_consume_token(67);\r
- currentRange.add(token);\r
+ currentRange.add(token);\r
break;\r
- case IDENT:\r
- case UNSIGNED_INTEGER:\r
- rangeIndex(rangeToken, false);\r
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
- case 67:\r
- jj_consume_token(67);\r
- rangeIndex(rangeToken, true);\r
- break;\r
- default:\r
- jj_la1[36] = jj_gen;\r
- ;\r
- }\r
+ default:\r
+ jj_la1[37] = jj_gen;\r
+ if (jj_2_3(2147483647)) {\r
+ functionCall = null;\r
+ name();\r
+ function_call_args();\r
+ functionCall = null;\r
+ rangeToken.image = "";\r
+ rangeToken.endColumn = token.endColumn;\r
+ rangeToken.endLine = token.endLine;\r
+ currentRange.add(rangeToken);\r
+ } else {\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case IDENT:\r
+ case UNSIGNED_INTEGER:\r
+ rangeIndex(rangeToken, true);\r
+ switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
+ case 67:\r
+ jj_consume_token(67);\r
+ rangeIndex(rangeToken, false);\r
+ break;\r
+ default:\r
+ jj_la1[36] = jj_gen;\r
+ ;\r
+ }\r
rangeToken.endColumn = token.endColumn;\r
rangeToken.endLine = token.endLine;\r
currentRange.add(rangeToken);\r
- break;\r
- default:\r
- jj_la1[37] = jj_gen;\r
- jj_consume_token(-1);\r
- throw new ParseException();\r
+ break;\r
+ default:\r
+ jj_la1[38] = jj_gen;\r
+ jj_consume_token(-1);\r
+ throw new ParseException();\r
+ }\r
+ }\r
}\r
}\r
\r
- final public void rangeIndex(Token rangeToken, boolean second) throws ParseException {\r
- if(second)\r
+ final public void rangeIndex(Token rangeToken, boolean first) throws ParseException {\r
+ if(!first)\r
rangeToken.image = rangeToken.image + ":";\r
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r
case UNSIGNED_INTEGER:\r
rangeToken.image = rangeToken.image + token.image;\r
break;\r
default:\r
- jj_la1[38] = jj_gen;\r
+ jj_la1[39] = jj_gen;\r
jj_consume_token(-1);\r
throw new ParseException();\r
}\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_3R_14() {\r
if (jj_scan_token(66)) return true;\r
if (jj_3R_12()) return true;\r
return false;\r
}\r
\r
+ private boolean jj_3_3() {\r
+ if (jj_3R_12()) return true;\r
+ if (jj_scan_token(60)) return true;\r
+ return false;\r
+ }\r
+\r
/** Generated Token Manager. */\r
public ExpressionParserTokenManager token_source;\r
SimpleCharStream jj_input_stream;\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[39];\r
+ final private int[] jj_la1 = new int[40];\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[] {0x100000,0x80001040,0x100000,0x80001040,0x0,0x0,0x400000,0x200,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x0,0x0,0x80001040,0x0,0x200000,0x200000,0x80001040,0x0,0x0,0x80001040,0x0,0x80001040,0x0,0x0,0x0,0x0,0x0,};\r
+ jj_la1_0 = new int[] {0x100000,0x80001040,0x100000,0x80001040,0x0,0x0,0x400000,0x200,0x1000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,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[] {0x0,0x5000000a,0x0,0x5000000a,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x50000008,0x0,0x0,0x0,0x5000000a,0x0,0x0,0x0,0x5000000a,0x0,0x200,0x5000000a,0x0,0x5000000a,0x0,0x0,0x0,0x0,0x0,};\r
+ jj_la1_1 = new int[] {0x0,0x5000000a,0x0,0x5000000a,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x50000008,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[] {0x0,0xf00f001,0x0,0xf00f001,0x8,0x8,0x0,0x0,0x0,0xfc0,0xfc0,0xf000,0xf000,0xf000,0xf0000,0x300000,0x300000,0xf0000,0x10,0xe000000,0x1000001,0x4,0x1,0x4,0xf00f001,0x20,0x20,0x20,0xf00f001,0x20,0x0,0xf00f001,0x20,0xf00f001,0x20,0x20,0x8,0x5000008,0x5000000,};\r
+ jj_la1_2 = new int[] {0x0,0xf00f001,0x0,0xf00f001,0x8,0x8,0x0,0x0,0x0,0xfc0,0xfc0,0xf000,0xf000,0xf000,0xf0000,0x300000,0x300000,0xf0000,0x10,0xe000000,0x1000001,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[2];\r
+ final private JJCalls[] jj_2_rtns = new JJCalls[3];\r
private boolean jj_rescan = false;\r
private int jj_gc = 0;\r
\r
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 39; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 40; 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
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 39; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 40; 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
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 39; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 40; 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
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 39; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 40; 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
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 39; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 40; 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
token = new Token();\r
jj_ntk = -1;\r
jj_gen = 0;\r
- for (int i = 0; i < 39; i++) jj_la1[i] = -1;\r
+ for (int i = 0; i < 40; 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
la1tokens[jj_kind] = true;\r
jj_kind = -1;\r
}\r
- for (int i = 0; i < 39; i++) {\r
+ for (int i = 0; i < 40; 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
private void jj_rescan_token() {\r
jj_rescan = true;\r
- for (int i = 0; i < 2; i++) {\r
+ for (int i = 0; i < 3; i++) {\r
try {\r
JJCalls p = jj_2_rtns[i];\r
do {\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