@ -1,3 +1,4 @@
/* PrismParserTokenManager.java */
/* Generated By:JavaCC: Do not edit this line. PrismParserTokenManager.java */
package parser ;
import java.io.* ;
@ -13,15 +14,13 @@ import prism.ModelType;
import prism.PrismLangException ;
/** Token Manager. */
public class PrismParserTokenManager implements PrismParserConstants
{
@SuppressWarnings ( "unused" ) public class PrismParserTokenManager implements PrismParserConstants {
/** Debug output. */
public static java . io . PrintStream debugStream = System . out ;
/** Set debug output. */
public static void setDebugStream ( java . io . PrintStream ds ) { debugStream = ds ; }
private static final int jjStopStringLiteralDfa_0 ( int pos , long active0 , long active1 )
{
private static final int jjStopStringLiteralDfa_0 ( int pos , long active0 , long active1 ) {
switch ( pos )
{
case 0 :
@ -177,8 +176,7 @@ private static final int jjStopStringLiteralDfa_0(int pos, long active0, long ac
return - 1 ;
}
}
private static final int jjStartNfa_0 ( int pos , long active0 , long active1 )
{
private static final int jjStartNfa_0 ( int pos , long active0 , long active1 ) {
return jjMoveNfa_0 ( jjStopStringLiteralDfa_0 ( pos , active0 , active1 ) , pos + 1 ) ;
}
static private int jjStopAtPos ( int pos , int kind )
@ -187,8 +185,7 @@ static private int jjStopAtPos(int pos, int kind)
jjmatchedPos = pos ;
return pos + 1 ;
}
static private int jjMoveStringLiteralDfa0_0 ( )
{
static private int jjMoveStringLiteralDfa0_0 ( ) {
switch ( curChar )
{
case 33 :
@ -302,8 +299,7 @@ static private int jjMoveStringLiteralDfa0_0()
return jjMoveNfa_0 ( 0 , 0 ) ;
}
}
static private int jjMoveStringLiteralDfa1_0 ( long active0 , long active1 )
{
static private int jjMoveStringLiteralDfa1_0 ( long active0 , long active1 ) {
try { curChar = input_stream . readChar ( ) ; }
catch ( java . io . IOException e ) {
jjStopStringLiteralDfa_0 ( 0 , active0 , active1 ) ;
@ -379,8 +375,7 @@ static private int jjMoveStringLiteralDfa1_0(long active0, long active1)
}
return jjStartNfa_0 ( 0 , active0 , active1 ) ;
}
static private int jjMoveStringLiteralDfa2_0 ( long old0 , long active0 , long old1 , long active1 )
{
static private int jjMoveStringLiteralDfa2_0 ( long old0 , long active0 , long old1 , long active1 ) {
if ( ( ( active0 & = old0 ) | ( active1 & = old1 ) ) = = 0L )
return jjStartNfa_0 ( 0 , old0 , old1 ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -441,8 +436,7 @@ static private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1,
}
return jjStartNfa_0 ( 1 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa3_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa3_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 1 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -512,8 +506,7 @@ static private int jjMoveStringLiteralDfa3_0(long old0, long active0)
}
return jjStartNfa_0 ( 2 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa4_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa4_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 2 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -558,8 +551,7 @@ static private int jjMoveStringLiteralDfa4_0(long old0, long active0)
}
return jjStartNfa_0 ( 3 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa5_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa5_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 3 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -608,8 +600,7 @@ static private int jjMoveStringLiteralDfa5_0(long old0, long active0)
}
return jjStartNfa_0 ( 4 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa6_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa6_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 4 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -642,8 +633,7 @@ static private int jjMoveStringLiteralDfa6_0(long old0, long active0)
}
return jjStartNfa_0 ( 5 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa7_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa7_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 5 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -668,8 +658,7 @@ static private int jjMoveStringLiteralDfa7_0(long old0, long active0)
}
return jjStartNfa_0 ( 6 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa8_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa8_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 6 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -700,8 +689,7 @@ static private int jjMoveStringLiteralDfa8_0(long old0, long active0)
}
return jjStartNfa_0 ( 7 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa9_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa9_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 7 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -728,8 +716,7 @@ static private int jjMoveStringLiteralDfa9_0(long old0, long active0)
}
return jjStartNfa_0 ( 8 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa10_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa10_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 8 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -748,8 +735,7 @@ static private int jjMoveStringLiteralDfa10_0(long old0, long active0)
}
return jjStartNfa_0 ( 9 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa11_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa11_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 9 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -770,8 +756,7 @@ static private int jjMoveStringLiteralDfa11_0(long old0, long active0)
}
return jjStartNfa_0 ( 10 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa12_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa12_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 10 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -792,8 +777,7 @@ static private int jjMoveStringLiteralDfa12_0(long old0, long active0)
}
return jjStartNfa_0 ( 11 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa13_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa13_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 11 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -810,8 +794,7 @@ static private int jjMoveStringLiteralDfa13_0(long old0, long active0)
}
return jjStartNfa_0 ( 12 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa14_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa14_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 12 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -828,8 +811,7 @@ static private int jjMoveStringLiteralDfa14_0(long old0, long active0)
}
return jjStartNfa_0 ( 13 , active0 , 0L ) ;
}
static private int jjMoveStringLiteralDfa15_0 ( long old0 , long active0 )
{
static private int jjMoveStringLiteralDfa15_0 ( long old0 , long active0 ) {
if ( ( ( active0 & = old0 ) ) = = 0L )
return jjStartNfa_0 ( 13 , old0 , 0L ) ;
try { curChar = input_stream . readChar ( ) ; }
@ -885,7 +867,7 @@ static private int jjMoveNfa_0(int startState, int curPos)
{
if ( kind > 89 )
kind = 89 ;
jjCheckNAdd ( 22 ) ;
{ jjCheckNAdd ( 22 ) ; }
}
else if ( curChar = = 39 )
{
@ -893,14 +875,14 @@ static private int jjMoveNfa_0(int startState, int curPos)
kind = 88 ;
}
if ( ( 0x3ff000000000000L & l ) ! = 0L )
jjCheckNAddTwoStates ( 20 , 21 ) ;
{ jjCheckNAddTwoStates ( 20 , 21 ) ; }
break ;
case 0 :
if ( ( 0x3ff000000000000L & l ) ! = 0L )
{
if ( kind > 87 )
kind = 87 ;
jjCheckNAddStates ( 0 , 3 ) ;
{ jjCheckNAddStates ( 0 , 3 ) ; }
}
else if ( ( 0x100002600L & l ) ! = 0L )
{
@ -908,16 +890,16 @@ static private int jjMoveNfa_0(int startState, int curPos)
kind = 1 ;
}
else if ( curChar = = 35 )
jjCheckNAddTwoStates ( 16 , 17 ) ;
{ jjCheckNAddTwoStates ( 16 , 17 ) ; }
else if ( curChar = = 46 )
jjCheckNAdd ( 11 ) ;
{ jjCheckNAdd ( 11 ) ; }
else if ( curChar = = 47 )
jjstateSet [ jjnewStateCnt + + ] = 1 ;
if ( ( 0x3fe000000000000L & l ) ! = 0L )
{
if ( kind > 86 )
kind = 86 ;
jjCheckNAdd ( 8 ) ;
{ jjCheckNAdd ( 8 ) ; }
}
else if ( curChar = = 48 )
{
@ -930,14 +912,14 @@ static private int jjMoveNfa_0(int startState, int curPos)
break ;
if ( kind > 2 )
kind = 2 ;
jjCheckNAddStates ( 4 , 6 ) ;
{ jjCheckNAddStates ( 4 , 6 ) ; }
break ;
case 2 :
if ( ( 0xffffffffffffdbffL & l ) = = 0L )
break ;
if ( kind > 2 )
kind = 2 ;
jjCheckNAddStates ( 4 , 6 ) ;
{ jjCheckNAddStates ( 4 , 6 ) ; }
break ;
case 3 :
if ( ( 0x2400L & l ) ! = 0L & & kind > 2 )
@ -960,14 +942,14 @@ static private int jjMoveNfa_0(int startState, int curPos)
break ;
if ( kind > 86 )
kind = 86 ;
jjCheckNAdd ( 8 ) ;
{ jjCheckNAdd ( 8 ) ; }
break ;
case 8 :
if ( ( 0x3ff000000000000L & l ) = = 0L )
break ;
if ( kind > 86 )
kind = 86 ;
jjCheckNAdd ( 8 ) ;
{ jjCheckNAdd ( 8 ) ; }
break ;
case 9 :
if ( curChar = = 48 & & kind > 86 )
@ -975,33 +957,33 @@ static private int jjMoveNfa_0(int startState, int curPos)
break ;
case 10 :
if ( curChar = = 46 )
jjCheckNAdd ( 11 ) ;
{ jjCheckNAdd ( 11 ) ; }
break ;
case 11 :
if ( ( 0x3ff000000000000L & l ) = = 0L )
break ;
if ( kind > 87 )
kind = 87 ;
jjCheckNAddTwoStates ( 11 , 12 ) ;
{ jjCheckNAddTwoStates ( 11 , 12 ) ; }
break ;
case 13 :
if ( ( 0x280000000000L & l ) ! = 0L )
jjCheckNAdd ( 14 ) ;
{ jjCheckNAdd ( 14 ) ; }
break ;
case 14 :
if ( ( 0x3ff000000000000L & l ) = = 0L )
break ;
if ( kind > 87 )
kind = 87 ;
jjCheckNAdd ( 14 ) ;
{ jjCheckNAdd ( 14 ) ; }
break ;
case 15 :
if ( curChar = = 35 )
jjCheckNAddTwoStates ( 16 , 17 ) ;
{ jjCheckNAddTwoStates ( 16 , 17 ) ; }
break ;
case 16 :
if ( ( 0xfffffff7ffffffffL & l ) ! = 0L )
jjCheckNAddTwoStates ( 16 , 17 ) ;
{ jjCheckNAddTwoStates ( 16 , 17 ) ; }
break ;
case 17 :
if ( curChar = = 35 & & kind > 90 )
@ -1012,11 +994,11 @@ static private int jjMoveNfa_0(int startState, int curPos)
break ;
if ( kind > 87 )
kind = 87 ;
jjCheckNAddStates ( 0 , 3 ) ;
{ jjCheckNAddStates ( 0 , 3 ) ; }
break ;
case 20 :
if ( ( 0x3ff000000000000L & l ) ! = 0L )
jjCheckNAddTwoStates ( 20 , 21 ) ;
{ jjCheckNAddTwoStates ( 20 , 21 ) ; }
break ;
case 21 :
if ( curChar = = 39 & & kind > 88 )
@ -1027,7 +1009,7 @@ static private int jjMoveNfa_0(int startState, int curPos)
break ;
if ( kind > 89 )
kind = 89 ;
jjCheckNAdd ( 22 ) ;
{ jjCheckNAdd ( 22 ) ; }
break ;
default : break ;
}
@ -1045,40 +1027,40 @@ static private int jjMoveNfa_0(int startState, int curPos)
{
if ( kind > 89 )
kind = 89 ;
jjCheckNAdd ( 22 ) ;
{ jjCheckNAdd ( 22 ) ; }
}
if ( ( 0x7fffffe87fffffeL & l ) ! = 0L )
jjCheckNAddTwoStates ( 20 , 21 ) ;
{ jjCheckNAddTwoStates ( 20 , 21 ) ; }
break ;
case 0 :
if ( ( 0x7fffffe87fffffeL & l ) = = 0L )
break ;
if ( kind > 89 )
kind = 89 ;
jjCheckNAddStates ( 7 , 9 ) ;
{ jjCheckNAddStates ( 7 , 9 ) ; }
break ;
case 2 :
if ( kind > 2 )
kind = 2 ;
jjAddStates ( 4 , 6 ) ;
{ jjAddStates ( 4 , 6 ) ; }
break ;
case 12 :
if ( ( 0x2000000020L & l ) ! = 0L )
jjAddStates ( 10 , 11 ) ;
{ jjAddStates ( 10 , 11 ) ; }
break ;
case 16 :
jjAddStates ( 12 , 13 ) ;
{ jjAddStates ( 12 , 13 ) ; }
break ;
case 20 :
if ( ( 0x7fffffe87fffffeL & l ) ! = 0L )
jjCheckNAddTwoStates ( 20 , 21 ) ;
{ jjCheckNAddTwoStates ( 20 , 21 ) ; }
break ;
case 22 :
if ( ( 0x7fffffe87fffffeL & l ) = = 0L )
break ;
if ( kind > 89 )
kind = 89 ;
jjCheckNAdd ( 22 ) ;
{ jjCheckNAdd ( 22 ) ; }
break ;
default : break ;
}
@ -1086,7 +1068,7 @@ static private int jjMoveNfa_0(int startState, int curPos)
}
else
{
int hiByte = ( int ) ( curChar > > 8 ) ;
int hiByte = ( curChar > > 8 ) ;
int i1 = hiByte > > 6 ;
long l1 = 1L < < ( hiByte & 077 ) ;
int i2 = ( curChar & 0xff ) > > 6 ;
@ -1100,13 +1082,13 @@ static private int jjMoveNfa_0(int startState, int curPos)
break ;
if ( kind > 2 )
kind = 2 ;
jjAddStates ( 4 , 6 ) ;
{ jjAddStates ( 4 , 6 ) ; }
break ;
case 16 :
if ( jjCanMove_0 ( hiByte , i1 , i2 , l1 , l2 ) )
jjAddStates ( 12 , 13 ) ;
{ jjAddStates ( 12 , 13 ) ; }
break ;
default : break ;
default : if ( i1 = = 0 | | l1 = = 0 | | i2 = = 0 | | l2 = = 0 ) break ; else break ;
}
} while ( i ! = startsAt ) ;
}
@ -1158,69 +1140,6 @@ public static final String[] jjstrLiteralImages = {
"\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 , } ;
/** Lexer state names. */
public static final String [ ] lexStateNames = {
"DEFAULT" ,
} ;
static final long [ ] jjtoToken = {
0xfffffffffffffff9L , 0xfffffffL ,
} ;
static final long [ ] jjtoSkip = {
0x6L , 0x0L ,
} ;
static final long [ ] jjtoSpecial = {
0x6L , 0x0L ,
} ;
static protected SimpleCharStream input_stream ;
static private final int [ ] jjrounds = new int [ 23 ] ;
static private final int [ ] jjstateSet = new int [ 46 ] ;
static protected char curChar ;
/** Constructor. */
public PrismParserTokenManager ( SimpleCharStream stream ) {
if ( input_stream ! = null )
throw new TokenMgrError ( "ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables." , TokenMgrError . STATIC_LEXER_ERROR ) ;
input_stream = stream ;
}
/** Constructor. */
public PrismParserTokenManager ( SimpleCharStream stream , int lexState ) {
this ( stream ) ;
SwitchTo ( lexState ) ;
}
/** Reinitialise parser. */
static public void ReInit ( SimpleCharStream stream )
{
jjmatchedPos = jjnewStateCnt = 0 ;
curLexState = defaultLexState ;
input_stream = stream ;
ReInitRounds ( ) ;
}
static private void ReInitRounds ( )
{
int i ;
jjround = 0x80000001 ;
for ( i = 23 ; i - - > 0 ; )
jjrounds [ i ] = 0x80000000 ;
}
/** Reinitialise parser. */
static public void ReInit ( SimpleCharStream stream , int lexState )
{
ReInit ( stream ) ;
SwitchTo ( lexState ) ;
}
/** Switch to specified lex state. */
static public void SwitchTo ( int lexState )
{
if ( lexState > = 1 | | lexState < 0 )
throw new TokenMgrError ( "Error: Ignoring invalid lexical state : " + lexState + ". State unchanged." , TokenMgrError . INVALID_LEXICAL_STATE ) ;
else
curLexState = lexState ;
}
static protected Token jjFillToken ( )
{
final Token t ;
@ -1269,6 +1188,7 @@ public static Token getNextToken()
catch ( java . io . IOException e )
{
jjmatchedKind = 0 ;
jjmatchedPos = - 1 ;
matchedToken = jjFillToken ( ) ;
matchedToken . specialToken = specialToken ;
return matchedToken ;
@ -1357,4 +1277,72 @@ static private void jjCheckNAddStates(int start, int end)
} while ( start + + ! = end ) ;
}
/** Constructor. */
public PrismParserTokenManager ( SimpleCharStream stream ) {
if ( input_stream ! = null )
throw new TokenMgrError ( "ERROR: Second call to constructor of static lexer. You must use ReInit() to initialize the static variables." , TokenMgrError . STATIC_LEXER_ERROR ) ;
input_stream = stream ;
}
/** Constructor. */
public PrismParserTokenManager ( SimpleCharStream stream , int lexState ) {
ReInit ( stream ) ;
SwitchTo ( lexState ) ;
}
/** Reinitialise parser. */
static public void ReInit ( SimpleCharStream stream )
{
jjmatchedPos = jjnewStateCnt = 0 ;
curLexState = defaultLexState ;
input_stream = stream ;
ReInitRounds ( ) ;
}
static private void ReInitRounds ( )
{
int i ;
jjround = 0x80000001 ;
for ( i = 23 ; i - - > 0 ; )
jjrounds [ i ] = 0x80000000 ;
}
/** Reinitialise parser. */
static public void ReInit ( SimpleCharStream stream , int lexState )
{
ReInit ( stream ) ;
SwitchTo ( lexState ) ;
}
/** Switch to specified lex state. */
static public void SwitchTo ( int lexState )
{
if ( lexState > = 1 | | lexState < 0 )
throw new TokenMgrError ( "Error: Ignoring invalid lexical state : " + lexState + ". State unchanged." , TokenMgrError . INVALID_LEXICAL_STATE ) ;
else
curLexState = lexState ;
}
/** Lexer state names. */
public static final String [ ] lexStateNames = {
"DEFAULT" ,
} ;
static final long [ ] jjtoToken = {
0xfffffffffffffff9L , 0xfffffffL ,
} ;
static final long [ ] jjtoSkip = {
0x6L , 0x0L ,
} ;
static final long [ ] jjtoSpecial = {
0x6L , 0x0L ,
} ;
static protected SimpleCharStream input_stream ;
static private final int [ ] jjrounds = new int [ 23 ] ;
static private final int [ ] jjstateSet = new int [ 2 * 23 ] ;
static protected char curChar ;
}