From a37e53c50f1af90a18ceab8ee92866b3d11e2c1c Mon Sep 17 00:00:00 2001
From: Jack Conradson
Date: Wed, 30 Mar 2016 16:40:17 -0700
Subject: [PATCH] Painless clean up including fixing _score issues and
improving type error messages.
Closes #17428
---
.../src/main/antlr/PainlessLexer.g4 | 18 +-
.../src/main/antlr/PainlessParser.g4 | 24 +-
.../org/elasticsearch/painless/Analyzer.java | 24 +-
.../painless/AnalyzerExpression.java | 2 +-
.../painless/AnalyzerExternal.java | 113 +-
.../painless/AnalyzerStatement.java | 24 +-
.../painless/AnalyzerUtility.java | 50 +
.../org/elasticsearch/painless/Compiler.java | 6 +-
.../elasticsearch/painless/Definition.java | 2 +-
.../org/elasticsearch/painless/Metadata.java | 14 +-
.../elasticsearch/painless/PainlessLexer.java | 495 +++----
.../painless/PainlessParser.java | 1189 +++++++++--------
.../painless/PainlessParserBaseVisitor.java | 21 +-
.../painless/PainlessParserVisitor.java | 18 +-
.../org/elasticsearch/painless/Writer.java | 49 +-
.../painless/WriterExternal.java | 28 +-
.../painless/WriterStatement.java | 6 +-
.../elasticsearch/painless/ScoreTests.java | 68 +
.../painless/WhenThingsGoWrongTests.java | 2 +-
19 files changed, 1117 insertions(+), 1036 deletions(-)
create mode 100644 modules/lang-painless/src/test/java/org/elasticsearch/painless/ScoreTests.java
diff --git a/modules/lang-painless/src/main/antlr/PainlessLexer.g4 b/modules/lang-painless/src/main/antlr/PainlessLexer.g4
index 866bbd752c8..f1e40f93d02 100644
--- a/modules/lang-painless/src/main/antlr/PainlessLexer.g4
+++ b/modules/lang-painless/src/main/antlr/PainlessLexer.g4
@@ -19,18 +19,6 @@
lexer grammar PainlessLexer;
-@header {
- import java.util.Set;
-}
-
-@members {
- private Set types = null;
-
- void setTypes(Set types) {
- this.types = types;
- }
-}
-
WS: [ \t\n\r]+ -> skip;
COMMENT: ( '//' .*? [\n\r] | '/*' .*? '*/' ) -> skip;
@@ -102,16 +90,14 @@ HEX: '0' [xX] [0-9a-fA-F]+ [lL]?;
INTEGER: ( '0' | [1-9] [0-9]* ) [lLfFdD]?;
DECIMAL: ( '0' | [1-9] [0-9]* ) DOT [0-9]* ( [eE] [+\-]? [0-9]+ )? [fF]?;
-STRING: '"' ( '\\"' | '\\\\' | ~[\\"] )*? '"' {setText(getText().substring(1, getText().length() - 1));};
-CHAR: '\'' . '\'' {setText(getText().substring(1, getText().length() - 1));};
+STRING: '"' ( '\\"' | '\\\\' | ~[\\"] )*? '"';
+CHAR: '\'' . '\'';
TRUE: 'true';
FALSE: 'false';
NULL: 'null';
-TYPE: ID GENERIC? {types.contains(getText().replace(" ", ""))}? {setText(getText().replace(" ", ""));};
-fragment GENERIC: ' '* '<' ' '* ( ID GENERIC? ) ' '* ( COMMA ' '* ( ID GENERIC? ) ' '* )* '>';
ID: [_a-zA-Z] [_a-zA-Z0-9]*;
mode EXT;
diff --git a/modules/lang-painless/src/main/antlr/PainlessParser.g4 b/modules/lang-painless/src/main/antlr/PainlessParser.g4
index 4779c61d4b0..c9e0de72210 100644
--- a/modules/lang-painless/src/main/antlr/PainlessParser.g4
+++ b/modules/lang-painless/src/main/antlr/PainlessParser.g4
@@ -67,15 +67,23 @@ declaration
;
decltype
- : TYPE (LBRACE RBRACE)*
+ : identifier (LBRACE RBRACE)*
;
declvar
- : ID ( ASSIGN expression )?
+ : identifier ( ASSIGN expression )?
;
trap
- : CATCH LP ( TYPE ID ) RP ( block | emptyscope )
+ : CATCH LP ( identifier identifier ) RP ( block | emptyscope )
+ ;
+
+identifier
+ : ID generic?
+ ;
+
+generic
+ : LT identifier ( COMMA identifier )* GT
;
expression
@@ -109,21 +117,19 @@ expression
extstart
: extprec
| extcast
- | exttype
| extvar
| extnew
| extstring
;
-extprec: LP ( extprec | extcast | exttype | extvar | extnew | extstring ) RP ( extdot | extbrace )?;
-extcast: LP decltype RP ( extprec | extcast | exttype | extvar | extnew | extstring );
+extprec: LP ( extprec | extcast | extvar | extnew | extstring ) RP ( extdot | extbrace )?;
+extcast: LP decltype RP ( extprec | extcast | extvar | extnew | extstring );
extbrace: LBRACE expression RBRACE ( extdot | extbrace )?;
extdot: DOT ( extcall | extfield );
-exttype: TYPE extdot;
extcall: EXTID arguments ( extdot | extbrace )?;
-extvar: ID ( extdot | extbrace )?;
+extvar: identifier ( extdot | extbrace )?;
extfield: ( EXTID | EXTINTEGER ) ( extdot | extbrace )?;
-extnew: NEW TYPE ( ( arguments ( extdot | extbrace)? ) | ( ( LBRACE expression RBRACE )+ extdot? ) );
+extnew: NEW identifier ( ( arguments extdot? ) | ( ( LBRACE expression RBRACE )+ extdot? ) );
extstring: STRING (extdot | extbrace )?;
arguments
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Analyzer.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Analyzer.java
index 090667b4543..50473ea4e88 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Analyzer.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Analyzer.java
@@ -48,10 +48,11 @@ import org.elasticsearch.painless.PainlessParser.ExtnewContext;
import org.elasticsearch.painless.PainlessParser.ExtprecContext;
import org.elasticsearch.painless.PainlessParser.ExtstartContext;
import org.elasticsearch.painless.PainlessParser.ExtstringContext;
-import org.elasticsearch.painless.PainlessParser.ExttypeContext;
import org.elasticsearch.painless.PainlessParser.ExtvarContext;
import org.elasticsearch.painless.PainlessParser.FalseContext;
import org.elasticsearch.painless.PainlessParser.ForContext;
+import org.elasticsearch.painless.PainlessParser.GenericContext;
+import org.elasticsearch.painless.PainlessParser.IdentifierContext;
import org.elasticsearch.painless.PainlessParser.IfContext;
import org.elasticsearch.painless.PainlessParser.IncrementContext;
import org.elasticsearch.painless.PainlessParser.InitializerContext;
@@ -83,7 +84,7 @@ class Analyzer extends PainlessParserBaseVisitor {
private Analyzer(final Metadata metadata) {
final Definition definition = metadata.definition;
- final AnalyzerUtility utility = new AnalyzerUtility();
+ final AnalyzerUtility utility = new AnalyzerUtility(metadata);
final AnalyzerCaster caster = new AnalyzerCaster(definition);
final AnalyzerPromoter promoter = new AnalyzerPromoter(definition);
@@ -94,8 +95,8 @@ class Analyzer extends PainlessParserBaseVisitor {
utility.incrementScope();
utility.addVariable(null, "#this", definition.execType);
metadata.inputValueSlot = utility.addVariable(null, "input", definition.smapType).slot;
- metadata.scoreValueSlot = utility.addVariable(null, "_score", definition.floatType).slot;
metadata.loopCounterSlot = utility.addVariable(null, "#loop", definition.intType).slot;
+ metadata.scoreValueSlot = utility.addVariable(null, "_score", definition.floatType).slot;
metadata.createStatementMetadata(metadata.root);
visit(metadata.root);
@@ -253,6 +254,16 @@ class Analyzer extends PainlessParserBaseVisitor {
return null;
}
+ @Override
+ public Void visitIdentifier(IdentifierContext ctx) {
+ throw new UnsupportedOperationException(AnalyzerUtility.error(ctx) + "Unexpected state.");
+ }
+
+ @Override
+ public Void visitGeneric(GenericContext ctx) {
+ throw new UnsupportedOperationException(AnalyzerUtility.error(ctx) + "Unexpected state.");
+ }
+
@Override
public Void visitPrecedence(final PrecedenceContext ctx) {
throw new UnsupportedOperationException(AnalyzerUtility.error(ctx) + "Unexpected state.");
@@ -398,13 +409,6 @@ class Analyzer extends PainlessParserBaseVisitor {
return null;
}
- @Override
- public Void visitExttype(final ExttypeContext ctx) {
- external.processExttype(ctx);
-
- return null;
- }
-
@Override
public Void visitExtcall(final ExtcallContext ctx) {
external.processExtcall(ctx);
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerExpression.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerExpression.java
index 3e74259fecf..029e7e530b5 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerExpression.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerExpression.java
@@ -168,7 +168,7 @@ class AnalyzerExpression {
throw new IllegalStateException(AnalyzerUtility.error(ctx) + "Unexpected state.");
}
- charemd.preConst = ctx.CHAR().getText().charAt(0);
+ charemd.preConst = ctx.CHAR().getText().charAt(1);
charemd.from = definition.charType;
}
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerExternal.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerExternal.java
index db3ab06e785..2ce5fa14d22 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerExternal.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerExternal.java
@@ -41,8 +41,8 @@ import org.elasticsearch.painless.PainlessParser.ExtnewContext;
import org.elasticsearch.painless.PainlessParser.ExtprecContext;
import org.elasticsearch.painless.PainlessParser.ExtstartContext;
import org.elasticsearch.painless.PainlessParser.ExtstringContext;
-import org.elasticsearch.painless.PainlessParser.ExttypeContext;
import org.elasticsearch.painless.PainlessParser.ExtvarContext;
+import org.elasticsearch.painless.PainlessParser.IdentifierContext;
import java.util.Arrays;
import java.util.List;
@@ -80,7 +80,6 @@ class AnalyzerExternal {
void processExtstart(final ExtstartContext ctx) {
final ExtprecContext precctx = ctx.extprec();
final ExtcastContext castctx = ctx.extcast();
- final ExttypeContext typectx = ctx.exttype();
final ExtvarContext varctx = ctx.extvar();
final ExtnewContext newctx = ctx.extnew();
final ExtstringContext stringctx = ctx.extstring();
@@ -91,9 +90,6 @@ class AnalyzerExternal {
} else if (castctx != null) {
metadata.createExtNodeMetadata(ctx, castctx);
analyzer.visit(castctx);
- } else if (typectx != null) {
- metadata.createExtNodeMetadata(ctx, typectx);
- analyzer.visit(typectx);
} else if (varctx != null) {
metadata.createExtNodeMetadata(ctx, varctx);
analyzer.visit(varctx);
@@ -115,7 +111,6 @@ class AnalyzerExternal {
final ExtprecContext precctx = ctx.extprec();
final ExtcastContext castctx = ctx.extcast();
- final ExttypeContext typectx = ctx.exttype();
final ExtvarContext varctx = ctx.extvar();
final ExtnewContext newctx = ctx.extnew();
final ExtstringContext stringctx = ctx.extstring();
@@ -133,9 +128,6 @@ class AnalyzerExternal {
} else if (castctx != null) {
metadata.createExtNodeMetadata(parent, castctx);
analyzer.visit(castctx);
- } else if (typectx != null) {
- metadata.createExtNodeMetadata(parent, typectx);
- analyzer.visit(typectx);
} else if (varctx != null) {
metadata.createExtNodeMetadata(parent, varctx);
analyzer.visit(varctx);
@@ -171,7 +163,6 @@ class AnalyzerExternal {
final ExtprecContext precctx = ctx.extprec();
final ExtcastContext castctx = ctx.extcast();
- final ExttypeContext typectx = ctx.exttype();
final ExtvarContext varctx = ctx.extvar();
final ExtnewContext newctx = ctx.extnew();
final ExtstringContext stringctx = ctx.extstring();
@@ -182,9 +173,6 @@ class AnalyzerExternal {
} else if (castctx != null) {
metadata.createExtNodeMetadata(parent, castctx);
analyzer.visit(castctx);
- } else if (typectx != null) {
- metadata.createExtNodeMetadata(parent, typectx);
- analyzer.visit(typectx);
} else if (varctx != null) {
metadata.createExtNodeMetadata(parent, varctx);
analyzer.visit(varctx);
@@ -349,25 +337,6 @@ class AnalyzerExternal {
}
}
- void processExttype(final ExttypeContext ctx) {
- final ExtNodeMetadata typeenmd = metadata.getExtNodeMetadata(ctx);
- final ParserRuleContext parent = typeenmd.parent;
- final ExternalMetadata parentemd = metadata.getExternalMetadata(parent);
-
- if (parentemd.current != null) {
- throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "Unexpected static type.");
- }
-
- final String typestr = ctx.TYPE().getText();
- typeenmd.type = definition.getType(typestr);
- parentemd.current = typeenmd.type;
- parentemd.statik = true;
-
- final ExtdotContext dotctx = ctx.extdot();
- metadata.createExtNodeMetadata(parent, dotctx);
- analyzer.visit(dotctx);
- }
-
void processExtcall(final ExtcallContext ctx) {
final ExtNodeMetadata callenmd = metadata.getExtNodeMetadata(ctx);
final ParserRuleContext parent = callenmd.parent;
@@ -445,34 +414,56 @@ class AnalyzerExternal {
final ParserRuleContext parent = varenmd.parent;
final ExternalMetadata parentemd = metadata.getExternalMetadata(parent);
- final String name = ctx.ID().getText();
+ final IdentifierContext idctx = ctx.identifier();
+ final String id = idctx.getText();
final ExtdotContext dotctx = ctx.extdot();
final ExtbraceContext bracectx = ctx.extbrace();
- if (parentemd.current != null) {
- throw new IllegalStateException(AnalyzerUtility.error(ctx) + "Unexpected variable [" + name + "] load.");
- }
+ final boolean type = utility.isValidType(idctx, false);
- varenmd.last = parentemd.scope == 0 && dotctx == null && bracectx == null;
+ if (type) {
+ if (parentemd.current != null || dotctx == null || bracectx != null) {
+ throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "Unexpected static type [" + id + "].");
+ }
- final Variable variable = utility.getVariable(name);
+ varenmd.type = definition.getType(id);
+ parentemd.current = varenmd.type;
+ parentemd.statik = true;
- if (variable == null) {
- throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "Unknown variable [" + name + "].");
- }
-
- varenmd.target = variable.slot;
- varenmd.type = variable.type;
- analyzeLoadStoreExternal(ctx);
- parentemd.current = varenmd.type;
-
- if (dotctx != null) {
metadata.createExtNodeMetadata(parent, dotctx);
analyzer.visit(dotctx);
- } else if (bracectx != null) {
- metadata.createExtNodeMetadata(parent, bracectx);
- analyzer.visit(bracectx);
+ } else {
+ utility.isValidIdentifier(idctx, true);
+
+ if (parentemd.current != null) {
+ throw new IllegalStateException(AnalyzerUtility.error(ctx) + "Unexpected variable [" + id + "] load.");
+ }
+
+ varenmd.last = parentemd.scope == 0 && dotctx == null && bracectx == null;
+
+ final Variable variable = utility.getVariable(id);
+
+ if (variable == null) {
+ throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "Unknown variable [" + id + "].");
+ }
+
+ if ("_score".equals(id)) {
+ metadata.scoreValueUsed = true;
+ }
+
+ varenmd.target = variable.slot;
+ varenmd.type = variable.type;
+ analyzeLoadStoreExternal(ctx);
+ parentemd.current = varenmd.type;
+
+ if (dotctx != null) {
+ metadata.createExtNodeMetadata(parent, dotctx);
+ analyzer.visit(dotctx);
+ } else if (bracectx != null) {
+ metadata.createExtNodeMetadata(parent, bracectx);
+ analyzer.visit(bracectx);
+ }
}
}
@@ -650,21 +641,20 @@ class AnalyzerExternal {
final ExternalMetadata parentemd = metadata.getExternalMetadata(parent);
final ExtdotContext dotctx = ctx.extdot();
- final ExtbraceContext bracectx = ctx.extbrace();
+ newenmd.last = parentemd.scope == 0 && dotctx == null;
- newenmd.last = parentemd.scope == 0 && dotctx == null && bracectx == null;
-
- final String name = ctx.TYPE().getText();
- final Struct struct = definition.structs.get(name);
+ final IdentifierContext idctx = ctx.identifier();
+ final String type = idctx.getText();
+ utility.isValidType(idctx, true);
if (parentemd.current != null) {
throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "Unexpected new call.");
- } else if (struct == null) {
- throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "Specified type [" + name + "] not found.");
} else if (newenmd.last && parentemd.storeExpr != null) {
throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "Cannot assign a value to a new call.");
}
+ final Struct struct = definition.structs.get(type);
+
final boolean newclass = ctx.arguments() != null;
final boolean newarray = !ctx.expression().isEmpty();
@@ -712,7 +702,7 @@ class AnalyzerExternal {
}
if (size != types.length) {
- throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "When calling [" + name + "] on type " +
+ throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "When calling constructor on type " +
"[" + struct.name + "] expected [" + types.length + "] arguments," +
" but found [" + arguments.size() + "].");
}
@@ -728,9 +718,6 @@ class AnalyzerExternal {
if (dotctx != null) {
metadata.createExtNodeMetadata(parent, dotctx);
analyzer.visit(dotctx);
- } else if (bracectx != null) {
- metadata.createExtNodeMetadata(parent, bracectx);
- analyzer.visit(bracectx);
}
}
@@ -739,7 +726,7 @@ class AnalyzerExternal {
final ParserRuleContext parent = memberenmd.parent;
final ExternalMetadata parentemd = metadata.getExternalMetadata(parent);
- final String string = ctx.STRING().getText();
+ final String string = ctx.STRING().getText().substring(1, ctx.STRING().getText().length() - 1);
final ExtdotContext dotctx = ctx.extdot();
final ExtbraceContext bracectx = ctx.extbrace();
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerStatement.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerStatement.java
index e44336035e6..3221cd608f3 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerStatement.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerStatement.java
@@ -34,6 +34,7 @@ import org.elasticsearch.painless.PainlessParser.DoContext;
import org.elasticsearch.painless.PainlessParser.ExprContext;
import org.elasticsearch.painless.PainlessParser.ExpressionContext;
import org.elasticsearch.painless.PainlessParser.ForContext;
+import org.elasticsearch.painless.PainlessParser.IdentifierContext;
import org.elasticsearch.painless.PainlessParser.IfContext;
import org.elasticsearch.painless.PainlessParser.InitializerContext;
import org.elasticsearch.painless.PainlessParser.MultipleContext;
@@ -525,15 +526,20 @@ class AnalyzerStatement {
void processDecltype(final DecltypeContext ctx) {
final ExpressionMetadata decltypeemd = metadata.getExpressionMetadata(ctx);
- final String name = ctx.getText();
- decltypeemd.from = definition.getType(name);
+ final IdentifierContext idctx = ctx.identifier();
+ final String type = ctx.getText();
+
+ utility.isValidType(idctx, true);
+ decltypeemd.from = definition.getType(type);
}
void processDeclvar(final DeclvarContext ctx) {
final ExpressionMetadata declvaremd = metadata.getExpressionMetadata(ctx);
+ final IdentifierContext idctx = ctx.identifier();
+ final String identifier = idctx.getText();
- final String name = ctx.ID().getText();
- declvaremd.postConst = utility.addVariable(ctx, name, declvaremd.to).slot;
+ utility.isValidIdentifier(idctx, true);
+ declvaremd.postConst = utility.addVariable(ctx, identifier, declvaremd.to).slot;
final ExpressionContext exprctx = AnalyzerUtility.updateExpressionTree(ctx.expression());
@@ -548,7 +554,9 @@ class AnalyzerStatement {
void processTrap(final TrapContext ctx) {
final StatementMetadata trapsmd = metadata.getStatementMetadata(ctx);
- final String type = ctx.TYPE().getText();
+ final IdentifierContext idctx0 = ctx.identifier(0);
+ final String type = idctx0.getText();
+ utility.isValidType(idctx0, true);
trapsmd.exception = definition.getType(type);
try {
@@ -557,8 +565,10 @@ class AnalyzerStatement {
throw new IllegalArgumentException(AnalyzerUtility.error(ctx) + "Invalid exception type [" + trapsmd.exception.name + "].");
}
- final String id = ctx.ID().getText();
- trapsmd.slot = utility.addVariable(ctx, id, trapsmd.exception).slot;
+ final IdentifierContext idctx1 = ctx.identifier(1);
+ final String identifier = idctx1.getText();
+ utility.isValidIdentifier(idctx1, true);
+ trapsmd.slot = utility.addVariable(ctx, identifier, trapsmd.exception).slot;
final BlockContext blockctx = ctx.block();
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerUtility.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerUtility.java
index 11fb669f190..af40c58a7d7 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerUtility.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/AnalyzerUtility.java
@@ -22,7 +22,9 @@ package org.elasticsearch.painless;
import org.antlr.v4.runtime.ParserRuleContext;
import org.antlr.v4.runtime.tree.ParseTree;
import org.elasticsearch.painless.Definition.Type;
+import org.elasticsearch.painless.Metadata.ExtNodeMetadata;
import org.elasticsearch.painless.PainlessParser.ExpressionContext;
+import org.elasticsearch.painless.PainlessParser.IdentifierContext;
import org.elasticsearch.painless.PainlessParser.PrecedenceContext;
import java.util.ArrayDeque;
@@ -51,6 +53,26 @@ class AnalyzerUtility {
return "Analyzer Error [" + ctx.getStart().getLine() + ":" + ctx.getStart().getCharPositionInLine() + "]: ";
}
+ /**
+ * A utility method to output consistent error messages for invalid types.
+ * @param ctx The ANTLR node the error occurred in.
+ * @param type The invalid type.
+ * @return The error message with tacked on line number and character position.
+ */
+ static String typeError(final ParserRuleContext ctx, final String type) {
+ return error(ctx) + "Invalid type [" + type + "].";
+ }
+
+ /**
+ * A utility method to output consistent error messages for invalid identifiers.
+ * @param ctx The ANTLR node the error occurred in.
+ * @param identifier The invalid identifier.
+ * @return The error message with tacked on line number and character position.
+ */
+ static String identifierError(final ParserRuleContext ctx, final String identifier) {
+ return error(ctx) + "Invalid identifier [" + identifier + "].";
+ }
+
/**
* The ANTLR parse tree is modified in one single case; a parent node needs to check a child node to see if it's
* a precedence node, and if so, it must be removed from the tree permanently. Once the ANTLR tree is built,
@@ -87,9 +109,17 @@ class AnalyzerUtility {
return source;
}
+ private final Metadata metadata;
+ private final Definition definition;
+
private final Deque scopes = new ArrayDeque<>();
private final Deque variables = new ArrayDeque<>();
+ AnalyzerUtility(final Metadata metadata) {
+ this.metadata = metadata;
+ definition = metadata.definition;
+ }
+
void incrementScope() {
scopes.push(0);
}
@@ -141,4 +171,24 @@ class AnalyzerUtility {
return variable;
}
+
+ boolean isValidType(final IdentifierContext idctx, final boolean error) {
+ boolean valid = definition.structs.containsKey(idctx.getText());
+
+ if (!valid && error) {
+ throw new IllegalArgumentException(typeError(idctx, idctx.getText()));
+ }
+
+ return valid;
+ }
+
+ boolean isValidIdentifier(final IdentifierContext idctx, final boolean error) {
+ boolean valid = !definition.structs.containsKey(idctx.getText()) && idctx.generic() == null;
+
+ if (!valid && error) {
+ throw new IllegalArgumentException(identifierError(idctx, idctx.getText()));
+ }
+
+ return valid;
+ }
}
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Compiler.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Compiler.java
index 3d8123a4800..e3300fade78 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Compiler.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Compiler.java
@@ -104,7 +104,7 @@ final class Compiler {
}
final Definition definition = custom != null ? new Definition(custom) : DEFAULT_DEFINITION;
- final ParserRuleContext root = createParseTree(source, definition);
+ final ParserRuleContext root = createParseTree(source);
final Metadata metadata = new Metadata(definition, source, root, settings);
Analyzer.analyze(metadata);
final byte[] bytes = Writer.write(metadata);
@@ -118,17 +118,15 @@ final class Compiler {
* to ensure that the first error generated by ANTLR will cause the compilation to fail rather than
* use ANTLR's recovery strategies that may be potentially dangerous.
* @param source The source code for the script.
- * @param definition The Painless API.
* @return The root node for the ANTLR parse tree.
*/
- private static ParserRuleContext createParseTree(final String source, final Definition definition) {
+ private static ParserRuleContext createParseTree(final String source) {
final ANTLRInputStream stream = new ANTLRInputStream(source);
final ErrorHandlingLexer lexer = new ErrorHandlingLexer(stream);
final PainlessParser parser = new PainlessParser(new CommonTokenStream(lexer));
final ParserErrorStrategy strategy = new ParserErrorStrategy();
lexer.removeErrorListeners();
- lexer.setTypes(definition.structs.keySet());
parser.removeErrorListeners();
parser.setErrorHandler(strategy);
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Definition.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Definition.java
index 9266b118fcb..6cb4125f026 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Definition.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Definition.java
@@ -2101,7 +2101,7 @@ class Definition {
} else {
sort = Sort.OBJECT;
- for (Sort value : Sort.values()) {
+ for (final Sort value : Sort.values()) {
if (value.clazz == null) {
continue;
}
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Metadata.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Metadata.java
index e38d6da7d98..bb5c48f7de1 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Metadata.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Metadata.java
@@ -411,16 +411,22 @@ class Metadata {
int inputValueSlot = -1;
/**
- * Used to determine what slot the score variable is stored in. This is used in the {@link Writer} whenever
+ * Used to determine what slot the loopCounter variable is stored in. This is used n the {@link Writer} whenever
+ * the loop variable is accessed.
+ */
+ int loopCounterSlot = -1;
+
+ /**
+ * Used to determine what slot the _score variable is stored in. This is used in the {@link Writer} whenever
* the score variable is accessed.
*/
int scoreValueSlot = -1;
/**
- * Used to determine what slot the loopCounter variable is stored in. This is used n the {@link Writer} whenever
- * the loop variable is accessed.
+ * Used to determine if the _score variable is actually used. This is used in the {@link Analyzer} to update
+ * variable slots at the completion of analysis if _score is not used.
*/
- int loopCounterSlot = -1;
+ boolean scoreValueUsed = false;
/**
* Maps the relevant ANTLR node to its metadata.
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessLexer.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessLexer.java
index a7cf506da0d..ad71e155bb0 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessLexer.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessLexer.java
@@ -1,19 +1,13 @@
// ANTLR GENERATED CODE: DO NOT EDIT
package org.elasticsearch.painless;
-
-import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Lexer;
-import org.antlr.v4.runtime.RuleContext;
-import org.antlr.v4.runtime.RuntimeMetaData;
-import org.antlr.v4.runtime.Vocabulary;
-import org.antlr.v4.runtime.VocabularyImpl;
-import org.antlr.v4.runtime.atn.ATN;
-import org.antlr.v4.runtime.atn.ATNDeserializer;
-import org.antlr.v4.runtime.atn.LexerATNSimulator;
-import org.antlr.v4.runtime.atn.PredictionContextCache;
+import org.antlr.v4.runtime.CharStream;
+import org.antlr.v4.runtime.Token;
+import org.antlr.v4.runtime.TokenStream;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
-
-import java.util.Set;
+import org.antlr.v4.runtime.misc.*;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
class PainlessLexer extends Lexer {
@@ -23,52 +17,52 @@ class PainlessLexer extends Lexer {
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
- WS=1, COMMENT=2, LBRACK=3, RBRACK=4, LBRACE=5, RBRACE=6, LP=7, RP=8, DOT=9,
- COMMA=10, SEMICOLON=11, IF=12, ELSE=13, WHILE=14, DO=15, FOR=16, CONTINUE=17,
- BREAK=18, RETURN=19, NEW=20, TRY=21, CATCH=22, THROW=23, BOOLNOT=24, BWNOT=25,
- MUL=26, DIV=27, REM=28, ADD=29, SUB=30, LSH=31, RSH=32, USH=33, LT=34,
- LTE=35, GT=36, GTE=37, EQ=38, EQR=39, NE=40, NER=41, BWAND=42, BWXOR=43,
- BWOR=44, BOOLAND=45, BOOLOR=46, COND=47, COLON=48, INCR=49, DECR=50, ASSIGN=51,
- AADD=52, ASUB=53, AMUL=54, ADIV=55, AREM=56, AAND=57, AXOR=58, AOR=59,
- ALSH=60, ARSH=61, AUSH=62, OCTAL=63, HEX=64, INTEGER=65, DECIMAL=66, STRING=67,
- CHAR=68, TRUE=69, FALSE=70, NULL=71, TYPE=72, ID=73, EXTINTEGER=74, EXTID=75;
+ WS=1, COMMENT=2, LBRACK=3, RBRACK=4, LBRACE=5, RBRACE=6, LP=7, RP=8, DOT=9,
+ COMMA=10, SEMICOLON=11, IF=12, ELSE=13, WHILE=14, DO=15, FOR=16, CONTINUE=17,
+ BREAK=18, RETURN=19, NEW=20, TRY=21, CATCH=22, THROW=23, BOOLNOT=24, BWNOT=25,
+ MUL=26, DIV=27, REM=28, ADD=29, SUB=30, LSH=31, RSH=32, USH=33, LT=34,
+ LTE=35, GT=36, GTE=37, EQ=38, EQR=39, NE=40, NER=41, BWAND=42, BWXOR=43,
+ BWOR=44, BOOLAND=45, BOOLOR=46, COND=47, COLON=48, INCR=49, DECR=50, ASSIGN=51,
+ AADD=52, ASUB=53, AMUL=54, ADIV=55, AREM=56, AAND=57, AXOR=58, AOR=59,
+ ALSH=60, ARSH=61, AUSH=62, OCTAL=63, HEX=64, INTEGER=65, DECIMAL=66, STRING=67,
+ CHAR=68, TRUE=69, FALSE=70, NULL=71, ID=72, EXTINTEGER=73, EXTID=74;
public static final int EXT = 1;
public static String[] modeNames = {
"DEFAULT_MODE", "EXT"
};
public static final String[] ruleNames = {
- "WS", "COMMENT", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "LP", "RP", "DOT",
- "COMMA", "SEMICOLON", "IF", "ELSE", "WHILE", "DO", "FOR", "CONTINUE",
- "BREAK", "RETURN", "NEW", "TRY", "CATCH", "THROW", "BOOLNOT", "BWNOT",
- "MUL", "DIV", "REM", "ADD", "SUB", "LSH", "RSH", "USH", "LT", "LTE", "GT",
- "GTE", "EQ", "EQR", "NE", "NER", "BWAND", "BWXOR", "BWOR", "BOOLAND",
- "BOOLOR", "COND", "COLON", "INCR", "DECR", "ASSIGN", "AADD", "ASUB", "AMUL",
- "ADIV", "AREM", "AAND", "AXOR", "AOR", "ALSH", "ARSH", "AUSH", "OCTAL",
- "HEX", "INTEGER", "DECIMAL", "STRING", "CHAR", "TRUE", "FALSE", "NULL",
- "TYPE", "GENERIC", "ID", "EXTINTEGER", "EXTID"
+ "WS", "COMMENT", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "LP", "RP", "DOT",
+ "COMMA", "SEMICOLON", "IF", "ELSE", "WHILE", "DO", "FOR", "CONTINUE",
+ "BREAK", "RETURN", "NEW", "TRY", "CATCH", "THROW", "BOOLNOT", "BWNOT",
+ "MUL", "DIV", "REM", "ADD", "SUB", "LSH", "RSH", "USH", "LT", "LTE", "GT",
+ "GTE", "EQ", "EQR", "NE", "NER", "BWAND", "BWXOR", "BWOR", "BOOLAND",
+ "BOOLOR", "COND", "COLON", "INCR", "DECR", "ASSIGN", "AADD", "ASUB", "AMUL",
+ "ADIV", "AREM", "AAND", "AXOR", "AOR", "ALSH", "ARSH", "AUSH", "OCTAL",
+ "HEX", "INTEGER", "DECIMAL", "STRING", "CHAR", "TRUE", "FALSE", "NULL",
+ "ID", "EXTINTEGER", "EXTID"
};
private static final String[] _LITERAL_NAMES = {
- null, null, null, "'{'", "'}'", "'['", "']'", "'('", "')'", "'.'", "','",
- "';'", "'if'", "'else'", "'while'", "'do'", "'for'", "'continue'", "'break'",
- "'return'", "'new'", "'try'", "'catch'", "'throw'", "'!'", "'~'", "'*'",
- "'/'", "'%'", "'+'", "'-'", "'<<'", "'>>'", "'>>>'", "'<'", "'<='", "'>'",
- "'>='", "'=='", "'==='", "'!='", "'!=='", "'&'", "'^'", "'|'", "'&&'",
- "'||'", "'?'", "':'", "'++'", "'--'", "'='", "'+='", "'-='", "'*='", "'/='",
- "'%='", "'&='", "'^='", "'|='", "'<<='", "'>>='", "'>>>='", null, null,
+ null, null, null, "'{'", "'}'", "'['", "']'", "'('", "')'", "'.'", "','",
+ "';'", "'if'", "'else'", "'while'", "'do'", "'for'", "'continue'", "'break'",
+ "'return'", "'new'", "'try'", "'catch'", "'throw'", "'!'", "'~'", "'*'",
+ "'/'", "'%'", "'+'", "'-'", "'<<'", "'>>'", "'>>>'", "'<'", "'<='", "'>'",
+ "'>='", "'=='", "'==='", "'!='", "'!=='", "'&'", "'^'", "'|'", "'&&'",
+ "'||'", "'?'", "':'", "'++'", "'--'", "'='", "'+='", "'-='", "'*='", "'/='",
+ "'%='", "'&='", "'^='", "'|='", "'<<='", "'>>='", "'>>>='", null, null,
null, null, null, null, "'true'", "'false'", "'null'"
};
private static final String[] _SYMBOLIC_NAMES = {
- null, "WS", "COMMENT", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "LP", "RP",
- "DOT", "COMMA", "SEMICOLON", "IF", "ELSE", "WHILE", "DO", "FOR", "CONTINUE",
- "BREAK", "RETURN", "NEW", "TRY", "CATCH", "THROW", "BOOLNOT", "BWNOT",
- "MUL", "DIV", "REM", "ADD", "SUB", "LSH", "RSH", "USH", "LT", "LTE", "GT",
- "GTE", "EQ", "EQR", "NE", "NER", "BWAND", "BWXOR", "BWOR", "BOOLAND",
- "BOOLOR", "COND", "COLON", "INCR", "DECR", "ASSIGN", "AADD", "ASUB", "AMUL",
- "ADIV", "AREM", "AAND", "AXOR", "AOR", "ALSH", "ARSH", "AUSH", "OCTAL",
- "HEX", "INTEGER", "DECIMAL", "STRING", "CHAR", "TRUE", "FALSE", "NULL",
- "TYPE", "ID", "EXTINTEGER", "EXTID"
+ null, "WS", "COMMENT", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "LP", "RP",
+ "DOT", "COMMA", "SEMICOLON", "IF", "ELSE", "WHILE", "DO", "FOR", "CONTINUE",
+ "BREAK", "RETURN", "NEW", "TRY", "CATCH", "THROW", "BOOLNOT", "BWNOT",
+ "MUL", "DIV", "REM", "ADD", "SUB", "LSH", "RSH", "USH", "LT", "LTE", "GT",
+ "GTE", "EQ", "EQR", "NE", "NER", "BWAND", "BWXOR", "BWOR", "BOOLAND",
+ "BOOLOR", "COND", "COLON", "INCR", "DECR", "ASSIGN", "AADD", "ASUB", "AMUL",
+ "ADIV", "AREM", "AAND", "AXOR", "AOR", "ALSH", "ARSH", "AUSH", "OCTAL",
+ "HEX", "INTEGER", "DECIMAL", "STRING", "CHAR", "TRUE", "FALSE", "NULL",
+ "ID", "EXTINTEGER", "EXTID"
};
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
@@ -104,13 +98,6 @@ class PainlessLexer extends Lexer {
}
- private Set types = null;
-
- void setTypes(Set types) {
- this.types = types;
- }
-
-
public PainlessLexer(CharStream input) {
super(input);
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
@@ -131,59 +118,8 @@ class PainlessLexer extends Lexer {
@Override
public ATN getATN() { return _ATN; }
- @Override
- public void action(RuleContext _localctx, int ruleIndex, int actionIndex) {
- switch (ruleIndex) {
- case 66:
- STRING_action((RuleContext)_localctx, actionIndex);
- break;
- case 67:
- CHAR_action((RuleContext)_localctx, actionIndex);
- break;
- case 71:
- TYPE_action((RuleContext)_localctx, actionIndex);
- break;
- }
- }
- private void STRING_action(RuleContext _localctx, int actionIndex) {
- switch (actionIndex) {
- case 0:
- setText(getText().substring(1, getText().length() - 1));
- break;
- }
- }
- private void CHAR_action(RuleContext _localctx, int actionIndex) {
- switch (actionIndex) {
- case 1:
- setText(getText().substring(1, getText().length() - 1));
- break;
- }
- }
- private void TYPE_action(RuleContext _localctx, int actionIndex) {
- switch (actionIndex) {
- case 2:
- setText(getText().replace(" ", ""));
- break;
- }
- }
- @Override
- public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
- switch (ruleIndex) {
- case 71:
- return TYPE_sempred((RuleContext)_localctx, predIndex);
- }
- return true;
- }
- private boolean TYPE_sempred(RuleContext _localctx, int predIndex) {
- switch (predIndex) {
- case 0:
- return types.contains(getText().replace(" ", ""));
- }
- return true;
- }
-
public static final String _serializedATN =
- "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2M\u0230\b\1\b\1\4"+
+ "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2L\u01f4\b\1\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"+
@@ -192,193 +128,168 @@ class PainlessLexer extends Lexer {
"+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64"+
"\t\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\4"+
- "I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\3\2\6\2\u009e\n\2\r\2\16\2\u009f\3\2\3\2"+
- "\3\3\3\3\3\3\3\3\7\3\u00a8\n\3\f\3\16\3\u00ab\13\3\3\3\3\3\3\3\3\3\3\3"+
- "\7\3\u00b2\n\3\f\3\16\3\u00b5\13\3\3\3\3\3\5\3\u00b9\n\3\3\3\3\3\3\4\3"+
- "\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3\n\3\n\3\13\3\13\3"+
- "\f\3\f\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3"+
- "\17\3\20\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\22\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\24\3\24\3\24\3\24\3\24\3"+
- "\24\3\24\3\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\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\31\3\31\3\32\3\32\3\33\3\33\3"+
- "\34\3\34\3\35\3\35\3\36\3\36\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\60\3\60\3\61\3\61\3\62\3"+
- "\62\3\62\3\63\3\63\3\63\3\64\3\64\3\65\3\65\3\65\3\66\3\66\3\66\3\67\3"+
- "\67\3\67\38\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@\6@\u017f\n@\r@\16@\u0180\3@\5@\u0184\n@\3"+
- "A\3A\3A\6A\u0189\nA\rA\16A\u018a\3A\5A\u018e\nA\3B\3B\3B\7B\u0193\nB\f"+
- "B\16B\u0196\13B\5B\u0198\nB\3B\5B\u019b\nB\3C\3C\3C\7C\u01a0\nC\fC\16"+
- "C\u01a3\13C\5C\u01a5\nC\3C\3C\7C\u01a9\nC\fC\16C\u01ac\13C\3C\3C\5C\u01b0"+
- "\nC\3C\6C\u01b3\nC\rC\16C\u01b4\5C\u01b7\nC\3C\5C\u01ba\nC\3D\3D\3D\3"+
- "D\3D\3D\7D\u01c2\nD\fD\16D\u01c5\13D\3D\3D\3D\3E\3E\3E\3E\3E\3F\3F\3F"+
- "\3F\3F\3G\3G\3G\3G\3G\3G\3H\3H\3H\3H\3H\3I\3I\5I\u01e1\nI\3I\3I\3I\3J"+
- "\7J\u01e7\nJ\fJ\16J\u01ea\13J\3J\3J\7J\u01ee\nJ\fJ\16J\u01f1\13J\3J\3"+
- "J\5J\u01f5\nJ\3J\7J\u01f8\nJ\fJ\16J\u01fb\13J\3J\3J\7J\u01ff\nJ\fJ\16"+
- "J\u0202\13J\3J\3J\5J\u0206\nJ\3J\7J\u0209\nJ\fJ\16J\u020c\13J\7J\u020e"+
- "\nJ\fJ\16J\u0211\13J\3J\3J\3K\3K\7K\u0217\nK\fK\16K\u021a\13K\3L\3L\3"+
- "L\7L\u021f\nL\fL\16L\u0222\13L\5L\u0224\nL\3L\3L\3M\3M\7M\u022a\nM\fM"+
- "\16M\u022d\13M\3M\3M\5\u00a9\u00b3\u01c3\2N\4\3\6\4\b\5\n\6\f\7\16\b\20"+
- "\t\22\n\24\13\26\f\30\r\32\16\34\17\36\20 \21\"\22$\23&\24(\25*\26,\27"+
- ".\30\60\31\62\32\64\33\66\348\35:\36<\37> @!B\"D#F$H%J&L\'N(P)R*T+V,X"+
- "-Z.\\/^\60`\61b\62d\63f\64h\65j\66l\67n8p9r:t;v|?~@\u0080A\u0082"+
- "B\u0084C\u0086D\u0088E\u008aF\u008cG\u008eH\u0090I\u0092J\u0094\2\u0096"+
- "K\u0098L\u009aM\4\2\3\21\5\2\13\f\17\17\"\"\4\2\f\f\17\17\3\2\629\4\2"+
- "NNnn\4\2ZZzz\5\2\62;CHch\3\2\63;\3\2\62;\b\2FFHHNNffhhnn\4\2GGgg\4\2-"+
- "-//\4\2HHhh\4\2$$^^\5\2C\\aac|\6\2\62;C\\aac|\u024f\2\4\3\2\2\2\2\6\3"+
- "\2\2\2\2\b\3\2\2\2\2\n\3\2\2\2\2\f\3\2\2\2\2\16\3\2\2\2\2\20\3\2\2\2\2"+
- "\22\3\2\2\2\2\24\3\2\2\2\2\26\3\2\2\2\2\30\3\2\2\2\2\32\3\2\2\2\2\34\3"+
- "\2\2\2\2\36\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\60\3\2\2\2\2\62\3\2\2\2\2\64"+
- "\3\2\2\2\2\66\3\2\2\2\28\3\2\2\2\2:\3\2\2\2\2<\3\2\2\2\2>\3\2\2\2\2@\3"+
- "\2\2\2\2B\3\2\2\2\2D\3\2\2\2\2F\3\2\2\2\2H\3\2\2\2\2J\3\2\2\2\2L\3\2\2"+
- "\2\2N\3\2\2\2\2P\3\2\2\2\2R\3\2\2\2\2T\3\2\2\2\2V\3\2\2\2\2X\3\2\2\2\2"+
- "Z\3\2\2\2\2\\\3\2\2\2\2^\3\2\2\2\2`\3\2\2\2\2b\3\2\2\2\2d\3\2\2\2\2f\3"+
- "\2\2\2\2h\3\2\2\2\2j\3\2\2\2\2l\3\2\2\2\2n\3\2\2\2\2p\3\2\2\2\2r\3\2\2"+
- "\2\2t\3\2\2\2\2v\3\2\2\2\2x\3\2\2\2\2z\3\2\2\2\2|\3\2\2\2\2~\3\2\2\2\2"+
- "\u0080\3\2\2\2\2\u0082\3\2\2\2\2\u0084\3\2\2\2\2\u0086\3\2\2\2\2\u0088"+
- "\3\2\2\2\2\u008a\3\2\2\2\2\u008c\3\2\2\2\2\u008e\3\2\2\2\2\u0090\3\2\2"+
- "\2\2\u0092\3\2\2\2\2\u0096\3\2\2\2\3\u0098\3\2\2\2\3\u009a\3\2\2\2\4\u009d"+
- "\3\2\2\2\6\u00b8\3\2\2\2\b\u00bc\3\2\2\2\n\u00be\3\2\2\2\f\u00c0\3\2\2"+
- "\2\16\u00c2\3\2\2\2\20\u00c4\3\2\2\2\22\u00c6\3\2\2\2\24\u00c8\3\2\2\2"+
- "\26\u00cc\3\2\2\2\30\u00ce\3\2\2\2\32\u00d0\3\2\2\2\34\u00d3\3\2\2\2\36"+
- "\u00d8\3\2\2\2 \u00de\3\2\2\2\"\u00e1\3\2\2\2$\u00e5\3\2\2\2&\u00ee\3"+
- "\2\2\2(\u00f4\3\2\2\2*\u00fb\3\2\2\2,\u00ff\3\2\2\2.\u0103\3\2\2\2\60"+
- "\u0109\3\2\2\2\62\u010f\3\2\2\2\64\u0111\3\2\2\2\66\u0113\3\2\2\28\u0115"+
- "\3\2\2\2:\u0117\3\2\2\2<\u0119\3\2\2\2>\u011b\3\2\2\2@\u011d\3\2\2\2B"+
- "\u0120\3\2\2\2D\u0123\3\2\2\2F\u0127\3\2\2\2H\u0129\3\2\2\2J\u012c\3\2"+
- "\2\2L\u012e\3\2\2\2N\u0131\3\2\2\2P\u0134\3\2\2\2R\u0138\3\2\2\2T\u013b"+
- "\3\2\2\2V\u013f\3\2\2\2X\u0141\3\2\2\2Z\u0143\3\2\2\2\\\u0145\3\2\2\2"+
- "^\u0148\3\2\2\2`\u014b\3\2\2\2b\u014d\3\2\2\2d\u014f\3\2\2\2f\u0152\3"+
- "\2\2\2h\u0155\3\2\2\2j\u0157\3\2\2\2l\u015a\3\2\2\2n\u015d\3\2\2\2p\u0160"+
- "\3\2\2\2r\u0163\3\2\2\2t\u0166\3\2\2\2v\u0169\3\2\2\2x\u016c\3\2\2\2z"+
- "\u016f\3\2\2\2|\u0173\3\2\2\2~\u0177\3\2\2\2\u0080\u017c\3\2\2\2\u0082"+
- "\u0185\3\2\2\2\u0084\u0197\3\2\2\2\u0086\u01a4\3\2\2\2\u0088\u01bb\3\2"+
- "\2\2\u008a\u01c9\3\2\2\2\u008c\u01ce\3\2\2\2\u008e\u01d3\3\2\2\2\u0090"+
- "\u01d9\3\2\2\2\u0092\u01de\3\2\2\2\u0094\u01e8\3\2\2\2\u0096\u0214\3\2"+
- "\2\2\u0098\u0223\3\2\2\2\u009a\u0227\3\2\2\2\u009c\u009e\t\2\2\2\u009d"+
- "\u009c\3\2\2\2\u009e\u009f\3\2\2\2\u009f\u009d\3\2\2\2\u009f\u00a0\3\2"+
- "\2\2\u00a0\u00a1\3\2\2\2\u00a1\u00a2\b\2\2\2\u00a2\5\3\2\2\2\u00a3\u00a4"+
- "\7\61\2\2\u00a4\u00a5\7\61\2\2\u00a5\u00a9\3\2\2\2\u00a6\u00a8\13\2\2"+
- "\2\u00a7\u00a6\3\2\2\2\u00a8\u00ab\3\2\2\2\u00a9\u00aa\3\2\2\2\u00a9\u00a7"+
- "\3\2\2\2\u00aa\u00ac\3\2\2\2\u00ab\u00a9\3\2\2\2\u00ac\u00b9\t\3\2\2\u00ad"+
- "\u00ae\7\61\2\2\u00ae\u00af\7,\2\2\u00af\u00b3\3\2\2\2\u00b0\u00b2\13"+
- "\2\2\2\u00b1\u00b0\3\2\2\2\u00b2\u00b5\3\2\2\2\u00b3\u00b4\3\2\2\2\u00b3"+
- "\u00b1\3\2\2\2\u00b4\u00b6\3\2\2\2\u00b5\u00b3\3\2\2\2\u00b6\u00b7\7,"+
- "\2\2\u00b7\u00b9\7\61\2\2\u00b8\u00a3\3\2\2\2\u00b8\u00ad\3\2\2\2\u00b9"+
- "\u00ba\3\2\2\2\u00ba\u00bb\b\3\2\2\u00bb\7\3\2\2\2\u00bc\u00bd\7}\2\2"+
- "\u00bd\t\3\2\2\2\u00be\u00bf\7\177\2\2\u00bf\13\3\2\2\2\u00c0\u00c1\7"+
- "]\2\2\u00c1\r\3\2\2\2\u00c2\u00c3\7_\2\2\u00c3\17\3\2\2\2\u00c4\u00c5"+
- "\7*\2\2\u00c5\21\3\2\2\2\u00c6\u00c7\7+\2\2\u00c7\23\3\2\2\2\u00c8\u00c9"+
- "\7\60\2\2\u00c9\u00ca\3\2\2\2\u00ca\u00cb\b\n\3\2\u00cb\25\3\2\2\2\u00cc"+
- "\u00cd\7.\2\2\u00cd\27\3\2\2\2\u00ce\u00cf\7=\2\2\u00cf\31\3\2\2\2\u00d0"+
- "\u00d1\7k\2\2\u00d1\u00d2\7h\2\2\u00d2\33\3\2\2\2\u00d3\u00d4\7g\2\2\u00d4"+
- "\u00d5\7n\2\2\u00d5\u00d6\7u\2\2\u00d6\u00d7\7g\2\2\u00d7\35\3\2\2\2\u00d8"+
- "\u00d9\7y\2\2\u00d9\u00da\7j\2\2\u00da\u00db\7k\2\2\u00db\u00dc\7n\2\2"+
- "\u00dc\u00dd\7g\2\2\u00dd\37\3\2\2\2\u00de\u00df\7f\2\2\u00df\u00e0\7"+
- "q\2\2\u00e0!\3\2\2\2\u00e1\u00e2\7h\2\2\u00e2\u00e3\7q\2\2\u00e3\u00e4"+
- "\7t\2\2\u00e4#\3\2\2\2\u00e5\u00e6\7e\2\2\u00e6\u00e7\7q\2\2\u00e7\u00e8"+
- "\7p\2\2\u00e8\u00e9\7v\2\2\u00e9\u00ea\7k\2\2\u00ea\u00eb\7p\2\2\u00eb"+
- "\u00ec\7w\2\2\u00ec\u00ed\7g\2\2\u00ed%\3\2\2\2\u00ee\u00ef\7d\2\2\u00ef"+
- "\u00f0\7t\2\2\u00f0\u00f1\7g\2\2\u00f1\u00f2\7c\2\2\u00f2\u00f3\7m\2\2"+
- "\u00f3\'\3\2\2\2\u00f4\u00f5\7t\2\2\u00f5\u00f6\7g\2\2\u00f6\u00f7\7v"+
- "\2\2\u00f7\u00f8\7w\2\2\u00f8\u00f9\7t\2\2\u00f9\u00fa\7p\2\2\u00fa)\3"+
- "\2\2\2\u00fb\u00fc\7p\2\2\u00fc\u00fd\7g\2\2\u00fd\u00fe\7y\2\2\u00fe"+
- "+\3\2\2\2\u00ff\u0100\7v\2\2\u0100\u0101\7t\2\2\u0101\u0102\7{\2\2\u0102"+
- "-\3\2\2\2\u0103\u0104\7e\2\2\u0104\u0105\7c\2\2\u0105\u0106\7v\2\2\u0106"+
- "\u0107\7e\2\2\u0107\u0108\7j\2\2\u0108/\3\2\2\2\u0109\u010a\7v\2\2\u010a"+
- "\u010b\7j\2\2\u010b\u010c\7t\2\2\u010c\u010d\7q\2\2\u010d\u010e\7y\2\2"+
- "\u010e\61\3\2\2\2\u010f\u0110\7#\2\2\u0110\63\3\2\2\2\u0111\u0112\7\u0080"+
- "\2\2\u0112\65\3\2\2\2\u0113\u0114\7,\2\2\u0114\67\3\2\2\2\u0115\u0116"+
- "\7\61\2\2\u01169\3\2\2\2\u0117\u0118\7\'\2\2\u0118;\3\2\2\2\u0119\u011a"+
- "\7-\2\2\u011a=\3\2\2\2\u011b\u011c\7/\2\2\u011c?\3\2\2\2\u011d\u011e\7"+
- ">\2\2\u011e\u011f\7>\2\2\u011fA\3\2\2\2\u0120\u0121\7@\2\2\u0121\u0122"+
- "\7@\2\2\u0122C\3\2\2\2\u0123\u0124\7@\2\2\u0124\u0125\7@\2\2\u0125\u0126"+
- "\7@\2\2\u0126E\3\2\2\2\u0127\u0128\7>\2\2\u0128G\3\2\2\2\u0129\u012a\7"+
- ">\2\2\u012a\u012b\7?\2\2\u012bI\3\2\2\2\u012c\u012d\7@\2\2\u012dK\3\2"+
- "\2\2\u012e\u012f\7@\2\2\u012f\u0130\7?\2\2\u0130M\3\2\2\2\u0131\u0132"+
- "\7?\2\2\u0132\u0133\7?\2\2\u0133O\3\2\2\2\u0134\u0135\7?\2\2\u0135\u0136"+
- "\7?\2\2\u0136\u0137\7?\2\2\u0137Q\3\2\2\2\u0138\u0139\7#\2\2\u0139\u013a"+
- "\7?\2\2\u013aS\3\2\2\2\u013b\u013c\7#\2\2\u013c\u013d\7?\2\2\u013d\u013e"+
- "\7?\2\2\u013eU\3\2\2\2\u013f\u0140\7(\2\2\u0140W\3\2\2\2\u0141\u0142\7"+
- "`\2\2\u0142Y\3\2\2\2\u0143\u0144\7~\2\2\u0144[\3\2\2\2\u0145\u0146\7("+
- "\2\2\u0146\u0147\7(\2\2\u0147]\3\2\2\2\u0148\u0149\7~\2\2\u0149\u014a"+
- "\7~\2\2\u014a_\3\2\2\2\u014b\u014c\7A\2\2\u014ca\3\2\2\2\u014d\u014e\7"+
- "<\2\2\u014ec\3\2\2\2\u014f\u0150\7-\2\2\u0150\u0151\7-\2\2\u0151e\3\2"+
- "\2\2\u0152\u0153\7/\2\2\u0153\u0154\7/\2\2\u0154g\3\2\2\2\u0155\u0156"+
- "\7?\2\2\u0156i\3\2\2\2\u0157\u0158\7-\2\2\u0158\u0159\7?\2\2\u0159k\3"+
- "\2\2\2\u015a\u015b\7/\2\2\u015b\u015c\7?\2\2\u015cm\3\2\2\2\u015d\u015e"+
- "\7,\2\2\u015e\u015f\7?\2\2\u015fo\3\2\2\2\u0160\u0161\7\61\2\2\u0161\u0162"+
- "\7?\2\2\u0162q\3\2\2\2\u0163\u0164\7\'\2\2\u0164\u0165\7?\2\2\u0165s\3"+
- "\2\2\2\u0166\u0167\7(\2\2\u0167\u0168\7?\2\2\u0168u\3\2\2\2\u0169\u016a"+
- "\7`\2\2\u016a\u016b\7?\2\2\u016bw\3\2\2\2\u016c\u016d\7~\2\2\u016d\u016e"+
- "\7?\2\2\u016ey\3\2\2\2\u016f\u0170\7>\2\2\u0170\u0171\7>\2\2\u0171\u0172"+
- "\7?\2\2\u0172{\3\2\2\2\u0173\u0174\7@\2\2\u0174\u0175\7@\2\2\u0175\u0176"+
- "\7?\2\2\u0176}\3\2\2\2\u0177\u0178\7@\2\2\u0178\u0179\7@\2\2\u0179\u017a"+
- "\7@\2\2\u017a\u017b\7?\2\2\u017b\177\3\2\2\2\u017c\u017e\7\62\2\2\u017d"+
- "\u017f\t\4\2\2\u017e\u017d\3\2\2\2\u017f\u0180\3\2\2\2\u0180\u017e\3\2"+
- "\2\2\u0180\u0181\3\2\2\2\u0181\u0183\3\2\2\2\u0182\u0184\t\5\2\2\u0183"+
- "\u0182\3\2\2\2\u0183\u0184\3\2\2\2\u0184\u0081\3\2\2\2\u0185\u0186\7\62"+
- "\2\2\u0186\u0188\t\6\2\2\u0187\u0189\t\7\2\2\u0188\u0187\3\2\2\2\u0189"+
- "\u018a\3\2\2\2\u018a\u0188\3\2\2\2\u018a\u018b\3\2\2\2\u018b\u018d\3\2"+
- "\2\2\u018c\u018e\t\5\2\2\u018d\u018c\3\2\2\2\u018d\u018e\3\2\2\2\u018e"+
- "\u0083\3\2\2\2\u018f\u0198\7\62\2\2\u0190\u0194\t\b\2\2\u0191\u0193\t"+
- "\t\2\2\u0192\u0191\3\2\2\2\u0193\u0196\3\2\2\2\u0194\u0192\3\2\2\2\u0194"+
- "\u0195\3\2\2\2\u0195\u0198\3\2\2\2\u0196\u0194\3\2\2\2\u0197\u018f\3\2"+
- "\2\2\u0197\u0190\3\2\2\2\u0198\u019a\3\2\2\2\u0199\u019b\t\n\2\2\u019a"+
- "\u0199\3\2\2\2\u019a\u019b\3\2\2\2\u019b\u0085\3\2\2\2\u019c\u01a5\7\62"+
- "\2\2\u019d\u01a1\t\b\2\2\u019e\u01a0\t\t\2\2\u019f\u019e\3\2\2\2\u01a0"+
- "\u01a3\3\2\2\2\u01a1\u019f\3\2\2\2\u01a1\u01a2\3\2\2\2\u01a2\u01a5\3\2"+
- "\2\2\u01a3\u01a1\3\2\2\2\u01a4\u019c\3\2\2\2\u01a4\u019d\3\2\2\2\u01a5"+
- "\u01a6\3\2\2\2\u01a6\u01aa\5\24\n\2\u01a7\u01a9\t\t\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"+
- "\u01b6\3\2\2\2\u01ac\u01aa\3\2\2\2\u01ad\u01af\t\13\2\2\u01ae\u01b0\t"+
- "\f\2\2\u01af\u01ae\3\2\2\2\u01af\u01b0\3\2\2\2\u01b0\u01b2\3\2\2\2\u01b1"+
- "\u01b3\t\t\2\2\u01b2\u01b1\3\2\2\2\u01b3\u01b4\3\2\2\2\u01b4\u01b2\3\2"+
- "\2\2\u01b4\u01b5\3\2\2\2\u01b5\u01b7\3\2\2\2\u01b6\u01ad\3\2\2\2\u01b6"+
- "\u01b7\3\2\2\2\u01b7\u01b9\3\2\2\2\u01b8\u01ba\t\r\2\2\u01b9\u01b8\3\2"+
- "\2\2\u01b9\u01ba\3\2\2\2\u01ba\u0087\3\2\2\2\u01bb\u01c3\7$\2\2\u01bc"+
- "\u01bd\7^\2\2\u01bd\u01c2\7$\2\2\u01be\u01bf\7^\2\2\u01bf\u01c2\7^\2\2"+
- "\u01c0\u01c2\n\16\2\2\u01c1\u01bc\3\2\2\2\u01c1\u01be\3\2\2\2\u01c1\u01c0"+
- "\3\2\2\2\u01c2\u01c5\3\2\2\2\u01c3\u01c4\3\2\2\2\u01c3\u01c1\3\2\2\2\u01c4"+
- "\u01c6\3\2\2\2\u01c5\u01c3\3\2\2\2\u01c6\u01c7\7$\2\2\u01c7\u01c8\bD\4"+
- "\2\u01c8\u0089\3\2\2\2\u01c9\u01ca\7)\2\2\u01ca\u01cb\13\2\2\2\u01cb\u01cc"+
- "\7)\2\2\u01cc\u01cd\bE\5\2\u01cd\u008b\3\2\2\2\u01ce\u01cf\7v\2\2\u01cf"+
- "\u01d0\7t\2\2\u01d0\u01d1\7w\2\2\u01d1\u01d2\7g\2\2\u01d2\u008d\3\2\2"+
- "\2\u01d3\u01d4\7h\2\2\u01d4\u01d5\7c\2\2\u01d5\u01d6\7n\2\2\u01d6\u01d7"+
- "\7u\2\2\u01d7\u01d8\7g\2\2\u01d8\u008f\3\2\2\2\u01d9\u01da\7p\2\2\u01da"+
- "\u01db\7w\2\2\u01db\u01dc\7n\2\2\u01dc\u01dd\7n\2\2\u01dd\u0091\3\2\2"+
- "\2\u01de\u01e0\5\u0096K\2\u01df\u01e1\5\u0094J\2\u01e0\u01df\3\2\2\2\u01e0"+
- "\u01e1\3\2\2\2\u01e1\u01e2\3\2\2\2\u01e2\u01e3\6I\2\2\u01e3\u01e4\bI\6"+
- "\2\u01e4\u0093\3\2\2\2\u01e5\u01e7\7\"\2\2\u01e6\u01e5\3\2\2\2\u01e7\u01ea"+
- "\3\2\2\2\u01e8\u01e6\3\2\2\2\u01e8\u01e9\3\2\2\2\u01e9\u01eb\3\2\2\2\u01ea"+
- "\u01e8\3\2\2\2\u01eb\u01ef\7>\2\2\u01ec\u01ee\7\"\2\2\u01ed\u01ec\3\2"+
- "\2\2\u01ee\u01f1\3\2\2\2\u01ef\u01ed\3\2\2\2\u01ef\u01f0\3\2\2\2\u01f0"+
- "\u01f2\3\2\2\2\u01f1\u01ef\3\2\2\2\u01f2\u01f4\5\u0096K\2\u01f3\u01f5"+
- "\5\u0094J\2\u01f4\u01f3\3\2\2\2\u01f4\u01f5\3\2\2\2\u01f5\u01f9\3\2\2"+
- "\2\u01f6\u01f8\7\"\2\2\u01f7\u01f6\3\2\2\2\u01f8\u01fb\3\2\2\2\u01f9\u01f7"+
- "\3\2\2\2\u01f9\u01fa\3\2\2\2\u01fa\u020f\3\2\2\2\u01fb\u01f9\3\2\2\2\u01fc"+
- "\u0200\5\26\13\2\u01fd\u01ff\7\"\2\2\u01fe\u01fd\3\2\2\2\u01ff\u0202\3"+
- "\2\2\2\u0200\u01fe\3\2\2\2\u0200\u0201\3\2\2\2\u0201\u0203\3\2\2\2\u0202"+
- "\u0200\3\2\2\2\u0203\u0205\5\u0096K\2\u0204\u0206\5\u0094J\2\u0205\u0204"+
- "\3\2\2\2\u0205\u0206\3\2\2\2\u0206\u020a\3\2\2\2\u0207\u0209\7\"\2\2\u0208"+
- "\u0207\3\2\2\2\u0209\u020c\3\2\2\2\u020a\u0208\3\2\2\2\u020a\u020b\3\2"+
- "\2\2\u020b\u020e\3\2\2\2\u020c\u020a\3\2\2\2\u020d\u01fc\3\2\2\2\u020e"+
- "\u0211\3\2\2\2\u020f\u020d\3\2\2\2\u020f\u0210\3\2\2\2\u0210\u0212\3\2"+
- "\2\2\u0211\u020f\3\2\2\2\u0212\u0213\7@\2\2\u0213\u0095\3\2\2\2\u0214"+
- "\u0218\t\17\2\2\u0215\u0217\t\20\2\2\u0216\u0215\3\2\2\2\u0217\u021a\3"+
- "\2\2\2\u0218\u0216\3\2\2\2\u0218\u0219\3\2\2\2\u0219\u0097\3\2\2\2\u021a"+
- "\u0218\3\2\2\2\u021b\u0224\7\62\2\2\u021c\u0220\t\b\2\2\u021d\u021f\t"+
- "\t\2\2\u021e\u021d\3\2\2\2\u021f\u0222\3\2\2\2\u0220\u021e\3\2\2\2\u0220"+
- "\u0221\3\2\2\2\u0221\u0224\3\2\2\2\u0222\u0220\3\2\2\2\u0223\u021b\3\2"+
- "\2\2\u0223\u021c\3\2\2\2\u0224\u0225\3\2\2\2\u0225\u0226\bL\7\2\u0226"+
- "\u0099\3\2\2\2\u0227\u022b\t\17\2\2\u0228\u022a\t\20\2\2\u0229\u0228\3"+
- "\2\2\2\u022a\u022d\3\2\2\2\u022b\u0229\3\2\2\2\u022b\u022c\3\2\2\2\u022c"+
- "\u022e\3\2\2\2\u022d\u022b\3\2\2\2\u022e\u022f\bM\7\2\u022f\u009b\3\2"+
- "\2\2%\2\3\u009f\u00a9\u00b3\u00b8\u0180\u0183\u018a\u018d\u0194\u0197"+
- "\u019a\u01a1\u01a4\u01aa\u01af\u01b4\u01b6\u01b9\u01c1\u01c3\u01e0\u01e8"+
- "\u01ef\u01f4\u01f9\u0200\u0205\u020a\u020f\u0218\u0220\u0223\u022b\b\b"+
- "\2\2\4\3\2\3D\2\3E\3\3I\4\4\2\2";
+ "I\tI\4J\tJ\4K\tK\3\2\6\2\u009a\n\2\r\2\16\2\u009b\3\2\3\2\3\3\3\3\3\3"+
+ "\3\3\7\3\u00a4\n\3\f\3\16\3\u00a7\13\3\3\3\3\3\3\3\3\3\3\3\7\3\u00ae\n"+
+ "\3\f\3\16\3\u00b1\13\3\3\3\3\3\5\3\u00b5\n\3\3\3\3\3\3\4\3\4\3\5\3\5\3"+
+ "\6\3\6\3\7\3\7\3\b\3\b\3\t\3\t\3\n\3\n\3\n\3\n\3\13\3\13\3\f\3\f\3\r\3"+
+ "\r\3\r\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3\20\3\20"+
+ "\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\22\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\24\3\24\3\24\3\24\3\24\3\24\3\24\3\25"+
+ "\3\25\3\25\3\25\3\26\3\26\3\26\3\26\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\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\35"+
+ "\3\35\3\36\3\36\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\60\3\60\3\61\3\61\3\62\3\62\3\62\3\63"+
+ "\3\63\3\63\3\64\3\64\3\65\3\65\3\65\3\66\3\66\3\66\3\67\3\67\3\67\38\3"+
+ "8\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@\6@\u017b\n@\r@\16@\u017c\3@\5@\u0180\n@\3A\3A\3A\6A\u0185"+
+ "\nA\rA\16A\u0186\3A\5A\u018a\nA\3B\3B\3B\7B\u018f\nB\fB\16B\u0192\13B"+
+ "\5B\u0194\nB\3B\5B\u0197\nB\3C\3C\3C\7C\u019c\nC\fC\16C\u019f\13C\5C\u01a1"+
+ "\nC\3C\3C\7C\u01a5\nC\fC\16C\u01a8\13C\3C\3C\5C\u01ac\nC\3C\6C\u01af\n"+
+ "C\rC\16C\u01b0\5C\u01b3\nC\3C\5C\u01b6\nC\3D\3D\3D\3D\3D\3D\7D\u01be\n"+
+ "D\fD\16D\u01c1\13D\3D\3D\3E\3E\3E\3E\3F\3F\3F\3F\3F\3G\3G\3G\3G\3G\3G"+
+ "\3H\3H\3H\3H\3H\3I\3I\7I\u01db\nI\fI\16I\u01de\13I\3J\3J\3J\7J\u01e3\n"+
+ "J\fJ\16J\u01e6\13J\5J\u01e8\nJ\3J\3J\3K\3K\7K\u01ee\nK\fK\16K\u01f1\13"+
+ "K\3K\3K\5\u00a5\u00af\u01bf\2L\4\3\6\4\b\5\n\6\f\7\16\b\20\t\22\n\24\13"+
+ "\26\f\30\r\32\16\34\17\36\20 \21\"\22$\23&\24(\25*\26,\27.\30\60\31\62"+
+ "\32\64\33\66\348\35:\36<\37> @!B\"D#F$H%J&L\'N(P)R*T+V,X-Z.\\/^\60`\61"+
+ "b\62d\63f\64h\65j\66l\67n8p9r:t;v|?~@\u0080A\u0082B\u0084C\u0086"+
+ "D\u0088E\u008aF\u008cG\u008eH\u0090I\u0092J\u0094K\u0096L\4\2\3\21\5\2"+
+ "\13\f\17\17\"\"\4\2\f\f\17\17\3\2\629\4\2NNnn\4\2ZZzz\5\2\62;CHch\3\2"+
+ "\63;\3\2\62;\b\2FFHHNNffhhnn\4\2GGgg\4\2--//\4\2HHhh\4\2$$^^\5\2C\\aa"+
+ "c|\6\2\62;C\\aac|\u020b\2\4\3\2\2\2\2\6\3\2\2\2\2\b\3\2\2\2\2\n\3\2\2"+
+ "\2\2\f\3\2\2\2\2\16\3\2\2\2\2\20\3\2\2\2\2\22\3\2\2\2\2\24\3\2\2\2\2\26"+
+ "\3\2\2\2\2\30\3\2\2\2\2\32\3\2\2\2\2\34\3\2\2\2\2\36\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\60\3\2\2\2\2\62\3\2\2\2\2\64\3\2\2\2\2\66\3\2\2\2\28\3\2"+
+ "\2\2\2:\3\2\2\2\2<\3\2\2\2\2>\3\2\2\2\2@\3\2\2\2\2B\3\2\2\2\2D\3\2\2\2"+
+ "\2F\3\2\2\2\2H\3\2\2\2\2J\3\2\2\2\2L\3\2\2\2\2N\3\2\2\2\2P\3\2\2\2\2R"+
+ "\3\2\2\2\2T\3\2\2\2\2V\3\2\2\2\2X\3\2\2\2\2Z\3\2\2\2\2\\\3\2\2\2\2^\3"+
+ "\2\2\2\2`\3\2\2\2\2b\3\2\2\2\2d\3\2\2\2\2f\3\2\2\2\2h\3\2\2\2\2j\3\2\2"+
+ "\2\2l\3\2\2\2\2n\3\2\2\2\2p\3\2\2\2\2r\3\2\2\2\2t\3\2\2\2\2v\3\2\2\2\2"+
+ "x\3\2\2\2\2z\3\2\2\2\2|\3\2\2\2\2~\3\2\2\2\2\u0080\3\2\2\2\2\u0082\3\2"+
+ "\2\2\2\u0084\3\2\2\2\2\u0086\3\2\2\2\2\u0088\3\2\2\2\2\u008a\3\2\2\2\2"+
+ "\u008c\3\2\2\2\2\u008e\3\2\2\2\2\u0090\3\2\2\2\2\u0092\3\2\2\2\3\u0094"+
+ "\3\2\2\2\3\u0096\3\2\2\2\4\u0099\3\2\2\2\6\u00b4\3\2\2\2\b\u00b8\3\2\2"+
+ "\2\n\u00ba\3\2\2\2\f\u00bc\3\2\2\2\16\u00be\3\2\2\2\20\u00c0\3\2\2\2\22"+
+ "\u00c2\3\2\2\2\24\u00c4\3\2\2\2\26\u00c8\3\2\2\2\30\u00ca\3\2\2\2\32\u00cc"+
+ "\3\2\2\2\34\u00cf\3\2\2\2\36\u00d4\3\2\2\2 \u00da\3\2\2\2\"\u00dd\3\2"+
+ "\2\2$\u00e1\3\2\2\2&\u00ea\3\2\2\2(\u00f0\3\2\2\2*\u00f7\3\2\2\2,\u00fb"+
+ "\3\2\2\2.\u00ff\3\2\2\2\60\u0105\3\2\2\2\62\u010b\3\2\2\2\64\u010d\3\2"+
+ "\2\2\66\u010f\3\2\2\28\u0111\3\2\2\2:\u0113\3\2\2\2<\u0115\3\2\2\2>\u0117"+
+ "\3\2\2\2@\u0119\3\2\2\2B\u011c\3\2\2\2D\u011f\3\2\2\2F\u0123\3\2\2\2H"+
+ "\u0125\3\2\2\2J\u0128\3\2\2\2L\u012a\3\2\2\2N\u012d\3\2\2\2P\u0130\3\2"+
+ "\2\2R\u0134\3\2\2\2T\u0137\3\2\2\2V\u013b\3\2\2\2X\u013d\3\2\2\2Z\u013f"+
+ "\3\2\2\2\\\u0141\3\2\2\2^\u0144\3\2\2\2`\u0147\3\2\2\2b\u0149\3\2\2\2"+
+ "d\u014b\3\2\2\2f\u014e\3\2\2\2h\u0151\3\2\2\2j\u0153\3\2\2\2l\u0156\3"+
+ "\2\2\2n\u0159\3\2\2\2p\u015c\3\2\2\2r\u015f\3\2\2\2t\u0162\3\2\2\2v\u0165"+
+ "\3\2\2\2x\u0168\3\2\2\2z\u016b\3\2\2\2|\u016f\3\2\2\2~\u0173\3\2\2\2\u0080"+
+ "\u0178\3\2\2\2\u0082\u0181\3\2\2\2\u0084\u0193\3\2\2\2\u0086\u01a0\3\2"+
+ "\2\2\u0088\u01b7\3\2\2\2\u008a\u01c4\3\2\2\2\u008c\u01c8\3\2\2\2\u008e"+
+ "\u01cd\3\2\2\2\u0090\u01d3\3\2\2\2\u0092\u01d8\3\2\2\2\u0094\u01e7\3\2"+
+ "\2\2\u0096\u01eb\3\2\2\2\u0098\u009a\t\2\2\2\u0099\u0098\3\2\2\2\u009a"+
+ "\u009b\3\2\2\2\u009b\u0099\3\2\2\2\u009b\u009c\3\2\2\2\u009c\u009d\3\2"+
+ "\2\2\u009d\u009e\b\2\2\2\u009e\5\3\2\2\2\u009f\u00a0\7\61\2\2\u00a0\u00a1"+
+ "\7\61\2\2\u00a1\u00a5\3\2\2\2\u00a2\u00a4\13\2\2\2\u00a3\u00a2\3\2\2\2"+
+ "\u00a4\u00a7\3\2\2\2\u00a5\u00a6\3\2\2\2\u00a5\u00a3\3\2\2\2\u00a6\u00a8"+
+ "\3\2\2\2\u00a7\u00a5\3\2\2\2\u00a8\u00b5\t\3\2\2\u00a9\u00aa\7\61\2\2"+
+ "\u00aa\u00ab\7,\2\2\u00ab\u00af\3\2\2\2\u00ac\u00ae\13\2\2\2\u00ad\u00ac"+
+ "\3\2\2\2\u00ae\u00b1\3\2\2\2\u00af\u00b0\3\2\2\2\u00af\u00ad\3\2\2\2\u00b0"+
+ "\u00b2\3\2\2\2\u00b1\u00af\3\2\2\2\u00b2\u00b3\7,\2\2\u00b3\u00b5\7\61"+
+ "\2\2\u00b4\u009f\3\2\2\2\u00b4\u00a9\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6"+
+ "\u00b7\b\3\2\2\u00b7\7\3\2\2\2\u00b8\u00b9\7}\2\2\u00b9\t\3\2\2\2\u00ba"+
+ "\u00bb\7\177\2\2\u00bb\13\3\2\2\2\u00bc\u00bd\7]\2\2\u00bd\r\3\2\2\2\u00be"+
+ "\u00bf\7_\2\2\u00bf\17\3\2\2\2\u00c0\u00c1\7*\2\2\u00c1\21\3\2\2\2\u00c2"+
+ "\u00c3\7+\2\2\u00c3\23\3\2\2\2\u00c4\u00c5\7\60\2\2\u00c5\u00c6\3\2\2"+
+ "\2\u00c6\u00c7\b\n\3\2\u00c7\25\3\2\2\2\u00c8\u00c9\7.\2\2\u00c9\27\3"+
+ "\2\2\2\u00ca\u00cb\7=\2\2\u00cb\31\3\2\2\2\u00cc\u00cd\7k\2\2\u00cd\u00ce"+
+ "\7h\2\2\u00ce\33\3\2\2\2\u00cf\u00d0\7g\2\2\u00d0\u00d1\7n\2\2\u00d1\u00d2"+
+ "\7u\2\2\u00d2\u00d3\7g\2\2\u00d3\35\3\2\2\2\u00d4\u00d5\7y\2\2\u00d5\u00d6"+
+ "\7j\2\2\u00d6\u00d7\7k\2\2\u00d7\u00d8\7n\2\2\u00d8\u00d9\7g\2\2\u00d9"+
+ "\37\3\2\2\2\u00da\u00db\7f\2\2\u00db\u00dc\7q\2\2\u00dc!\3\2\2\2\u00dd"+
+ "\u00de\7h\2\2\u00de\u00df\7q\2\2\u00df\u00e0\7t\2\2\u00e0#\3\2\2\2\u00e1"+
+ "\u00e2\7e\2\2\u00e2\u00e3\7q\2\2\u00e3\u00e4\7p\2\2\u00e4\u00e5\7v\2\2"+
+ "\u00e5\u00e6\7k\2\2\u00e6\u00e7\7p\2\2\u00e7\u00e8\7w\2\2\u00e8\u00e9"+
+ "\7g\2\2\u00e9%\3\2\2\2\u00ea\u00eb\7d\2\2\u00eb\u00ec\7t\2\2\u00ec\u00ed"+
+ "\7g\2\2\u00ed\u00ee\7c\2\2\u00ee\u00ef\7m\2\2\u00ef\'\3\2\2\2\u00f0\u00f1"+
+ "\7t\2\2\u00f1\u00f2\7g\2\2\u00f2\u00f3\7v\2\2\u00f3\u00f4\7w\2\2\u00f4"+
+ "\u00f5\7t\2\2\u00f5\u00f6\7p\2\2\u00f6)\3\2\2\2\u00f7\u00f8\7p\2\2\u00f8"+
+ "\u00f9\7g\2\2\u00f9\u00fa\7y\2\2\u00fa+\3\2\2\2\u00fb\u00fc\7v\2\2\u00fc"+
+ "\u00fd\7t\2\2\u00fd\u00fe\7{\2\2\u00fe-\3\2\2\2\u00ff\u0100\7e\2\2\u0100"+
+ "\u0101\7c\2\2\u0101\u0102\7v\2\2\u0102\u0103\7e\2\2\u0103\u0104\7j\2\2"+
+ "\u0104/\3\2\2\2\u0105\u0106\7v\2\2\u0106\u0107\7j\2\2\u0107\u0108\7t\2"+
+ "\2\u0108\u0109\7q\2\2\u0109\u010a\7y\2\2\u010a\61\3\2\2\2\u010b\u010c"+
+ "\7#\2\2\u010c\63\3\2\2\2\u010d\u010e\7\u0080\2\2\u010e\65\3\2\2\2\u010f"+
+ "\u0110\7,\2\2\u0110\67\3\2\2\2\u0111\u0112\7\61\2\2\u01129\3\2\2\2\u0113"+
+ "\u0114\7\'\2\2\u0114;\3\2\2\2\u0115\u0116\7-\2\2\u0116=\3\2\2\2\u0117"+
+ "\u0118\7/\2\2\u0118?\3\2\2\2\u0119\u011a\7>\2\2\u011a\u011b\7>\2\2\u011b"+
+ "A\3\2\2\2\u011c\u011d\7@\2\2\u011d\u011e\7@\2\2\u011eC\3\2\2\2\u011f\u0120"+
+ "\7@\2\2\u0120\u0121\7@\2\2\u0121\u0122\7@\2\2\u0122E\3\2\2\2\u0123\u0124"+
+ "\7>\2\2\u0124G\3\2\2\2\u0125\u0126\7>\2\2\u0126\u0127\7?\2\2\u0127I\3"+
+ "\2\2\2\u0128\u0129\7@\2\2\u0129K\3\2\2\2\u012a\u012b\7@\2\2\u012b\u012c"+
+ "\7?\2\2\u012cM\3\2\2\2\u012d\u012e\7?\2\2\u012e\u012f\7?\2\2\u012fO\3"+
+ "\2\2\2\u0130\u0131\7?\2\2\u0131\u0132\7?\2\2\u0132\u0133\7?\2\2\u0133"+
+ "Q\3\2\2\2\u0134\u0135\7#\2\2\u0135\u0136\7?\2\2\u0136S\3\2\2\2\u0137\u0138"+
+ "\7#\2\2\u0138\u0139\7?\2\2\u0139\u013a\7?\2\2\u013aU\3\2\2\2\u013b\u013c"+
+ "\7(\2\2\u013cW\3\2\2\2\u013d\u013e\7`\2\2\u013eY\3\2\2\2\u013f\u0140\7"+
+ "~\2\2\u0140[\3\2\2\2\u0141\u0142\7(\2\2\u0142\u0143\7(\2\2\u0143]\3\2"+
+ "\2\2\u0144\u0145\7~\2\2\u0145\u0146\7~\2\2\u0146_\3\2\2\2\u0147\u0148"+
+ "\7A\2\2\u0148a\3\2\2\2\u0149\u014a\7<\2\2\u014ac\3\2\2\2\u014b\u014c\7"+
+ "-\2\2\u014c\u014d\7-\2\2\u014de\3\2\2\2\u014e\u014f\7/\2\2\u014f\u0150"+
+ "\7/\2\2\u0150g\3\2\2\2\u0151\u0152\7?\2\2\u0152i\3\2\2\2\u0153\u0154\7"+
+ "-\2\2\u0154\u0155\7?\2\2\u0155k\3\2\2\2\u0156\u0157\7/\2\2\u0157\u0158"+
+ "\7?\2\2\u0158m\3\2\2\2\u0159\u015a\7,\2\2\u015a\u015b\7?\2\2\u015bo\3"+
+ "\2\2\2\u015c\u015d\7\61\2\2\u015d\u015e\7?\2\2\u015eq\3\2\2\2\u015f\u0160"+
+ "\7\'\2\2\u0160\u0161\7?\2\2\u0161s\3\2\2\2\u0162\u0163\7(\2\2\u0163\u0164"+
+ "\7?\2\2\u0164u\3\2\2\2\u0165\u0166\7`\2\2\u0166\u0167\7?\2\2\u0167w\3"+
+ "\2\2\2\u0168\u0169\7~\2\2\u0169\u016a\7?\2\2\u016ay\3\2\2\2\u016b\u016c"+
+ "\7>\2\2\u016c\u016d\7>\2\2\u016d\u016e\7?\2\2\u016e{\3\2\2\2\u016f\u0170"+
+ "\7@\2\2\u0170\u0171\7@\2\2\u0171\u0172\7?\2\2\u0172}\3\2\2\2\u0173\u0174"+
+ "\7@\2\2\u0174\u0175\7@\2\2\u0175\u0176\7@\2\2\u0176\u0177\7?\2\2\u0177"+
+ "\177\3\2\2\2\u0178\u017a\7\62\2\2\u0179\u017b\t\4\2\2\u017a\u0179\3\2"+
+ "\2\2\u017b\u017c\3\2\2\2\u017c\u017a\3\2\2\2\u017c\u017d\3\2\2\2\u017d"+
+ "\u017f\3\2\2\2\u017e\u0180\t\5\2\2\u017f\u017e\3\2\2\2\u017f\u0180\3\2"+
+ "\2\2\u0180\u0081\3\2\2\2\u0181\u0182\7\62\2\2\u0182\u0184\t\6\2\2\u0183"+
+ "\u0185\t\7\2\2\u0184\u0183\3\2\2\2\u0185\u0186\3\2\2\2\u0186\u0184\3\2"+
+ "\2\2\u0186\u0187\3\2\2\2\u0187\u0189\3\2\2\2\u0188\u018a\t\5\2\2\u0189"+
+ "\u0188\3\2\2\2\u0189\u018a\3\2\2\2\u018a\u0083\3\2\2\2\u018b\u0194\7\62"+
+ "\2\2\u018c\u0190\t\b\2\2\u018d\u018f\t\t\2\2\u018e\u018d\3\2\2\2\u018f"+
+ "\u0192\3\2\2\2\u0190\u018e\3\2\2\2\u0190\u0191\3\2\2\2\u0191\u0194\3\2"+
+ "\2\2\u0192\u0190\3\2\2\2\u0193\u018b\3\2\2\2\u0193\u018c\3\2\2\2\u0194"+
+ "\u0196\3\2\2\2\u0195\u0197\t\n\2\2\u0196\u0195\3\2\2\2\u0196\u0197\3\2"+
+ "\2\2\u0197\u0085\3\2\2\2\u0198\u01a1\7\62\2\2\u0199\u019d\t\b\2\2\u019a"+
+ "\u019c\t\t\2\2\u019b\u019a\3\2\2\2\u019c\u019f\3\2\2\2\u019d\u019b\3\2"+
+ "\2\2\u019d\u019e\3\2\2\2\u019e\u01a1\3\2\2\2\u019f\u019d\3\2\2\2\u01a0"+
+ "\u0198\3\2\2\2\u01a0\u0199\3\2\2\2\u01a1\u01a2\3\2\2\2\u01a2\u01a6\5\24"+
+ "\n\2\u01a3\u01a5\t\t\2\2\u01a4\u01a3\3\2\2\2\u01a5\u01a8\3\2\2\2\u01a6"+
+ "\u01a4\3\2\2\2\u01a6\u01a7\3\2\2\2\u01a7\u01b2\3\2\2\2\u01a8\u01a6\3\2"+
+ "\2\2\u01a9\u01ab\t\13\2\2\u01aa\u01ac\t\f\2\2\u01ab\u01aa\3\2\2\2\u01ab"+
+ "\u01ac\3\2\2\2\u01ac\u01ae\3\2\2\2\u01ad\u01af\t\t\2\2\u01ae\u01ad\3\2"+
+ "\2\2\u01af\u01b0\3\2\2\2\u01b0\u01ae\3\2\2\2\u01b0\u01b1\3\2\2\2\u01b1"+
+ "\u01b3\3\2\2\2\u01b2\u01a9\3\2\2\2\u01b2\u01b3\3\2\2\2\u01b3\u01b5\3\2"+
+ "\2\2\u01b4\u01b6\t\r\2\2\u01b5\u01b4\3\2\2\2\u01b5\u01b6\3\2\2\2\u01b6"+
+ "\u0087\3\2\2\2\u01b7\u01bf\7$\2\2\u01b8\u01b9\7^\2\2\u01b9\u01be\7$\2"+
+ "\2\u01ba\u01bb\7^\2\2\u01bb\u01be\7^\2\2\u01bc\u01be\n\16\2\2\u01bd\u01b8"+
+ "\3\2\2\2\u01bd\u01ba\3\2\2\2\u01bd\u01bc\3\2\2\2\u01be\u01c1\3\2\2\2\u01bf"+
+ "\u01c0\3\2\2\2\u01bf\u01bd\3\2\2\2\u01c0\u01c2\3\2\2\2\u01c1\u01bf\3\2"+
+ "\2\2\u01c2\u01c3\7$\2\2\u01c3\u0089\3\2\2\2\u01c4\u01c5\7)\2\2\u01c5\u01c6"+
+ "\13\2\2\2\u01c6\u01c7\7)\2\2\u01c7\u008b\3\2\2\2\u01c8\u01c9\7v\2\2\u01c9"+
+ "\u01ca\7t\2\2\u01ca\u01cb\7w\2\2\u01cb\u01cc\7g\2\2\u01cc\u008d\3\2\2"+
+ "\2\u01cd\u01ce\7h\2\2\u01ce\u01cf\7c\2\2\u01cf\u01d0\7n\2\2\u01d0\u01d1"+
+ "\7u\2\2\u01d1\u01d2\7g\2\2\u01d2\u008f\3\2\2\2\u01d3\u01d4\7p\2\2\u01d4"+
+ "\u01d5\7w\2\2\u01d5\u01d6\7n\2\2\u01d6\u01d7\7n\2\2\u01d7\u0091\3\2\2"+
+ "\2\u01d8\u01dc\t\17\2\2\u01d9\u01db\t\20\2\2\u01da\u01d9\3\2\2\2\u01db"+
+ "\u01de\3\2\2\2\u01dc\u01da\3\2\2\2\u01dc\u01dd\3\2\2\2\u01dd\u0093\3\2"+
+ "\2\2\u01de\u01dc\3\2\2\2\u01df\u01e8\7\62\2\2\u01e0\u01e4\t\b\2\2\u01e1"+
+ "\u01e3\t\t\2\2\u01e2\u01e1\3\2\2\2\u01e3\u01e6\3\2\2\2\u01e4\u01e2\3\2"+
+ "\2\2\u01e4\u01e5\3\2\2\2\u01e5\u01e8\3\2\2\2\u01e6\u01e4\3\2\2\2\u01e7"+
+ "\u01df\3\2\2\2\u01e7\u01e0\3\2\2\2\u01e8\u01e9\3\2\2\2\u01e9\u01ea\bJ"+
+ "\4\2\u01ea\u0095\3\2\2\2\u01eb\u01ef\t\17\2\2\u01ec\u01ee\t\20\2\2\u01ed"+
+ "\u01ec\3\2\2\2\u01ee\u01f1\3\2\2\2\u01ef\u01ed\3\2\2\2\u01ef\u01f0\3\2"+
+ "\2\2\u01f0\u01f2\3\2\2\2\u01f1\u01ef\3\2\2\2\u01f2\u01f3\bK\4\2\u01f3"+
+ "\u0097\3\2\2\2\34\2\3\u009b\u00a5\u00af\u00b4\u017c\u017f\u0186\u0189"+
+ "\u0190\u0193\u0196\u019d\u01a0\u01a6\u01ab\u01b0\u01b2\u01b5\u01bd\u01bf"+
+ "\u01dc\u01e4\u01e7\u01ef\5\b\2\2\4\3\2\4\2\2";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParser.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParser.java
index 53c6eb38446..c4499fca638 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParser.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParser.java
@@ -1,25 +1,13 @@
// ANTLR GENERATED CODE: DO NOT EDIT
package org.elasticsearch.painless;
-
-import org.antlr.v4.runtime.FailedPredicateException;
-import org.antlr.v4.runtime.NoViableAltException;
-import org.antlr.v4.runtime.Parser;
-import org.antlr.v4.runtime.ParserRuleContext;
-import org.antlr.v4.runtime.RecognitionException;
-import org.antlr.v4.runtime.RuleContext;
-import org.antlr.v4.runtime.RuntimeMetaData;
-import org.antlr.v4.runtime.TokenStream;
-import org.antlr.v4.runtime.Vocabulary;
-import org.antlr.v4.runtime.VocabularyImpl;
-import org.antlr.v4.runtime.atn.ATN;
-import org.antlr.v4.runtime.atn.ATNDeserializer;
-import org.antlr.v4.runtime.atn.ParserATNSimulator;
-import org.antlr.v4.runtime.atn.PredictionContextCache;
+import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
-import org.antlr.v4.runtime.tree.ParseTreeVisitor;
-import org.antlr.v4.runtime.tree.TerminalNode;
-
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.misc.*;
+import org.antlr.v4.runtime.tree.*;
import java.util.List;
+import java.util.Iterator;
+import java.util.ArrayList;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"})
class PainlessParser extends Parser {
@@ -29,49 +17,51 @@ class PainlessParser extends Parser {
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
- WS=1, COMMENT=2, LBRACK=3, RBRACK=4, LBRACE=5, RBRACE=6, LP=7, RP=8, DOT=9,
- COMMA=10, SEMICOLON=11, IF=12, ELSE=13, WHILE=14, DO=15, FOR=16, CONTINUE=17,
- BREAK=18, RETURN=19, NEW=20, TRY=21, CATCH=22, THROW=23, BOOLNOT=24, BWNOT=25,
- MUL=26, DIV=27, REM=28, ADD=29, SUB=30, LSH=31, RSH=32, USH=33, LT=34,
- LTE=35, GT=36, GTE=37, EQ=38, EQR=39, NE=40, NER=41, BWAND=42, BWXOR=43,
- BWOR=44, BOOLAND=45, BOOLOR=46, COND=47, COLON=48, INCR=49, DECR=50, ASSIGN=51,
- AADD=52, ASUB=53, AMUL=54, ADIV=55, AREM=56, AAND=57, AXOR=58, AOR=59,
- ALSH=60, ARSH=61, AUSH=62, OCTAL=63, HEX=64, INTEGER=65, DECIMAL=66, STRING=67,
- CHAR=68, TRUE=69, FALSE=70, NULL=71, TYPE=72, ID=73, EXTINTEGER=74, EXTID=75;
+ WS=1, COMMENT=2, LBRACK=3, RBRACK=4, LBRACE=5, RBRACE=6, LP=7, RP=8, DOT=9,
+ COMMA=10, SEMICOLON=11, IF=12, ELSE=13, WHILE=14, DO=15, FOR=16, CONTINUE=17,
+ BREAK=18, RETURN=19, NEW=20, TRY=21, CATCH=22, THROW=23, BOOLNOT=24, BWNOT=25,
+ MUL=26, DIV=27, REM=28, ADD=29, SUB=30, LSH=31, RSH=32, USH=33, LT=34,
+ LTE=35, GT=36, GTE=37, EQ=38, EQR=39, NE=40, NER=41, BWAND=42, BWXOR=43,
+ BWOR=44, BOOLAND=45, BOOLOR=46, COND=47, COLON=48, INCR=49, DECR=50, ASSIGN=51,
+ AADD=52, ASUB=53, AMUL=54, ADIV=55, AREM=56, AAND=57, AXOR=58, AOR=59,
+ ALSH=60, ARSH=61, AUSH=62, OCTAL=63, HEX=64, INTEGER=65, DECIMAL=66, STRING=67,
+ CHAR=68, TRUE=69, FALSE=70, NULL=71, ID=72, EXTINTEGER=73, EXTID=74;
public static final int
- RULE_source = 0, RULE_statement = 1, RULE_block = 2, RULE_empty = 3, RULE_emptyscope = 4,
- RULE_initializer = 5, RULE_afterthought = 6, RULE_declaration = 7, RULE_decltype = 8,
- RULE_declvar = 9, RULE_trap = 10, RULE_expression = 11, RULE_extstart = 12,
- RULE_extprec = 13, RULE_extcast = 14, RULE_extbrace = 15, RULE_extdot = 16,
- RULE_exttype = 17, RULE_extcall = 18, RULE_extvar = 19, RULE_extfield = 20,
- RULE_extnew = 21, RULE_extstring = 22, RULE_arguments = 23, RULE_increment = 24;
+ RULE_source = 0, RULE_statement = 1, RULE_block = 2, RULE_empty = 3, RULE_emptyscope = 4,
+ RULE_initializer = 5, RULE_afterthought = 6, RULE_declaration = 7, RULE_decltype = 8,
+ RULE_declvar = 9, RULE_trap = 10, RULE_identifier = 11, RULE_generic = 12,
+ RULE_expression = 13, RULE_extstart = 14, RULE_extprec = 15, RULE_extcast = 16,
+ RULE_extbrace = 17, RULE_extdot = 18, RULE_extcall = 19, RULE_extvar = 20,
+ RULE_extfield = 21, RULE_extnew = 22, RULE_extstring = 23, RULE_arguments = 24,
+ RULE_increment = 25;
public static final String[] ruleNames = {
- "source", "statement", "block", "empty", "emptyscope", "initializer",
- "afterthought", "declaration", "decltype", "declvar", "trap", "expression",
- "extstart", "extprec", "extcast", "extbrace", "extdot", "exttype", "extcall",
- "extvar", "extfield", "extnew", "extstring", "arguments", "increment"
+ "source", "statement", "block", "empty", "emptyscope", "initializer",
+ "afterthought", "declaration", "decltype", "declvar", "trap", "identifier",
+ "generic", "expression", "extstart", "extprec", "extcast", "extbrace",
+ "extdot", "extcall", "extvar", "extfield", "extnew", "extstring", "arguments",
+ "increment"
};
private static final String[] _LITERAL_NAMES = {
- null, null, null, "'{'", "'}'", "'['", "']'", "'('", "')'", "'.'", "','",
- "';'", "'if'", "'else'", "'while'", "'do'", "'for'", "'continue'", "'break'",
- "'return'", "'new'", "'try'", "'catch'", "'throw'", "'!'", "'~'", "'*'",
- "'/'", "'%'", "'+'", "'-'", "'<<'", "'>>'", "'>>>'", "'<'", "'<='", "'>'",
- "'>='", "'=='", "'==='", "'!='", "'!=='", "'&'", "'^'", "'|'", "'&&'",
- "'||'", "'?'", "':'", "'++'", "'--'", "'='", "'+='", "'-='", "'*='", "'/='",
- "'%='", "'&='", "'^='", "'|='", "'<<='", "'>>='", "'>>>='", null, null,
+ null, null, null, "'{'", "'}'", "'['", "']'", "'('", "')'", "'.'", "','",
+ "';'", "'if'", "'else'", "'while'", "'do'", "'for'", "'continue'", "'break'",
+ "'return'", "'new'", "'try'", "'catch'", "'throw'", "'!'", "'~'", "'*'",
+ "'/'", "'%'", "'+'", "'-'", "'<<'", "'>>'", "'>>>'", "'<'", "'<='", "'>'",
+ "'>='", "'=='", "'==='", "'!='", "'!=='", "'&'", "'^'", "'|'", "'&&'",
+ "'||'", "'?'", "':'", "'++'", "'--'", "'='", "'+='", "'-='", "'*='", "'/='",
+ "'%='", "'&='", "'^='", "'|='", "'<<='", "'>>='", "'>>>='", null, null,
null, null, null, null, "'true'", "'false'", "'null'"
};
private static final String[] _SYMBOLIC_NAMES = {
- null, "WS", "COMMENT", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "LP", "RP",
- "DOT", "COMMA", "SEMICOLON", "IF", "ELSE", "WHILE", "DO", "FOR", "CONTINUE",
- "BREAK", "RETURN", "NEW", "TRY", "CATCH", "THROW", "BOOLNOT", "BWNOT",
- "MUL", "DIV", "REM", "ADD", "SUB", "LSH", "RSH", "USH", "LT", "LTE", "GT",
- "GTE", "EQ", "EQR", "NE", "NER", "BWAND", "BWXOR", "BWOR", "BOOLAND",
- "BOOLOR", "COND", "COLON", "INCR", "DECR", "ASSIGN", "AADD", "ASUB", "AMUL",
- "ADIV", "AREM", "AAND", "AXOR", "AOR", "ALSH", "ARSH", "AUSH", "OCTAL",
- "HEX", "INTEGER", "DECIMAL", "STRING", "CHAR", "TRUE", "FALSE", "NULL",
- "TYPE", "ID", "EXTINTEGER", "EXTID"
+ null, "WS", "COMMENT", "LBRACK", "RBRACK", "LBRACE", "RBRACE", "LP", "RP",
+ "DOT", "COMMA", "SEMICOLON", "IF", "ELSE", "WHILE", "DO", "FOR", "CONTINUE",
+ "BREAK", "RETURN", "NEW", "TRY", "CATCH", "THROW", "BOOLNOT", "BWNOT",
+ "MUL", "DIV", "REM", "ADD", "SUB", "LSH", "RSH", "USH", "LT", "LTE", "GT",
+ "GTE", "EQ", "EQR", "NE", "NER", "BWAND", "BWXOR", "BWOR", "BOOLAND",
+ "BOOLOR", "COND", "COLON", "INCR", "DECR", "ASSIGN", "AADD", "ASUB", "AMUL",
+ "ADIV", "AREM", "AAND", "AXOR", "AOR", "ALSH", "ARSH", "AUSH", "OCTAL",
+ "HEX", "INTEGER", "DECIMAL", "STRING", "CHAR", "TRUE", "FALSE", "NULL",
+ "ID", "EXTINTEGER", "EXTID"
};
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
@@ -148,21 +138,21 @@ class PainlessParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(51);
+ setState(53);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
- setState(50);
+ setState(52);
statement();
}
}
- setState(53);
+ setState(55);
_errHandler.sync(this);
_la = _input.LA(1);
- } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << IF) | (1L << WHILE) | (1L << DO) | (1L << FOR) | (1L << CONTINUE) | (1L << BREAK) | (1L << RETURN) | (1L << NEW) | (1L << TRY) | (1L << THROW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (TYPE - 64)) | (1L << (ID - 64)))) != 0) );
- setState(55);
+ } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << IF) | (1L << WHILE) | (1L << DO) | (1L << FOR) | (1L << CONTINUE) | (1L << BREAK) | (1L << RETURN) | (1L << NEW) | (1L << TRY) | (1L << THROW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0) );
+ setState(57);
match(EOF);
}
}
@@ -182,7 +172,7 @@ class PainlessParser extends Parser {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_statement; }
-
+
public StatementContext() { }
public void copyFrom(StatementContext ctx) {
super.copyFrom(ctx);
@@ -373,29 +363,29 @@ class PainlessParser extends Parser {
int _la;
try {
int _alt;
- setState(134);
+ setState(136);
switch ( getInterpreter().adaptivePredict(_input,15,_ctx) ) {
case 1:
_localctx = new IfContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(57);
- match(IF);
- setState(58);
- match(LP);
setState(59);
- expression(0);
+ match(IF);
setState(60);
- match(RP);
+ match(LP);
setState(61);
+ expression(0);
+ setState(62);
+ match(RP);
+ setState(63);
block();
- setState(64);
+ setState(66);
switch ( getInterpreter().adaptivePredict(_input,1,_ctx) ) {
case 1:
{
- setState(62);
+ setState(64);
match(ELSE);
- setState(63);
+ setState(65);
block();
}
break;
@@ -406,25 +396,25 @@ class PainlessParser extends Parser {
_localctx = new WhileContext(_localctx);
enterOuterAlt(_localctx, 2);
{
- setState(66);
- match(WHILE);
- setState(67);
- match(LP);
setState(68);
- expression(0);
+ match(WHILE);
setState(69);
+ match(LP);
+ setState(70);
+ expression(0);
+ setState(71);
match(RP);
- setState(72);
+ setState(74);
switch ( getInterpreter().adaptivePredict(_input,2,_ctx) ) {
case 1:
{
- setState(70);
+ setState(72);
block();
}
break;
case 2:
{
- setState(71);
+ setState(73);
empty();
}
break;
@@ -435,23 +425,23 @@ class PainlessParser extends Parser {
_localctx = new DoContext(_localctx);
enterOuterAlt(_localctx, 3);
{
- setState(74);
- match(DO);
- setState(75);
- block();
setState(76);
- match(WHILE);
+ match(DO);
setState(77);
- match(LP);
+ block();
setState(78);
- expression(0);
+ match(WHILE);
setState(79);
- match(RP);
+ match(LP);
+ setState(80);
+ expression(0);
setState(81);
+ match(RP);
+ setState(83);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
- setState(80);
+ setState(82);
match(SEMICOLON);
}
}
@@ -462,54 +452,54 @@ class PainlessParser extends Parser {
_localctx = new ForContext(_localctx);
enterOuterAlt(_localctx, 4);
{
- setState(83);
+ setState(85);
match(FOR);
- setState(84);
- match(LP);
setState(86);
+ match(LP);
+ setState(88);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (TYPE - 64)) | (1L << (ID - 64)))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0)) {
{
- setState(85);
+ setState(87);
initializer();
}
}
- setState(88);
- match(SEMICOLON);
setState(90);
+ match(SEMICOLON);
+ setState(92);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (TYPE - 64)) | (1L << (ID - 64)))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0)) {
{
- setState(89);
+ setState(91);
expression(0);
}
}
- setState(92);
- match(SEMICOLON);
setState(94);
+ match(SEMICOLON);
+ setState(96);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (TYPE - 64)) | (1L << (ID - 64)))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0)) {
{
- setState(93);
+ setState(95);
afterthought();
}
}
- setState(96);
+ setState(98);
match(RP);
- setState(99);
+ setState(101);
switch ( getInterpreter().adaptivePredict(_input,7,_ctx) ) {
case 1:
{
- setState(97);
+ setState(99);
block();
}
break;
case 2:
{
- setState(98);
+ setState(100);
empty();
}
break;
@@ -520,13 +510,13 @@ class PainlessParser extends Parser {
_localctx = new DeclContext(_localctx);
enterOuterAlt(_localctx, 5);
{
- setState(101);
- declaration();
setState(103);
+ declaration();
+ setState(105);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
- setState(102);
+ setState(104);
match(SEMICOLON);
}
}
@@ -537,13 +527,13 @@ class PainlessParser extends Parser {
_localctx = new ContinueContext(_localctx);
enterOuterAlt(_localctx, 6);
{
- setState(105);
- match(CONTINUE);
setState(107);
+ match(CONTINUE);
+ setState(109);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
- setState(106);
+ setState(108);
match(SEMICOLON);
}
}
@@ -554,13 +544,13 @@ class PainlessParser extends Parser {
_localctx = new BreakContext(_localctx);
enterOuterAlt(_localctx, 7);
{
- setState(109);
- match(BREAK);
setState(111);
+ match(BREAK);
+ setState(113);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
- setState(110);
+ setState(112);
match(SEMICOLON);
}
}
@@ -571,15 +561,15 @@ class PainlessParser extends Parser {
_localctx = new ReturnContext(_localctx);
enterOuterAlt(_localctx, 8);
{
- setState(113);
+ setState(115);
match(RETURN);
- setState(114);
- expression(0);
setState(116);
+ expression(0);
+ setState(118);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
- setState(115);
+ setState(117);
match(SEMICOLON);
}
}
@@ -590,11 +580,11 @@ class PainlessParser extends Parser {
_localctx = new TryContext(_localctx);
enterOuterAlt(_localctx, 9);
{
- setState(118);
+ setState(120);
match(TRY);
- setState(119);
- block();
setState(121);
+ block();
+ setState(123);
_errHandler.sync(this);
_alt = 1;
do {
@@ -602,7 +592,7 @@ class PainlessParser extends Parser {
case 1:
{
{
- setState(120);
+ setState(122);
trap();
}
}
@@ -610,7 +600,7 @@ class PainlessParser extends Parser {
default:
throw new NoViableAltException(this);
}
- setState(123);
+ setState(125);
_errHandler.sync(this);
_alt = getInterpreter().adaptivePredict(_input,12,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
@@ -620,15 +610,15 @@ class PainlessParser extends Parser {
_localctx = new ThrowContext(_localctx);
enterOuterAlt(_localctx, 10);
{
- setState(125);
+ setState(127);
match(THROW);
- setState(126);
- expression(0);
setState(128);
+ expression(0);
+ setState(130);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
- setState(127);
+ setState(129);
match(SEMICOLON);
}
}
@@ -639,13 +629,13 @@ class PainlessParser extends Parser {
_localctx = new ExprContext(_localctx);
enterOuterAlt(_localctx, 11);
{
- setState(130);
- expression(0);
setState(132);
+ expression(0);
+ setState(134);
_la = _input.LA(1);
if (_la==SEMICOLON) {
{
- setState(131);
+ setState(133);
match(SEMICOLON);
}
}
@@ -670,7 +660,7 @@ class PainlessParser extends Parser {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_block; }
-
+
public BlockContext() { }
public void copyFrom(BlockContext ctx) {
super.copyFrom(ctx);
@@ -709,29 +699,29 @@ class PainlessParser extends Parser {
enterRule(_localctx, 4, RULE_block);
int _la;
try {
- setState(145);
+ setState(147);
switch (_input.LA(1)) {
case LBRACK:
_localctx = new MultipleContext(_localctx);
enterOuterAlt(_localctx, 1);
{
- setState(136);
- match(LBRACK);
setState(138);
+ match(LBRACK);
+ setState(140);
_errHandler.sync(this);
_la = _input.LA(1);
do {
{
{
- setState(137);
+ setState(139);
statement();
}
}
- setState(140);
+ setState(142);
_errHandler.sync(this);
_la = _input.LA(1);
- } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << IF) | (1L << WHILE) | (1L << DO) | (1L << FOR) | (1L << CONTINUE) | (1L << BREAK) | (1L << RETURN) | (1L << NEW) | (1L << TRY) | (1L << THROW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (TYPE - 64)) | (1L << (ID - 64)))) != 0) );
- setState(142);
+ } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << IF) | (1L << WHILE) | (1L << DO) | (1L << FOR) | (1L << CONTINUE) | (1L << BREAK) | (1L << RETURN) | (1L << NEW) | (1L << TRY) | (1L << THROW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0) );
+ setState(144);
match(RBRACK);
}
break;
@@ -761,12 +751,11 @@ class PainlessParser extends Parser {
case TRUE:
case FALSE:
case NULL:
- case TYPE:
case ID:
_localctx = new SingleContext(_localctx);
enterOuterAlt(_localctx, 2);
{
- setState(144);
+ setState(146);
statement();
}
break;
@@ -805,19 +794,19 @@ class PainlessParser extends Parser {
EmptyContext _localctx = new EmptyContext(_ctx, getState());
enterRule(_localctx, 6, RULE_empty);
try {
- setState(149);
+ setState(151);
switch (_input.LA(1)) {
case LBRACK:
enterOuterAlt(_localctx, 1);
{
- setState(147);
+ setState(149);
emptyscope();
}
break;
case SEMICOLON:
enterOuterAlt(_localctx, 2);
{
- setState(148);
+ setState(150);
match(SEMICOLON);
}
break;
@@ -856,9 +845,9 @@ class PainlessParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(151);
+ setState(153);
match(LBRACK);
- setState(152);
+ setState(154);
match(RBRACK);
}
}
@@ -895,19 +884,19 @@ class PainlessParser extends Parser {
InitializerContext _localctx = new InitializerContext(_ctx, getState());
enterRule(_localctx, 10, RULE_initializer);
try {
- setState(156);
+ setState(158);
switch ( getInterpreter().adaptivePredict(_input,19,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(154);
+ setState(156);
declaration();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(155);
+ setState(157);
expression(0);
}
break;
@@ -945,7 +934,7 @@ class PainlessParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(158);
+ setState(160);
expression(0);
}
}
@@ -992,23 +981,23 @@ class PainlessParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(160);
+ setState(162);
decltype();
- setState(161);
+ setState(163);
declvar();
- setState(166);
+ setState(168);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
- setState(162);
+ setState(164);
match(COMMA);
- setState(163);
+ setState(165);
declvar();
}
}
- setState(168);
+ setState(170);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -1026,7 +1015,9 @@ class PainlessParser extends Parser {
}
public static class DecltypeContext extends ParserRuleContext {
- public TerminalNode TYPE() { return getToken(PainlessParser.TYPE, 0); }
+ public IdentifierContext identifier() {
+ return getRuleContext(IdentifierContext.class,0);
+ }
public List LBRACE() { return getTokens(PainlessParser.LBRACE); }
public TerminalNode LBRACE(int i) {
return getToken(PainlessParser.LBRACE, i);
@@ -1053,21 +1044,21 @@ class PainlessParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(169);
- match(TYPE);
- setState(174);
+ setState(171);
+ identifier();
+ setState(176);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==LBRACE) {
{
{
- setState(170);
+ setState(172);
match(LBRACE);
- setState(171);
+ setState(173);
match(RBRACE);
}
}
- setState(176);
+ setState(178);
_errHandler.sync(this);
_la = _input.LA(1);
}
@@ -1085,7 +1076,9 @@ class PainlessParser extends Parser {
}
public static class DeclvarContext extends ParserRuleContext {
- public TerminalNode ID() { return getToken(PainlessParser.ID, 0); }
+ public IdentifierContext identifier() {
+ return getRuleContext(IdentifierContext.class,0);
+ }
public TerminalNode ASSIGN() { return getToken(PainlessParser.ASSIGN, 0); }
public ExpressionContext expression() {
return getRuleContext(ExpressionContext.class,0);
@@ -1108,15 +1101,15 @@ class PainlessParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(177);
- match(ID);
- setState(180);
+ setState(179);
+ identifier();
+ setState(182);
_la = _input.LA(1);
if (_la==ASSIGN) {
{
- setState(178);
+ setState(180);
match(ASSIGN);
- setState(179);
+ setState(181);
expression(0);
}
}
@@ -1138,8 +1131,12 @@ class PainlessParser extends Parser {
public TerminalNode CATCH() { return getToken(PainlessParser.CATCH, 0); }
public TerminalNode LP() { return getToken(PainlessParser.LP, 0); }
public TerminalNode RP() { return getToken(PainlessParser.RP, 0); }
- public TerminalNode TYPE() { return getToken(PainlessParser.TYPE, 0); }
- public TerminalNode ID() { return getToken(PainlessParser.ID, 0); }
+ public List identifier() {
+ return getRuleContexts(IdentifierContext.class);
+ }
+ public IdentifierContext identifier(int i) {
+ return getRuleContext(IdentifierContext.class,i);
+ }
public BlockContext block() {
return getRuleContext(BlockContext.class,0);
}
@@ -1163,29 +1160,29 @@ class PainlessParser extends Parser {
try {
enterOuterAlt(_localctx, 1);
{
- setState(182);
+ setState(184);
match(CATCH);
- setState(183);
+ setState(185);
match(LP);
{
- setState(184);
- match(TYPE);
- setState(185);
- match(ID);
- }
+ setState(186);
+ identifier();
setState(187);
+ identifier();
+ }
+ setState(189);
match(RP);
- setState(190);
+ setState(192);
switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) {
case 1:
{
- setState(188);
+ setState(190);
block();
}
break;
case 2:
{
- setState(189);
+ setState(191);
emptyscope();
}
break;
@@ -1203,12 +1200,124 @@ class PainlessParser extends Parser {
return _localctx;
}
+ public static class IdentifierContext extends ParserRuleContext {
+ public TerminalNode ID() { return getToken(PainlessParser.ID, 0); }
+ public GenericContext generic() {
+ return getRuleContext(GenericContext.class,0);
+ }
+ public IdentifierContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_identifier; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof PainlessParserVisitor ) return ((PainlessParserVisitor extends T>)visitor).visitIdentifier(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final IdentifierContext identifier() throws RecognitionException {
+ IdentifierContext _localctx = new IdentifierContext(_ctx, getState());
+ enterRule(_localctx, 22, RULE_identifier);
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(194);
+ match(ID);
+ setState(196);
+ switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
+ case 1:
+ {
+ setState(195);
+ generic();
+ }
+ break;
+ }
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
+ public static class GenericContext extends ParserRuleContext {
+ public TerminalNode LT() { return getToken(PainlessParser.LT, 0); }
+ public List identifier() {
+ return getRuleContexts(IdentifierContext.class);
+ }
+ public IdentifierContext identifier(int i) {
+ return getRuleContext(IdentifierContext.class,i);
+ }
+ public TerminalNode GT() { return getToken(PainlessParser.GT, 0); }
+ public List COMMA() { return getTokens(PainlessParser.COMMA); }
+ public TerminalNode COMMA(int i) {
+ return getToken(PainlessParser.COMMA, i);
+ }
+ public GenericContext(ParserRuleContext parent, int invokingState) {
+ super(parent, invokingState);
+ }
+ @Override public int getRuleIndex() { return RULE_generic; }
+ @Override
+ public T accept(ParseTreeVisitor extends T> visitor) {
+ if ( visitor instanceof PainlessParserVisitor ) return ((PainlessParserVisitor extends T>)visitor).visitGeneric(this);
+ else return visitor.visitChildren(this);
+ }
+ }
+
+ public final GenericContext generic() throws RecognitionException {
+ GenericContext _localctx = new GenericContext(_ctx, getState());
+ enterRule(_localctx, 24, RULE_generic);
+ int _la;
+ try {
+ enterOuterAlt(_localctx, 1);
+ {
+ setState(198);
+ match(LT);
+ setState(199);
+ identifier();
+ setState(204);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ while (_la==COMMA) {
+ {
+ {
+ setState(200);
+ match(COMMA);
+ setState(201);
+ identifier();
+ }
+ }
+ setState(206);
+ _errHandler.sync(this);
+ _la = _input.LA(1);
+ }
+ setState(207);
+ match(GT);
+ }
+ }
+ catch (RecognitionException re) {
+ _localctx.exception = re;
+ _errHandler.reportError(this, re);
+ _errHandler.recover(this, re);
+ }
+ finally {
+ exitRule();
+ }
+ return _localctx;
+ }
+
public static class ExpressionContext extends ParserRuleContext {
public ExpressionContext(ParserRuleContext parent, int invokingState) {
super(parent, invokingState);
}
@Override public int getRuleIndex() { return RULE_expression; }
-
+
public ExpressionContext() { }
public void copyFrom(ExpressionContext ctx) {
super.copyFrom(ctx);
@@ -1460,29 +1569,29 @@ class PainlessParser extends Parser {
int _parentState = getState();
ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState);
ExpressionContext _prevctx = _localctx;
- int _startState = 22;
- enterRecursionRule(_localctx, 22, RULE_expression, _p);
+ int _startState = 26;
+ enterRecursionRule(_localctx, 26, RULE_expression, _p);
int _la;
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(220);
- switch ( getInterpreter().adaptivePredict(_input,24,_ctx) ) {
+ setState(237);
+ switch ( getInterpreter().adaptivePredict(_input,26,_ctx) ) {
case 1:
{
_localctx = new UnaryContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(193);
+ setState(210);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB))) != 0)) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(194);
+ setState(211);
expression(14);
}
break;
@@ -1491,13 +1600,13 @@ class PainlessParser extends Parser {
_localctx = new CastContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(195);
+ setState(212);
match(LP);
- setState(196);
+ setState(213);
decltype();
- setState(197);
+ setState(214);
match(RP);
- setState(198);
+ setState(215);
expression(13);
}
break;
@@ -1506,16 +1615,16 @@ class PainlessParser extends Parser {
_localctx = new AssignmentContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(200);
+ setState(217);
extstart();
- setState(201);
+ setState(218);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ASSIGN) | (1L << AADD) | (1L << ASUB) | (1L << AMUL) | (1L << ADIV) | (1L << AREM) | (1L << AAND) | (1L << AXOR) | (1L << AOR) | (1L << ALSH) | (1L << ARSH) | (1L << AUSH))) != 0)) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(202);
+ setState(219);
expression(1);
}
break;
@@ -1524,11 +1633,11 @@ class PainlessParser extends Parser {
_localctx = new PrecedenceContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(204);
+ setState(221);
match(LP);
- setState(205);
+ setState(222);
expression(0);
- setState(206);
+ setState(223);
match(RP);
}
break;
@@ -1537,7 +1646,7 @@ class PainlessParser extends Parser {
_localctx = new NumericContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(208);
+ setState(225);
_la = _input.LA(1);
if ( !(((((_la - 63)) & ~0x3f) == 0 && ((1L << (_la - 63)) & ((1L << (OCTAL - 63)) | (1L << (HEX - 63)) | (1L << (INTEGER - 63)) | (1L << (DECIMAL - 63)))) != 0)) ) {
_errHandler.recoverInline(this);
@@ -1551,7 +1660,7 @@ class PainlessParser extends Parser {
_localctx = new CharContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(209);
+ setState(226);
match(CHAR);
}
break;
@@ -1560,7 +1669,7 @@ class PainlessParser extends Parser {
_localctx = new TrueContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(210);
+ setState(227);
match(TRUE);
}
break;
@@ -1569,7 +1678,7 @@ class PainlessParser extends Parser {
_localctx = new FalseContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(211);
+ setState(228);
match(FALSE);
}
break;
@@ -1578,7 +1687,7 @@ class PainlessParser extends Parser {
_localctx = new NullContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(212);
+ setState(229);
match(NULL);
}
break;
@@ -1587,9 +1696,9 @@ class PainlessParser extends Parser {
_localctx = new PostincContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(213);
+ setState(230);
extstart();
- setState(214);
+ setState(231);
increment();
}
break;
@@ -1598,9 +1707,9 @@ class PainlessParser extends Parser {
_localctx = new PreincContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(216);
+ setState(233);
increment();
- setState(217);
+ setState(234);
extstart();
}
break;
@@ -1609,36 +1718,36 @@ class PainlessParser extends Parser {
_localctx = new ExternalContext(_localctx);
_ctx = _localctx;
_prevctx = _localctx;
- setState(219);
+ setState(236);
extstart();
}
break;
}
_ctx.stop = _input.LT(-1);
- setState(260);
+ setState(277);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,26,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,28,_ctx);
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
if ( _alt==1 ) {
if ( _parseListeners!=null ) triggerExitRuleEvent();
_prevctx = _localctx;
{
- setState(258);
- switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) {
+ setState(275);
+ switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) {
case 1:
{
_localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(222);
+ setState(239);
if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)");
- setState(223);
+ setState(240);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << MUL) | (1L << DIV) | (1L << REM))) != 0)) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(224);
+ setState(241);
expression(13);
}
break;
@@ -1646,16 +1755,16 @@ class PainlessParser extends Parser {
{
_localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(225);
+ setState(242);
if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)");
- setState(226);
+ setState(243);
_la = _input.LA(1);
if ( !(_la==ADD || _la==SUB) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(227);
+ setState(244);
expression(12);
}
break;
@@ -1663,16 +1772,16 @@ class PainlessParser extends Parser {
{
_localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(228);
+ setState(245);
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
- setState(229);
+ setState(246);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LSH) | (1L << RSH) | (1L << USH))) != 0)) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(230);
+ setState(247);
expression(11);
}
break;
@@ -1680,16 +1789,16 @@ class PainlessParser extends Parser {
{
_localctx = new CompContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(231);
+ setState(248);
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
- setState(232);
+ setState(249);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LT) | (1L << LTE) | (1L << GT) | (1L << GTE))) != 0)) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(233);
+ setState(250);
expression(10);
}
break;
@@ -1697,16 +1806,16 @@ class PainlessParser extends Parser {
{
_localctx = new CompContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(234);
+ setState(251);
if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)");
- setState(235);
+ setState(252);
_la = _input.LA(1);
if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << EQ) | (1L << EQR) | (1L << NE) | (1L << NER))) != 0)) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(236);
+ setState(253);
expression(9);
}
break;
@@ -1714,11 +1823,11 @@ class PainlessParser extends Parser {
{
_localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(237);
+ setState(254);
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
- setState(238);
+ setState(255);
match(BWAND);
- setState(239);
+ setState(256);
expression(8);
}
break;
@@ -1726,11 +1835,11 @@ class PainlessParser extends Parser {
{
_localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(240);
+ setState(257);
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
- setState(241);
+ setState(258);
match(BWXOR);
- setState(242);
+ setState(259);
expression(7);
}
break;
@@ -1738,11 +1847,11 @@ class PainlessParser extends Parser {
{
_localctx = new BinaryContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(243);
+ setState(260);
if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)");
- setState(244);
+ setState(261);
match(BWOR);
- setState(245);
+ setState(262);
expression(6);
}
break;
@@ -1750,11 +1859,11 @@ class PainlessParser extends Parser {
{
_localctx = new BoolContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(246);
+ setState(263);
if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)");
- setState(247);
+ setState(264);
match(BOOLAND);
- setState(248);
+ setState(265);
expression(5);
}
break;
@@ -1762,11 +1871,11 @@ class PainlessParser extends Parser {
{
_localctx = new BoolContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(249);
+ setState(266);
if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)");
- setState(250);
+ setState(267);
match(BOOLOR);
- setState(251);
+ setState(268);
expression(4);
}
break;
@@ -1774,24 +1883,24 @@ class PainlessParser extends Parser {
{
_localctx = new ConditionalContext(new ExpressionContext(_parentctx, _parentState));
pushNewRecursionContext(_localctx, _startState, RULE_expression);
- setState(252);
+ setState(269);
if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)");
- setState(253);
+ setState(270);
match(COND);
- setState(254);
+ setState(271);
expression(0);
- setState(255);
+ setState(272);
match(COLON);
- setState(256);
+ setState(273);
expression(2);
}
break;
}
- }
+ }
}
- setState(262);
+ setState(279);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,26,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,28,_ctx);
}
}
}
@@ -1813,9 +1922,6 @@ class PainlessParser extends Parser {
public ExtcastContext extcast() {
return getRuleContext(ExtcastContext.class,0);
}
- public ExttypeContext exttype() {
- return getRuleContext(ExttypeContext.class,0);
- }
public ExtvarContext extvar() {
return getRuleContext(ExtvarContext.class,0);
}
@@ -1838,49 +1944,42 @@ class PainlessParser extends Parser {
public final ExtstartContext extstart() throws RecognitionException {
ExtstartContext _localctx = new ExtstartContext(_ctx, getState());
- enterRule(_localctx, 24, RULE_extstart);
+ enterRule(_localctx, 28, RULE_extstart);
try {
- setState(269);
- switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) {
+ setState(285);
+ switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
case 1:
enterOuterAlt(_localctx, 1);
{
- setState(263);
+ setState(280);
extprec();
}
break;
case 2:
enterOuterAlt(_localctx, 2);
{
- setState(264);
+ setState(281);
extcast();
}
break;
case 3:
enterOuterAlt(_localctx, 3);
{
- setState(265);
- exttype();
+ setState(282);
+ extvar();
}
break;
case 4:
enterOuterAlt(_localctx, 4);
{
- setState(266);
- extvar();
+ setState(283);
+ extnew();
}
break;
case 5:
enterOuterAlt(_localctx, 5);
{
- setState(267);
- extnew();
- }
- break;
- case 6:
- enterOuterAlt(_localctx, 6);
- {
- setState(268);
+ setState(284);
extstring();
}
break;
@@ -1906,9 +2005,6 @@ class PainlessParser extends Parser {
public ExtcastContext extcast() {
return getRuleContext(ExtcastContext.class,0);
}
- public ExttypeContext exttype() {
- return getRuleContext(ExttypeContext.class,0);
- }
public ExtvarContext extvar() {
return getRuleContext(ExtvarContext.class,0);
}
@@ -1937,64 +2033,58 @@ class PainlessParser extends Parser {
public final ExtprecContext extprec() throws RecognitionException {
ExtprecContext _localctx = new ExtprecContext(_ctx, getState());
- enterRule(_localctx, 26, RULE_extprec);
+ enterRule(_localctx, 30, RULE_extprec);
try {
enterOuterAlt(_localctx, 1);
{
- setState(271);
+ setState(287);
match(LP);
- setState(278);
- switch ( getInterpreter().adaptivePredict(_input,28,_ctx) ) {
+ setState(293);
+ switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) {
case 1:
{
- setState(272);
+ setState(288);
extprec();
}
break;
case 2:
{
- setState(273);
+ setState(289);
extcast();
}
break;
case 3:
{
- setState(274);
- exttype();
+ setState(290);
+ extvar();
}
break;
case 4:
{
- setState(275);
- extvar();
+ setState(291);
+ extnew();
}
break;
case 5:
{
- setState(276);
- extnew();
- }
- break;
- case 6:
- {
- setState(277);
+ setState(292);
extstring();
}
break;
}
- setState(280);
+ setState(295);
match(RP);
- setState(283);
- switch ( getInterpreter().adaptivePredict(_input,29,_ctx) ) {
+ setState(298);
+ switch ( getInterpreter().adaptivePredict(_input,31,_ctx) ) {
case 1:
{
- setState(281);
+ setState(296);
extdot();
}
break;
case 2:
{
- setState(282);
+ setState(297);
extbrace();
}
break;
@@ -2024,9 +2114,6 @@ class PainlessParser extends Parser {
public ExtcastContext extcast() {
return getRuleContext(ExtcastContext.class,0);
}
- public ExttypeContext exttype() {
- return getRuleContext(ExttypeContext.class,0);
- }
public ExtvarContext extvar() {
return getRuleContext(ExtvarContext.class,0);
}
@@ -2049,51 +2136,45 @@ class PainlessParser extends Parser {
public final ExtcastContext extcast() throws RecognitionException {
ExtcastContext _localctx = new ExtcastContext(_ctx, getState());
- enterRule(_localctx, 28, RULE_extcast);
+ enterRule(_localctx, 32, RULE_extcast);
try {
enterOuterAlt(_localctx, 1);
{
- setState(285);
+ setState(300);
match(LP);
- setState(286);
+ setState(301);
decltype();
- setState(287);
+ setState(302);
match(RP);
- setState(294);
- switch ( getInterpreter().adaptivePredict(_input,30,_ctx) ) {
+ setState(308);
+ switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) {
case 1:
{
- setState(288);
+ setState(303);
extprec();
}
break;
case 2:
{
- setState(289);
+ setState(304);
extcast();
}
break;
case 3:
{
- setState(290);
- exttype();
+ setState(305);
+ extvar();
}
break;
case 4:
{
- setState(291);
- extvar();
+ setState(306);
+ extnew();
}
break;
case 5:
{
- setState(292);
- extnew();
- }
- break;
- case 6:
- {
- setState(293);
+ setState(307);
extstring();
}
break;
@@ -2136,27 +2217,27 @@ class PainlessParser extends Parser {
public final ExtbraceContext extbrace() throws RecognitionException {
ExtbraceContext _localctx = new ExtbraceContext(_ctx, getState());
- enterRule(_localctx, 30, RULE_extbrace);
+ enterRule(_localctx, 34, RULE_extbrace);
try {
enterOuterAlt(_localctx, 1);
{
- setState(296);
+ setState(310);
match(LBRACE);
- setState(297);
+ setState(311);
expression(0);
- setState(298);
+ setState(312);
match(RBRACE);
- setState(301);
- switch ( getInterpreter().adaptivePredict(_input,31,_ctx) ) {
+ setState(315);
+ switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
case 1:
{
- setState(299);
+ setState(313);
extdot();
}
break;
case 2:
{
- setState(300);
+ setState(314);
extbrace();
}
break;
@@ -2195,23 +2276,23 @@ class PainlessParser extends Parser {
public final ExtdotContext extdot() throws RecognitionException {
ExtdotContext _localctx = new ExtdotContext(_ctx, getState());
- enterRule(_localctx, 32, RULE_extdot);
+ enterRule(_localctx, 36, RULE_extdot);
try {
enterOuterAlt(_localctx, 1);
{
- setState(303);
+ setState(317);
match(DOT);
- setState(306);
- switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) {
+ setState(320);
+ switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) {
case 1:
{
- setState(304);
+ setState(318);
extcall();
}
break;
case 2:
{
- setState(305);
+ setState(319);
extfield();
}
break;
@@ -2229,45 +2310,6 @@ class PainlessParser extends Parser {
return _localctx;
}
- public static class ExttypeContext extends ParserRuleContext {
- public TerminalNode TYPE() { return getToken(PainlessParser.TYPE, 0); }
- public ExtdotContext extdot() {
- return getRuleContext(ExtdotContext.class,0);
- }
- public ExttypeContext(ParserRuleContext parent, int invokingState) {
- super(parent, invokingState);
- }
- @Override public int getRuleIndex() { return RULE_exttype; }
- @Override
- public T accept(ParseTreeVisitor extends T> visitor) {
- if ( visitor instanceof PainlessParserVisitor ) return ((PainlessParserVisitor extends T>)visitor).visitExttype(this);
- else return visitor.visitChildren(this);
- }
- }
-
- public final ExttypeContext exttype() throws RecognitionException {
- ExttypeContext _localctx = new ExttypeContext(_ctx, getState());
- enterRule(_localctx, 34, RULE_exttype);
- try {
- enterOuterAlt(_localctx, 1);
- {
- setState(308);
- match(TYPE);
- setState(309);
- extdot();
- }
- }
- catch (RecognitionException re) {
- _localctx.exception = re;
- _errHandler.reportError(this, re);
- _errHandler.recover(this, re);
- }
- finally {
- exitRule();
- }
- return _localctx;
- }
-
public static class ExtcallContext extends ParserRuleContext {
public TerminalNode EXTID() { return getToken(PainlessParser.EXTID, 0); }
public ArgumentsContext arguments() {
@@ -2292,25 +2334,25 @@ class PainlessParser extends Parser {
public final ExtcallContext extcall() throws RecognitionException {
ExtcallContext _localctx = new ExtcallContext(_ctx, getState());
- enterRule(_localctx, 36, RULE_extcall);
+ enterRule(_localctx, 38, RULE_extcall);
try {
enterOuterAlt(_localctx, 1);
{
- setState(311);
+ setState(322);
match(EXTID);
- setState(312);
+ setState(323);
arguments();
- setState(315);
- switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) {
+ setState(326);
+ switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) {
case 1:
{
- setState(313);
+ setState(324);
extdot();
}
break;
case 2:
{
- setState(314);
+ setState(325);
extbrace();
}
break;
@@ -2329,7 +2371,9 @@ class PainlessParser extends Parser {
}
public static class ExtvarContext extends ParserRuleContext {
- public TerminalNode ID() { return getToken(PainlessParser.ID, 0); }
+ public IdentifierContext identifier() {
+ return getRuleContext(IdentifierContext.class,0);
+ }
public ExtdotContext extdot() {
return getRuleContext(ExtdotContext.class,0);
}
@@ -2349,23 +2393,23 @@ class PainlessParser extends Parser {
public final ExtvarContext extvar() throws RecognitionException {
ExtvarContext _localctx = new ExtvarContext(_ctx, getState());
- enterRule(_localctx, 38, RULE_extvar);
+ enterRule(_localctx, 40, RULE_extvar);
try {
enterOuterAlt(_localctx, 1);
{
- setState(317);
- match(ID);
- setState(320);
- switch ( getInterpreter().adaptivePredict(_input,34,_ctx) ) {
+ setState(328);
+ identifier();
+ setState(331);
+ switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
case 1:
{
- setState(318);
+ setState(329);
extdot();
}
break;
case 2:
{
- setState(319);
+ setState(330);
extbrace();
}
break;
@@ -2405,29 +2449,29 @@ class PainlessParser extends Parser {
public final ExtfieldContext extfield() throws RecognitionException {
ExtfieldContext _localctx = new ExtfieldContext(_ctx, getState());
- enterRule(_localctx, 40, RULE_extfield);
+ enterRule(_localctx, 42, RULE_extfield);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(322);
+ setState(333);
_la = _input.LA(1);
if ( !(_la==EXTINTEGER || _la==EXTID) ) {
_errHandler.recoverInline(this);
} else {
consume();
}
- setState(325);
- switch ( getInterpreter().adaptivePredict(_input,35,_ctx) ) {
+ setState(336);
+ switch ( getInterpreter().adaptivePredict(_input,37,_ctx) ) {
case 1:
{
- setState(323);
+ setState(334);
extdot();
}
break;
case 2:
{
- setState(324);
+ setState(335);
extbrace();
}
break;
@@ -2447,16 +2491,15 @@ class PainlessParser extends Parser {
public static class ExtnewContext extends ParserRuleContext {
public TerminalNode NEW() { return getToken(PainlessParser.NEW, 0); }
- public TerminalNode TYPE() { return getToken(PainlessParser.TYPE, 0); }
+ public IdentifierContext identifier() {
+ return getRuleContext(IdentifierContext.class,0);
+ }
public ArgumentsContext arguments() {
return getRuleContext(ArgumentsContext.class,0);
}
public ExtdotContext extdot() {
return getRuleContext(ExtdotContext.class,0);
}
- public ExtbraceContext extbrace() {
- return getRuleContext(ExtbraceContext.class,0);
- }
public List LBRACE() { return getTokens(PainlessParser.LBRACE); }
public TerminalNode LBRACE(int i) {
return getToken(PainlessParser.LBRACE, i);
@@ -2484,36 +2527,30 @@ class PainlessParser extends Parser {
public final ExtnewContext extnew() throws RecognitionException {
ExtnewContext _localctx = new ExtnewContext(_ctx, getState());
- enterRule(_localctx, 42, RULE_extnew);
+ enterRule(_localctx, 44, RULE_extnew);
try {
int _alt;
enterOuterAlt(_localctx, 1);
{
- setState(327);
+ setState(338);
match(NEW);
- setState(328);
- match(TYPE);
- setState(345);
+ setState(339);
+ identifier();
+ setState(355);
switch (_input.LA(1)) {
case LP:
{
{
- setState(329);
+ setState(340);
arguments();
- setState(332);
- switch ( getInterpreter().adaptivePredict(_input,36,_ctx) ) {
+ setState(342);
+ switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) {
case 1:
{
- setState(330);
+ setState(341);
extdot();
}
break;
- case 2:
- {
- setState(331);
- extbrace();
- }
- break;
}
}
}
@@ -2521,7 +2558,7 @@ class PainlessParser extends Parser {
case LBRACE:
{
{
- setState(338);
+ setState(348);
_errHandler.sync(this);
_alt = 1;
do {
@@ -2529,11 +2566,11 @@ class PainlessParser extends Parser {
case 1:
{
{
- setState(334);
+ setState(344);
match(LBRACE);
- setState(335);
+ setState(345);
expression(0);
- setState(336);
+ setState(346);
match(RBRACE);
}
}
@@ -2541,15 +2578,15 @@ class PainlessParser extends Parser {
default:
throw new NoViableAltException(this);
}
- setState(340);
+ setState(350);
_errHandler.sync(this);
- _alt = getInterpreter().adaptivePredict(_input,37,_ctx);
+ _alt = getInterpreter().adaptivePredict(_input,39,_ctx);
} while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER );
- setState(343);
- switch ( getInterpreter().adaptivePredict(_input,38,_ctx) ) {
+ setState(353);
+ switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) {
case 1:
{
- setState(342);
+ setState(352);
extdot();
}
break;
@@ -2594,23 +2631,23 @@ class PainlessParser extends Parser {
public final ExtstringContext extstring() throws RecognitionException {
ExtstringContext _localctx = new ExtstringContext(_ctx, getState());
- enterRule(_localctx, 44, RULE_extstring);
+ enterRule(_localctx, 46, RULE_extstring);
try {
enterOuterAlt(_localctx, 1);
{
- setState(347);
+ setState(357);
match(STRING);
- setState(350);
- switch ( getInterpreter().adaptivePredict(_input,40,_ctx) ) {
+ setState(360);
+ switch ( getInterpreter().adaptivePredict(_input,42,_ctx) ) {
case 1:
{
- setState(348);
+ setState(358);
extdot();
}
break;
case 2:
{
- setState(349);
+ setState(359);
extbrace();
}
break;
@@ -2654,40 +2691,40 @@ class PainlessParser extends Parser {
public final ArgumentsContext arguments() throws RecognitionException {
ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState());
- enterRule(_localctx, 46, RULE_arguments);
+ enterRule(_localctx, 48, RULE_arguments);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
{
- setState(352);
+ setState(362);
match(LP);
- setState(361);
+ setState(371);
_la = _input.LA(1);
- if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (TYPE - 64)) | (1L << (ID - 64)))) != 0)) {
+ if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << LP) | (1L << NEW) | (1L << BOOLNOT) | (1L << BWNOT) | (1L << ADD) | (1L << SUB) | (1L << INCR) | (1L << DECR) | (1L << OCTAL))) != 0) || ((((_la - 64)) & ~0x3f) == 0 && ((1L << (_la - 64)) & ((1L << (HEX - 64)) | (1L << (INTEGER - 64)) | (1L << (DECIMAL - 64)) | (1L << (STRING - 64)) | (1L << (CHAR - 64)) | (1L << (TRUE - 64)) | (1L << (FALSE - 64)) | (1L << (NULL - 64)) | (1L << (ID - 64)))) != 0)) {
{
- setState(353);
+ setState(363);
expression(0);
- setState(358);
+ setState(368);
_errHandler.sync(this);
_la = _input.LA(1);
while (_la==COMMA) {
{
{
- setState(354);
+ setState(364);
match(COMMA);
- setState(355);
+ setState(365);
expression(0);
}
}
- setState(360);
+ setState(370);
_errHandler.sync(this);
_la = _input.LA(1);
}
}
}
- setState(363);
+ setState(373);
match(RP);
}
}
@@ -2719,12 +2756,12 @@ class PainlessParser extends Parser {
public final IncrementContext increment() throws RecognitionException {
IncrementContext _localctx = new IncrementContext(_ctx, getState());
- enterRule(_localctx, 48, RULE_increment);
+ enterRule(_localctx, 50, RULE_increment);
int _la;
try {
enterOuterAlt(_localctx, 1);
{
- setState(365);
+ setState(375);
_la = _input.LA(1);
if ( !(_la==INCR || _la==DECR) ) {
_errHandler.recoverInline(this);
@@ -2746,7 +2783,7 @@ class PainlessParser extends Parser {
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
switch (ruleIndex) {
- case 11:
+ case 13:
return expression_sempred((ExpressionContext)_localctx, predIndex);
}
return true;
@@ -2780,148 +2817,152 @@ class PainlessParser extends Parser {
}
public static final String _serializedATN =
- "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3M\u0172\4\2\t\2\4"+
+ "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3L\u017c\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"+
- "\4\32\t\32\3\2\6\2\66\n\2\r\2\16\2\67\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\3"+
- "\3\3\5\3C\n\3\3\3\3\3\3\3\3\3\3\3\3\3\5\3K\n\3\3\3\3\3\3\3\3\3\3\3\3\3"+
- "\3\3\5\3T\n\3\3\3\3\3\3\3\5\3Y\n\3\3\3\3\3\5\3]\n\3\3\3\3\3\5\3a\n\3\3"+
- "\3\3\3\3\3\5\3f\n\3\3\3\3\3\5\3j\n\3\3\3\3\3\5\3n\n\3\3\3\3\3\5\3r\n\3"+
- "\3\3\3\3\3\3\5\3w\n\3\3\3\3\3\3\3\6\3|\n\3\r\3\16\3}\3\3\3\3\3\3\5\3\u0083"+
- "\n\3\3\3\3\3\5\3\u0087\n\3\5\3\u0089\n\3\3\4\3\4\6\4\u008d\n\4\r\4\16"+
- "\4\u008e\3\4\3\4\3\4\5\4\u0094\n\4\3\5\3\5\5\5\u0098\n\5\3\6\3\6\3\6\3"+
- "\7\3\7\5\7\u009f\n\7\3\b\3\b\3\t\3\t\3\t\3\t\7\t\u00a7\n\t\f\t\16\t\u00aa"+
- "\13\t\3\n\3\n\3\n\7\n\u00af\n\n\f\n\16\n\u00b2\13\n\3\13\3\13\3\13\5\13"+
- "\u00b7\n\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u00c1\n\f\3\r\3\r\3\r"+
- "\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3"+
- "\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\5\r\u00df\n\r\3\r\3\r\3\r\3\r\3\r\3\r\3"+
- "\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r"+
- "\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\7\r\u0105\n\r\f\r\16"+
- "\r\u0108\13\r\3\16\3\16\3\16\3\16\3\16\3\16\5\16\u0110\n\16\3\17\3\17"+
- "\3\17\3\17\3\17\3\17\3\17\5\17\u0119\n\17\3\17\3\17\3\17\5\17\u011e\n"+
- "\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\5\20\u0129\n\20\3\21"+
- "\3\21\3\21\3\21\3\21\5\21\u0130\n\21\3\22\3\22\3\22\5\22\u0135\n\22\3"+
- "\23\3\23\3\23\3\24\3\24\3\24\3\24\5\24\u013e\n\24\3\25\3\25\3\25\5\25"+
- "\u0143\n\25\3\26\3\26\3\26\5\26\u0148\n\26\3\27\3\27\3\27\3\27\3\27\5"+
- "\27\u014f\n\27\3\27\3\27\3\27\3\27\6\27\u0155\n\27\r\27\16\27\u0156\3"+
- "\27\5\27\u015a\n\27\5\27\u015c\n\27\3\30\3\30\3\30\5\30\u0161\n\30\3\31"+
- "\3\31\3\31\3\31\7\31\u0167\n\31\f\31\16\31\u016a\13\31\5\31\u016c\n\31"+
- "\3\31\3\31\3\32\3\32\3\32\2\3\30\33\2\4\6\b\n\f\16\20\22\24\26\30\32\34"+
- "\36 \"$&(*,.\60\62\2\f\4\2\32\33\37 \3\2\65@\3\2AD\3\2\34\36\3\2\37 \3"+
- "\2!#\3\2$\'\3\2(+\3\2LM\3\2\63\64\u01b2\2\65\3\2\2\2\4\u0088\3\2\2\2\6"+
- "\u0093\3\2\2\2\b\u0097\3\2\2\2\n\u0099\3\2\2\2\f\u009e\3\2\2\2\16\u00a0"+
- "\3\2\2\2\20\u00a2\3\2\2\2\22\u00ab\3\2\2\2\24\u00b3\3\2\2\2\26\u00b8\3"+
- "\2\2\2\30\u00de\3\2\2\2\32\u010f\3\2\2\2\34\u0111\3\2\2\2\36\u011f\3\2"+
- "\2\2 \u012a\3\2\2\2\"\u0131\3\2\2\2$\u0136\3\2\2\2&\u0139\3\2\2\2(\u013f"+
- "\3\2\2\2*\u0144\3\2\2\2,\u0149\3\2\2\2.\u015d\3\2\2\2\60\u0162\3\2\2\2"+
- "\62\u016f\3\2\2\2\64\66\5\4\3\2\65\64\3\2\2\2\66\67\3\2\2\2\67\65\3\2"+
- "\2\2\678\3\2\2\289\3\2\2\29:\7\2\2\3:\3\3\2\2\2;<\7\16\2\2<=\7\t\2\2="+
- ">\5\30\r\2>?\7\n\2\2?B\5\6\4\2@A\7\17\2\2AC\5\6\4\2B@\3\2\2\2BC\3\2\2"+
- "\2C\u0089\3\2\2\2DE\7\20\2\2EF\7\t\2\2FG\5\30\r\2GJ\7\n\2\2HK\5\6\4\2"+
- "IK\5\b\5\2JH\3\2\2\2JI\3\2\2\2K\u0089\3\2\2\2LM\7\21\2\2MN\5\6\4\2NO\7"+
- "\20\2\2OP\7\t\2\2PQ\5\30\r\2QS\7\n\2\2RT\7\r\2\2SR\3\2\2\2ST\3\2\2\2T"+
- "\u0089\3\2\2\2UV\7\22\2\2VX\7\t\2\2WY\5\f\7\2XW\3\2\2\2XY\3\2\2\2YZ\3"+
- "\2\2\2Z\\\7\r\2\2[]\5\30\r\2\\[\3\2\2\2\\]\3\2\2\2]^\3\2\2\2^`\7\r\2\2"+
- "_a\5\16\b\2`_\3\2\2\2`a\3\2\2\2ab\3\2\2\2be\7\n\2\2cf\5\6\4\2df\5\b\5"+
- "\2ec\3\2\2\2ed\3\2\2\2f\u0089\3\2\2\2gi\5\20\t\2hj\7\r\2\2ih\3\2\2\2i"+
- "j\3\2\2\2j\u0089\3\2\2\2km\7\23\2\2ln\7\r\2\2ml\3\2\2\2mn\3\2\2\2n\u0089"+
- "\3\2\2\2oq\7\24\2\2pr\7\r\2\2qp\3\2\2\2qr\3\2\2\2r\u0089\3\2\2\2st\7\25"+
- "\2\2tv\5\30\r\2uw\7\r\2\2vu\3\2\2\2vw\3\2\2\2w\u0089\3\2\2\2xy\7\27\2"+
- "\2y{\5\6\4\2z|\5\26\f\2{z\3\2\2\2|}\3\2\2\2}{\3\2\2\2}~\3\2\2\2~\u0089"+
- "\3\2\2\2\177\u0080\7\31\2\2\u0080\u0082\5\30\r\2\u0081\u0083\7\r\2\2\u0082"+
- "\u0081\3\2\2\2\u0082\u0083\3\2\2\2\u0083\u0089\3\2\2\2\u0084\u0086\5\30"+
- "\r\2\u0085\u0087\7\r\2\2\u0086\u0085\3\2\2\2\u0086\u0087\3\2\2\2\u0087"+
- "\u0089\3\2\2\2\u0088;\3\2\2\2\u0088D\3\2\2\2\u0088L\3\2\2\2\u0088U\3\2"+
- "\2\2\u0088g\3\2\2\2\u0088k\3\2\2\2\u0088o\3\2\2\2\u0088s\3\2\2\2\u0088"+
- "x\3\2\2\2\u0088\177\3\2\2\2\u0088\u0084\3\2\2\2\u0089\5\3\2\2\2\u008a"+
- "\u008c\7\5\2\2\u008b\u008d\5\4\3\2\u008c\u008b\3\2\2\2\u008d\u008e\3\2"+
- "\2\2\u008e\u008c\3\2\2\2\u008e\u008f\3\2\2\2\u008f\u0090\3\2\2\2\u0090"+
- "\u0091\7\6\2\2\u0091\u0094\3\2\2\2\u0092\u0094\5\4\3\2\u0093\u008a\3\2"+
- "\2\2\u0093\u0092\3\2\2\2\u0094\7\3\2\2\2\u0095\u0098\5\n\6\2\u0096\u0098"+
- "\7\r\2\2\u0097\u0095\3\2\2\2\u0097\u0096\3\2\2\2\u0098\t\3\2\2\2\u0099"+
- "\u009a\7\5\2\2\u009a\u009b\7\6\2\2\u009b\13\3\2\2\2\u009c\u009f\5\20\t"+
- "\2\u009d\u009f\5\30\r\2\u009e\u009c\3\2\2\2\u009e\u009d\3\2\2\2\u009f"+
- "\r\3\2\2\2\u00a0\u00a1\5\30\r\2\u00a1\17\3\2\2\2\u00a2\u00a3\5\22\n\2"+
- "\u00a3\u00a8\5\24\13\2\u00a4\u00a5\7\f\2\2\u00a5\u00a7\5\24\13\2\u00a6"+
- "\u00a4\3\2\2\2\u00a7\u00aa\3\2\2\2\u00a8\u00a6\3\2\2\2\u00a8\u00a9\3\2"+
- "\2\2\u00a9\21\3\2\2\2\u00aa\u00a8\3\2\2\2\u00ab\u00b0\7J\2\2\u00ac\u00ad"+
- "\7\7\2\2\u00ad\u00af\7\b\2\2\u00ae\u00ac\3\2\2\2\u00af\u00b2\3\2\2\2\u00b0"+
- "\u00ae\3\2\2\2\u00b0\u00b1\3\2\2\2\u00b1\23\3\2\2\2\u00b2\u00b0\3\2\2"+
- "\2\u00b3\u00b6\7K\2\2\u00b4\u00b5\7\65\2\2\u00b5\u00b7\5\30\r\2\u00b6"+
- "\u00b4\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7\25\3\2\2\2\u00b8\u00b9\7\30\2"+
- "\2\u00b9\u00ba\7\t\2\2\u00ba\u00bb\7J\2\2\u00bb\u00bc\7K\2\2\u00bc\u00bd"+
- "\3\2\2\2\u00bd\u00c0\7\n\2\2\u00be\u00c1\5\6\4\2\u00bf\u00c1\5\n\6\2\u00c0"+
- "\u00be\3\2\2\2\u00c0\u00bf\3\2\2\2\u00c1\27\3\2\2\2\u00c2\u00c3\b\r\1"+
- "\2\u00c3\u00c4\t\2\2\2\u00c4\u00df\5\30\r\20\u00c5\u00c6\7\t\2\2\u00c6"+
- "\u00c7\5\22\n\2\u00c7\u00c8\7\n\2\2\u00c8\u00c9\5\30\r\17\u00c9\u00df"+
- "\3\2\2\2\u00ca\u00cb\5\32\16\2\u00cb\u00cc\t\3\2\2\u00cc\u00cd\5\30\r"+
- "\3\u00cd\u00df\3\2\2\2\u00ce\u00cf\7\t\2\2\u00cf\u00d0\5\30\r\2\u00d0"+
- "\u00d1\7\n\2\2\u00d1\u00df\3\2\2\2\u00d2\u00df\t\4\2\2\u00d3\u00df\7F"+
- "\2\2\u00d4\u00df\7G\2\2\u00d5\u00df\7H\2\2\u00d6\u00df\7I\2\2\u00d7\u00d8"+
- "\5\32\16\2\u00d8\u00d9\5\62\32\2\u00d9\u00df\3\2\2\2\u00da\u00db\5\62"+
- "\32\2\u00db\u00dc\5\32\16\2\u00dc\u00df\3\2\2\2\u00dd\u00df\5\32\16\2"+
- "\u00de\u00c2\3\2\2\2\u00de\u00c5\3\2\2\2\u00de\u00ca\3\2\2\2\u00de\u00ce"+
- "\3\2\2\2\u00de\u00d2\3\2\2\2\u00de\u00d3\3\2\2\2\u00de\u00d4\3\2\2\2\u00de"+
- "\u00d5\3\2\2\2\u00de\u00d6\3\2\2\2\u00de\u00d7\3\2\2\2\u00de\u00da\3\2"+
- "\2\2\u00de\u00dd\3\2\2\2\u00df\u0106\3\2\2\2\u00e0\u00e1\f\16\2\2\u00e1"+
- "\u00e2\t\5\2\2\u00e2\u0105\5\30\r\17\u00e3\u00e4\f\r\2\2\u00e4\u00e5\t"+
- "\6\2\2\u00e5\u0105\5\30\r\16\u00e6\u00e7\f\f\2\2\u00e7\u00e8\t\7\2\2\u00e8"+
- "\u0105\5\30\r\r\u00e9\u00ea\f\13\2\2\u00ea\u00eb\t\b\2\2\u00eb\u0105\5"+
- "\30\r\f\u00ec\u00ed\f\n\2\2\u00ed\u00ee\t\t\2\2\u00ee\u0105\5\30\r\13"+
- "\u00ef\u00f0\f\t\2\2\u00f0\u00f1\7,\2\2\u00f1\u0105\5\30\r\n\u00f2\u00f3"+
- "\f\b\2\2\u00f3\u00f4\7-\2\2\u00f4\u0105\5\30\r\t\u00f5\u00f6\f\7\2\2\u00f6"+
- "\u00f7\7.\2\2\u00f7\u0105\5\30\r\b\u00f8\u00f9\f\6\2\2\u00f9\u00fa\7/"+
- "\2\2\u00fa\u0105\5\30\r\7\u00fb\u00fc\f\5\2\2\u00fc\u00fd\7\60\2\2\u00fd"+
- "\u0105\5\30\r\6\u00fe\u00ff\f\4\2\2\u00ff\u0100\7\61\2\2\u0100\u0101\5"+
- "\30\r\2\u0101\u0102\7\62\2\2\u0102\u0103\5\30\r\4\u0103\u0105\3\2\2\2"+
- "\u0104\u00e0\3\2\2\2\u0104\u00e3\3\2\2\2\u0104\u00e6\3\2\2\2\u0104\u00e9"+
- "\3\2\2\2\u0104\u00ec\3\2\2\2\u0104\u00ef\3\2\2\2\u0104\u00f2\3\2\2\2\u0104"+
- "\u00f5\3\2\2\2\u0104\u00f8\3\2\2\2\u0104\u00fb\3\2\2\2\u0104\u00fe\3\2"+
- "\2\2\u0105\u0108\3\2\2\2\u0106\u0104\3\2\2\2\u0106\u0107\3\2\2\2\u0107"+
- "\31\3\2\2\2\u0108\u0106\3\2\2\2\u0109\u0110\5\34\17\2\u010a\u0110\5\36"+
- "\20\2\u010b\u0110\5$\23\2\u010c\u0110\5(\25\2\u010d\u0110\5,\27\2\u010e"+
- "\u0110\5.\30\2\u010f\u0109\3\2\2\2\u010f\u010a\3\2\2\2\u010f\u010b\3\2"+
- "\2\2\u010f\u010c\3\2\2\2\u010f\u010d\3\2\2\2\u010f\u010e\3\2\2\2\u0110"+
- "\33\3\2\2\2\u0111\u0118\7\t\2\2\u0112\u0119\5\34\17\2\u0113\u0119\5\36"+
- "\20\2\u0114\u0119\5$\23\2\u0115\u0119\5(\25\2\u0116\u0119\5,\27\2\u0117"+
- "\u0119\5.\30\2\u0118\u0112\3\2\2\2\u0118\u0113\3\2\2\2\u0118\u0114\3\2"+
- "\2\2\u0118\u0115\3\2\2\2\u0118\u0116\3\2\2\2\u0118\u0117\3\2\2\2\u0119"+
- "\u011a\3\2\2\2\u011a\u011d\7\n\2\2\u011b\u011e\5\"\22\2\u011c\u011e\5"+
- " \21\2\u011d\u011b\3\2\2\2\u011d\u011c\3\2\2\2\u011d\u011e\3\2\2\2\u011e"+
- "\35\3\2\2\2\u011f\u0120\7\t\2\2\u0120\u0121\5\22\n\2\u0121\u0128\7\n\2"+
- "\2\u0122\u0129\5\34\17\2\u0123\u0129\5\36\20\2\u0124\u0129\5$\23\2\u0125"+
- "\u0129\5(\25\2\u0126\u0129\5,\27\2\u0127\u0129\5.\30\2\u0128\u0122\3\2"+
- "\2\2\u0128\u0123\3\2\2\2\u0128\u0124\3\2\2\2\u0128\u0125\3\2\2\2\u0128"+
- "\u0126\3\2\2\2\u0128\u0127\3\2\2\2\u0129\37\3\2\2\2\u012a\u012b\7\7\2"+
- "\2\u012b\u012c\5\30\r\2\u012c\u012f\7\b\2\2\u012d\u0130\5\"\22\2\u012e"+
- "\u0130\5 \21\2\u012f\u012d\3\2\2\2\u012f\u012e\3\2\2\2\u012f\u0130\3\2"+
- "\2\2\u0130!\3\2\2\2\u0131\u0134\7\13\2\2\u0132\u0135\5&\24\2\u0133\u0135"+
- "\5*\26\2\u0134\u0132\3\2\2\2\u0134\u0133\3\2\2\2\u0135#\3\2\2\2\u0136"+
- "\u0137\7J\2\2\u0137\u0138\5\"\22\2\u0138%\3\2\2\2\u0139\u013a\7M\2\2\u013a"+
- "\u013d\5\60\31\2\u013b\u013e\5\"\22\2\u013c\u013e\5 \21\2\u013d\u013b"+
- "\3\2\2\2\u013d\u013c\3\2\2\2\u013d\u013e\3\2\2\2\u013e\'\3\2\2\2\u013f"+
- "\u0142\7K\2\2\u0140\u0143\5\"\22\2\u0141\u0143\5 \21\2\u0142\u0140\3\2"+
- "\2\2\u0142\u0141\3\2\2\2\u0142\u0143\3\2\2\2\u0143)\3\2\2\2\u0144\u0147"+
- "\t\n\2\2\u0145\u0148\5\"\22\2\u0146\u0148\5 \21\2\u0147\u0145\3\2\2\2"+
- "\u0147\u0146\3\2\2\2\u0147\u0148\3\2\2\2\u0148+\3\2\2\2\u0149\u014a\7"+
- "\26\2\2\u014a\u015b\7J\2\2\u014b\u014e\5\60\31\2\u014c\u014f\5\"\22\2"+
- "\u014d\u014f\5 \21\2\u014e\u014c\3\2\2\2\u014e\u014d\3\2\2\2\u014e\u014f"+
- "\3\2\2\2\u014f\u015c\3\2\2\2\u0150\u0151\7\7\2\2\u0151\u0152\5\30\r\2"+
- "\u0152\u0153\7\b\2\2\u0153\u0155\3\2\2\2\u0154\u0150\3\2\2\2\u0155\u0156"+
- "\3\2\2\2\u0156\u0154\3\2\2\2\u0156\u0157\3\2\2\2\u0157\u0159\3\2\2\2\u0158"+
- "\u015a\5\"\22\2\u0159\u0158\3\2\2\2\u0159\u015a\3\2\2\2\u015a\u015c\3"+
- "\2\2\2\u015b\u014b\3\2\2\2\u015b\u0154\3\2\2\2\u015c-\3\2\2\2\u015d\u0160"+
- "\7E\2\2\u015e\u0161\5\"\22\2\u015f\u0161\5 \21\2\u0160\u015e\3\2\2\2\u0160"+
- "\u015f\3\2\2\2\u0160\u0161\3\2\2\2\u0161/\3\2\2\2\u0162\u016b\7\t\2\2"+
- "\u0163\u0168\5\30\r\2\u0164\u0165\7\f\2\2\u0165\u0167\5\30\r\2\u0166\u0164"+
- "\3\2\2\2\u0167\u016a\3\2\2\2\u0168\u0166\3\2\2\2\u0168\u0169\3\2\2\2\u0169"+
- "\u016c\3\2\2\2\u016a\u0168\3\2\2\2\u016b\u0163\3\2\2\2\u016b\u016c\3\2"+
- "\2\2\u016c\u016d\3\2\2\2\u016d\u016e\7\n\2\2\u016e\61\3\2\2\2\u016f\u0170"+
- "\t\13\2\2\u0170\63\3\2\2\2-\67BJSX\\`eimqv}\u0082\u0086\u0088\u008e\u0093"+
- "\u0097\u009e\u00a8\u00b0\u00b6\u00c0\u00de\u0104\u0106\u010f\u0118\u011d"+
- "\u0128\u012f\u0134\u013d\u0142\u0147\u014e\u0156\u0159\u015b\u0160\u0168"+
- "\u016b";
+ "\4\32\t\32\4\33\t\33\3\2\6\28\n\2\r\2\16\29\3\2\3\2\3\3\3\3\3\3\3\3\3"+
+ "\3\3\3\3\3\5\3E\n\3\3\3\3\3\3\3\3\3\3\3\3\3\5\3M\n\3\3\3\3\3\3\3\3\3\3"+
+ "\3\3\3\3\3\5\3V\n\3\3\3\3\3\3\3\5\3[\n\3\3\3\3\3\5\3_\n\3\3\3\3\3\5\3"+
+ "c\n\3\3\3\3\3\3\3\5\3h\n\3\3\3\3\3\5\3l\n\3\3\3\3\3\5\3p\n\3\3\3\3\3\5"+
+ "\3t\n\3\3\3\3\3\3\3\5\3y\n\3\3\3\3\3\3\3\6\3~\n\3\r\3\16\3\177\3\3\3\3"+
+ "\3\3\5\3\u0085\n\3\3\3\3\3\5\3\u0089\n\3\5\3\u008b\n\3\3\4\3\4\6\4\u008f"+
+ "\n\4\r\4\16\4\u0090\3\4\3\4\3\4\5\4\u0096\n\4\3\5\3\5\5\5\u009a\n\5\3"+
+ "\6\3\6\3\6\3\7\3\7\5\7\u00a1\n\7\3\b\3\b\3\t\3\t\3\t\3\t\7\t\u00a9\n\t"+
+ "\f\t\16\t\u00ac\13\t\3\n\3\n\3\n\7\n\u00b1\n\n\f\n\16\n\u00b4\13\n\3\13"+
+ "\3\13\3\13\5\13\u00b9\n\13\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\5\f\u00c3\n"+
+ "\f\3\r\3\r\5\r\u00c7\n\r\3\16\3\16\3\16\3\16\7\16\u00cd\n\16\f\16\16\16"+
+ "\u00d0\13\16\3\16\3\16\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3"+
+ "\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3"+
+ "\17\3\17\3\17\3\17\3\17\5\17\u00f0\n\17\3\17\3\17\3\17\3\17\3\17\3\17"+
+ "\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17"+
+ "\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17"+
+ "\3\17\3\17\7\17\u0116\n\17\f\17\16\17\u0119\13\17\3\20\3\20\3\20\3\20"+
+ "\3\20\5\20\u0120\n\20\3\21\3\21\3\21\3\21\3\21\3\21\5\21\u0128\n\21\3"+
+ "\21\3\21\3\21\5\21\u012d\n\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22"+
+ "\5\22\u0137\n\22\3\23\3\23\3\23\3\23\3\23\5\23\u013e\n\23\3\24\3\24\3"+
+ "\24\5\24\u0143\n\24\3\25\3\25\3\25\3\25\5\25\u0149\n\25\3\26\3\26\3\26"+
+ "\5\26\u014e\n\26\3\27\3\27\3\27\5\27\u0153\n\27\3\30\3\30\3\30\3\30\5"+
+ "\30\u0159\n\30\3\30\3\30\3\30\3\30\6\30\u015f\n\30\r\30\16\30\u0160\3"+
+ "\30\5\30\u0164\n\30\5\30\u0166\n\30\3\31\3\31\3\31\5\31\u016b\n\31\3\32"+
+ "\3\32\3\32\3\32\7\32\u0171\n\32\f\32\16\32\u0174\13\32\5\32\u0176\n\32"+
+ "\3\32\3\32\3\33\3\33\3\33\2\3\34\34\2\4\6\b\n\f\16\20\22\24\26\30\32\34"+
+ "\36 \"$&(*,.\60\62\64\2\f\4\2\32\33\37 \3\2\65@\3\2AD\3\2\34\36\3\2\37"+
+ " \3\2!#\3\2$\'\3\2(+\3\2KL\3\2\63\64\u01b9\2\67\3\2\2\2\4\u008a\3\2\2"+
+ "\2\6\u0095\3\2\2\2\b\u0099\3\2\2\2\n\u009b\3\2\2\2\f\u00a0\3\2\2\2\16"+
+ "\u00a2\3\2\2\2\20\u00a4\3\2\2\2\22\u00ad\3\2\2\2\24\u00b5\3\2\2\2\26\u00ba"+
+ "\3\2\2\2\30\u00c4\3\2\2\2\32\u00c8\3\2\2\2\34\u00ef\3\2\2\2\36\u011f\3"+
+ "\2\2\2 \u0121\3\2\2\2\"\u012e\3\2\2\2$\u0138\3\2\2\2&\u013f\3\2\2\2(\u0144"+
+ "\3\2\2\2*\u014a\3\2\2\2,\u014f\3\2\2\2.\u0154\3\2\2\2\60\u0167\3\2\2\2"+
+ "\62\u016c\3\2\2\2\64\u0179\3\2\2\2\668\5\4\3\2\67\66\3\2\2\289\3\2\2\2"+
+ "9\67\3\2\2\29:\3\2\2\2:;\3\2\2\2;<\7\2\2\3<\3\3\2\2\2=>\7\16\2\2>?\7\t"+
+ "\2\2?@\5\34\17\2@A\7\n\2\2AD\5\6\4\2BC\7\17\2\2CE\5\6\4\2DB\3\2\2\2DE"+
+ "\3\2\2\2E\u008b\3\2\2\2FG\7\20\2\2GH\7\t\2\2HI\5\34\17\2IL\7\n\2\2JM\5"+
+ "\6\4\2KM\5\b\5\2LJ\3\2\2\2LK\3\2\2\2M\u008b\3\2\2\2NO\7\21\2\2OP\5\6\4"+
+ "\2PQ\7\20\2\2QR\7\t\2\2RS\5\34\17\2SU\7\n\2\2TV\7\r\2\2UT\3\2\2\2UV\3"+
+ "\2\2\2V\u008b\3\2\2\2WX\7\22\2\2XZ\7\t\2\2Y[\5\f\7\2ZY\3\2\2\2Z[\3\2\2"+
+ "\2[\\\3\2\2\2\\^\7\r\2\2]_\5\34\17\2^]\3\2\2\2^_\3\2\2\2_`\3\2\2\2`b\7"+
+ "\r\2\2ac\5\16\b\2ba\3\2\2\2bc\3\2\2\2cd\3\2\2\2dg\7\n\2\2eh\5\6\4\2fh"+
+ "\5\b\5\2ge\3\2\2\2gf\3\2\2\2h\u008b\3\2\2\2ik\5\20\t\2jl\7\r\2\2kj\3\2"+
+ "\2\2kl\3\2\2\2l\u008b\3\2\2\2mo\7\23\2\2np\7\r\2\2on\3\2\2\2op\3\2\2\2"+
+ "p\u008b\3\2\2\2qs\7\24\2\2rt\7\r\2\2sr\3\2\2\2st\3\2\2\2t\u008b\3\2\2"+
+ "\2uv\7\25\2\2vx\5\34\17\2wy\7\r\2\2xw\3\2\2\2xy\3\2\2\2y\u008b\3\2\2\2"+
+ "z{\7\27\2\2{}\5\6\4\2|~\5\26\f\2}|\3\2\2\2~\177\3\2\2\2\177}\3\2\2\2\177"+
+ "\u0080\3\2\2\2\u0080\u008b\3\2\2\2\u0081\u0082\7\31\2\2\u0082\u0084\5"+
+ "\34\17\2\u0083\u0085\7\r\2\2\u0084\u0083\3\2\2\2\u0084\u0085\3\2\2\2\u0085"+
+ "\u008b\3\2\2\2\u0086\u0088\5\34\17\2\u0087\u0089\7\r\2\2\u0088\u0087\3"+
+ "\2\2\2\u0088\u0089\3\2\2\2\u0089\u008b\3\2\2\2\u008a=\3\2\2\2\u008aF\3"+
+ "\2\2\2\u008aN\3\2\2\2\u008aW\3\2\2\2\u008ai\3\2\2\2\u008am\3\2\2\2\u008a"+
+ "q\3\2\2\2\u008au\3\2\2\2\u008az\3\2\2\2\u008a\u0081\3\2\2\2\u008a\u0086"+
+ "\3\2\2\2\u008b\5\3\2\2\2\u008c\u008e\7\5\2\2\u008d\u008f\5\4\3\2\u008e"+
+ "\u008d\3\2\2\2\u008f\u0090\3\2\2\2\u0090\u008e\3\2\2\2\u0090\u0091\3\2"+
+ "\2\2\u0091\u0092\3\2\2\2\u0092\u0093\7\6\2\2\u0093\u0096\3\2\2\2\u0094"+
+ "\u0096\5\4\3\2\u0095\u008c\3\2\2\2\u0095\u0094\3\2\2\2\u0096\7\3\2\2\2"+
+ "\u0097\u009a\5\n\6\2\u0098\u009a\7\r\2\2\u0099\u0097\3\2\2\2\u0099\u0098"+
+ "\3\2\2\2\u009a\t\3\2\2\2\u009b\u009c\7\5\2\2\u009c\u009d\7\6\2\2\u009d"+
+ "\13\3\2\2\2\u009e\u00a1\5\20\t\2\u009f\u00a1\5\34\17\2\u00a0\u009e\3\2"+
+ "\2\2\u00a0\u009f\3\2\2\2\u00a1\r\3\2\2\2\u00a2\u00a3\5\34\17\2\u00a3\17"+
+ "\3\2\2\2\u00a4\u00a5\5\22\n\2\u00a5\u00aa\5\24\13\2\u00a6\u00a7\7\f\2"+
+ "\2\u00a7\u00a9\5\24\13\2\u00a8\u00a6\3\2\2\2\u00a9\u00ac\3\2\2\2\u00aa"+
+ "\u00a8\3\2\2\2\u00aa\u00ab\3\2\2\2\u00ab\21\3\2\2\2\u00ac\u00aa\3\2\2"+
+ "\2\u00ad\u00b2\5\30\r\2\u00ae\u00af\7\7\2\2\u00af\u00b1\7\b\2\2\u00b0"+
+ "\u00ae\3\2\2\2\u00b1\u00b4\3\2\2\2\u00b2\u00b0\3\2\2\2\u00b2\u00b3\3\2"+
+ "\2\2\u00b3\23\3\2\2\2\u00b4\u00b2\3\2\2\2\u00b5\u00b8\5\30\r\2\u00b6\u00b7"+
+ "\7\65\2\2\u00b7\u00b9\5\34\17\2\u00b8\u00b6\3\2\2\2\u00b8\u00b9\3\2\2"+
+ "\2\u00b9\25\3\2\2\2\u00ba\u00bb\7\30\2\2\u00bb\u00bc\7\t\2\2\u00bc\u00bd"+
+ "\5\30\r\2\u00bd\u00be\5\30\r\2\u00be\u00bf\3\2\2\2\u00bf\u00c2\7\n\2\2"+
+ "\u00c0\u00c3\5\6\4\2\u00c1\u00c3\5\n\6\2\u00c2\u00c0\3\2\2\2\u00c2\u00c1"+
+ "\3\2\2\2\u00c3\27\3\2\2\2\u00c4\u00c6\7J\2\2\u00c5\u00c7\5\32\16\2\u00c6"+
+ "\u00c5\3\2\2\2\u00c6\u00c7\3\2\2\2\u00c7\31\3\2\2\2\u00c8\u00c9\7$\2\2"+
+ "\u00c9\u00ce\5\30\r\2\u00ca\u00cb\7\f\2\2\u00cb\u00cd\5\30\r\2\u00cc\u00ca"+
+ "\3\2\2\2\u00cd\u00d0\3\2\2\2\u00ce\u00cc\3\2\2\2\u00ce\u00cf\3\2\2\2\u00cf"+
+ "\u00d1\3\2\2\2\u00d0\u00ce\3\2\2\2\u00d1\u00d2\7&\2\2\u00d2\33\3\2\2\2"+
+ "\u00d3\u00d4\b\17\1\2\u00d4\u00d5\t\2\2\2\u00d5\u00f0\5\34\17\20\u00d6"+
+ "\u00d7\7\t\2\2\u00d7\u00d8\5\22\n\2\u00d8\u00d9\7\n\2\2\u00d9\u00da\5"+
+ "\34\17\17\u00da\u00f0\3\2\2\2\u00db\u00dc\5\36\20\2\u00dc\u00dd\t\3\2"+
+ "\2\u00dd\u00de\5\34\17\3\u00de\u00f0\3\2\2\2\u00df\u00e0\7\t\2\2\u00e0"+
+ "\u00e1\5\34\17\2\u00e1\u00e2\7\n\2\2\u00e2\u00f0\3\2\2\2\u00e3\u00f0\t"+
+ "\4\2\2\u00e4\u00f0\7F\2\2\u00e5\u00f0\7G\2\2\u00e6\u00f0\7H\2\2\u00e7"+
+ "\u00f0\7I\2\2\u00e8\u00e9\5\36\20\2\u00e9\u00ea\5\64\33\2\u00ea\u00f0"+
+ "\3\2\2\2\u00eb\u00ec\5\64\33\2\u00ec\u00ed\5\36\20\2\u00ed\u00f0\3\2\2"+
+ "\2\u00ee\u00f0\5\36\20\2\u00ef\u00d3\3\2\2\2\u00ef\u00d6\3\2\2\2\u00ef"+
+ "\u00db\3\2\2\2\u00ef\u00df\3\2\2\2\u00ef\u00e3\3\2\2\2\u00ef\u00e4\3\2"+
+ "\2\2\u00ef\u00e5\3\2\2\2\u00ef\u00e6\3\2\2\2\u00ef\u00e7\3\2\2\2\u00ef"+
+ "\u00e8\3\2\2\2\u00ef\u00eb\3\2\2\2\u00ef\u00ee\3\2\2\2\u00f0\u0117\3\2"+
+ "\2\2\u00f1\u00f2\f\16\2\2\u00f2\u00f3\t\5\2\2\u00f3\u0116\5\34\17\17\u00f4"+
+ "\u00f5\f\r\2\2\u00f5\u00f6\t\6\2\2\u00f6\u0116\5\34\17\16\u00f7\u00f8"+
+ "\f\f\2\2\u00f8\u00f9\t\7\2\2\u00f9\u0116\5\34\17\r\u00fa\u00fb\f\13\2"+
+ "\2\u00fb\u00fc\t\b\2\2\u00fc\u0116\5\34\17\f\u00fd\u00fe\f\n\2\2\u00fe"+
+ "\u00ff\t\t\2\2\u00ff\u0116\5\34\17\13\u0100\u0101\f\t\2\2\u0101\u0102"+
+ "\7,\2\2\u0102\u0116\5\34\17\n\u0103\u0104\f\b\2\2\u0104\u0105\7-\2\2\u0105"+
+ "\u0116\5\34\17\t\u0106\u0107\f\7\2\2\u0107\u0108\7.\2\2\u0108\u0116\5"+
+ "\34\17\b\u0109\u010a\f\6\2\2\u010a\u010b\7/\2\2\u010b\u0116\5\34\17\7"+
+ "\u010c\u010d\f\5\2\2\u010d\u010e\7\60\2\2\u010e\u0116\5\34\17\6\u010f"+
+ "\u0110\f\4\2\2\u0110\u0111\7\61\2\2\u0111\u0112\5\34\17\2\u0112\u0113"+
+ "\7\62\2\2\u0113\u0114\5\34\17\4\u0114\u0116\3\2\2\2\u0115\u00f1\3\2\2"+
+ "\2\u0115\u00f4\3\2\2\2\u0115\u00f7\3\2\2\2\u0115\u00fa\3\2\2\2\u0115\u00fd"+
+ "\3\2\2\2\u0115\u0100\3\2\2\2\u0115\u0103\3\2\2\2\u0115\u0106\3\2\2\2\u0115"+
+ "\u0109\3\2\2\2\u0115\u010c\3\2\2\2\u0115\u010f\3\2\2\2\u0116\u0119\3\2"+
+ "\2\2\u0117\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118\35\3\2\2\2\u0119\u0117"+
+ "\3\2\2\2\u011a\u0120\5 \21\2\u011b\u0120\5\"\22\2\u011c\u0120\5*\26\2"+
+ "\u011d\u0120\5.\30\2\u011e\u0120\5\60\31\2\u011f\u011a\3\2\2\2\u011f\u011b"+
+ "\3\2\2\2\u011f\u011c\3\2\2\2\u011f\u011d\3\2\2\2\u011f\u011e\3\2\2\2\u0120"+
+ "\37\3\2\2\2\u0121\u0127\7\t\2\2\u0122\u0128\5 \21\2\u0123\u0128\5\"\22"+
+ "\2\u0124\u0128\5*\26\2\u0125\u0128\5.\30\2\u0126\u0128\5\60\31\2\u0127"+
+ "\u0122\3\2\2\2\u0127\u0123\3\2\2\2\u0127\u0124\3\2\2\2\u0127\u0125\3\2"+
+ "\2\2\u0127\u0126\3\2\2\2\u0128\u0129\3\2\2\2\u0129\u012c\7\n\2\2\u012a"+
+ "\u012d\5&\24\2\u012b\u012d\5$\23\2\u012c\u012a\3\2\2\2\u012c\u012b\3\2"+
+ "\2\2\u012c\u012d\3\2\2\2\u012d!\3\2\2\2\u012e\u012f\7\t\2\2\u012f\u0130"+
+ "\5\22\n\2\u0130\u0136\7\n\2\2\u0131\u0137\5 \21\2\u0132\u0137\5\"\22\2"+
+ "\u0133\u0137\5*\26\2\u0134\u0137\5.\30\2\u0135\u0137\5\60\31\2\u0136\u0131"+
+ "\3\2\2\2\u0136\u0132\3\2\2\2\u0136\u0133\3\2\2\2\u0136\u0134\3\2\2\2\u0136"+
+ "\u0135\3\2\2\2\u0137#\3\2\2\2\u0138\u0139\7\7\2\2\u0139\u013a\5\34\17"+
+ "\2\u013a\u013d\7\b\2\2\u013b\u013e\5&\24\2\u013c\u013e\5$\23\2\u013d\u013b"+
+ "\3\2\2\2\u013d\u013c\3\2\2\2\u013d\u013e\3\2\2\2\u013e%\3\2\2\2\u013f"+
+ "\u0142\7\13\2\2\u0140\u0143\5(\25\2\u0141\u0143\5,\27\2\u0142\u0140\3"+
+ "\2\2\2\u0142\u0141\3\2\2\2\u0143\'\3\2\2\2\u0144\u0145\7L\2\2\u0145\u0148"+
+ "\5\62\32\2\u0146\u0149\5&\24\2\u0147\u0149\5$\23\2\u0148\u0146\3\2\2\2"+
+ "\u0148\u0147\3\2\2\2\u0148\u0149\3\2\2\2\u0149)\3\2\2\2\u014a\u014d\5"+
+ "\30\r\2\u014b\u014e\5&\24\2\u014c\u014e\5$\23\2\u014d\u014b\3\2\2\2\u014d"+
+ "\u014c\3\2\2\2\u014d\u014e\3\2\2\2\u014e+\3\2\2\2\u014f\u0152\t\n\2\2"+
+ "\u0150\u0153\5&\24\2\u0151\u0153\5$\23\2\u0152\u0150\3\2\2\2\u0152\u0151"+
+ "\3\2\2\2\u0152\u0153\3\2\2\2\u0153-\3\2\2\2\u0154\u0155\7\26\2\2\u0155"+
+ "\u0165\5\30\r\2\u0156\u0158\5\62\32\2\u0157\u0159\5&\24\2\u0158\u0157"+
+ "\3\2\2\2\u0158\u0159\3\2\2\2\u0159\u0166\3\2\2\2\u015a\u015b\7\7\2\2\u015b"+
+ "\u015c\5\34\17\2\u015c\u015d\7\b\2\2\u015d\u015f\3\2\2\2\u015e\u015a\3"+
+ "\2\2\2\u015f\u0160\3\2\2\2\u0160\u015e\3\2\2\2\u0160\u0161\3\2\2\2\u0161"+
+ "\u0163\3\2\2\2\u0162\u0164\5&\24\2\u0163\u0162\3\2\2\2\u0163\u0164\3\2"+
+ "\2\2\u0164\u0166\3\2\2\2\u0165\u0156\3\2\2\2\u0165\u015e\3\2\2\2\u0166"+
+ "/\3\2\2\2\u0167\u016a\7E\2\2\u0168\u016b\5&\24\2\u0169\u016b\5$\23\2\u016a"+
+ "\u0168\3\2\2\2\u016a\u0169\3\2\2\2\u016a\u016b\3\2\2\2\u016b\61\3\2\2"+
+ "\2\u016c\u0175\7\t\2\2\u016d\u0172\5\34\17\2\u016e\u016f\7\f\2\2\u016f"+
+ "\u0171\5\34\17\2\u0170\u016e\3\2\2\2\u0171\u0174\3\2\2\2\u0172\u0170\3"+
+ "\2\2\2\u0172\u0173\3\2\2\2\u0173\u0176\3\2\2\2\u0174\u0172\3\2\2\2\u0175"+
+ "\u016d\3\2\2\2\u0175\u0176\3\2\2\2\u0176\u0177\3\2\2\2\u0177\u0178\7\n"+
+ "\2\2\u0178\63\3\2\2\2\u0179\u017a\t\13\2\2\u017a\65\3\2\2\2/9DLUZ^bgk"+
+ "osx\177\u0084\u0088\u008a\u0090\u0095\u0099\u00a0\u00aa\u00b2\u00b8\u00c2"+
+ "\u00c6\u00ce\u00ef\u0115\u0117\u011f\u0127\u012c\u0136\u013d\u0142\u0148"+
+ "\u014d\u0152\u0158\u0160\u0163\u0165\u016a\u0172\u0175";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParserBaseVisitor.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParserBaseVisitor.java
index ee231b1fce8..f1cc222edd9 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParserBaseVisitor.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParserBaseVisitor.java
@@ -165,6 +165,20 @@ class PainlessParserBaseVisitor extends AbstractParseTreeVisitor implement
* {@link #visitChildren} on {@code ctx}.
*/
@Override public T visitTrap(PainlessParser.TrapContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitIdentifier(PainlessParser.IdentifierContext ctx) { return visitChildren(ctx); }
+ /**
+ * {@inheritDoc}
+ *
+ * The default implementation returns the result of calling
+ * {@link #visitChildren} on {@code ctx}.
+ */
+ @Override public T visitGeneric(PainlessParser.GenericContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
@@ -312,13 +326,6 @@ class PainlessParserBaseVisitor extends AbstractParseTreeVisitor implement
* {@link #visitChildren} on {@code ctx}.
*/
@Override public T visitExtdot(PainlessParser.ExtdotContext ctx) { return visitChildren(ctx); }
- /**
- * {@inheritDoc}
- *
- * The default implementation returns the result of calling
- * {@link #visitChildren} on {@code ctx}.
- */
- @Override public T visitExttype(PainlessParser.ExttypeContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParserVisitor.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParserVisitor.java
index e1a002a02a0..3873d6f1e08 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParserVisitor.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessParserVisitor.java
@@ -155,6 +155,18 @@ interface PainlessParserVisitor extends ParseTreeVisitor {
* @return the visitor result
*/
T visitTrap(PainlessParser.TrapContext ctx);
+ /**
+ * Visit a parse tree produced by {@link PainlessParser#identifier}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitIdentifier(PainlessParser.IdentifierContext ctx);
+ /**
+ * Visit a parse tree produced by {@link PainlessParser#generic}.
+ * @param ctx the parse tree
+ * @return the visitor result
+ */
+ T visitGeneric(PainlessParser.GenericContext ctx);
/**
* Visit a parse tree produced by the {@code comp}
* labeled alternative in {@link PainlessParser#expression}.
@@ -297,12 +309,6 @@ interface PainlessParserVisitor extends ParseTreeVisitor {
* @return the visitor result
*/
T visitExtdot(PainlessParser.ExtdotContext ctx);
- /**
- * Visit a parse tree produced by {@link PainlessParser#exttype}.
- * @param ctx the parse tree
- * @return the visitor result
- */
- T visitExttype(PainlessParser.ExttypeContext ctx);
/**
* Visit a parse tree produced by {@link PainlessParser#extcall}.
* @param ctx the parse tree
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Writer.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Writer.java
index 4ddb260aea0..3cc6a2aa22b 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/Writer.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/Writer.java
@@ -49,10 +49,11 @@ import org.elasticsearch.painless.PainlessParser.ExtnewContext;
import org.elasticsearch.painless.PainlessParser.ExtprecContext;
import org.elasticsearch.painless.PainlessParser.ExtstartContext;
import org.elasticsearch.painless.PainlessParser.ExtstringContext;
-import org.elasticsearch.painless.PainlessParser.ExttypeContext;
import org.elasticsearch.painless.PainlessParser.ExtvarContext;
import org.elasticsearch.painless.PainlessParser.FalseContext;
import org.elasticsearch.painless.PainlessParser.ForContext;
+import org.elasticsearch.painless.PainlessParser.GenericContext;
+import org.elasticsearch.painless.PainlessParser.IdentifierContext;
import org.elasticsearch.painless.PainlessParser.IfContext;
import org.elasticsearch.painless.PainlessParser.IncrementContext;
import org.elasticsearch.painless.PainlessParser.InitializerContext;
@@ -151,19 +152,22 @@ class Writer extends PainlessParserBaseVisitor {
private void writeExecute() {
final Label fals = new Label();
final Label end = new Label();
- execute.visitVarInsn(Opcodes.ALOAD, metadata.inputValueSlot);
- execute.push("#score");
- execute.invokeInterface(MAP_TYPE, MAP_GET);
- execute.dup();
- execute.ifNull(fals);
- execute.checkCast(SCORE_ACCESSOR_TYPE);
- execute.invokeVirtual(SCORE_ACCESSOR_TYPE, SCORE_ACCESSOR_FLOAT);
- execute.goTo(end);
- execute.mark(fals);
- execute.pop();
- execute.push(0F);
- execute.mark(end);
- execute.visitVarInsn(Opcodes.FSTORE, metadata.scoreValueSlot);
+
+ if (metadata.scoreValueUsed) {
+ execute.visitVarInsn(Opcodes.ALOAD, metadata.inputValueSlot);
+ execute.push("#score");
+ execute.invokeInterface(MAP_TYPE, MAP_GET);
+ execute.dup();
+ execute.ifNull(fals);
+ execute.checkCast(SCORE_ACCESSOR_TYPE);
+ execute.invokeVirtual(SCORE_ACCESSOR_TYPE, SCORE_ACCESSOR_FLOAT);
+ execute.goTo(end);
+ execute.mark(fals);
+ execute.pop();
+ execute.push(0F);
+ execute.mark(end);
+ execute.visitVarInsn(Opcodes.FSTORE, metadata.scoreValueSlot);
+ }
execute.push(settings.getMaxLoopCounter());
execute.visitVarInsn(Opcodes.ISTORE, metadata.loopCounterSlot);
@@ -328,6 +332,16 @@ class Writer extends PainlessParserBaseVisitor {
return null;
}
+ @Override
+ public Void visitIdentifier(IdentifierContext ctx) {
+ throw new UnsupportedOperationException(WriterUtility.error(ctx) + "Unexpected state.");
+ }
+
+ @Override
+ public Void visitGeneric(GenericContext ctx) {
+ throw new UnsupportedOperationException(WriterUtility.error(ctx) + "Unexpected state.");
+ }
+
@Override
public Void visitPrecedence(final PrecedenceContext ctx) {
throw new UnsupportedOperationException(WriterUtility.error(ctx) + "Unexpected state.");
@@ -474,13 +488,6 @@ class Writer extends PainlessParserBaseVisitor {
return null;
}
- @Override
- public Void visitExttype(final ExttypeContext ctx) {
- external.processExttype(ctx);
-
- return null;
- }
-
@Override
public Void visitExtcall(final ExtcallContext ctx) {
external.processExtcall(ctx);
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/WriterExternal.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/WriterExternal.java
index 8ab729f98fa..c89e856f858 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/WriterExternal.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/WriterExternal.java
@@ -38,7 +38,6 @@ import org.elasticsearch.painless.PainlessParser.ExtnewContext;
import org.elasticsearch.painless.PainlessParser.ExtprecContext;
import org.elasticsearch.painless.PainlessParser.ExtstartContext;
import org.elasticsearch.painless.PainlessParser.ExtstringContext;
-import org.elasticsearch.painless.PainlessParser.ExttypeContext;
import org.elasticsearch.painless.PainlessParser.ExtvarContext;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.GeneratorAdapter;
@@ -114,7 +113,6 @@ class WriterExternal {
final ExtprecContext precctx = ctx.extprec();
final ExtcastContext castctx = ctx.extcast();
- final ExttypeContext typectx = ctx.exttype();
final ExtvarContext varctx = ctx.extvar();
final ExtnewContext newctx = ctx.extnew();
final ExtstringContext stringctx = ctx.extstring();
@@ -123,8 +121,6 @@ class WriterExternal {
writer.visit(precctx);
} else if (castctx != null) {
writer.visit(castctx);
- } else if (typectx != null) {
- writer.visit(typectx);
} else if (varctx != null) {
writer.visit(varctx);
} else if (newctx != null) {
@@ -139,7 +135,6 @@ class WriterExternal {
void processExtprec(final ExtprecContext ctx) {
final ExtprecContext precctx = ctx.extprec();
final ExtcastContext castctx = ctx.extcast();
- final ExttypeContext typectx = ctx.exttype();
final ExtvarContext varctx = ctx.extvar();
final ExtnewContext newctx = ctx.extnew();
final ExtstringContext stringctx = ctx.extstring();
@@ -148,8 +143,6 @@ class WriterExternal {
writer.visit(precctx);
} else if (castctx != null) {
writer.visit(castctx);
- } else if (typectx != null) {
- writer.visit(typectx);
} else if (varctx != null) {
writer.visit(varctx);
} else if (newctx != null) {
@@ -175,7 +168,6 @@ class WriterExternal {
final ExtprecContext precctx = ctx.extprec();
final ExtcastContext castctx = ctx.extcast();
- final ExttypeContext typectx = ctx.exttype();
final ExtvarContext varctx = ctx.extvar();
final ExtnewContext newctx = ctx.extnew();
final ExtstringContext stringctx = ctx.extstring();
@@ -184,8 +176,6 @@ class WriterExternal {
writer.visit(precctx);
} else if (castctx != null) {
writer.visit(castctx);
- } else if (typectx != null) {
- writer.visit(typectx);
} else if (varctx != null) {
writer.visit(varctx);
} else if (newctx != null) {
@@ -226,10 +216,6 @@ class WriterExternal {
}
}
- void processExttype(final ExttypeContext ctx) {
- writer.visit(ctx.extdot());
- }
-
void processExtcall(final ExtcallContext ctx) {
writeCallExternal(ctx);
@@ -273,12 +259,9 @@ class WriterExternal {
writeNewExternal(ctx);
final ExtdotContext dotctx = ctx.extdot();
- final ExtbraceContext bracectx = ctx.extbrace();
if (dotctx != null) {
writer.visit(dotctx);
- } else if (bracectx != null) {
- writer.visit(bracectx);
}
}
@@ -301,6 +284,10 @@ class WriterExternal {
final ExtNodeMetadata sourceenmd = metadata.getExtNodeMetadata(source);
final ExternalMetadata parentemd = metadata.getExternalMetadata(sourceenmd.parent);
+ if (sourceenmd.target == null) {
+ return;
+ }
+
final boolean length = "#length".equals(sourceenmd.target);
final boolean array = "#brace".equals(sourceenmd.target);
final boolean name = sourceenmd.target instanceof String && !length && !array;
@@ -444,12 +431,15 @@ class WriterExternal {
}
}
- private void writeLoadStoreVariable(final ParserRuleContext source, final boolean store,
- final Type type, final int slot) {
+ private void writeLoadStoreVariable(final ParserRuleContext source, final boolean store, final Type type, int slot) {
if (type.sort == Sort.VOID) {
throw new IllegalStateException(WriterUtility.error(source) + "Cannot load/store void type.");
}
+ if (!metadata.scoreValueUsed && slot > metadata.scoreValueSlot) {
+ --slot;
+ }
+
if (store) {
execute.visitVarInsn(type.type.getOpcode(Opcodes.ISTORE), slot);
} else {
diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/WriterStatement.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/WriterStatement.java
index a0e70f319b5..d7a964882a4 100644
--- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/WriterStatement.java
+++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/WriterStatement.java
@@ -327,7 +327,11 @@ class WriterStatement {
final ExpressionMetadata declvaremd = metadata.getExpressionMetadata(ctx);
final org.objectweb.asm.Type type = declvaremd.to.type;
final Sort sort = declvaremd.to.sort;
- final int slot = (int)declvaremd.postConst;
+ int slot = (int)declvaremd.postConst;
+
+ if (!metadata.scoreValueUsed && slot > metadata.scoreValueSlot) {
+ --slot;
+ }
final ExpressionContext exprctx = ctx.expression();
final boolean initialize = exprctx == null;
diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/ScoreTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/ScoreTests.java
new file mode 100644
index 00000000000..d02d2957ab5
--- /dev/null
+++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/ScoreTests.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to Elasticsearch under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch 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.
+ */
+
+package org.elasticsearch.painless;
+
+import org.elasticsearch.action.search.SearchResponse;
+import org.elasticsearch.common.settings.Settings;
+import org.elasticsearch.index.query.QueryBuilders;
+import org.elasticsearch.index.query.functionscore.ScoreFunctionBuilders;
+import org.elasticsearch.plugins.Plugin;
+import org.elasticsearch.script.Script;
+import org.elasticsearch.script.ScriptService;
+import org.elasticsearch.search.SearchHit;
+import org.elasticsearch.test.ESSingleNodeTestCase;
+
+import java.util.Collection;
+
+public class ScoreTests extends ESSingleNodeTestCase {
+ @Override
+ protected Collection> getPlugins() {
+ return pluginList(PainlessPlugin.class);
+ }
+
+ public void testScore() {
+ createIndex("test", Settings.EMPTY, "type", "t", "type=text");
+ ensureGreen("test");
+
+ client().prepareIndex("test", "type", "1").setSource("t", "a").get();
+ client().prepareIndex("test", "type", "2").setSource("t", "a a b").get();
+ client().prepareIndex("test", "type", "3").setSource("t", "a a a b c").get();
+ client().prepareIndex("test", "type", "4").setSource("t", "a b c d").get();
+ client().prepareIndex("test", "type", "5").setSource("t", "a a b c d e").get();
+ client().admin().indices().prepareRefresh("test").get();
+
+ final Script script = new Script("_score + 1", ScriptService.ScriptType.INLINE, "painless", null);
+
+ final SearchResponse sr = client().prepareSearch("test").setQuery(
+ QueryBuilders.functionScoreQuery(QueryBuilders.matchQuery("t", "a"),
+ ScoreFunctionBuilders.scriptFunction(script))).get();
+ final SearchHit[] hits = sr.getHits().getHits();
+
+ for (final SearchHit hit : hits) {
+ assertTrue(hit.score() > 0.9999F && hit.score() < 2.0001F);
+ }
+
+ assertEquals("1", hits[0].getId());
+ assertEquals("3", hits[1].getId());
+ assertEquals("2", hits[2].getId());
+ assertEquals("5", hits[3].getId());
+ assertEquals("4", hits[4].getId());
+ }
+}
diff --git a/modules/lang-painless/src/test/java/org/elasticsearch/painless/WhenThingsGoWrongTests.java b/modules/lang-painless/src/test/java/org/elasticsearch/painless/WhenThingsGoWrongTests.java
index e1467d9ebb3..088d7cf2fde 100644
--- a/modules/lang-painless/src/test/java/org/elasticsearch/painless/WhenThingsGoWrongTests.java
+++ b/modules/lang-painless/src/test/java/org/elasticsearch/painless/WhenThingsGoWrongTests.java
@@ -113,7 +113,7 @@ public class WhenThingsGoWrongTests extends ScriptTestCase {
fail("should have hit ParseException");
} catch (RuntimeException expected) {
assertTrue(expected.getMessage().contains(
- "unexpected token ['PainlessError'] was expecting one of [TYPE]."));
+ "Invalid type [PainlessError]."));
}
}