Browse Source

(HOA path) PrismParser: refactor double quoted identifiers (parser refresh)

accumulation-v4.7
Joachim Klein 8 years ago
committed by Joachim Klein
parent
commit
badd6f924c
  1. 38
      prism/src/parser/ParseException.java
  2. 1227
      prism/src/parser/PrismParser.java
  3. 2
      prism/src/parser/PrismParser.jj
  4. 12
      prism/src/parser/PrismParserConstants.java
  5. 355
      prism/src/parser/PrismParserTokenManager.java
  6. 8
      prism/src/parser/SimpleCharStream.java
  7. 6
      prism/src/parser/Token.java
  8. 23
      prism/src/parser/TokenMgrError.java

38
prism/src/parser/ParseException.java

@ -1,5 +1,5 @@
/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 6.0 */
/* JavaCCOptions:KEEP_LINE_COL=null */
/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 6.1 */
/* JavaCCOptions:KEEP_LINE_COLUMN=true */
package parser;
/**
@ -20,6 +20,11 @@ public class ParseException extends Exception {
*/
private static final long serialVersionUID = 1L;
/**
* The end of line string for this machine.
*/
protected static String EOL = System.getProperty("line.separator", "\n");
/**
* This constructor is used by the method "generateParseException"
* in the generated parser. Calling this constructor generates
@ -88,7 +93,7 @@ public class ParseException extends Exception {
private static String initialise(Token currentToken,
int[][] expectedTokenSequences,
String[] tokenImage) {
String eol = System.getProperty("line.separator", "\n");
StringBuffer expected = new StringBuffer();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
@ -101,7 +106,7 @@ public class ParseException extends Exception {
if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
expected.append("...");
}
expected.append(eol).append(" ");
expected.append(EOL).append(" ");
}
String retval = "Encountered \"";
Token tok = currentToken.next;
@ -118,20 +123,23 @@ public class ParseException extends Exception {
tok = tok.next;
}
retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
retval += "." + eol;
if (expectedTokenSequences.length == 1) {
retval += "Was expecting:" + eol + " ";
retval += "." + EOL;
if (expectedTokenSequences.length == 0) {
// Nothing to add here
} else {
retval += "Was expecting one of:" + eol + " ";
if (expectedTokenSequences.length == 1) {
retval += "Was expecting:" + EOL + " ";
} else {
retval += "Was expecting one of:" + EOL + " ";
}
retval += expected.toString();
}
retval += expected.toString();
return retval;
}
/**
* The end of line string for this machine.
*/
protected String eol = System.getProperty("line.separator", "\n");
/**
* Used to convert raw characters to their escaped version
@ -144,8 +152,6 @@ public class ParseException extends Exception {
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
{
case 0 :
continue;
case '\b':
retval.append("\\b");
continue;
@ -184,4 +190,4 @@ public class ParseException extends Exception {
}
}
/* JavaCC - OriginalChecksum=83512206aea6c09dd76f640dc4cc775b (do not edit this line) */
/* JavaCC - OriginalChecksum=5d514a10ec1a5281db2efa75a40150c0 (do not edit this line) */

1227
prism/src/parser/PrismParser.java
File diff suppressed because it is too large
View File

2
prism/src/parser/PrismParser.jj

@ -977,7 +977,7 @@ Observable Observable() :
}
{
{ begin = getToken(1); }
( <OBSERVABLE> <DQUOTE> name = Identifier() <DQUOTE> <EQ> defn = Expression(false, false) <SEMICOLON> )
( <OBSERVABLE> name = QuotedIdentifier() <EQ> defn = Expression(false, false) <SEMICOLON> )
{ Observable obs = new Observable(name, defn); obs.setPosition(begin, getToken(0)); return obs; }
}

12
prism/src/parser/PrismParserConstants.java

@ -189,15 +189,15 @@ public interface PrismParserConstants {
/** RegularExpression Id. */
int QMARK = 89;
/** RegularExpression Id. */
int DQUOTE = 90;
int REG_INT = 90;
/** RegularExpression Id. */
int REG_INT = 91;
int REG_DOUBLE = 91;
/** RegularExpression Id. */
int REG_DOUBLE = 92;
int REG_IDENTPRIME = 92;
/** RegularExpression Id. */
int REG_IDENTPRIME = 93;
int REG_IDENT = 93;
/** RegularExpression Id. */
int REG_IDENT = 94;
int REG_QUOTED_IDENT = 94;
/** RegularExpression Id. */
int PREPROC = 95;
/** RegularExpression Id. */
@ -298,11 +298,11 @@ public interface PrismParserConstants {
"\"\\\'\"",
"\"<-\"",
"\"?\"",
"\"\\\"\"",
"<REG_INT>",
"<REG_DOUBLE>",
"<REG_IDENTPRIME>",
"<REG_IDENT>",
"<REG_QUOTED_IDENT>",
"<PREPROC>",
"<LEXICAL_ERROR>",
};

355
prism/src/parser/PrismParserTokenManager.java

@ -24,13 +24,13 @@ private static final int jjStopStringLiteralDfa_0(int pos, long active0, long ac
switch (pos)
{
case 0:
if ((active0 & 0x18f01c409400908L) != 0L)
return 23;
if ((active0 & 0x70fe3bf6bff6f0L) != 0L)
{
jjmatchedKind = 94;
return 23;
jjmatchedKind = 93;
return 27;
}
if ((active0 & 0x18f01c409400908L) != 0L)
return 27;
if ((active1 & 0x400000L) != 0L)
return 1;
if ((active1 & 0x4L) != 0L)
@ -41,142 +41,142 @@ private static final int jjStopStringLiteralDfa_0(int pos, long active0, long ac
{
if (jjmatchedPos != 1)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 1;
}
return 23;
return 27;
}
return -1;
case 2:
if ((active0 & 0x2001d0000000L) != 0L)
return 23;
return 27;
if ((active0 & 0x73defa26bff6f0L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 2;
return 23;
return 27;
}
return -1;
case 3:
if ((active0 & 0x4358c002200490L) != 0L)
return 23;
return 27;
if ((active0 & 0x30863a249ff260L) != 0L)
{
if (jjmatchedPos != 3)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 3;
}
return 23;
return 27;
}
return -1;
case 4:
if ((active0 & 0x60020040060L) != 0L)
return 23;
if ((active0 & 0x30883a049bf200L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 4;
return 23;
return 27;
}
if ((active0 & 0x60020040060L) != 0L)
return 27;
return -1;
case 5:
if ((active0 & 0x20000200900200L) != 0L)
return 23;
return 27;
if ((active0 & 0x108838040bf000L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 5;
return 23;
return 27;
}
return -1;
case 6:
if ((active0 & 0x800000081000L) != 0L)
return 23;
return 27;
if ((active0 & 0x1008380403e000L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 6;
return 23;
return 27;
}
return -1;
case 7:
if ((active0 & 0x1008380403e000L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 7;
return 23;
return 27;
}
return -1;
case 8:
if ((active0 & 0x4024000L) != 0L)
return 23;
return 27;
if ((active0 & 0x1008380001a000L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 8;
return 23;
return 27;
}
return -1;
case 9:
if ((active0 & 0x10003000010000L) != 0L)
return 23;
return 27;
if ((active0 & 0x8080000a000L) != 0L)
{
if (jjmatchedPos != 9)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 9;
}
return 23;
return 27;
}
return -1;
case 10:
if ((active0 & 0x2000000000L) != 0L)
return 23;
if ((active0 & 0x8080000a000L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 10;
return 23;
return 27;
}
if ((active0 & 0x2000000000L) != 0L)
return 27;
return -1;
case 11:
if ((active0 & 0x2000L) != 0L)
return 23;
if ((active0 & 0x80800008000L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 11;
return 23;
return 27;
}
if ((active0 & 0x2000L) != 0L)
return 27;
return -1;
case 12:
if ((active0 & 0x80000000000L) != 0L)
return 23;
if ((active0 & 0x800008000L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 12;
return 23;
return 27;
}
if ((active0 & 0x80000000000L) != 0L)
return 27;
return -1;
case 13:
if ((active0 & 0x8000L) != 0L)
return 23;
if ((active0 & 0x800000000L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 13;
return 23;
return 27;
}
if ((active0 & 0x8000L) != 0L)
return 27;
return -1;
case 14:
if ((active0 & 0x800000000L) != 0L)
{
jjmatchedKind = 94;
jjmatchedKind = 93;
jjmatchedPos = 14;
return 23;
return 27;
}
return -1;
default :
@ -198,8 +198,6 @@ static private int jjMoveStringLiteralDfa0_0(){
case 33:
jjmatchedKind = 57;
return jjMoveStringLiteralDfa1_0(0x0L, 0x1000L);
case 34:
return jjStopAtPos(0, 90);
case 38:
return jjStopAtPos(0, 58);
case 39:
@ -237,17 +235,17 @@ static private int jjMoveStringLiteralDfa0_0(){
case 63:
return jjStopAtPos(0, 89);
case 65:
return jjStartNfaWithStates_0(0, 3, 23);
return jjStartNfaWithStates_0(0, 3, 27);
case 67:
return jjStartNfaWithStates_0(0, 8, 23);
return jjStartNfaWithStates_0(0, 8, 27);
case 69:
return jjStartNfaWithStates_0(0, 11, 23);
return jjStartNfaWithStates_0(0, 11, 27);
case 70:
return jjStartNfaWithStates_0(0, 22, 23);
return jjStartNfaWithStates_0(0, 22, 27);
case 71:
return jjStartNfaWithStates_0(0, 24, 23);
return jjStartNfaWithStates_0(0, 24, 27);
case 73:
return jjStartNfaWithStates_0(0, 27, 23);
return jjStartNfaWithStates_0(0, 27, 27);
case 80:
jjmatchedKind = 40;
return jjMoveStringLiteralDfa1_0(0xc000000000L, 0x0L);
@ -255,13 +253,13 @@ static private int jjMoveStringLiteralDfa0_0(){
jjmatchedKind = 50;
return jjMoveStringLiteralDfa1_0(0x3000000000000L, 0x0L);
case 83:
return jjStartNfaWithStates_0(0, 51, 23);
return jjStartNfaWithStates_0(0, 51, 27);
case 85:
return jjStartNfaWithStates_0(0, 55, 23);
return jjStartNfaWithStates_0(0, 55, 27);
case 87:
return jjStartNfaWithStates_0(0, 56, 23);
return jjStartNfaWithStates_0(0, 56, 27);
case 88:
return jjStartNfaWithStates_0(0, 34, 23);
return jjStartNfaWithStates_0(0, 34, 27);
case 91:
jjmatchedKind = 69;
return jjMoveStringLiteralDfa1_0(0x0L, 0x80L);
@ -402,7 +400,7 @@ static private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1,
break;
case 97:
if ((active0 & 0x200000000000L) != 0L)
return jjStartNfaWithStates_0(2, 45, 23);
return jjStartNfaWithStates_0(2, 45, 27);
return jjMoveStringLiteralDfa3_0(active0, 0x1004000000000L);
case 98:
return jjMoveStringLiteralDfa3_0(active0, 0x20000000L);
@ -416,13 +414,13 @@ static private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1,
return jjMoveStringLiteralDfa3_0(active0, 0x20000000480L);
case 110:
if ((active0 & 0x100000000L) != 0L)
return jjStartNfaWithStates_0(2, 32, 23);
return jjStartNfaWithStates_0(2, 32, 27);
return jjMoveStringLiteralDfa3_0(active0, 0x800200040L);
case 111:
return jjMoveStringLiteralDfa3_0(active0, 0x10180000800030L);
case 112:
if ((active0 & 0x80000000L) != 0L)
return jjStartNfaWithStates_0(2, 31, 23);
return jjStartNfaWithStates_0(2, 31, 27);
return jjMoveStringLiteralDfa3_0(active0, 0x40000000000L);
case 114:
return jjMoveStringLiteralDfa3_0(active0, 0x80000L);
@ -430,7 +428,7 @@ static private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1,
return jjMoveStringLiteralDfa3_0(active0, 0x20003000000000L);
case 116:
if ((active0 & 0x10000000L) != 0L)
return jjStartNfaWithStates_0(2, 28, 23);
return jjStartNfaWithStates_0(2, 28, 27);
return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L);
case 117:
return jjMoveStringLiteralDfa3_0(active0, 0x40000000000200L);
@ -440,7 +438,7 @@ static private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1,
return jjMoveStringLiteralDfa3_0(active0, 0x800000000000L);
case 120:
if ((active0 & 0x40000000L) != 0L)
return jjStartNfaWithStates_0(2, 30, 23);
return jjStartNfaWithStates_0(2, 30, 27);
break;
default :
break;
@ -468,33 +466,33 @@ static private int jjMoveStringLiteralDfa3_0(long old0, long active0){
return jjMoveStringLiteralDfa4_0(active0, 0x80000800200L);
case 99:
if ((active0 & 0x80L) != 0L)
return jjStartNfaWithStates_0(3, 7, 23);
return jjStartNfaWithStates_0(3, 7, 27);
else if ((active0 & 0x400L) != 0L)
return jjStartNfaWithStates_0(3, 10, 23);
return jjStartNfaWithStates_0(3, 10, 27);
else if ((active0 & 0x200000L) != 0L)
return jjStartNfaWithStates_0(3, 21, 23);
return jjStartNfaWithStates_0(3, 21, 27);
return jjMoveStringLiteralDfa4_0(active0, 0x10000000000020L);
case 100:
return jjMoveStringLiteralDfa4_0(active0, 0x20800000000L);
case 101:
if ((active0 & 0x400000000000L) != 0L)
return jjStartNfaWithStates_0(3, 46, 23);
return jjStartNfaWithStates_0(3, 46, 27);
else if ((active0 & 0x40000000000000L) != 0L)
return jjStartNfaWithStates_0(3, 54, 23);
return jjStartNfaWithStates_0(3, 54, 27);
return jjMoveStringLiteralDfa4_0(active0, 0x3020000000L);
case 105:
return jjMoveStringLiteralDfa4_0(active0, 0x3000L);
case 108:
if ((active0 & 0x10L) != 0L)
return jjStartNfaWithStates_0(3, 4, 23);
return jjStartNfaWithStates_0(3, 4, 27);
break;
case 109:
return jjMoveStringLiteralDfa4_0(active0, 0x84000L);
case 110:
if ((active0 & 0x8000000000L) != 0L)
return jjStartNfaWithStates_0(3, 39, 23);
return jjStartNfaWithStates_0(3, 39, 27);
else if ((active0 & 0x2000000000000L) != 0L)
return jjStartNfaWithStates_0(3, 49, 23);
return jjStartNfaWithStates_0(3, 49, 27);
break;
case 111:
return jjMoveStringLiteralDfa4_0(active0, 0x8000L);
@ -504,15 +502,15 @@ static private int jjMoveStringLiteralDfa3_0(long old0, long active0){
return jjMoveStringLiteralDfa4_0(active0, 0x60040L);
case 116:
if ((active0 & 0x2000000L) != 0L)
return jjStartNfaWithStates_0(3, 25, 23);
return jjStartNfaWithStates_0(3, 25, 27);
return jjMoveStringLiteralDfa4_0(active0, 0x20040000100000L);
case 117:
return jjMoveStringLiteralDfa4_0(active0, 0x200000000L);
case 120:
if ((active0 & 0x4000000000L) != 0L)
return jjStartNfaWithStates_0(3, 38, 23);
return jjStartNfaWithStates_0(3, 38, 27);
else if ((active0 & 0x1000000000000L) != 0L)
return jjStartNfaWithStates_0(3, 48, 23);
return jjStartNfaWithStates_0(3, 48, 27);
break;
default :
break;
@ -531,23 +529,23 @@ static private int jjMoveStringLiteralDfa4_0(long old0, long active0){
{
case 97:
if ((active0 & 0x40000000000L) != 0L)
return jjStartNfaWithStates_0(4, 42, 23);
return jjStartNfaWithStates_0(4, 42, 27);
return jjMoveStringLiteralDfa5_0(active0, 0x80000800000L);
case 98:
return jjMoveStringLiteralDfa5_0(active0, 0x8000L);
case 101:
if ((active0 & 0x40000L) != 0L)
return jjStartNfaWithStates_0(4, 18, 23);
return jjStartNfaWithStates_0(4, 18, 27);
return jjMoveStringLiteralDfa5_0(active0, 0x20000800110000L);
case 104:
return jjMoveStringLiteralDfa5_0(active0, 0x10000000000000L);
case 107:
if ((active0 & 0x20L) != 0L)
return jjStartNfaWithStates_0(4, 5, 23);
return jjStartNfaWithStates_0(4, 5, 27);
break;
case 108:
if ((active0 & 0x20000000L) != 0L)
return jjStartNfaWithStates_0(4, 29, 23);
return jjStartNfaWithStates_0(4, 29, 27);
return jjMoveStringLiteralDfa5_0(active0, 0x200000200L);
case 110:
return jjMoveStringLiteralDfa5_0(active0, 0x3000L);
@ -555,13 +553,13 @@ static private int jjMoveStringLiteralDfa4_0(long old0, long active0){
return jjMoveStringLiteralDfa5_0(active0, 0x4000L);
case 112:
if ((active0 & 0x20000000000L) != 0L)
return jjStartNfaWithStates_0(4, 41, 23);
return jjStartNfaWithStates_0(4, 41, 27);
break;
case 114:
return jjMoveStringLiteralDfa5_0(active0, 0x803004000000L);
case 116:
if ((active0 & 0x40L) != 0L)
return jjStartNfaWithStates_0(4, 6, 23);
return jjStartNfaWithStates_0(4, 6, 27);
break;
case 117:
return jjMoveStringLiteralDfa5_0(active0, 0x80000L);
@ -590,23 +588,23 @@ static private int jjMoveStringLiteralDfa5_0(long old0, long active0){
return jjMoveStringLiteralDfa6_0(active0, 0x800000004000L);
case 101:
if ((active0 & 0x200L) != 0L)
return jjStartNfaWithStates_0(5, 9, 23);
return jjStartNfaWithStates_0(5, 9, 27);
else if ((active0 & 0x200000000L) != 0L)
return jjStartNfaWithStates_0(5, 33, 23);
return jjStartNfaWithStates_0(5, 33, 27);
break;
case 105:
return jjMoveStringLiteralDfa6_0(active0, 0x4001000L);
case 108:
if ((active0 & 0x800000L) != 0L)
return jjStartNfaWithStates_0(5, 23, 23);
return jjStartNfaWithStates_0(5, 23, 27);
return jjMoveStringLiteralDfa6_0(active0, 0x80000L);
case 109:
if ((active0 & 0x20000000000000L) != 0L)
return jjStartNfaWithStates_0(5, 53, 23);
return jjStartNfaWithStates_0(5, 53, 27);
break;
case 114:
if ((active0 & 0x100000L) != 0L)
return jjStartNfaWithStates_0(5, 20, 23);
return jjStartNfaWithStates_0(5, 20, 27);
break;
case 115:
return jjMoveStringLiteralDfa6_0(active0, 0x28000L);
@ -633,7 +631,7 @@ static private int jjMoveStringLiteralDfa6_0(long old0, long active0){
{
case 97:
if ((active0 & 0x80000L) != 0L)
return jjStartNfaWithStates_0(6, 19, 23);
return jjStartNfaWithStates_0(6, 19, 27);
return jjMoveStringLiteralDfa7_0(active0, 0x3004012000L);
case 101:
return jjMoveStringLiteralDfa7_0(active0, 0x800008000L);
@ -641,11 +639,11 @@ static private int jjMoveStringLiteralDfa6_0(long old0, long active0){
return jjMoveStringLiteralDfa7_0(active0, 0x80000000000L);
case 115:
if ((active0 & 0x800000000000L) != 0L)
return jjStartNfaWithStates_0(6, 47, 23);
return jjStartNfaWithStates_0(6, 47, 27);
return jjMoveStringLiteralDfa7_0(active0, 0x10000000000000L);
case 116:
if ((active0 & 0x1000L) != 0L)
return jjStartNfaWithStates_0(6, 12, 23);
return jjStartNfaWithStates_0(6, 12, 27);
return jjMoveStringLiteralDfa7_0(active0, 0x20000L);
case 117:
return jjMoveStringLiteralDfa7_0(active0, 0x4000L);
@ -695,7 +693,7 @@ static private int jjMoveStringLiteralDfa8_0(long old0, long active0){
return jjMoveStringLiteralDfa9_0(active0, 0x10000L);
case 101:
if ((active0 & 0x4000L) != 0L)
return jjStartNfaWithStates_0(8, 14, 23);
return jjStartNfaWithStates_0(8, 14, 27);
break;
case 105:
return jjMoveStringLiteralDfa9_0(active0, 0x10080000002000L);
@ -703,11 +701,11 @@ static private int jjMoveStringLiteralDfa8_0(long old0, long active0){
return jjMoveStringLiteralDfa9_0(active0, 0x3000000000L);
case 109:
if ((active0 & 0x20000L) != 0L)
return jjStartNfaWithStates_0(8, 17, 23);
return jjStartNfaWithStates_0(8, 17, 27);
return jjMoveStringLiteralDfa9_0(active0, 0x800000000L);
case 116:
if ((active0 & 0x4000000L) != 0L)
return jjStartNfaWithStates_0(8, 26, 23);
return jjStartNfaWithStates_0(8, 26, 27);
break;
case 118:
return jjMoveStringLiteralDfa9_0(active0, 0x8000L);
@ -730,7 +728,7 @@ static private int jjMoveStringLiteralDfa9_0(long old0, long active0){
return jjMoveStringLiteralDfa10_0(active0, 0xa000L);
case 99:
if ((active0 & 0x10000000000000L) != 0L)
return jjStartNfaWithStates_0(9, 52, 23);
return jjStartNfaWithStates_0(9, 52, 27);
break;
case 101:
if ((active0 & 0x1000000000L) != 0L)
@ -743,7 +741,7 @@ static private int jjMoveStringLiteralDfa9_0(long old0, long active0){
return jjMoveStringLiteralDfa10_0(active0, 0x800000000L);
case 115:
if ((active0 & 0x10000L) != 0L)
return jjStartNfaWithStates_0(9, 16, 23);
return jjStartNfaWithStates_0(9, 16, 27);
return jjMoveStringLiteralDfa10_0(active0, 0x80000000000L);
default :
break;
@ -766,7 +764,7 @@ static private int jjMoveStringLiteralDfa10_0(long old0, long active0){
return jjMoveStringLiteralDfa11_0(active0, 0x800002000L);
case 115:
if ((active0 & 0x2000000000L) != 0L)
return jjStartNfaWithStates_0(10, 37, 23);
return jjStartNfaWithStates_0(10, 37, 27);
break;
case 116:
return jjMoveStringLiteralDfa11_0(active0, 0x80000000000L);
@ -791,7 +789,7 @@ static private int jjMoveStringLiteralDfa11_0(long old0, long active0){
return jjMoveStringLiteralDfa12_0(active0, 0x8000L);
case 116:
if ((active0 & 0x2000L) != 0L)
return jjStartNfaWithStates_0(11, 13, 23);
return jjStartNfaWithStates_0(11, 13, 27);
break;
default :
break;
@ -810,7 +808,7 @@ static private int jjMoveStringLiteralDfa12_0(long old0, long active0){
{
case 99:
if ((active0 & 0x80000000000L) != 0L)
return jjStartNfaWithStates_0(12, 43, 23);
return jjStartNfaWithStates_0(12, 43, 27);
break;
case 101:
return jjMoveStringLiteralDfa13_0(active0, 0x8000L);
@ -833,7 +831,7 @@ static private int jjMoveStringLiteralDfa13_0(long old0, long active0){
{
case 115:
if ((active0 & 0x8000L) != 0L)
return jjStartNfaWithStates_0(13, 15, 23);
return jjStartNfaWithStates_0(13, 15, 27);
break;
case 116:
return jjMoveStringLiteralDfa14_0(active0, 0x800000000L);
@ -871,7 +869,7 @@ static private int jjMoveStringLiteralDfa15_0(long old0, long active0){
{
case 99:
if ((active0 & 0x800000000L) != 0L)
return jjStartNfaWithStates_0(15, 35, 23);
return jjStartNfaWithStates_0(15, 35, 27);
break;
default :
break;
@ -895,7 +893,7 @@ static final long[] jjbitVec2 = {
static private int jjMoveNfa_0(int startState, int curPos)
{
int startsAt = 0;
jjnewStateCnt = 23;
jjnewStateCnt = 27;
int i = 1;
jjstateSet[0] = startState;
int kind = 0x7fffffff;
@ -910,26 +908,26 @@ static private int jjMoveNfa_0(int startState, int curPos)
{
switch(jjstateSet[--i])
{
case 23:
case 27:
if ((0x3ff000000000000L & l) != 0L)
{
if (kind > 94)
kind = 94;
{ jjCheckNAdd(22); }
if (kind > 93)
kind = 93;
{ jjCheckNAdd(26); }
}
else if (curChar == 39)
{
if (kind > 93)
kind = 93;
if (kind > 92)
kind = 92;
}
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddTwoStates(20, 21); }
{ jjCheckNAddTwoStates(24, 25); }
break;
case 0:
if ((0x3ff000000000000L & l) != 0L)
{
if (kind > 92)
kind = 92;
if (kind > 91)
kind = 91;
{ jjCheckNAddStates(0, 3); }
}
else if ((0x100002600L & l) != 0L)
@ -938,21 +936,23 @@ static private int jjMoveNfa_0(int startState, int curPos)
kind = 1;
}
else if (curChar == 35)
{ jjCheckNAddTwoStates(16, 17); }
{ jjCheckNAddTwoStates(20, 21); }
else if (curChar == 34)
jjstateSet[jjnewStateCnt++] = 16;
else if (curChar == 46)
{ jjCheckNAdd(11); }
else if (curChar == 47)
jjstateSet[jjnewStateCnt++] = 1;
if ((0x3fe000000000000L & l) != 0L)
{
if (kind > 91)
kind = 91;
if (kind > 90)
kind = 90;
{ jjCheckNAdd(8); }
}
else if (curChar == 48)
{
if (kind > 91)
kind = 91;
if (kind > 90)
kind = 90;
}
break;
case 1:
@ -988,20 +988,20 @@ static private int jjMoveNfa_0(int startState, int curPos)
case 7:
if ((0x3fe000000000000L & l) == 0L)
break;
if (kind > 91)
kind = 91;
if (kind > 90)
kind = 90;
{ jjCheckNAdd(8); }
break;
case 8:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 91)
kind = 91;
if (kind > 90)
kind = 90;
{ jjCheckNAdd(8); }
break;
case 9:
if (curChar == 48 && kind > 91)
kind = 91;
if (curChar == 48 && kind > 90)
kind = 90;
break;
case 10:
if (curChar == 46)
@ -1010,8 +1010,8 @@ static private int jjMoveNfa_0(int startState, int curPos)
case 11:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 92)
kind = 92;
if (kind > 91)
kind = 91;
{ jjCheckNAddTwoStates(11, 12); }
break;
case 13:
@ -1021,43 +1021,55 @@ static private int jjMoveNfa_0(int startState, int curPos)
case 14:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 92)
kind = 92;
if (kind > 91)
kind = 91;
{ jjCheckNAdd(14); }
break;
case 15:
if (curChar == 34)
jjstateSet[jjnewStateCnt++] = 16;
break;
case 17:
if ((0x3ff000000000000L & l) != 0L)
{ jjAddStates(7, 8); }
break;
case 18:
if (curChar == 34 && kind > 94)
kind = 94;
break;
case 19:
if (curChar == 35)
{ jjCheckNAddTwoStates(16, 17); }
{ jjCheckNAddTwoStates(20, 21); }
break;
case 16:
case 20:
if ((0xfffffff7ffffffffL & l) != 0L)
{ jjCheckNAddTwoStates(16, 17); }
{ jjCheckNAddTwoStates(20, 21); }
break;
case 17:
case 21:
if (curChar == 35 && kind > 95)
kind = 95;
break;
case 18:
case 22:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 92)
kind = 92;
if (kind > 91)
kind = 91;
{ jjCheckNAddStates(0, 3); }
break;
case 20:
case 24:
if ((0x3ff000000000000L & l) != 0L)
{ jjCheckNAddTwoStates(20, 21); }
{ jjCheckNAddTwoStates(24, 25); }
break;
case 21:
if (curChar == 39 && kind > 93)
kind = 93;
case 25:
if (curChar == 39 && kind > 92)
kind = 92;
break;
case 22:
case 26:
if ((0x3ff000000000000L & l) == 0L)
break;
if (kind > 94)
kind = 94;
{ jjCheckNAdd(22); }
if (kind > 93)
kind = 93;
{ jjCheckNAdd(26); }
break;
default : break;
}
@ -1070,22 +1082,22 @@ static private int jjMoveNfa_0(int startState, int curPos)
{
switch(jjstateSet[--i])
{
case 23:
case 27:
if ((0x7fffffe87fffffeL & l) != 0L)
{
if (kind > 94)
kind = 94;
{ jjCheckNAdd(22); }
if (kind > 93)
kind = 93;
{ jjCheckNAdd(26); }
}
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(20, 21); }
{ jjCheckNAddTwoStates(24, 25); }
break;
case 0:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 94)
kind = 94;
{ jjCheckNAddStates(7, 9); }
if (kind > 93)
kind = 93;
{ jjCheckNAddStates(9, 11); }
break;
case 2:
if (kind > 2)
@ -1094,21 +1106,26 @@ static private int jjMoveNfa_0(int startState, int curPos)
break;
case 12:
if ((0x2000000020L & l) != 0L)
{ jjAddStates(10, 11); }
{ jjAddStates(12, 13); }
break;
case 16:
{ jjAddStates(12, 13); }
case 17:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(17, 18); }
break;
case 20:
{ jjAddStates(14, 15); }
break;
case 24:
if ((0x7fffffe87fffffeL & l) != 0L)
{ jjCheckNAddTwoStates(20, 21); }
{ jjCheckNAddTwoStates(24, 25); }
break;
case 22:
case 26:
if ((0x7fffffe87fffffeL & l) == 0L)
break;
if (kind > 94)
kind = 94;
{ jjCheckNAdd(22); }
if (kind > 93)
kind = 93;
{ jjCheckNAdd(26); }
break;
default : break;
}
@ -1132,9 +1149,9 @@ static private int jjMoveNfa_0(int startState, int curPos)
kind = 2;
{ jjAddStates(4, 6); }
break;
case 16:
case 20:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
{ jjAddStates(12, 13); }
{ jjAddStates(14, 15); }
break;
default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
}
@ -1147,14 +1164,14 @@ static private int jjMoveNfa_0(int startState, int curPos)
kind = 0x7fffffff;
}
++curPos;
if ((i = jjnewStateCnt) == (startsAt = 23 - (jjnewStateCnt = startsAt)))
if ((i = jjnewStateCnt) == (startsAt = 27 - (jjnewStateCnt = startsAt)))
return curPos;
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return curPos; }
}
}
static final int[] jjnextStates = {
10, 11, 12, 18, 2, 3, 5, 20, 21, 22, 13, 14, 16, 17,
10, 11, 12, 22, 2, 3, 5, 17, 18, 24, 25, 26, 13, 14, 20, 21,
};
private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
{
@ -1189,7 +1206,7 @@ public static final String[] jjstrLiteralImages = {
"\174", "\75\76", "\74\75\76", "\55\76", "\72", "\73", "\54", "\56\56", "\50", "\51",
"\133", "\135", "\133\133", "\135\135", "\173", "\175", "\75", "\41\75", "\74", "\76",
"\74\74", "\76\76", "\74\75", "\76\75", "\53", "\55", "\52", "\57", "\47", "\74\55",
"\77", "\42", null, null, null, null, null, null, };
"\77", null, null, null, null, null, null, null, };
static protected Token jjFillToken()
{
final Token t;
@ -1235,7 +1252,7 @@ public static Token getNextToken()
{
curChar = input_stream.BeginToken();
}
catch(java.io.IOException e)
catch(Exception e)
{
jjmatchedKind = 0;
jjmatchedPos = -1;
@ -1345,6 +1362,7 @@ static private void jjCheckNAddStates(int start, int end)
/** Reinitialise parser. */
static public void ReInit(SimpleCharStream stream)
{
jjmatchedPos = jjnewStateCnt = 0;
curLexState = defaultLexState;
input_stream = stream;
@ -1355,14 +1373,15 @@ static private void jjCheckNAddStates(int start, int end)
{
int i;
jjround = 0x80000001;
for (i = 23; i-- > 0;)
for (i = 27; i-- > 0;)
jjrounds[i] = 0x80000000;
}
/** Reinitialise parser. */
static public void ReInit(SimpleCharStream stream, int lexState)
static public void ReInit( SimpleCharStream stream, int lexState)
{
ReInit(stream);
ReInit( stream);
SwitchTo(lexState);
}
@ -1390,9 +1409,9 @@ static final long[] jjtoSpecial = {
};
static protected SimpleCharStream input_stream;
static private final int[] jjrounds = new int[23];
static private final int[] jjstateSet = new int[2 * 23];
static private final int[] jjrounds = new int[27];
static private final int[] jjstateSet = new int[2 * 27];
static protected char curChar;
static protected int curChar;
}

8
prism/src/parser/SimpleCharStream.java

@ -1,4 +1,4 @@
/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 6.0 */
/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 6.1 */
/* JavaCCOptions:STATIC=true,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package parser;
@ -30,13 +30,14 @@ public class SimpleCharStream
static protected char[] buffer;
static protected int maxNextCharInd = 0;
static protected int inBuf = 0;
static protected int tabSize = 8;
static protected int tabSize = 1;
static protected boolean trackLineColumn = true;
static public void setTabSize(int i) { tabSize = i; }
static public int getTabSize() { return tabSize; }
static protected void ExpandBuff(boolean wrapAround)
{
char[] newbuffer = new char[bufsize + 2048];
@ -471,8 +472,7 @@ public class SimpleCharStream
line = bufline[j];
column = bufcolumn[j];
}
static boolean getTrackLineColumn() { return trackLineColumn; }
static void setTrackLineColumn(boolean tlc) { trackLineColumn = tlc; }
}
/* JavaCC - OriginalChecksum=dcc1df1ef735c110db7f51764c3f7f64 (do not edit this line) */
/* JavaCC - OriginalChecksum=cf7f6842068a3a63d9871130dfbff36e (do not edit this line) */

6
prism/src/parser/Token.java

@ -1,5 +1,5 @@
/* Generated By:JavaCC: Do not edit this line. Token.java Version 6.0 */
/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
/* Generated By:JavaCC: Do not edit this line. Token.java Version 6.1 */
/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COLUMN=true,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package parser;
/**
@ -128,4 +128,4 @@ public class Token implements java.io.Serializable {
}
}
/* JavaCC - OriginalChecksum=7d751264ae152bf5b6855a5f69a4ab67 (do not edit this line) */
/* JavaCC - OriginalChecksum=cee95ae321b2c0bf682ab95fa968c14c (do not edit this line) */

23
prism/src/parser/TokenMgrError.java

@ -1,4 +1,4 @@
/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 6.0 */
/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 6.1 */
/* JavaCCOptions: */
package parser;
@ -20,22 +20,22 @@ public class TokenMgrError extends Error
/**
* Lexical error occurred.
*/
static final int LEXICAL_ERROR = 0;
public static final int LEXICAL_ERROR = 0;
/**
* An attempt was made to create a second instance of a static token manager.
*/
static final int STATIC_LEXER_ERROR = 1;
public static final int STATIC_LEXER_ERROR = 1;
/**
* Tried to change to an invalid lexical state.
*/
static final int INVALID_LEXICAL_STATE = 2;
public static final int INVALID_LEXICAL_STATE = 2;
/**
* Detected (and bailed out of) an infinite loop in the token manager.
*/
static final int LOOP_DETECTED = 3;
public static final int LOOP_DETECTED = 3;
/**
* Indicates the reason why the exception is thrown. It will have
@ -53,8 +53,6 @@ public class TokenMgrError extends Error
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
{
case 0 :
continue;
case '\b':
retval.append("\\b");
continue;
@ -104,11 +102,12 @@ public class TokenMgrError extends Error
* curchar : the offending character
* Note: You can customize the lexical error message by modifying this method.
*/
protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
protected static String LexicalErr(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar) {
char curChar1 = (char)curChar;
return("Lexical error at line " +
errorLine + ", column " +
errorColumn + ". Encountered: " +
(EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
(EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar1)) + "\"") + " (" + (int)curChar + "), ") +
"after : \"" + addEscapes(errorAfter) + "\"");
}
@ -140,8 +139,8 @@ public class TokenMgrError extends Error
}
/** Full Constructor. */
public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, int curChar, int reason) {
this(LexicalErr(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
}
}
/* JavaCC - OriginalChecksum=6c4705c2bebd89492711d8a1e624d837 (do not edit this line) */
/* JavaCC - OriginalChecksum=e6cc0598680ea0c2cb81e9cf37216aa9 (do not edit this line) */
Loading…
Cancel
Save