From: miettinen Date: Fri, 17 Jan 2014 06:29:16 +0000 (+0000) Subject: Generated java files for unit parser (refs #4628). X-Git-Tag: 1.8.1~160 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=2255b4693e765d2e06de2f6fb62403d6943bb42f;p=simantics%2Fsysdyn.git Generated java files for unit parser (refs #4628). git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@28651 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/unitParser/UnitParser.jj b/org.simantics.sysdyn/src/org/simantics/sysdyn/unitParser/UnitParser.jj index 8bb34bc7..c178f70d 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/unitParser/UnitParser.jj +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/unitParser/UnitParser.jj @@ -48,7 +48,7 @@ TOKEN: | "*" | "/" | ".*" | "./" | "^" | ".^" | "=" | ":=" -| +| | { matchedToken.image = matchedToken.image.substring(1,matchedToken.image.length()-1); } | diff --git a/org.simantics.sysdyn/src/org/simantics/sysdyn/unitParser/UnitParserTokenManager.java b/org.simantics.sysdyn/src/org/simantics/sysdyn/unitParser/UnitParserTokenManager.java index bc5fb62c..17e5dd5c 100644 --- a/org.simantics.sysdyn/src/org/simantics/sysdyn/unitParser/UnitParserTokenManager.java +++ b/org.simantics.sysdyn/src/org/simantics/sysdyn/unitParser/UnitParserTokenManager.java @@ -820,12 +820,18 @@ private int jjStartNfaWithStates_0(int pos, int kind, int state) return jjMoveNfa_0(state, pos + 1); } static final long[] jjbitVec0 = { - 0x0L, 0x0L, 0x100000000000L, 0x0L + 0x0L, 0x0L, 0x20000800000000L, 0x0L }; static final long[] jjbitVec1 = { - 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL + 0x0L, 0x0L, 0xfffffffffffe0000L, 0x3ffL +}; +static final long[] jjbitVec2 = { + 0x0L, 0x0L, 0x100000000000L, 0x0L }; static final long[] jjbitVec3 = { + 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL +}; +static final long[] jjbitVec5 = { 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL }; private int jjMoveNfa_0(int startState, int curPos) @@ -868,6 +874,12 @@ private int jjMoveNfa_0(int startState, int curPos) if (kind > 1) kind = 1; } + else if ((0x3000000000L & l) != 0L) + { + if (kind > 88) + kind = 88; + jjCheckNAdd(2); + } else if (curChar == 47) jjAddStates(8, 9); else if (curChar == 46) @@ -875,12 +887,19 @@ private int jjMoveNfa_0(int startState, int curPos) else if (curChar == 34) jjCheckNAddStates(10, 12); break; + case 1: + if ((0x3000000000L & l) == 0L) + break; + if (kind > 88) + kind = 88; + jjCheckNAdd(2); + break; case 2: - if ((0x3ff000000000000L & l) == 0L) + if ((0x3ff003000000000L & l) == 0L) break; if (kind > 88) kind = 88; - jjstateSet[jjnewStateCnt++] = 2; + jjCheckNAdd(2); break; case 3: if (curChar == 34) @@ -1119,8 +1138,12 @@ private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, lo { switch(hiByte) { - case 32: + case 0: return ((jjbitVec0[i2] & l2) != 0L); + case 3: + return ((jjbitVec1[i2] & l2) != 0L); + case 32: + return ((jjbitVec2[i2] & l2) != 0L); default : return false; } @@ -1130,9 +1153,9 @@ private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, lo switch(hiByte) { case 0: - return ((jjbitVec3[i2] & l2) != 0L); + return ((jjbitVec5[i2] & l2) != 0L); default : - if ((jjbitVec1[i1] & l1) != 0L) + if ((jjbitVec3[i1] & l1) != 0L) return true; return false; } @@ -1142,7 +1165,7 @@ private static final boolean jjCanMove_2(int hiByte, int i1, int i2, long l1, lo switch(hiByte) { case 0: - return ((jjbitVec3[i2] & l2) != 0L); + return ((jjbitVec5[i2] & l2) != 0L); default : return false; }