From 828736ddccbd2b7abf6bb8c8f8cc15fe99d4be32 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 26 Mar 2020 17:57:24 +0100 Subject: [PATCH 1/8] Explicit MDP checker: allow Streett acceptance for LTL model checking The support for computing end components was already there, so we just have to allow STREETT acceptance in the product construction/LTL generation. --- prism/src/explicit/MDPModelChecker.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prism/src/explicit/MDPModelChecker.java b/prism/src/explicit/MDPModelChecker.java index 1cee5bd74c..d76fe5e068 100644 --- a/prism/src/explicit/MDPModelChecker.java +++ b/prism/src/explicit/MDPModelChecker.java @@ -99,10 +99,11 @@ protected StateValues checkProbPathFormulaLTL(Model model, Expression expr, bool // Build product of MDP and automaton AcceptanceType[] allowedAcceptance = { + AcceptanceType.REACH, AcceptanceType.BUCHI, AcceptanceType.RABIN, AcceptanceType.GENERALIZED_RABIN, - AcceptanceType.REACH + AcceptanceType.STREETT }; product = mcLtl.constructProductMDP(this, (MDP)model, expr, statesOfInterest, allowedAcceptance); From 112a48f5728f3923ce3f8baba18c1c7f902f7c37 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 26 Mar 2020 17:57:24 +0100 Subject: [PATCH 2/8] PropertiesFile: getters for ModelInfo and ModulesFile --- prism/src/parser/ast/PropertiesFile.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/prism/src/parser/ast/PropertiesFile.java b/prism/src/parser/ast/PropertiesFile.java index f110870f57..e927384976 100644 --- a/prism/src/parser/ast/PropertiesFile.java +++ b/prism/src/parser/ast/PropertiesFile.java @@ -92,6 +92,18 @@ public void setModelInfo(ModelInfo modelInfo) } } + /** Get the attached ModelInfo */ + public ModelInfo getModelInfo() + { + return modelInfo; + } + + /** Get the attached ModulesFile (may be {@code null}) */ + public ModulesFile getModulesFile() + { + return modulesFile; + } + public void setFormulaList(FormulaList fl) { formulaList = fl; From be440441806fb27e9ab3573aea21de83f5a07960 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 26 Mar 2020 17:57:24 +0100 Subject: [PATCH 3/8] ModulesFile, PropertiesFile: Store location (path to file), make accessible If we know the filename of a ModulesFile or PropertiesFile, we store it and make it accessible. Note that we don't necessarily have a filename, e.g., when dealing with model code from the GUI that has not yet been saved. Additionally, for symbolic/explicit StateModelChecker, we provide access to the ModulesFile / PropertiesFile stored in the model checker. --- prism/src/explicit/StateModelChecker.java | 13 +++++++++ prism/src/parser/ast/ModulesFile.java | 28 ++++++++++++++++++- prism/src/parser/ast/PropertiesFile.java | 26 +++++++++++++++++ prism/src/prism/Prism.java | 17 +++++++++-- prism/src/prism/StateModelChecker.java | 16 +++++++++++ .../model/GUIMultiModelHandler.java | 3 ++ .../properties/GUIMultiProperties.java | 4 +++ 7 files changed, 104 insertions(+), 3 deletions(-) diff --git a/prism/src/explicit/StateModelChecker.java b/prism/src/explicit/StateModelChecker.java index f73b62837c..46aa52741b 100644 --- a/prism/src/explicit/StateModelChecker.java +++ b/prism/src/explicit/StateModelChecker.java @@ -1583,4 +1583,17 @@ public void exportLabels(Model model, List labels, List labelNam } } } + + /** Get the optionally stored ModulesFile (may be {@code null}) */ + public ModulesFile getModulesFile() + { + return modulesFile; + } + + /** Get the optionally stored ModulesFile (may be {@code null}) */ + public PropertiesFile getPropertiesFile() + { + return propertiesFile; + } + } diff --git a/prism/src/parser/ast/ModulesFile.java b/prism/src/parser/ast/ModulesFile.java index 0d9c33b8a2..df7e6f51fd 100644 --- a/prism/src/parser/ast/ModulesFile.java +++ b/prism/src/parser/ast/ModulesFile.java @@ -26,6 +26,7 @@ package parser.ast; +import java.nio.file.Path; import java.util.*; import param.BigRational; @@ -77,6 +78,9 @@ public class ModulesFile extends ASTElement implements ModelInfo, RewardGenerato // Actual values of (some or all) constants private Values constantValues; + /** (Optional) The location (file) from which this ModulesFile was obtained */ + private Path location; + // Constructor public ModulesFile() @@ -1244,6 +1248,25 @@ public VarList createVarList() throws PrismLangException return new VarList(this); } + /** + * Sets the path to the file underlying this ModulesFile, + * or {@code null} to designate "unknown". + */ + public void setLocation(Path location) + { + // System.err.println("Model: " + location); + this.location = location; + } + + /** + * Returns the path to the file underlying this ModulesFile, if known. + * Returns {@code null} otherwise. + */ + public Path getLocation() + { + return location; + } + // Methods required for ASTElement: /** @@ -1360,7 +1383,10 @@ public ASTElement deepCopy() ret.varNames = (varNames == null) ? null : (Vector)varNames.clone(); ret.varTypes = (varTypes == null) ? null : (Vector)varTypes.clone(); ret.constantValues = (constantValues == null) ? null : new Values(constantValues); - + + // a Path is immutable, no need for deep-copy + ret.location = location; + return ret; } } diff --git a/prism/src/parser/ast/PropertiesFile.java b/prism/src/parser/ast/PropertiesFile.java index e927384976..730127fc73 100644 --- a/prism/src/parser/ast/PropertiesFile.java +++ b/prism/src/parser/ast/PropertiesFile.java @@ -26,6 +26,7 @@ package parser.ast; +import java.nio.file.Path; import java.util.*; import parser.*; @@ -57,6 +58,9 @@ public class PropertiesFile extends ASTElement // Actual values of (some or all) constants private Values constantValues; + /** (Optional) The location (file) from which this PropertiesFile was obtained */ + private Path location; + // Constructor public PropertiesFile(ModelInfo modelInfo) @@ -638,6 +642,25 @@ public Values getConstantValues() return constantValues; } + /** + * Sets the path to the file underlying this PropertiesFile, + * or {@code null} to designate "unknown". + */ + public void setLocation(Path location) + { + // System.err.println("Properties: " + location); + this.location = location; + } + + /** + * Returns the path to the file underlying this PropertiesFile, if known. + * Returns {@code null} otherwise. + */ + public Path getLocation() + { + return location; + } + // Methods required for ASTElement: /** @@ -704,6 +727,9 @@ public ASTElement deepCopy() ret.allIdentsUsed = (allIdentsUsed == null) ? null : (Vector) allIdentsUsed.clone(); ret.constantValues = (constantValues == null) ? null : new Values(constantValues); + // a Path is immutable, no need for deep-copy + ret.location = location; + return ret; } } diff --git a/prism/src/prism/Prism.java b/prism/src/prism/Prism.java index 841fbc8287..850e537efc 100644 --- a/prism/src/prism/Prism.java +++ b/prism/src/prism/Prism.java @@ -1418,6 +1418,10 @@ public ModulesFile parseModelFile(File file, ModelType typeOverride) throws File try { // parse file modulesFile = prismParser.parseModulesFile(strModel, typeOverride); + + if (modulesFile != null) + modulesFile.setLocation(file.toPath().toAbsolutePath()); + } finally { // release prism parser releasePrismParser(); @@ -1514,7 +1518,10 @@ public ModulesFile importModelFile(String lang, File file) throws PrismException PrismLanguageTranslator importer = createPrismLanguageTranslator(lang); importer.load(file); String prismModelString = importer.translateToString(); - return parseModelString(prismModelString); + ModulesFile result = parseModelString(prismModelString); + if (result != null) + result.setLocation(file.toPath().toAbsolutePath()); + return result; } /** @@ -1565,7 +1572,11 @@ public ModulesFile importPrismPreprocFile(File file, String params[]) throws Pri } // Parse string as PRISM model and return - return parseModelString(modelString); + ModulesFile result = parseModelString(modelString); + if (result != null) + result.setLocation(file.toPath().toAbsolutePath()); + + return result; } /** @@ -1629,6 +1640,8 @@ public PropertiesFile parsePropertiesFile(ModelInfo modelInfo, File file, boolea try { // parse file propertiesFile = prismParser.parsePropertiesFile(modelInfo, strProperties); + if (propertiesFile != null) + propertiesFile.setLocation(file.toPath().toAbsolutePath()); } finally { // release prism parser releasePrismParser(); diff --git a/prism/src/prism/StateModelChecker.java b/prism/src/prism/StateModelChecker.java index aa3b4de8fd..bef7cabced 100644 --- a/prism/src/prism/StateModelChecker.java +++ b/prism/src/prism/StateModelChecker.java @@ -1646,6 +1646,22 @@ public void exportLabels(List labelNames, int exportType, File file) thr JDD.Deref(labels[i]); } } + + + /** Get the optionally stored ModulesFile (may be {@code null}) */ + public ModulesFile getModulesFile() + { + if (propertiesFile != null) { + return propertiesFile.getModulesFile(); + } + return null; + } + + /** Get the optionally stored ModulesFile (may be {@code null}) */ + public PropertiesFile getPropertiesFile() + { + return propertiesFile; + } } // ------------------------------------------------------------------------------ diff --git a/prism/src/userinterface/model/GUIMultiModelHandler.java b/prism/src/userinterface/model/GUIMultiModelHandler.java index 21c41b4a0e..869e3aef78 100644 --- a/prism/src/userinterface/model/GUIMultiModelHandler.java +++ b/prism/src/userinterface/model/GUIMultiModelHandler.java @@ -569,6 +569,9 @@ public synchronized void modelParsedSuccessful(ModulesFile m) modifiedSinceParse = false; lastError = "Parse Successful"; + if (activeFile != null) + parsedModel.setLocation(activeFile.toPath().toAbsolutePath()); + editor.modelParseSuccessful(); if (parseAfterParse) { diff --git a/prism/src/userinterface/properties/GUIMultiProperties.java b/prism/src/userinterface/properties/GUIMultiProperties.java index db664ab014..519787157d 100644 --- a/prism/src/userinterface/properties/GUIMultiProperties.java +++ b/prism/src/userinterface/properties/GUIMultiProperties.java @@ -413,6 +413,10 @@ public void experimentAfterParse() // parse property to be used for experiment parsedProperties = getPrism().parsePropertiesString( getLabelsString() + "\n" + getConstantsString() + "\n" + propList.getValidSelectedAndReferencedString()); + + if (activeFile != null) + parsedProperties.setLocation(activeFile.toPath().toAbsolutePath()); + if (parsedProperties.getNumProperties() <= 0) { error("There are no properties selected"); return; From bb5460c667b410746a0c4dc2e097f2c66673017a Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 26 Mar 2020 17:57:24 +0100 Subject: [PATCH 4/8] PathUtil: Some static helper methods for dealing with paths --- prism/src/common/PathUtil.java | 102 +++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 prism/src/common/PathUtil.java diff --git a/prism/src/common/PathUtil.java b/prism/src/common/PathUtil.java new file mode 100644 index 0000000000..83fc57729b --- /dev/null +++ b/prism/src/common/PathUtil.java @@ -0,0 +1,102 @@ +//============================================================================== +// +// Copyright (c) 2016- +// Authors: +// * Joachim Klein (formerly TU Dresden) +// +//------------------------------------------------------------------------------ +// +// This file is part of PRISM. +// +// PRISM is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// PRISM is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with PRISM; if not, write to the Free Software Foundation, +// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//============================================================================== + +package common; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Path; + +import parser.ast.ModulesFile; +import parser.ast.PropertiesFile; + +/** + * Static helpers for dealing with paths. + */ +public class PathUtil +{ + /** + * Returns the absolute path for the directory containing + * the argument file. Returns {@code null} on error, e.g., + * if the file does not exist. + */ + public static File getDirectoryFromFile(File file) + { + return getDirectoryFromFile(file.toPath()).toFile(); + } + + /** + * Returns the absolute path for the directory containing + * the argument file. Returns {@code null} on error, e.g., + * if the file does not exist. + */ + public static Path getDirectoryFromFile(Path filePath) + { + try { + return filePath.toRealPath().getParent(); + } catch (IOException e) { + // E.g., file does not exist + return null; + } + } + + /** + * Returns the path for the directory that is used for loading + * resources (e.g. a HOA automata file) in a property, + * extracting locations from the ModulesFile and PropertiesFile. + *
+ * The location of the properties file is preferred, then the location + * of the modules file. If there is no location, {@code null} is returned + * and should be treated as "current working directory". + */ + public static Path getDirectoryForRelativePropertyResource(ModulesFile mf, PropertiesFile pf) + { + if (pf != null && pf.getLocation() != null) { + return getDirectoryFromFile(pf.getLocation()); + } + + if (mf != null && mf.getLocation() != null) { + return getDirectoryFromFile(mf.getLocation()); + } + + return null; + } + + /** + * Resolves path2 relative to path1 (which has to point to a directory). + * If path2 is absolute, path1 is ignored. + * If path1 is {@code null}, resolution happens relative + * to the current working directory. + */ + public static Path resolvePath(Path path1, Path path2) + { + if (path1 == null) { + path1 = new File(".").toPath(); + } + return path1.resolve(path2); + } + +} From ae307b318539d8f638bac8c22898add0be53a7ff Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 26 Mar 2020 17:57:24 +0100 Subject: [PATCH 5/8] PrismPaths helper: Resolve file system specifications, relative to a model or properties file. This helper can be used to resolve paths given in PRISM properties, e.g., the location of an automaton file in a path expression. If the path is relative, we will resolve it relative to 1) the properties file location (if there is one) 2) the model file location (if there is one) 3) the working directory. Additionally, it's also possible to specify paths using the following three macros: $MODEL_DIR/filename $PROPERTY_DIR/filename $WORKING_DIR/filename which resolve relative to the directory where the model file or the property file is located or the working directory. --- prism/src/prism/PrismPaths.java | 126 ++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 prism/src/prism/PrismPaths.java diff --git a/prism/src/prism/PrismPaths.java b/prism/src/prism/PrismPaths.java new file mode 100644 index 0000000000..e331177f20 --- /dev/null +++ b/prism/src/prism/PrismPaths.java @@ -0,0 +1,126 @@ +//============================================================================== +// +// Copyright (c) 2016- +// Authors: +// * Joachim Klein (formerly TU Dresden) +// +//------------------------------------------------------------------------------ +// +// This file is part of PRISM. +// +// PRISM is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// PRISM is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with PRISM; if not, write to the Free Software Foundation, +// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +//============================================================================== + +package prism; + +import java.io.File; +import java.nio.file.Path; + +import common.PathUtil; +import parser.ast.ModulesFile; +import parser.ast.PropertiesFile; + +/** Helper for resolving relative paths of resources, e.g., HOA automata files in properties */ +public class PrismPaths +{ + /** The directory where the model is located (if known) */ + private Path modelDirectory = null; + /** The directory where the properties file is located (if known) */ + private Path propertyDirectory = null; + + /** + * Constructor, initialise via ModulesFile or PropertiesFile location. + * All parameters may be {@code null}. + */ + public PrismPaths(ModulesFile mf, PropertiesFile pf) + { + if (mf != null && mf.getLocation() != null) { + setModelDirectory(PathUtil.getDirectoryFromFile(mf.getLocation())); + } + if (pf != null && pf.getLocation() != null) { + setPropertyDirectory(PathUtil.getDirectoryFromFile(pf.getLocation())); + } + } + + /** Get the model directory (if known, otherwise {@code null} */ + public Path getModelDirectory() + { + return modelDirectory; + } + + /** Set the model directory (may be {@code null}) */ + public void setModelDirectory(Path modelDirectory) + { + this.modelDirectory = modelDirectory; + } + + /** Get the properties file directory (if known, otherwise {@code null} */ + public Path getPropertyDirectory() + { + return propertyDirectory; + } + + /** Set the properties file directory (may be {@code null}) */ + public void setPropertyDirectory(Path propertyDirectory) + { + this.propertyDirectory = propertyDirectory; + } + + /** + * Resolve a file system location (in a property). + * For a relative location, the property file location or the modules file location + * are taken into account, with a fallback of the current working directory. + * Resolves the $MODEL_DIR, $PROPERTY_DIR and $WORKING_DIR macros. + * + * @param log PrismLog for explanation + * @param location the location (taken from the property) + * @param description a description of the type of the location + */ + public Path resolvePropertyResource(PrismLog log, String location, String description) throws PrismException + { + // do replacements + if (location.startsWith("$MODEL_DIR")) { + if (modelDirectory != null) { + location = location.replace("$MODEL_DIR", modelDirectory.toString()); + } else { + throw new PrismException("Can not replace $MODEL_DIR (location is unknown) for path: " + location); + } + } else if (location.startsWith("$PROPERTY_DIR")) { + if (propertyDirectory != null) { + location = location.replace("$PROPERTY_DIR", propertyDirectory.toString()); + } else { + throw new PrismException("Can not replace $PROPERTY_DIR (location is unknown) for path: " + location); + } + } else if (location.startsWith("$WORKING_DIR")) { + location = location.replace("$WORKING_DIR", new File(".").toPath().toAbsolutePath().toString()); + } + + Path spec = new File(location).toPath(); + if (spec.isAbsolute()) { + return spec.normalize(); + } else if (propertyDirectory != null) { + log.println("Resolving location of " + description + " '"+location+"' relative to properties file directory"); + return PathUtil.resolvePath(propertyDirectory, spec); + } else if (modelDirectory != null) { + log.println("Resolving location of " + description + " '"+location+"' relative to model file directory"); + return PathUtil.resolvePath(modelDirectory, spec); + } else { + log.println("Resolving location of " + description + " '"+location+"' relative to current working directory"); + return PathUtil.resolvePath(new File(".").toPath().toAbsolutePath(), spec); + } + } + +} From 618d69aaa853af295f29e362106045169efe6788 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 26 Mar 2020 17:57:24 +0100 Subject: [PATCH 6/8] PrismParser: refactor double quoted identifiers Before, double quotes were an individual lexical symbol and only syntactic, i.e., inside the quotes only identifier characters were allowed and thus no actual quoting was going on. As we want to support properly quoted string (e.g., for file system locations), we refactor here by providing a rule for QuotedIdentifiers. --- prism/src/parser/PrismParser.java | 1095 ++++++++--------- prism/src/parser/PrismParser.jj | 50 +- prism/src/parser/PrismParserConstants.java | 12 +- prism/src/parser/PrismParserTokenManager.java | 329 ++--- 4 files changed, 751 insertions(+), 735 deletions(-) diff --git a/prism/src/parser/PrismParser.java b/prism/src/parser/PrismParser.java index 51c18ffe55..9c5b55a8f3 100644 --- a/prism/src/parser/PrismParser.java +++ b/prism/src/parser/PrismParser.java @@ -533,10 +533,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ ; break; } @@ -565,10 +565,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ prop = Property(); pf.addProperty(prop); label_3: @@ -640,10 +640,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ ; break; } @@ -672,10 +672,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ prop = Property(); label_5: while (true) { @@ -722,9 +722,7 @@ static class ExpressionPair { public Expression expr1 = null; public Expression Token begin = null; begin = getToken(1); if (jj_2_2(2147483647)) { - jj_consume_token(DQUOTE); - name = Identifier(); - jj_consume_token(DQUOTE); + name = QuotedIdentifier(); jj_consume_token(COLON); } else { ; @@ -850,9 +848,7 @@ static class ExpressionPair { public Expression expr1 = null; public Expression Expression expr = null; if (jj_2_3(2147483647)) { jj_consume_token(LABEL); - jj_consume_token(DQUOTE); - name = IdentifierExpression(); - jj_consume_token(DQUOTE); + name = QuotedIdentifierExpression(); jj_consume_token(EQ); expr = Expression(false, false); jj_consume_token(SEMICOLON); @@ -1147,10 +1143,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ prob = Expression(false, false); jj_consume_token(COLON); update = Update(); @@ -1278,9 +1274,7 @@ static class ExpressionPair { public Expression expr1 = null; public Expression Token begin = null, begin2 = null; begin = jj_consume_token(REWARDS); if (jj_2_6(2147483647)) { - jj_consume_token(DQUOTE); - name = Identifier(); - jj_consume_token(DQUOTE); + name = QuotedIdentifier(); rs.setName(name); } else { ; @@ -1312,10 +1306,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ ; break; } @@ -1371,9 +1365,7 @@ static class ExpressionPair { public Expression expr1 = null; public Expression SystemDefn sysdef; jj_consume_token(SYSTEM); if (jj_2_7(2147483647)) { - jj_consume_token(DQUOTE); - name = Identifier(); - jj_consume_token(DQUOTE); + name = QuotedIdentifier(); } else { ; } @@ -1594,10 +1586,8 @@ static class ExpressionPair { public Expression expr1 = null; public Expression sys = new SystemModule(name); break; } - case DQUOTE:{ - jj_consume_token(DQUOTE); - name = Identifier(); - jj_consume_token(DQUOTE); + case REG_QUOTED_IDENT:{ + name = QuotedIdentifier(); sys = new SystemReference(name); break; } @@ -1778,10 +1768,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ ret = ExpressionITE(prop, pathprop); break; } @@ -1828,10 +1818,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ uBound = Expression(false, false); break; } @@ -1873,10 +1863,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ uBound = Expression(false, false); break; } @@ -1918,10 +1908,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ lBound = Expression(false, false); break; } @@ -1963,10 +1953,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ lBound = Expression(false, false); break; } @@ -2154,10 +2144,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ ret = ExpressionEquality(prop, pathprop); break; } @@ -2346,10 +2336,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case LPARENTH: case DLBRACKET: case DLT: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ ret = ExpressionBasic(prop, pathprop); break; } @@ -2420,7 +2410,7 @@ static class ExpressionPair { public Expression expr1 = null; public Expression ret = ExpressionStrategy(prop, pathprop); break; } - case DQUOTE:{ + case REG_QUOTED_IDENT:{ ret = ExpressionLabel(prop, pathprop); break; } @@ -2979,9 +2969,7 @@ static class ExpressionPair { public Expression expr1 = null; public Expression Object indexDiv = null; jj_consume_token(LBRACE); if (jj_2_15(2147483647)) { - jj_consume_token(DQUOTE); - index = Identifier(); - jj_consume_token(DQUOTE); + index = QuotedIdentifier(); } else { switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case A: @@ -3007,10 +2995,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ index = Expression(false, false); break; } @@ -3026,9 +3014,7 @@ static class ExpressionPair { public Expression expr1 = null; public Expression jj_consume_token(DIVIDE); jj_consume_token(LBRACE); if (jj_2_16(2147483647)) { - jj_consume_token(DQUOTE); - indexDiv = Identifier(); - jj_consume_token(DQUOTE); + indexDiv = QuotedIdentifier(); } else { switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { case A: @@ -3054,10 +3040,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ indexDiv = Expression(false, false); break; } @@ -3145,10 +3131,10 @@ static class ExpressionPair { public Expression expr1 = null; public Expression case DLBRACKET: case DLT: case MINUS: - case DQUOTE: case REG_INT: case REG_DOUBLE: - case REG_IDENT:{ + case REG_IDENT: + case REG_QUOTED_IDENT:{ expr = Expression(prop, true); ret = expr; break; @@ -3332,28 +3318,13 @@ static class ExpressionPair { public Expression expr1 = null; public Expression // (Property) expression: label (including "init") static final public -Expression ExpressionLabel(boolean prop, boolean pathprop) throws ParseException {String s; +Expression ExpressionLabel(boolean prop, boolean pathprop) throws ParseException {ExpressionIdent qi; ExpressionLabel ret = null; Token begin; if (!prop) {if (true) throw generateParseException();} - begin = jj_consume_token(DQUOTE); - switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) { - case REG_IDENT:{ - s = Identifier(); - break; - } - case INIT:{ - jj_consume_token(INIT); -s = "init"; - break; - } - default: - jj_la1[94] = jj_gen; - jj_consume_token(-1); - throw new ParseException(); - } - jj_consume_token(DQUOTE); -ret = new ExpressionLabel(s); ret.setPosition(begin, getToken(0)); {if ("" != null) return ret;} + // Label can be arbitary quoted identifier + qi = QuotedIdentifierExpression(); +ret = new ExpressionLabel(qi.getName()); ret.setPosition(qi,qi); {if ("" != null) return ret;} throw new Error("Missing return statement in function"); } @@ -3399,7 +3370,7 @@ static class ExpressionPair { public Expression expr1 = null; public Expression break; } default: - jj_la1[95] = jj_gen; + jj_la1[94] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3412,7 +3383,7 @@ static class ExpressionPair { public Expression expr1 = null; public Expression break; } default: - jj_la1[96] = jj_gen; + jj_la1[95] = jj_gen; ; } jj_consume_token(RPARENTH); @@ -3432,6 +3403,14 @@ String Identifier() throws ParseException { throw new Error("Missing return statement in function"); } + static final public String QuotedIdentifier() throws ParseException { + jj_consume_token(REG_QUOTED_IDENT); +String s = getToken(0).image; + // remove " + {if ("" != null) return s.substring(1,s.length()-1);} + throw new Error("Missing return statement in function"); + } + // Identifier (returns ExpressionIdent, storing position info) static final public ExpressionIdent IdentifierExpression() throws ParseException {String ident; @@ -3441,6 +3420,17 @@ String Identifier() throws ParseException { throw new Error("Missing return statement in function"); } +// QuotedIdentifier (returns ExpressionIdent, storing position info) + static final public +ExpressionIdent QuotedIdentifierExpression() throws ParseException {String ident; + ExpressionIdent ret; + Token begin; +begin = getToken(1); + ident = QuotedIdentifier(); +ret = new ExpressionIdent(ident); ret.setPosition(begin, getToken(0)); {if ("" != null) return ret;} + throw new Error("Missing return statement in function"); + } + // Identifier or min/max keyword (returns ExpressionIdent, storing position info) static final public ExpressionIdent IdentifierExpressionMinMax() throws ParseException {String ident; @@ -3461,7 +3451,7 @@ String Identifier() throws ParseException { break; } default: - jj_la1[97] = jj_gen; + jj_la1[96] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3498,7 +3488,7 @@ int EqNeq() throws ParseException { break; } default: - jj_la1[98] = jj_gen; + jj_la1[97] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3530,7 +3520,7 @@ int LtGt() throws ParseException { break; } default: - jj_la1[99] = jj_gen; + jj_la1[98] = jj_gen; jj_consume_token(-1); throw new ParseException(); } @@ -3556,7 +3546,7 @@ int LtGt() throws ParseException { break; } default: - jj_la1[100] = jj_gen; + jj_la1[99] = jj_gen; ; } jj_consume_token(0); @@ -3713,18 +3703,18 @@ static private boolean jj_2_18(int xla) finally { jj_save(17, xla); } } - static private boolean jj_3R_164() + static private boolean jj_3R_166() { if (jj_3R_29()) return true; return false; } - static private boolean jj_3R_46() + static private boolean jj_3R_48() { - if (jj_3R_55()) return true; + if (jj_3R_57()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_56()) jj_scanpos = xsp; + if (jj_3R_58()) jj_scanpos = xsp; return false; } @@ -3734,40 +3724,46 @@ static private boolean jj_3R_184() return false; } - static private boolean jj_3R_90() + static private boolean jj_3R_92() { if (jj_scan_token(COMMA)) return true; if (jj_3R_29()) return true; return false; } - static private boolean jj_3R_146() + static private boolean jj_3R_34() { - if (jj_scan_token(LPARENTH)) return true; - if (jj_3R_38()) return true; - if (jj_scan_token(RPARENTH)) return true; + if (jj_3R_29()) return true; return false; } - static private boolean jj_3R_32() + static private boolean jj_3R_148() { - if (jj_3R_29()) return true; + if (jj_scan_token(LPARENTH)) return true; + if (jj_3R_40()) return true; + if (jj_scan_token(RPARENTH)) return true; return false; } - static private boolean jj_3R_163() + static private boolean jj_3R_165() { if (jj_scan_token(MAX)) return true; return false; } - static private boolean jj_3R_157() + static private boolean jj_3R_159() { if (jj_scan_token(FALSE)) return true; return false; } - static private boolean jj_3R_156() + static private boolean jj_3R_30() + { + if (jj_scan_token(REG_QUOTED_IDENT)) return true; + return false; + } + + static private boolean jj_3R_158() { if (jj_scan_token(TRUE)) return true; return false; @@ -3785,9 +3781,9 @@ static private boolean jj_3R_181() return false; } - static private boolean jj_3R_38() + static private boolean jj_3R_40() { - if (jj_3R_46()) return true; + if (jj_3R_48()) return true; return false; } @@ -3803,13 +3799,7 @@ static private boolean jj_3_4() return false; } - static private boolean jj_3R_179() - { - if (jj_scan_token(INIT)) return true; - return false; - } - - static private boolean jj_3R_155() + static private boolean jj_3R_157() { if (jj_scan_token(REG_DOUBLE)) return true; return false; @@ -3818,27 +3808,27 @@ static private boolean jj_3R_155() static private boolean jj_3_3() { if (jj_scan_token(LABEL)) return true; - if (jj_scan_token(DQUOTE)) return true; + if (jj_3R_31()) return true; return false; } static private boolean jj_3R_186() { if (jj_scan_token(COMMA)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_162() + static private boolean jj_3R_164() { if (jj_scan_token(MIN)) return true; return false; } - static private boolean jj_3R_79() + static private boolean jj_3R_81() { if (jj_scan_token(LPARENTH)) return true; - if (jj_3R_31()) return true; + if (jj_3R_33()) return true; if (jj_scan_token(RPARENTH)) return true; return false; } @@ -3855,17 +3845,15 @@ static private boolean jj_3R_182() return false; } - static private boolean jj_3R_154() + static private boolean jj_3R_156() { if (jj_scan_token(REG_INT)) return true; return false; } - static private boolean jj_3R_78() + static private boolean jj_3R_80() { - if (jj_scan_token(DQUOTE)) return true; - if (jj_3R_29()) return true; - if (jj_scan_token(DQUOTE)) return true; + if (jj_3R_30()) return true; return false; } @@ -3875,63 +3863,57 @@ static private boolean jj_3R_180() return false; } - static private boolean jj_3R_142() + static private boolean jj_3R_144() { Token xsp; xsp = jj_scanpos; - if (jj_3R_154()) { + if (jj_3R_156()) { jj_scanpos = xsp; - if (jj_3R_155()) { + if (jj_3R_157()) { jj_scanpos = xsp; - if (jj_3R_156()) { + if (jj_3R_158()) { jj_scanpos = xsp; - if (jj_3R_157()) return true; + if (jj_3R_159()) return true; } } } return false; } - static private boolean jj_3R_178() - { - if (jj_3R_29()) return true; - return false; - } - - static private boolean jj_3R_77() + static private boolean jj_3R_79() { if (jj_3R_29()) return true; return false; } - static private boolean jj_3R_70() + static private boolean jj_3R_72() { if (jj_scan_token(COMMA)) return true; if (jj_3R_29()) return true; return false; } - static private boolean jj_3R_160() + static private boolean jj_3R_162() { if (jj_scan_token(MAX)) return true; return false; } - static private boolean jj_3R_68() + static private boolean jj_3R_70() { Token xsp; xsp = jj_scanpos; - if (jj_3R_77()) { + if (jj_3R_79()) { jj_scanpos = xsp; - if (jj_3R_78()) { + if (jj_3R_80()) { jj_scanpos = xsp; - if (jj_3R_79()) return true; + if (jj_3R_81()) return true; } } return false; } - static private boolean jj_3R_153() + static private boolean jj_3R_155() { if (jj_scan_token(FILTER)) return true; if (jj_scan_token(LPARENTH)) return true; @@ -3954,16 +3936,16 @@ static private boolean jj_3R_153() } } if (jj_scan_token(COMMA)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; xsp = jj_scanpos; if (jj_3R_186()) jj_scanpos = xsp; if (jj_scan_token(RPARENTH)) return true; return false; } - static private boolean jj_3R_161() + static private boolean jj_3R_163() { - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; Token xsp; while (true) { xsp = jj_scanpos; @@ -3972,7 +3954,7 @@ static private boolean jj_3R_161() return false; } - static private boolean jj_3R_91() + static private boolean jj_3R_93() { if (jj_scan_token(COMMA)) return true; if (jj_3R_29()) return true; @@ -3989,7 +3971,16 @@ static private boolean jj_3_9() return false; } - static private boolean jj_3R_81() + static private boolean jj_3R_52() + { + if (jj_scan_token(OR)) return true; + if (jj_scan_token(OR)) return true; + if (jj_scan_token(OR)) return true; + if (jj_3R_37()) return true; + return false; + } + + static private boolean jj_3R_83() { if (jj_scan_token(LBRACE)) return true; if (jj_3R_29()) return true; @@ -3998,96 +3989,80 @@ static private boolean jj_3R_81() Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_91()) { jj_scanpos = xsp; break; } + if (jj_3R_93()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACE)) return true; return false; } - static private boolean jj_3R_50() - { - if (jj_scan_token(OR)) return true; - if (jj_scan_token(OR)) return true; - if (jj_scan_token(OR)) return true; - if (jj_3R_35()) return true; - return false; - } - - static private boolean jj_3R_145() + static private boolean jj_3R_147() { if (jj_scan_token(FUNC)) return true; if (jj_scan_token(LPARENTH)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_162()) { + if (jj_3R_164()) { jj_scanpos = xsp; - if (jj_3R_163()) { + if (jj_3R_165()) { jj_scanpos = xsp; - if (jj_3R_164()) return true; + if (jj_3R_166()) return true; } } if (jj_scan_token(COMMA)) return true; - if (jj_3R_161()) return true; + if (jj_3R_163()) return true; if (jj_scan_token(RPARENTH)) return true; return false; } - static private boolean jj_3R_152() + static private boolean jj_3R_154() { - if (jj_scan_token(DQUOTE)) return true; - Token xsp; - xsp = jj_scanpos; - if (jj_3R_178()) { - jj_scanpos = xsp; - if (jj_3R_179()) return true; - } - if (jj_scan_token(DQUOTE)) return true; + if (jj_3R_31()) return true; return false; } static private boolean jj_3R_207() { - if (jj_3R_148()) return true; + if (jj_3R_150()) return true; return false; } - static private boolean jj_3R_80() + static private boolean jj_3R_71() { - if (jj_scan_token(DIVIDE)) return true; - if (jj_scan_token(LBRACE)) return true; - if (jj_3R_29()) return true; Token xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_90()) { jj_scanpos = xsp; break; } + xsp = jj_scanpos; + if (jj_3R_82()) { + jj_scanpos = xsp; + if (jj_3R_83()) return true; } - if (jj_scan_token(RBRACE)) return true; return false; } - static private boolean jj_3R_69() + static private boolean jj_3R_82() { + if (jj_scan_token(DIVIDE)) return true; + if (jj_scan_token(LBRACE)) return true; + if (jj_3R_29()) return true; Token xsp; - xsp = jj_scanpos; - if (jj_3R_80()) { - jj_scanpos = xsp; - if (jj_3R_81()) return true; + while (true) { + xsp = jj_scanpos; + if (jj_3R_92()) { jj_scanpos = xsp; break; } } + if (jj_scan_token(RBRACE)) return true; return false; } - static private boolean jj_3R_58() + static private boolean jj_3R_60() { - if (jj_3R_68()) return true; + if (jj_3R_70()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_69()) { jj_scanpos = xsp; break; } + if (jj_3R_71()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_159() + static private boolean jj_3R_161() { if (jj_scan_token(MIN)) return true; return false; @@ -4100,16 +4075,16 @@ static private boolean jj_3_8() return false; } - static private boolean jj_3R_144() + static private boolean jj_3R_146() { Token xsp; xsp = jj_scanpos; - if (jj_3R_159()) { + if (jj_3R_161()) { jj_scanpos = xsp; - if (jj_3R_160()) return true; + if (jj_3R_162()) return true; } if (jj_scan_token(LPARENTH)) return true; - if (jj_3R_161()) return true; + if (jj_3R_163()) return true; if (jj_scan_token(RPARENTH)) return true; return false; } @@ -4118,25 +4093,25 @@ static private boolean jj_3R_217() { Token xsp; xsp = jj_scanpos; - if (jj_scan_token(86)) { + if (jj_scan_token(85)) { jj_scanpos = xsp; - if (jj_scan_token(89)) return true; + if (jj_scan_token(88)) return true; } return false; } - static private boolean jj_3R_43() + static private boolean jj_3R_45() { if (jj_scan_token(OR)) return true; if (jj_scan_token(OR)) return true; - if (jj_3R_49()) return true; + if (jj_3R_51()) return true; return false; } - static private boolean jj_3R_158() + static private boolean jj_3R_160() { if (jj_scan_token(LPARENTH)) return true; - if (jj_3R_161()) return true; + if (jj_3R_163()) return true; if (jj_scan_token(RPARENTH)) return true; return false; } @@ -4176,19 +4151,17 @@ static private boolean jj_3R_210() static private boolean jj_3_2() { - if (jj_scan_token(DQUOTE)) return true; - if (jj_3R_29()) return true; - if (jj_scan_token(DQUOTE)) return true; + if (jj_3R_30()) return true; if (jj_scan_token(COLON)) return true; return false; } - static private boolean jj_3R_143() + static private boolean jj_3R_145() { if (jj_3R_29()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_158()) jj_scanpos = xsp; + if (jj_3R_160()) jj_scanpos = xsp; return false; } @@ -4209,7 +4182,7 @@ static private boolean jj_3R_205() return false; } - static private boolean jj_3R_59() + static private boolean jj_3R_61() { if (jj_scan_token(OR)) return true; if (jj_scan_token(LBRACKET)) return true; @@ -4217,60 +4190,60 @@ static private boolean jj_3R_59() Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_70()) { jj_scanpos = xsp; break; } + if (jj_3R_72()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RBRACKET)) return true; if (jj_scan_token(OR)) return true; - if (jj_3R_58()) return true; + if (jj_3R_60()) return true; return false; } - static private boolean jj_3R_49() + static private boolean jj_3R_51() { - if (jj_3R_58()) return true; + if (jj_3R_60()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_59()) jj_scanpos = xsp; + if (jj_3R_61()) jj_scanpos = xsp; return false; } - static private boolean jj_3R_141() + static private boolean jj_3R_143() { - if (jj_3R_153()) return true; + if (jj_3R_155()) return true; return false; } - static private boolean jj_3R_140() + static private boolean jj_3R_142() { - if (jj_3R_152()) return true; + if (jj_3R_154()) return true; return false; } - static private boolean jj_3R_177() + static private boolean jj_3R_179() { - if (jj_3R_146()) return true; + if (jj_3R_148()) return true; return false; } - static private boolean jj_3R_139() + static private boolean jj_3R_141() { - if (jj_3R_151()) return true; + if (jj_3R_153()) return true; return false; } static private boolean jj_3R_206() { - if (jj_3R_147()) return true; + if (jj_3R_149()) return true; return false; } - static private boolean jj_3R_138() + static private boolean jj_3R_140() { - if (jj_3R_150()) return true; + if (jj_3R_152()) return true; return false; } - static private boolean jj_3R_176() + static private boolean jj_3R_178() { Token xsp; xsp = jj_scanpos; @@ -4281,7 +4254,7 @@ static private boolean jj_3R_176() return false; } - static private boolean jj_3R_175() + static private boolean jj_3R_177() { if (jj_scan_token(DLBRACKET)) return true; if (jj_3R_205()) return true; @@ -4289,25 +4262,19 @@ static private boolean jj_3R_175() return false; } - static private boolean jj_3R_137() + static private boolean jj_3R_139() { - if (jj_3R_149()) return true; + if (jj_3R_151()) return true; return false; } - static private boolean jj_3R_127() + static private boolean jj_3R_129() { if (jj_scan_token(DIVIDE)) return true; return false; } - static private boolean jj_3R_216() - { - if (jj_3R_38()) return true; - return false; - } - - static private boolean jj_3R_174() + static private boolean jj_3R_176() { if (jj_scan_token(DLT)) return true; if (jj_3R_205()) return true; @@ -4315,110 +4282,112 @@ static private boolean jj_3R_174() return false; } - static private boolean jj_3R_136() + static private boolean jj_3R_138() { - if (jj_3R_148()) return true; + if (jj_3R_150()) return true; return false; } - static private boolean jj_3R_135() + static private boolean jj_3R_216() { - if (jj_3R_33()) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_134() + static private boolean jj_3R_137() { - if (jj_3R_147()) return true; + if (jj_3R_35()) return true; return false; } - static private boolean jj_3R_151() + static private boolean jj_3R_136() + { + if (jj_3R_149()) return true; + return false; + } + + static private boolean jj_3R_153() { Token xsp; xsp = jj_scanpos; - if (jj_3R_174()) { + if (jj_3R_176()) { jj_scanpos = xsp; - if (jj_3R_175()) return true; + if (jj_3R_177()) return true; } xsp = jj_scanpos; - if (jj_3R_176()) { + if (jj_3R_178()) { jj_scanpos = xsp; - if (jj_3R_177()) return true; + if (jj_3R_179()) return true; } return false; } - static private boolean jj_3R_133() + static private boolean jj_3R_135() { - if (jj_3R_146()) return true; + if (jj_3R_148()) return true; return false; } - static private boolean jj_3R_132() + static private boolean jj_3R_134() { - if (jj_3R_145()) return true; + if (jj_3R_147()) return true; return false; } - static private boolean jj_3R_42() + static private boolean jj_3R_44() { - if (jj_3R_49()) return true; + if (jj_3R_51()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_50()) { jj_scanpos = xsp; break; } + if (jj_3R_52()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_131() + static private boolean jj_3R_133() { - if (jj_3R_144()) return true; + if (jj_3R_146()) return true; return false; } - static private boolean jj_3R_130() + static private boolean jj_3R_132() { - if (jj_3R_143()) return true; + if (jj_3R_145()) return true; return false; } - static private boolean jj_3R_129() + static private boolean jj_3R_131() { - if (jj_3R_142()) return true; + if (jj_3R_144()) return true; return false; } - static private boolean jj_3R_212() + static private boolean jj_3R_125() { - if (jj_3R_38()) return true; + if (jj_scan_token(MINUS)) return true; return false; } - static private boolean jj_3R_123() + static private boolean jj_3R_212() { - if (jj_scan_token(MINUS)) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_150() + static private boolean jj_3R_152() { if (jj_scan_token(A)) return true; if (jj_scan_token(LBRACKET)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } - static private boolean jj_3R_128() + static private boolean jj_3R_130() { Token xsp; xsp = jj_scanpos; - if (jj_3R_129()) { - jj_scanpos = xsp; - if (jj_3R_130()) { - jj_scanpos = xsp; if (jj_3R_131()) { jj_scanpos = xsp; if (jj_3R_132()) { @@ -4439,7 +4408,11 @@ static private boolean jj_3R_128() jj_scanpos = xsp; if (jj_3R_140()) { jj_scanpos = xsp; - if (jj_3R_141()) return true; + if (jj_3R_141()) { + jj_scanpos = xsp; + if (jj_3R_142()) { + jj_scanpos = xsp; + if (jj_3R_143()) return true; } } } @@ -4455,80 +4428,78 @@ static private boolean jj_3R_128() return false; } - static private boolean jj_3R_125() + static private boolean jj_3R_127() { - if (jj_3R_128()) return true; + if (jj_3R_130()) return true; return false; } - static private boolean jj_3R_124() + static private boolean jj_3R_126() { if (jj_scan_token(MINUS)) return true; - if (jj_3R_120()) return true; + if (jj_3R_122()) return true; return false; } - static private boolean jj_3R_35() + static private boolean jj_3R_37() { - if (jj_3R_42()) return true; + if (jj_3R_44()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_43()) { jj_scanpos = xsp; break; } + if (jj_3R_45()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_120() + static private boolean jj_3R_122() { Token xsp; xsp = jj_scanpos; - if (jj_3R_124()) { + if (jj_3R_126()) { jj_scanpos = xsp; - if (jj_3R_125()) return true; + if (jj_3R_127()) return true; } return false; } - static private boolean jj_3R_149() + static private boolean jj_3R_151() { if (jj_scan_token(E)) return true; if (jj_scan_token(LBRACKET)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } - static private boolean jj_3R_126() + static private boolean jj_3R_128() { if (jj_scan_token(TIMES)) return true; return false; } - static private boolean jj_3R_31() + static private boolean jj_3R_33() { - if (jj_3R_35()) return true; + if (jj_3R_37()) return true; return false; } - static private boolean jj_3R_121() + static private boolean jj_3R_123() { Token xsp; xsp = jj_scanpos; - if (jj_3R_126()) { + if (jj_3R_128()) { jj_scanpos = xsp; - if (jj_3R_127()) return true; + if (jj_3R_129()) return true; } - if (jj_3R_120()) return true; + if (jj_3R_122()) return true; return false; } static private boolean jj_3_7() { - if (jj_scan_token(DQUOTE)) return true; - if (jj_3R_29()) return true; - if (jj_scan_token(DQUOTE)) return true; - if (jj_3R_31()) return true; + if (jj_3R_30()) return true; + if (jj_3R_33()) return true; return false; } @@ -4541,24 +4512,24 @@ static private boolean jj_3_18() static private boolean jj_3R_204() { - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_116() + static private boolean jj_3R_118() { - if (jj_3R_120()) return true; + if (jj_3R_122()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_121()) { jj_scanpos = xsp; break; } + if (jj_3R_123()) { jj_scanpos = xsp; break; } } return false; } static private boolean jj_3_17() { - if (jj_3R_33()) return true; + if (jj_3R_35()) return true; return false; } @@ -4566,13 +4537,13 @@ static private boolean jj_3R_203() { if (jj_scan_token(I)) return true; if (jj_scan_token(EQ)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; return false; } static private boolean jj_3_16() { - if (jj_scan_token(DQUOTE)) return true; + if (jj_3R_30()) return true; return false; } @@ -4586,11 +4557,11 @@ static private boolean jj_3R_201() { if (jj_scan_token(C)) return true; if (jj_scan_token(LE)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_122() + static private boolean jj_3R_124() { if (jj_scan_token(PLUS)) return true; return false; @@ -4602,9 +4573,9 @@ static private boolean jj_3R_200() return false; } - static private boolean jj_3R_173() + static private boolean jj_3R_175() { - if (jj_3R_47()) return true; + if (jj_3R_49()) return true; return false; } @@ -4616,33 +4587,31 @@ static private boolean jj_3_1() return false; } - static private boolean jj_3R_117() + static private boolean jj_3R_119() { Token xsp; xsp = jj_scanpos; - if (jj_3R_122()) { + if (jj_3R_124()) { jj_scanpos = xsp; - if (jj_3R_123()) return true; + if (jj_3R_125()) return true; } - if (jj_3R_116()) return true; + if (jj_3R_118()) return true; return false; } static private boolean jj_3R_199() { - if (jj_3R_33()) return true; + if (jj_3R_35()) return true; return false; } static private boolean jj_3R_215() { - if (jj_scan_token(DQUOTE)) return true; - if (jj_3R_29()) return true; - if (jj_scan_token(DQUOTE)) return true; + if (jj_3R_30()) return true; return false; } - static private boolean jj_3R_172() + static private boolean jj_3R_174() { Token xsp; xsp = jj_scanpos; @@ -4667,32 +4636,30 @@ static private boolean jj_3R_172() static private boolean jj_3_15() { - if (jj_scan_token(DQUOTE)) return true; + if (jj_3R_30()) return true; return false; } - static private boolean jj_3R_113() + static private boolean jj_3R_115() { - if (jj_3R_116()) return true; + if (jj_3R_118()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_117()) { jj_scanpos = xsp; break; } + if (jj_3R_119()) { jj_scanpos = xsp; break; } } return false; } static private boolean jj_3_6() { - if (jj_scan_token(DQUOTE)) return true; + if (jj_3R_30()) return true; return false; } static private boolean jj_3R_211() { - if (jj_scan_token(DQUOTE)) return true; - if (jj_3R_29()) return true; - if (jj_scan_token(DQUOTE)) return true; + if (jj_3R_30()) return true; return false; } @@ -4710,10 +4677,10 @@ static private boolean jj_3R_213() return false; } - static private boolean jj_3R_114() + static private boolean jj_3R_116() { - if (jj_3R_45()) return true; - if (jj_3R_113()) return true; + if (jj_3R_47()) return true; + if (jj_3R_115()) return true; return false; } @@ -4732,76 +4699,76 @@ static private boolean jj_3R_208() return false; } - static private boolean jj_3R_111() + static private boolean jj_3R_113() { - if (jj_3R_113()) return true; + if (jj_3R_115()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_114()) { jj_scanpos = xsp; break; } + if (jj_3R_116()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_112() + static private boolean jj_3R_114() { - if (jj_3R_115()) return true; - if (jj_3R_111()) return true; + if (jj_3R_117()) return true; + if (jj_3R_113()) return true; return false; } - static private boolean jj_3R_110() + static private boolean jj_3R_112() { - if (jj_3R_111()) return true; + if (jj_3R_113()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_112()) { jj_scanpos = xsp; break; } + if (jj_3R_114()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_109() + static private boolean jj_3R_111() { - if (jj_3R_110()) return true; + if (jj_3R_112()) return true; return false; } - static private boolean jj_3R_108() + static private boolean jj_3R_110() { if (jj_scan_token(NOT)) return true; - if (jj_3R_106()) return true; + if (jj_3R_108()) return true; return false; } - static private boolean jj_3R_101() + static private boolean jj_3R_103() { - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_99() + static private boolean jj_3R_101() { - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_97() + static private boolean jj_3R_99() { - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_95() + static private boolean jj_3R_97() { - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; return false; } static private boolean jj_3R_195() { - if (jj_3R_45()) return true; - if (jj_3R_38()) return true; + if (jj_3R_47()) return true; + if (jj_3R_40()) return true; return false; } @@ -4814,15 +4781,15 @@ static private boolean jj_3R_194() static private boolean jj_3R_193() { if (jj_scan_token(LPARENTH)) return true; - if (jj_3R_32()) return true; + if (jj_3R_34()) return true; if (jj_scan_token(RPARENTH)) return true; return false; } - static private boolean jj_3R_41() + static private boolean jj_3R_43() { if (jj_scan_token(AND)) return true; - if (jj_3R_40()) return true; + if (jj_3R_42()) return true; return false; } @@ -4834,7 +4801,7 @@ static private boolean jj_3R_198() return false; } - static private boolean jj_3R_171() + static private boolean jj_3R_173() { if (jj_scan_token(RMAX)) return true; if (jj_scan_token(EQ)) return true; @@ -4850,7 +4817,7 @@ static private boolean jj_3R_197() return false; } - static private boolean jj_3R_170() + static private boolean jj_3R_172() { if (jj_scan_token(RMIN)) return true; if (jj_scan_token(EQ)) return true; @@ -4858,13 +4825,13 @@ static private boolean jj_3R_170() return false; } - static private boolean jj_3R_106() + static private boolean jj_3R_108() { Token xsp; xsp = jj_scanpos; - if (jj_3R_108()) { + if (jj_3R_110()) { jj_scanpos = xsp; - if (jj_3R_109()) return true; + if (jj_3R_111()) return true; } return false; } @@ -4876,13 +4843,13 @@ static private boolean jj_3R_196() return false; } - static private boolean jj_3R_39() + static private boolean jj_3R_41() { - if (jj_3R_47()) return true; + if (jj_3R_49()) return true; return false; } - static private boolean jj_3R_169() + static private boolean jj_3R_171() { if (jj_scan_token(R)) return true; Token xsp; @@ -4904,371 +4871,412 @@ static private boolean jj_3R_169() return false; } - static private boolean jj_3R_107() + static private boolean jj_3R_109() { if (jj_scan_token(AND)) return true; - if (jj_3R_106()) return true; + if (jj_3R_108()) return true; return false; } - static private boolean jj_3R_148() + static private boolean jj_3R_150() { Token xsp; xsp = jj_scanpos; - if (jj_3R_169()) { + if (jj_3R_171()) { jj_scanpos = xsp; - if (jj_3R_170()) { + if (jj_3R_172()) { jj_scanpos = xsp; - if (jj_3R_171()) return true; + if (jj_3R_173()) return true; } } if (jj_scan_token(LBRACKET)) return true; - if (jj_3R_172()) return true; + if (jj_3R_174()) return true; xsp = jj_scanpos; - if (jj_3R_173()) jj_scanpos = xsp; + if (jj_3R_175()) jj_scanpos = xsp; if (jj_scan_token(RBRACKET)) return true; return false; } - static private boolean jj_3R_40() + static private boolean jj_3R_42() { if (jj_scan_token(LPARENTH)) return true; - if (jj_3R_48()) return true; + if (jj_3R_50()) return true; if (jj_scan_token(EQ)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; if (jj_scan_token(RPARENTH)) return true; return false; } - static private boolean jj_3R_104() + static private boolean jj_3R_106() { - if (jj_3R_106()) return true; + if (jj_3R_108()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_107()) { jj_scanpos = xsp; break; } + if (jj_3R_109()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_105() + static private boolean jj_3R_107() { if (jj_scan_token(OR)) return true; - if (jj_3R_104()) return true; + if (jj_3R_106()) return true; return false; } - static private boolean jj_3R_34() + static private boolean jj_3R_36() { - if (jj_3R_40()) return true; + if (jj_3R_42()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_41()) { jj_scanpos = xsp; break; } + if (jj_3R_43()) { jj_scanpos = xsp; break; } } return false; } static private boolean jj_3_5() { - if (jj_3R_30()) return true; + if (jj_3R_32()) return true; return false; } - static private boolean jj_3R_102() + static private boolean jj_3R_104() { - if (jj_3R_104()) return true; + if (jj_3R_106()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_105()) { jj_scanpos = xsp; break; } + if (jj_3R_107()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_30() + static private boolean jj_3R_32() { Token xsp; xsp = jj_scanpos; - if (jj_3R_34()) { + if (jj_3R_36()) { jj_scanpos = xsp; if (jj_scan_token(49)) return true; } return false; } - static private boolean jj_3R_103() + static private boolean jj_3R_105() { if (jj_scan_token(IFF)) return true; - if (jj_3R_102()) return true; + if (jj_3R_104()) return true; return false; } - static private boolean jj_3R_92() + static private boolean jj_3R_94() { - if (jj_3R_102()) return true; + if (jj_3R_104()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_103()) { jj_scanpos = xsp; break; } + if (jj_3R_105()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_37() + static private boolean jj_3R_46() { - if (jj_scan_token(EQ)) return true; - if (jj_scan_token(QMARK)) return true; + if (jj_scan_token(LPARENTH)) return true; + if (jj_3R_34()) return true; + if (jj_scan_token(RPARENTH)) return true; return false; } - static private boolean jj_3R_44() + static private boolean jj_3R_39() { - if (jj_scan_token(LPARENTH)) return true; - if (jj_3R_32()) return true; - if (jj_scan_token(RPARENTH)) return true; + if (jj_scan_token(EQ)) return true; + if (jj_scan_token(QMARK)) return true; return false; } - static private boolean jj_3R_36() + static private boolean jj_3R_38() { Token xsp; xsp = jj_scanpos; - if (jj_3R_44()) jj_scanpos = xsp; - if (jj_3R_45()) return true; - if (jj_3R_38()) return true; + if (jj_3R_46()) jj_scanpos = xsp; + if (jj_3R_47()) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_93() + static private boolean jj_3R_95() { if (jj_scan_token(IMPLIES)) return true; - if (jj_3R_92()) return true; + if (jj_3R_94()) return true; return false; } - static private boolean jj_3R_82() + static private boolean jj_3R_84() { - if (jj_3R_92()) return true; + if (jj_3R_94()) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_93()) { jj_scanpos = xsp; break; } + if (jj_3R_95()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_33() + static private boolean jj_3R_35() { if (jj_scan_token(S)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_36()) { + if (jj_3R_38()) { jj_scanpos = xsp; - if (jj_3R_37()) return true; + if (jj_3R_39()) return true; } if (jj_scan_token(LBRACKET)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; xsp = jj_scanpos; - if (jj_3R_39()) jj_scanpos = xsp; + if (jj_3R_41()) jj_scanpos = xsp; if (jj_scan_token(RBRACKET)) return true; return false; } - static private boolean jj_3R_83() + static private boolean jj_3R_85() { if (jj_scan_token(QMARK)) return true; - if (jj_3R_82()) return true; + if (jj_3R_84()) return true; if (jj_scan_token(COLON)) return true; - if (jj_3R_75()) return true; + if (jj_3R_77()) return true; return false; } static private boolean jj_3_14() { - if (jj_3R_32()) return true; + if (jj_3R_34()) return true; if (jj_scan_token(LPARENTH)) return true; return false; } static private boolean jj_3_13() { - if (jj_3R_32()) return true; + if (jj_3R_34()) return true; if (jj_scan_token(LPARENTH)) return true; return false; } static private boolean jj_3_12() { - if (jj_3R_32()) return true; + if (jj_3R_34()) return true; if (jj_scan_token(LPARENTH)) return true; return false; } static private boolean jj_3_11() { - if (jj_3R_32()) return true; + if (jj_3R_34()) return true; if (jj_scan_token(LPARENTH)) return true; return false; } - static private boolean jj_3R_168() + static private boolean jj_3R_170() { - if (jj_3R_47()) return true; + if (jj_3R_49()) return true; return false; } - static private boolean jj_3R_67() + static private boolean jj_3R_69() { if (jj_scan_token(MAX)) return true; return false; } - static private boolean jj_3R_66() + static private boolean jj_3R_68() { if (jj_scan_token(MIN)) return true; return false; } - static private boolean jj_3R_75() + static private boolean jj_3R_77() { - if (jj_3R_82()) return true; + if (jj_3R_84()) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_83()) jj_scanpos = xsp; + if (jj_3R_85()) jj_scanpos = xsp; + return false; + } + + static private boolean jj_3R_102() + { + if (jj_3R_34()) return true; return false; } static private boolean jj_3R_100() { - if (jj_3R_32()) return true; + if (jj_3R_34()) return true; return false; } static private boolean jj_3R_98() { - if (jj_3R_32()) return true; + if (jj_3R_34()) return true; + return false; + } + + static private boolean jj_3R_56() + { + if (jj_scan_token(LE)) return true; return false; } static private boolean jj_3R_96() { - if (jj_3R_32()) return true; + if (jj_3R_34()) return true; return false; } - static private boolean jj_3R_94() + static private boolean jj_3R_55() { - if (jj_3R_32()) return true; + if (jj_scan_token(GE)) return true; return false; } - static private boolean jj_3R_57() + static private boolean jj_3R_54() + { + if (jj_scan_token(LT)) return true; + return false; + } + + static private boolean jj_3R_59() { if (jj_scan_token(LBRACE)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_66()) { + if (jj_3R_68()) { jj_scanpos = xsp; - if (jj_3R_67()) return true; + if (jj_3R_69()) return true; } if (jj_scan_token(RBRACE)) return true; return false; } - static private boolean jj_3R_89() + static private boolean jj_3R_53() + { + if (jj_scan_token(GT)) return true; + return false; + } + + static private boolean jj_3R_47() + { + Token xsp; + xsp = jj_scanpos; + if (jj_3R_53()) { + jj_scanpos = xsp; + if (jj_3R_54()) { + jj_scanpos = xsp; + if (jj_3R_55()) { + jj_scanpos = xsp; + if (jj_3R_56()) return true; + } + } + } + return false; + } + + static private boolean jj_3R_91() { if (jj_scan_token(EQ)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; return false; } - static private boolean jj_3R_88() + static private boolean jj_3R_90() { if (jj_scan_token(LBRACKET)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; if (jj_scan_token(COMMA)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; if (jj_scan_token(RBRACKET)) return true; return false; } - static private boolean jj_3R_47() + static private boolean jj_3R_49() { if (jj_scan_token(LBRACE)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; if (jj_scan_token(RBRACE)) return true; Token xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_57()) { jj_scanpos = xsp; break; } + if (jj_3R_59()) { jj_scanpos = xsp; break; } } return false; } - static private boolean jj_3R_87() + static private boolean jj_3R_89() { if (jj_scan_token(GT)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_100()) { + if (jj_3R_102()) { jj_scanpos = xsp; - if (jj_3R_101()) return true; + if (jj_3R_103()) return true; } return false; } - static private boolean jj_3R_86() + static private boolean jj_3R_88() { if (jj_scan_token(GE)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_98()) { + if (jj_3R_100()) { jj_scanpos = xsp; - if (jj_3R_99()) return true; + if (jj_3R_101()) return true; } return false; } - static private boolean jj_3R_85() + static private boolean jj_3R_87() { if (jj_scan_token(LT)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_96()) { + if (jj_3R_98()) { jj_scanpos = xsp; - if (jj_3R_97()) return true; + if (jj_3R_99()) return true; } return false; } - static private boolean jj_3R_84() + static private boolean jj_3R_86() { if (jj_scan_token(LE)) return true; Token xsp; xsp = jj_scanpos; - if (jj_3R_94()) { + if (jj_3R_96()) { jj_scanpos = xsp; - if (jj_3R_95()) return true; + if (jj_3R_97()) return true; } return false; } - static private boolean jj_3R_76() + static private boolean jj_3R_78() { Token xsp; xsp = jj_scanpos; - if (jj_3R_84()) { - jj_scanpos = xsp; - if (jj_3R_85()) { - jj_scanpos = xsp; if (jj_3R_86()) { jj_scanpos = xsp; if (jj_3R_87()) { jj_scanpos = xsp; if (jj_3R_88()) { jj_scanpos = xsp; - if (jj_3R_89()) return true; + if (jj_3R_89()) { + jj_scanpos = xsp; + if (jj_3R_90()) { + jj_scanpos = xsp; + if (jj_3R_91()) return true; } } } @@ -5277,106 +5285,94 @@ static private boolean jj_3R_76() return false; } - static private boolean jj_3R_61() + static private boolean jj_3R_121() { - if (jj_3R_75()) return true; + if (jj_scan_token(NE)) return true; return false; } - static private boolean jj_3R_74() + static private boolean jj_3R_117() { - if (jj_3R_76()) return true; + Token xsp; + xsp = jj_scanpos; + if (jj_3R_120()) { + jj_scanpos = xsp; + if (jj_3R_121()) return true; + } return false; } - static private boolean jj_3R_73() + static private boolean jj_3R_120() + { + if (jj_scan_token(EQ)) return true; + return false; + } + + static private boolean jj_3R_63() + { + if (jj_3R_77()) return true; + return false; + } + + static private boolean jj_3R_76() + { + if (jj_3R_78()) return true; + return false; + } + + static private boolean jj_3R_75() { if (jj_scan_token(G)) return true; return false; } - static private boolean jj_3R_72() + static private boolean jj_3R_74() { if (jj_scan_token(F)) return true; return false; } - static private boolean jj_3R_71() + static private boolean jj_3R_73() { if (jj_scan_token(X)) return true; return false; } - static private boolean jj_3R_60() + static private boolean jj_3R_62() { Token xsp; xsp = jj_scanpos; - if (jj_3R_71()) { + if (jj_3R_73()) { jj_scanpos = xsp; - if (jj_3R_72()) { + if (jj_3R_74()) { jj_scanpos = xsp; - if (jj_3R_73()) return true; + if (jj_3R_75()) return true; } } xsp = jj_scanpos; - if (jj_3R_74()) jj_scanpos = xsp; - if (jj_3R_55()) return true; - return false; - } - - static private boolean jj_3R_54() - { - if (jj_scan_token(LE)) return true; + if (jj_3R_76()) jj_scanpos = xsp; + if (jj_3R_57()) return true; return false; } static private boolean jj_3R_189() { - if (jj_3R_45()) return true; - if (jj_3R_38()) return true; + if (jj_3R_47()) return true; + if (jj_3R_40()) return true; return false; } static private boolean jj_3R_188() { if (jj_scan_token(LPARENTH)) return true; - if (jj_3R_32()) return true; + if (jj_3R_34()) return true; if (jj_scan_token(RPARENTH)) return true; return false; } - static private boolean jj_3R_53() - { - if (jj_scan_token(GE)) return true; - return false; - } - - static private boolean jj_3R_52() - { - if (jj_scan_token(LT)) return true; - return false; - } - - static private boolean jj_3R_51() - { - if (jj_scan_token(GT)) return true; - return false; - } - - static private boolean jj_3R_45() + static private boolean jj_3R_50() { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_51()) { - jj_scanpos = xsp; - if (jj_3R_52()) { - jj_scanpos = xsp; - if (jj_3R_53()) { - jj_scanpos = xsp; - if (jj_3R_54()) return true; - } - } - } + if (jj_scan_token(REG_IDENTPRIME)) return true; return false; } @@ -5403,7 +5399,7 @@ static private boolean jj_3R_190() return false; } - static private boolean jj_3R_167() + static private boolean jj_3R_169() { if (jj_scan_token(PMAX)) return true; if (jj_scan_token(EQ)) return true; @@ -5411,18 +5407,18 @@ static private boolean jj_3R_167() return false; } - static private boolean jj_3R_55() + static private boolean jj_3R_57() { Token xsp; xsp = jj_scanpos; - if (jj_3R_60()) { + if (jj_3R_62()) { jj_scanpos = xsp; - if (jj_3R_61()) return true; + if (jj_3R_63()) return true; } return false; } - static private boolean jj_3R_166() + static private boolean jj_3R_168() { if (jj_scan_token(PMIN)) return true; if (jj_scan_token(EQ)) return true; @@ -5430,48 +5426,25 @@ static private boolean jj_3R_166() return false; } - static private boolean jj_3R_119() - { - if (jj_scan_token(NE)) return true; - return false; - } - - static private boolean jj_3R_115() - { - Token xsp; - xsp = jj_scanpos; - if (jj_3R_118()) { - jj_scanpos = xsp; - if (jj_3R_119()) return true; - } - return false; - } - - static private boolean jj_3R_118() - { - if (jj_scan_token(EQ)) return true; - return false; - } - - static private boolean jj_3R_65() + static private boolean jj_3R_67() { - if (jj_3R_76()) return true; + if (jj_3R_78()) return true; return false; } - static private boolean jj_3R_64() + static private boolean jj_3R_66() { if (jj_scan_token(R)) return true; return false; } - static private boolean jj_3R_63() + static private boolean jj_3R_65() { if (jj_scan_token(W)) return true; return false; } - static private boolean jj_3R_165() + static private boolean jj_3R_167() { if (jj_scan_token(P)) return true; Token xsp; @@ -5491,58 +5464,58 @@ static private boolean jj_3R_165() return false; } - static private boolean jj_3R_62() + static private boolean jj_3R_64() { if (jj_scan_token(U)) return true; return false; } - static private boolean jj_3R_147() + static private boolean jj_3R_149() { Token xsp; xsp = jj_scanpos; - if (jj_3R_165()) { + if (jj_3R_167()) { jj_scanpos = xsp; - if (jj_3R_166()) { + if (jj_3R_168()) { jj_scanpos = xsp; - if (jj_3R_167()) return true; + if (jj_3R_169()) return true; } } if (jj_scan_token(LBRACKET)) return true; - if (jj_3R_38()) return true; + if (jj_3R_40()) return true; xsp = jj_scanpos; - if (jj_3R_168()) jj_scanpos = xsp; + if (jj_3R_170()) jj_scanpos = xsp; if (jj_scan_token(RBRACKET)) return true; return false; } - static private boolean jj_3R_56() + static private boolean jj_3R_58() { Token xsp; xsp = jj_scanpos; - if (jj_3R_62()) { + if (jj_3R_64()) { jj_scanpos = xsp; - if (jj_3R_63()) { + if (jj_3R_65()) { jj_scanpos = xsp; - if (jj_3R_64()) return true; + if (jj_3R_66()) return true; } } xsp = jj_scanpos; - if (jj_3R_65()) jj_scanpos = xsp; - if (jj_3R_55()) return true; + if (jj_3R_67()) jj_scanpos = xsp; + if (jj_3R_57()) return true; return false; } - static private boolean jj_3R_187() + static private boolean jj_3R_31() { - if (jj_scan_token(COMMA)) return true; - if (jj_3R_38()) return true; + if (jj_3R_30()) return true; return false; } - static private boolean jj_3R_48() + static private boolean jj_3R_187() { - if (jj_scan_token(REG_IDENTPRIME)) return true; + if (jj_scan_token(COMMA)) return true; + if (jj_3R_40()) return true; return false; } @@ -5558,7 +5531,7 @@ static private boolean jj_3R_48() static private Token jj_scanpos, jj_lastpos; static private int jj_la; static private int jj_gen; - static final private int[] jj_la1 = new int[101]; + static final private int[] jj_la1 = new int[100]; static private int[] jj_la1_0; static private int[] jj_la1_1; static private int[] jj_la1_2; @@ -5568,13 +5541,13 @@ static private boolean jj_3R_48() jj_la1_init_2(); } private static void jj_la1_init_0() { - jj_la1_0 = new int[] {0x514404c0,0x504404c0,0x1000000,0xb01a0848,0x0,0xb01a0848,0xb01a0848,0x0,0xb01a0848,0x400,0x40000000,0x80,0x40000480,0x8000210,0x8000210,0x0,0x40,0x0,0x1000000,0x8000030,0x0,0x2000000,0x0,0x0,0x0,0xa0ba0808,0x0,0x0,0x0,0xa0ba0808,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa00000,0x0,0xa0ba0808,0xa0ba0808,0xa0ba0808,0xa0ba0808,0xa0ba0808,0x0,0x0,0x0,0x0,0x0,0x0,0xa01a0808,0x0,0x0,0x0,0x0,0x0,0x0,0xa01a0808,0xa01a0808,0x0,0xa0000000,0xa0000000,0x0,0x20000,0x0,0xa0000000,0x0,0x0,0x0,0xa0000000,0x0,0x0,0x0,0x0,0x0,0xa0000000,0x0,0x0,0xa0ba0808,0xa0ba0808,0x0,0x0,0xa4ba0908,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0xa0000000,0x0,0xa0000000,0x0,0x0,0x0,}; + jj_la1_0 = new int[] {0x514404c0,0x504404c0,0x1000000,0xb01a0848,0x0,0xb01a0848,0xb01a0848,0x0,0xb01a0848,0x400,0x40000000,0x80,0x40000480,0x8000210,0x8000210,0x0,0x40,0x0,0x1000000,0x8000030,0x0,0x2000000,0x0,0x0,0x0,0xa0ba0808,0x0,0x0,0x0,0xa0ba0808,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa00000,0x0,0xa0ba0808,0xa0ba0808,0xa0ba0808,0xa0ba0808,0xa0ba0808,0x0,0x0,0x0,0x0,0x0,0x0,0xa01a0808,0x0,0x0,0x0,0x0,0x0,0x0,0xa01a0808,0xa01a0808,0x0,0xa0000000,0xa0000000,0x0,0x20000,0x0,0xa0000000,0x0,0x0,0x0,0xa0000000,0x0,0x0,0x0,0x0,0x0,0xa0000000,0x0,0x0,0xa0ba0808,0xa0ba0808,0x0,0x0,0xa4ba0908,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xa0000000,0x0,0xa0000000,0x0,0x0,0x0,}; } private static void jj_la1_init_1() { - jj_la1_1 = new int[] {0x187c5,0x83c4,0x10401,0x40127ab8,0x8000000,0x40127ab8,0x40127ab8,0x8000000,0x40127ab8,0x40,0x4,0x8000,0x8144,0x0,0x0,0x280,0x280,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4012783a,0x200000,0x40020000,0x10000000,0x4012783a,0x0,0x0,0x10000000,0x0,0x10000000,0x10000000,0x0,0x40000000,0xc2000,0x0,0xc2000,0x2,0x0,0x4012783a,0x4012783a,0x4012783a,0x4012783a,0x4012783a,0x0,0x0,0x800000,0x1000000,0x400000,0x200000,0x40127838,0x0,0x0,0x0,0x0,0x0,0x0,0x40027838,0x40027838,0x40000000,0x0,0x0,0x10000000,0x20000,0x40000000,0x0,0x38,0x0,0x0,0x0,0x40000000,0x40000000,0x0,0x40000000,0x0,0x0,0x3800,0x0,0x4012783a,0x4012783a,0x0,0x4000,0x4012783a,0x0,0x3838,0x40003838,0x10000000,0x0,0x0,0x0,0x0,0x600000,0x10000000,0x0,0x0,0x0,0x4000000,}; + jj_la1_1 = new int[] {0x187c5,0x83c4,0x10401,0x40127ab8,0x8000000,0x40127ab8,0x40127ab8,0x8000000,0x40127ab8,0x40,0x4,0x8000,0x8144,0x0,0x0,0x280,0x280,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4012783a,0x200000,0x40020000,0x10000000,0x4012783a,0x0,0x0,0x10000000,0x0,0x10000000,0x10000000,0x0,0x40000000,0xc2000,0x0,0xc2000,0x2,0x0,0x4012783a,0x4012783a,0x4012783a,0x4012783a,0x4012783a,0x0,0x0,0x800000,0x1000000,0x400000,0x200000,0x40127838,0x0,0x0,0x0,0x0,0x0,0x0,0x40027838,0x40027838,0x40000000,0x0,0x0,0x10000000,0x20000,0x40000000,0x0,0x38,0x0,0x0,0x0,0x40000000,0x40000000,0x0,0x40000000,0x0,0x0,0x3800,0x0,0x4012783a,0x4012783a,0x0,0x4000,0x4012783a,0x0,0x3838,0x40003838,0x10000000,0x0,0x0,0x0,0x600000,0x10000000,0x0,0x0,0x0,0x4000000,}; } private static void jj_la1_init_2() { - jj_la1_2 = new int[] {0x0,0x0,0x0,0x2e08404,0x0,0x2e08404,0x2e08404,0x0,0x2e08404,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x1,0x2000000,0x0,0x1,0x2000000,0x4000,0x2e08404,0x0,0x0,0x0,0x2e08405,0x2000000,0x1,0x0,0x20010,0x0,0x0,0x20010,0x2200000,0x0,0x3341,0x0,0x0,0x3341,0x2e08404,0x2e08404,0x2e08404,0x2e08404,0x2e08404,0x3341,0x100000,0x0,0x0,0x0,0x0,0x2e08404,0xc0,0x3300,0xc000,0xc000,0x30000,0x30000,0x2e08404,0x2e00404,0x0,0x0,0x2000000,0x0,0xc00000,0x0,0x3340,0x0,0x10,0x10,0x0,0x0,0x3340,0x10,0x0,0x10,0x3340,0x0,0x10,0x2e08404,0x2e08404,0x20000,0x0,0x2e08404,0x404,0x0,0x0,0x0,0x2400000,0x10000,0x2400000,0x2000000,0x2004000,0x0,0x2000000,0xc0,0x3300,0x0,}; + jj_la1_2 = new int[] {0x0,0x0,0x0,0x3608404,0x0,0x3608404,0x3608404,0x0,0x3608404,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x0,0x1,0x1000000,0x0,0x1,0x1000000,0x4000,0x3608404,0x0,0x0,0x0,0x3608405,0x1000000,0x1,0x0,0x20010,0x0,0x0,0x20010,0x3000000,0x0,0x3341,0x0,0x0,0x3341,0x3608404,0x3608404,0x3608404,0x3608404,0x3608404,0x3341,0x100000,0x0,0x0,0x0,0x0,0x3608404,0xc0,0x3300,0xc000,0xc000,0x30000,0x30000,0x3608404,0x3600404,0x0,0x0,0x1000000,0x0,0x600000,0x0,0x3340,0x0,0x10,0x10,0x0,0x0,0x3340,0x10,0x0,0x10,0x3340,0x0,0x10,0x3608404,0x3608404,0x20000,0x0,0x3608404,0x404,0x0,0x0,0x0,0x1200000,0x10000,0x1200000,0x1004000,0x0,0x1000000,0xc0,0x3300,0x0,}; } static final private JJCalls[] jj_2_rtns = new JJCalls[18]; static private boolean jj_rescan = false; @@ -5598,7 +5571,7 @@ public PrismParser(java.io.InputStream stream, String encoding) { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 101; i++) jj_la1[i] = -1; + for (int i = 0; i < 100; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -5613,7 +5586,7 @@ static public void ReInit(java.io.InputStream stream, String encoding) { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 101; i++) jj_la1[i] = -1; + for (int i = 0; i < 100; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -5631,7 +5604,7 @@ public PrismParser(java.io.Reader stream) { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 101; i++) jj_la1[i] = -1; + for (int i = 0; i < 100; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -5642,7 +5615,7 @@ static public void ReInit(java.io.Reader stream) { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 101; i++) jj_la1[i] = -1; + for (int i = 0; i < 100; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -5659,7 +5632,7 @@ public PrismParser(PrismParserTokenManager tm) { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 101; i++) jj_la1[i] = -1; + for (int i = 0; i < 100; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -5669,7 +5642,7 @@ public void ReInit(PrismParserTokenManager tm) { token = new Token(); jj_ntk = -1; jj_gen = 0; - for (int i = 0; i < 101; i++) jj_la1[i] = -1; + for (int i = 0; i < 100; i++) jj_la1[i] = -1; for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls(); } @@ -5787,7 +5760,7 @@ static public ParseException generateParseException() { la1tokens[jj_kind] = true; jj_kind = -1; } - for (int i = 0; i < 101; i++) { + for (int i = 0; i < 100; i++) { if (jj_la1[i] == jj_gen) { for (int j = 0; j < 32; j++) { if ((jj_la1_0[i] & (1< | < RENAME: "<-" > | < QMARK: "?" > -| < DQUOTE: "\"" > // Regular expressions | < REG_INT: (["1"-"9"](["0"-"9"])*)|("0") > | < REG_DOUBLE: (["0"-"9"])*(".")?(["0"-"9"])+(["e","E"](["-","+"])?(["0"-"9"])+)? > | < REG_IDENTPRIME: ["_","a"-"z","A"-"Z"](["_","a"-"z","A"-"Z","0"-"9"])*"'" > | < REG_IDENT: ["_","a"-"z","A"-"Z"](["_","a"-"z","A"-"Z","0"-"9"])* > +| < REG_QUOTED_IDENT: "\"" (["_","a"-"z","A"-"Z"](["_","a"-"z","A"-"Z","0"-"9"])*) "\"" > | < PREPROC: "#"(~["#"])*"#" > // Special catch-all token for lexical errors // (this allows us to throw our usual exceptions in this case) @@ -638,7 +638,7 @@ Property Property() : // (this avoids some common parsing errors for semicolon-less files) // Note also use of lookahead (to colon) to distinguish (optional) name from label reference ( { begin = getToken(1); } - ( LOOKAHEAD( Identifier() ) name = Identifier() )? + ( LOOKAHEAD(QuotedIdentifier() ) name = QuotedIdentifier() )? expr = ExpressionITE(true, false) { prop = new Property(expr, name, getPrecedingCommentBlock(begin)); } ) @@ -705,7 +705,7 @@ void LabelDef(LabelList labelList) throws PrismLangException : } { // Lookahead required because of the error handling clause below - LOOKAHEAD(