From b90b5a27c90a28571975903b33dc9758939ef4ef Mon Sep 17 00:00:00 2001 From: khartlage Date: Wed, 19 Feb 2003 18:33:06 +0000 Subject: [PATCH 1/1] made PHPParser tokens more compatible with JDT Scanner tokens --- .../phpeclipse/phpeditor/phpparser/PHPParser.java | 1542 ++++++++++---------- 1 files changed, 771 insertions(+), 771 deletions(-) diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java index bf6944a..98f63ec 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/phpparser/PHPParser.java @@ -71,7 +71,7 @@ public class PHPParser extends PHPKeywords { private boolean phpMode; final static int TokenNameEOF = 0; - final static int TokenNameUNDEFINED = 1; + final static int TokenNameERROR = 1; final static int TokenNameHTML = 2; final static int TokenNameREMAINDER = 30; @@ -80,69 +80,69 @@ public class PHPParser extends PHPKeywords { final static int TokenNameXOR = 33; final static int TokenNameDIVIDE = 34; final static int TokenNameMULTIPLY = 35; - final static int TokenNameSUBTRACT = 36; - final static int TokenNameADD = 37; - final static int TokenNameEQUAL = 38; - final static int TokenNameUNEQUAL = 39; + final static int TokenNameMINUS = 36; + final static int TokenNamePLUS = 37; + final static int TokenNameEQUAL_EQUAL = 38; + final static int TokenNameNOT_EQUAL = 39; final static int TokenNameGREATER = 40; - final static int TokenNameGREATEREQUAL = 41; + final static int TokenNameGREATER_EQUAL = 41; final static int TokenNameLESS = 42; - final static int TokenNameLESSEQUAL = 43; - final static int TokenNameAND = 44; - final static int TokenNameOR = 45; - final static int TokenNameHASH = 46; - final static int TokenNameDDOT = 47; - final static int TokenNameDOTASSIGN = 48; - - final static int TokenNameASSIGN = 49; - final static int TokenNameREF = 50; + final static int TokenNameLESS_EQUAL = 43; + final static int TokenNameAND_AND = 44; + final static int TokenNameOR_OR = 45; + // final static int TokenNameHASH = 46; + final static int TokenNameCOLON = 47; + final static int TokenNameDOT_EQUAL = 48; + + final static int TokenNameEQUAL = 49; + final static int TokenNameMINUS_GREATER = 50; // -> final static int TokenNameFOREACH = 51; - final static int TokenNameAMPERSAND = 52; - final static int TokenNameDOLLARLISTOPEN = 53; - final static int TokenNameTILDE = 54; - final static int TokenNameTILDEASSIGN = 55; + final static int TokenNameAND = 52; + //final static int TokenNameDOLLARLISTOPEN = 53; + final static int TokenNameTWIDDLE = 54; + final static int TokenNameTWIDDLE_EQUAL = 55; final static int TokenNameREMAINDER_EQUAL = 56; final static int TokenNameXOR_EQUAL = 57; final static int TokenNameRIGHT_SHIFT_EQUAL = 58; final static int TokenNameLEFT_SHIFT_EQUAL = 59; - final static int TokenNameANDASSIGN = 60; - final static int TokenNameQUESTIONMARK = 61; - final static int TokenNameDDOT2 = 62; + final static int TokenNameAND_EQUAL = 60; + final static int TokenNameQUESTION = 61; + final static int TokenNameCOLON_COLON = 62; final static int TokenNameAT = 63; // final static int TokenNameHEREDOC = 64; final static int TokenNameDOLLAROPEN = 127; - final static int TokenNameARGOPEN = 128; - final static int TokenNameARGCLOSE = 129; - final static int TokenNameLISTOPEN = 130; - final static int TokenNameLISTCLOSE = 131; - final static int TokenNamePARTOPEN = 132; - final static int TokenNamePARTCLOSE = 133; + final static int TokenNameLPAREN = 128; + final static int TokenNameRPAREN = 129; + final static int TokenNameLBRACE = 130; + final static int TokenNameRBRACE = 131; + final static int TokenNameLBRACKET = 132; + final static int TokenNameRBRACKET = 133; final static int TokenNameCOMMA = 134; - final static int TokenNameSTRING = 136; - final static int TokenNameIDENTIFIER = 138; - final static int TokenNameDIGIT = 139; + final static int TokenNameStringLiteral = 136; + final static int TokenNameIdentifier = 138; + // final static int TokenNameDIGIT = 139; final static int TokenNameSEMICOLON = 140; - final static int TokenNameSLOT = 141; - final static int TokenNameSLOTSEQUENCE = 142; - final static int TokenNameDECREMENT = 144; - final static int TokenNameINCREMENT = 145; - final static int TokenNameADDTO = 146; + // final static int TokenNameSLOT = 141; + // final static int TokenNameSLOTSEQUENCE = 142; + final static int TokenNameMINUS_MINUS = 144; + final static int TokenNamePLUS_PLUS = 145; + final static int TokenNamePLUS_EQUAL = 146; final static int TokenNameDIVIDE_EQUAL = 147; - final static int TokenNameSUBTRACTFROM = 148; - final static int TokenNameTIMESBY = 149; - final static int TokenNameVARIABLE = 150; - final static int TokenNameINT_NUMBER = 151; - final static int TokenNameDOUBLE_NUMBER = 152; - final static int TokenNameINTERPOLATED_STRING = 153; - final static int TokenNameSTRING_CONSTANT = 154; + final static int TokenNameMINUS_EQUAL = 148; + final static int TokenNameMULTIPLY_EQUAL = 149; + final static int TokenNameVariable = 150; + final static int TokenNameIntegerLiteral = 151; + final static int TokenNameDoubleLiteral = 152; + final static int TokenNameStringInterpolated = 153; + final static int TokenNameStringConstant = 154; final static int TokenNameLEFT_SHIFT = 155; final static int TokenNameRIGHT_SHIFT = 156; - final static int TokenNameEX_EQUAL = 157; - final static int TokenNameEX_UNEQUAL = 158; - final static int TokenNameLINE = 159; + final static int TokenNameEQUAL_EQUAL_EQUAL = 157; + final static int TokenNameNOT_EQUAL_EQUAL = 158; + final static int TokenNameOR = 159; // final static int TokenNameAT = 153; // @ /** * Class Constructor. @@ -249,504 +249,504 @@ public class PHPParser extends PHPKeywords { phpEnd = true; } - private void getNextToken_OldVersion() throws CoreException { - phpEnd = false; - - while (str.length() > chIndx) { - ch = str.charAt(chIndx++); - token = TokenNameUNDEFINED; - if (ch == '\n') { - rowCount++; - columnCount = chIndx; - continue; // while loop - } - if (str.length() == chIndx) { - phpEnd = true; - } - if (!Character.isWhitespace(ch)) { - if (ch == '$') { - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '{') { - chIndx++; - token = TokenNameDOLLAROPEN; - return; - } - } - getIdentifier(); - return; - } - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch == '_') || (ch == '$')) { - getIdentifier(); - return; - } - if (ch >= '0' && ch <= '9') { - getNumber(); - return; - } - if (ch == '/') { - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '/') { - chIndx++; - // read comment until end of line: - while ((str.length() > chIndx) && (str.charAt(chIndx) != '\n')) { - chIndx++; - } - continue; - } else if (str.charAt(chIndx) == '*') { - chIndx++; - // multi line comment: - while (str.length() > chIndx) { - if (str.charAt(chIndx) == '*' && (str.length() > (chIndx + 1)) && str.charAt(chIndx + 1) == '/') { - chIndx += 2; - break; - } - ch = str.charAt(chIndx++); - if (ch == '\n') { - rowCount++; - columnCount = chIndx; - } - } - continue; - } - } - } else if (ch == '#') { - // read comment until end of line: - while ((str.length() > chIndx) && (str.charAt(chIndx) != '\n')) { - chIndx++; - } - continue; - } else if (ch == '"') { - // read string until end - boolean openString = true; - while (str.length() > chIndx) { - ch = str.charAt(chIndx++); - if (ch == '\\') { - if (str.length() > chIndx) { - ch = str.charAt(chIndx++); - } - } else if (ch == '"') { - openString = false; - break; - } else if (ch == '\n') { - rowCount++; - columnCount = chIndx; - } - } - if (openString) { - throwSyntaxError("Open string character '\"' at end of file."); - } - token = TokenNameINTERPOLATED_STRING; - return; - } else if (ch == '\'') { - // read string until end - boolean openString = true; - int startRow = rowCount; - while (str.length() > chIndx) { - ch = str.charAt(chIndx++); - if (ch == '\\') { - if (str.length() > chIndx) { - ch = str.charAt(chIndx++); - } - } else if (ch == '\'') { - openString = false; - break; - } else if (ch == '\n') { - rowCount++; - columnCount = chIndx; - } - } - if (openString) { - throwSyntaxError("Open string character \"'\" at end of file.", startRow); - } - token = TokenNameSTRING_CONSTANT; - return; - } else if (ch == '`') { - // read string until end - boolean openString = true; - int startRow = rowCount; - while (str.length() > chIndx) { - ch = str.charAt(chIndx++); - if (ch == '\\') { - if (str.length() > chIndx) { - ch = str.charAt(chIndx++); - } - } else if (ch == '`') { - openString = false; - break; - } else if (ch == '\n') { - rowCount++; - columnCount = chIndx; - } - } - if (openString) { - throwSyntaxError("Open string character \"`\" at end of file.", startRow); - } - token = TokenNameSTRING_CONSTANT; - return; - } - - switch (ch) { - - case '(' : - token = TokenNameARGOPEN; - - break; - case ')' : - token = TokenNameARGCLOSE; - - break; - case '{' : - token = TokenNameLISTOPEN; - - break; - case '}' : - token = TokenNameLISTCLOSE; - - break; - case '[' : - token = TokenNamePARTOPEN; - - break; - case ']' : - token = TokenNamePARTCLOSE; - - break; - case ',' : - token = TokenNameCOMMA; - - break; - case '?' : - token = TokenNameQUESTIONMARK; - break; - case '@' : - token = TokenNameAT; - break; - case '~' : - token = TokenNameTILDE; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameTILDEASSIGN; - - break; - } - } - break; - case '.' : - token = TokenNameDOT; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameDOTASSIGN; - - break; - } - } - - break; - case '"' : - token = TokenNameSTRING; - - break; - case '%' : - token = TokenNameREMAINDER; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameREMAINDER_EQUAL; - - break; - } - } - break; - case ';' : - token = TokenNameSEMICOLON; - - break; - case '^' : - token = TokenNameXOR; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameXOR_EQUAL; - - break; - } - } - break; - case '/' : - token = TokenNameDIVIDE; - - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameDIVIDE_EQUAL; - - break; - } - } - - break; - case '*' : - token = TokenNameMULTIPLY; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '*') { - chIndx++; - token = TokenNameXOR; - - break; - } - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameTIMESBY; - - break; - } - } - - break; - case '+' : - token = TokenNameADD; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '+') { - chIndx++; - token = TokenNameINCREMENT; - - break; - } - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameADDTO; - - break; - } - } - break; - case '-' : - token = TokenNameSUBTRACT; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '-') { - chIndx++; - token = TokenNameDECREMENT; - - break; - } - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameSUBTRACTFROM; - - break; - } - if (str.charAt(chIndx) == '>') { - chIndx++; - token = TokenNameREF; - - break; - } - } - - break; - case '=' : - token = TokenNameASSIGN; - - if (str.length() > chIndx) { - ch = str.charAt(chIndx); - - if (ch == '=') { - chIndx++; - token = TokenNameEQUAL; - if (str.length() > chIndx) { - ch = str.charAt(chIndx); - - if (ch == '=') { - chIndx++; - token = TokenNameEX_EQUAL; - } - } - break; - } - if (ch == '>') { - chIndx++; - token = TokenNameFOREACH; - - break; - } - } - - break; - case '!' : - token = TokenNameNOT; - - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameUNEQUAL; - if (str.length() > chIndx) { - ch = str.charAt(chIndx); - - if (ch == '=') { - chIndx++; - token = TokenNameEX_UNEQUAL; - } - } - break; - } - } - - break; - case '>' : - token = TokenNameGREATER; - - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameGREATEREQUAL; - break; - } - if (str.charAt(chIndx) == '>') { - chIndx++; - token = TokenNameRIGHT_SHIFT; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameRIGHT_SHIFT_EQUAL; - break; - } - } - break; - } - } - - break; - case '<' : - token = TokenNameLESS; - - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameLESSEQUAL; - - break; - } - if (str.charAt(chIndx) == '<') { - chIndx++; - token = TokenNameLEFT_SHIFT; - if (str.charAt(chIndx) == '<') { - // heredoc - int startRow = rowCount; - if (str.length() > chIndx) { - - ch = str.charAt(++chIndx); - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch == '_')) { - chIndx++; - getIdentifier(); - token = TokenNameSTRING_CONSTANT; - while (str.length() > chIndx) { - ch = str.charAt(chIndx++); - if (ch == '\n') { - if (str.length() >= chIndx + identifier.length()) { - if (str.substring(chIndx, chIndx + identifier.length()).equals(identifier)) { - chIndx += identifier.length(); - return; - } - } - } - } - } - } - throwSyntaxError("Open heredoc syntax after operator '<<<'.", startRow); - } else if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameLEFT_SHIFT_EQUAL; - break; - } - break; - } - } - - break; - - case '|' : - token = TokenNameLINE; - - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '|') { - chIndx++; - token = TokenNameOR; - - break; - } - } - - break; - case '&' : - token = TokenNameAMPERSAND; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == '&') { - chIndx++; - token = TokenNameAND; - break; - } - if (str.charAt(chIndx) == '=') { - chIndx++; - token = TokenNameANDASSIGN; - break; - } - break; - } - - break; - case ':' : - token = TokenNameDDOT; - if (str.length() > chIndx) { - if (str.charAt(chIndx) == ':') { - chIndx++; - token = TokenNameDDOT2; - } - } - break; - case '#' : - token = TokenNameHASH; - - break; - // case '@' : - // token = TokenNameAT; - // - // break; - default : - throwSyntaxError("unexpected character: '" + ch + "'"); - } - - if (token == TokenNameUNDEFINED) { - throwSyntaxError("token not found"); - } - - return; - } - } - - chIndx = str.length() + 1; - ch = ' '; - token = TokenNameEOF; - phpEnd = true; - PHPString temp; - if (phpList != null) { - if (currentPHPString < phpList.size()) { - token = TokenNameUNDEFINED; - temp = (PHPString) phpList.get(currentPHPString++); - this.str = temp.getPHPString(); - this.token = TokenNameEOF; - this.chIndx = 0; - this.rowCount = temp.getLineNumber(); - this.columnCount = 0; - getNextToken(); - phpEnd = true; - } else { - token = TokenNameUNDEFINED; - return; - } - } - } +// private void getNextToken_OldVersion() throws CoreException { +// phpEnd = false; +// +// while (str.length() > chIndx) { +// ch = str.charAt(chIndx++); +// token = TokenNameERROR; +// if (ch == '\n') { +// rowCount++; +// columnCount = chIndx; +// continue; // while loop +// } +// if (str.length() == chIndx) { +// phpEnd = true; +// } +// if (!Character.isWhitespace(ch)) { +// if (ch == '$') { +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '{') { +// chIndx++; +// token = TokenNameDOLLAROPEN; +// return; +// } +// } +// getIdentifier(); +// return; +// } +// if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch == '_') || (ch == '$')) { +// getIdentifier(); +// return; +// } +// if (ch >= '0' && ch <= '9') { +// getNumber(); +// return; +// } +// if (ch == '/') { +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '/') { +// chIndx++; +// // read comment until end of line: +// while ((str.length() > chIndx) && (str.charAt(chIndx) != '\n')) { +// chIndx++; +// } +// continue; +// } else if (str.charAt(chIndx) == '*') { +// chIndx++; +// // multi line comment: +// while (str.length() > chIndx) { +// if (str.charAt(chIndx) == '*' && (str.length() > (chIndx + 1)) && str.charAt(chIndx + 1) == '/') { +// chIndx += 2; +// break; +// } +// ch = str.charAt(chIndx++); +// if (ch == '\n') { +// rowCount++; +// columnCount = chIndx; +// } +// } +// continue; +// } +// } +// } else if (ch == '#') { +// // read comment until end of line: +// while ((str.length() > chIndx) && (str.charAt(chIndx) != '\n')) { +// chIndx++; +// } +// continue; +// } else if (ch == '"') { +// // read string until end +// boolean openString = true; +// while (str.length() > chIndx) { +// ch = str.charAt(chIndx++); +// if (ch == '\\') { +// if (str.length() > chIndx) { +// ch = str.charAt(chIndx++); +// } +// } else if (ch == '"') { +// openString = false; +// break; +// } else if (ch == '\n') { +// rowCount++; +// columnCount = chIndx; +// } +// } +// if (openString) { +// throwSyntaxError("Open string character '\"' at end of file."); +// } +// token = TokenNameINTERPOLATED_STRING; +// return; +// } else if (ch == '\'') { +// // read string until end +// boolean openString = true; +// int startRow = rowCount; +// while (str.length() > chIndx) { +// ch = str.charAt(chIndx++); +// if (ch == '\\') { +// if (str.length() > chIndx) { +// ch = str.charAt(chIndx++); +// } +// } else if (ch == '\'') { +// openString = false; +// break; +// } else if (ch == '\n') { +// rowCount++; +// columnCount = chIndx; +// } +// } +// if (openString) { +// throwSyntaxError("Open string character \"'\" at end of file.", startRow); +// } +// token = TokenNameStringConstant; +// return; +// } else if (ch == '`') { +// // read string until end +// boolean openString = true; +// int startRow = rowCount; +// while (str.length() > chIndx) { +// ch = str.charAt(chIndx++); +// if (ch == '\\') { +// if (str.length() > chIndx) { +// ch = str.charAt(chIndx++); +// } +// } else if (ch == '`') { +// openString = false; +// break; +// } else if (ch == '\n') { +// rowCount++; +// columnCount = chIndx; +// } +// } +// if (openString) { +// throwSyntaxError("Open string character \"`\" at end of file.", startRow); +// } +// token = TokenNameStringConstant; +// return; +// } +// +// switch (ch) { +// +// case '(' : +// token = TokenNameLPAREN; +// +// break; +// case ')' : +// token = TokenNameRPAREN; +// +// break; +// case '{' : +// token = TokenNameLBRACE; +// +// break; +// case '}' : +// token = TokenNameRBRACE; +// +// break; +// case '[' : +// token = TokenNameLBRACKET; +// +// break; +// case ']' : +// token = TokenNameRBRACKET; +// +// break; +// case ',' : +// token = TokenNameCOMMA; +// +// break; +// case '?' : +// token = TokenNameQUESTION; +// break; +// case '@' : +// token = TokenNameAT; +// break; +// case '~' : +// token = TokenNameTWIDDLE; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameTWIDDLE_EQUAL; +// +// break; +// } +// } +// break; +// case '.' : +// token = TokenNameDOT; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameDOT_EQUAL; +// +// break; +// } +// } +// +// break; +// case '"' : +// token = TokenNameStringLiteral; +// +// break; +// case '%' : +// token = TokenNameREMAINDER; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameREMAINDER_EQUAL; +// +// break; +// } +// } +// break; +// case ';' : +// token = TokenNameSEMICOLON; +// +// break; +// case '^' : +// token = TokenNameXOR; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameXOR_EQUAL; +// +// break; +// } +// } +// break; +// case '/' : +// token = TokenNameDIVIDE; +// +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameDIVIDE_EQUAL; +// +// break; +// } +// } +// +// break; +// case '*' : +// token = TokenNameMULTIPLY; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '*') { +// chIndx++; +// token = TokenNameXOR; +// +// break; +// } +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameMULTIPLY_EQUAL; +// +// break; +// } +// } +// +// break; +// case '+' : +// token = TokenNamePLUS; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '+') { +// chIndx++; +// token = TokenNamePLUS_PLUS; +// +// break; +// } +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNamePLUS_EQUAL; +// +// break; +// } +// } +// break; +// case '-' : +// token = TokenNameMINUS; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '-') { +// chIndx++; +// token = TokenNameMINUS_MINUS; +// +// break; +// } +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameMINUS_EQUAL; +// +// break; +// } +// if (str.charAt(chIndx) == '>') { +// chIndx++; +// token = TokenNameMINUS_GREATER; +// +// break; +// } +// } +// +// break; +// case '=' : +// token = TokenNameEQUAL; +// +// if (str.length() > chIndx) { +// ch = str.charAt(chIndx); +// +// if (ch == '=') { +// chIndx++; +// token = TokenNameEQUAL_EQUAL; +// if (str.length() > chIndx) { +// ch = str.charAt(chIndx); +// +// if (ch == '=') { +// chIndx++; +// token = TokenNameEQUAL_EQUAL_EQUAL; +// } +// } +// break; +// } +// if (ch == '>') { +// chIndx++; +// token = TokenNameFOREACH; +// +// break; +// } +// } +// +// break; +// case '!' : +// token = TokenNameNOT; +// +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameNOT_EQUAL; +// if (str.length() > chIndx) { +// ch = str.charAt(chIndx); +// +// if (ch == '=') { +// chIndx++; +// token = TokenNameNOT_EQUAL_EQUAL; +// } +// } +// break; +// } +// } +// +// break; +// case '>' : +// token = TokenNameGREATER; +// +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameGREATER_EQUAL; +// break; +// } +// if (str.charAt(chIndx) == '>') { +// chIndx++; +// token = TokenNameRIGHT_SHIFT; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameRIGHT_SHIFT_EQUAL; +// break; +// } +// } +// break; +// } +// } +// +// break; +// case '<' : +// token = TokenNameLESS; +// +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameLESS_EQUAL; +// +// break; +// } +// if (str.charAt(chIndx) == '<') { +// chIndx++; +// token = TokenNameLEFT_SHIFT; +// if (str.charAt(chIndx) == '<') { +// // heredoc +// int startRow = rowCount; +// if (str.length() > chIndx) { +// +// ch = str.charAt(++chIndx); +// if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch == '_')) { +// chIndx++; +// getIdentifier(); +// token = TokenNameStringConstant; +// while (str.length() > chIndx) { +// ch = str.charAt(chIndx++); +// if (ch == '\n') { +// if (str.length() >= chIndx + identifier.length()) { +// if (str.substring(chIndx, chIndx + identifier.length()).equals(identifier)) { +// chIndx += identifier.length(); +// return; +// } +// } +// } +// } +// } +// } +// throwSyntaxError("Open heredoc syntax after operator '<<<'.", startRow); +// } else if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameLEFT_SHIFT_EQUAL; +// break; +// } +// break; +// } +// } +// +// break; +// +// case '|' : +// token = TokenNameOR; +// +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '|') { +// chIndx++; +// token = TokenNameOR_OR; +// +// break; +// } +// } +// +// break; +// case '&' : +// token = TokenNameAND; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == '&') { +// chIndx++; +// token = TokenNameAND_AND; +// break; +// } +// if (str.charAt(chIndx) == '=') { +// chIndx++; +// token = TokenNameAND_EQUAL; +// break; +// } +// break; +// } +// +// break; +// case ':' : +// token = TokenNameCOLON; +// if (str.length() > chIndx) { +// if (str.charAt(chIndx) == ':') { +// chIndx++; +// token = TokenNameCOLON_COLON; +// } +// } +// break; +// case '#' : +// token = TokenNameHASH; +// +// break; +// // case '@' : +// // token = TokenNameAT; +// // +// // break; +// default : +// throwSyntaxError("unexpected character: '" + ch + "'"); +// } +// +// if (token == TokenNameERROR) { +// throwSyntaxError("token not found"); +// } +// +// return; +// } +// } +// +// chIndx = str.length() + 1; +// ch = ' '; +// token = TokenNameEOF; +// phpEnd = true; +// PHPString temp; +// if (phpList != null) { +// if (currentPHPString < phpList.size()) { +// token = TokenNameERROR; +// temp = (PHPString) phpList.get(currentPHPString++); +// this.str = temp.getPHPString(); +// this.token = TokenNameEOF; +// this.chIndx = 0; +// this.rowCount = temp.getLineNumber(); +// this.columnCount = 0; +// getNextToken(); +// phpEnd = true; +// } else { +// token = TokenNameERROR; +// return; +// } +// } +// } /** * gets the next token from input */ @@ -759,7 +759,7 @@ public class PHPParser extends PHPKeywords { if (!phpMode) { while (str.length() > chIndx) { - token = TokenNameUNDEFINED; + token = TokenNameERROR; ch = str.charAt(chIndx++); if (ch == '\n') { @@ -798,7 +798,7 @@ public class PHPParser extends PHPKeywords { if (phpMode) { while (str.length() > chIndx) { ch = str.charAt(chIndx++); - token = TokenNameUNDEFINED; + token = TokenNameERROR; if (ch == '\n') { rowCount++; columnCount = chIndx; @@ -887,13 +887,13 @@ public class PHPParser extends PHPKeywords { continue; } else if (ch == '"') { - getString('"',TokenNameINTERPOLATED_STRING,"Open string character '\"' at end of file."); + getString('"',TokenNameStringInterpolated,"Open string character '\"' at end of file."); return; } else if (ch == '\'') { - getString('\'',TokenNameSTRING_CONSTANT,"Open string character \"'\" at end of file."); + getString('\'',TokenNameStringConstant,"Open string character \"'\" at end of file."); return; } else if (ch == '`') { - getString('`',TokenNameSTRING_CONSTANT,"Open string character \"`\" at end of file."); + getString('`',TokenNameStringConstant,"Open string character \"`\" at end of file."); setMarker("Other string delimiters prefered (found \"`\").", rowCount, PHPParser.INFO); return; } @@ -901,27 +901,27 @@ public class PHPParser extends PHPKeywords { switch (ch) { case '(' : - token = TokenNameARGOPEN; + token = TokenNameLPAREN; break; case ')' : - token = TokenNameARGCLOSE; + token = TokenNameRPAREN; break; case '{' : - token = TokenNameLISTOPEN; + token = TokenNameLBRACE; break; case '}' : - token = TokenNameLISTCLOSE; + token = TokenNameRBRACE; break; case '[' : - token = TokenNamePARTOPEN; + token = TokenNameLBRACKET; break; case ']' : - token = TokenNamePARTCLOSE; + token = TokenNameRBRACKET; break; case ',' : @@ -929,7 +929,7 @@ public class PHPParser extends PHPKeywords { break; case '?' : - token = TokenNameQUESTIONMARK; + token = TokenNameQUESTION; if (str.length() > chIndx) { if (str.charAt(chIndx) == '>') { chIndx++; @@ -946,11 +946,11 @@ public class PHPParser extends PHPKeywords { token = TokenNameAT; break; case '~' : - token = TokenNameTILDE; + token = TokenNameTWIDDLE; if (str.length() > chIndx) { if (str.charAt(chIndx) == '=') { chIndx++; - token = TokenNameTILDEASSIGN; + token = TokenNameTWIDDLE_EQUAL; break; } @@ -961,7 +961,7 @@ public class PHPParser extends PHPKeywords { if (str.length() > chIndx) { if (str.charAt(chIndx) == '=') { chIndx++; - token = TokenNameDOTASSIGN; + token = TokenNameDOT_EQUAL; break; } @@ -969,7 +969,7 @@ public class PHPParser extends PHPKeywords { break; case '"' : - token = TokenNameSTRING; + token = TokenNameStringLiteral; break; case '%' : @@ -1022,7 +1022,7 @@ public class PHPParser extends PHPKeywords { } if (str.charAt(chIndx) == '=') { chIndx++; - token = TokenNameTIMESBY; + token = TokenNameMULTIPLY_EQUAL; break; } @@ -1030,40 +1030,40 @@ public class PHPParser extends PHPKeywords { break; case '+' : - token = TokenNameADD; + token = TokenNamePLUS; if (str.length() > chIndx) { if (str.charAt(chIndx) == '+') { chIndx++; - token = TokenNameINCREMENT; + token = TokenNamePLUS_PLUS; break; } if (str.charAt(chIndx) == '=') { chIndx++; - token = TokenNameADDTO; + token = TokenNamePLUS_EQUAL; break; } } break; case '-' : - token = TokenNameSUBTRACT; + token = TokenNameMINUS; if (str.length() > chIndx) { if (str.charAt(chIndx) == '-') { chIndx++; - token = TokenNameDECREMENT; + token = TokenNameMINUS_MINUS; break; } if (str.charAt(chIndx) == '=') { chIndx++; - token = TokenNameSUBTRACTFROM; + token = TokenNameMINUS_EQUAL; break; } if (str.charAt(chIndx) == '>') { chIndx++; - token = TokenNameREF; + token = TokenNameMINUS_GREATER; break; } @@ -1071,20 +1071,20 @@ public class PHPParser extends PHPKeywords { break; case '=' : - token = TokenNameASSIGN; + token = TokenNameEQUAL; if (str.length() > chIndx) { ch = str.charAt(chIndx); if (ch == '=') { chIndx++; - token = TokenNameEQUAL; + token = TokenNameEQUAL_EQUAL; if (str.length() > chIndx) { ch = str.charAt(chIndx); if (ch == '=') { chIndx++; - token = TokenNameEX_EQUAL; + token = TokenNameEQUAL_EQUAL_EQUAL; } } break; @@ -1104,13 +1104,13 @@ public class PHPParser extends PHPKeywords { if (str.length() > chIndx) { if (str.charAt(chIndx) == '=') { chIndx++; - token = TokenNameUNEQUAL; + token = TokenNameNOT_EQUAL; if (str.length() > chIndx) { ch = str.charAt(chIndx); if (ch == '=') { chIndx++; - token = TokenNameEX_UNEQUAL; + token = TokenNameNOT_EQUAL_EQUAL; } } break; @@ -1124,7 +1124,7 @@ public class PHPParser extends PHPKeywords { if (str.length() > chIndx) { if (str.charAt(chIndx) == '=') { chIndx++; - token = TokenNameGREATEREQUAL; + token = TokenNameGREATER_EQUAL; break; } if (str.charAt(chIndx) == '>') { @@ -1148,7 +1148,7 @@ public class PHPParser extends PHPKeywords { if (str.length() > chIndx) { if (str.charAt(chIndx) == '=') { chIndx++; - token = TokenNameLESSEQUAL; + token = TokenNameLESS_EQUAL; break; } @@ -1164,7 +1164,7 @@ public class PHPParser extends PHPKeywords { if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch == '_')) { chIndx++; getIdentifier(); - token = TokenNameSTRING_CONSTANT; + token = TokenNameStringConstant; while (str.length() > chIndx) { ch = str.charAt(chIndx++); if (ch == '\n') { @@ -1191,12 +1191,12 @@ public class PHPParser extends PHPKeywords { break; case '|' : - token = TokenNameLINE; + token = TokenNameOR; if (str.length() > chIndx) { if (str.charAt(chIndx) == '|') { chIndx++; - token = TokenNameOR; + token = TokenNameOR_OR; break; } @@ -1204,16 +1204,16 @@ public class PHPParser extends PHPKeywords { break; case '&' : - token = TokenNameAMPERSAND; + token = TokenNameAND; if (str.length() > chIndx) { if (str.charAt(chIndx) == '&') { chIndx++; - token = TokenNameAND; + token = TokenNameAND_AND; break; } if (str.charAt(chIndx) == '=') { chIndx++; - token = TokenNameANDASSIGN; + token = TokenNameAND_EQUAL; break; } break; @@ -1221,18 +1221,18 @@ public class PHPParser extends PHPKeywords { break; case ':' : - token = TokenNameDDOT; + token = TokenNameCOLON; if (str.length() > chIndx) { if (str.charAt(chIndx) == ':') { chIndx++; - token = TokenNameDDOT2; + token = TokenNameCOLON_COLON; } } break; - case '#' : - token = TokenNameHASH; - - break; +// case '#' : +// token = TokenNameHASH; +// +// break; // case '@' : // token = TokenNameAT; // @@ -1241,7 +1241,7 @@ public class PHPParser extends PHPKeywords { throwSyntaxError("unexpected character: '" + ch + "'"); } - if (token == TokenNameUNDEFINED) { + if (token == TokenNameERROR) { throwSyntaxError("token not found"); } @@ -1287,10 +1287,10 @@ public class PHPParser extends PHPKeywords { getChar(); // attention recursive call: getIdentifier(); - token = TokenNameVARIABLE; + token = TokenNameVariable; return; } else { - token = TokenNameIDENTIFIER; + token = TokenNameIdentifier; } getChar(); @@ -1393,11 +1393,11 @@ public class PHPParser extends PHPKeywords { try { if (dFlag != ' ') { doubleNumber = new Double(inum.toString()); - token = TokenNameDOUBLE_NUMBER; + token = TokenNameDoubleLiteral; return; } else { longNumber = Long.valueOf(inum.toString(), numFormat); - token = TokenNameINT_NUMBER; + token = TokenNameIntegerLiteral; return; } @@ -1435,7 +1435,7 @@ public class PHPParser extends PHPKeywords { } } if (openString) { - if (typeString == TokenNameSTRING_CONSTANT) { + if (typeString == TokenNameStringConstant) { throwSyntaxError(errorMsg, startRow); } else { throwSyntaxError(errorMsg); @@ -1649,27 +1649,27 @@ public class PHPParser extends PHPKeywords { getNextToken(); do { try { - if (token != TokenNameEOF && token != TokenNameUNDEFINED) { + if (token != TokenNameEOF && token != TokenNameERROR) { statementList(); } - if (token != TokenNameEOF && token != TokenNameUNDEFINED) { - if (token == TokenNameARGCLOSE) { + if (token != TokenNameEOF && token != TokenNameERROR) { + if (token == TokenNameRPAREN) { throwSyntaxError("Too many closing ')'; end-of-file not reached."); } - if (token == TokenNameLISTCLOSE) { + if (token == TokenNameRBRACE) { throwSyntaxError("Too many closing '}'; end-of-file not reached."); } - if (token == TokenNamePARTCLOSE) { + if (token == TokenNameRBRACKET) { throwSyntaxError("Too many closing ']'; end-of-file not reached."); } - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { throwSyntaxError("Read character '('; end-of-file not reached."); } - if (token == TokenNameLISTOPEN) { + if (token == TokenNameLBRACE) { throwSyntaxError("Read character '{'; end-of-file not reached."); } - if (token == TokenNamePARTOPEN) { + if (token == TokenNameLBRACKET) { throwSyntaxError("Read character '['; end-of-file not reached."); } @@ -1685,13 +1685,13 @@ public class PHPParser extends PHPKeywords { // if an error occured, // try to find keywords 'class' or 'function' // to parse the rest of the string - while (token != TokenNameEOF && token != TokenNameUNDEFINED) { + while (token != TokenNameEOF && token != TokenNameERROR) { if (token == TokenNameclass || token == TokenNamefunction) { break; } getNextToken(); } - if (token == TokenNameEOF || token == TokenNameUNDEFINED) { + if (token == TokenNameEOF || token == TokenNameERROR) { return; } } @@ -1714,27 +1714,27 @@ public class PHPParser extends PHPKeywords { getNextToken(); do { try { - if (token != TokenNameEOF && token != TokenNameUNDEFINED) { + if (token != TokenNameEOF && token != TokenNameERROR) { statementList(); } - if (token != TokenNameEOF && token != TokenNameUNDEFINED) { - if (token == TokenNameARGCLOSE) { + if (token != TokenNameEOF && token != TokenNameERROR) { + if (token == TokenNameRPAREN) { throwSyntaxError("Too many closing ')'; end-of-file not reached."); } - if (token == TokenNameLISTCLOSE) { + if (token == TokenNameRBRACE) { throwSyntaxError("Too many closing '}'; end-of-file not reached."); } - if (token == TokenNamePARTCLOSE) { + if (token == TokenNameRBRACKET) { throwSyntaxError("Too many closing ']'; end-of-file not reached."); } - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { throwSyntaxError("Read character '('; end-of-file not reached."); } - if (token == TokenNameLISTOPEN) { + if (token == TokenNameLBRACE) { throwSyntaxError("Read character '{'; end-of-file not reached."); } - if (token == TokenNamePARTOPEN) { + if (token == TokenNameLBRACKET) { throwSyntaxError("Read character '['; end-of-file not reached."); } @@ -1747,13 +1747,13 @@ public class PHPParser extends PHPKeywords { // if an error occured, // try to find keywords 'class' or 'function' // to parse the rest of the string - while (token != TokenNameEOF && token != TokenNameUNDEFINED) { + while (token != TokenNameEOF && token != TokenNameERROR) { if (token == TokenNameclass || token == TokenNamefunction) { break; } getNextToken(); } - if (token == TokenNameEOF || token == TokenNameUNDEFINED) { + if (token == TokenNameEOF || token == TokenNameERROR) { return; } } catch (SyntaxError sytaxErr2) { @@ -1793,30 +1793,30 @@ public class PHPParser extends PHPKeywords { String oldIdentifier; IPreferenceStore store = PHPeclipsePlugin.getDefault().getPreferenceStore(); try { - while (token != TokenNameEOF && token != TokenNameUNDEFINED) { - if (token == TokenNameVARIABLE) { + while (token != TokenNameEOF && token != TokenNameERROR) { + if (token == TokenNameVariable) { outlineInfo.addVariable(identifier); getNextToken(); } else if (token == TokenNamevar) { getNextToken(); - if (token == TokenNameVARIABLE && store.getBoolean(PHPeclipsePlugin.PHP_OUTLINE_VAR)) { + if (token == TokenNameVariable && store.getBoolean(PHPeclipsePlugin.PHP_OUTLINE_VAR)) { getNextToken(); outlineInfo.addVariable(identifier); if (token != TokenNameSEMICOLON) { oldIdentifier = identifier; getNextToken(); switch (token) { - case TokenNameVARIABLE : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),identifier)); + case TokenNameVariable : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),identifier)); break; - case TokenNameIDENTIFIER : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),identifier)); + case TokenNameIdentifier : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),identifier)); break; - case TokenNameDOUBLE_NUMBER : current.add(new PHPVarDeclaration(current, oldIdentifier + doubleNumber, chIndx - identifier.length(),doubleNumber.toString())); + case TokenNameDoubleLiteral : current.add(new PHPVarDeclaration(current, oldIdentifier + doubleNumber, chIndx - identifier.length(),doubleNumber.toString())); break; - case TokenNameINT_NUMBER : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),longNumber.toString())); + case TokenNameIntegerLiteral : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),longNumber.toString())); break; - case TokenNameINTERPOLATED_STRING : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),stringValue)); + case TokenNameStringInterpolated : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),stringValue)); break; - case TokenNameSTRING_CONSTANT : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),stringValue)); + case TokenNameStringConstant : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length(),stringValue)); break; default : current.add(new PHPVarDeclaration(current, oldIdentifier, chIndx - identifier.length())); break; @@ -1827,10 +1827,10 @@ public class PHPParser extends PHPKeywords { } } else if (token == TokenNamefunction) { getNextToken(); - if (token == TokenNameAMPERSAND) { + if (token == TokenNameAND) { getNextToken(); } - if (token == TokenNameIDENTIFIER && store.getBoolean(PHPeclipsePlugin.PHP_OUTLINE_FUNC)) { + if (token == TokenNameIdentifier && store.getBoolean(PHPeclipsePlugin.PHP_OUTLINE_FUNC)) { outlineInfo.addVariable(identifier); temp = new PHPFunctionDeclaration(current, identifier, chIndx - identifier.length()); current.add(temp); @@ -1839,7 +1839,7 @@ public class PHPParser extends PHPKeywords { } } else if (token == TokenNameclass) { getNextToken(); - if (token == TokenNameIDENTIFIER && store.getBoolean(PHPeclipsePlugin.PHP_OUTLINE_CLASS)) { + if (token == TokenNameIdentifier && store.getBoolean(PHPeclipsePlugin.PHP_OUTLINE_CLASS)) { outlineInfo.addVariable(identifier); temp = new PHPClassDeclaration(current, identifier, chIndx - identifier.length()); current.add(temp); @@ -1847,16 +1847,16 @@ public class PHPParser extends PHPKeywords { getNextToken(); //skip tokens for classname, extends and others until we have the opening '{' - while (token != TokenNameLISTOPEN && token != TokenNameEOF && token != TokenNameUNDEFINED) { + while (token != TokenNameLBRACE && token != TokenNameEOF && token != TokenNameERROR) { getNextToken(); } parseDeclarations(outlineInfo, temp, true); // stack.pop(); } - } else if (token == TokenNameLISTOPEN) { + } else if (token == TokenNameLBRACE) { getNextToken(); counter++; - } else if (token == TokenNameLISTCLOSE) { + } else if (token == TokenNameRBRACE) { getNextToken(); --counter; if (counter == 0 && goBack) { @@ -1883,7 +1883,7 @@ public class PHPParser extends PHPKeywords { private void statementList() throws CoreException { do { statement(); - if ((token == TokenNameLISTCLOSE) + if ((token == TokenNameRBRACE) || (token == TokenNamecase) || (token == TokenNamedefault) || (token == TokenNameelseif) @@ -1893,7 +1893,7 @@ public class PHPParser extends PHPKeywords { || (token == TokenNameendwhile) || (token == TokenNameendswitch) || (token == TokenNameEOF) - || (token == TokenNameUNDEFINED)) { + || (token == TokenNameERROR)) { return; } } while (true); @@ -1901,15 +1901,15 @@ public class PHPParser extends PHPKeywords { private void compoundStatement() throws CoreException { // '{' [statement-list] '}' - if (token == TokenNameLISTOPEN) { + if (token == TokenNameLBRACE) { getNextToken(); } else { throwSyntaxError("'{' expected in compound-statement."); } - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { statementList(); } - if (token == TokenNameLISTCLOSE) { + if (token == TokenNameRBRACE) { getNextToken(); } else { throwSyntaxError("'}' expected in compound-statement."); @@ -1946,13 +1946,13 @@ public class PHPParser extends PHPKeywords { return; } else if (token == TokenNameif) { getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected after 'if' keyword."); } expression(); - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { throwSyntaxError("')' expected after 'if' condition."); @@ -1962,13 +1962,13 @@ public class PHPParser extends PHPKeywords { } else if (token == TokenNameswitch) { getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected after 'switch' keyword."); } expression(); - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { throwSyntaxError("')' expected after 'switch' condition."); @@ -1977,7 +1977,7 @@ public class PHPParser extends PHPKeywords { return; } else if (token == TokenNamefor) { getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected after 'for' keyword."); @@ -2002,11 +2002,11 @@ public class PHPParser extends PHPKeywords { throwSyntaxError("';' expected after 'for'."); } } - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { expressionList(); - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { throwSyntaxError("')' expected after 'for'."); @@ -2016,13 +2016,13 @@ public class PHPParser extends PHPKeywords { return; } else if (token == TokenNamewhile) { getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected after 'while' keyword."); } expression(); - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { throwSyntaxError("')' expected after 'while' condition."); @@ -2031,28 +2031,28 @@ public class PHPParser extends PHPKeywords { return; } else if (token == TokenNamedo) { getNextToken(); - if (token == TokenNameLISTOPEN) { + if (token == TokenNameLBRACE) { getNextToken(); } else { throwSyntaxError("'{' expected after 'do' keyword."); } - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { statementList(); } - if (token == TokenNameLISTCLOSE) { + if (token == TokenNameRBRACE) { getNextToken(); } else { throwSyntaxError("'}' expected after 'do' keyword."); } if (token == TokenNamewhile) { getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected after 'while' keyword."); } expression(); - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { throwSyntaxError("')' expected after 'while' condition."); @@ -2071,7 +2071,7 @@ public class PHPParser extends PHPKeywords { return; } else if (token == TokenNameforeach) { getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected after 'foreach' keyword."); @@ -2087,7 +2087,7 @@ public class PHPParser extends PHPKeywords { getNextToken(); variable(); } - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { throwSyntaxError("')' expected after 'foreach' expression."); @@ -2188,7 +2188,7 @@ public class PHPParser extends PHPKeywords { } else if (token == TokenNamedefine) { getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected after 'define' keyword."); @@ -2204,7 +2204,7 @@ public class PHPParser extends PHPKeywords { getNextToken(); expression(); } - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { throwSyntaxError("')' expected after 'define' statement."); @@ -2229,13 +2229,13 @@ public class PHPParser extends PHPKeywords { return; // } else { // throwSyntaxError("Unexpected keyword '" + keyword + "'"); - } else if (token == TokenNameLISTOPEN) { + } else if (token == TokenNameLBRACE) { // compoundStatement getNextToken(); - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { statementList(); } - if (token == TokenNameLISTCLOSE) { + if (token == TokenNameRBRACE) { getNextToken(); return; } else { @@ -2260,11 +2260,11 @@ public class PHPParser extends PHPKeywords { private void classDeclarator() throws CoreException { //identifier //identifier 'extends' identifier - if (token == TokenNameIDENTIFIER) { + if (token == TokenNameIdentifier) { getNextToken(); if (token == TokenNameextends) { getNextToken(); - if (token == TokenNameIDENTIFIER) { + if (token == TokenNameIdentifier) { getNextToken(); } else { throwSyntaxError("Class name expected after keyword 'extends'."); @@ -2277,12 +2277,12 @@ public class PHPParser extends PHPKeywords { private void classBody() throws CoreException { //'{' [class-element-list] '}' - if (token == TokenNameLISTOPEN) { + if (token == TokenNameLBRACE) { getNextToken(); - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { classElementList(); } - if (token == TokenNameLISTCLOSE) { + if (token == TokenNameRBRACE) { getNextToken(); } else { throwSyntaxError("'}' expected at end of class body."); @@ -2316,9 +2316,9 @@ public class PHPParser extends PHPKeywords { //'var' variable ';' //'var' variable '=' constant ';' do { - if (token == TokenNameVARIABLE) { + if (token == TokenNameVariable) { getNextToken(); - if (token == TokenNameASSIGN) { + if (token == TokenNameEQUAL) { getNextToken(); constant(); } @@ -2344,20 +2344,20 @@ public class PHPParser extends PHPKeywords { private void functionDeclarator() throws CoreException { //identifier '(' [parameter-list] ')' - if (token == TokenNameAMPERSAND) { + if (token == TokenNameAND) { getNextToken(); } - if (token == TokenNameIDENTIFIER) { + if (token == TokenNameIdentifier) { getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected in function declaration."); } - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { parameterList(); } - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { throwSyntaxError("')' expected in function declaration."); } else { getNextToken(); @@ -2380,18 +2380,18 @@ public class PHPParser extends PHPKeywords { private void parameterDeclaration() throws CoreException { //variable //variable-reference - if (token == TokenNameAMPERSAND) { + if (token == TokenNameAND) { getNextToken(); - if (token == TokenNameVARIABLE) { + if (token == TokenNameVariable) { getNextToken(); } else { throwSyntaxError("Variable expected after reference operator '&'."); } } //variable '=' constant - if (token == TokenNameVARIABLE) { + if (token == TokenNameVariable) { getNextToken(); - if (token == TokenNameASSIGN) { + if (token == TokenNameEQUAL) { getNextToken(); constant(); } @@ -2407,7 +2407,7 @@ public class PHPParser extends PHPKeywords { if (token == TokenNamecase) { getNextToken(); constant(); - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { getNextToken(); if (token == TokenNamecase || token == TokenNamedefault) { // empty case statement ? continue; @@ -2425,7 +2425,7 @@ public class PHPParser extends PHPKeywords { } } else { // TokenNamedefault getNextToken(); - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { getNextToken(); statementList(); } else { @@ -2490,13 +2490,13 @@ public class PHPParser extends PHPKeywords { private void ifStatement() throws CoreException { // ':' statement-list [elseif-list] [else-colon-statement] 'endif' ';' - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { getNextToken(); statementList(); switch (token) { case TokenNameelse : getNextToken(); - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { getNextToken(); statementList(); } else { @@ -2527,13 +2527,13 @@ public class PHPParser extends PHPKeywords { statement(); if (token == TokenNameelseif) { getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected after 'elseif' keyword."); } expression(); - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { throwSyntaxError("')' expected after 'elseif' condition."); @@ -2552,7 +2552,7 @@ public class PHPParser extends PHPKeywords { switch (token) { case TokenNameelse : getNextToken(); - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { getNextToken(); statementList(); return; @@ -2574,14 +2574,14 @@ public class PHPParser extends PHPKeywords { } private void elseifStatement() throws CoreException { - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); expression(); - if (token != TokenNameARGOPEN) { + if (token != TokenNameLPAREN) { throwSyntaxError("')' expected in else-if-statement."); } getNextToken(); - if (token != TokenNameDDOT) { + if (token != TokenNameCOLON) { throwSyntaxError("':' expected in else-if-statement."); } getNextToken(); @@ -2590,7 +2590,7 @@ public class PHPParser extends PHPKeywords { } private void switchStatement() throws CoreException { - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { // ':' [labeled-statement-list] 'endswitch' ';' getNextToken(); labeledStatementList(); @@ -2604,14 +2604,14 @@ public class PHPParser extends PHPKeywords { getNextToken(); } else { // '{' [labeled-statement-list] '}' - if (token != TokenNameLISTOPEN) { + if (token != TokenNameLBRACE) { throwSyntaxError("'{' expected in switch statement."); } getNextToken(); - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { labeledStatementList(); } - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { throwSyntaxError("'}' expected in switch statement."); } getNextToken(); @@ -2620,7 +2620,7 @@ public class PHPParser extends PHPKeywords { } private void forStatement() throws CoreException { - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { getNextToken(); statementList(); if (token != TokenNameendfor) { @@ -2638,7 +2638,7 @@ public class PHPParser extends PHPKeywords { private void whileStatement() throws CoreException { // ':' statement-list 'endwhile' ';' - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { getNextToken(); statementList(); if (token != TokenNameendwhile) { @@ -2655,7 +2655,7 @@ public class PHPParser extends PHPKeywords { } private void foreachStatement() throws CoreException { - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { getNextToken(); statementList(); if (token != TokenNameendforeach) { @@ -2672,15 +2672,15 @@ public class PHPParser extends PHPKeywords { } private void exitStatus() throws CoreException { - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); } else { throwSyntaxError("'(' expected in 'exit-status'."); } - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { expression(); } - if (token == TokenNameARGCLOSE) { + if (token == TokenNameRPAREN) { getNextToken(); } else { throwSyntaxError("')' expected after 'exit-status'."); @@ -2734,15 +2734,15 @@ public class PHPParser extends PHPKeywords { case TokenNametrue : getNextToken(); break; - case TokenNameSTRING_CONSTANT : + case TokenNameStringConstant : getNextToken(); break; - case TokenNameINTERPOLATED_STRING : + case TokenNameStringInterpolated : getNextToken(); break; - case TokenNameARGOPEN : + case TokenNameLPAREN : getNextToken(); - if (token == TokenNameIDENTIFIER) { + if (token == TokenNameIdentifier) { // check if identifier is a type: ident = identifier; String str = identifier.toLowerCase(); @@ -2754,7 +2754,7 @@ public class PHPParser extends PHPKeywords { } if (castFlag) { getNextToken(); - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { throwSyntaxError(") expected after cast-type '" + ident + "'."); } getNextToken(); @@ -2765,54 +2765,54 @@ public class PHPParser extends PHPKeywords { if (!castFlag) { expression(); } - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { throwSyntaxError(") expected in postfix-expression."); } getNextToken(); break; - case TokenNameDOUBLE_NUMBER : + case TokenNameDoubleLiteral : getNextToken(); break; - case TokenNameINT_NUMBER : + case TokenNameIntegerLiteral : getNextToken(); break; case TokenNameDOLLAROPEN : getNextToken(); expression(); - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { throwSyntaxError("'}' expected after indirect variable token '${'."); } getNextToken(); break; - case TokenNameVARIABLE : + case TokenNameVariable : ident = identifier; getNextToken(); - if (token == TokenNameLISTOPEN) { + if (token == TokenNameLBRACE) { getNextToken(); expression(); - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { throwSyntaxError("'}' expected after variable '" + ident + "' in variable-expression."); } getNextToken(); - } else if (token == TokenNameARGOPEN) { + } else if (token == TokenNameLPAREN) { getNextToken(); - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { expressionList(); - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { throwSyntaxError("')' expected after variable '" + ident + "' in postfix-expression."); } } getNextToken(); } break; - case TokenNameIDENTIFIER : + case TokenNameIdentifier : ident = identifier; getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { expressionList(); - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { throwSyntaxError("')' expected after identifier '" + ident + "' in postfix-expression."); } } @@ -2833,13 +2833,13 @@ public class PHPParser extends PHPKeywords { break; case TokenNamelist : getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); if (token == TokenNameCOMMA) { getNextToken(); } expressionList(); - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { throwSyntaxError("')' expected after 'list' keyword."); } getNextToken(); @@ -2903,23 +2903,23 @@ public class PHPParser extends PHPKeywords { boolean while_flag = true; do { switch (token) { - case TokenNamePARTOPEN : + case TokenNameLBRACKET : getNextToken(); expression(); - if (token != TokenNamePARTCLOSE) { + if (token != TokenNameRBRACKET) { throwSyntaxError("] expected in postfix-expression."); } getNextToken(); break; - case TokenNameDDOT2 : // :: - case TokenNameREF : // -> + case TokenNameCOLON_COLON : // :: + case TokenNameMINUS_GREATER : // -> getNextToken(); if (token > TokenNameKEYWORD) { ident = identifier; setMarker("Avoid using keyword '" + ident + "' as variable name.", rowCount, PHPParser.INFO); } switch (token) { - case TokenNameVARIABLE : + case TokenNameVariable : ident = identifier; getNextToken(); // if (token == TokenNameARGOPEN) { @@ -2931,51 +2931,51 @@ public class PHPParser extends PHPKeywords { // getNextToken(); // } break; - case TokenNameIDENTIFIER : + case TokenNameIdentifier : ident = identifier; getNextToken(); break; - case TokenNameLISTOPEN : + case TokenNameLBRACE : getNextToken(); expression(); - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { throwSyntaxError("} expected in postfix-expression."); } getNextToken(); break; default : throwSyntaxError("Syntax error after '->' token."); - } while (token == TokenNamePARTOPEN || token == TokenNameARGOPEN || token == TokenNameLISTOPEN) { - if (token == TokenNamePARTOPEN) { + } while (token == TokenNameLBRACKET || token == TokenNameLPAREN || token == TokenNameLBRACE) { + if (token == TokenNameLBRACKET) { getNextToken(); expressionList(); - if (token != TokenNamePARTCLOSE) { + if (token != TokenNameRBRACKET) { throwSyntaxError("] expected after '->'."); } getNextToken(); } - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); expressionList(); - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { throwSyntaxError(") expected after '->'."); } getNextToken(); } - if (token == TokenNameLISTOPEN) { + if (token == TokenNameLBRACE) { getNextToken(); expression(); - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { throwSyntaxError("} expected after '->'."); } getNextToken(); } } break; - case TokenNameINCREMENT : + case TokenNamePLUS_PLUS : getNextToken(); break; - case TokenNameDECREMENT : + case TokenNameMINUS_MINUS : getNextToken(); break; default : @@ -2988,11 +2988,11 @@ public class PHPParser extends PHPKeywords { private void unaryExpression() throws CoreException { switch (token) { - case TokenNameINCREMENT : + case TokenNamePLUS_PLUS : getNextToken(); unaryExpression(); break; - case TokenNameDECREMENT : + case TokenNameMINUS_MINUS : getNextToken(); unaryExpression(); break; @@ -3001,7 +3001,7 @@ public class PHPParser extends PHPKeywords { getNextToken(); castExpression(); break; - case TokenNameAMPERSAND : + case TokenNameAND : getNextToken(); castExpression(); break; @@ -3009,15 +3009,15 @@ public class PHPParser extends PHPKeywords { getNextToken(); castExpression(); break; - case TokenNameADD : + case TokenNamePLUS : getNextToken(); castExpression(); break; - case TokenNameSUBTRACT : + case TokenNameMINUS : getNextToken(); castExpression(); break; - case TokenNameTILDE : + case TokenNameTWIDDLE : getNextToken(); castExpression(); break; @@ -3048,7 +3048,7 @@ public class PHPParser extends PHPKeywords { //'real' 'double' 'float' //'int' 'integer' String ident = ""; - if (token == TokenNameIDENTIFIER) { + if (token == TokenNameIdentifier) { ident = identifier; String str = identifier.toLowerCase(); getNextToken(); @@ -3063,22 +3063,22 @@ public class PHPParser extends PHPKeywords { private void assignExpression() throws CoreException { castExpression(); - if (token == TokenNameASSIGN) { // = + if (token == TokenNameEQUAL) { // = getNextToken(); logicalinclusiveorExpression(); - } else if (token == TokenNameDOTASSIGN) { // .= + } else if (token == TokenNameDOT_EQUAL) { // .= getNextToken(); logicalinclusiveorExpression(); } else if (token == TokenNameFOREACH) { // => getNextToken(); logicalinclusiveorExpression(); - } else if (token == TokenNameADDTO) { // += + } else if (token == TokenNamePLUS_EQUAL) { // += getNextToken(); logicalinclusiveorExpression(); - } else if (token == TokenNameSUBTRACTFROM) { // -= + } else if (token == TokenNameMINUS_EQUAL) { // -= getNextToken(); logicalinclusiveorExpression(); - } else if (token == TokenNameTIMESBY) { // *= + } else if (token == TokenNameMULTIPLY_EQUAL) { // *= getNextToken(); logicalinclusiveorExpression(); } else if (token == TokenNameDIVIDE_EQUAL) { // *= @@ -3087,7 +3087,7 @@ public class PHPParser extends PHPKeywords { } else if (token == TokenNameREMAINDER_EQUAL) { // %= getNextToken(); logicalinclusiveorExpression(); - } else if (token == TokenNameANDASSIGN) { // &= + } else if (token == TokenNameAND_EQUAL) { // &= getNextToken(); logicalinclusiveorExpression(); } else if (token == TokenNameXOR_EQUAL) { // ^= @@ -3099,7 +3099,7 @@ public class PHPParser extends PHPKeywords { } else if (token == TokenNameRIGHT_SHIFT_EQUAL) { // >>= getNextToken(); logicalinclusiveorExpression(); - } else if (token == TokenNameTILDEASSIGN) { // ~= + } else if (token == TokenNameTWIDDLE_EQUAL) { // ~= getNextToken(); logicalinclusiveorExpression(); } @@ -3128,7 +3128,7 @@ public class PHPParser extends PHPKeywords { private void additiveExpression() throws CoreException { do { concatenationExpression(); - if (token != TokenNameADD && token != TokenNameSUBTRACT) { + if (token != TokenNamePLUS && token != TokenNameMINUS) { return; } getNextToken(); @@ -3148,7 +3148,7 @@ public class PHPParser extends PHPKeywords { private void relationalExpression() throws CoreException { do { shiftExpression(); - if (token != TokenNameLESS && token != TokenNameGREATER && token != TokenNameLESSEQUAL && token != TokenNameGREATEREQUAL) { + if (token != TokenNameLESS && token != TokenNameGREATER && token != TokenNameLESS_EQUAL && token != TokenNameGREATER_EQUAL) { return; } getNextToken(); @@ -3158,7 +3158,7 @@ public class PHPParser extends PHPKeywords { private void identicalExpression() throws CoreException { do { relationalExpression(); - if (token != TokenNameEX_EQUAL && token != TokenNameEX_UNEQUAL) { + if (token != TokenNameEQUAL_EQUAL_EQUAL && token != TokenNameNOT_EQUAL_EQUAL) { return; } getNextToken(); @@ -3168,7 +3168,7 @@ public class PHPParser extends PHPKeywords { private void equalityExpression() throws CoreException { do { identicalExpression(); - if (token != TokenNameEQUAL && token != TokenNameUNEQUAL) { + if (token != TokenNameEQUAL_EQUAL && token != TokenNameNOT_EQUAL) { return; } getNextToken(); @@ -3177,10 +3177,10 @@ public class PHPParser extends PHPKeywords { private void ternaryExpression() throws CoreException { equalityExpression(); - if (token == TokenNameQUESTIONMARK) { + if (token == TokenNameQUESTION) { getNextToken(); expression(); - if (token == TokenNameDDOT) { + if (token == TokenNameCOLON) { getNextToken(); expression(); } else { @@ -3192,7 +3192,7 @@ public class PHPParser extends PHPKeywords { private void andExpression() throws CoreException { do { ternaryExpression(); - if (token != TokenNameAMPERSAND) { + if (token != TokenNameAND) { return; } getNextToken(); @@ -3212,7 +3212,7 @@ public class PHPParser extends PHPKeywords { private void inclusiveorExpression() throws CoreException { do { exclusiveorExpression(); - if (token != TokenNameLINE) { + if (token != TokenNameOR) { return; } getNextToken(); @@ -3222,7 +3222,7 @@ public class PHPParser extends PHPKeywords { private void booleanandExpression() throws CoreException { do { inclusiveorExpression(); - if (token != TokenNameAND) { + if (token != TokenNameAND_AND) { return; } getNextToken(); @@ -3232,7 +3232,7 @@ public class PHPParser extends PHPKeywords { private void booleanorExpression() throws CoreException { do { booleanandExpression(); - if (token != TokenNameOR) { + if (token != TokenNameOR_OR) { return; } getNextToken(); @@ -3297,21 +3297,21 @@ public class PHPParser extends PHPKeywords { getNextToken(); expression(); ; - if (token != TokenNameLISTCLOSE) { + if (token != TokenNameRBRACE) { throwSyntaxError("'}' expected after indirect variable token '${'."); } getNextToken(); } else { - if (token == TokenNameVARIABLE) { + if (token == TokenNameVariable) { getNextToken(); - if (token == TokenNamePARTOPEN) { + if (token == TokenNameLBRACKET) { getNextToken(); expression(); - if (token != TokenNamePARTCLOSE) { + if (token != TokenNameRBRACKET) { throwSyntaxError("']' expected in variable-list."); } getNextToken(); - } else if (token == TokenNameASSIGN) { + } else if (token == TokenNameEQUAL) { getNextToken(); constant(); } @@ -3328,26 +3328,26 @@ public class PHPParser extends PHPKeywords { private void constant() throws CoreException { String ident; switch (token) { - case TokenNameADD : + case TokenNamePLUS : getNextToken(); switch (token) { - case TokenNameDOUBLE_NUMBER : + case TokenNameDoubleLiteral : getNextToken(); break; - case TokenNameINT_NUMBER : + case TokenNameIntegerLiteral : getNextToken(); break; default : throwSyntaxError("Constant expected after '+' presign."); } break; - case TokenNameSUBTRACT : + case TokenNameMINUS : getNextToken(); switch (token) { - case TokenNameDOUBLE_NUMBER : + case TokenNameDoubleLiteral : getNextToken(); break; - case TokenNameINT_NUMBER : + case TokenNameIntegerLiteral : getNextToken(); break; default : @@ -3363,30 +3363,30 @@ public class PHPParser extends PHPKeywords { case TokenNametrue : getNextToken(); break; - case TokenNameIDENTIFIER : + case TokenNameIdentifier : ident = identifier; getNextToken(); - if (token == TokenNameARGOPEN) { + if (token == TokenNameLPAREN) { getNextToken(); - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { expressionList(); - if (token != TokenNameARGCLOSE) { + if (token != TokenNameRPAREN) { throwSyntaxError("')' expected after identifier '" + ident + "' in postfix-expression."); } } getNextToken(); } break; - case TokenNameSTRING_CONSTANT : + case TokenNameStringConstant : getNextToken(); break; - case TokenNameINTERPOLATED_STRING : + case TokenNameStringInterpolated : getNextToken(); break; - case TokenNameDOUBLE_NUMBER : + case TokenNameDoubleLiteral : getNextToken(); break; - case TokenNameINT_NUMBER : + case TokenNameIntegerLiteral : getNextToken(); break; default : -- 1.7.1