diff --git a/docs/HTTPServer.md b/docs/HTTPServer.md
index badb018450..4cff54d93f 100644
--- a/docs/HTTPServer.md
+++ b/docs/HTTPServer.md
@@ -38,7 +38,7 @@ With the HTTP server running, if you have installed Python and Jupyter notebooks
!pip install rumbledb
%load_ext rumbledb
- %env RUMBLEDB_SERVER=http://locahost:8001/jsoniq
+ %env RUMBLEDB_SERVER=http://localhost:8001/jsoniq
Where, of course, you need to adapt the port (8001) to the one you picked previously.
diff --git a/docs/install.md b/docs/install.md
index ac5cb96312..8900f6b9f4 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -107,7 +107,7 @@ You can try a few more queries.
>>>
( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
-This is it. RumbleDB is step and ready to go locally. You can now move on to a JSONiq tutorial. A RumbleDB tutorial will also follow soon.
+This is it. RumbleDB is setup and ready to go locally. You can now move on to a JSONiq tutorial. A RumbleDB tutorial will also follow soon.
## Running on a cluster
diff --git a/pom.xml b/pom.xml
index 8526c9745e..0b6e91e7ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -200,31 +200,31 @@
org.apache.spark
spark-core_2.12
- 3.2.4
+ 3.4.2
provided
org.apache.spark
spark-sql_2.12
- 3.2.4
+ 3.4.2
provided
org.apache.spark
spark-mllib_2.12
- 3.2.4
+ 3.4.2
provided
org.apache.hadoop
hadoop-aws
- 3.3.1
+ 3.3.2
provided
org.apache.spark
spark-avro_2.12
- 3.2.4
+ 3.4.2
org.antlr
@@ -250,12 +250,12 @@
org.apache.commons
commons-text
- 1.6
+ 1.10.0
org.apache.commons
commons-lang3
- 3.9
+ 3.12.0
commons-io
diff --git a/src/main/java/org/rumbledb/api/Item.java b/src/main/java/org/rumbledb/api/Item.java
index 98834d5b6d..ae0feeb357 100644
--- a/src/main/java/org/rumbledb/api/Item.java
+++ b/src/main/java/org/rumbledb/api/Item.java
@@ -558,6 +558,35 @@ default void putItem(Item item) {
throw new UnsupportedOperationException("Operation not defined for type " + this.getDynamicType());
}
+ /**
+ * Add an item at index i, if it is an array.
+ *
+ * @param item an item.
+ * @param i an integer.
+ */
+ default void putItemAt(Item item, int i) {
+ throw new UnsupportedOperationException("Operation not defined for type " + this.getDynamicType());
+ }
+
+ /**
+ * Add all items in items at index i, if it is an array.
+ *
+ * @param items a list of items.
+ * @param i an integer.
+ */
+ default void putItemsAt(List- items, int i) {
+ throw new UnsupportedOperationException("Operation not defined for type " + this.getDynamicType());
+ }
+
+ /**
+ * Remove the item at index i, if it is an array.
+ *
+ * @param i an integer.
+ */
+ default void removeItemAt(int i) {
+ throw new UnsupportedOperationException("Operation not defined for type " + this.getDynamicType());
+ }
+
/**
* Adds a value pair, if it is an array item.
*
@@ -577,6 +606,15 @@ default void putItemByKey(String key, Item value) {
throw new UnsupportedOperationException("Operation not defined for type " + this.getDynamicType());
}
+ /**
+ * Removes a key-value pair, if it is an object item.
+ *
+ * @param key a key.
+ */
+ default void removeItemByKey(String key) {
+ throw new UnsupportedOperationException("Operation not defined for type " + this.getDynamicType());
+ }
+
/**
* Adds a key-value pair, if it is an object item. The value is lazily computed.
*
@@ -648,6 +686,23 @@ default boolean isNaN() {
throw new UnsupportedOperationException("Operation not defined for type " + this.getDynamicType());
}
+ /**
+ * Returns the mutability level of the item.
+ *
+ * @return an int representing nestedness of the item inside transform expressions.
+ */
+ default int getMutabilityLevel() {
+ return 0;
+ }
+
+ /**
+ * Sets the mutability level of the item.
+ *
+ * @param mutabilityLevel the new mutability level.
+ */
+ default void setMutabilityLevel(int mutabilityLevel) {
+ }
+
/**
* Tests for logical equality. The semantics are that of the eq operator.
*
diff --git a/src/main/java/org/rumbledb/api/Rumble.java b/src/main/java/org/rumbledb/api/Rumble.java
index f85d5d65a9..35f4ce95ee 100644
--- a/src/main/java/org/rumbledb/api/Rumble.java
+++ b/src/main/java/org/rumbledb/api/Rumble.java
@@ -8,6 +8,7 @@
import org.rumbledb.context.DynamicContext;
import org.rumbledb.expressions.module.MainModule;
import org.rumbledb.runtime.RuntimeIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
import sparksoniq.spark.SparkSessionManager;
/**
@@ -50,6 +51,14 @@ public SequenceOfItems runQuery(String query) {
mainModule,
this.configuration
);
+
+ if (iterator.isUpdating()) {
+ PendingUpdateList pul = iterator.getPendingUpdateList(dynamicContext);
+ pul.applyUpdates(iterator.getMetadata());
+ }
+
+ System.err.println("final iterator is: " + iterator.isUpdating());
+
return new SequenceOfItems(iterator, dynamicContext, this.configuration);
}
@@ -70,6 +79,14 @@ public SequenceOfItems runQuery(URI location) throws IOException {
mainModule,
this.configuration
);
+
+ if (iterator.isUpdating()) {
+ PendingUpdateList pul = iterator.getPendingUpdateList(dynamicContext);
+ pul.applyUpdates(iterator.getMetadata());
+ }
+
+ System.err.println("final iterator is: " + iterator.isUpdating());
+
return new SequenceOfItems(iterator, dynamicContext, this.configuration);
}
diff --git a/src/main/java/org/rumbledb/compiler/DynamicContextVisitor.java b/src/main/java/org/rumbledb/compiler/DynamicContextVisitor.java
index ed1562eb55..847496f744 100644
--- a/src/main/java/org/rumbledb/compiler/DynamicContextVisitor.java
+++ b/src/main/java/org/rumbledb/compiler/DynamicContextVisitor.java
@@ -113,6 +113,23 @@ public DynamicContext visitFunctionDeclaration(FunctionDeclaration declaration,
return defaultAction(expression, argument);
}
+ // @Override
+ // public DynamicContext visitTransformExpression(TransformExpression expression, DynamicContext argument) {
+ //
+ // for (CopyDeclaration copyDecl : expression.getCopyDeclarations()) {
+ // Expression child = copyDecl.getSourceExpression();
+ // this.visit(child, argument);
+ // RuntimeIterator iterator = VisitorHelpers.generateRuntimeIterator(child, this.configuration);
+ // iterator.bindToVariableInDynamicContext(argument, copyDecl.getVariableName(), argument);
+ // }
+ //
+ // this.visit(expression.getModifyExpression(), argument);
+ //
+ // this.visit(expression.getReturnExpression(), argument);
+ //
+ // return argument;
+ // }
+
@Override
public DynamicContext visitVariableDeclaration(VariableDeclaration variableDeclaration, DynamicContext argument) {
Name name = variableDeclaration.getVariableName();
diff --git a/src/main/java/org/rumbledb/compiler/ExecutionModeVisitor.java b/src/main/java/org/rumbledb/compiler/ExecutionModeVisitor.java
index 88f5d8a9b7..c4146003e5 100644
--- a/src/main/java/org/rumbledb/compiler/ExecutionModeVisitor.java
+++ b/src/main/java/org/rumbledb/compiler/ExecutionModeVisitor.java
@@ -75,6 +75,8 @@
import org.rumbledb.expressions.primary.VariableReferenceExpression;
import org.rumbledb.expressions.typing.TreatExpression;
import org.rumbledb.expressions.typing.ValidateTypeExpression;
+import org.rumbledb.expressions.update.CopyDeclaration;
+import org.rumbledb.expressions.update.TransformExpression;
import org.rumbledb.items.ItemFactory;
import org.rumbledb.runtime.misc.RangeOperationIterator;
import org.rumbledb.types.BuiltinTypesCatalogue;
@@ -611,6 +613,25 @@ public StaticContext visitVariableDeclaration(VariableDeclaration variableDeclar
return argument;
}
+ @Override
+ public StaticContext visitTransformExpression(TransformExpression expression, StaticContext argument) {
+ StaticContext innerContext = expression.getStaticContext();
+ for (CopyDeclaration copyDecl : expression.getCopyDeclarations()) {
+ this.visit(copyDecl.getSourceExpression(), copyDecl.getSourceExpression().getStaticContext());
+ // first pass.
+ innerContext.setVariableStorageMode(
+ copyDecl.getVariableName(),
+ ExecutionMode.LOCAL
+ );
+ }
+ expression.setHighestExecutionMode(ExecutionMode.LOCAL);
+
+ this.visit(expression.getModifyExpression(), innerContext);
+ this.visit(expression.getReturnExpression(), innerContext);
+
+ return argument;
+ }
+
@Override
public StaticContext visitProlog(Prolog prolog, StaticContext argument) {
visitDescendants(prolog, argument);
diff --git a/src/main/java/org/rumbledb/compiler/ExpressionClassificationVisitor.java b/src/main/java/org/rumbledb/compiler/ExpressionClassificationVisitor.java
new file mode 100644
index 0000000000..940894cd41
--- /dev/null
+++ b/src/main/java/org/rumbledb/compiler/ExpressionClassificationVisitor.java
@@ -0,0 +1,485 @@
+package org.rumbledb.compiler;
+
+import org.rumbledb.exceptions.InvalidUpdatingExpressionPositionException;
+import org.rumbledb.exceptions.SimpleExpressionMustBeVacuousException;
+import org.rumbledb.expressions.*;
+import org.rumbledb.expressions.control.ConditionalExpression;
+import org.rumbledb.expressions.control.SwitchExpression;
+import org.rumbledb.expressions.control.TypeSwitchExpression;
+import org.rumbledb.expressions.control.TypeswitchCase;
+import org.rumbledb.expressions.flowr.*;
+import org.rumbledb.expressions.module.VariableDeclaration;
+import org.rumbledb.expressions.primary.FunctionCallExpression;
+import org.rumbledb.expressions.update.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class ExpressionClassificationVisitor extends AbstractNodeVisitor {
+
+ @Override
+ protected ExpressionClassification defaultAction(Node node, ExpressionClassification argument) {
+ ExpressionClassification expressionClassification = this.visitDescendants(node, argument);
+
+ if (!(node instanceof Expression)) {
+ return expressionClassification;
+ }
+
+ if (expressionClassification.isUpdating()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Operand of expression is Updating when it should be Simple or Vacuous",
+ node.getMetadata()
+ );
+ }
+ Expression expression = (Expression) node;
+ expression.setExpressionClassification(expressionClassification);
+ return expressionClassification;
+ }
+
+ @Override
+ public ExpressionClassification visitDescendants(Node node, ExpressionClassification argument) {
+ List expressionClassifications = node.getChildren()
+ .stream()
+ .map(child -> this.visit(child, argument))
+ .collect(Collectors.toList());
+ ExpressionClassification result = expressionClassifications.stream()
+ .anyMatch(ExpressionClassification::isUpdating)
+ ? ExpressionClassification.UPDATING
+ : ExpressionClassification.SIMPLE;
+
+ return result;
+ }
+
+ @Override
+ public ExpressionClassification visitCommaExpression(
+ CommaExpression expression,
+ ExpressionClassification argument
+ ) {
+ List results = expression.getChildren()
+ .stream()
+ .map(n -> this.visit(n, argument))
+ .collect(Collectors.toList());
+ boolean anyUpdating = results.stream().anyMatch(ExpressionClassification::isUpdating);
+ boolean allUpdatingOrVacuous = results.stream().allMatch(e -> e.isVacuous() || e.isUpdating());
+
+ if (anyUpdating && !allUpdatingOrVacuous) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "All expressions in Comma separated expressions must only be Simple expressions or only be Updating/Vacuous expressions",
+ expression.getMetadata()
+ );
+ }
+
+ if (anyUpdating) {
+ expression.setExpressionClassification(ExpressionClassification.UPDATING);
+ } else if (results.stream().allMatch(ExpressionClassification::isVacuous)) {
+ expression.setExpressionClassification(ExpressionClassification.VACUOUS);
+ } else {
+ expression.setExpressionClassification(ExpressionClassification.SIMPLE);
+ }
+
+ return expression.getExpressionClassification();
+ }
+
+ // Region FLWOR
+
+ @Override
+ public ExpressionClassification visitFlowrExpression(
+ FlworExpression expression,
+ ExpressionClassification argument
+ ) {
+ Clause clause = expression.getReturnClause().getFirstClause();
+ ExpressionClassification result = argument;
+ while (clause != null) {
+ result = this.visit(clause, result);
+ clause = clause.getNextClause();
+ }
+ result = expression.getReturnClause().getReturnExpr().getExpressionClassification();
+ result = result.isUpdating() ? ExpressionClassification.UPDATING : result;
+ expression.setExpressionClassification(result);
+ return result;
+ }
+
+ @Override
+ public ExpressionClassification visitForClause(ForClause expression, ExpressionClassification argument) {
+ ExpressionClassification result = this.visit(expression.getExpression(), argument);
+ if (result.isUpdating()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Expression in For Clause cannot be updating",
+ expression.getMetadata()
+ );
+ }
+ return result;
+ }
+
+ @Override
+ public ExpressionClassification visitLetClause(LetClause expression, ExpressionClassification argument) {
+ ExpressionClassification result = this.visit(expression.getExpression(), argument);
+ if (result.isUpdating()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Expression in Let Clause cannot be updating",
+ expression.getMetadata()
+ );
+ }
+ return result;
+ }
+
+ @Override
+ public ExpressionClassification visitGroupByClause(GroupByClause expression, ExpressionClassification argument) {
+ // TODO: Add check for updating?
+ return super.visitGroupByClause(expression, argument);
+ }
+
+ @Override
+ public ExpressionClassification visitOrderByClause(OrderByClause expression, ExpressionClassification argument) {
+ ExpressionClassification result = this.visitDescendants(expression, argument);
+ if (result.isUpdating()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Expressions in Order By Clause cannot be updating",
+ expression.getMetadata()
+ );
+ }
+ return result;
+ }
+
+ @Override
+ public ExpressionClassification visitWhereClause(WhereClause expression, ExpressionClassification argument) {
+ ExpressionClassification result = this.visitDescendants(expression, argument);
+ if (result.isUpdating()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Expression in Where Clause cannot be updating",
+ expression.getMetadata()
+ );
+ }
+ return result;
+ }
+
+ @Override
+ public ExpressionClassification visitCountClause(CountClause expression, ExpressionClassification argument) {
+ // TODO: Add check for updating?
+ return super.visitCountClause(expression, argument);
+ }
+
+ @Override
+ public ExpressionClassification visitReturnClause(ReturnClause expression, ExpressionClassification argument) {
+ if (expression.getReturnExpr() == null) {
+ return argument;
+ }
+ return this.visit(expression.getReturnExpr(), argument);
+ }
+
+ // Endregion
+
+ // Region Control
+
+ @Override
+ public ExpressionClassification visitConditionalExpression(
+ ConditionalExpression expression,
+ ExpressionClassification argument
+ ) {
+ ExpressionClassification condResult = this.visit(expression.getCondition(), argument);
+ if (condResult.isUpdating()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Condition expression in Conditional expression cannot be updating",
+ expression.getMetadata()
+ );
+ }
+
+ ExpressionClassification thenResult = this.visit(expression.getBranch(), argument);
+ ExpressionClassification elseResult = this.visit(expression.getElseBranch(), argument);
+
+ boolean oneUpdating = thenResult.isUpdating() || elseResult.isUpdating();
+ boolean bothUpdatingOrVacuous = (thenResult.isUpdating() || thenResult.isVacuous())
+ && (elseResult.isVacuous() || elseResult.isUpdating());
+
+ if (oneUpdating && !bothUpdatingOrVacuous) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Both branch expressions in Conditional expression must only be Simple expressions or only be Updating/Vacuous expressions",
+ expression.getMetadata()
+ );
+ }
+
+ if (oneUpdating) {
+ expression.setExpressionClassification(ExpressionClassification.UPDATING);
+ } else if (thenResult.isVacuous() && elseResult.isVacuous()) {
+ expression.setExpressionClassification(ExpressionClassification.VACUOUS);
+ } else {
+ expression.setExpressionClassification(ExpressionClassification.SIMPLE);
+ }
+
+ return expression.getExpressionClassification();
+ }
+
+ @Override
+ public ExpressionClassification visitSwitchExpression(
+ SwitchExpression expression,
+ ExpressionClassification argument
+ ) {
+ return super.visitSwitchExpression(expression, argument);
+ }
+
+ @Override
+ public ExpressionClassification visitTypeSwitchExpression(
+ TypeSwitchExpression expression,
+ ExpressionClassification argument
+ ) {
+ ExpressionClassification condResult = this.visit(expression.getTestCondition(), argument);
+ if (condResult.isUpdating()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Condition expression in Type Switch expression cannot be updating",
+ expression.getMetadata()
+ );
+ }
+
+ List branchResults = new ArrayList<>();
+ branchResults.add(this.visit(expression.getDefaultCase().getReturnExpression(), argument));
+ for (TypeswitchCase branch : expression.getCases()) {
+ branchResults.add(this.visit(branch.getReturnExpression(), argument));
+ }
+ boolean anyUpdating = branchResults.stream().anyMatch(ExpressionClassification::isUpdating);
+ if (anyUpdating && !branchResults.stream().allMatch(e -> e.isUpdating() || e.isVacuous())) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "All branch expressions in Type Switch expression must only be Simple expressions or only be Updating/Vacuous expressions",
+ expression.getMetadata()
+ );
+ }
+
+ if (anyUpdating) {
+ expression.setExpressionClassification(ExpressionClassification.UPDATING);
+ } else if (branchResults.stream().allMatch(ExpressionClassification::isVacuous)) {
+ expression.setExpressionClassification(ExpressionClassification.VACUOUS);
+ } else {
+ expression.setExpressionClassification(ExpressionClassification.SIMPLE);
+ }
+
+ return expression.getExpressionClassification();
+ }
+
+ // Endregion
+
+ // Region Primary
+
+ @Override
+ public ExpressionClassification visitFunctionCall(
+ FunctionCallExpression expression,
+ ExpressionClassification argument
+ ) {
+ // TODO: Make vacuous if call to fn:error?
+ return super.visitFunctionCall(expression, argument);
+ }
+
+ // Endregion
+
+
+
+ // Region Basic Updating
+
+ @Override
+ public ExpressionClassification visitDeleteExpression(
+ DeleteExpression expression,
+ ExpressionClassification argument
+ ) {
+ ExpressionClassification mainResult = this.visit(expression.getMainExpression(), argument);
+ if (!mainResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Main expression in Delete expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ ExpressionClassification locatorResult = this.visit(expression.getLocatorExpression(), argument);
+ if (!locatorResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Locator expression in Delete expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ expression.setExpressionClassification(ExpressionClassification.BASIC_UPDATING);
+ return ExpressionClassification.BASIC_UPDATING;
+ }
+
+ @Override
+ public ExpressionClassification visitRenameExpression(
+ RenameExpression expression,
+ ExpressionClassification argument
+ ) {
+ ExpressionClassification mainResult = this.visit(expression.getMainExpression(), argument);
+ if (!mainResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Main expression in Rename expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ ExpressionClassification locatorResult = this.visit(expression.getLocatorExpression(), argument);
+ if (!locatorResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Locator expression in Rename expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ ExpressionClassification replacerResult = this.visit(expression.getNameExpression(), argument);
+ if (!replacerResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Replacer expression in Rename expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ expression.setExpressionClassification(ExpressionClassification.BASIC_UPDATING);
+ return ExpressionClassification.BASIC_UPDATING;
+ }
+
+ @Override
+ public ExpressionClassification visitReplaceExpression(
+ ReplaceExpression expression,
+ ExpressionClassification argument
+ ) {
+ ExpressionClassification mainResult = this.visit(expression.getMainExpression(), argument);
+ if (!mainResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Main expression in Replace expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ ExpressionClassification locatorResult = this.visit(expression.getLocatorExpression(), argument);
+ if (!locatorResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Locator expression in Replace expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ ExpressionClassification replacerResult = this.visit(expression.getReplacerExpression(), argument);
+ if (!replacerResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Replacer expression in Replace expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ expression.setExpressionClassification(ExpressionClassification.BASIC_UPDATING);
+ return ExpressionClassification.BASIC_UPDATING;
+ }
+
+ @Override
+ public ExpressionClassification visitInsertExpression(
+ InsertExpression expression,
+ ExpressionClassification argument
+ ) {
+ ExpressionClassification mainResult = this.visit(expression.getMainExpression(), argument);
+ if (!mainResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Main expression in Insert expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ ExpressionClassification toInsertResult = this.visit(expression.getToInsertExpression(), argument);
+ if (!toInsertResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "toInsert expression in Insert expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ if (expression.hasPositionExpression()) {
+ ExpressionClassification positionResult = this.visit(expression.getPositionExpression(), argument);
+ if (!positionResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Position expression in Insert expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+ }
+
+ expression.setExpressionClassification(ExpressionClassification.BASIC_UPDATING);
+ return ExpressionClassification.BASIC_UPDATING;
+ }
+
+ @Override
+ public ExpressionClassification visitAppendExpression(
+ AppendExpression expression,
+ ExpressionClassification argument
+ ) {
+ ExpressionClassification arrayResult = this.visit(expression.getArrayExpression(), argument);
+ if (!arrayResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Array expression in Append expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ ExpressionClassification toAppendResult = this.visit(expression.getToAppendExpression(), argument);
+ if (!toAppendResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "toAppend expression in Append expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ expression.setExpressionClassification(ExpressionClassification.BASIC_UPDATING);
+ return ExpressionClassification.BASIC_UPDATING;
+ }
+
+ @Override
+ public ExpressionClassification visitTransformExpression(
+ TransformExpression expression,
+ ExpressionClassification argument
+ ) {
+
+ for (CopyDeclaration copyDecl : expression.getCopyDeclarations()) {
+ ExpressionClassification copyDeclResult = this.visit(copyDecl.getSourceExpression(), argument);
+ if (!copyDeclResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Source expression in Copy Declaration must be Simple",
+ expression.getMetadata()
+ );
+ }
+ }
+
+ ExpressionClassification modifyResult = this.visit(expression.getModifyExpression(), argument);
+ if (!(modifyResult.isUpdating() || modifyResult.isVacuous())) {
+ throw new SimpleExpressionMustBeVacuousException(
+ "Modify expression must be Updating or Vacuous",
+ expression.getMetadata()
+ );
+ }
+
+ ExpressionClassification returnResult = this.visit(expression.getReturnExpression(), argument);
+ if (!returnResult.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Return expression of Transform expression must be Simple",
+ expression.getMetadata()
+ );
+ }
+
+ expression.setExpressionClassification(ExpressionClassification.SIMPLE);
+ return ExpressionClassification.SIMPLE;
+ }
+
+ // Endregion
+
+
+ @Override
+ public ExpressionClassification visitVariableDeclaration(
+ VariableDeclaration expression,
+ ExpressionClassification argument
+ ) {
+ if (expression.getExpression() == null) {
+ return argument;
+ }
+
+ ExpressionClassification result = this.visit(expression.getExpression(), argument);
+ if (!result.isSimple()) {
+ throw new InvalidUpdatingExpressionPositionException(
+ "Initialising expression in variable declaration must be Simple",
+ expression.getMetadata()
+ );
+ }
+ return ExpressionClassification.SIMPLE;
+ }
+}
diff --git a/src/main/java/org/rumbledb/compiler/InferTypeVisitor.java b/src/main/java/org/rumbledb/compiler/InferTypeVisitor.java
index 15a3362be1..2f5e001673 100644
--- a/src/main/java/org/rumbledb/compiler/InferTypeVisitor.java
+++ b/src/main/java/org/rumbledb/compiler/InferTypeVisitor.java
@@ -85,6 +85,7 @@
import org.rumbledb.expressions.typing.IsStaticallyExpression;
import org.rumbledb.expressions.typing.TreatExpression;
import org.rumbledb.expressions.typing.ValidateTypeExpression;
+import org.rumbledb.expressions.update.*;
import org.rumbledb.runtime.functions.input.FileSystemUtil;
import org.rumbledb.types.BuiltinTypesCatalogue;
import org.rumbledb.types.FieldDescriptor;
@@ -769,6 +770,73 @@ public StaticContext visitTreatExpression(TreatExpression expression, StaticCont
// endregion
+ // region updating
+
+ @Override
+ public StaticContext visitDeleteExpression(DeleteExpression expression, StaticContext argument) {
+ visitDescendants(expression, argument);
+ expression.setStaticSequenceType(SequenceType.EMPTY_SEQUENCE);
+ return argument;
+ }
+
+ @Override
+ public StaticContext visitRenameExpression(RenameExpression expression, StaticContext argument) {
+ visitDescendants(expression, argument);
+ expression.setStaticSequenceType(SequenceType.EMPTY_SEQUENCE);
+ return argument;
+ }
+
+ @Override
+ public StaticContext visitReplaceExpression(ReplaceExpression expression, StaticContext argument) {
+ visitDescendants(expression, argument);
+ expression.setStaticSequenceType(SequenceType.EMPTY_SEQUENCE);
+ return argument;
+ }
+
+ @Override
+ public StaticContext visitInsertExpression(InsertExpression expression, StaticContext argument) {
+ visitDescendants(expression, argument);
+ expression.setStaticSequenceType(SequenceType.EMPTY_SEQUENCE);
+ return argument;
+ }
+
+ @Override
+ public StaticContext visitAppendExpression(AppendExpression expression, StaticContext argument) {
+ visitDescendants(expression, argument);
+ expression.setStaticSequenceType(SequenceType.EMPTY_SEQUENCE);
+ return argument;
+ }
+
+ @Override
+ public StaticContext visitTransformExpression(TransformExpression expression, StaticContext argument) {
+ for (CopyDeclaration copyDecl : expression.getCopyDeclarations()) {
+ visit(copyDecl.getSourceExpression(), argument);
+ SequenceType declaredType = copyDecl.getSourceSequenceType();
+ SequenceType inferredType;
+ if (declaredType == null) {
+ inferredType = copyDecl.getSourceExpression().getStaticSequenceType();
+ } else {
+ inferredType = declaredType;
+ }
+ checkAndUpdateVariableStaticType(
+ declaredType,
+ inferredType,
+ argument,
+ expression.getClass().getSimpleName(),
+ copyDecl.getVariableName(),
+ expression.getMetadata()
+ );
+ }
+ visit(expression.getModifyExpression(), argument);
+ visit(expression.getReturnExpression(), argument);
+
+ expression.setStaticSequenceType(SequenceType.EMPTY_SEQUENCE);
+
+ return argument;
+ }
+
+ // endregion
+
// region arithmetic
@Override
@@ -2106,6 +2174,8 @@ public void checkAndUpdateVariableStaticType(
}
}
+
+
@Override
public StaticContext visitVariableDeclaration(VariableDeclaration expression, StaticContext argument) {
visitDescendants(expression, argument);
diff --git a/src/main/java/org/rumbledb/compiler/RuntimeIteratorVisitor.java b/src/main/java/org/rumbledb/compiler/RuntimeIteratorVisitor.java
index 29b4b24cf4..cff6399728 100644
--- a/src/main/java/org/rumbledb/compiler/RuntimeIteratorVisitor.java
+++ b/src/main/java/org/rumbledb/compiler/RuntimeIteratorVisitor.java
@@ -68,6 +68,7 @@
import org.rumbledb.expressions.typing.InstanceOfExpression;
import org.rumbledb.expressions.typing.TreatExpression;
import org.rumbledb.expressions.typing.ValidateTypeExpression;
+import org.rumbledb.expressions.update.*;
import org.rumbledb.items.ItemFactory;
import org.rumbledb.expressions.postfix.ArrayLookupExpression;
import org.rumbledb.expressions.postfix.ArrayUnboxingExpression;
@@ -140,13 +141,11 @@
import org.rumbledb.runtime.primary.ObjectConstructorRuntimeIterator;
import org.rumbledb.runtime.primary.StringRuntimeIterator;
import org.rumbledb.runtime.primary.VariableReferenceIterator;
+import org.rumbledb.runtime.update.expression.*;
import org.rumbledb.types.BuiltinTypesCatalogue;
import org.rumbledb.types.SequenceType;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
import java.util.stream.Collectors;
public class RuntimeIteratorVisitor extends AbstractNodeVisitor {
@@ -189,6 +188,7 @@ public RuntimeIterator visitCommaExpression(CommaExpression expression, RuntimeI
} else {
RuntimeIterator runtimeIterator = new CommaExpressionIterator(
result,
+ expression.isUpdating(),
expression.getStaticContextForRuntime(this.config, this.visitorConfig)
);
runtimeIterator.setStaticContext(expression.getStaticContext());
@@ -217,6 +217,7 @@ public RuntimeIterator visitFlowrExpression(FlworExpression expression, RuntimeI
returnClause.getReturnExpr(),
argument
),
+ expression.isUpdating(),
new RuntimeStaticContext(
this.config,
expression.getStaticSequenceType(),
@@ -334,6 +335,125 @@ public RuntimeIterator visitVariableReference(VariableReferenceExpression expres
}
// endregion
+ // region updating
+
+ @Override
+ public RuntimeIterator visitDeleteExpression(DeleteExpression expression, RuntimeIterator argument) {
+
+ RuntimeIterator mainIterator = this.visit(expression.getMainExpression(), argument);
+ RuntimeIterator lookupIterator = this.visit(expression.getLocatorExpression(), argument);
+
+ RuntimeIterator runtimeIterator = new DeleteExpressionIterator(
+ mainIterator,
+ lookupIterator,
+ expression.getStaticContextForRuntime(this.config, this.visitorConfig)
+ );
+ runtimeIterator.setStaticContext(expression.getStaticContext());
+
+ return runtimeIterator;
+ }
+
+ @Override
+ public RuntimeIterator visitRenameExpression(RenameExpression expression, RuntimeIterator argument) {
+
+ RuntimeIterator mainIterator = this.visit(expression.getMainExpression(), argument);
+ RuntimeIterator lookupIterator = this.visit(expression.getLocatorExpression(), argument);
+ RuntimeIterator nameIterator = this.visit(expression.getNameExpression(), argument);
+
+ RuntimeIterator runtimeIterator = new RenameExpressionIterator(
+ mainIterator,
+ lookupIterator,
+ nameIterator,
+ expression.getStaticContextForRuntime(this.config, this.visitorConfig)
+ );
+ runtimeIterator.setStaticContext(expression.getStaticContext());
+
+ return runtimeIterator;
+ }
+
+ @Override
+ public RuntimeIterator visitReplaceExpression(ReplaceExpression expression, RuntimeIterator argument) {
+
+ RuntimeIterator mainIterator = this.visit(expression.getMainExpression(), argument);
+ RuntimeIterator lookupIterator = this.visit(expression.getLocatorExpression(), argument);
+ RuntimeIterator replacerIterator = this.visit(expression.getReplacerExpression(), argument);
+
+ RuntimeIterator runtimeIterator = new ReplaceExpressionIterator(
+ mainIterator,
+ lookupIterator,
+ replacerIterator,
+ expression.getStaticContextForRuntime(this.config, this.visitorConfig)
+ );
+ runtimeIterator.setStaticContext(expression.getStaticContext());
+
+ return runtimeIterator;
+ }
+
+ @Override
+ public RuntimeIterator visitInsertExpression(InsertExpression expression, RuntimeIterator argument) {
+
+ RuntimeIterator mainIterator = this.visit(expression.getMainExpression(), argument);
+ RuntimeIterator toInsertIterator = this.visit(expression.getToInsertExpression(), argument);
+ RuntimeIterator positionIterator = expression.hasPositionExpression()
+ ? this.visit(expression.getPositionExpression(), argument)
+ : null;
+
+ RuntimeIterator runtimeIterator = new InsertExpressionIterator(
+ mainIterator,
+ toInsertIterator,
+ positionIterator,
+ expression.getStaticContextForRuntime(this.config, this.visitorConfig)
+ );
+ runtimeIterator.setStaticContext(expression.getStaticContext());
+
+ return runtimeIterator;
+ }
+
+ @Override
+ public RuntimeIterator visitAppendExpression(AppendExpression expression, RuntimeIterator argument) {
+
+ RuntimeIterator arrayIterator = this.visit(expression.getArrayExpression(), argument);
+ RuntimeIterator toAppendIterator = this.visit(expression.getToAppendExpression(), argument);
+
+ RuntimeIterator runtimeIterator = new AppendExpressionIterator(
+ arrayIterator,
+ toAppendIterator,
+ expression.getStaticContextForRuntime(this.config, this.visitorConfig)
+ );
+ runtimeIterator.setStaticContext(expression.getStaticContext());
+
+ return runtimeIterator;
+ }
+
+ @Override
+ public RuntimeIterator visitTransformExpression(TransformExpression expression, RuntimeIterator argument) {
+
+ List copyDeclIterators = new ArrayList<>();
+ Map copyDeclMap = new HashMap<>();
+ for (CopyDeclaration copyDecl : expression.getCopyDeclarations()) {
+ copyDeclMap.put(copyDecl.getVariableName(), this.visit(copyDecl.getSourceExpression(), argument));
+ }
+ for (Expression childExpr : expression.getCopySourceExpressions()) {
+ copyDeclIterators.add(this.visit(childExpr, argument));
+ }
+ RuntimeIterator modifyIterator = this.visit(expression.getModifyExpression(), argument);
+ RuntimeIterator returnIterator = this.visit(expression.getReturnExpression(), argument);
+
+ RuntimeIterator runtimeIterator = new TransformExpressionIterator(
+ copyDeclMap,
+ modifyIterator,
+ returnIterator,
+ expression.getStaticContextForRuntime(this.config, this.visitorConfig),
+ expression.getMutabilityLevel()
+ );
+ runtimeIterator.setStaticContext(expression.getStaticContext());
+
+ return runtimeIterator;
+ }
+
+
+ // endregion
+
// region primary
@Override
public RuntimeIterator visitFilterExpression(FilterExpression expression, RuntimeIterator argument) {
@@ -887,6 +1007,7 @@ public RuntimeIterator visitConditionalExpression(ConditionalExpression expressi
conditionIterator,
thenIterator,
elseIterator,
+ expression.isUpdating(),
expression.getStaticContextForRuntime(this.config, this.visitorConfig)
);
}
@@ -937,6 +1058,7 @@ public RuntimeIterator visitTypeSwitchExpression(TypeSwitchExpression expression
this.visit(expression.getTestCondition(), argument),
cases,
defaultCase,
+ expression.isUpdating(),
expression.getStaticContextForRuntime(this.config, this.visitorConfig)
);
runtimeIterator.setStaticContext(expression.getStaticContext());
diff --git a/src/main/java/org/rumbledb/compiler/StaticContextVisitor.java b/src/main/java/org/rumbledb/compiler/StaticContextVisitor.java
index 0475aafb0b..8c837844c2 100644
--- a/src/main/java/org/rumbledb/compiler/StaticContextVisitor.java
+++ b/src/main/java/org/rumbledb/compiler/StaticContextVisitor.java
@@ -58,6 +58,8 @@
import org.rumbledb.expressions.typing.InstanceOfExpression;
import org.rumbledb.expressions.typing.TreatExpression;
import org.rumbledb.expressions.typing.ValidateTypeExpression;
+import org.rumbledb.expressions.update.CopyDeclaration;
+import org.rumbledb.expressions.update.TransformExpression;
import org.rumbledb.types.BuiltinTypesCatalogue;
import org.rumbledb.types.FunctionSignature;
import org.rumbledb.types.ItemType;
@@ -354,6 +356,43 @@ public StaticContext visitVariableDeclaration(VariableDeclaration variableDeclar
return argument;
}
+ @Override
+ public StaticContext visitTransformExpression(TransformExpression expression, StaticContext argument) {
+ argument.setCurrentMutabilityLevel(argument.getCurrentMutabilityLevel() + 1);
+ StaticContext result = argument;
+ for (CopyDeclaration copyDecl : expression.getCopyDeclarations()) {
+ result = this.visitCopyDecl(copyDecl, result, argument);
+ }
+
+ result = this.visit(expression.getModifyExpression(), result);
+ result = this.visit(expression.getReturnExpression(), result);
+
+ expression.setStaticContext(result);
+ expression.setMutabilityLevel(result.getCurrentMutabilityLevel());
+
+ argument.setCurrentMutabilityLevel(argument.getCurrentMutabilityLevel() - 1);
+ return argument;
+ }
+
+ private StaticContext visitCopyDecl(
+ CopyDeclaration copyDeclaration,
+ StaticContext argument,
+ StaticContext copyContext
+ ) {
+ this.visit(copyDeclaration.getSourceExpression(), copyContext);
+
+ StaticContext result = new StaticContext(argument);
+ result.addVariable(
+ copyDeclaration.getVariableName(),
+ copyDeclaration.getSourceSequenceType(),
+ copyDeclaration.getSourceExpression().getMetadata()
+ );
+ copyDeclaration.getSourceSequenceType()
+ .resolve(copyContext, copyDeclaration.getSourceExpression().getMetadata());
+
+ return result;
+ }
+
@Override
public StaticContext visitTypeDeclaration(TypeDeclaration declaration, StaticContext argument) {
ItemType type = declaration.getDefinition();
diff --git a/src/main/java/org/rumbledb/compiler/TranslationVisitor.java b/src/main/java/org/rumbledb/compiler/TranslationVisitor.java
index 6d8e091212..9c535f807e 100644
--- a/src/main/java/org/rumbledb/compiler/TranslationVisitor.java
+++ b/src/main/java/org/rumbledb/compiler/TranslationVisitor.java
@@ -123,6 +123,7 @@
import org.rumbledb.expressions.typing.IsStaticallyExpression;
import org.rumbledb.expressions.typing.TreatExpression;
import org.rumbledb.expressions.typing.ValidateTypeExpression;
+import org.rumbledb.expressions.update.*;
import org.rumbledb.items.parsing.ItemParser;
import org.rumbledb.parser.JsoniqParser;
import org.rumbledb.parser.JsoniqParser.DefaultCollationDeclContext;
@@ -561,6 +562,24 @@ public Node visitExprSingle(JsoniqParser.ExprSingleContext ctx) {
if (content instanceof JsoniqParser.TryCatchExprContext) {
return this.visitTryCatchExpr((JsoniqParser.TryCatchExprContext) content);
}
+ if (content instanceof JsoniqParser.DeleteExprContext) {
+ return this.visitDeleteExpr((JsoniqParser.DeleteExprContext) content);
+ }
+ if (content instanceof JsoniqParser.InsertExprContext) {
+ return this.visitInsertExpr((JsoniqParser.InsertExprContext) content);
+ }
+ if (content instanceof JsoniqParser.ReplaceExprContext) {
+ return this.visitReplaceExpr((JsoniqParser.ReplaceExprContext) content);
+ }
+ if (content instanceof JsoniqParser.RenameExprContext) {
+ return this.visitRenameExpr((JsoniqParser.RenameExprContext) content);
+ }
+ if (content instanceof JsoniqParser.AppendExprContext) {
+ return this.visitAppendExpr((JsoniqParser.AppendExprContext) content);
+ }
+ if (content instanceof JsoniqParser.TransformExprContext) {
+ return this.visitTransformExpr((JsoniqParser.TransformExprContext) content);
+ }
throw new OurBadException("Unrecognized ExprSingle.");
}
// endregion
@@ -1129,6 +1148,130 @@ public Node visitValidateExpr(JsoniqParser.ValidateExprContext ctx) {
}
// endregion
+ // region update
+
+ @Override
+ public Node visitInsertExpr(JsoniqParser.InsertExprContext ctx) {
+ Expression toInsertExpr;
+ Expression posExpr = null;
+ if (ctx.pairConstructor() != null && !ctx.pairConstructor().isEmpty()) {
+ List keys = new ArrayList<>();
+ List values = new ArrayList<>();
+ for (JsoniqParser.PairConstructorContext currentPair : ctx.pairConstructor()) {
+ if (currentPair.lhs != null) {
+ keys.add((Expression) this.visitExprSingle(currentPair.lhs));
+ } else {
+ keys.add(new StringLiteralExpression(currentPair.name.getText(), createMetadataFromContext(ctx)));
+ }
+ values.add((Expression) this.visitExprSingle(currentPair.rhs));
+ }
+ toInsertExpr = new ObjectConstructorExpression(keys, values, createMetadataFromContext(ctx));
+ } else if (ctx.to_insert_expr != null) {
+ toInsertExpr = (Expression) this.visitExprSingle(ctx.to_insert_expr);
+ if (ctx.pos_expr != null) {
+ posExpr = (Expression) this.visitExprSingle(ctx.pos_expr);
+ }
+ } else {
+ throw new OurBadException("Unrecognised expression to insert in Insert Expression");
+ }
+ Expression mainExpr = (Expression) this.visitExprSingle(ctx.main_expr);
+
+ return new InsertExpression(mainExpr, toInsertExpr, posExpr, createMetadataFromContext(ctx));
+ }
+
+ @Override
+ public Node visitDeleteExpr(JsoniqParser.DeleteExprContext ctx) {
+ Expression mainExpression = getMainExpressionFromUpdateLocatorContext(ctx.updateLocator());
+ Expression locatorExpression = getLocatorExpressionFromUpdateLocatorContext(ctx.updateLocator());
+ return new DeleteExpression(mainExpression, locatorExpression, createMetadataFromContext(ctx));
+ }
+
+ @Override
+ public Node visitRenameExpr(JsoniqParser.RenameExprContext ctx) {
+ Expression mainExpression = getMainExpressionFromUpdateLocatorContext(ctx.updateLocator());
+ Expression locatorExpression = getLocatorExpressionFromUpdateLocatorContext(ctx.updateLocator());
+ Expression nameExpression = (Expression) this.visitExprSingle(ctx.name_expr);
+ return new RenameExpression(
+ mainExpression,
+ locatorExpression,
+ nameExpression,
+ createMetadataFromContext(ctx)
+ );
+ }
+
+ @Override
+ public Node visitReplaceExpr(JsoniqParser.ReplaceExprContext ctx) {
+ Expression mainExpression = getMainExpressionFromUpdateLocatorContext(ctx.updateLocator());
+ Expression locatorExpression = getLocatorExpressionFromUpdateLocatorContext(ctx.updateLocator());
+ Expression newExpression = (Expression) this.visitExprSingle(ctx.replacer_expr);
+ return new ReplaceExpression(
+ mainExpression,
+ locatorExpression,
+ newExpression,
+ createMetadataFromContext(ctx)
+ );
+ }
+
+ @Override
+ public Node visitTransformExpr(JsoniqParser.TransformExprContext ctx) {
+ List copyDecls = ctx.copyDecl()
+ .stream()
+ .map(copyDeclCtx -> {
+ Name var = ((VariableReferenceExpression) this.visitVarRef(copyDeclCtx.var_ref)).getVariableName();
+ Expression expr = (Expression) this.visitExprSingle(copyDeclCtx.src_expr);
+ return new CopyDeclaration(var, expr);
+ })
+ .collect(Collectors.toList());
+ Expression modifyExpression = (Expression) this.visitExprSingle(ctx.mod_expr);
+ Expression returnExpression = (Expression) this.visitExprSingle(ctx.ret_expr);
+ return new TransformExpression(copyDecls, modifyExpression, returnExpression, createMetadataFromContext(ctx));
+ }
+
+ @Override
+ public Node visitAppendExpr(JsoniqParser.AppendExprContext ctx) {
+ Expression arrayExpression = (Expression) this.visitExprSingle(ctx.array_expr);
+ Expression toAppendExpression = (Expression) this.visitExprSingle(ctx.to_append_expr);
+ return new AppendExpression(arrayExpression, toAppendExpression, createMetadataFromContext(ctx));
+ }
+
+ public Expression getMainExpressionFromUpdateLocatorContext(JsoniqParser.UpdateLocatorContext ctx) {
+ Expression mainExpression = (Expression) this.visitPrimaryExpr(ctx.main_expr);
+ for (ParseTree child : ctx.children.subList(1, ctx.children.size() - 1)) {
+ if (child instanceof JsoniqParser.ObjectLookupContext) {
+ Expression expr = (Expression) this.visitObjectLookup((JsoniqParser.ObjectLookupContext) child);
+ mainExpression = new ObjectLookupExpression(
+ mainExpression,
+ expr,
+ createMetadataFromContext(ctx)
+ );
+ } else if (child instanceof JsoniqParser.ArrayLookupContext) {
+ Expression expr = (Expression) this.visitArrayLookup((JsoniqParser.ArrayLookupContext) child);
+ mainExpression = new ArrayLookupExpression(
+ mainExpression,
+ expr,
+ createMetadataFromContext(ctx)
+ );
+ } else {
+ throw new OurBadException("Unrecognized locator expression found in update expression.");
+ }
+ }
+ return mainExpression;
+ }
+
+ public Expression getLocatorExpressionFromUpdateLocatorContext(JsoniqParser.UpdateLocatorContext ctx) {
+ ParseTree locatorExprCtx = ctx.getChild(ctx.getChildCount() - 1);
+ if (locatorExprCtx instanceof JsoniqParser.ObjectLookupContext) {
+ return (Expression) this.visitObjectLookup((JsoniqParser.ObjectLookupContext) locatorExprCtx);
+ }
+ if (locatorExprCtx instanceof JsoniqParser.ArrayLookupContext) {
+ return (Expression) this.visitArrayLookup((JsoniqParser.ArrayLookupContext) locatorExprCtx);
+ } else {
+ throw new OurBadException("Unrecognized locator found in update expression.");
+ }
+ }
+
+ // endregion
+
// region postfix
@Override
public Node visitPostFixExpr(JsoniqParser.PostFixExprContext ctx) {
diff --git a/src/main/java/org/rumbledb/compiler/TypeIndependentNodeVisitor.java b/src/main/java/org/rumbledb/compiler/TypeIndependentNodeVisitor.java
index c609b21d13..255f5ab248 100644
--- a/src/main/java/org/rumbledb/compiler/TypeIndependentNodeVisitor.java
+++ b/src/main/java/org/rumbledb/compiler/TypeIndependentNodeVisitor.java
@@ -445,7 +445,7 @@ public Node visitIsStaticallyExpr(IsStaticallyExpression expression, Node argume
public Node visitTreatExpression(TreatExpression expression, Node argument) {
TreatExpression result = new TreatExpression(
(Expression) visit(expression.getMainExpression(), argument),
- expression.getsequenceType(),
+ expression.getSequenceType(),
expression.errorCodeThatShouldBeThrown(),
expression.getMetadata()
);
diff --git a/src/main/java/org/rumbledb/compiler/VariableDependenciesVisitor.java b/src/main/java/org/rumbledb/compiler/VariableDependenciesVisitor.java
index 0839359a9f..f0df2c96c4 100644
--- a/src/main/java/org/rumbledb/compiler/VariableDependenciesVisitor.java
+++ b/src/main/java/org/rumbledb/compiler/VariableDependenciesVisitor.java
@@ -64,6 +64,8 @@
import org.rumbledb.expressions.primary.InlineFunctionExpression;
import org.rumbledb.expressions.primary.NamedFunctionReferenceExpression;
import org.rumbledb.expressions.primary.VariableReferenceExpression;
+import org.rumbledb.expressions.update.CopyDeclaration;
+import org.rumbledb.expressions.update.TransformExpression;
/**
@@ -513,4 +515,16 @@ public Void visitFunctionDeclaration(FunctionDeclaration expression, Void argume
addInputVariableDependencies(expression, getInputVariableDependencies(expression));
return null;
}
+
+ @Override
+ public Void visitTransformExpression(TransformExpression expression, Void argument) {
+ for (CopyDeclaration copyDecl : expression.getCopyDeclarations()) {
+ visit(copyDecl.getSourceExpression(), null);
+ addInputVariableDependencies(expression, getInputVariableDependencies(copyDecl.getSourceExpression()));
+ }
+ visit(expression.getModifyExpression(), null);
+ visit(expression.getReturnExpression(), null);
+
+ return null;
+ }
}
diff --git a/src/main/java/org/rumbledb/compiler/VisitorHelpers.java b/src/main/java/org/rumbledb/compiler/VisitorHelpers.java
index 4d230f15a8..a8ba935770 100644
--- a/src/main/java/org/rumbledb/compiler/VisitorHelpers.java
+++ b/src/main/java/org/rumbledb/compiler/VisitorHelpers.java
@@ -23,6 +23,7 @@
import org.rumbledb.exceptions.OurBadException;
import org.rumbledb.exceptions.ParsingException;
import org.rumbledb.expressions.ExecutionMode;
+import org.rumbledb.expressions.ExpressionClassification;
import org.rumbledb.expressions.Node;
import org.rumbledb.expressions.module.LibraryModule;
import org.rumbledb.expressions.module.MainModule;
@@ -160,6 +161,7 @@ public static MainModule parseJSONiqMainModule(
inferTypes(mainModule, configuration);
mainModule = applyTypeDependentOptimizations(mainModule);
populateExecutionModes(mainModule, configuration);
+ populateExpressionClassifications(mainModule, configuration);
return mainModule;
} catch (ParseCancellationException ex) {
ParsingException e = new ParsingException(
@@ -201,6 +203,8 @@ public static MainModule parseXQueryMainModule(
inferTypes(mainModule, configuration);
mainModule = applyTypeDependentOptimizations(mainModule);
populateExecutionModes(mainModule, configuration);
+ // TODO populate expression classifications here?
+ // populateExpressionClassifications(mainModule, configuration);
return mainModule;
} catch (ParseCancellationException ex) {
ParsingException e = new ParsingException(
@@ -392,6 +396,19 @@ private static void populateStaticContext(Module module, RumbleRuntimeConfigurat
}
}
+ private static void populateExpressionClassifications(Module module, RumbleRuntimeConfiguration conf) {
+ if (conf.isPrintIteratorTree()) {
+ printTree(module, conf);
+ }
+
+ ExpressionClassificationVisitor visitor = new ExpressionClassificationVisitor();
+ visitor.visit(module, ExpressionClassification.SIMPLE);
+
+ if (conf.isPrintIteratorTree()) {
+ printTree(module, conf);
+ }
+ }
+
public static DynamicContext createDynamicContext(Node node, RumbleRuntimeConfiguration configuration) {
DynamicContextVisitor visitor = new DynamicContextVisitor(configuration);
return visitor.visit(node, null);
diff --git a/src/main/java/org/rumbledb/context/DynamicContext.java b/src/main/java/org/rumbledb/context/DynamicContext.java
index a7850a4076..39f89caf71 100644
--- a/src/main/java/org/rumbledb/context/DynamicContext.java
+++ b/src/main/java/org/rumbledb/context/DynamicContext.java
@@ -47,6 +47,7 @@ public class DynamicContext implements Serializable, KryoSerializable {
private NamedFunctions namedFunctions;
private InScopeSchemaTypes inScopeSchemaTypes;
private DateTime currentDateTime;
+ private int currentMutabilityLevel;
/**
* The default constructor is for Kryo deserialization purposes.
@@ -58,6 +59,7 @@ public DynamicContext() {
this.namedFunctions = null;
this.inScopeSchemaTypes = null;
this.currentDateTime = new DateTime();
+ this.currentMutabilityLevel = 0;
}
/**
@@ -72,6 +74,7 @@ public DynamicContext(RumbleRuntimeConfiguration conf) {
this.namedFunctions = new NamedFunctions(conf);
this.inScopeSchemaTypes = new InScopeSchemaTypes();
this.currentDateTime = new DateTime();
+ this.currentMutabilityLevel = 0;
}
public DynamicContext(DynamicContext parent) {
@@ -83,6 +86,7 @@ public DynamicContext(DynamicContext parent) {
this.conf = null;
this.namedFunctions = null;
this.inScopeSchemaTypes = null;
+ this.currentMutabilityLevel = parent.getCurrentMutabilityLevel();
}
public DynamicContext(
@@ -102,6 +106,7 @@ public DynamicContext(
dataFrameVariableValues
);
this.namedFunctions = null;
+ this.currentMutabilityLevel = parent.getCurrentMutabilityLevel();
}
public RumbleRuntimeConfiguration getRumbleRuntimeConfiguration() {
@@ -130,6 +135,14 @@ public void read(Kryo kryo, Input input) {
this.variableValues = kryo.readObject(input, VariableValues.class);
}
+ public int getCurrentMutabilityLevel() {
+ return this.currentMutabilityLevel;
+ }
+
+ public void setCurrentMutabilityLevel(int currentMutabilityLevel) {
+ this.currentMutabilityLevel = currentMutabilityLevel;
+ }
+
public enum VariableDependency {
FULL,
COUNT,
diff --git a/src/main/java/org/rumbledb/context/StaticContext.java b/src/main/java/org/rumbledb/context/StaticContext.java
index 6fb05432db..a7ccfaeaf1 100644
--- a/src/main/java/org/rumbledb/context/StaticContext.java
+++ b/src/main/java/org/rumbledb/context/StaticContext.java
@@ -60,6 +60,8 @@ public class StaticContext implements Serializable, KryoSerializable {
private static final Map defaultBindings;
+ private int currentMutabilityLevel;
+
static {
defaultBindings = new HashMap<>();
defaultBindings.put("local", Name.LOCAL_NS);
@@ -83,6 +85,7 @@ public StaticContext() {
this.contextItemStaticType = null;
this.configuration = null;
this.inScopeSchemaTypes = null;
+ this.currentMutabilityLevel = 0;
}
public StaticContext(URI staticBaseURI, RumbleRuntimeConfiguration configuration) {
@@ -95,6 +98,7 @@ public StaticContext(URI staticBaseURI, RumbleRuntimeConfiguration configuration
this.contextItemStaticType = null;
this.staticallyKnownFunctionSignatures = new HashMap<>();
this.inScopeSchemaTypes = new InScopeSchemaTypes();
+ this.currentMutabilityLevel = 0;
}
public StaticContext(StaticContext parent) {
@@ -105,6 +109,7 @@ public StaticContext(StaticContext parent) {
this.staticallyKnownFunctionSignatures = new HashMap<>();
this.configuration = null;
this.inScopeSchemaTypes = null;
+ this.currentMutabilityLevel = parent.currentMutabilityLevel;
}
public StaticContext getParent() {
@@ -421,4 +426,12 @@ public InScopeSchemaTypes getInScopeSchemaTypes() {
}
throw new OurBadException("In-scope schema types are not set up properly in static context.");
}
+
+ public int getCurrentMutabilityLevel() {
+ return currentMutabilityLevel;
+ }
+
+ public void setCurrentMutabilityLevel(int currentMutabilityLevel) {
+ this.currentMutabilityLevel = currentMutabilityLevel;
+ }
}
diff --git a/src/main/java/org/rumbledb/errorcodes/ErrorCode.java b/src/main/java/org/rumbledb/errorcodes/ErrorCode.java
index 39fb5a5084..a143cc31ec 100644
--- a/src/main/java/org/rumbledb/errorcodes/ErrorCode.java
+++ b/src/main/java/org/rumbledb/errorcodes/ErrorCode.java
@@ -120,7 +120,25 @@ public enum ErrorCode {
AtomizationError("FOTY0012"),
UnexpectedFunctionItem("FOTY0015"),
ArithmeticOverflowOrUnderflow("FODT0002"),
- InvalidTimezoneValue("FODT0003");
+ InvalidTimezoneValue("FODT0003"),
+
+ InvalidUpdatingExpressionPositionErrorCode("XUST0001"),
+ SimpleExpressionMustBeVacuousErrorCode("XUST0002"),
+
+ TransformBadCopySource("XUTY0013"),
+
+
+ TransformModifiesNonCopiedValue("XUDY0014"),
+ UpdateTargetIsEmptySeqErrorCode("XUDY0027"),
+
+ DuplicateObjectInsertSourceErrorCode("JNUP0005"),
+ DuplicateKeyOnUpdateApplyErrorCode("JNUP0006"),
+ CannotCastUpdateSelectorErrorCode("JNUP0007"),
+ InvalidUpdateTargetErrorCode("JNUP0008"),
+ TooManyReplacesOnSameTargetSelectorErrorCode("JNUP0009"),
+ TooManyRenamesOnSameTargetSelectorErrorCode("JNUP0010"),
+ CannotResolveUpdateSelectorErrorCode("JNUP0016"),
+ ObjectInsertContentIsNotObjectSeqErrorCode("JNUP0019");
diff --git a/src/main/java/org/rumbledb/exceptions/CannotCastUpdateSelectorException.java b/src/main/java/org/rumbledb/exceptions/CannotCastUpdateSelectorException.java
new file mode 100644
index 0000000000..34b0dcbcfd
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/CannotCastUpdateSelectorException.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors: Stefan Irimescu, Can Berker Cikis
+ *
+ */
+
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class CannotCastUpdateSelectorException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public CannotCastUpdateSelectorException(String message, ExceptionMetadata metadata) {
+ super(message, ErrorCode.CannotCastUpdateSelectorErrorCode, metadata);
+ }
+}
diff --git a/src/main/java/org/rumbledb/exceptions/CannotResolveUpdateSelectorException.java b/src/main/java/org/rumbledb/exceptions/CannotResolveUpdateSelectorException.java
new file mode 100644
index 0000000000..b1a6b7c603
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/CannotResolveUpdateSelectorException.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors: Stefan Irimescu, Can Berker Cikis
+ *
+ */
+
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class CannotResolveUpdateSelectorException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public CannotResolveUpdateSelectorException(String message, ExceptionMetadata metadata) {
+ super(message, ErrorCode.CannotResolveUpdateSelectorErrorCode, metadata);
+ }
+}
diff --git a/src/main/java/org/rumbledb/exceptions/DuplicateKeyOnUpdateApplyException.java b/src/main/java/org/rumbledb/exceptions/DuplicateKeyOnUpdateApplyException.java
new file mode 100644
index 0000000000..89de47398a
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/DuplicateKeyOnUpdateApplyException.java
@@ -0,0 +1,18 @@
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class DuplicateKeyOnUpdateApplyException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public DuplicateKeyOnUpdateApplyException(String keyInfo, ExceptionMetadata metadata) {
+ super(
+ "Dynamic Updating error; Duplicate keys inserted into target object during update application: "
+ + keyInfo
+ + ".",
+ ErrorCode.DuplicateKeyOnUpdateApplyErrorCode,
+ metadata
+ );
+ }
+}
diff --git a/src/main/java/org/rumbledb/exceptions/DuplicateObjectInsertSourceException.java b/src/main/java/org/rumbledb/exceptions/DuplicateObjectInsertSourceException.java
new file mode 100644
index 0000000000..fbaffcd384
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/DuplicateObjectInsertSourceException.java
@@ -0,0 +1,17 @@
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class DuplicateObjectInsertSourceException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public DuplicateObjectInsertSourceException(String keyInfo, ExceptionMetadata metadata) {
+ super(
+ "Dynamic Updating error; Duplicate keys to insert into object: " + keyInfo + ".",
+ ErrorCode.DuplicateObjectInsertSourceErrorCode,
+ metadata
+ );
+ }
+
+}
diff --git a/src/main/java/org/rumbledb/exceptions/InvalidUpdateTargetException.java b/src/main/java/org/rumbledb/exceptions/InvalidUpdateTargetException.java
new file mode 100644
index 0000000000..c407ee559d
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/InvalidUpdateTargetException.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors: Stefan Irimescu, Can Berker Cikis
+ *
+ */
+
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class InvalidUpdateTargetException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public InvalidUpdateTargetException(String message, ExceptionMetadata metadata) {
+ super(message, ErrorCode.InvalidUpdateTargetErrorCode, metadata);
+ }
+}
diff --git a/src/main/java/org/rumbledb/exceptions/InvalidUpdatingExpressionPositionException.java b/src/main/java/org/rumbledb/exceptions/InvalidUpdatingExpressionPositionException.java
new file mode 100644
index 0000000000..63546f4031
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/InvalidUpdatingExpressionPositionException.java
@@ -0,0 +1,13 @@
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class InvalidUpdatingExpressionPositionException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public InvalidUpdatingExpressionPositionException(String message, ExceptionMetadata metadata) {
+ super(message, ErrorCode.InvalidUpdatingExpressionPositionErrorCode, metadata);
+ }
+
+}
diff --git a/src/main/java/org/rumbledb/exceptions/ObjectInsertContentIsNotObjectSeqException.java b/src/main/java/org/rumbledb/exceptions/ObjectInsertContentIsNotObjectSeqException.java
new file mode 100644
index 0000000000..96dabf2a18
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/ObjectInsertContentIsNotObjectSeqException.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors: Stefan Irimescu, Can Berker Cikis
+ *
+ */
+
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class ObjectInsertContentIsNotObjectSeqException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public ObjectInsertContentIsNotObjectSeqException(String message, ExceptionMetadata metadata) {
+ super(message, ErrorCode.ObjectInsertContentIsNotObjectSeqErrorCode, metadata);
+ }
+}
diff --git a/src/main/java/org/rumbledb/exceptions/SimpleExpressionMustBeVacuousException.java b/src/main/java/org/rumbledb/exceptions/SimpleExpressionMustBeVacuousException.java
new file mode 100644
index 0000000000..95aa26fbc2
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/SimpleExpressionMustBeVacuousException.java
@@ -0,0 +1,12 @@
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class SimpleExpressionMustBeVacuousException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public SimpleExpressionMustBeVacuousException(String message, ExceptionMetadata metadata) {
+ super(message, ErrorCode.SimpleExpressionMustBeVacuousErrorCode, metadata);
+ }
+}
diff --git a/src/main/java/org/rumbledb/exceptions/TooManyRenamesOnSameTargetSelectorException.java b/src/main/java/org/rumbledb/exceptions/TooManyRenamesOnSameTargetSelectorException.java
new file mode 100644
index 0000000000..727874a373
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/TooManyRenamesOnSameTargetSelectorException.java
@@ -0,0 +1,17 @@
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class TooManyRenamesOnSameTargetSelectorException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public TooManyRenamesOnSameTargetSelectorException(String keyInfo, ExceptionMetadata metadata) {
+ super(
+ "Dynamic Updating error; Too many renames on same object at key: " + keyInfo + ".",
+ ErrorCode.TooManyRenamesOnSameTargetSelectorErrorCode,
+ metadata
+ );
+ }
+
+}
diff --git a/src/main/java/org/rumbledb/exceptions/TooManyReplacesOnSameTargetSelectorException.java b/src/main/java/org/rumbledb/exceptions/TooManyReplacesOnSameTargetSelectorException.java
new file mode 100644
index 0000000000..3808044f5f
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/TooManyReplacesOnSameTargetSelectorException.java
@@ -0,0 +1,20 @@
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class TooManyReplacesOnSameTargetSelectorException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public TooManyReplacesOnSameTargetSelectorException(
+ String targetInfo,
+ String selectorInfo,
+ ExceptionMetadata metadata
+ ) {
+ super(
+ "Dynamic Updating error; Too many replaces on " + targetInfo + " at: " + selectorInfo + ".",
+ ErrorCode.TooManyReplacesOnSameTargetSelectorErrorCode,
+ metadata
+ );
+ }
+}
diff --git a/src/main/java/org/rumbledb/exceptions/TransformBadCopySourceException.java b/src/main/java/org/rumbledb/exceptions/TransformBadCopySourceException.java
new file mode 100644
index 0000000000..91cb324c95
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/TransformBadCopySourceException.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors: Stefan Irimescu, Can Berker Cikis
+ *
+ */
+
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class TransformBadCopySourceException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public TransformBadCopySourceException(String message, ExceptionMetadata metadata) {
+ super(message, ErrorCode.TransformBadCopySource, metadata);
+ }
+}
diff --git a/src/main/java/org/rumbledb/exceptions/TransformModifiesNonCopiedValueException.java b/src/main/java/org/rumbledb/exceptions/TransformModifiesNonCopiedValueException.java
new file mode 100644
index 0000000000..0d425cc2bf
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/TransformModifiesNonCopiedValueException.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors: Stefan Irimescu, Can Berker Cikis
+ *
+ */
+
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class TransformModifiesNonCopiedValueException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public TransformModifiesNonCopiedValueException(String message, ExceptionMetadata metadata) {
+ super(message, ErrorCode.TransformModifiesNonCopiedValue, metadata);
+ }
+}
diff --git a/src/main/java/org/rumbledb/exceptions/UpdateTargetIsEmptySeqException.java b/src/main/java/org/rumbledb/exceptions/UpdateTargetIsEmptySeqException.java
new file mode 100644
index 0000000000..9ee42d6e3e
--- /dev/null
+++ b/src/main/java/org/rumbledb/exceptions/UpdateTargetIsEmptySeqException.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Authors: Stefan Irimescu, Can Berker Cikis
+ *
+ */
+
+package org.rumbledb.exceptions;
+
+import org.rumbledb.errorcodes.ErrorCode;
+
+public class UpdateTargetIsEmptySeqException extends RumbleException {
+
+ private static final long serialVersionUID = 1L;
+
+ public UpdateTargetIsEmptySeqException(String message, ExceptionMetadata metadata) {
+ super(message, ErrorCode.UpdateTargetIsEmptySeqErrorCode, metadata);
+ }
+}
diff --git a/src/main/java/org/rumbledb/expressions/AbstractNodeVisitor.java b/src/main/java/org/rumbledb/expressions/AbstractNodeVisitor.java
index 8b0ea5894d..c402cd71f6 100644
--- a/src/main/java/org/rumbledb/expressions/AbstractNodeVisitor.java
+++ b/src/main/java/org/rumbledb/expressions/AbstractNodeVisitor.java
@@ -67,6 +67,7 @@
import org.rumbledb.expressions.primary.StringLiteralExpression;
import org.rumbledb.expressions.primary.VariableReferenceExpression;
import org.rumbledb.expressions.typing.*;
+import org.rumbledb.expressions.update.*;
public abstract class AbstractNodeVisitor {
@@ -279,6 +280,34 @@ public T visitCastExpression(CastExpression expression, T argument) {
}
// endregion
+ // region update
+
+ public T visitDeleteExpression(DeleteExpression expression, T argument) {
+ return defaultAction(expression, argument);
+ }
+
+ public T visitRenameExpression(RenameExpression expression, T argument) {
+ return defaultAction(expression, argument);
+ }
+
+ public T visitReplaceExpression(ReplaceExpression expression, T argument) {
+ return defaultAction(expression, argument);
+ }
+
+ public T visitInsertExpression(InsertExpression expression, T argument) {
+ return defaultAction(expression, argument);
+ }
+
+ public T visitAppendExpression(AppendExpression expression, T argument) {
+ return defaultAction(expression, argument);
+ }
+
+ public T visitTransformExpression(TransformExpression expression, T argument) {
+ return defaultAction(expression, argument);
+ }
+
+ // endregion
+
// region control
public T visitConditionalExpression(ConditionalExpression expression, T argument) {
return defaultAction(expression, argument);
diff --git a/src/main/java/org/rumbledb/expressions/Expression.java b/src/main/java/org/rumbledb/expressions/Expression.java
index e0009d33c3..ef9c917dce 100644
--- a/src/main/java/org/rumbledb/expressions/Expression.java
+++ b/src/main/java/org/rumbledb/expressions/Expression.java
@@ -38,6 +38,8 @@
*
* An expression is associated with a static context containing information such as
* the in-scope variables.
+ *
+ * An expression has a classification, largely denoting it as UPDATING or SIMPLE.
*/
public abstract class Expression extends Node {
@@ -45,6 +47,8 @@ public abstract class Expression extends Node {
protected SequenceType staticSequenceType;
+ protected ExpressionClassification expressionClassification = ExpressionClassification.UNSET;
+
protected Expression(ExceptionMetadata metadata) {
super(metadata);
}
@@ -113,6 +117,43 @@ public void setStaticSequenceType(SequenceType staticSequenceType) {
this.staticSequenceType = staticSequenceType;
}
+ /**
+ * Gets the inferred expression classification of this node, for use ...
+ *
+ * @return Expression Classification of the expression.
+ */
+ public ExpressionClassification getExpressionClassification() {
+ return expressionClassification;
+ }
+
+ /**
+ * Sets the inferred expression classification of this node, for use ...
+ *
+ * @param expressionClassification the statically inferred expression classification.
+ */
+ public void setExpressionClassification(ExpressionClassification expressionClassification) {
+ this.expressionClassification = expressionClassification;
+ }
+
+ /**
+ * Tells whether this node is an updating expression or not.
+ *
+ * @return true if yes, false otherwise.
+ */
+ public boolean isUpdating() {
+ return this.expressionClassification.isUpdating();
+ }
+
+ /**
+ * Tells whether this node has an unset expression classification.
+ *
+ * @return true if yes, false otherwise.
+ */
+ public boolean isUnset() {
+ return this.expressionClassification.isUnset();
+ }
+
+
@Override
public void print(StringBuffer buffer, int indent) {
for (int i = 0; i < indent; ++i) {
@@ -120,6 +161,7 @@ public void print(StringBuffer buffer, int indent) {
}
buffer.append(getClass().getSimpleName());
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(
" | "
+ (this.staticSequenceType == null
diff --git a/src/main/java/org/rumbledb/expressions/ExpressionClassification.java b/src/main/java/org/rumbledb/expressions/ExpressionClassification.java
new file mode 100644
index 0000000000..f852a1f3de
--- /dev/null
+++ b/src/main/java/org/rumbledb/expressions/ExpressionClassification.java
@@ -0,0 +1,55 @@
+package org.rumbledb.expressions;
+
+/**
+ * An ExpressionClassification classifies an expression under 4 possible classifications.
+ *
+ * A BASIC_UPDATING expression is classified as 1 of 6 expressions in the update package, that can alter the state of
+ * an existing node.
+ *
+ * An UPDATING expression is classified as a BASIC_EXPRESSION or any expression (excluding a TransformExpression) that
+ * directly contains an UPDATING expression and that can alter the state of an existing node.
+ *
+ * A SIMPLE expression is classified as an expression that is not an updating expression.
+ *
+ * A VACUOUS expression follows the definition of the XQuery Update Facility 1.0, but is largely classified as
+ * an expression that can be determined statically to return an empty sequence or raise an error.
+ */
+public enum ExpressionClassification {
+ UNSET,
+ BASIC_UPDATING,
+ UPDATING,
+ SIMPLE,
+ VACUOUS;
+
+ public boolean isUnset() {
+ return this == ExpressionClassification.UNSET;
+ }
+
+ public boolean isUpdating() {
+ return this == ExpressionClassification.BASIC_UPDATING || this == ExpressionClassification.UPDATING;
+ }
+
+ public boolean isSimple() {
+ return !isUpdating();
+ }
+
+ public boolean isVacuous() {
+ return this == ExpressionClassification.VACUOUS;
+ }
+
+ public String toString() {
+ switch (this) {
+ case UNSET:
+ return "unset";
+ case BASIC_UPDATING:
+ return "basic_updating";
+ case UPDATING:
+ return "updating";
+ case SIMPLE:
+ return "simple";
+ case VACUOUS:
+ return "vacuous";
+ }
+ return null;
+ }
+}
diff --git a/src/main/java/org/rumbledb/expressions/arithmetic/AdditiveExpression.java b/src/main/java/org/rumbledb/expressions/arithmetic/AdditiveExpression.java
index b8176dbb2b..2b8b4d6195 100644
--- a/src/main/java/org/rumbledb/expressions/arithmetic/AdditiveExpression.java
+++ b/src/main/java/org/rumbledb/expressions/arithmetic/AdditiveExpression.java
@@ -75,6 +75,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.isMinus ? "-" : "+") + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/arithmetic/MultiplicativeExpression.java b/src/main/java/org/rumbledb/expressions/arithmetic/MultiplicativeExpression.java
index 5ea6859317..7cfca410af 100644
--- a/src/main/java/org/rumbledb/expressions/arithmetic/MultiplicativeExpression.java
+++ b/src/main/java/org/rumbledb/expressions/arithmetic/MultiplicativeExpression.java
@@ -111,6 +111,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.multiplicativeOperator) + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/arithmetic/UnaryExpression.java b/src/main/java/org/rumbledb/expressions/arithmetic/UnaryExpression.java
index cf5974b810..88f4fc7720 100644
--- a/src/main/java/org/rumbledb/expressions/arithmetic/UnaryExpression.java
+++ b/src/main/java/org/rumbledb/expressions/arithmetic/UnaryExpression.java
@@ -70,6 +70,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.negated ? "-" : "+") + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/comparison/ComparisonExpression.java b/src/main/java/org/rumbledb/expressions/comparison/ComparisonExpression.java
index 6fc56a2978..2b69aff20a 100644
--- a/src/main/java/org/rumbledb/expressions/comparison/ComparisonExpression.java
+++ b/src/main/java/org/rumbledb/expressions/comparison/ComparisonExpression.java
@@ -195,6 +195,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.comparisonOperator) + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/flowr/SimpleMapExpression.java b/src/main/java/org/rumbledb/expressions/flowr/SimpleMapExpression.java
index b28946da8a..1b8aff3564 100644
--- a/src/main/java/org/rumbledb/expressions/flowr/SimpleMapExpression.java
+++ b/src/main/java/org/rumbledb/expressions/flowr/SimpleMapExpression.java
@@ -68,6 +68,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (!)");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/postfix/DynamicFunctionCallExpression.java b/src/main/java/org/rumbledb/expressions/postfix/DynamicFunctionCallExpression.java
index baa178d238..e2b5f7894b 100644
--- a/src/main/java/org/rumbledb/expressions/postfix/DynamicFunctionCallExpression.java
+++ b/src/main/java/org/rumbledb/expressions/postfix/DynamicFunctionCallExpression.java
@@ -82,6 +82,7 @@ public void print(StringBuffer buffer, int indent) {
}
buffer.append(getClass().getSimpleName());
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(
" | "
+ (this.staticSequenceType == null
diff --git a/src/main/java/org/rumbledb/expressions/primary/BooleanLiteralExpression.java b/src/main/java/org/rumbledb/expressions/primary/BooleanLiteralExpression.java
index 62ac22aea8..6255bb31ff 100644
--- a/src/main/java/org/rumbledb/expressions/primary/BooleanLiteralExpression.java
+++ b/src/main/java/org/rumbledb/expressions/primary/BooleanLiteralExpression.java
@@ -59,6 +59,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.value) + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/primary/DecimalLiteralExpression.java b/src/main/java/org/rumbledb/expressions/primary/DecimalLiteralExpression.java
index 5d4eb39bad..08a7b31357 100644
--- a/src/main/java/org/rumbledb/expressions/primary/DecimalLiteralExpression.java
+++ b/src/main/java/org/rumbledb/expressions/primary/DecimalLiteralExpression.java
@@ -60,6 +60,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.value) + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/primary/DoubleLiteralExpression.java b/src/main/java/org/rumbledb/expressions/primary/DoubleLiteralExpression.java
index 0313eb5db7..b4a9bea31b 100644
--- a/src/main/java/org/rumbledb/expressions/primary/DoubleLiteralExpression.java
+++ b/src/main/java/org/rumbledb/expressions/primary/DoubleLiteralExpression.java
@@ -59,6 +59,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.value) + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/primary/FunctionCallExpression.java b/src/main/java/org/rumbledb/expressions/primary/FunctionCallExpression.java
index 5b4dd9e989..60719825ca 100644
--- a/src/main/java/org/rumbledb/expressions/primary/FunctionCallExpression.java
+++ b/src/main/java/org/rumbledb/expressions/primary/FunctionCallExpression.java
@@ -84,6 +84,7 @@ public void print(StringBuffer buffer, int indent) {
}
buffer.append(getClass().getSimpleName() + " (" + this.identifier + ")");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(
" | "
+ (this.staticSequenceType == null
diff --git a/src/main/java/org/rumbledb/expressions/primary/InlineFunctionExpression.java b/src/main/java/org/rumbledb/expressions/primary/InlineFunctionExpression.java
index b78f414f1b..4a78d5286f 100644
--- a/src/main/java/org/rumbledb/expressions/primary/InlineFunctionExpression.java
+++ b/src/main/java/org/rumbledb/expressions/primary/InlineFunctionExpression.java
@@ -128,6 +128,7 @@ public void print(StringBuffer buffer, int indent) {
);
buffer.append(")");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(
" | "
+ (this.staticSequenceType == null
diff --git a/src/main/java/org/rumbledb/expressions/primary/IntegerLiteralExpression.java b/src/main/java/org/rumbledb/expressions/primary/IntegerLiteralExpression.java
index bd906a343e..a951c13a8e 100644
--- a/src/main/java/org/rumbledb/expressions/primary/IntegerLiteralExpression.java
+++ b/src/main/java/org/rumbledb/expressions/primary/IntegerLiteralExpression.java
@@ -59,6 +59,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.lexicalValue) + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/primary/StringLiteralExpression.java b/src/main/java/org/rumbledb/expressions/primary/StringLiteralExpression.java
index 86d7971592..1464d480d2 100644
--- a/src/main/java/org/rumbledb/expressions/primary/StringLiteralExpression.java
+++ b/src/main/java/org/rumbledb/expressions/primary/StringLiteralExpression.java
@@ -60,6 +60,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.value) + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/primary/VariableReferenceExpression.java b/src/main/java/org/rumbledb/expressions/primary/VariableReferenceExpression.java
index 29db7d184b..b21d875111 100644
--- a/src/main/java/org/rumbledb/expressions/primary/VariableReferenceExpression.java
+++ b/src/main/java/org/rumbledb/expressions/primary/VariableReferenceExpression.java
@@ -78,6 +78,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" ($" + this.name + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(
" | "
+ (this.staticSequenceType == null
diff --git a/src/main/java/org/rumbledb/expressions/typing/CastExpression.java b/src/main/java/org/rumbledb/expressions/typing/CastExpression.java
index b17d62cfb3..3ef27e5b65 100644
--- a/src/main/java/org/rumbledb/expressions/typing/CastExpression.java
+++ b/src/main/java/org/rumbledb/expressions/typing/CastExpression.java
@@ -60,6 +60,7 @@ public void print(StringBuffer buffer, int indent) {
+ ") "
);
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(
" | "
+ (this.staticSequenceType == null
diff --git a/src/main/java/org/rumbledb/expressions/typing/CastableExpression.java b/src/main/java/org/rumbledb/expressions/typing/CastableExpression.java
index d2e05dfbed..ee5e5bfa15 100644
--- a/src/main/java/org/rumbledb/expressions/typing/CastableExpression.java
+++ b/src/main/java/org/rumbledb/expressions/typing/CastableExpression.java
@@ -60,6 +60,7 @@ public void print(StringBuffer buffer, int indent) {
+ ") "
);
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/typing/InstanceOfExpression.java b/src/main/java/org/rumbledb/expressions/typing/InstanceOfExpression.java
index 0805f3dfe8..64b0be373b 100644
--- a/src/main/java/org/rumbledb/expressions/typing/InstanceOfExpression.java
+++ b/src/main/java/org/rumbledb/expressions/typing/InstanceOfExpression.java
@@ -79,6 +79,7 @@ public void print(StringBuffer buffer, int indent) {
+ ") "
);
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/typing/IsStaticallyExpression.java b/src/main/java/org/rumbledb/expressions/typing/IsStaticallyExpression.java
index 99b992642a..377a9e9c1c 100644
--- a/src/main/java/org/rumbledb/expressions/typing/IsStaticallyExpression.java
+++ b/src/main/java/org/rumbledb/expressions/typing/IsStaticallyExpression.java
@@ -52,6 +52,7 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(getClass().getSimpleName());
buffer.append(" (" + (this.sequenceType.toString()) + ") ");
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(
" | "
+ (this.staticSequenceType == null
diff --git a/src/main/java/org/rumbledb/expressions/typing/TreatExpression.java b/src/main/java/org/rumbledb/expressions/typing/TreatExpression.java
index 959c121b08..4014951b42 100644
--- a/src/main/java/org/rumbledb/expressions/typing/TreatExpression.java
+++ b/src/main/java/org/rumbledb/expressions/typing/TreatExpression.java
@@ -67,6 +67,7 @@ public void print(StringBuffer buffer, int indent) {
+ ") "
);
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(" | " + (this.staticSequenceType == null ? "not set" : this.staticSequenceType));
buffer.append("\n");
for (Node iterator : getChildren()) {
diff --git a/src/main/java/org/rumbledb/expressions/typing/ValidateTypeExpression.java b/src/main/java/org/rumbledb/expressions/typing/ValidateTypeExpression.java
index 6f5ec62560..ac5e438499 100644
--- a/src/main/java/org/rumbledb/expressions/typing/ValidateTypeExpression.java
+++ b/src/main/java/org/rumbledb/expressions/typing/ValidateTypeExpression.java
@@ -66,6 +66,7 @@ public void print(StringBuffer buffer, int indent) {
+ ") "
);
buffer.append(" | " + this.highestExecutionMode);
+ buffer.append(" | " + this.expressionClassification);
buffer.append(
" | "
+ (this.staticSequenceType == null
diff --git a/src/main/java/org/rumbledb/expressions/update/AppendExpression.java b/src/main/java/org/rumbledb/expressions/update/AppendExpression.java
new file mode 100644
index 0000000000..ae7702206d
--- /dev/null
+++ b/src/main/java/org/rumbledb/expressions/update/AppendExpression.java
@@ -0,0 +1,60 @@
+package org.rumbledb.expressions.update;
+
+import org.rumbledb.exceptions.ExceptionMetadata;
+import org.rumbledb.exceptions.OurBadException;
+import org.rumbledb.expressions.AbstractNodeVisitor;
+import org.rumbledb.expressions.Expression;
+import org.rumbledb.expressions.Node;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class AppendExpression extends Expression {
+
+ private Expression arrayExpression;
+ private Expression toAppendExpression;
+
+ public AppendExpression(
+ Expression arrayExpression,
+ Expression toAppendExpression,
+ ExceptionMetadata metadata
+ ) {
+ super(metadata);
+ if (arrayExpression == null) {
+ throw new OurBadException("Array expression cannot be null in a append expression.");
+ }
+ if (toAppendExpression == null) {
+ throw new OurBadException("Expression to append cannot be null in a append expression.");
+ }
+ this.arrayExpression = arrayExpression;
+ this.toAppendExpression = toAppendExpression;
+ }
+
+ public Expression getArrayExpression() {
+ return arrayExpression;
+ }
+
+ public Expression getToAppendExpression() {
+ return toAppendExpression;
+ }
+
+ @Override
+ public List getChildren() {
+ return Arrays.asList(this.arrayExpression, this.toAppendExpression);
+ }
+
+ @Override
+ public T accept(AbstractNodeVisitor visitor, T argument) {
+ return visitor.visitAppendExpression(this, argument);
+ }
+
+ @Override
+ public void serializeToJSONiq(StringBuffer sb, int indent) {
+ indentIt(sb, indent);
+ sb.append("append json ");
+ this.toAppendExpression.serializeToJSONiq(sb, 0);
+ sb.append(" into ");
+ this.arrayExpression.serializeToJSONiq(sb, 0);
+ sb.append("\n");
+ }
+}
diff --git a/src/main/java/org/rumbledb/expressions/update/CopyDeclaration.java b/src/main/java/org/rumbledb/expressions/update/CopyDeclaration.java
new file mode 100644
index 0000000000..f443f4ec8d
--- /dev/null
+++ b/src/main/java/org/rumbledb/expressions/update/CopyDeclaration.java
@@ -0,0 +1,40 @@
+package org.rumbledb.expressions.update;
+
+import org.rumbledb.context.Name;
+import org.rumbledb.expressions.Expression;
+import org.rumbledb.types.SequenceType;
+
+public class CopyDeclaration {
+
+ private Name variableName;
+ private Expression sourceExpression;
+
+ public CopyDeclaration(
+ Name variableName,
+ Expression sourceExpression
+ ) {
+ if (variableName == null) {
+ throw new IllegalArgumentException("Copy clause var decls cannot be empty");
+ }
+ this.variableName = variableName;
+ this.sourceExpression = sourceExpression;
+ }
+
+ public Name getVariableName() {
+ return variableName;
+ }
+
+ public Expression getSourceExpression() {
+ return sourceExpression;
+ }
+
+ public SequenceType getSourceSequenceType() {
+ if (this.sourceExpression != null && this.sourceExpression.getStaticSequenceType() != null) {
+ return this.sourceExpression.getStaticSequenceType();
+ }
+ return SequenceType.ITEM_STAR;
+ }
+
+
+
+}
diff --git a/src/main/java/org/rumbledb/expressions/update/DeleteExpression.java b/src/main/java/org/rumbledb/expressions/update/DeleteExpression.java
new file mode 100644
index 0000000000..57e5368496
--- /dev/null
+++ b/src/main/java/org/rumbledb/expressions/update/DeleteExpression.java
@@ -0,0 +1,60 @@
+package org.rumbledb.expressions.update;
+
+import org.rumbledb.exceptions.ExceptionMetadata;
+import org.rumbledb.exceptions.OurBadException;
+import org.rumbledb.expressions.AbstractNodeVisitor;
+import org.rumbledb.expressions.Expression;
+import org.rumbledb.expressions.Node;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class DeleteExpression extends Expression {
+
+ private Expression mainExpression;
+ private Expression locatorExpression;
+
+ public DeleteExpression(
+ Expression mainExpression,
+ Expression locatorExpression,
+ ExceptionMetadata metadata
+ ) {
+ super(metadata);
+ if (mainExpression == null) {
+ throw new OurBadException("Main expression cannot be null in a delete expression.");
+ }
+ if (locatorExpression == null) {
+ throw new OurBadException("Locator expression cannot be null in a delete expression.");
+ }
+ this.mainExpression = mainExpression;
+ this.locatorExpression = locatorExpression;
+ }
+
+ @Override
+ public List getChildren() {
+ return Arrays.asList(this.mainExpression, this.locatorExpression);
+ }
+
+ public Expression getMainExpression() {
+ return mainExpression;
+ }
+
+ public Expression getLocatorExpression() {
+ return locatorExpression;
+ }
+
+
+ @Override
+ public T accept(AbstractNodeVisitor visitor, T argument) {
+ return visitor.visitDeleteExpression(this, argument);
+ }
+
+ @Override
+ public void serializeToJSONiq(StringBuffer sb, int indent) {
+ indentIt(sb, indent);
+ sb.append("delete json ");
+ this.mainExpression.serializeToJSONiq(sb, 0);
+ this.locatorExpression.serializeToJSONiq(sb, 0);
+ sb.append("\n");
+ }
+}
diff --git a/src/main/java/org/rumbledb/expressions/update/InsertExpression.java b/src/main/java/org/rumbledb/expressions/update/InsertExpression.java
new file mode 100644
index 0000000000..b4edff096c
--- /dev/null
+++ b/src/main/java/org/rumbledb/expressions/update/InsertExpression.java
@@ -0,0 +1,74 @@
+package org.rumbledb.expressions.update;
+
+import org.rumbledb.exceptions.ExceptionMetadata;
+import org.rumbledb.exceptions.OurBadException;
+import org.rumbledb.expressions.AbstractNodeVisitor;
+import org.rumbledb.expressions.Expression;
+import org.rumbledb.expressions.Node;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class InsertExpression extends Expression {
+
+ private Expression mainExpression;
+ private Expression toInsertExpression;
+ private Expression positionExpression;
+
+ public InsertExpression(
+ Expression mainExpression,
+ Expression toInsertExpression,
+ Expression positionExpression,
+ ExceptionMetadata metadata
+ ) {
+ super(metadata);
+ this.mainExpression = mainExpression;
+ this.toInsertExpression = toInsertExpression;
+ this.positionExpression = positionExpression;
+ }
+
+ public boolean hasPositionExpression() {
+ return positionExpression != null;
+ }
+
+ public Expression getMainExpression() {
+ return mainExpression;
+ }
+
+ public Expression getToInsertExpression() {
+ return toInsertExpression;
+ }
+
+ public Expression getPositionExpression() {
+ if (positionExpression == null) {
+ throw new OurBadException("No position expression present in Insert Expression");
+ }
+ return positionExpression;
+ }
+
+ @Override
+ public List getChildren() {
+ return this.positionExpression == null
+ ? Arrays.asList(mainExpression, toInsertExpression)
+ : Arrays.asList(mainExpression, toInsertExpression, positionExpression);
+ }
+
+ @Override
+ public T accept(AbstractNodeVisitor visitor, T argument) {
+ return visitor.visitInsertExpression(this, argument);
+ }
+
+ @Override
+ public void serializeToJSONiq(StringBuffer sb, int indent) {
+ indentIt(sb, indent);
+ sb.append("insert json ");
+ toInsertExpression.serializeToJSONiq(sb, 0);
+ sb.append(" into ");
+ mainExpression.serializeToJSONiq(sb, 0);
+ if (this.hasPositionExpression()) {
+ sb.append(" at position ");
+ positionExpression.serializeToJSONiq(sb, 0);
+ }
+ sb.append("\n");
+ }
+}
diff --git a/src/main/java/org/rumbledb/expressions/update/RenameExpression.java b/src/main/java/org/rumbledb/expressions/update/RenameExpression.java
new file mode 100644
index 0000000000..e50fea257b
--- /dev/null
+++ b/src/main/java/org/rumbledb/expressions/update/RenameExpression.java
@@ -0,0 +1,71 @@
+package org.rumbledb.expressions.update;
+
+import org.rumbledb.exceptions.ExceptionMetadata;
+import org.rumbledb.exceptions.OurBadException;
+import org.rumbledb.expressions.AbstractNodeVisitor;
+import org.rumbledb.expressions.Expression;
+import org.rumbledb.expressions.Node;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class RenameExpression extends Expression {
+
+ private Expression mainExpression;
+ private Expression locatorExpression;
+ private Expression nameExpression;
+
+ public RenameExpression(
+ Expression mainExpression,
+ Expression locatorExpression,
+ Expression nameExpression,
+ ExceptionMetadata metadata
+ ) {
+ super(metadata);
+ if (mainExpression == null) {
+ throw new OurBadException("Main expression cannot be null in a rename expression.");
+ }
+ if (locatorExpression == null) {
+ throw new OurBadException("Locator expression cannot be null in a rename expression.");
+ }
+ if (nameExpression == null) {
+ throw new OurBadException("Name expression cannot be null in a rename expression.");
+ }
+ this.mainExpression = mainExpression;
+ this.locatorExpression = locatorExpression;
+ this.nameExpression = nameExpression;
+ }
+
+ @Override
+ public List getChildren() {
+ return Arrays.asList(this.mainExpression, this.locatorExpression, this.nameExpression);
+ }
+
+ public Expression getMainExpression() {
+ return mainExpression;
+ }
+
+ public Expression getLocatorExpression() {
+ return locatorExpression;
+ }
+
+ public Expression getNameExpression() {
+ return nameExpression;
+ }
+
+ @Override
+ public T accept(AbstractNodeVisitor visitor, T argument) {
+ return visitor.visitRenameExpression(this, argument);
+ }
+
+ @Override
+ public void serializeToJSONiq(StringBuffer sb, int indent) {
+ indentIt(sb, indent);
+ sb.append("rename json ");
+ this.mainExpression.serializeToJSONiq(sb, 0);
+ this.locatorExpression.serializeToJSONiq(sb, 0);
+ this.nameExpression.serializeToJSONiq(sb, 0);
+ sb.append("\n");
+
+ }
+}
diff --git a/src/main/java/org/rumbledb/expressions/update/ReplaceExpression.java b/src/main/java/org/rumbledb/expressions/update/ReplaceExpression.java
new file mode 100644
index 0000000000..c914f249b4
--- /dev/null
+++ b/src/main/java/org/rumbledb/expressions/update/ReplaceExpression.java
@@ -0,0 +1,71 @@
+package org.rumbledb.expressions.update;
+
+import org.rumbledb.exceptions.ExceptionMetadata;
+import org.rumbledb.exceptions.OurBadException;
+import org.rumbledb.expressions.AbstractNodeVisitor;
+import org.rumbledb.expressions.Expression;
+import org.rumbledb.expressions.Node;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class ReplaceExpression extends Expression {
+
+ private Expression mainExpression;
+ private Expression locatorExpression;
+ private Expression replacerExpression;
+
+ public ReplaceExpression(
+ Expression mainExpression,
+ Expression locatorExpression,
+ Expression replacerExpression,
+ ExceptionMetadata metadata
+ ) {
+ super(metadata);
+ if (mainExpression == null) {
+ throw new OurBadException("Main expression cannot be null in a replace expression.");
+ }
+ if (locatorExpression == null) {
+ throw new OurBadException("Locator expression cannot be null in a replace expression.");
+ }
+ if (replacerExpression == null) {
+ throw new OurBadException("New replacer expression cannot be null in a replace expression.");
+ }
+ this.mainExpression = mainExpression;
+ this.locatorExpression = locatorExpression;
+ this.replacerExpression = replacerExpression;
+ }
+
+ @Override
+ public List getChildren() {
+ return Arrays.asList(this.mainExpression, this.locatorExpression, this.replacerExpression);
+ }
+
+ public Expression getMainExpression() {
+ return mainExpression;
+ }
+
+ public Expression getLocatorExpression() {
+ return locatorExpression;
+ }
+
+ public Expression getReplacerExpression() {
+ return replacerExpression;
+ }
+
+ @Override
+ public T accept(AbstractNodeVisitor visitor, T argument) {
+ return visitor.visitReplaceExpression(this, argument);
+ }
+
+ @Override
+ public void serializeToJSONiq(StringBuffer sb, int indent) {
+ indentIt(sb, indent);
+ sb.append("replace json value of ");
+ this.mainExpression.serializeToJSONiq(sb, 0);
+ this.locatorExpression.serializeToJSONiq(sb, 0);
+ sb.append(" with ");
+ this.replacerExpression.serializeToJSONiq(sb, 0);
+ sb.append("\n");
+ }
+}
diff --git a/src/main/java/org/rumbledb/expressions/update/TransformExpression.java b/src/main/java/org/rumbledb/expressions/update/TransformExpression.java
new file mode 100644
index 0000000000..f4773ab769
--- /dev/null
+++ b/src/main/java/org/rumbledb/expressions/update/TransformExpression.java
@@ -0,0 +1,92 @@
+package org.rumbledb.expressions.update;
+
+import org.rumbledb.exceptions.ExceptionMetadata;
+import org.rumbledb.exceptions.SemanticException;
+import org.rumbledb.expressions.*;
+
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+public class TransformExpression extends Expression {
+
+ private List copyDeclarations;
+ private Expression modifyExpression;
+ private Expression returnExpression;
+ private int mutabilityLevel;
+
+ public TransformExpression(
+ List copyDeclarations,
+ Expression modifyExpression,
+ Expression returnExpression,
+ ExceptionMetadata metadata
+ ) {
+ super(metadata);
+ if (copyDeclarations == null || copyDeclarations.isEmpty()) {
+ throw new SemanticException("Transform expression must have at least one variable", metadata);
+ }
+ this.copyDeclarations = copyDeclarations;
+ this.modifyExpression = modifyExpression;
+ this.returnExpression = returnExpression;
+ this.mutabilityLevel = 0;
+ }
+
+ public List getCopyDeclarations() {
+ return copyDeclarations;
+ }
+
+ public List getCopySourceExpressions() {
+ return this.copyDeclarations.stream()
+ .filter(Objects::nonNull)
+ .map(CopyDeclaration::getSourceExpression)
+ .collect(Collectors.toList());
+ }
+
+ public Expression getModifyExpression() {
+ return modifyExpression;
+ }
+
+ public Expression getReturnExpression() {
+ return returnExpression;
+ }
+
+ @Override
+ public List getChildren() {
+ List result = this.copyDeclarations.stream()
+ .filter(Objects::nonNull)
+ .map(CopyDeclaration::getSourceExpression)
+ .collect(Collectors.toList());
+ result.add(this.modifyExpression);
+ result.add(this.returnExpression);
+ return result;
+ }
+
+ @Override
+ public T accept(AbstractNodeVisitor visitor, T argument) {
+ return visitor.visitTransformExpression(this, argument);
+ }
+
+ @Override
+ public void serializeToJSONiq(StringBuffer sb, int indent) {
+ indentIt(sb, indent);
+ for (CopyDeclaration copyDecl : this.copyDeclarations) {
+ sb.append("copy $").append(copyDecl.getVariableName().toString());
+ sb.append(" := (");
+ copyDecl.getSourceExpression().serializeToJSONiq(sb, 0);
+ sb.append(")\n");
+ }
+ sb.append("\n modify ");
+ this.modifyExpression.serializeToJSONiq(sb, 0);
+ sb.append("\n return ");
+ this.returnExpression.serializeToJSONiq(sb, 0);
+ sb.append("\n");
+ }
+
+ public int getMutabilityLevel() {
+ return this.mutabilityLevel;
+ }
+
+ public void setMutabilityLevel(int mutabilityLevel) {
+ this.mutabilityLevel = mutabilityLevel;
+ }
+}
diff --git a/src/main/java/org/rumbledb/items/ArrayItem.java b/src/main/java/org/rumbledb/items/ArrayItem.java
index ee50a85dca..ee8d7815c1 100644
--- a/src/main/java/org/rumbledb/items/ArrayItem.java
+++ b/src/main/java/org/rumbledb/items/ArrayItem.java
@@ -35,14 +35,18 @@ public class ArrayItem implements Item {
private static final long serialVersionUID = 1L;
private List
- arrayItems;
+ private int mutabilityLevel;
+
public ArrayItem() {
super();
this.arrayItems = new ArrayList<>();
+ this.mutabilityLevel = 0;
}
public ArrayItem(List
- arrayItems) {
super();
this.arrayItems = arrayItems;
+ this.mutabilityLevel = 0;
}
public boolean equals(Object otherItem) {
@@ -83,6 +87,21 @@ public void putItem(Item value) {
this.arrayItems.add(value);
}
+ @Override
+ public void putItemAt(Item value, int i) {
+ this.arrayItems.add(i, value);
+ }
+
+ @Override
+ public void putItemsAt(List
- values, int i) {
+ this.arrayItems.addAll(i, values);
+ }
+
+ @Override
+ public void removeItemAt(int i) {
+ this.arrayItems.remove(i);
+ }
+
@Override
public boolean isArray() {
return true;
@@ -122,4 +141,17 @@ public ItemType getDynamicType() {
public boolean getEffectiveBooleanValue() {
return true;
}
+
+ @Override
+ public int getMutabilityLevel() {
+ return this.mutabilityLevel;
+ }
+
+ @Override
+ public void setMutabilityLevel(int mutabilityLevel) {
+ this.mutabilityLevel = mutabilityLevel;
+ for (Item item : arrayItems) {
+ item.setMutabilityLevel(mutabilityLevel);
+ }
+ }
}
diff --git a/src/main/java/org/rumbledb/items/Base64BinaryItem.java b/src/main/java/org/rumbledb/items/Base64BinaryItem.java
index 0ccbd50132..5e2b8dc3ad 100644
--- a/src/main/java/org/rumbledb/items/Base64BinaryItem.java
+++ b/src/main/java/org/rumbledb/items/Base64BinaryItem.java
@@ -3,8 +3,8 @@
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
-import org.apache.commons.lang.StringUtils;
-import org.apache.commons.net.util.Base64;
+import org.apache.commons.lang3.StringUtils;
+import java.util.Base64;
import org.rumbledb.api.Item;
import org.rumbledb.exceptions.ExceptionMetadata;
import org.rumbledb.expressions.comparison.ComparisonExpression.ComparisonOperator;
@@ -41,7 +41,7 @@ public Base64BinaryItem() {
public Base64BinaryItem(String stringValue) {
this.value = parseBase64BinaryString(stringValue);
- this.stringValue = StringUtils.chomp(Base64.encodeBase64String(this.value));
+ this.stringValue = StringUtils.chomp(Base64.getEncoder().encodeToString(this.value));
}
@Override
@@ -113,7 +113,7 @@ public void write(Kryo kryo, Output output) {
public void read(Kryo kryo, Input input) {
int bytesLength = input.readInt();
this.value = input.readBytes(bytesLength);
- this.stringValue = StringUtils.chomp(Base64.encodeBase64String(this.value));
+ this.stringValue = StringUtils.chomp(Base64.getEncoder().encodeToString(this.value));
}
@Override
diff --git a/src/main/java/org/rumbledb/items/DoubleItem.java b/src/main/java/org/rumbledb/items/DoubleItem.java
index fab38f6247..a82018813c 100644
--- a/src/main/java/org/rumbledb/items/DoubleItem.java
+++ b/src/main/java/org/rumbledb/items/DoubleItem.java
@@ -24,7 +24,7 @@
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.rumbledb.api.Item;
import org.rumbledb.exceptions.ExceptionMetadata;
import org.rumbledb.exceptions.IteratorFlowException;
diff --git a/src/main/java/org/rumbledb/items/FloatItem.java b/src/main/java/org/rumbledb/items/FloatItem.java
index d9dca106c3..62f6a2aaee 100644
--- a/src/main/java/org/rumbledb/items/FloatItem.java
+++ b/src/main/java/org/rumbledb/items/FloatItem.java
@@ -24,7 +24,7 @@
import com.esotericsoftware.kryo.io.Input;
import com.esotericsoftware.kryo.io.Output;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.rumbledb.api.Item;
import org.rumbledb.exceptions.ExceptionMetadata;
import org.rumbledb.exceptions.IteratorFlowException;
diff --git a/src/main/java/org/rumbledb/items/ObjectItem.java b/src/main/java/org/rumbledb/items/ObjectItem.java
index d6d44306e6..c6f535ac53 100644
--- a/src/main/java/org/rumbledb/items/ObjectItem.java
+++ b/src/main/java/org/rumbledb/items/ObjectItem.java
@@ -28,10 +28,8 @@
import org.rumbledb.exceptions.ExceptionMetadata;
import org.rumbledb.types.BuiltinTypesCatalogue;
import org.rumbledb.types.ItemType;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+
+import java.util.*;
public class ObjectItem implements Item {
@@ -40,10 +38,13 @@ public class ObjectItem implements Item {
private List
- values;
private List keys;
+ private int mutabilityLevel;
+
public ObjectItem() {
super();
this.keys = new ArrayList<>();
this.values = new ArrayList<>();
+ this.mutabilityLevel = 0;
}
public ObjectItem(List keys, List
- values, ExceptionMetadata itemMetadata) {
@@ -51,6 +52,7 @@ public ObjectItem(List keys, List
- values, ExceptionMetadata itemMe
checkForDuplicateKeys(keys, itemMetadata);
this.keys = keys;
this.values = values;
+ this.mutabilityLevel = 0;
}
public boolean equals(Object otherItem) {
@@ -113,6 +115,7 @@ public ObjectItem(Map> keyValuePairs) {
this.keys = keyList;
this.values = valueList;
+ this.mutabilityLevel = 0;
}
@Override
@@ -152,6 +155,15 @@ public void putItemByKey(String s, Item value) {
checkForDuplicateKeys(this.keys, ExceptionMetadata.EMPTY_METADATA);
}
+ @Override
+ public void removeItemByKey(String s) {
+ if (this.keys.contains(s)) {
+ int index = this.keys.indexOf(s);
+ this.values.remove(index);
+ this.keys.remove(index);
+ }
+ }
+
@Override
public boolean isObject() {
return true;
@@ -189,4 +201,16 @@ public boolean getEffectiveBooleanValue() {
return true;
}
+ @Override
+ public int getMutabilityLevel() {
+ return this.mutabilityLevel;
+ }
+
+ @Override
+ public void setMutabilityLevel(int mutabilityLevel) {
+ this.mutabilityLevel = mutabilityLevel;
+ for (Item item : values) {
+ item.setMutabilityLevel(mutabilityLevel);
+ }
+ }
}
diff --git a/src/main/java/org/rumbledb/parser/Jsoniq.g4 b/src/main/java/org/rumbledb/parser/Jsoniq.g4
index 78457c372b..a9295babf1 100644
--- a/src/main/java/org/rumbledb/parser/Jsoniq.g4
+++ b/src/main/java/org/rumbledb/parser/Jsoniq.g4
@@ -83,6 +83,12 @@ exprSingle : flowrExpr
| typeSwitchExpr
| ifExpr
| tryCatchExpr
+ | insertExpr
+ | deleteExpr
+ | renameExpr
+ | replaceExpr
+ | transformExpr
+ | appendExpr
| orExpr;
flowrExpr : (start_for=forClause| start_let=letClause)
@@ -237,6 +243,25 @@ inlineFunctionExpr : 'function' '(' paramList? ')'
(Kas return_type=sequenceType)?
('{' (fn_body=expr)? '}');
+///////////////////////// Updating Expressions
+
+insertExpr : Kinsert Kjson to_insert_expr=exprSingle Kinto main_expr=exprSingle (Kat Kposition pos_expr=exprSingle)?
+ | Kinsert Kjson pairConstructor ( ',' pairConstructor )* Kinto main_expr=exprSingle;
+
+deleteExpr : Kdelete Kjson updateLocator;
+
+renameExpr : Krename Kjson updateLocator Kas name_expr=exprSingle;
+
+replaceExpr : Kreplace Kjson Kvalue Kof updateLocator Kwith replacer_expr=exprSingle;
+
+transformExpr : Kcopy Kjson copyDecl ( ',' copyDecl )* Kmodify mod_expr=exprSingle Kreturn ret_expr=exprSingle;
+
+appendExpr : Kappend Kjson to_append_expr=exprSingle Kinto array_expr=exprSingle;
+
+updateLocator : main_expr=primaryExpr ( arrayLookup | objectLookup )+;
+
+copyDecl : var_ref=varRef ':=' src_expr=exprSingle;
+
///////////////////////// Types
sequenceType : '(' ')'
@@ -318,6 +343,18 @@ keyWords : Kjsoniq
| Ktrue
| Kfalse
| Ktype
+ | Kinsert
+ | Kdelete
+ | Krename
+ | Kreplace
+ | Kappend
+ | Kcopy
+ | Kmodify
+ | Kjson
+ | Kinto
+ | Kvalue
+ | Kwith
+ | Kposition
| Kvalidate
| Kannotate
;
@@ -432,6 +469,30 @@ Kitem : 'item';
Kvariable : 'variable';
+Kinsert : 'insert';
+
+Kdelete : 'delete';
+
+Krename : 'rename';
+
+Kreplace : 'replace';
+
+Kcopy : 'copy';
+
+Kmodify : 'modify';
+
+Kappend : 'append';
+
+Kinto : 'into';
+
+Kvalue : 'value';
+
+Kjson : 'json';
+
+Kwith : 'with';
+
+Kposition : 'position';
+
STRING : '"' (ESC | ~ ["\\])* '"';
fragment ESC : '\\' (["\\/bfnrt] | UNICODE);
diff --git a/src/main/java/org/rumbledb/parser/Jsoniq.tokens b/src/main/java/org/rumbledb/parser/Jsoniq.tokens
index 1a3cdf8b79..240e0ded8e 100644
--- a/src/main/java/org/rumbledb/parser/Jsoniq.tokens
+++ b/src/main/java/org/rumbledb/parser/Jsoniq.tokens
@@ -57,73 +57,84 @@ T__55=56
T__56=57
T__57=58
T__58=59
-T__59=60
-Kfor=61
-Klet=62
-Kwhere=63
-Kgroup=64
-Kby=65
-Korder=66
-Kreturn=67
-Kif=68
-Kin=69
-Kas=70
-Kat=71
-Kallowing=72
-Kempty=73
-Kcount=74
-Kstable=75
-Kascending=76
-Kdescending=77
-Ksome=78
-Kevery=79
-Ksatisfies=80
-Kcollation=81
-Kgreatest=82
-Kleast=83
-Kswitch=84
-Kcase=85
-Ktry=86
-Kcatch=87
-Kdefault=88
-Kthen=89
-Kelse=90
-Ktypeswitch=91
-Kor=92
-Kand=93
-Knot=94
-Kto=95
-Kinstance=96
-Kof=97
-Kstatically=98
-Kis=99
-Ktreat=100
-Kcast=101
-Kcastable=102
-Kversion=103
-Kjsoniq=104
-Kunordered=105
-Ktrue=106
-Kfalse=107
-Ktype=108
-Kvalidate=109
-Kannotate=110
-Kdeclare=111
-Kcontext=112
-Kitem=113
-Kvariable=114
-STRING=115
-ArgumentPlaceholder=116
-NullLiteral=117
-Literal=118
-NumericLiteral=119
-IntegerLiteral=120
-DecimalLiteral=121
-DoubleLiteral=122
-WS=123
-NCName=124
-XQComment=125
-ContentChar=126
+Kfor=60
+Klet=61
+Kwhere=62
+Kgroup=63
+Kby=64
+Korder=65
+Kreturn=66
+Kif=67
+Kin=68
+Kas=69
+Kat=70
+Kallowing=71
+Kempty=72
+Kcount=73
+Kstable=74
+Kascending=75
+Kdescending=76
+Ksome=77
+Kevery=78
+Ksatisfies=79
+Kcollation=80
+Kgreatest=81
+Kleast=82
+Kswitch=83
+Kcase=84
+Ktry=85
+Kcatch=86
+Kdefault=87
+Kthen=88
+Kelse=89
+Ktypeswitch=90
+Kor=91
+Kand=92
+Knot=93
+Kto=94
+Kinstance=95
+Kof=96
+Kstatically=97
+Kis=98
+Ktreat=99
+Kcast=100
+Kcastable=101
+Kversion=102
+Kjsoniq=103
+Kunordered=104
+Ktrue=105
+Kfalse=106
+Ktype=107
+Kvalidate=108
+Kannotate=109
+Kdeclare=110
+Kcontext=111
+Kitem=112
+Kvariable=113
+Kinsert=114
+Kdelete=115
+Krename=116
+Kreplace=117
+Kcopy=118
+Kmodify=119
+Kappend=120
+Kinto=121
+Kvalue=122
+Kjson=123
+Kwith=124
+Kposition=125
+STRING=126
+ArgumentPlaceholder=127
+NullLiteral=128
+Literal=129
+NumericLiteral=130
+IntegerLiteral=131
+DecimalLiteral=132
+DoubleLiteral=133
+WS=134
+NCName=135
+XQComment=136
+ContentChar=137
';'=1
'module'=2
'namespace'=3
@@ -154,89 +165,100 @@ ContentChar=126
'jsound'=28
'compact'=29
'verbose'=30
-'json'=31
-'schema'=32
-'$'=33
-'|'=34
-'*'=35
-'eq'=36
-'ne'=37
-'lt'=38
-'le'=39
-'gt'=40
-'ge'=41
-'!='=42
-'<'=43
-'<='=44
-'>'=45
-'>='=46
-'||'=47
-'+'=48
-'-'=49
-'div'=50
-'idiv'=51
-'mod'=52
-'!'=53
-'['=54
-']'=55
-'.'=56
-'$$'=57
-'#'=58
-'{|'=59
-'|}'=60
-'for'=61
-'let'=62
-'where'=63
-'group'=64
-'by'=65
-'order'=66
-'return'=67
-'if'=68
-'in'=69
-'as'=70
-'at'=71
-'allowing'=72
-'empty'=73
-'count'=74
-'stable'=75
-'ascending'=76
-'descending'=77
-'some'=78
-'every'=79
-'satisfies'=80
-'collation'=81
-'greatest'=82
-'least'=83
-'switch'=84
-'case'=85
-'try'=86
-'catch'=87
-'default'=88
-'then'=89
-'else'=90
-'typeswitch'=91
-'or'=92
-'and'=93
-'not'=94
-'to'=95
-'instance'=96
-'of'=97
-'statically'=98
-'is'=99
-'treat'=100
-'cast'=101
-'castable'=102
-'version'=103
-'jsoniq'=104
-'unordered'=105
-'true'=106
-'false'=107
-'type'=108
-'validate'=109
-'annotate'=110
-'declare'=111
-'context'=112
-'item'=113
-'variable'=114
-'?'=116
-'null'=117
+'schema'=31
+'$'=32
+'|'=33
+'*'=34
+'eq'=35
+'ne'=36
+'lt'=37
+'le'=38
+'gt'=39
+'ge'=40
+'!='=41
+'<'=42
+'<='=43
+'>'=44
+'>='=45
+'||'=46
+'+'=47
+'-'=48
+'div'=49
+'idiv'=50
+'mod'=51
+'!'=52
+'['=53
+']'=54
+'.'=55
+'$$'=56
+'#'=57
+'{|'=58
+'|}'=59
+'for'=60
+'let'=61
+'where'=62
+'group'=63
+'by'=64
+'order'=65
+'return'=66
+'if'=67
+'in'=68
+'as'=69
+'at'=70
+'allowing'=71
+'empty'=72
+'count'=73
+'stable'=74
+'ascending'=75
+'descending'=76
+'some'=77
+'every'=78
+'satisfies'=79
+'collation'=80
+'greatest'=81
+'least'=82
+'switch'=83
+'case'=84
+'try'=85
+'catch'=86
+'default'=87
+'then'=88
+'else'=89
+'typeswitch'=90
+'or'=91
+'and'=92
+'not'=93
+'to'=94
+'instance'=95
+'of'=96
+'statically'=97
+'is'=98
+'treat'=99
+'cast'=100
+'castable'=101
+'version'=102
+'jsoniq'=103
+'unordered'=104
+'true'=105
+'false'=106
+'type'=107
+'validate'=108
+'annotate'=109
+'declare'=110
+'context'=111
+'item'=112
+'variable'=113
+'insert'=114
+'delete'=115
+'rename'=116
+'replace'=117
+'copy'=118
+'modify'=119
+'append'=120
+'into'=121
+'value'=122
+'json'=123
+'with'=124
+'position'=125
+'?'=127
+'null'=128
diff --git a/src/main/java/org/rumbledb/parser/JsoniqBaseVisitor.java b/src/main/java/org/rumbledb/parser/JsoniqBaseVisitor.java
index 2944705596..1417b8fa51 100644
--- a/src/main/java/org/rumbledb/parser/JsoniqBaseVisitor.java
+++ b/src/main/java/org/rumbledb/parser/JsoniqBaseVisitor.java
@@ -581,6 +581,62 @@ public class JsoniqBaseVisitor extends AbstractParseTreeVisitor implements
* {@link #visitChildren} on {@code ctx}.
*/
@Override public T visitInlineFunctionExpr(JsoniqParser.InlineFunctionExprContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitInsertExpr(JsoniqParser.InsertExprContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitDeleteExpr(JsoniqParser.DeleteExprContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitRenameExpr(JsoniqParser.RenameExprContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitReplaceExpr(JsoniqParser.ReplaceExprContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitTransformExpr(JsoniqParser.TransformExprContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitAppendExpr(JsoniqParser.AppendExprContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitUpdateLocator(JsoniqParser.UpdateLocatorContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitCopyDecl(JsoniqParser.CopyDeclContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
diff --git a/src/main/java/org/rumbledb/parser/JsoniqLexer.java b/src/main/java/org/rumbledb/parser/JsoniqLexer.java
index 888f964a1d..1e20081b92 100644
--- a/src/main/java/org/rumbledb/parser/JsoniqLexer.java
+++ b/src/main/java/org/rumbledb/parser/JsoniqLexer.java
@@ -30,17 +30,19 @@ public class JsoniqLexer extends Lexer {
T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45,
T__45=46, T__46=47, T__47=48, T__48=49, T__49=50, T__50=51, T__51=52,
T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59,
- T__59=60, Kfor=61, Klet=62, Kwhere=63, Kgroup=64, Kby=65, Korder=66, Kreturn=67,
- Kif=68, Kin=69, Kas=70, Kat=71, Kallowing=72, Kempty=73, Kcount=74, Kstable=75,
- Kascending=76, Kdescending=77, Ksome=78, Kevery=79, Ksatisfies=80, Kcollation=81,
- Kgreatest=82, Kleast=83, Kswitch=84, Kcase=85, Ktry=86, Kcatch=87, Kdefault=88,
- Kthen=89, Kelse=90, Ktypeswitch=91, Kor=92, Kand=93, Knot=94, Kto=95,
- Kinstance=96, Kof=97, Kstatically=98, Kis=99, Ktreat=100, Kcast=101, Kcastable=102,
- Kversion=103, Kjsoniq=104, Kunordered=105, Ktrue=106, Kfalse=107, Ktype=108,
- Kvalidate=109, Kannotate=110, Kdeclare=111, Kcontext=112, Kitem=113, Kvariable=114,
- STRING=115, ArgumentPlaceholder=116, NullLiteral=117, Literal=118, NumericLiteral=119,
- IntegerLiteral=120, DecimalLiteral=121, DoubleLiteral=122, WS=123, NCName=124,
- XQComment=125, ContentChar=126;
+ Kfor=60, Klet=61, Kwhere=62, Kgroup=63, Kby=64, Korder=65, Kreturn=66,
+ Kif=67, Kin=68, Kas=69, Kat=70, Kallowing=71, Kempty=72, Kcount=73, Kstable=74,
+ Kascending=75, Kdescending=76, Ksome=77, Kevery=78, Ksatisfies=79, Kcollation=80,
+ Kgreatest=81, Kleast=82, Kswitch=83, Kcase=84, Ktry=85, Kcatch=86, Kdefault=87,
+ Kthen=88, Kelse=89, Ktypeswitch=90, Kor=91, Kand=92, Knot=93, Kto=94,
+ Kinstance=95, Kof=96, Kstatically=97, Kis=98, Ktreat=99, Kcast=100, Kcastable=101,
+ Kversion=102, Kjsoniq=103, Kunordered=104, Ktrue=105, Kfalse=106, Ktype=107,
+ Kvalidate=108, Kannotate=109, Kdeclare=110, Kcontext=111, Kitem=112, Kvariable=113,
+ Kinsert=114, Kdelete=115, Krename=116, Kreplace=117, Kcopy=118, Kmodify=119,
+ Kappend=120, Kinto=121, Kvalue=122, Kjson=123, Kwith=124, Kposition=125,
+ STRING=126, ArgumentPlaceholder=127, NullLiteral=128, Literal=129, NumericLiteral=130,
+ IntegerLiteral=131, DecimalLiteral=132, DoubleLiteral=133, WS=134, NCName=135,
+ XQComment=136, ContentChar=137;
public static String[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};
@@ -58,17 +60,19 @@ private static String[] makeRuleNames() {
"T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40",
"T__41", "T__42", "T__43", "T__44", "T__45", "T__46", "T__47", "T__48",
"T__49", "T__50", "T__51", "T__52", "T__53", "T__54", "T__55", "T__56",
- "T__57", "T__58", "T__59", "Kfor", "Klet", "Kwhere", "Kgroup", "Kby",
- "Korder", "Kreturn", "Kif", "Kin", "Kas", "Kat", "Kallowing", "Kempty",
- "Kcount", "Kstable", "Kascending", "Kdescending", "Ksome", "Kevery",
- "Ksatisfies", "Kcollation", "Kgreatest", "Kleast", "Kswitch", "Kcase",
- "Ktry", "Kcatch", "Kdefault", "Kthen", "Kelse", "Ktypeswitch", "Kor",
- "Kand", "Knot", "Kto", "Kinstance", "Kof", "Kstatically", "Kis", "Ktreat",
- "Kcast", "Kcastable", "Kversion", "Kjsoniq", "Kunordered", "Ktrue", "Kfalse",
- "Ktype", "Kvalidate", "Kannotate", "Kdeclare", "Kcontext", "Kitem", "Kvariable",
- "STRING", "ESC", "UNICODE", "HEX", "ArgumentPlaceholder", "NullLiteral",
- "Literal", "NumericLiteral", "IntegerLiteral", "DecimalLiteral", "DoubleLiteral",
- "Digits", "WS", "NCName", "NameStartChar", "NameChar", "XQComment", "ContentChar"
+ "T__57", "T__58", "Kfor", "Klet", "Kwhere", "Kgroup", "Kby", "Korder",
+ "Kreturn", "Kif", "Kin", "Kas", "Kat", "Kallowing", "Kempty", "Kcount",
+ "Kstable", "Kascending", "Kdescending", "Ksome", "Kevery", "Ksatisfies",
+ "Kcollation", "Kgreatest", "Kleast", "Kswitch", "Kcase", "Ktry", "Kcatch",
+ "Kdefault", "Kthen", "Kelse", "Ktypeswitch", "Kor", "Kand", "Knot", "Kto",
+ "Kinstance", "Kof", "Kstatically", "Kis", "Ktreat", "Kcast", "Kcastable",
+ "Kversion", "Kjsoniq", "Kunordered", "Ktrue", "Kfalse", "Ktype", "Kvalidate",
+ "Kannotate", "Kdeclare", "Kcontext", "Kitem", "Kvariable", "Kinsert",
+ "Kdelete", "Krename", "Kreplace", "Kcopy", "Kmodify", "Kappend", "Kinto",
+ "Kvalue", "Kjson", "Kwith", "Kposition", "STRING", "ESC", "UNICODE",
+ "HEX", "ArgumentPlaceholder", "NullLiteral", "Literal", "NumericLiteral",
+ "IntegerLiteral", "DecimalLiteral", "DoubleLiteral", "Digits", "WS",
+ "NCName", "NameStartChar", "NameChar", "XQComment", "ContentChar"
};
}
public static final String[] ruleNames = makeRuleNames();
@@ -80,18 +84,20 @@ private static String[] makeLiteralNames() {
"'infinity'", "'minus-sign'", "'NaN'", "'percent'", "'per-mille'", "'zero-digit'",
"'digit'", "'pattern-separator'", "'import'", "','", "':='", "'external'",
"'function'", "'('", "')'", "'{'", "'}'", "'jsound'", "'compact'", "'verbose'",
- "'json'", "'schema'", "'$'", "'|'", "'*'", "'eq'", "'ne'", "'lt'", "'le'",
- "'gt'", "'ge'", "'!='", "'<'", "'<='", "'>'", "'>='", "'||'", "'+'",
- "'-'", "'div'", "'idiv'", "'mod'", "'!'", "'['", "']'", "'.'", "'$$'",
- "'#'", "'{|'", "'|}'", "'for'", "'let'", "'where'", "'group'", "'by'",
- "'order'", "'return'", "'if'", "'in'", "'as'", "'at'", "'allowing'",
- "'empty'", "'count'", "'stable'", "'ascending'", "'descending'", "'some'",
- "'every'", "'satisfies'", "'collation'", "'greatest'", "'least'", "'switch'",
- "'case'", "'try'", "'catch'", "'default'", "'then'", "'else'", "'typeswitch'",
- "'or'", "'and'", "'not'", "'to'", "'instance'", "'of'", "'statically'",
- "'is'", "'treat'", "'cast'", "'castable'", "'version'", "'jsoniq'", "'unordered'",
- "'true'", "'false'", "'type'", "'validate'", "'annotate'", "'declare'",
- "'context'", "'item'", "'variable'", null, "'?'", "'null'"
+ "'schema'", "'$'", "'|'", "'*'", "'eq'", "'ne'", "'lt'", "'le'", "'gt'",
+ "'ge'", "'!='", "'<'", "'<='", "'>'", "'>='", "'||'", "'+'", "'-'", "'div'",
+ "'idiv'", "'mod'", "'!'", "'['", "']'", "'.'", "'$$'", "'#'", "'{|'",
+ "'|}'", "'for'", "'let'", "'where'", "'group'", "'by'", "'order'", "'return'",
+ "'if'", "'in'", "'as'", "'at'", "'allowing'", "'empty'", "'count'", "'stable'",
+ "'ascending'", "'descending'", "'some'", "'every'", "'satisfies'", "'collation'",
+ "'greatest'", "'least'", "'switch'", "'case'", "'try'", "'catch'", "'default'",
+ "'then'", "'else'", "'typeswitch'", "'or'", "'and'", "'not'", "'to'",
+ "'instance'", "'of'", "'statically'", "'is'", "'treat'", "'cast'", "'castable'",
+ "'version'", "'jsoniq'", "'unordered'", "'true'", "'false'", "'type'",
+ "'validate'", "'annotate'", "'declare'", "'context'", "'item'", "'variable'",
+ "'insert'", "'delete'", "'rename'", "'replace'", "'copy'", "'modify'",
+ "'append'", "'into'", "'value'", "'json'", "'with'", "'position'", null,
+ "'?'", "'null'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
@@ -102,16 +108,18 @@ private static String[] makeSymbolicNames() {
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, "Kfor", "Klet", "Kwhere", "Kgroup", "Kby", "Korder", "Kreturn",
- "Kif", "Kin", "Kas", "Kat", "Kallowing", "Kempty", "Kcount", "Kstable",
- "Kascending", "Kdescending", "Ksome", "Kevery", "Ksatisfies", "Kcollation",
- "Kgreatest", "Kleast", "Kswitch", "Kcase", "Ktry", "Kcatch", "Kdefault",
- "Kthen", "Kelse", "Ktypeswitch", "Kor", "Kand", "Knot", "Kto", "Kinstance",
- "Kof", "Kstatically", "Kis", "Ktreat", "Kcast", "Kcastable", "Kversion",
- "Kjsoniq", "Kunordered", "Ktrue", "Kfalse", "Ktype", "Kvalidate", "Kannotate",
- "Kdeclare", "Kcontext", "Kitem", "Kvariable", "STRING", "ArgumentPlaceholder",
- "NullLiteral", "Literal", "NumericLiteral", "IntegerLiteral", "DecimalLiteral",
- "DoubleLiteral", "WS", "NCName", "XQComment", "ContentChar"
+ "Kfor", "Klet", "Kwhere", "Kgroup", "Kby", "Korder", "Kreturn", "Kif",
+ "Kin", "Kas", "Kat", "Kallowing", "Kempty", "Kcount", "Kstable", "Kascending",
+ "Kdescending", "Ksome", "Kevery", "Ksatisfies", "Kcollation", "Kgreatest",
+ "Kleast", "Kswitch", "Kcase", "Ktry", "Kcatch", "Kdefault", "Kthen",
+ "Kelse", "Ktypeswitch", "Kor", "Kand", "Knot", "Kto", "Kinstance", "Kof",
+ "Kstatically", "Kis", "Ktreat", "Kcast", "Kcastable", "Kversion", "Kjsoniq",
+ "Kunordered", "Ktrue", "Kfalse", "Ktype", "Kvalidate", "Kannotate", "Kdeclare",
+ "Kcontext", "Kitem", "Kvariable", "Kinsert", "Kdelete", "Krename", "Kreplace",
+ "Kcopy", "Kmodify", "Kappend", "Kinto", "Kvalue", "Kjson", "Kwith", "Kposition",
+ "STRING", "ArgumentPlaceholder", "NullLiteral", "Literal", "NumericLiteral",
+ "IntegerLiteral", "DecimalLiteral", "DoubleLiteral", "WS", "NCName",
+ "XQComment", "ContentChar"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
@@ -173,7 +181,7 @@ public JsoniqLexer(CharStream input) {
public ATN getATN() { return _ATN; }
public static final String _serializedATN =
- "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\u0080\u0416\b\1\4"+
+ "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\u008b\u0475\b\1\4"+
"\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n"+
"\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
"\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+
@@ -188,343 +196,381 @@ public JsoniqLexer(CharStream input) {
"\tk\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv"+
"\4w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t"+
"\u0080\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084"+
- "\4\u0085\t\u0085\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3"+
- "\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7"+
- "\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3"+
- "\b\3\b\3\b\3\b\3\b\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n"+
- "\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3"+
- "\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f"+
- "\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16"+
- "\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20"+
- "\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\21\3\21\3\21"+
- "\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23"+
- "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+
- "\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\26\3\26\3\26\3\27\3\27"+
- "\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\30"+
- "\3\30\3\30\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\35\3\35\3\35\3\35"+
- "\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3\37"+
- "\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3!\3!\3\"\3\""+
- "\3#\3#\3$\3$\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3(\3(\3(\3)\3)\3)\3*\3*\3*"+
- "\3+\3+\3+\3,\3,\3-\3-\3-\3.\3.\3/\3/\3/\3\60\3\60\3\60\3\61\3\61\3\62"+
- "\3\62\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65\3\65"+
- "\3\66\3\66\3\67\3\67\38\38\39\39\3:\3:\3:\3;\3;\3<\3<\3<\3=\3=\3=\3>\3"+
- ">\3>\3>\3?\3?\3?\3?\3@\3@\3@\3@\3@\3@\3A\3A\3A\3A\3A\3A\3B\3B\3B\3C\3"+
- "C\3C\3C\3C\3C\3D\3D\3D\3D\3D\3D\3D\3E\3E\3E\3F\3F\3F\3G\3G\3G\3H\3H\3"+
- "H\3I\3I\3I\3I\3I\3I\3I\3I\3I\3J\3J\3J\3J\3J\3J\3K\3K\3K\3K\3K\3K\3L\3"+
- "L\3L\3L\3L\3L\3L\3M\3M\3M\3M\3M\3M\3M\3M\3M\3M\3N\3N\3N\3N\3N\3N\3N\3"+
- "N\3N\3N\3N\3O\3O\3O\3O\3O\3P\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3"+
- "Q\3Q\3R\3R\3R\3R\3R\3R\3R\3R\3R\3R\3S\3S\3S\3S\3S\3S\3S\3S\3S\3T\3T\3"+
- "T\3T\3T\3T\3U\3U\3U\3U\3U\3U\3U\3V\3V\3V\3V\3V\3W\3W\3W\3W\3X\3X\3X\3"+
- "X\3X\3X\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Z\3Z\3Z\3Z\3Z\3[\3[\3[\3[\3[\3\\\3\\"+
- "\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3]\3]\3]\3^\3^\3^\3^\3_\3_\3_\3_"+
- "\3`\3`\3`\3a\3a\3a\3a\3a\3a\3a\3a\3a\3b\3b\3b\3c\3c\3c\3c\3c\3c\3c\3c"+
- "\3c\3c\3c\3d\3d\3d\3e\3e\3e\3e\3e\3e\3f\3f\3f\3f\3f\3g\3g\3g\3g\3g\3g"+
- "\3g\3g\3g\3h\3h\3h\3h\3h\3h\3h\3h\3i\3i\3i\3i\3i\3i\3i\3j\3j\3j\3j\3j"+
- "\3j\3j\3j\3j\3j\3k\3k\3k\3k\3k\3l\3l\3l\3l\3l\3l\3m\3m\3m\3m\3m\3n\3n"+
- "\3n\3n\3n\3n\3n\3n\3n\3o\3o\3o\3o\3o\3o\3o\3o\3o\3p\3p\3p\3p\3p\3p\3p"+
- "\3p\3q\3q\3q\3q\3q\3q\3q\3q\3r\3r\3r\3r\3r\3s\3s\3s\3s\3s\3s\3s\3s\3s"+
- "\3t\3t\3t\7t\u03a4\nt\ft\16t\u03a7\13t\3t\3t\3u\3u\3u\5u\u03ae\nu\3v\3"+
- "v\3v\3v\3v\3v\3w\3w\3x\3x\3y\3y\3y\3y\3y\3z\3z\3{\3{\3{\5{\u03c4\n{\3"+
- "|\3|\3}\3}\3}\3}\3}\7}\u03cd\n}\f}\16}\u03d0\13}\5}\u03d2\n}\3~\3~\3~"+
- "\3~\3~\7~\u03d9\n~\f~\16~\u03dc\13~\5~\u03de\n~\5~\u03e0\n~\3~\3~\5~\u03e4"+
- "\n~\3~\3~\3\177\6\177\u03e9\n\177\r\177\16\177\u03ea\3\u0080\3\u0080\3"+
- "\u0080\3\u0080\3\u0081\3\u0081\7\u0081\u03f3\n\u0081\f\u0081\16\u0081"+
- "\u03f6\13\u0081\3\u0082\5\u0082\u03f9\n\u0082\3\u0083\3\u0083\5\u0083"+
- "\u03fd\n\u0083\3\u0084\3\u0084\3\u0084\3\u0084\3\u0084\3\u0084\3\u0084"+
- "\3\u0084\7\u0084\u0407\n\u0084\f\u0084\16\u0084\u040a\13\u0084\3\u0084"+
- "\6\u0084\u040d\n\u0084\r\u0084\16\u0084\u040e\3\u0084\3\u0084\3\u0084"+
- "\3\u0084\3\u0085\3\u0085\2\2\u0086\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n"+
- "\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30"+
- "/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.["+
- "/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{?}@\177A\u0081B\u0083"+
- "C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091J\u0093K\u0095L\u0097"+
- "M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7U\u00a9V\u00ab"+
- "W\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9^\u00bb_\u00bd`\u00bf"+
- "a\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cdh\u00cfi\u00d1j\u00d3"+
- "k\u00d5l\u00d7m\u00d9n\u00dbo\u00ddp\u00dfq\u00e1r\u00e3s\u00e5t\u00e7"+
- "u\u00e9\2\u00eb\2\u00ed\2\u00efv\u00f1w\u00f3x\u00f5y\u00f7z\u00f9{\u00fb"+
- "|\u00fd\2\u00ff}\u0101~\u0103\2\u0105\2\u0107\177\u0109\u0080\3\2\17\4"+
- "\2$$^^\n\2$$\61\61^^ddhhppttvv\5\2\62;CHch\3\2\62;\4\2GGgg\4\2--//\5\2"+
- "\13\f\17\17\"\"\20\2C\\aac|\u00c2\u00d8\u00da\u00f8\u00fa\u0301\u0372"+
- "\u037f\u0381\u2001\u200e\u200f\u2072\u2191\u2c02\u2ff1\u3003\ud801\uf902"+
- "\ufdd1\ufdf2\uffff\7\2//\62;\u00b9\u00b9\u0302\u0371\u2041\u2042\3\2<"+
- "<\3\2++\4\2**<<\7\2$$()>>}}\177\177\2\u0422\2\3\3\2\2\2\2\5\3\2\2\2\2"+
- "\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2"+
- "\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2"+
- "\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2"+
- "\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2"+
- "\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2"+
- "\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2"+
- "M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3"+
- "\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2"+
- "\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2"+
- "s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177"+
- "\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2"+
- "\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091"+
- "\3\2\2\2\2\u0093\3\2\2\2\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2"+
- "\2\2\u009b\3\2\2\2\2\u009d\3\2\2\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3"+
- "\3\2\2\2\2\u00a5\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2"+
- "\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2\2\2\u00b5"+
- "\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2"+
- "\2\2\u00bf\3\2\2\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7"+
- "\3\2\2\2\2\u00c9\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2"+
- "\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9"+
- "\3\2\2\2\2\u00db\3\2\2\2\2\u00dd\3\2\2\2\2\u00df\3\2\2\2\2\u00e1\3\2\2"+
- "\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2\2\2\u00e7\3\2\2\2\2\u00ef\3\2\2\2\2\u00f1"+
- "\3\2\2\2\2\u00f3\3\2\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9\3\2\2"+
- "\2\2\u00fb\3\2\2\2\2\u00ff\3\2\2\2\2\u0101\3\2\2\2\2\u0107\3\2\2\2\2\u0109"+
- "\3\2\2\2\3\u010b\3\2\2\2\5\u010d\3\2\2\2\7\u0114\3\2\2\2\t\u011e\3\2\2"+
- "\2\13\u0120\3\2\2\2\r\u0129\3\2\2\2\17\u0131\3\2\2\2\21\u0140\3\2\2\2"+
- "\23\u0142\3\2\2\2\25\u0154\3\2\2\2\27\u0167\3\2\2\2\31\u0170\3\2\2\2\33"+
- "\u017b\3\2\2\2\35\u017f\3\2\2\2\37\u0187\3\2\2\2!\u0191\3\2\2\2#\u019c"+
- "\3\2\2\2%\u01a2\3\2\2\2\'\u01b4\3\2\2\2)\u01bb\3\2\2\2+\u01bd\3\2\2\2"+
- "-\u01c0\3\2\2\2/\u01c9\3\2\2\2\61\u01d2\3\2\2\2\63\u01d4\3\2\2\2\65\u01d6"+
- "\3\2\2\2\67\u01d8\3\2\2\29\u01da\3\2\2\2;\u01e1\3\2\2\2=\u01e9\3\2\2\2"+
- "?\u01f1\3\2\2\2A\u01f6\3\2\2\2C\u01fd\3\2\2\2E\u01ff\3\2\2\2G\u0201\3"+
- "\2\2\2I\u0203\3\2\2\2K\u0206\3\2\2\2M\u0209\3\2\2\2O\u020c\3\2\2\2Q\u020f"+
- "\3\2\2\2S\u0212\3\2\2\2U\u0215\3\2\2\2W\u0218\3\2\2\2Y\u021a\3\2\2\2["+
- "\u021d\3\2\2\2]\u021f\3\2\2\2_\u0222\3\2\2\2a\u0225\3\2\2\2c\u0227\3\2"+
- "\2\2e\u0229\3\2\2\2g\u022d\3\2\2\2i\u0232\3\2\2\2k\u0236\3\2\2\2m\u0238"+
- "\3\2\2\2o\u023a\3\2\2\2q\u023c\3\2\2\2s\u023e\3\2\2\2u\u0241\3\2\2\2w"+
- "\u0243\3\2\2\2y\u0246\3\2\2\2{\u0249\3\2\2\2}\u024d\3\2\2\2\177\u0251"+
- "\3\2\2\2\u0081\u0257\3\2\2\2\u0083\u025d\3\2\2\2\u0085\u0260\3\2\2\2\u0087"+
- "\u0266\3\2\2\2\u0089\u026d\3\2\2\2\u008b\u0270\3\2\2\2\u008d\u0273\3\2"+
- "\2\2\u008f\u0276\3\2\2\2\u0091\u0279\3\2\2\2\u0093\u0282\3\2\2\2\u0095"+
- "\u0288\3\2\2\2\u0097\u028e\3\2\2\2\u0099\u0295\3\2\2\2\u009b\u029f\3\2"+
- "\2\2\u009d\u02aa\3\2\2\2\u009f\u02af\3\2\2\2\u00a1\u02b5\3\2\2\2\u00a3"+
- "\u02bf\3\2\2\2\u00a5\u02c9\3\2\2\2\u00a7\u02d2\3\2\2\2\u00a9\u02d8\3\2"+
- "\2\2\u00ab\u02df\3\2\2\2\u00ad\u02e4\3\2\2\2\u00af\u02e8\3\2\2\2\u00b1"+
- "\u02ee\3\2\2\2\u00b3\u02f6\3\2\2\2\u00b5\u02fb\3\2\2\2\u00b7\u0300\3\2"+
- "\2\2\u00b9\u030b\3\2\2\2\u00bb\u030e\3\2\2\2\u00bd\u0312\3\2\2\2\u00bf"+
- "\u0316\3\2\2\2\u00c1\u0319\3\2\2\2\u00c3\u0322\3\2\2\2\u00c5\u0325\3\2"+
- "\2\2\u00c7\u0330\3\2\2\2\u00c9\u0333\3\2\2\2\u00cb\u0339\3\2\2\2\u00cd"+
- "\u033e\3\2\2\2\u00cf\u0347\3\2\2\2\u00d1\u034f\3\2\2\2\u00d3\u0356\3\2"+
- "\2\2\u00d5\u0360\3\2\2\2\u00d7\u0365\3\2\2\2\u00d9\u036b\3\2\2\2\u00db"+
- "\u0370\3\2\2\2\u00dd\u0379\3\2\2\2\u00df\u0382\3\2\2\2\u00e1\u038a\3\2"+
- "\2\2\u00e3\u0392\3\2\2\2\u00e5\u0397\3\2\2\2\u00e7\u03a0\3\2\2\2\u00e9"+
- "\u03aa\3\2\2\2\u00eb\u03af\3\2\2\2\u00ed\u03b5\3\2\2\2\u00ef\u03b7\3\2"+
- "\2\2\u00f1\u03b9\3\2\2\2\u00f3\u03be\3\2\2\2\u00f5\u03c3\3\2\2\2\u00f7"+
- "\u03c5\3\2\2\2\u00f9\u03d1\3\2\2\2\u00fb\u03df\3\2\2\2\u00fd\u03e8\3\2"+
- "\2\2\u00ff\u03ec\3\2\2\2\u0101\u03f0\3\2\2\2\u0103\u03f8\3\2\2\2\u0105"+
- "\u03fc\3\2\2\2\u0107\u03fe\3\2\2\2\u0109\u0414\3\2\2\2\u010b\u010c\7="+
- "\2\2\u010c\4\3\2\2\2\u010d\u010e\7o\2\2\u010e\u010f\7q\2\2\u010f\u0110"+
- "\7f\2\2\u0110\u0111\7w\2\2\u0111\u0112\7n\2\2\u0112\u0113\7g\2\2\u0113"+
- "\6\3\2\2\2\u0114\u0115\7p\2\2\u0115\u0116\7c\2\2\u0116\u0117\7o\2\2\u0117"+
- "\u0118\7g\2\2\u0118\u0119\7u\2\2\u0119\u011a\7r\2\2\u011a\u011b\7c\2\2"+
- "\u011b\u011c\7e\2\2\u011c\u011d\7g\2\2\u011d\b\3\2\2\2\u011e\u011f\7?"+
- "\2\2\u011f\n\3\2\2\2\u0120\u0121\7q\2\2\u0121\u0122\7t\2\2\u0122\u0123"+
- "\7f\2\2\u0123\u0124\7g\2\2\u0124\u0125\7t\2\2\u0125\u0126\7k\2\2\u0126"+
- "\u0127\7p\2\2\u0127\u0128\7i\2\2\u0128\f\3\2\2\2\u0129\u012a\7q\2\2\u012a"+
- "\u012b\7t\2\2\u012b\u012c\7f\2\2\u012c\u012d\7g\2\2\u012d\u012e\7t\2\2"+
- "\u012e\u012f\7g\2\2\u012f\u0130\7f\2\2\u0130\16\3\2\2\2\u0131\u0132\7"+
- "f\2\2\u0132\u0133\7g\2\2\u0133\u0134\7e\2\2\u0134\u0135\7k\2\2\u0135\u0136"+
- "\7o\2\2\u0136\u0137\7c\2\2\u0137\u0138\7n\2\2\u0138\u0139\7/\2\2\u0139"+
- "\u013a\7h\2\2\u013a\u013b\7q\2\2\u013b\u013c\7t\2\2\u013c\u013d\7o\2\2"+
- "\u013d\u013e\7c\2\2\u013e\u013f\7v\2\2\u013f\20\3\2\2\2\u0140\u0141\7"+
- "<\2\2\u0141\22\3\2\2\2\u0142\u0143\7f\2\2\u0143\u0144\7g\2\2\u0144\u0145"+
- "\7e\2\2\u0145\u0146\7k\2\2\u0146\u0147\7o\2\2\u0147\u0148\7c\2\2\u0148"+
- "\u0149\7n\2\2\u0149\u014a\7/\2\2\u014a\u014b\7u\2\2\u014b\u014c\7g\2\2"+
- "\u014c\u014d\7r\2\2\u014d\u014e\7c\2\2\u014e\u014f\7t\2\2\u014f\u0150"+
- "\7c\2\2\u0150\u0151\7v\2\2\u0151\u0152\7q\2\2\u0152\u0153\7t\2\2\u0153"+
- "\24\3\2\2\2\u0154\u0155\7i\2\2\u0155\u0156\7t\2\2\u0156\u0157\7q\2\2\u0157"+
- "\u0158\7w\2\2\u0158\u0159\7r\2\2\u0159\u015a\7k\2\2\u015a\u015b\7p\2\2"+
- "\u015b\u015c\7i\2\2\u015c\u015d\7/\2\2\u015d\u015e\7u\2\2\u015e\u015f"+
- "\7g\2\2\u015f\u0160\7r\2\2\u0160\u0161\7c\2\2\u0161\u0162\7t\2\2\u0162"+
- "\u0163\7c\2\2\u0163\u0164\7v\2\2\u0164\u0165\7q\2\2\u0165\u0166\7t\2\2"+
- "\u0166\26\3\2\2\2\u0167\u0168\7k\2\2\u0168\u0169\7p\2\2\u0169\u016a\7"+
- "h\2\2\u016a\u016b\7k\2\2\u016b\u016c\7p\2\2\u016c\u016d\7k\2\2\u016d\u016e"+
- "\7v\2\2\u016e\u016f\7{\2\2\u016f\30\3\2\2\2\u0170\u0171\7o\2\2\u0171\u0172"+
- "\7k\2\2\u0172\u0173\7p\2\2\u0173\u0174\7w\2\2\u0174\u0175\7u\2\2\u0175"+
- "\u0176\7/\2\2\u0176\u0177\7u\2\2\u0177\u0178\7k\2\2\u0178\u0179\7i\2\2"+
- "\u0179\u017a\7p\2\2\u017a\32\3\2\2\2\u017b\u017c\7P\2\2\u017c\u017d\7"+
- "c\2\2\u017d\u017e\7P\2\2\u017e\34\3\2\2\2\u017f\u0180\7r\2\2\u0180\u0181"+
- "\7g\2\2\u0181\u0182\7t\2\2\u0182\u0183\7e\2\2\u0183\u0184\7g\2\2\u0184"+
- "\u0185\7p\2\2\u0185\u0186\7v\2\2\u0186\36\3\2\2\2\u0187\u0188\7r\2\2\u0188"+
- "\u0189\7g\2\2\u0189\u018a\7t\2\2\u018a\u018b\7/\2\2\u018b\u018c\7o\2\2"+
- "\u018c\u018d\7k\2\2\u018d\u018e\7n\2\2\u018e\u018f\7n\2\2\u018f\u0190"+
- "\7g\2\2\u0190 \3\2\2\2\u0191\u0192\7|\2\2\u0192\u0193\7g\2\2\u0193\u0194"+
- "\7t\2\2\u0194\u0195\7q\2\2\u0195\u0196\7/\2\2\u0196\u0197\7f\2\2\u0197"+
- "\u0198\7k\2\2\u0198\u0199\7i\2\2\u0199\u019a\7k\2\2\u019a\u019b\7v\2\2"+
- "\u019b\"\3\2\2\2\u019c\u019d\7f\2\2\u019d\u019e\7k\2\2\u019e\u019f\7i"+
- "\2\2\u019f\u01a0\7k\2\2\u01a0\u01a1\7v\2\2\u01a1$\3\2\2\2\u01a2\u01a3"+
- "\7r\2\2\u01a3\u01a4\7c\2\2\u01a4\u01a5\7v\2\2\u01a5\u01a6\7v\2\2\u01a6"+
- "\u01a7\7g\2\2\u01a7\u01a8\7t\2\2\u01a8\u01a9\7p\2\2\u01a9\u01aa\7/\2\2"+
- "\u01aa\u01ab\7u\2\2\u01ab\u01ac\7g\2\2\u01ac\u01ad\7r\2\2\u01ad\u01ae"+
- "\7c\2\2\u01ae\u01af\7t\2\2\u01af\u01b0\7c\2\2\u01b0\u01b1\7v\2\2\u01b1"+
- "\u01b2\7q\2\2\u01b2\u01b3\7t\2\2\u01b3&\3\2\2\2\u01b4\u01b5\7k\2\2\u01b5"+
- "\u01b6\7o\2\2\u01b6\u01b7\7r\2\2\u01b7\u01b8\7q\2\2\u01b8\u01b9\7t\2\2"+
- "\u01b9\u01ba\7v\2\2\u01ba(\3\2\2\2\u01bb\u01bc\7.\2\2\u01bc*\3\2\2\2\u01bd"+
- "\u01be\7<\2\2\u01be\u01bf\7?\2\2\u01bf,\3\2\2\2\u01c0\u01c1\7g\2\2\u01c1"+
- "\u01c2\7z\2\2\u01c2\u01c3\7v\2\2\u01c3\u01c4\7g\2\2\u01c4\u01c5\7t\2\2"+
- "\u01c5\u01c6\7p\2\2\u01c6\u01c7\7c\2\2\u01c7\u01c8\7n\2\2\u01c8.\3\2\2"+
- "\2\u01c9\u01ca\7h\2\2\u01ca\u01cb\7w\2\2\u01cb\u01cc\7p\2\2\u01cc\u01cd"+
- "\7e\2\2\u01cd\u01ce\7v\2\2\u01ce\u01cf\7k\2\2\u01cf\u01d0\7q\2\2\u01d0"+
- "\u01d1\7p\2\2\u01d1\60\3\2\2\2\u01d2\u01d3\7*\2\2\u01d3\62\3\2\2\2\u01d4"+
- "\u01d5\7+\2\2\u01d5\64\3\2\2\2\u01d6\u01d7\7}\2\2\u01d7\66\3\2\2\2\u01d8"+
- "\u01d9\7\177\2\2\u01d98\3\2\2\2\u01da\u01db\7l\2\2\u01db\u01dc\7u\2\2"+
- "\u01dc\u01dd\7q\2\2\u01dd\u01de\7w\2\2\u01de\u01df\7p\2\2\u01df\u01e0"+
- "\7f\2\2\u01e0:\3\2\2\2\u01e1\u01e2\7e\2\2\u01e2\u01e3\7q\2\2\u01e3\u01e4"+
- "\7o\2\2\u01e4\u01e5\7r\2\2\u01e5\u01e6\7c\2\2\u01e6\u01e7\7e\2\2\u01e7"+
- "\u01e8\7v\2\2\u01e8<\3\2\2\2\u01e9\u01ea\7x\2\2\u01ea\u01eb\7g\2\2\u01eb"+
- "\u01ec\7t\2\2\u01ec\u01ed\7d\2\2\u01ed\u01ee\7q\2\2\u01ee\u01ef\7u\2\2"+
- "\u01ef\u01f0\7g\2\2\u01f0>\3\2\2\2\u01f1\u01f2\7l\2\2\u01f2\u01f3\7u\2"+
- "\2\u01f3\u01f4\7q\2\2\u01f4\u01f5\7p\2\2\u01f5@\3\2\2\2\u01f6\u01f7\7"+
- "u\2\2\u01f7\u01f8\7e\2\2\u01f8\u01f9\7j\2\2\u01f9\u01fa\7g\2\2\u01fa\u01fb"+
- "\7o\2\2\u01fb\u01fc\7c\2\2\u01fcB\3\2\2\2\u01fd\u01fe\7&\2\2\u01feD\3"+
- "\2\2\2\u01ff\u0200\7~\2\2\u0200F\3\2\2\2\u0201\u0202\7,\2\2\u0202H\3\2"+
- "\2\2\u0203\u0204\7g\2\2\u0204\u0205\7s\2\2\u0205J\3\2\2\2\u0206\u0207"+
- "\7p\2\2\u0207\u0208\7g\2\2\u0208L\3\2\2\2\u0209\u020a\7n\2\2\u020a\u020b"+
- "\7v\2\2\u020bN\3\2\2\2\u020c\u020d\7n\2\2\u020d\u020e\7g\2\2\u020eP\3"+
- "\2\2\2\u020f\u0210\7i\2\2\u0210\u0211\7v\2\2\u0211R\3\2\2\2\u0212\u0213"+
- "\7i\2\2\u0213\u0214\7g\2\2\u0214T\3\2\2\2\u0215\u0216\7#\2\2\u0216\u0217"+
- "\7?\2\2\u0217V\3\2\2\2\u0218\u0219\7>\2\2\u0219X\3\2\2\2\u021a\u021b\7"+
- ">\2\2\u021b\u021c\7?\2\2\u021cZ\3\2\2\2\u021d\u021e\7@\2\2\u021e\\\3\2"+
- "\2\2\u021f\u0220\7@\2\2\u0220\u0221\7?\2\2\u0221^\3\2\2\2\u0222\u0223"+
- "\7~\2\2\u0223\u0224\7~\2\2\u0224`\3\2\2\2\u0225\u0226\7-\2\2\u0226b\3"+
- "\2\2\2\u0227\u0228\7/\2\2\u0228d\3\2\2\2\u0229\u022a\7f\2\2\u022a\u022b"+
- "\7k\2\2\u022b\u022c\7x\2\2\u022cf\3\2\2\2\u022d\u022e\7k\2\2\u022e\u022f"+
- "\7f\2\2\u022f\u0230\7k\2\2\u0230\u0231\7x\2\2\u0231h\3\2\2\2\u0232\u0233"+
- "\7o\2\2\u0233\u0234\7q\2\2\u0234\u0235\7f\2\2\u0235j\3\2\2\2\u0236\u0237"+
- "\7#\2\2\u0237l\3\2\2\2\u0238\u0239\7]\2\2\u0239n\3\2\2\2\u023a\u023b\7"+
- "_\2\2\u023bp\3\2\2\2\u023c\u023d\7\60\2\2\u023dr\3\2\2\2\u023e\u023f\7"+
- "&\2\2\u023f\u0240\7&\2\2\u0240t\3\2\2\2\u0241\u0242\7%\2\2\u0242v\3\2"+
- "\2\2\u0243\u0244\7}\2\2\u0244\u0245\7~\2\2\u0245x\3\2\2\2\u0246\u0247"+
- "\7~\2\2\u0247\u0248\7\177\2\2\u0248z\3\2\2\2\u0249\u024a\7h\2\2\u024a"+
- "\u024b\7q\2\2\u024b\u024c\7t\2\2\u024c|\3\2\2\2\u024d\u024e\7n\2\2\u024e"+
- "\u024f\7g\2\2\u024f\u0250\7v\2\2\u0250~\3\2\2\2\u0251\u0252\7y\2\2\u0252"+
- "\u0253\7j\2\2\u0253\u0254\7g\2\2\u0254\u0255\7t\2\2\u0255\u0256\7g\2\2"+
- "\u0256\u0080\3\2\2\2\u0257\u0258\7i\2\2\u0258\u0259\7t\2\2\u0259\u025a"+
- "\7q\2\2\u025a\u025b\7w\2\2\u025b\u025c\7r\2\2\u025c\u0082\3\2\2\2\u025d"+
- "\u025e\7d\2\2\u025e\u025f\7{\2\2\u025f\u0084\3\2\2\2\u0260\u0261\7q\2"+
- "\2\u0261\u0262\7t\2\2\u0262\u0263\7f\2\2\u0263\u0264\7g\2\2\u0264\u0265"+
- "\7t\2\2\u0265\u0086\3\2\2\2\u0266\u0267\7t\2\2\u0267\u0268\7g\2\2\u0268"+
- "\u0269\7v\2\2\u0269\u026a\7w\2\2\u026a\u026b\7t\2\2\u026b\u026c\7p\2\2"+
- "\u026c\u0088\3\2\2\2\u026d\u026e\7k\2\2\u026e\u026f\7h\2\2\u026f\u008a"+
- "\3\2\2\2\u0270\u0271\7k\2\2\u0271\u0272\7p\2\2\u0272\u008c\3\2\2\2\u0273"+
- "\u0274\7c\2\2\u0274\u0275\7u\2\2\u0275\u008e\3\2\2\2\u0276\u0277\7c\2"+
- "\2\u0277\u0278\7v\2\2\u0278\u0090\3\2\2\2\u0279\u027a\7c\2\2\u027a\u027b"+
- "\7n\2\2\u027b\u027c\7n\2\2\u027c\u027d\7q\2\2\u027d\u027e\7y\2\2\u027e"+
- "\u027f\7k\2\2\u027f\u0280\7p\2\2\u0280\u0281\7i\2\2\u0281\u0092\3\2\2"+
- "\2\u0282\u0283\7g\2\2\u0283\u0284\7o\2\2\u0284\u0285\7r\2\2\u0285\u0286"+
- "\7v\2\2\u0286\u0287\7{\2\2\u0287\u0094\3\2\2\2\u0288\u0289\7e\2\2\u0289"+
- "\u028a\7q\2\2\u028a\u028b\7w\2\2\u028b\u028c\7p\2\2\u028c\u028d\7v\2\2"+
- "\u028d\u0096\3\2\2\2\u028e\u028f\7u\2\2\u028f\u0290\7v\2\2\u0290\u0291"+
- "\7c\2\2\u0291\u0292\7d\2\2\u0292\u0293\7n\2\2\u0293\u0294\7g\2\2\u0294"+
- "\u0098\3\2\2\2\u0295\u0296\7c\2\2\u0296\u0297\7u\2\2\u0297\u0298\7e\2"+
- "\2\u0298\u0299\7g\2\2\u0299\u029a\7p\2\2\u029a\u029b\7f\2\2\u029b\u029c"+
- "\7k\2\2\u029c\u029d\7p\2\2\u029d\u029e\7i\2\2\u029e\u009a\3\2\2\2\u029f"+
- "\u02a0\7f\2\2\u02a0\u02a1\7g\2\2\u02a1\u02a2\7u\2\2\u02a2\u02a3\7e\2\2"+
- "\u02a3\u02a4\7g\2\2\u02a4\u02a5\7p\2\2\u02a5\u02a6\7f\2\2\u02a6\u02a7"+
- "\7k\2\2\u02a7\u02a8\7p\2\2\u02a8\u02a9\7i\2\2\u02a9\u009c\3\2\2\2\u02aa"+
- "\u02ab\7u\2\2\u02ab\u02ac\7q\2\2\u02ac\u02ad\7o\2\2\u02ad\u02ae\7g\2\2"+
- "\u02ae\u009e\3\2\2\2\u02af\u02b0\7g\2\2\u02b0\u02b1\7x\2\2\u02b1\u02b2"+
- "\7g\2\2\u02b2\u02b3\7t\2\2\u02b3\u02b4\7{\2\2\u02b4\u00a0\3\2\2\2\u02b5"+
- "\u02b6\7u\2\2\u02b6\u02b7\7c\2\2\u02b7\u02b8\7v\2\2\u02b8\u02b9\7k\2\2"+
- "\u02b9\u02ba\7u\2\2\u02ba\u02bb\7h\2\2\u02bb\u02bc\7k\2\2\u02bc\u02bd"+
- "\7g\2\2\u02bd\u02be\7u\2\2\u02be\u00a2\3\2\2\2\u02bf\u02c0\7e\2\2\u02c0"+
- "\u02c1\7q\2\2\u02c1\u02c2\7n\2\2\u02c2\u02c3\7n\2\2\u02c3\u02c4\7c\2\2"+
- "\u02c4\u02c5\7v\2\2\u02c5\u02c6\7k\2\2\u02c6\u02c7\7q\2\2\u02c7\u02c8"+
- "\7p\2\2\u02c8\u00a4\3\2\2\2\u02c9\u02ca\7i\2\2\u02ca\u02cb\7t\2\2\u02cb"+
- "\u02cc\7g\2\2\u02cc\u02cd\7c\2\2\u02cd\u02ce\7v\2\2\u02ce\u02cf\7g\2\2"+
- "\u02cf\u02d0\7u\2\2\u02d0\u02d1\7v\2\2\u02d1\u00a6\3\2\2\2\u02d2\u02d3"+
- "\7n\2\2\u02d3\u02d4\7g\2\2\u02d4\u02d5\7c\2\2\u02d5\u02d6\7u\2\2\u02d6"+
- "\u02d7\7v\2\2\u02d7\u00a8\3\2\2\2\u02d8\u02d9\7u\2\2\u02d9\u02da\7y\2"+
- "\2\u02da\u02db\7k\2\2\u02db\u02dc\7v\2\2\u02dc\u02dd\7e\2\2\u02dd\u02de"+
- "\7j\2\2\u02de\u00aa\3\2\2\2\u02df\u02e0\7e\2\2\u02e0\u02e1\7c\2\2\u02e1"+
- "\u02e2\7u\2\2\u02e2\u02e3\7g\2\2\u02e3\u00ac\3\2\2\2\u02e4\u02e5\7v\2"+
- "\2\u02e5\u02e6\7t\2\2\u02e6\u02e7\7{\2\2\u02e7\u00ae\3\2\2\2\u02e8\u02e9"+
- "\7e\2\2\u02e9\u02ea\7c\2\2\u02ea\u02eb\7v\2\2\u02eb\u02ec\7e\2\2\u02ec"+
- "\u02ed\7j\2\2\u02ed\u00b0\3\2\2\2\u02ee\u02ef\7f\2\2\u02ef\u02f0\7g\2"+
- "\2\u02f0\u02f1\7h\2\2\u02f1\u02f2\7c\2\2\u02f2\u02f3\7w\2\2\u02f3\u02f4"+
- "\7n\2\2\u02f4\u02f5\7v\2\2\u02f5\u00b2\3\2\2\2\u02f6\u02f7\7v\2\2\u02f7"+
- "\u02f8\7j\2\2\u02f8\u02f9\7g\2\2\u02f9\u02fa\7p\2\2\u02fa\u00b4\3\2\2"+
- "\2\u02fb\u02fc\7g\2\2\u02fc\u02fd\7n\2\2\u02fd\u02fe\7u\2\2\u02fe\u02ff"+
- "\7g\2\2\u02ff\u00b6\3\2\2\2\u0300\u0301\7v\2\2\u0301\u0302\7{\2\2\u0302"+
- "\u0303\7r\2\2\u0303\u0304\7g\2\2\u0304\u0305\7u\2\2\u0305\u0306\7y\2\2"+
- "\u0306\u0307\7k\2\2\u0307\u0308\7v\2\2\u0308\u0309\7e\2\2\u0309\u030a"+
- "\7j\2\2\u030a\u00b8\3\2\2\2\u030b\u030c\7q\2\2\u030c\u030d\7t\2\2\u030d"+
- "\u00ba\3\2\2\2\u030e\u030f\7c\2\2\u030f\u0310\7p\2\2\u0310\u0311\7f\2"+
- "\2\u0311\u00bc\3\2\2\2\u0312\u0313\7p\2\2\u0313\u0314\7q\2\2\u0314\u0315"+
- "\7v\2\2\u0315\u00be\3\2\2\2\u0316\u0317\7v\2\2\u0317\u0318\7q\2\2\u0318"+
- "\u00c0\3\2\2\2\u0319\u031a\7k\2\2\u031a\u031b\7p\2\2\u031b\u031c\7u\2"+
- "\2\u031c\u031d\7v\2\2\u031d\u031e\7c\2\2\u031e\u031f\7p\2\2\u031f\u0320"+
- "\7e\2\2\u0320\u0321\7g\2\2\u0321\u00c2\3\2\2\2\u0322\u0323\7q\2\2\u0323"+
- "\u0324\7h\2\2\u0324\u00c4\3\2\2\2\u0325\u0326\7u\2\2\u0326\u0327\7v\2"+
- "\2\u0327\u0328\7c\2\2\u0328\u0329\7v\2\2\u0329\u032a\7k\2\2\u032a\u032b"+
- "\7e\2\2\u032b\u032c\7c\2\2\u032c\u032d\7n\2\2\u032d\u032e\7n\2\2\u032e"+
- "\u032f\7{\2\2\u032f\u00c6\3\2\2\2\u0330\u0331\7k\2\2\u0331\u0332\7u\2"+
- "\2\u0332\u00c8\3\2\2\2\u0333\u0334\7v\2\2\u0334\u0335\7t\2\2\u0335\u0336"+
- "\7g\2\2\u0336\u0337\7c\2\2\u0337\u0338\7v\2\2\u0338\u00ca\3\2\2\2\u0339"+
- "\u033a\7e\2\2\u033a\u033b\7c\2\2\u033b\u033c\7u\2\2\u033c\u033d\7v\2\2"+
- "\u033d\u00cc\3\2\2\2\u033e\u033f\7e\2\2\u033f\u0340\7c\2\2\u0340\u0341"+
- "\7u\2\2\u0341\u0342\7v\2\2\u0342\u0343\7c\2\2\u0343\u0344\7d\2\2\u0344"+
- "\u0345\7n\2\2\u0345\u0346\7g\2\2\u0346\u00ce\3\2\2\2\u0347\u0348\7x\2"+
- "\2\u0348\u0349\7g\2\2\u0349\u034a\7t\2\2\u034a\u034b\7u\2\2\u034b\u034c"+
- "\7k\2\2\u034c\u034d\7q\2\2\u034d\u034e\7p\2\2\u034e\u00d0\3\2\2\2\u034f"+
- "\u0350\7l\2\2\u0350\u0351\7u\2\2\u0351\u0352\7q\2\2\u0352\u0353\7p\2\2"+
- "\u0353\u0354\7k\2\2\u0354\u0355\7s\2\2\u0355\u00d2\3\2\2\2\u0356\u0357"+
- "\7w\2\2\u0357\u0358\7p\2\2\u0358\u0359\7q\2\2\u0359\u035a\7t\2\2\u035a"+
- "\u035b\7f\2\2\u035b\u035c\7g\2\2\u035c\u035d\7t\2\2\u035d\u035e\7g\2\2"+
- "\u035e\u035f\7f\2\2\u035f\u00d4\3\2\2\2\u0360\u0361\7v\2\2\u0361\u0362"+
- "\7t\2\2\u0362\u0363\7w\2\2\u0363\u0364\7g\2\2\u0364\u00d6\3\2\2\2\u0365"+
- "\u0366\7h\2\2\u0366\u0367\7c\2\2\u0367\u0368\7n\2\2\u0368\u0369\7u\2\2"+
- "\u0369\u036a\7g\2\2\u036a\u00d8\3\2\2\2\u036b\u036c\7v\2\2\u036c\u036d"+
- "\7{\2\2\u036d\u036e\7r\2\2\u036e\u036f\7g\2\2\u036f\u00da\3\2\2\2\u0370"+
- "\u0371\7x\2\2\u0371\u0372\7c\2\2\u0372\u0373\7n\2\2\u0373\u0374\7k\2\2"+
- "\u0374\u0375\7f\2\2\u0375\u0376\7c\2\2\u0376\u0377\7v\2\2\u0377\u0378"+
- "\7g\2\2\u0378\u00dc\3\2\2\2\u0379\u037a\7c\2\2\u037a\u037b\7p\2\2\u037b"+
- "\u037c\7p\2\2\u037c\u037d\7q\2\2\u037d\u037e\7v\2\2\u037e\u037f\7c\2\2"+
- "\u037f\u0380\7v\2\2\u0380\u0381\7g\2\2\u0381\u00de\3\2\2\2\u0382\u0383"+
- "\7f\2\2\u0383\u0384\7g\2\2\u0384\u0385\7e\2\2\u0385\u0386\7n\2\2\u0386"+
- "\u0387\7c\2\2\u0387\u0388\7t\2\2\u0388\u0389\7g\2\2\u0389\u00e0\3\2\2"+
- "\2\u038a\u038b\7e\2\2\u038b\u038c\7q\2\2\u038c\u038d\7p\2\2\u038d\u038e"+
- "\7v\2\2\u038e\u038f\7g\2\2\u038f\u0390\7z\2\2\u0390\u0391\7v\2\2\u0391"+
- "\u00e2\3\2\2\2\u0392\u0393\7k\2\2\u0393\u0394\7v\2\2\u0394\u0395\7g\2"+
- "\2\u0395\u0396\7o\2\2\u0396\u00e4\3\2\2\2\u0397\u0398\7x\2\2\u0398\u0399"+
- "\7c\2\2\u0399\u039a\7t\2\2\u039a\u039b\7k\2\2\u039b\u039c\7c\2\2\u039c"+
- "\u039d\7d\2\2\u039d\u039e\7n\2\2\u039e\u039f\7g\2\2\u039f\u00e6\3\2\2"+
- "\2\u03a0\u03a5\7$\2\2\u03a1\u03a4\5\u00e9u\2\u03a2\u03a4\n\2\2\2\u03a3"+
- "\u03a1\3\2\2\2\u03a3\u03a2\3\2\2\2\u03a4\u03a7\3\2\2\2\u03a5\u03a3\3\2"+
- "\2\2\u03a5\u03a6\3\2\2\2\u03a6\u03a8\3\2\2\2\u03a7\u03a5\3\2\2\2\u03a8"+
- "\u03a9\7$\2\2\u03a9\u00e8\3\2\2\2\u03aa\u03ad\7^\2\2\u03ab\u03ae\t\3\2"+
- "\2\u03ac\u03ae\5\u00ebv\2\u03ad\u03ab\3\2\2\2\u03ad\u03ac\3\2\2\2\u03ae"+
- "\u00ea\3\2\2\2\u03af\u03b0\7w\2\2\u03b0\u03b1\5\u00edw\2\u03b1\u03b2\5"+
- "\u00edw\2\u03b2\u03b3\5\u00edw\2\u03b3\u03b4\5\u00edw\2\u03b4\u00ec\3"+
- "\2\2\2\u03b5\u03b6\t\4\2\2\u03b6\u00ee\3\2\2\2\u03b7\u03b8\7A\2\2\u03b8"+
- "\u00f0\3\2\2\2\u03b9\u03ba\7p\2\2\u03ba\u03bb\7w\2\2\u03bb\u03bc\7n\2"+
- "\2\u03bc\u03bd\7n\2\2\u03bd\u00f2\3\2\2\2\u03be\u03bf\5\u00f5{\2\u03bf"+
- "\u00f4\3\2\2\2\u03c0\u03c4\5\u00f7|\2\u03c1\u03c4\5\u00f9}\2\u03c2\u03c4"+
- "\5\u00fb~\2\u03c3\u03c0\3\2\2\2\u03c3\u03c1\3\2\2\2\u03c3\u03c2\3\2\2"+
- "\2\u03c4\u00f6\3\2\2\2\u03c5\u03c6\5\u00fd\177\2\u03c6\u00f8\3\2\2\2\u03c7"+
- "\u03c8\7\60\2\2\u03c8\u03d2\5\u00fd\177\2\u03c9\u03ca\5\u00fd\177\2\u03ca"+
- "\u03ce\7\60\2\2\u03cb\u03cd\t\5\2\2\u03cc\u03cb\3\2\2\2\u03cd\u03d0\3"+
- "\2\2\2\u03ce\u03cc\3\2\2\2\u03ce\u03cf\3\2\2\2\u03cf\u03d2\3\2\2\2\u03d0"+
- "\u03ce\3\2\2\2\u03d1\u03c7\3\2\2\2\u03d1\u03c9\3\2\2\2\u03d2\u00fa\3\2"+
- "\2\2\u03d3\u03d4\7\60\2\2\u03d4\u03e0\5\u00fd\177\2\u03d5\u03dd\5\u00fd"+
- "\177\2\u03d6\u03da\7\60\2\2\u03d7\u03d9\t\5\2\2\u03d8\u03d7\3\2\2\2\u03d9"+
- "\u03dc\3\2\2\2\u03da\u03d8\3\2\2\2\u03da\u03db\3\2\2\2\u03db\u03de\3\2"+
- "\2\2\u03dc\u03da\3\2\2\2\u03dd\u03d6\3\2\2\2\u03dd\u03de\3\2\2\2\u03de"+
- "\u03e0\3\2\2\2\u03df\u03d3\3\2\2\2\u03df\u03d5\3\2\2\2\u03e0\u03e1\3\2"+
- "\2\2\u03e1\u03e3\t\6\2\2\u03e2\u03e4\t\7\2\2\u03e3\u03e2\3\2\2\2\u03e3"+
- "\u03e4\3\2\2\2\u03e4\u03e5\3\2\2\2\u03e5\u03e6\5\u00fd\177\2\u03e6\u00fc"+
- "\3\2\2\2\u03e7\u03e9\t\5\2\2\u03e8\u03e7\3\2\2\2\u03e9\u03ea\3\2\2\2\u03ea"+
- "\u03e8\3\2\2\2\u03ea\u03eb\3\2\2\2\u03eb\u00fe\3\2\2\2\u03ec\u03ed\t\b"+
- "\2\2\u03ed\u03ee\3\2\2\2\u03ee\u03ef\b\u0080\2\2\u03ef\u0100\3\2\2\2\u03f0"+
- "\u03f4\5\u0103\u0082\2\u03f1\u03f3\5\u0105\u0083\2\u03f2\u03f1\3\2\2\2"+
- "\u03f3\u03f6\3\2\2\2\u03f4\u03f2\3\2\2\2\u03f4\u03f5\3\2\2\2\u03f5\u0102"+
- "\3\2\2\2\u03f6\u03f4\3\2\2\2\u03f7\u03f9\t\t\2\2\u03f8\u03f7\3\2\2\2\u03f9"+
- "\u0104\3\2\2\2\u03fa\u03fd\5\u0103\u0082\2\u03fb\u03fd\t\n\2\2\u03fc\u03fa"+
- "\3\2\2\2\u03fc\u03fb\3\2\2\2\u03fd\u0106\3\2\2\2\u03fe\u03ff\7*\2\2\u03ff"+
- "\u0408\7<\2\2\u0400\u0407\5\u0107\u0084\2\u0401\u0402\7*\2\2\u0402\u0407"+
- "\n\13\2\2\u0403\u0404\7<\2\2\u0404\u0407\n\f\2\2\u0405\u0407\n\r\2\2\u0406"+
- "\u0400\3\2\2\2\u0406\u0401\3\2\2\2\u0406\u0403\3\2\2\2\u0406\u0405\3\2"+
- "\2\2\u0407\u040a\3\2\2\2\u0408\u0406\3\2\2\2\u0408\u0409\3\2\2\2\u0409"+
- "\u040c\3\2\2\2\u040a\u0408\3\2\2\2\u040b\u040d\7<\2\2\u040c\u040b\3\2"+
- "\2\2\u040d\u040e\3\2\2\2\u040e\u040c\3\2\2\2\u040e\u040f\3\2\2\2\u040f"+
- "\u0410\3\2\2\2\u0410\u0411\7+\2\2\u0411\u0412\3\2\2\2\u0412\u0413\b\u0084"+
- "\2\2\u0413\u0108\3\2\2\2\u0414\u0415\n\16\2\2\u0415\u010a\3\2\2\2\24\2"+
- "\u03a3\u03a5\u03ad\u03c3\u03ce\u03d1\u03da\u03dd\u03df\u03e3\u03ea\u03f4"+
- "\u03f8\u03fc\u0406\u0408\u040e\3\2\3\2";
+ "\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089"+
+ "\t\u0089\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d"+
+ "\4\u008e\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\3\2\3\2\3\3\3\3\3\3\3"+
+ "\3\3\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\3\5\3\6\3\6"+
+ "\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3"+
+ "\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\n\3\n\3\n"+
+ "\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13"+
+ "\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13"+
+ "\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3"+
+ "\r\3\r\3\r\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17"+
+ "\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21"+
+ "\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22"+
+ "\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23"+
+ "\3\23\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\25"+
+ "\3\25\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\30"+
+ "\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\32\3\32\3\33\3\33"+
+ "\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36"+
+ "\3\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3"+
+ " \3 \3 \3!\3!\3\"\3\"\3#\3#\3$\3$\3$\3%\3%\3%\3&\3&\3&\3\'\3\'\3\'\3("+
+ "\3(\3(\3)\3)\3)\3*\3*\3*\3+\3+\3,\3,\3,\3-\3-\3.\3.\3.\3/\3/\3/\3\60\3"+
+ "\60\3\61\3\61\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3"+
+ "\64\3\64\3\65\3\65\3\66\3\66\3\67\3\67\38\38\39\39\39\3:\3:\3;\3;\3;\3"+
+ "<\3<\3<\3=\3=\3=\3=\3>\3>\3>\3>\3?\3?\3?\3?\3?\3?\3@\3@\3@\3@\3@\3@\3"+
+ "A\3A\3A\3B\3B\3B\3B\3B\3B\3C\3C\3C\3C\3C\3C\3C\3D\3D\3D\3E\3E\3E\3F\3"+
+ "F\3F\3G\3G\3G\3H\3H\3H\3H\3H\3H\3H\3H\3H\3I\3I\3I\3I\3I\3I\3J\3J\3J\3"+
+ "J\3J\3J\3K\3K\3K\3K\3K\3K\3K\3L\3L\3L\3L\3L\3L\3L\3L\3L\3L\3M\3M\3M\3"+
+ "M\3M\3M\3M\3M\3M\3M\3M\3N\3N\3N\3N\3N\3O\3O\3O\3O\3O\3O\3P\3P\3P\3P\3"+
+ "P\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3R\3R\3R\3R\3R\3R\3R\3"+
+ "R\3R\3S\3S\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3T\3U\3U\3U\3U\3U\3V\3V\3V\3"+
+ "V\3W\3W\3W\3W\3W\3W\3X\3X\3X\3X\3X\3X\3X\3X\3Y\3Y\3Y\3Y\3Y\3Z\3Z\3Z\3"+
+ "Z\3Z\3[\3[\3[\3[\3[\3[\3[\3[\3[\3[\3[\3\\\3\\\3\\\3]\3]\3]\3]\3^\3^\3"+
+ "^\3^\3_\3_\3_\3`\3`\3`\3`\3`\3`\3`\3`\3`\3a\3a\3a\3b\3b\3b\3b\3b\3b\3"+
+ "b\3b\3b\3b\3b\3c\3c\3c\3d\3d\3d\3d\3d\3d\3e\3e\3e\3e\3e\3f\3f\3f\3f\3"+
+ "f\3f\3f\3f\3f\3g\3g\3g\3g\3g\3g\3g\3g\3h\3h\3h\3h\3h\3h\3h\3i\3i\3i\3"+
+ "i\3i\3i\3i\3i\3i\3i\3j\3j\3j\3j\3j\3k\3k\3k\3k\3k\3k\3l\3l\3l\3l\3l\3"+
+ "m\3m\3m\3m\3m\3m\3m\3m\3m\3n\3n\3n\3n\3n\3n\3n\3n\3n\3o\3o\3o\3o\3o\3"+
+ "o\3o\3o\3p\3p\3p\3p\3p\3p\3p\3p\3q\3q\3q\3q\3q\3r\3r\3r\3r\3r\3r\3r\3"+
+ "r\3r\3s\3s\3s\3s\3s\3s\3s\3t\3t\3t\3t\3t\3t\3t\3u\3u\3u\3u\3u\3u\3u\3"+
+ "v\3v\3v\3v\3v\3v\3v\3v\3w\3w\3w\3w\3w\3x\3x\3x\3x\3x\3x\3x\3y\3y\3y\3"+
+ "y\3y\3y\3y\3z\3z\3z\3z\3z\3{\3{\3{\3{\3{\3{\3|\3|\3|\3|\3|\3}\3}\3}\3"+
+ "}\3}\3~\3~\3~\3~\3~\3~\3~\3~\3~\3\177\3\177\3\177\7\177\u0403\n\177\f"+
+ "\177\16\177\u0406\13\177\3\177\3\177\3\u0080\3\u0080\3\u0080\5\u0080\u040d"+
+ "\n\u0080\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0081\3\u0082\3\u0082"+
+ "\3\u0083\3\u0083\3\u0084\3\u0084\3\u0084\3\u0084\3\u0084\3\u0085\3\u0085"+
+ "\3\u0086\3\u0086\3\u0086\5\u0086\u0423\n\u0086\3\u0087\3\u0087\3\u0088"+
+ "\3\u0088\3\u0088\3\u0088\3\u0088\7\u0088\u042c\n\u0088\f\u0088\16\u0088"+
+ "\u042f\13\u0088\5\u0088\u0431\n\u0088\3\u0089\3\u0089\3\u0089\3\u0089"+
+ "\3\u0089\7\u0089\u0438\n\u0089\f\u0089\16\u0089\u043b\13\u0089\5\u0089"+
+ "\u043d\n\u0089\5\u0089\u043f\n\u0089\3\u0089\3\u0089\5\u0089\u0443\n\u0089"+
+ "\3\u0089\3\u0089\3\u008a\6\u008a\u0448\n\u008a\r\u008a\16\u008a\u0449"+
+ "\3\u008b\3\u008b\3\u008b\3\u008b\3\u008c\3\u008c\7\u008c\u0452\n\u008c"+
+ "\f\u008c\16\u008c\u0455\13\u008c\3\u008d\5\u008d\u0458\n\u008d\3\u008e"+
+ "\3\u008e\5\u008e\u045c\n\u008e\3\u008f\3\u008f\3\u008f\3\u008f\3\u008f"+
+ "\3\u008f\3\u008f\3\u008f\7\u008f\u0466\n\u008f\f\u008f\16\u008f\u0469"+
+ "\13\u008f\3\u008f\6\u008f\u046c\n\u008f\r\u008f\16\u008f\u046d\3\u008f"+
+ "\3\u008f\3\u008f\3\u008f\3\u0090\3\u0090\2\2\u0091\3\3\5\4\7\5\t\6\13"+
+ "\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'"+
+ "\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'"+
+ "M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{?}@\177"+
+ "A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091J\u0093"+
+ "K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7"+
+ "U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9^\u00bb"+
+ "_\u00bd`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cdh\u00cf"+
+ "i\u00d1j\u00d3k\u00d5l\u00d7m\u00d9n\u00dbo\u00ddp\u00dfq\u00e1r\u00e3"+
+ "s\u00e5t\u00e7u\u00e9v\u00ebw\u00edx\u00efy\u00f1z\u00f3{\u00f5|\u00f7"+
+ "}\u00f9~\u00fb\177\u00fd\u0080\u00ff\2\u0101\2\u0103\2\u0105\u0081\u0107"+
+ "\u0082\u0109\u0083\u010b\u0084\u010d\u0085\u010f\u0086\u0111\u0087\u0113"+
+ "\2\u0115\u0088\u0117\u0089\u0119\2\u011b\2\u011d\u008a\u011f\u008b\3\2"+
+ "\17\4\2$$^^\n\2$$\61\61^^ddhhppttvv\5\2\62;CHch\3\2\62;\4\2GGgg\4\2--"+
+ "//\5\2\13\f\17\17\"\"\20\2C\\aac|\u00c2\u00d8\u00da\u00f8\u00fa\u0301"+
+ "\u0372\u037f\u0381\u2001\u200e\u200f\u2072\u2191\u2c02\u2ff1\u3003\ud801"+
+ "\uf902\ufdd1\ufdf2\uffff\7\2//\62;\u00b9\u00b9\u0302\u0371\u2041\u2042"+
+ "\3\2<<\3\2++\4\2**<<\7\2$$()>>}}\177\177\2\u0481\2\3\3\2\2\2\2\5\3\2\2"+
+ "\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21"+
+ "\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2"+
+ "\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3"+
+ "\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3"+
+ "\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3"+
+ "\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2"+
+ "\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2"+
+ "Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3"+
+ "\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2"+
+ "\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2"+
+ "\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3"+
+ "\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2"+
+ "\2\u0091\3\2\2\2\2\u0093\3\2\2\2\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099"+
+ "\3\2\2\2\2\u009b\3\2\2\2\2\u009d\3\2\2\2\2\u009f\3\2\2\2\2\u00a1\3\2\2"+
+ "\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab"+
+ "\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2"+
+ "\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd"+
+ "\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2"+
+ "\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf"+
+ "\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2"+
+ "\2\2\u00d9\3\2\2\2\2\u00db\3\2\2\2\2\u00dd\3\2\2\2\2\u00df\3\2\2\2\2\u00e1"+
+ "\3\2\2\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2"+
+ "\2\2\u00eb\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef\3\2\2\2\2\u00f1\3\2\2\2\2\u00f3"+
+ "\3\2\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9\3\2\2\2\2\u00fb\3\2\2"+
+ "\2\2\u00fd\3\2\2\2\2\u0105\3\2\2\2\2\u0107\3\2\2\2\2\u0109\3\2\2\2\2\u010b"+
+ "\3\2\2\2\2\u010d\3\2\2\2\2\u010f\3\2\2\2\2\u0111\3\2\2\2\2\u0115\3\2\2"+
+ "\2\2\u0117\3\2\2\2\2\u011d\3\2\2\2\2\u011f\3\2\2\2\3\u0121\3\2\2\2\5\u0123"+
+ "\3\2\2\2\7\u012a\3\2\2\2\t\u0134\3\2\2\2\13\u0136\3\2\2\2\r\u013f\3\2"+
+ "\2\2\17\u0147\3\2\2\2\21\u0156\3\2\2\2\23\u0158\3\2\2\2\25\u016a\3\2\2"+
+ "\2\27\u017d\3\2\2\2\31\u0186\3\2\2\2\33\u0191\3\2\2\2\35\u0195\3\2\2\2"+
+ "\37\u019d\3\2\2\2!\u01a7\3\2\2\2#\u01b2\3\2\2\2%\u01b8\3\2\2\2\'\u01ca"+
+ "\3\2\2\2)\u01d1\3\2\2\2+\u01d3\3\2\2\2-\u01d6\3\2\2\2/\u01df\3\2\2\2\61"+
+ "\u01e8\3\2\2\2\63\u01ea\3\2\2\2\65\u01ec\3\2\2\2\67\u01ee\3\2\2\29\u01f0"+
+ "\3\2\2\2;\u01f7\3\2\2\2=\u01ff\3\2\2\2?\u0207\3\2\2\2A\u020e\3\2\2\2C"+
+ "\u0210\3\2\2\2E\u0212\3\2\2\2G\u0214\3\2\2\2I\u0217\3\2\2\2K\u021a\3\2"+
+ "\2\2M\u021d\3\2\2\2O\u0220\3\2\2\2Q\u0223\3\2\2\2S\u0226\3\2\2\2U\u0229"+
+ "\3\2\2\2W\u022b\3\2\2\2Y\u022e\3\2\2\2[\u0230\3\2\2\2]\u0233\3\2\2\2_"+
+ "\u0236\3\2\2\2a\u0238\3\2\2\2c\u023a\3\2\2\2e\u023e\3\2\2\2g\u0243\3\2"+
+ "\2\2i\u0247\3\2\2\2k\u0249\3\2\2\2m\u024b\3\2\2\2o\u024d\3\2\2\2q\u024f"+
+ "\3\2\2\2s\u0252\3\2\2\2u\u0254\3\2\2\2w\u0257\3\2\2\2y\u025a\3\2\2\2{"+
+ "\u025e\3\2\2\2}\u0262\3\2\2\2\177\u0268\3\2\2\2\u0081\u026e\3\2\2\2\u0083"+
+ "\u0271\3\2\2\2\u0085\u0277\3\2\2\2\u0087\u027e\3\2\2\2\u0089\u0281\3\2"+
+ "\2\2\u008b\u0284\3\2\2\2\u008d\u0287\3\2\2\2\u008f\u028a\3\2\2\2\u0091"+
+ "\u0293\3\2\2\2\u0093\u0299\3\2\2\2\u0095\u029f\3\2\2\2\u0097\u02a6\3\2"+
+ "\2\2\u0099\u02b0\3\2\2\2\u009b\u02bb\3\2\2\2\u009d\u02c0\3\2\2\2\u009f"+
+ "\u02c6\3\2\2\2\u00a1\u02d0\3\2\2\2\u00a3\u02da\3\2\2\2\u00a5\u02e3\3\2"+
+ "\2\2\u00a7\u02e9\3\2\2\2\u00a9\u02f0\3\2\2\2\u00ab\u02f5\3\2\2\2\u00ad"+
+ "\u02f9\3\2\2\2\u00af\u02ff\3\2\2\2\u00b1\u0307\3\2\2\2\u00b3\u030c\3\2"+
+ "\2\2\u00b5\u0311\3\2\2\2\u00b7\u031c\3\2\2\2\u00b9\u031f\3\2\2\2\u00bb"+
+ "\u0323\3\2\2\2\u00bd\u0327\3\2\2\2\u00bf\u032a\3\2\2\2\u00c1\u0333\3\2"+
+ "\2\2\u00c3\u0336\3\2\2\2\u00c5\u0341\3\2\2\2\u00c7\u0344\3\2\2\2\u00c9"+
+ "\u034a\3\2\2\2\u00cb\u034f\3\2\2\2\u00cd\u0358\3\2\2\2\u00cf\u0360\3\2"+
+ "\2\2\u00d1\u0367\3\2\2\2\u00d3\u0371\3\2\2\2\u00d5\u0376\3\2\2\2\u00d7"+
+ "\u037c\3\2\2\2\u00d9\u0381\3\2\2\2\u00db\u038a\3\2\2\2\u00dd\u0393\3\2"+
+ "\2\2\u00df\u039b\3\2\2\2\u00e1\u03a3\3\2\2\2\u00e3\u03a8\3\2\2\2\u00e5"+
+ "\u03b1\3\2\2\2\u00e7\u03b8\3\2\2\2\u00e9\u03bf\3\2\2\2\u00eb\u03c6\3\2"+
+ "\2\2\u00ed\u03ce\3\2\2\2\u00ef\u03d3\3\2\2\2\u00f1\u03da\3\2\2\2\u00f3"+
+ "\u03e1\3\2\2\2\u00f5\u03e6\3\2\2\2\u00f7\u03ec\3\2\2\2\u00f9\u03f1\3\2"+
+ "\2\2\u00fb\u03f6\3\2\2\2\u00fd\u03ff\3\2\2\2\u00ff\u0409\3\2\2\2\u0101"+
+ "\u040e\3\2\2\2\u0103\u0414\3\2\2\2\u0105\u0416\3\2\2\2\u0107\u0418\3\2"+
+ "\2\2\u0109\u041d\3\2\2\2\u010b\u0422\3\2\2\2\u010d\u0424\3\2\2\2\u010f"+
+ "\u0430\3\2\2\2\u0111\u043e\3\2\2\2\u0113\u0447\3\2\2\2\u0115\u044b\3\2"+
+ "\2\2\u0117\u044f\3\2\2\2\u0119\u0457\3\2\2\2\u011b\u045b\3\2\2\2\u011d"+
+ "\u045d\3\2\2\2\u011f\u0473\3\2\2\2\u0121\u0122\7=\2\2\u0122\4\3\2\2\2"+
+ "\u0123\u0124\7o\2\2\u0124\u0125\7q\2\2\u0125\u0126\7f\2\2\u0126\u0127"+
+ "\7w\2\2\u0127\u0128\7n\2\2\u0128\u0129\7g\2\2\u0129\6\3\2\2\2\u012a\u012b"+
+ "\7p\2\2\u012b\u012c\7c\2\2\u012c\u012d\7o\2\2\u012d\u012e\7g\2\2\u012e"+
+ "\u012f\7u\2\2\u012f\u0130\7r\2\2\u0130\u0131\7c\2\2\u0131\u0132\7e\2\2"+
+ "\u0132\u0133\7g\2\2\u0133\b\3\2\2\2\u0134\u0135\7?\2\2\u0135\n\3\2\2\2"+
+ "\u0136\u0137\7q\2\2\u0137\u0138\7t\2\2\u0138\u0139\7f\2\2\u0139\u013a"+
+ "\7g\2\2\u013a\u013b\7t\2\2\u013b\u013c\7k\2\2\u013c\u013d\7p\2\2\u013d"+
+ "\u013e\7i\2\2\u013e\f\3\2\2\2\u013f\u0140\7q\2\2\u0140\u0141\7t\2\2\u0141"+
+ "\u0142\7f\2\2\u0142\u0143\7g\2\2\u0143\u0144\7t\2\2\u0144\u0145\7g\2\2"+
+ "\u0145\u0146\7f\2\2\u0146\16\3\2\2\2\u0147\u0148\7f\2\2\u0148\u0149\7"+
+ "g\2\2\u0149\u014a\7e\2\2\u014a\u014b\7k\2\2\u014b\u014c\7o\2\2\u014c\u014d"+
+ "\7c\2\2\u014d\u014e\7n\2\2\u014e\u014f\7/\2\2\u014f\u0150\7h\2\2\u0150"+
+ "\u0151\7q\2\2\u0151\u0152\7t\2\2\u0152\u0153\7o\2\2\u0153\u0154\7c\2\2"+
+ "\u0154\u0155\7v\2\2\u0155\20\3\2\2\2\u0156\u0157\7<\2\2\u0157\22\3\2\2"+
+ "\2\u0158\u0159\7f\2\2\u0159\u015a\7g\2\2\u015a\u015b\7e\2\2\u015b\u015c"+
+ "\7k\2\2\u015c\u015d\7o\2\2\u015d\u015e\7c\2\2\u015e\u015f\7n\2\2\u015f"+
+ "\u0160\7/\2\2\u0160\u0161\7u\2\2\u0161\u0162\7g\2\2\u0162\u0163\7r\2\2"+
+ "\u0163\u0164\7c\2\2\u0164\u0165\7t\2\2\u0165\u0166\7c\2\2\u0166\u0167"+
+ "\7v\2\2\u0167\u0168\7q\2\2\u0168\u0169\7t\2\2\u0169\24\3\2\2\2\u016a\u016b"+
+ "\7i\2\2\u016b\u016c\7t\2\2\u016c\u016d\7q\2\2\u016d\u016e\7w\2\2\u016e"+
+ "\u016f\7r\2\2\u016f\u0170\7k\2\2\u0170\u0171\7p\2\2\u0171\u0172\7i\2\2"+
+ "\u0172\u0173\7/\2\2\u0173\u0174\7u\2\2\u0174\u0175\7g\2\2\u0175\u0176"+
+ "\7r\2\2\u0176\u0177\7c\2\2\u0177\u0178\7t\2\2\u0178\u0179\7c\2\2\u0179"+
+ "\u017a\7v\2\2\u017a\u017b\7q\2\2\u017b\u017c\7t\2\2\u017c\26\3\2\2\2\u017d"+
+ "\u017e\7k\2\2\u017e\u017f\7p\2\2\u017f\u0180\7h\2\2\u0180\u0181\7k\2\2"+
+ "\u0181\u0182\7p\2\2\u0182\u0183\7k\2\2\u0183\u0184\7v\2\2\u0184\u0185"+
+ "\7{\2\2\u0185\30\3\2\2\2\u0186\u0187\7o\2\2\u0187\u0188\7k\2\2\u0188\u0189"+
+ "\7p\2\2\u0189\u018a\7w\2\2\u018a\u018b\7u\2\2\u018b\u018c\7/\2\2\u018c"+
+ "\u018d\7u\2\2\u018d\u018e\7k\2\2\u018e\u018f\7i\2\2\u018f\u0190\7p\2\2"+
+ "\u0190\32\3\2\2\2\u0191\u0192\7P\2\2\u0192\u0193\7c\2\2\u0193\u0194\7"+
+ "P\2\2\u0194\34\3\2\2\2\u0195\u0196\7r\2\2\u0196\u0197\7g\2\2\u0197\u0198"+
+ "\7t\2\2\u0198\u0199\7e\2\2\u0199\u019a\7g\2\2\u019a\u019b\7p\2\2\u019b"+
+ "\u019c\7v\2\2\u019c\36\3\2\2\2\u019d\u019e\7r\2\2\u019e\u019f\7g\2\2\u019f"+
+ "\u01a0\7t\2\2\u01a0\u01a1\7/\2\2\u01a1\u01a2\7o\2\2\u01a2\u01a3\7k\2\2"+
+ "\u01a3\u01a4\7n\2\2\u01a4\u01a5\7n\2\2\u01a5\u01a6\7g\2\2\u01a6 \3\2\2"+
+ "\2\u01a7\u01a8\7|\2\2\u01a8\u01a9\7g\2\2\u01a9\u01aa\7t\2\2\u01aa\u01ab"+
+ "\7q\2\2\u01ab\u01ac\7/\2\2\u01ac\u01ad\7f\2\2\u01ad\u01ae\7k\2\2\u01ae"+
+ "\u01af\7i\2\2\u01af\u01b0\7k\2\2\u01b0\u01b1\7v\2\2\u01b1\"\3\2\2\2\u01b2"+
+ "\u01b3\7f\2\2\u01b3\u01b4\7k\2\2\u01b4\u01b5\7i\2\2\u01b5\u01b6\7k\2\2"+
+ "\u01b6\u01b7\7v\2\2\u01b7$\3\2\2\2\u01b8\u01b9\7r\2\2\u01b9\u01ba\7c\2"+
+ "\2\u01ba\u01bb\7v\2\2\u01bb\u01bc\7v\2\2\u01bc\u01bd\7g\2\2\u01bd\u01be"+
+ "\7t\2\2\u01be\u01bf\7p\2\2\u01bf\u01c0\7/\2\2\u01c0\u01c1\7u\2\2\u01c1"+
+ "\u01c2\7g\2\2\u01c2\u01c3\7r\2\2\u01c3\u01c4\7c\2\2\u01c4\u01c5\7t\2\2"+
+ "\u01c5\u01c6\7c\2\2\u01c6\u01c7\7v\2\2\u01c7\u01c8\7q\2\2\u01c8\u01c9"+
+ "\7t\2\2\u01c9&\3\2\2\2\u01ca\u01cb\7k\2\2\u01cb\u01cc\7o\2\2\u01cc\u01cd"+
+ "\7r\2\2\u01cd\u01ce\7q\2\2\u01ce\u01cf\7t\2\2\u01cf\u01d0\7v\2\2\u01d0"+
+ "(\3\2\2\2\u01d1\u01d2\7.\2\2\u01d2*\3\2\2\2\u01d3\u01d4\7<\2\2\u01d4\u01d5"+
+ "\7?\2\2\u01d5,\3\2\2\2\u01d6\u01d7\7g\2\2\u01d7\u01d8\7z\2\2\u01d8\u01d9"+
+ "\7v\2\2\u01d9\u01da\7g\2\2\u01da\u01db\7t\2\2\u01db\u01dc\7p\2\2\u01dc"+
+ "\u01dd\7c\2\2\u01dd\u01de\7n\2\2\u01de.\3\2\2\2\u01df\u01e0\7h\2\2\u01e0"+
+ "\u01e1\7w\2\2\u01e1\u01e2\7p\2\2\u01e2\u01e3\7e\2\2\u01e3\u01e4\7v\2\2"+
+ "\u01e4\u01e5\7k\2\2\u01e5\u01e6\7q\2\2\u01e6\u01e7\7p\2\2\u01e7\60\3\2"+
+ "\2\2\u01e8\u01e9\7*\2\2\u01e9\62\3\2\2\2\u01ea\u01eb\7+\2\2\u01eb\64\3"+
+ "\2\2\2\u01ec\u01ed\7}\2\2\u01ed\66\3\2\2\2\u01ee\u01ef\7\177\2\2\u01ef"+
+ "8\3\2\2\2\u01f0\u01f1\7l\2\2\u01f1\u01f2\7u\2\2\u01f2\u01f3\7q\2\2\u01f3"+
+ "\u01f4\7w\2\2\u01f4\u01f5\7p\2\2\u01f5\u01f6\7f\2\2\u01f6:\3\2\2\2\u01f7"+
+ "\u01f8\7e\2\2\u01f8\u01f9\7q\2\2\u01f9\u01fa\7o\2\2\u01fa\u01fb\7r\2\2"+
+ "\u01fb\u01fc\7c\2\2\u01fc\u01fd\7e\2\2\u01fd\u01fe\7v\2\2\u01fe<\3\2\2"+
+ "\2\u01ff\u0200\7x\2\2\u0200\u0201\7g\2\2\u0201\u0202\7t\2\2\u0202\u0203"+
+ "\7d\2\2\u0203\u0204\7q\2\2\u0204\u0205\7u\2\2\u0205\u0206\7g\2\2\u0206"+
+ ">\3\2\2\2\u0207\u0208\7u\2\2\u0208\u0209\7e\2\2\u0209\u020a\7j\2\2\u020a"+
+ "\u020b\7g\2\2\u020b\u020c\7o\2\2\u020c\u020d\7c\2\2\u020d@\3\2\2\2\u020e"+
+ "\u020f\7&\2\2\u020fB\3\2\2\2\u0210\u0211\7~\2\2\u0211D\3\2\2\2\u0212\u0213"+
+ "\7,\2\2\u0213F\3\2\2\2\u0214\u0215\7g\2\2\u0215\u0216\7s\2\2\u0216H\3"+
+ "\2\2\2\u0217\u0218\7p\2\2\u0218\u0219\7g\2\2\u0219J\3\2\2\2\u021a\u021b"+
+ "\7n\2\2\u021b\u021c\7v\2\2\u021cL\3\2\2\2\u021d\u021e\7n\2\2\u021e\u021f"+
+ "\7g\2\2\u021fN\3\2\2\2\u0220\u0221\7i\2\2\u0221\u0222\7v\2\2\u0222P\3"+
+ "\2\2\2\u0223\u0224\7i\2\2\u0224\u0225\7g\2\2\u0225R\3\2\2\2\u0226\u0227"+
+ "\7#\2\2\u0227\u0228\7?\2\2\u0228T\3\2\2\2\u0229\u022a\7>\2\2\u022aV\3"+
+ "\2\2\2\u022b\u022c\7>\2\2\u022c\u022d\7?\2\2\u022dX\3\2\2\2\u022e\u022f"+
+ "\7@\2\2\u022fZ\3\2\2\2\u0230\u0231\7@\2\2\u0231\u0232\7?\2\2\u0232\\\3"+
+ "\2\2\2\u0233\u0234\7~\2\2\u0234\u0235\7~\2\2\u0235^\3\2\2\2\u0236\u0237"+
+ "\7-\2\2\u0237`\3\2\2\2\u0238\u0239\7/\2\2\u0239b\3\2\2\2\u023a\u023b\7"+
+ "f\2\2\u023b\u023c\7k\2\2\u023c\u023d\7x\2\2\u023dd\3\2\2\2\u023e\u023f"+
+ "\7k\2\2\u023f\u0240\7f\2\2\u0240\u0241\7k\2\2\u0241\u0242\7x\2\2\u0242"+
+ "f\3\2\2\2\u0243\u0244\7o\2\2\u0244\u0245\7q\2\2\u0245\u0246\7f\2\2\u0246"+
+ "h\3\2\2\2\u0247\u0248\7#\2\2\u0248j\3\2\2\2\u0249\u024a\7]\2\2\u024al"+
+ "\3\2\2\2\u024b\u024c\7_\2\2\u024cn\3\2\2\2\u024d\u024e\7\60\2\2\u024e"+
+ "p\3\2\2\2\u024f\u0250\7&\2\2\u0250\u0251\7&\2\2\u0251r\3\2\2\2\u0252\u0253"+
+ "\7%\2\2\u0253t\3\2\2\2\u0254\u0255\7}\2\2\u0255\u0256\7~\2\2\u0256v\3"+
+ "\2\2\2\u0257\u0258\7~\2\2\u0258\u0259\7\177\2\2\u0259x\3\2\2\2\u025a\u025b"+
+ "\7h\2\2\u025b\u025c\7q\2\2\u025c\u025d\7t\2\2\u025dz\3\2\2\2\u025e\u025f"+
+ "\7n\2\2\u025f\u0260\7g\2\2\u0260\u0261\7v\2\2\u0261|\3\2\2\2\u0262\u0263"+
+ "\7y\2\2\u0263\u0264\7j\2\2\u0264\u0265\7g\2\2\u0265\u0266\7t\2\2\u0266"+
+ "\u0267\7g\2\2\u0267~\3\2\2\2\u0268\u0269\7i\2\2\u0269\u026a\7t\2\2\u026a"+
+ "\u026b\7q\2\2\u026b\u026c\7w\2\2\u026c\u026d\7r\2\2\u026d\u0080\3\2\2"+
+ "\2\u026e\u026f\7d\2\2\u026f\u0270\7{\2\2\u0270\u0082\3\2\2\2\u0271\u0272"+
+ "\7q\2\2\u0272\u0273\7t\2\2\u0273\u0274\7f\2\2\u0274\u0275\7g\2\2\u0275"+
+ "\u0276\7t\2\2\u0276\u0084\3\2\2\2\u0277\u0278\7t\2\2\u0278\u0279\7g\2"+
+ "\2\u0279\u027a\7v\2\2\u027a\u027b\7w\2\2\u027b\u027c\7t\2\2\u027c\u027d"+
+ "\7p\2\2\u027d\u0086\3\2\2\2\u027e\u027f\7k\2\2\u027f\u0280\7h\2\2\u0280"+
+ "\u0088\3\2\2\2\u0281\u0282\7k\2\2\u0282\u0283\7p\2\2\u0283\u008a\3\2\2"+
+ "\2\u0284\u0285\7c\2\2\u0285\u0286\7u\2\2\u0286\u008c\3\2\2\2\u0287\u0288"+
+ "\7c\2\2\u0288\u0289\7v\2\2\u0289\u008e\3\2\2\2\u028a\u028b\7c\2\2\u028b"+
+ "\u028c\7n\2\2\u028c\u028d\7n\2\2\u028d\u028e\7q\2\2\u028e\u028f\7y\2\2"+
+ "\u028f\u0290\7k\2\2\u0290\u0291\7p\2\2\u0291\u0292\7i\2\2\u0292\u0090"+
+ "\3\2\2\2\u0293\u0294\7g\2\2\u0294\u0295\7o\2\2\u0295\u0296\7r\2\2\u0296"+
+ "\u0297\7v\2\2\u0297\u0298\7{\2\2\u0298\u0092\3\2\2\2\u0299\u029a\7e\2"+
+ "\2\u029a\u029b\7q\2\2\u029b\u029c\7w\2\2\u029c\u029d\7p\2\2\u029d\u029e"+
+ "\7v\2\2\u029e\u0094\3\2\2\2\u029f\u02a0\7u\2\2\u02a0\u02a1\7v\2\2\u02a1"+
+ "\u02a2\7c\2\2\u02a2\u02a3\7d\2\2\u02a3\u02a4\7n\2\2\u02a4\u02a5\7g\2\2"+
+ "\u02a5\u0096\3\2\2\2\u02a6\u02a7\7c\2\2\u02a7\u02a8\7u\2\2\u02a8\u02a9"+
+ "\7e\2\2\u02a9\u02aa\7g\2\2\u02aa\u02ab\7p\2\2\u02ab\u02ac\7f\2\2\u02ac"+
+ "\u02ad\7k\2\2\u02ad\u02ae\7p\2\2\u02ae\u02af\7i\2\2\u02af\u0098\3\2\2"+
+ "\2\u02b0\u02b1\7f\2\2\u02b1\u02b2\7g\2\2\u02b2\u02b3\7u\2\2\u02b3\u02b4"+
+ "\7e\2\2\u02b4\u02b5\7g\2\2\u02b5\u02b6\7p\2\2\u02b6\u02b7\7f\2\2\u02b7"+
+ "\u02b8\7k\2\2\u02b8\u02b9\7p\2\2\u02b9\u02ba\7i\2\2\u02ba\u009a\3\2\2"+
+ "\2\u02bb\u02bc\7u\2\2\u02bc\u02bd\7q\2\2\u02bd\u02be\7o\2\2\u02be\u02bf"+
+ "\7g\2\2\u02bf\u009c\3\2\2\2\u02c0\u02c1\7g\2\2\u02c1\u02c2\7x\2\2\u02c2"+
+ "\u02c3\7g\2\2\u02c3\u02c4\7t\2\2\u02c4\u02c5\7{\2\2\u02c5\u009e\3\2\2"+
+ "\2\u02c6\u02c7\7u\2\2\u02c7\u02c8\7c\2\2\u02c8\u02c9\7v\2\2\u02c9\u02ca"+
+ "\7k\2\2\u02ca\u02cb\7u\2\2\u02cb\u02cc\7h\2\2\u02cc\u02cd\7k\2\2\u02cd"+
+ "\u02ce\7g\2\2\u02ce\u02cf\7u\2\2\u02cf\u00a0\3\2\2\2\u02d0\u02d1\7e\2"+
+ "\2\u02d1\u02d2\7q\2\2\u02d2\u02d3\7n\2\2\u02d3\u02d4\7n\2\2\u02d4\u02d5"+
+ "\7c\2\2\u02d5\u02d6\7v\2\2\u02d6\u02d7\7k\2\2\u02d7\u02d8\7q\2\2\u02d8"+
+ "\u02d9\7p\2\2\u02d9\u00a2\3\2\2\2\u02da\u02db\7i\2\2\u02db\u02dc\7t\2"+
+ "\2\u02dc\u02dd\7g\2\2\u02dd\u02de\7c\2\2\u02de\u02df\7v\2\2\u02df\u02e0"+
+ "\7g\2\2\u02e0\u02e1\7u\2\2\u02e1\u02e2\7v\2\2\u02e2\u00a4\3\2\2\2\u02e3"+
+ "\u02e4\7n\2\2\u02e4\u02e5\7g\2\2\u02e5\u02e6\7c\2\2\u02e6\u02e7\7u\2\2"+
+ "\u02e7\u02e8\7v\2\2\u02e8\u00a6\3\2\2\2\u02e9\u02ea\7u\2\2\u02ea\u02eb"+
+ "\7y\2\2\u02eb\u02ec\7k\2\2\u02ec\u02ed\7v\2\2\u02ed\u02ee\7e\2\2\u02ee"+
+ "\u02ef\7j\2\2\u02ef\u00a8\3\2\2\2\u02f0\u02f1\7e\2\2\u02f1\u02f2\7c\2"+
+ "\2\u02f2\u02f3\7u\2\2\u02f3\u02f4\7g\2\2\u02f4\u00aa\3\2\2\2\u02f5\u02f6"+
+ "\7v\2\2\u02f6\u02f7\7t\2\2\u02f7\u02f8\7{\2\2\u02f8\u00ac\3\2\2\2\u02f9"+
+ "\u02fa\7e\2\2\u02fa\u02fb\7c\2\2\u02fb\u02fc\7v\2\2\u02fc\u02fd\7e\2\2"+
+ "\u02fd\u02fe\7j\2\2\u02fe\u00ae\3\2\2\2\u02ff\u0300\7f\2\2\u0300\u0301"+
+ "\7g\2\2\u0301\u0302\7h\2\2\u0302\u0303\7c\2\2\u0303\u0304\7w\2\2\u0304"+
+ "\u0305\7n\2\2\u0305\u0306\7v\2\2\u0306\u00b0\3\2\2\2\u0307\u0308\7v\2"+
+ "\2\u0308\u0309\7j\2\2\u0309\u030a\7g\2\2\u030a\u030b\7p\2\2\u030b\u00b2"+
+ "\3\2\2\2\u030c\u030d\7g\2\2\u030d\u030e\7n\2\2\u030e\u030f\7u\2\2\u030f"+
+ "\u0310\7g\2\2\u0310\u00b4\3\2\2\2\u0311\u0312\7v\2\2\u0312\u0313\7{\2"+
+ "\2\u0313\u0314\7r\2\2\u0314\u0315\7g\2\2\u0315\u0316\7u\2\2\u0316\u0317"+
+ "\7y\2\2\u0317\u0318\7k\2\2\u0318\u0319\7v\2\2\u0319\u031a\7e\2\2\u031a"+
+ "\u031b\7j\2\2\u031b\u00b6\3\2\2\2\u031c\u031d\7q\2\2\u031d\u031e\7t\2"+
+ "\2\u031e\u00b8\3\2\2\2\u031f\u0320\7c\2\2\u0320\u0321\7p\2\2\u0321\u0322"+
+ "\7f\2\2\u0322\u00ba\3\2\2\2\u0323\u0324\7p\2\2\u0324\u0325\7q\2\2\u0325"+
+ "\u0326\7v\2\2\u0326\u00bc\3\2\2\2\u0327\u0328\7v\2\2\u0328\u0329\7q\2"+
+ "\2\u0329\u00be\3\2\2\2\u032a\u032b\7k\2\2\u032b\u032c\7p\2\2\u032c\u032d"+
+ "\7u\2\2\u032d\u032e\7v\2\2\u032e\u032f\7c\2\2\u032f\u0330\7p\2\2\u0330"+
+ "\u0331\7e\2\2\u0331\u0332\7g\2\2\u0332\u00c0\3\2\2\2\u0333\u0334\7q\2"+
+ "\2\u0334\u0335\7h\2\2\u0335\u00c2\3\2\2\2\u0336\u0337\7u\2\2\u0337\u0338"+
+ "\7v\2\2\u0338\u0339\7c\2\2\u0339\u033a\7v\2\2\u033a\u033b\7k\2\2\u033b"+
+ "\u033c\7e\2\2\u033c\u033d\7c\2\2\u033d\u033e\7n\2\2\u033e\u033f\7n\2\2"+
+ "\u033f\u0340\7{\2\2\u0340\u00c4\3\2\2\2\u0341\u0342\7k\2\2\u0342\u0343"+
+ "\7u\2\2\u0343\u00c6\3\2\2\2\u0344\u0345\7v\2\2\u0345\u0346\7t\2\2\u0346"+
+ "\u0347\7g\2\2\u0347\u0348\7c\2\2\u0348\u0349\7v\2\2\u0349\u00c8\3\2\2"+
+ "\2\u034a\u034b\7e\2\2\u034b\u034c\7c\2\2\u034c\u034d\7u\2\2\u034d\u034e"+
+ "\7v\2\2\u034e\u00ca\3\2\2\2\u034f\u0350\7e\2\2\u0350\u0351\7c\2\2\u0351"+
+ "\u0352\7u\2\2\u0352\u0353\7v\2\2\u0353\u0354\7c\2\2\u0354\u0355\7d\2\2"+
+ "\u0355\u0356\7n\2\2\u0356\u0357\7g\2\2\u0357\u00cc\3\2\2\2\u0358\u0359"+
+ "\7x\2\2\u0359\u035a\7g\2\2\u035a\u035b\7t\2\2\u035b\u035c\7u\2\2\u035c"+
+ "\u035d\7k\2\2\u035d\u035e\7q\2\2\u035e\u035f\7p\2\2\u035f\u00ce\3\2\2"+
+ "\2\u0360\u0361\7l\2\2\u0361\u0362\7u\2\2\u0362\u0363\7q\2\2\u0363\u0364"+
+ "\7p\2\2\u0364\u0365\7k\2\2\u0365\u0366\7s\2\2\u0366\u00d0\3\2\2\2\u0367"+
+ "\u0368\7w\2\2\u0368\u0369\7p\2\2\u0369\u036a\7q\2\2\u036a\u036b\7t\2\2"+
+ "\u036b\u036c\7f\2\2\u036c\u036d\7g\2\2\u036d\u036e\7t\2\2\u036e\u036f"+
+ "\7g\2\2\u036f\u0370\7f\2\2\u0370\u00d2\3\2\2\2\u0371\u0372\7v\2\2\u0372"+
+ "\u0373\7t\2\2\u0373\u0374\7w\2\2\u0374\u0375\7g\2\2\u0375\u00d4\3\2\2"+
+ "\2\u0376\u0377\7h\2\2\u0377\u0378\7c\2\2\u0378\u0379\7n\2\2\u0379\u037a"+
+ "\7u\2\2\u037a\u037b\7g\2\2\u037b\u00d6\3\2\2\2\u037c\u037d\7v\2\2\u037d"+
+ "\u037e\7{\2\2\u037e\u037f\7r\2\2\u037f\u0380\7g\2\2\u0380\u00d8\3\2\2"+
+ "\2\u0381\u0382\7x\2\2\u0382\u0383\7c\2\2\u0383\u0384\7n\2\2\u0384\u0385"+
+ "\7k\2\2\u0385\u0386\7f\2\2\u0386\u0387\7c\2\2\u0387\u0388\7v\2\2\u0388"+
+ "\u0389\7g\2\2\u0389\u00da\3\2\2\2\u038a\u038b\7c\2\2\u038b\u038c\7p\2"+
+ "\2\u038c\u038d\7p\2\2\u038d\u038e\7q\2\2\u038e\u038f\7v\2\2\u038f\u0390"+
+ "\7c\2\2\u0390\u0391\7v\2\2\u0391\u0392\7g\2\2\u0392\u00dc\3\2\2\2\u0393"+
+ "\u0394\7f\2\2\u0394\u0395\7g\2\2\u0395\u0396\7e\2\2\u0396\u0397\7n\2\2"+
+ "\u0397\u0398\7c\2\2\u0398\u0399\7t\2\2\u0399\u039a\7g\2\2\u039a\u00de"+
+ "\3\2\2\2\u039b\u039c\7e\2\2\u039c\u039d\7q\2\2\u039d\u039e\7p\2\2\u039e"+
+ "\u039f\7v\2\2\u039f\u03a0\7g\2\2\u03a0\u03a1\7z\2\2\u03a1\u03a2\7v\2\2"+
+ "\u03a2\u00e0\3\2\2\2\u03a3\u03a4\7k\2\2\u03a4\u03a5\7v\2\2\u03a5\u03a6"+
+ "\7g\2\2\u03a6\u03a7\7o\2\2\u03a7\u00e2\3\2\2\2\u03a8\u03a9\7x\2\2\u03a9"+
+ "\u03aa\7c\2\2\u03aa\u03ab\7t\2\2\u03ab\u03ac\7k\2\2\u03ac\u03ad\7c\2\2"+
+ "\u03ad\u03ae\7d\2\2\u03ae\u03af\7n\2\2\u03af\u03b0\7g\2\2\u03b0\u00e4"+
+ "\3\2\2\2\u03b1\u03b2\7k\2\2\u03b2\u03b3\7p\2\2\u03b3\u03b4\7u\2\2\u03b4"+
+ "\u03b5\7g\2\2\u03b5\u03b6\7t\2\2\u03b6\u03b7\7v\2\2\u03b7\u00e6\3\2\2"+
+ "\2\u03b8\u03b9\7f\2\2\u03b9\u03ba\7g\2\2\u03ba\u03bb\7n\2\2\u03bb\u03bc"+
+ "\7g\2\2\u03bc\u03bd\7v\2\2\u03bd\u03be\7g\2\2\u03be\u00e8\3\2\2\2\u03bf"+
+ "\u03c0\7t\2\2\u03c0\u03c1\7g\2\2\u03c1\u03c2\7p\2\2\u03c2\u03c3\7c\2\2"+
+ "\u03c3\u03c4\7o\2\2\u03c4\u03c5\7g\2\2\u03c5\u00ea\3\2\2\2\u03c6\u03c7"+
+ "\7t\2\2\u03c7\u03c8\7g\2\2\u03c8\u03c9\7r\2\2\u03c9\u03ca\7n\2\2\u03ca"+
+ "\u03cb\7c\2\2\u03cb\u03cc\7e\2\2\u03cc\u03cd\7g\2\2\u03cd\u00ec\3\2\2"+
+ "\2\u03ce\u03cf\7e\2\2\u03cf\u03d0\7q\2\2\u03d0\u03d1\7r\2\2\u03d1\u03d2"+
+ "\7{\2\2\u03d2\u00ee\3\2\2\2\u03d3\u03d4\7o\2\2\u03d4\u03d5\7q\2\2\u03d5"+
+ "\u03d6\7f\2\2\u03d6\u03d7\7k\2\2\u03d7\u03d8\7h\2\2\u03d8\u03d9\7{\2\2"+
+ "\u03d9\u00f0\3\2\2\2\u03da\u03db\7c\2\2\u03db\u03dc\7r\2\2\u03dc\u03dd"+
+ "\7r\2\2\u03dd\u03de\7g\2\2\u03de\u03df\7p\2\2\u03df\u03e0\7f\2\2\u03e0"+
+ "\u00f2\3\2\2\2\u03e1\u03e2\7k\2\2\u03e2\u03e3\7p\2\2\u03e3\u03e4\7v\2"+
+ "\2\u03e4\u03e5\7q\2\2\u03e5\u00f4\3\2\2\2\u03e6\u03e7\7x\2\2\u03e7\u03e8"+
+ "\7c\2\2\u03e8\u03e9\7n\2\2\u03e9\u03ea\7w\2\2\u03ea\u03eb\7g\2\2\u03eb"+
+ "\u00f6\3\2\2\2\u03ec\u03ed\7l\2\2\u03ed\u03ee\7u\2\2\u03ee\u03ef\7q\2"+
+ "\2\u03ef\u03f0\7p\2\2\u03f0\u00f8\3\2\2\2\u03f1\u03f2\7y\2\2\u03f2\u03f3"+
+ "\7k\2\2\u03f3\u03f4\7v\2\2\u03f4\u03f5\7j\2\2\u03f5\u00fa\3\2\2\2\u03f6"+
+ "\u03f7\7r\2\2\u03f7\u03f8\7q\2\2\u03f8\u03f9\7u\2\2\u03f9\u03fa\7k\2\2"+
+ "\u03fa\u03fb\7v\2\2\u03fb\u03fc\7k\2\2\u03fc\u03fd\7q\2\2\u03fd\u03fe"+
+ "\7p\2\2\u03fe\u00fc\3\2\2\2\u03ff\u0404\7$\2\2\u0400\u0403\5\u00ff\u0080"+
+ "\2\u0401\u0403\n\2\2\2\u0402\u0400\3\2\2\2\u0402\u0401\3\2\2\2\u0403\u0406"+
+ "\3\2\2\2\u0404\u0402\3\2\2\2\u0404\u0405\3\2\2\2\u0405\u0407\3\2\2\2\u0406"+
+ "\u0404\3\2\2\2\u0407\u0408\7$\2\2\u0408\u00fe\3\2\2\2\u0409\u040c\7^\2"+
+ "\2\u040a\u040d\t\3\2\2\u040b\u040d\5\u0101\u0081\2\u040c\u040a\3\2\2\2"+
+ "\u040c\u040b\3\2\2\2\u040d\u0100\3\2\2\2\u040e\u040f\7w\2\2\u040f\u0410"+
+ "\5\u0103\u0082\2\u0410\u0411\5\u0103\u0082\2\u0411\u0412\5\u0103\u0082"+
+ "\2\u0412\u0413\5\u0103\u0082\2\u0413\u0102\3\2\2\2\u0414\u0415\t\4\2\2"+
+ "\u0415\u0104\3\2\2\2\u0416\u0417\7A\2\2\u0417\u0106\3\2\2\2\u0418\u0419"+
+ "\7p\2\2\u0419\u041a\7w\2\2\u041a\u041b\7n\2\2\u041b\u041c\7n\2\2\u041c"+
+ "\u0108\3\2\2\2\u041d\u041e\5\u010b\u0086\2\u041e\u010a\3\2\2\2\u041f\u0423"+
+ "\5\u010d\u0087\2\u0420\u0423\5\u010f\u0088\2\u0421\u0423\5\u0111\u0089"+
+ "\2\u0422\u041f\3\2\2\2\u0422\u0420\3\2\2\2\u0422\u0421\3\2\2\2\u0423\u010c"+
+ "\3\2\2\2\u0424\u0425\5\u0113\u008a\2\u0425\u010e\3\2\2\2\u0426\u0427\7"+
+ "\60\2\2\u0427\u0431\5\u0113\u008a\2\u0428\u0429\5\u0113\u008a\2\u0429"+
+ "\u042d\7\60\2\2\u042a\u042c\t\5\2\2\u042b\u042a\3\2\2\2\u042c\u042f\3"+
+ "\2\2\2\u042d\u042b\3\2\2\2\u042d\u042e\3\2\2\2\u042e\u0431\3\2\2\2\u042f"+
+ "\u042d\3\2\2\2\u0430\u0426\3\2\2\2\u0430\u0428\3\2\2\2\u0431\u0110\3\2"+
+ "\2\2\u0432\u0433\7\60\2\2\u0433\u043f\5\u0113\u008a\2\u0434\u043c\5\u0113"+
+ "\u008a\2\u0435\u0439\7\60\2\2\u0436\u0438\t\5\2\2\u0437\u0436\3\2\2\2"+
+ "\u0438\u043b\3\2\2\2\u0439\u0437\3\2\2\2\u0439\u043a\3\2\2\2\u043a\u043d"+
+ "\3\2\2\2\u043b\u0439\3\2\2\2\u043c\u0435\3\2\2\2\u043c\u043d\3\2\2\2\u043d"+
+ "\u043f\3\2\2\2\u043e\u0432\3\2\2\2\u043e\u0434\3\2\2\2\u043f\u0440\3\2"+
+ "\2\2\u0440\u0442\t\6\2\2\u0441\u0443\t\7\2\2\u0442\u0441\3\2\2\2\u0442"+
+ "\u0443\3\2\2\2\u0443\u0444\3\2\2\2\u0444\u0445\5\u0113\u008a\2\u0445\u0112"+
+ "\3\2\2\2\u0446\u0448\t\5\2\2\u0447\u0446\3\2\2\2\u0448\u0449\3\2\2\2\u0449"+
+ "\u0447\3\2\2\2\u0449\u044a\3\2\2\2\u044a\u0114\3\2\2\2\u044b\u044c\t\b"+
+ "\2\2\u044c\u044d\3\2\2\2\u044d\u044e\b\u008b\2\2\u044e\u0116\3\2\2\2\u044f"+
+ "\u0453\5\u0119\u008d\2\u0450\u0452\5\u011b\u008e\2\u0451\u0450\3\2\2\2"+
+ "\u0452\u0455\3\2\2\2\u0453\u0451\3\2\2\2\u0453\u0454\3\2\2\2\u0454\u0118"+
+ "\3\2\2\2\u0455\u0453\3\2\2\2\u0456\u0458\t\t\2\2\u0457\u0456\3\2\2\2\u0458"+
+ "\u011a\3\2\2\2\u0459\u045c\5\u0119\u008d\2\u045a\u045c\t\n\2\2\u045b\u0459"+
+ "\3\2\2\2\u045b\u045a\3\2\2\2\u045c\u011c\3\2\2\2\u045d\u045e\7*\2\2\u045e"+
+ "\u0467\7<\2\2\u045f\u0466\5\u011d\u008f\2\u0460\u0461\7*\2\2\u0461\u0466"+
+ "\n\13\2\2\u0462\u0463\7<\2\2\u0463\u0466\n\f\2\2\u0464\u0466\n\r\2\2\u0465"+
+ "\u045f\3\2\2\2\u0465\u0460\3\2\2\2\u0465\u0462\3\2\2\2\u0465\u0464\3\2"+
+ "\2\2\u0466\u0469\3\2\2\2\u0467\u0465\3\2\2\2\u0467\u0468\3\2\2\2\u0468"+
+ "\u046b\3\2\2\2\u0469\u0467\3\2\2\2\u046a\u046c\7<\2\2\u046b\u046a\3\2"+
+ "\2\2\u046c\u046d\3\2\2\2\u046d\u046b\3\2\2\2\u046d\u046e\3\2\2\2\u046e"+
+ "\u046f\3\2\2\2\u046f\u0470\7+\2\2\u0470\u0471\3\2\2\2\u0471\u0472\b\u008f"+
+ "\2\2\u0472\u011e\3\2\2\2\u0473\u0474\n\16\2\2\u0474\u0120\3\2\2\2\24\2"+
+ "\u0402\u0404\u040c\u0422\u042d\u0430\u0439\u043c\u043e\u0442\u0449\u0453"+
+ "\u0457\u045b\u0465\u0467\u046d\3\2\3\2";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
diff --git a/src/main/java/org/rumbledb/parser/JsoniqLexer.tokens b/src/main/java/org/rumbledb/parser/JsoniqLexer.tokens
index 1a3cdf8b79..240e0ded8e 100644
--- a/src/main/java/org/rumbledb/parser/JsoniqLexer.tokens
+++ b/src/main/java/org/rumbledb/parser/JsoniqLexer.tokens
@@ -57,73 +57,84 @@ T__55=56
T__56=57
T__57=58
T__58=59
-T__59=60
-Kfor=61
-Klet=62
-Kwhere=63
-Kgroup=64
-Kby=65
-Korder=66
-Kreturn=67
-Kif=68
-Kin=69
-Kas=70
-Kat=71
-Kallowing=72
-Kempty=73
-Kcount=74
-Kstable=75
-Kascending=76
-Kdescending=77
-Ksome=78
-Kevery=79
-Ksatisfies=80
-Kcollation=81
-Kgreatest=82
-Kleast=83
-Kswitch=84
-Kcase=85
-Ktry=86
-Kcatch=87
-Kdefault=88
-Kthen=89
-Kelse=90
-Ktypeswitch=91
-Kor=92
-Kand=93
-Knot=94
-Kto=95
-Kinstance=96
-Kof=97
-Kstatically=98
-Kis=99
-Ktreat=100
-Kcast=101
-Kcastable=102
-Kversion=103
-Kjsoniq=104
-Kunordered=105
-Ktrue=106
-Kfalse=107
-Ktype=108
-Kvalidate=109
-Kannotate=110
-Kdeclare=111
-Kcontext=112
-Kitem=113
-Kvariable=114
-STRING=115
-ArgumentPlaceholder=116
-NullLiteral=117
-Literal=118
-NumericLiteral=119
-IntegerLiteral=120
-DecimalLiteral=121
-DoubleLiteral=122
-WS=123
-NCName=124
-XQComment=125
-ContentChar=126
+Kfor=60
+Klet=61
+Kwhere=62
+Kgroup=63
+Kby=64
+Korder=65
+Kreturn=66
+Kif=67
+Kin=68
+Kas=69
+Kat=70
+Kallowing=71
+Kempty=72
+Kcount=73
+Kstable=74
+Kascending=75
+Kdescending=76
+Ksome=77
+Kevery=78
+Ksatisfies=79
+Kcollation=80
+Kgreatest=81
+Kleast=82
+Kswitch=83
+Kcase=84
+Ktry=85
+Kcatch=86
+Kdefault=87
+Kthen=88
+Kelse=89
+Ktypeswitch=90
+Kor=91
+Kand=92
+Knot=93
+Kto=94
+Kinstance=95
+Kof=96
+Kstatically=97
+Kis=98
+Ktreat=99
+Kcast=100
+Kcastable=101
+Kversion=102
+Kjsoniq=103
+Kunordered=104
+Ktrue=105
+Kfalse=106
+Ktype=107
+Kvalidate=108
+Kannotate=109
+Kdeclare=110
+Kcontext=111
+Kitem=112
+Kvariable=113
+Kinsert=114
+Kdelete=115
+Krename=116
+Kreplace=117
+Kcopy=118
+Kmodify=119
+Kappend=120
+Kinto=121
+Kvalue=122
+Kjson=123
+Kwith=124
+Kposition=125
+STRING=126
+ArgumentPlaceholder=127
+NullLiteral=128
+Literal=129
+NumericLiteral=130
+IntegerLiteral=131
+DecimalLiteral=132
+DoubleLiteral=133
+WS=134
+NCName=135
+XQComment=136
+ContentChar=137
';'=1
'module'=2
'namespace'=3
@@ -154,89 +165,100 @@ ContentChar=126
'jsound'=28
'compact'=29
'verbose'=30
-'json'=31
-'schema'=32
-'$'=33
-'|'=34
-'*'=35
-'eq'=36
-'ne'=37
-'lt'=38
-'le'=39
-'gt'=40
-'ge'=41
-'!='=42
-'<'=43
-'<='=44
-'>'=45
-'>='=46
-'||'=47
-'+'=48
-'-'=49
-'div'=50
-'idiv'=51
-'mod'=52
-'!'=53
-'['=54
-']'=55
-'.'=56
-'$$'=57
-'#'=58
-'{|'=59
-'|}'=60
-'for'=61
-'let'=62
-'where'=63
-'group'=64
-'by'=65
-'order'=66
-'return'=67
-'if'=68
-'in'=69
-'as'=70
-'at'=71
-'allowing'=72
-'empty'=73
-'count'=74
-'stable'=75
-'ascending'=76
-'descending'=77
-'some'=78
-'every'=79
-'satisfies'=80
-'collation'=81
-'greatest'=82
-'least'=83
-'switch'=84
-'case'=85
-'try'=86
-'catch'=87
-'default'=88
-'then'=89
-'else'=90
-'typeswitch'=91
-'or'=92
-'and'=93
-'not'=94
-'to'=95
-'instance'=96
-'of'=97
-'statically'=98
-'is'=99
-'treat'=100
-'cast'=101
-'castable'=102
-'version'=103
-'jsoniq'=104
-'unordered'=105
-'true'=106
-'false'=107
-'type'=108
-'validate'=109
-'annotate'=110
-'declare'=111
-'context'=112
-'item'=113
-'variable'=114
-'?'=116
-'null'=117
+'schema'=31
+'$'=32
+'|'=33
+'*'=34
+'eq'=35
+'ne'=36
+'lt'=37
+'le'=38
+'gt'=39
+'ge'=40
+'!='=41
+'<'=42
+'<='=43
+'>'=44
+'>='=45
+'||'=46
+'+'=47
+'-'=48
+'div'=49
+'idiv'=50
+'mod'=51
+'!'=52
+'['=53
+']'=54
+'.'=55
+'$$'=56
+'#'=57
+'{|'=58
+'|}'=59
+'for'=60
+'let'=61
+'where'=62
+'group'=63
+'by'=64
+'order'=65
+'return'=66
+'if'=67
+'in'=68
+'as'=69
+'at'=70
+'allowing'=71
+'empty'=72
+'count'=73
+'stable'=74
+'ascending'=75
+'descending'=76
+'some'=77
+'every'=78
+'satisfies'=79
+'collation'=80
+'greatest'=81
+'least'=82
+'switch'=83
+'case'=84
+'try'=85
+'catch'=86
+'default'=87
+'then'=88
+'else'=89
+'typeswitch'=90
+'or'=91
+'and'=92
+'not'=93
+'to'=94
+'instance'=95
+'of'=96
+'statically'=97
+'is'=98
+'treat'=99
+'cast'=100
+'castable'=101
+'version'=102
+'jsoniq'=103
+'unordered'=104
+'true'=105
+'false'=106
+'type'=107
+'validate'=108
+'annotate'=109
+'declare'=110
+'context'=111
+'item'=112
+'variable'=113
+'insert'=114
+'delete'=115
+'rename'=116
+'replace'=117
+'copy'=118
+'modify'=119
+'append'=120
+'into'=121
+'value'=122
+'json'=123
+'with'=124
+'position'=125
+'?'=127
+'null'=128
diff --git a/src/main/java/org/rumbledb/parser/JsoniqParser.java b/src/main/java/org/rumbledb/parser/JsoniqParser.java
index 299fcb8a32..b3ee59a621 100644
--- a/src/main/java/org/rumbledb/parser/JsoniqParser.java
+++ b/src/main/java/org/rumbledb/parser/JsoniqParser.java
@@ -39,17 +39,19 @@ public class JsoniqParser extends Parser {
T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45,
T__45=46, T__46=47, T__47=48, T__48=49, T__49=50, T__50=51, T__51=52,
T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59,
- T__59=60, Kfor=61, Klet=62, Kwhere=63, Kgroup=64, Kby=65, Korder=66, Kreturn=67,
- Kif=68, Kin=69, Kas=70, Kat=71, Kallowing=72, Kempty=73, Kcount=74, Kstable=75,
- Kascending=76, Kdescending=77, Ksome=78, Kevery=79, Ksatisfies=80, Kcollation=81,
- Kgreatest=82, Kleast=83, Kswitch=84, Kcase=85, Ktry=86, Kcatch=87, Kdefault=88,
- Kthen=89, Kelse=90, Ktypeswitch=91, Kor=92, Kand=93, Knot=94, Kto=95,
- Kinstance=96, Kof=97, Kstatically=98, Kis=99, Ktreat=100, Kcast=101, Kcastable=102,
- Kversion=103, Kjsoniq=104, Kunordered=105, Ktrue=106, Kfalse=107, Ktype=108,
- Kvalidate=109, Kannotate=110, Kdeclare=111, Kcontext=112, Kitem=113, Kvariable=114,
- STRING=115, ArgumentPlaceholder=116, NullLiteral=117, Literal=118, NumericLiteral=119,
- IntegerLiteral=120, DecimalLiteral=121, DoubleLiteral=122, WS=123, NCName=124,
- XQComment=125, ContentChar=126;
+ Kfor=60, Klet=61, Kwhere=62, Kgroup=63, Kby=64, Korder=65, Kreturn=66,
+ Kif=67, Kin=68, Kas=69, Kat=70, Kallowing=71, Kempty=72, Kcount=73, Kstable=74,
+ Kascending=75, Kdescending=76, Ksome=77, Kevery=78, Ksatisfies=79, Kcollation=80,
+ Kgreatest=81, Kleast=82, Kswitch=83, Kcase=84, Ktry=85, Kcatch=86, Kdefault=87,
+ Kthen=88, Kelse=89, Ktypeswitch=90, Kor=91, Kand=92, Knot=93, Kto=94,
+ Kinstance=95, Kof=96, Kstatically=97, Kis=98, Ktreat=99, Kcast=100, Kcastable=101,
+ Kversion=102, Kjsoniq=103, Kunordered=104, Ktrue=105, Kfalse=106, Ktype=107,
+ Kvalidate=108, Kannotate=109, Kdeclare=110, Kcontext=111, Kitem=112, Kvariable=113,
+ Kinsert=114, Kdelete=115, Krename=116, Kreplace=117, Kcopy=118, Kmodify=119,
+ Kappend=120, Kinto=121, Kvalue=122, Kjson=123, Kwith=124, Kposition=125,
+ STRING=126, ArgumentPlaceholder=127, NullLiteral=128, Literal=129, NumericLiteral=130,
+ IntegerLiteral=131, DecimalLiteral=132, DoubleLiteral=133, WS=134, NCName=135,
+ XQComment=136, ContentChar=137;
public static final int
RULE_moduleAndThisIsIt = 0, RULE_module = 1, RULE_mainModule = 2, RULE_libraryModule = 3,
RULE_prolog = 4, RULE_setter = 5, RULE_namespaceDecl = 6, RULE_annotatedDecl = 7,
@@ -74,11 +76,13 @@ public class JsoniqParser extends Parser {
RULE_primaryExpr = 69, RULE_varRef = 70, RULE_parenthesizedExpr = 71,
RULE_contextItemExpr = 72, RULE_orderedExpr = 73, RULE_unorderedExpr = 74,
RULE_functionCall = 75, RULE_argumentList = 76, RULE_argument = 77, RULE_functionItemExpr = 78,
- RULE_namedFunctionRef = 79, RULE_inlineFunctionExpr = 80, RULE_sequenceType = 81,
- RULE_objectConstructor = 82, RULE_itemType = 83, RULE_functionTest = 84,
- RULE_anyFunctionTest = 85, RULE_typedFunctionTest = 86, RULE_singleType = 87,
- RULE_pairConstructor = 88, RULE_arrayConstructor = 89, RULE_uriLiteral = 90,
- RULE_stringLiteral = 91, RULE_keyWords = 92;
+ RULE_namedFunctionRef = 79, RULE_inlineFunctionExpr = 80, RULE_insertExpr = 81,
+ RULE_deleteExpr = 82, RULE_renameExpr = 83, RULE_replaceExpr = 84, RULE_transformExpr = 85,
+ RULE_appendExpr = 86, RULE_updateLocator = 87, RULE_copyDecl = 88, RULE_sequenceType = 89,
+ RULE_objectConstructor = 90, RULE_itemType = 91, RULE_functionTest = 92,
+ RULE_anyFunctionTest = 93, RULE_typedFunctionTest = 94, RULE_singleType = 95,
+ RULE_pairConstructor = 96, RULE_arrayConstructor = 97, RULE_uriLiteral = 98,
+ RULE_stringLiteral = 99, RULE_keyWords = 100;
private static String[] makeRuleNames() {
return new String[] {
"moduleAndThisIsIt", "module", "mainModule", "libraryModule", "prolog",
@@ -97,9 +101,11 @@ private static String[] makeRuleNames() {
"predicate", "objectLookup", "primaryExpr", "varRef", "parenthesizedExpr",
"contextItemExpr", "orderedExpr", "unorderedExpr", "functionCall", "argumentList",
"argument", "functionItemExpr", "namedFunctionRef", "inlineFunctionExpr",
- "sequenceType", "objectConstructor", "itemType", "functionTest", "anyFunctionTest",
- "typedFunctionTest", "singleType", "pairConstructor", "arrayConstructor",
- "uriLiteral", "stringLiteral", "keyWords"
+ "insertExpr", "deleteExpr", "renameExpr", "replaceExpr", "transformExpr",
+ "appendExpr", "updateLocator", "copyDecl", "sequenceType", "objectConstructor",
+ "itemType", "functionTest", "anyFunctionTest", "typedFunctionTest", "singleType",
+ "pairConstructor", "arrayConstructor", "uriLiteral", "stringLiteral",
+ "keyWords"
};
}
public static final String[] ruleNames = makeRuleNames();
@@ -111,18 +117,20 @@ private static String[] makeLiteralNames() {
"'infinity'", "'minus-sign'", "'NaN'", "'percent'", "'per-mille'", "'zero-digit'",
"'digit'", "'pattern-separator'", "'import'", "','", "':='", "'external'",
"'function'", "'('", "')'", "'{'", "'}'", "'jsound'", "'compact'", "'verbose'",
- "'json'", "'schema'", "'$'", "'|'", "'*'", "'eq'", "'ne'", "'lt'", "'le'",
- "'gt'", "'ge'", "'!='", "'<'", "'<='", "'>'", "'>='", "'||'", "'+'",
- "'-'", "'div'", "'idiv'", "'mod'", "'!'", "'['", "']'", "'.'", "'$$'",
- "'#'", "'{|'", "'|}'", "'for'", "'let'", "'where'", "'group'", "'by'",
- "'order'", "'return'", "'if'", "'in'", "'as'", "'at'", "'allowing'",
- "'empty'", "'count'", "'stable'", "'ascending'", "'descending'", "'some'",
- "'every'", "'satisfies'", "'collation'", "'greatest'", "'least'", "'switch'",
- "'case'", "'try'", "'catch'", "'default'", "'then'", "'else'", "'typeswitch'",
- "'or'", "'and'", "'not'", "'to'", "'instance'", "'of'", "'statically'",
- "'is'", "'treat'", "'cast'", "'castable'", "'version'", "'jsoniq'", "'unordered'",
- "'true'", "'false'", "'type'", "'validate'", "'annotate'", "'declare'",
- "'context'", "'item'", "'variable'", null, "'?'", "'null'"
+ "'schema'", "'$'", "'|'", "'*'", "'eq'", "'ne'", "'lt'", "'le'", "'gt'",
+ "'ge'", "'!='", "'<'", "'<='", "'>'", "'>='", "'||'", "'+'", "'-'", "'div'",
+ "'idiv'", "'mod'", "'!'", "'['", "']'", "'.'", "'$$'", "'#'", "'{|'",
+ "'|}'", "'for'", "'let'", "'where'", "'group'", "'by'", "'order'", "'return'",
+ "'if'", "'in'", "'as'", "'at'", "'allowing'", "'empty'", "'count'", "'stable'",
+ "'ascending'", "'descending'", "'some'", "'every'", "'satisfies'", "'collation'",
+ "'greatest'", "'least'", "'switch'", "'case'", "'try'", "'catch'", "'default'",
+ "'then'", "'else'", "'typeswitch'", "'or'", "'and'", "'not'", "'to'",
+ "'instance'", "'of'", "'statically'", "'is'", "'treat'", "'cast'", "'castable'",
+ "'version'", "'jsoniq'", "'unordered'", "'true'", "'false'", "'type'",
+ "'validate'", "'annotate'", "'declare'", "'context'", "'item'", "'variable'",
+ "'insert'", "'delete'", "'rename'", "'replace'", "'copy'", "'modify'",
+ "'append'", "'into'", "'value'", "'json'", "'with'", "'position'", null,
+ "'?'", "'null'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
@@ -133,16 +141,18 @@ private static String[] makeSymbolicNames() {
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, "Kfor", "Klet", "Kwhere", "Kgroup", "Kby", "Korder", "Kreturn",
- "Kif", "Kin", "Kas", "Kat", "Kallowing", "Kempty", "Kcount", "Kstable",
- "Kascending", "Kdescending", "Ksome", "Kevery", "Ksatisfies", "Kcollation",
- "Kgreatest", "Kleast", "Kswitch", "Kcase", "Ktry", "Kcatch", "Kdefault",
- "Kthen", "Kelse", "Ktypeswitch", "Kor", "Kand", "Knot", "Kto", "Kinstance",
- "Kof", "Kstatically", "Kis", "Ktreat", "Kcast", "Kcastable", "Kversion",
- "Kjsoniq", "Kunordered", "Ktrue", "Kfalse", "Ktype", "Kvalidate", "Kannotate",
- "Kdeclare", "Kcontext", "Kitem", "Kvariable", "STRING", "ArgumentPlaceholder",
- "NullLiteral", "Literal", "NumericLiteral", "IntegerLiteral", "DecimalLiteral",
- "DoubleLiteral", "WS", "NCName", "XQComment", "ContentChar"
+ "Kfor", "Klet", "Kwhere", "Kgroup", "Kby", "Korder", "Kreturn", "Kif",
+ "Kin", "Kas", "Kat", "Kallowing", "Kempty", "Kcount", "Kstable", "Kascending",
+ "Kdescending", "Ksome", "Kevery", "Ksatisfies", "Kcollation", "Kgreatest",
+ "Kleast", "Kswitch", "Kcase", "Ktry", "Kcatch", "Kdefault", "Kthen",
+ "Kelse", "Ktypeswitch", "Kor", "Kand", "Knot", "Kto", "Kinstance", "Kof",
+ "Kstatically", "Kis", "Ktreat", "Kcast", "Kcastable", "Kversion", "Kjsoniq",
+ "Kunordered", "Ktrue", "Kfalse", "Ktype", "Kvalidate", "Kannotate", "Kdeclare",
+ "Kcontext", "Kitem", "Kvariable", "Kinsert", "Kdelete", "Krename", "Kreplace",
+ "Kcopy", "Kmodify", "Kappend", "Kinto", "Kvalue", "Kjson", "Kwith", "Kposition",
+ "STRING", "ArgumentPlaceholder", "NullLiteral", "Literal", "NumericLiteral",
+ "IntegerLiteral", "DecimalLiteral", "DoubleLiteral", "WS", "NCName",
+ "XQComment", "ContentChar"
};
}
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
@@ -218,9 +228,9 @@ public final ModuleAndThisIsItContext moduleAndThisIsIt() throws RecognitionExce
try {
enterOuterAlt(_localctx, 1);
{
- setState(186);
+ setState(202);
module();
- setState(187);
+ setState(203);
match(EOF);
}
}
@@ -266,28 +276,28 @@ public final ModuleContext module() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(194);
+ setState(210);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,0,_ctx) ) {
case 1:
{
- setState(189);
+ setState(205);
match(Kjsoniq);
- setState(190);
+ setState(206);
match(Kversion);
- setState(191);
+ setState(207);
((ModuleContext)_localctx).vers = stringLiteral();
- setState(192);
+ setState(208);
match(T__0);
}
break;
}
- setState(198);
+ setState(214);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__1:
{
- setState(196);
+ setState(212);
libraryModule();
}
break;
@@ -296,12 +306,12 @@ public final ModuleContext module() throws RecognitionException {
case T__22:
case T__23:
case T__25:
- case T__32:
+ case T__31:
+ case T__46:
case T__47:
- case T__48:
- case T__53:
- case T__56:
- case T__58:
+ case T__52:
+ case T__55:
+ case T__57:
case Kfor:
case Klet:
case Kwhere:
@@ -356,12 +366,24 @@ public final ModuleContext module() throws RecognitionException {
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case STRING:
case NullLiteral:
case Literal:
case NCName:
{
- setState(197);
+ setState(213);
((ModuleContext)_localctx).main = mainModule();
}
break;
@@ -405,9 +427,9 @@ public final MainModuleContext mainModule() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(200);
+ setState(216);
prolog();
- setState(201);
+ setState(217);
expr();
}
}
@@ -447,19 +469,19 @@ public final LibraryModuleContext libraryModule() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(203);
+ setState(219);
match(T__1);
- setState(204);
+ setState(220);
match(T__2);
- setState(205);
+ setState(221);
match(NCName);
- setState(206);
+ setState(222);
match(T__3);
- setState(207);
+ setState(223);
uriLiteral();
- setState(208);
+ setState(224);
match(T__0);
- setState(209);
+ setState(225);
prolog();
}
}
@@ -517,59 +539,59 @@ public final PrologContext prolog() throws RecognitionException {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(220);
+ setState(236);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,3,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- setState(214);
+ setState(230);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) {
case 1:
{
- setState(211);
+ setState(227);
setter();
}
break;
case 2:
{
- setState(212);
+ setState(228);
namespaceDecl();
}
break;
case 3:
{
- setState(213);
+ setState(229);
moduleImport();
}
break;
}
- setState(216);
+ setState(232);
match(T__0);
}
}
}
- setState(222);
+ setState(238);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,3,_ctx);
}
- setState(228);
+ setState(244);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,4,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- setState(223);
+ setState(239);
annotatedDecl();
- setState(224);
+ setState(240);
match(T__0);
}
}
}
- setState(230);
+ setState(246);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,4,_ctx);
}
@@ -614,34 +636,34 @@ public final SetterContext setter() throws RecognitionException {
SetterContext _localctx = new SetterContext(_ctx, getState());
enterRule(_localctx, 10, RULE_setter);
try {
- setState(235);
+ setState(251);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(231);
+ setState(247);
defaultCollationDecl();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(232);
+ setState(248);
orderingModeDecl();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(233);
+ setState(249);
emptyOrderDecl();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
- setState(234);
+ setState(250);
decimalFormatDecl();
}
break;
@@ -681,15 +703,15 @@ public final NamespaceDeclContext namespaceDecl() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(237);
+ setState(253);
match(Kdeclare);
- setState(238);
+ setState(254);
match(T__2);
- setState(239);
+ setState(255);
match(NCName);
- setState(240);
+ setState(256);
match(T__3);
- setState(241);
+ setState(257);
uriLiteral();
}
}
@@ -732,34 +754,34 @@ public final AnnotatedDeclContext annotatedDecl() throws RecognitionException {
AnnotatedDeclContext _localctx = new AnnotatedDeclContext(_ctx, getState());
enterRule(_localctx, 14, RULE_annotatedDecl);
try {
- setState(247);
+ setState(263);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(243);
+ setState(259);
functionDecl();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(244);
+ setState(260);
varDecl();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(245);
+ setState(261);
typeDecl();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
- setState(246);
+ setState(262);
contextItemDecl();
}
break;
@@ -800,13 +822,13 @@ public final DefaultCollationDeclContext defaultCollationDecl() throws Recogniti
try {
enterOuterAlt(_localctx, 1);
{
- setState(249);
+ setState(265);
match(Kdeclare);
- setState(250);
+ setState(266);
match(Kdefault);
- setState(251);
+ setState(267);
match(Kcollation);
- setState(252);
+ setState(268);
uriLiteral();
}
}
@@ -842,11 +864,11 @@ public final OrderingModeDeclContext orderingModeDecl() throws RecognitionExcept
try {
enterOuterAlt(_localctx, 1);
{
- setState(254);
+ setState(270);
match(Kdeclare);
- setState(255);
+ setState(271);
match(T__4);
- setState(256);
+ setState(272);
_la = _input.LA(1);
if ( !(_la==T__5 || _la==Kunordered) ) {
_errHandler.recoverInline(this);
@@ -895,16 +917,16 @@ public final EmptyOrderDeclContext emptyOrderDecl() throws RecognitionException
try {
enterOuterAlt(_localctx, 1);
{
- setState(258);
+ setState(274);
match(Kdeclare);
- setState(259);
+ setState(275);
match(Kdefault);
- setState(260);
+ setState(276);
match(Korder);
- setState(261);
+ setState(277);
match(Kempty);
{
- setState(262);
+ setState(278);
((EmptyOrderDeclContext)_localctx).emptySequenceOrder = _input.LT(1);
_la = _input.LA(1);
if ( !(_la==Kgreatest || _la==Kleast) ) {
@@ -965,17 +987,17 @@ public final DecimalFormatDeclContext decimalFormatDecl() throws RecognitionExce
try {
enterOuterAlt(_localctx, 1);
{
- setState(264);
+ setState(280);
match(Kdeclare);
- setState(269);
+ setState(285);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__6:
{
{
- setState(265);
+ setState(281);
match(T__6);
- setState(266);
+ setState(282);
qname();
}
}
@@ -983,9 +1005,9 @@ public final DecimalFormatDeclContext decimalFormatDecl() throws RecognitionExce
case Kdefault:
{
{
- setState(267);
+ setState(283);
match(Kdefault);
- setState(268);
+ setState(284);
match(T__6);
}
}
@@ -993,21 +1015,21 @@ public final DecimalFormatDeclContext decimalFormatDecl() throws RecognitionExce
default:
throw new NoViableAltException(this);
}
- setState(277);
+ setState(293);
_errHandler.sync(this);
_la = _input.LA(1);
while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__16) | (1L << T__17))) != 0)) {
{
{
- setState(271);
+ setState(287);
dfPropertyName();
- setState(272);
+ setState(288);
match(T__3);
- setState(273);
+ setState(289);
stringLiteral();
}
}
- setState(279);
+ setState(295);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -1056,17 +1078,17 @@ public final QnameContext qname() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(285);
+ setState(301);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,10,_ctx) ) {
case 1:
{
- setState(282);
+ setState(298);
_errHandler.sync(this);
switch (_input.LA(1)) {
case NCName:
{
- setState(280);
+ setState(296);
((QnameContext)_localctx).ns = match(NCName);
}
break;
@@ -1124,26 +1146,38 @@ public final QnameContext qname() throws RecognitionException {
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case NullLiteral:
{
- setState(281);
+ setState(297);
((QnameContext)_localctx).nskw = keyWords();
}
break;
default:
throw new NoViableAltException(this);
}
- setState(284);
+ setState(300);
match(T__7);
}
break;
}
- setState(289);
+ setState(305);
_errHandler.sync(this);
switch (_input.LA(1)) {
case NCName:
{
- setState(287);
+ setState(303);
((QnameContext)_localctx).local_name = match(NCName);
}
break;
@@ -1201,9 +1235,21 @@ public final QnameContext qname() throws RecognitionException {
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case NullLiteral:
{
- setState(288);
+ setState(304);
((QnameContext)_localctx).local_namekw = keyWords();
}
break;
@@ -1242,7 +1288,7 @@ public final DfPropertyNameContext dfPropertyName() throws RecognitionException
try {
enterOuterAlt(_localctx, 1);
{
- setState(291);
+ setState(307);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__8) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__16) | (1L << T__17))) != 0)) ) {
_errHandler.recoverInline(this);
@@ -1294,48 +1340,48 @@ public final ModuleImportContext moduleImport() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(293);
+ setState(309);
match(T__18);
- setState(294);
+ setState(310);
match(T__1);
- setState(298);
+ setState(314);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__2) {
{
- setState(295);
+ setState(311);
match(T__2);
- setState(296);
+ setState(312);
((ModuleImportContext)_localctx).prefix = match(NCName);
- setState(297);
+ setState(313);
match(T__3);
}
}
- setState(300);
+ setState(316);
((ModuleImportContext)_localctx).targetNamespace = uriLiteral();
- setState(310);
+ setState(326);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kat) {
{
- setState(301);
+ setState(317);
match(Kat);
- setState(302);
+ setState(318);
uriLiteral();
- setState(307);
+ setState(323);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(303);
+ setState(319);
match(T__19);
- setState(304);
+ setState(320);
uriLiteral();
}
}
- setState(309);
+ setState(325);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -1387,33 +1433,33 @@ public final VarDeclContext varDecl() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(312);
+ setState(328);
match(Kdeclare);
- setState(313);
+ setState(329);
match(Kvariable);
- setState(314);
+ setState(330);
varRef();
- setState(317);
+ setState(333);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kas) {
{
- setState(315);
+ setState(331);
match(Kas);
- setState(316);
+ setState(332);
sequenceType();
}
}
- setState(326);
+ setState(342);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__20:
{
{
- setState(319);
+ setState(335);
match(T__20);
- setState(320);
+ setState(336);
exprSingle();
}
}
@@ -1421,16 +1467,16 @@ public final VarDeclContext varDecl() throws RecognitionException {
case T__21:
{
{
- setState(321);
+ setState(337);
((VarDeclContext)_localctx).external = match(T__21);
- setState(324);
+ setState(340);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__20) {
{
- setState(322);
+ setState(338);
match(T__20);
- setState(323);
+ setState(339);
exprSingle();
}
}
@@ -1484,33 +1530,33 @@ public final ContextItemDeclContext contextItemDecl() throws RecognitionExceptio
try {
enterOuterAlt(_localctx, 1);
{
- setState(328);
+ setState(344);
match(Kdeclare);
- setState(329);
+ setState(345);
match(Kcontext);
- setState(330);
+ setState(346);
match(Kitem);
- setState(333);
+ setState(349);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kas) {
{
- setState(331);
+ setState(347);
match(Kas);
- setState(332);
+ setState(348);
sequenceType();
}
}
- setState(342);
+ setState(358);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__20:
{
{
- setState(335);
+ setState(351);
match(T__20);
- setState(336);
+ setState(352);
exprSingle();
}
}
@@ -1518,16 +1564,16 @@ public final ContextItemDeclContext contextItemDecl() throws RecognitionExceptio
case T__21:
{
{
- setState(337);
+ setState(353);
((ContextItemDeclContext)_localctx).external = match(T__21);
- setState(340);
+ setState(356);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__20) {
{
- setState(338);
+ setState(354);
match(T__20);
- setState(339);
+ setState(355);
exprSingle();
}
}
@@ -1587,62 +1633,62 @@ public final FunctionDeclContext functionDecl() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(344);
+ setState(360);
match(Kdeclare);
- setState(345);
+ setState(361);
match(T__22);
- setState(346);
+ setState(362);
((FunctionDeclContext)_localctx).fn_name = qname();
- setState(347);
+ setState(363);
match(T__23);
- setState(349);
+ setState(365);
_errHandler.sync(this);
_la = _input.LA(1);
- if (_la==T__32) {
+ if (_la==T__31) {
{
- setState(348);
+ setState(364);
paramList();
}
}
- setState(351);
+ setState(367);
match(T__24);
- setState(354);
+ setState(370);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kas) {
{
- setState(352);
+ setState(368);
match(Kas);
- setState(353);
+ setState(369);
((FunctionDeclContext)_localctx).return_type = sequenceType();
}
}
- setState(362);
+ setState(378);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__25:
{
- setState(356);
+ setState(372);
match(T__25);
- setState(358);
+ setState(374);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__32) | (1L << T__47) | (1L << T__48) | (1L << T__53) | (1L << T__56) | (1L << T__58) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kgroup - 64)) | (1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (STRING - 64)) | (1L << (NullLiteral - 64)) | (1L << (Literal - 64)) | (1L << (NCName - 64)))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__31) | (1L << T__46) | (1L << T__47) | (1L << T__52) | (1L << T__55) | (1L << T__57) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere) | (1L << Kgroup))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (Kinsert - 64)) | (1L << (Kdelete - 64)) | (1L << (Krename - 64)) | (1L << (Kreplace - 64)) | (1L << (Kcopy - 64)) | (1L << (Kmodify - 64)) | (1L << (Kappend - 64)) | (1L << (Kinto - 64)) | (1L << (Kvalue - 64)) | (1L << (Kjson - 64)) | (1L << (Kwith - 64)) | (1L << (Kposition - 64)) | (1L << (STRING - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (NullLiteral - 128)) | (1L << (Literal - 128)) | (1L << (NCName - 128)))) != 0)) {
{
- setState(357);
+ setState(373);
((FunctionDeclContext)_localctx).fn_body = expr();
}
}
- setState(360);
+ setState(376);
match(T__26);
}
break;
case T__21:
{
- setState(361);
+ setState(377);
match(T__21);
}
break;
@@ -1692,29 +1738,28 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final TypeDeclContext typeDecl() throws RecognitionException {
TypeDeclContext _localctx = new TypeDeclContext(_ctx, getState());
enterRule(_localctx, 36, RULE_typeDecl);
- int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(364);
+ setState(380);
match(Kdeclare);
- setState(365);
+ setState(381);
match(Ktype);
- setState(366);
+ setState(382);
((TypeDeclContext)_localctx).type_name = qname();
- setState(367);
+ setState(383);
match(Kas);
- setState(369);
+ setState(385);
_errHandler.sync(this);
- _la = _input.LA(1);
- if (_la==T__27 || _la==T__30) {
+ switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
+ case 1:
{
- setState(368);
+ setState(384);
((TypeDeclContext)_localctx).schema = schemaLanguage();
}
+ break;
}
-
- setState(371);
+ setState(387);
((TypeDeclContext)_localctx).type_definition = exprSingle();
}
}
@@ -1730,6 +1775,7 @@ public final TypeDeclContext typeDecl() throws RecognitionException {
}
public static class SchemaLanguageContext extends ParserRuleContext {
+ public TerminalNode Kjson() { return getToken(JsoniqParser.Kjson, 0); }
public SchemaLanguageContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@@ -1745,34 +1791,34 @@ public final SchemaLanguageContext schemaLanguage() throws RecognitionException
SchemaLanguageContext _localctx = new SchemaLanguageContext(_ctx, getState());
enterRule(_localctx, 38, RULE_schemaLanguage);
try {
- setState(379);
+ setState(395);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(373);
+ setState(389);
match(T__27);
- setState(374);
+ setState(390);
match(T__28);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(375);
+ setState(391);
match(T__27);
- setState(376);
+ setState(392);
match(T__29);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(377);
+ setState(393);
+ match(Kjson);
+ setState(394);
match(T__30);
- setState(378);
- match(T__31);
}
break;
}
@@ -1813,21 +1859,21 @@ public final ParamListContext paramList() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(381);
+ setState(397);
param();
- setState(386);
+ setState(402);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(382);
+ setState(398);
match(T__19);
- setState(383);
+ setState(399);
param();
}
}
- setState(388);
+ setState(404);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -1870,18 +1916,18 @@ public final ParamContext param() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(389);
- match(T__32);
- setState(390);
+ setState(405);
+ match(T__31);
+ setState(406);
qname();
- setState(393);
+ setState(409);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kas) {
{
- setState(391);
+ setState(407);
match(Kas);
- setState(392);
+ setState(408);
sequenceType();
}
}
@@ -1924,21 +1970,21 @@ public final ExprContext expr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(395);
+ setState(411);
exprSingle();
- setState(400);
+ setState(416);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(396);
+ setState(412);
match(T__19);
- setState(397);
+ setState(413);
exprSingle();
}
}
- setState(402);
+ setState(418);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -1974,6 +2020,24 @@ public IfExprContext ifExpr() {
public TryCatchExprContext tryCatchExpr() {
return getRuleContext(TryCatchExprContext.class,0);
}
+ public InsertExprContext insertExpr() {
+ return getRuleContext(InsertExprContext.class,0);
+ }
+ public DeleteExprContext deleteExpr() {
+ return getRuleContext(DeleteExprContext.class,0);
+ }
+ public RenameExprContext renameExpr() {
+ return getRuleContext(RenameExprContext.class,0);
+ }
+ public ReplaceExprContext replaceExpr() {
+ return getRuleContext(ReplaceExprContext.class,0);
+ }
+ public TransformExprContext transformExpr() {
+ return getRuleContext(TransformExprContext.class,0);
+ }
+ public AppendExprContext appendExpr() {
+ return getRuleContext(AppendExprContext.class,0);
+ }
public OrExprContext orExpr() {
return getRuleContext(OrExprContext.class,0);
}
@@ -1992,55 +2056,97 @@ public final ExprSingleContext exprSingle() throws RecognitionException {
ExprSingleContext _localctx = new ExprSingleContext(_ctx, getState());
enterRule(_localctx, 46, RULE_exprSingle);
try {
- setState(410);
+ setState(432);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(403);
+ setState(419);
flowrExpr();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(404);
+ setState(420);
quantifiedExpr();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(405);
+ setState(421);
switchExpr();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
- setState(406);
+ setState(422);
typeSwitchExpr();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
- setState(407);
+ setState(423);
ifExpr();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
- setState(408);
+ setState(424);
tryCatchExpr();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
- setState(409);
+ setState(425);
+ insertExpr();
+ }
+ break;
+ case 8:
+ enterOuterAlt(_localctx, 8);
+ {
+ setState(426);
+ deleteExpr();
+ }
+ break;
+ case 9:
+ enterOuterAlt(_localctx, 9);
+ {
+ setState(427);
+ renameExpr();
+ }
+ break;
+ case 10:
+ enterOuterAlt(_localctx, 10);
+ {
+ setState(428);
+ replaceExpr();
+ }
+ break;
+ case 11:
+ enterOuterAlt(_localctx, 11);
+ {
+ setState(429);
+ transformExpr();
+ }
+ break;
+ case 12:
+ enterOuterAlt(_localctx, 12);
+ {
+ setState(430);
+ appendExpr();
+ }
+ break;
+ case 13:
+ enterOuterAlt(_localctx, 13);
+ {
+ setState(431);
orExpr();
}
break;
@@ -2119,66 +2225,66 @@ public final FlowrExprContext flowrExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(414);
+ setState(436);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Kfor:
{
- setState(412);
+ setState(434);
((FlowrExprContext)_localctx).start_for = forClause();
}
break;
case Klet:
{
- setState(413);
+ setState(435);
((FlowrExprContext)_localctx).start_let = letClause();
}
break;
default:
throw new NoViableAltException(this);
}
- setState(424);
+ setState(446);
_errHandler.sync(this);
_la = _input.LA(1);
- while (((((_la - 61)) & ~0x3f) == 0 && ((1L << (_la - 61)) & ((1L << (Kfor - 61)) | (1L << (Klet - 61)) | (1L << (Kwhere - 61)) | (1L << (Kgroup - 61)) | (1L << (Korder - 61)) | (1L << (Kcount - 61)) | (1L << (Kstable - 61)))) != 0)) {
+ while (((((_la - 60)) & ~0x3f) == 0 && ((1L << (_la - 60)) & ((1L << (Kfor - 60)) | (1L << (Klet - 60)) | (1L << (Kwhere - 60)) | (1L << (Kgroup - 60)) | (1L << (Korder - 60)) | (1L << (Kcount - 60)) | (1L << (Kstable - 60)))) != 0)) {
{
- setState(422);
+ setState(444);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Kfor:
{
- setState(416);
+ setState(438);
forClause();
}
break;
case Kwhere:
{
- setState(417);
+ setState(439);
whereClause();
}
break;
case Klet:
{
- setState(418);
+ setState(440);
letClause();
}
break;
case Kgroup:
{
- setState(419);
+ setState(441);
groupByClause();
}
break;
case Korder:
case Kstable:
{
- setState(420);
+ setState(442);
orderByClause();
}
break;
case Kcount:
{
- setState(421);
+ setState(443);
countClause();
}
break;
@@ -2186,13 +2292,13 @@ public final FlowrExprContext flowrExpr() throws RecognitionException {
throw new NoViableAltException(this);
}
}
- setState(426);
+ setState(448);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(427);
+ setState(449);
match(Kreturn);
- setState(428);
+ setState(450);
((FlowrExprContext)_localctx).return_expr = exprSingle();
}
}
@@ -2235,25 +2341,25 @@ public final ForClauseContext forClause() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(430);
+ setState(452);
match(Kfor);
- setState(431);
+ setState(453);
((ForClauseContext)_localctx).forVar = forVar();
((ForClauseContext)_localctx).vars.add(((ForClauseContext)_localctx).forVar);
- setState(436);
+ setState(458);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(432);
+ setState(454);
match(T__19);
- setState(433);
+ setState(455);
((ForClauseContext)_localctx).forVar = forVar();
((ForClauseContext)_localctx).vars.add(((ForClauseContext)_localctx).forVar);
}
}
- setState(438);
+ setState(460);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -2311,47 +2417,47 @@ public final ForVarContext forVar() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(439);
+ setState(461);
((ForVarContext)_localctx).var_ref = varRef();
- setState(442);
+ setState(464);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kas) {
{
- setState(440);
+ setState(462);
match(Kas);
- setState(441);
+ setState(463);
((ForVarContext)_localctx).seq = sequenceType();
}
}
- setState(446);
+ setState(468);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kallowing) {
{
- setState(444);
+ setState(466);
((ForVarContext)_localctx).flag = match(Kallowing);
- setState(445);
+ setState(467);
match(Kempty);
}
}
- setState(450);
+ setState(472);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kat) {
{
- setState(448);
+ setState(470);
match(Kat);
- setState(449);
+ setState(471);
((ForVarContext)_localctx).at = varRef();
}
}
- setState(452);
+ setState(474);
match(Kin);
- setState(453);
+ setState(475);
((ForVarContext)_localctx).ex = exprSingle();
}
}
@@ -2394,25 +2500,25 @@ public final LetClauseContext letClause() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(455);
+ setState(477);
match(Klet);
- setState(456);
+ setState(478);
((LetClauseContext)_localctx).letVar = letVar();
((LetClauseContext)_localctx).vars.add(((LetClauseContext)_localctx).letVar);
- setState(461);
+ setState(483);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(457);
+ setState(479);
match(T__19);
- setState(458);
+ setState(480);
((LetClauseContext)_localctx).letVar = letVar();
((LetClauseContext)_localctx).vars.add(((LetClauseContext)_localctx).letVar);
}
}
- setState(463);
+ setState(485);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -2461,23 +2567,23 @@ public final LetVarContext letVar() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(464);
+ setState(486);
((LetVarContext)_localctx).var_ref = varRef();
- setState(467);
+ setState(489);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kas) {
{
- setState(465);
+ setState(487);
match(Kas);
- setState(466);
+ setState(488);
((LetVarContext)_localctx).seq = sequenceType();
}
}
- setState(469);
+ setState(491);
match(T__20);
- setState(470);
+ setState(492);
((LetVarContext)_localctx).ex = exprSingle();
}
}
@@ -2514,9 +2620,9 @@ public final WhereClauseContext whereClause() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(472);
+ setState(494);
match(Kwhere);
- setState(473);
+ setState(495);
exprSingle();
}
}
@@ -2560,27 +2666,27 @@ public final GroupByClauseContext groupByClause() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(475);
+ setState(497);
match(Kgroup);
- setState(476);
+ setState(498);
match(Kby);
- setState(477);
+ setState(499);
((GroupByClauseContext)_localctx).groupByVar = groupByVar();
((GroupByClauseContext)_localctx).vars.add(((GroupByClauseContext)_localctx).groupByVar);
- setState(482);
+ setState(504);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(478);
+ setState(500);
match(T__19);
- setState(479);
+ setState(501);
((GroupByClauseContext)_localctx).groupByVar = groupByVar();
((GroupByClauseContext)_localctx).vars.add(((GroupByClauseContext)_localctx).groupByVar);
}
}
- setState(484);
+ setState(506);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -2635,40 +2741,40 @@ public final GroupByVarContext groupByVar() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(485);
+ setState(507);
((GroupByVarContext)_localctx).var_ref = varRef();
- setState(492);
+ setState(514);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__20 || _la==Kas) {
{
- setState(488);
+ setState(510);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kas) {
{
- setState(486);
+ setState(508);
match(Kas);
- setState(487);
+ setState(509);
((GroupByVarContext)_localctx).seq = sequenceType();
}
}
- setState(490);
+ setState(512);
((GroupByVarContext)_localctx).decl = match(T__20);
- setState(491);
+ setState(513);
((GroupByVarContext)_localctx).ex = exprSingle();
}
}
- setState(496);
+ setState(518);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kcollation) {
{
- setState(494);
+ setState(516);
match(Kcollation);
- setState(495);
+ setState(517);
((GroupByVarContext)_localctx).uri = uriLiteral();
}
}
@@ -2715,15 +2821,15 @@ public final OrderByClauseContext orderByClause() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(503);
+ setState(525);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Korder:
{
{
- setState(498);
+ setState(520);
match(Korder);
- setState(499);
+ setState(521);
match(Kby);
}
}
@@ -2731,11 +2837,11 @@ public final OrderByClauseContext orderByClause() throws RecognitionException {
case Kstable:
{
{
- setState(500);
+ setState(522);
((OrderByClauseContext)_localctx).stb = match(Kstable);
- setState(501);
+ setState(523);
match(Korder);
- setState(502);
+ setState(524);
match(Kby);
}
}
@@ -2743,21 +2849,21 @@ public final OrderByClauseContext orderByClause() throws RecognitionException {
default:
throw new NoViableAltException(this);
}
- setState(505);
+ setState(527);
orderByExpr();
- setState(510);
+ setState(532);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(506);
+ setState(528);
match(T__19);
- setState(507);
+ setState(529);
orderByExpr();
}
}
- setState(512);
+ setState(534);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -2810,20 +2916,20 @@ public final OrderByExprContext orderByExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(513);
+ setState(535);
((OrderByExprContext)_localctx).ex = exprSingle();
- setState(516);
+ setState(538);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Kascending:
{
- setState(514);
+ setState(536);
match(Kascending);
}
break;
case Kdescending:
{
- setState(515);
+ setState(537);
((OrderByExprContext)_localctx).desc = match(Kdescending);
}
break;
@@ -2842,25 +2948,25 @@ public final OrderByExprContext orderByExpr() throws RecognitionException {
default:
break;
}
- setState(523);
+ setState(545);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kempty) {
{
- setState(518);
+ setState(540);
match(Kempty);
- setState(521);
+ setState(543);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Kgreatest:
{
- setState(519);
+ setState(541);
((OrderByExprContext)_localctx).gr = match(Kgreatest);
}
break;
case Kleast:
{
- setState(520);
+ setState(542);
((OrderByExprContext)_localctx).ls = match(Kleast);
}
break;
@@ -2870,14 +2976,14 @@ public final OrderByExprContext orderByExpr() throws RecognitionException {
}
}
- setState(527);
+ setState(549);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kcollation) {
{
- setState(525);
+ setState(547);
match(Kcollation);
- setState(526);
+ setState(548);
((OrderByExprContext)_localctx).uril = uriLiteral();
}
}
@@ -2917,9 +3023,9 @@ public final CountClauseContext countClause() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(529);
+ setState(551);
match(Kcount);
- setState(530);
+ setState(552);
varRef();
}
}
@@ -2969,47 +3075,47 @@ public final QuantifiedExprContext quantifiedExpr() throws RecognitionException
try {
enterOuterAlt(_localctx, 1);
{
- setState(534);
+ setState(556);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Ksome:
{
- setState(532);
+ setState(554);
((QuantifiedExprContext)_localctx).so = match(Ksome);
}
break;
case Kevery:
{
- setState(533);
+ setState(555);
((QuantifiedExprContext)_localctx).ev = match(Kevery);
}
break;
default:
throw new NoViableAltException(this);
}
- setState(536);
+ setState(558);
((QuantifiedExprContext)_localctx).quantifiedExprVar = quantifiedExprVar();
((QuantifiedExprContext)_localctx).vars.add(((QuantifiedExprContext)_localctx).quantifiedExprVar);
- setState(541);
+ setState(563);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(537);
+ setState(559);
match(T__19);
- setState(538);
+ setState(560);
((QuantifiedExprContext)_localctx).quantifiedExprVar = quantifiedExprVar();
((QuantifiedExprContext)_localctx).vars.add(((QuantifiedExprContext)_localctx).quantifiedExprVar);
}
}
- setState(543);
+ setState(565);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(544);
+ setState(566);
match(Ksatisfies);
- setState(545);
+ setState(567);
exprSingle();
}
}
@@ -3054,23 +3160,23 @@ public final QuantifiedExprVarContext quantifiedExprVar() throws RecognitionExce
try {
enterOuterAlt(_localctx, 1);
{
- setState(547);
+ setState(569);
varRef();
- setState(550);
+ setState(572);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kas) {
{
- setState(548);
+ setState(570);
match(Kas);
- setState(549);
+ setState(571);
sequenceType();
}
}
- setState(552);
+ setState(574);
match(Kin);
- setState(553);
+ setState(575);
exprSingle();
}
}
@@ -3123,34 +3229,34 @@ public final SwitchExprContext switchExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(555);
+ setState(577);
match(Kswitch);
- setState(556);
+ setState(578);
match(T__23);
- setState(557);
+ setState(579);
((SwitchExprContext)_localctx).cond = expr();
- setState(558);
+ setState(580);
match(T__24);
- setState(560);
+ setState(582);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
- setState(559);
+ setState(581);
((SwitchExprContext)_localctx).switchCaseClause = switchCaseClause();
((SwitchExprContext)_localctx).cases.add(((SwitchExprContext)_localctx).switchCaseClause);
}
}
- setState(562);
+ setState(584);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==Kcase );
- setState(564);
+ setState(586);
match(Kdefault);
- setState(565);
+ setState(587);
match(Kreturn);
- setState(566);
+ setState(588);
((SwitchExprContext)_localctx).def = exprSingle();
}
}
@@ -3198,26 +3304,26 @@ public final SwitchCaseClauseContext switchCaseClause() throws RecognitionExcept
try {
enterOuterAlt(_localctx, 1);
{
- setState(570);
+ setState(592);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
- setState(568);
+ setState(590);
match(Kcase);
- setState(569);
+ setState(591);
((SwitchCaseClauseContext)_localctx).exprSingle = exprSingle();
((SwitchCaseClauseContext)_localctx).cond.add(((SwitchCaseClauseContext)_localctx).exprSingle);
}
}
- setState(572);
+ setState(594);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==Kcase );
- setState(574);
+ setState(596);
match(Kreturn);
- setState(575);
+ setState(597);
((SwitchCaseClauseContext)_localctx).ret = exprSingle();
}
}
@@ -3274,44 +3380,44 @@ public final TypeSwitchExprContext typeSwitchExpr() throws RecognitionException
try {
enterOuterAlt(_localctx, 1);
{
- setState(577);
+ setState(599);
match(Ktypeswitch);
- setState(578);
+ setState(600);
match(T__23);
- setState(579);
+ setState(601);
((TypeSwitchExprContext)_localctx).cond = expr();
- setState(580);
+ setState(602);
match(T__24);
- setState(582);
+ setState(604);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
- setState(581);
+ setState(603);
((TypeSwitchExprContext)_localctx).caseClause = caseClause();
((TypeSwitchExprContext)_localctx).cses.add(((TypeSwitchExprContext)_localctx).caseClause);
}
}
- setState(584);
+ setState(606);
_errHandler.sync(this);
_la = _input.LA(1);
} while ( _la==Kcase );
- setState(586);
+ setState(608);
match(Kdefault);
- setState(588);
+ setState(610);
_errHandler.sync(this);
_la = _input.LA(1);
- if (_la==T__32) {
+ if (_la==T__31) {
{
- setState(587);
+ setState(609);
((TypeSwitchExprContext)_localctx).var_ref = varRef();
}
}
- setState(590);
+ setState(612);
match(Kreturn);
- setState(591);
+ setState(613);
((TypeSwitchExprContext)_localctx).def = exprSingle();
}
}
@@ -3364,43 +3470,43 @@ public final CaseClauseContext caseClause() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(593);
+ setState(615);
match(Kcase);
- setState(597);
+ setState(619);
_errHandler.sync(this);
_la = _input.LA(1);
- if (_la==T__32) {
+ if (_la==T__31) {
{
- setState(594);
+ setState(616);
((CaseClauseContext)_localctx).var_ref = varRef();
- setState(595);
+ setState(617);
match(Kas);
}
}
- setState(599);
+ setState(621);
((CaseClauseContext)_localctx).sequenceType = sequenceType();
((CaseClauseContext)_localctx).union.add(((CaseClauseContext)_localctx).sequenceType);
- setState(604);
+ setState(626);
_errHandler.sync(this);
_la = _input.LA(1);
- while (_la==T__33) {
+ while (_la==T__32) {
{
{
- setState(600);
- match(T__33);
- setState(601);
+ setState(622);
+ match(T__32);
+ setState(623);
((CaseClauseContext)_localctx).sequenceType = sequenceType();
((CaseClauseContext)_localctx).union.add(((CaseClauseContext)_localctx).sequenceType);
}
}
- setState(606);
+ setState(628);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(607);
+ setState(629);
match(Kreturn);
- setState(608);
+ setState(630);
((CaseClauseContext)_localctx).ret = exprSingle();
}
}
@@ -3448,21 +3554,21 @@ public final IfExprContext ifExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(610);
+ setState(632);
match(Kif);
- setState(611);
+ setState(633);
match(T__23);
- setState(612);
+ setState(634);
((IfExprContext)_localctx).test_condition = expr();
- setState(613);
+ setState(635);
match(T__24);
- setState(614);
+ setState(636);
match(Kthen);
- setState(615);
+ setState(637);
((IfExprContext)_localctx).branch = exprSingle();
- setState(616);
+ setState(638);
match(Kelse);
- setState(617);
+ setState(639);
((IfExprContext)_localctx).else_branch = exprSingle();
}
}
@@ -3509,15 +3615,15 @@ public final TryCatchExprContext tryCatchExpr() throws RecognitionException {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(619);
+ setState(641);
match(Ktry);
- setState(620);
+ setState(642);
match(T__25);
- setState(621);
+ setState(643);
((TryCatchExprContext)_localctx).try_expression = expr();
- setState(622);
+ setState(644);
match(T__26);
- setState(624);
+ setState(646);
_errHandler.sync(this);
_alt = 1;
do {
@@ -3525,7 +3631,7 @@ public final TryCatchExprContext tryCatchExpr() throws RecognitionException {
case 1:
{
{
- setState(623);
+ setState(645);
((TryCatchExprContext)_localctx).catchClause = catchClause();
((TryCatchExprContext)_localctx).catches.add(((TryCatchExprContext)_localctx).catchClause);
}
@@ -3534,7 +3640,7 @@ public final TryCatchExprContext tryCatchExpr() throws RecognitionException {
default:
throw new NoViableAltException(this);
}
- setState(626);
+ setState(648);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,59,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
@@ -3552,7 +3658,7 @@ public final TryCatchExprContext tryCatchExpr() throws RecognitionException {
}
public static class CatchClauseContext extends ParserRuleContext {
- public Token s35;
+ public Token s34;
public List jokers = new ArrayList();
public QnameContext qname;
public List errors = new ArrayList();
@@ -3585,16 +3691,16 @@ public final CatchClauseContext catchClause() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(628);
+ setState(650);
match(Kcatch);
- setState(631);
+ setState(653);
_errHandler.sync(this);
switch (_input.LA(1)) {
- case T__34:
+ case T__33:
{
- setState(629);
- ((CatchClauseContext)_localctx).s35 = match(T__34);
- ((CatchClauseContext)_localctx).jokers.add(((CatchClauseContext)_localctx).s35);
+ setState(651);
+ ((CatchClauseContext)_localctx).s34 = match(T__33);
+ ((CatchClauseContext)_localctx).jokers.add(((CatchClauseContext)_localctx).s34);
}
break;
case Kfor:
@@ -3651,10 +3757,22 @@ public final CatchClauseContext catchClause() throws RecognitionException {
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case NullLiteral:
case NCName:
{
- setState(630);
+ setState(652);
((CatchClauseContext)_localctx).qname = qname();
((CatchClauseContext)_localctx).errors.add(((CatchClauseContext)_localctx).qname);
}
@@ -3662,22 +3780,22 @@ public final CatchClauseContext catchClause() throws RecognitionException {
default:
throw new NoViableAltException(this);
}
- setState(640);
+ setState(662);
_errHandler.sync(this);
_la = _input.LA(1);
- while (_la==T__33) {
+ while (_la==T__32) {
{
{
- setState(633);
- match(T__33);
- setState(636);
+ setState(655);
+ match(T__32);
+ setState(658);
_errHandler.sync(this);
switch (_input.LA(1)) {
- case T__34:
+ case T__33:
{
- setState(634);
- ((CatchClauseContext)_localctx).s35 = match(T__34);
- ((CatchClauseContext)_localctx).jokers.add(((CatchClauseContext)_localctx).s35);
+ setState(656);
+ ((CatchClauseContext)_localctx).s34 = match(T__33);
+ ((CatchClauseContext)_localctx).jokers.add(((CatchClauseContext)_localctx).s34);
}
break;
case Kfor:
@@ -3734,10 +3852,22 @@ public final CatchClauseContext catchClause() throws RecognitionException {
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case NullLiteral:
case NCName:
{
- setState(635);
+ setState(657);
((CatchClauseContext)_localctx).qname = qname();
((CatchClauseContext)_localctx).errors.add(((CatchClauseContext)_localctx).qname);
}
@@ -3747,15 +3877,15 @@ public final CatchClauseContext catchClause() throws RecognitionException {
}
}
}
- setState(642);
+ setState(664);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(643);
+ setState(665);
match(T__25);
- setState(644);
+ setState(666);
((CatchClauseContext)_localctx).catch_expression = expr();
- setState(645);
+ setState(667);
match(T__26);
}
}
@@ -3802,24 +3932,24 @@ public final OrExprContext orExpr() throws RecognitionException {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(647);
+ setState(669);
((OrExprContext)_localctx).main_expr = andExpr();
- setState(652);
+ setState(674);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,63,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- setState(648);
+ setState(670);
match(Kor);
- setState(649);
+ setState(671);
((OrExprContext)_localctx).andExpr = andExpr();
((OrExprContext)_localctx).rhs.add(((OrExprContext)_localctx).andExpr);
}
}
}
- setState(654);
+ setState(676);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,63,_ctx);
}
@@ -3868,24 +3998,24 @@ public final AndExprContext andExpr() throws RecognitionException {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(655);
+ setState(677);
((AndExprContext)_localctx).main_expr = notExpr();
- setState(660);
+ setState(682);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,64,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- setState(656);
+ setState(678);
match(Kand);
- setState(657);
+ setState(679);
((AndExprContext)_localctx).notExpr = notExpr();
((AndExprContext)_localctx).rhs.add(((AndExprContext)_localctx).notExpr);
}
}
}
- setState(662);
+ setState(684);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,64,_ctx);
}
@@ -3927,18 +4057,18 @@ public final NotExprContext notExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(664);
+ setState(686);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,65,_ctx) ) {
case 1:
{
- setState(663);
+ setState(685);
((NotExprContext)_localctx).Knot = match(Knot);
((NotExprContext)_localctx).op.add(((NotExprContext)_localctx).Knot);
}
break;
}
- setState(666);
+ setState(688);
((NotExprContext)_localctx).main_expr = comparisonExpr();
}
}
@@ -3955,20 +4085,20 @@ public final NotExprContext notExpr() throws RecognitionException {
public static class ComparisonExprContext extends ParserRuleContext {
public StringConcatExprContext main_expr;
- public Token s36;
+ public Token s35;
public List op = new ArrayList();
+ public Token s36;
public Token s37;
public Token s38;
public Token s39;
public Token s40;
- public Token s41;
public Token s4;
+ public Token s41;
public Token s42;
public Token s43;
public Token s44;
public Token s45;
- public Token s46;
- public Token _tset1256;
+ public Token _tset1280;
public StringConcatExprContext stringConcatExpr;
public List rhs = new ArrayList();
public List stringConcatExpr() {
@@ -3995,26 +4125,26 @@ public final ComparisonExprContext comparisonExpr() throws RecognitionException
try {
enterOuterAlt(_localctx, 1);
{
- setState(668);
+ setState(690);
((ComparisonExprContext)_localctx).main_expr = stringConcatExpr();
- setState(671);
+ setState(693);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__41) | (1L << T__42) | (1L << T__43) | (1L << T__44) | (1L << T__45))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__41) | (1L << T__42) | (1L << T__43) | (1L << T__44))) != 0)) {
{
- setState(669);
- ((ComparisonExprContext)_localctx)._tset1256 = _input.LT(1);
+ setState(691);
+ ((ComparisonExprContext)_localctx)._tset1280 = _input.LT(1);
_la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__41) | (1L << T__42) | (1L << T__43) | (1L << T__44) | (1L << T__45))) != 0)) ) {
- ((ComparisonExprContext)_localctx)._tset1256 = (Token)_errHandler.recoverInline(this);
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__41) | (1L << T__42) | (1L << T__43) | (1L << T__44))) != 0)) ) {
+ ((ComparisonExprContext)_localctx)._tset1280 = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
- ((ComparisonExprContext)_localctx).op.add(((ComparisonExprContext)_localctx)._tset1256);
- setState(670);
+ ((ComparisonExprContext)_localctx).op.add(((ComparisonExprContext)_localctx)._tset1280);
+ setState(692);
((ComparisonExprContext)_localctx).stringConcatExpr = stringConcatExpr();
((ComparisonExprContext)_localctx).rhs.add(((ComparisonExprContext)_localctx).stringConcatExpr);
}
@@ -4061,22 +4191,22 @@ public final StringConcatExprContext stringConcatExpr() throws RecognitionExcept
try {
enterOuterAlt(_localctx, 1);
{
- setState(673);
+ setState(695);
((StringConcatExprContext)_localctx).main_expr = rangeExpr();
- setState(678);
+ setState(700);
_errHandler.sync(this);
_la = _input.LA(1);
- while (_la==T__46) {
+ while (_la==T__45) {
{
{
- setState(674);
- match(T__46);
- setState(675);
+ setState(696);
+ match(T__45);
+ setState(697);
((StringConcatExprContext)_localctx).rangeExpr = rangeExpr();
((StringConcatExprContext)_localctx).rhs.add(((StringConcatExprContext)_localctx).rangeExpr);
}
}
- setState(680);
+ setState(702);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -4121,16 +4251,16 @@ public final RangeExprContext rangeExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(681);
+ setState(703);
((RangeExprContext)_localctx).main_expr = additiveExpr();
- setState(684);
+ setState(706);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,68,_ctx) ) {
case 1:
{
- setState(682);
+ setState(704);
match(Kto);
- setState(683);
+ setState(705);
((RangeExprContext)_localctx).additiveExpr = additiveExpr();
((RangeExprContext)_localctx).rhs.add(((RangeExprContext)_localctx).additiveExpr);
}
@@ -4151,10 +4281,10 @@ public final RangeExprContext rangeExpr() throws RecognitionException {
public static class AdditiveExprContext extends ParserRuleContext {
public MultiplicativeExprContext main_expr;
- public Token s48;
+ public Token s47;
public List op = new ArrayList();
- public Token s49;
- public Token _tset1365;
+ public Token s48;
+ public Token _tset1389;
public MultiplicativeExprContext multiplicativeExpr;
public List rhs = new ArrayList();
public List multiplicativeExpr() {
@@ -4182,34 +4312,34 @@ public final AdditiveExprContext additiveExpr() throws RecognitionException {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(686);
+ setState(708);
((AdditiveExprContext)_localctx).main_expr = multiplicativeExpr();
- setState(691);
+ setState(713);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,69,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
{
- setState(687);
- ((AdditiveExprContext)_localctx)._tset1365 = _input.LT(1);
+ setState(709);
+ ((AdditiveExprContext)_localctx)._tset1389 = _input.LT(1);
_la = _input.LA(1);
- if ( !(_la==T__47 || _la==T__48) ) {
- ((AdditiveExprContext)_localctx)._tset1365 = (Token)_errHandler.recoverInline(this);
+ if ( !(_la==T__46 || _la==T__47) ) {
+ ((AdditiveExprContext)_localctx)._tset1389 = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
- ((AdditiveExprContext)_localctx).op.add(((AdditiveExprContext)_localctx)._tset1365);
- setState(688);
+ ((AdditiveExprContext)_localctx).op.add(((AdditiveExprContext)_localctx)._tset1389);
+ setState(710);
((AdditiveExprContext)_localctx).multiplicativeExpr = multiplicativeExpr();
((AdditiveExprContext)_localctx).rhs.add(((AdditiveExprContext)_localctx).multiplicativeExpr);
}
}
}
- setState(693);
+ setState(715);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,69,_ctx);
}
@@ -4228,12 +4358,12 @@ public final AdditiveExprContext additiveExpr() throws RecognitionException {
public static class MultiplicativeExprContext extends ParserRuleContext {
public InstanceOfExprContext main_expr;
- public Token s35;
+ public Token s34;
public List op = new ArrayList();
+ public Token s49;
public Token s50;
public Token s51;
- public Token s52;
- public Token _tset1393;
+ public Token _tset1417;
public InstanceOfExprContext instanceOfExpr;
public List rhs = new ArrayList();
public List instanceOfExpr() {
@@ -4260,32 +4390,32 @@ public final MultiplicativeExprContext multiplicativeExpr() throws RecognitionEx
try {
enterOuterAlt(_localctx, 1);
{
- setState(694);
+ setState(716);
((MultiplicativeExprContext)_localctx).main_expr = instanceOfExpr();
- setState(699);
+ setState(721);
_errHandler.sync(this);
_la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__34) | (1L << T__49) | (1L << T__50) | (1L << T__51))) != 0)) {
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__33) | (1L << T__48) | (1L << T__49) | (1L << T__50))) != 0)) {
{
{
- setState(695);
- ((MultiplicativeExprContext)_localctx)._tset1393 = _input.LT(1);
+ setState(717);
+ ((MultiplicativeExprContext)_localctx)._tset1417 = _input.LT(1);
_la = _input.LA(1);
- if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__34) | (1L << T__49) | (1L << T__50) | (1L << T__51))) != 0)) ) {
- ((MultiplicativeExprContext)_localctx)._tset1393 = (Token)_errHandler.recoverInline(this);
+ if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__33) | (1L << T__48) | (1L << T__49) | (1L << T__50))) != 0)) ) {
+ ((MultiplicativeExprContext)_localctx)._tset1417 = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
- ((MultiplicativeExprContext)_localctx).op.add(((MultiplicativeExprContext)_localctx)._tset1393);
- setState(696);
+ ((MultiplicativeExprContext)_localctx).op.add(((MultiplicativeExprContext)_localctx)._tset1417);
+ setState(718);
((MultiplicativeExprContext)_localctx).instanceOfExpr = instanceOfExpr();
((MultiplicativeExprContext)_localctx).rhs.add(((MultiplicativeExprContext)_localctx).instanceOfExpr);
}
}
- setState(701);
+ setState(723);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -4330,18 +4460,18 @@ public final InstanceOfExprContext instanceOfExpr() throws RecognitionException
try {
enterOuterAlt(_localctx, 1);
{
- setState(702);
+ setState(724);
((InstanceOfExprContext)_localctx).main_expr = isStaticallyExpr();
- setState(706);
+ setState(728);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,71,_ctx) ) {
case 1:
{
- setState(703);
+ setState(725);
match(Kinstance);
- setState(704);
+ setState(726);
match(Kof);
- setState(705);
+ setState(727);
((InstanceOfExprContext)_localctx).seq = sequenceType();
}
break;
@@ -4387,18 +4517,18 @@ public final IsStaticallyExprContext isStaticallyExpr() throws RecognitionExcept
try {
enterOuterAlt(_localctx, 1);
{
- setState(708);
+ setState(730);
((IsStaticallyExprContext)_localctx).main_expr = treatExpr();
- setState(712);
+ setState(734);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,72,_ctx) ) {
case 1:
{
- setState(709);
+ setState(731);
match(Kis);
- setState(710);
+ setState(732);
match(Kstatically);
- setState(711);
+ setState(733);
((IsStaticallyExprContext)_localctx).seq = sequenceType();
}
break;
@@ -4444,18 +4574,18 @@ public final TreatExprContext treatExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(714);
+ setState(736);
((TreatExprContext)_localctx).main_expr = castableExpr();
- setState(718);
+ setState(740);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) {
case 1:
{
- setState(715);
+ setState(737);
match(Ktreat);
- setState(716);
+ setState(738);
match(Kas);
- setState(717);
+ setState(739);
((TreatExprContext)_localctx).seq = sequenceType();
}
break;
@@ -4501,18 +4631,18 @@ public final CastableExprContext castableExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(720);
+ setState(742);
((CastableExprContext)_localctx).main_expr = castExpr();
- setState(724);
+ setState(746);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,74,_ctx) ) {
case 1:
{
- setState(721);
+ setState(743);
match(Kcastable);
- setState(722);
+ setState(744);
match(Kas);
- setState(723);
+ setState(745);
((CastableExprContext)_localctx).single = singleType();
}
break;
@@ -4558,18 +4688,18 @@ public final CastExprContext castExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(726);
+ setState(748);
((CastExprContext)_localctx).main_expr = arrowExpr();
- setState(730);
+ setState(752);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,75,_ctx) ) {
case 1:
{
- setState(727);
+ setState(749);
match(Kcast);
- setState(728);
+ setState(750);
match(Kas);
- setState(729);
+ setState(751);
((CastExprContext)_localctx).single = singleType();
}
break;
@@ -4626,9 +4756,9 @@ public final ArrowExprContext arrowExpr() throws RecognitionException {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(732);
+ setState(754);
((ArrowExprContext)_localctx).main_expr = unaryExpr();
- setState(741);
+ setState(763);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,76,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
@@ -4636,21 +4766,21 @@ public final ArrowExprContext arrowExpr() throws RecognitionException {
{
{
{
- setState(733);
+ setState(755);
match(T__3);
- setState(734);
- match(T__44);
+ setState(756);
+ match(T__43);
}
- setState(736);
+ setState(758);
((ArrowExprContext)_localctx).arrowFunctionSpecifier = arrowFunctionSpecifier();
((ArrowExprContext)_localctx).function.add(((ArrowExprContext)_localctx).arrowFunctionSpecifier);
- setState(737);
+ setState(759);
((ArrowExprContext)_localctx).argumentList = argumentList();
((ArrowExprContext)_localctx).arguments.add(((ArrowExprContext)_localctx).argumentList);
}
}
}
- setState(743);
+ setState(765);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,76,_ctx);
}
@@ -4692,7 +4822,7 @@ public final ArrowFunctionSpecifierContext arrowFunctionSpecifier() throws Recog
ArrowFunctionSpecifierContext _localctx = new ArrowFunctionSpecifierContext(_ctx, getState());
enterRule(_localctx, 116, RULE_arrowFunctionSpecifier);
try {
- setState(747);
+ setState(769);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Kfor:
@@ -4749,25 +4879,37 @@ public final ArrowFunctionSpecifierContext arrowFunctionSpecifier() throws Recog
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case NullLiteral:
case NCName:
enterOuterAlt(_localctx, 1);
{
- setState(744);
+ setState(766);
qname();
}
break;
- case T__32:
+ case T__31:
enterOuterAlt(_localctx, 2);
{
- setState(745);
+ setState(767);
varRef();
}
break;
case T__23:
enterOuterAlt(_localctx, 3);
{
- setState(746);
+ setState(768);
parenthesizedExpr();
}
break;
@@ -4787,10 +4929,10 @@ public final ArrowFunctionSpecifierContext arrowFunctionSpecifier() throws Recog
}
public static class UnaryExprContext extends ParserRuleContext {
- public Token s49;
- public List op = new ArrayList();
public Token s48;
- public Token _tset1572;
+ public List op = new ArrayList();
+ public Token s47;
+ public Token _tset1596;
public ValueExprContext main_expr;
public ValueExprContext valueExpr() {
return getRuleContext(ValueExprContext.class,0);
@@ -4813,31 +4955,31 @@ public final UnaryExprContext unaryExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(752);
+ setState(774);
_errHandler.sync(this);
_la = _input.LA(1);
- while (_la==T__47 || _la==T__48) {
+ while (_la==T__46 || _la==T__47) {
{
{
- setState(749);
- ((UnaryExprContext)_localctx)._tset1572 = _input.LT(1);
+ setState(771);
+ ((UnaryExprContext)_localctx)._tset1596 = _input.LT(1);
_la = _input.LA(1);
- if ( !(_la==T__47 || _la==T__48) ) {
- ((UnaryExprContext)_localctx)._tset1572 = (Token)_errHandler.recoverInline(this);
+ if ( !(_la==T__46 || _la==T__47) ) {
+ ((UnaryExprContext)_localctx)._tset1596 = (Token)_errHandler.recoverInline(this);
}
else {
if ( _input.LA(1)==Token.EOF ) matchedEOF = true;
_errHandler.reportMatch(this);
consume();
}
- ((UnaryExprContext)_localctx).op.add(((UnaryExprContext)_localctx)._tset1572);
+ ((UnaryExprContext)_localctx).op.add(((UnaryExprContext)_localctx)._tset1596);
}
}
- setState(754);
+ setState(776);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(755);
+ setState(777);
((UnaryExprContext)_localctx).main_expr = valueExpr();
}
}
@@ -4880,27 +5022,27 @@ public final ValueExprContext valueExpr() throws RecognitionException {
ValueExprContext _localctx = new ValueExprContext(_ctx, getState());
enterRule(_localctx, 120, RULE_valueExpr);
try {
- setState(760);
+ setState(782);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,79,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(757);
+ setState(779);
((ValueExprContext)_localctx).simpleMap_expr = simpleMapExpr();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(758);
+ setState(780);
((ValueExprContext)_localctx).validate_expr = validateExpr();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(759);
+ setState(781);
((ValueExprContext)_localctx).annotate_expr = annotateExpr();
}
break;
@@ -4943,17 +5085,17 @@ public final ValidateExprContext validateExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(762);
+ setState(784);
match(Kvalidate);
- setState(763);
+ setState(785);
match(Ktype);
- setState(764);
+ setState(786);
sequenceType();
- setState(765);
+ setState(787);
match(T__25);
- setState(766);
+ setState(788);
expr();
- setState(767);
+ setState(789);
match(T__26);
}
}
@@ -4994,17 +5136,17 @@ public final AnnotateExprContext annotateExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(769);
+ setState(791);
match(Kannotate);
- setState(770);
+ setState(792);
match(Ktype);
- setState(771);
+ setState(793);
sequenceType();
- setState(772);
+ setState(794);
match(T__25);
- setState(773);
+ setState(795);
expr();
- setState(774);
+ setState(796);
match(T__26);
}
}
@@ -5047,22 +5189,22 @@ public final SimpleMapExprContext simpleMapExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(776);
+ setState(798);
((SimpleMapExprContext)_localctx).main_expr = postFixExpr();
- setState(781);
+ setState(803);
_errHandler.sync(this);
_la = _input.LA(1);
- while (_la==T__52) {
+ while (_la==T__51) {
{
{
- setState(777);
- match(T__52);
- setState(778);
+ setState(799);
+ match(T__51);
+ setState(800);
((SimpleMapExprContext)_localctx).postFixExpr = postFixExpr();
((SimpleMapExprContext)_localctx).map_expr.add(((SimpleMapExprContext)_localctx).postFixExpr);
}
}
- setState(783);
+ setState(805);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -5132,51 +5274,51 @@ public final PostFixExprContext postFixExpr() throws RecognitionException {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(784);
+ setState(806);
((PostFixExprContext)_localctx).main_expr = primaryExpr();
- setState(792);
+ setState(814);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,82,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
{
- setState(790);
+ setState(812);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) {
case 1:
{
- setState(785);
+ setState(807);
arrayLookup();
}
break;
case 2:
{
- setState(786);
+ setState(808);
predicate();
}
break;
case 3:
{
- setState(787);
+ setState(809);
objectLookup();
}
break;
case 4:
{
- setState(788);
+ setState(810);
arrayUnboxing();
}
break;
case 5:
{
- setState(789);
+ setState(811);
argumentList();
}
break;
}
}
}
- setState(794);
+ setState(816);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,82,_ctx);
}
@@ -5214,16 +5356,16 @@ public final ArrayLookupContext arrayLookup() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(795);
+ setState(817);
+ match(T__52);
+ setState(818);
+ match(T__52);
+ setState(819);
+ expr();
+ setState(820);
match(T__53);
- setState(796);
+ setState(821);
match(T__53);
- setState(797);
- expr();
- setState(798);
- match(T__54);
- setState(799);
- match(T__54);
}
}
catch (RecognitionException re) {
@@ -5255,10 +5397,10 @@ public final ArrayUnboxingContext arrayUnboxing() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(801);
+ setState(823);
+ match(T__52);
+ setState(824);
match(T__53);
- setState(802);
- match(T__54);
}
}
catch (RecognitionException re) {
@@ -5293,12 +5435,12 @@ public final PredicateContext predicate() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(804);
- match(T__53);
- setState(805);
+ setState(826);
+ match(T__52);
+ setState(827);
expr();
- setState(806);
- match(T__54);
+ setState(828);
+ match(T__53);
}
}
catch (RecognitionException re) {
@@ -5352,9 +5494,9 @@ public final ObjectLookupContext objectLookup() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(808);
- match(T__55);
- setState(815);
+ setState(830);
+ match(T__54);
+ setState(837);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Kfor:
@@ -5411,39 +5553,51 @@ public final ObjectLookupContext objectLookup() throws RecognitionException {
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case NullLiteral:
{
- setState(809);
+ setState(831);
((ObjectLookupContext)_localctx).kw = keyWords();
}
break;
case STRING:
{
- setState(810);
+ setState(832);
((ObjectLookupContext)_localctx).lt = stringLiteral();
}
break;
case NCName:
{
- setState(811);
+ setState(833);
((ObjectLookupContext)_localctx).nc = match(NCName);
}
break;
case T__23:
{
- setState(812);
+ setState(834);
((ObjectLookupContext)_localctx).pe = parenthesizedExpr();
}
break;
- case T__32:
+ case T__31:
{
- setState(813);
+ setState(835);
((ObjectLookupContext)_localctx).vr = varRef();
}
break;
- case T__56:
+ case T__55:
{
- setState(814);
+ setState(836);
((ObjectLookupContext)_localctx).ci = contextItemExpr();
}
break;
@@ -5513,104 +5667,104 @@ public final PrimaryExprContext primaryExpr() throws RecognitionException {
PrimaryExprContext _localctx = new PrimaryExprContext(_ctx, getState());
enterRule(_localctx, 138, RULE_primaryExpr);
try {
- setState(831);
+ setState(853);
_errHandler.sync(this);
switch ( getInterpreter().adaptivePredict(_input,84,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(817);
+ setState(839);
match(NullLiteral);
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(818);
+ setState(840);
match(Ktrue);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(819);
+ setState(841);
match(Kfalse);
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
- setState(820);
+ setState(842);
match(Literal);
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
- setState(821);
+ setState(843);
stringLiteral();
}
break;
case 6:
enterOuterAlt(_localctx, 6);
{
- setState(822);
+ setState(844);
varRef();
}
break;
case 7:
enterOuterAlt(_localctx, 7);
{
- setState(823);
+ setState(845);
parenthesizedExpr();
}
break;
case 8:
enterOuterAlt(_localctx, 8);
{
- setState(824);
+ setState(846);
contextItemExpr();
}
break;
case 9:
enterOuterAlt(_localctx, 9);
{
- setState(825);
+ setState(847);
objectConstructor();
}
break;
case 10:
enterOuterAlt(_localctx, 10);
{
- setState(826);
+ setState(848);
functionCall();
}
break;
case 11:
enterOuterAlt(_localctx, 11);
{
- setState(827);
+ setState(849);
orderedExpr();
}
break;
case 12:
enterOuterAlt(_localctx, 12);
{
- setState(828);
+ setState(850);
unorderedExpr();
}
break;
case 13:
enterOuterAlt(_localctx, 13);
{
- setState(829);
+ setState(851);
arrayConstructor();
}
break;
case 14:
enterOuterAlt(_localctx, 14);
{
- setState(830);
+ setState(852);
functionItemExpr();
}
break;
@@ -5649,9 +5803,9 @@ public final VarRefContext varRef() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(833);
- match(T__32);
- setState(834);
+ setState(855);
+ match(T__31);
+ setState(856);
((VarRefContext)_localctx).var_name = qname();
}
}
@@ -5688,19 +5842,19 @@ public final ParenthesizedExprContext parenthesizedExpr() throws RecognitionExce
try {
enterOuterAlt(_localctx, 1);
{
- setState(836);
+ setState(858);
match(T__23);
- setState(838);
+ setState(860);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__32) | (1L << T__47) | (1L << T__48) | (1L << T__53) | (1L << T__56) | (1L << T__58) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kgroup - 64)) | (1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (STRING - 64)) | (1L << (NullLiteral - 64)) | (1L << (Literal - 64)) | (1L << (NCName - 64)))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__31) | (1L << T__46) | (1L << T__47) | (1L << T__52) | (1L << T__55) | (1L << T__57) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere) | (1L << Kgroup))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (Kinsert - 64)) | (1L << (Kdelete - 64)) | (1L << (Krename - 64)) | (1L << (Kreplace - 64)) | (1L << (Kcopy - 64)) | (1L << (Kmodify - 64)) | (1L << (Kappend - 64)) | (1L << (Kinto - 64)) | (1L << (Kvalue - 64)) | (1L << (Kjson - 64)) | (1L << (Kwith - 64)) | (1L << (Kposition - 64)) | (1L << (STRING - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (NullLiteral - 128)) | (1L << (Literal - 128)) | (1L << (NCName - 128)))) != 0)) {
{
- setState(837);
+ setState(859);
expr();
}
}
- setState(840);
+ setState(862);
match(T__24);
}
}
@@ -5733,8 +5887,8 @@ public final ContextItemExprContext contextItemExpr() throws RecognitionExceptio
try {
enterOuterAlt(_localctx, 1);
{
- setState(842);
- match(T__56);
+ setState(864);
+ match(T__55);
}
}
catch (RecognitionException re) {
@@ -5769,13 +5923,13 @@ public final OrderedExprContext orderedExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(844);
+ setState(866);
match(T__5);
- setState(845);
+ setState(867);
match(T__25);
- setState(846);
+ setState(868);
expr();
- setState(847);
+ setState(869);
match(T__26);
}
}
@@ -5812,13 +5966,13 @@ public final UnorderedExprContext unorderedExpr() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(849);
+ setState(871);
match(Kunordered);
- setState(850);
+ setState(872);
match(T__25);
- setState(851);
+ setState(873);
expr();
- setState(852);
+ setState(874);
match(T__26);
}
}
@@ -5858,9 +6012,9 @@ public final FunctionCallContext functionCall() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(854);
+ setState(876);
((FunctionCallContext)_localctx).fn_name = qname();
- setState(855);
+ setState(877);
argumentList();
}
}
@@ -5902,34 +6056,34 @@ public final ArgumentListContext argumentList() throws RecognitionException {
try {
enterOuterAlt(_localctx, 1);
{
- setState(857);
+ setState(879);
match(T__23);
- setState(864);
+ setState(886);
_errHandler.sync(this);
_la = _input.LA(1);
- while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__32) | (1L << T__47) | (1L << T__48) | (1L << T__53) | (1L << T__56) | (1L << T__58) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kgroup - 64)) | (1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (STRING - 64)) | (1L << (ArgumentPlaceholder - 64)) | (1L << (NullLiteral - 64)) | (1L << (Literal - 64)) | (1L << (NCName - 64)))) != 0)) {
+ while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__31) | (1L << T__46) | (1L << T__47) | (1L << T__52) | (1L << T__55) | (1L << T__57) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere) | (1L << Kgroup))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (Kinsert - 64)) | (1L << (Kdelete - 64)) | (1L << (Krename - 64)) | (1L << (Kreplace - 64)) | (1L << (Kcopy - 64)) | (1L << (Kmodify - 64)) | (1L << (Kappend - 64)) | (1L << (Kinto - 64)) | (1L << (Kvalue - 64)) | (1L << (Kjson - 64)) | (1L << (Kwith - 64)) | (1L << (Kposition - 64)) | (1L << (STRING - 64)) | (1L << (ArgumentPlaceholder - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (NullLiteral - 128)) | (1L << (Literal - 128)) | (1L << (NCName - 128)))) != 0)) {
{
{
- setState(858);
+ setState(880);
((ArgumentListContext)_localctx).argument = argument();
((ArgumentListContext)_localctx).args.add(((ArgumentListContext)_localctx).argument);
- setState(860);
+ setState(882);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==T__19) {
{
- setState(859);
+ setState(881);
match(T__19);
}
}
}
}
- setState(866);
+ setState(888);
_errHandler.sync(this);
_la = _input.LA(1);
}
- setState(867);
+ setState(889);
match(T__24);
}
}
@@ -5964,19 +6118,19 @@ public final ArgumentContext argument() throws RecognitionException {
ArgumentContext _localctx = new ArgumentContext(_ctx, getState());
enterRule(_localctx, 154, RULE_argument);
try {
- setState(871);
+ setState(893);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__5:
case T__22:
case T__23:
case T__25:
- case T__32:
+ case T__31:
+ case T__46:
case T__47:
- case T__48:
- case T__53:
- case T__56:
- case T__58:
+ case T__52:
+ case T__55:
+ case T__57:
case Kfor:
case Klet:
case Kwhere:
@@ -6031,20 +6185,32 @@ public final ArgumentContext argument() throws RecognitionException {
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case STRING:
case NullLiteral:
case Literal:
case NCName:
enterOuterAlt(_localctx, 1);
{
- setState(869);
+ setState(891);
exprSingle();
}
break;
case ArgumentPlaceholder:
enterOuterAlt(_localctx, 2);
{
- setState(870);
+ setState(892);
match(ArgumentPlaceholder);
}
break;
@@ -6085,7 +6251,7 @@ public final FunctionItemExprContext functionItemExpr() throws RecognitionExcept
FunctionItemExprContext _localctx = new FunctionItemExprContext(_ctx, getState());
enterRule(_localctx, 156, RULE_functionItemExpr);
try {
- setState(875);
+ setState(897);
_errHandler.sync(this);
switch (_input.LA(1)) {
case Kfor:
@@ -6142,18 +6308,30 @@ public final FunctionItemExprContext functionItemExpr() throws RecognitionExcept
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case NullLiteral:
case NCName:
enterOuterAlt(_localctx, 1);
{
- setState(873);
+ setState(895);
namedFunctionRef();
}
break;
case T__22:
enterOuterAlt(_localctx, 2);
{
- setState(874);
+ setState(896);
inlineFunctionExpr();
}
break;
@@ -6196,11 +6374,11 @@ public final NamedFunctionRefContext namedFunctionRef() throws RecognitionExcept
try {
enterOuterAlt(_localctx, 1);
{
- setState(877);
+ setState(899);
((NamedFunctionRefContext)_localctx).fn_name = qname();
- setState(878);
- match(T__57);
- setState(879);
+ setState(900);
+ match(T__56);
+ setState(901);
((NamedFunctionRefContext)_localctx).arity = match(Literal);
}
}
@@ -6246,48 +6424,48 @@ public final InlineFunctionExprContext inlineFunctionExpr() throws RecognitionEx
try {
enterOuterAlt(_localctx, 1);
{
- setState(881);
+ setState(903);
match(T__22);
- setState(882);
+ setState(904);
match(T__23);
- setState(884);
+ setState(906);
_errHandler.sync(this);
_la = _input.LA(1);
- if (_la==T__32) {
+ if (_la==T__31) {
{
- setState(883);
+ setState(905);
paramList();
}
}
- setState(886);
+ setState(908);
match(T__24);
- setState(889);
+ setState(911);
_errHandler.sync(this);
_la = _input.LA(1);
if (_la==Kas) {
{
- setState(887);
+ setState(909);
match(Kas);
- setState(888);
+ setState(910);
((InlineFunctionExprContext)_localctx).return_type = sequenceType();
}
}
{
- setState(891);
+ setState(913);
match(T__25);
- setState(893);
+ setState(915);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__32) | (1L << T__47) | (1L << T__48) | (1L << T__53) | (1L << T__56) | (1L << T__58) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kgroup - 64)) | (1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (STRING - 64)) | (1L << (NullLiteral - 64)) | (1L << (Literal - 64)) | (1L << (NCName - 64)))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__31) | (1L << T__46) | (1L << T__47) | (1L << T__52) | (1L << T__55) | (1L << T__57) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere) | (1L << Kgroup))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (Kinsert - 64)) | (1L << (Kdelete - 64)) | (1L << (Krename - 64)) | (1L << (Kreplace - 64)) | (1L << (Kcopy - 64)) | (1L << (Kmodify - 64)) | (1L << (Kappend - 64)) | (1L << (Kinto - 64)) | (1L << (Kvalue - 64)) | (1L << (Kjson - 64)) | (1L << (Kwith - 64)) | (1L << (Kposition - 64)) | (1L << (STRING - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (NullLiteral - 128)) | (1L << (Literal - 128)) | (1L << (NCName - 128)))) != 0)) {
{
- setState(892);
+ setState(914);
((InlineFunctionExprContext)_localctx).fn_body = expr();
}
}
- setState(895);
+ setState(917);
match(T__26);
}
}
@@ -6303,13 +6481,537 @@ public final InlineFunctionExprContext inlineFunctionExpr() throws RecognitionEx
return _localctx;
}
+ public static class InsertExprContext extends ParserRuleContext {
+ public ExprSingleContext to_insert_expr;
+ public ExprSingleContext main_expr;
+ public ExprSingleContext pos_expr;
+ public TerminalNode Kinsert() { return getToken(JsoniqParser.Kinsert, 0); }
+ public TerminalNode Kjson() { return getToken(JsoniqParser.Kjson, 0); }
+ public TerminalNode Kinto() { return getToken(JsoniqParser.Kinto, 0); }
+ public List exprSingle() {
+ return getRuleContexts(ExprSingleContext.class);
+ }
+ public ExprSingleContext exprSingle(int i) {
+ return getRuleContext(ExprSingleContext.class,i);
+ }
+ public TerminalNode Kat() { return getToken(JsoniqParser.Kat, 0); }
+ public TerminalNode Kposition() { return getToken(JsoniqParser.Kposition, 0); }
+ public List pairConstructor() {
+ return getRuleContexts(PairConstructorContext.class);
+ }
+ public PairConstructorContext pairConstructor(int i) {
+ return getRuleContext(PairConstructorContext.class,i);
+ }
+ public InsertExprContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_insertExpr; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof JsoniqVisitor ) return ((JsoniqVisitor extends T>)visitor).visitInsertExpr(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final InsertExprContext insertExpr() throws RecognitionException {
+ InsertExprContext _localctx = new InsertExprContext(_ctx, getState());
+ enterRule(_localctx, 162, RULE_insertExpr);
+ int _la;
+ try {
+ setState(942);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) {
+ case 1:
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(919);
+ match(Kinsert);
+ setState(920);
+ match(Kjson);
+ setState(921);
+ ((InsertExprContext)_localctx).to_insert_expr = exprSingle();
+ setState(922);
+ match(Kinto);
+ setState(923);
+ ((InsertExprContext)_localctx).main_expr = exprSingle();
+ setState(927);
+ _errHandler.sync(this);
+ switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) {
+ case 1:
+ {
+ setState(924);
+ match(Kat);
+ setState(925);
+ match(Kposition);
+ setState(926);
+ ((InsertExprContext)_localctx).pos_expr = exprSingle();
+ }
+ break;
+ }
+ }
+ break;
+ case 2:
+ enterOuterAlt(_localctx, 2);
+ {
+ setState(929);
+ match(Kinsert);
+ setState(930);
+ match(Kjson);
+ setState(931);
+ pairConstructor();
+ setState(936);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while (_la==T__19) {
+ {
+ {
+ setState(932);
+ match(T__19);
+ setState(933);
+ pairConstructor();
+ }
+ }
+ setState(938);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(939);
+ match(Kinto);
+ setState(940);
+ ((InsertExprContext)_localctx).main_expr = exprSingle();
+ }
+ break;
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class DeleteExprContext extends ParserRuleContext {
+ public TerminalNode Kdelete() { return getToken(JsoniqParser.Kdelete, 0); }
+ public TerminalNode Kjson() { return getToken(JsoniqParser.Kjson, 0); }
+ public UpdateLocatorContext updateLocator() {
+ return getRuleContext(UpdateLocatorContext.class,0);
+ }
+ public DeleteExprContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_deleteExpr; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof JsoniqVisitor ) return ((JsoniqVisitor extends T>)visitor).visitDeleteExpr(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final DeleteExprContext deleteExpr() throws RecognitionException {
+ DeleteExprContext _localctx = new DeleteExprContext(_ctx, getState());
+ enterRule(_localctx, 164, RULE_deleteExpr);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(944);
+ match(Kdelete);
+ setState(945);
+ match(Kjson);
+ setState(946);
+ updateLocator();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class RenameExprContext extends ParserRuleContext {
+ public ExprSingleContext name_expr;
+ public TerminalNode Krename() { return getToken(JsoniqParser.Krename, 0); }
+ public TerminalNode Kjson() { return getToken(JsoniqParser.Kjson, 0); }
+ public UpdateLocatorContext updateLocator() {
+ return getRuleContext(UpdateLocatorContext.class,0);
+ }
+ public TerminalNode Kas() { return getToken(JsoniqParser.Kas, 0); }
+ public ExprSingleContext exprSingle() {
+ return getRuleContext(ExprSingleContext.class,0);
+ }
+ public RenameExprContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_renameExpr; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof JsoniqVisitor ) return ((JsoniqVisitor extends T>)visitor).visitRenameExpr(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final RenameExprContext renameExpr() throws RecognitionException {
+ RenameExprContext _localctx = new RenameExprContext(_ctx, getState());
+ enterRule(_localctx, 166, RULE_renameExpr);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(948);
+ match(Krename);
+ setState(949);
+ match(Kjson);
+ setState(950);
+ updateLocator();
+ setState(951);
+ match(Kas);
+ setState(952);
+ ((RenameExprContext)_localctx).name_expr = exprSingle();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class ReplaceExprContext extends ParserRuleContext {
+ public ExprSingleContext replacer_expr;
+ public TerminalNode Kreplace() { return getToken(JsoniqParser.Kreplace, 0); }
+ public TerminalNode Kjson() { return getToken(JsoniqParser.Kjson, 0); }
+ public TerminalNode Kvalue() { return getToken(JsoniqParser.Kvalue, 0); }
+ public TerminalNode Kof() { return getToken(JsoniqParser.Kof, 0); }
+ public UpdateLocatorContext updateLocator() {
+ return getRuleContext(UpdateLocatorContext.class,0);
+ }
+ public TerminalNode Kwith() { return getToken(JsoniqParser.Kwith, 0); }
+ public ExprSingleContext exprSingle() {
+ return getRuleContext(ExprSingleContext.class,0);
+ }
+ public ReplaceExprContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_replaceExpr; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof JsoniqVisitor ) return ((JsoniqVisitor extends T>)visitor).visitReplaceExpr(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final ReplaceExprContext replaceExpr() throws RecognitionException {
+ ReplaceExprContext _localctx = new ReplaceExprContext(_ctx, getState());
+ enterRule(_localctx, 168, RULE_replaceExpr);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(954);
+ match(Kreplace);
+ setState(955);
+ match(Kjson);
+ setState(956);
+ match(Kvalue);
+ setState(957);
+ match(Kof);
+ setState(958);
+ updateLocator();
+ setState(959);
+ match(Kwith);
+ setState(960);
+ ((ReplaceExprContext)_localctx).replacer_expr = exprSingle();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class TransformExprContext extends ParserRuleContext {
+ public ExprSingleContext mod_expr;
+ public ExprSingleContext ret_expr;
+ public TerminalNode Kcopy() { return getToken(JsoniqParser.Kcopy, 0); }
+ public TerminalNode Kjson() { return getToken(JsoniqParser.Kjson, 0); }
+ public List copyDecl() {
+ return getRuleContexts(CopyDeclContext.class);
+ }
+ public CopyDeclContext copyDecl(int i) {
+ return getRuleContext(CopyDeclContext.class,i);
+ }
+ public TerminalNode Kmodify() { return getToken(JsoniqParser.Kmodify, 0); }
+ public TerminalNode Kreturn() { return getToken(JsoniqParser.Kreturn, 0); }
+ public List exprSingle() {
+ return getRuleContexts(ExprSingleContext.class);
+ }
+ public ExprSingleContext exprSingle(int i) {
+ return getRuleContext(ExprSingleContext.class,i);
+ }
+ public TransformExprContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_transformExpr; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof JsoniqVisitor ) return ((JsoniqVisitor extends T>)visitor).visitTransformExpr(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final TransformExprContext transformExpr() throws RecognitionException {
+ TransformExprContext _localctx = new TransformExprContext(_ctx, getState());
+ enterRule(_localctx, 170, RULE_transformExpr);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(962);
+ match(Kcopy);
+ setState(963);
+ match(Kjson);
+ setState(964);
+ copyDecl();
+ setState(969);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while (_la==T__19) {
+ {
+ {
+ setState(965);
+ match(T__19);
+ setState(966);
+ copyDecl();
+ }
+ }
+ setState(971);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(972);
+ match(Kmodify);
+ setState(973);
+ ((TransformExprContext)_localctx).mod_expr = exprSingle();
+ setState(974);
+ match(Kreturn);
+ setState(975);
+ ((TransformExprContext)_localctx).ret_expr = exprSingle();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class AppendExprContext extends ParserRuleContext {
+ public ExprSingleContext to_append_expr;
+ public ExprSingleContext array_expr;
+ public TerminalNode Kappend() { return getToken(JsoniqParser.Kappend, 0); }
+ public TerminalNode Kjson() { return getToken(JsoniqParser.Kjson, 0); }
+ public TerminalNode Kinto() { return getToken(JsoniqParser.Kinto, 0); }
+ public List exprSingle() {
+ return getRuleContexts(ExprSingleContext.class);
+ }
+ public ExprSingleContext exprSingle(int i) {
+ return getRuleContext(ExprSingleContext.class,i);
+ }
+ public AppendExprContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_appendExpr; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof JsoniqVisitor ) return ((JsoniqVisitor extends T>)visitor).visitAppendExpr(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final AppendExprContext appendExpr() throws RecognitionException {
+ AppendExprContext _localctx = new AppendExprContext(_ctx, getState());
+ enterRule(_localctx, 172, RULE_appendExpr);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(977);
+ match(Kappend);
+ setState(978);
+ match(Kjson);
+ setState(979);
+ ((AppendExprContext)_localctx).to_append_expr = exprSingle();
+ setState(980);
+ match(Kinto);
+ setState(981);
+ ((AppendExprContext)_localctx).array_expr = exprSingle();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class UpdateLocatorContext extends ParserRuleContext {
+ public PrimaryExprContext main_expr;
+ public PrimaryExprContext primaryExpr() {
+ return getRuleContext(PrimaryExprContext.class,0);
+ }
+ public List arrayLookup() {
+ return getRuleContexts(ArrayLookupContext.class);
+ }
+ public ArrayLookupContext arrayLookup(int i) {
+ return getRuleContext(ArrayLookupContext.class,i);
+ }
+ public List objectLookup() {
+ return getRuleContexts(ObjectLookupContext.class);
+ }
+ public ObjectLookupContext objectLookup(int i) {
+ return getRuleContext(ObjectLookupContext.class,i);
+ }
+ public UpdateLocatorContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_updateLocator; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof JsoniqVisitor ) return ((JsoniqVisitor extends T>)visitor).visitUpdateLocator(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final UpdateLocatorContext updateLocator() throws RecognitionException {
+ UpdateLocatorContext _localctx = new UpdateLocatorContext(_ctx, getState());
+ enterRule(_localctx, 174, RULE_updateLocator);
+ try {
+ int _alt;
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(983);
+ ((UpdateLocatorContext)_localctx).main_expr = primaryExpr();
+ setState(986);
+ _errHandler.sync(this);
+ _alt = 1;
+ do {
+ switch (_alt) {
+ case 1:
+ {
+ setState(986);
+ _errHandler.sync(this);
+ switch (_input.LA(1)) {
+ case T__52:
+ {
+ setState(984);
+ arrayLookup();
+ }
+ break;
+ case T__54:
+ {
+ setState(985);
+ objectLookup();
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ }
+ break;
+ default:
+ throw new NoViableAltException(this);
+ }
+ setState(988);
+ _errHandler.sync(this);
+ _alt = getInterpreter().adaptivePredict(_input,98,_ctx);
+ } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class CopyDeclContext extends ParserRuleContext {
+ public VarRefContext var_ref;
+ public ExprSingleContext src_expr;
+ public VarRefContext varRef() {
+ return getRuleContext(VarRefContext.class,0);
+ }
+ public ExprSingleContext exprSingle() {
+ return getRuleContext(ExprSingleContext.class,0);
+ }
+ public CopyDeclContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_copyDecl; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof JsoniqVisitor ) return ((JsoniqVisitor extends T>)visitor).visitCopyDecl(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final CopyDeclContext copyDecl() throws RecognitionException {
+ CopyDeclContext _localctx = new CopyDeclContext(_ctx, getState());
+ enterRule(_localctx, 176, RULE_copyDecl);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(990);
+ ((CopyDeclContext)_localctx).var_ref = varRef();
+ setState(991);
+ match(T__20);
+ setState(992);
+ ((CopyDeclContext)_localctx).src_expr = exprSingle();
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
public static class SequenceTypeContext extends ParserRuleContext {
public ItemTypeContext item;
- public Token s116;
+ public Token s127;
public List question = new ArrayList();
- public Token s35;
+ public Token s34;
public List star = new ArrayList();
- public Token s48;
+ public Token s47;
public List plus = new ArrayList();
public ItemTypeContext itemType() {
return getRuleContext(ItemTypeContext.class,0);
@@ -6328,17 +7030,17 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final SequenceTypeContext sequenceType() throws RecognitionException {
SequenceTypeContext _localctx = new SequenceTypeContext(_ctx, getState());
- enterRule(_localctx, 162, RULE_sequenceType);
+ enterRule(_localctx, 178, RULE_sequenceType);
try {
- setState(905);
+ setState(1002);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__23:
enterOuterAlt(_localctx, 1);
{
- setState(897);
+ setState(994);
match(T__23);
- setState(898);
+ setState(995);
match(T__24);
}
break;
@@ -6397,34 +7099,46 @@ public final SequenceTypeContext sequenceType() throws RecognitionException {
case Kcontext:
case Kitem:
case Kvariable:
+ case Kinsert:
+ case Kdelete:
+ case Krename:
+ case Kreplace:
+ case Kcopy:
+ case Kmodify:
+ case Kappend:
+ case Kinto:
+ case Kvalue:
+ case Kjson:
+ case Kwith:
+ case Kposition:
case NullLiteral:
case NCName:
enterOuterAlt(_localctx, 2);
{
- setState(899);
+ setState(996);
((SequenceTypeContext)_localctx).item = itemType();
- setState(903);
+ setState(1000);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,93,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) {
case 1:
{
- setState(900);
- ((SequenceTypeContext)_localctx).s116 = match(ArgumentPlaceholder);
- ((SequenceTypeContext)_localctx).question.add(((SequenceTypeContext)_localctx).s116);
+ setState(997);
+ ((SequenceTypeContext)_localctx).s127 = match(ArgumentPlaceholder);
+ ((SequenceTypeContext)_localctx).question.add(((SequenceTypeContext)_localctx).s127);
}
break;
case 2:
{
- setState(901);
- ((SequenceTypeContext)_localctx).s35 = match(T__34);
- ((SequenceTypeContext)_localctx).star.add(((SequenceTypeContext)_localctx).s35);
+ setState(998);
+ ((SequenceTypeContext)_localctx).s34 = match(T__33);
+ ((SequenceTypeContext)_localctx).star.add(((SequenceTypeContext)_localctx).s34);
}
break;
case 3:
{
- setState(902);
- ((SequenceTypeContext)_localctx).s48 = match(T__47);
- ((SequenceTypeContext)_localctx).plus.add(((SequenceTypeContext)_localctx).s48);
+ setState(999);
+ ((SequenceTypeContext)_localctx).s47 = match(T__46);
+ ((SequenceTypeContext)_localctx).plus.add(((SequenceTypeContext)_localctx).s47);
}
break;
}
@@ -6446,7 +7160,7 @@ public final SequenceTypeContext sequenceType() throws RecognitionException {
}
public static class ObjectConstructorContext extends ParserRuleContext {
- public Token s59;
+ public Token s58;
public List merge_operator = new ArrayList();
public List pairConstructor() {
return getRuleContexts(PairConstructorContext.class);
@@ -6470,57 +7184,57 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final ObjectConstructorContext objectConstructor() throws RecognitionException {
ObjectConstructorContext _localctx = new ObjectConstructorContext(_ctx, getState());
- enterRule(_localctx, 164, RULE_objectConstructor);
+ enterRule(_localctx, 180, RULE_objectConstructor);
int _la;
try {
- setState(923);
+ setState(1020);
_errHandler.sync(this);
switch (_input.LA(1)) {
case T__25:
enterOuterAlt(_localctx, 1);
{
- setState(907);
+ setState(1004);
match(T__25);
- setState(916);
+ setState(1013);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__32) | (1L << T__47) | (1L << T__48) | (1L << T__53) | (1L << T__56) | (1L << T__58) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kgroup - 64)) | (1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (STRING - 64)) | (1L << (NullLiteral - 64)) | (1L << (Literal - 64)) | (1L << (NCName - 64)))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__31) | (1L << T__46) | (1L << T__47) | (1L << T__52) | (1L << T__55) | (1L << T__57) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere) | (1L << Kgroup))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (Kinsert - 64)) | (1L << (Kdelete - 64)) | (1L << (Krename - 64)) | (1L << (Kreplace - 64)) | (1L << (Kcopy - 64)) | (1L << (Kmodify - 64)) | (1L << (Kappend - 64)) | (1L << (Kinto - 64)) | (1L << (Kvalue - 64)) | (1L << (Kjson - 64)) | (1L << (Kwith - 64)) | (1L << (Kposition - 64)) | (1L << (STRING - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (NullLiteral - 128)) | (1L << (Literal - 128)) | (1L << (NCName - 128)))) != 0)) {
{
- setState(908);
+ setState(1005);
pairConstructor();
- setState(913);
+ setState(1010);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(909);
+ setState(1006);
match(T__19);
- setState(910);
+ setState(1007);
pairConstructor();
}
}
- setState(915);
+ setState(1012);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
- setState(918);
+ setState(1015);
match(T__26);
}
break;
- case T__58:
+ case T__57:
enterOuterAlt(_localctx, 2);
{
- setState(919);
- ((ObjectConstructorContext)_localctx).s59 = match(T__58);
- ((ObjectConstructorContext)_localctx).merge_operator.add(((ObjectConstructorContext)_localctx).s59);
- setState(920);
+ setState(1016);
+ ((ObjectConstructorContext)_localctx).s58 = match(T__57);
+ ((ObjectConstructorContext)_localctx).merge_operator.add(((ObjectConstructorContext)_localctx).s58);
+ setState(1017);
expr();
- setState(921);
- match(T__59);
+ setState(1018);
+ match(T__58);
}
break;
default:
@@ -6559,29 +7273,29 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final ItemTypeContext itemType() throws RecognitionException {
ItemTypeContext _localctx = new ItemTypeContext(_ctx, getState());
- enterRule(_localctx, 166, RULE_itemType);
+ enterRule(_localctx, 182, RULE_itemType);
try {
- setState(928);
+ setState(1025);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,98,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,104,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(925);
+ setState(1022);
qname();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(926);
+ setState(1023);
match(NullLiteral);
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(927);
+ setState(1024);
functionTest();
}
break;
@@ -6618,22 +7332,22 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final FunctionTestContext functionTest() throws RecognitionException {
FunctionTestContext _localctx = new FunctionTestContext(_ctx, getState());
- enterRule(_localctx, 168, RULE_functionTest);
+ enterRule(_localctx, 184, RULE_functionTest);
try {
enterOuterAlt(_localctx, 1);
{
- setState(932);
+ setState(1029);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,99,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,105,_ctx) ) {
case 1:
{
- setState(930);
+ setState(1027);
anyFunctionTest();
}
break;
case 2:
{
- setState(931);
+ setState(1028);
typedFunctionTest();
}
break;
@@ -6665,17 +7379,17 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final AnyFunctionTestContext anyFunctionTest() throws RecognitionException {
AnyFunctionTestContext _localctx = new AnyFunctionTestContext(_ctx, getState());
- enterRule(_localctx, 170, RULE_anyFunctionTest);
+ enterRule(_localctx, 186, RULE_anyFunctionTest);
try {
enterOuterAlt(_localctx, 1);
{
- setState(934);
+ setState(1031);
match(T__22);
- setState(935);
+ setState(1032);
match(T__23);
- setState(936);
- match(T__34);
- setState(937);
+ setState(1033);
+ match(T__33);
+ setState(1034);
match(T__24);
}
}
@@ -6714,48 +7428,48 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final TypedFunctionTestContext typedFunctionTest() throws RecognitionException {
TypedFunctionTestContext _localctx = new TypedFunctionTestContext(_ctx, getState());
- enterRule(_localctx, 172, RULE_typedFunctionTest);
+ enterRule(_localctx, 188, RULE_typedFunctionTest);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(939);
+ setState(1036);
match(T__22);
- setState(940);
+ setState(1037);
match(T__23);
- setState(949);
+ setState(1046);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__22) | (1L << T__23) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kgroup - 64)) | (1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (NullLiteral - 64)) | (1L << (NCName - 64)))) != 0)) {
+ if (((((_la - 23)) & ~0x3f) == 0 && ((1L << (_la - 23)) & ((1L << (T__22 - 23)) | (1L << (T__23 - 23)) | (1L << (Kfor - 23)) | (1L << (Klet - 23)) | (1L << (Kwhere - 23)) | (1L << (Kgroup - 23)) | (1L << (Kby - 23)) | (1L << (Korder - 23)) | (1L << (Kreturn - 23)) | (1L << (Kif - 23)) | (1L << (Kin - 23)) | (1L << (Kas - 23)) | (1L << (Kat - 23)) | (1L << (Kallowing - 23)) | (1L << (Kempty - 23)) | (1L << (Kcount - 23)) | (1L << (Kstable - 23)) | (1L << (Kascending - 23)) | (1L << (Kdescending - 23)) | (1L << (Ksome - 23)) | (1L << (Kevery - 23)) | (1L << (Ksatisfies - 23)) | (1L << (Kcollation - 23)) | (1L << (Kgreatest - 23)) | (1L << (Kleast - 23)) | (1L << (Kswitch - 23)) | (1L << (Kcase - 23)) | (1L << (Ktry - 23)) | (1L << (Kcatch - 23)))) != 0) || ((((_la - 87)) & ~0x3f) == 0 && ((1L << (_la - 87)) & ((1L << (Kdefault - 87)) | (1L << (Kthen - 87)) | (1L << (Kelse - 87)) | (1L << (Ktypeswitch - 87)) | (1L << (Kor - 87)) | (1L << (Kand - 87)) | (1L << (Knot - 87)) | (1L << (Kto - 87)) | (1L << (Kinstance - 87)) | (1L << (Kof - 87)) | (1L << (Kstatically - 87)) | (1L << (Kis - 87)) | (1L << (Ktreat - 87)) | (1L << (Kcast - 87)) | (1L << (Kcastable - 87)) | (1L << (Kversion - 87)) | (1L << (Kjsoniq - 87)) | (1L << (Kunordered - 87)) | (1L << (Ktrue - 87)) | (1L << (Kfalse - 87)) | (1L << (Ktype - 87)) | (1L << (Kvalidate - 87)) | (1L << (Kannotate - 87)) | (1L << (Kdeclare - 87)) | (1L << (Kcontext - 87)) | (1L << (Kitem - 87)) | (1L << (Kvariable - 87)) | (1L << (Kinsert - 87)) | (1L << (Kdelete - 87)) | (1L << (Krename - 87)) | (1L << (Kreplace - 87)) | (1L << (Kcopy - 87)) | (1L << (Kmodify - 87)) | (1L << (Kappend - 87)) | (1L << (Kinto - 87)) | (1L << (Kvalue - 87)) | (1L << (Kjson - 87)) | (1L << (Kwith - 87)) | (1L << (Kposition - 87)) | (1L << (NullLiteral - 87)) | (1L << (NCName - 87)))) != 0)) {
{
- setState(941);
+ setState(1038);
((TypedFunctionTestContext)_localctx).sequenceType = sequenceType();
((TypedFunctionTestContext)_localctx).st.add(((TypedFunctionTestContext)_localctx).sequenceType);
- setState(946);
+ setState(1043);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==T__19) {
{
{
- setState(942);
+ setState(1039);
match(T__19);
- setState(943);
+ setState(1040);
((TypedFunctionTestContext)_localctx).sequenceType = sequenceType();
((TypedFunctionTestContext)_localctx).st.add(((TypedFunctionTestContext)_localctx).sequenceType);
}
}
- setState(948);
+ setState(1045);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
- setState(951);
+ setState(1048);
match(T__24);
- setState(952);
+ setState(1049);
match(Kas);
- setState(953);
+ setState(1050);
((TypedFunctionTestContext)_localctx).rt = sequenceType();
}
}
@@ -6772,7 +7486,7 @@ public final TypedFunctionTestContext typedFunctionTest() throws RecognitionExce
public static class SingleTypeContext extends ParserRuleContext {
public ItemTypeContext item;
- public Token s116;
+ public Token s127;
public List question = new ArrayList();
public ItemTypeContext itemType() {
return getRuleContext(ItemTypeContext.class,0);
@@ -6791,20 +7505,20 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final SingleTypeContext singleType() throws RecognitionException {
SingleTypeContext _localctx = new SingleTypeContext(_ctx, getState());
- enterRule(_localctx, 174, RULE_singleType);
+ enterRule(_localctx, 190, RULE_singleType);
try {
enterOuterAlt(_localctx, 1);
{
- setState(955);
+ setState(1052);
((SingleTypeContext)_localctx).item = itemType();
- setState(957);
+ setState(1054);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,108,_ctx) ) {
case 1:
{
- setState(956);
- ((SingleTypeContext)_localctx).s116 = match(ArgumentPlaceholder);
- ((SingleTypeContext)_localctx).question.add(((SingleTypeContext)_localctx).s116);
+ setState(1053);
+ ((SingleTypeContext)_localctx).s127 = match(ArgumentPlaceholder);
+ ((SingleTypeContext)_localctx).question.add(((SingleTypeContext)_localctx).s127);
}
break;
}
@@ -6846,28 +7560,28 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final PairConstructorContext pairConstructor() throws RecognitionException {
PairConstructorContext _localctx = new PairConstructorContext(_ctx, getState());
- enterRule(_localctx, 176, RULE_pairConstructor);
+ enterRule(_localctx, 192, RULE_pairConstructor);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(961);
+ setState(1058);
_errHandler.sync(this);
- switch ( getInterpreter().adaptivePredict(_input,103,_ctx) ) {
+ switch ( getInterpreter().adaptivePredict(_input,109,_ctx) ) {
case 1:
{
- setState(959);
+ setState(1056);
((PairConstructorContext)_localctx).lhs = exprSingle();
}
break;
case 2:
{
- setState(960);
+ setState(1057);
((PairConstructorContext)_localctx).name = match(NCName);
}
break;
}
- setState(963);
+ setState(1060);
_la = _input.LA(1);
if ( !(_la==T__7 || _la==ArgumentPlaceholder) ) {
_errHandler.recoverInline(this);
@@ -6877,7 +7591,7 @@ public final PairConstructorContext pairConstructor() throws RecognitionExceptio
_errHandler.reportMatch(this);
consume();
}
- setState(964);
+ setState(1061);
((PairConstructorContext)_localctx).rhs = exprSingle();
}
}
@@ -6909,25 +7623,25 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final ArrayConstructorContext arrayConstructor() throws RecognitionException {
ArrayConstructorContext _localctx = new ArrayConstructorContext(_ctx, getState());
- enterRule(_localctx, 178, RULE_arrayConstructor);
+ enterRule(_localctx, 194, RULE_arrayConstructor);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(966);
- match(T__53);
- setState(968);
+ setState(1063);
+ match(T__52);
+ setState(1065);
_errHandler.sync(this);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__32) | (1L << T__47) | (1L << T__48) | (1L << T__53) | (1L << T__56) | (1L << T__58) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kgroup - 64)) | (1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (STRING - 64)) | (1L << (NullLiteral - 64)) | (1L << (Literal - 64)) | (1L << (NCName - 64)))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__5) | (1L << T__22) | (1L << T__23) | (1L << T__25) | (1L << T__31) | (1L << T__46) | (1L << T__47) | (1L << T__52) | (1L << T__55) | (1L << T__57) | (1L << Kfor) | (1L << Klet) | (1L << Kwhere) | (1L << Kgroup))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (Kby - 64)) | (1L << (Korder - 64)) | (1L << (Kreturn - 64)) | (1L << (Kif - 64)) | (1L << (Kin - 64)) | (1L << (Kas - 64)) | (1L << (Kat - 64)) | (1L << (Kallowing - 64)) | (1L << (Kempty - 64)) | (1L << (Kcount - 64)) | (1L << (Kstable - 64)) | (1L << (Kascending - 64)) | (1L << (Kdescending - 64)) | (1L << (Ksome - 64)) | (1L << (Kevery - 64)) | (1L << (Ksatisfies - 64)) | (1L << (Kcollation - 64)) | (1L << (Kgreatest - 64)) | (1L << (Kleast - 64)) | (1L << (Kswitch - 64)) | (1L << (Kcase - 64)) | (1L << (Ktry - 64)) | (1L << (Kcatch - 64)) | (1L << (Kdefault - 64)) | (1L << (Kthen - 64)) | (1L << (Kelse - 64)) | (1L << (Ktypeswitch - 64)) | (1L << (Kor - 64)) | (1L << (Kand - 64)) | (1L << (Knot - 64)) | (1L << (Kto - 64)) | (1L << (Kinstance - 64)) | (1L << (Kof - 64)) | (1L << (Kstatically - 64)) | (1L << (Kis - 64)) | (1L << (Ktreat - 64)) | (1L << (Kcast - 64)) | (1L << (Kcastable - 64)) | (1L << (Kversion - 64)) | (1L << (Kjsoniq - 64)) | (1L << (Kunordered - 64)) | (1L << (Ktrue - 64)) | (1L << (Kfalse - 64)) | (1L << (Ktype - 64)) | (1L << (Kvalidate - 64)) | (1L << (Kannotate - 64)) | (1L << (Kdeclare - 64)) | (1L << (Kcontext - 64)) | (1L << (Kitem - 64)) | (1L << (Kvariable - 64)) | (1L << (Kinsert - 64)) | (1L << (Kdelete - 64)) | (1L << (Krename - 64)) | (1L << (Kreplace - 64)) | (1L << (Kcopy - 64)) | (1L << (Kmodify - 64)) | (1L << (Kappend - 64)) | (1L << (Kinto - 64)) | (1L << (Kvalue - 64)) | (1L << (Kjson - 64)) | (1L << (Kwith - 64)) | (1L << (Kposition - 64)) | (1L << (STRING - 64)))) != 0) || ((((_la - 128)) & ~0x3f) == 0 && ((1L << (_la - 128)) & ((1L << (NullLiteral - 128)) | (1L << (Literal - 128)) | (1L << (NCName - 128)))) != 0)) {
{
- setState(967);
+ setState(1064);
expr();
}
}
- setState(970);
- match(T__54);
+ setState(1067);
+ match(T__53);
}
}
catch (RecognitionException re) {
@@ -6958,11 +7672,11 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final UriLiteralContext uriLiteral() throws RecognitionException {
UriLiteralContext _localctx = new UriLiteralContext(_ctx, getState());
- enterRule(_localctx, 180, RULE_uriLiteral);
+ enterRule(_localctx, 196, RULE_uriLiteral);
try {
enterOuterAlt(_localctx, 1);
{
- setState(972);
+ setState(1069);
stringLiteral();
}
}
@@ -6992,11 +7706,11 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final StringLiteralContext stringLiteral() throws RecognitionException {
StringLiteralContext _localctx = new StringLiteralContext(_ctx, getState());
- enterRule(_localctx, 182, RULE_stringLiteral);
+ enterRule(_localctx, 198, RULE_stringLiteral);
try {
enterOuterAlt(_localctx, 1);
{
- setState(974);
+ setState(1071);
match(STRING);
}
}
@@ -7065,6 +7779,18 @@ public static class KeyWordsContext extends ParserRuleContext {
public TerminalNode Ktrue() { return getToken(JsoniqParser.Ktrue, 0); }
public TerminalNode Kfalse() { return getToken(JsoniqParser.Kfalse, 0); }
public TerminalNode Ktype() { return getToken(JsoniqParser.Ktype, 0); }
+ public TerminalNode Kinsert() { return getToken(JsoniqParser.Kinsert, 0); }
+ public TerminalNode Kdelete() { return getToken(JsoniqParser.Kdelete, 0); }
+ public TerminalNode Krename() { return getToken(JsoniqParser.Krename, 0); }
+ public TerminalNode Kreplace() { return getToken(JsoniqParser.Kreplace, 0); }
+ public TerminalNode Kappend() { return getToken(JsoniqParser.Kappend, 0); }
+ public TerminalNode Kcopy() { return getToken(JsoniqParser.Kcopy, 0); }
+ public TerminalNode Kmodify() { return getToken(JsoniqParser.Kmodify, 0); }
+ public TerminalNode Kjson() { return getToken(JsoniqParser.Kjson, 0); }
+ public TerminalNode Kinto() { return getToken(JsoniqParser.Kinto, 0); }
+ public TerminalNode Kvalue() { return getToken(JsoniqParser.Kvalue, 0); }
+ public TerminalNode Kwith() { return getToken(JsoniqParser.Kwith, 0); }
+ public TerminalNode Kposition() { return getToken(JsoniqParser.Kposition, 0); }
public TerminalNode Kvalidate() { return getToken(JsoniqParser.Kvalidate, 0); }
public TerminalNode Kannotate() { return getToken(JsoniqParser.Kannotate, 0); }
public KeyWordsContext(ParserRuleContext parent, int invokingState) {
@@ -7080,14 +7806,14 @@ public T accept(ParseTreeVisitor extends T> visitor) {
public final KeyWordsContext keyWords() throws RecognitionException {
KeyWordsContext _localctx = new KeyWordsContext(_ctx, getState());
- enterRule(_localctx, 184, RULE_keyWords);
+ enterRule(_localctx, 200, RULE_keyWords);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(976);
+ setState(1073);
_la = _input.LA(1);
- if ( !(((((_la - 61)) & ~0x3f) == 0 && ((1L << (_la - 61)) & ((1L << (Kfor - 61)) | (1L << (Klet - 61)) | (1L << (Kwhere - 61)) | (1L << (Kgroup - 61)) | (1L << (Kby - 61)) | (1L << (Korder - 61)) | (1L << (Kreturn - 61)) | (1L << (Kif - 61)) | (1L << (Kin - 61)) | (1L << (Kas - 61)) | (1L << (Kat - 61)) | (1L << (Kallowing - 61)) | (1L << (Kempty - 61)) | (1L << (Kcount - 61)) | (1L << (Kstable - 61)) | (1L << (Kascending - 61)) | (1L << (Kdescending - 61)) | (1L << (Ksome - 61)) | (1L << (Kevery - 61)) | (1L << (Ksatisfies - 61)) | (1L << (Kcollation - 61)) | (1L << (Kgreatest - 61)) | (1L << (Kleast - 61)) | (1L << (Kswitch - 61)) | (1L << (Kcase - 61)) | (1L << (Ktry - 61)) | (1L << (Kcatch - 61)) | (1L << (Kdefault - 61)) | (1L << (Kthen - 61)) | (1L << (Kelse - 61)) | (1L << (Ktypeswitch - 61)) | (1L << (Kor - 61)) | (1L << (Kand - 61)) | (1L << (Knot - 61)) | (1L << (Kto - 61)) | (1L << (Kinstance - 61)) | (1L << (Kof - 61)) | (1L << (Kstatically - 61)) | (1L << (Kis - 61)) | (1L << (Ktreat - 61)) | (1L << (Kcast - 61)) | (1L << (Kcastable - 61)) | (1L << (Kversion - 61)) | (1L << (Kjsoniq - 61)) | (1L << (Kunordered - 61)) | (1L << (Ktrue - 61)) | (1L << (Kfalse - 61)) | (1L << (Ktype - 61)) | (1L << (Kvalidate - 61)) | (1L << (Kannotate - 61)) | (1L << (Kdeclare - 61)) | (1L << (Kcontext - 61)) | (1L << (Kitem - 61)) | (1L << (Kvariable - 61)) | (1L << (NullLiteral - 61)))) != 0)) ) {
+ if ( !(((((_la - 60)) & ~0x3f) == 0 && ((1L << (_la - 60)) & ((1L << (Kfor - 60)) | (1L << (Klet - 60)) | (1L << (Kwhere - 60)) | (1L << (Kgroup - 60)) | (1L << (Kby - 60)) | (1L << (Korder - 60)) | (1L << (Kreturn - 60)) | (1L << (Kif - 60)) | (1L << (Kin - 60)) | (1L << (Kas - 60)) | (1L << (Kat - 60)) | (1L << (Kallowing - 60)) | (1L << (Kempty - 60)) | (1L << (Kcount - 60)) | (1L << (Kstable - 60)) | (1L << (Kascending - 60)) | (1L << (Kdescending - 60)) | (1L << (Ksome - 60)) | (1L << (Kevery - 60)) | (1L << (Ksatisfies - 60)) | (1L << (Kcollation - 60)) | (1L << (Kgreatest - 60)) | (1L << (Kleast - 60)) | (1L << (Kswitch - 60)) | (1L << (Kcase - 60)) | (1L << (Ktry - 60)) | (1L << (Kcatch - 60)) | (1L << (Kdefault - 60)) | (1L << (Kthen - 60)) | (1L << (Kelse - 60)) | (1L << (Ktypeswitch - 60)) | (1L << (Kor - 60)) | (1L << (Kand - 60)) | (1L << (Knot - 60)) | (1L << (Kto - 60)) | (1L << (Kinstance - 60)) | (1L << (Kof - 60)) | (1L << (Kstatically - 60)) | (1L << (Kis - 60)) | (1L << (Ktreat - 60)) | (1L << (Kcast - 60)) | (1L << (Kcastable - 60)) | (1L << (Kversion - 60)) | (1L << (Kjsoniq - 60)) | (1L << (Kunordered - 60)) | (1L << (Ktrue - 60)) | (1L << (Kfalse - 60)) | (1L << (Ktype - 60)) | (1L << (Kvalidate - 60)) | (1L << (Kannotate - 60)) | (1L << (Kdeclare - 60)) | (1L << (Kcontext - 60)) | (1L << (Kitem - 60)) | (1L << (Kvariable - 60)) | (1L << (Kinsert - 60)) | (1L << (Kdelete - 60)) | (1L << (Krename - 60)) | (1L << (Kreplace - 60)) | (1L << (Kcopy - 60)) | (1L << (Kmodify - 60)) | (1L << (Kappend - 60)) | (1L << (Kinto - 60)) | (1L << (Kvalue - 60)) | (1L << (Kjson - 60)))) != 0) || ((((_la - 124)) & ~0x3f) == 0 && ((1L << (_la - 124)) & ((1L << (Kwith - 124)) | (1L << (Kposition - 124)) | (1L << (NullLiteral - 124)))) != 0)) ) {
_errHandler.recoverInline(this);
}
else {
@@ -7109,7 +7835,7 @@ public final KeyWordsContext keyWords() throws RecognitionException {
}
public static final String _serializedATN =
- "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u0080\u03d5\4\2\t"+
+ "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u008b\u0436\4\2\t"+
"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
@@ -7119,363 +7845,401 @@ public final KeyWordsContext keyWords() throws RecognitionException {
"\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+
"\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+
"\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+
- "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\3\2\3\2"+
- "\3\2\3\3\3\3\3\3\3\3\3\3\5\3\u00c5\n\3\3\3\3\3\5\3\u00c9\n\3\3\4\3\4\3"+
- "\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\5\6\u00d9\n\6\3\6\3\6\7"+
- "\6\u00dd\n\6\f\6\16\6\u00e0\13\6\3\6\3\6\3\6\7\6\u00e5\n\6\f\6\16\6\u00e8"+
- "\13\6\3\7\3\7\3\7\3\7\5\7\u00ee\n\7\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3"+
- "\t\3\t\5\t\u00fa\n\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\f\3\f\3"+
- "\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\5\r\u0110\n\r\3\r\3\r\3\r\3\r\7\r\u0116"+
- "\n\r\f\r\16\r\u0119\13\r\3\16\3\16\5\16\u011d\n\16\3\16\5\16\u0120\n\16"+
- "\3\16\3\16\5\16\u0124\n\16\3\17\3\17\3\20\3\20\3\20\3\20\3\20\5\20\u012d"+
- "\n\20\3\20\3\20\3\20\3\20\3\20\7\20\u0134\n\20\f\20\16\20\u0137\13\20"+
- "\5\20\u0139\n\20\3\21\3\21\3\21\3\21\3\21\5\21\u0140\n\21\3\21\3\21\3"+
- "\21\3\21\3\21\5\21\u0147\n\21\5\21\u0149\n\21\3\22\3\22\3\22\3\22\3\22"+
- "\5\22\u0150\n\22\3\22\3\22\3\22\3\22\3\22\5\22\u0157\n\22\5\22\u0159\n"+
- "\22\3\23\3\23\3\23\3\23\3\23\5\23\u0160\n\23\3\23\3\23\3\23\5\23\u0165"+
- "\n\23\3\23\3\23\5\23\u0169\n\23\3\23\3\23\5\23\u016d\n\23\3\24\3\24\3"+
- "\24\3\24\3\24\5\24\u0174\n\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25"+
- "\5\25\u017e\n\25\3\26\3\26\3\26\7\26\u0183\n\26\f\26\16\26\u0186\13\26"+
- "\3\27\3\27\3\27\3\27\5\27\u018c\n\27\3\30\3\30\3\30\7\30\u0191\n\30\f"+
- "\30\16\30\u0194\13\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31\5\31\u019d\n"+
- "\31\3\32\3\32\5\32\u01a1\n\32\3\32\3\32\3\32\3\32\3\32\3\32\7\32\u01a9"+
- "\n\32\f\32\16\32\u01ac\13\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\7\33\u01b5"+
- "\n\33\f\33\16\33\u01b8\13\33\3\34\3\34\3\34\5\34\u01bd\n\34\3\34\3\34"+
- "\5\34\u01c1\n\34\3\34\3\34\5\34\u01c5\n\34\3\34\3\34\3\34\3\35\3\35\3"+
- "\35\3\35\7\35\u01ce\n\35\f\35\16\35\u01d1\13\35\3\36\3\36\3\36\5\36\u01d6"+
- "\n\36\3\36\3\36\3\36\3\37\3\37\3\37\3 \3 \3 \3 \3 \7 \u01e3\n \f \16 "+
- "\u01e6\13 \3!\3!\3!\5!\u01eb\n!\3!\3!\5!\u01ef\n!\3!\3!\5!\u01f3\n!\3"+
- "\"\3\"\3\"\3\"\3\"\5\"\u01fa\n\"\3\"\3\"\3\"\7\"\u01ff\n\"\f\"\16\"\u0202"+
- "\13\"\3#\3#\3#\5#\u0207\n#\3#\3#\3#\5#\u020c\n#\5#\u020e\n#\3#\3#\5#\u0212"+
- "\n#\3$\3$\3$\3%\3%\5%\u0219\n%\3%\3%\3%\7%\u021e\n%\f%\16%\u0221\13%\3"+
- "%\3%\3%\3&\3&\3&\5&\u0229\n&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\6\'\u0233\n"+
- "\'\r\'\16\'\u0234\3\'\3\'\3\'\3\'\3(\3(\6(\u023d\n(\r(\16(\u023e\3(\3"+
- "(\3(\3)\3)\3)\3)\3)\6)\u0249\n)\r)\16)\u024a\3)\3)\5)\u024f\n)\3)\3)\3"+
- ")\3*\3*\3*\3*\5*\u0258\n*\3*\3*\3*\7*\u025d\n*\f*\16*\u0260\13*\3*\3*"+
- "\3*\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\6,\u0273\n,\r,\16,\u0274"+
- "\3-\3-\3-\5-\u027a\n-\3-\3-\3-\5-\u027f\n-\7-\u0281\n-\f-\16-\u0284\13"+
- "-\3-\3-\3-\3-\3.\3.\3.\7.\u028d\n.\f.\16.\u0290\13.\3/\3/\3/\7/\u0295"+
- "\n/\f/\16/\u0298\13/\3\60\5\60\u029b\n\60\3\60\3\60\3\61\3\61\3\61\5\61"+
- "\u02a2\n\61\3\62\3\62\3\62\7\62\u02a7\n\62\f\62\16\62\u02aa\13\62\3\63"+
- "\3\63\3\63\5\63\u02af\n\63\3\64\3\64\3\64\7\64\u02b4\n\64\f\64\16\64\u02b7"+
- "\13\64\3\65\3\65\3\65\7\65\u02bc\n\65\f\65\16\65\u02bf\13\65\3\66\3\66"+
- "\3\66\3\66\5\66\u02c5\n\66\3\67\3\67\3\67\3\67\5\67\u02cb\n\67\38\38\3"+
- "8\38\58\u02d1\n8\39\39\39\39\59\u02d7\n9\3:\3:\3:\3:\5:\u02dd\n:\3;\3"+
- ";\3;\3;\3;\3;\3;\7;\u02e6\n;\f;\16;\u02e9\13;\3<\3<\3<\5<\u02ee\n<\3="+
- "\7=\u02f1\n=\f=\16=\u02f4\13=\3=\3=\3>\3>\3>\5>\u02fb\n>\3?\3?\3?\3?\3"+
- "?\3?\3?\3@\3@\3@\3@\3@\3@\3@\3A\3A\3A\7A\u030e\nA\fA\16A\u0311\13A\3B"+
- "\3B\3B\3B\3B\3B\7B\u0319\nB\fB\16B\u031c\13B\3C\3C\3C\3C\3C\3C\3D\3D\3"+
- "D\3E\3E\3E\3E\3F\3F\3F\3F\3F\3F\3F\5F\u0332\nF\3G\3G\3G\3G\3G\3G\3G\3"+
- "G\3G\3G\3G\3G\3G\3G\5G\u0342\nG\3H\3H\3H\3I\3I\5I\u0349\nI\3I\3I\3J\3"+
- "J\3K\3K\3K\3K\3K\3L\3L\3L\3L\3L\3M\3M\3M\3N\3N\3N\5N\u035f\nN\7N\u0361"+
- "\nN\fN\16N\u0364\13N\3N\3N\3O\3O\5O\u036a\nO\3P\3P\5P\u036e\nP\3Q\3Q\3"+
- "Q\3Q\3R\3R\3R\5R\u0377\nR\3R\3R\3R\5R\u037c\nR\3R\3R\5R\u0380\nR\3R\3"+
- "R\3S\3S\3S\3S\3S\3S\5S\u038a\nS\5S\u038c\nS\3T\3T\3T\3T\7T\u0392\nT\f"+
- "T\16T\u0395\13T\5T\u0397\nT\3T\3T\3T\3T\3T\5T\u039e\nT\3U\3U\3U\5U\u03a3"+
- "\nU\3V\3V\5V\u03a7\nV\3W\3W\3W\3W\3W\3X\3X\3X\3X\3X\7X\u03b3\nX\fX\16"+
- "X\u03b6\13X\5X\u03b8\nX\3X\3X\3X\3X\3Y\3Y\5Y\u03c0\nY\3Z\3Z\5Z\u03c4\n"+
- "Z\3Z\3Z\3Z\3[\3[\5[\u03cb\n[\3[\3[\3\\\3\\\3]\3]\3^\3^\3^\2\2_\2\4\6\b"+
- "\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVX"+
- "Z\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\u008c\u008e\u0090"+
- "\u0092\u0094\u0096\u0098\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8"+
- "\u00aa\u00ac\u00ae\u00b0\u00b2\u00b4\u00b6\u00b8\u00ba\2\n\4\2\b\bkk\3"+
- "\2TU\3\2\13\24\4\2\6\6&\60\3\2\62\63\4\2%%\64\66\4\2\n\nvv\4\2?tww\2\u0408"+
- "\2\u00bc\3\2\2\2\4\u00c4\3\2\2\2\6\u00ca\3\2\2\2\b\u00cd\3\2\2\2\n\u00de"+
- "\3\2\2\2\f\u00ed\3\2\2\2\16\u00ef\3\2\2\2\20\u00f9\3\2\2\2\22\u00fb\3"+
- "\2\2\2\24\u0100\3\2\2\2\26\u0104\3\2\2\2\30\u010a\3\2\2\2\32\u011f\3\2"+
- "\2\2\34\u0125\3\2\2\2\36\u0127\3\2\2\2 \u013a\3\2\2\2\"\u014a\3\2\2\2"+
- "$\u015a\3\2\2\2&\u016e\3\2\2\2(\u017d\3\2\2\2*\u017f\3\2\2\2,\u0187\3"+
- "\2\2\2.\u018d\3\2\2\2\60\u019c\3\2\2\2\62\u01a0\3\2\2\2\64\u01b0\3\2\2"+
- "\2\66\u01b9\3\2\2\28\u01c9\3\2\2\2:\u01d2\3\2\2\2<\u01da\3\2\2\2>\u01dd"+
- "\3\2\2\2@\u01e7\3\2\2\2B\u01f9\3\2\2\2D\u0203\3\2\2\2F\u0213\3\2\2\2H"+
- "\u0218\3\2\2\2J\u0225\3\2\2\2L\u022d\3\2\2\2N\u023c\3\2\2\2P\u0243\3\2"+
- "\2\2R\u0253\3\2\2\2T\u0264\3\2\2\2V\u026d\3\2\2\2X\u0276\3\2\2\2Z\u0289"+
- "\3\2\2\2\\\u0291\3\2\2\2^\u029a\3\2\2\2`\u029e\3\2\2\2b\u02a3\3\2\2\2"+
- "d\u02ab\3\2\2\2f\u02b0\3\2\2\2h\u02b8\3\2\2\2j\u02c0\3\2\2\2l\u02c6\3"+
- "\2\2\2n\u02cc\3\2\2\2p\u02d2\3\2\2\2r\u02d8\3\2\2\2t\u02de\3\2\2\2v\u02ed"+
- "\3\2\2\2x\u02f2\3\2\2\2z\u02fa\3\2\2\2|\u02fc\3\2\2\2~\u0303\3\2\2\2\u0080"+
- "\u030a\3\2\2\2\u0082\u0312\3\2\2\2\u0084\u031d\3\2\2\2\u0086\u0323\3\2"+
- "\2\2\u0088\u0326\3\2\2\2\u008a\u032a\3\2\2\2\u008c\u0341\3\2\2\2\u008e"+
- "\u0343\3\2\2\2\u0090\u0346\3\2\2\2\u0092\u034c\3\2\2\2\u0094\u034e\3\2"+
- "\2\2\u0096\u0353\3\2\2\2\u0098\u0358\3\2\2\2\u009a\u035b\3\2\2\2\u009c"+
- "\u0369\3\2\2\2\u009e\u036d\3\2\2\2\u00a0\u036f\3\2\2\2\u00a2\u0373\3\2"+
- "\2\2\u00a4\u038b\3\2\2\2\u00a6\u039d\3\2\2\2\u00a8\u03a2\3\2\2\2\u00aa"+
- "\u03a6\3\2\2\2\u00ac\u03a8\3\2\2\2\u00ae\u03ad\3\2\2\2\u00b0\u03bd\3\2"+
- "\2\2\u00b2\u03c3\3\2\2\2\u00b4\u03c8\3\2\2\2\u00b6\u03ce\3\2\2\2\u00b8"+
- "\u03d0\3\2\2\2\u00ba\u03d2\3\2\2\2\u00bc\u00bd\5\4\3\2\u00bd\u00be\7\2"+
- "\2\3\u00be\3\3\2\2\2\u00bf\u00c0\7j\2\2\u00c0\u00c1\7i\2\2\u00c1\u00c2"+
- "\5\u00b8]\2\u00c2\u00c3\7\3\2\2\u00c3\u00c5\3\2\2\2\u00c4\u00bf\3\2\2"+
- "\2\u00c4\u00c5\3\2\2\2\u00c5\u00c8\3\2\2\2\u00c6\u00c9\5\b\5\2\u00c7\u00c9"+
- "\5\6\4\2\u00c8\u00c6\3\2\2\2\u00c8\u00c7\3\2\2\2\u00c9\5\3\2\2\2\u00ca"+
- "\u00cb\5\n\6\2\u00cb\u00cc\5.\30\2\u00cc\7\3\2\2\2\u00cd\u00ce\7\4\2\2"+
- "\u00ce\u00cf\7\5\2\2\u00cf\u00d0\7~\2\2\u00d0\u00d1\7\6\2\2\u00d1\u00d2"+
- "\5\u00b6\\\2\u00d2\u00d3\7\3\2\2\u00d3\u00d4\5\n\6\2\u00d4\t\3\2\2\2\u00d5"+
- "\u00d9\5\f\7\2\u00d6\u00d9\5\16\b\2\u00d7\u00d9\5\36\20\2\u00d8\u00d5"+
- "\3\2\2\2\u00d8\u00d6\3\2\2\2\u00d8\u00d7\3\2\2\2\u00d9\u00da\3\2\2\2\u00da"+
- "\u00db\7\3\2\2\u00db\u00dd\3\2\2\2\u00dc\u00d8\3\2\2\2\u00dd\u00e0\3\2"+
- "\2\2\u00de\u00dc\3\2\2\2\u00de\u00df\3\2\2\2\u00df\u00e6\3\2\2\2\u00e0"+
- "\u00de\3\2\2\2\u00e1\u00e2\5\20\t\2\u00e2\u00e3\7\3\2\2\u00e3\u00e5\3"+
- "\2\2\2\u00e4\u00e1\3\2\2\2\u00e5\u00e8\3\2\2\2\u00e6\u00e4\3\2\2\2\u00e6"+
- "\u00e7\3\2\2\2\u00e7\13\3\2\2\2\u00e8\u00e6\3\2\2\2\u00e9\u00ee\5\22\n"+
- "\2\u00ea\u00ee\5\24\13\2\u00eb\u00ee\5\26\f\2\u00ec\u00ee\5\30\r\2\u00ed"+
- "\u00e9\3\2\2\2\u00ed\u00ea\3\2\2\2\u00ed\u00eb\3\2\2\2\u00ed\u00ec\3\2"+
- "\2\2\u00ee\r\3\2\2\2\u00ef\u00f0\7q\2\2\u00f0\u00f1\7\5\2\2\u00f1\u00f2"+
- "\7~\2\2\u00f2\u00f3\7\6\2\2\u00f3\u00f4\5\u00b6\\\2\u00f4\17\3\2\2\2\u00f5"+
- "\u00fa\5$\23\2\u00f6\u00fa\5 \21\2\u00f7\u00fa\5&\24\2\u00f8\u00fa\5\""+
- "\22\2\u00f9\u00f5\3\2\2\2\u00f9\u00f6\3\2\2\2\u00f9\u00f7\3\2\2\2\u00f9"+
- "\u00f8\3\2\2\2\u00fa\21\3\2\2\2\u00fb\u00fc\7q\2\2\u00fc\u00fd\7Z\2\2"+
- "\u00fd\u00fe\7S\2\2\u00fe\u00ff\5\u00b6\\\2\u00ff\23\3\2\2\2\u0100\u0101"+
- "\7q\2\2\u0101\u0102\7\7\2\2\u0102\u0103\t\2\2\2\u0103\25\3\2\2\2\u0104"+
- "\u0105\7q\2\2\u0105\u0106\7Z\2\2\u0106\u0107\7D\2\2\u0107\u0108\7K\2\2"+
- "\u0108\u0109\t\3\2\2\u0109\27\3\2\2\2\u010a\u010f\7q\2\2\u010b\u010c\7"+
- "\t\2\2\u010c\u0110\5\32\16\2\u010d\u010e\7Z\2\2\u010e\u0110\7\t\2\2\u010f"+
- "\u010b\3\2\2\2\u010f\u010d\3\2\2\2\u0110\u0117\3\2\2\2\u0111\u0112\5\34"+
- "\17\2\u0112\u0113\7\6\2\2\u0113\u0114\5\u00b8]\2\u0114\u0116\3\2\2\2\u0115"+
- "\u0111\3\2\2\2\u0116\u0119\3\2\2\2\u0117\u0115\3\2\2\2\u0117\u0118\3\2"+
- "\2\2\u0118\31\3\2\2\2\u0119\u0117\3\2\2\2\u011a\u011d\7~\2\2\u011b\u011d"+
- "\5\u00ba^\2\u011c\u011a\3\2\2\2\u011c\u011b\3\2\2\2\u011d\u011e\3\2\2"+
- "\2\u011e\u0120\7\n\2\2\u011f\u011c\3\2\2\2\u011f\u0120\3\2\2\2\u0120\u0123"+
- "\3\2\2\2\u0121\u0124\7~\2\2\u0122\u0124\5\u00ba^\2\u0123\u0121\3\2\2\2"+
- "\u0123\u0122\3\2\2\2\u0124\33\3\2\2\2\u0125\u0126\t\4\2\2\u0126\35\3\2"+
- "\2\2\u0127\u0128\7\25\2\2\u0128\u012c\7\4\2\2\u0129\u012a\7\5\2\2\u012a"+
- "\u012b\7~\2\2\u012b\u012d\7\6\2\2\u012c\u0129\3\2\2\2\u012c\u012d\3\2"+
- "\2\2\u012d\u012e\3\2\2\2\u012e\u0138\5\u00b6\\\2\u012f\u0130\7I\2\2\u0130"+
- "\u0135\5\u00b6\\\2\u0131\u0132\7\26\2\2\u0132\u0134\5\u00b6\\\2\u0133"+
- "\u0131\3\2\2\2\u0134\u0137\3\2\2\2\u0135\u0133\3\2\2\2\u0135\u0136\3\2"+
- "\2\2\u0136\u0139\3\2\2\2\u0137\u0135\3\2\2\2\u0138\u012f\3\2\2\2\u0138"+
- "\u0139\3\2\2\2\u0139\37\3\2\2\2\u013a\u013b\7q\2\2\u013b\u013c\7t\2\2"+
- "\u013c\u013f\5\u008eH\2\u013d\u013e\7H\2\2\u013e\u0140\5\u00a4S\2\u013f"+
- "\u013d\3\2\2\2\u013f\u0140\3\2\2\2\u0140\u0148\3\2\2\2\u0141\u0142\7\27"+
- "\2\2\u0142\u0149\5\60\31\2\u0143\u0146\7\30\2\2\u0144\u0145\7\27\2\2\u0145"+
- "\u0147\5\60\31\2\u0146\u0144\3\2\2\2\u0146\u0147\3\2\2\2\u0147\u0149\3"+
- "\2\2\2\u0148\u0141\3\2\2\2\u0148\u0143\3\2\2\2\u0149!\3\2\2\2\u014a\u014b"+
- "\7q\2\2\u014b\u014c\7r\2\2\u014c\u014f\7s\2\2\u014d\u014e\7H\2\2\u014e"+
- "\u0150\5\u00a4S\2\u014f\u014d\3\2\2\2\u014f\u0150\3\2\2\2\u0150\u0158"+
- "\3\2\2\2\u0151\u0152\7\27\2\2\u0152\u0159\5\60\31\2\u0153\u0156\7\30\2"+
- "\2\u0154\u0155\7\27\2\2\u0155\u0157\5\60\31\2\u0156\u0154\3\2\2\2\u0156"+
- "\u0157\3\2\2\2\u0157\u0159\3\2\2\2\u0158\u0151\3\2\2\2\u0158\u0153\3\2"+
- "\2\2\u0159#\3\2\2\2\u015a\u015b\7q\2\2\u015b\u015c\7\31\2\2\u015c\u015d"+
- "\5\32\16\2\u015d\u015f\7\32\2\2\u015e\u0160\5*\26\2\u015f\u015e\3\2\2"+
- "\2\u015f\u0160\3\2\2\2\u0160\u0161\3\2\2\2\u0161\u0164\7\33\2\2\u0162"+
- "\u0163\7H\2\2\u0163\u0165\5\u00a4S\2\u0164\u0162\3\2\2\2\u0164\u0165\3"+
- "\2\2\2\u0165\u016c\3\2\2\2\u0166\u0168\7\34\2\2\u0167\u0169\5.\30\2\u0168"+
- "\u0167\3\2\2\2\u0168\u0169\3\2\2\2\u0169\u016a\3\2\2\2\u016a\u016d\7\35"+
- "\2\2\u016b\u016d\7\30\2\2\u016c\u0166\3\2\2\2\u016c\u016b\3\2\2\2\u016d"+
- "%\3\2\2\2\u016e\u016f\7q\2\2\u016f\u0170\7n\2\2\u0170\u0171\5\32\16\2"+
- "\u0171\u0173\7H\2\2\u0172\u0174\5(\25\2\u0173\u0172\3\2\2\2\u0173\u0174"+
- "\3\2\2\2\u0174\u0175\3\2\2\2\u0175\u0176\5\60\31\2\u0176\'\3\2\2\2\u0177"+
- "\u0178\7\36\2\2\u0178\u017e\7\37\2\2\u0179\u017a\7\36\2\2\u017a\u017e"+
- "\7 \2\2\u017b\u017c\7!\2\2\u017c\u017e\7\"\2\2\u017d\u0177\3\2\2\2\u017d"+
- "\u0179\3\2\2\2\u017d\u017b\3\2\2\2\u017e)\3\2\2\2\u017f\u0184\5,\27\2"+
- "\u0180\u0181\7\26\2\2\u0181\u0183\5,\27\2\u0182\u0180\3\2\2\2\u0183\u0186"+
- "\3\2\2\2\u0184\u0182\3\2\2\2\u0184\u0185\3\2\2\2\u0185+\3\2\2\2\u0186"+
- "\u0184\3\2\2\2\u0187\u0188\7#\2\2\u0188\u018b\5\32\16\2\u0189\u018a\7"+
- "H\2\2\u018a\u018c\5\u00a4S\2\u018b\u0189\3\2\2\2\u018b\u018c\3\2\2\2\u018c"+
- "-\3\2\2\2\u018d\u0192\5\60\31\2\u018e\u018f\7\26\2\2\u018f\u0191\5\60"+
- "\31\2\u0190\u018e\3\2\2\2\u0191\u0194\3\2\2\2\u0192\u0190\3\2\2\2\u0192"+
- "\u0193\3\2\2\2\u0193/\3\2\2\2\u0194\u0192\3\2\2\2\u0195\u019d\5\62\32"+
- "\2\u0196\u019d\5H%\2\u0197\u019d\5L\'\2\u0198\u019d\5P)\2\u0199\u019d"+
- "\5T+\2\u019a\u019d\5V,\2\u019b\u019d\5Z.\2\u019c\u0195\3\2\2\2\u019c\u0196"+
- "\3\2\2\2\u019c\u0197\3\2\2\2\u019c\u0198\3\2\2\2\u019c\u0199\3\2\2\2\u019c"+
- "\u019a\3\2\2\2\u019c\u019b\3\2\2\2\u019d\61\3\2\2\2\u019e\u01a1\5\64\33"+
- "\2\u019f\u01a1\58\35\2\u01a0\u019e\3\2\2\2\u01a0\u019f\3\2\2\2\u01a1\u01aa"+
- "\3\2\2\2\u01a2\u01a9\5\64\33\2\u01a3\u01a9\5<\37\2\u01a4\u01a9\58\35\2"+
- "\u01a5\u01a9\5> \2\u01a6\u01a9\5B\"\2\u01a7\u01a9\5F$\2\u01a8\u01a2\3"+
- "\2\2\2\u01a8\u01a3\3\2\2\2\u01a8\u01a4\3\2\2\2\u01a8\u01a5\3\2\2\2\u01a8"+
- "\u01a6\3\2\2\2\u01a8\u01a7\3\2\2\2\u01a9\u01ac\3\2\2\2\u01aa\u01a8\3\2"+
- "\2\2\u01aa\u01ab\3\2\2\2\u01ab\u01ad\3\2\2\2\u01ac\u01aa\3\2\2\2\u01ad"+
- "\u01ae\7E\2\2\u01ae\u01af\5\60\31\2\u01af\63\3\2\2\2\u01b0\u01b1\7?\2"+
- "\2\u01b1\u01b6\5\66\34\2\u01b2\u01b3\7\26\2\2\u01b3\u01b5\5\66\34\2\u01b4"+
- "\u01b2\3\2\2\2\u01b5\u01b8\3\2\2\2\u01b6\u01b4\3\2\2\2\u01b6\u01b7\3\2"+
- "\2\2\u01b7\65\3\2\2\2\u01b8\u01b6\3\2\2\2\u01b9\u01bc\5\u008eH\2\u01ba"+
- "\u01bb\7H\2\2\u01bb\u01bd\5\u00a4S\2\u01bc\u01ba\3\2\2\2\u01bc\u01bd\3"+
- "\2\2\2\u01bd\u01c0\3\2\2\2\u01be\u01bf\7J\2\2\u01bf\u01c1\7K\2\2\u01c0"+
- "\u01be\3\2\2\2\u01c0\u01c1\3\2\2\2\u01c1\u01c4\3\2\2\2\u01c2\u01c3\7I"+
- "\2\2\u01c3\u01c5\5\u008eH\2\u01c4\u01c2\3\2\2\2\u01c4\u01c5\3\2\2\2\u01c5"+
- "\u01c6\3\2\2\2\u01c6\u01c7\7G\2\2\u01c7\u01c8\5\60\31\2\u01c8\67\3\2\2"+
- "\2\u01c9\u01ca\7@\2\2\u01ca\u01cf\5:\36\2\u01cb\u01cc\7\26\2\2\u01cc\u01ce"+
- "\5:\36\2\u01cd\u01cb\3\2\2\2\u01ce\u01d1\3\2\2\2\u01cf\u01cd\3\2\2\2\u01cf"+
- "\u01d0\3\2\2\2\u01d09\3\2\2\2\u01d1\u01cf\3\2\2\2\u01d2\u01d5\5\u008e"+
- "H\2\u01d3\u01d4\7H\2\2\u01d4\u01d6\5\u00a4S\2\u01d5\u01d3\3\2\2\2\u01d5"+
- "\u01d6\3\2\2\2\u01d6\u01d7\3\2\2\2\u01d7\u01d8\7\27\2\2\u01d8\u01d9\5"+
- "\60\31\2\u01d9;\3\2\2\2\u01da\u01db\7A\2\2\u01db\u01dc\5\60\31\2\u01dc"+
- "=\3\2\2\2\u01dd\u01de\7B\2\2\u01de\u01df\7C\2\2\u01df\u01e4\5@!\2\u01e0"+
- "\u01e1\7\26\2\2\u01e1\u01e3\5@!\2\u01e2\u01e0\3\2\2\2\u01e3\u01e6\3\2"+
- "\2\2\u01e4\u01e2\3\2\2\2\u01e4\u01e5\3\2\2\2\u01e5?\3\2\2\2\u01e6\u01e4"+
- "\3\2\2\2\u01e7\u01ee\5\u008eH\2\u01e8\u01e9\7H\2\2\u01e9\u01eb\5\u00a4"+
- "S\2\u01ea\u01e8\3\2\2\2\u01ea\u01eb\3\2\2\2\u01eb\u01ec\3\2\2\2\u01ec"+
- "\u01ed\7\27\2\2\u01ed\u01ef\5\60\31\2\u01ee\u01ea\3\2\2\2\u01ee\u01ef"+
- "\3\2\2\2\u01ef\u01f2\3\2\2\2\u01f0\u01f1\7S\2\2\u01f1\u01f3\5\u00b6\\"+
- "\2\u01f2\u01f0\3\2\2\2\u01f2\u01f3\3\2\2\2\u01f3A\3\2\2\2\u01f4\u01f5"+
- "\7D\2\2\u01f5\u01fa\7C\2\2\u01f6\u01f7\7M\2\2\u01f7\u01f8\7D\2\2\u01f8"+
- "\u01fa\7C\2\2\u01f9\u01f4\3\2\2\2\u01f9\u01f6\3\2\2\2\u01fa\u01fb\3\2"+
- "\2\2\u01fb\u0200\5D#\2\u01fc\u01fd\7\26\2\2\u01fd\u01ff\5D#\2\u01fe\u01fc"+
- "\3\2\2\2\u01ff\u0202\3\2\2\2\u0200\u01fe\3\2\2\2\u0200\u0201\3\2\2\2\u0201"+
- "C\3\2\2\2\u0202\u0200\3\2\2\2\u0203\u0206\5\60\31\2\u0204\u0207\7N\2\2"+
- "\u0205\u0207\7O\2\2\u0206\u0204\3\2\2\2\u0206\u0205\3\2\2\2\u0206\u0207"+
- "\3\2\2\2\u0207\u020d\3\2\2\2\u0208\u020b\7K\2\2\u0209\u020c\7T\2\2\u020a"+
- "\u020c\7U\2\2\u020b\u0209\3\2\2\2\u020b\u020a\3\2\2\2\u020c\u020e\3\2"+
- "\2\2\u020d\u0208\3\2\2\2\u020d\u020e\3\2\2\2\u020e\u0211\3\2\2\2\u020f"+
- "\u0210\7S\2\2\u0210\u0212\5\u00b6\\\2\u0211\u020f\3\2\2\2\u0211\u0212"+
- "\3\2\2\2\u0212E\3\2\2\2\u0213\u0214\7L\2\2\u0214\u0215\5\u008eH\2\u0215"+
- "G\3\2\2\2\u0216\u0219\7P\2\2\u0217\u0219\7Q\2\2\u0218\u0216\3\2\2\2\u0218"+
- "\u0217\3\2\2\2\u0219\u021a\3\2\2\2\u021a\u021f\5J&\2\u021b\u021c\7\26"+
- "\2\2\u021c\u021e\5J&\2\u021d\u021b\3\2\2\2\u021e\u0221\3\2\2\2\u021f\u021d"+
- "\3\2\2\2\u021f\u0220\3\2\2\2\u0220\u0222\3\2\2\2\u0221\u021f\3\2\2\2\u0222"+
- "\u0223\7R\2\2\u0223\u0224\5\60\31\2\u0224I\3\2\2\2\u0225\u0228\5\u008e"+
- "H\2\u0226\u0227\7H\2\2\u0227\u0229\5\u00a4S\2\u0228\u0226\3\2\2\2\u0228"+
- "\u0229\3\2\2\2\u0229\u022a\3\2\2\2\u022a\u022b\7G\2\2\u022b\u022c\5\60"+
- "\31\2\u022cK\3\2\2\2\u022d\u022e\7V\2\2\u022e\u022f\7\32\2\2\u022f\u0230"+
- "\5.\30\2\u0230\u0232\7\33\2\2\u0231\u0233\5N(\2\u0232\u0231\3\2\2\2\u0233"+
- "\u0234\3\2\2\2\u0234\u0232\3\2\2\2\u0234\u0235\3\2\2\2\u0235\u0236\3\2"+
- "\2\2\u0236\u0237\7Z\2\2\u0237\u0238\7E\2\2\u0238\u0239\5\60\31\2\u0239"+
- "M\3\2\2\2\u023a\u023b\7W\2\2\u023b\u023d\5\60\31\2\u023c\u023a\3\2\2\2"+
- "\u023d\u023e\3\2\2\2\u023e\u023c\3\2\2\2\u023e\u023f\3\2\2\2\u023f\u0240"+
- "\3\2\2\2\u0240\u0241\7E\2\2\u0241\u0242\5\60\31\2\u0242O\3\2\2\2\u0243"+
- "\u0244\7]\2\2\u0244\u0245\7\32\2\2\u0245\u0246\5.\30\2\u0246\u0248\7\33"+
- "\2\2\u0247\u0249\5R*\2\u0248\u0247\3\2\2\2\u0249\u024a\3\2\2\2\u024a\u0248"+
- "\3\2\2\2\u024a\u024b\3\2\2\2\u024b\u024c\3\2\2\2\u024c\u024e\7Z\2\2\u024d"+
- "\u024f\5\u008eH\2\u024e\u024d\3\2\2\2\u024e\u024f\3\2\2\2\u024f\u0250"+
- "\3\2\2\2\u0250\u0251\7E\2\2\u0251\u0252\5\60\31\2\u0252Q\3\2\2\2\u0253"+
- "\u0257\7W\2\2\u0254\u0255\5\u008eH\2\u0255\u0256\7H\2\2\u0256\u0258\3"+
- "\2\2\2\u0257\u0254\3\2\2\2\u0257\u0258\3\2\2\2\u0258\u0259\3\2\2\2\u0259"+
- "\u025e\5\u00a4S\2\u025a\u025b\7$\2\2\u025b\u025d\5\u00a4S\2\u025c\u025a"+
- "\3\2\2\2\u025d\u0260\3\2\2\2\u025e\u025c\3\2\2\2\u025e\u025f\3\2\2\2\u025f"+
- "\u0261\3\2\2\2\u0260\u025e\3\2\2\2\u0261\u0262\7E\2\2\u0262\u0263\5\60"+
- "\31\2\u0263S\3\2\2\2\u0264\u0265\7F\2\2\u0265\u0266\7\32\2\2\u0266\u0267"+
- "\5.\30\2\u0267\u0268\7\33\2\2\u0268\u0269\7[\2\2\u0269\u026a\5\60\31\2"+
- "\u026a\u026b\7\\\2\2\u026b\u026c\5\60\31\2\u026cU\3\2\2\2\u026d\u026e"+
- "\7X\2\2\u026e\u026f\7\34\2\2\u026f\u0270\5.\30\2\u0270\u0272\7\35\2\2"+
- "\u0271\u0273\5X-\2\u0272\u0271\3\2\2\2\u0273\u0274\3\2\2\2\u0274\u0272"+
- "\3\2\2\2\u0274\u0275\3\2\2\2\u0275W\3\2\2\2\u0276\u0279\7Y\2\2\u0277\u027a"+
- "\7%\2\2\u0278\u027a\5\32\16\2\u0279\u0277\3\2\2\2\u0279\u0278\3\2\2\2"+
- "\u027a\u0282\3\2\2\2\u027b\u027e\7$\2\2\u027c\u027f\7%\2\2\u027d\u027f"+
- "\5\32\16\2\u027e\u027c\3\2\2\2\u027e\u027d\3\2\2\2\u027f\u0281\3\2\2\2"+
- "\u0280\u027b\3\2\2\2\u0281\u0284\3\2\2\2\u0282\u0280\3\2\2\2\u0282\u0283"+
- "\3\2\2\2\u0283\u0285\3\2\2\2\u0284\u0282\3\2\2\2\u0285\u0286\7\34\2\2"+
- "\u0286\u0287\5.\30\2\u0287\u0288\7\35\2\2\u0288Y\3\2\2\2\u0289\u028e\5"+
- "\\/\2\u028a\u028b\7^\2\2\u028b\u028d\5\\/\2\u028c\u028a\3\2\2\2\u028d"+
- "\u0290\3\2\2\2\u028e\u028c\3\2\2\2\u028e\u028f\3\2\2\2\u028f[\3\2\2\2"+
- "\u0290\u028e\3\2\2\2\u0291\u0296\5^\60\2\u0292\u0293\7_\2\2\u0293\u0295"+
- "\5^\60\2\u0294\u0292\3\2\2\2\u0295\u0298\3\2\2\2\u0296\u0294\3\2\2\2\u0296"+
- "\u0297\3\2\2\2\u0297]\3\2\2\2\u0298\u0296\3\2\2\2\u0299\u029b\7`\2\2\u029a"+
- "\u0299\3\2\2\2\u029a\u029b\3\2\2\2\u029b\u029c\3\2\2\2\u029c\u029d\5`"+
- "\61\2\u029d_\3\2\2\2\u029e\u02a1\5b\62\2\u029f\u02a0\t\5\2\2\u02a0\u02a2"+
- "\5b\62\2\u02a1\u029f\3\2\2\2\u02a1\u02a2\3\2\2\2\u02a2a\3\2\2\2\u02a3"+
- "\u02a8\5d\63\2\u02a4\u02a5\7\61\2\2\u02a5\u02a7\5d\63\2\u02a6\u02a4\3"+
- "\2\2\2\u02a7\u02aa\3\2\2\2\u02a8\u02a6\3\2\2\2\u02a8\u02a9\3\2\2\2\u02a9"+
- "c\3\2\2\2\u02aa\u02a8\3\2\2\2\u02ab\u02ae\5f\64\2\u02ac\u02ad\7a\2\2\u02ad"+
- "\u02af\5f\64\2\u02ae\u02ac\3\2\2\2\u02ae\u02af\3\2\2\2\u02afe\3\2\2\2"+
- "\u02b0\u02b5\5h\65\2\u02b1\u02b2\t\6\2\2\u02b2\u02b4\5h\65\2\u02b3\u02b1"+
- "\3\2\2\2\u02b4\u02b7\3\2\2\2\u02b5\u02b3\3\2\2\2\u02b5\u02b6\3\2\2\2\u02b6"+
- "g\3\2\2\2\u02b7\u02b5\3\2\2\2\u02b8\u02bd\5j\66\2\u02b9\u02ba\t\7\2\2"+
- "\u02ba\u02bc\5j\66\2\u02bb\u02b9\3\2\2\2\u02bc\u02bf\3\2\2\2\u02bd\u02bb"+
- "\3\2\2\2\u02bd\u02be\3\2\2\2\u02bei\3\2\2\2\u02bf\u02bd\3\2\2\2\u02c0"+
- "\u02c4\5l\67\2\u02c1\u02c2\7b\2\2\u02c2\u02c3\7c\2\2\u02c3\u02c5\5\u00a4"+
- "S\2\u02c4\u02c1\3\2\2\2\u02c4\u02c5\3\2\2\2\u02c5k\3\2\2\2\u02c6\u02ca"+
- "\5n8\2\u02c7\u02c8\7e\2\2\u02c8\u02c9\7d\2\2\u02c9\u02cb\5\u00a4S\2\u02ca"+
- "\u02c7\3\2\2\2\u02ca\u02cb\3\2\2\2\u02cbm\3\2\2\2\u02cc\u02d0\5p9\2\u02cd"+
- "\u02ce\7f\2\2\u02ce\u02cf\7H\2\2\u02cf\u02d1\5\u00a4S\2\u02d0\u02cd\3"+
- "\2\2\2\u02d0\u02d1\3\2\2\2\u02d1o\3\2\2\2\u02d2\u02d6\5r:\2\u02d3\u02d4"+
- "\7h\2\2\u02d4\u02d5\7H\2\2\u02d5\u02d7\5\u00b0Y\2\u02d6\u02d3\3\2\2\2"+
- "\u02d6\u02d7\3\2\2\2\u02d7q\3\2\2\2\u02d8\u02dc\5t;\2\u02d9\u02da\7g\2"+
- "\2\u02da\u02db\7H\2\2\u02db\u02dd\5\u00b0Y\2\u02dc\u02d9\3\2\2\2\u02dc"+
- "\u02dd\3\2\2\2\u02dds\3\2\2\2\u02de\u02e7\5x=\2\u02df\u02e0\7\6\2\2\u02e0"+
- "\u02e1\7/\2\2\u02e1\u02e2\3\2\2\2\u02e2\u02e3\5v<\2\u02e3\u02e4\5\u009a"+
- "N\2\u02e4\u02e6\3\2\2\2\u02e5\u02df\3\2\2\2\u02e6\u02e9\3\2\2\2\u02e7"+
- "\u02e5\3\2\2\2\u02e7\u02e8\3\2\2\2\u02e8u\3\2\2\2\u02e9\u02e7\3\2\2\2"+
- "\u02ea\u02ee\5\32\16\2\u02eb\u02ee\5\u008eH\2\u02ec\u02ee\5\u0090I\2\u02ed"+
- "\u02ea\3\2\2\2\u02ed\u02eb\3\2\2\2\u02ed\u02ec\3\2\2\2\u02eew\3\2\2\2"+
- "\u02ef\u02f1\t\6\2\2\u02f0\u02ef\3\2\2\2\u02f1\u02f4\3\2\2\2\u02f2\u02f0"+
- "\3\2\2\2\u02f2\u02f3\3\2\2\2\u02f3\u02f5\3\2\2\2\u02f4\u02f2\3\2\2\2\u02f5"+
- "\u02f6\5z>\2\u02f6y\3\2\2\2\u02f7\u02fb\5\u0080A\2\u02f8\u02fb\5|?\2\u02f9"+
- "\u02fb\5~@\2\u02fa\u02f7\3\2\2\2\u02fa\u02f8\3\2\2\2\u02fa\u02f9\3\2\2"+
- "\2\u02fb{\3\2\2\2\u02fc\u02fd\7o\2\2\u02fd\u02fe\7n\2\2\u02fe\u02ff\5"+
- "\u00a4S\2\u02ff\u0300\7\34\2\2\u0300\u0301\5.\30\2\u0301\u0302\7\35\2"+
- "\2\u0302}\3\2\2\2\u0303\u0304\7p\2\2\u0304\u0305\7n\2\2\u0305\u0306\5"+
- "\u00a4S\2\u0306\u0307\7\34\2\2\u0307\u0308\5.\30\2\u0308\u0309\7\35\2"+
- "\2\u0309\177\3\2\2\2\u030a\u030f\5\u0082B\2\u030b\u030c\7\67\2\2\u030c"+
- "\u030e\5\u0082B\2\u030d\u030b\3\2\2\2\u030e\u0311\3\2\2\2\u030f\u030d"+
- "\3\2\2\2\u030f\u0310\3\2\2\2\u0310\u0081\3\2\2\2\u0311\u030f\3\2\2\2\u0312"+
- "\u031a\5\u008cG\2\u0313\u0319\5\u0084C\2\u0314\u0319\5\u0088E\2\u0315"+
- "\u0319\5\u008aF\2\u0316\u0319\5\u0086D\2\u0317\u0319\5\u009aN\2\u0318"+
- "\u0313\3\2\2\2\u0318\u0314\3\2\2\2\u0318\u0315\3\2\2\2\u0318\u0316\3\2"+
- "\2\2\u0318\u0317\3\2\2\2\u0319\u031c\3\2\2\2\u031a\u0318\3\2\2\2\u031a"+
- "\u031b\3\2\2\2\u031b\u0083\3\2\2\2\u031c\u031a\3\2\2\2\u031d\u031e\78"+
- "\2\2\u031e\u031f\78\2\2\u031f\u0320\5.\30\2\u0320\u0321\79\2\2\u0321\u0322"+
- "\79\2\2\u0322\u0085\3\2\2\2\u0323\u0324\78\2\2\u0324\u0325\79\2\2\u0325"+
- "\u0087\3\2\2\2\u0326\u0327\78\2\2\u0327\u0328\5.\30\2\u0328\u0329\79\2"+
- "\2\u0329\u0089\3\2\2\2\u032a\u0331\7:\2\2\u032b\u0332\5\u00ba^\2\u032c"+
- "\u0332\5\u00b8]\2\u032d\u0332\7~\2\2\u032e\u0332\5\u0090I\2\u032f\u0332"+
- "\5\u008eH\2\u0330\u0332\5\u0092J\2\u0331\u032b\3\2\2\2\u0331\u032c\3\2"+
- "\2\2\u0331\u032d\3\2\2\2\u0331\u032e\3\2\2\2\u0331\u032f\3\2\2\2\u0331"+
- "\u0330\3\2\2\2\u0332\u008b\3\2\2\2\u0333\u0342\7w\2\2\u0334\u0342\7l\2"+
- "\2\u0335\u0342\7m\2\2\u0336\u0342\7x\2\2\u0337\u0342\5\u00b8]\2\u0338"+
- "\u0342\5\u008eH\2\u0339\u0342\5\u0090I\2\u033a\u0342\5\u0092J\2\u033b"+
- "\u0342\5\u00a6T\2\u033c\u0342\5\u0098M\2\u033d\u0342\5\u0094K\2\u033e"+
- "\u0342\5\u0096L\2\u033f\u0342\5\u00b4[\2\u0340\u0342\5\u009eP\2\u0341"+
- "\u0333\3\2\2\2\u0341\u0334\3\2\2\2\u0341\u0335\3\2\2\2\u0341\u0336\3\2"+
- "\2\2\u0341\u0337\3\2\2\2\u0341\u0338\3\2\2\2\u0341\u0339\3\2\2\2\u0341"+
- "\u033a\3\2\2\2\u0341\u033b\3\2\2\2\u0341\u033c\3\2\2\2\u0341\u033d\3\2"+
- "\2\2\u0341\u033e\3\2\2\2\u0341\u033f\3\2\2\2\u0341\u0340\3\2\2\2\u0342"+
- "\u008d\3\2\2\2\u0343\u0344\7#\2\2\u0344\u0345\5\32\16\2\u0345\u008f\3"+
- "\2\2\2\u0346\u0348\7\32\2\2\u0347\u0349\5.\30\2\u0348\u0347\3\2\2\2\u0348"+
- "\u0349\3\2\2\2\u0349\u034a\3\2\2\2\u034a\u034b\7\33\2\2\u034b\u0091\3"+
- "\2\2\2\u034c\u034d\7;\2\2\u034d\u0093\3\2\2\2\u034e\u034f\7\b\2\2\u034f"+
- "\u0350\7\34\2\2\u0350\u0351\5.\30\2\u0351\u0352\7\35\2\2\u0352\u0095\3"+
- "\2\2\2\u0353\u0354\7k\2\2\u0354\u0355\7\34\2\2\u0355\u0356\5.\30\2\u0356"+
- "\u0357\7\35\2\2\u0357\u0097\3\2\2\2\u0358\u0359\5\32\16\2\u0359\u035a"+
- "\5\u009aN\2\u035a\u0099\3\2\2\2\u035b\u0362\7\32\2\2\u035c\u035e\5\u009c"+
- "O\2\u035d\u035f\7\26\2\2\u035e\u035d\3\2\2\2\u035e\u035f\3\2\2\2\u035f"+
- "\u0361\3\2\2\2\u0360\u035c\3\2\2\2\u0361\u0364\3\2\2\2\u0362\u0360\3\2"+
- "\2\2\u0362\u0363\3\2\2\2\u0363\u0365\3\2\2\2\u0364\u0362\3\2\2\2\u0365"+
- "\u0366\7\33\2\2\u0366\u009b\3\2\2\2\u0367\u036a\5\60\31\2\u0368\u036a"+
- "\7v\2\2\u0369\u0367\3\2\2\2\u0369\u0368\3\2\2\2\u036a\u009d\3\2\2\2\u036b"+
- "\u036e\5\u00a0Q\2\u036c\u036e\5\u00a2R\2\u036d\u036b\3\2\2\2\u036d\u036c"+
- "\3\2\2\2\u036e\u009f\3\2\2\2\u036f\u0370\5\32\16\2\u0370\u0371\7<\2\2"+
- "\u0371\u0372\7x\2\2\u0372\u00a1\3\2\2\2\u0373\u0374\7\31\2\2\u0374\u0376"+
- "\7\32\2\2\u0375\u0377\5*\26\2\u0376\u0375\3\2\2\2\u0376\u0377\3\2\2\2"+
- "\u0377\u0378\3\2\2\2\u0378\u037b\7\33\2\2\u0379\u037a\7H\2\2\u037a\u037c"+
- "\5\u00a4S\2\u037b\u0379\3\2\2\2\u037b\u037c\3\2\2\2\u037c\u037d\3\2\2"+
- "\2\u037d\u037f\7\34\2\2\u037e\u0380\5.\30\2\u037f\u037e\3\2\2\2\u037f"+
- "\u0380\3\2\2\2\u0380\u0381\3\2\2\2\u0381\u0382\7\35\2\2\u0382\u00a3\3"+
- "\2\2\2\u0383\u0384\7\32\2\2\u0384\u038c\7\33\2\2\u0385\u0389\5\u00a8U"+
- "\2\u0386\u038a\7v\2\2\u0387\u038a\7%\2\2\u0388\u038a\7\62\2\2\u0389\u0386"+
- "\3\2\2\2\u0389\u0387\3\2\2\2\u0389\u0388\3\2\2\2\u0389\u038a\3\2\2\2\u038a"+
- "\u038c\3\2\2\2\u038b\u0383\3\2\2\2\u038b\u0385\3\2\2\2\u038c\u00a5\3\2"+
- "\2\2\u038d\u0396\7\34\2\2\u038e\u0393\5\u00b2Z\2\u038f\u0390\7\26\2\2"+
- "\u0390\u0392\5\u00b2Z\2\u0391\u038f\3\2\2\2\u0392\u0395\3\2\2\2\u0393"+
- "\u0391\3\2\2\2\u0393\u0394\3\2\2\2\u0394\u0397\3\2\2\2\u0395\u0393\3\2"+
- "\2\2\u0396\u038e\3\2\2\2\u0396\u0397\3\2\2\2\u0397\u0398\3\2\2\2\u0398"+
- "\u039e\7\35\2\2\u0399\u039a\7=\2\2\u039a\u039b\5.\30\2\u039b\u039c\7>"+
- "\2\2\u039c\u039e\3\2\2\2\u039d\u038d\3\2\2\2\u039d\u0399\3\2\2\2\u039e"+
- "\u00a7\3\2\2\2\u039f\u03a3\5\32\16\2\u03a0\u03a3\7w\2\2\u03a1\u03a3\5"+
- "\u00aaV\2\u03a2\u039f\3\2\2\2\u03a2\u03a0\3\2\2\2\u03a2\u03a1\3\2\2\2"+
- "\u03a3\u00a9\3\2\2\2\u03a4\u03a7\5\u00acW\2\u03a5\u03a7\5\u00aeX\2\u03a6"+
- "\u03a4\3\2\2\2\u03a6\u03a5\3\2\2\2\u03a7\u00ab\3\2\2\2\u03a8\u03a9\7\31"+
- "\2\2\u03a9\u03aa\7\32\2\2\u03aa\u03ab\7%\2\2\u03ab\u03ac\7\33\2\2\u03ac"+
- "\u00ad\3\2\2\2\u03ad\u03ae\7\31\2\2\u03ae\u03b7\7\32\2\2\u03af\u03b4\5"+
- "\u00a4S\2\u03b0\u03b1\7\26\2\2\u03b1\u03b3\5\u00a4S\2\u03b2\u03b0\3\2"+
- "\2\2\u03b3\u03b6\3\2\2\2\u03b4\u03b2\3\2\2\2\u03b4\u03b5\3\2\2\2\u03b5"+
- "\u03b8\3\2\2\2\u03b6\u03b4\3\2\2\2\u03b7\u03af\3\2\2\2\u03b7\u03b8\3\2"+
- "\2\2\u03b8\u03b9\3\2\2\2\u03b9\u03ba\7\33\2\2\u03ba\u03bb\7H\2\2\u03bb"+
- "\u03bc\5\u00a4S\2\u03bc\u00af\3\2\2\2\u03bd\u03bf\5\u00a8U\2\u03be\u03c0"+
- "\7v\2\2\u03bf\u03be\3\2\2\2\u03bf\u03c0\3\2\2\2\u03c0\u00b1\3\2\2\2\u03c1"+
- "\u03c4\5\60\31\2\u03c2\u03c4\7~\2\2\u03c3\u03c1\3\2\2\2\u03c3\u03c2\3"+
- "\2\2\2\u03c4\u03c5\3\2\2\2\u03c5\u03c6\t\b\2\2\u03c6\u03c7\5\60\31\2\u03c7"+
- "\u00b3\3\2\2\2\u03c8\u03ca\78\2\2\u03c9\u03cb\5.\30\2\u03ca\u03c9\3\2"+
- "\2\2\u03ca\u03cb\3\2\2\2\u03cb\u03cc\3\2\2\2\u03cc\u03cd\79\2\2\u03cd"+
- "\u00b5\3\2\2\2\u03ce\u03cf\5\u00b8]\2\u03cf\u00b7\3\2\2\2\u03d0\u03d1"+
- "\7u\2\2\u03d1\u00b9\3\2\2\2\u03d2\u03d3\t\t\2\2\u03d3\u00bb\3\2\2\2k\u00c4"+
- "\u00c8\u00d8\u00de\u00e6\u00ed\u00f9\u010f\u0117\u011c\u011f\u0123\u012c"+
- "\u0135\u0138\u013f\u0146\u0148\u014f\u0156\u0158\u015f\u0164\u0168\u016c"+
- "\u0173\u017d\u0184\u018b\u0192\u019c\u01a0\u01a8\u01aa\u01b6\u01bc\u01c0"+
- "\u01c4\u01cf\u01d5\u01e4\u01ea\u01ee\u01f2\u01f9\u0200\u0206\u020b\u020d"+
- "\u0211\u0218\u021f\u0228\u0234\u023e\u024a\u024e\u0257\u025e\u0274\u0279"+
- "\u027e\u0282\u028e\u0296\u029a\u02a1\u02a8\u02ae\u02b5\u02bd\u02c4\u02ca"+
- "\u02d0\u02d6\u02dc\u02e7\u02ed\u02f2\u02fa\u030f\u0318\u031a\u0331\u0341"+
- "\u0348\u035e\u0362\u0369\u036d\u0376\u037b\u037f\u0389\u038b\u0393\u0396"+
- "\u039d\u03a2\u03a6\u03b4\u03b7\u03bf\u03c3\u03ca";
+ "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+
+ "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3"+
+ "\3\5\3\u00d5\n\3\3\3\3\3\5\3\u00d9\n\3\3\4\3\4\3\4\3\5\3\5\3\5\3\5\3\5"+
+ "\3\5\3\5\3\5\3\6\3\6\3\6\5\6\u00e9\n\6\3\6\3\6\7\6\u00ed\n\6\f\6\16\6"+
+ "\u00f0\13\6\3\6\3\6\3\6\7\6\u00f5\n\6\f\6\16\6\u00f8\13\6\3\7\3\7\3\7"+
+ "\3\7\5\7\u00fe\n\7\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\5\t\u010a\n"+
+ "\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\f\3\f\3\f\3\f\3\f\3\f\3\r"+
+ "\3\r\3\r\3\r\3\r\5\r\u0120\n\r\3\r\3\r\3\r\3\r\7\r\u0126\n\r\f\r\16\r"+
+ "\u0129\13\r\3\16\3\16\5\16\u012d\n\16\3\16\5\16\u0130\n\16\3\16\3\16\5"+
+ "\16\u0134\n\16\3\17\3\17\3\20\3\20\3\20\3\20\3\20\5\20\u013d\n\20\3\20"+
+ "\3\20\3\20\3\20\3\20\7\20\u0144\n\20\f\20\16\20\u0147\13\20\5\20\u0149"+
+ "\n\20\3\21\3\21\3\21\3\21\3\21\5\21\u0150\n\21\3\21\3\21\3\21\3\21\3\21"+
+ "\5\21\u0157\n\21\5\21\u0159\n\21\3\22\3\22\3\22\3\22\3\22\5\22\u0160\n"+
+ "\22\3\22\3\22\3\22\3\22\3\22\5\22\u0167\n\22\5\22\u0169\n\22\3\23\3\23"+
+ "\3\23\3\23\3\23\5\23\u0170\n\23\3\23\3\23\3\23\5\23\u0175\n\23\3\23\3"+
+ "\23\5\23\u0179\n\23\3\23\3\23\5\23\u017d\n\23\3\24\3\24\3\24\3\24\3\24"+
+ "\5\24\u0184\n\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\5\25\u018e\n"+
+ "\25\3\26\3\26\3\26\7\26\u0193\n\26\f\26\16\26\u0196\13\26\3\27\3\27\3"+
+ "\27\3\27\5\27\u019c\n\27\3\30\3\30\3\30\7\30\u01a1\n\30\f\30\16\30\u01a4"+
+ "\13\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31"+
+ "\5\31\u01b3\n\31\3\32\3\32\5\32\u01b7\n\32\3\32\3\32\3\32\3\32\3\32\3"+
+ "\32\7\32\u01bf\n\32\f\32\16\32\u01c2\13\32\3\32\3\32\3\32\3\33\3\33\3"+
+ "\33\3\33\7\33\u01cb\n\33\f\33\16\33\u01ce\13\33\3\34\3\34\3\34\5\34\u01d3"+
+ "\n\34\3\34\3\34\5\34\u01d7\n\34\3\34\3\34\5\34\u01db\n\34\3\34\3\34\3"+
+ "\34\3\35\3\35\3\35\3\35\7\35\u01e4\n\35\f\35\16\35\u01e7\13\35\3\36\3"+
+ "\36\3\36\5\36\u01ec\n\36\3\36\3\36\3\36\3\37\3\37\3\37\3 \3 \3 \3 \3 "+
+ "\7 \u01f9\n \f \16 \u01fc\13 \3!\3!\3!\5!\u0201\n!\3!\3!\5!\u0205\n!\3"+
+ "!\3!\5!\u0209\n!\3\"\3\"\3\"\3\"\3\"\5\"\u0210\n\"\3\"\3\"\3\"\7\"\u0215"+
+ "\n\"\f\"\16\"\u0218\13\"\3#\3#\3#\5#\u021d\n#\3#\3#\3#\5#\u0222\n#\5#"+
+ "\u0224\n#\3#\3#\5#\u0228\n#\3$\3$\3$\3%\3%\5%\u022f\n%\3%\3%\3%\7%\u0234"+
+ "\n%\f%\16%\u0237\13%\3%\3%\3%\3&\3&\3&\5&\u023f\n&\3&\3&\3&\3\'\3\'\3"+
+ "\'\3\'\3\'\6\'\u0249\n\'\r\'\16\'\u024a\3\'\3\'\3\'\3\'\3(\3(\6(\u0253"+
+ "\n(\r(\16(\u0254\3(\3(\3(\3)\3)\3)\3)\3)\6)\u025f\n)\r)\16)\u0260\3)\3"+
+ ")\5)\u0265\n)\3)\3)\3)\3*\3*\3*\3*\5*\u026e\n*\3*\3*\3*\7*\u0273\n*\f"+
+ "*\16*\u0276\13*\3*\3*\3*\3+\3+\3+\3+\3+\3+\3+\3+\3+\3,\3,\3,\3,\3,\6,"+
+ "\u0289\n,\r,\16,\u028a\3-\3-\3-\5-\u0290\n-\3-\3-\3-\5-\u0295\n-\7-\u0297"+
+ "\n-\f-\16-\u029a\13-\3-\3-\3-\3-\3.\3.\3.\7.\u02a3\n.\f.\16.\u02a6\13"+
+ ".\3/\3/\3/\7/\u02ab\n/\f/\16/\u02ae\13/\3\60\5\60\u02b1\n\60\3\60\3\60"+
+ "\3\61\3\61\3\61\5\61\u02b8\n\61\3\62\3\62\3\62\7\62\u02bd\n\62\f\62\16"+
+ "\62\u02c0\13\62\3\63\3\63\3\63\5\63\u02c5\n\63\3\64\3\64\3\64\7\64\u02ca"+
+ "\n\64\f\64\16\64\u02cd\13\64\3\65\3\65\3\65\7\65\u02d2\n\65\f\65\16\65"+
+ "\u02d5\13\65\3\66\3\66\3\66\3\66\5\66\u02db\n\66\3\67\3\67\3\67\3\67\5"+
+ "\67\u02e1\n\67\38\38\38\38\58\u02e7\n8\39\39\39\39\59\u02ed\n9\3:\3:\3"+
+ ":\3:\5:\u02f3\n:\3;\3;\3;\3;\3;\3;\3;\7;\u02fc\n;\f;\16;\u02ff\13;\3<"+
+ "\3<\3<\5<\u0304\n<\3=\7=\u0307\n=\f=\16=\u030a\13=\3=\3=\3>\3>\3>\5>\u0311"+
+ "\n>\3?\3?\3?\3?\3?\3?\3?\3@\3@\3@\3@\3@\3@\3@\3A\3A\3A\7A\u0324\nA\fA"+
+ "\16A\u0327\13A\3B\3B\3B\3B\3B\3B\7B\u032f\nB\fB\16B\u0332\13B\3C\3C\3"+
+ "C\3C\3C\3C\3D\3D\3D\3E\3E\3E\3E\3F\3F\3F\3F\3F\3F\3F\5F\u0348\nF\3G\3"+
+ "G\3G\3G\3G\3G\3G\3G\3G\3G\3G\3G\3G\3G\5G\u0358\nG\3H\3H\3H\3I\3I\5I\u035f"+
+ "\nI\3I\3I\3J\3J\3K\3K\3K\3K\3K\3L\3L\3L\3L\3L\3M\3M\3M\3N\3N\3N\5N\u0375"+
+ "\nN\7N\u0377\nN\fN\16N\u037a\13N\3N\3N\3O\3O\5O\u0380\nO\3P\3P\5P\u0384"+
+ "\nP\3Q\3Q\3Q\3Q\3R\3R\3R\5R\u038d\nR\3R\3R\3R\5R\u0392\nR\3R\3R\5R\u0396"+
+ "\nR\3R\3R\3S\3S\3S\3S\3S\3S\3S\3S\5S\u03a2\nS\3S\3S\3S\3S\3S\7S\u03a9"+
+ "\nS\fS\16S\u03ac\13S\3S\3S\3S\5S\u03b1\nS\3T\3T\3T\3T\3U\3U\3U\3U\3U\3"+
+ "U\3V\3V\3V\3V\3V\3V\3V\3V\3W\3W\3W\3W\3W\7W\u03ca\nW\fW\16W\u03cd\13W"+
+ "\3W\3W\3W\3W\3W\3X\3X\3X\3X\3X\3X\3Y\3Y\3Y\6Y\u03dd\nY\rY\16Y\u03de\3"+
+ "Z\3Z\3Z\3Z\3[\3[\3[\3[\3[\3[\5[\u03eb\n[\5[\u03ed\n[\3\\\3\\\3\\\3\\\7"+
+ "\\\u03f3\n\\\f\\\16\\\u03f6\13\\\5\\\u03f8\n\\\3\\\3\\\3\\\3\\\3\\\5\\"+
+ "\u03ff\n\\\3]\3]\3]\5]\u0404\n]\3^\3^\5^\u0408\n^\3_\3_\3_\3_\3_\3`\3"+
+ "`\3`\3`\3`\7`\u0414\n`\f`\16`\u0417\13`\5`\u0419\n`\3`\3`\3`\3`\3a\3a"+
+ "\5a\u0421\na\3b\3b\5b\u0425\nb\3b\3b\3b\3c\3c\5c\u042c\nc\3c\3c\3d\3d"+
+ "\3e\3e\3f\3f\3f\2\2g\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60"+
+ "\62\64\668:<>@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084\u0086"+
+ "\u0088\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098\u009a\u009c\u009e"+
+ "\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2\u00b4\u00b6"+
+ "\u00b8\u00ba\u00bc\u00be\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca\2\n\4\2\b"+
+ "\bjj\3\2ST\3\2\13\24\4\2\6\6%/\3\2\61\62\4\2$$\63\65\4\2\n\n\u0081\u0081"+
+ "\4\2>\177\u0082\u0082\2\u046d\2\u00cc\3\2\2\2\4\u00d4\3\2\2\2\6\u00da"+
+ "\3\2\2\2\b\u00dd\3\2\2\2\n\u00ee\3\2\2\2\f\u00fd\3\2\2\2\16\u00ff\3\2"+
+ "\2\2\20\u0109\3\2\2\2\22\u010b\3\2\2\2\24\u0110\3\2\2\2\26\u0114\3\2\2"+
+ "\2\30\u011a\3\2\2\2\32\u012f\3\2\2\2\34\u0135\3\2\2\2\36\u0137\3\2\2\2"+
+ " \u014a\3\2\2\2\"\u015a\3\2\2\2$\u016a\3\2\2\2&\u017e\3\2\2\2(\u018d\3"+
+ "\2\2\2*\u018f\3\2\2\2,\u0197\3\2\2\2.\u019d\3\2\2\2\60\u01b2\3\2\2\2\62"+
+ "\u01b6\3\2\2\2\64\u01c6\3\2\2\2\66\u01cf\3\2\2\28\u01df\3\2\2\2:\u01e8"+
+ "\3\2\2\2<\u01f0\3\2\2\2>\u01f3\3\2\2\2@\u01fd\3\2\2\2B\u020f\3\2\2\2D"+
+ "\u0219\3\2\2\2F\u0229\3\2\2\2H\u022e\3\2\2\2J\u023b\3\2\2\2L\u0243\3\2"+
+ "\2\2N\u0252\3\2\2\2P\u0259\3\2\2\2R\u0269\3\2\2\2T\u027a\3\2\2\2V\u0283"+
+ "\3\2\2\2X\u028c\3\2\2\2Z\u029f\3\2\2\2\\\u02a7\3\2\2\2^\u02b0\3\2\2\2"+
+ "`\u02b4\3\2\2\2b\u02b9\3\2\2\2d\u02c1\3\2\2\2f\u02c6\3\2\2\2h\u02ce\3"+
+ "\2\2\2j\u02d6\3\2\2\2l\u02dc\3\2\2\2n\u02e2\3\2\2\2p\u02e8\3\2\2\2r\u02ee"+
+ "\3\2\2\2t\u02f4\3\2\2\2v\u0303\3\2\2\2x\u0308\3\2\2\2z\u0310\3\2\2\2|"+
+ "\u0312\3\2\2\2~\u0319\3\2\2\2\u0080\u0320\3\2\2\2\u0082\u0328\3\2\2\2"+
+ "\u0084\u0333\3\2\2\2\u0086\u0339\3\2\2\2\u0088\u033c\3\2\2\2\u008a\u0340"+
+ "\3\2\2\2\u008c\u0357\3\2\2\2\u008e\u0359\3\2\2\2\u0090\u035c\3\2\2\2\u0092"+
+ "\u0362\3\2\2\2\u0094\u0364\3\2\2\2\u0096\u0369\3\2\2\2\u0098\u036e\3\2"+
+ "\2\2\u009a\u0371\3\2\2\2\u009c\u037f\3\2\2\2\u009e\u0383\3\2\2\2\u00a0"+
+ "\u0385\3\2\2\2\u00a2\u0389\3\2\2\2\u00a4\u03b0\3\2\2\2\u00a6\u03b2\3\2"+
+ "\2\2\u00a8\u03b6\3\2\2\2\u00aa\u03bc\3\2\2\2\u00ac\u03c4\3\2\2\2\u00ae"+
+ "\u03d3\3\2\2\2\u00b0\u03d9\3\2\2\2\u00b2\u03e0\3\2\2\2\u00b4\u03ec\3\2"+
+ "\2\2\u00b6\u03fe\3\2\2\2\u00b8\u0403\3\2\2\2\u00ba\u0407\3\2\2\2\u00bc"+
+ "\u0409\3\2\2\2\u00be\u040e\3\2\2\2\u00c0\u041e\3\2\2\2\u00c2\u0424\3\2"+
+ "\2\2\u00c4\u0429\3\2\2\2\u00c6\u042f\3\2\2\2\u00c8\u0431\3\2\2\2\u00ca"+
+ "\u0433\3\2\2\2\u00cc\u00cd\5\4\3\2\u00cd\u00ce\7\2\2\3\u00ce\3\3\2\2\2"+
+ "\u00cf\u00d0\7i\2\2\u00d0\u00d1\7h\2\2\u00d1\u00d2\5\u00c8e\2\u00d2\u00d3"+
+ "\7\3\2\2\u00d3\u00d5\3\2\2\2\u00d4\u00cf\3\2\2\2\u00d4\u00d5\3\2\2\2\u00d5"+
+ "\u00d8\3\2\2\2\u00d6\u00d9\5\b\5\2\u00d7\u00d9\5\6\4\2\u00d8\u00d6\3\2"+
+ "\2\2\u00d8\u00d7\3\2\2\2\u00d9\5\3\2\2\2\u00da\u00db\5\n\6\2\u00db\u00dc"+
+ "\5.\30\2\u00dc\7\3\2\2\2\u00dd\u00de\7\4\2\2\u00de\u00df\7\5\2\2\u00df"+
+ "\u00e0\7\u0089\2\2\u00e0\u00e1\7\6\2\2\u00e1\u00e2\5\u00c6d\2\u00e2\u00e3"+
+ "\7\3\2\2\u00e3\u00e4\5\n\6\2\u00e4\t\3\2\2\2\u00e5\u00e9\5\f\7\2\u00e6"+
+ "\u00e9\5\16\b\2\u00e7\u00e9\5\36\20\2\u00e8\u00e5\3\2\2\2\u00e8\u00e6"+
+ "\3\2\2\2\u00e8\u00e7\3\2\2\2\u00e9\u00ea\3\2\2\2\u00ea\u00eb\7\3\2\2\u00eb"+
+ "\u00ed\3\2\2\2\u00ec\u00e8\3\2\2\2\u00ed\u00f0\3\2\2\2\u00ee\u00ec\3\2"+
+ "\2\2\u00ee\u00ef\3\2\2\2\u00ef\u00f6\3\2\2\2\u00f0\u00ee\3\2\2\2\u00f1"+
+ "\u00f2\5\20\t\2\u00f2\u00f3\7\3\2\2\u00f3\u00f5\3\2\2\2\u00f4\u00f1\3"+
+ "\2\2\2\u00f5\u00f8\3\2\2\2\u00f6\u00f4\3\2\2\2\u00f6\u00f7\3\2\2\2\u00f7"+
+ "\13\3\2\2\2\u00f8\u00f6\3\2\2\2\u00f9\u00fe\5\22\n\2\u00fa\u00fe\5\24"+
+ "\13\2\u00fb\u00fe\5\26\f\2\u00fc\u00fe\5\30\r\2\u00fd\u00f9\3\2\2\2\u00fd"+
+ "\u00fa\3\2\2\2\u00fd\u00fb\3\2\2\2\u00fd\u00fc\3\2\2\2\u00fe\r\3\2\2\2"+
+ "\u00ff\u0100\7p\2\2\u0100\u0101\7\5\2\2\u0101\u0102\7\u0089\2\2\u0102"+
+ "\u0103\7\6\2\2\u0103\u0104\5\u00c6d\2\u0104\17\3\2\2\2\u0105\u010a\5$"+
+ "\23\2\u0106\u010a\5 \21\2\u0107\u010a\5&\24\2\u0108\u010a\5\"\22\2\u0109"+
+ "\u0105\3\2\2\2\u0109\u0106\3\2\2\2\u0109\u0107\3\2\2\2\u0109\u0108\3\2"+
+ "\2\2\u010a\21\3\2\2\2\u010b\u010c\7p\2\2\u010c\u010d\7Y\2\2\u010d\u010e"+
+ "\7R\2\2\u010e\u010f\5\u00c6d\2\u010f\23\3\2\2\2\u0110\u0111\7p\2\2\u0111"+
+ "\u0112\7\7\2\2\u0112\u0113\t\2\2\2\u0113\25\3\2\2\2\u0114\u0115\7p\2\2"+
+ "\u0115\u0116\7Y\2\2\u0116\u0117\7C\2\2\u0117\u0118\7J\2\2\u0118\u0119"+
+ "\t\3\2\2\u0119\27\3\2\2\2\u011a\u011f\7p\2\2\u011b\u011c\7\t\2\2\u011c"+
+ "\u0120\5\32\16\2\u011d\u011e\7Y\2\2\u011e\u0120\7\t\2\2\u011f\u011b\3"+
+ "\2\2\2\u011f\u011d\3\2\2\2\u0120\u0127\3\2\2\2\u0121\u0122\5\34\17\2\u0122"+
+ "\u0123\7\6\2\2\u0123\u0124\5\u00c8e\2\u0124\u0126\3\2\2\2\u0125\u0121"+
+ "\3\2\2\2\u0126\u0129\3\2\2\2\u0127\u0125\3\2\2\2\u0127\u0128\3\2\2\2\u0128"+
+ "\31\3\2\2\2\u0129\u0127\3\2\2\2\u012a\u012d\7\u0089\2\2\u012b\u012d\5"+
+ "\u00caf\2\u012c\u012a\3\2\2\2\u012c\u012b\3\2\2\2\u012d\u012e\3\2\2\2"+
+ "\u012e\u0130\7\n\2\2\u012f\u012c\3\2\2\2\u012f\u0130\3\2\2\2\u0130\u0133"+
+ "\3\2\2\2\u0131\u0134\7\u0089\2\2\u0132\u0134\5\u00caf\2\u0133\u0131\3"+
+ "\2\2\2\u0133\u0132\3\2\2\2\u0134\33\3\2\2\2\u0135\u0136\t\4\2\2\u0136"+
+ "\35\3\2\2\2\u0137\u0138\7\25\2\2\u0138\u013c\7\4\2\2\u0139\u013a\7\5\2"+
+ "\2\u013a\u013b\7\u0089\2\2\u013b\u013d\7\6\2\2\u013c\u0139\3\2\2\2\u013c"+
+ "\u013d\3\2\2\2\u013d\u013e\3\2\2\2\u013e\u0148\5\u00c6d\2\u013f\u0140"+
+ "\7H\2\2\u0140\u0145\5\u00c6d\2\u0141\u0142\7\26\2\2\u0142\u0144\5\u00c6"+
+ "d\2\u0143\u0141\3\2\2\2\u0144\u0147\3\2\2\2\u0145\u0143\3\2\2\2\u0145"+
+ "\u0146\3\2\2\2\u0146\u0149\3\2\2\2\u0147\u0145\3\2\2\2\u0148\u013f\3\2"+
+ "\2\2\u0148\u0149\3\2\2\2\u0149\37\3\2\2\2\u014a\u014b\7p\2\2\u014b\u014c"+
+ "\7s\2\2\u014c\u014f\5\u008eH\2\u014d\u014e\7G\2\2\u014e\u0150\5\u00b4"+
+ "[\2\u014f\u014d\3\2\2\2\u014f\u0150\3\2\2\2\u0150\u0158\3\2\2\2\u0151"+
+ "\u0152\7\27\2\2\u0152\u0159\5\60\31\2\u0153\u0156\7\30\2\2\u0154\u0155"+
+ "\7\27\2\2\u0155\u0157\5\60\31\2\u0156\u0154\3\2\2\2\u0156\u0157\3\2\2"+
+ "\2\u0157\u0159\3\2\2\2\u0158\u0151\3\2\2\2\u0158\u0153\3\2\2\2\u0159!"+
+ "\3\2\2\2\u015a\u015b\7p\2\2\u015b\u015c\7q\2\2\u015c\u015f\7r\2\2\u015d"+
+ "\u015e\7G\2\2\u015e\u0160\5\u00b4[\2\u015f\u015d\3\2\2\2\u015f\u0160\3"+
+ "\2\2\2\u0160\u0168\3\2\2\2\u0161\u0162\7\27\2\2\u0162\u0169\5\60\31\2"+
+ "\u0163\u0166\7\30\2\2\u0164\u0165\7\27\2\2\u0165\u0167\5\60\31\2\u0166"+
+ "\u0164\3\2\2\2\u0166\u0167\3\2\2\2\u0167\u0169\3\2\2\2\u0168\u0161\3\2"+
+ "\2\2\u0168\u0163\3\2\2\2\u0169#\3\2\2\2\u016a\u016b\7p\2\2\u016b\u016c"+
+ "\7\31\2\2\u016c\u016d\5\32\16\2\u016d\u016f\7\32\2\2\u016e\u0170\5*\26"+
+ "\2\u016f\u016e\3\2\2\2\u016f\u0170\3\2\2\2\u0170\u0171\3\2\2\2\u0171\u0174"+
+ "\7\33\2\2\u0172\u0173\7G\2\2\u0173\u0175\5\u00b4[\2\u0174\u0172\3\2\2"+
+ "\2\u0174\u0175\3\2\2\2\u0175\u017c\3\2\2\2\u0176\u0178\7\34\2\2\u0177"+
+ "\u0179\5.\30\2\u0178\u0177\3\2\2\2\u0178\u0179\3\2\2\2\u0179\u017a\3\2"+
+ "\2\2\u017a\u017d\7\35\2\2\u017b\u017d\7\30\2\2\u017c\u0176\3\2\2\2\u017c"+
+ "\u017b\3\2\2\2\u017d%\3\2\2\2\u017e\u017f\7p\2\2\u017f\u0180\7m\2\2\u0180"+
+ "\u0181\5\32\16\2\u0181\u0183\7G\2\2\u0182\u0184\5(\25\2\u0183\u0182\3"+
+ "\2\2\2\u0183\u0184\3\2\2\2\u0184\u0185\3\2\2\2\u0185\u0186\5\60\31\2\u0186"+
+ "\'\3\2\2\2\u0187\u0188\7\36\2\2\u0188\u018e\7\37\2\2\u0189\u018a\7\36"+
+ "\2\2\u018a\u018e\7 \2\2\u018b\u018c\7}\2\2\u018c\u018e\7!\2\2\u018d\u0187"+
+ "\3\2\2\2\u018d\u0189\3\2\2\2\u018d\u018b\3\2\2\2\u018e)\3\2\2\2\u018f"+
+ "\u0194\5,\27\2\u0190\u0191\7\26\2\2\u0191\u0193\5,\27\2\u0192\u0190\3"+
+ "\2\2\2\u0193\u0196\3\2\2\2\u0194\u0192\3\2\2\2\u0194\u0195\3\2\2\2\u0195"+
+ "+\3\2\2\2\u0196\u0194\3\2\2\2\u0197\u0198\7\"\2\2\u0198\u019b\5\32\16"+
+ "\2\u0199\u019a\7G\2\2\u019a\u019c\5\u00b4[\2\u019b\u0199\3\2\2\2\u019b"+
+ "\u019c\3\2\2\2\u019c-\3\2\2\2\u019d\u01a2\5\60\31\2\u019e\u019f\7\26\2"+
+ "\2\u019f\u01a1\5\60\31\2\u01a0\u019e\3\2\2\2\u01a1\u01a4\3\2\2\2\u01a2"+
+ "\u01a0\3\2\2\2\u01a2\u01a3\3\2\2\2\u01a3/\3\2\2\2\u01a4\u01a2\3\2\2\2"+
+ "\u01a5\u01b3\5\62\32\2\u01a6\u01b3\5H%\2\u01a7\u01b3\5L\'\2\u01a8\u01b3"+
+ "\5P)\2\u01a9\u01b3\5T+\2\u01aa\u01b3\5V,\2\u01ab\u01b3\5\u00a4S\2\u01ac"+
+ "\u01b3\5\u00a6T\2\u01ad\u01b3\5\u00a8U\2\u01ae\u01b3\5\u00aaV\2\u01af"+
+ "\u01b3\5\u00acW\2\u01b0\u01b3\5\u00aeX\2\u01b1\u01b3\5Z.\2\u01b2\u01a5"+
+ "\3\2\2\2\u01b2\u01a6\3\2\2\2\u01b2\u01a7\3\2\2\2\u01b2\u01a8\3\2\2\2\u01b2"+
+ "\u01a9\3\2\2\2\u01b2\u01aa\3\2\2\2\u01b2\u01ab\3\2\2\2\u01b2\u01ac\3\2"+
+ "\2\2\u01b2\u01ad\3\2\2\2\u01b2\u01ae\3\2\2\2\u01b2\u01af\3\2\2\2\u01b2"+
+ "\u01b0\3\2\2\2\u01b2\u01b1\3\2\2\2\u01b3\61\3\2\2\2\u01b4\u01b7\5\64\33"+
+ "\2\u01b5\u01b7\58\35\2\u01b6\u01b4\3\2\2\2\u01b6\u01b5\3\2\2\2\u01b7\u01c0"+
+ "\3\2\2\2\u01b8\u01bf\5\64\33\2\u01b9\u01bf\5<\37\2\u01ba\u01bf\58\35\2"+
+ "\u01bb\u01bf\5> \2\u01bc\u01bf\5B\"\2\u01bd\u01bf\5F$\2\u01be\u01b8\3"+
+ "\2\2\2\u01be\u01b9\3\2\2\2\u01be\u01ba\3\2\2\2\u01be\u01bb\3\2\2\2\u01be"+
+ "\u01bc\3\2\2\2\u01be\u01bd\3\2\2\2\u01bf\u01c2\3\2\2\2\u01c0\u01be\3\2"+
+ "\2\2\u01c0\u01c1\3\2\2\2\u01c1\u01c3\3\2\2\2\u01c2\u01c0\3\2\2\2\u01c3"+
+ "\u01c4\7D\2\2\u01c4\u01c5\5\60\31\2\u01c5\63\3\2\2\2\u01c6\u01c7\7>\2"+
+ "\2\u01c7\u01cc\5\66\34\2\u01c8\u01c9\7\26\2\2\u01c9\u01cb\5\66\34\2\u01ca"+
+ "\u01c8\3\2\2\2\u01cb\u01ce\3\2\2\2\u01cc\u01ca\3\2\2\2\u01cc\u01cd\3\2"+
+ "\2\2\u01cd\65\3\2\2\2\u01ce\u01cc\3\2\2\2\u01cf\u01d2\5\u008eH\2\u01d0"+
+ "\u01d1\7G\2\2\u01d1\u01d3\5\u00b4[\2\u01d2\u01d0\3\2\2\2\u01d2\u01d3\3"+
+ "\2\2\2\u01d3\u01d6\3\2\2\2\u01d4\u01d5\7I\2\2\u01d5\u01d7\7J\2\2\u01d6"+
+ "\u01d4\3\2\2\2\u01d6\u01d7\3\2\2\2\u01d7\u01da\3\2\2\2\u01d8\u01d9\7H"+
+ "\2\2\u01d9\u01db\5\u008eH\2\u01da\u01d8\3\2\2\2\u01da\u01db\3\2\2\2\u01db"+
+ "\u01dc\3\2\2\2\u01dc\u01dd\7F\2\2\u01dd\u01de\5\60\31\2\u01de\67\3\2\2"+
+ "\2\u01df\u01e0\7?\2\2\u01e0\u01e5\5:\36\2\u01e1\u01e2\7\26\2\2\u01e2\u01e4"+
+ "\5:\36\2\u01e3\u01e1\3\2\2\2\u01e4\u01e7\3\2\2\2\u01e5\u01e3\3\2\2\2\u01e5"+
+ "\u01e6\3\2\2\2\u01e69\3\2\2\2\u01e7\u01e5\3\2\2\2\u01e8\u01eb\5\u008e"+
+ "H\2\u01e9\u01ea\7G\2\2\u01ea\u01ec\5\u00b4[\2\u01eb\u01e9\3\2\2\2\u01eb"+
+ "\u01ec\3\2\2\2\u01ec\u01ed\3\2\2\2\u01ed\u01ee\7\27\2\2\u01ee\u01ef\5"+
+ "\60\31\2\u01ef;\3\2\2\2\u01f0\u01f1\7@\2\2\u01f1\u01f2\5\60\31\2\u01f2"+
+ "=\3\2\2\2\u01f3\u01f4\7A\2\2\u01f4\u01f5\7B\2\2\u01f5\u01fa\5@!\2\u01f6"+
+ "\u01f7\7\26\2\2\u01f7\u01f9\5@!\2\u01f8\u01f6\3\2\2\2\u01f9\u01fc\3\2"+
+ "\2\2\u01fa\u01f8\3\2\2\2\u01fa\u01fb\3\2\2\2\u01fb?\3\2\2\2\u01fc\u01fa"+
+ "\3\2\2\2\u01fd\u0204\5\u008eH\2\u01fe\u01ff\7G\2\2\u01ff\u0201\5\u00b4"+
+ "[\2\u0200\u01fe\3\2\2\2\u0200\u0201\3\2\2\2\u0201\u0202\3\2\2\2\u0202"+
+ "\u0203\7\27\2\2\u0203\u0205\5\60\31\2\u0204\u0200\3\2\2\2\u0204\u0205"+
+ "\3\2\2\2\u0205\u0208\3\2\2\2\u0206\u0207\7R\2\2\u0207\u0209\5\u00c6d\2"+
+ "\u0208\u0206\3\2\2\2\u0208\u0209\3\2\2\2\u0209A\3\2\2\2\u020a\u020b\7"+
+ "C\2\2\u020b\u0210\7B\2\2\u020c\u020d\7L\2\2\u020d\u020e\7C\2\2\u020e\u0210"+
+ "\7B\2\2\u020f\u020a\3\2\2\2\u020f\u020c\3\2\2\2\u0210\u0211\3\2\2\2\u0211"+
+ "\u0216\5D#\2\u0212\u0213\7\26\2\2\u0213\u0215\5D#\2\u0214\u0212\3\2\2"+
+ "\2\u0215\u0218\3\2\2\2\u0216\u0214\3\2\2\2\u0216\u0217\3\2\2\2\u0217C"+
+ "\3\2\2\2\u0218\u0216\3\2\2\2\u0219\u021c\5\60\31\2\u021a\u021d\7M\2\2"+
+ "\u021b\u021d\7N\2\2\u021c\u021a\3\2\2\2\u021c\u021b\3\2\2\2\u021c\u021d"+
+ "\3\2\2\2\u021d\u0223\3\2\2\2\u021e\u0221\7J\2\2\u021f\u0222\7S\2\2\u0220"+
+ "\u0222\7T\2\2\u0221\u021f\3\2\2\2\u0221\u0220\3\2\2\2\u0222\u0224\3\2"+
+ "\2\2\u0223\u021e\3\2\2\2\u0223\u0224\3\2\2\2\u0224\u0227\3\2\2\2\u0225"+
+ "\u0226\7R\2\2\u0226\u0228\5\u00c6d\2\u0227\u0225\3\2\2\2\u0227\u0228\3"+
+ "\2\2\2\u0228E\3\2\2\2\u0229\u022a\7K\2\2\u022a\u022b\5\u008eH\2\u022b"+
+ "G\3\2\2\2\u022c\u022f\7O\2\2\u022d\u022f\7P\2\2\u022e\u022c\3\2\2\2\u022e"+
+ "\u022d\3\2\2\2\u022f\u0230\3\2\2\2\u0230\u0235\5J&\2\u0231\u0232\7\26"+
+ "\2\2\u0232\u0234\5J&\2\u0233\u0231\3\2\2\2\u0234\u0237\3\2\2\2\u0235\u0233"+
+ "\3\2\2\2\u0235\u0236\3\2\2\2\u0236\u0238\3\2\2\2\u0237\u0235\3\2\2\2\u0238"+
+ "\u0239\7Q\2\2\u0239\u023a\5\60\31\2\u023aI\3\2\2\2\u023b\u023e\5\u008e"+
+ "H\2\u023c\u023d\7G\2\2\u023d\u023f\5\u00b4[\2\u023e\u023c\3\2\2\2\u023e"+
+ "\u023f\3\2\2\2\u023f\u0240\3\2\2\2\u0240\u0241\7F\2\2\u0241\u0242\5\60"+
+ "\31\2\u0242K\3\2\2\2\u0243\u0244\7U\2\2\u0244\u0245\7\32\2\2\u0245\u0246"+
+ "\5.\30\2\u0246\u0248\7\33\2\2\u0247\u0249\5N(\2\u0248\u0247\3\2\2\2\u0249"+
+ "\u024a\3\2\2\2\u024a\u0248\3\2\2\2\u024a\u024b\3\2\2\2\u024b\u024c\3\2"+
+ "\2\2\u024c\u024d\7Y\2\2\u024d\u024e\7D\2\2\u024e\u024f\5\60\31\2\u024f"+
+ "M\3\2\2\2\u0250\u0251\7V\2\2\u0251\u0253\5\60\31\2\u0252\u0250\3\2\2\2"+
+ "\u0253\u0254\3\2\2\2\u0254\u0252\3\2\2\2\u0254\u0255\3\2\2\2\u0255\u0256"+
+ "\3\2\2\2\u0256\u0257\7D\2\2\u0257\u0258\5\60\31\2\u0258O\3\2\2\2\u0259"+
+ "\u025a\7\\\2\2\u025a\u025b\7\32\2\2\u025b\u025c\5.\30\2\u025c\u025e\7"+
+ "\33\2\2\u025d\u025f\5R*\2\u025e\u025d\3\2\2\2\u025f\u0260\3\2\2\2\u0260"+
+ "\u025e\3\2\2\2\u0260\u0261\3\2\2\2\u0261\u0262\3\2\2\2\u0262\u0264\7Y"+
+ "\2\2\u0263\u0265\5\u008eH\2\u0264\u0263\3\2\2\2\u0264\u0265\3\2\2\2\u0265"+
+ "\u0266\3\2\2\2\u0266\u0267\7D\2\2\u0267\u0268\5\60\31\2\u0268Q\3\2\2\2"+
+ "\u0269\u026d\7V\2\2\u026a\u026b\5\u008eH\2\u026b\u026c\7G\2\2\u026c\u026e"+
+ "\3\2\2\2\u026d\u026a\3\2\2\2\u026d\u026e\3\2\2\2\u026e\u026f\3\2\2\2\u026f"+
+ "\u0274\5\u00b4[\2\u0270\u0271\7#\2\2\u0271\u0273\5\u00b4[\2\u0272\u0270"+
+ "\3\2\2\2\u0273\u0276\3\2\2\2\u0274\u0272\3\2\2\2\u0274\u0275\3\2\2\2\u0275"+
+ "\u0277\3\2\2\2\u0276\u0274\3\2\2\2\u0277\u0278\7D\2\2\u0278\u0279\5\60"+
+ "\31\2\u0279S\3\2\2\2\u027a\u027b\7E\2\2\u027b\u027c\7\32\2\2\u027c\u027d"+
+ "\5.\30\2\u027d\u027e\7\33\2\2\u027e\u027f\7Z\2\2\u027f\u0280\5\60\31\2"+
+ "\u0280\u0281\7[\2\2\u0281\u0282\5\60\31\2\u0282U\3\2\2\2\u0283\u0284\7"+
+ "W\2\2\u0284\u0285\7\34\2\2\u0285\u0286\5.\30\2\u0286\u0288\7\35\2\2\u0287"+
+ "\u0289\5X-\2\u0288\u0287\3\2\2\2\u0289\u028a\3\2\2\2\u028a\u0288\3\2\2"+
+ "\2\u028a\u028b\3\2\2\2\u028bW\3\2\2\2\u028c\u028f\7X\2\2\u028d\u0290\7"+
+ "$\2\2\u028e\u0290\5\32\16\2\u028f\u028d\3\2\2\2\u028f\u028e\3\2\2\2\u0290"+
+ "\u0298\3\2\2\2\u0291\u0294\7#\2\2\u0292\u0295\7$\2\2\u0293\u0295\5\32"+
+ "\16\2\u0294\u0292\3\2\2\2\u0294\u0293\3\2\2\2\u0295\u0297\3\2\2\2\u0296"+
+ "\u0291\3\2\2\2\u0297\u029a\3\2\2\2\u0298\u0296\3\2\2\2\u0298\u0299\3\2"+
+ "\2\2\u0299\u029b\3\2\2\2\u029a\u0298\3\2\2\2\u029b\u029c\7\34\2\2\u029c"+
+ "\u029d\5.\30\2\u029d\u029e\7\35\2\2\u029eY\3\2\2\2\u029f\u02a4\5\\/\2"+
+ "\u02a0\u02a1\7]\2\2\u02a1\u02a3\5\\/\2\u02a2\u02a0\3\2\2\2\u02a3\u02a6"+
+ "\3\2\2\2\u02a4\u02a2\3\2\2\2\u02a4\u02a5\3\2\2\2\u02a5[\3\2\2\2\u02a6"+
+ "\u02a4\3\2\2\2\u02a7\u02ac\5^\60\2\u02a8\u02a9\7^\2\2\u02a9\u02ab\5^\60"+
+ "\2\u02aa\u02a8\3\2\2\2\u02ab\u02ae\3\2\2\2\u02ac\u02aa\3\2\2\2\u02ac\u02ad"+
+ "\3\2\2\2\u02ad]\3\2\2\2\u02ae\u02ac\3\2\2\2\u02af\u02b1\7_\2\2\u02b0\u02af"+
+ "\3\2\2\2\u02b0\u02b1\3\2\2\2\u02b1\u02b2\3\2\2\2\u02b2\u02b3\5`\61\2\u02b3"+
+ "_\3\2\2\2\u02b4\u02b7\5b\62\2\u02b5\u02b6\t\5\2\2\u02b6\u02b8\5b\62\2"+
+ "\u02b7\u02b5\3\2\2\2\u02b7\u02b8\3\2\2\2\u02b8a\3\2\2\2\u02b9\u02be\5"+
+ "d\63\2\u02ba\u02bb\7\60\2\2\u02bb\u02bd\5d\63\2\u02bc\u02ba\3\2\2\2\u02bd"+
+ "\u02c0\3\2\2\2\u02be\u02bc\3\2\2\2\u02be\u02bf\3\2\2\2\u02bfc\3\2\2\2"+
+ "\u02c0\u02be\3\2\2\2\u02c1\u02c4\5f\64\2\u02c2\u02c3\7`\2\2\u02c3\u02c5"+
+ "\5f\64\2\u02c4\u02c2\3\2\2\2\u02c4\u02c5\3\2\2\2\u02c5e\3\2\2\2\u02c6"+
+ "\u02cb\5h\65\2\u02c7\u02c8\t\6\2\2\u02c8\u02ca\5h\65\2\u02c9\u02c7\3\2"+
+ "\2\2\u02ca\u02cd\3\2\2\2\u02cb\u02c9\3\2\2\2\u02cb\u02cc\3\2\2\2\u02cc"+
+ "g\3\2\2\2\u02cd\u02cb\3\2\2\2\u02ce\u02d3\5j\66\2\u02cf\u02d0\t\7\2\2"+
+ "\u02d0\u02d2\5j\66\2\u02d1\u02cf\3\2\2\2\u02d2\u02d5\3\2\2\2\u02d3\u02d1"+
+ "\3\2\2\2\u02d3\u02d4\3\2\2\2\u02d4i\3\2\2\2\u02d5\u02d3\3\2\2\2\u02d6"+
+ "\u02da\5l\67\2\u02d7\u02d8\7a\2\2\u02d8\u02d9\7b\2\2\u02d9\u02db\5\u00b4"+
+ "[\2\u02da\u02d7\3\2\2\2\u02da\u02db\3\2\2\2\u02dbk\3\2\2\2\u02dc\u02e0"+
+ "\5n8\2\u02dd\u02de\7d\2\2\u02de\u02df\7c\2\2\u02df\u02e1\5\u00b4[\2\u02e0"+
+ "\u02dd\3\2\2\2\u02e0\u02e1\3\2\2\2\u02e1m\3\2\2\2\u02e2\u02e6\5p9\2\u02e3"+
+ "\u02e4\7e\2\2\u02e4\u02e5\7G\2\2\u02e5\u02e7\5\u00b4[\2\u02e6\u02e3\3"+
+ "\2\2\2\u02e6\u02e7\3\2\2\2\u02e7o\3\2\2\2\u02e8\u02ec\5r:\2\u02e9\u02ea"+
+ "\7g\2\2\u02ea\u02eb\7G\2\2\u02eb\u02ed\5\u00c0a\2\u02ec\u02e9\3\2\2\2"+
+ "\u02ec\u02ed\3\2\2\2\u02edq\3\2\2\2\u02ee\u02f2\5t;\2\u02ef\u02f0\7f\2"+
+ "\2\u02f0\u02f1\7G\2\2\u02f1\u02f3\5\u00c0a\2\u02f2\u02ef\3\2\2\2\u02f2"+
+ "\u02f3\3\2\2\2\u02f3s\3\2\2\2\u02f4\u02fd\5x=\2\u02f5\u02f6\7\6\2\2\u02f6"+
+ "\u02f7\7.\2\2\u02f7\u02f8\3\2\2\2\u02f8\u02f9\5v<\2\u02f9\u02fa\5\u009a"+
+ "N\2\u02fa\u02fc\3\2\2\2\u02fb\u02f5\3\2\2\2\u02fc\u02ff\3\2\2\2\u02fd"+
+ "\u02fb\3\2\2\2\u02fd\u02fe\3\2\2\2\u02feu\3\2\2\2\u02ff\u02fd\3\2\2\2"+
+ "\u0300\u0304\5\32\16\2\u0301\u0304\5\u008eH\2\u0302\u0304\5\u0090I\2\u0303"+
+ "\u0300\3\2\2\2\u0303\u0301\3\2\2\2\u0303\u0302\3\2\2\2\u0304w\3\2\2\2"+
+ "\u0305\u0307\t\6\2\2\u0306\u0305\3\2\2\2\u0307\u030a\3\2\2\2\u0308\u0306"+
+ "\3\2\2\2\u0308\u0309\3\2\2\2\u0309\u030b\3\2\2\2\u030a\u0308\3\2\2\2\u030b"+
+ "\u030c\5z>\2\u030cy\3\2\2\2\u030d\u0311\5\u0080A\2\u030e\u0311\5|?\2\u030f"+
+ "\u0311\5~@\2\u0310\u030d\3\2\2\2\u0310\u030e\3\2\2\2\u0310\u030f\3\2\2"+
+ "\2\u0311{\3\2\2\2\u0312\u0313\7n\2\2\u0313\u0314\7m\2\2\u0314\u0315\5"+
+ "\u00b4[\2\u0315\u0316\7\34\2\2\u0316\u0317\5.\30\2\u0317\u0318\7\35\2"+
+ "\2\u0318}\3\2\2\2\u0319\u031a\7o\2\2\u031a\u031b\7m\2\2\u031b\u031c\5"+
+ "\u00b4[\2\u031c\u031d\7\34\2\2\u031d\u031e\5.\30\2\u031e\u031f\7\35\2"+
+ "\2\u031f\177\3\2\2\2\u0320\u0325\5\u0082B\2\u0321\u0322\7\66\2\2\u0322"+
+ "\u0324\5\u0082B\2\u0323\u0321\3\2\2\2\u0324\u0327\3\2\2\2\u0325\u0323"+
+ "\3\2\2\2\u0325\u0326\3\2\2\2\u0326\u0081\3\2\2\2\u0327\u0325\3\2\2\2\u0328"+
+ "\u0330\5\u008cG\2\u0329\u032f\5\u0084C\2\u032a\u032f\5\u0088E\2\u032b"+
+ "\u032f\5\u008aF\2\u032c\u032f\5\u0086D\2\u032d\u032f\5\u009aN\2\u032e"+
+ "\u0329\3\2\2\2\u032e\u032a\3\2\2\2\u032e\u032b\3\2\2\2\u032e\u032c\3\2"+
+ "\2\2\u032e\u032d\3\2\2\2\u032f\u0332\3\2\2\2\u0330\u032e\3\2\2\2\u0330"+
+ "\u0331\3\2\2\2\u0331\u0083\3\2\2\2\u0332\u0330\3\2\2\2\u0333\u0334\7\67"+
+ "\2\2\u0334\u0335\7\67\2\2\u0335\u0336\5.\30\2\u0336\u0337\78\2\2\u0337"+
+ "\u0338\78\2\2\u0338\u0085\3\2\2\2\u0339\u033a\7\67\2\2\u033a\u033b\78"+
+ "\2\2\u033b\u0087\3\2\2\2\u033c\u033d\7\67\2\2\u033d\u033e\5.\30\2\u033e"+
+ "\u033f\78\2\2\u033f\u0089\3\2\2\2\u0340\u0347\79\2\2\u0341\u0348\5\u00ca"+
+ "f\2\u0342\u0348\5\u00c8e\2\u0343\u0348\7\u0089\2\2\u0344\u0348\5\u0090"+
+ "I\2\u0345\u0348\5\u008eH\2\u0346\u0348\5\u0092J\2\u0347\u0341\3\2\2\2"+
+ "\u0347\u0342\3\2\2\2\u0347\u0343\3\2\2\2\u0347\u0344\3\2\2\2\u0347\u0345"+
+ "\3\2\2\2\u0347\u0346\3\2\2\2\u0348\u008b\3\2\2\2\u0349\u0358\7\u0082\2"+
+ "\2\u034a\u0358\7k\2\2\u034b\u0358\7l\2\2\u034c\u0358\7\u0083\2\2\u034d"+
+ "\u0358\5\u00c8e\2\u034e\u0358\5\u008eH\2\u034f\u0358\5\u0090I\2\u0350"+
+ "\u0358\5\u0092J\2\u0351\u0358\5\u00b6\\\2\u0352\u0358\5\u0098M\2\u0353"+
+ "\u0358\5\u0094K\2\u0354\u0358\5\u0096L\2\u0355\u0358\5\u00c4c\2\u0356"+
+ "\u0358\5\u009eP\2\u0357\u0349\3\2\2\2\u0357\u034a\3\2\2\2\u0357\u034b"+
+ "\3\2\2\2\u0357\u034c\3\2\2\2\u0357\u034d\3\2\2\2\u0357\u034e\3\2\2\2\u0357"+
+ "\u034f\3\2\2\2\u0357\u0350\3\2\2\2\u0357\u0351\3\2\2\2\u0357\u0352\3\2"+
+ "\2\2\u0357\u0353\3\2\2\2\u0357\u0354\3\2\2\2\u0357\u0355\3\2\2\2\u0357"+
+ "\u0356\3\2\2\2\u0358\u008d\3\2\2\2\u0359\u035a\7\"\2\2\u035a\u035b\5\32"+
+ "\16\2\u035b\u008f\3\2\2\2\u035c\u035e\7\32\2\2\u035d\u035f\5.\30\2\u035e"+
+ "\u035d\3\2\2\2\u035e\u035f\3\2\2\2\u035f\u0360\3\2\2\2\u0360\u0361\7\33"+
+ "\2\2\u0361\u0091\3\2\2\2\u0362\u0363\7:\2\2\u0363\u0093\3\2\2\2\u0364"+
+ "\u0365\7\b\2\2\u0365\u0366\7\34\2\2\u0366\u0367\5.\30\2\u0367\u0368\7"+
+ "\35\2\2\u0368\u0095\3\2\2\2\u0369\u036a\7j\2\2\u036a\u036b\7\34\2\2\u036b"+
+ "\u036c\5.\30\2\u036c\u036d\7\35\2\2\u036d\u0097\3\2\2\2\u036e\u036f\5"+
+ "\32\16\2\u036f\u0370\5\u009aN\2\u0370\u0099\3\2\2\2\u0371\u0378\7\32\2"+
+ "\2\u0372\u0374\5\u009cO\2\u0373\u0375\7\26\2\2\u0374\u0373\3\2\2\2\u0374"+
+ "\u0375\3\2\2\2\u0375\u0377\3\2\2\2\u0376\u0372\3\2\2\2\u0377\u037a\3\2"+
+ "\2\2\u0378\u0376\3\2\2\2\u0378\u0379\3\2\2\2\u0379\u037b\3\2\2\2\u037a"+
+ "\u0378\3\2\2\2\u037b\u037c\7\33\2\2\u037c\u009b\3\2\2\2\u037d\u0380\5"+
+ "\60\31\2\u037e\u0380\7\u0081\2\2\u037f\u037d\3\2\2\2\u037f\u037e\3\2\2"+
+ "\2\u0380\u009d\3\2\2\2\u0381\u0384\5\u00a0Q\2\u0382\u0384\5\u00a2R\2\u0383"+
+ "\u0381\3\2\2\2\u0383\u0382\3\2\2\2\u0384\u009f\3\2\2\2\u0385\u0386\5\32"+
+ "\16\2\u0386\u0387\7;\2\2\u0387\u0388\7\u0083\2\2\u0388\u00a1\3\2\2\2\u0389"+
+ "\u038a\7\31\2\2\u038a\u038c\7\32\2\2\u038b\u038d\5*\26\2\u038c\u038b\3"+
+ "\2\2\2\u038c\u038d\3\2\2\2\u038d\u038e\3\2\2\2\u038e\u0391\7\33\2\2\u038f"+
+ "\u0390\7G\2\2\u0390\u0392\5\u00b4[\2\u0391\u038f\3\2\2\2\u0391\u0392\3"+
+ "\2\2\2\u0392\u0393\3\2\2\2\u0393\u0395\7\34\2\2\u0394\u0396\5.\30\2\u0395"+
+ "\u0394\3\2\2\2\u0395\u0396\3\2\2\2\u0396\u0397\3\2\2\2\u0397\u0398\7\35"+
+ "\2\2\u0398\u00a3\3\2\2\2\u0399\u039a\7t\2\2\u039a\u039b\7}\2\2\u039b\u039c"+
+ "\5\60\31\2\u039c\u039d\7{\2\2\u039d\u03a1\5\60\31\2\u039e\u039f\7H\2\2"+
+ "\u039f\u03a0\7\177\2\2\u03a0\u03a2\5\60\31\2\u03a1\u039e\3\2\2\2\u03a1"+
+ "\u03a2\3\2\2\2\u03a2\u03b1\3\2\2\2\u03a3\u03a4\7t\2\2\u03a4\u03a5\7}\2"+
+ "\2\u03a5\u03aa\5\u00c2b\2\u03a6\u03a7\7\26\2\2\u03a7\u03a9\5\u00c2b\2"+
+ "\u03a8\u03a6\3\2\2\2\u03a9\u03ac\3\2\2\2\u03aa\u03a8\3\2\2\2\u03aa\u03ab"+
+ "\3\2\2\2\u03ab\u03ad\3\2\2\2\u03ac\u03aa\3\2\2\2\u03ad\u03ae\7{\2\2\u03ae"+
+ "\u03af\5\60\31\2\u03af\u03b1\3\2\2\2\u03b0\u0399\3\2\2\2\u03b0\u03a3\3"+
+ "\2\2\2\u03b1\u00a5\3\2\2\2\u03b2\u03b3\7u\2\2\u03b3\u03b4\7}\2\2\u03b4"+
+ "\u03b5\5\u00b0Y\2\u03b5\u00a7\3\2\2\2\u03b6\u03b7\7v\2\2\u03b7\u03b8\7"+
+ "}\2\2\u03b8\u03b9\5\u00b0Y\2\u03b9\u03ba\7G\2\2\u03ba\u03bb\5\60\31\2"+
+ "\u03bb\u00a9\3\2\2\2\u03bc\u03bd\7w\2\2\u03bd\u03be\7}\2\2\u03be\u03bf"+
+ "\7|\2\2\u03bf\u03c0\7b\2\2\u03c0\u03c1\5\u00b0Y\2\u03c1\u03c2\7~\2\2\u03c2"+
+ "\u03c3\5\60\31\2\u03c3\u00ab\3\2\2\2\u03c4\u03c5\7x\2\2\u03c5\u03c6\7"+
+ "}\2\2\u03c6\u03cb\5\u00b2Z\2\u03c7\u03c8\7\26\2\2\u03c8\u03ca\5\u00b2"+
+ "Z\2\u03c9\u03c7\3\2\2\2\u03ca\u03cd\3\2\2\2\u03cb\u03c9\3\2\2\2\u03cb"+
+ "\u03cc\3\2\2\2\u03cc\u03ce\3\2\2\2\u03cd\u03cb\3\2\2\2\u03ce\u03cf\7y"+
+ "\2\2\u03cf\u03d0\5\60\31\2\u03d0\u03d1\7D\2\2\u03d1\u03d2\5\60\31\2\u03d2"+
+ "\u00ad\3\2\2\2\u03d3\u03d4\7z\2\2\u03d4\u03d5\7}\2\2\u03d5\u03d6\5\60"+
+ "\31\2\u03d6\u03d7\7{\2\2\u03d7\u03d8\5\60\31\2\u03d8\u00af\3\2\2\2\u03d9"+
+ "\u03dc\5\u008cG\2\u03da\u03dd\5\u0084C\2\u03db\u03dd\5\u008aF\2\u03dc"+
+ "\u03da\3\2\2\2\u03dc\u03db\3\2\2\2\u03dd\u03de\3\2\2\2\u03de\u03dc\3\2"+
+ "\2\2\u03de\u03df\3\2\2\2\u03df\u00b1\3\2\2\2\u03e0\u03e1\5\u008eH\2\u03e1"+
+ "\u03e2\7\27\2\2\u03e2\u03e3\5\60\31\2\u03e3\u00b3\3\2\2\2\u03e4\u03e5"+
+ "\7\32\2\2\u03e5\u03ed\7\33\2\2\u03e6\u03ea\5\u00b8]\2\u03e7\u03eb\7\u0081"+
+ "\2\2\u03e8\u03eb\7$\2\2\u03e9\u03eb\7\61\2\2\u03ea\u03e7\3\2\2\2\u03ea"+
+ "\u03e8\3\2\2\2\u03ea\u03e9\3\2\2\2\u03ea\u03eb\3\2\2\2\u03eb\u03ed\3\2"+
+ "\2\2\u03ec\u03e4\3\2\2\2\u03ec\u03e6\3\2\2\2\u03ed\u00b5\3\2\2\2\u03ee"+
+ "\u03f7\7\34\2\2\u03ef\u03f4\5\u00c2b\2\u03f0\u03f1\7\26\2\2\u03f1\u03f3"+
+ "\5\u00c2b\2\u03f2\u03f0\3\2\2\2\u03f3\u03f6\3\2\2\2\u03f4\u03f2\3\2\2"+
+ "\2\u03f4\u03f5\3\2\2\2\u03f5\u03f8\3\2\2\2\u03f6\u03f4\3\2\2\2\u03f7\u03ef"+
+ "\3\2\2\2\u03f7\u03f8\3\2\2\2\u03f8\u03f9\3\2\2\2\u03f9\u03ff\7\35\2\2"+
+ "\u03fa\u03fb\7<\2\2\u03fb\u03fc\5.\30\2\u03fc\u03fd\7=\2\2\u03fd\u03ff"+
+ "\3\2\2\2\u03fe\u03ee\3\2\2\2\u03fe\u03fa\3\2\2\2\u03ff\u00b7\3\2\2\2\u0400"+
+ "\u0404\5\32\16\2\u0401\u0404\7\u0082\2\2\u0402\u0404\5\u00ba^\2\u0403"+
+ "\u0400\3\2\2\2\u0403\u0401\3\2\2\2\u0403\u0402\3\2\2\2\u0404\u00b9\3\2"+
+ "\2\2\u0405\u0408\5\u00bc_\2\u0406\u0408\5\u00be`\2\u0407\u0405\3\2\2\2"+
+ "\u0407\u0406\3\2\2\2\u0408\u00bb\3\2\2\2\u0409\u040a\7\31\2\2\u040a\u040b"+
+ "\7\32\2\2\u040b\u040c\7$\2\2\u040c\u040d\7\33\2\2\u040d\u00bd\3\2\2\2"+
+ "\u040e\u040f\7\31\2\2\u040f\u0418\7\32\2\2\u0410\u0415\5\u00b4[\2\u0411"+
+ "\u0412\7\26\2\2\u0412\u0414\5\u00b4[\2\u0413\u0411\3\2\2\2\u0414\u0417"+
+ "\3\2\2\2\u0415\u0413\3\2\2\2\u0415\u0416\3\2\2\2\u0416\u0419\3\2\2\2\u0417"+
+ "\u0415\3\2\2\2\u0418\u0410\3\2\2\2\u0418\u0419\3\2\2\2\u0419\u041a\3\2"+
+ "\2\2\u041a\u041b\7\33\2\2\u041b\u041c\7G\2\2\u041c\u041d\5\u00b4[\2\u041d"+
+ "\u00bf\3\2\2\2\u041e\u0420\5\u00b8]\2\u041f\u0421\7\u0081\2\2\u0420\u041f"+
+ "\3\2\2\2\u0420\u0421\3\2\2\2\u0421\u00c1\3\2\2\2\u0422\u0425\5\60\31\2"+
+ "\u0423\u0425\7\u0089\2\2\u0424\u0422\3\2\2\2\u0424\u0423\3\2\2\2\u0425"+
+ "\u0426\3\2\2\2\u0426\u0427\t\b\2\2\u0427\u0428\5\60\31\2\u0428\u00c3\3"+
+ "\2\2\2\u0429\u042b\7\67\2\2\u042a\u042c\5.\30\2\u042b\u042a\3\2\2\2\u042b"+
+ "\u042c\3\2\2\2\u042c\u042d\3\2\2\2\u042d\u042e\78\2\2\u042e\u00c5\3\2"+
+ "\2\2\u042f\u0430\5\u00c8e\2\u0430\u00c7\3\2\2\2\u0431\u0432\7\u0080\2"+
+ "\2\u0432\u00c9\3\2\2\2\u0433\u0434\t\t\2\2\u0434\u00cb\3\2\2\2q\u00d4"+
+ "\u00d8\u00e8\u00ee\u00f6\u00fd\u0109\u011f\u0127\u012c\u012f\u0133\u013c"+
+ "\u0145\u0148\u014f\u0156\u0158\u015f\u0166\u0168\u016f\u0174\u0178\u017c"+
+ "\u0183\u018d\u0194\u019b\u01a2\u01b2\u01b6\u01be\u01c0\u01cc\u01d2\u01d6"+
+ "\u01da\u01e5\u01eb\u01fa\u0200\u0204\u0208\u020f\u0216\u021c\u0221\u0223"+
+ "\u0227\u022e\u0235\u023e\u024a\u0254\u0260\u0264\u026d\u0274\u028a\u028f"+
+ "\u0294\u0298\u02a4\u02ac\u02b0\u02b7\u02be\u02c4\u02cb\u02d3\u02da\u02e0"+
+ "\u02e6\u02ec\u02f2\u02fd\u0303\u0308\u0310\u0325\u032e\u0330\u0347\u0357"+
+ "\u035e\u0374\u0378\u037f\u0383\u038c\u0391\u0395\u03a1\u03aa\u03b0\u03cb"+
+ "\u03dc\u03de\u03ea\u03ec\u03f4\u03f7\u03fe\u0403\u0407\u0415\u0418\u0420"+
+ "\u0424\u042b";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
diff --git a/src/main/java/org/rumbledb/parser/JsoniqVisitor.java b/src/main/java/org/rumbledb/parser/JsoniqVisitor.java
index e4a5acf0df..c0066892eb 100644
--- a/src/main/java/org/rumbledb/parser/JsoniqVisitor.java
+++ b/src/main/java/org/rumbledb/parser/JsoniqVisitor.java
@@ -499,6 +499,54 @@ public interface JsoniqVisitor extends ParseTreeVisitor {
* @return the visitor result
*/
T visitInlineFunctionExpr(JsoniqParser.InlineFunctionExprContext ctx);
+ /**
+ * Visit a parse tree produced by {@link JsoniqParser#insertExpr}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitInsertExpr(JsoniqParser.InsertExprContext ctx);
+ /**
+ * Visit a parse tree produced by {@link JsoniqParser#deleteExpr}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitDeleteExpr(JsoniqParser.DeleteExprContext ctx);
+ /**
+ * Visit a parse tree produced by {@link JsoniqParser#renameExpr}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitRenameExpr(JsoniqParser.RenameExprContext ctx);
+ /**
+ * Visit a parse tree produced by {@link JsoniqParser#replaceExpr}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitReplaceExpr(JsoniqParser.ReplaceExprContext ctx);
+ /**
+ * Visit a parse tree produced by {@link JsoniqParser#transformExpr}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitTransformExpr(JsoniqParser.TransformExprContext ctx);
+ /**
+ * Visit a parse tree produced by {@link JsoniqParser#appendExpr}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitAppendExpr(JsoniqParser.AppendExprContext ctx);
+ /**
+ * Visit a parse tree produced by {@link JsoniqParser#updateLocator}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitUpdateLocator(JsoniqParser.UpdateLocatorContext ctx);
+ /**
+ * Visit a parse tree produced by {@link JsoniqParser#copyDecl}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitCopyDecl(JsoniqParser.CopyDeclContext ctx);
/**
* Visit a parse tree produced by {@link JsoniqParser#sequenceType}.
* @param ctx the parse tree
diff --git a/src/main/java/org/rumbledb/runtime/CommaExpressionIterator.java b/src/main/java/org/rumbledb/runtime/CommaExpressionIterator.java
index 527764dce5..22dd9cf003 100644
--- a/src/main/java/org/rumbledb/runtime/CommaExpressionIterator.java
+++ b/src/main/java/org/rumbledb/runtime/CommaExpressionIterator.java
@@ -31,6 +31,9 @@
import org.rumbledb.types.BuiltinTypesCatalogue;
import org.rumbledb.types.ItemType;
import org.rumbledb.types.SequenceType;
+
+import org.rumbledb.runtime.update.PendingUpdateList;
+
import sparksoniq.spark.SparkSessionManager;
import java.util.ArrayList;
@@ -44,11 +47,21 @@ public class CommaExpressionIterator extends HybridRuntimeIterator {
private Item nextResult;
private int childIndex;
+
public CommaExpressionIterator(
List childIterators,
+ boolean isUpdating,
RuntimeStaticContext staticContext
) {
super(childIterators, staticContext);
+ this.isUpdating = isUpdating;
+ }
+
+ public CommaExpressionIterator(
+ List childIterators,
+ RuntimeStaticContext staticContext
+ ) {
+ this(childIterators, false, staticContext);
}
@Override
@@ -225,4 +238,16 @@ public NativeClauseContext generateNativeQuery(NativeClauseContext nativeClauseC
public List getChildren() {
return this.children;
}
+
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ if (!isUpdating()) {
+ return new PendingUpdateList();
+ }
+
+ PendingUpdateList pul = new PendingUpdateList();
+ for (RuntimeIterator child : children) {
+ pul = PendingUpdateList.mergeUpdates(pul, child.getPendingUpdateList(context), this.getMetadata());
+ }
+ return pul;
+ }
}
diff --git a/src/main/java/org/rumbledb/runtime/RuntimeIterator.java b/src/main/java/org/rumbledb/runtime/RuntimeIterator.java
index 429b88cc6e..d550548592 100644
--- a/src/main/java/org/rumbledb/runtime/RuntimeIterator.java
+++ b/src/main/java/org/rumbledb/runtime/RuntimeIterator.java
@@ -52,6 +52,7 @@
import org.rumbledb.items.structured.JSoundDataFrame;
import org.rumbledb.runtime.flwor.NativeClauseContext;
import org.rumbledb.runtime.misc.ComparisonIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
import org.rumbledb.types.BuiltinTypesCatalogue;
import org.rumbledb.types.SequenceType;
@@ -66,6 +67,7 @@ public abstract class RuntimeIterator implements RuntimeIteratorInterface, KryoS
private static final long serialVersionUID = 1L;
protected transient boolean hasNext;
protected transient boolean isOpen;
+ protected transient boolean isUpdating;
protected List children;
protected transient DynamicContext currentDynamicContextForLocalExecution;
protected RuntimeStaticContext staticContext;
@@ -80,6 +82,8 @@ protected RuntimeIterator(List children, RuntimeStaticContext s
);
}
this.isOpen = false;
+ this.isUpdating = false;
+
this.children = new ArrayList<>();
if (children != null && !children.isEmpty()) {
this.children.addAll(children);
@@ -300,6 +304,17 @@ public JSoundDataFrame getDataFrame(DynamicContext context) {
);
}
+ public boolean isUpdating() {
+ return this.isUpdating;
+ }
+
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ throw new OurBadException(
+ "Pending Update Lists are not implemented for the iterator " + getClass().getCanonicalName(),
+ getMetadata()
+ );
+ }
+
public abstract Item next();
public List- materialize(DynamicContext context) {
@@ -407,6 +422,8 @@ public void print(StringBuffer buffer, int indent) {
buffer.append(" | ");
buffer.append(getStaticType());
buffer.append(" | ");
+ buffer.append(this.isUpdating ? "updating" : "simple");
+ buffer.append(" | ");
buffer.append("Variable dependencies: ");
Map dependencies = getVariableDependencies();
diff --git a/src/main/java/org/rumbledb/runtime/control/IfRuntimeIterator.java b/src/main/java/org/rumbledb/runtime/control/IfRuntimeIterator.java
index f111d0297a..a7bbd5907b 100644
--- a/src/main/java/org/rumbledb/runtime/control/IfRuntimeIterator.java
+++ b/src/main/java/org/rumbledb/runtime/control/IfRuntimeIterator.java
@@ -28,6 +28,7 @@
import org.rumbledb.items.structured.JSoundDataFrame;
import org.rumbledb.runtime.HybridRuntimeIterator;
import org.rumbledb.runtime.RuntimeIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
public class IfRuntimeIterator extends HybridRuntimeIterator {
@@ -39,12 +40,23 @@ public IfRuntimeIterator(
RuntimeIterator condition,
RuntimeIterator branch,
RuntimeIterator elseBranch,
+ boolean isUpdating,
RuntimeStaticContext staticContext
) {
super(null, staticContext);
this.children.add(condition);
this.children.add(branch);
this.children.add(elseBranch);
+ this.isUpdating = isUpdating;
+ }
+
+ public IfRuntimeIterator(
+ RuntimeIterator condition,
+ RuntimeIterator branch,
+ RuntimeIterator elseBranch,
+ RuntimeStaticContext staticContext
+ ) {
+ this(condition, branch, elseBranch, false, staticContext);
}
@Override
@@ -109,4 +121,14 @@ public JSoundDataFrame getDataFrame(DynamicContext dynamicContext) {
return iterator.getDataFrame(dynamicContext);
}
+
+ @Override
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ if (!isUpdating()) {
+ return new PendingUpdateList();
+ }
+
+ RuntimeIterator iterator = selectApplicableIterator(context);
+ return iterator.getPendingUpdateList(context);
+ }
}
diff --git a/src/main/java/org/rumbledb/runtime/control/TypeswitchRuntimeIterator.java b/src/main/java/org/rumbledb/runtime/control/TypeswitchRuntimeIterator.java
index 33bb7273e0..7c29f6e37a 100644
--- a/src/main/java/org/rumbledb/runtime/control/TypeswitchRuntimeIterator.java
+++ b/src/main/java/org/rumbledb/runtime/control/TypeswitchRuntimeIterator.java
@@ -9,6 +9,7 @@
import org.rumbledb.runtime.HybridRuntimeIterator;
import org.rumbledb.runtime.RuntimeIterator;
import org.rumbledb.runtime.typing.InstanceOfIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
import org.rumbledb.types.SequenceType;
import java.util.Collections;
@@ -28,6 +29,7 @@ public TypeswitchRuntimeIterator(
RuntimeIterator test,
List cases,
TypeswitchRuntimeIteratorCase defaultCase,
+ boolean isUpdating,
RuntimeStaticContext staticContext
) {
super(null, staticContext);
@@ -40,9 +42,20 @@ public TypeswitchRuntimeIterator(
this.testField = test;
this.cases = cases;
this.defaultCase = defaultCase;
+ this.isUpdating = isUpdating;
this.matchingIterator = null;
}
+ public TypeswitchRuntimeIterator(
+ RuntimeIterator test,
+ List cases,
+ TypeswitchRuntimeIteratorCase defaultCase,
+ RuntimeStaticContext staticContext
+ ) {
+ this(test, cases, defaultCase, false, staticContext);
+ }
+
+
@Override
public void openLocal() {
// this.matchingIterator is null at that point;
@@ -175,6 +188,37 @@ public JavaRDD
- getRDDAux(DynamicContext dynamicContext) {
}
@Override
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ if (!isUpdating()) {
+ return new PendingUpdateList();
+ }
+ this.testValue = this.testField.materializeFirstItemOrNull(context);
+ RuntimeIterator localMatchingIterator;
+
+ for (TypeswitchRuntimeIteratorCase typeSwitchCase : this.cases) {
+ localMatchingIterator = testTypeMatchAndReturnCorrespondingIterator(typeSwitchCase);
+ if (localMatchingIterator != null) {
+ if (typeSwitchCase.getVariableName() != null) {
+ context.getVariableValues()
+ .addVariableValue(
+ typeSwitchCase.getVariableName(),
+ Collections.singletonList(this.testValue)
+ );
+ }
+ return localMatchingIterator.getPendingUpdateList(context);
+ }
+ }
+
+ if (this.defaultCase.getVariableName() != null) {
+ context.getVariableValues()
+ .addVariableValue(
+ this.defaultCase.getVariableName(),
+ Collections.singletonList(this.testValue)
+ );
+ }
+ return this.defaultCase.getReturnIterator().getPendingUpdateList(context);
+ }
+
protected boolean implementsDataFrames() {
return true;
}
@@ -194,7 +238,6 @@ public JSoundDataFrame getDataFrame(DynamicContext context) {
Collections.singletonList(this.testValue)
);
}
-
return localMatchingIterator.getDataFrame(context);
}
}
diff --git a/src/main/java/org/rumbledb/runtime/flwor/clauses/ReturnClauseSparkIterator.java b/src/main/java/org/rumbledb/runtime/flwor/clauses/ReturnClauseSparkIterator.java
index d00f5dde85..8f7250e7eb 100644
--- a/src/main/java/org/rumbledb/runtime/flwor/clauses/ReturnClauseSparkIterator.java
+++ b/src/main/java/org/rumbledb/runtime/flwor/clauses/ReturnClauseSparkIterator.java
@@ -46,6 +46,9 @@
import org.rumbledb.runtime.typing.ValidateTypeIterator;
import org.rumbledb.types.SequenceType;
import org.rumbledb.types.TypeMappings;
+
+import org.rumbledb.runtime.update.PendingUpdateList;
+
import sparksoniq.jsoniq.tuple.FlworTuple;
import sparksoniq.spark.SparkSessionManager;
@@ -72,14 +75,24 @@ public class ReturnClauseSparkIterator extends HybridRuntimeIterator {
public ReturnClauseSparkIterator(
RuntimeTupleIterator child,
RuntimeIterator expression,
+ boolean isUpdating,
RuntimeStaticContext staticContext
) {
super(Collections.singletonList(expression), staticContext);
this.child = child;
this.expression = expression;
+ this.isUpdating = isUpdating;
setInputAndOutputTupleVariableDependencies();
}
+ public ReturnClauseSparkIterator(
+ RuntimeTupleIterator child,
+ RuntimeIterator expression,
+ RuntimeStaticContext staticContext
+ ) {
+ this(child, expression, false, staticContext);
+ }
+
@Override
public JavaRDD
- getRDDAux(DynamicContext context) {
RuntimeIterator expression = this.children.get(0);
@@ -564,4 +577,57 @@ public NativeClauseContext generateNativeQuery(NativeClauseContext nativeClauseC
resultColumnName = "`" + resultColumnName + "`";
return new NativeClauseContext(nativeClauseContext, resultColumnName, resultType);
}
+
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ if (!isUpdating()) {
+ return new PendingUpdateList();
+ }
+ PendingUpdateList result = new PendingUpdateList();
+
+ if (!isRDDOrDataFrame()) {
+ this.child.open(context);
+ this.tupleContext = new DynamicContext(context); // assign current context
+
+ while (this.child.hasNext()) {
+ FlworTuple tuple = this.child.next();
+ this.tupleContext.getVariableValues().removeAllVariables(); // clear the previous variables
+ this.tupleContext.getVariableValues().setBindingsFromTuple(tuple, getMetadata()); // assign new
+ // variables
+ // from new tuple
+
+ result = PendingUpdateList.mergeUpdates(
+ result,
+ this.expression.getPendingUpdateList(this.tupleContext),
+ this.getMetadata()
+ );
+
+ }
+ this.child.close();
+ return result;
+
+ // execution reaches here when there are no more results
+ }
+
+ RuntimeIterator expression = this.children.get(0);
+ if (expression.isRDDOrDataFrame()) {
+ if (this.child.isDataFrame())
+ throw new JobWithinAJobException(
+ "A return clause expression cannot produce a big sequence of items for a big number of tuples, as this would lead to a data flow explosion.",
+ getMetadata()
+ );
+ // context
+ this.child.open(context);
+ while (this.child.hasNext()) {
+ FlworTuple tuple = this.child.next();
+ // We need a fresh context every time, because the evaluation of RDD is lazy.
+ DynamicContext dynamicContext = new DynamicContext(context);
+ dynamicContext.getVariableValues().setBindingsFromTuple(tuple, getMetadata()); // assign new variables
+ // from new tuple
+
+ PendingUpdateList intermediateResult = this.expression.getPendingUpdateList(dynamicContext);
+ result = PendingUpdateList.mergeUpdates(result, intermediateResult, this.getMetadata());
+ }
+ }
+ return result;
+ }
}
diff --git a/src/main/java/org/rumbledb/runtime/functions/strings/NormalizeSpaceFunctionIterator.java b/src/main/java/org/rumbledb/runtime/functions/strings/NormalizeSpaceFunctionIterator.java
index 9b19d0b89d..13b704934d 100644
--- a/src/main/java/org/rumbledb/runtime/functions/strings/NormalizeSpaceFunctionIterator.java
+++ b/src/main/java/org/rumbledb/runtime/functions/strings/NormalizeSpaceFunctionIterator.java
@@ -20,7 +20,7 @@
package org.rumbledb.runtime.functions.strings;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.rumbledb.api.Item;
import org.rumbledb.context.DynamicContext;
import org.rumbledb.context.Name;
diff --git a/src/main/java/org/rumbledb/runtime/typing/CastIterator.java b/src/main/java/org/rumbledb/runtime/typing/CastIterator.java
index c034b9452f..8d69556e8e 100644
--- a/src/main/java/org/rumbledb/runtime/typing/CastIterator.java
+++ b/src/main/java/org/rumbledb/runtime/typing/CastIterator.java
@@ -2,7 +2,7 @@
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.Hex;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.rumbledb.api.Item;
import org.rumbledb.context.DynamicContext;
import org.rumbledb.context.RuntimeStaticContext;
diff --git a/src/main/java/org/rumbledb/runtime/update/PendingUpdateList.java b/src/main/java/org/rumbledb/runtime/update/PendingUpdateList.java
new file mode 100644
index 0000000000..6e56434714
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/PendingUpdateList.java
@@ -0,0 +1,345 @@
+package org.rumbledb.runtime.update;
+
+import org.rumbledb.api.Item;
+import org.rumbledb.exceptions.ExceptionMetadata;
+import org.rumbledb.exceptions.OurBadException;
+import org.rumbledb.exceptions.TooManyRenamesOnSameTargetSelectorException;
+import org.rumbledb.exceptions.TooManyReplacesOnSameTargetSelectorException;
+import org.rumbledb.runtime.update.primitives.*;
+
+import java.util.*;
+
+public class PendingUpdateList {
+
+ private Map
- insertObjMap;
+ private Map
- >> insertArrayMap;
+ private Map
- > delReplaceObjMap;
+ private Map
- > delReplaceArrayMap;
+ private Map
- > renameObjMap;
+ private Comparator
- targetComparator;
+
+ public PendingUpdateList() {
+ this.targetComparator = (item1, item2) -> {
+ int hashCompare = Integer.compare(item1.hashCode(), item2.hashCode());
+ if (item1.hashCode() != item2.hashCode()) {
+ return hashCompare;
+ }
+ if (!item1.equals(item2)) {
+ return hashCompare;
+ }
+ return Integer.compare(System.identityHashCode(item1), System.identityHashCode(item2));
+ };
+ this.insertObjMap = new TreeMap<>(this.targetComparator);
+ this.insertArrayMap = new TreeMap<>(this.targetComparator);
+ this.delReplaceObjMap = new TreeMap<>(this.targetComparator);
+ this.delReplaceArrayMap = new TreeMap<>(this.targetComparator);
+ this.renameObjMap = new TreeMap<>(this.targetComparator);
+ }
+
+ public PendingUpdateList(UpdatePrimitive updatePrimitive) {
+ this();
+ this.addUpdatePrimitive(updatePrimitive);
+ }
+
+ public void addUpdatePrimitive(UpdatePrimitive updatePrimitive) {
+ Item target = updatePrimitive.getTarget();
+ if (updatePrimitive.isDeleteObject()) {
+ Map
- locSrcMap = delReplaceObjMap.getOrDefault(target, new HashMap<>());
+ for (Item locator : updatePrimitive.getContentList()) {
+ locSrcMap.put(locator, null);
+ }
+ delReplaceObjMap.put(target, locSrcMap);
+
+ } else if (updatePrimitive.isReplaceObject()) {
+ Map
- locSrcMap = delReplaceObjMap.getOrDefault(target, new HashMap<>());
+ locSrcMap.put(updatePrimitive.getSelector(), updatePrimitive.getContent());
+ delReplaceObjMap.put(target, locSrcMap);
+
+ } else if (updatePrimitive.isInsertObject()) {
+ insertObjMap.put(target, updatePrimitive.getContent());
+
+ } else if (updatePrimitive.isRenameObject()) {
+ Map
- locSrcMap = renameObjMap.getOrDefault(target, new HashMap<>());
+ locSrcMap.put(updatePrimitive.getSelector(), updatePrimitive.getContent());
+ renameObjMap.put(target, locSrcMap);
+
+ } else if (updatePrimitive.isDeleteArray()) {
+ Map
- locSrcMap = delReplaceArrayMap.getOrDefault(target, new HashMap<>());
+ locSrcMap.put(updatePrimitive.getSelector(), null);
+ delReplaceArrayMap.put(target, locSrcMap);
+
+ } else if (updatePrimitive.isReplaceArray()) {
+ Map
- locSrcMap = delReplaceArrayMap.getOrDefault(target, new HashMap<>());
+ locSrcMap.put(updatePrimitive.getSelector(), updatePrimitive.getContent());
+ delReplaceArrayMap.put(target, locSrcMap);
+
+ } else if (updatePrimitive.isInsertArray()) {
+ Map
- > locSrcMap = insertArrayMap.getOrDefault(target, new HashMap<>());
+ locSrcMap.put(updatePrimitive.getSelector(), updatePrimitive.getContentList());
+ insertArrayMap.put(target, locSrcMap);
+ } else {
+ throw new OurBadException("Invalid UpdatePrimitive created");
+ }
+ }
+
+ public void applyUpdates(ExceptionMetadata metadata) {
+ UpdatePrimitiveFactory upFactory = UpdatePrimitiveFactory.getInstance();
+
+ Map
- > targetArrayPULs = new HashMap<>();
+ List tempArrayPULs;
+
+ List objectPUL = new ArrayList<>();
+ Map
- tempSelSrcMap;
+ Map
- > tempSelSrcListMap;
+ Item tempSrc;
+
+ ////// OBJECTS
+
+ // DELETES & REPLACES
+ for (Item target : delReplaceObjMap.keySet()) {
+ List
- toDel = new ArrayList<>();
+ tempSelSrcMap = delReplaceObjMap.get(target);
+ for (Item locator : tempSelSrcMap.keySet()) {
+ tempSrc = tempSelSrcMap.get(locator);
+ if (tempSrc == null) {
+ toDel.add(locator);
+ } else {
+ objectPUL.add(upFactory.createReplaceInObjectPrimitive(target, locator, tempSrc, metadata));
+ }
+ }
+ objectPUL.add(upFactory.createDeleteFromObjectPrimitive(target, toDel, metadata));
+ }
+
+ // INSERTS
+
+ for (Item target : insertObjMap.keySet()) {
+ objectPUL.add(upFactory.createInsertIntoObjectPrimitive(target, insertObjMap.get(target)));
+ }
+
+ // RENAMES
+
+ for (Item target : renameObjMap.keySet()) {
+ tempSelSrcMap = renameObjMap.get(target);
+ for (Item locator : tempSelSrcMap.keySet()) {
+ objectPUL.add(
+ upFactory.createRenameInObjectPrimitive(target, locator, tempSelSrcMap.get(locator), metadata)
+ );
+ }
+ }
+
+ ////// ARRAYS
+
+ // DELETES & REPLACES
+
+ for (Item target : delReplaceArrayMap.keySet()) {
+ tempArrayPULs = targetArrayPULs.getOrDefault(target, new ArrayList<>());
+ tempSelSrcMap = delReplaceArrayMap.get(target);
+ for (Item locator : tempSelSrcMap.keySet()) {
+ UpdatePrimitive up;
+ tempSrc = tempSelSrcMap.get(locator);
+ if (tempSrc == null) {
+ up = upFactory.createDeleteFromArrayPrimitive(target, locator, metadata);
+ } else {
+ up = upFactory.createReplaceInArrayPrimitive(target, locator, tempSrc, metadata);
+ }
+ int index = Collections.binarySearch(
+ tempArrayPULs,
+ up,
+ Comparator.comparing(UpdatePrimitive::getIntSelector)
+ );
+ if (index < 0) {
+ index = -index - 1;
+ }
+ tempArrayPULs.add(index, up);
+ }
+ targetArrayPULs.put(target, tempArrayPULs);
+ }
+
+ // INSERTS
+
+ for (Item target : insertArrayMap.keySet()) {
+ UpdatePrimitive up;
+ tempArrayPULs = targetArrayPULs.getOrDefault(target, new ArrayList<>());
+ tempSelSrcListMap = insertArrayMap.get(target);
+ for (Item locator : tempSelSrcListMap.keySet()) {
+ up = upFactory.createInsertIntoArrayPrimitive(target, locator, tempSelSrcListMap.get(locator));
+ int index = Collections.binarySearch(
+ tempArrayPULs,
+ up,
+ Comparator.comparing(UpdatePrimitive::getIntSelector)
+ );
+ if (index < 0) {
+ index = -index - 1;
+ }
+ tempArrayPULs.add(index, up);
+ }
+ targetArrayPULs.put(target, tempArrayPULs);
+ }
+
+ ////// APPLY OBJECTS
+
+ for (UpdatePrimitive updatePrimitive : objectPUL) {
+ updatePrimitive.apply();
+ }
+
+ ////// APPLY ARRAYS
+
+ for (Item target : targetArrayPULs.keySet()) {
+ tempArrayPULs = targetArrayPULs.get(target);
+ for (int i = tempArrayPULs.size() - 1; i >= 0; i--) {
+ tempArrayPULs.get(i).apply();
+ }
+ }
+
+ }
+
+ public static PendingUpdateList mergeUpdates(
+ PendingUpdateList pul1,
+ PendingUpdateList pul2,
+ ExceptionMetadata metadata
+ ) {
+ PendingUpdateList res = new PendingUpdateList();
+ Map
- tempSelSrcMap;
+ Map
- > tempSelSrcListMap;
+ Map
- tempSelSrcResMap;
+ Map
- > tempSelSrcResListMap;
+ Item tempSrc;
+ List
- tempSrcList;
+
+ ////// OBJECTS
+
+ // DELETES & REPLACES
+
+ for (Item target : pul1.delReplaceObjMap.keySet()) {
+ tempSelSrcMap = pul1.delReplaceObjMap.get(target);
+ tempSelSrcResMap = res.delReplaceObjMap.getOrDefault(target, new HashMap<>());
+
+ for (Item selector : tempSelSrcMap.keySet()) {
+ tempSelSrcResMap.put(selector, tempSelSrcMap.get(selector));
+ }
+ res.delReplaceObjMap.put(target, tempSelSrcResMap);
+ }
+
+ for (Item target : pul2.delReplaceObjMap.keySet()) {
+ tempSelSrcMap = pul2.delReplaceObjMap.get(target);
+ tempSelSrcResMap = res.delReplaceObjMap.getOrDefault(target, new HashMap<>());
+
+ for (Item selector : tempSelSrcMap.keySet()) {
+ if (tempSelSrcResMap.containsKey(selector)) {
+ tempSrc = tempSelSrcResMap.get(selector);
+ if (tempSrc != null) {
+ throw new TooManyReplacesOnSameTargetSelectorException(
+ target.getDynamicType().getName().toString(),
+ selector.getStringValue(),
+ metadata
+ );
+ }
+ continue;
+ }
+ tempSelSrcResMap.put(selector, tempSelSrcMap.get(selector));
+ }
+ res.delReplaceObjMap.put(target, tempSelSrcResMap);
+ }
+
+ // INSERTS
+
+ res.insertObjMap.putAll(pul1.insertObjMap);
+
+ for (Item target : pul2.insertObjMap.keySet()) {
+ tempSrc = pul2.insertObjMap.get(target);
+ if (res.insertObjMap.containsKey(target)) {
+ tempSrc = InsertIntoObjectPrimitive.mergeSources(res.insertObjMap.get(target), tempSrc, metadata);
+ }
+ res.insertObjMap.put(target, tempSrc);
+ }
+
+ // RENAME
+
+ for (Item target : pul1.renameObjMap.keySet()) {
+ tempSelSrcMap = pul1.renameObjMap.get(target);
+ tempSelSrcResMap = res.renameObjMap.getOrDefault(target, new HashMap<>());
+
+ for (Item selector : tempSelSrcMap.keySet()) {
+ tempSelSrcResMap.put(selector, tempSelSrcMap.get(selector));
+ }
+ res.renameObjMap.put(target, tempSelSrcResMap);
+ }
+
+ for (Item target : pul2.renameObjMap.keySet()) {
+ tempSelSrcMap = pul2.renameObjMap.get(target);
+ tempSelSrcResMap = res.renameObjMap.getOrDefault(target, new HashMap<>());
+
+ for (Item selector : tempSelSrcMap.keySet()) {
+ if (tempSelSrcResMap.containsKey(selector)) {
+ throw new TooManyRenamesOnSameTargetSelectorException(selector.getStringValue(), metadata);
+ }
+ tempSelSrcResMap.put(selector, tempSelSrcMap.get(selector));
+ }
+ res.renameObjMap.put(target, tempSelSrcResMap);
+ }
+
+ ////// ARRAYS
+
+ // DELETES & REPLACES
+
+ for (Item target : pul1.delReplaceArrayMap.keySet()) {
+ tempSelSrcMap = pul1.delReplaceArrayMap.get(target);
+ tempSelSrcResMap = res.delReplaceArrayMap.getOrDefault(target, new HashMap<>());
+
+ for (Item selector : tempSelSrcMap.keySet()) {
+ tempSelSrcResMap.put(selector, tempSelSrcMap.get(selector));
+ }
+ res.delReplaceArrayMap.put(target, tempSelSrcResMap);
+ }
+
+ for (Item target : pul2.delReplaceArrayMap.keySet()) {
+ tempSelSrcMap = pul2.delReplaceArrayMap.get(target);
+ tempSelSrcResMap = res.delReplaceArrayMap.getOrDefault(target, new HashMap<>());
+
+ for (Item selector : tempSelSrcMap.keySet()) {
+ if (tempSelSrcResMap.containsKey(selector)) {
+ tempSrc = tempSelSrcResMap.get(selector);
+ if (tempSrc != null) {
+ throw new TooManyReplacesOnSameTargetSelectorException(
+ target.getDynamicType().getName().toString(),
+ Integer.toString(selector.getIntValue()),
+ metadata
+ );
+ }
+ continue;
+ }
+ tempSelSrcResMap.put(selector, tempSelSrcMap.get(selector));
+ }
+ res.delReplaceArrayMap.put(target, tempSelSrcResMap);
+ }
+
+ // INSERTS
+
+ for (Item target : pul1.insertArrayMap.keySet()) {
+ tempSelSrcListMap = pul1.insertArrayMap.get(target);
+ tempSelSrcResListMap = res.insertArrayMap.getOrDefault(target, new HashMap<>());
+
+ for (Item selector : tempSelSrcListMap.keySet()) {
+ tempSelSrcResListMap.put(selector, tempSelSrcListMap.get(selector));
+ }
+ res.insertArrayMap.put(target, tempSelSrcResListMap);
+ }
+
+ for (Item target : pul2.insertArrayMap.keySet()) {
+ tempSelSrcListMap = pul2.insertArrayMap.get(target);
+ tempSelSrcResListMap = res.insertArrayMap.getOrDefault(target, new HashMap<>());
+
+ for (Item selector : tempSelSrcListMap.keySet()) {
+ tempSrcList = tempSelSrcResListMap.getOrDefault(selector, new ArrayList<>());
+ tempSelSrcResListMap.put(
+ selector,
+ InsertIntoArrayPrimitive.mergeSources(tempSrcList, tempSelSrcListMap.get(selector))
+ );
+ }
+ res.insertArrayMap.put(target, tempSelSrcResListMap);
+ }
+
+ return res;
+ }
+
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/expression/AppendExpressionIterator.java b/src/main/java/org/rumbledb/runtime/update/expression/AppendExpressionIterator.java
new file mode 100644
index 0000000000..054fe6f2b0
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/expression/AppendExpressionIterator.java
@@ -0,0 +1,101 @@
+package org.rumbledb.runtime.update.expression;
+
+import org.apache.spark.api.java.JavaRDD;
+import org.rumbledb.api.Item;
+import org.rumbledb.context.DynamicContext;
+import org.rumbledb.context.RuntimeStaticContext;
+import org.rumbledb.exceptions.*;
+import org.rumbledb.items.ItemFactory;
+import org.rumbledb.runtime.HybridRuntimeIterator;
+import org.rumbledb.runtime.RuntimeIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitive;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitiveFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+
+public class AppendExpressionIterator extends HybridRuntimeIterator {
+
+ private static final long serialVersionUID = 1L;
+ private RuntimeIterator arrayIterator;
+ private RuntimeIterator toAppendIterator;
+
+ public AppendExpressionIterator(
+ RuntimeIterator arrayIterator,
+ RuntimeIterator toAppendIterator,
+ RuntimeStaticContext staticContext
+ ) {
+ super(Arrays.asList(arrayIterator, toAppendIterator), staticContext);
+
+ this.arrayIterator = arrayIterator;
+ this.toAppendIterator = toAppendIterator;
+ this.isUpdating = true;
+ }
+
+ @Override
+ protected JavaRDD
- getRDDAux(DynamicContext context) {
+ return null;
+ }
+
+ @Override
+ protected void openLocal() {
+
+ }
+
+ @Override
+ protected void closeLocal() {
+
+ }
+
+ @Override
+ protected void resetLocal() {
+
+ }
+
+ @Override
+ protected boolean hasNextLocal() {
+ return false;
+ }
+
+ @Override
+ protected Item nextLocal() {
+ return null;
+ }
+
+ @Override
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ PendingUpdateList pul = new PendingUpdateList();
+ Item target;
+ Item content;
+
+ try {
+ target = this.arrayIterator.materializeExactlyOneItem(context);
+ content = this.toAppendIterator.materializeExactlyOneItem(context);
+ } catch (NoItemException | MoreThanOneItemException e) {
+ throw new RuntimeException(e);
+ }
+
+ UpdatePrimitiveFactory factory = UpdatePrimitiveFactory.getInstance();
+ UpdatePrimitive up;
+ if (target.isArray()) {
+ Item locator = ItemFactory.getInstance().createIntItem(target.getSize() + 1);
+ if (target.getMutabilityLevel() != context.getCurrentMutabilityLevel()) {
+ throw new TransformModifiesNonCopiedValueException(
+ "Attempt to modify currently immutable target",
+ this.getMetadata()
+ );
+ }
+ up = factory.createInsertIntoArrayPrimitive(target, locator, Collections.singletonList(content));
+ } else {
+ throw new InvalidUpdateTargetException(
+ "Append expression target must be a single array",
+ this.getMetadata()
+ );
+ }
+
+ pul.addUpdatePrimitive(up);
+ return pul;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/expression/DeleteExpressionIterator.java b/src/main/java/org/rumbledb/runtime/update/expression/DeleteExpressionIterator.java
new file mode 100644
index 0000000000..c9a4dc6aae
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/expression/DeleteExpressionIterator.java
@@ -0,0 +1,117 @@
+package org.rumbledb.runtime.update.expression;
+
+import org.apache.spark.api.java.JavaRDD;
+import org.rumbledb.api.Item;
+import org.rumbledb.context.DynamicContext;
+import org.rumbledb.context.RuntimeStaticContext;
+import org.rumbledb.exceptions.*;
+import org.rumbledb.runtime.HybridRuntimeIterator;
+import org.rumbledb.runtime.RuntimeIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitive;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitiveFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+public class DeleteExpressionIterator extends HybridRuntimeIterator {
+
+ private static final long serialVersionUID = 1L;
+ private RuntimeIterator mainIterator;
+ private RuntimeIterator lookupIterator;
+
+ public DeleteExpressionIterator(
+ RuntimeIterator mainIterator,
+ RuntimeIterator lookupIterator,
+ RuntimeStaticContext staticContext
+ ) {
+ super(Arrays.asList(mainIterator, lookupIterator), staticContext);
+ this.mainIterator = mainIterator;
+ this.lookupIterator = lookupIterator;
+ this.isUpdating = true;
+ }
+
+ @Override
+ protected JavaRDD
- getRDDAux(DynamicContext context) {
+ return null;
+ }
+
+ @Override
+ protected void openLocal() {
+
+ }
+
+ @Override
+ protected void closeLocal() {
+
+ }
+
+ @Override
+ protected void resetLocal() {
+
+ }
+
+ @Override
+ protected boolean hasNextLocal() {
+ return false;
+ }
+
+ @Override
+ protected Item nextLocal() {
+ return null;
+ }
+
+ @Override
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ PendingUpdateList pul = new PendingUpdateList();
+ Item main;
+ Item lookup;
+
+ try {
+ main = this.mainIterator.materializeExactlyOneItem(context);
+ lookup = this.lookupIterator.materializeExactlyOneItem(context);
+ } catch (NoItemException | MoreThanOneItemException e) {
+ throw new RuntimeException(e);
+ }
+
+ UpdatePrimitiveFactory factory = UpdatePrimitiveFactory.getInstance();
+ UpdatePrimitive up;
+ if (main.isObject()) {
+ if (!lookup.isString()) {
+ throw new CannotCastUpdateSelectorException(
+ "Delete expression selection cannot be cast to String type",
+ this.getMetadata()
+ );
+ }
+ if (main.getMutabilityLevel() != context.getCurrentMutabilityLevel()) {
+ throw new TransformModifiesNonCopiedValueException(
+ "Attempt to modify currently immutable target",
+ this.getMetadata()
+ );
+ }
+ up = factory.createDeleteFromObjectPrimitive(main, Collections.singletonList(lookup), this.getMetadata());
+ } else if (main.isArray()) {
+ if (!lookup.isInt()) {
+ throw new CannotCastUpdateSelectorException(
+ "Delete expression selection cannot be cast to Int type",
+ this.getMetadata()
+ );
+ }
+ if (main.getMutabilityLevel() != context.getCurrentMutabilityLevel()) {
+ throw new TransformModifiesNonCopiedValueException(
+ "Attempt to modify currently immutable target",
+ this.getMetadata()
+ );
+ }
+ up = factory.createDeleteFromArrayPrimitive(main, lookup, this.getMetadata());
+ } else {
+ throw new InvalidUpdateTargetException(
+ "Delete expression target must be a single array or object",
+ this.getMetadata()
+ );
+ }
+
+ pul.addUpdatePrimitive(up);
+ return pul;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/expression/InsertExpressionIterator.java b/src/main/java/org/rumbledb/runtime/update/expression/InsertExpressionIterator.java
new file mode 100644
index 0000000000..297156cdd6
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/expression/InsertExpressionIterator.java
@@ -0,0 +1,140 @@
+package org.rumbledb.runtime.update.expression;
+
+import org.apache.commons.lang3.SerializationUtils;
+import org.apache.spark.api.java.JavaRDD;
+import org.rumbledb.api.Item;
+import org.rumbledb.context.DynamicContext;
+import org.rumbledb.context.RuntimeStaticContext;
+import org.rumbledb.exceptions.*;
+import org.rumbledb.runtime.HybridRuntimeIterator;
+import org.rumbledb.runtime.RuntimeIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitive;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitiveFactory;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+public class InsertExpressionIterator extends HybridRuntimeIterator {
+
+ private static final long serialVersionUID = 1L;
+ private RuntimeIterator mainIterator;
+ private RuntimeIterator toInsertIterator;
+ private RuntimeIterator positionIterator;
+
+ public InsertExpressionIterator(
+ RuntimeIterator mainIterator,
+ RuntimeIterator toInsertIterator,
+ RuntimeIterator positionIterator,
+ RuntimeStaticContext staticContext
+ ) {
+ super(
+ positionIterator == null
+ ? Arrays.asList(mainIterator, toInsertIterator)
+ : Arrays.asList(mainIterator, toInsertIterator, positionIterator),
+ staticContext
+ );
+
+ this.mainIterator = mainIterator;
+ this.toInsertIterator = toInsertIterator;
+ this.positionIterator = positionIterator;
+ this.isUpdating = true;
+ }
+
+ public boolean hasPositionIterator() {
+ return positionIterator != null;
+ }
+
+ @Override
+ protected JavaRDD
- getRDDAux(DynamicContext context) {
+ return null;
+ }
+
+ @Override
+ protected void openLocal() {
+
+ }
+
+ @Override
+ protected void closeLocal() {
+
+ }
+
+ @Override
+ protected void resetLocal() {
+
+ }
+
+ @Override
+ protected boolean hasNextLocal() {
+ return false;
+ }
+
+ @Override
+ protected Item nextLocal() {
+ return null;
+ }
+
+ @Override
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ PendingUpdateList pul = new PendingUpdateList();
+ Item main;
+ Item content;
+ Item locator = null;
+
+ try {
+ main = this.mainIterator.materializeExactlyOneItem(context);
+ content = (Item) SerializationUtils.clone(this.toInsertIterator.materializeExactlyOneItem(context));
+ if (this.hasPositionIterator()) {
+ locator = this.positionIterator.materializeExactlyOneItem(context);
+ }
+ } catch (NoItemException e) {
+ throw new UpdateTargetIsEmptySeqException("Target of insert expression is empty", this.getMetadata());
+ } catch (MoreThanOneItemException e) {
+ throw new RuntimeException(e);
+ }
+
+ UpdatePrimitiveFactory factory = UpdatePrimitiveFactory.getInstance();
+ UpdatePrimitive up;
+ if (main.isObject()) {
+ if (!content.isObject()) {
+ throw new ObjectInsertContentIsNotObjectSeqException(
+ "Insert expression content is not an object",
+ this.getMetadata()
+ );
+ }
+ if (main.getMutabilityLevel() != context.getCurrentMutabilityLevel()) {
+ throw new TransformModifiesNonCopiedValueException(
+ "Attempt to modify currently immutable target",
+ this.getMetadata()
+ );
+ }
+ up = factory.createInsertIntoObjectPrimitive(main, content);
+ } else if (main.isArray()) {
+ if (locator == null) {
+ throw new CannotCastUpdateSelectorException("Insert expression selector is null", this.getMetadata());
+ }
+ if (!locator.isInt()) {
+ throw new CannotCastUpdateSelectorException(
+ "Insert expression selector cannot be cast to Int type",
+ this.getMetadata()
+ );
+ }
+ if (main.getMutabilityLevel() != context.getCurrentMutabilityLevel()) {
+ throw new TransformModifiesNonCopiedValueException(
+ "Attempt to modify currently immutable target",
+ this.getMetadata()
+ );
+ }
+ up = factory.createInsertIntoArrayPrimitive(main, locator, Collections.singletonList(content));
+ } else {
+ throw new InvalidUpdateTargetException(
+ "Insert expression target must be a single array or object",
+ this.getMetadata()
+ );
+ }
+
+ pul.addUpdatePrimitive(up);
+ return pul;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/expression/RenameExpressionIterator.java b/src/main/java/org/rumbledb/runtime/update/expression/RenameExpressionIterator.java
new file mode 100644
index 0000000000..57fbf49e50
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/expression/RenameExpressionIterator.java
@@ -0,0 +1,110 @@
+package org.rumbledb.runtime.update.expression;
+
+import org.apache.spark.api.java.JavaRDD;
+import org.rumbledb.api.Item;
+import org.rumbledb.context.DynamicContext;
+import org.rumbledb.context.RuntimeStaticContext;
+import org.rumbledb.exceptions.*;
+import org.rumbledb.runtime.HybridRuntimeIterator;
+import org.rumbledb.runtime.RuntimeIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitive;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitiveFactory;
+
+import java.util.Arrays;
+
+public class RenameExpressionIterator extends HybridRuntimeIterator {
+
+ private static final long serialVersionUID = 1L;
+ private RuntimeIterator mainIterator;
+ private RuntimeIterator locatorIterator;
+ private RuntimeIterator nameIterator;
+
+ public RenameExpressionIterator(
+ RuntimeIterator mainIterator,
+ RuntimeIterator locatorIterator,
+ RuntimeIterator nameIterator,
+ RuntimeStaticContext staticContext
+ ) {
+ super(Arrays.asList(mainIterator, locatorIterator, nameIterator), staticContext);
+
+ this.mainIterator = mainIterator;
+ this.locatorIterator = locatorIterator;
+ this.nameIterator = nameIterator;
+ this.isUpdating = true;
+ }
+
+ @Override
+ protected JavaRDD
- getRDDAux(DynamicContext context) {
+ return null;
+ }
+
+ @Override
+ protected void openLocal() {
+
+ }
+
+ @Override
+ protected void closeLocal() {
+
+ }
+
+ @Override
+ protected void resetLocal() {
+
+ }
+
+ @Override
+ protected boolean hasNextLocal() {
+ return false;
+ }
+
+ @Override
+ protected Item nextLocal() {
+ return null;
+ }
+
+ @Override
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ PendingUpdateList pul = new PendingUpdateList();
+ Item target;
+ Item locator;
+ Item content;
+
+ try {
+ target = this.mainIterator.materializeExactlyOneItem(context);
+ locator = this.locatorIterator.materializeExactlyOneItem(context);
+ content = this.nameIterator.materializeExactlyOneItem(context);
+ } catch (NoItemException e) {
+ throw new UpdateTargetIsEmptySeqException("Target of rename expression is empty", this.getMetadata());
+ } catch (MoreThanOneItemException e) {
+ throw new RuntimeException(e);
+ }
+
+ UpdatePrimitiveFactory factory = UpdatePrimitiveFactory.getInstance();
+ UpdatePrimitive up;
+ if (target.isObject()) {
+ if (!locator.isString()) {
+ throw new CannotCastUpdateSelectorException(
+ "Rename expression selection cannot be cast to String type",
+ this.getMetadata()
+ );
+ }
+ if (target.getMutabilityLevel() != context.getCurrentMutabilityLevel()) {
+ throw new TransformModifiesNonCopiedValueException(
+ "Attempt to modify currently immutable target",
+ this.getMetadata()
+ );
+ }
+ up = factory.createRenameInObjectPrimitive(target, locator, content, this.getMetadata());
+ } else {
+ throw new InvalidUpdateTargetException(
+ "Rename expression target must be a single object",
+ this.getMetadata()
+ );
+ }
+
+ pul.addUpdatePrimitive(up);
+ return pul;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/expression/ReplaceExpressionIterator.java b/src/main/java/org/rumbledb/runtime/update/expression/ReplaceExpressionIterator.java
new file mode 100644
index 0000000000..25ce38dea5
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/expression/ReplaceExpressionIterator.java
@@ -0,0 +1,140 @@
+package org.rumbledb.runtime.update.expression;
+
+import org.apache.commons.lang3.SerializationUtils;
+import org.apache.spark.api.java.JavaRDD;
+import org.rumbledb.api.Item;
+import org.rumbledb.context.DynamicContext;
+import org.rumbledb.context.RuntimeStaticContext;
+import org.rumbledb.exceptions.*;
+import org.rumbledb.items.ItemFactory;
+import org.rumbledb.runtime.HybridRuntimeIterator;
+import org.rumbledb.runtime.RuntimeIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitive;
+import org.rumbledb.runtime.update.primitives.UpdatePrimitiveFactory;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class ReplaceExpressionIterator extends HybridRuntimeIterator {
+
+ private static final long serialVersionUID = 1L;
+ private RuntimeIterator mainIterator;
+ private RuntimeIterator locatorIterator;
+ private RuntimeIterator replacerIterator;
+
+ public ReplaceExpressionIterator(
+ RuntimeIterator mainIterator,
+ RuntimeIterator locatorIterator,
+ RuntimeIterator replacerIterator,
+ RuntimeStaticContext staticContext
+ ) {
+ super(Arrays.asList(mainIterator, locatorIterator, replacerIterator), staticContext);
+
+ this.mainIterator = mainIterator;
+ this.locatorIterator = locatorIterator;
+ this.replacerIterator = replacerIterator;
+ this.isUpdating = true;
+ }
+
+ @Override
+ protected JavaRDD
- getRDDAux(DynamicContext context) {
+ return null;
+ }
+
+ @Override
+ protected void openLocal() {
+
+ }
+
+ @Override
+ protected void closeLocal() {
+
+ }
+
+ @Override
+ protected void resetLocal() {
+
+ }
+
+ @Override
+ protected boolean hasNextLocal() {
+ return false;
+ }
+
+ @Override
+ protected Item nextLocal() {
+ return null;
+ }
+
+ @Override
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ PendingUpdateList pul = new PendingUpdateList();
+ Item target;
+ Item locator;
+ Item content;
+
+ try {
+ target = this.mainIterator.materializeExactlyOneItem(context);
+ locator = this.locatorIterator.materializeExactlyOneItem(context);
+ } catch (NoItemException e) {
+ throw new UpdateTargetIsEmptySeqException("Target of replace expression is empty", this.getMetadata());
+ } catch (MoreThanOneItemException e) {
+ throw new RuntimeException(e);
+ }
+
+ List
- tempContent = this.replacerIterator.materialize(context);
+ if (tempContent.isEmpty()) {
+ content = ItemFactory.getInstance().createNullItem();
+ } else if (tempContent.size() == 1) {
+ content = (Item) SerializationUtils.clone(tempContent.get(0));
+ } else {
+ List
- copyContent = new ArrayList<>();
+ for (Item item : tempContent) {
+ copyContent.add((Item) SerializationUtils.clone(item));
+ }
+ content = ItemFactory.getInstance().createArrayItem(copyContent);
+ }
+
+ UpdatePrimitiveFactory factory = UpdatePrimitiveFactory.getInstance();
+ UpdatePrimitive up;
+ if (target.isObject()) {
+ if (!locator.isString()) {
+ throw new CannotCastUpdateSelectorException(
+ "Replace expression selection cannot be cast to String type",
+ this.getMetadata()
+ );
+ }
+ if (target.getMutabilityLevel() != context.getCurrentMutabilityLevel()) {
+ throw new TransformModifiesNonCopiedValueException(
+ "Attempt to modify currently immutable target",
+ this.getMetadata()
+ );
+ }
+ up = factory.createReplaceInObjectPrimitive(target, locator, content, this.getMetadata());
+ } else if (target.isArray()) {
+ if (!locator.isInt()) {
+ throw new CannotCastUpdateSelectorException(
+ "Replace expression selection cannot be cast to Int type",
+ this.getMetadata()
+ );
+ }
+ if (target.getMutabilityLevel() != context.getCurrentMutabilityLevel()) {
+ throw new TransformModifiesNonCopiedValueException(
+ "Attempt to modify currently immutable target",
+ this.getMetadata()
+ );
+ }
+ up = factory.createReplaceInArrayPrimitive(target, locator, content, this.getMetadata());
+ } else {
+ throw new InvalidUpdateTargetException(
+ "Replace expression target must be a single array or object",
+ this.getMetadata()
+ );
+ }
+
+ pul.addUpdatePrimitive(up);
+ return pul;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/expression/TransformExpressionIterator.java b/src/main/java/org/rumbledb/runtime/update/expression/TransformExpressionIterator.java
new file mode 100644
index 0000000000..fb1a24a0f4
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/expression/TransformExpressionIterator.java
@@ -0,0 +1,106 @@
+package org.rumbledb.runtime.update.expression;
+
+import org.apache.spark.api.java.JavaRDD;
+import org.apache.commons.lang3.SerializationUtils;
+import org.rumbledb.api.Item;
+import org.rumbledb.context.DynamicContext;
+import org.rumbledb.context.Name;
+import org.rumbledb.context.RuntimeStaticContext;
+import org.rumbledb.runtime.HybridRuntimeIterator;
+import org.rumbledb.runtime.RuntimeIterator;
+import org.rumbledb.runtime.update.PendingUpdateList;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class TransformExpressionIterator extends HybridRuntimeIterator {
+
+ private static final long serialVersionUID = 1L;
+ private Map copyDeclMap;
+ private RuntimeIterator modifyIterator;
+ private RuntimeIterator returnIterator;
+
+ private int mutabilityLevel;
+
+ public TransformExpressionIterator(
+ Map copyDeclMap,
+ RuntimeIterator modifyIterator,
+ RuntimeIterator returnIterator,
+ RuntimeStaticContext staticContext,
+ int mutabilityLevel
+ ) {
+ super(null, staticContext);
+ this.children.addAll(copyDeclMap.values());
+ this.children.add(modifyIterator);
+ this.children.add(returnIterator);
+
+ this.copyDeclMap = copyDeclMap;
+ this.modifyIterator = modifyIterator;
+ this.returnIterator = returnIterator;
+ this.mutabilityLevel = mutabilityLevel;
+ this.isUpdating = false;
+ }
+
+ @Override
+ protected JavaRDD
- getRDDAux(DynamicContext context) {
+ PendingUpdateList pul = getPendingUpdateList(context);
+ pul.applyUpdates(this.getMetadata());
+ return returnIterator.getRDD(context);
+ }
+
+ @Override
+ protected void openLocal() {
+ PendingUpdateList pul = getPendingUpdateList(this.currentDynamicContextForLocalExecution);
+ pul.applyUpdates(this.getMetadata());
+ returnIterator.open(this.currentDynamicContextForLocalExecution);
+ }
+
+ @Override
+ protected void closeLocal() {
+ returnIterator.close();
+ for (Name copyVar : copyDeclMap.keySet()) {
+ this.currentDynamicContextForLocalExecution.getVariableValues().removeVariable(copyVar);
+ }
+ }
+
+ @Override
+ protected void resetLocal() {
+ PendingUpdateList pul = getPendingUpdateList(this.currentDynamicContextForLocalExecution);
+ pul.applyUpdates(this.getMetadata());
+ returnIterator.reset(this.currentDynamicContextForLocalExecution);
+ }
+
+ @Override
+ protected boolean hasNextLocal() {
+ return returnIterator.hasNext();
+ }
+
+ @Override
+ protected Item nextLocal() {
+ return returnIterator.next();
+ }
+
+ @Override
+ public PendingUpdateList getPendingUpdateList(DynamicContext context) {
+ bindCopyDeclarations(context);
+ context.setCurrentMutabilityLevel(this.mutabilityLevel);
+ return modifyIterator.getPendingUpdateList(context);
+ }
+
+ private void bindCopyDeclarations(DynamicContext context) {
+ for (Name copyVar : copyDeclMap.keySet()) {
+ RuntimeIterator copyIterator = copyDeclMap.get(copyVar);
+ List
- toCopy = copyIterator.materialize(context);
+ List
- copy = new ArrayList<>();
+ Item temp;
+ for (Item item : toCopy) {
+ temp = (Item) SerializationUtils.clone(item);
+ temp.setMutabilityLevel(this.mutabilityLevel);
+ copy.add(temp);
+ }
+ context.getVariableValues().addVariableValue(copyVar, copy);
+ }
+ }
+
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/primitives/DeleteFromArrayPrimitive.java b/src/main/java/org/rumbledb/runtime/update/primitives/DeleteFromArrayPrimitive.java
new file mode 100644
index 0000000000..8cf51f57bb
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/primitives/DeleteFromArrayPrimitive.java
@@ -0,0 +1,58 @@
+package org.rumbledb.runtime.update.primitives;
+
+import org.rumbledb.api.Item;
+import org.rumbledb.exceptions.CannotResolveUpdateSelectorException;
+import org.rumbledb.exceptions.ExceptionMetadata;
+
+public class DeleteFromArrayPrimitive implements UpdatePrimitive {
+
+
+ private Item target;
+ private Item selector;
+
+ public DeleteFromArrayPrimitive(Item targetArray, Item positionInt, ExceptionMetadata metadata) {
+ if (positionInt.getIntValue() <= 0 || positionInt.getIntValue() > targetArray.getSize()) {
+ throw new CannotResolveUpdateSelectorException(
+ "Cannot delete item at index out of range of target array",
+ metadata
+ );
+ }
+ this.target = targetArray;
+ this.selector = positionInt;
+ }
+
+ @Override
+ public void apply() {
+ this.target.removeItemAt(this.selector.getIntValue() - 1);
+ }
+
+ @Override
+ public boolean hasSelector() {
+ return true;
+ }
+
+ @Override
+ public Item getTarget() {
+ return target;
+ }
+
+ @Override
+ public Item getSelector() {
+ return selector;
+ }
+
+ @Override
+ public int getIntSelector() {
+ return selector.getIntValue();
+ }
+
+ @Override
+ public Item getContent() {
+ return null;
+ }
+
+ @Override
+ public boolean isDeleteArray() {
+ return true;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/primitives/DeleteFromObjectPrimitive.java b/src/main/java/org/rumbledb/runtime/update/primitives/DeleteFromObjectPrimitive.java
new file mode 100644
index 0000000000..a55b5b9a3e
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/primitives/DeleteFromObjectPrimitive.java
@@ -0,0 +1,66 @@
+package org.rumbledb.runtime.update.primitives;
+
+import org.rumbledb.api.Item;
+import org.rumbledb.exceptions.CannotResolveUpdateSelectorException;
+import org.rumbledb.exceptions.ExceptionMetadata;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class DeleteFromObjectPrimitive implements UpdatePrimitive {
+
+ private Item target;
+ private List
- content;
+
+ public DeleteFromObjectPrimitive(Item targetObject, List
- namesToRemove, ExceptionMetadata metadata) {
+
+ for (Item item : namesToRemove) {
+ if (targetObject.getItemByKey(item.getStringValue()) == null) {
+ throw new CannotResolveUpdateSelectorException(
+ "Cannot delete key that does not exist in target object",
+ metadata
+ );
+ }
+ }
+
+ this.target = targetObject;
+ this.content = namesToRemove;
+ }
+
+ @Override
+ public void apply() {
+ for (
+ String str : this.content.stream().map(Item::getStringValue).collect(Collectors.toList())
+ ) {
+ this.target.removeItemByKey(str);
+ }
+ }
+
+ @Override
+ public boolean hasSelector() {
+ return false;
+ }
+
+ @Override
+ public Item getTarget() {
+ return target;
+ }
+
+ @Override
+ public List
- getContentList() {
+ return content;
+ }
+
+ @Override
+ public boolean isDeleteObject() {
+ return true;
+ }
+
+ public static List
- mergeSources(List
- first, List
- second) {
+ List
- merged = new ArrayList<>(first);
+ merged.addAll(second);
+ merged = merged.stream().distinct().collect(Collectors.toList());
+ return merged;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/primitives/InsertIntoArrayPrimitive.java b/src/main/java/org/rumbledb/runtime/update/primitives/InsertIntoArrayPrimitive.java
new file mode 100644
index 0000000000..a6f2d9b4e8
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/primitives/InsertIntoArrayPrimitive.java
@@ -0,0 +1,68 @@
+package org.rumbledb.runtime.update.primitives;
+
+import org.rumbledb.api.Item;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class InsertIntoArrayPrimitive implements UpdatePrimitive {
+
+ private Item target;
+ private Item selector;
+ private List
- content;
+
+ public InsertIntoArrayPrimitive(Item targetArray, Item positionInt, List
- sourceSequence) {
+ if (!targetArray.isArray() || !positionInt.isNumeric()) {
+ // TODO ERROR
+ }
+ if (positionInt.getIntValue() < 0 || positionInt.getIntValue() >= targetArray.getSize()) {
+ // TODO throw error or do nothing?
+ }
+
+ this.target = targetArray;
+ this.selector = positionInt;
+ this.content = sourceSequence;
+
+ }
+
+ @Override
+ public void apply() {
+ this.target.putItemsAt(this.content, this.selector.getIntValue() - 1);
+ }
+
+ @Override
+ public boolean hasSelector() {
+ return true;
+ }
+
+ @Override
+ public Item getTarget() {
+ return target;
+ }
+
+ @Override
+ public Item getSelector() {
+ return selector;
+ }
+
+ @Override
+ public int getIntSelector() {
+ return selector.getIntValue();
+ }
+
+ @Override
+ public List
- getContentList() {
+ return content;
+ }
+
+ @Override
+ public boolean isInsertArray() {
+ return true;
+ }
+
+ public static List
- mergeSources(List
- first, List
- second) {
+ List
- merged = new ArrayList<>(first);
+ merged.addAll(second);
+ return merged;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/primitives/InsertIntoObjectPrimitive.java b/src/main/java/org/rumbledb/runtime/update/primitives/InsertIntoObjectPrimitive.java
new file mode 100644
index 0000000000..7a2a659b0b
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/primitives/InsertIntoObjectPrimitive.java
@@ -0,0 +1,77 @@
+package org.rumbledb.runtime.update.primitives;
+
+import org.rumbledb.api.Item;
+import org.rumbledb.exceptions.*;
+import org.rumbledb.items.ItemFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class InsertIntoObjectPrimitive implements UpdatePrimitive {
+
+ private Item target;
+ private Item content;
+
+
+ public InsertIntoObjectPrimitive(Item targetObject, Item contentObject) {
+ if (!targetObject.isObject() || !contentObject.isObject()) {
+ // TODO: ERROR
+ }
+ this.target = targetObject;
+ this.content = contentObject;
+ }
+
+ @Override
+ public void apply() {
+ try {
+ for (String key : this.content.getKeys()) {
+ this.target.putItemByKey(key, this.content.getItemByKey(key));
+ }
+ } catch (DuplicateObjectKeyException e) {
+ throw new DuplicateKeyOnUpdateApplyException(e.getMessage(), ExceptionMetadata.EMPTY_METADATA);
+ }
+ }
+
+ @Override
+ public boolean hasSelector() {
+ return false;
+ }
+
+ @Override
+ public Item getTarget() {
+ return target;
+ }
+
+ @Override
+ public Item getSelector() {
+ throw new OurBadException("INVALID SELECTOR GET IN INSERTINTOOBJECT PRIMITIVE");
+ }
+
+ @Override
+ public Item getContent() {
+ return content;
+ }
+
+ @Override
+ public boolean isInsertObject() {
+ return true;
+ }
+
+ public static Item mergeSources(Item first, Item second, ExceptionMetadata metadata) {
+ Item res;
+
+ List keys = new ArrayList<>(first.getKeys());
+ keys.addAll(second.getKeys());
+
+ List
- values = new ArrayList<>(first.getValues());
+ values.addAll(second.getValues());
+
+ try {
+ res = ItemFactory.getInstance().createObjectItem(keys, values, metadata);
+ } catch (DuplicateObjectKeyException e) {
+ throw new DuplicateObjectInsertSourceException(e.getMessage(), metadata);
+ }
+
+ return res;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/primitives/RenameInObjectPrimitive.java b/src/main/java/org/rumbledb/runtime/update/primitives/RenameInObjectPrimitive.java
new file mode 100644
index 0000000000..01c0d4037b
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/primitives/RenameInObjectPrimitive.java
@@ -0,0 +1,68 @@
+package org.rumbledb.runtime.update.primitives;
+
+import org.rumbledb.api.Item;
+import org.rumbledb.exceptions.CannotResolveUpdateSelectorException;
+import org.rumbledb.exceptions.ExceptionMetadata;
+
+public class RenameInObjectPrimitive implements UpdatePrimitive {
+
+ private Item target;
+ private Item selector;
+ private Item content;
+
+ public RenameInObjectPrimitive(
+ Item targetObject,
+ Item targetName,
+ Item replacementName,
+ ExceptionMetadata metadata
+ ) {
+
+ if (targetObject.getItemByKey(targetName.getStringValue()) == null) {
+ throw new CannotResolveUpdateSelectorException(
+ "Cannot rename key that does not exist in target object",
+ metadata
+ );
+ }
+
+
+ this.target = targetObject;
+ this.selector = targetName;
+ this.content = replacementName;
+ }
+
+ @Override
+ public void apply() {
+ String name = this.selector.getStringValue();
+ if (this.target.getKeys().contains(name)) {
+ Item item = this.target.getItemByKey(name);
+ this.target.removeItemByKey(name);
+ this.target.putItemByKey(this.content.getStringValue(), item);
+ }
+ // TODO: implement replace and rename methods for Array & Object to avoid deletion and append
+ }
+
+ @Override
+ public boolean hasSelector() {
+ return true;
+ }
+
+ @Override
+ public Item getTarget() {
+ return target;
+ }
+
+ @Override
+ public Item getSelector() {
+ return selector;
+ }
+
+ @Override
+ public Item getContent() {
+ return content;
+ }
+
+ @Override
+ public boolean isRenameObject() {
+ return true;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/primitives/ReplaceInArrayPrimitive.java b/src/main/java/org/rumbledb/runtime/update/primitives/ReplaceInArrayPrimitive.java
new file mode 100644
index 0000000000..9be2c98200
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/primitives/ReplaceInArrayPrimitive.java
@@ -0,0 +1,73 @@
+package org.rumbledb.runtime.update.primitives;
+
+import org.rumbledb.api.Item;
+import org.rumbledb.exceptions.CannotResolveUpdateSelectorException;
+import org.rumbledb.exceptions.ExceptionMetadata;
+
+public class ReplaceInArrayPrimitive implements UpdatePrimitive {
+
+ private Item target;
+ private Item selector;
+ private Item content;
+
+ public ReplaceInArrayPrimitive(
+ Item targetArray,
+ Item positionInt,
+ Item replacementItem,
+ ExceptionMetadata metadata
+ ) {
+ if (positionInt.getIntValue() <= 0 || positionInt.getIntValue() > targetArray.getSize()) {
+ throw new CannotResolveUpdateSelectorException(
+ "Cannot replace item at index out of range of target array",
+ metadata
+ );
+ }
+
+ this.target = targetArray;
+ this.selector = positionInt;
+ this.content = replacementItem;
+ }
+
+ @Override
+ public void apply() {
+ int index = this.selector.getIntValue() - 1;
+ if (index >= 0 || index < this.target.getSize()) {
+ this.target.removeItemAt(index);
+ if (index == this.target.getSize()) {
+ this.target.append(this.content);
+ } else {
+ this.target.putItemAt(this.content, index);
+ }
+ }
+ }
+
+ @Override
+ public boolean hasSelector() {
+ return true;
+ }
+
+ @Override
+ public Item getTarget() {
+ return target;
+ }
+
+ @Override
+ public Item getSelector() {
+ return selector;
+ }
+
+ @Override
+ public int getIntSelector() {
+ return selector.getIntValue();
+ }
+
+ @Override
+ public Item getContent() {
+ return content;
+ }
+
+ @Override
+ public boolean isReplaceArray() {
+ return true;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/primitives/ReplaceInObjectPrimitive.java b/src/main/java/org/rumbledb/runtime/update/primitives/ReplaceInObjectPrimitive.java
new file mode 100644
index 0000000000..a4d9e0daf1
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/primitives/ReplaceInObjectPrimitive.java
@@ -0,0 +1,65 @@
+package org.rumbledb.runtime.update.primitives;
+
+import org.rumbledb.api.Item;
+import org.rumbledb.exceptions.CannotResolveUpdateSelectorException;
+import org.rumbledb.exceptions.ExceptionMetadata;
+
+public class ReplaceInObjectPrimitive implements UpdatePrimitive {
+
+ private Item target;
+ private Item selector;
+ private Item content;
+
+ public ReplaceInObjectPrimitive(
+ Item targetObject,
+ Item targetName,
+ Item replacementItem,
+ ExceptionMetadata metadata
+ ) {
+
+ if (targetObject.getItemByKey(targetName.getStringValue()) == null) {
+ throw new CannotResolveUpdateSelectorException(
+ "Cannot delete key that does not exist in target object",
+ metadata
+ );
+ }
+
+ this.target = targetObject;
+ this.selector = targetName;
+ this.content = replacementItem;
+ }
+
+ @Override
+ public void apply() {
+ String name = this.getSelector().getStringValue();
+ if (this.getTarget().getKeys().contains(name)) {
+ this.getTarget().removeItemByKey(name);
+ this.getTarget().putItemByKey(name, this.getContent());
+ }
+ }
+
+ @Override
+ public boolean hasSelector() {
+ return true;
+ }
+
+ @Override
+ public Item getTarget() {
+ return target;
+ }
+
+ @Override
+ public Item getSelector() {
+ return selector;
+ }
+
+ @Override
+ public Item getContent() {
+ return content;
+ }
+
+ @Override
+ public boolean isReplaceObject() {
+ return true;
+ }
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/primitives/UpdatePrimitive.java b/src/main/java/org/rumbledb/runtime/update/primitives/UpdatePrimitive.java
new file mode 100644
index 0000000000..7827587d36
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/primitives/UpdatePrimitive.java
@@ -0,0 +1,60 @@
+package org.rumbledb.runtime.update.primitives;
+
+import org.rumbledb.api.Item;
+
+import java.util.List;
+
+public interface UpdatePrimitive {
+
+ void apply();
+
+ boolean hasSelector();
+
+ Item getTarget();
+
+ default Item getSelector() {
+ throw new UnsupportedOperationException("Operation not defined");
+ }
+
+ default int getIntSelector() {
+ throw new UnsupportedOperationException("Operation not defined");
+ }
+
+ default Item getContent() {
+ throw new UnsupportedOperationException("Operation not defined");
+ }
+
+ default List
- getContentList() {
+ throw new UnsupportedOperationException("Operation not defined");
+ }
+
+ default boolean isDeleteObject() {
+ return false;
+ }
+
+ default boolean isDeleteArray() {
+ return false;
+ }
+
+ default boolean isInsertObject() {
+ return false;
+ }
+
+ default boolean isInsertArray() {
+ return false;
+ }
+
+ default boolean isReplaceObject() {
+ return false;
+ }
+
+ default boolean isReplaceArray() {
+ return false;
+ }
+
+ default boolean isRenameObject() {
+ return false;
+ }
+
+
+}
diff --git a/src/main/java/org/rumbledb/runtime/update/primitives/UpdatePrimitiveFactory.java b/src/main/java/org/rumbledb/runtime/update/primitives/UpdatePrimitiveFactory.java
new file mode 100644
index 0000000000..2dc938b1c2
--- /dev/null
+++ b/src/main/java/org/rumbledb/runtime/update/primitives/UpdatePrimitiveFactory.java
@@ -0,0 +1,71 @@
+package org.rumbledb.runtime.update.primitives;
+
+import org.rumbledb.api.Item;
+import org.rumbledb.exceptions.ExceptionMetadata;
+
+import java.util.List;
+
+public class UpdatePrimitiveFactory {
+
+ private static UpdatePrimitiveFactory instance;
+
+ public static UpdatePrimitiveFactory getInstance() {
+ if (instance == null) {
+ instance = new UpdatePrimitiveFactory();
+ }
+ return instance;
+ }
+
+ public UpdatePrimitive createDeleteFromArrayPrimitive(
+ Item targetArray,
+ Item selectorInt,
+ ExceptionMetadata metadata
+ ) {
+ return new DeleteFromArrayPrimitive(targetArray, selectorInt, metadata);
+ }
+
+ public UpdatePrimitive createDeleteFromObjectPrimitive(
+ Item targetObject,
+ List
- selectorStrs,
+ ExceptionMetadata metadata
+ ) {
+ return new DeleteFromObjectPrimitive(targetObject, selectorStrs, metadata);
+ }
+
+ public UpdatePrimitive createInsertIntoArrayPrimitive(Item targetArray, Item selectorInt, List
- contents) {
+ return new InsertIntoArrayPrimitive(targetArray, selectorInt, contents);
+ }
+
+ public UpdatePrimitive createInsertIntoObjectPrimitive(Item targetObject, Item contentsObject) {
+ return new InsertIntoObjectPrimitive(targetObject, contentsObject);
+ }
+
+ public UpdatePrimitive createReplaceInArrayPrimitive(
+ Item targetArray,
+ Item selectorInt,
+ Item content,
+ ExceptionMetadata metadata
+ ) {
+ return new ReplaceInArrayPrimitive(targetArray, selectorInt, content, metadata);
+ }
+
+ public UpdatePrimitive createReplaceInObjectPrimitive(
+ Item targetObject,
+ Item selectorStr,
+ Item content,
+ ExceptionMetadata metadata
+ ) {
+ return new ReplaceInObjectPrimitive(targetObject, selectorStr, content, metadata);
+ }
+
+ public UpdatePrimitive createRenameInObjectPrimitive(
+ Item targetObject,
+ Item selectorStr,
+ Item content,
+ ExceptionMetadata metadata
+ ) {
+ return new RenameInObjectPrimitive(targetObject, selectorStr, content, metadata);
+ }
+
+
+}
diff --git a/src/main/java/sparksoniq/spark/ml/ApplyEstimatorRuntimeIterator.java b/src/main/java/sparksoniq/spark/ml/ApplyEstimatorRuntimeIterator.java
index 05dad6ca1d..f6b655db4b 100644
--- a/src/main/java/sparksoniq/spark/ml/ApplyEstimatorRuntimeIterator.java
+++ b/src/main/java/sparksoniq/spark/ml/ApplyEstimatorRuntimeIterator.java
@@ -1,6 +1,6 @@
package sparksoniq.spark.ml;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.spark.ml.Estimator;
import org.apache.spark.ml.Transformer;
import org.apache.spark.ml.linalg.VectorUDT;
diff --git a/src/main/java/sparksoniq/spark/ml/ApplyTransformerRuntimeIterator.java b/src/main/java/sparksoniq/spark/ml/ApplyTransformerRuntimeIterator.java
index 81e288c594..8c6607f08e 100644
--- a/src/main/java/sparksoniq/spark/ml/ApplyTransformerRuntimeIterator.java
+++ b/src/main/java/sparksoniq/spark/ml/ApplyTransformerRuntimeIterator.java
@@ -1,6 +1,6 @@
package sparksoniq.spark.ml;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
import org.apache.spark.ml.Transformer;
import org.apache.spark.ml.linalg.VectorUDT;
import org.apache.spark.ml.param.ParamMap;
diff --git a/src/main/resources/assets/jsound-validator.html b/src/main/resources/assets/jsound-validator.html
index c244ad20ab..62d76fe8ad 100644
--- a/src/main/resources/assets/jsound-validator.html
+++ b/src/main/resources/assets/jsound-validator.html
@@ -2,7 +2,7 @@
-
+
Public Rumble page
+
Public Rumble page