|
|
|
@ -2,6 +2,7 @@ |
|
|
|
package parser; |
|
|
|
|
|
|
|
import java.io.*; |
|
|
|
import java.util.List; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
|
import parser.ast.*; |
|
|
|
@ -236,13 +237,22 @@ public class PrismParser implements PrismParserConstants { |
|
|
|
return res; |
|
|
|
} |
|
|
|
|
|
|
|
// Test a string to see if it is a PRISM language keyword |
|
|
|
|
|
|
|
/** |
|
|
|
* Test a string to see if it is a PRISM language keyword. |
|
|
|
*/ |
|
|
|
public static boolean isKeyword(String s) |
|
|
|
{ |
|
|
|
return keywordList.contains(s); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Get access to the list of all PRISM language keywords. |
|
|
|
*/ |
|
|
|
public static List<String> getListOfKeywords() |
|
|
|
{ |
|
|
|
return keywordList; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* Set the tab size used by the lexer/parser. |
|
|
|
*/ |
|
|
|
@ -2973,80 +2983,6 @@ public class PrismParser implements PrismParserConstants { |
|
|
|
finally { jj_save(11, xla); } |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_135() { |
|
|
|
if (jj_3R_155()) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_160() { |
|
|
|
if (jj_scan_token(MAX)) return true; |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_64() { |
|
|
|
if (jj_3R_66()) return true; |
|
|
|
Token xsp; |
|
|
|
while (true) { |
|
|
|
xsp = jj_scanpos; |
|
|
|
if (jj_3R_67()) { jj_scanpos = xsp; break; } |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_138() { |
|
|
|
if (jj_scan_token(RMAX)) return true; |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_159() { |
|
|
|
if (jj_scan_token(MIN)) return true; |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_137() { |
|
|
|
if (jj_scan_token(RMIN)) return true; |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_158() { |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_157() { |
|
|
|
if (jj_3R_78()) return true; |
|
|
|
if (jj_3R_34()) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_136() { |
|
|
|
if (jj_scan_token(R)) return true; |
|
|
|
Token xsp; |
|
|
|
xsp = jj_scanpos; |
|
|
|
if (jj_3R_156()) jj_scanpos = xsp; |
|
|
|
xsp = jj_scanpos; |
|
|
|
if (jj_3R_157()) { |
|
|
|
jj_scanpos = xsp; |
|
|
|
if (jj_3R_158()) { |
|
|
|
jj_scanpos = xsp; |
|
|
|
if (jj_3R_159()) { |
|
|
|
jj_scanpos = xsp; |
|
|
|
if (jj_3R_160()) return true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_65() { |
|
|
|
if (jj_scan_token(OR)) return true; |
|
|
|
if (jj_3R_64()) return true; |
|
|
|
@ -4169,6 +4105,80 @@ public class PrismParser implements PrismParserConstants { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_135() { |
|
|
|
if (jj_3R_155()) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_160() { |
|
|
|
if (jj_scan_token(MAX)) return true; |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_64() { |
|
|
|
if (jj_3R_66()) return true; |
|
|
|
Token xsp; |
|
|
|
while (true) { |
|
|
|
xsp = jj_scanpos; |
|
|
|
if (jj_3R_67()) { jj_scanpos = xsp; break; } |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_138() { |
|
|
|
if (jj_scan_token(RMAX)) return true; |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_159() { |
|
|
|
if (jj_scan_token(MIN)) return true; |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_137() { |
|
|
|
if (jj_scan_token(RMIN)) return true; |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_158() { |
|
|
|
if (jj_scan_token(EQ)) return true; |
|
|
|
if (jj_scan_token(QMARK)) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_157() { |
|
|
|
if (jj_3R_78()) return true; |
|
|
|
if (jj_3R_34()) return true; |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_3R_136() { |
|
|
|
if (jj_scan_token(R)) return true; |
|
|
|
Token xsp; |
|
|
|
xsp = jj_scanpos; |
|
|
|
if (jj_3R_156()) jj_scanpos = xsp; |
|
|
|
xsp = jj_scanpos; |
|
|
|
if (jj_3R_157()) { |
|
|
|
jj_scanpos = xsp; |
|
|
|
if (jj_3R_158()) { |
|
|
|
jj_scanpos = xsp; |
|
|
|
if (jj_3R_159()) { |
|
|
|
jj_scanpos = xsp; |
|
|
|
if (jj_3R_160()) return true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
static private boolean jj_initialized_once = false; |
|
|
|
/** Generated Token Manager. */ |
|
|
|
static public PrismParserTokenManager token_source; |
|
|
|
|