Painless clean up including fixing _score issues and improving type
error messages. Closes #17428
This commit is contained in:
parent
e073b0c75d
commit
a37e53c50f
|
@ -19,18 +19,6 @@
|
|||
|
||||
lexer grammar PainlessLexer;
|
||||
|
||||
@header {
|
||||
import java.util.Set;
|
||||
}
|
||||
|
||||
@members {
|
||||
private Set<String> types = null;
|
||||
|
||||
void setTypes(Set<String> 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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<Void> {
|
|||
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<Void> {
|
|||
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<Void> {
|
|||
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<Void> {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitExttype(final ExttypeContext ctx) {
|
||||
external.processExttype(ctx);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitExtcall(final ExtcallContext ctx) {
|
||||
external.processExtcall(ctx);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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<Integer> scopes = new ArrayDeque<>();
|
||||
private final Deque<Variable> 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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<String> types = null;
|
||||
|
||||
void setTypes(Set<String> 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<x=z>|?~@\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<x=z>|?~@\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 {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -165,6 +165,20 @@ class PainlessParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> implement
|
|||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitTrap(PainlessParser.TrapContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitIdentifier(PainlessParser.IdentifierContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitGeneric(PainlessParser.GenericContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
|
@ -312,13 +326,6 @@ class PainlessParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> implement
|
|||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitExtdot(PainlessParser.ExtdotContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* <p>The default implementation returns the result of calling
|
||||
* {@link #visitChildren} on {@code ctx}.</p>
|
||||
*/
|
||||
@Override public T visitExttype(PainlessParser.ExttypeContext ctx) { return visitChildren(ctx); }
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*
|
||||
|
|
|
@ -155,6 +155,18 @@ interface PainlessParserVisitor<T> extends ParseTreeVisitor<T> {
|
|||
* @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<T> extends ParseTreeVisitor<T> {
|
|||
* @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
|
||||
|
|
|
@ -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<Void> {
|
|||
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<Void> {
|
|||
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<Void> {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitExttype(final ExttypeContext ctx) {
|
||||
external.processExttype(ctx);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void visitExtcall(final ExtcallContext ctx) {
|
||||
external.processExtcall(ctx);
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<Class<? extends Plugin>> 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());
|
||||
}
|
||||
}
|
|
@ -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]."));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue