From 15cd5944f247b1463bbe6ef71399b937e1e60299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Mantelet?= <gregory.mantelet@astro.unistra.fr> Date: Wed, 13 Mar 2019 18:25:06 +0100 Subject: [PATCH] [ADQL] Add to the parser a function attempting to quickly fix an ADQL query. This new function - ADQLParser.tryQuickFix(...) - fixes the most common issues with ADQL queries: - replace Unicode confusable characters by their ASCII/UTF-8 version, - double-quote SQL reserved words/terms (e.g. `public`, `year`, `date`), - double-quote ADQL function names used a column name/alias (e.g. `distance`, `min`, `avg`), - double-quote invalid regular identifiers (e.g. `_RAJ2000`, `2mass`). The last point is far from being perfect but should work at least for identifiers starting with a digit or an underscore, or an identifier including one of the following character: `?`, `!`, `$`, `@`, `#`, `{`, `}`, `[`, `]`, `~`, `^` and '`'. It should also been noted that double-quoting a column/table name will make it case-sensitive. Then, it is possible that the query does not pass even after the double-quote operation ; the case would have to be checked by the user. Finally, there is no attempt to fix column and table names (i.e. case sensitivity and/or typos) using tables/columns list/metadata. That could be a possible evolution of this function or an additional feature to implement in the parser. --- src/adql/parser/ADQLParser.java | 2155 ++++++----- src/adql/parser/ADQLParserConstants.java | 24 +- src/adql/parser/ADQLParserTokenManager.java | 3807 +++++++++++-------- src/adql/parser/ParseException.java | 32 +- src/adql/parser/ParseException.java.backup | 32 +- src/adql/parser/adqlGrammar.jj | 596 ++- test/adql/parser/TestADQLParser.java | 91 +- test/adql/parser/TestIdentifierItem.java | 10 +- 8 files changed, 4112 insertions(+), 2635 deletions(-) diff --git a/src/adql/parser/ADQLParser.java b/src/adql/parser/ADQLParser.java index f32d90b..0adf117 100644 --- a/src/adql/parser/ADQLParser.java +++ b/src/adql/parser/ADQLParser.java @@ -1,8 +1,6 @@ -/* ADQLParser.java */ /* Generated By:JavaCC: Do not edit this line. ADQLParser.java */ package adql.parser; -import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Stack; @@ -72,6 +70,16 @@ import adql.translator.TranslationException; * (ie. createContains(...)). * </p> * +* <p>Here are the key functions to use:</p> +* <ul> +* <li>{@link #parseQuery(java.lang.String)} (or any of its alternatives) +* to parse an input ADQL query String and get its corresponding ADQL tree +* </li> +* <li>{@link #tryQuickFix(java.lang.String)} to try fixing the most common +* issues with ADQL queries (e.g. Unicode confusable characters, +* unescaped ADQL identifiers, SQL reserved keywords, ...)</li> +* </ul> +* * <p><b><u>WARNING:</u> * To modify this class it's strongly encouraged to modify the .jj file in the * section between <i>PARSER_BEGIN</i> and <i>PARSER_END</i> and to re-compile @@ -81,8 +89,8 @@ import adql.translator.TranslationException; * @see QueryChecker * @see ADQLQueryFactory * -* @author Grégory Mantelet (CDS;ARI) - gmantele@ari.uni-heidelberg.de -* @version 1.4 (01/2018) +* @author Grégory Mantelet (CDS;ARI) +* @version 1.5 (03/2019) */ public class ADQLParser implements ADQLParserConstants { @@ -315,6 +323,93 @@ public class ADQLParser implements ADQLParserConstants { this(tm, null, factory); } + /* ADDITIONAL GETTERS & SETTERS */ + + public final void setDebug(boolean debug){ + if (debug) + enable_tracing(); + else + disable_tracing(); + } + + public final QueryChecker getQueryChecker(){ + return queryChecker; + } + + public final void setQueryChecker(QueryChecker checker){ + queryChecker = checker; + } + + public final ADQLQueryFactory getQueryFactory(){ + return queryFactory; + } + + public final void setQueryFactory(ADQLQueryFactory factory){ + queryFactory = (factory != null) ? factory : (new ADQLQueryFactory()); + } + + /* EXCEPTION HELPER FUNCTION */ + + private final ParseException generateParseException(Exception ex){ + if (!(ex instanceof ParseException)){ + ParseException pex = new ParseException("[" + ex.getClass().getName() + "] " + ex.getMessage()); + pex.setStackTrace(ex.getStackTrace()); + return pex; + }else + return (ParseException)ex; + } + + /* QUERY PARSING FUNCTIONS */ + + /** + * Tell whether the given string is a valid ADQL regular identifier. + * + * <p> + * According to the ADQL-2.0's BNF, a regular identifier (i.e. not delimited + * ; not between double quotes) must be a letter followed by a letter, digit + * or underscore. So, the following regular expression: + * </p> + * <pre>[a-zA-Z]+[a-zA-Z0-9_]*</pre> + * + * <p>This is what this function tests on the given string.</p> + * + * @param idCandidate The string to test. + * + * @return <code>true</code> if the given string is a valid regular + * identifier, + * <code>false</code> otherwise. + * + * @see #testRegularIdentifier(adql.parser.Token) + * + * @since 1.5 + */ + public final boolean isRegularIdentifier(final String idCandidate){ + return idCandidate.matches("[a-zA-Z]+[a-zA-Z0-9_]*"); + } + + /** + * Test the given token as an ADQL's regular identifier. + * + * <p> + * This function uses {@link #isRegularIdentifier(java.lang.String)} to + * test the given token's image. If the test fails, a + * {@link adql.parser.ParseException} is thrown. + * </p> + * + * @param token The token to test. + * + * @throws ParseException If the given token is not a valid ADQL regular + * identifier. + * + * @see #isRegularIdentifier(java.lang.String) + * + * @since 1.5 + */ + public final void testRegularIdentifier(final Token token) throws ParseException{ + if (!isRegularIdentifier(token.image)) + throw new ParseException("Invalid ADQL regular identifier: \u005c"" + token.image + "\u005c"! If it aims to be a column/table name/alias, you should write it between double quotes.", new TextPosition(token)); + } + /** * Parses the query given at the creation of this parser or in the * <i>ReInit</i> functions. @@ -331,7 +426,7 @@ public class ADQLParser implements ADQLParserConstants { try{ return Query(); }catch(TokenMgrError tme){ - throw new ParseException(tme.getMessage(), new TextPosition(tme.getErrorLine(), tme.getErrorColumn())); + throw new ParseException(tme); } } @@ -355,7 +450,7 @@ public class ADQLParser implements ADQLParserConstants { try{ return Query(); }catch(TokenMgrError tme){ - throw new ParseException(tme.getMessage(), new TextPosition(tme.getErrorLine(), tme.getErrorColumn())); + throw new ParseException(tme); } } @@ -379,42 +474,371 @@ public class ADQLParser implements ADQLParserConstants { try{ return Query(); }catch(TokenMgrError tme){ - throw new ParseException(tme.getMessage(), new TextPosition(tme.getErrorLine(), tme.getErrorColumn())); + throw new ParseException(tme); } } - public final void setDebug(boolean debug){ - if (debug) - enable_tracing(); - else - disable_tracing(); + /* CORRECTION SUGGESTION */ + + /** + * Try fixing tokens/terms of the input ADQL query. + * + * <p> + * <b>This function does not try to fix syntactical or semantical errors.</b> + * It just try to fix the most common issues in ADQL queries, such as: + * </p> + * <ul> + * <li>some Unicode characters confusable with ASCII characters (like a + * space, a dash, ...) ; this function replace them by their ASCII + * alternative,</li> + * <li>any of the following are double quoted: + * <ul> + * <li>non regular ADQL identifiers + * (e.g. <code>_RAJ2000</code>),</li> + * <li>ADQL function names used as identifiers + * (e.g. <code>distance</code>)</li> + * <li>and SQL reserved keywords + * (e.g. <code>public</code>).</li> + * </ul> + * </li> + * </ul> + * + * <p><i><b>Note 1:</b> + * The given stream is NOT closed by this function even if the EOF is + * reached. It is the responsibility of the caller to close it. + * </i></p> + * + * <p><i><b>Note 2:</b> + * This function does not use any instance variable of this parser + * (especially the InputStream or Reader provided at initialisation or + * ReInit). + * </i></p> + * + * @param input Stream containing the input ADQL query to fix. + * + * @return The suggested correction of the input ADQL query. + * + * @throws java.io.IOException If there is any error while reading from the + * given input stream. + * @throws ParseException If any unrecognised character is encountered, + * or if anything else prevented the tokenization + * of some characters/words/terms. + * + * @see #tryQuickFix(java.lang.String) + * + * @since 1.5 + */ + public final String tryQuickFix(final java.io.InputStream input) throws java.io.IOException, ParseException{ + // Fetch everything into a single string: + StringBuffer buf = new StringBuffer(); + byte[] cBuf = new byte[1024]; + int nbChar; + while((nbChar = input.read(cBuf)) > -1){ + buf.append(new String(cBuf, 0, nbChar)); + } + + // Convert the buffer into a String and now try to fix it: + return tryQuickFix(buf.toString()); } - public final QueryChecker getQueryChecker(){ - return queryChecker; + /** + * Try fixing tokens/terms of the given ADQL query. + * + * <p> + * <b>This function does not try to fix syntactical or semantical errors.</b> + * It just try to fix the most common issues in ADQL queries, such as: + * </p> + * <ul> + * <li>some Unicode characters confusable with ASCII characters (like a + * space, a dash, ...) ; this function replace them by their ASCII + * alternative,</li> + * <li>any of the following are double quoted: + * <ul> + * <li>non regular ADQL identifiers + * (e.g. <code>_RAJ2000</code>),</li> + * <li>ADQL function names used as identifiers + * (e.g. <code>distance</code>)</li> + * <li>and SQL reserved keywords + * (e.g. <code>public</code>).</li> + * </ul> + * </li> + * </ul> + * + * <p><i><b>Note:</b> + * This function does not use any instance variable of this parser + * (especially the InputStream or Reader provided at initialisation or + * ReInit). + * </i></p> + * + * @param adqlQuery The input ADQL query to fix. + * + * @return The suggested correction of the given ADQL query. + * + * @throws ParseException If any unrecognised character is encountered, + * or if anything else prevented the tokenization + * of some characters/words/terms. + * + * @since 1.5 + */ + public String tryQuickFix(String adqlQuery) throws ParseException{ + StringBuffer suggestedQuery = new StringBuffer(); + + // 1. Replace all Unicode confusable characters: + adqlQuery = replaceUnicodeConfusables(adqlQuery); + + /* 1.bis. Normalise new lines and tabulations + * (to simplify the column counting): */ + adqlQuery = adqlQuery.replaceAll("(\u005cr\u005cn|\u005cr|\u005cn)", System.getProperty("line.separator")).replaceAll("\u005ct", " "); + + // 2. Analyse the query token by token: + ADQLParserTokenManager parser = new ADQLParserTokenManager(new SimpleCharStream(new java.io.ByteArrayInputStream(adqlQuery.getBytes()))); + + final String[] lines = adqlQuery.split(System.getProperty("line.separator")); + + try{ + String suggestedToken; + int lastLine = 1, lastCol = 1; + + Token token = null, nextToken = parser.getNextToken(); + // for all tokens until the EOF or EOQ: + do{ + // get the next token: + token = nextToken; + nextToken = (isEnd(token) ? null : parser.getNextToken()); + + // 3. Double quote any suspect token: + if (mustEscape(token, nextToken)){ + suggestedToken = "\u005c"" + token.image + "\u005c""; + }else + suggestedToken = token.image; + + /* 4. Append all space characters (and comments) before the + * token: */ + /* same line, just get the space characters between the last + * token and the one to append: */ + if (lastLine == token.beginLine){ + suggestedQuery.append(lines[lastLine - 1].substring(lastCol - 1, token.beginColumn - (isEnd(token) ? 0 : 1))); + lastCol = token.endColumn + 1; + } + // not the same line... + else{ + /* append all remaining space characters until the position + * of the token to append: */ + do{ + suggestedQuery.append(lines[lastLine - 1].substring(lastCol - 1)).append('\u005cn'); + lastLine++; + lastCol = 1; + }while(lastLine < token.beginLine); + /* if there are still space characters before the token, + * append them as well: */ + if (lastCol < token.beginColumn) + suggestedQuery.append(lines[lastLine - 1].substring(lastCol - 1, token.beginColumn - 1)); + // finally, set the correct column position: + lastCol = token.endColumn + 1; + } + + // 5. Append the suggested token: + suggestedQuery.append(suggestedToken); + + }while(!isEnd(token)); + + }catch(TokenMgrError err){ + // wrap such errors and propagate them: + throw new ParseException(err); + } + + return suggestedQuery.toString(); } - public final void setQueryChecker(QueryChecker checker){ - queryChecker = checker; + /** + * All of the most common Unicode confusable characters and their + * ASCII/UTF-8 alternative. + * + * <p> + * Keys of this map represent the ASCII character while the values are the + * regular expression for all possible Unicode alternatives. + * </p> + * + * <p><i><b>Note:</b> + * All of them have been listed using + * <a href="https://unicode.org/cldr/utility/confusables.jsp">Unicode Utilities: Confusables</a>. + * </i></p> + * + * @since 1.5 + */ + protected final static java.util.Map<String, String> REGEX_UNICODE_CONFUSABLES = new java.util.HashMap<String, String>(10); + /** Regular expression matching all Unicode alternatives for <code>-</code>. + * @since 1.5 */ + protected final static String REGEX_DASH = "[-\u02d7\u06d4\u2010\u2011\u2012\u2013\u2043\u2212\u2796\u2cba\ufe58\u2014\u2015\u207b\u208b\u0096\u058a\ufe63\uff0d]"; + /** Regular expression matching all Unicode alternatives for <code>_</code>. + * @since 1.5 */ + protected final static String REGEX_UNDERSCORE = "[_\u07fa\ufe4d\ufe4e\ufe4f]"; + /** Regular expression matching all Unicode alternatives for <code>'</code>. + * @since 1.5 */ + protected final static String REGEX_QUOTE = "['`\u00b4\u02b9\u02bb\u02bc\u02bd\u02be\u02c8\u02ca\u02cb\u02f4\u0374\u0384\u055a\u055d\u05d9\u05f3\u07f4\u07f5\u144a\u16cc\u1fbd\u1fbf\u1fef\u1ffd\u1ffe\u2018\u2019\u201b\u2032\u2035\ua78c\uff07\uff40]"; + /** Regular expression matching all Unicode alternatives for <code>"</code>. + * @since 1.5 */ + protected final static String REGEX_DOUBLE_QUOTE = "[\u02ba\u02dd\u02ee\u02f6\u05f2\u05f4\u1cd3\u201c\u201d\u201f\u2033\u2036\u3003\uff02]"; + /** Regular expression matching all Unicode alternatives for <code>.</code>. + * @since 1.5 */ + protected final static String REGEX_STOP = "[.\u0660\u06f0\u0701\u0702\u2024\ua4f8\ua60e]"; + /** Regular expression matching all Unicode alternatives for <code>+</code>. + * @since 1.5 */ + protected final static String REGEX_PLUS = "[+\u16ed\u2795]"; + /** Regular expression matching all Unicode alternatives for <code> </code>. + * @since 1.5 */ + protected final static String REGEX_SPACE = "[ \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f]"; + /** Regular expression matching all Unicode alternatives for <code><</code>. + * @since 1.5 */ + protected final static String REGEX_LESS_THAN = "[<\u02c2\u1438\u16b2\u2039\u276e]"; + /** Regular expression matching all Unicode alternatives for <code>></code>. + * @since 1.5 */ + protected final static String REGEX_GREATER_THAN = "[>\u02c3\u1433\u203a\u276f]"; + /** Regular expression matching all Unicode alternatives for <code>=</code>. + * @since 1.5 */ + protected final static String REGEX_EQUAL = "[=\u1400\u2e40\u30a0\ua4ff]"; + static{ + REGEX_UNICODE_CONFUSABLES.put("-", REGEX_DASH); + REGEX_UNICODE_CONFUSABLES.put("_", REGEX_UNDERSCORE); + REGEX_UNICODE_CONFUSABLES.put("'", REGEX_QUOTE); + REGEX_UNICODE_CONFUSABLES.put("\u005c"", REGEX_DOUBLE_QUOTE); + REGEX_UNICODE_CONFUSABLES.put(".", REGEX_STOP); + REGEX_UNICODE_CONFUSABLES.put("+", REGEX_PLUS); + REGEX_UNICODE_CONFUSABLES.put(" ", REGEX_SPACE); + REGEX_UNICODE_CONFUSABLES.put("<", REGEX_LESS_THAN); + REGEX_UNICODE_CONFUSABLES.put(">", REGEX_GREATER_THAN); + REGEX_UNICODE_CONFUSABLES.put("=", REGEX_EQUAL); } - public final ADQLQueryFactory getQueryFactory(){ - return queryFactory; + /** + * Replace all Unicode characters that can be confused with other ASCI/UTF-8 + * characters (e.g. different spaces, dashes, ...) in their ASCII version. + * + * @param adqlQuery The ADQL query string in which Unicode confusable + * characters must be replaced. + * + * @return The same query without the most common Unicode confusable + * characters. + * + * @since 1.5 + */ + protected String replaceUnicodeConfusables(final String adqlQuery){ + String newAdqlQuery = adqlQuery; + for(java.util.Map.Entry<String, String> confusable : REGEX_UNICODE_CONFUSABLES.entrySet()) + newAdqlQuery = newAdqlQuery.replaceAll(confusable.getValue(), confusable.getKey()); + return newAdqlQuery; } - public final void setQueryFactory(ADQLQueryFactory factory){ - queryFactory = (factory != null) ? factory : (new ADQLQueryFactory()); + /** + * Tell whether the given token represents the end of an ADQL query. + * + * @param token Token to analyze. + * + * @return <code>true</code> if the given token represents a query end, + * <code>false</code> otherwise. + * + * @since 1.5 + */ + protected boolean isEnd(final Token token){ + return token.kind == ADQLParserConstants.EOF || token.kind == ADQLParserConstants.EOQ; } - private final ParseException generateParseException(Exception ex){ - if (!(ex instanceof ParseException)){ - ParseException pex = new ParseException("[" + ex.getClass().getName() + "] " + ex.getMessage()); - pex.setStackTrace(ex.getStackTrace()); - return pex; - }else - return (ParseException)ex; + /** + * Tell whether the given token must be double quoted. + * + * <p> + * This function considers all the following as terms to double quote: + * </p> + * <ul> + * <li>SQL reserved keywords</li>, + * <li>unrecognised regular identifiers (e.g. neither a delimited nor a + * valid ADQL regular identifier)</li> + * <li>and ADQL function name without a parameters list.</li> + * </ul> + * + * @param token The token to analyze. + * @param nextToken The following token. (useful to detect the start of a + * function's parameters list) + * + * @return <code>true</code> if the given token must be double quoted, + * <code>false</code> to keep it as provided. + * + * @since 1.5 + */ + protected boolean mustEscape(final Token token, final Token nextToken){ + switch(token.kind){ + case ADQLParserConstants.SQL_RESERVED_WORD: + return true; + case ADQLParserConstants.REGULAR_IDENTIFIER_CANDIDATE: + return !isRegularIdentifier(token.image); + default: + return isFunctionName(token) && (nextToken == null || nextToken.kind != ADQLParserConstants.LEFT_PAR); + } + } + + /** + * Tell whether the given token matches to an ADQL function name. + * + * @param token The token to analyze. + * + * @return <code>true</code> if the given token is an ADQL function name, + * <code>false</code> otherwise. + * + * @since 1.5 + */ + protected boolean isFunctionName(final Token token){ + switch(token.kind){ + case ADQLParserConstants.COUNT: + case ADQLParserConstants.EXISTS: + case ADQLParserConstants.AVG: + case ADQLParserConstants.MAX: + case ADQLParserConstants.MIN: + case ADQLParserConstants.SUM: + case ADQLParserConstants.BOX: + case ADQLParserConstants.CENTROID: + case ADQLParserConstants.CIRCLE: + case ADQLParserConstants.POINT: + case ADQLParserConstants.POLYGON: + case ADQLParserConstants.REGION: + case ADQLParserConstants.CONTAINS: + case ADQLParserConstants.INTERSECTS: + case ADQLParserConstants.AREA: + case ADQLParserConstants.COORD1: + case ADQLParserConstants.COORD2: + case ADQLParserConstants.COORDSYS: + case ADQLParserConstants.DISTANCE: + case ADQLParserConstants.ABS: + case ADQLParserConstants.CEILING: + case ADQLParserConstants.DEGREES: + case ADQLParserConstants.EXP: + case ADQLParserConstants.FLOOR: + case ADQLParserConstants.LOG: + case ADQLParserConstants.LOG10: + case ADQLParserConstants.MOD: + case ADQLParserConstants.PI: + case ADQLParserConstants.POWER: + case ADQLParserConstants.RADIANS: + case ADQLParserConstants.RAND: + case ADQLParserConstants.ROUND: + case ADQLParserConstants.SQRT: + case ADQLParserConstants.TRUNCATE: + case ADQLParserConstants.ACOS: + case ADQLParserConstants.ASIN: + case ADQLParserConstants.ATAN: + case ADQLParserConstants.ATAN2: + case ADQLParserConstants.COS: + case ADQLParserConstants.COT: + case ADQLParserConstants.SIN: + case ADQLParserConstants.TAN: + case ADQLParserConstants.USING: + return true; + default: + return false; + } } + /* MAIN PROGRAM */ + /** * Gets the specified ADQL query and parses the given ADQL query. The SQL * translation is then printed if the syntax is correct. @@ -423,20 +847,12 @@ public class ADQLParser implements ADQLParserConstants { * <b>ONLY the syntax is checked: the query is NOT EXECUTED !</b> * </p> * - * <p>Supplied parameters are: - * <ul> - * <li>[-debug] -url http://...</li> - * <li>[-debug] -file ...</li> - * <li>[-debug] -query SELECT...</li> - * </ul> - * </p> - * * @param args * @throws Exception */ public static final void main(String[] args) throws Exception{ - final String USAGE = "Usage:\u005cn\u005ctadqlParser.jar [-d] [-v] [-e] [-a|-s] [<FILE>|<URL>]\u005cn\u005cnNOTE: If no file or URL is given, the ADQL query is expected in the standard input. This query must end with a ';' !\u005cn\u005cnParameters:\u005cn\u005ct-v or --verbose : Print the main steps of the parsing\u005cn\u005ct-d or --debug : Print stack traces when a grave error occurs\u005cn\u005ct-e or --explain : Explain the ADQL parsing (or Expand the parsing tree)\u005cn\u005ct-a or --adql : Display the understood ADQL query\u005cn\u005ct-s or --sql : Ask the SQL translation of the given ADQL query (SQL compatible with PostgreSQL)\u005cn\u005cnReturn:\u005cn\u005ctBy default: nothing if the query is correct. Otherwise a message explaining why the query is not correct is displayed.\u005cn\u005ctWith the -s option, the SQL translation of the given ADQL query will be returned.\u005cn\u005ctWith the -a option, the ADQL query is returned as it has been understood.\u005cn\u005cnExit status:\u005cn\u005ct0\u005ctOK !\u005cn\u005ct1\u005ctParameter error (missing or incorrect parameter)\u005cn\u005ct2\u005ctFile error (incorrect file/url, reading error, ...)\u005cn\u005ct3\u005ctParsing error (syntactic or semantic error)\u005cn\u005ct4\u005ctTranslation error (a problem has occurred during the translation of the given ADQL query in SQL)."; + final String USAGE = "Usage:\u005cn adqlParser.jar [-d] [-v] [-e] [-a|-s] [-f] [<FILE>|<URL>]\u005cn\u005cnNOTE: If no file or URL is given, the ADQL query is expected in the standard\u005cn input. This query must end with a ';' or <Ctrl+D>!\u005cn\u005cnParameters:\u005cn -v or --verbose : Print the main steps of the parsing\u005cn -d or --debug : Print stack traces when a grave error occurs\u005cn -e or --explain : Explain the ADQL parsing (or Expand the parsing tree)\u005cn -a or --adql : Display the understood ADQL query\u005cn -s or --sql : Ask the SQL translation of the given ADQL query\u005cn (SQL compatible with PostgreSQL)\u005cn -f or --try-fix : Try fixing the most common ADQL query issues before\u005cn attempting to parse the query.\u005cn\u005cnReturn:\u005cn By default: nothing if the query is correct. Otherwise a message explaining\u005cn why the query is not correct is displayed.\u005cn With the -s option, the SQL translation of the given ADQL query will be\u005cn returned.\u005cn With the -a option, the ADQL query is returned as it has been understood.\u005cn\u005cnExit status:\u005cn 0 OK !\u005cn 1 Parameter error (missing or incorrect parameter)\u005cn 2 File error (incorrect file/url, reading error, ...)\u005cn 3 Parsing error (syntactic or semantic error)\u005cn 4 Translation error (a problem has occurred during the translation of the\u005cn given ADQL query in SQL)."; ADQLParser parser; @@ -444,7 +860,7 @@ public class ADQLParser implements ADQLParserConstants { String file = null, metaFile = null; short mode = -1; - boolean verbose = false, debug = false, explain = false; + boolean verbose = false, debug = false, explain = false, tryFix = false; // Parameters reading: for(int i = 0; i < args.length; i++){ @@ -466,7 +882,9 @@ public class ADQLParser implements ADQLParserConstants { System.exit(1); }else mode = 2; - }else if (args[i].equalsIgnoreCase("-h") || args[i].equalsIgnoreCase("--help")){ + }else if (args[i].equalsIgnoreCase("-f") || args[i].equalsIgnoreCase("--try-fix")) + tryFix = true; + else if (args[i].equalsIgnoreCase("-h") || args[i].equalsIgnoreCase("--help")){ System.out.println(USAGE); System.exit(0); }else if (args[i].startsWith("-")){ @@ -478,13 +896,49 @@ public class ADQLParser implements ADQLParserConstants { try{ - if (file == null || file.length() == 0) - parser = new ADQLParser(System.in); - else if (file.matches(urlRegex)) - parser = new ADQLParser((new java.net.URL(file)).openStream()); - else - parser = new ADQLParser(new FileReader(file)); + // Try fixing the query, if asked: + if (tryFix){ + if (verbose) + System.out.println("((i)) Trying to automatically fix the query..."); + + String query; + java.io.InputStream in = null; + try{ + // get the input stream... + if (file == null || file.length() == 0) + in = System.in; + else if (file.matches(urlRegex)) + in = (new java.net.URL(file)).openStream(); + else + in = new java.io.FileInputStream(file); + + // ...and try fixing the query: + query = (new ADQLParser()).tryQuickFix(in); + }finally{ + // close the stream (if opened): + if (in != null) + in.close(); + in = null; + } + + if (verbose) + System.out.println("((i)) SUGGESTED QUERY:\u005cn" + query); + // Initialise the parser with this fixed query: + parser = new ADQLParser(new java.io.ByteArrayInputStream(query.getBytes())); + } + // Otherwise, take the query as provided: + else{ + // Initialise the parser with the specified input: + if (file == null || file.length() == 0) + parser = new ADQLParser(System.in); + else if (file.matches(urlRegex)) + parser = new ADQLParser((new java.net.URL(file)).openStream()); + else + parser = new ADQLParser(new java.io.FileInputStream(file)); + } + + // Enable/Disable the debugging in function of the parameters: parser.setDebug(explain); // Query parsing: @@ -554,15 +1008,13 @@ public class ADQLParser implements ADQLParserConstants { try{ ADQLQuery q = null; q = QueryExpression(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case 0:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case 0: jj_consume_token(0); break; - } - case EOQ:{ + case EOQ: jj_consume_token(EOQ); break; - } default: jj_la1[0] = jj_gen; jj_consume_token(-1); @@ -573,7 +1025,7 @@ public class ADQLParser implements ADQLParserConstants { queryChecker.check(q); { - if ("" != null) + if (true) return q; } throw new Error("Missing return statement in function"); @@ -599,41 +1051,41 @@ public class ADQLParser implements ADQLParserConstants { Select(); From(); endPos = query.getFrom().getPosition(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case WHERE:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case WHERE: Where(); endPos = query.getWhere().getPosition(); break; - } default: - jj_la1[1] = jj_gen;; + jj_la1[1] = jj_gen; + ; } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case GROUP:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case GROUP: GroupBy(); endPos = query.getGroupBy().getPosition(); break; - } default: - jj_la1[2] = jj_gen;; + jj_la1[2] = jj_gen; + ; } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case HAVING:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case HAVING: Having(); endPos = query.getHaving().getPosition(); break; - } default: - jj_la1[3] = jj_gen;; + jj_la1[3] = jj_gen; + ; } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case ORDER:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case ORDER: OrderBy(); endPos = query.getOrderBy().getPosition(); break; - } default: - jj_la1[4] = jj_gen;; + jj_la1[4] = jj_gen; + ; } // set the position of the query: query.setPosition(new TextPosition(query.getSelect().getPosition(), endPos)); @@ -646,7 +1098,7 @@ public class ADQLParser implements ADQLParserConstants { query = stackQuery.peek(); { - if ("" != null) + if (true) return previousQuery; } throw new Error("Missing return statement in function"); @@ -665,7 +1117,7 @@ public class ADQLParser implements ADQLParserConstants { end = jj_consume_token(RIGHT_PAR); q.setPosition(new TextPosition(start, end)); { - if ("" != null) + if (true) return q; } throw new Error("Missing return statement in function"); @@ -681,17 +1133,17 @@ public class ADQLParser implements ADQLParserConstants { SelectItem item = null; Token start, t = null; start = jj_consume_token(SELECT); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case QUANTIFIER:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case QUANTIFIER: t = jj_consume_token(QUANTIFIER); select.setDistinctColumns(t.image.equalsIgnoreCase("DISTINCT")); break; - } default: - jj_la1[5] = jj_gen;; + jj_la1[5] = jj_gen; + ; } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case TOP:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case TOP: jj_consume_token(TOP); t = jj_consume_token(UNSIGNED_INTEGER); try{ @@ -703,18 +1155,17 @@ public class ADQLParser implements ADQLParserConstants { } } break; - } default: - jj_la1[6] = jj_gen;; + jj_la1[6] = jj_gen; + ; } item = SelectItem(); select.add(item); label_1: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: ; break; - } default: jj_la1[7] = jj_gen; break label_1; @@ -738,44 +1189,42 @@ public class ADQLParser implements ADQLParserConstants { ADQLOperand op = null; SelectItem item; Token starToken; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case ASTERISK:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case ASTERISK: starToken = jj_consume_token(ASTERISK); item = new SelectAllColumns(query); - item.setPosition(new TextPosition(starToken)); - { - if ("" != null) - return item; - } - break; + item.setPosition(new TextPosition(starToken));{ + if (true) + return item; } + break; default: jj_la1[12] = jj_gen; if (jj_2_1(7)){ id = Identifier(); jj_consume_token(DOT); identifiers.append(id); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: id = Identifier(); jj_consume_token(DOT); identifiers.append(id); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: id = Identifier(); jj_consume_token(DOT); identifiers.append(id); break; - } default: - jj_la1[8] = jj_gen;; + jj_la1[8] = jj_gen; + ; } break; - } default: - jj_la1[9] = jj_gen;; + jj_la1[9] = jj_gen; + ; } starToken = jj_consume_token(ASTERISK); try{ @@ -783,7 +1232,7 @@ public class ADQLParser implements ADQLParserConstants { TextPosition firstPos = identifiers.get(0).position; item.setPosition(new TextPosition(firstPos.beginLine, firstPos.beginColumn, starToken.endLine, (starToken.endColumn < 0) ? -1 : (starToken.endColumn + 1))); { - if ("" != null) + if (true) return item; } }catch(Exception ex){ @@ -793,7 +1242,7 @@ public class ADQLParser implements ADQLParserConstants { } } }else{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case LEFT_PAR: case PLUS: case MINUS: @@ -839,32 +1288,31 @@ public class ADQLParser implements ADQLParserConstants { case SIN: case TAN: case STRING_LITERAL: - case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER: case SCIENTIFIC_NUMBER: case UNSIGNED_FLOAT: - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: + case DELIMITED_IDENTIFIER: + case REGULAR_IDENTIFIER_CANDIDATE: op = ValueExpression(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case AS: case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case AS:{ + case REGULAR_IDENTIFIER_CANDIDATE: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case AS: jj_consume_token(AS); break; - } default: - jj_la1[10] = jj_gen;; + jj_la1[10] = jj_gen; + ; } label = Identifier(); break; - } default: - jj_la1[11] = jj_gen;; + jj_la1[11] = jj_gen; + ; } break; - } default: jj_la1[13] = jj_gen; jj_consume_token(-1); @@ -880,7 +1328,7 @@ public class ADQLParser implements ADQLParserConstants { }else item.setPosition(new TextPosition(op.getPosition())); { - if ("" != null) + if (true) return item; } }catch(Exception ex){ @@ -903,11 +1351,10 @@ public class ADQLParser implements ADQLParserConstants { jj_consume_token(FROM); content = TableRef(); label_2: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: ; break; - } default: jj_la1[14] = jj_gen; break label_2; @@ -957,11 +1404,10 @@ public class ADQLParser implements ADQLParserConstants { colRef = Column(); groupBy.add(colRef); label_3: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: ; break; - } default: jj_la1[15] = jj_gen; break label_3; @@ -1001,11 +1447,10 @@ public class ADQLParser implements ADQLParserConstants { order = OrderItem(); orderBy.add(order); label_4: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: ; break; - } default: jj_la1[16] = jj_gen; break label_4; @@ -1027,23 +1472,20 @@ public class ADQLParser implements ADQLParserConstants { trace_call("Identifier"); try{ Token t; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case REGULAR_IDENTIFIER:{ - t = jj_consume_token(REGULAR_IDENTIFIER); - { - if ("" != null) - return new IdentifierItem(t, false); - } - break; + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case REGULAR_IDENTIFIER_CANDIDATE: + t = jj_consume_token(REGULAR_IDENTIFIER_CANDIDATE); + testRegularIdentifier(t);{ + if (true) + return new IdentifierItem(t, false); } - case DELIMITED_IDENTIFIER:{ - t = jj_consume_token(DELIMITED_IDENTIFIER); - { - if ("" != null) - return new IdentifierItem(t, true); - } break; + case DELIMITED_IDENTIFIER: + t = jj_consume_token(DELIMITED_IDENTIFIER);{ + if (true) + return new IdentifierItem(t, true); } + break; default: jj_la1[17] = jj_gen; jj_consume_token(-1); @@ -1067,28 +1509,28 @@ public class ADQLParser implements ADQLParserConstants { IdentifierItem id = null; id = Identifier(); identifiers.append(id); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case DOT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case DOT: jj_consume_token(DOT); id = Identifier(); identifiers.append(id); break; - } default: - jj_la1[18] = jj_gen;; + jj_la1[18] = jj_gen; + ; } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case DOT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case DOT: jj_consume_token(DOT); id = Identifier(); identifiers.append(id); break; - } default: - jj_la1[19] = jj_gen;; + jj_la1[19] = jj_gen; + ; } { - if ("" != null) + if (true) return identifiers; } throw new Error("Missing return statement in function"); @@ -1109,14 +1551,14 @@ public class ADQLParser implements ADQLParserConstants { IdentifierItems table = null, identifiers = new IdentifierItems(false); id = Identifier(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case DOT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case DOT: jj_consume_token(DOT); table = TableName(); break; - } default: - jj_la1[20] = jj_gen;; + jj_la1[20] = jj_gen; + ; } identifiers.append(id); if (table != null){ @@ -1124,7 +1566,7 @@ public class ADQLParser implements ADQLParserConstants { identifiers.append(table.get(i)); } { - if ("" != null) + if (true) return identifiers; } throw new Error("Missing return statement in function"); @@ -1140,7 +1582,7 @@ public class ADQLParser implements ADQLParserConstants { identifiers = ColumnName(); try{ { - if ("" != null) + if (true) return queryFactory.createColumn(identifiers); } }catch(Exception ex){ @@ -1160,42 +1602,38 @@ public class ADQLParser implements ADQLParserConstants { try{ IdentifierItem identifier = null; Token ind = null, desc = null; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: identifier = Identifier(); break; - } - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: ind = jj_consume_token(UNSIGNED_INTEGER); break; - } default: jj_la1[21] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case ASC: - case DESC:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case ASC:{ + case DESC: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case ASC: jj_consume_token(ASC); break; - } - case DESC:{ + case DESC: desc = jj_consume_token(DESC); break; - } default: jj_la1[22] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: - jj_la1[23] = jj_gen;; + jj_la1[23] = jj_gen; + ; } try{ ADQLOrder order = null; @@ -1207,7 +1645,7 @@ public class ADQLParser implements ADQLParserConstants { order.setPosition(new TextPosition(ind)); } { - if ("" != null) + if (true) return order; } }catch(Exception ex){ @@ -1231,50 +1669,48 @@ public class ADQLParser implements ADQLParserConstants { FromContent content = null; Token start, end; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: identifiers = TableName(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case AS: case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case AS:{ + case REGULAR_IDENTIFIER_CANDIDATE: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case AS: jj_consume_token(AS); break; - } default: - jj_la1[24] = jj_gen;; + jj_la1[24] = jj_gen; + ; } alias = Identifier(); break; - } default: - jj_la1[25] = jj_gen;; + jj_la1[25] = jj_gen; + ; } content = queryFactory.createTable(identifiers, alias); if (alias == null) content.setPosition(new TextPosition(identifiers.get(0).position, identifiers.get(identifiers.size() - 1).position)); else - content.setPosition(new TextPosition(identifiers.get(0).position, alias.position)); - { - if ("" != null) - return content; - } - break; + content.setPosition(new TextPosition(identifiers.get(0).position, alias.position));{ + if (true) + return content; } + break; default: jj_la1[27] = jj_gen; if (jj_2_2(2)){ subQuery = SubQueryExpression(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case AS:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case AS: jj_consume_token(AS); break; - } default: - jj_la1[26] = jj_gen;; + jj_la1[26] = jj_gen; + ; } alias = Identifier(); content = queryFactory.createTable(subQuery, alias); @@ -1283,22 +1719,20 @@ public class ADQLParser implements ADQLParserConstants { else content.setPosition(new TextPosition(subQuery.getPosition(), alias.position)); { - if ("" != null) + if (true) return content; } }else{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case LEFT_PAR:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case LEFT_PAR: start = jj_consume_token(LEFT_PAR); content = JoinedTable(); end = jj_consume_token(RIGHT_PAR); - content.setPosition(new TextPosition(start, end)); - { - if ("" != null) - return content; - } - break; + content.setPosition(new TextPosition(start, end));{ + if (true) + return content; } + break; default: jj_la1[28] = jj_gen; jj_consume_token(-1); @@ -1332,7 +1766,7 @@ public class ADQLParser implements ADQLParserConstants { content = JoinSpecification(content); } { - if ("" != null) + if (true) return content; } throw new Error("Missing return statement in function"); @@ -1348,23 +1782,22 @@ public class ADQLParser implements ADQLParserConstants { content = SimpleTableRef(); label_6: while(true){ content = JoinSpecification(content); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case NATURAL: case INNER: case RIGHT: case LEFT: case FULL: - case JOIN:{ + case JOIN: ; break; - } default: jj_la1[29] = jj_gen; break label_6; } } { - if ("" != null) + if (true) return content; } throw new Error("Missing return statement in function"); @@ -1385,158 +1818,143 @@ public class ADQLParser implements ADQLParserConstants { ADQLJoin join; Token lastPar; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case NATURAL:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case NATURAL: jj_consume_token(NATURAL); natural = true; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case INNER: case RIGHT: case LEFT: - case FULL:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case INNER:{ + case FULL: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case INNER: jj_consume_token(INNER); break; - } case RIGHT: case LEFT: - case FULL:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case LEFT:{ + case FULL: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case LEFT: jj_consume_token(LEFT); type = JoinType.OUTER_LEFT; break; - } - case RIGHT:{ + case RIGHT: jj_consume_token(RIGHT); type = JoinType.OUTER_RIGHT; break; - } - case FULL:{ + case FULL: jj_consume_token(FULL); type = JoinType.OUTER_FULL; break; - } default: jj_la1[30] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case OUTER:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case OUTER: jj_consume_token(OUTER); break; - } default: - jj_la1[31] = jj_gen;; + jj_la1[31] = jj_gen; + ; } break; - } default: jj_la1[32] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: - jj_la1[33] = jj_gen;; + jj_la1[33] = jj_gen; + ; } jj_consume_token(JOIN); rightTable = SimpleTableRef(); join = queryFactory.createJoin(type, leftTable, rightTable); - join.setPosition(new TextPosition(leftTable.getPosition(), rightTable.getPosition())); - { - if ("" != null) - return join; - } - break; + join.setPosition(new TextPosition(leftTable.getPosition(), rightTable.getPosition()));{ + if (true) + return join; } + break; case INNER: case RIGHT: case LEFT: case FULL: - case JOIN:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + case JOIN: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case INNER: case RIGHT: case LEFT: - case FULL:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case INNER:{ + case FULL: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case INNER: jj_consume_token(INNER); break; - } case RIGHT: case LEFT: - case FULL:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case LEFT:{ + case FULL: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case LEFT: jj_consume_token(LEFT); type = JoinType.OUTER_LEFT; break; - } - case RIGHT:{ + case RIGHT: jj_consume_token(RIGHT); type = JoinType.OUTER_RIGHT; break; - } - case FULL:{ + case FULL: jj_consume_token(FULL); type = JoinType.OUTER_FULL; break; - } default: jj_la1[34] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case OUTER:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case OUTER: jj_consume_token(OUTER); break; - } default: - jj_la1[35] = jj_gen;; + jj_la1[35] = jj_gen; + ; } break; - } default: jj_la1[36] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: - jj_la1[37] = jj_gen;; + jj_la1[37] = jj_gen; + ; } jj_consume_token(JOIN); rightTable = SimpleTableRef(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case ON:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case ON: jj_consume_token(ON); ConditionsList(condition); join = queryFactory.createJoin(type, leftTable, rightTable, condition); - join.setPosition(new TextPosition(leftTable.getPosition(), condition.getPosition())); - { - if ("" != null) - return join; - } - break; + join.setPosition(new TextPosition(leftTable.getPosition(), condition.getPosition()));{ + if (true) + return join; } - case USING:{ + break; + case USING: jj_consume_token(USING); jj_consume_token(LEFT_PAR); id = Identifier(); lstColumns.add(queryFactory.createColumn(id)); label_7: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: ; break; - } default: jj_la1[38] = jj_gen; break label_7; @@ -1547,20 +1965,17 @@ public class ADQLParser implements ADQLParserConstants { } lastPar = jj_consume_token(RIGHT_PAR); join = queryFactory.createJoin(type, leftTable, rightTable, lstColumns); - join.setPosition(new TextPosition(leftTable.getPosition().beginLine, leftTable.getPosition().beginColumn, lastPar.endLine, (lastPar.endColumn < 0) ? -1 : (lastPar.endColumn + 1))); - { - if ("" != null) - return join; - } - break; + join.setPosition(new TextPosition(leftTable.getPosition().beginLine, leftTable.getPosition().beginColumn, lastPar.endLine, (lastPar.endColumn < 0) ? -1 : (lastPar.endColumn + 1)));{ + if (true) + return join; } + break; default: jj_la1[39] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: jj_la1[40] = jj_gen; jj_consume_token(-1); @@ -1592,11 +2007,10 @@ public class ADQLParser implements ADQLParserConstants { str += t.image.substring(1, t.image.length() - 1).replaceAll("''", "'"); if (start == null) start = t; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case STRING_LITERAL:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case STRING_LITERAL: ; break; - } default: jj_la1[41] = jj_gen; break label_8; @@ -1606,7 +2020,7 @@ public class ADQLParser implements ADQLParserConstants { cst = queryFactory.createStringConstant(str); cst.setPosition(new TextPosition(start, t)); { - if ("" != null) + if (true) return cst; } }catch(Exception ex){ @@ -1629,19 +2043,16 @@ public class ADQLParser implements ADQLParserConstants { try{ Token t; NumericConstant cst; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case SCIENTIFIC_NUMBER:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case SCIENTIFIC_NUMBER: t = jj_consume_token(SCIENTIFIC_NUMBER); break; - } - case UNSIGNED_FLOAT:{ + case UNSIGNED_FLOAT: t = jj_consume_token(UNSIGNED_FLOAT); break; - } - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: t = jj_consume_token(UNSIGNED_INTEGER); break; - } default: jj_la1[42] = jj_gen; jj_consume_token(-1); @@ -1651,7 +2062,7 @@ public class ADQLParser implements ADQLParserConstants { cst = queryFactory.createNumericConstant(t.image); cst.setPosition(new TextPosition(t)); { - if ("" != null) + if (true) return cst; } }catch(Exception ex){ @@ -1671,15 +2082,13 @@ public class ADQLParser implements ADQLParserConstants { try{ Token t; NumericConstant cst; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case UNSIGNED_INTEGER:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case UNSIGNED_INTEGER: t = jj_consume_token(UNSIGNED_INTEGER); break; - } - case UNSIGNED_FLOAT:{ + case UNSIGNED_FLOAT: t = jj_consume_token(UNSIGNED_FLOAT); break; - } default: jj_la1[43] = jj_gen; jj_consume_token(-1); @@ -1689,7 +2098,7 @@ public class ADQLParser implements ADQLParserConstants { cst = queryFactory.createNumericConstant(t.image); cst.setPosition(new TextPosition(t)); { - if ("" != null) + if (true) return cst; } }catch(Exception ex){ @@ -1709,27 +2118,25 @@ public class ADQLParser implements ADQLParserConstants { try{ Token sign = null, number; NumericConstant cst; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case PLUS: - case MINUS:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case PLUS:{ + case MINUS: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case PLUS: sign = jj_consume_token(PLUS); break; - } - case MINUS:{ + case MINUS: sign = jj_consume_token(MINUS); break; - } default: jj_la1[44] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: - jj_la1[45] = jj_gen;; + jj_la1[45] = jj_gen; + ; } number = jj_consume_token(UNSIGNED_INTEGER); try{ @@ -1741,7 +2148,7 @@ public class ADQLParser implements ADQLParserConstants { cst.setPosition(new TextPosition(sign, number)); } { - if ("" != null) + if (true) return cst; } }catch(Exception ex){ @@ -1766,52 +2173,44 @@ public class ADQLParser implements ADQLParserConstants { ADQLOperand op; Token left, right; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case SCIENTIFIC_NUMBER: case UNSIGNED_FLOAT: - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: // unsigned_value_specification - op = UnsignedNumeric(); - { - if ("" != null) - return op; - } - break; + op = UnsignedNumeric();{ + if (true) + return op; } + break; case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: column = Column(); - column.setExpectedType('N'); - { - if ("" != null) - return column; - } - break; + column.setExpectedType('N');{ + if (true) + return column; } + break; case AVG: case MAX: case MIN: case SUM: - case COUNT:{ - op = SqlFunction(); - { - if ("" != null) - return op; - } - break; + case COUNT: + op = SqlFunction();{ + if (true) + return op; } - case LEFT_PAR:{ + break; + case LEFT_PAR: left = jj_consume_token(LEFT_PAR); op = NumericExpression(); right = jj_consume_token(RIGHT_PAR); WrappedOperand wop = queryFactory.createWrappedOperand(op); - wop.setPosition(new TextPosition(left, right)); - { - if ("" != null) - return wop; - } - break; + wop.setPosition(new TextPosition(left, right));{ + if (true) + return wop; } + break; default: jj_la1[46] = jj_gen; jj_consume_token(-1); @@ -1837,60 +2236,50 @@ public class ADQLParser implements ADQLParserConstants { ADQLOperand op; Token left, right; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case STRING_LITERAL:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case STRING_LITERAL: // string - expr = String(); - { - if ("" != null) - return expr; - } - break; + expr = String();{ + if (true) + return expr; } + break; case SCIENTIFIC_NUMBER: case UNSIGNED_FLOAT: - case UNSIGNED_INTEGER:{ - op = UnsignedNumeric(); - { - if ("" != null) - return op; - } - break; + case UNSIGNED_INTEGER: + op = UnsignedNumeric();{ + if (true) + return op; } + break; case AVG: case MAX: case MIN: case SUM: - case COUNT:{ - op = SqlFunction(); - { - if ("" != null) - return op; - } - break; + case COUNT: + op = SqlFunction();{ + if (true) + return op; } + break; case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: column = Column(); - column.setExpectedType('*'); - { - if ("" != null) - return column; - } - break; + column.setExpectedType('*');{ + if (true) + return column; } - case LEFT_PAR:{ + break; + case LEFT_PAR: left = jj_consume_token(LEFT_PAR); op = ValueExpression(); right = jj_consume_token(RIGHT_PAR); WrappedOperand wop = queryFactory.createWrappedOperand(op); - wop.setPosition(new TextPosition(left, right)); - { - if ("" != null) - return wop; - } - break; + wop.setPosition(new TextPosition(left, right));{ + if (true) + return wop; } + break; default: jj_la1[47] = jj_gen; jj_consume_token(-1); @@ -1935,12 +2324,11 @@ public class ADQLParser implements ADQLParserConstants { }else if (jj_2_11(3)){ valueExpr = Factor(); }else{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: valueExpr = Column(); break; - } default: jj_la1[48] = jj_gen; jj_consume_token(-1); @@ -1948,7 +2336,7 @@ public class ADQLParser implements ADQLParserConstants { } } { - if ("" != null) + if (true) return valueExpr; } }catch(Exception ex){ @@ -1969,18 +2357,16 @@ public class ADQLParser implements ADQLParserConstants { Token sign = null; ADQLOperand leftOp, rightOp = null; leftOp = NumericTerm(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case PLUS: - case MINUS:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case PLUS:{ + case MINUS: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case PLUS: sign = jj_consume_token(PLUS); break; - } - case MINUS:{ + case MINUS: sign = jj_consume_token(MINUS); break; - } default: jj_la1[49] = jj_gen; jj_consume_token(-1); @@ -1988,19 +2374,19 @@ public class ADQLParser implements ADQLParserConstants { } rightOp = NumericExpression(); break; - } default: - jj_la1[50] = jj_gen;; + jj_la1[50] = jj_gen; + ; } if (sign == null){ - if ("" != null) + if (true) return leftOp; }else{ try{ Operation operation = queryFactory.createOperation(leftOp, OperationType.getOperator(sign.image), rightOp); operation.setPosition(new TextPosition(leftOp.getPosition(), rightOp.getPosition())); { - if ("" != null) + if (true) return operation; } }catch(Exception ex){ @@ -2022,18 +2408,16 @@ public class ADQLParser implements ADQLParserConstants { Token sign = null; ADQLOperand leftOp, rightOp = null; leftOp = Factor(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case ASTERISK: - case DIVIDE:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case ASTERISK:{ + case DIVIDE: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case ASTERISK: sign = jj_consume_token(ASTERISK); break; - } - case DIVIDE:{ + case DIVIDE: sign = jj_consume_token(DIVIDE); break; - } default: jj_la1[51] = jj_gen; jj_consume_token(-1); @@ -2041,19 +2425,19 @@ public class ADQLParser implements ADQLParserConstants { } rightOp = NumericTerm(); break; - } default: - jj_la1[52] = jj_gen;; + jj_la1[52] = jj_gen; + ; } if (sign == null){ - if ("" != null) + if (true) return leftOp; }else{ try{ Operation operation = queryFactory.createOperation(leftOp, OperationType.getOperator(sign.image), rightOp); operation.setPosition(new TextPosition(leftOp.getPosition(), rightOp.getPosition())); { - if ("" != null) + if (true) return operation; } }catch(Exception ex){ @@ -2075,47 +2459,44 @@ public class ADQLParser implements ADQLParserConstants { boolean negative = false; Token minusSign = null; ADQLOperand op; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case PLUS: - case MINUS:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case PLUS:{ + case MINUS: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case PLUS: jj_consume_token(PLUS); break; - } - case MINUS:{ + case MINUS: minusSign = jj_consume_token(MINUS); negative = true; break; - } default: jj_la1[53] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; - } default: - jj_la1[54] = jj_gen;; + jj_la1[54] = jj_gen; + ; } if (jj_2_12(2)){ op = NumericFunction(); }else{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case LEFT_PAR: case AVG: case MAX: case MIN: case SUM: case COUNT: - case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER: case SCIENTIFIC_NUMBER: case UNSIGNED_FLOAT: - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: + case DELIMITED_IDENTIFIER: + case REGULAR_IDENTIFIER_CANDIDATE: op = NumericValueExpressionPrimary(); break; - } default: jj_la1[55] = jj_gen; jj_consume_token(-1); @@ -2140,7 +2521,7 @@ public class ADQLParser implements ADQLParserConstants { } { - if ("" != null) + if (true) return op; } throw new Error("Missing return statement in function"); @@ -2156,11 +2537,10 @@ public class ADQLParser implements ADQLParserConstants { ADQLOperand rightOp = null; leftOp = StringFactor(); label_9: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case CONCAT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case CONCAT: ; break; - } default: jj_la1[56] = jj_gen; break label_9; @@ -2186,7 +2566,7 @@ public class ADQLParser implements ADQLParserConstants { concat.setPosition(new TextPosition(concat.get(0).getPosition(), concat.get(concat.size() - 1).getPosition())); } { - if ("" != null) + if (true) return leftOp; } throw new Error("Missing return statement in function"); @@ -2199,18 +2579,17 @@ public class ADQLParser implements ADQLParserConstants { trace_call("StringFactor"); try{ ADQLOperand op; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COORDSYS:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COORDSYS: op = ExtractCoordSys(); break; - } default: jj_la1[57] = jj_gen; if (jj_2_13(2)){ op = UserDefinedFunction(); ((UserDefinedFunction)op).setExpectedType('S'); }else{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case LEFT_PAR: case AVG: case MAX: @@ -2218,14 +2597,13 @@ public class ADQLParser implements ADQLParserConstants { case SUM: case COUNT: case STRING_LITERAL: - case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER: case SCIENTIFIC_NUMBER: case UNSIGNED_FLOAT: - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: + case DELIMITED_IDENTIFIER: + case REGULAR_IDENTIFIER_CANDIDATE: op = StringValueExpressionPrimary(); break; - } default: jj_la1[58] = jj_gen; jj_consume_token(-1); @@ -2234,7 +2612,7 @@ public class ADQLParser implements ADQLParserConstants { } } { - if ("" != null) + if (true) return op; } throw new Error("Missing return statement in function"); @@ -2248,21 +2626,19 @@ public class ADQLParser implements ADQLParserConstants { try{ ADQLColumn col = null; GeometryFunction gf = null; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: col = Column(); break; - } case BOX: case CENTROID: case CIRCLE: case POINT: case POLYGON: - case REGION:{ + case REGION: gf = GeometryValueFunction(); break; - } default: jj_la1[59] = jj_gen; jj_consume_token(-1); @@ -2271,11 +2647,11 @@ public class ADQLParser implements ADQLParserConstants { if (col != null){ col.setExpectedType('G'); { - if ("" != null) + if (true) return new GeometryValue<GeometryFunction>(col); } }else{ - if ("" != null) + if (true) return new GeometryValue<GeometryFunction>(gf); } throw new Error("Missing return statement in function"); @@ -2294,14 +2670,14 @@ public class ADQLParser implements ADQLParserConstants { Token op = null; boolean notOp = false; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case NOT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case NOT: op = jj_consume_token(NOT); notOp = true; break; - } default: - jj_la1[60] = jj_gen;; + jj_la1[60] = jj_gen; + ; } constraint = Constraint(); if (notOp){ @@ -2316,38 +2692,35 @@ public class ADQLParser implements ADQLParserConstants { else clause.add(constraint); label_10: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case AND: - case OR:{ + case OR: ; break; - } default: jj_la1[61] = jj_gen; break label_10; } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case AND:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case AND: op = jj_consume_token(AND); break; - } - case OR:{ + case OR: op = jj_consume_token(OR); break; - } default: jj_la1[62] = jj_gen; jj_consume_token(-1); throw new ParseException(); } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case NOT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case NOT: jj_consume_token(NOT); notOp = true; break; - } default: - jj_la1[63] = jj_gen;; + jj_la1[63] = jj_gen; + ; } constraint = Constraint(); if (notOp){ @@ -2374,7 +2747,7 @@ public class ADQLParser implements ADQLParserConstants { clause.setPosition(new TextPosition(start, end)); } { - if ("" != null) + if (true) return clause; } throw new Error("Missing return statement in function"); @@ -2391,8 +2764,8 @@ public class ADQLParser implements ADQLParserConstants { if (jj_2_14(2147483647)){ constraint = Predicate(); }else{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case LEFT_PAR:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case LEFT_PAR: start = jj_consume_token(LEFT_PAR); try{ constraint = queryFactory.createGroupOfConstraints(); @@ -2406,7 +2779,6 @@ public class ADQLParser implements ADQLParserConstants { end = jj_consume_token(RIGHT_PAR); ((ConstraintsGroup)constraint).setPosition(new TextPosition(start, end)); break; - } default: jj_la1[64] = jj_gen; jj_consume_token(-1); @@ -2414,7 +2786,7 @@ public class ADQLParser implements ADQLParserConstants { } } { - if ("" != null) + if (true) return constraint; } throw new Error("Missing return statement in function"); @@ -2433,58 +2805,56 @@ public class ADQLParser implements ADQLParserConstants { Token start, notToken = null, end; ADQLConstraint constraint = null; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case EXISTS:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case EXISTS: start = jj_consume_token(EXISTS); q = SubQueryExpression(); Exists e = queryFactory.createExists(q); - e.setPosition(new TextPosition(start.beginLine, start.beginColumn, q.getPosition().endLine, q.getPosition().endColumn)); - { - if ("" != null) - return e; - } - break; + e.setPosition(new TextPosition(start.beginLine, start.beginColumn, q.getPosition().endLine, q.getPosition().endColumn));{ + if (true) + return e; } + break; default: jj_la1[69] = jj_gen; if (jj_2_16(2147483647)){ column = Column(); jj_consume_token(IS); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case NOT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case NOT: notToken = jj_consume_token(NOT); break; - } default: - jj_la1[65] = jj_gen;; + jj_la1[65] = jj_gen; + ; } end = jj_consume_token(NULL); IsNull in = queryFactory.createIsNull((notToken != null), column); in.setPosition(new TextPosition(column.getPosition().beginLine, column.getPosition().beginColumn, end.endLine, (end.endColumn < 0) ? -1 : (end.endColumn + 1))); { - if ("" != null) + if (true) return in; } }else if (jj_2_17(2147483647)){ strExpr1 = StringExpression(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case NOT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case NOT: notToken = jj_consume_token(NOT); break; - } default: - jj_la1[66] = jj_gen;; + jj_la1[66] = jj_gen; + ; } jj_consume_token(LIKE); strExpr2 = StringExpression(); Comparison comp = queryFactory.createComparison(strExpr1, (notToken == null) ? ComparisonOperator.LIKE : ComparisonOperator.NOTLIKE, strExpr2); comp.setPosition(new TextPosition(strExpr1.getPosition(), strExpr2.getPosition())); { - if ("" != null) + if (true) return comp; } }else{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case LEFT_PAR: case PLUS: case MINUS: @@ -2530,33 +2900,31 @@ public class ADQLParser implements ADQLParserConstants { case SIN: case TAN: case STRING_LITERAL: - case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER: case SCIENTIFIC_NUMBER: case UNSIGNED_FLOAT: - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: + case DELIMITED_IDENTIFIER: + case REGULAR_IDENTIFIER_CANDIDATE: op = ValueExpression(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case EQUAL: case NOT_EQUAL: case LESS_THAN: case LESS_EQUAL_THAN: case GREATER_THAN: - case GREATER_EQUAL_THAN:{ + case GREATER_EQUAL_THAN: constraint = ComparisonEnd(op); break; - } default: jj_la1[67] = jj_gen; if (jj_2_15(2)){ constraint = BetweenEnd(op); }else{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case NOT: - case IN:{ + case IN: constraint = InEnd(op); break; - } default: jj_la1[68] = jj_gen; jj_consume_token(-1); @@ -2565,7 +2933,6 @@ public class ADQLParser implements ADQLParserConstants { } } break; - } default: jj_la1[70] = jj_gen; jj_consume_token(-1); @@ -2580,7 +2947,7 @@ public class ADQLParser implements ADQLParserConstants { } } { - if ("" != null) + if (true) return constraint; } throw new Error("Missing return statement in function"); @@ -2594,31 +2961,25 @@ public class ADQLParser implements ADQLParserConstants { try{ Token comp; ADQLOperand rightOp; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case EQUAL:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case EQUAL: comp = jj_consume_token(EQUAL); break; - } - case NOT_EQUAL:{ + case NOT_EQUAL: comp = jj_consume_token(NOT_EQUAL); break; - } - case LESS_THAN:{ + case LESS_THAN: comp = jj_consume_token(LESS_THAN); break; - } - case LESS_EQUAL_THAN:{ + case LESS_EQUAL_THAN: comp = jj_consume_token(LESS_EQUAL_THAN); break; - } - case GREATER_THAN:{ + case GREATER_THAN: comp = jj_consume_token(GREATER_THAN); break; - } - case GREATER_EQUAL_THAN:{ + case GREATER_EQUAL_THAN: comp = jj_consume_token(GREATER_EQUAL_THAN); break; - } default: jj_la1[71] = jj_gen; jj_consume_token(-1); @@ -2629,7 +2990,7 @@ public class ADQLParser implements ADQLParserConstants { Comparison comparison = queryFactory.createComparison(leftOp, ComparisonOperator.getOperator(comp.image), rightOp); comparison.setPosition(new TextPosition(leftOp.getPosition(), rightOp.getPosition())); { - if ("" != null) + if (true) return comparison; } }catch(Exception ex){ @@ -2649,13 +3010,13 @@ public class ADQLParser implements ADQLParserConstants { try{ Token start, notToken = null; ADQLOperand min, max; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case NOT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case NOT: notToken = jj_consume_token(NOT); break; - } default: - jj_la1[72] = jj_gen;; + jj_la1[72] = jj_gen; + ; } start = jj_consume_token(BETWEEN); min = ValueExpression(); @@ -2667,7 +3028,7 @@ public class ADQLParser implements ADQLParserConstants { start = notToken; bet.setPosition(new TextPosition(start.beginLine, start.beginColumn, max.getPosition().endLine, max.getPosition().endColumn)); { - if ("" != null) + if (true) return bet; } }catch(Exception ex){ @@ -2689,29 +3050,28 @@ public class ADQLParser implements ADQLParserConstants { ADQLQuery q = null; ADQLOperand item; Vector<ADQLOperand> items = new Vector<ADQLOperand>(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case NOT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case NOT: not = jj_consume_token(NOT); break; - } default: - jj_la1[73] = jj_gen;; + jj_la1[73] = jj_gen; + ; } start = jj_consume_token(IN); if (jj_2_18(2)){ q = SubQueryExpression(); }else{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case LEFT_PAR:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case LEFT_PAR: jj_consume_token(LEFT_PAR); item = ValueExpression(); items.add(item); label_11: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: ; break; - } default: jj_la1[74] = jj_gen; break label_11; @@ -2722,7 +3082,6 @@ public class ADQLParser implements ADQLParserConstants { } jj_consume_token(RIGHT_PAR); break; - } default: jj_la1[75] = jj_gen; jj_consume_token(-1); @@ -2744,7 +3103,7 @@ public class ADQLParser implements ADQLParserConstants { in.setPosition(new TextPosition(start.beginLine, start.beginColumn, list[list.length - 1].getPosition().endLine, list[list.length - 1].getPosition().endColumn)); } { - if ("" != null) + if (true) return in; } }catch(Exception ex){ @@ -2769,23 +3128,22 @@ public class ADQLParser implements ADQLParserConstants { ADQLOperand op = null; SQLFunction funct = null; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COUNT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COUNT: fct = jj_consume_token(COUNT); jj_consume_token(LEFT_PAR); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case QUANTIFIER:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case QUANTIFIER: distinct = jj_consume_token(QUANTIFIER); break; - } default: - jj_la1[76] = jj_gen;; + jj_la1[76] = jj_gen; + ; } - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case ASTERISK:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case ASTERISK: all = jj_consume_token(ASTERISK); break; - } case LEFT_PAR: case PLUS: case MINUS: @@ -2831,14 +3189,13 @@ public class ADQLParser implements ADQLParserConstants { case SIN: case TAN: case STRING_LITERAL: - case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER: case SCIENTIFIC_NUMBER: case UNSIGNED_FLOAT: - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: + case DELIMITED_IDENTIFIER: + case REGULAR_IDENTIFIER_CANDIDATE: op = ValueExpression(); break; - } default: jj_la1[77] = jj_gen; jj_consume_token(-1); @@ -2848,48 +3205,42 @@ public class ADQLParser implements ADQLParserConstants { funct = queryFactory.createSQLFunction((all != null) ? SQLFunctionType.COUNT_ALL : SQLFunctionType.COUNT, op, distinct != null && distinct.image.equalsIgnoreCase("distinct")); funct.setPosition(new TextPosition(fct, end)); break; - } case AVG: case MAX: case MIN: - case SUM:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case AVG:{ + case SUM: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case AVG: fct = jj_consume_token(AVG); break; - } - case MAX:{ + case MAX: fct = jj_consume_token(MAX); break; - } - case MIN:{ + case MIN: fct = jj_consume_token(MIN); break; - } - case SUM:{ + case SUM: fct = jj_consume_token(SUM); break; - } default: jj_la1[78] = jj_gen; jj_consume_token(-1); throw new ParseException(); } jj_consume_token(LEFT_PAR); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case QUANTIFIER:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case QUANTIFIER: distinct = jj_consume_token(QUANTIFIER); break; - } default: - jj_la1[79] = jj_gen;; + jj_la1[79] = jj_gen; + ; } op = ValueExpression(); end = jj_consume_token(RIGHT_PAR); funct = queryFactory.createSQLFunction(SQLFunctionType.valueOf(fct.image.toUpperCase()), op, distinct != null && distinct.image.equalsIgnoreCase("distinct")); funct.setPosition(new TextPosition(fct, end)); break; - } default: jj_la1[80] = jj_gen; jj_consume_token(-1); @@ -2902,7 +3253,7 @@ public class ADQLParser implements ADQLParserConstants { } } { - if ("" != null) + if (true) return funct; } throw new Error("Missing return statement in function"); @@ -2922,7 +3273,7 @@ public class ADQLParser implements ADQLParserConstants { jj_consume_token(COMMA); ops[1] = NumericExpression(); { - if ("" != null) + if (true) return ops; } throw new Error("Missing return statement in function"); @@ -2941,18 +3292,16 @@ public class ADQLParser implements ADQLParserConstants { PointFunction p1 = null, p2 = null; ADQLColumn col1 = null, col2 = null; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case CONTAINS: - case INTERSECTS:{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case CONTAINS:{ + case INTERSECTS: + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case CONTAINS: fct = jj_consume_token(CONTAINS); break; - } - case INTERSECTS:{ + case INTERSECTS: fct = jj_consume_token(INTERSECTS); break; - } default: jj_la1[81] = jj_gen; jj_consume_token(-1); @@ -2968,31 +3317,27 @@ public class ADQLParser implements ADQLParserConstants { else gf = queryFactory.createIntersects(gvf1, gvf2); break; - } - case AREA:{ + case AREA: fct = jj_consume_token(AREA); jj_consume_token(LEFT_PAR); gvf1 = GeometryExpression(); end = jj_consume_token(RIGHT_PAR); gf = queryFactory.createArea(gvf1); break; - } - case COORD1:{ + case COORD1: fct = jj_consume_token(COORD1); jj_consume_token(LEFT_PAR); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case POINT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case POINT: p1 = Point(); gf = queryFactory.createCoord1(p1); break; - } case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: col1 = Column(); col1.setExpectedType('G'); gf = queryFactory.createCoord1(col1); break; - } default: jj_la1[82] = jj_gen; jj_consume_token(-1); @@ -3000,23 +3345,20 @@ public class ADQLParser implements ADQLParserConstants { } end = jj_consume_token(RIGHT_PAR); break; - } - case COORD2:{ + case COORD2: fct = jj_consume_token(COORD2); jj_consume_token(LEFT_PAR); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case POINT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case POINT: p1 = Point(); gf = queryFactory.createCoord2(p1); break; - } case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: col1 = Column(); col1.setExpectedType('G'); gf = queryFactory.createCoord2(col1); break; - } default: jj_la1[83] = jj_gen; jj_consume_token(-1); @@ -3024,20 +3366,17 @@ public class ADQLParser implements ADQLParserConstants { } end = jj_consume_token(RIGHT_PAR); break; - } - case DISTANCE:{ + case DISTANCE: fct = jj_consume_token(DISTANCE); jj_consume_token(LEFT_PAR); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case POINT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case POINT: p1 = Point(); break; - } case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: col1 = Column(); break; - } default: jj_la1[84] = jj_gen; jj_consume_token(-1); @@ -3050,16 +3389,14 @@ public class ADQLParser implements ADQLParserConstants { gvp1 = new GeometryValue<PointFunction>(col1); } jj_consume_token(COMMA); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case POINT:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case POINT: p2 = Point(); break; - } case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: col2 = Column(); break; - } default: jj_la1[85] = jj_gen; jj_consume_token(-1); @@ -3074,7 +3411,6 @@ public class ADQLParser implements ADQLParserConstants { end = jj_consume_token(RIGHT_PAR); gf = queryFactory.createDistance(gvp1, gvp2); break; - } default: jj_la1[86] = jj_gen; jj_consume_token(-1); @@ -3088,7 +3424,7 @@ public class ADQLParser implements ADQLParserConstants { } gf.setPosition(new TextPosition(fct, end)); { - if ("" != null) + if (true) return gf; } throw new Error("Missing return statement in function"); @@ -3103,7 +3439,7 @@ public class ADQLParser implements ADQLParserConstants { ADQLOperand coordSys = null; coordSys = StringExpression(); { - if ("" != null) + if (true) return coordSys; } throw new Error("Missing return statement in function"); @@ -3124,8 +3460,8 @@ public class ADQLParser implements ADQLParserConstants { GeometryValue<GeometryFunction> gvf = null; GeometryFunction gf = null; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case BOX:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case BOX: fct = jj_consume_token(BOX); jj_consume_token(LEFT_PAR); coordSys = CoordinateSystem(); @@ -3138,16 +3474,14 @@ public class ADQLParser implements ADQLParserConstants { end = jj_consume_token(RIGHT_PAR); gf = queryFactory.createBox(coordSys, coords[0], coords[1], width, height); break; - } - case CENTROID:{ + case CENTROID: fct = jj_consume_token(CENTROID); jj_consume_token(LEFT_PAR); gvf = GeometryExpression(); end = jj_consume_token(RIGHT_PAR); gf = queryFactory.createCentroid(gvf); break; - } - case CIRCLE:{ + case CIRCLE: fct = jj_consume_token(CIRCLE); jj_consume_token(LEFT_PAR); coordSys = CoordinateSystem(); @@ -3158,12 +3492,10 @@ public class ADQLParser implements ADQLParserConstants { end = jj_consume_token(RIGHT_PAR); gf = queryFactory.createCircle(coordSys, coords[0], coords[1], width); break; - } - case POINT:{ + case POINT: gf = Point(); break; - } - case POLYGON:{ + case POLYGON: fct = jj_consume_token(POLYGON); jj_consume_token(LEFT_PAR); coordSys = CoordinateSystem(); @@ -3181,11 +3513,10 @@ public class ADQLParser implements ADQLParserConstants { vCoords.add(tmp[0]); vCoords.add(tmp[1]); label_12: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: ; break; - } default: jj_la1[87] = jj_gen; break label_12; @@ -3198,15 +3529,13 @@ public class ADQLParser implements ADQLParserConstants { end = jj_consume_token(RIGHT_PAR); gf = queryFactory.createPolygon(coordSys, vCoords); break; - } - case REGION:{ + case REGION: fct = jj_consume_token(REGION); jj_consume_token(LEFT_PAR); op = StringExpression(); end = jj_consume_token(RIGHT_PAR); gf = queryFactory.createRegion(op); break; - } default: jj_la1[88] = jj_gen; jj_consume_token(-1); @@ -3221,7 +3550,7 @@ public class ADQLParser implements ADQLParserConstants { if (fct != null && end != null) // = !(gf instanceof Point) gf.setPosition(new TextPosition(fct, end)); { - if ("" != null) + if (true) return gf; } throw new Error("Missing return statement in function"); @@ -3246,7 +3575,7 @@ public class ADQLParser implements ADQLParserConstants { PointFunction pf = queryFactory.createPoint(coordSys, coords[0], coords[1]); pf.setPosition(new TextPosition(start, end)); { - if ("" != null) + if (true) return pf; } }catch(Exception ex){ @@ -3274,7 +3603,7 @@ public class ADQLParser implements ADQLParserConstants { GeometryFunction gf = queryFactory.createExtractCoordSys(gvf); gf.setPosition(new TextPosition(start, end)); { - if ("" != null) + if (true) return gf; } }catch(Exception ex){ @@ -3296,7 +3625,7 @@ public class ADQLParser implements ADQLParserConstants { trace_call("NumericFunction"); try{ ADQLFunction fct; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case ABS: case CEILING: case DEGREES: @@ -3311,10 +3640,9 @@ public class ADQLParser implements ADQLParserConstants { case RAND: case ROUND: case SQRT: - case TRUNCATE:{ + case TRUNCATE: fct = MathFunction(); break; - } case ACOS: case ASIN: case ATAN: @@ -3322,31 +3650,28 @@ public class ADQLParser implements ADQLParserConstants { case COS: case COT: case SIN: - case TAN:{ + case TAN: fct = TrigFunction(); break; - } case CONTAINS: case INTERSECTS: case AREA: case COORD1: case COORD2: - case DISTANCE:{ + case DISTANCE: fct = GeometryFunction(); break; - } - case REGULAR_IDENTIFIER:{ + case REGULAR_IDENTIFIER_CANDIDATE: fct = UserDefinedFunction(); ((UserDefinedFunction)fct).setExpectedType('N'); break; - } default: jj_la1[89] = jj_gen; jj_consume_token(-1); throw new ParseException(); } { - if ("" != null) + if (true) return fct; } throw new Error("Missing return statement in function"); @@ -3362,57 +3687,50 @@ public class ADQLParser implements ADQLParserConstants { ADQLOperand param1 = null, param2 = null; NumericConstant integerValue = null; try{ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case ABS:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case ABS: fct = jj_consume_token(ABS); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case CEILING:{ + case CEILING: fct = jj_consume_token(CEILING); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case DEGREES:{ + case DEGREES: fct = jj_consume_token(DEGREES); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case EXP:{ + case EXP: fct = jj_consume_token(EXP); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case FLOOR:{ + case FLOOR: fct = jj_consume_token(FLOOR); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case LOG:{ + case LOG: fct = jj_consume_token(LOG); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case LOG10:{ + case LOG10: fct = jj_consume_token(LOG10); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case MOD:{ + case MOD: fct = jj_consume_token(MOD); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); @@ -3420,14 +3738,12 @@ public class ADQLParser implements ADQLParserConstants { param2 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case PI:{ + case PI: fct = jj_consume_token(PI); jj_consume_token(LEFT_PAR); end = jj_consume_token(RIGHT_PAR); break; - } - case POWER:{ + case POWER: fct = jj_consume_token(POWER); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); @@ -3435,18 +3751,16 @@ public class ADQLParser implements ADQLParserConstants { param2 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case RADIANS:{ + case RADIANS: fct = jj_consume_token(RADIANS); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case RAND:{ + case RAND: fct = jj_consume_token(RAND); jj_consume_token(LEFT_PAR); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case LEFT_PAR: case PLUS: case MINUS: @@ -3484,59 +3798,55 @@ public class ADQLParser implements ADQLParserConstants { case COT: case SIN: case TAN: - case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER: case SCIENTIFIC_NUMBER: case UNSIGNED_FLOAT: - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: + case DELIMITED_IDENTIFIER: + case REGULAR_IDENTIFIER_CANDIDATE: param1 = NumericExpression(); break; - } default: - jj_la1[90] = jj_gen;; + jj_la1[90] = jj_gen; + ; } end = jj_consume_token(RIGHT_PAR); break; - } - case ROUND:{ + case ROUND: fct = jj_consume_token(ROUND); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: jj_consume_token(COMMA); param2 = SignedInteger(); break; - } default: - jj_la1[91] = jj_gen;; + jj_la1[91] = jj_gen; + ; } end = jj_consume_token(RIGHT_PAR); break; - } - case SQRT:{ + case SQRT: fct = jj_consume_token(SQRT); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case TRUNCATE:{ + case TRUNCATE: fct = jj_consume_token(TRUNCATE); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: jj_consume_token(COMMA); param2 = SignedInteger(); break; - } default: - jj_la1[92] = jj_gen;; + jj_la1[92] = jj_gen; + ; } end = jj_consume_token(RIGHT_PAR); break; - } default: jj_la1[93] = jj_gen; jj_consume_token(-1); @@ -3545,7 +3855,7 @@ public class ADQLParser implements ADQLParserConstants { MathFunction mf = queryFactory.createMathFunction(MathFunctionType.valueOf(fct.image.toUpperCase()), param1, param2); mf.setPosition(new TextPosition(fct, end)); { - if ("" != null) + if (true) return mf; } }catch(Exception ex){ @@ -3565,29 +3875,26 @@ public class ADQLParser implements ADQLParserConstants { try{ Token fct = null, end; ADQLOperand param1 = null, param2 = null; - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case ACOS:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case ACOS: fct = jj_consume_token(ACOS); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case ASIN:{ + case ASIN: fct = jj_consume_token(ASIN); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case ATAN:{ + case ATAN: fct = jj_consume_token(ATAN); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case ATAN2:{ + case ATAN2: fct = jj_consume_token(ATAN2); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); @@ -3595,35 +3902,30 @@ public class ADQLParser implements ADQLParserConstants { param2 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case COS:{ + case COS: fct = jj_consume_token(COS); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case COT:{ + case COT: fct = jj_consume_token(COT); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case SIN:{ + case SIN: fct = jj_consume_token(SIN); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } - case TAN:{ + case TAN: fct = jj_consume_token(TAN); jj_consume_token(LEFT_PAR); param1 = NumericExpression(); end = jj_consume_token(RIGHT_PAR); break; - } default: jj_la1[94] = jj_gen; jj_consume_token(-1); @@ -3633,7 +3935,7 @@ public class ADQLParser implements ADQLParserConstants { MathFunction mf = queryFactory.createMathFunction(MathFunctionType.valueOf(fct.image.toUpperCase()), param1, param2); mf.setPosition(new TextPosition(fct, end)); { - if ("" != null) + if (true) return mf; } }catch(Exception ex){ @@ -3654,9 +3956,9 @@ public class ADQLParser implements ADQLParserConstants { Token fct, end; Vector<ADQLOperand> params = new Vector<ADQLOperand>(); ADQLOperand op; - fct = jj_consume_token(REGULAR_IDENTIFIER); + fct = jj_consume_token(REGULAR_IDENTIFIER_CANDIDATE); jj_consume_token(LEFT_PAR); - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ case LEFT_PAR: case PLUS: case MINUS: @@ -3702,19 +4004,18 @@ public class ADQLParser implements ADQLParserConstants { case SIN: case TAN: case STRING_LITERAL: - case DELIMITED_IDENTIFIER: - case REGULAR_IDENTIFIER: case SCIENTIFIC_NUMBER: case UNSIGNED_FLOAT: - case UNSIGNED_INTEGER:{ + case UNSIGNED_INTEGER: + case DELIMITED_IDENTIFIER: + case REGULAR_IDENTIFIER_CANDIDATE: op = ValueExpression(); params.add(op); label_13: while(true){ - switch((jj_ntk == -1) ? jj_ntk_f() : jj_ntk){ - case COMMA:{ + switch((jj_ntk == -1) ? jj_ntk() : jj_ntk){ + case COMMA: ; break; - } default: jj_la1[95] = jj_gen; break label_13; @@ -3724,24 +4025,33 @@ public class ADQLParser implements ADQLParserConstants { params.add(op); } break; - } default: - jj_la1[96] = jj_gen;; + jj_la1[96] = jj_gen; + ; } end = jj_consume_token(RIGHT_PAR); + // Ensure the given function name is valid: + if (!isRegularIdentifier(fct.image)){ + if (true) + throw new ParseException("Invalid (User Defined) Function name: \u005c"" + fct.image + "\u005c"!", new TextPosition(fct)); + } + //System.out.println("INFO [ADQLParser]: \""+fct.image+"\" (from line "+fct.beginLine+" and column "+fct.beginColumn+" to line "+token.endLine+" and column "+(token.endColumn+1)+") is considered as an user defined function !"); + try{ // Build the parameters list: ADQLOperand[] parameters = new ADQLOperand[params.size()]; for(int i = 0; i < params.size(); i++) parameters[i] = params.get(i); + // Create the UDF function: UserDefinedFunction udf = queryFactory.createUserDefinedFunction(fct.image, parameters); udf.setPosition(new TextPosition(fct, end)); { - if ("" != null) + if (true) return udf; } + }catch(UnsupportedOperationException uoe){ /* This catch clause is just for backward compatibility: * if the createUserDefinedFunction(...) is overridden and @@ -3978,187 +4288,6 @@ public class ADQLParser implements ADQLParserConstants { } } - private boolean jj_3R_128(){ - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(99)){ - jj_scanpos = xsp; - if (jj_scan_token(100)){ - jj_scanpos = xsp; - if (jj_scan_token(101)) - return true; - } - } - return false; - } - - private boolean jj_3R_129(){ - Token xsp; - xsp = jj_scanpos; - if (jj_3R_135()){ - jj_scanpos = xsp; - if (jj_3R_136()) - return true; - } - return false; - } - - private boolean jj_3R_113(){ - if (jj_scan_token(LEFT)) - return true; - return false; - } - - private boolean jj_3R_73(){ - Token xsp; - xsp = jj_scanpos; - if (jj_3R_113()){ - jj_scanpos = xsp; - if (jj_3R_114()){ - jj_scanpos = xsp; - if (jj_3R_115()) - return true; - } - } - return false; - } - - private boolean jj_3R_54(){ - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(25)){ - jj_scanpos = xsp; - if (jj_3R_73()) - return true; - } - return false; - } - - private boolean jj_3R_44(){ - if (jj_scan_token(STRING_LITERAL)) - return true; - return false; - } - - private boolean jj_3R_23(){ - Token xsp; - if (jj_3R_44()) - return true; - while(true){ - xsp = jj_scanpos; - if (jj_3R_44()){ - jj_scanpos = xsp; - break; - } - } - return false; - } - - private boolean jj_3R_116(){ - if (jj_scan_token(LEFT)) - return true; - return false; - } - - private boolean jj_3R_74(){ - Token xsp; - xsp = jj_scanpos; - if (jj_3R_116()){ - jj_scanpos = xsp; - if (jj_3R_117()){ - jj_scanpos = xsp; - if (jj_3R_118()) - return true; - } - } - xsp = jj_scanpos; - if (jj_scan_token(26)) - jj_scanpos = xsp; - return false; - } - - private boolean jj_3_18(){ - if (jj_3R_16()) - return true; - return false; - } - - private boolean jj_3R_55(){ - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(25)){ - jj_scanpos = xsp; - if (jj_3R_74()) - return true; - } - return false; - } - - private boolean jj_3R_35(){ - Token xsp; - xsp = jj_scanpos; - if (jj_3R_55()) - jj_scanpos = xsp; - if (jj_scan_token(JOIN)) - return true; - if (jj_3R_56()) - return true; - return false; - } - - private boolean jj_3R_34(){ - if (jj_scan_token(NATURAL)) - return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_54()) - jj_scanpos = xsp; - if (jj_scan_token(JOIN)) - return true; - return false; - } - - private boolean jj_3R_28(){ - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(36)) - jj_scanpos = xsp; - if (jj_scan_token(BETWEEN)) - return true; - if (jj_3R_51()) - return true; - return false; - } - - private boolean jj_3_15(){ - if (jj_3R_28()) - return true; - return false; - } - - private boolean jj_3R_17(){ - Token xsp; - xsp = jj_scanpos; - if (jj_3R_34()){ - jj_scanpos = xsp; - if (jj_3R_35()) - return true; - } - return false; - } - - private boolean jj_3_17(){ - if (jj_3R_29()) - return true; - Token xsp; - xsp = jj_scanpos; - if (jj_scan_token(36)) - jj_scanpos = xsp; - if (jj_scan_token(LIKE)) - return true; - return false; - } - private boolean jj_3R_76(){ if (jj_scan_token(LEFT_PAR)) return true; @@ -4179,22 +4308,22 @@ public class ADQLParser implements ADQLParserConstants { return false; } - private boolean jj_3_2(){ - if (jj_3R_16()) + private boolean jj_3R_134(){ + if (jj_scan_token(COMMA)) + return true; + if (jj_3R_51()) return true; return false; } - private boolean jj_3R_75(){ - if (jj_3R_79()) + private boolean jj_3_2(){ + if (jj_3R_16()) return true; return false; } - private boolean jj_3R_134(){ - if (jj_scan_token(COMMA)) - return true; - if (jj_3R_51()) + private boolean jj_3R_75(){ + if (jj_3R_79()) return true; return false; } @@ -4230,14 +4359,6 @@ public class ADQLParser implements ADQLParserConstants { return false; } - private boolean jj_3R_60(){ - if (jj_scan_token(DOT)) - return true; - if (jj_3R_79()) - return true; - return false; - } - private boolean jj_3R_120(){ if (jj_3R_51()) return true; @@ -4252,6 +4373,14 @@ public class ADQLParser implements ADQLParserConstants { return false; } + private boolean jj_3R_60(){ + if (jj_scan_token(DOT)) + return true; + if (jj_3R_79()) + return true; + return false; + } + private boolean jj_3R_22(){ if (jj_3R_43()) return true; @@ -4326,13 +4455,13 @@ public class ADQLParser implements ADQLParserConstants { } private boolean jj_3R_30(){ - if (jj_scan_token(REGULAR_IDENTIFIER)) + if (jj_scan_token(REGULAR_IDENTIFIER_CANDIDATE)) return true; return false; } private boolean jj_3R_26(){ - if (jj_scan_token(REGULAR_IDENTIFIER)) + if (jj_scan_token(REGULAR_IDENTIFIER_CANDIDATE)) return true; if (jj_scan_token(LEFT_PAR)) return true; @@ -4403,6 +4532,12 @@ public class ADQLParser implements ADQLParserConstants { return false; } + private boolean jj_3R_58(){ + if (jj_3R_78()) + return true; + return false; + } + private boolean jj_3R_104(){ if (jj_scan_token(COT)) return true; @@ -4415,12 +4550,6 @@ public class ADQLParser implements ADQLParserConstants { return false; } - private boolean jj_3R_58(){ - if (jj_3R_78()) - return true; - return false; - } - private boolean jj_3_13(){ if (jj_3R_26()) return true; @@ -4861,14 +4990,6 @@ public class ADQLParser implements ADQLParserConstants { return false; } - private boolean jj_3R_32(){ - if (jj_3R_14()) - return true; - if (jj_scan_token(DOT)) - return true; - return false; - } - private boolean jj_3_12(){ if (jj_3R_25()) return true; @@ -4886,15 +5007,11 @@ public class ADQLParser implements ADQLParserConstants { return false; } - private boolean jj_3R_15(){ + private boolean jj_3R_32(){ if (jj_3R_14()) return true; if (jj_scan_token(DOT)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_32()) - jj_scanpos = xsp; return false; } @@ -4925,6 +5042,18 @@ public class ADQLParser implements ADQLParserConstants { return false; } + private boolean jj_3R_15(){ + if (jj_3R_14()) + return true; + if (jj_scan_token(DOT)) + return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_32()) + jj_scanpos = xsp; + return false; + } + private boolean jj_3R_77(){ if (jj_scan_token(COORDSYS)) return true; @@ -5027,6 +5156,14 @@ public class ADQLParser implements ADQLParserConstants { return false; } + private boolean jj_3R_20(){ + if (jj_3R_36()) + return true; + if (jj_scan_token(CONCAT)) + return true; + return false; + } + private boolean jj_3_1(){ if (jj_3R_14()) return true; @@ -5041,14 +5178,6 @@ public class ADQLParser implements ADQLParserConstants { return false; } - private boolean jj_3R_20(){ - if (jj_3R_36()) - return true; - if (jj_scan_token(CONCAT)) - return true; - return false; - } - private boolean jj_3R_41(){ if (jj_scan_token(POLYGON)) return true; @@ -5116,7 +5245,7 @@ public class ADQLParser implements ADQLParserConstants { } private boolean jj_3_7(){ - if (jj_scan_token(REGULAR_IDENTIFIER)) + if (jj_scan_token(REGULAR_IDENTIFIER_CANDIDATE)) return true; if (jj_scan_token(LEFT_PAR)) return true; @@ -5389,14 +5518,6 @@ public class ADQLParser implements ADQLParserConstants { return false; } - private boolean jj_3R_16(){ - if (jj_scan_token(LEFT_PAR)) - return true; - if (jj_3R_33()) - return true; - return false; - } - private boolean jj_3R_138(){ if (jj_3R_29()) return true; @@ -5409,6 +5530,14 @@ public class ADQLParser implements ADQLParserConstants { return false; } + private boolean jj_3R_16(){ + if (jj_scan_token(LEFT_PAR)) + return true; + if (jj_3R_33()) + return true; + return false; + } + private boolean jj_3R_121(){ if (jj_3R_23()) return true; @@ -5569,12 +5698,6 @@ public class ADQLParser implements ADQLParserConstants { return false; } - private boolean jj_3R_33(){ - if (jj_3R_53()) - return true; - return false; - } - private boolean jj_3R_107(){ Token xsp; xsp = jj_scanpos; @@ -5596,6 +5719,12 @@ public class ADQLParser implements ADQLParserConstants { return false; } + private boolean jj_3R_33(){ + if (jj_3R_53()) + return true; + return false; + } + private boolean jj_3R_114(){ if (jj_scan_token(RIGHT)) return true; @@ -5705,6 +5834,187 @@ public class ADQLParser implements ADQLParserConstants { return false; } + private boolean jj_3R_128(){ + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(94)){ + jj_scanpos = xsp; + if (jj_scan_token(95)){ + jj_scanpos = xsp; + if (jj_scan_token(96)) + return true; + } + } + return false; + } + + private boolean jj_3R_129(){ + Token xsp; + xsp = jj_scanpos; + if (jj_3R_135()){ + jj_scanpos = xsp; + if (jj_3R_136()) + return true; + } + return false; + } + + private boolean jj_3R_113(){ + if (jj_scan_token(LEFT)) + return true; + return false; + } + + private boolean jj_3R_73(){ + Token xsp; + xsp = jj_scanpos; + if (jj_3R_113()){ + jj_scanpos = xsp; + if (jj_3R_114()){ + jj_scanpos = xsp; + if (jj_3R_115()) + return true; + } + } + return false; + } + + private boolean jj_3R_54(){ + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(25)){ + jj_scanpos = xsp; + if (jj_3R_73()) + return true; + } + return false; + } + + private boolean jj_3R_44(){ + if (jj_scan_token(STRING_LITERAL)) + return true; + return false; + } + + private boolean jj_3R_23(){ + Token xsp; + if (jj_3R_44()) + return true; + while(true){ + xsp = jj_scanpos; + if (jj_3R_44()){ + jj_scanpos = xsp; + break; + } + } + return false; + } + + private boolean jj_3R_116(){ + if (jj_scan_token(LEFT)) + return true; + return false; + } + + private boolean jj_3R_74(){ + Token xsp; + xsp = jj_scanpos; + if (jj_3R_116()){ + jj_scanpos = xsp; + if (jj_3R_117()){ + jj_scanpos = xsp; + if (jj_3R_118()) + return true; + } + } + xsp = jj_scanpos; + if (jj_scan_token(26)) + jj_scanpos = xsp; + return false; + } + + private boolean jj_3_18(){ + if (jj_3R_16()) + return true; + return false; + } + + private boolean jj_3R_55(){ + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(25)){ + jj_scanpos = xsp; + if (jj_3R_74()) + return true; + } + return false; + } + + private boolean jj_3R_35(){ + Token xsp; + xsp = jj_scanpos; + if (jj_3R_55()) + jj_scanpos = xsp; + if (jj_scan_token(JOIN)) + return true; + if (jj_3R_56()) + return true; + return false; + } + + private boolean jj_3R_34(){ + if (jj_scan_token(NATURAL)) + return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_54()) + jj_scanpos = xsp; + if (jj_scan_token(JOIN)) + return true; + return false; + } + + private boolean jj_3R_28(){ + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(36)) + jj_scanpos = xsp; + if (jj_scan_token(BETWEEN)) + return true; + if (jj_3R_51()) + return true; + return false; + } + + private boolean jj_3_15(){ + if (jj_3R_28()) + return true; + return false; + } + + private boolean jj_3R_17(){ + Token xsp; + xsp = jj_scanpos; + if (jj_3R_34()){ + jj_scanpos = xsp; + if (jj_3R_35()) + return true; + } + return false; + } + + private boolean jj_3_17(){ + if (jj_3R_29()) + return true; + Token xsp; + xsp = jj_scanpos; + if (jj_scan_token(36)) + jj_scanpos = xsp; + if (jj_scan_token(LIKE)) + return true; + return false; + } + /** Generated Token Manager. */ public ADQLParserTokenManager token_source; SimpleCharStream jj_input_stream; @@ -5729,19 +6039,19 @@ public class ADQLParser implements ADQLParserConstants { } private static void jj_la1_init_0(){ - jj_la1_0 = new int[]{0x81,0x0,0x0,0x0,0x0,0x100000,0x200000,0x40,0x0,0x0,0x800000,0x800000,0x800,0x608,0x40,0x40,0x40,0x0,0x20,0x20,0x20,0x0,0x0,0x0,0x800000,0x800000,0x800000,0x0,0x8,0x7b000000,0x38000000,0x4000000,0x3a000000,0x3a000000,0x38000000,0x4000000,0x3a000000,0x3a000000,0x40,0x80000000,0x7b000000,0x0,0x0,0x0,0x600,0x600,0x8,0x8,0x0,0x600,0x600,0x1800,0x1800,0x600,0x600,0x8,0x100,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x7e000,0x0,0x0,0x608,0x7e000,0x0,0x0,0x40,0x8,0x100000,0xe08,0x0,0x100000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x0,0x608,0x40,0x40,0x0,0x0,0x40,0x608,}; + jj_la1_0 = new int[]{ 0x81, 0x0, 0x0, 0x0, 0x0, 0x100000, 0x200000, 0x40, 0x0, 0x0, 0x800000, 0x800000, 0x800, 0x608, 0x40, 0x40, 0x40, 0x0, 0x20, 0x20, 0x20, 0x0, 0x0, 0x0, 0x800000, 0x800000, 0x800000, 0x0, 0x8, 0x7b000000, 0x38000000, 0x4000000, 0x3a000000, 0x3a000000, 0x38000000, 0x4000000, 0x3a000000, 0x3a000000, 0x40, 0x80000000, 0x7b000000, 0x0, 0x0, 0x0, 0x600, 0x600, 0x8, 0x8, 0x0, 0x600, 0x600, 0x1800, 0x1800, 0x600, 0x600, 0x8, 0x100, 0x0, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x0, 0x0, 0x7e000, 0x0, 0x0, 0x608, 0x7e000, 0x0, 0x0, 0x40, 0x8, 0x100000, 0xe08, 0x0, 0x100000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x40, 0x0, 0x0, 0x608, 0x40, 0x40, 0x0, 0x0, 0x40, 0x608, }; } private static void jj_la1_init_1(){ - jj_la1_1 = new int[]{0x0,0x2,0x1000,0x2000,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xfffe0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x18000,0x18000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x3e0000,0x3e0000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3e0000,0x0,0x0,0x3e0000,0xfc00000,0x10,0xc,0xc,0x10,0x0,0x10,0x10,0x0,0x210,0x400,0xfffe0000,0x0,0x10,0x10,0x0,0x0,0x0,0xfffe0000,0x1e0000,0x0,0x3e0000,0x30000000,0x2000000,0x2000000,0x2000000,0x2000000,0xf0000000,0x0,0xfc00000,0xf0000000,0xf03e0000,0x0,0x0,0x0,0x0,0x0,0xfffe0000,}; + jj_la1_1 = new int[]{ 0x0, 0x2, 0x1000, 0x2000, 0x4000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfffe0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x18000, 0x18000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3e0000, 0x3e0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3e0000, 0x0, 0x0, 0x3e0000, 0xfc00000, 0x10, 0xc, 0xc, 0x10, 0x0, 0x10, 0x10, 0x0, 0x210, 0x400, 0xfffe0000, 0x0, 0x10, 0x10, 0x0, 0x0, 0x0, 0xfffe0000, 0x1e0000, 0x0, 0x3e0000, 0x30000000, 0x2000000, 0x2000000, 0x2000000, 0x2000000, 0xf0000000, 0x0, 0xfc00000, 0xf0000000, 0xf03e0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfffe0000, }; } private static void jj_la1_init_2(){ - jj_la1_2 = new int[]{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x23ffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x20000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x23ffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x23ffffff,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x5,0x0,0x0,0x3fffffd,0x3fffffd,0x0,0x0,0x3fff8,0x3fc0000,0x0,0x23ffffff,}; + jj_la1_2 = new int[]{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe3ffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20000000, 0xc0000000, 0x80000000, 0x0, 0x0, 0xc0000000, 0xe0000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc0000000, 0x0, 0x2, 0xe0000000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe3ffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xe3ffffff, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x3fffffd, 0xc3fffffd, 0x0, 0x0, 0x3fff8, 0x3fc0000, 0x0, 0xe3ffffff, }; } private static void jj_la1_init_3(){ - jj_la1_3 = new int[]{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3,0x3,0x0,0x3,0x0,0x3b,0x0,0x0,0x0,0x3,0x0,0x0,0x0,0x23,0x0,0x0,0x0,0x3,0x0,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x38,0x30,0x0,0x0,0x3b,0x3b,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x3b,0x0,0x0,0x3b,0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3b,0x0,0x0,0x0,0x0,0x0,0x0,0x3b,0x0,0x0,0x0,0x0,0x3,0x3,0x3,0x3,0x0,0x0,0x0,0x2,0x3b,0x0,0x0,0x0,0x0,0x0,0x3b,}; + jj_la1_3 = new int[]{ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x30, 0x0, 0x30, 0x0, 0x31, 0x0, 0x0, 0x0, 0x30, 0x0, 0x0, 0x0, 0x31, 0x0, 0x0, 0x0, 0x30, 0x0, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x0, 0x31, 0x31, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x31, 0x0, 0x0, 0x31, 0x30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x31, 0x0, 0x0, 0x0, 0x0, 0x30, 0x30, 0x30, 0x30, 0x0, 0x0, 0x0, 0x20, 0x31, 0x0, 0x0, 0x0, 0x0, 0x0, 0x31, }; } final private JJCalls[] jj_2_rtns = new JJCalls[18]; @@ -5870,8 +6180,8 @@ public class ADQLParser implements ADQLParserConstants { throw generateParseException(); } - @SuppressWarnings("serial") - static private final class LookaheadSuccess extends java.lang.Error {} + static private final class LookaheadSuccess extends java.lang.Error { + } final private LookaheadSuccess jj_ls = new LookaheadSuccess(); @@ -5927,7 +6237,7 @@ public class ADQLParser implements ADQLParserConstants { return t; } - private int jj_ntk_f(){ + private int jj_ntk(){ if ((jj_nt = token.next) == null) return (jj_ntk = (token.next = token_source.getNextToken()).kind); else @@ -6137,7 +6447,8 @@ public class ADQLParser implements ADQLParserConstants { } p = p.next; }while(p != null); - }catch(LookaheadSuccess ls){} + }catch(LookaheadSuccess ls){ + } } jj_rescan = false; } diff --git a/src/adql/parser/ADQLParserConstants.java b/src/adql/parser/ADQLParserConstants.java index eb06ae9..7d09b7b 100644 --- a/src/adql/parser/ADQLParserConstants.java +++ b/src/adql/parser/ADQLParserConstants.java @@ -189,19 +189,19 @@ public interface ADQLParserConstants { /** RegularExpression Id. */ int STRING_LITERAL = 93; /** RegularExpression Id. */ - int DELIMITED_IDENTIFIER = 96; + int SCIENTIFIC_NUMBER = 94; /** RegularExpression Id. */ - int REGULAR_IDENTIFIER = 97; + int UNSIGNED_FLOAT = 95; /** RegularExpression Id. */ - int Letter = 98; + int UNSIGNED_INTEGER = 96; /** RegularExpression Id. */ - int SCIENTIFIC_NUMBER = 99; + int DIGIT = 97; /** RegularExpression Id. */ - int UNSIGNED_FLOAT = 100; + int DELIMITED_IDENTIFIER = 100; /** RegularExpression Id. */ - int UNSIGNED_INTEGER = 101; + int REGULAR_IDENTIFIER_CANDIDATE = 101; /** RegularExpression Id. */ - int DIGIT = 102; + int Letter = 102; /** Lexical state. */ int DEFAULT = 0; @@ -306,15 +306,15 @@ public interface ADQLParserConstants { "\"\\\'\"", "<token of kind 92>", "\"\\\'\"", - "\"\\\"\"", - "<token of kind 95>", - "\"\\\"\"", - "<REGULAR_IDENTIFIER>", - "<Letter>", "<SCIENTIFIC_NUMBER>", "<UNSIGNED_FLOAT>", "<UNSIGNED_INTEGER>", "<DIGIT>", + "\"\\\"\"", + "<token of kind 99>", + "\"\\\"\"", + "<REGULAR_IDENTIFIER_CANDIDATE>", + "<Letter>", }; } diff --git a/src/adql/parser/ADQLParserTokenManager.java b/src/adql/parser/ADQLParserTokenManager.java index 954646c..7f47aa7 100644 --- a/src/adql/parser/ADQLParserTokenManager.java +++ b/src/adql/parser/ADQLParserTokenManager.java @@ -1,4 +1,3 @@ -/* ADQLParserTokenManager.java */ /* Generated By:JavaCC: Do not edit this line. ADQLParserTokenManager.java */ package adql.parser; import java.util.Stack; @@ -21,20 +20,23 @@ import adql.translator.PostgreSQLTranslator; import adql.translator.TranslationException; /** Token Manager. */ -@SuppressWarnings("unused")public class ADQLParserTokenManager implements ADQLParserConstants { +public class ADQLParserTokenManager implements ADQLParserConstants +{ /** Debug output. */ public java.io.PrintStream debugStream = System.out; /** Set debug output. */ public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; } -private final int jjStopStringLiteralDfa_2(int pos, long active0, long active1){ +private final int jjStopStringLiteralDfa_2(int pos, long active0, long active1) +{ switch (pos) { default : return -1; } } -private final int jjStartNfa_2(int pos, long active0, long active1){ +private final int jjStartNfa_2(int pos, long active0, long active1) +{ return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0, active1), pos + 1); } private int jjStopAtPos(int pos, int kind) @@ -43,11 +45,12 @@ private int jjStopAtPos(int pos, int kind) jjmatchedPos = pos; return pos + 1; } -private int jjMoveStringLiteralDfa0_2(){ +private int jjMoveStringLiteralDfa0_2() +{ switch(curChar) { case 34: - return jjStartNfaWithStates_2(0, 96, 1); + return jjStartNfaWithStates_2(0, 100, 1); default : return jjMoveNfa_2(0, 0); } @@ -84,15 +87,15 @@ private int jjMoveNfa_2(int startState, int curPos) case 0: if ((0xfffffffbffffffffL & l) != 0L) { - if (kind > 95) - kind = 95; + if (kind > 99) + kind = 99; } else if (curChar == 34) jjstateSet[jjnewStateCnt++] = 1; break; case 1: - if (curChar == 34 && kind > 95) - kind = 95; + if (curChar == 34 && kind > 99) + kind = 99; break; case 2: if (curChar == 34) @@ -110,7 +113,7 @@ private int jjMoveNfa_2(int startState, int curPos) switch(jjstateSet[--i]) { case 0: - kind = 95; + kind = 99; break; default : break; } @@ -125,8 +128,8 @@ private int jjMoveNfa_2(int startState, int curPos) switch(jjstateSet[--i]) { case 0: - if ((jjbitVec0[i2] & l2) != 0L && kind > 95) - kind = 95; + if ((jjbitVec0[i2] & l2) != 0L && kind > 99) + kind = 99; break; default : break; } @@ -145,449 +148,450 @@ private int jjMoveNfa_2(int startState, int curPos) catch(java.io.IOException e) { return curPos; } } } -private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){ +private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1) +{ switch (pos) { case 0: - if ((active0 & 0x40000000L) != 0L) - { - jjmatchedKind = 97; - return 962; - } if ((active0 & 0x600000000000000L) != 0L || (active1 & 0x1800L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; return 491; } - if ((active0 & 0x20400000L) != 0L || (active1 & 0x80L) != 0L) + if ((active0 & 0x10010000000L) != 0L || (active1 & 0x300L) != 0L) { - jjmatchedKind = 97; - return 295; + jjmatchedKind = 101; + return 404; } - if ((active0 & 0x2000022002000000L) != 0L) + if ((active0 & 0x200000L) != 0L || (active1 & 0x2020000L) != 0L) { - jjmatchedKind = 97; - return 332; + jjmatchedKind = 101; + return 670; } - if ((active0 & 0x10000000080000L) != 0L || (active1 & 0x1010000L) != 0L) + if ((active0 & 0x5001000000L) != 0L) { - jjmatchedKind = 97; - return 590; + jjmatchedKind = 101; + return 439; } - if ((active0 & 0x4002800400800000L) != 0L || (active1 & 0x3c0008L) != 0L) + if ((active0 & 0x2000022002000000L) != 0L) { - jjmatchedKind = 97; - return 910; + jjmatchedKind = 101; + return 332; } - if ((active0 & 0x200000000L) != 0L) + if ((active0 & 0x4002800400800000L) != 0L || (active1 & 0x3c0008L) != 0L) { - jjmatchedKind = 97; - return 797; + jjmatchedKind = 101; + return 910; } - if ((active0 & 0xc000000000000L) != 0L || (active1 & 0x400L) != 0L) + if ((active0 & 0x40000000L) != 0L) { - jjmatchedKind = 97; - return 424; + jjmatchedKind = 101; + return 965; } - if ((active0 & 0x5001000000L) != 0L) + if ((active0 & 0x20L) != 0L) + return 966; + if ((active0 & 0x100000000L) != 0L) { - jjmatchedKind = 97; - return 439; + jjmatchedKind = 101; + return 752; } if ((active0 & 0x1000000000000L) != 0L || (active1 & 0x24L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; return 813; } - if ((active0 & 0x40000000000L) != 0L || (active1 & 0x40L) != 0L) - { - jjmatchedKind = 97; - return 249; - } - if ((active0 & 0x10010000000L) != 0L || (active1 & 0x300L) != 0L) - { - jjmatchedKind = 97; - return 404; - } - if ((active0 & 0x20L) != 0L) - return 963; - if ((active0 & 0x100000000L) != 0L) + if ((active0 & 0x100000000000L) != 0L) { - jjmatchedKind = 97; - return 752; + jjmatchedKind = 101; + return 315; } if ((active0 & 0x18000L) != 0L) return 17; - if ((active0 & 0x800000008000000L) != 0L || (active1 & 0xe000L) != 0L) - { - jjmatchedKind = 97; - return 550; - } if ((active0 & 0x400L) != 0L) return 22; - if ((active0 & 0x200000000000L) != 0L) + if ((active0 & 0x40088000000000L) != 0L) { - jjmatchedKind = 97; - return 5; + jjmatchedKind = 101; + return 33; + } + if ((active0 & 0x20400000L) != 0L || (active1 & 0x80L) != 0L) + { + jjmatchedKind = 101; + return 295; + } + if ((active0 & 0xc000000000000L) != 0L || (active1 & 0x400L) != 0L) + { + jjmatchedKind = 101; + return 424; } if ((active0 & 0x91a0000000000000L) != 0L || (active1 & 0xc00013L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; return 52; } - if ((active0 & 0x40088000000000L) != 0L) + if ((active0 & 0x800000008000000L) != 0L || (active1 & 0xe000L) != 0L) { - jjmatchedKind = 97; - return 33; + jjmatchedKind = 101; + return 550; } - if ((active0 & 0x100000000000L) != 0L) + if ((active0 & 0x10000000080000L) != 0L || (active1 & 0x1010000L) != 0L) { - jjmatchedKind = 97; - return 315; + jjmatchedKind = 101; + return 590; + } + if ((active0 & 0x40000000000L) != 0L || (active1 & 0x40L) != 0L) + { + jjmatchedKind = 101; + return 249; + } + if ((active0 & 0x200000000L) != 0L) + { + jjmatchedKind = 101; + return 797; } if ((active0 & 0x400884000000L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; return 471; } - if ((active0 & 0x200000L) != 0L || (active1 & 0x2020000L) != 0L) + if ((active0 & 0x200000000000L) != 0L) { - jjmatchedKind = 97; - return 670; + jjmatchedKind = 101; + return 5; } return -1; case 1: if ((active0 & 0x2000020002000000L) != 0L) return 345; - if ((active1 & 0x4L) != 0L) + if ((active0 & 0x40000000000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 877; + return 45; } - if ((active0 & 0x800000000000000L) != 0L) + if ((active1 & 0x40000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 549; + return 913; } if ((active1 & 0x2000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } return 669; } - if ((active1 & 0x40000L) != 0L) + if ((active0 & 0x8000000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 913; + return 32; } - if ((active0 & 0x4000000000000000L) != 0L) + if ((active0 & 0x1000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 964; + return 438; } if ((active0 & 0x10000000000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } return 656; } - if ((active0 & 0x9020000000000000L) != 0L || (active1 & 0xc00003L) != 0L) + if ((active0 & 0x100000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 113; + return 770; } - if ((active0 & 0x1000000L) != 0L) + if ((active0 & 0x800000000000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 438; + return 549; } - if ((active1 & 0x20000L) != 0L) + if ((active0 & 0x2000000000L) != 0L) + return 396; + if ((active1 & 0x400L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 717; + return 431; } - if ((active0 & 0x2000000000L) != 0L) - return 396; - if ((active0 & 0x40000000000L) != 0L || (active1 & 0x40L) != 0L) + if ((active1 & 0x10000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 264; + return 637; } - if ((active0 & 0x100000000L) != 0L) + if ((active0 & 0x4000000000000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 770; + return 967; } if ((active0 & 0x4000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } return 482; } - if ((active0 & 0x600000000000000L) != 0L || (active1 & 0x1000L) != 0L) + if ((active0 & 0x400000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 501; + return 968; } - if ((active1 & 0x400L) != 0L) + if ((active1 & 0x300L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 431; + return 416; } - if ((active0 & 0x8000000000000L) != 0L) + if ((active0 & 0x600000000000000L) != 0L || (active1 & 0x1000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 427; + return 501; } if ((active1 & 0x8L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } return 909; } - if ((active1 & 0x300L) != 0L) + if ((active0 & 0x200000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 416; + return 796; } - if ((active1 & 0x10000L) != 0L) + if ((active0 & 0x8000000000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 637; + return 427; } - if ((active1 & 0x80L) != 0L) + if ((active0 & 0x182210068400000L) != 0L || (active1 & 0x6010L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 303; + return 965; } - if ((active0 & 0x40000000000000L) != 0L) + if ((active0 & 0x10000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 45; + return 410; } - if ((active0 & 0x480800000000L) != 0L || (active1 & 0x800L) != 0L) - return 962; - if ((active0 & 0x200000000L) != 0L) + if ((active0 & 0x1000000000000L) != 0L || (active1 & 0x20L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 796; + return 821; } - if ((active0 & 0x4000000000000L) != 0L) + if ((active1 & 0x4L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 423; + return 877; } - if ((active0 & 0x80000000L) != 0L) - return 472; - if ((active0 & 0x10000000L) != 0L) + if ((active0 & 0x480800000000L) != 0L || (active1 & 0x800L) != 0L) + return 965; + if ((active1 & 0x20000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 410; + return 717; } - if ((active0 & 0x1000000000000L) != 0L || (active1 & 0x20L) != 0L) + if ((active1 & 0x80L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 821; + return 303; } - if ((active0 & 0x1000200000L) != 0L || (active1 & 0x300000L) != 0L) + if ((active0 & 0x40000000000L) != 0L || (active1 & 0x40L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 2; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 962; + return 264; } - if ((active0 & 0x100000000000L) != 0L) + if ((active1 & 0x8000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 324; + return 581; } - if ((active0 & 0x8000000000L) != 0L) + if ((active0 & 0x80000000L) != 0L) + return 472; + if ((active0 & 0x4000000000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 32; + return 423; } - if ((active1 & 0x1000000L) != 0L) + if ((active0 & 0x1000200000L) != 0L || (active1 & 0x300000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 2; jjmatchedPos = 1; } - return 620; + return 965; } - if ((active1 & 0x8000L) != 0L) + if ((active0 & 0x4000000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 581; + return 454; } - if ((active0 & 0x800000800000L) != 0L || (active1 & 0x80000L) != 0L) - return 932; - if ((active0 & 0x182210068400000L) != 0L || (active1 & 0x6010L) != 0L) + if ((active0 & 0x100000000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 962; + return 324; } - if ((active0 & 0x400000000L) != 0L) + if ((active0 & 0x800000800000L) != 0L || (active1 & 0x80000L) != 0L) + return 932; + if ((active1 & 0x1000000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 965; + return 620; } if ((active0 & 0x80000L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } return 597; } - if ((active0 & 0x4000000000L) != 0L) + if ((active0 & 0x9020000000000000L) != 0L || (active1 & 0xc00003L) != 0L) { if (jjmatchedPos != 1) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 1; } - return 454; + return 113; } return -1; case 2: - if ((active1 & 0x80L) != 0L) + if ((active0 & 0x56801400200000L) != 0L || (active1 & 0x3c00340L) != 0L) + return 965; + if ((active0 & 0x8fa075817a480000L) != 0L || (active1 & 0x3df033L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 2; } - return 302; + return 965; } - if ((active0 & 0x56801400200000L) != 0L || (active1 & 0x3c00340L) != 0L) - return 962; - if ((active0 & 0x8000000000000L) != 0L) - return 426; - if ((active1 & 0x20000L) != 0L) + if ((active0 & 0x1000000000000L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 2; } - return 964; + return 859; } + if ((active0 & 0x8000000000000L) != 0L) + return 426; if ((active0 & 0x2000000000000000L) != 0L) { if (jjmatchedPos != 2) @@ -601,223 +605,225 @@ private final int jjStopStringLiteralDfa_0(int pos, long active0, long active1){ { if (jjmatchedPos != 2) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 2; } return 453; } + if ((active1 & 0x4L) != 0L) + { + if (jjmatchedPos != 2) + { + jjmatchedKind = 101; + jjmatchedPos = 2; + } + return 884; + } if ((active1 & 0x400L) != 0L) return 430; - if ((active0 & 0x1000000000000L) != 0L) + if ((active1 & 0x8L) != 0L) + return 908; + if ((active0 & 0x200000000L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 2; } - return 859; + return 801; } if ((active0 & 0x4000000L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 2; } return 481; } - if ((active1 & 0x8L) != 0L) - return 908; - if ((active0 & 0x1000000000000000L) != 0L) + if ((active1 & 0x20000L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 2; } - return 137; + return 967; } - if ((active0 & 0x1000000L) != 0L) + if ((active0 & 0x4000000000000000L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 97; + jjmatchedKind = 2; jjmatchedPos = 2; } - return 443; + return 965; } - if ((active1 & 0x4L) != 0L) - { - if (jjmatchedPos != 2) - { - jjmatchedKind = 97; - jjmatchedPos = 2; - } - return 884; - } - if ((active0 & 0x4000000000000000L) != 0L) + if ((active0 & 0x1000000L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 2; + jjmatchedKind = 101; jjmatchedPos = 2; } - return 962; + return 443; } - if ((active0 & 0x8fa075817a480000L) != 0L || (active1 & 0x3df033L) != 0L) + if ((active0 & 0x1000000000000000L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 2; } - return 962; + return 137; } - if ((active0 & 0x200000000L) != 0L) + if ((active1 & 0x80L) != 0L) { if (jjmatchedPos != 2) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 2; } - return 801; + return 302; } return -1; case 3: - if ((active0 & 0x2000000000000000L) != 0L) + if ((active1 & 0x4L) != 0L) { if (jjmatchedPos != 3) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 3; } - return 372; + return 900; } - if ((active1 & 0x4L) != 0L) + if ((active0 & 0x8fa074830f080000L) != 0L || (active1 & 0x2b0b3L) != 0L) { if (jjmatchedPos != 3) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 3; } - return 900; + return 965; } - if ((active1 & 0x200L) != 0L) + if ((active0 & 0x1000000000000000L) != 0L) { if (jjmatchedPos != 3) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 3; } - return 28; + return 168; } if ((active0 & 0x4000000000L) != 0L) return 452; - if ((active0 & 0x1000000000000000L) != 0L) + if ((active0 & 0x2000000000000000L) != 0L) { if (jjmatchedPos != 3) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 3; } - return 168; + return 372; } - if ((active0 & 0x8fa074830f080000L) != 0L || (active1 & 0x2b0b3L) != 0L) + if ((active0 & 0x4000010070400000L) != 0L || (active1 & 0x3d4000L) != 0L) + return 965; + if ((active1 & 0x200L) != 0L) { if (jjmatchedPos != 3) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 3; } - return 962; + return 28; } - if ((active0 & 0x4000010070400000L) != 0L || (active1 & 0x3d4000L) != 0L) - return 962; if ((active0 & 0x1000000000000L) != 0L) return 858; return -1; case 4: - if ((active1 & 0x200200L) != 0L) - return 28; if ((active0 & 0x9d80248001080000L) != 0L || (active1 & 0x22037L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 4; - return 962; + return 965; } + if ((active1 & 0x200200L) != 0L) + return 28; if ((active0 & 0x2000000000000000L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 4; return 378; } if ((active0 & 0x22050030e000000L) != 0L || (active1 & 0x9080L) != 0L) - return 962; + return 965; return -1; case 5: - if ((active0 & 0x1480008001000000L) != 0L || (active1 & 0x22036L) != 0L) - { - jjmatchedKind = 97; - jjmatchedPos = 5; - return 962; - } if ((active0 & 0x8000000000000000L) != 0L || (active1 & 0x1L) != 0L) return 28; if ((active0 & 0x2000000000000000L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 5; return 377; } if ((active0 & 0x900240000080000L) != 0L) - return 962; + return 965; + if ((active0 & 0x1480008001000000L) != 0L || (active1 & 0x22036L) != 0L) + { + jjmatchedKind = 101; + jjmatchedPos = 5; + return 965; + } return -1; case 6: if ((active0 & 0x2000000000000000L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 6; return 376; } if ((active0 & 0x1080000000000000L) != 0L || (active1 & 0x20006L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 6; - return 962; + return 965; } if ((active0 & 0x400008001000000L) != 0L || (active1 & 0x2030L) != 0L) - return 962; + return 965; return -1; case 7: + if ((active0 & 0x1080000000000000L) != 0L || (active1 & 0x20006L) != 0L) + return 965; if ((active0 & 0x2000000000000000L) != 0L) { - jjmatchedKind = 97; + jjmatchedKind = 101; jjmatchedPos = 7; - return 966; + return 969; } - if ((active0 & 0x1080000000000000L) != 0L || (active1 & 0x20006L) != 0L) - return 962; return -1; case 8: if ((active0 & 0x2000000000000000L) != 0L) { jjmatchedKind = 2; jjmatchedPos = 8; - return 962; + return 965; } return -1; default : return -1; } } -private final int jjStartNfa_0(int pos, long active0, long active1){ +private final int jjStartNfa_0(int pos, long active0, long active1) +{ return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0, active1), pos + 1); } -private int jjMoveStringLiteralDfa0_0(){ +private int jjMoveStringLiteralDfa0_0() +{ switch(curChar) { case 34: - return jjStopAtPos(0, 94); + return jjStopAtPos(0, 98); case 39: return jjStopAtPos(0, 91); case 40: @@ -833,7 +839,7 @@ private int jjMoveStringLiteralDfa0_0(){ case 45: return jjStartNfaWithStates_0(0, 10, 22); case 46: - return jjStartNfaWithStates_0(0, 5, 963); + return jjStartNfaWithStates_0(0, 5, 966); case 47: return jjStopAtPos(0, 12); case 59: @@ -912,7 +918,8 @@ private int jjMoveStringLiteralDfa0_0(){ return jjMoveNfa_0(0, 0); } } -private int jjMoveStringLiteralDfa1_0(long active0, long active1){ +private int jjMoveStringLiteralDfa1_0(long active0, long active1) +{ try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { jjStopStringLiteralDfa_0(0, active0, active1); @@ -944,7 +951,7 @@ private int jjMoveStringLiteralDfa1_0(long active0, long active1){ case 73: case 105: if ((active1 & 0x800L) != 0L) - return jjStartNfaWithStates_0(1, 75, 962); + return jjStartNfaWithStates_0(1, 75, 965); return jjMoveStringLiteralDfa2_0(active0, 0x108010008000000L, active1, 0x1000004L); case 76: case 108: @@ -998,7 +1005,7 @@ private int jjMoveStringLiteralDfa1_0(long active0, long active1){ case 89: case 121: if ((active0 & 0x80000000000L) != 0L) - return jjStartNfaWithStates_0(1, 43, 962); + return jjStartNfaWithStates_0(1, 43, 965); break; case 124: if ((active0 & 0x100L) != 0L) @@ -1009,7 +1016,8 @@ private int jjMoveStringLiteralDfa1_0(long active0, long active1){ } return jjStartNfa_0(0, active0, active1); } -private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long active1){ +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(); } @@ -1025,12 +1033,12 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a case 67: case 99: if ((active0 & 0x800000000000L) != 0L) - return jjStartNfaWithStates_0(2, 47, 962); + return jjStartNfaWithStates_0(2, 47, 965); break; case 68: case 100: if ((active0 & 0x400000000L) != 0L) - return jjStartNfaWithStates_0(2, 34, 962); + return jjStartNfaWithStates_0(2, 34, 965); else if ((active1 & 0x400L) != 0L) return jjStartNfaWithStates_0(2, 74, 430); return jjMoveStringLiteralDfa3_0(active0, 0x400000000000L, active1, 0x2000L); @@ -1043,7 +1051,7 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a case 71: case 103: if ((active0 & 0x2000000000000L) != 0L) - return jjStartNfaWithStates_0(2, 49, 962); + return jjStartNfaWithStates_0(2, 49, 965); else if ((active1 & 0x100L) != 0L) { jjmatchedKind = 72; @@ -1062,16 +1070,16 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a case 77: case 109: if ((active0 & 0x10000000000000L) != 0L) - return jjStartNfaWithStates_0(2, 52, 962); + return jjStartNfaWithStates_0(2, 52, 965); break; case 78: case 110: if ((active0 & 0x8000000000000L) != 0L) return jjStartNfaWithStates_0(2, 51, 426); else if ((active1 & 0x1000000L) != 0L) - return jjStartNfaWithStates_0(2, 88, 962); + return jjStartNfaWithStates_0(2, 88, 965); else if ((active1 & 0x2000000L) != 0L) - return jjStartNfaWithStates_0(2, 89, 962); + return jjStartNfaWithStates_0(2, 89, 965); return jjMoveStringLiteralDfa3_0(active0, 0x1080000002000000L, active1, 0x4000L); case 79: case 111: @@ -1079,9 +1087,9 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a case 80: case 112: if ((active0 & 0x200000L) != 0L) - return jjStartNfaWithStates_0(2, 21, 962); + return jjStartNfaWithStates_0(2, 21, 965); else if ((active1 & 0x40L) != 0L) - return jjStartNfaWithStates_0(2, 70, 962); + return jjStartNfaWithStates_0(2, 70, 965); break; case 82: case 114: @@ -1091,14 +1099,14 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a if ((active1 & 0x8L) != 0L) return jjStartNfaWithStates_0(2, 67, 908); else if ((active1 & 0x400000L) != 0L) - return jjStartNfaWithStates_0(2, 86, 962); + return jjStartNfaWithStates_0(2, 86, 965); return jjMoveStringLiteralDfa3_0(active0, 0x1000000000000L, active1, 0x4L); case 84: case 116: if ((active0 & 0x1000000000L) != 0L) - return jjStartNfaWithStates_0(2, 36, 962); + return jjStartNfaWithStates_0(2, 36, 965); else if ((active1 & 0x800000L) != 0L) - return jjStartNfaWithStates_0(2, 87, 962); + return jjStartNfaWithStates_0(2, 87, 965); return jjMoveStringLiteralDfa3_0(active0, 0x2000008005000000L, active1, 0L); case 85: case 117: @@ -1112,16 +1120,17 @@ private int jjMoveStringLiteralDfa2_0(long old0, long active0, long old1, long a case 88: case 120: if ((active0 & 0x4000000000000L) != 0L) - return jjStartNfaWithStates_0(2, 50, 962); + return jjStartNfaWithStates_0(2, 50, 965); else if ((active0 & 0x40000000000000L) != 0L) - return jjStartNfaWithStates_0(2, 54, 962); + return jjStartNfaWithStates_0(2, 54, 965); break; default : break; } return jjStartNfa_0(1, active0, active1); } -private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1){ +private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long active1) +{ if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(1, old0, old1); try { curChar = input_stream.readChar(); } @@ -1136,7 +1145,7 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a case 65: case 97: if ((active0 & 0x4000000000000000L) != 0L) - return jjStartNfaWithStates_0(3, 62, 962); + return jjStartNfaWithStates_0(3, 62, 965); break; case 67: case 99: @@ -1146,12 +1155,12 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a case 68: case 100: if ((active1 & 0x4000L) != 0L) - return jjStartNfaWithStates_0(3, 78, 962); + return jjStartNfaWithStates_0(3, 78, 965); break; case 69: case 101: if ((active0 & 0x10000000000L) != 0L) - return jjStartNfaWithStates_0(3, 40, 962); + return jjStartNfaWithStates_0(3, 40, 965); return jjMoveStringLiteralDfa4_0(active0, 0x2000400006080000L, active1, 0x1000L); case 72: case 104: @@ -1162,21 +1171,21 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a case 76: case 108: if ((active0 & 0x20000000L) != 0L) - return jjStartNfaWithStates_0(3, 29, 962); + return jjStartNfaWithStates_0(3, 29, 965); else if ((active0 & 0x4000000000L) != 0L) return jjStartNfaWithStates_0(3, 38, 452); return jjMoveStringLiteralDfa4_0(active0, 0L, active1, 0x10L); case 77: case 109: if ((active0 & 0x400000L) != 0L) - return jjStartNfaWithStates_0(3, 22, 962); + return jjStartNfaWithStates_0(3, 22, 965); break; case 78: case 110: if ((active0 & 0x40000000L) != 0L) - return jjStartNfaWithStates_0(3, 30, 962); + return jjStartNfaWithStates_0(3, 30, 965); else if ((active1 & 0x80000L) != 0L) - return jjStartNfaWithStates_0(3, 83, 962); + return jjStartNfaWithStates_0(3, 83, 965); else if ((active1 & 0x100000L) != 0L) { jjmatchedKind = 84; @@ -1192,14 +1201,14 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a case 83: case 115: if ((active1 & 0x40000L) != 0L) - return jjStartNfaWithStates_0(3, 82, 962); + return jjStartNfaWithStates_0(3, 82, 965); return jjMoveStringLiteralDfa4_0(active0, 0x40000000000L, active1, 0L); case 84: case 116: if ((active0 & 0x10000000L) != 0L) - return jjStartNfaWithStates_0(3, 28, 962); + return jjStartNfaWithStates_0(3, 28, 965); else if ((active1 & 0x10000L) != 0L) - return jjStartNfaWithStates_0(3, 80, 962); + return jjStartNfaWithStates_0(3, 80, 965); return jjMoveStringLiteralDfa4_0(active0, 0x1080000000000000L, active1, 0x4L); case 85: case 117: @@ -1215,7 +1224,8 @@ private int jjMoveStringLiteralDfa3_0(long old0, long active0, long old1, long a } return jjStartNfa_0(2, active0, active1); } -private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1){ +private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long active1) +{ if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(2, old0, old1); try { curChar = input_stream.readChar(); } @@ -1242,17 +1252,17 @@ private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long a case 68: case 100: if ((active1 & 0x8000L) != 0L) - return jjStartNfaWithStates_0(4, 79, 962); + return jjStartNfaWithStates_0(4, 79, 965); return jjMoveStringLiteralDfa5_0(active0, 0x8000000000000000L, active1, 0x3L); case 69: case 101: if ((active0 & 0x200000000L) != 0L) - return jjStartNfaWithStates_0(4, 33, 962); + return jjStartNfaWithStates_0(4, 33, 965); return jjMoveStringLiteralDfa5_0(active0, 0x8000000000L, active1, 0x20L); case 71: case 103: if ((active0 & 0x100000000L) != 0L) - return jjStartNfaWithStates_0(4, 32, 962); + return jjStartNfaWithStates_0(4, 32, 965); return jjMoveStringLiteralDfa5_0(active0, 0x400000000000000L, active1, 0L); case 73: case 105: @@ -1269,36 +1279,37 @@ private int jjMoveStringLiteralDfa4_0(long old0, long active0, long old1, long a case 80: case 112: if ((active0 & 0x100000000000L) != 0L) - return jjStartNfaWithStates_0(4, 44, 962); + return jjStartNfaWithStates_0(4, 44, 965); break; case 82: case 114: if ((active0 & 0x2000000L) != 0L) - return jjStartNfaWithStates_0(4, 25, 962); + return jjStartNfaWithStates_0(4, 25, 965); else if ((active0 & 0x4000000L) != 0L) - return jjStartNfaWithStates_0(4, 26, 962); + return jjStartNfaWithStates_0(4, 26, 965); else if ((active0 & 0x400000000000L) != 0L) - return jjStartNfaWithStates_0(4, 46, 962); + return jjStartNfaWithStates_0(4, 46, 965); else if ((active1 & 0x80L) != 0L) - return jjStartNfaWithStates_0(4, 71, 962); + return jjStartNfaWithStates_0(4, 71, 965); else if ((active1 & 0x1000L) != 0L) - return jjStartNfaWithStates_0(4, 76, 962); + return jjStartNfaWithStates_0(4, 76, 965); return jjMoveStringLiteralDfa5_0(active0, 0x2080000001000000L, active1, 0L); case 84: case 116: if ((active0 & 0x8000000L) != 0L) - return jjStartNfaWithStates_0(4, 27, 962); + return jjStartNfaWithStates_0(4, 27, 965); else if ((active0 & 0x20000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 53, 962); + return jjStartNfaWithStates_0(4, 53, 965); else if ((active0 & 0x200000000000000L) != 0L) - return jjStartNfaWithStates_0(4, 57, 962); + return jjStartNfaWithStates_0(4, 57, 965); return jjMoveStringLiteralDfa5_0(active0, 0x40000000000L, active1, 0L); default : break; } return jjStartNfa_0(3, active0, active1); } -private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1){ +private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long active1) +{ if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(3, old0, old1); try { curChar = input_stream.readChar(); } @@ -1322,12 +1333,12 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long a case 69: case 101: if ((active0 & 0x100000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 56, 962); + return jjStartNfaWithStates_0(5, 56, 965); return jjMoveStringLiteralDfa6_0(active0, 0x8000000000L, active1, 0x20L); case 71: case 103: if ((active0 & 0x200000000000L) != 0L) - return jjStartNfaWithStates_0(5, 45, 962); + return jjStartNfaWithStates_0(5, 45, 965); break; case 73: case 105: @@ -1335,7 +1346,7 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long a case 78: case 110: if ((active0 & 0x800000000000000L) != 0L) - return jjStartNfaWithStates_0(5, 59, 962); + return jjStartNfaWithStates_0(5, 59, 965); return jjMoveStringLiteralDfa6_0(active0, 0L, active1, 0x2014L); case 79: case 111: @@ -1343,19 +1354,20 @@ private int jjMoveStringLiteralDfa5_0(long old0, long active0, long old1, long a case 83: case 115: if ((active0 & 0x40000000000L) != 0L) - return jjStartNfaWithStates_0(5, 42, 962); + return jjStartNfaWithStates_0(5, 42, 965); return jjMoveStringLiteralDfa6_0(active0, 0x2000000000000000L, active1, 0x2L); case 84: case 116: if ((active0 & 0x80000L) != 0L) - return jjStartNfaWithStates_0(5, 19, 962); + return jjStartNfaWithStates_0(5, 19, 965); break; default : break; } return jjStartNfa_0(4, active0, active1); } -private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1){ +private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long active1) +{ if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(4, old0, old1); try { curChar = input_stream.readChar(); } @@ -1374,7 +1386,7 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long a case 71: case 103: if ((active1 & 0x10L) != 0L) - return jjStartNfaWithStates_0(6, 68, 962); + return jjStartNfaWithStates_0(6, 68, 965); break; case 73: case 105: @@ -1382,21 +1394,21 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long a case 76: case 108: if ((active0 & 0x1000000L) != 0L) - return jjStartNfaWithStates_0(6, 24, 962); + return jjStartNfaWithStates_0(6, 24, 965); break; case 78: case 110: if ((active0 & 0x8000000000L) != 0L) - return jjStartNfaWithStates_0(6, 39, 962); + return jjStartNfaWithStates_0(6, 39, 965); else if ((active0 & 0x400000000000000L) != 0L) - return jjStartNfaWithStates_0(6, 58, 962); + return jjStartNfaWithStates_0(6, 58, 965); return jjMoveStringLiteralDfa7_0(active0, 0x1000000000000000L, active1, 0L); case 83: case 115: if ((active1 & 0x20L) != 0L) - return jjStartNfaWithStates_0(6, 69, 962); + return jjStartNfaWithStates_0(6, 69, 965); else if ((active1 & 0x2000L) != 0L) - return jjStartNfaWithStates_0(6, 77, 962); + return jjStartNfaWithStates_0(6, 77, 965); break; case 84: case 116: @@ -1409,7 +1421,8 @@ private int jjMoveStringLiteralDfa6_0(long old0, long active0, long old1, long a } return jjStartNfa_0(5, active0, active1); } -private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1){ +private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long active1) +{ if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(5, old0, old1); try { curChar = input_stream.readChar(); } @@ -1425,28 +1438,29 @@ private int jjMoveStringLiteralDfa7_0(long old0, long active0, long old1, long a case 68: case 100: if ((active0 & 0x80000000000000L) != 0L) - return jjStartNfaWithStates_0(7, 55, 962); + return jjStartNfaWithStates_0(7, 55, 965); break; case 69: case 101: if ((active1 & 0x4L) != 0L) - return jjStartNfaWithStates_0(7, 66, 962); + return jjStartNfaWithStates_0(7, 66, 965); else if ((active1 & 0x20000L) != 0L) - return jjStartNfaWithStates_0(7, 81, 962); + return jjStartNfaWithStates_0(7, 81, 965); break; case 83: case 115: if ((active0 & 0x1000000000000000L) != 0L) - return jjStartNfaWithStates_0(7, 60, 962); + return jjStartNfaWithStates_0(7, 60, 965); else if ((active1 & 0x2L) != 0L) - return jjStartNfaWithStates_0(7, 65, 962); + return jjStartNfaWithStates_0(7, 65, 965); break; default : break; } return jjStartNfa_0(6, active0, active1); } -private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1){ +private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long active1) +{ if (((active0 &= old0) | (active1 &= old1)) == 0L) return jjStartNfa_0(6, old0, old1); try { curChar = input_stream.readChar(); } @@ -1464,7 +1478,8 @@ private int jjMoveStringLiteralDfa8_0(long old0, long active0, long old1, long a } return jjStartNfa_0(7, active0, 0L); } -private int jjMoveStringLiteralDfa9_0(long old0, long active0){ +private int jjMoveStringLiteralDfa9_0(long old0, long active0) +{ if (((active0 &= old0)) == 0L) return jjStartNfa_0(7, old0, 0L); try { curChar = input_stream.readChar(); } @@ -1477,7 +1492,7 @@ private int jjMoveStringLiteralDfa9_0(long old0, long active0){ case 83: case 115: if ((active0 & 0x2000000000000000L) != 0L) - return jjStartNfaWithStates_0(9, 61, 962); + return jjStartNfaWithStates_0(9, 61, 965); break; default : break; @@ -1495,7 +1510,7 @@ private int jjStartNfaWithStates_0(int pos, int kind, int state) private int jjMoveNfa_0(int startState, int curPos) { int startsAt = 0; - jjnewStateCnt = 962; + jjnewStateCnt = 965; int i = 1; jjstateSet[0] = startState; int kind = 0x7fffffff; @@ -1511,570 +1526,1107 @@ private int jjMoveNfa_0(int startState, int curPos) switch(jjstateSet[--i]) { case 590: - case 28: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 620: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 656: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 373: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 376: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; - case 963: + case 966: if ((0x3ff000000000000L & l) != 0L) { - if (kind > 100) - kind = 100; - { jjCheckNAdd(952); } + if (kind > 95) + kind = 95; + jjCheckNAdd(952); } if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(948, 949); } + jjCheckNAddTwoStates(948, 949); break; case 303: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 431: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 5: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 168: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 669: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 137: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 324: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 910: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 295: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 33: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 877: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 423: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 908: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } - break; - case 932: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } - break; + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } + break; + case 932: + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } + break; case 249: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 821: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 491: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 637: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; - case 964: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + case 967: + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 813: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 501: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 481: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 452: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 410: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 372: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 752: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; - case 966: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + case 969: + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 859: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 315: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 32: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 52: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 426: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 0: if ((0x3ff000000000000L & l) != 0L) { - if (kind > 101) - kind = 101; - { jjCheckNAddStates(0, 6); } + if (kind > 96) + kind = 96; + jjCheckNAddStates(0, 8); } else if ((0x100002600L & l) != 0L) { if (kind > 1) kind = 1; } + else if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } else if (curChar == 46) - { jjCheckNAddTwoStates(948, 952); } + jjCheckNAddTwoStates(948, 952); else if (curChar == 45) jjstateSet[jjnewStateCnt++] = 22; - else if (curChar == 33) - jjstateSet[jjnewStateCnt++] = 19; else if (curChar == 60) jjstateSet[jjnewStateCnt++] = 17; - if (curChar == 13) + if (curChar == 33) + jjstateSet[jjnewStateCnt++] = 19; + else if (curChar == 13) jjstateSet[jjnewStateCnt++] = 1; break; case 332: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 377: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 404: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 45: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 717: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } - break; - case 345: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } + break; + case 345: + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 909: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 378: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 302: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 454: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 416: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 670: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 797: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 482: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 453: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 439: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 396: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 550: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 597: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 471: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 770: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 549: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 430: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; - case 962: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + case 965: + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 438: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 801: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 581: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 858: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 472: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 913: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 796: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 427: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 443: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 424: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 900: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 264: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; - case 965: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + case 968: + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 113: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 884: - if ((0x3ff000000000000L & l) == 0L) - break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if ((0x83ff001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + } + if ((0x8000001a00000000L & l) != 0L) + { + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + } break; case 1: if (curChar == 10 && kind > 1) @@ -2109,14 +2661,14 @@ private int jjMoveNfa_0(int startState, int curPos) break; if (kind > 90) kind = 90; - { jjCheckNAddStates(7, 9); } + jjCheckNAddStates(9, 11); break; case 23: if ((0xffffffffffffdbffL & l) == 0L) break; if (kind > 90) kind = 90; - { jjCheckNAddStates(7, 9); } + jjCheckNAddStates(9, 11); break; case 24: if ((0x2400L & l) != 0L && kind > 90) @@ -2130,83 +2682,115 @@ private int jjMoveNfa_0(int startState, int curPos) if (curChar == 13) jjstateSet[jjnewStateCnt++] = 25; break; + case 27: + if ((0x8000001a00000000L & l) == 0L) + break; + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); + break; + case 28: + if ((0x83ff001a00000000L & l) == 0L) + break; + if (kind > 101) + kind = 101; + jjCheckNAdd(28); + break; case 255: if (curChar == 45) jjstateSet[jjnewStateCnt++] = 254; break; case 947: if (curChar == 46) - { jjCheckNAddTwoStates(948, 952); } + jjCheckNAddTwoStates(948, 952); break; case 948: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(948, 949); } + jjCheckNAddTwoStates(948, 949); break; case 950: if ((0x280000000000L & l) != 0L) - { jjCheckNAdd(951); } + jjCheckNAdd(951); break; case 951: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 99) - kind = 99; - { jjCheckNAdd(951); } + if (kind > 94) + kind = 94; + jjCheckNAdd(951); break; case 952: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 100) - kind = 100; - { jjCheckNAdd(952); } + if (kind > 95) + kind = 95; + jjCheckNAdd(952); break; case 953: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 101) - kind = 101; - { jjCheckNAddStates(0, 6); } + if (kind > 96) + kind = 96; + jjCheckNAddStates(0, 8); break; case 954: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(954, 949); } + jjCheckNAddTwoStates(954, 949); break; case 955: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(955, 956); } + jjCheckNAddTwoStates(955, 956); break; case 956: if (curChar == 46) - { jjCheckNAddTwoStates(957, 949); } + jjCheckNAddTwoStates(957, 949); break; case 957: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(957, 949); } + jjCheckNAddTwoStates(957, 949); break; case 958: if ((0x3ff000000000000L & l) != 0L) - { jjCheckNAddTwoStates(958, 959); } + jjCheckNAddTwoStates(958, 959); break; case 959: if (curChar != 46) break; - if (kind > 100) - kind = 100; - { jjCheckNAdd(960); } + if (kind > 95) + kind = 95; + jjCheckNAdd(960); break; case 960: if ((0x3ff000000000000L & l) == 0L) break; - if (kind > 100) - kind = 100; - { jjCheckNAdd(960); } + if (kind > 95) + kind = 95; + jjCheckNAdd(960); break; case 961: if ((0x3ff000000000000L & l) == 0L) break; + if (kind > 96) + kind = 96; + jjCheckNAdd(961); + break; + case 962: + if ((0x3ff000000000000L & l) != 0L) + jjCheckNAddTwoStates(962, 963); + break; + case 963: + if ((0x8000001a00000000L & l) == 0L) + break; + if (kind > 101) + kind = 101; + jjCheckNAdd(964); + break; + case 964: + if ((0x83ff001a00000000L & l) == 0L) + break; if (kind > 101) kind = 101; - { jjCheckNAdd(961); } + jjCheckNAdd(964); break; default : break; } @@ -2220,17 +2804,17 @@ private int jjMoveNfa_0(int startState, int curPos) switch(jjstateSet[--i]) { case 590: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x200000002000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 665; @@ -2247,7 +2831,7 @@ private int jjMoveNfa_0(int startState, int curPos) else if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 620; else if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); else if ((0x800000008L & l) != 0L) jjstateSet[jjnewStateCnt++] = 593; if ((0x2000000020000L & l) != 0L) @@ -2261,56 +2845,56 @@ private int jjMoveNfa_0(int startState, int curPos) else if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 607; if ((0x2000000020000L & l) != 0L) - { jjCheckNAdd(280); } + jjCheckNAdd(280); else if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 602; if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 597; break; case 620: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x400000004000000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 656: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x400000004L & l) != 0L) jjstateSet[jjnewStateCnt++] = 655; break; case 373: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) { @@ -2325,49 +2909,49 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 372; break; case 376: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 303: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 302; break; case 431: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x400000004000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 433; @@ -2375,65 +2959,65 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 430; break; case 5: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 4; break; case 168: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 167; break; case 669: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x400000004L & l) != 0L) jjstateSet[jjnewStateCnt++] = 668; break; case 137: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x40000000400000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 173; @@ -2449,33 +3033,33 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 136; break; case 324: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x200000002L & l) != 0L) jjstateSet[jjnewStateCnt++] = 323; break; case 910: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x100000001000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 945; @@ -2489,11 +3073,11 @@ private int jjMoveNfa_0(int startState, int curPos) else if ((0x8000000080000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 932; else if ((0x4000000040000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); else if ((0x400000004000L & l) != 0L) - { jjCheckNAdd(7); } + jjCheckNAdd(7); else if ((0x1000000010L & l) != 0L) - { jjCheckNAdd(53); } + jjCheckNAdd(53); else if ((0x800000008L & l) != 0L) jjstateSet[jjnewStateCnt++] = 913; else if ((0x400000004L & l) != 0L) @@ -2504,17 +3088,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 920; break; case 295: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 312; @@ -2529,20 +3113,20 @@ private int jjMoveNfa_0(int startState, int curPos) if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 309; if ((0x800000008000L & l) != 0L) - { jjCheckNAdd(3); } + jjCheckNAdd(3); break; case 33: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 45; @@ -2551,20 +3135,20 @@ private int jjMoveNfa_0(int startState, int curPos) else if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 32; if ((0x20000000200L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 877: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x8000000080000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 901; @@ -2574,65 +3158,65 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 884; break; case 423: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 422; break; case 908: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 907; break; case 932: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x8000000080000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 931; break; case 249: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x100000001000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 290; @@ -2645,7 +3229,7 @@ private int jjMoveNfa_0(int startState, int curPos) if ((0x100000001000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 285; else if ((0x400000004000L & l) != 0L) - { jjCheckNAdd(53); } + jjCheckNAdd(53); if ((0x100000001000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 278; if ((0x100000001000000L & l) != 0L) @@ -2656,17 +3240,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 264; break; case 821: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x8000000080000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 867; @@ -2688,17 +3272,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 835; break; case 491: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 546; @@ -2711,7 +3295,7 @@ private int jjMoveNfa_0(int startState, int curPos) if ((0x4000000040000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 535; else if ((0x200000002L & l) != 0L) - { jjCheckNAdd(53); } + jjCheckNAdd(53); if ((0x4000000040000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 527; if ((0x4000000040000L & l) != 0L) @@ -2724,17 +3308,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 508; break; case 637: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x100000001000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 648; @@ -2748,18 +3332,18 @@ private int jjMoveNfa_0(int startState, int curPos) kind = 2; } break; - case 964: - if ((0x7fffffe87fffffeL & l) != 0L) + case 967: + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x2000000020L & l) != 0L) { @@ -2768,17 +3352,17 @@ private int jjMoveNfa_0(int startState, int curPos) } break; case 813: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 902; @@ -2789,7 +3373,7 @@ private int jjMoveNfa_0(int startState, int curPos) else if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 868; else if ((0x200000002L & l) != 0L) - { jjCheckNAdd(7); } + jjCheckNAdd(7); if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 889; else if ((0x20000000200L & l) != 0L) @@ -2816,65 +3400,65 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 821; break; case 501: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x8000000080000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 500; break; case 481: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x1000000010000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 480; break; case 452: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200L & l) != 0L) - { jjCheckNAdd(451); } + jjCheckNAdd(451); break; case 410: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x40000000400000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 412; @@ -2882,17 +3466,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 409; break; case 372: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x4000000040000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 384; @@ -2902,17 +3486,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 378; break; case 752: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x8000000080000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 772; @@ -2929,18 +3513,18 @@ private int jjMoveNfa_0(int startState, int curPos) if ((0x400000004000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 751; break; - case 966: - if ((0x7fffffe87fffffeL & l) != 0L) + case 969: + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) { @@ -2949,17 +3533,17 @@ private int jjMoveNfa_0(int startState, int curPos) } break; case 859: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008L & l) != 0L) jjstateSet[jjnewStateCnt++] = 866; @@ -2967,17 +3551,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 858; break; case 315: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x4000000040000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 324; @@ -2986,7 +3570,7 @@ private int jjMoveNfa_0(int startState, int curPos) else if ((0x100000001000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 318; else if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); if ((0x800000008000L & l) != 0L) { if (kind > 2) @@ -2994,33 +3578,33 @@ private int jjMoveNfa_0(int startState, int curPos) } break; case 32: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x8000000080L & l) != 0L) jjstateSet[jjnewStateCnt++] = 31; break; case 52: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 245; @@ -3084,66 +3668,66 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 113; break; case 426: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 425; break; case 0: - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x200000002L & l) != 0L) - { jjCheckNAddStates(10, 20); } + jjCheckNAddStates(12, 22); else if ((0x1000000010L & l) != 0L) - { jjAddStates(21, 37); } + jjAddStates(23, 39); else if ((0x80000000800000L & l) != 0L) - { jjAddStates(38, 42); } + jjAddStates(40, 44); else if ((0x40000000400000L & l) != 0L) - { jjAddStates(43, 47); } + jjAddStates(45, 49); else if ((0x20000000200000L & l) != 0L) - { jjAddStates(48, 54); } + jjAddStates(50, 56); else if ((0x10000000100000L & l) != 0L) - { jjCheckNAddStates(55, 68); } + jjCheckNAddStates(57, 70); else if ((0x8000000080000L & l) != 0L) - { jjAddStates(69, 85); } + jjAddStates(71, 87); else if ((0x4000000040000L & l) != 0L) - { jjAddStates(86, 93); } + jjAddStates(88, 95); else if ((0x1000000010000L & l) != 0L) - { jjAddStates(94, 104); } + jjAddStates(96, 106); else if ((0x800000008000L & l) != 0L) - { jjCheckNAddStates(105, 111); } + jjCheckNAddStates(107, 113); else if ((0x400000004000L & l) != 0L) - { jjCheckNAddStates(112, 118); } + jjCheckNAddStates(114, 120); else if ((0x200000002000L & l) != 0L) - { jjAddStates(119, 122); } + jjAddStates(121, 124); else if ((0x100000001000L & l) != 0L) - { jjAddStates(123, 128); } + jjAddStates(125, 130); else if ((0x20000000200L & l) != 0L) - { jjAddStates(129, 141); } + jjAddStates(131, 143); else if ((0x8000000080L & l) != 0L) - { jjCheckNAddStates(142, 146); } + jjCheckNAddStates(144, 148); else if ((0x4000000040L & l) != 0L) - { jjAddStates(147, 153); } + jjAddStates(149, 155); else if ((0x2000000020L & l) != 0L) - { jjAddStates(154, 163); } + jjAddStates(156, 165); else if ((0x800000008L & l) != 0L) - { jjAddStates(164, 193); } + jjAddStates(166, 195); else if ((0x400000004L & l) != 0L) - { jjAddStates(194, 197); } + jjAddStates(196, 199); else if ((0x400000004000000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 15; else if ((0x200000002000000L & l) != 0L) @@ -3154,17 +3738,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 5; break; case 332: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x8000000080000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 396; @@ -3181,7 +3765,7 @@ private int jjMoveNfa_0(int startState, int curPos) if ((0x400000004000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 374; if ((0x400000004000L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); if ((0x400000004000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 368; if ((0x400000004000L & l) != 0L) @@ -3194,33 +3778,33 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 345; break; case 377: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 376; break; case 404: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 419; @@ -3236,36 +3820,36 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 403; break; case 45: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) - { jjCheckNAdd(36); } + jjCheckNAdd(36); break; case 717: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); else if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 744; else if ((0x200000002L & l) != 0L) @@ -3278,20 +3862,20 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 716; break; case 345: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) - { jjCheckNAdd(320); } + jjCheckNAdd(320); else if ((0x8000000080000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 367; else if ((0x1000000010000L & l) != 0L) @@ -3315,33 +3899,33 @@ private int jjMoveNfa_0(int startState, int curPos) } break; case 909: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x8000000080000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 908; break; case 378: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x40000000400000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 383; @@ -3349,33 +3933,33 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 377; break; case 302: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x200000002L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 454: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x200000002000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 458; @@ -3383,17 +3967,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 453; break; case 416: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x80000000800000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 418; @@ -3401,17 +3985,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 415; break; case 670: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x4000000040000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 747; @@ -3446,17 +4030,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 717; break; case 797: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x4000000040000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 809; @@ -3470,49 +4054,49 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 796; break; case 482: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 481; break; case 453: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x100000001000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 452; break; case 439: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 459; @@ -3533,33 +4117,33 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 438; break; case 396: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 395; break; case 550: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 583; @@ -3579,17 +4163,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 549; break; case 597: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) { @@ -3606,17 +4190,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 596; break; case 471: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x40000000400000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 488; @@ -3637,35 +4221,35 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 474; break; case 770: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(3); } + jjCheckNAdd(3); else if ((0x200000002L & l) != 0L) jjstateSet[jjnewStateCnt++] = 769; break; case 549: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x40000000400000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 574; @@ -3676,52 +4260,52 @@ private int jjMoveNfa_0(int startState, int curPos) else if ((0x4000000040L & l) != 0L) jjstateSet[jjnewStateCnt++] = 558; else if ((0x200000002L & l) != 0L) - { jjCheckNAdd(280); } + jjCheckNAdd(280); if ((0x200000002L & l) != 0L) - { jjCheckNAdd(53); } + jjCheckNAdd(53); break; case 430: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 429; break; - case 962: - if ((0x7fffffe87fffffeL & l) != 0L) + case 965: + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } break; case 438: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 443; @@ -3729,17 +4313,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 437; break; case 801: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x400000004000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 800; @@ -3750,35 +4334,35 @@ private int jjMoveNfa_0(int startState, int curPos) } break; case 581: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x80000000800000L & l) != 0L) - { jjCheckNAdd(156); } + jjCheckNAdd(156); else if ((0x100000001000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 580; break; case 858: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x4000000040000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 865; @@ -3786,99 +4370,99 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 857; break; case 472: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x100000001000L & l) != 0L) - { jjCheckNAdd(7); } + jjCheckNAdd(7); break; case 913: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 912; break; case 796: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x2000000020L & l) != 0L) jjstateSet[jjnewStateCnt++] = 801; if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(30); } + jjCheckNAdd(30); break; case 427: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x400000004000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 426; break; case 443: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 442; break; case 424: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x800000008000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 434; @@ -3890,33 +4474,33 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 431; break; case 900: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x20000000200L & l) != 0L) jjstateSet[jjnewStateCnt++] = 899; break; case 264: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 289; @@ -3927,22 +4511,22 @@ private int jjMoveNfa_0(int startState, int curPos) if ((0x10000000100000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 284; else if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(251); } + jjCheckNAdd(251); else if ((0x800000008L & l) != 0L) jjstateSet[jjnewStateCnt++] = 263; break; - case 965: - if ((0x7fffffe87fffffeL & l) != 0L) + case 968: + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x200000002000000L & l) != 0L) { @@ -3951,17 +4535,17 @@ private int jjMoveNfa_0(int startState, int curPos) } break; case 113: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x4000000040000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 185; @@ -3989,17 +4573,17 @@ private int jjMoveNfa_0(int startState, int curPos) jjstateSet[jjnewStateCnt++] = 137; break; case 884: - if ((0x7fffffe87fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); } - if ((0x7fffffe07fffffeL & l) != 0L) + if ((0x6fffffffefffffffL & l) != 0L) { - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); } if ((0x10000000100000L & l) != 0L) jjstateSet[jjnewStateCnt++] = 900; @@ -4013,7 +4597,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 4: case 689: if ((0x20000000200000L & l) != 0L) - { jjCheckNAdd(3); } + jjCheckNAdd(3); break; case 6: if ((0x10000000100L & l) != 0L) @@ -4025,7 +4609,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 8: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(7); } + jjCheckNAdd(7); break; case 9: if ((0x80000000800L & l) != 0L) @@ -4036,7 +4620,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 446: case 782: if ((0x200000002L & l) != 0L) - { jjCheckNAdd(3); } + jjCheckNAdd(3); break; case 11: if ((0x2000000020L & l) != 0L) @@ -4052,7 +4636,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 14: if ((0x400000004000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 15: if ((0x800000008000L & l) != 0L) @@ -4065,25 +4649,25 @@ private int jjMoveNfa_0(int startState, int curPos) case 23: if (kind > 90) kind = 90; - { jjAddStates(7, 9); } + jjAddStates(9, 11); break; case 27: - if ((0x7fffffe07fffffeL & l) == 0L) + if ((0x6fffffffefffffffL & l) == 0L) break; - if (kind > 97) - kind = 97; - { jjCheckNAddTwoStates(27, 28); } + if (kind > 101) + kind = 101; + jjCheckNAddTwoStates(27, 28); break; case 28: - if ((0x7fffffe87fffffeL & l) == 0L) + if ((0x6fffffffefffffffL & l) == 0L) break; - if (kind > 97) - kind = 97; - { jjCheckNAdd(28); } + if (kind > 101) + kind = 101; + jjCheckNAdd(28); break; case 29: if ((0x400000004L & l) != 0L) - { jjAddStates(194, 197); } + jjAddStates(196, 199); break; case 30: if ((0x400000004000L & l) != 0L && kind > 2) @@ -4092,7 +4676,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 31: case 887: if ((0x20000000200L & l) != 0L) - { jjCheckNAdd(30); } + jjCheckNAdd(30); break; case 34: if ((0x10000000100000L & l) != 0L && kind > 2) @@ -4101,7 +4685,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 35: case 131: if ((0x20000000200L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 36: if ((0x10000000100L & l) != 0L && kind > 2) @@ -4114,7 +4698,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 462: case 804: if ((0x10000000100000L & l) != 0L) - { jjCheckNAdd(36); } + jjCheckNAdd(36); break; case 38: if ((0x8000000080L & l) != 0L) @@ -4150,12 +4734,12 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 47: if ((0x800000008L & l) != 0L) - { jjAddStates(164, 193); } + jjAddStates(166, 195); break; case 48: case 634: if ((0x1000000010L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 49: if ((0x200000002L & l) != 0L) @@ -4176,7 +4760,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 54: case 846: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(53); } + jjCheckNAdd(53); break; case 55: if ((0x1000000010L & l) != 0L) @@ -4203,7 +4787,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 248: case 293: if ((0x8000000080000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 61: if ((0x200000002L & l) != 0L) @@ -4213,7 +4797,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 299: case 405: if ((0x8000000080000L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 63: if ((0x200000002L & l) != 0L) @@ -4225,7 +4809,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 65: if ((0x800000008000L & l) != 0L) - { jjCheckNAdd(64); } + jjCheckNAdd(64); break; case 66: if ((0x100000001000L & l) != 0L) @@ -4257,7 +4841,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 798: case 922: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(3); } + jjCheckNAdd(3); break; case 73: if ((0x10000000100000L & l) != 0L) @@ -4374,7 +4958,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 103: case 577: if ((0x800000008L & l) != 0L) - { jjCheckNAdd(102); } + jjCheckNAdd(102); break; case 104: if ((0x2000000020L & l) != 0L) @@ -4395,7 +4979,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 109: case 630: if ((0x800000008L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 110: if ((0x8000000080000L & l) != 0L) @@ -4430,7 +5014,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 905: case 916: if ((0x10000000100000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 116: if ((0x200000002L & l) != 0L) @@ -4464,7 +5048,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 927: case 934: if ((0x800000008000L & l) != 0L) - { jjCheckNAdd(30); } + jjCheckNAdd(30); break; case 121: if ((0x20000000200L & l) != 0L) @@ -4492,7 +5076,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 127: if ((0x200000002000L & l) != 0L) - { jjCheckNAdd(30); } + jjCheckNAdd(30); break; case 128: if ((0x20000000200000L & l) != 0L) @@ -4523,7 +5107,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 567: case 879: if ((0x800000008L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 136: if ((0x2000000020L & l) != 0L) @@ -4570,7 +5154,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 323: case 622: if ((0x400000004000L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 149: if ((0x20000000200L & l) != 0L) @@ -4606,7 +5190,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 157: if ((0x10000000100000L & l) != 0L) - { jjCheckNAdd(156); } + jjCheckNAdd(156); break; case 158: if ((0x400000004000L & l) != 0L) @@ -4644,7 +5228,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 753: case 775: if ((0x20000000200000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 167: if ((0x400000004000L & l) != 0L) @@ -4665,7 +5249,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 172: case 366: if ((0x4000000040000L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 173: if ((0x2000000020L & l) != 0L) @@ -4689,7 +5273,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 713: case 787: if ((0x400000004000L & l) != 0L) - { jjCheckNAdd(64); } + jjCheckNAdd(64); break; case 178: if ((0x20000000200L & l) != 0L) @@ -4799,7 +5383,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 628: case 680: if ((0x200000002000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 208: if ((0x20000000200L & l) != 0L) @@ -4844,7 +5428,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 218: case 682: if ((0x200000002000L & l) != 0L) - { jjCheckNAdd(217); } + jjCheckNAdd(217); break; case 219: if ((0x200000002L & l) != 0L) @@ -4944,7 +5528,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 639: case 862: if ((0x800000008000L & l) != 0L) - { jjCheckNAdd(3); } + jjCheckNAdd(3); break; case 244: if ((0x8000000080000L & l) != 0L) @@ -4960,13 +5544,13 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 247: if ((0x2000000020L & l) != 0L) - { jjAddStates(154, 163); } + jjAddStates(156, 165); break; case 250: case 311: case 595: if ((0x400000004000L & l) != 0L) - { jjCheckNAdd(53); } + jjCheckNAdd(53); break; case 251: if ((0x800000008L & l) != 0L && kind > 2) @@ -4974,7 +5558,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 252: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(251); } + jjCheckNAdd(251); break; case 253: if ((0x100000001000000L & l) != 0L) @@ -4994,7 +5578,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 258: if ((0x1000000010000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 259: if ((0x200000002L & l) != 0L) @@ -5010,7 +5594,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 262: if ((0x1000000010000L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 263: if ((0x2000000020L & l) != 0L) @@ -5046,7 +5630,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 273: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(251); } + jjCheckNAdd(251); break; case 274: if ((0x100000001000000L & l) != 0L) @@ -5080,7 +5664,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 492: case 823: if ((0x200000002L & l) != 0L) - { jjCheckNAdd(280); } + jjCheckNAdd(280); break; case 282: if ((0x400000004000L & l) != 0L) @@ -5120,7 +5704,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 292: if ((0x4000000040L & l) != 0L) - { jjAddStates(147, 153); } + jjAddStates(149, 155); break; case 294: if ((0x100000001000L & l) != 0L) @@ -5129,7 +5713,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 296: case 422: if ((0x800000008L & l) != 0L) - { jjCheckNAdd(36); } + jjCheckNAdd(36); break; case 297: if ((0x10000000100000L & l) != 0L) @@ -5153,11 +5737,11 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 305: if ((0x800000008000L & l) != 0L) - { jjCheckNAdd(3); } + jjCheckNAdd(3); break; case 306: if ((0x8000000080L & l) != 0L) - { jjCheckNAdd(30); } + jjCheckNAdd(30); break; case 307: if ((0x20000000200L & l) != 0L) @@ -5185,7 +5769,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 314: if ((0x8000000080L & l) != 0L) - { jjCheckNAddStates(142, 146); } + jjCheckNAddStates(144, 148); break; case 317: if ((0x400000004L & l) != 0L) @@ -5205,7 +5789,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 321: if ((0x10000000100000L & l) != 0L) - { jjCheckNAdd(320); } + jjCheckNAdd(320); break; case 322: if ((0x800000008000L & l) != 0L) @@ -5217,11 +5801,11 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 326: if ((0x20000000200L & l) != 0L) - { jjAddStates(129, 141); } + jjAddStates(131, 143); break; case 327: if ((0x10000000100000L & l) != 0L) - { jjCheckNAdd(7); } + jjCheckNAdd(7); break; case 328: if ((0x20000000200L & l) != 0L) @@ -5285,7 +5869,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 347: if ((0x100000001000L & l) != 0L) - { jjCheckNAdd(7); } + jjCheckNAdd(7); break; case 348: if ((0x100000001000L & l) != 0L) @@ -5314,7 +5898,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 354: case 480: if ((0x20000000200000L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 355: if ((0x1000000010000L & l) != 0L) @@ -5328,7 +5912,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 515: case 561: if ((0x40000000400000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 358: if ((0x20000000200L & l) != 0L) @@ -5376,7 +5960,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 370: if ((0x400000004000L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 374: if ((0x10000000100000L & l) != 0L) @@ -5424,7 +6008,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 389: if ((0x10000000100000L & l) != 0L) - { jjCheckNAdd(320); } + jjCheckNAdd(320); break; case 390: if ((0x400000004000L & l) != 0L) @@ -5452,12 +6036,12 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 398: if ((0x100000001000L & l) != 0L) - { jjAddStates(123, 128); } + jjAddStates(125, 130); break; case 399: case 769: if ((0x8000000080L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 400: if ((0x200000002L & l) != 0L) @@ -5493,7 +6077,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 412: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(280); } + jjCheckNAdd(280); break; case 413: if ((0x40000000400000L & l) != 0L) @@ -5517,7 +6101,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 421: if ((0x200000002000L & l) != 0L) - { jjAddStates(119, 122); } + jjAddStates(121, 124); break; case 428: if ((0x20000000200L & l) != 0L) @@ -5528,7 +6112,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 838: case 891: if ((0x100000001000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 432: if ((0x800000008000L & l) != 0L) @@ -5544,14 +6128,14 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 436: if ((0x400000004000L & l) != 0L) - { jjCheckNAddStates(112, 118); } + jjCheckNAddStates(114, 120); break; case 437: case 529: case 553: case 778: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(156); } + jjCheckNAdd(156); break; case 441: if ((0x400000004000L & l) != 0L) @@ -5579,7 +6163,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 449: if ((0x100000001000000L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 450: if ((0x2000000020L & l) != 0L) @@ -5596,7 +6180,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 456: case 544: if ((0x20000000200L & l) != 0L) - { jjCheckNAdd(251); } + jjCheckNAdd(251); break; case 457: if ((0x4000000040000L & l) != 0L) @@ -5616,7 +6200,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 461: if ((0x800000008000L & l) != 0L) - { jjCheckNAddStates(105, 111); } + jjCheckNAddStates(107, 113); break; case 463: if ((0x8000000080L & l) != 0L) @@ -5657,7 +6241,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 474: case 678: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(30); } + jjCheckNAdd(30); break; case 475: if ((0x1000000010000L & l) != 0L) @@ -5681,7 +6265,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 484: if ((0x1000000010000L & l) != 0L) - { jjCheckNAdd(156); } + jjCheckNAdd(156); break; case 485: if ((0x200000002L & l) != 0L) @@ -5705,7 +6289,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 490: if ((0x1000000010000L & l) != 0L) - { jjAddStates(94, 104); } + jjAddStates(96, 106); break; case 493: if ((0x20000000200L & l) != 0L) @@ -5767,7 +6351,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 537: case 828: if ((0x4000000040000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 511: if ((0x200000002L & l) != 0L) @@ -5808,7 +6392,7 @@ private int jjMoveNfa_0(int startState, int curPos) case 521: case 671: if ((0x4000000040000L & l) != 0L) - { jjCheckNAdd(7); } + jjCheckNAdd(7); break; case 522: if ((0x200000002L & l) != 0L) @@ -5900,11 +6484,11 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 548: if ((0x4000000040000L & l) != 0L) - { jjAddStates(86, 93); } + jjAddStates(88, 95); break; case 551: if ((0x200000002L & l) != 0L) - { jjCheckNAdd(280); } + jjCheckNAdd(280); break; case 552: if ((0x2000000020L & l) != 0L) @@ -5980,7 +6564,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 573: if ((0x80000000800L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 574: if ((0x800000008000L & l) != 0L) @@ -6012,7 +6596,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 583: if ((0x80000000800000L & l) != 0L) - { jjCheckNAdd(156); } + jjCheckNAdd(156); break; case 584: if ((0x800000008000L & l) != 0L) @@ -6020,7 +6604,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 585: if ((0x8000000080000L & l) != 0L) - { jjAddStates(69, 85); } + jjAddStates(71, 87); break; case 586: if ((0x200000002L & l) != 0L && kind > 2) @@ -6040,7 +6624,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 591: if ((0x100000001000L & l) != 0L) - { jjCheckNAdd(280); } + jjCheckNAdd(280); break; case 592: if ((0x800000008000L & l) != 0L) @@ -6132,7 +6716,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 619: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 621: if ((0x20000000200L & l) != 0L) @@ -6172,7 +6756,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 633: if ((0x2000000020000L & l) != 0L) - { jjCheckNAdd(280); } + jjCheckNAdd(280); break; case 635: if ((0x800000008000L & l) != 0L) @@ -6280,7 +6864,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 667: if ((0x10000000100000L & l) != 0L) - { jjCheckNAddStates(55, 68); } + jjCheckNAddStates(57, 70); break; case 672: if ((0x200000002L & l) != 0L) @@ -6544,7 +7128,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 747: if ((0x20000000200000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 748: if ((0x4000000040000L & l) != 0L) @@ -6552,7 +7136,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 749: if ((0x20000000200000L & l) != 0L) - { jjAddStates(48, 54); } + jjAddStates(50, 56); break; case 751: if ((0x20000000200L & l) != 0L) @@ -6572,7 +7156,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 757: if ((0x80000000800000L & l) != 0L) - { jjCheckNAdd(30); } + jjCheckNAdd(30); break; case 758: if ((0x800000008000L & l) != 0L) @@ -6616,7 +7200,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 772: if ((0x2000000020L & l) != 0L) - { jjCheckNAdd(3); } + jjCheckNAdd(3); break; case 773: if ((0x8000000080000L & l) != 0L) @@ -6624,7 +7208,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 774: if ((0x40000000400000L & l) != 0L) - { jjAddStates(43, 47); } + jjAddStates(45, 49); break; case 776: if ((0x100000001000L & l) != 0L) @@ -6692,7 +7276,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 795: if ((0x80000000800000L & l) != 0L) - { jjAddStates(38, 42); } + jjAddStates(40, 44); break; case 799: if ((0x40000000400000L & l) != 0L) @@ -6716,7 +7300,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 806: if ((0x4000000040000L & l) != 0L) - { jjCheckNAdd(102); } + jjCheckNAdd(102); break; case 807: if ((0x800000008000L & l) != 0L) @@ -6732,11 +7316,11 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 811: if ((0x1000000010L & l) != 0L) - { jjAddStates(21, 37); } + jjAddStates(23, 39); break; case 814: if ((0x200000002L & l) != 0L) - { jjCheckNAdd(7); } + jjCheckNAdd(7); break; case 816: if ((0x200000002L & l) != 0L) @@ -6796,7 +7380,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 833: if ((0x100000001000L & l) != 0L) - { jjCheckNAdd(34); } + jjCheckNAdd(34); break; case 834: if ((0x20000000200000L & l) != 0L) @@ -6876,7 +7460,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 856: if ((0x400000004L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 857: if ((0x20000000200L & l) != 0L) @@ -6920,7 +7504,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 870: if ((0x800000008L & l) != 0L) - { jjCheckNAdd(156); } + jjCheckNAdd(156); break; case 871: if ((0x20000000200L & l) != 0L) @@ -7000,7 +7584,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 895: if ((0x800000008000L & l) != 0L) - { jjCheckNAdd(217); } + jjCheckNAdd(217); break; case 896: if ((0x4000000040000L & l) != 0L) @@ -7032,7 +7616,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 904: if ((0x200000002L & l) != 0L) - { jjCheckNAddStates(10, 20); } + jjCheckNAddStates(12, 22); break; case 906: if ((0x20000000200000L & l) != 0L) @@ -7052,7 +7636,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 915: if ((0x1000000010L & l) != 0L) - { jjCheckNAdd(53); } + jjCheckNAdd(53); break; case 917: if ((0x200000002L & l) != 0L) @@ -7084,11 +7668,11 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 925: if ((0x400000004000L & l) != 0L) - { jjCheckNAdd(7); } + jjCheckNAdd(7); break; case 926: if ((0x4000000040000L & l) != 0L) - { jjCheckNAdd(13); } + jjCheckNAdd(13); break; case 928: if ((0x20000000200L & l) != 0L) @@ -7160,7 +7744,15 @@ private int jjMoveNfa_0(int startState, int curPos) break; case 949: if ((0x2000000020L & l) != 0L) - { jjAddStates(198, 199); } + jjAddStates(200, 201); + break; + case 963: + case 964: + if ((0x6fffffffefffffffL & l) == 0L) + break; + if (kind > 101) + kind = 101; + jjCheckNAdd(964); break; default : break; } @@ -7179,7 +7771,7 @@ private int jjMoveNfa_0(int startState, int curPos) break; if (kind > 90) kind = 90; - { jjAddStates(7, 9); } + jjAddStates(9, 11); break; default : break; } @@ -7192,23 +7784,26 @@ private int jjMoveNfa_0(int startState, int curPos) kind = 0x7fffffff; } ++curPos; - if ((i = jjnewStateCnt) == (startsAt = 962 - (jjnewStateCnt = startsAt))) + if ((i = jjnewStateCnt) == (startsAt = 965 - (jjnewStateCnt = startsAt))) return curPos; try { curChar = input_stream.readChar(); } catch(java.io.IOException e) { return curPos; } } } -private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1){ +private final int jjStopStringLiteralDfa_1(int pos, long active0, long active1) +{ switch (pos) { default : return -1; } } -private final int jjStartNfa_1(int pos, long active0, long active1){ +private final int jjStartNfa_1(int pos, long active0, long active1) +{ return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0, active1), pos + 1); } -private int jjMoveStringLiteralDfa0_1(){ +private int jjMoveStringLiteralDfa0_1() +{ switch(curChar) { case 39: @@ -7308,19 +7903,19 @@ private int jjMoveNfa_1(int startState, int curPos) } } static final int[] jjnextStates = { - 954, 955, 956, 949, 958, 959, 961, 23, 24, 26, 910, 914, 915, 921, 924, 925, - 926, 933, 34, 944, 946, 813, 814, 822, 827, 832, 837, 845, 851, 855, 861, 869, - 878, 886, 890, 894, 896, 903, 797, 803, 805, 807, 810, 777, 781, 786, 791, 794, - 752, 756, 761, 765, 768, 771, 773, 670, 677, 679, 681, 688, 699, 712, 320, 718, - 727, 734, 743, 746, 748, 590, 594, 598, 603, 608, 618, 619, 621, 627, 629, 632, - 633, 638, 644, 650, 657, 666, 550, 552, 560, 566, 572, 576, 582, 584, 491, 496, - 502, 509, 514, 520, 525, 528, 536, 543, 547, 471, 451, 473, 475, 479, 483, 489, - 439, 445, 448, 450, 320, 455, 460, 424, 428, 432, 435, 404, 406, 411, 414, 417, - 420, 332, 339, 346, 353, 356, 365, 369, 370, 375, 382, 388, 390, 397, 315, 319, - 320, 322, 325, 295, 298, 301, 304, 305, 310, 313, 249, 250, 257, 261, 265, 272, - 274, 279, 286, 291, 52, 59, 61, 63, 69, 71, 78, 87, 101, 105, 108, 114, - 119, 126, 130, 134, 139, 147, 155, 165, 171, 176, 187, 191, 196, 206, 216, 232, - 242, 246, 33, 35, 44, 46, 950, 951, + 954, 955, 956, 949, 958, 959, 961, 962, 963, 23, 24, 26, 910, 914, 915, 921, + 924, 925, 926, 933, 34, 944, 946, 813, 814, 822, 827, 832, 837, 845, 851, 855, + 861, 869, 878, 886, 890, 894, 896, 903, 797, 803, 805, 807, 810, 777, 781, 786, + 791, 794, 752, 756, 761, 765, 768, 771, 773, 670, 677, 679, 681, 688, 699, 712, + 320, 718, 727, 734, 743, 746, 748, 590, 594, 598, 603, 608, 618, 619, 621, 627, + 629, 632, 633, 638, 644, 650, 657, 666, 550, 552, 560, 566, 572, 576, 582, 584, + 491, 496, 502, 509, 514, 520, 525, 528, 536, 543, 547, 471, 451, 473, 475, 479, + 483, 489, 439, 445, 448, 450, 320, 455, 460, 424, 428, 432, 435, 404, 406, 411, + 414, 417, 420, 332, 339, 346, 353, 356, 365, 369, 370, 375, 382, 388, 390, 397, + 315, 319, 320, 322, 325, 295, 298, 301, 304, 305, 310, 313, 249, 250, 257, 261, + 265, 272, 274, 279, 286, 291, 52, 59, 61, 63, 69, 71, 78, 87, 101, 105, + 108, 114, 119, 126, 130, 134, 139, 147, 155, 165, 171, 176, 187, 191, 196, 206, + 216, 232, 242, 246, 33, 35, 44, 46, 950, 951, }; /** Token literal values. */ @@ -7333,6 +7928,80 @@ null, null, null, null, null, null, null, null, null, null, null, null, null, nu null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, }; + +/** Lexer state names. */ +public static final String[] lexStateNames = { + "DEFAULT", + "WithinString", + "WithinDelimitedId", +}; + +/** Lex State array. */ +public static final int[] jjnewLexState = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0, -1, -1, -1, -1, 2, -1, + 0, -1, -1, +}; +static final long[] jjtoToken = { + 0xfffffffffffffffdL, 0x31e3ffffffL, +}; +static final long[] jjtoSkip = { + 0x2L, 0x4000000L, +}; +static final long[] jjtoMore = { + 0x0L, 0xc18000000L, +}; +protected SimpleCharStream input_stream; +private final int[] jjrounds = new int[965]; +private final int[] jjstateSet = new int[1930]; +protected char curChar; +/** Constructor. */ +public ADQLParserTokenManager(SimpleCharStream stream){ + if (SimpleCharStream.staticFlag) + throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); + input_stream = stream; +} + +/** Constructor. */ +public ADQLParserTokenManager(SimpleCharStream stream, int lexState){ + this(stream); + SwitchTo(lexState); +} + +/** Reinitialise parser. */ +public void ReInit(SimpleCharStream stream) +{ + jjmatchedPos = jjnewStateCnt = 0; + curLexState = defaultLexState; + input_stream = stream; + ReInitRounds(); +} +private void ReInitRounds() +{ + int i; + jjround = 0x80000001; + for (i = 965; i-- > 0;) + jjrounds[i] = 0x80000000; +} + +/** Reinitialise parser. */ +public void ReInit(SimpleCharStream stream, int lexState) +{ + ReInit(stream); + SwitchTo(lexState); +} + +/** Switch to specified lex state. */ +public void SwitchTo(int lexState) +{ + if (lexState >= 3 || lexState < 0) + throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE); + else + curLexState = lexState; +} + protected Token jjFillToken() { final Token t; @@ -7380,7 +8049,6 @@ public Token getNextToken() catch(java.io.IOException e) { jjmatchedKind = 0; - jjmatchedPos = -1; matchedToken = jjFillToken(); return matchedToken; } @@ -7483,83 +8151,4 @@ private void jjCheckNAddStates(int start, int end) } while (start++ != end); } - /** Constructor. */ - public ADQLParserTokenManager(SimpleCharStream stream){ - - if (SimpleCharStream.staticFlag) - throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer."); - - input_stream = stream; - } - - /** Constructor. */ - public ADQLParserTokenManager (SimpleCharStream stream, int lexState){ - ReInit(stream); - SwitchTo(lexState); - } - - /** Reinitialise parser. */ - public void ReInit(SimpleCharStream stream) - { - jjmatchedPos = jjnewStateCnt = 0; - curLexState = defaultLexState; - input_stream = stream; - ReInitRounds(); - } - - private void ReInitRounds() - { - int i; - jjround = 0x80000001; - for (i = 962; i-- > 0;) - jjrounds[i] = 0x80000000; - } - - /** Reinitialise parser. */ - public void ReInit(SimpleCharStream stream, int lexState) - { - ReInit(stream); - SwitchTo(lexState); - } - - /** Switch to specified lex state. */ - public void SwitchTo(int lexState) - { - if (lexState >= 3 || 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", - "WithinString", - "WithinDelimitedId", -}; - -/** Lex State array. */ -public static final int[] jjnewLexState = { - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 0, 2, -1, 0, -1, -1, -1, - -1, -1, -1, -}; -static final long[] jjtoToken = { - 0xfffffffffffffffdL, 0x3b23ffffffL, -}; -static final long[] jjtoSkip = { - 0x2L, 0x4000000L, -}; -static final long[] jjtoMore = { - 0x0L, 0xd8000000L, -}; - protected SimpleCharStream input_stream; - - private final int[] jjrounds = new int[962]; - private final int[] jjstateSet = new int[2 * 962]; - - - protected char curChar; } diff --git a/src/adql/parser/ParseException.java b/src/adql/parser/ParseException.java index d08297b..0d70651 100644 --- a/src/adql/parser/ParseException.java +++ b/src/adql/parser/ParseException.java @@ -1,6 +1,6 @@ /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 6.0 */ /* JavaCCOptions:KEEP_LINE_COL=null - * + * * Modified by Grégory Mantelet (CDS), on March 2017 * Modifications: * - addition of a getPosition() function in order to get the exact location @@ -9,12 +9,17 @@ * call of getMessage() * - use of StringBuffer to build the error message * - small other alterations of the generated error message - * + * * Modified by Grégory Mantelet (ARI), on Sept. 2017 * Modifications: * - addition of a HINT in the error message when an ADQL or SQL reserved * word is at the origin of the error (see initialise(...)) - * + * + * Modified by Grégory Mantelet (CDS), on March 2019 + * Modifications: + * - addition of a constructor with a TokenMgrError which adds a piece of + * advice to fix the token issue (see buildExpandedMessage(...)) + * * /!\ DO NOT RE-GENERATE THIS FILE /!\ * In case of re-generation, replace it by ParseException.java.backup (but maybe * after a diff in case of significant modifications have been done by a new @@ -81,6 +86,17 @@ public class ParseException extends Exception { position = errorPosition; } + public ParseException(TokenMgrError err){ + this(buildExpandedMessage(err), new TextPosition(err.getErrorLine(), err.getErrorColumn())); + } + + private final static String buildExpandedMessage(final TokenMgrError err){ + if (err.getMessage().indexOf("<EOF>") > 0) + return err.getMessage() + "! Possible cause: a string between single or double quotes which is never closed (solution: well...just close it!)."; + else + return err.getMessage() + "! Possible cause: a non-ASCI/UTF-8 character (solution: remove/replace it)."; + } + /** * This is the last token that has been consumed successfully. If * this object has been created due to a parse error, the token @@ -106,13 +122,13 @@ public class ParseException extends Exception { protected TextPosition position = null; /** Regular expression listing all ADQL reserved words. - * + * * <p><i>Note 1: * This list is built NOT from the list given in the ADQL-2.0 standard, * but from the collation of all words potentially used in an ADQL query * (including standard function names). * </i></p> - * + * * <p><i>Note 2: * This regular expression is only used to display an appropriate hint * to the user in the error message if a such word is at the origin of @@ -122,13 +138,13 @@ public class ParseException extends Exception { private final static String ADQL_RESERVED_WORDS_REGEX = "(ABS|ACOS|AREA|ASIN|ATAN|ATAN2|BOX|CEILING|CENTROID|CIRCLE|CONTAINS|COORD1|COORD2|COORDSYS|COS|DEGREES|DISTANCE|EXP|FLOOR|INTERSECTS|LOG|LOG10|MOD|PI|POINT|POLYGON|POWER|RADIANS|REGION|RAND|ROUND|SIN|SQRT|TOP|TAN|TRUNCATE|SELECT|TOP|DISTINCT|ALL|AS|COUNT|AVG|MAX|MIN|SUM|FROM|JOIN|CROSS|INNER|OUTER|LEFT|RIGHT|FULL|NATURAL|USING|ON|WHERE|IS|NOT|AND|OR|EXISTS|IN|LIKE|NULL|BETWEEN|ORDER|ASC|DESC|GROUP|BY|HAVING)"; /** Regular expression listing all SQL reserved words. - * + * * <p><i>Note 1: * This list is built from the list given in the ADQL-2.0 standard, * after removal of all words potentially used in an ADQL query * (see {@link #ADQL_RESERVED_WORDS_REGEX}). * </i></p> - * + * * <p><i>Note 2: * This regular expression is only used to display an appropriate hint * to the user in the error message if a such word is at the origin of @@ -139,7 +155,7 @@ public class ParseException extends Exception { /** * Gets the position in the ADQL query of the token which generates this exception. - * + * * @return Position or <code>null</code> if unknown. */ public final TextPosition getPosition(){ diff --git a/src/adql/parser/ParseException.java.backup b/src/adql/parser/ParseException.java.backup index d08297b..0d70651 100644 --- a/src/adql/parser/ParseException.java.backup +++ b/src/adql/parser/ParseException.java.backup @@ -1,6 +1,6 @@ /* Generated By:JavaCC: Do not edit this line. ParseException.java Version 6.0 */ /* JavaCCOptions:KEEP_LINE_COL=null - * + * * Modified by Grégory Mantelet (CDS), on March 2017 * Modifications: * - addition of a getPosition() function in order to get the exact location @@ -9,12 +9,17 @@ * call of getMessage() * - use of StringBuffer to build the error message * - small other alterations of the generated error message - * + * * Modified by Grégory Mantelet (ARI), on Sept. 2017 * Modifications: * - addition of a HINT in the error message when an ADQL or SQL reserved * word is at the origin of the error (see initialise(...)) - * + * + * Modified by Grégory Mantelet (CDS), on March 2019 + * Modifications: + * - addition of a constructor with a TokenMgrError which adds a piece of + * advice to fix the token issue (see buildExpandedMessage(...)) + * * /!\ DO NOT RE-GENERATE THIS FILE /!\ * In case of re-generation, replace it by ParseException.java.backup (but maybe * after a diff in case of significant modifications have been done by a new @@ -81,6 +86,17 @@ public class ParseException extends Exception { position = errorPosition; } + public ParseException(TokenMgrError err){ + this(buildExpandedMessage(err), new TextPosition(err.getErrorLine(), err.getErrorColumn())); + } + + private final static String buildExpandedMessage(final TokenMgrError err){ + if (err.getMessage().indexOf("<EOF>") > 0) + return err.getMessage() + "! Possible cause: a string between single or double quotes which is never closed (solution: well...just close it!)."; + else + return err.getMessage() + "! Possible cause: a non-ASCI/UTF-8 character (solution: remove/replace it)."; + } + /** * This is the last token that has been consumed successfully. If * this object has been created due to a parse error, the token @@ -106,13 +122,13 @@ public class ParseException extends Exception { protected TextPosition position = null; /** Regular expression listing all ADQL reserved words. - * + * * <p><i>Note 1: * This list is built NOT from the list given in the ADQL-2.0 standard, * but from the collation of all words potentially used in an ADQL query * (including standard function names). * </i></p> - * + * * <p><i>Note 2: * This regular expression is only used to display an appropriate hint * to the user in the error message if a such word is at the origin of @@ -122,13 +138,13 @@ public class ParseException extends Exception { private final static String ADQL_RESERVED_WORDS_REGEX = "(ABS|ACOS|AREA|ASIN|ATAN|ATAN2|BOX|CEILING|CENTROID|CIRCLE|CONTAINS|COORD1|COORD2|COORDSYS|COS|DEGREES|DISTANCE|EXP|FLOOR|INTERSECTS|LOG|LOG10|MOD|PI|POINT|POLYGON|POWER|RADIANS|REGION|RAND|ROUND|SIN|SQRT|TOP|TAN|TRUNCATE|SELECT|TOP|DISTINCT|ALL|AS|COUNT|AVG|MAX|MIN|SUM|FROM|JOIN|CROSS|INNER|OUTER|LEFT|RIGHT|FULL|NATURAL|USING|ON|WHERE|IS|NOT|AND|OR|EXISTS|IN|LIKE|NULL|BETWEEN|ORDER|ASC|DESC|GROUP|BY|HAVING)"; /** Regular expression listing all SQL reserved words. - * + * * <p><i>Note 1: * This list is built from the list given in the ADQL-2.0 standard, * after removal of all words potentially used in an ADQL query * (see {@link #ADQL_RESERVED_WORDS_REGEX}). * </i></p> - * + * * <p><i>Note 2: * This regular expression is only used to display an appropriate hint * to the user in the error message if a such word is at the origin of @@ -139,7 +155,7 @@ public class ParseException extends Exception { /** * Gets the position in the ADQL query of the token which generates this exception. - * + * * @return Position or <code>null</code> if unknown. */ public final TextPosition getPosition(){ diff --git a/src/adql/parser/adqlGrammar.jj b/src/adql/parser/adqlGrammar.jj index 72bd887..e9ea32d 100644 --- a/src/adql/parser/adqlGrammar.jj +++ b/src/adql/parser/adqlGrammar.jj @@ -14,7 +14,7 @@ * You should have received a copy of the GNU Lesser General Public License * along with ADQLLibrary. If not, see <http://www.gnu.org/licenses/>. * - * Copyright 2012-2018 - UDS/Centre de DonnĂ©es astronomiques de Strasbourg (CDS), + * Copyright 2012-2019 - UDS/Centre de DonnĂ©es astronomiques de Strasbourg (CDS), * Astronomisches Rechen Institute (ARI) */ @@ -30,8 +30,8 @@ * If the syntax is not conform to the ADQL definition an error message is * printed else it will be the message "Correct syntax". * -* Author: Grégory Mantelet (CDS;ARI) - gmantele@ari.uni-heidelberg.de -* Version: 1.4 (01/2018) +* Author: Grégory Mantelet (CDS;ARI) +* Version: 1.5 (03/2019) */ /* ########### */ @@ -98,6 +98,16 @@ import adql.translator.TranslationException; * corresponding function of {@link ADQLQueryFactory} * (ie. createContains(...)). * </p> +* +* <p>Here are the key functions to use:</p> +* <ul> +* <li>{@link #parseQuery(java.lang.String)} (or any of its alternatives) +* to parse an input ADQL query String and get its corresponding ADQL tree +* </li> +* <li>{@link #tryQuickFix(java.lang.String)} to try fixing the most common +* issues with ADQL queries (e.g. Unicode confusable characters, +* unescaped ADQL identifiers, SQL reserved keywords, ...)</li> +* </ul> * * <p><b><u>WARNING:</u> * To modify this class it's strongly encouraged to modify the .jj file in the @@ -108,8 +118,8 @@ import adql.translator.TranslationException; * @see QueryChecker * @see ADQLQueryFactory * -* @author Grégory Mantelet (CDS;ARI) - gmantele@ari.uni-heidelberg.de -* @version 1.4 (01/2018) +* @author Grégory Mantelet (CDS;ARI) +* @version 1.5 (03/2019) */ public class ADQLParser { @@ -341,6 +351,91 @@ public class ADQLParser { public ADQLParser(ADQLParserTokenManager tm, ADQLQueryFactory factory) { this(tm, null, factory); } + + /* ADDITIONAL GETTERS & SETTERS */ + + public final void setDebug(boolean debug){ + if (debug) enable_tracing(); + else disable_tracing(); + } + + public final QueryChecker getQueryChecker(){ + return queryChecker; + } + + public final void setQueryChecker(QueryChecker checker){ + queryChecker = checker; + } + + public final ADQLQueryFactory getQueryFactory(){ + return queryFactory; + } + + public final void setQueryFactory(ADQLQueryFactory factory){ + queryFactory = (factory!=null)?factory:(new ADQLQueryFactory()); + } + + /* EXCEPTION HELPER FUNCTION */ + + private final ParseException generateParseException(Exception ex){ + if (!(ex instanceof ParseException)){ + ParseException pex = new ParseException("["+ex.getClass().getName()+"] "+ex.getMessage()); + pex.setStackTrace(ex.getStackTrace()); + return pex; + }else + return (ParseException)ex; + } + + /* QUERY PARSING FUNCTIONS */ + + /** + * Tell whether the given string is a valid ADQL regular identifier. + * + * <p> + * According to the ADQL-2.0's BNF, a regular identifier (i.e. not delimited + * ; not between double quotes) must be a letter followed by a letter, digit + * or underscore. So, the following regular expression: + * </p> + * <pre>[a-zA-Z]+[a-zA-Z0-9_]*</pre> + * + * <p>This is what this function tests on the given string.</p> + * + * @param idCandidate The string to test. + * + * @return <code>true</code> if the given string is a valid regular + * identifier, + * <code>false</code> otherwise. + * + * @see #testRegularIdentifier(adql.parser.Token) + * + * @since 1.5 + */ + public final boolean isRegularIdentifier(final String idCandidate) { + return idCandidate.matches("[a-zA-Z]+[a-zA-Z0-9_]*"); + } + + /** + * Test the given token as an ADQL's regular identifier. + * + * <p> + * This function uses {@link #isRegularIdentifier(java.lang.String)} to + * test the given token's image. If the test fails, a + * {@link adql.parser.ParseException} is thrown. + * </p> + * + * @param token The token to test. + * + * @throws ParseException If the given token is not a valid ADQL regular + * identifier. + * + * @see #isRegularIdentifier(java.lang.String) + * + * @since 1.5 + */ + public final void testRegularIdentifier(final Token token) throws ParseException { + if (!isRegularIdentifier(token.image)) + throw new ParseException("Invalid ADQL regular identifier: \""+token.image+"\"! If it aims to be a column/table name/alias, you should write it between double quotes.", new TextPosition(token)); + } /** * Parses the query given at the creation of this parser or in the @@ -358,7 +453,7 @@ public class ADQLParser { try { return Query(); }catch(TokenMgrError tme) { - throw new ParseException(tme.getMessage(), new TextPosition(tme.getErrorLine(), tme.getErrorColumn())); + throw new ParseException(tme); } } @@ -382,7 +477,7 @@ public class ADQLParser { try { return Query(); }catch(TokenMgrError tme) { - throw new ParseException(tme.getMessage(), new TextPosition(tme.getErrorLine(), tme.getErrorColumn())); + throw new ParseException(tme); } } @@ -406,40 +501,371 @@ public class ADQLParser { try { return Query(); }catch(TokenMgrError tme) { - throw new ParseException(tme.getMessage(), new TextPosition(tme.getErrorLine(), tme.getErrorColumn())); + throw new ParseException(tme); } } - - public final void setDebug(boolean debug){ - if (debug) enable_tracing(); - else disable_tracing(); + + /* CORRECTION SUGGESTION */ + + /** + * Try fixing tokens/terms of the input ADQL query. + * + * <p> + * <b>This function does not try to fix syntactical or semantical errors.</b> + * It just try to fix the most common issues in ADQL queries, such as: + * </p> + * <ul> + * <li>some Unicode characters confusable with ASCII characters (like a + * space, a dash, ...) ; this function replace them by their ASCII + * alternative,</li> + * <li>any of the following are double quoted: + * <ul> + * <li>non regular ADQL identifiers + * (e.g. <code>_RAJ2000</code>),</li> + * <li>ADQL function names used as identifiers + * (e.g. <code>distance</code>)</li> + * <li>and SQL reserved keywords + * (e.g. <code>public</code>).</li> + * </ul> + * </li> + * </ul> + * + * <p><i><b>Note 1:</b> + * The given stream is NOT closed by this function even if the EOF is + * reached. It is the responsibility of the caller to close it. + * </i></p> + * + * <p><i><b>Note 2:</b> + * This function does not use any instance variable of this parser + * (especially the InputStream or Reader provided at initialisation or + * ReInit). + * </i></p> + * + * @param input Stream containing the input ADQL query to fix. + * + * @return The suggested correction of the input ADQL query. + * + * @throws java.io.IOException If there is any error while reading from the + * given input stream. + * @throws ParseException If any unrecognised character is encountered, + * or if anything else prevented the tokenization + * of some characters/words/terms. + * + * @see #tryQuickFix(java.lang.String) + * + * @since 1.5 + */ + public final String tryQuickFix(final java.io.InputStream input) throws java.io.IOException, ParseException { + // Fetch everything into a single string: + StringBuffer buf = new StringBuffer(); + byte[] cBuf = new byte[1024]; + int nbChar; + while((nbChar = input.read(cBuf)) > -1){ + buf.append(new String(cBuf, 0, nbChar)); + } + + // Convert the buffer into a String and now try to fix it: + return tryQuickFix(buf.toString()); } - - public final QueryChecker getQueryChecker(){ - return queryChecker; + + /** + * Try fixing tokens/terms of the given ADQL query. + * + * <p> + * <b>This function does not try to fix syntactical or semantical errors.</b> + * It just try to fix the most common issues in ADQL queries, such as: + * </p> + * <ul> + * <li>some Unicode characters confusable with ASCII characters (like a + * space, a dash, ...) ; this function replace them by their ASCII + * alternative,</li> + * <li>any of the following are double quoted: + * <ul> + * <li>non regular ADQL identifiers + * (e.g. <code>_RAJ2000</code>),</li> + * <li>ADQL function names used as identifiers + * (e.g. <code>distance</code>)</li> + * <li>and SQL reserved keywords + * (e.g. <code>public</code>).</li> + * </ul> + * </li> + * </ul> + * + * <p><i><b>Note:</b> + * This function does not use any instance variable of this parser + * (especially the InputStream or Reader provided at initialisation or + * ReInit). + * </i></p> + * + * @param adqlQuery The input ADQL query to fix. + * + * @return The suggested correction of the given ADQL query. + * + * @throws ParseException If any unrecognised character is encountered, + * or if anything else prevented the tokenization + * of some characters/words/terms. + * + * @since 1.5 + */ + public String tryQuickFix(String adqlQuery) throws ParseException { + StringBuffer suggestedQuery = new StringBuffer(); + + // 1. Replace all Unicode confusable characters: + adqlQuery = replaceUnicodeConfusables(adqlQuery); + + /* 1.bis. Normalise new lines and tabulations + * (to simplify the column counting): */ + adqlQuery = adqlQuery.replaceAll("(\r\n|\r|\n)", System.getProperty("line.separator")).replaceAll("\t", " "); + + // 2. Analyse the query token by token: + ADQLParserTokenManager parser = new ADQLParserTokenManager(new SimpleCharStream(new java.io.ByteArrayInputStream(adqlQuery.getBytes()))); + + final String[] lines = adqlQuery.split(System.getProperty("line.separator")); + + try{ + String suggestedToken; + int lastLine = 1, lastCol = 1; + + Token token = null, nextToken = parser.getNextToken(); + // for all tokens until the EOF or EOQ: + do{ + // get the next token: + token = nextToken; + nextToken = (isEnd(token) ? null : parser.getNextToken()); + + // 3. Double quote any suspect token: + if (mustEscape(token, nextToken)){ + suggestedToken = "\"" + token.image + "\""; + }else + suggestedToken = token.image; + + /* 4. Append all space characters (and comments) before the + * token: */ + /* same line, just get the space characters between the last + * token and the one to append: */ + if (lastLine == token.beginLine){ + suggestedQuery.append(lines[lastLine - 1].substring(lastCol - 1, token.beginColumn - (isEnd(token) ? 0 : 1))); + lastCol = token.endColumn + 1; + } + // not the same line... + else{ + /* append all remaining space characters until the position + * of the token to append: */ + do{ + suggestedQuery.append(lines[lastLine - 1].substring(lastCol - 1)).append('\n'); + lastLine++; + lastCol = 1; + }while(lastLine < token.beginLine); + /* if there are still space characters before the token, + * append them as well: */ + if (lastCol < token.beginColumn) + suggestedQuery.append(lines[lastLine - 1].substring(lastCol - 1, token.beginColumn - 1)); + // finally, set the correct column position: + lastCol = token.endColumn + 1; + } + + // 5. Append the suggested token: + suggestedQuery.append(suggestedToken); + + }while(!isEnd(token)); + + }catch(TokenMgrError err){ + // wrap such errors and propagate them: + throw new ParseException(err); + } + + return suggestedQuery.toString(); } - - public final void setQueryChecker(QueryChecker checker){ - queryChecker = checker; + + /** + * All of the most common Unicode confusable characters and their + * ASCII/UTF-8 alternative. + * + * <p> + * Keys of this map represent the ASCII character while the values are the + * regular expression for all possible Unicode alternatives. + * </p> + * + * <p><i><b>Note:</b> + * All of them have been listed using + * <a href="https://unicode.org/cldr/utility/confusables.jsp">Unicode Utilities: Confusables</a>. + * </i></p> + * + * @since 1.5 + */ + protected final static java.util.Map<String, String> REGEX_UNICODE_CONFUSABLES = new java.util.HashMap<String, String>(10); + /** Regular expression matching all Unicode alternatives for <code>-</code>. + * @since 1.5 */ + protected final static String REGEX_DASH = "[\u002D\u02D7\u06D4\u2010\u2011\u2012\u2013\u2043\u2212\u2796\u2CBA\uFE58\u2014\u2015\u207B\u208B\u0096\u058A\uFE63\uFF0D]"; + /** Regular expression matching all Unicode alternatives for <code>_</code>. + * @since 1.5 */ + protected final static String REGEX_UNDERSCORE = "[\u005F\u07FA\uFE4D\uFE4E\uFE4F]"; + /** Regular expression matching all Unicode alternatives for <code>'</code>. + * @since 1.5 */ + protected final static String REGEX_QUOTE = "[\u0027\u0060\u00B4\u02B9\u02BB\u02BC\u02BD\u02BE\u02C8\u02CA\u02CB\u02F4\u0374\u0384\u055A\u055D\u05D9\u05F3\u07F4\u07F5\u144A\u16CC\u1FBD\u1FBF\u1FEF\u1FFD\u1FFE\u2018\u2019\u201B\u2032\u2035\uA78C\uFF07\uFF40]"; + /** Regular expression matching all Unicode alternatives for <code>"</code>. + * @since 1.5 */ + protected final static String REGEX_DOUBLE_QUOTE = "[\u02BA\u02DD\u02EE\u02F6\u05F2\u05F4\u1CD3\u201C\u201D\u201F\u2033\u2036\u3003\uFF02]"; + /** Regular expression matching all Unicode alternatives for <code>.</code>. + * @since 1.5 */ + protected final static String REGEX_STOP = "[\u002E\u0660\u06F0\u0701\u0702\u2024\uA4F8\uA60E]"; + /** Regular expression matching all Unicode alternatives for <code>+</code>. + * @since 1.5 */ + protected final static String REGEX_PLUS = "[\u002B\u16ED\u2795]"; + /** Regular expression matching all Unicode alternatives for <code> </code>. + * @since 1.5 */ + protected final static String REGEX_SPACE = "[\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F]"; + /** Regular expression matching all Unicode alternatives for <code><</code>. + * @since 1.5 */ + protected final static String REGEX_LESS_THAN = "[\u003C\u02C2\u1438\u16B2\u2039\u276E]"; + /** Regular expression matching all Unicode alternatives for <code>></code>. + * @since 1.5 */ + protected final static String REGEX_GREATER_THAN = "[\u003E\u02C3\u1433\u203A\u276F]"; + /** Regular expression matching all Unicode alternatives for <code>=</code>. + * @since 1.5 */ + protected final static String REGEX_EQUAL = "[\u003D\u1400\u2E40\u30A0\uA4FF]"; + static { + REGEX_UNICODE_CONFUSABLES.put("-", REGEX_DASH); + REGEX_UNICODE_CONFUSABLES.put("_", REGEX_UNDERSCORE); + REGEX_UNICODE_CONFUSABLES.put("'", REGEX_QUOTE); + REGEX_UNICODE_CONFUSABLES.put("\"", REGEX_DOUBLE_QUOTE); + REGEX_UNICODE_CONFUSABLES.put(".", REGEX_STOP); + REGEX_UNICODE_CONFUSABLES.put("+", REGEX_PLUS); + REGEX_UNICODE_CONFUSABLES.put(" ", REGEX_SPACE); + REGEX_UNICODE_CONFUSABLES.put("<", REGEX_LESS_THAN); + REGEX_UNICODE_CONFUSABLES.put(">", REGEX_GREATER_THAN); + REGEX_UNICODE_CONFUSABLES.put("=", REGEX_EQUAL); } - - public final ADQLQueryFactory getQueryFactory(){ - return queryFactory; + + /** + * Replace all Unicode characters that can be confused with other ASCI/UTF-8 + * characters (e.g. different spaces, dashes, ...) in their ASCII version. + * + * @param adqlQuery The ADQL query string in which Unicode confusable + * characters must be replaced. + * + * @return The same query without the most common Unicode confusable + * characters. + * + * @since 1.5 + */ + protected String replaceUnicodeConfusables(final String adqlQuery){ + String newAdqlQuery = adqlQuery; + for(java.util.Map.Entry<String, String> confusable : REGEX_UNICODE_CONFUSABLES.entrySet()) + newAdqlQuery = newAdqlQuery.replaceAll(confusable.getValue(), confusable.getKey()); + return newAdqlQuery; } - - public final void setQueryFactory(ADQLQueryFactory factory){ - queryFactory = (factory!=null)?factory:(new ADQLQueryFactory()); + + /** + * Tell whether the given token represents the end of an ADQL query. + * + * @param token Token to analyze. + * + * @return <code>true</code> if the given token represents a query end, + * <code>false</code> otherwise. + * + * @since 1.5 + */ + protected boolean isEnd(final Token token){ + return token.kind == ADQLParserConstants.EOF || token.kind == ADQLParserConstants.EOQ; } - - private final ParseException generateParseException(Exception ex){ - if (!(ex instanceof ParseException)){ - ParseException pex = new ParseException("["+ex.getClass().getName()+"] "+ex.getMessage()); - pex.setStackTrace(ex.getStackTrace()); - return pex; - }else - return (ParseException)ex; + + /** + * Tell whether the given token must be double quoted. + * + * <p> + * This function considers all the following as terms to double quote: + * </p> + * <ul> + * <li>SQL reserved keywords</li>, + * <li>unrecognised regular identifiers (e.g. neither a delimited nor a + * valid ADQL regular identifier)</li> + * <li>and ADQL function name without a parameters list.</li> + * </ul> + * + * @param token The token to analyze. + * @param nextToken The following token. (useful to detect the start of a + * function's parameters list) + * + * @return <code>true</code> if the given token must be double quoted, + * <code>false</code> to keep it as provided. + * + * @since 1.5 + */ + protected boolean mustEscape(final Token token, final Token nextToken){ + switch(token.kind){ + case ADQLParserConstants.SQL_RESERVED_WORD: + return true; + case ADQLParserConstants.REGULAR_IDENTIFIER_CANDIDATE: + return !isRegularIdentifier(token.image); + default: + return isFunctionName(token) && (nextToken == null || nextToken.kind != ADQLParserConstants.LEFT_PAR); + } } + /** + * Tell whether the given token matches to an ADQL function name. + * + * @param token The token to analyze. + * + * @return <code>true</code> if the given token is an ADQL function name, + * <code>false</code> otherwise. + * + * @since 1.5 + */ + protected boolean isFunctionName(final Token token){ + switch(token.kind){ + case ADQLParserConstants.COUNT: + case ADQLParserConstants.EXISTS: + case ADQLParserConstants.AVG: + case ADQLParserConstants.MAX: + case ADQLParserConstants.MIN: + case ADQLParserConstants.SUM: + case ADQLParserConstants.BOX: + case ADQLParserConstants.CENTROID: + case ADQLParserConstants.CIRCLE: + case ADQLParserConstants.POINT: + case ADQLParserConstants.POLYGON: + case ADQLParserConstants.REGION: + case ADQLParserConstants.CONTAINS: + case ADQLParserConstants.INTERSECTS: + case ADQLParserConstants.AREA: + case ADQLParserConstants.COORD1: + case ADQLParserConstants.COORD2: + case ADQLParserConstants.COORDSYS: + case ADQLParserConstants.DISTANCE: + case ADQLParserConstants.ABS: + case ADQLParserConstants.CEILING: + case ADQLParserConstants.DEGREES: + case ADQLParserConstants.EXP: + case ADQLParserConstants.FLOOR: + case ADQLParserConstants.LOG: + case ADQLParserConstants.LOG10: + case ADQLParserConstants.MOD: + case ADQLParserConstants.PI: + case ADQLParserConstants.POWER: + case ADQLParserConstants.RADIANS: + case ADQLParserConstants.RAND: + case ADQLParserConstants.ROUND: + case ADQLParserConstants.SQRT: + case ADQLParserConstants.TRUNCATE: + case ADQLParserConstants.ACOS: + case ADQLParserConstants.ASIN: + case ADQLParserConstants.ATAN: + case ADQLParserConstants.ATAN2: + case ADQLParserConstants.COS: + case ADQLParserConstants.COT: + case ADQLParserConstants.SIN: + case ADQLParserConstants.TAN: + case ADQLParserConstants.USING: + return true; + default: + return false; + } + } + + /* MAIN PROGRAM */ + /** * Gets the specified ADQL query and parses the given ADQL query. The SQL * translation is then printed if the syntax is correct. @@ -447,21 +873,13 @@ public class ADQLParser { * <p> * <b>ONLY the syntax is checked: the query is NOT EXECUTED !</b> * </p> - * - * <p>Supplied parameters are: - * <ul> - * <li>[-debug] -url http://...</li> - * <li>[-debug] -file ...</li> - * <li>[-debug] -query SELECT...</li> - * </ul> - * </p> * * @param args * @throws Exception */ public static final void main(String[] args) throws Exception { - final String USAGE = "Usage:\n\tadqlParser.jar [-d] [-v] [-e] [-a|-s] [<FILE>|<URL>]\n\nNOTE: If no file or URL is given, the ADQL query is expected in the standard input. This query must end with a ';' !\n\nParameters:\n\t-v or --verbose : Print the main steps of the parsing\n\t-d or --debug : Print stack traces when a grave error occurs\n\t-e or --explain : Explain the ADQL parsing (or Expand the parsing tree)\n\t-a or --adql : Display the understood ADQL query\n\t-s or --sql : Ask the SQL translation of the given ADQL query (SQL compatible with PostgreSQL)\n\nReturn:\n\tBy default: nothing if the query is correct. Otherwise a message explaining why the query is not correct is displayed.\n\tWith the -s option, the SQL translation of the given ADQL query will be returned.\n\tWith the -a option, the ADQL query is returned as it has been understood.\n\nExit status:\n\t0\tOK !\n\t1\tParameter error (missing or incorrect parameter)\n\t2\tFile error (incorrect file/url, reading error, ...)\n\t3\tParsing error (syntactic or semantic error)\n\t4\tTranslation error (a problem has occurred during the translation of the given ADQL query in SQL)."; + final String USAGE = "Usage:\n adqlParser.jar [-d] [-v] [-e] [-a|-s] [-f] [<FILE>|<URL>]\n\nNOTE: If no file or URL is given, the ADQL query is expected in the standard\n input. This query must end with a ';' or <Ctrl+D>!\n\nParameters:\n -v or --verbose : Print the main steps of the parsing\n -d or --debug : Print stack traces when a grave error occurs\n -e or --explain : Explain the ADQL parsing (or Expand the parsing tree)\n -a or --adql : Display the understood ADQL query\n -s or --sql : Ask the SQL translation of the given ADQL query\n (SQL compatible with PostgreSQL)\n -f or --try-fix : Try fixing the most common ADQL query issues before\n attempting to parse the query.\n\nReturn:\n By default: nothing if the query is correct. Otherwise a message explaining\n why the query is not correct is displayed.\n With the -s option, the SQL translation of the given ADQL query will be\n returned.\n With the -a option, the ADQL query is returned as it has been understood.\n\nExit status:\n 0 OK !\n 1 Parameter error (missing or incorrect parameter)\n 2 File error (incorrect file/url, reading error, ...)\n 3 Parsing error (syntactic or semantic error)\n 4 Translation error (a problem has occurred during the translation of the\n given ADQL query in SQL)."; ADQLParser parser; @@ -469,7 +887,7 @@ public class ADQLParser { String file = null, metaFile = null; short mode = -1; - boolean verbose=false, debug=false, explain=false; + boolean verbose=false, debug=false, explain=false, tryFix=false; // Parameters reading: for(int i=0; i<args.length; i++){ @@ -491,7 +909,9 @@ public class ADQLParser { System.exit(1); }else mode = 2; - }else if (args[i].equalsIgnoreCase("-h") || args[i].equalsIgnoreCase("--help")){ + }else if (args[i].equalsIgnoreCase("-f") || args[i].equalsIgnoreCase("--try-fix")) + tryFix = true; + else if (args[i].equalsIgnoreCase("-h") || args[i].equalsIgnoreCase("--help")){ System.out.println(USAGE); System.exit(0); }else if (args[i].startsWith("-")){ @@ -503,13 +923,49 @@ public class ADQLParser { try{ - if (file == null || file.length()==0) - parser = new ADQLParser(System.in); - else if (file.matches(urlRegex)) - parser = new ADQLParser((new java.net.URL(file)).openStream()); - else - parser = new ADQLParser(new FileReader(file)); + // Try fixing the query, if asked: + if (tryFix) { + if (verbose) + System.out.println("((i)) Trying to automatically fix the query..."); + + String query; + java.io.InputStream in = null; + try { + // get the input stream... + if (file == null || file.length() == 0) + in = System.in; + else if (file.matches(urlRegex)) + in = (new java.net.URL(file)).openStream(); + else + in = new java.io.FileInputStream(file); + + // ...and try fixing the query: + query = (new ADQLParser()).tryQuickFix(in); + } finally { + // close the stream (if opened): + if (in != null) + in.close(); + in = null; + } + + if (verbose) + System.out.println("((i)) SUGGESTED QUERY:\n" + query); + + // Initialise the parser with this fixed query: + parser = new ADQLParser(new java.io.ByteArrayInputStream(query.getBytes())); + } + // Otherwise, take the query as provided: + else { + // Initialise the parser with the specified input: + if (file == null || file.length() == 0) + parser = new ADQLParser(System.in); + else if (file.matches(urlRegex)) + parser = new ADQLParser((new java.net.URL(file)).openStream()); + else + parser = new ADQLParser(new java.io.FileInputStream(file)); + } + // Enable/Disable the debugging in function of the parameters: parser.setDebug(explain); // Query parsing: @@ -743,18 +1199,6 @@ SKIP : { < <MINUS><MINUS> (~["\n","\r"])* ("\n"|"\r"|"\r\n")? > } <WithinString> MORE : { < ~["'"] | ("''") > } <WithinString> TOKEN : { < STRING_LITERAL: "'" >: DEFAULT } -/* ************************************************* */ -/* Identifier (column, tables, ...) */ -/* ************************************************* */ -<DEFAULT> MORE : { "\"" : WithinDelimitedId } -<WithinDelimitedId> MORE : { < ~["\""] | ("\"\"") > } -<WithinDelimitedId> TOKEN : { < DELIMITED_IDENTIFIER: "\"" >: DEFAULT } - -TOKEN : { - < REGULAR_IDENTIFIER: (<Letter>)+ (<DIGIT> | <Letter> | "_")* > -| < #Letter: ["a"-"z","A"-"Z"] > -} - /* *************** */ /* Primary numbers */ /* *************** */ @@ -763,6 +1207,18 @@ TOKEN : { | < UNSIGNED_FLOAT: (<UNSIGNED_INTEGER> <DOT> (<UNSIGNED_INTEGER>)?) | (<DOT> <UNSIGNED_INTEGER>) > | < UNSIGNED_INTEGER: (<DIGIT>)+ > | < #DIGIT: ["0"-"9"] > +} + +/* ************************************************* */ +/* Identifier (column, tables, ...) */ +/* ************************************************* */ +<DEFAULT> MORE : { "\"" : WithinDelimitedId } +<WithinDelimitedId> MORE : { < ~["\""] | ("\"\"") > } +<WithinDelimitedId> TOKEN : { < DELIMITED_IDENTIFIER: "\"" >: DEFAULT } + +TOKEN : { + < REGULAR_IDENTIFIER_CANDIDATE: ((<Letter>)+ (<DIGIT> | <Letter>)* | (<DIGIT>)+ <Letter> (<DIGIT> | <Letter>)*) > +| < #Letter: ["a"-"z","A"-"Z","_","?","!","$","@","^","#","`","~","[","]","{","}"] > } /* ########## */ @@ -947,8 +1403,11 @@ void OrderBy(): {ClauseADQL<ADQLOrder> orderBy = query.getOrderBy(); ADQLOrder o /* *************************** */ IdentifierItem Identifier(): {Token t;} { ( - t=<REGULAR_IDENTIFIER> - { return new IdentifierItem(t, false); } + t=<REGULAR_IDENTIFIER_CANDIDATE> + { + testRegularIdentifier(t); + return new IdentifierItem(t, false); + } | t=<DELIMITED_IDENTIFIER> { return new IdentifierItem(t, true); } @@ -1209,7 +1668,7 @@ ADQLOperand ValueExpression(): {ADQLOperand valueExpr = null; Token left, right; (LOOKAHEAD((<PLUS>|<MINUS>) | (Factor() (<PLUS>|<MINUS>|<ASTERISK>|<DIVIDE>))) valueExpr=NumericExpression() | LOOKAHEAD(<COORDSYS> | (StringFactor() <CONCAT>)) valueExpr=StringExpression() | LOOKAHEAD(<LEFT_PAR>) left=<LEFT_PAR> valueExpr=ValueExpression() right=<RIGHT_PAR> { valueExpr = queryFactory.createWrappedOperand(valueExpr); ((WrappedOperand)valueExpr).setPosition(new TextPosition(left, right)); } - | LOOKAHEAD(<REGULAR_IDENTIFIER> <LEFT_PAR>) valueExpr=UserDefinedFunction() + | LOOKAHEAD(<REGULAR_IDENTIFIER_CANDIDATE> <LEFT_PAR>) valueExpr=UserDefinedFunction() | LOOKAHEAD(2) valueExpr=GeometryValueFunction() | LOOKAHEAD(Column()) valueExpr=Column() | LOOKAHEAD(String()) valueExpr=StringFactor() @@ -1712,18 +2171,25 @@ MathFunction TrigFunction(): {Token fct=null, end; ADQLOperand param1=null, para } UserDefinedFunction UserDefinedFunction(): {Token fct, end; Vector<ADQLOperand> params = new Vector<ADQLOperand>(); ADQLOperand op;} { - fct=<REGULAR_IDENTIFIER> <LEFT_PAR> (op=ValueExpression() {params.add(op);} (<COMMA> op=ValueExpression() {params.add(op);})*)? end=<RIGHT_PAR> + fct=<REGULAR_IDENTIFIER_CANDIDATE> <LEFT_PAR> (op=ValueExpression() {params.add(op);} (<COMMA> op=ValueExpression() {params.add(op);})*)? end=<RIGHT_PAR> { + // Ensure the given function name is valid: + if (!isRegularIdentifier(fct.image)) + throw new ParseException("Invalid (User Defined) Function name: \""+fct.image+"\"!", new TextPosition(fct)); + //System.out.println("INFO [ADQLParser]: \""+fct.image+"\" (from line "+fct.beginLine+" and column "+fct.beginColumn+" to line "+token.endLine+" and column "+(token.endColumn+1)+") is considered as an user defined function !"); + try{ // Build the parameters list: ADQLOperand[] parameters = new ADQLOperand[params.size()]; for(int i=0; i<params.size(); i++) parameters[i] = params.get(i); + // Create the UDF function: UserDefinedFunction udf = queryFactory.createUserDefinedFunction(fct.image, parameters); udf.setPosition(new TextPosition(fct, end)); return udf; + }catch(UnsupportedOperationException uoe){ /* This catch clause is just for backward compatibility: * if the createUserDefinedFunction(...) is overridden and diff --git a/test/adql/parser/TestADQLParser.java b/test/adql/parser/TestADQLParser.java index bf00598..1eedba9 100644 --- a/test/adql/parser/TestADQLParser.java +++ b/test/adql/parser/TestADQLParser.java @@ -19,16 +19,20 @@ import adql.query.operand.StringConstant; public class TestADQLParser { @BeforeClass - public static void setUpBeforeClass() throws Exception{} + public static void setUpBeforeClass() throws Exception{ + } @AfterClass - public static void tearDownAfterClass() throws Exception{} + public static void tearDownAfterClass() throws Exception{ + } @Before - public void setUp() throws Exception{} + public void setUp() throws Exception{ + } @After - public void tearDown() throws Exception{} + public void tearDown() throws Exception{ + } @Test public void testColumnReference(){ @@ -75,7 +79,7 @@ public class TestADQLParser { fail("A SELECT item index is forbidden in GROUP BY! This test should have failed."); }catch(Exception e){ assertEquals(ParseException.class, e.getClass()); - assertEquals(" Encountered \"1\". Was expecting one of: \"\\\"\" <REGULAR_IDENTIFIER> ", e.getMessage()); + assertEquals(" Encountered \"1\". Was expecting one of: \"\\\"\" <REGULAR_IDENTIFIER_CANDIDATE> ", e.getMessage()); } try{ @@ -93,7 +97,7 @@ public class TestADQLParser { fail("A column index is forbidden in USING(...)! This test should have failed."); }catch(Exception e){ assertEquals(ParseException.class, e.getClass()); - assertEquals(" Encountered \"1\". Was expecting one of: \"\\\"\" <REGULAR_IDENTIFIER> ", e.getMessage()); + assertEquals(" Encountered \"1\". Was expecting one of: \"\\\"\" <REGULAR_IDENTIFIER_CANDIDATE> ", e.getMessage()); } } @@ -113,7 +117,7 @@ public class TestADQLParser { public void testJoinTree(){ ADQLParser parser = new ADQLParser(); try{ - String[] queries = new String[]{"SELECT * FROM aTable A JOIN aSecondTable B ON A.id = B.id JOIN aThirdTable C ON B.id = C.id;","SELECT * FROM aTable A NATURAL JOIN aSecondTable B NATURAL JOIN aThirdTable C;"}; + String[] queries = new String[]{ "SELECT * FROM aTable A JOIN aSecondTable B ON A.id = B.id JOIN aThirdTable C ON B.id = C.id;", "SELECT * FROM aTable A NATURAL JOIN aSecondTable B NATURAL JOIN aThirdTable C;" }; for(String q : queries){ ADQLQuery query = parser.parseQuery(q); @@ -167,6 +171,16 @@ public class TestADQLParser { }catch(Throwable t){ assertEquals(ParseException.class, t.getClass()); assertTrue(t.getMessage().startsWith("Incorrect character encountered at l.1, c.10: ")); + assertTrue(t.getMessage().endsWith("Possible cause: a non-ASCI/UTF-8 character (solution: remove/replace it).")); + } + + /* Un-finished double/single quoted string: */ + try{ + (new ADQLParser()).parseQuery("select \"stuff FROM aTable"); + }catch(Throwable t){ + assertEquals(ParseException.class, t.getClass()); + assertTrue(t.getMessage().startsWith("Incorrect character encountered at l.1, c.26: <EOF>")); + assertTrue(t.getMessage().endsWith("Possible cause: a string between single or double quotes which is never closed (solution: well...just close it!).")); } // But in a string, delimited identifier or a comment, it is fine: @@ -305,4 +319,67 @@ public class TestADQLParser { } } + @Test + public void testUDFName(){ + ADQLParser parser = new ADQLParser(); + + // CASE: Valid UDF name => OK + try{ + parser.parseQuery("SELECT foo(p1,p2) FROM aTable"); + }catch(Throwable t){ + t.printStackTrace(); + fail("Unexpected parsing error! This query should have passed. (see console for more details)"); + } + + // CASE: Invalid UDF name => ParseException + final String[] functionsToTest = new String[]{ "_foo", "2do", "do!" }; + for(String fct : functionsToTest){ + try{ + parser.parseQuery("SELECT " + fct + "(p1,p2) FROM aTable"); + fail("A UDF name like \"" + fct + "\" is not allowed by the ADQL grammar. This query should not pass."); + }catch(Throwable t){ + assertEquals(ParseException.class, t.getClass()); + assertEquals("Invalid (User Defined) Function name: \"" + fct + "\"!", t.getMessage()); + } + } + } + + @Test + public void testTryQuickFix(){ + ADQLParser parser = new ADQLParser(); + + try{ + /* CASE: Nothing to fix => exactly the same as provided */ + // raw ASCII query with perfectly regular ADQL identifiers: + assertEquals("SELECT foo, bar FROM aTable", parser.tryQuickFix("SELECT foo, bar FROM aTable")); + // same with \n, \r and \t (replaced by 4 spaces): + assertEquals("SELECT foo," + System.getProperty("line.separator") + " bar" + System.getProperty("line.separator") + "FROM aTable", parser.tryQuickFix("SELECT foo,\r\n\tbar\nFROM aTable")); + // still ASCII query with delimited identifiers and ADQL functions: + assertEquals("SELECT \"foo\"," + System.getProperty("line.separator") + " \"_bar\", AVG(col1)" + System.getProperty("line.separator") + "FROM \"public\".aTable", parser.tryQuickFix("SELECT \"foo\",\r\n\t\"_bar\", AVG(col1)\nFROM \"public\".aTable")); + + /* CASE: Unicode confusable characters => replace by their ASCII alternative */ + assertEquals("SELECT \"_bar\" FROM aTable", parser.tryQuickFix("SELECT \"\uFE4Dbar\" FROM aTable")); + + /* CASE: incorrect regular identifier */ + assertEquals("SELECT \"_bar\" FROM aTable", parser.tryQuickFix("SELECT _bar FROM aTable")); + assertEquals("SELECT \"_bar\" FROM aTable", parser.tryQuickFix("SELECT \uFE4Dbar FROM aTable")); + assertEquals("SELECT \"2mass_id\" FROM aTable", parser.tryQuickFix("SELECT 2mass_id FROM aTable")); + assertEquals("SELECT \"col?\" FROM aTable", parser.tryQuickFix("SELECT col? FROM aTable")); + assertEquals("SELECT \"col[2]\" FROM aTable", parser.tryQuickFix("SELECT col[2] FROM aTable")); + + /* CASE: SQL reserved keyword */ + assertEquals("SELECT \"date\", \"year\", \"user\" FROM \"public\".aTable", parser.tryQuickFix("SELECT date, year, user FROM public.aTable")); + + /* CASE: ADQL function name without parameters list */ + assertEquals("SELECT \"count\", \"distance\" FROM \"schema\".aTable", parser.tryQuickFix("SELECT count, distance FROM schema.aTable")); + + /* CASE: a nice combination of everything (with comments at beginning, middle and end) */ + assertEquals("-- begin comment" + System.getProperty("line.separator") + "SELECT id, \"_raj2000\", \"distance\", (\"date\")," + System.getProperty("line.separator") + " \"min\",min(mag), \"_dej2000\" -- in-between commment" + System.getProperty("line.separator") + "FROM \"public\".mytable -- end comment", parser.tryQuickFix("-- begin comment\r\nSELECT id, \uFE4Draj2000, distance, (date),\r\tmin,min(mag), \"_dej2000\" -- in-between commment\nFROM public.mytable -- end comment")); + + }catch(Throwable t){ + t.printStackTrace(); + fail("Unexpected parsing error! This query should have passed. (see console for more details)"); + } + } + } diff --git a/test/adql/parser/TestIdentifierItem.java b/test/adql/parser/TestIdentifierItem.java index 9c0575f..b2ada44 100644 --- a/test/adql/parser/TestIdentifierItem.java +++ b/test/adql/parser/TestIdentifierItem.java @@ -1,7 +1,7 @@ package adql.parser; import static adql.parser.ADQLParserConstants.DELIMITED_IDENTIFIER; -import static adql.parser.ADQLParserConstants.REGULAR_IDENTIFIER; +import static adql.parser.ADQLParserConstants.REGULAR_IDENTIFIER_CANDIDATE; import static org.junit.Assert.assertEquals; import org.junit.Before; @@ -13,16 +13,18 @@ import adql.parser.IdentifierItems.IdentifierItem; public class TestIdentifierItem { @BeforeClass - public static void setUpBeforeClass() throws Exception{} + public static void setUpBeforeClass() throws Exception{ + } @Before - public void setUp() throws Exception{} + public void setUp() throws Exception{ + } @Test public void testIdentifierItem(){ /* A regular identifier (with no special characters) should be returned * as provided: */ - IdentifierItem identifier = new IdentifierItem(new Token(REGULAR_IDENTIFIER, "m50"), false); + IdentifierItem identifier = new IdentifierItem(new Token(REGULAR_IDENTIFIER_CANDIDATE, "m50"), false); assertEquals("m50", identifier.toString()); /* Ensure doubled double quotes are escaped -- GitLab