From: miettinen Date: Mon, 16 Jun 2014 12:09:20 +0000 (+0000) Subject: Sysdyn: [{a, b, c}] support for enums in ExpressionParser (refs #4948). X-Git-Tag: 1.8.1~30 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=eccd36a8ef33e86729eeceeb05a4104757fe4fbc;p=simantics%2Fsysdyn.git Sysdyn: [{a, b, c}] support for enums in ExpressionParser (refs #4948). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@29616 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.java index 08ecdcb4..5b37fb68 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/expressionParser/ExpressionParser.java @@ -856,7 +856,7 @@ void named_arguments() : { currentRange.add(token); break; default: - jj_la1[39] = jj_gen; + jj_la1[40] = jj_gen; if (jj_2_3(2147483647)) { functionCall = null; name(); @@ -871,11 +871,11 @@ void named_arguments() : { case IDENT: case QIDENT: case UNSIGNED_INTEGER: - rangeIndex(rangeToken, true); + rangeIndex(rangeToken, true, ":"); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case 67: jj_consume_token(67); - rangeIndex(rangeToken, false); + rangeIndex(rangeToken, false, ":"); break; default: jj_la1[38] = jj_gen; @@ -885,8 +885,31 @@ void named_arguments() : { rangeToken.endLine = token.endLine; currentRange.add(rangeToken); break; + case 62: + jj_consume_token(62); + rangeToken.image = rangeToken.image + token.image; + rangeIndex(rangeToken, true, ","); + label_12: + while (true) { + switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { + case 69: + ; + break; + default: + jj_la1[39] = jj_gen; + break label_12; + } + jj_consume_token(69); + rangeIndex(rangeToken, false, ","); + } + rangeToken.endColumn = token.endColumn; + rangeToken.endLine = token.endLine; + currentRange.add(rangeToken); + jj_consume_token(63); + rangeToken.image = rangeToken.image + token.image; + break; default: - jj_la1[40] = jj_gen; + jj_la1[41] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -894,10 +917,10 @@ void named_arguments() : { } } - final public void rangeIndex(Token rangeToken, boolean first) throws ParseException { + final public void rangeIndex(Token rangeToken, boolean first, String delim) throws ParseException { Token identToken = null; if(!first) - rangeToken.image = rangeToken.image + ":"; + rangeToken.image = rangeToken.image + delim; switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case UNSIGNED_INTEGER: jj_consume_token(UNSIGNED_INTEGER); @@ -909,7 +932,7 @@ void named_arguments() : { rangeToken.image = rangeToken.image + identToken; break; default: - jj_la1[41] = jj_gen; + jj_la1[42] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -936,24 +959,30 @@ void named_arguments() : { finally { jj_save(2, xla); } } - private boolean jj_3R_34() { - if (jj_3R_38()) return true; + private boolean jj_3R_74() { + if (jj_scan_token(67)) return true; + if (jj_3R_73()) return true; return false; } - private boolean jj_3R_32() { + private boolean jj_3R_35() { + if (jj_3R_39()) return true; + return false; + } + + private boolean jj_3R_33() { Token xsp; xsp = jj_scanpos; - if (jj_3R_34()) jj_scanpos = xsp; - if (jj_3R_35()) return true; + if (jj_3R_35()) jj_scanpos = xsp; + if (jj_3R_36()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_36()) { jj_scanpos = xsp; break; } + if (jj_3R_37()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_37() { + private boolean jj_3R_38() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(70)) { @@ -975,388 +1004,397 @@ void named_arguments() : { return false; } - private boolean jj_3R_15() { + private boolean jj_3R_16() { if (jj_scan_token(66)) return true; - if (jj_3R_12()) return true; + if (jj_3R_13()) return true; return false; } - private boolean jj_3R_72() { + private boolean jj_3R_26() { if (jj_scan_token(67)) return true; - if (jj_3R_71()) return true; + if (jj_3R_25()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_29()) jj_scanpos = xsp; return false; } - private boolean jj_3R_25() { - if (jj_scan_token(67)) return true; - if (jj_3R_24()) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_28()) jj_scanpos = xsp; + private boolean jj_3R_79() { + if (jj_3R_15()) return true; return false; } - private boolean jj_3R_27() { + private boolean jj_3R_28() { if (jj_scan_token(22)) return true; - if (jj_3R_26()) return true; + if (jj_3R_27()) return true; return false; } - private boolean jj_3R_77() { + private boolean jj_3R_80() { if (jj_scan_token(41)) return true; - if (jj_3R_16()) return true; + if (jj_3R_17()) return true; return false; } - private boolean jj_3R_31() { - if (jj_3R_32()) return true; + private boolean jj_3R_32() { + if (jj_3R_33()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_33()) jj_scanpos = xsp; + if (jj_3R_34()) jj_scanpos = xsp; return false; } - private boolean jj_3R_29() { + private boolean jj_3R_78() { + if (jj_scan_token(UNSIGNED_INTEGER)) return true; + return false; + } + + private boolean jj_3R_73() { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_78()) { + jj_scanpos = xsp; + if (jj_3R_79()) return true; + } + return false; + } + + private boolean jj_3R_30() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(12)) jj_scanpos = xsp; - if (jj_3R_31()) return true; + if (jj_3R_32()) return true; return false; } - private boolean jj_3R_12() { - if (jj_3R_14()) return true; + private boolean jj_3R_13() { + if (jj_3R_15()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_15()) jj_scanpos = xsp; + if (jj_3R_16()) jj_scanpos = xsp; return false; } - private boolean jj_3R_74() { + private boolean jj_3R_77() { if (jj_scan_token(69)) return true; - if (jj_3R_73()) return true; + if (jj_3R_76()) return true; return false; } - private boolean jj_3R_26() { - if (jj_3R_29()) return true; + private boolean jj_3R_27() { + if (jj_3R_30()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_30()) { jj_scanpos = xsp; break; } + if (jj_3R_31()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_65() { + private boolean jj_3R_66() { if (jj_scan_token(69)) return true; - if (jj_3R_53()) return true; + if (jj_3R_54()) return true; return false; } - private boolean jj_3R_62() { + private boolean jj_3R_63() { Token xsp; xsp = jj_scanpos; - if (jj_3R_65()) { + if (jj_3R_66()) { jj_scanpos = xsp; - if (jj_3R_66()) return true; + if (jj_3R_67()) return true; } return false; } - private boolean jj_3R_56() { + private boolean jj_3R_57() { if (jj_scan_token(66)) return true; - if (jj_3R_50()) return true; + if (jj_3R_51()) return true; return false; } private boolean jj_3R_76() { - if (jj_3R_14()) return true; - return false; - } - - private boolean jj_3R_73() { - if (jj_3R_14()) return true; + if (jj_3R_15()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_77()) jj_scanpos = xsp; + if (jj_3R_80()) jj_scanpos = xsp; return false; } - private boolean jj_3R_24() { - if (jj_3R_26()) return true; + private boolean jj_3R_25() { + if (jj_3R_27()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_27()) { jj_scanpos = xsp; break; } + if (jj_3R_28()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_75() { - if (jj_scan_token(UNSIGNED_INTEGER)) return true; + private boolean jj_3_2() { + if (jj_3R_14()) return true; return false; } - private boolean jj_3R_71() { + private boolean jj_3R_23() { + if (jj_3R_25()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_75()) { - jj_scanpos = xsp; - if (jj_3R_76()) return true; - } + if (jj_3R_26()) jj_scanpos = xsp; return false; } - private boolean jj_3_2() { - if (jj_3R_13()) return true; + private boolean jj_3R_19() { + if (jj_scan_token(QIDENT)) return true; return false; } - private boolean jj_3R_22() { - if (jj_3R_24()) return true; + private boolean jj_3R_72() { + if (jj_3R_76()) return true; Token xsp; - xsp = jj_scanpos; - if (jj_3R_25()) jj_scanpos = xsp; - return false; - } - - private boolean jj_3R_18() { - if (jj_scan_token(QIDENT)) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_77()) { jj_scanpos = xsp; break; } + } return false; } - private boolean jj_3R_70() { + private boolean jj_3R_71() { + if (jj_scan_token(62)) return true; if (jj_3R_73()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_74()) { jj_scanpos = xsp; break; } + if (jj_3R_75()) { jj_scanpos = xsp; break; } } + if (jj_scan_token(63)) return true; return false; } - private boolean jj_3R_52() { + private boolean jj_3R_53() { if (jj_scan_token(68)) return true; - if (jj_3R_51()) return true; + if (jj_3R_52()) return true; return false; } - private boolean jj_3R_20() { + private boolean jj_3R_21() { if (jj_scan_token(31)) return true; - if (jj_3R_16()) return true; + if (jj_3R_17()) return true; if (jj_scan_token(28)) return true; - if (jj_3R_16()) return true; + if (jj_3R_17()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_23()) { jj_scanpos = xsp; break; } + if (jj_3R_24()) { jj_scanpos = xsp; break; } } if (jj_scan_token(15)) return true; - if (jj_3R_16()) return true; + if (jj_3R_17()) return true; return false; } - private boolean jj_3R_59() { - if (jj_3R_16()) return true; + private boolean jj_3R_60() { + if (jj_3R_17()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_62()) jj_scanpos = xsp; + if (jj_3R_63()) jj_scanpos = xsp; return false; } - private boolean jj_3R_64() { + private boolean jj_3R_65() { if (jj_scan_token(69)) return true; - if (jj_3R_63()) return true; + if (jj_3R_64()) return true; return false; } - private boolean jj_3R_19() { - if (jj_3R_22()) return true; + private boolean jj_3R_20() { + if (jj_3R_23()) return true; return false; } - private boolean jj_3R_16() { + private boolean jj_3R_17() { Token xsp; xsp = jj_scanpos; - if (jj_3R_19()) { + if (jj_3R_20()) { jj_scanpos = xsp; - if (jj_3R_20()) return true; + if (jj_3R_21()) return true; } return false; } private boolean jj_3_3() { - if (jj_3R_12()) return true; + if (jj_3R_13()) return true; if (jj_scan_token(60)) return true; return false; } - private boolean jj_3R_69() { - if (jj_3R_71()) return true; + private boolean jj_3R_70() { + if (jj_3R_73()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_72()) jj_scanpos = xsp; + if (jj_3R_74()) jj_scanpos = xsp; return false; } - private boolean jj_3R_58() { - if (jj_3R_13()) return true; + private boolean jj_3R_59() { + if (jj_3R_14()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_61()) jj_scanpos = xsp; + if (jj_3R_62()) jj_scanpos = xsp; return false; } - private boolean jj_3R_53() { + private boolean jj_3R_54() { Token xsp; xsp = jj_scanpos; - if (jj_3R_58()) { + if (jj_3R_59()) { jj_scanpos = xsp; - if (jj_3R_59()) return true; + if (jj_3R_60()) return true; } return false; } - private boolean jj_3R_54() { - if (jj_3R_53()) return true; + private boolean jj_3R_55() { + if (jj_3R_54()) return true; return false; } - private boolean jj_3R_21() { - if (jj_3R_14()) return true; + private boolean jj_3R_22() { + if (jj_3R_15()) return true; return false; } - private boolean jj_3R_68() { - if (jj_3R_12()) return true; - if (jj_3R_49()) return true; + private boolean jj_3R_69() { + if (jj_3R_13()) return true; + if (jj_3R_50()) return true; return false; } - private boolean jj_3R_17() { + private boolean jj_3R_18() { if (jj_scan_token(IDENT)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_21()) jj_scanpos = xsp; + if (jj_3R_22()) jj_scanpos = xsp; return false; } - private boolean jj_3R_14() { + private boolean jj_3R_15() { Token xsp; xsp = jj_scanpos; - if (jj_3R_17()) { + if (jj_3R_18()) { jj_scanpos = xsp; - if (jj_3R_18()) return true; + if (jj_3R_19()) return true; } return false; } - private boolean jj_3R_49() { + private boolean jj_3R_50() { if (jj_scan_token(60)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_54()) jj_scanpos = xsp; + if (jj_3R_55()) jj_scanpos = xsp; if (jj_scan_token(61)) return true; return false; } - private boolean jj_3R_55() { - if (jj_3R_60()) return true; + private boolean jj_3R_56() { + if (jj_3R_61()) return true; return false; } - private boolean jj_3R_67() { + private boolean jj_3R_68() { if (jj_scan_token(67)) return true; return false; } - private boolean jj_3R_63() { + private boolean jj_3R_64() { Token xsp; xsp = jj_scanpos; - if (jj_3R_67()) { - jj_scanpos = xsp; if (jj_3R_68()) { jj_scanpos = xsp; - if (jj_3R_69()) return true; + if (jj_3R_69()) { + jj_scanpos = xsp; + if (jj_3R_70()) { + jj_scanpos = xsp; + if (jj_3R_71()) return true; + } } } return false; } private boolean jj_3_1() { - if (jj_3R_12()) return true; + if (jj_3R_13()) return true; if (jj_scan_token(60)) return true; return false; } - private boolean jj_3R_48() { + private boolean jj_3R_49() { if (jj_scan_token(62)) return true; - if (jj_3R_53()) return true; + if (jj_3R_54()) return true; if (jj_scan_token(63)) return true; return false; } - private boolean jj_3R_47() { + private boolean jj_3R_48() { if (jj_scan_token(64)) return true; - if (jj_3R_51()) return true; + if (jj_3R_52()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_52()) { jj_scanpos = xsp; break; } + if (jj_3R_53()) { jj_scanpos = xsp; break; } } if (jj_scan_token(65)) return true; return false; } - private boolean jj_3R_46() { + private boolean jj_3R_47() { if (jj_scan_token(60)) return true; - if (jj_3R_16()) return true; + if (jj_3R_17()) return true; if (jj_scan_token(61)) return true; return false; } - private boolean jj_3R_45() { - if (jj_3R_50()) return true; + private boolean jj_3R_46() { + if (jj_3R_51()) return true; return false; } - private boolean jj_3R_57() { + private boolean jj_3R_58() { if (jj_scan_token(69)) return true; - if (jj_3R_16()) return true; + if (jj_3R_17()) return true; return false; } - private boolean jj_3R_60() { + private boolean jj_3R_61() { if (jj_scan_token(64)) return true; - if (jj_3R_63()) return true; + if (jj_3R_64()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_64()) { jj_scanpos = xsp; break; } + if (jj_3R_65()) { jj_scanpos = xsp; break; } } if (jj_scan_token(65)) return true; return false; } - private boolean jj_3R_44() { - if (jj_3R_12()) return true; - if (jj_3R_49()) return true; + private boolean jj_3R_45() { + if (jj_3R_13()) return true; + if (jj_3R_50()) return true; return false; } - private boolean jj_3R_42() { + private boolean jj_3R_43() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(84)) { jj_scanpos = xsp; if (jj_scan_token(85)) return true; } - if (jj_3R_41()) return true; + if (jj_3R_42()) return true; return false; } - private boolean jj_3R_41() { + private boolean jj_3R_42() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(92)) { @@ -1369,8 +1407,6 @@ void named_arguments() : { jj_scanpos = xsp; if (jj_scan_token(33)) { jj_scanpos = xsp; - if (jj_3R_44()) { - jj_scanpos = xsp; if (jj_3R_45()) { jj_scanpos = xsp; if (jj_3R_46()) { @@ -1379,6 +1415,8 @@ void named_arguments() : { jj_scanpos = xsp; if (jj_3R_48()) { jj_scanpos = xsp; + if (jj_3R_49()) { + jj_scanpos = xsp; if (jj_scan_token(35)) return true; } } @@ -1393,31 +1431,31 @@ void named_arguments() : { return false; } - private boolean jj_3R_28() { + private boolean jj_3R_29() { if (jj_scan_token(67)) return true; - if (jj_3R_24()) return true; + if (jj_3R_25()) return true; return false; } - private boolean jj_3R_40() { - if (jj_3R_43()) return true; - if (jj_3R_39()) return true; + private boolean jj_3R_41() { + if (jj_3R_44()) return true; + if (jj_3R_40()) return true; return false; } - private boolean jj_3R_33() { - if (jj_3R_37()) return true; - if (jj_3R_32()) return true; + private boolean jj_3R_34() { + if (jj_3R_38()) return true; + if (jj_3R_33()) return true; return false; } - private boolean jj_3R_36() { - if (jj_3R_38()) return true; - if (jj_3R_35()) return true; + private boolean jj_3R_37() { + if (jj_3R_39()) return true; + if (jj_3R_36()) return true; return false; } - private boolean jj_3R_43() { + private boolean jj_3R_44() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(80)) { @@ -1433,62 +1471,68 @@ void named_arguments() : { return false; } - private boolean jj_3R_39() { - if (jj_3R_41()) return true; + private boolean jj_3R_40() { + if (jj_3R_42()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_42()) jj_scanpos = xsp; + if (jj_3R_43()) jj_scanpos = xsp; return false; } - private boolean jj_3R_51() { - if (jj_3R_16()) return true; + private boolean jj_3R_52() { + if (jj_3R_17()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_57()) { jj_scanpos = xsp; break; } + if (jj_3R_58()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_61() { + private boolean jj_3R_75() { if (jj_scan_token(69)) return true; - if (jj_3R_53()) return true; + if (jj_3R_73()) return true; return false; } - private boolean jj_3R_13() { - if (jj_3R_14()) return true; + private boolean jj_3R_62() { + if (jj_scan_token(69)) return true; + if (jj_3R_54()) return true; + return false; + } + + private boolean jj_3R_14() { + if (jj_3R_15()) return true; if (jj_scan_token(86)) return true; - if (jj_3R_16()) return true; + if (jj_3R_17()) return true; return false; } - private boolean jj_3R_66() { + private boolean jj_3R_67() { if (jj_scan_token(21)) return true; - if (jj_3R_70()) return true; + if (jj_3R_72()) return true; return false; } - private boolean jj_3R_23() { + private boolean jj_3R_24() { if (jj_scan_token(20)) return true; - if (jj_3R_16()) return true; + if (jj_3R_17()) return true; if (jj_scan_token(28)) return true; - if (jj_3R_16()) return true; + if (jj_3R_17()) return true; return false; } - private boolean jj_3R_35() { - if (jj_3R_39()) return true; + private boolean jj_3R_36() { + if (jj_3R_40()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_40()) { jj_scanpos = xsp; break; } + if (jj_3R_41()) { jj_scanpos = xsp; break; } } return false; } - private boolean jj_3R_38() { + private boolean jj_3R_39() { Token xsp; xsp = jj_scanpos; if (jj_scan_token(76)) { @@ -1504,19 +1548,19 @@ void named_arguments() : { return false; } - private boolean jj_3R_50() { - if (jj_3R_14()) return true; + private boolean jj_3R_51() { + if (jj_3R_15()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_55()) jj_scanpos = xsp; - xsp = jj_scanpos; if (jj_3R_56()) jj_scanpos = xsp; + xsp = jj_scanpos; + if (jj_3R_57()) jj_scanpos = xsp; return false; } - private boolean jj_3R_30() { + private boolean jj_3R_31() { if (jj_scan_token(9)) return true; - if (jj_3R_29()) return true; + if (jj_3R_30()) return true; return false; } @@ -1531,7 +1575,7 @@ void named_arguments() : { private Token jj_scanpos, jj_lastpos; private int jj_la; private int jj_gen; - final private int[] jj_la1 = new int[42]; + final private int[] jj_la1 = new int[43]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; @@ -1541,13 +1585,13 @@ void named_arguments() : { jj_la1_init_2(); } private static void jj_la1_init_0() { - 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,0x0,0x0,0x80001040,0x0,0x200000,0x200000,0x80001040,0x0,0x0,0x80001040,0x0,0x80001040,0x0,0x0,0x0,0x0,0x0,0x0,}; + 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,0x0,0x0,0x80001040,0x0,0x200000,0x200000,0x80001040,0x0,0x0,0x80001040,0x0,0x80001040,0x0,0x0,0x0,0x0,0x0,0x0,0x0,}; } private static void jj_la1_init_1() { - 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,0x0,0x0,0x5000000a,0x0,0x0,0x0,0x5000000a,0x0,0x200,0x5000000a,0x0,0x5000000a,0x0,0x0,0x0,0x0,0x0,0x0,}; + 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,0x0,0x0,0x5000000a,0x0,0x0,0x0,0x5000000a,0x0,0x200,0x5000000a,0x0,0x5000000a,0x0,0x0,0x0,0x0,0x0,0x40000000,0x0,}; } private static void jj_la1_init_2() { - jj_la1_2 = new int[] {0x0,0x1f00f001,0x0,0x1f00f001,0x8,0x8,0x0,0x0,0x0,0xfc0,0xfc0,0xf000,0xf000,0xf000,0xf0000,0x300000,0x300000,0xf0000,0x10,0x1c000000,0x3000001,0x3000000,0x3000000,0x4,0x1,0x4,0x1f00f001,0x20,0x20,0x20,0x1f00f001,0x20,0x0,0x1f00f001,0x20,0x1f00f001,0x20,0x20,0x8,0x8,0xb000000,0xb000000,}; + jj_la1_2 = new int[] {0x0,0x1f00f001,0x0,0x1f00f001,0x8,0x8,0x0,0x0,0x0,0xfc0,0xfc0,0xf000,0xf000,0xf000,0xf0000,0x300000,0x300000,0xf0000,0x10,0x1c000000,0x3000001,0x3000000,0x3000000,0x4,0x1,0x4,0x1f00f001,0x20,0x20,0x20,0x1f00f001,0x20,0x0,0x1f00f001,0x20,0x1f00f001,0x20,0x20,0x8,0x20,0x8,0xb000000,0xb000000,}; } final private JJCalls[] jj_2_rtns = new JJCalls[3]; private boolean jj_rescan = false; @@ -1564,7 +1608,7 @@ void named_arguments() : { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < 43; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -1579,7 +1623,7 @@ void named_arguments() : { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < 43; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -1590,7 +1634,7 @@ void named_arguments() : { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < 43; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -1601,7 +1645,7 @@ void named_arguments() : { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < 43; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -1611,7 +1655,7 @@ void named_arguments() : { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < 43; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -1621,7 +1665,7 @@ void named_arguments() : { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 42; i++) jj_la1[i] = -1; + for (int i = 0; i < 43; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -1738,7 +1782,7 @@ void named_arguments() : { la1tokens[jj_kind] = true; jj_kind = -1; } - for (int i = 0; i < 42; i++) { + for (int i = 0; i < 43; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1< currentRange) : { rangeToken.endLine = token.endLine; currentRange.add(rangeToken); } - | rangeIndex(rangeToken, true) ( ":" rangeIndex(rangeToken, false))? { + | rangeIndex(rangeToken, true, ":") ( ":" rangeIndex(rangeToken, false, ":"))? { rangeToken.endColumn = token.endColumn; rangeToken.endLine = token.endLine; currentRange.add(rangeToken); } + | "{" + { rangeToken.image = rangeToken.image + token.image; + } + rangeIndex(rangeToken, true, ",") ( "," rangeIndex(rangeToken, false, ","))* + { + rangeToken.endColumn = token.endColumn; + rangeToken.endLine = token.endLine; + currentRange.add(rangeToken); + } + "}" + { rangeToken.image = rangeToken.image + token.image; + } } -void rangeIndex(Token rangeToken, boolean first) : { +void rangeIndex(Token rangeToken, boolean first, String delim) : { Token identToken = null; if(!first) - rangeToken.image = rangeToken.image + ":"; + rangeToken.image = rangeToken.image + delim; } { { rangeToken.image = rangeToken.image + token.image; } | identToken = ident()