diff --git a/libraries/adaptive-expressions/src/expressionFunctions.ts b/libraries/adaptive-expressions/src/expressionFunctions.ts index 6189a96f2d..3e30f4cc3d 100644 --- a/libraries/adaptive-expressions/src/expressionFunctions.ts +++ b/libraries/adaptive-expressions/src/expressionFunctions.ts @@ -2077,9 +2077,18 @@ export class ExpressionFunctions { ExpressionFunctions.validateUnary), new ExpressionEvaluator( ExpressionType.Concat, - ExpressionFunctions.apply((args: any []): string => ''.concat(...args.map((arg): string => ExpressionFunctions.parseStringOrNull(arg))), ExpressionFunctions.verifyStringOrNull), + ExpressionFunctions.apply((args: any []): string => { + let result = ''; + for (const arg of args) { + if (arg !== undefined && arg !== null) { + result += arg.toString(); + } + } + + return result; + }), ReturnType.String, - ExpressionFunctions.validateString), + ExpressionFunctions.validateAtLeastOne), new ExpressionEvaluator( ExpressionType.Length, ExpressionFunctions.apply((args: any []): number => (ExpressionFunctions.parseStringOrNull(args[0])).length, ExpressionFunctions.verifyStringOrNull), @@ -2936,7 +2945,7 @@ export class ExpressionFunctions { lookup.set('lessOrEquals', lookup.get(ExpressionType.LessThanOrEqual)); lookup.set('not', lookup.get(ExpressionType.Not)); lookup.set('or', lookup.get(ExpressionType.Or)); - lookup.set('concat', lookup.get(ExpressionType.Concat)); + lookup.set('&', lookup.get(ExpressionType.Concat)); return lookup; } diff --git a/libraries/adaptive-expressions/src/expressionType.ts b/libraries/adaptive-expressions/src/expressionType.ts index 86e87da58f..ae813207f5 100644 --- a/libraries/adaptive-expressions/src/expressionType.ts +++ b/libraries/adaptive-expressions/src/expressionType.ts @@ -41,7 +41,7 @@ export class ExpressionType { public static readonly Not: string = '!'; // String - public static readonly Concat: string = '&'; + public static readonly Concat: string = 'concat'; public static readonly Length: string = 'length'; public static readonly Replace: string = 'replace'; public static readonly ReplaceIgnoreCase: string = 'replaceIgnoreCase'; diff --git a/libraries/adaptive-expressions/src/parser/Expression.g4 b/libraries/adaptive-expressions/src/parser/Expression.g4 deleted file mode 100644 index 8bbc79d411..0000000000 --- a/libraries/adaptive-expressions/src/parser/Expression.g4 +++ /dev/null @@ -1,48 +0,0 @@ -grammar Expression; - -file: expression EOF; - -expression - : ('!'|'-'|'+') expression #unaryOpExp - | expression '^' expression #binaryOpExp - | expression ('*'|'/'|'%') expression #binaryOpExp - | expression ('+'|'-') expression #binaryOpExp - | expression ('=='|'!='|'<>') expression #binaryOpExp - | expression ('&') expression #binaryOpExp - | expression ('<'|'<='|'>'|'>=') expression #binaryOpExp - | expression '&&' expression #binaryOpExp - | expression '||' expression #binaryOpExp - | primaryExpression #primaryExp - ; - -primaryExpression - : '(' expression ')' #parenthesisExp - | CONSTANT #constantAtom - | NUMBER #numericAtom - | STRING #stringAtom - | IDENTIFIER #idAtom - | primaryExpression '.' IDENTIFIER #memberAccessExp - | primaryExpression '(' argsList? ')' #funcInvokeExp - | primaryExpression '[' expression ']' #indexAccessExp - ; - -argsList - : expression (',' expression)* - ; - -fragment LETTER : [a-zA-Z]; -fragment DIGIT : [0-9]; - -NUMBER : DIGIT + ( '.' DIGIT +)? ; - -WHITESPACE : (' '|'\t'|'\ufeff'|'\u00a0') -> skip; - -IDENTIFIER : (LETTER | '_' | '#' | '@' | '@@' | '$' | '%') (LETTER | DIGIT | '-' | '_')*; - -NEWLINE : '\r'? '\n' -> skip; - -STRING : ('\'' (~'\'')* '\'') | ('"' (~'"')* '"'); - -CONSTANT : ('[' WHITESPACE* ']') | ('{' WHITESPACE* '}'); - -INVALID_TOKEN_DEFAULT_MODE : . ; \ No newline at end of file diff --git a/libraries/adaptive-expressions/src/parser/ExpressionLexer.g4 b/libraries/adaptive-expressions/src/parser/ExpressionLexer.g4 new file mode 100644 index 0000000000..7ab80b8c8a --- /dev/null +++ b/libraries/adaptive-expressions/src/parser/ExpressionLexer.g4 @@ -0,0 +1,82 @@ +lexer grammar ExpressionLexer; + +@lexer::members { + ignoreWS = true; // usually we ignore whitespace, but inside stringInterpolation, whitespace is significant +} + +fragment LETTER : [a-zA-Z]; +fragment DIGIT : [0-9]; + +STRING_INTERPOLATION_START : '`' { this.ignoreWS = false;} -> pushMode(STRING_INTERPOLATION_MODE); + +// operators +PLUS: '+'; + +SUBSTRACT: '-'; + +NON: '!'; + +XOR: '^'; + +ASTERISK: '*'; + +SLASH: '/'; + +PERCENT: '%'; + +DOUBLE_EQUAL: '=='; + +NOT_EQUAL: '!=' | '<>'; + +SINGLE_AND: '&'; + +DOUBLE_AND: '&&'; + +DOUBLE_VERTICAL_CYLINDER: '||'; + +LESS_THAN: '<'; + +MORE_THAN: '>'; + +LESS_OR_EQUAl: '<='; + +MORE_OR_EQUAL: '>='; + +OPEN_BRACKET: '('; + +CLOSE_BRACKET: ')'; + +DOT: '.'; + +OPEN_SQUARE_BRACKET: '['; + +CLOSE_SQUARE_BRACKET: ']'; + +COMMA: ','; + + +NUMBER : DIGIT + ( '.' DIGIT +)? ; + +WHITESPACE : (' '|'\t'|'\ufeff'|'\u00a0') {this.ignoreWS}? -> skip; + +IDENTIFIER : (LETTER | '_' | '#' | '@' | '@@' | '$' | '%') (LETTER | DIGIT | '-' | '_')* '!'?; + +NEWLINE : '\r'? '\n' -> skip; + +STRING : ('\'' (~'\'')* '\'') | ('"' (~'"')* '"'); + +CONSTANT : ('[' WHITESPACE* ']') | ('{' WHITESPACE* '}'); + +INVALID_TOKEN_DEFAULT_MODE : . ; + +mode STRING_INTERPOLATION_MODE; + +STRING_INTERPOLATION_END : '`' {this.ignoreWS = true;} -> type(STRING_INTERPOLATION_START), popMode; + +TEMPLATE : '$' '{' (STRING | ~[\r\n{}'"])*? '}'; + +ESCAPE_CHARACTER : '\\' ~[\r\n]?; + +TEXT_CONTENT : '\\`' | ~[\r\n]; + + diff --git a/libraries/adaptive-expressions/src/parser/ExpressionParser.g4 b/libraries/adaptive-expressions/src/parser/ExpressionParser.g4 new file mode 100644 index 0000000000..847ddf8cda --- /dev/null +++ b/libraries/adaptive-expressions/src/parser/ExpressionParser.g4 @@ -0,0 +1,42 @@ +parser grammar ExpressionParser; + +options { tokenVocab=ExpressionLexer; } + +file: expression EOF; + +expression + : (NON|SUBSTRACT|PLUS) expression #unaryOpExp + | expression XOR expression #binaryOpExp + | expression (ASTERISK|SLASH|PERCENT) expression #binaryOpExp + | expression (PLUS|SUBSTRACT) expression #binaryOpExp + | expression (DOUBLE_EQUAL|NOT_EQUAL) expression #binaryOpExp + | expression (SINGLE_AND) expression #binaryOpExp + | expression (LESS_THAN|LESS_OR_EQUAl|MORE_THAN|MORE_OR_EQUAL) expression #binaryOpExp + | expression DOUBLE_AND expression #binaryOpExp + | expression DOUBLE_VERTICAL_CYLINDER expression #binaryOpExp + | primaryExpression #primaryExp + ; + +primaryExpression + : OPEN_BRACKET expression CLOSE_BRACKET #parenthesisExp + | CONSTANT #constantAtom + | NUMBER #numericAtom + | STRING #stringAtom + | IDENTIFIER #idAtom + | stringInterpolation #stringInterpolationAtom + | primaryExpression DOT IDENTIFIER #memberAccessExp + | primaryExpression OPEN_BRACKET argsList? CLOSE_BRACKET #funcInvokeExp + | primaryExpression OPEN_SQUARE_BRACKET expression CLOSE_SQUARE_BRACKET #indexAccessExp + ; + +stringInterpolation + : STRING_INTERPOLATION_START (ESCAPE_CHARACTER | TEMPLATE | textContent)+ STRING_INTERPOLATION_START + ; + +textContent + : TEXT_CONTENT+ + ; + +argsList + : expression (COMMA expression)* + ; \ No newline at end of file diff --git a/libraries/adaptive-expressions/src/parser/expressionEngine.ts b/libraries/adaptive-expressions/src/parser/expressionEngine.ts index 1101f62751..3304a7acf1 100644 --- a/libraries/adaptive-expressions/src/parser/expressionEngine.ts +++ b/libraries/adaptive-expressions/src/parser/expressionEngine.ts @@ -8,14 +8,14 @@ */ import { ANTLRInputStream, CommonTokenStream } from 'antlr4ts'; // tslint:disable-next-line: no-submodule-imports -import { AbstractParseTreeVisitor, ParseTree } from 'antlr4ts/tree'; +import { AbstractParseTreeVisitor, ParseTree, TerminalNode } from 'antlr4ts/tree'; import { ExpressionFunctions } from '../expressionFunctions'; import { Constant } from '../constant'; import { Expression } from '../expression'; import { EvaluatorLookup } from '../expressionEvaluator'; import { ExpressionParserInterface } from '../expressionParser'; import { ExpressionType } from '../expressionType'; -import { ExpressionLexer, ExpressionParser, ExpressionVisitor } from './generated'; +import { ExpressionLexer, ExpressionParser, ExpressionParserVisitor } from './generated'; import * as ep from './generated/ExpressionParser'; import { ParseErrorListener } from './parseErrorListener'; import { Util } from './util'; @@ -30,7 +30,7 @@ export class ExpressionEngine implements ExpressionParserInterface { public readonly EvaluatorLookup: EvaluatorLookup; // tslint:disable-next-line: typedef - private readonly ExpressionTransformer = class extends AbstractParseTreeVisitor implements ExpressionVisitor { + private readonly ExpressionTransformer = class extends AbstractParseTreeVisitor implements ExpressionParserVisitor { private readonly _lookup: EvaluatorLookup = undefined; public constructor(lookup: EvaluatorLookup) { @@ -120,6 +120,35 @@ export class ExpressionEngine implements ExpressionParserInterface { } } + public visitStringInterpolationAtom(context: ep.StringInterpolationAtomContext): Expression { + let children: Expression[] = []; + + for (const node of context.stringInterpolation().children) { + if (node instanceof TerminalNode){ + switch((node as TerminalNode).symbol.type) { + case ep.ExpressionParser.TEMPLATE: + const expressionString = this.trimExpression(node.text); + children.push(new ExpressionEngine(this._lookup).parse(expressionString)); + break; + case ep.ExpressionParser.TEXT_CONTENT: + children.push(new Constant(node.text)); + break; + case ep.ExpressionParser.ESCAPE_CHARACTER: + children.push(new Constant(Util.unescape(node.text))); + break; + default: + break; + } + } else { + children.push(new Constant(node.text)); + } + + } + + return this.MakeExpression(ExpressionType.Concat, ...children); + + } + public visitConstantAtom(context: ep.ConstantAtomContext): Expression { let text: string = context.text; if (text.startsWith('[') && text.endsWith(']')) { @@ -154,6 +183,23 @@ export class ExpressionEngine implements ExpressionParserInterface { return result; } + + private trimExpression(expression: string): string { + let result = expression.trim(); + if (result.startsWith('$')) { + result = result.substr(1); + } + + result = result.trim(); + + if (result.startsWith('{') && result.endsWith('}')) { + result = result.substr(1, result.length - 2); + } + + return result.trim(); + } + + }; public constructor(lookup?: EvaluatorLookup) { diff --git a/libraries/adaptive-expressions/src/parser/generated/ExpressionLexer.ts b/libraries/adaptive-expressions/src/parser/generated/ExpressionLexer.ts index b35ed8a810..c2dbed2ec5 100644 --- a/libraries/adaptive-expressions/src/parser/generated/ExpressionLexer.ts +++ b/libraries/adaptive-expressions/src/parser/generated/ExpressionLexer.ts @@ -1,4 +1,4 @@ -// Generated from ../Expression.g4 by ANTLR 4.6-SNAPSHOT +// Generated from ../ExpressionLexer.g4 by ANTLR 4.6-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; @@ -16,29 +16,29 @@ import * as Utils from "antlr4ts/misc/Utils"; export class ExpressionLexer extends Lexer { - public static readonly T__0 = 1; - public static readonly T__1 = 2; - public static readonly T__2 = 3; - public static readonly T__3 = 4; - public static readonly T__4 = 5; - public static readonly T__5 = 6; - public static readonly T__6 = 7; - public static readonly T__7 = 8; - public static readonly T__8 = 9; - public static readonly T__9 = 10; - public static readonly T__10 = 11; - public static readonly T__11 = 12; - public static readonly T__12 = 13; - public static readonly T__13 = 14; - public static readonly T__14 = 15; - public static readonly T__15 = 16; - public static readonly T__16 = 17; - public static readonly T__17 = 18; - public static readonly T__18 = 19; - public static readonly T__19 = 20; - public static readonly T__20 = 21; - public static readonly T__21 = 22; - public static readonly T__22 = 23; + public static readonly STRING_INTERPOLATION_START = 1; + public static readonly PLUS = 2; + public static readonly SUBSTRACT = 3; + public static readonly NON = 4; + public static readonly XOR = 5; + public static readonly ASTERISK = 6; + public static readonly SLASH = 7; + public static readonly PERCENT = 8; + public static readonly DOUBLE_EQUAL = 9; + public static readonly NOT_EQUAL = 10; + public static readonly SINGLE_AND = 11; + public static readonly DOUBLE_AND = 12; + public static readonly DOUBLE_VERTICAL_CYLINDER = 13; + public static readonly LESS_THAN = 14; + public static readonly MORE_THAN = 15; + public static readonly LESS_OR_EQUAl = 16; + public static readonly MORE_OR_EQUAL = 17; + public static readonly OPEN_BRACKET = 18; + public static readonly CLOSE_BRACKET = 19; + public static readonly DOT = 20; + public static readonly OPEN_SQUARE_BRACKET = 21; + public static readonly CLOSE_SQUARE_BRACKET = 22; + public static readonly COMMA = 23; public static readonly NUMBER = 24; public static readonly WHITESPACE = 25; public static readonly IDENTIFIER = 26; @@ -46,30 +46,38 @@ export class ExpressionLexer extends Lexer { public static readonly STRING = 28; public static readonly CONSTANT = 29; public static readonly INVALID_TOKEN_DEFAULT_MODE = 30; + public static readonly TEMPLATE = 31; + public static readonly ESCAPE_CHARACTER = 32; + public static readonly TEXT_CONTENT = 33; + public static readonly STRING_INTERPOLATION_MODE = 1; // tslint:disable:no-trailing-whitespace public static readonly modeNames: string[] = [ - "DEFAULT_MODE", + "DEFAULT_MODE", "STRING_INTERPOLATION_MODE", ]; public static readonly ruleNames: string[] = [ - "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", - "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", - "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "LETTER", "DIGIT", - "NUMBER", "WHITESPACE", "IDENTIFIER", "NEWLINE", "STRING", "CONSTANT", - "INVALID_TOKEN_DEFAULT_MODE", + "LETTER", "DIGIT", "STRING_INTERPOLATION_START", "PLUS", "SUBSTRACT", + "NON", "XOR", "ASTERISK", "SLASH", "PERCENT", "DOUBLE_EQUAL", "NOT_EQUAL", + "SINGLE_AND", "DOUBLE_AND", "DOUBLE_VERTICAL_CYLINDER", "LESS_THAN", "MORE_THAN", + "LESS_OR_EQUAl", "MORE_OR_EQUAL", "OPEN_BRACKET", "CLOSE_BRACKET", "DOT", + "OPEN_SQUARE_BRACKET", "CLOSE_SQUARE_BRACKET", "COMMA", "NUMBER", "WHITESPACE", + "IDENTIFIER", "NEWLINE", "STRING", "CONSTANT", "INVALID_TOKEN_DEFAULT_MODE", + "STRING_INTERPOLATION_END", "TEMPLATE", "ESCAPE_CHARACTER", "TEXT_CONTENT", ]; private static readonly _LITERAL_NAMES: Array = [ - undefined, "'!'", "'-'", "'+'", "'^'", "'*'", "'/'", "'%'", "'=='", "'!='", - "'<>'", "'&'", "'<'", "'<='", "'>'", "'>='", "'&&'", "'||'", "'('", "')'", - "'.'", "'['", "']'", "','", + undefined, undefined, "'+'", "'-'", "'!'", "'^'", "'*'", "'/'", "'%'", + "'=='", undefined, "'&'", "'&&'", "'||'", "'<'", "'>'", "'<='", "'>='", + "'('", "')'", "'.'", "'['", "']'", "','", ]; private static readonly _SYMBOLIC_NAMES: Array = [ - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, "NUMBER", "WHITESPACE", "IDENTIFIER", - "NEWLINE", "STRING", "CONSTANT", "INVALID_TOKEN_DEFAULT_MODE", + undefined, "STRING_INTERPOLATION_START", "PLUS", "SUBSTRACT", "NON", "XOR", + "ASTERISK", "SLASH", "PERCENT", "DOUBLE_EQUAL", "NOT_EQUAL", "SINGLE_AND", + "DOUBLE_AND", "DOUBLE_VERTICAL_CYLINDER", "LESS_THAN", "MORE_THAN", "LESS_OR_EQUAl", + "MORE_OR_EQUAL", "OPEN_BRACKET", "CLOSE_BRACKET", "DOT", "OPEN_SQUARE_BRACKET", + "CLOSE_SQUARE_BRACKET", "COMMA", "NUMBER", "WHITESPACE", "IDENTIFIER", + "NEWLINE", "STRING", "CONSTANT", "INVALID_TOKEN_DEFAULT_MODE", "TEMPLATE", + "ESCAPE_CHARACTER", "TEXT_CONTENT", ]; public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(ExpressionLexer._LITERAL_NAMES, ExpressionLexer._SYMBOLIC_NAMES, []); @@ -81,13 +89,16 @@ export class ExpressionLexer extends Lexer { // tslint:enable:no-trailing-whitespace + ignoreWS = true; // usually we ignore whitespace, but inside stringInterpolation, whitespace is significant + + constructor(input: CharStream) { super(input); this._interp = new LexerATNSimulator(ExpressionLexer._ATN, this); } // @Override - public get grammarFileName(): string { return "Expression.g4"; } + public get grammarFileName(): string { return "ExpressionLexer.g4"; } // @Override public get ruleNames(): string[] { return ExpressionLexer.ruleNames; } @@ -98,98 +109,162 @@ export class ExpressionLexer extends Lexer { // @Override public get modeNames(): string[] { return ExpressionLexer.modeNames; } + // @Override + public action(_localctx: RuleContext, ruleIndex: number, actionIndex: number): void { + switch (ruleIndex) { + case 2: + this.STRING_INTERPOLATION_START_action(_localctx, actionIndex); + break; + + case 32: + this.STRING_INTERPOLATION_END_action(_localctx, actionIndex); + break; + } + } + private STRING_INTERPOLATION_START_action(_localctx: RuleContext, actionIndex: number): void { + switch (actionIndex) { + case 0: + this.ignoreWS = false; + break; + } + } + private STRING_INTERPOLATION_END_action(_localctx: RuleContext, actionIndex: number): void { + switch (actionIndex) { + case 1: + this.ignoreWS = true; + break; + } + } + // @Override + public sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean { + switch (ruleIndex) { + case 26: + return this.WHITESPACE_sempred(_localctx, predIndex); + } + return true; + } + private WHITESPACE_sempred(_localctx: RuleContext, predIndex: number): boolean { + switch (predIndex) { + case 0: + return this.ignoreWS; + } + return true; + } + public static readonly _serializedATN: string = - "\x03\uAF6F\u8320\u479D\uB75C\u4880\u1605\u191C\uAB37\x02 \xC9\b\x01\x04" + - "\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04" + - "\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04\r\t\r" + - "\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12\t\x12" + - "\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17\t\x17" + - "\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C\t\x1C" + - "\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x03\x02\x03" + - "\x02\x03\x03\x03\x03\x03\x04\x03\x04\x03\x05\x03\x05\x03\x06\x03\x06\x03" + - "\x07\x03\x07\x03\b\x03\b\x03\t\x03\t\x03\t\x03\n\x03\n\x03\n\x03\v\x03" + - "\v\x03\v\x03\f\x03\f\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0E\x03\x0F\x03\x0F" + - "\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x11\x03\x12\x03\x12\x03\x12" + - "\x03\x13\x03\x13\x03\x14\x03\x14\x03\x15\x03\x15\x03\x16\x03\x16\x03\x17" + - "\x03\x17\x03\x18\x03\x18\x03\x19\x03\x19\x03\x1A\x03\x1A\x03\x1B\x06\x1B" + - "~\n\x1B\r\x1B\x0E\x1B\x7F\x03\x1B\x03\x1B\x06\x1B\x84\n\x1B\r\x1B\x0E" + - "\x1B\x85\x05\x1B\x88\n\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1D\x03" + - "\x1D\x03\x1D\x03\x1D\x03\x1D\x05\x1D\x93\n\x1D\x03\x1D\x03\x1D\x03\x1D" + - "\x07\x1D\x98\n\x1D\f\x1D\x0E\x1D\x9B\v\x1D\x03\x1E\x05\x1E\x9E\n\x1E\x03" + - "\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1F\x03\x1F\x07\x1F\xA6\n\x1F\f\x1F\x0E" + - "\x1F\xA9\v\x1F\x03\x1F\x03\x1F\x03\x1F\x07\x1F\xAE\n\x1F\f\x1F\x0E\x1F" + - "\xB1\v\x1F\x03\x1F\x05\x1F\xB4\n\x1F\x03 \x03 \x07 \xB8\n \f \x0E \xBB" + - "\v \x03 \x03 \x03 \x07 \xC0\n \f \x0E \xC3\v \x03 \x05 \xC6\n \x03!\x03" + - "!\x02\x02\x02\"\x03\x02\x03\x05\x02\x04\x07\x02\x05\t\x02\x06\v\x02\x07" + - "\r\x02\b\x0F\x02\t\x11\x02\n\x13\x02\v\x15\x02\f\x17\x02\r\x19\x02\x0E" + - "\x1B\x02\x0F\x1D\x02\x10\x1F\x02\x11!\x02\x12#\x02\x13%\x02\x14\'\x02" + - "\x15)\x02\x16+\x02\x17-\x02\x18/\x02\x191\x02\x023\x02\x025\x02\x1A7\x02" + - "\x1B9\x02\x1C;\x02\x1D=\x02\x1E?\x02\x1FA\x02 \x03\x02\t\x04\x02C\\c|" + - "\x03\x022;\x06\x02\v\v\"\"\xA2\xA2\uFF01\uFF01\x05\x02%%BBaa\x04\x02/" + - "/aa\x03\x02))\x03\x02$$\xD6\x02\x03\x03\x02\x02\x02\x02\x05\x03\x02\x02" + - "\x02\x02\x07\x03\x02\x02\x02\x02\t\x03\x02\x02\x02\x02\v\x03\x02\x02\x02" + - "\x02\r\x03\x02\x02\x02\x02\x0F\x03\x02\x02\x02\x02\x11\x03\x02\x02\x02" + - "\x02\x13\x03\x02\x02\x02\x02\x15\x03\x02\x02\x02\x02\x17\x03\x02\x02\x02" + - "\x02\x19\x03\x02\x02\x02\x02\x1B\x03\x02\x02\x02\x02\x1D\x03\x02\x02\x02" + - "\x02\x1F\x03\x02\x02\x02\x02!\x03\x02\x02\x02\x02#\x03\x02\x02\x02\x02" + - "%\x03\x02\x02\x02\x02\'\x03\x02\x02\x02\x02)\x03\x02\x02\x02\x02+\x03" + - "\x02\x02\x02\x02-\x03\x02\x02\x02\x02/\x03\x02\x02\x02\x025\x03\x02\x02" + - "\x02\x027\x03\x02\x02\x02\x029\x03\x02\x02\x02\x02;\x03\x02\x02\x02\x02" + - "=\x03\x02\x02\x02\x02?\x03\x02\x02\x02\x02A\x03\x02\x02\x02\x03C\x03\x02" + - "\x02\x02\x05E\x03\x02\x02\x02\x07G\x03\x02\x02\x02\tI\x03\x02\x02\x02" + - "\vK\x03\x02\x02\x02\rM\x03\x02\x02\x02\x0FO\x03\x02\x02\x02\x11Q\x03\x02" + - "\x02\x02\x13T\x03\x02\x02\x02\x15W\x03\x02\x02\x02\x17Z\x03\x02\x02\x02" + - "\x19\\\x03\x02\x02\x02\x1B^\x03\x02\x02\x02\x1Da\x03\x02\x02\x02\x1Fc" + - "\x03\x02\x02\x02!f\x03\x02\x02\x02#i\x03\x02\x02\x02%l\x03\x02\x02\x02" + - "\'n\x03\x02\x02\x02)p\x03\x02\x02\x02+r\x03\x02\x02\x02-t\x03\x02\x02" + - "\x02/v\x03\x02\x02\x021x\x03\x02\x02\x023z\x03\x02\x02\x025}\x03\x02\x02" + - "\x027\x89\x03\x02\x02\x029\x92\x03\x02\x02\x02;\x9D\x03\x02\x02\x02=\xB3" + - "\x03\x02\x02\x02?\xC5\x03\x02\x02\x02A\xC7\x03\x02\x02\x02CD\x07#\x02" + - "\x02D\x04\x03\x02\x02\x02EF\x07/\x02\x02F\x06\x03\x02\x02\x02GH\x07-\x02" + - "\x02H\b\x03\x02\x02\x02IJ\x07`\x02\x02J\n\x03\x02\x02\x02KL\x07,\x02\x02" + - "L\f\x03\x02\x02\x02MN\x071\x02\x02N\x0E\x03\x02\x02\x02OP\x07\'\x02\x02" + - "P\x10\x03\x02\x02\x02QR\x07?\x02\x02RS\x07?\x02\x02S\x12\x03\x02\x02\x02" + - "TU\x07#\x02\x02UV\x07?\x02\x02V\x14\x03\x02\x02\x02WX\x07>\x02\x02XY\x07" + - "@\x02\x02Y\x16\x03\x02\x02\x02Z[\x07(\x02\x02[\x18\x03\x02\x02\x02\\]" + - "\x07>\x02\x02]\x1A\x03\x02\x02\x02^_\x07>\x02\x02_`\x07?\x02\x02`\x1C" + - "\x03\x02\x02\x02ab\x07@\x02\x02b\x1E\x03\x02\x02\x02cd\x07@\x02\x02de" + - "\x07?\x02\x02e \x03\x02\x02\x02fg\x07(\x02\x02gh\x07(\x02\x02h\"\x03\x02" + - "\x02\x02ij\x07~\x02\x02jk\x07~\x02\x02k$\x03\x02\x02\x02lm\x07*\x02\x02" + - "m&\x03\x02\x02\x02no\x07+\x02\x02o(\x03\x02\x02\x02pq\x070\x02\x02q*\x03" + - "\x02\x02\x02rs\x07]\x02\x02s,\x03\x02\x02\x02tu\x07_\x02\x02u.\x03\x02" + - "\x02\x02vw\x07.\x02\x02w0\x03\x02\x02\x02xy\t\x02\x02\x02y2\x03\x02\x02" + - "\x02z{\t\x03\x02\x02{4\x03\x02\x02\x02|~\x053\x1A\x02}|\x03\x02\x02\x02" + - "~\x7F\x03\x02\x02\x02\x7F}\x03\x02\x02\x02\x7F\x80\x03\x02\x02\x02\x80" + - "\x87\x03\x02\x02\x02\x81\x83\x070\x02\x02\x82\x84\x053\x1A\x02\x83\x82" + - "\x03\x02\x02\x02\x84\x85\x03\x02\x02\x02\x85\x83\x03\x02\x02\x02\x85\x86" + - "\x03\x02\x02\x02\x86\x88\x03\x02\x02\x02\x87\x81\x03\x02\x02\x02\x87\x88" + - "\x03\x02\x02\x02\x886\x03\x02\x02\x02\x89\x8A\t\x04\x02\x02\x8A\x8B\x03" + - "\x02\x02\x02\x8B\x8C\b\x1C\x02\x02\x8C8\x03\x02\x02\x02\x8D\x93\x051\x19" + - "\x02\x8E\x93\t\x05\x02\x02\x8F\x90\x07B\x02\x02\x90\x93\x07B\x02\x02\x91" + - "\x93\x04&\'\x02\x92\x8D\x03\x02\x02\x02\x92\x8E\x03\x02\x02\x02\x92\x8F" + - "\x03\x02\x02\x02\x92\x91\x03\x02\x02\x02\x93\x99\x03\x02\x02\x02\x94\x98" + - "\x051\x19\x02\x95\x98\x053\x1A\x02\x96\x98\t\x06\x02\x02\x97\x94\x03\x02" + - "\x02\x02\x97\x95\x03\x02\x02\x02\x97\x96\x03\x02\x02\x02\x98\x9B\x03\x02" + - "\x02\x02\x99\x97\x03\x02\x02\x02\x99\x9A\x03\x02\x02\x02\x9A:\x03\x02" + - "\x02\x02\x9B\x99\x03\x02\x02\x02\x9C\x9E\x07\x0F\x02\x02\x9D\x9C\x03\x02" + - "\x02\x02\x9D\x9E\x03\x02\x02\x02\x9E\x9F\x03\x02\x02\x02\x9F\xA0\x07\f" + - "\x02\x02\xA0\xA1\x03\x02\x02\x02\xA1\xA2\b\x1E\x02\x02\xA2<\x03\x02\x02" + - "\x02\xA3\xA7\x07)\x02\x02\xA4\xA6\n\x07\x02\x02\xA5\xA4\x03\x02\x02\x02" + - "\xA6\xA9\x03\x02\x02\x02\xA7\xA5\x03\x02\x02\x02\xA7\xA8\x03\x02\x02\x02" + - "\xA8\xAA\x03\x02\x02\x02\xA9\xA7\x03\x02\x02\x02\xAA\xB4\x07)\x02\x02" + - "\xAB\xAF\x07$\x02\x02\xAC\xAE\n\b\x02\x02\xAD\xAC\x03\x02\x02\x02\xAE" + - "\xB1\x03\x02\x02\x02\xAF\xAD\x03\x02\x02\x02\xAF\xB0\x03\x02\x02\x02\xB0" + - "\xB2\x03\x02\x02\x02\xB1\xAF\x03\x02\x02\x02\xB2\xB4\x07$\x02\x02\xB3" + - "\xA3\x03\x02\x02\x02\xB3\xAB\x03\x02\x02\x02\xB4>\x03\x02\x02\x02\xB5" + - "\xB9\x07]\x02\x02\xB6\xB8\x057\x1C\x02\xB7\xB6\x03\x02\x02\x02\xB8\xBB" + - "\x03\x02\x02\x02\xB9\xB7\x03\x02\x02\x02\xB9\xBA\x03\x02\x02\x02\xBA\xBC" + - "\x03\x02\x02\x02\xBB\xB9\x03\x02\x02\x02\xBC\xC6\x07_\x02\x02\xBD\xC1" + - "\x07}\x02\x02\xBE\xC0\x057\x1C\x02\xBF\xBE\x03\x02\x02\x02\xC0\xC3\x03" + - "\x02\x02\x02\xC1\xBF\x03\x02\x02\x02\xC1\xC2\x03\x02\x02\x02\xC2\xC4\x03" + - "\x02\x02\x02\xC3\xC1\x03\x02\x02\x02\xC4\xC6\x07\x7F\x02\x02\xC5\xB5\x03" + - "\x02\x02\x02\xC5\xBD\x03\x02\x02\x02\xC6@\x03\x02\x02\x02\xC7\xC8\v\x02" + - "\x02\x02\xC8B\x03\x02\x02\x02\x10\x02\x7F\x85\x87\x92\x97\x99\x9D\xA7" + - "\xAF\xB3\xB9\xC1\xC5\x03\b\x02\x02"; + "\x03\uAF6F\u8320\u479D\uB75C\u4880\u1605\u191C\uAB37\x02#\xF5\b\x01\b" + + "\x01\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t" + + "\x06\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t\n\x04\v\t\v\x04\f\t\f\x04" + + "\r\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t\x10\x04\x11\t\x11\x04\x12" + + "\t\x12\x04\x13\t\x13\x04\x14\t\x14\x04\x15\t\x15\x04\x16\t\x16\x04\x17" + + "\t\x17\x04\x18\t\x18\x04\x19\t\x19\x04\x1A\t\x1A\x04\x1B\t\x1B\x04\x1C" + + "\t\x1C\x04\x1D\t\x1D\x04\x1E\t\x1E\x04\x1F\t\x1F\x04 \t \x04!\t!\x04\"" + + "\t\"\x04#\t#\x04$\t$\x04%\t%\x03\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03" + + "\x04\x03\x04\x03\x04\x03\x04\x03\x05\x03\x05\x03\x06\x03\x06\x03\x07\x03" + + "\x07\x03\b\x03\b\x03\t\x03\t\x03\n\x03\n\x03\v\x03\v\x03\f\x03\f\x03\f" + + "\x03\r\x03\r\x03\r\x03\r\x05\rk\n\r\x03\x0E\x03\x0E\x03\x0F\x03\x0F\x03" + + "\x0F\x03\x10\x03\x10\x03\x10\x03\x11\x03\x11\x03\x12\x03\x12\x03\x13\x03" + + "\x13\x03\x13\x03\x14\x03\x14\x03\x14\x03\x15\x03\x15\x03\x16\x03\x16\x03" + + "\x17\x03\x17\x03\x18\x03\x18\x03\x19\x03\x19\x03\x1A\x03\x1A\x03\x1B\x06" + + "\x1B\x8C\n\x1B\r\x1B\x0E\x1B\x8D\x03\x1B\x03\x1B\x06\x1B\x92\n\x1B\r\x1B" + + "\x0E\x1B\x93\x05\x1B\x96\n\x1B\x03\x1C\x03\x1C\x03\x1C\x03\x1C\x03\x1C" + + "\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x03\x1D\x05\x1D\xA2\n\x1D\x03\x1D\x03" + + "\x1D\x03\x1D\x07\x1D\xA7\n\x1D\f\x1D\x0E\x1D\xAA\v\x1D\x03\x1D\x05\x1D" + + "\xAD\n\x1D\x03\x1E\x05\x1E\xB0\n\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03" + + "\x1F\x03\x1F\x07\x1F\xB8\n\x1F\f\x1F\x0E\x1F\xBB\v\x1F\x03\x1F\x03\x1F" + + "\x03\x1F\x07\x1F\xC0\n\x1F\f\x1F\x0E\x1F\xC3\v\x1F\x03\x1F\x05\x1F\xC6" + + "\n\x1F\x03 \x03 \x07 \xCA\n \f \x0E \xCD\v \x03 \x03 \x03 \x07 \xD2\n" + + " \f \x0E \xD5\v \x03 \x05 \xD8\n \x03!\x03!\x03\"\x03\"\x03\"\x03\"\x03" + + "\"\x03\"\x03#\x03#\x03#\x03#\x07#\xE6\n#\f#\x0E#\xE9\v#\x03#\x03#\x03" + + "$\x03$\x05$\xEF\n$\x03%\x03%\x03%\x05%\xF4\n%\x03\xE7\x02\x02&\x04\x02" + + "\x02\x06\x02\x02\b\x02\x03\n\x02\x04\f\x02\x05\x0E\x02\x06\x10\x02\x07" + + "\x12\x02\b\x14\x02\t\x16\x02\n\x18\x02\v\x1A\x02\f\x1C\x02\r\x1E\x02\x0E" + + " \x02\x0F\"\x02\x10$\x02\x11&\x02\x12(\x02\x13*\x02\x14,\x02\x15.\x02" + + "\x160\x02\x172\x02\x184\x02\x196\x02\x1A8\x02\x1B:\x02\x1C<\x02\x1D>\x02" + + "\x1E@\x02\x1FB\x02 D\x02\x02F\x02!H\x02\"J\x02#\x04\x02\x03\v\x04\x02" + + "C\\c|\x03\x022;\x06\x02\v\v\"\"\xA2\xA2\uFF01\uFF01\x05\x02%%BBaa\x04" + + "\x02//aa\x03\x02))\x03\x02$$\b\x02\f\f\x0F\x0F$$))}}\x7F\x7F\x04\x02\f" + + "\f\x0F\x0F\u0107\x02\b\x03\x02\x02\x02\x02\n\x03\x02\x02\x02\x02\f\x03" + + "\x02\x02\x02\x02\x0E\x03\x02\x02\x02\x02\x10\x03\x02\x02\x02\x02\x12\x03" + + "\x02\x02\x02\x02\x14\x03\x02\x02\x02\x02\x16\x03\x02\x02\x02\x02\x18\x03" + + "\x02\x02\x02\x02\x1A\x03\x02\x02\x02\x02\x1C\x03\x02\x02\x02\x02\x1E\x03" + + "\x02\x02\x02\x02 \x03\x02\x02\x02\x02\"\x03\x02\x02\x02\x02$\x03\x02\x02" + + "\x02\x02&\x03\x02\x02\x02\x02(\x03\x02\x02\x02\x02*\x03\x02\x02\x02\x02" + + ",\x03\x02\x02\x02\x02.\x03\x02\x02\x02\x020\x03\x02\x02\x02\x022\x03\x02" + + "\x02\x02\x024\x03\x02\x02\x02\x026\x03\x02\x02\x02\x028\x03\x02\x02\x02" + + "\x02:\x03\x02\x02\x02\x02<\x03\x02\x02\x02\x02>\x03\x02\x02\x02\x02@\x03" + + "\x02\x02\x02\x02B\x03\x02\x02\x02\x03D\x03\x02\x02\x02\x03F\x03\x02\x02" + + "\x02\x03H\x03\x02\x02\x02\x03J\x03\x02\x02\x02\x04L\x03\x02\x02\x02\x06" + + "N\x03\x02\x02\x02\bP\x03\x02\x02\x02\nU\x03\x02\x02\x02\fW\x03\x02\x02" + + "\x02\x0EY\x03\x02\x02\x02\x10[\x03\x02\x02\x02\x12]\x03\x02\x02\x02\x14" + + "_\x03\x02\x02\x02\x16a\x03\x02\x02\x02\x18c\x03\x02\x02\x02\x1Aj\x03\x02" + + "\x02\x02\x1Cl\x03\x02\x02\x02\x1En\x03\x02\x02\x02 q\x03\x02\x02\x02\"" + + "t\x03\x02\x02\x02$v\x03\x02\x02\x02&x\x03\x02\x02\x02({\x03\x02\x02\x02" + + "*~\x03\x02\x02\x02,\x80\x03\x02\x02\x02.\x82\x03\x02\x02\x020\x84\x03" + + "\x02\x02\x022\x86\x03\x02\x02\x024\x88\x03\x02\x02\x026\x8B\x03\x02\x02" + + "\x028\x97\x03\x02\x02\x02:\xA1\x03\x02\x02\x02<\xAF\x03\x02\x02\x02>\xC5" + + "\x03\x02\x02\x02@\xD7\x03\x02\x02\x02B\xD9\x03\x02\x02\x02D\xDB\x03\x02" + + "\x02\x02F\xE1\x03\x02\x02\x02H\xEC\x03\x02\x02\x02J\xF3\x03\x02\x02\x02" + + "LM\t\x02\x02\x02M\x05\x03\x02\x02\x02NO\t\x03\x02\x02O\x07\x03\x02\x02" + + "\x02PQ\x07b\x02\x02QR\b\x04\x02\x02RS\x03\x02\x02\x02ST\b\x04\x03\x02" + + "T\t\x03\x02\x02\x02UV\x07-\x02\x02V\v\x03\x02\x02\x02WX\x07/\x02\x02X" + + "\r\x03\x02\x02\x02YZ\x07#\x02\x02Z\x0F\x03\x02\x02\x02[\\\x07`\x02\x02" + + "\\\x11\x03\x02\x02\x02]^\x07,\x02\x02^\x13\x03\x02\x02\x02_`\x071\x02" + + "\x02`\x15\x03\x02\x02\x02ab\x07\'\x02\x02b\x17\x03\x02\x02\x02cd\x07?" + + "\x02\x02de\x07?\x02\x02e\x19\x03\x02\x02\x02fg\x07#\x02\x02gk\x07?\x02" + + "\x02hi\x07>\x02\x02ik\x07@\x02\x02jf\x03\x02\x02\x02jh\x03\x02\x02\x02" + + "k\x1B\x03\x02\x02\x02lm\x07(\x02\x02m\x1D\x03\x02\x02\x02no\x07(\x02\x02" + + "op\x07(\x02\x02p\x1F\x03\x02\x02\x02qr\x07~\x02\x02rs\x07~\x02\x02s!\x03" + + "\x02\x02\x02tu\x07>\x02\x02u#\x03\x02\x02\x02vw\x07@\x02\x02w%\x03\x02" + + "\x02\x02xy\x07>\x02\x02yz\x07?\x02\x02z\'\x03\x02\x02\x02{|\x07@\x02\x02" + + "|}\x07?\x02\x02})\x03\x02\x02\x02~\x7F\x07*\x02\x02\x7F+\x03\x02\x02\x02" + + "\x80\x81\x07+\x02\x02\x81-\x03\x02\x02\x02\x82\x83\x070\x02\x02\x83/\x03" + + "\x02\x02\x02\x84\x85\x07]\x02\x02\x851\x03\x02\x02\x02\x86\x87\x07_\x02" + + "\x02\x873\x03\x02\x02\x02\x88\x89\x07.\x02\x02\x895\x03\x02\x02\x02\x8A" + + "\x8C\x05\x06\x03\x02\x8B\x8A\x03\x02\x02\x02\x8C\x8D\x03\x02\x02\x02\x8D" + + "\x8B\x03\x02\x02\x02\x8D\x8E\x03\x02\x02\x02\x8E\x95\x03\x02\x02\x02\x8F" + + "\x91\x070\x02\x02\x90\x92\x05\x06\x03\x02\x91\x90\x03\x02\x02\x02\x92" + + "\x93\x03\x02\x02\x02\x93\x91\x03\x02\x02\x02\x93\x94\x03\x02\x02\x02\x94" + + "\x96\x03\x02\x02\x02\x95\x8F\x03\x02\x02\x02\x95\x96\x03\x02\x02\x02\x96" + + "7\x03\x02\x02\x02\x97\x98\t\x04\x02\x02\x98\x99\x06\x1C\x02\x02\x99\x9A" + + "\x03\x02\x02\x02\x9A\x9B\b\x1C\x04\x02\x9B9\x03\x02\x02\x02\x9C\xA2\x05" + + "\x04\x02\x02\x9D\xA2\t\x05\x02\x02\x9E\x9F\x07B\x02\x02\x9F\xA2\x07B\x02" + + "\x02\xA0\xA2\x04&\'\x02\xA1\x9C\x03\x02\x02\x02\xA1\x9D\x03\x02\x02\x02" + + "\xA1\x9E\x03\x02\x02\x02\xA1\xA0\x03\x02\x02\x02\xA2\xA8\x03\x02\x02\x02" + + "\xA3\xA7\x05\x04\x02\x02\xA4\xA7\x05\x06\x03\x02\xA5\xA7\t\x06\x02\x02" + + "\xA6\xA3\x03\x02\x02\x02\xA6\xA4\x03\x02\x02\x02\xA6\xA5\x03\x02\x02\x02" + + "\xA7\xAA\x03\x02\x02\x02\xA8\xA6\x03\x02\x02\x02\xA8\xA9\x03\x02\x02\x02" + + "\xA9\xAC\x03\x02\x02\x02\xAA\xA8\x03\x02\x02\x02\xAB\xAD\x07#\x02\x02" + + "\xAC\xAB\x03\x02\x02\x02\xAC\xAD\x03\x02\x02\x02\xAD;\x03\x02\x02\x02" + + "\xAE\xB0\x07\x0F\x02\x02\xAF\xAE\x03\x02\x02\x02\xAF\xB0\x03\x02\x02\x02" + + "\xB0\xB1\x03\x02\x02\x02\xB1\xB2\x07\f\x02\x02\xB2\xB3\x03\x02\x02\x02" + + "\xB3\xB4\b\x1E\x04\x02\xB4=\x03\x02\x02\x02\xB5\xB9\x07)\x02\x02\xB6\xB8" + + "\n\x07\x02\x02\xB7\xB6\x03\x02\x02\x02\xB8\xBB\x03\x02\x02\x02\xB9\xB7" + + "\x03\x02\x02\x02\xB9\xBA\x03\x02\x02\x02\xBA\xBC\x03\x02\x02\x02\xBB\xB9" + + "\x03\x02\x02\x02\xBC\xC6\x07)\x02\x02\xBD\xC1\x07$\x02\x02\xBE\xC0\n\b" + + "\x02\x02\xBF\xBE\x03\x02\x02\x02\xC0\xC3\x03\x02\x02\x02\xC1\xBF\x03\x02" + + "\x02\x02\xC1\xC2\x03\x02\x02\x02\xC2\xC4\x03\x02\x02\x02\xC3\xC1\x03\x02" + + "\x02\x02\xC4\xC6\x07$\x02\x02\xC5\xB5\x03\x02\x02\x02\xC5\xBD\x03\x02" + + "\x02\x02\xC6?\x03\x02\x02\x02\xC7\xCB\x07]\x02\x02\xC8\xCA\x058\x1C\x02" + + "\xC9\xC8\x03\x02\x02\x02\xCA\xCD\x03\x02\x02\x02\xCB\xC9\x03\x02\x02\x02" + + "\xCB\xCC\x03\x02\x02\x02\xCC\xCE\x03\x02\x02\x02\xCD\xCB\x03\x02\x02\x02" + + "\xCE\xD8\x07_\x02\x02\xCF\xD3\x07}\x02\x02\xD0\xD2\x058\x1C\x02\xD1\xD0" + + "\x03\x02\x02\x02\xD2\xD5\x03\x02\x02\x02\xD3\xD1\x03\x02\x02\x02\xD3\xD4" + + "\x03\x02\x02\x02\xD4\xD6\x03\x02\x02\x02\xD5\xD3\x03\x02\x02\x02\xD6\xD8" + + "\x07\x7F\x02\x02\xD7\xC7\x03\x02\x02\x02\xD7\xCF\x03\x02\x02\x02\xD8A" + + "\x03\x02\x02\x02\xD9\xDA\v\x02\x02\x02\xDAC\x03\x02\x02\x02\xDB\xDC\x07" + + "b\x02\x02\xDC\xDD\b\"\x05\x02\xDD\xDE\x03\x02\x02\x02\xDE\xDF\b\"\x06" + + "\x02\xDF\xE0\b\"\x07\x02\xE0E\x03\x02\x02\x02\xE1\xE2\x07&\x02\x02\xE2" + + "\xE7\x07}\x02\x02\xE3\xE6\x05>\x1F\x02\xE4\xE6\n\t\x02\x02\xE5\xE3\x03" + + "\x02\x02\x02\xE5\xE4\x03\x02\x02\x02\xE6\xE9\x03\x02\x02\x02\xE7\xE8\x03" + + "\x02\x02\x02\xE7\xE5\x03\x02\x02\x02\xE8\xEA\x03\x02\x02\x02\xE9\xE7\x03" + + "\x02\x02\x02\xEA\xEB\x07\x7F\x02\x02\xEBG\x03\x02\x02\x02\xEC\xEE\x07" + + "^\x02\x02\xED\xEF\n\n\x02\x02\xEE\xED\x03\x02\x02\x02\xEE\xEF\x03\x02" + + "\x02\x02\xEFI\x03\x02\x02\x02\xF0\xF1\x07^\x02\x02\xF1\xF4\x07b\x02\x02" + + "\xF2\xF4\n\n\x02\x02\xF3\xF0\x03\x02\x02\x02\xF3\xF2\x03\x02\x02\x02\xF4" + + "K\x03\x02\x02\x02\x17\x02\x03j\x8D\x93\x95\xA1\xA6\xA8\xAC\xAF\xB9\xC1" + + "\xC5\xCB\xD3\xD7\xE5\xE7\xEE\xF3\b\x03\x04\x02\x07\x03\x02\b\x02\x02\x03" + + "\"\x03\t\x03\x02\x06\x02\x02"; public static __ATN: ATN; public static get _ATN(): ATN { if (!ExpressionLexer.__ATN) { diff --git a/libraries/adaptive-expressions/src/parser/generated/ExpressionParser.ts b/libraries/adaptive-expressions/src/parser/generated/ExpressionParser.ts index 3af64af390..a6ac84a456 100644 --- a/libraries/adaptive-expressions/src/parser/generated/ExpressionParser.ts +++ b/libraries/adaptive-expressions/src/parser/generated/ExpressionParser.ts @@ -1,4 +1,4 @@ -// Generated from ../Expression.g4 by ANTLR 4.6-SNAPSHOT +// Generated from ../ExpressionParser.g4 by ANTLR 4.6-SNAPSHOT import { ATN } from "antlr4ts/atn/ATN"; @@ -23,34 +23,34 @@ import { VocabularyImpl } from "antlr4ts/VocabularyImpl"; import * as Utils from "antlr4ts/misc/Utils"; -import { ExpressionListener } from "./ExpressionListener"; -import { ExpressionVisitor } from "./ExpressionVisitor"; +import { ExpressionParserListener } from "./ExpressionParserListener"; +import { ExpressionParserVisitor } from "./ExpressionParserVisitor"; export class ExpressionParser extends Parser { - public static readonly T__0 = 1; - public static readonly T__1 = 2; - public static readonly T__2 = 3; - public static readonly T__3 = 4; - public static readonly T__4 = 5; - public static readonly T__5 = 6; - public static readonly T__6 = 7; - public static readonly T__7 = 8; - public static readonly T__8 = 9; - public static readonly T__9 = 10; - public static readonly T__10 = 11; - public static readonly T__11 = 12; - public static readonly T__12 = 13; - public static readonly T__13 = 14; - public static readonly T__14 = 15; - public static readonly T__15 = 16; - public static readonly T__16 = 17; - public static readonly T__17 = 18; - public static readonly T__18 = 19; - public static readonly T__19 = 20; - public static readonly T__20 = 21; - public static readonly T__21 = 22; - public static readonly T__22 = 23; + public static readonly STRING_INTERPOLATION_START = 1; + public static readonly PLUS = 2; + public static readonly SUBSTRACT = 3; + public static readonly NON = 4; + public static readonly XOR = 5; + public static readonly ASTERISK = 6; + public static readonly SLASH = 7; + public static readonly PERCENT = 8; + public static readonly DOUBLE_EQUAL = 9; + public static readonly NOT_EQUAL = 10; + public static readonly SINGLE_AND = 11; + public static readonly DOUBLE_AND = 12; + public static readonly DOUBLE_VERTICAL_CYLINDER = 13; + public static readonly LESS_THAN = 14; + public static readonly MORE_THAN = 15; + public static readonly LESS_OR_EQUAl = 16; + public static readonly MORE_OR_EQUAL = 17; + public static readonly OPEN_BRACKET = 18; + public static readonly CLOSE_BRACKET = 19; + public static readonly DOT = 20; + public static readonly OPEN_SQUARE_BRACKET = 21; + public static readonly CLOSE_SQUARE_BRACKET = 22; + public static readonly COMMA = 23; public static readonly NUMBER = 24; public static readonly WHITESPACE = 25; public static readonly IDENTIFIER = 26; @@ -58,26 +58,34 @@ export class ExpressionParser extends Parser { public static readonly STRING = 28; public static readonly CONSTANT = 29; public static readonly INVALID_TOKEN_DEFAULT_MODE = 30; + public static readonly TEMPLATE = 31; + public static readonly ESCAPE_CHARACTER = 32; + public static readonly TEXT_CONTENT = 33; public static readonly RULE_file = 0; public static readonly RULE_expression = 1; public static readonly RULE_primaryExpression = 2; - public static readonly RULE_argsList = 3; + public static readonly RULE_stringInterpolation = 3; + public static readonly RULE_textContent = 4; + public static readonly RULE_argsList = 5; // tslint:disable:no-trailing-whitespace public static readonly ruleNames: string[] = [ - "file", "expression", "primaryExpression", "argsList", + "file", "expression", "primaryExpression", "stringInterpolation", "textContent", + "argsList", ]; private static readonly _LITERAL_NAMES: Array = [ - undefined, "'!'", "'-'", "'+'", "'^'", "'*'", "'/'", "'%'", "'=='", "'!='", - "'<>'", "'&'", "'<'", "'<='", "'>'", "'>='", "'&&'", "'||'", "'('", "')'", - "'.'", "'['", "']'", "','", + undefined, undefined, "'+'", "'-'", "'!'", "'^'", "'*'", "'/'", "'%'", + "'=='", undefined, "'&'", "'&&'", "'||'", "'<'", "'>'", "'<='", "'>='", + "'('", "')'", "'.'", "'['", "']'", "','", ]; private static readonly _SYMBOLIC_NAMES: Array = [ - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, "NUMBER", "WHITESPACE", "IDENTIFIER", - "NEWLINE", "STRING", "CONSTANT", "INVALID_TOKEN_DEFAULT_MODE", + undefined, "STRING_INTERPOLATION_START", "PLUS", "SUBSTRACT", "NON", "XOR", + "ASTERISK", "SLASH", "PERCENT", "DOUBLE_EQUAL", "NOT_EQUAL", "SINGLE_AND", + "DOUBLE_AND", "DOUBLE_VERTICAL_CYLINDER", "LESS_THAN", "MORE_THAN", "LESS_OR_EQUAl", + "MORE_OR_EQUAL", "OPEN_BRACKET", "CLOSE_BRACKET", "DOT", "OPEN_SQUARE_BRACKET", + "CLOSE_SQUARE_BRACKET", "COMMA", "NUMBER", "WHITESPACE", "IDENTIFIER", + "NEWLINE", "STRING", "CONSTANT", "INVALID_TOKEN_DEFAULT_MODE", "TEMPLATE", + "ESCAPE_CHARACTER", "TEXT_CONTENT", ]; public static readonly VOCABULARY: Vocabulary = new VocabularyImpl(ExpressionParser._LITERAL_NAMES, ExpressionParser._SYMBOLIC_NAMES, []); @@ -89,7 +97,7 @@ export class ExpressionParser extends Parser { // tslint:enable:no-trailing-whitespace // @Override - public get grammarFileName(): string { return "Expression.g4"; } + public get grammarFileName(): string { return "ExpressionParser.g4"; } // @Override public get ruleNames(): string[] { return ExpressionParser.ruleNames; } @@ -108,9 +116,9 @@ export class ExpressionParser extends Parser { try { this.enterOuterAlt(_localctx, 1); { - this.state = 8; + this.state = 12; this.expression(0); - this.state = 9; + this.state = 13; this.match(ExpressionParser.EOF); } } @@ -148,20 +156,20 @@ export class ExpressionParser extends Parser { let _alt: number; this.enterOuterAlt(_localctx, 1); { - this.state = 15; + this.state = 19; this._errHandler.sync(this); switch (this._input.LA(1)) { - case ExpressionParser.T__0: - case ExpressionParser.T__1: - case ExpressionParser.T__2: + case ExpressionParser.PLUS: + case ExpressionParser.SUBSTRACT: + case ExpressionParser.NON: { _localctx = new UnaryOpExpContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 12; + this.state = 16; _la = this._input.LA(1); - if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ExpressionParser.T__0) | (1 << ExpressionParser.T__1) | (1 << ExpressionParser.T__2))) !== 0))) { + if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ExpressionParser.PLUS) | (1 << ExpressionParser.SUBSTRACT) | (1 << ExpressionParser.NON))) !== 0))) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { @@ -171,11 +179,12 @@ export class ExpressionParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 13; + this.state = 17; this.expression(10); } break; - case ExpressionParser.T__17: + case ExpressionParser.STRING_INTERPOLATION_START: + case ExpressionParser.OPEN_BRACKET: case ExpressionParser.NUMBER: case ExpressionParser.IDENTIFIER: case ExpressionParser.STRING: @@ -184,7 +193,7 @@ export class ExpressionParser extends Parser { _localctx = new PrimaryExpContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 14; + this.state = 18; this.primaryExpression(0); } break; @@ -192,7 +201,7 @@ export class ExpressionParser extends Parser { throw new NoViableAltException(this); } this._ctx._stop = this._input.tryLT(-1); - this.state = 43; + this.state = 47; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 2, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -202,20 +211,20 @@ export class ExpressionParser extends Parser { } _prevctx = _localctx; { - this.state = 41; + this.state = 45; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 1, this._ctx) ) { case 1: { _localctx = new BinaryOpExpContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_expression); - this.state = 17; + this.state = 21; if (!(this.precpred(this._ctx, 9))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 9)"); } - this.state = 18; - this.match(ExpressionParser.T__3); - this.state = 19; + this.state = 22; + this.match(ExpressionParser.XOR); + this.state = 23; this.expression(9); } break; @@ -224,13 +233,13 @@ export class ExpressionParser extends Parser { { _localctx = new BinaryOpExpContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_expression); - this.state = 20; + this.state = 24; if (!(this.precpred(this._ctx, 8))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 8)"); } - this.state = 21; + this.state = 25; _la = this._input.LA(1); - if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ExpressionParser.T__4) | (1 << ExpressionParser.T__5) | (1 << ExpressionParser.T__6))) !== 0))) { + if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ExpressionParser.ASTERISK) | (1 << ExpressionParser.SLASH) | (1 << ExpressionParser.PERCENT))) !== 0))) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { @@ -240,7 +249,7 @@ export class ExpressionParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 22; + this.state = 26; this.expression(9); } break; @@ -249,13 +258,13 @@ export class ExpressionParser extends Parser { { _localctx = new BinaryOpExpContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_expression); - this.state = 23; + this.state = 27; if (!(this.precpred(this._ctx, 7))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 7)"); } - this.state = 24; + this.state = 28; _la = this._input.LA(1); - if (!(_la === ExpressionParser.T__1 || _la === ExpressionParser.T__2)) { + if (!(_la === ExpressionParser.PLUS || _la === ExpressionParser.SUBSTRACT)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { @@ -265,7 +274,7 @@ export class ExpressionParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 25; + this.state = 29; this.expression(8); } break; @@ -274,13 +283,13 @@ export class ExpressionParser extends Parser { { _localctx = new BinaryOpExpContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_expression); - this.state = 26; + this.state = 30; if (!(this.precpred(this._ctx, 6))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 6)"); } - this.state = 27; + this.state = 31; _la = this._input.LA(1); - if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ExpressionParser.T__7) | (1 << ExpressionParser.T__8) | (1 << ExpressionParser.T__9))) !== 0))) { + if (!(_la === ExpressionParser.DOUBLE_EQUAL || _la === ExpressionParser.NOT_EQUAL)) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { @@ -290,7 +299,7 @@ export class ExpressionParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 28; + this.state = 32; this.expression(7); } break; @@ -299,15 +308,15 @@ export class ExpressionParser extends Parser { { _localctx = new BinaryOpExpContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_expression); - this.state = 29; + this.state = 33; if (!(this.precpred(this._ctx, 5))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 5)"); } { - this.state = 30; - this.match(ExpressionParser.T__10); + this.state = 34; + this.match(ExpressionParser.SINGLE_AND); } - this.state = 31; + this.state = 35; this.expression(6); } break; @@ -316,13 +325,13 @@ export class ExpressionParser extends Parser { { _localctx = new BinaryOpExpContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_expression); - this.state = 32; + this.state = 36; if (!(this.precpred(this._ctx, 4))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 4)"); } - this.state = 33; + this.state = 37; _la = this._input.LA(1); - if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ExpressionParser.T__11) | (1 << ExpressionParser.T__12) | (1 << ExpressionParser.T__13) | (1 << ExpressionParser.T__14))) !== 0))) { + if (!((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ExpressionParser.LESS_THAN) | (1 << ExpressionParser.MORE_THAN) | (1 << ExpressionParser.LESS_OR_EQUAl) | (1 << ExpressionParser.MORE_OR_EQUAL))) !== 0))) { this._errHandler.recoverInline(this); } else { if (this._input.LA(1) === Token.EOF) { @@ -332,7 +341,7 @@ export class ExpressionParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 34; + this.state = 38; this.expression(5); } break; @@ -341,13 +350,13 @@ export class ExpressionParser extends Parser { { _localctx = new BinaryOpExpContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_expression); - this.state = 35; + this.state = 39; if (!(this.precpred(this._ctx, 3))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 3)"); } - this.state = 36; - this.match(ExpressionParser.T__15); - this.state = 37; + this.state = 40; + this.match(ExpressionParser.DOUBLE_AND); + this.state = 41; this.expression(4); } break; @@ -356,20 +365,20 @@ export class ExpressionParser extends Parser { { _localctx = new BinaryOpExpContext(new ExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_expression); - this.state = 38; + this.state = 42; if (!(this.precpred(this._ctx, 2))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 2)"); } - this.state = 39; - this.match(ExpressionParser.T__16); - this.state = 40; + this.state = 43; + this.match(ExpressionParser.DOUBLE_VERTICAL_CYLINDER); + this.state = 44; this.expression(3); } break; } } } - this.state = 45; + this.state = 49; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 2, this._ctx); } @@ -409,21 +418,21 @@ export class ExpressionParser extends Parser { let _alt: number; this.enterOuterAlt(_localctx, 1); { - this.state = 55; + this.state = 60; this._errHandler.sync(this); switch (this._input.LA(1)) { - case ExpressionParser.T__17: + case ExpressionParser.OPEN_BRACKET: { _localctx = new ParenthesisExpContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 47; - this.match(ExpressionParser.T__17); - this.state = 48; + this.state = 51; + this.match(ExpressionParser.OPEN_BRACKET); + this.state = 52; this.expression(0); - this.state = 49; - this.match(ExpressionParser.T__18); + this.state = 53; + this.match(ExpressionParser.CLOSE_BRACKET); } break; case ExpressionParser.CONSTANT: @@ -431,7 +440,7 @@ export class ExpressionParser extends Parser { _localctx = new ConstantAtomContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 51; + this.state = 55; this.match(ExpressionParser.CONSTANT); } break; @@ -440,7 +449,7 @@ export class ExpressionParser extends Parser { _localctx = new NumericAtomContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 52; + this.state = 56; this.match(ExpressionParser.NUMBER); } break; @@ -449,7 +458,7 @@ export class ExpressionParser extends Parser { _localctx = new StringAtomContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 53; + this.state = 57; this.match(ExpressionParser.STRING); } break; @@ -458,15 +467,24 @@ export class ExpressionParser extends Parser { _localctx = new IdAtomContext(_localctx); this._ctx = _localctx; _prevctx = _localctx; - this.state = 54; + this.state = 58; this.match(ExpressionParser.IDENTIFIER); } break; + case ExpressionParser.STRING_INTERPOLATION_START: + { + _localctx = new StringInterpolationAtomContext(_localctx); + this._ctx = _localctx; + _prevctx = _localctx; + this.state = 59; + this.stringInterpolation(); + } + break; default: throw new NoViableAltException(this); } this._ctx._stop = this._input.tryLT(-1); - this.state = 73; + this.state = 78; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -476,20 +494,20 @@ export class ExpressionParser extends Parser { } _prevctx = _localctx; { - this.state = 71; + this.state = 76; this._errHandler.sync(this); switch ( this.interpreter.adaptivePredict(this._input, 5, this._ctx) ) { case 1: { _localctx = new MemberAccessExpContext(new PrimaryExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_primaryExpression); - this.state = 57; + this.state = 62; if (!(this.precpred(this._ctx, 3))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 3)"); } - this.state = 58; - this.match(ExpressionParser.T__19); - this.state = 59; + this.state = 63; + this.match(ExpressionParser.DOT); + this.state = 64; this.match(ExpressionParser.IDENTIFIER); } break; @@ -498,24 +516,24 @@ export class ExpressionParser extends Parser { { _localctx = new FuncInvokeExpContext(new PrimaryExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_primaryExpression); - this.state = 60; + this.state = 65; if (!(this.precpred(this._ctx, 2))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 2)"); } - this.state = 61; - this.match(ExpressionParser.T__17); - this.state = 63; + this.state = 66; + this.match(ExpressionParser.OPEN_BRACKET); + this.state = 68; this._errHandler.sync(this); _la = this._input.LA(1); - if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ExpressionParser.T__0) | (1 << ExpressionParser.T__1) | (1 << ExpressionParser.T__2) | (1 << ExpressionParser.T__17) | (1 << ExpressionParser.NUMBER) | (1 << ExpressionParser.IDENTIFIER) | (1 << ExpressionParser.STRING) | (1 << ExpressionParser.CONSTANT))) !== 0)) { + if ((((_la) & ~0x1F) === 0 && ((1 << _la) & ((1 << ExpressionParser.STRING_INTERPOLATION_START) | (1 << ExpressionParser.PLUS) | (1 << ExpressionParser.SUBSTRACT) | (1 << ExpressionParser.NON) | (1 << ExpressionParser.OPEN_BRACKET) | (1 << ExpressionParser.NUMBER) | (1 << ExpressionParser.IDENTIFIER) | (1 << ExpressionParser.STRING) | (1 << ExpressionParser.CONSTANT))) !== 0)) { { - this.state = 62; + this.state = 67; this.argsList(); } } - this.state = 65; - this.match(ExpressionParser.T__18); + this.state = 70; + this.match(ExpressionParser.CLOSE_BRACKET); } break; @@ -523,22 +541,22 @@ export class ExpressionParser extends Parser { { _localctx = new IndexAccessExpContext(new PrimaryExpressionContext(_parentctx, _parentState)); this.pushNewRecursionContext(_localctx, _startState, ExpressionParser.RULE_primaryExpression); - this.state = 66; + this.state = 71; if (!(this.precpred(this._ctx, 1))) { throw new FailedPredicateException(this, "this.precpred(this._ctx, 1)"); } - this.state = 67; - this.match(ExpressionParser.T__20); - this.state = 68; + this.state = 72; + this.match(ExpressionParser.OPEN_SQUARE_BRACKET); + this.state = 73; this.expression(0); - this.state = 69; - this.match(ExpressionParser.T__21); + this.state = 74; + this.match(ExpressionParser.CLOSE_SQUARE_BRACKET); } break; } } } - this.state = 75; + this.state = 80; this._errHandler.sync(this); _alt = this.interpreter.adaptivePredict(this._input, 6, this._ctx); } @@ -559,28 +577,134 @@ export class ExpressionParser extends Parser { return _localctx; } // @RuleVersion(0) + public stringInterpolation(): StringInterpolationContext { + let _localctx: StringInterpolationContext = new StringInterpolationContext(this._ctx, this.state); + this.enterRule(_localctx, 6, ExpressionParser.RULE_stringInterpolation); + let _la: number; + try { + this.enterOuterAlt(_localctx, 1); + { + this.state = 81; + this.match(ExpressionParser.STRING_INTERPOLATION_START); + this.state = 85; + this._errHandler.sync(this); + _la = this._input.LA(1); + do { + { + this.state = 85; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case ExpressionParser.ESCAPE_CHARACTER: + { + this.state = 82; + this.match(ExpressionParser.ESCAPE_CHARACTER); + } + break; + case ExpressionParser.TEMPLATE: + { + this.state = 83; + this.match(ExpressionParser.TEMPLATE); + } + break; + case ExpressionParser.TEXT_CONTENT: + { + this.state = 84; + this.textContent(); + } + break; + default: + throw new NoViableAltException(this); + } + } + this.state = 87; + this._errHandler.sync(this); + _la = this._input.LA(1); + } while (((((_la - 31)) & ~0x1F) === 0 && ((1 << (_la - 31)) & ((1 << (ExpressionParser.TEMPLATE - 31)) | (1 << (ExpressionParser.ESCAPE_CHARACTER - 31)) | (1 << (ExpressionParser.TEXT_CONTENT - 31)))) !== 0)); + this.state = 89; + this.match(ExpressionParser.STRING_INTERPOLATION_START); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) + public textContent(): TextContentContext { + let _localctx: TextContentContext = new TextContentContext(this._ctx, this.state); + this.enterRule(_localctx, 8, ExpressionParser.RULE_textContent); + try { + let _alt: number; + this.enterOuterAlt(_localctx, 1); + { + this.state = 92; + this._errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + this.state = 91; + this.match(ExpressionParser.TEXT_CONTENT); + } + } + break; + default: + throw new NoViableAltException(this); + } + this.state = 94; + this._errHandler.sync(this); + _alt = this.interpreter.adaptivePredict(this._input, 9, this._ctx); + } while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER); + } + } + catch (re) { + if (re instanceof RecognitionException) { + _localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return _localctx; + } + // @RuleVersion(0) public argsList(): ArgsListContext { let _localctx: ArgsListContext = new ArgsListContext(this._ctx, this.state); - this.enterRule(_localctx, 6, ExpressionParser.RULE_argsList); + this.enterRule(_localctx, 10, ExpressionParser.RULE_argsList); let _la: number; try { this.enterOuterAlt(_localctx, 1); { - this.state = 76; + this.state = 96; this.expression(0); - this.state = 81; + this.state = 101; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la === ExpressionParser.T__22) { + while (_la === ExpressionParser.COMMA) { { { - this.state = 77; - this.match(ExpressionParser.T__22); - this.state = 78; + this.state = 97; + this.match(ExpressionParser.COMMA); + this.state = 98; this.expression(0); } } - this.state = 83; + this.state = 103; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -654,45 +778,53 @@ export class ExpressionParser extends Parser { } public static readonly _serializedATN: string = - "\x03\uAF6F\u8320\u479D\uB75C\u4880\u1605\u191C\uAB37\x03 W\x04\x02\t\x02" + - "\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x03\x02\x03\x02\x03\x02\x03" + - "\x03\x03\x03\x03\x03\x03\x03\x05\x03\x12\n\x03\x03\x03\x03\x03\x03\x03" + + "\x03\uAF6F\u8320\u479D\uB75C\u4880\u1605\u191C\uAB37\x03#k\x04\x02\t\x02" + + "\x04\x03\t\x03\x04\x04\t\x04\x04\x05\t\x05\x04\x06\t\x06\x04\x07\t\x07" + + "\x03\x02\x03\x02\x03\x02\x03\x03\x03\x03\x03\x03\x03\x03\x05\x03\x16\n" + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03" + - "\x03\x03\x03\x03\x03\x03\x07\x03,\n\x03\f\x03\x0E\x03/\v\x03\x03\x04\x03" + - "\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x05\x04:" + - "\n\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x05\x04B\n\x04" + - "\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x07\x04J\n\x04\f\x04" + - "\x0E\x04M\v\x04\x03\x05\x03\x05\x03\x05\x07\x05R\n\x05\f\x05\x0E\x05U" + - "\v\x05\x03\x05\x02\x02\x04\x04\x06\x06\x02\x02\x04\x02\x06\x02\b\x02\x02" + - "\x07\x03\x02\x03\x05\x03\x02\x07\t\x03\x02\x04\x05\x03\x02\n\f\x03\x02" + - "\x0E\x11d\x02\n\x03\x02\x02\x02\x04\x11\x03\x02\x02\x02\x069\x03\x02\x02" + - "\x02\bN\x03\x02\x02\x02\n\v\x05\x04\x03\x02\v\f\x07\x02\x02\x03\f\x03" + - "\x03\x02\x02\x02\r\x0E\b\x03\x01\x02\x0E\x0F\t\x02\x02\x02\x0F\x12\x05" + - "\x04\x03\f\x10\x12\x05\x06\x04\x02\x11\r\x03\x02\x02\x02\x11\x10\x03\x02" + - "\x02\x02\x12-\x03\x02\x02\x02\x13\x14\f\v\x02\x02\x14\x15\x07\x06\x02" + - "\x02\x15,\x05\x04\x03\v\x16\x17\f\n\x02\x02\x17\x18\t\x03\x02\x02\x18" + - ",\x05\x04\x03\v\x19\x1A\f\t\x02\x02\x1A\x1B\t\x04\x02\x02\x1B,\x05\x04" + - "\x03\n\x1C\x1D\f\b\x02\x02\x1D\x1E\t\x05\x02\x02\x1E,\x05\x04\x03\t\x1F" + - " \f\x07\x02\x02 !\x07\r\x02\x02!,\x05\x04\x03\b\"#\f\x06\x02\x02#$\t\x06" + - "\x02\x02$,\x05\x04\x03\x07%&\f\x05\x02\x02&\'\x07\x12\x02\x02\',\x05\x04" + - "\x03\x06()\f\x04\x02\x02)*\x07\x13\x02\x02*,\x05\x04\x03\x05+\x13\x03" + - "\x02\x02\x02+\x16\x03\x02\x02\x02+\x19\x03\x02\x02\x02+\x1C\x03\x02\x02" + - "\x02+\x1F\x03\x02\x02\x02+\"\x03\x02\x02\x02+%\x03\x02\x02\x02+(\x03\x02" + - "\x02\x02,/\x03\x02\x02\x02-+\x03\x02\x02\x02-.\x03\x02\x02\x02.\x05\x03" + - "\x02\x02\x02/-\x03\x02\x02\x0201\b\x04\x01\x0212\x07\x14\x02\x0223\x05" + - "\x04\x03\x0234\x07\x15\x02\x024:\x03\x02\x02\x025:\x07\x1F\x02\x026:\x07" + - "\x1A\x02\x027:\x07\x1E\x02\x028:\x07\x1C\x02\x0290\x03\x02\x02\x0295\x03" + - "\x02\x02\x0296\x03\x02\x02\x0297\x03\x02\x02\x0298\x03\x02\x02\x02:K\x03" + - "\x02\x02\x02;<\f\x05\x02\x02<=\x07\x16\x02\x02=J\x07\x1C\x02\x02>?\f\x04" + - "\x02\x02?A\x07\x14\x02\x02@B\x05\b\x05\x02A@\x03\x02\x02\x02AB\x03\x02" + - "\x02\x02BC\x03\x02\x02\x02CJ\x07\x15\x02\x02DE\f\x03\x02\x02EF\x07\x17" + - "\x02\x02FG\x05\x04\x03\x02GH\x07\x18\x02\x02HJ\x03\x02\x02\x02I;\x03\x02" + - "\x02\x02I>\x03\x02\x02\x02ID\x03\x02\x02\x02JM\x03\x02\x02\x02KI\x03\x02" + - "\x02\x02KL\x03\x02\x02\x02L\x07\x03\x02\x02\x02MK\x03\x02\x02\x02NS\x05" + - "\x04\x03\x02OP\x07\x19\x02\x02PR\x05\x04\x03\x02QO\x03\x02\x02\x02RU\x03" + - "\x02\x02\x02SQ\x03\x02\x02\x02ST\x03\x02\x02\x02T\t\x03\x02\x02\x02US" + - "\x03\x02\x02\x02\n\x11+-9AIKS"; + "\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x03\x07\x030\n\x03\f" + + "\x03\x0E\x033\v\x03\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03" + + "\x04\x03\x04\x03\x04\x03\x04\x05\x04?\n\x04\x03\x04\x03\x04\x03\x04\x03" + + "\x04\x03\x04\x03\x04\x05\x04G\n\x04\x03\x04\x03\x04\x03\x04\x03\x04\x03" + + "\x04\x03\x04\x07\x04O\n\x04\f\x04\x0E\x04R\v\x04\x03\x05\x03\x05\x03\x05" + + "\x03\x05\x06\x05X\n\x05\r\x05\x0E\x05Y\x03\x05\x03\x05\x03\x06\x06\x06" + + "_\n\x06\r\x06\x0E\x06`\x03\x07\x03\x07\x03\x07\x07\x07f\n\x07\f\x07\x0E" + + "\x07i\v\x07\x03\x07\x02\x02\x04\x04\x06\b\x02\x02\x04\x02\x06\x02\b\x02" + + "\n\x02\f\x02\x02\x07\x03\x02\x04\x06\x03\x02\b\n\x03\x02\x04\x05\x03\x02" + + "\v\f\x03\x02\x10\x13{\x02\x0E\x03\x02\x02\x02\x04\x15\x03\x02\x02\x02" + + "\x06>\x03\x02\x02\x02\bS\x03\x02\x02\x02\n^\x03\x02\x02\x02\fb\x03\x02" + + "\x02\x02\x0E\x0F\x05\x04\x03\x02\x0F\x10\x07\x02\x02\x03\x10\x03\x03\x02" + + "\x02\x02\x11\x12\b\x03\x01\x02\x12\x13\t\x02\x02\x02\x13\x16\x05\x04\x03" + + "\f\x14\x16\x05\x06\x04\x02\x15\x11\x03\x02\x02\x02\x15\x14\x03\x02\x02" + + "\x02\x161\x03\x02\x02\x02\x17\x18\f\v\x02\x02\x18\x19\x07\x07\x02\x02" + + "\x190\x05\x04\x03\v\x1A\x1B\f\n\x02\x02\x1B\x1C\t\x03\x02\x02\x1C0\x05" + + "\x04\x03\v\x1D\x1E\f\t\x02\x02\x1E\x1F\t\x04\x02\x02\x1F0\x05\x04\x03" + + "\n !\f\b\x02\x02!\"\t\x05\x02\x02\"0\x05\x04\x03\t#$\f\x07\x02\x02$%\x07" + + "\r\x02\x02%0\x05\x04\x03\b&\'\f\x06\x02\x02\'(\t\x06\x02\x02(0\x05\x04" + + "\x03\x07)*\f\x05\x02\x02*+\x07\x0E\x02\x02+0\x05\x04\x03\x06,-\f\x04\x02" + + "\x02-.\x07\x0F\x02\x02.0\x05\x04\x03\x05/\x17\x03\x02\x02\x02/\x1A\x03" + + "\x02\x02\x02/\x1D\x03\x02\x02\x02/ \x03\x02\x02\x02/#\x03\x02\x02\x02" + + "/&\x03\x02\x02\x02/)\x03\x02\x02\x02/,\x03\x02\x02\x0203\x03\x02\x02\x02" + + "1/\x03\x02\x02\x0212\x03\x02\x02\x022\x05\x03\x02\x02\x0231\x03\x02\x02" + + "\x0245\b\x04\x01\x0256\x07\x14\x02\x0267\x05\x04\x03\x0278\x07\x15\x02" + + "\x028?\x03\x02\x02\x029?\x07\x1F\x02\x02:?\x07\x1A\x02\x02;?\x07\x1E\x02" + + "\x024\x03\x02\x02\x02>9\x03\x02\x02" + + "\x02>:\x03\x02\x02\x02>;\x03\x02\x02\x02><\x03\x02\x02\x02>=\x03\x02\x02" + + "\x02?P\x03\x02\x02\x02@A\f\x05\x02\x02AB\x07\x16\x02\x02BO\x07\x1C\x02" + + "\x02CD\f\x04\x02\x02DF\x07\x14\x02\x02EG\x05\f\x07\x02FE\x03\x02\x02\x02" + + "FG\x03\x02\x02\x02GH\x03\x02\x02\x02HO\x07\x15\x02\x02IJ\f\x03\x02\x02" + + "JK\x07\x17\x02\x02KL\x05\x04\x03\x02LM\x07\x18\x02\x02MO\x03\x02\x02\x02" + + "N@\x03\x02\x02\x02NC\x03\x02\x02\x02NI\x03\x02\x02\x02OR\x03\x02\x02\x02" + + "PN\x03\x02\x02\x02PQ\x03\x02\x02\x02Q\x07\x03\x02\x02\x02RP\x03\x02\x02" + + "\x02SW\x07\x03\x02\x02TX\x07\"\x02\x02UX\x07!\x02\x02VX\x05\n\x06\x02" + + "WT\x03\x02\x02\x02WU\x03\x02\x02\x02WV\x03\x02\x02\x02XY\x03\x02\x02\x02" + + "YW\x03\x02\x02\x02YZ\x03\x02\x02\x02Z[\x03\x02\x02\x02[\\\x07\x03\x02" + + "\x02\\\t\x03\x02\x02\x02]_\x07#\x02\x02^]\x03\x02\x02\x02_`\x03\x02\x02" + + "\x02`^\x03\x02\x02\x02`a\x03\x02\x02\x02a\v\x03\x02\x02\x02bg\x05\x04" + + "\x03\x02cd\x07\x19\x02\x02df\x05\x04\x03\x02ec\x03\x02\x02\x02fi\x03\x02" + + "\x02\x02ge\x03\x02\x02\x02gh\x03\x02\x02\x02h\r\x03\x02\x02\x02ig\x03" + + "\x02\x02\x02\r\x15/1>FNPWY`g"; public static __ATN: ATN; public static get _ATN(): ATN { if (!ExpressionParser.__ATN) { @@ -715,19 +847,19 @@ export class FileContext extends ParserRuleContext { // @Override public get ruleIndex(): number { return ExpressionParser.RULE_file; } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterFile) { listener.enterFile(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitFile) { listener.exitFile(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitFile) { return visitor.visitFile(this); } else { @@ -751,24 +883,27 @@ export class UnaryOpExpContext extends ExpressionContext { public expression(): ExpressionContext { return this.getRuleContext(0, ExpressionContext); } + public NON(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.NON, 0); } + public SUBSTRACT(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.SUBSTRACT, 0); } + public PLUS(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.PLUS, 0); } constructor(ctx: ExpressionContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterUnaryOpExp) { listener.enterUnaryOpExp(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitUnaryOpExp) { listener.exitUnaryOpExp(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitUnaryOpExp) { return visitor.visitUnaryOpExp(this); } else { @@ -786,24 +921,39 @@ export class BinaryOpExpContext extends ExpressionContext { return this.getRuleContext(i, ExpressionContext); } } + public XOR(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.XOR, 0); } + public ASTERISK(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.ASTERISK, 0); } + public SLASH(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.SLASH, 0); } + public PERCENT(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.PERCENT, 0); } + public PLUS(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.PLUS, 0); } + public SUBSTRACT(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.SUBSTRACT, 0); } + public DOUBLE_EQUAL(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.DOUBLE_EQUAL, 0); } + public NOT_EQUAL(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.NOT_EQUAL, 0); } + public SINGLE_AND(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.SINGLE_AND, 0); } + public LESS_THAN(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.LESS_THAN, 0); } + public LESS_OR_EQUAl(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.LESS_OR_EQUAl, 0); } + public MORE_THAN(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.MORE_THAN, 0); } + public MORE_OR_EQUAL(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.MORE_OR_EQUAL, 0); } + public DOUBLE_AND(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.DOUBLE_AND, 0); } + public DOUBLE_VERTICAL_CYLINDER(): TerminalNode | undefined { return this.tryGetToken(ExpressionParser.DOUBLE_VERTICAL_CYLINDER, 0); } constructor(ctx: ExpressionContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterBinaryOpExp) { listener.enterBinaryOpExp(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitBinaryOpExp) { listener.exitBinaryOpExp(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitBinaryOpExp) { return visitor.visitBinaryOpExp(this); } else { @@ -820,19 +970,19 @@ export class PrimaryExpContext extends ExpressionContext { this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterPrimaryExp) { listener.enterPrimaryExp(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitPrimaryExp) { listener.exitPrimaryExp(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitPrimaryExp) { return visitor.visitPrimaryExp(this); } else { @@ -856,6 +1006,8 @@ export class FuncInvokeExpContext extends PrimaryExpressionContext { public primaryExpression(): PrimaryExpressionContext { return this.getRuleContext(0, PrimaryExpressionContext); } + public OPEN_BRACKET(): TerminalNode { return this.getToken(ExpressionParser.OPEN_BRACKET, 0); } + public CLOSE_BRACKET(): TerminalNode { return this.getToken(ExpressionParser.CLOSE_BRACKET, 0); } public argsList(): ArgsListContext | undefined { return this.tryGetRuleContext(0, ArgsListContext); } @@ -864,19 +1016,19 @@ export class FuncInvokeExpContext extends PrimaryExpressionContext { this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterFuncInvokeExp) { listener.enterFuncInvokeExp(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitFuncInvokeExp) { listener.exitFuncInvokeExp(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitFuncInvokeExp) { return visitor.visitFuncInvokeExp(this); } else { @@ -891,19 +1043,19 @@ export class ConstantAtomContext extends PrimaryExpressionContext { this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterConstantAtom) { listener.enterConstantAtom(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitConstantAtom) { listener.exitConstantAtom(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitConstantAtom) { return visitor.visitConstantAtom(this); } else { @@ -918,19 +1070,19 @@ export class IdAtomContext extends PrimaryExpressionContext { this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterIdAtom) { listener.enterIdAtom(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitIdAtom) { listener.exitIdAtom(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitIdAtom) { return visitor.visitIdAtom(this); } else { @@ -945,19 +1097,19 @@ export class StringAtomContext extends PrimaryExpressionContext { this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterStringAtom) { listener.enterStringAtom(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitStringAtom) { listener.exitStringAtom(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitStringAtom) { return visitor.visitStringAtom(this); } else { @@ -969,27 +1121,29 @@ export class IndexAccessExpContext extends PrimaryExpressionContext { public primaryExpression(): PrimaryExpressionContext { return this.getRuleContext(0, PrimaryExpressionContext); } + public OPEN_SQUARE_BRACKET(): TerminalNode { return this.getToken(ExpressionParser.OPEN_SQUARE_BRACKET, 0); } public expression(): ExpressionContext { return this.getRuleContext(0, ExpressionContext); } + public CLOSE_SQUARE_BRACKET(): TerminalNode { return this.getToken(ExpressionParser.CLOSE_SQUARE_BRACKET, 0); } constructor(ctx: PrimaryExpressionContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterIndexAccessExp) { listener.enterIndexAccessExp(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitIndexAccessExp) { listener.exitIndexAccessExp(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitIndexAccessExp) { return visitor.visitIndexAccessExp(this); } else { @@ -997,29 +1151,59 @@ export class IndexAccessExpContext extends PrimaryExpressionContext { } } } +export class StringInterpolationAtomContext extends PrimaryExpressionContext { + public stringInterpolation(): StringInterpolationContext { + return this.getRuleContext(0, StringInterpolationContext); + } + constructor(ctx: PrimaryExpressionContext) { + super(ctx.parent, ctx.invokingState); + this.copyFrom(ctx); + } + // @Override + public enterRule(listener: ExpressionParserListener): void { + if (listener.enterStringInterpolationAtom) { + listener.enterStringInterpolationAtom(this); + } + } + // @Override + public exitRule(listener: ExpressionParserListener): void { + if (listener.exitStringInterpolationAtom) { + listener.exitStringInterpolationAtom(this); + } + } + // @Override + public accept(visitor: ExpressionParserVisitor): Result { + if (visitor.visitStringInterpolationAtom) { + return visitor.visitStringInterpolationAtom(this); + } else { + return visitor.visitChildren(this); + } + } +} export class MemberAccessExpContext extends PrimaryExpressionContext { public primaryExpression(): PrimaryExpressionContext { return this.getRuleContext(0, PrimaryExpressionContext); } + public DOT(): TerminalNode { return this.getToken(ExpressionParser.DOT, 0); } public IDENTIFIER(): TerminalNode { return this.getToken(ExpressionParser.IDENTIFIER, 0); } constructor(ctx: PrimaryExpressionContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterMemberAccessExp) { listener.enterMemberAccessExp(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitMemberAccessExp) { listener.exitMemberAccessExp(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitMemberAccessExp) { return visitor.visitMemberAccessExp(this); } else { @@ -1028,27 +1212,29 @@ export class MemberAccessExpContext extends PrimaryExpressionContext { } } export class ParenthesisExpContext extends PrimaryExpressionContext { + public OPEN_BRACKET(): TerminalNode { return this.getToken(ExpressionParser.OPEN_BRACKET, 0); } public expression(): ExpressionContext { return this.getRuleContext(0, ExpressionContext); } + public CLOSE_BRACKET(): TerminalNode { return this.getToken(ExpressionParser.CLOSE_BRACKET, 0); } constructor(ctx: PrimaryExpressionContext) { super(ctx.parent, ctx.invokingState); this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterParenthesisExp) { listener.enterParenthesisExp(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitParenthesisExp) { listener.exitParenthesisExp(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitParenthesisExp) { return visitor.visitParenthesisExp(this); } else { @@ -1063,19 +1249,19 @@ export class NumericAtomContext extends PrimaryExpressionContext { this.copyFrom(ctx); } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterNumericAtom) { listener.enterNumericAtom(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitNumericAtom) { listener.exitNumericAtom(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitNumericAtom) { return visitor.visitNumericAtom(this); } else { @@ -1085,6 +1271,109 @@ export class NumericAtomContext extends PrimaryExpressionContext { } +export class StringInterpolationContext extends ParserRuleContext { + public STRING_INTERPOLATION_START(): TerminalNode[]; + public STRING_INTERPOLATION_START(i: number): TerminalNode; + public STRING_INTERPOLATION_START(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(ExpressionParser.STRING_INTERPOLATION_START); + } else { + return this.getToken(ExpressionParser.STRING_INTERPOLATION_START, i); + } + } + public ESCAPE_CHARACTER(): TerminalNode[]; + public ESCAPE_CHARACTER(i: number): TerminalNode; + public ESCAPE_CHARACTER(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(ExpressionParser.ESCAPE_CHARACTER); + } else { + return this.getToken(ExpressionParser.ESCAPE_CHARACTER, i); + } + } + public TEMPLATE(): TerminalNode[]; + public TEMPLATE(i: number): TerminalNode; + public TEMPLATE(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(ExpressionParser.TEMPLATE); + } else { + return this.getToken(ExpressionParser.TEMPLATE, i); + } + } + public textContent(): TextContentContext[]; + public textContent(i: number): TextContentContext; + public textContent(i?: number): TextContentContext | TextContentContext[] { + if (i === undefined) { + return this.getRuleContexts(TextContentContext); + } else { + return this.getRuleContext(i, TextContentContext); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return ExpressionParser.RULE_stringInterpolation; } + // @Override + public enterRule(listener: ExpressionParserListener): void { + if (listener.enterStringInterpolation) { + listener.enterStringInterpolation(this); + } + } + // @Override + public exitRule(listener: ExpressionParserListener): void { + if (listener.exitStringInterpolation) { + listener.exitStringInterpolation(this); + } + } + // @Override + public accept(visitor: ExpressionParserVisitor): Result { + if (visitor.visitStringInterpolation) { + return visitor.visitStringInterpolation(this); + } else { + return visitor.visitChildren(this); + } + } +} + + +export class TextContentContext extends ParserRuleContext { + public TEXT_CONTENT(): TerminalNode[]; + public TEXT_CONTENT(i: number): TerminalNode; + public TEXT_CONTENT(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(ExpressionParser.TEXT_CONTENT); + } else { + return this.getToken(ExpressionParser.TEXT_CONTENT, i); + } + } + constructor(parent: ParserRuleContext | undefined, invokingState: number) { + super(parent, invokingState); + } + // @Override + public get ruleIndex(): number { return ExpressionParser.RULE_textContent; } + // @Override + public enterRule(listener: ExpressionParserListener): void { + if (listener.enterTextContent) { + listener.enterTextContent(this); + } + } + // @Override + public exitRule(listener: ExpressionParserListener): void { + if (listener.exitTextContent) { + listener.exitTextContent(this); + } + } + // @Override + public accept(visitor: ExpressionParserVisitor): Result { + if (visitor.visitTextContent) { + return visitor.visitTextContent(this); + } else { + return visitor.visitChildren(this); + } + } +} + + export class ArgsListContext extends ParserRuleContext { public expression(): ExpressionContext[]; public expression(i: number): ExpressionContext; @@ -1095,25 +1384,34 @@ export class ArgsListContext extends ParserRuleContext { return this.getRuleContext(i, ExpressionContext); } } + public COMMA(): TerminalNode[]; + public COMMA(i: number): TerminalNode; + public COMMA(i?: number): TerminalNode | TerminalNode[] { + if (i === undefined) { + return this.getTokens(ExpressionParser.COMMA); + } else { + return this.getToken(ExpressionParser.COMMA, i); + } + } constructor(parent: ParserRuleContext | undefined, invokingState: number) { super(parent, invokingState); } // @Override public get ruleIndex(): number { return ExpressionParser.RULE_argsList; } // @Override - public enterRule(listener: ExpressionListener): void { + public enterRule(listener: ExpressionParserListener): void { if (listener.enterArgsList) { listener.enterArgsList(this); } } // @Override - public exitRule(listener: ExpressionListener): void { + public exitRule(listener: ExpressionParserListener): void { if (listener.exitArgsList) { listener.exitArgsList(this); } } // @Override - public accept(visitor: ExpressionVisitor): Result { + public accept(visitor: ExpressionParserVisitor): Result { if (visitor.visitArgsList) { return visitor.visitArgsList(this); } else { diff --git a/libraries/adaptive-expressions/src/parser/generated/ExpressionListener.ts b/libraries/adaptive-expressions/src/parser/generated/ExpressionParserListener.ts similarity index 79% rename from libraries/adaptive-expressions/src/parser/generated/ExpressionListener.ts rename to libraries/adaptive-expressions/src/parser/generated/ExpressionParserListener.ts index 912c873320..f975e67640 100644 --- a/libraries/adaptive-expressions/src/parser/generated/ExpressionListener.ts +++ b/libraries/adaptive-expressions/src/parser/generated/ExpressionParserListener.ts @@ -1,4 +1,4 @@ -// Generated from ../Expression.g4 by ANTLR 4.6-SNAPSHOT +// Generated from ../ExpressionParser.g4 by ANTLR 4.6-SNAPSHOT import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; @@ -8,6 +8,7 @@ import { ConstantAtomContext } from "./ExpressionParser"; import { IdAtomContext } from "./ExpressionParser"; import { StringAtomContext } from "./ExpressionParser"; import { IndexAccessExpContext } from "./ExpressionParser"; +import { StringInterpolationAtomContext } from "./ExpressionParser"; import { MemberAccessExpContext } from "./ExpressionParser"; import { ParenthesisExpContext } from "./ExpressionParser"; import { NumericAtomContext } from "./ExpressionParser"; @@ -17,6 +18,8 @@ import { PrimaryExpContext } from "./ExpressionParser"; import { FileContext } from "./ExpressionParser"; import { ExpressionContext } from "./ExpressionParser"; import { PrimaryExpressionContext } from "./ExpressionParser"; +import { StringInterpolationContext } from "./ExpressionParser"; +import { TextContentContext } from "./ExpressionParser"; import { ArgsListContext } from "./ExpressionParser"; @@ -24,7 +27,7 @@ import { ArgsListContext } from "./ExpressionParser"; * This interface defines a complete listener for a parse tree produced by * `ExpressionParser`. */ -export interface ExpressionListener extends ParseTreeListener { +export interface ExpressionParserListener extends ParseTreeListener { /** * Enter a parse tree produced by the `funcInvokeExp` * labeled alternative in `ExpressionParser.primaryExpression`. @@ -90,6 +93,19 @@ export interface ExpressionListener extends ParseTreeListener { */ exitIndexAccessExp?: (ctx: IndexAccessExpContext) => void; + /** + * Enter a parse tree produced by the `stringInterpolationAtom` + * labeled alternative in `ExpressionParser.primaryExpression`. + * @param ctx the parse tree + */ + enterStringInterpolationAtom?: (ctx: StringInterpolationAtomContext) => void; + /** + * Exit a parse tree produced by the `stringInterpolationAtom` + * labeled alternative in `ExpressionParser.primaryExpression`. + * @param ctx the parse tree + */ + exitStringInterpolationAtom?: (ctx: StringInterpolationAtomContext) => void; + /** * Enter a parse tree produced by the `memberAccessExp` * labeled alternative in `ExpressionParser.primaryExpression`. @@ -201,6 +217,28 @@ export interface ExpressionListener extends ParseTreeListener { */ exitPrimaryExpression?: (ctx: PrimaryExpressionContext) => void; + /** + * Enter a parse tree produced by `ExpressionParser.stringInterpolation`. + * @param ctx the parse tree + */ + enterStringInterpolation?: (ctx: StringInterpolationContext) => void; + /** + * Exit a parse tree produced by `ExpressionParser.stringInterpolation`. + * @param ctx the parse tree + */ + exitStringInterpolation?: (ctx: StringInterpolationContext) => void; + + /** + * Enter a parse tree produced by `ExpressionParser.textContent`. + * @param ctx the parse tree + */ + enterTextContent?: (ctx: TextContentContext) => void; + /** + * Exit a parse tree produced by `ExpressionParser.textContent`. + * @param ctx the parse tree + */ + exitTextContent?: (ctx: TextContentContext) => void; + /** * Enter a parse tree produced by `ExpressionParser.argsList`. * @param ctx the parse tree diff --git a/libraries/adaptive-expressions/src/parser/generated/ExpressionVisitor.ts b/libraries/adaptive-expressions/src/parser/generated/ExpressionParserVisitor.ts similarity index 79% rename from libraries/adaptive-expressions/src/parser/generated/ExpressionVisitor.ts rename to libraries/adaptive-expressions/src/parser/generated/ExpressionParserVisitor.ts index 1d9d478813..c49b1a283c 100644 --- a/libraries/adaptive-expressions/src/parser/generated/ExpressionVisitor.ts +++ b/libraries/adaptive-expressions/src/parser/generated/ExpressionParserVisitor.ts @@ -1,4 +1,4 @@ -// Generated from ../Expression.g4 by ANTLR 4.6-SNAPSHOT +// Generated from ../ExpressionParser.g4 by ANTLR 4.6-SNAPSHOT import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; @@ -8,6 +8,7 @@ import { ConstantAtomContext } from "./ExpressionParser"; import { IdAtomContext } from "./ExpressionParser"; import { StringAtomContext } from "./ExpressionParser"; import { IndexAccessExpContext } from "./ExpressionParser"; +import { StringInterpolationAtomContext } from "./ExpressionParser"; import { MemberAccessExpContext } from "./ExpressionParser"; import { ParenthesisExpContext } from "./ExpressionParser"; import { NumericAtomContext } from "./ExpressionParser"; @@ -17,6 +18,8 @@ import { PrimaryExpContext } from "./ExpressionParser"; import { FileContext } from "./ExpressionParser"; import { ExpressionContext } from "./ExpressionParser"; import { PrimaryExpressionContext } from "./ExpressionParser"; +import { StringInterpolationContext } from "./ExpressionParser"; +import { TextContentContext } from "./ExpressionParser"; import { ArgsListContext } from "./ExpressionParser"; @@ -27,7 +30,7 @@ import { ArgsListContext } from "./ExpressionParser"; * @param The return type of the visit operation. Use `void` for * operations with no return type. */ -export interface ExpressionVisitor extends ParseTreeVisitor { +export interface ExpressionParserVisitor extends ParseTreeVisitor { /** * Visit a parse tree produced by the `funcInvokeExp` * labeled alternative in `ExpressionParser.primaryExpression`. @@ -68,6 +71,14 @@ export interface ExpressionVisitor extends ParseTreeVisitor { */ visitIndexAccessExp?: (ctx: IndexAccessExpContext) => Result; + /** + * Visit a parse tree produced by the `stringInterpolationAtom` + * labeled alternative in `ExpressionParser.primaryExpression`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStringInterpolationAtom?: (ctx: StringInterpolationAtomContext) => Result; + /** * Visit a parse tree produced by the `memberAccessExp` * labeled alternative in `ExpressionParser.primaryExpression`. @@ -137,6 +148,20 @@ export interface ExpressionVisitor extends ParseTreeVisitor { */ visitPrimaryExpression?: (ctx: PrimaryExpressionContext) => Result; + /** + * Visit a parse tree produced by `ExpressionParser.stringInterpolation`. + * @param ctx the parse tree + * @return the visitor result + */ + visitStringInterpolation?: (ctx: StringInterpolationContext) => Result; + + /** + * Visit a parse tree produced by `ExpressionParser.textContent`. + * @param ctx the parse tree + * @return the visitor result + */ + visitTextContent?: (ctx: TextContentContext) => Result; + /** * Visit a parse tree produced by `ExpressionParser.argsList`. * @param ctx the parse tree diff --git a/libraries/adaptive-expressions/src/parser/generated/index.ts b/libraries/adaptive-expressions/src/parser/generated/index.ts index b2f730cd32..cf90ec968f 100644 --- a/libraries/adaptive-expressions/src/parser/generated/index.ts +++ b/libraries/adaptive-expressions/src/parser/generated/index.ts @@ -7,6 +7,6 @@ * Licensed under the MIT License. */ export * from './ExpressionLexer'; -export * from './ExpressionListener'; +export * from './ExpressionParserListener'; export * from './ExpressionParser'; -export * from './ExpressionVisitor'; +export * from './ExpressionParserVisitor'; diff --git a/libraries/adaptive-expressions/src/parser/util.ts b/libraries/adaptive-expressions/src/parser/util.ts index f52e47b028..7383c51795 100644 --- a/libraries/adaptive-expressions/src/parser/util.ts +++ b/libraries/adaptive-expressions/src/parser/util.ts @@ -18,16 +18,19 @@ export class Util { return str.trim(); } - public static unescape(str: string): string { - if (str !== undefined) { - str = str.replace(/\\\\/g, '\\') - .replace(/\\n/g, '\n') - .replace(/\\r/g, '\r') - .replace(/\\t/g, '\t') - .replace(/\\"/g, '"') - .replace(/\\'/g, '\''); - } + public static unescape(exp: string): string { + const validCharactersDict: any = { + '\\r': '\r', + '\\n': '\n', + '\\t': '\t' + }; - return str; + return exp.replace(/\\[^\r\n]?/g, (sub: string): string => { + if (sub in validCharactersDict) { + return validCharactersDict[sub]; + } else { + return sub.substr(1); + } + }); } } diff --git a/libraries/adaptive-expressions/tests/badExpression.test.js b/libraries/adaptive-expressions/tests/badExpression.test.js index 2d86022c7f..79c643f275 100644 --- a/libraries/adaptive-expressions/tests/badExpression.test.js +++ b/libraries/adaptive-expressions/tests/badExpression.test.js @@ -10,7 +10,8 @@ const invalidExpressions = [ 'func(A,b,b,)', '"hello\'', 'user.lists.{dialog.listName}', - '\'hello\'.length()' + '\'hello\'.length()', + '`hi` world' ]; const badExpressions = @@ -30,13 +31,11 @@ const badExpressions = '\'1\' / 2', // params should be number '\'1\' % 2', // params should be number '\'1\' ^ 2', // params should be number - '\'string\'&one', // $ can only accept string parameter '1/0', // can not divide 0 // String functions test - 'concat(one, hello)', // concat can only accept string parameter 'length(one, 1)', // length can only have one param - 'length(concat(one, hello))', //children func error + 'length(replace(hello))', //children func error 'replace(hello)', // replace need three parameters 'replace(one, \'l\', \'k\')', // replace only accept string parameter 'replace(\'hi\', 1, \'k\')', // replace only accept string parameter diff --git a/libraries/adaptive-expressions/tests/expression.test.js b/libraries/adaptive-expressions/tests/expression.test.js index 2b2b1966e6..f0c66a643c 100644 --- a/libraries/adaptive-expressions/tests/expression.test.js +++ b/libraries/adaptive-expressions/tests/expression.test.js @@ -7,6 +7,21 @@ const moment = require('moment'); const one = ['one']; const oneTwo = ['one', 'two']; const dataSource = [ + + // string interpolation test + ['`hi`', 'hi'], + ['`hi\\``', 'hi`'], + ['`${world}`', 'world'], + ['`hi ${string(\'jack\\`\')}`', 'hi jack`'], + ['`\\${world}`', '${world}'], + ['length(`hello ${world}`)', 'hello world'.length], + ['json(`{"foo": "${hello}","item": "${world}"}`).foo', 'hello'], + ['`hello ${world}` == \'hello world\'', true], + ['`hello ${world}` != \'hello hello\'', true], + ['`hello ${user.nickname}` == \'hello John\'', true], + ['`hello ${user.nickname}` != \'hello Dong\'', true], + + // Operators tests ['1 + 2', 3], ['- 1 + 2', 1], @@ -318,7 +333,7 @@ const dataSource = [ ['formatDateTime(notISOTimestamp, \'ddd\')', 'Thu'], ['formatDateTime(notISOTimestamp, \'dddd\')', 'Thursday'], ['formatDateTime(\'2018-03-15T00:00:00.000Z\', \'yyyy\')', '2018'], - ['formatDateTime(\'2018-03-15T00:00:00.000Z\', \'yyyy-MM-dd-\\d\')', '2018-03-15-4'], + ['formatDateTime(\'2018-03-15T00:00:00.000Z\', \'yyyy-MM-dd-\\\\d\')', '2018-03-15-4'], ['formatDateTime(\'2018-03-15T00:00:00.010Z\', \'FFFF\')', '0100'], ['formatDateTime(\'2018-03-15T00:00:00.010Z\', \'FFFFFF\')', '010000'], ['formatDateTime(\'2018-03-15T00:00:00.010Z\', \'FFF\')', '010'], @@ -482,8 +497,8 @@ const dataSource = [ ['isMatch(\'abacaxc\', \'ab.??c\')', true], // "??" (lazy versions) ['isMatch(\'12abc34\', \'([0-9]+)([a-z]+)([0-9]+)\')', true], // "(...)" (simple group) ['isMatch(\'12abc\', \'([0-9]+)([a-z]+)([0-9]+)\')', false], // "(...)" (simple group) - [`isMatch('a', '\\w{1}')`, true], // "\w" (match [a-zA-Z0-9_]) - [`isMatch('1', '\\d{1}')`, true], // "\d" (match [0-9]) + ['isMatch("a", "\\\\w{1}")', true], // "\w" (match [a-zA-Z0-9_]) + ['isMatch("1", "\\\\d{1}")', true], // "\d" (match [0-9]) // Empty expression ['', ''], @@ -546,6 +561,7 @@ const scope = { unixTimestamp: 1521118800, user: { + nickname:'John', lists: { todo: ['todo1', 'todo2', 'todo3'] diff --git a/libraries/botbuilder-lg/src/LGFileLexer.g4 b/libraries/botbuilder-lg/src/LGFileLexer.g4 index 655b2d61dd..a47b3d474a 100644 --- a/libraries/botbuilder-lg/src/LGFileLexer.g4 +++ b/libraries/botbuilder-lg/src/LGFileLexer.g4 @@ -44,7 +44,9 @@ fragment EMPTY_OBJECT: '{' WHITESPACE* '}'; fragment STRING_LITERAL : ('\'' (~['\r\n])* '\'') | ('"' (~["\r\n])* '"'); -fragment EXPRESSION_FRAGMENT : '$' '{' (STRING_LITERAL| ~[\r\n{}'"] | EMPTY_OBJECT )*? '}'; +fragment STRING_INTERPOLATION : '`' ('\\`' | ~'`')* '`'; + +fragment EXPRESSION_FRAGMENT : '$' '{' (STRING_LITERAL|STRING_INTERPOLATION|EMPTY_OBJECT|~[\r\n{}'"`])*? '}'; fragment ESCAPE_CHARACTER_FRAGMENT : '\\' ~[\r\n]?; diff --git a/libraries/botbuilder-lg/src/evaluator.ts b/libraries/botbuilder-lg/src/evaluator.ts index 0466efa107..f0ff21716c 100644 --- a/libraries/botbuilder-lg/src/evaluator.ts +++ b/libraries/botbuilder-lg/src/evaluator.ts @@ -41,8 +41,8 @@ export class Evaluator extends AbstractParseTreeVisitor implements LGFilePa private readonly evalutationTargetStack: EvaluationTarget[] = []; // to support broswer, use look-ahead replace look-behind - // original:/(? implements LGFilePa const validCharactersDict: any = { '\\r': '\r', '\\n': '\n', - '\\t': '\t', - '\\\\': '\\', + '\\t': '\t' }; return exp.replace(/\\[^\r\n]?/g, (sub: string): string => { diff --git a/libraries/botbuilder-lg/src/generated/LGFileLexer.ts b/libraries/botbuilder-lg/src/generated/LGFileLexer.ts index 553ebaa954..6400663ee0 100644 --- a/libraries/botbuilder-lg/src/generated/LGFileLexer.ts +++ b/libraries/botbuilder-lg/src/generated/LGFileLexer.ts @@ -72,14 +72,14 @@ export class LGFileLexer extends Lexer { public static readonly ruleNames: string[] = [ "A", "C", "D", "E", "F", "H", "I", "L", "S", "T", "U", "W", "LETTER", - "NUMBER", "WHITESPACE", "EMPTY_OBJECT", "STRING_LITERAL", "EXPRESSION_FRAGMENT", - "ESCAPE_CHARACTER_FRAGMENT", "COMMENTS", "WS", "NEWLINE", "HASH", "DASH", - "LEFT_SQUARE_BRACKET", "IMPORT", "INVALID_TOKEN", "WS_IN_NAME", "NEWLINE_IN_NAME", - "IDENTIFIER", "DOT", "OPEN_PARENTHESIS", "CLOSE_PARENTHESIS", "COMMA", - "TEXT_IN_NAME", "WS_IN_BODY", "MULTILINE_PREFIX", "NEWLINE_IN_BODY", "IF", - "ELSEIF", "ELSE", "SWITCH", "CASE", "DEFAULT", "ESCAPE_CHARACTER", "EXPRESSION", - "TEXT", "MULTILINE_SUFFIX", "MULTILINE_ESCAPE_CHARACTER", "MULTILINE_EXPRESSION", - "MULTILINE_TEXT", "WS_IN_STRUCTURE_NAME", "NEWLINE_IN_STRUCTURE_NAME", + "NUMBER", "WHITESPACE", "EMPTY_OBJECT", "STRING_LITERAL", "STRING_INTERPOLATION", + "EXPRESSION_FRAGMENT", "ESCAPE_CHARACTER_FRAGMENT", "COMMENTS", "WS", + "NEWLINE", "HASH", "DASH", "LEFT_SQUARE_BRACKET", "IMPORT", "INVALID_TOKEN", + "WS_IN_NAME", "NEWLINE_IN_NAME", "IDENTIFIER", "DOT", "OPEN_PARENTHESIS", + "CLOSE_PARENTHESIS", "COMMA", "TEXT_IN_NAME", "WS_IN_BODY", "MULTILINE_PREFIX", + "NEWLINE_IN_BODY", "IF", "ELSEIF", "ELSE", "SWITCH", "CASE", "DEFAULT", + "ESCAPE_CHARACTER", "EXPRESSION", "TEXT", "MULTILINE_SUFFIX", "MULTILINE_ESCAPE_CHARACTER", + "MULTILINE_EXPRESSION", "MULTILINE_TEXT", "WS_IN_STRUCTURE_NAME", "NEWLINE_IN_STRUCTURE_NAME", "STRUCTURE_NAME", "TEXT_IN_STRUCTURE_NAME", "STRUCTURED_COMMENTS", "WS_IN_STRUCTURE_BODY", "STRUCTURED_NEWLINE", "STRUCTURED_BODY_END", "STRUCTURE_IDENTIFIER", "STRUCTURE_EQUALS", "STRUCTURE_OR_MARK", "ESCAPE_CHARACTER_IN_STRUCTURE_BODY", "EXPRESSION_IN_STRUCTURE_BODY", @@ -145,107 +145,107 @@ export class LGFileLexer extends Lexer { // @Override public action(_localctx: RuleContext, ruleIndex: number, actionIndex: number): void { switch (ruleIndex) { - case 22: + case 23: this.HASH_action(_localctx, actionIndex); break; - case 23: + case 24: this.DASH_action(_localctx, actionIndex); break; - case 25: + case 26: this.IMPORT_action(_localctx, actionIndex); break; - case 26: + case 27: this.INVALID_TOKEN_action(_localctx, actionIndex); break; - case 28: + case 29: this.NEWLINE_IN_NAME_action(_localctx, actionIndex); break; - case 36: + case 37: this.MULTILINE_PREFIX_action(_localctx, actionIndex); break; - case 37: + case 38: this.NEWLINE_IN_BODY_action(_localctx, actionIndex); break; - case 38: + case 39: this.IF_action(_localctx, actionIndex); break; - case 39: + case 40: this.ELSEIF_action(_localctx, actionIndex); break; - case 40: + case 41: this.ELSE_action(_localctx, actionIndex); break; - case 41: + case 42: this.SWITCH_action(_localctx, actionIndex); break; - case 42: + case 43: this.CASE_action(_localctx, actionIndex); break; - case 43: + case 44: this.DEFAULT_action(_localctx, actionIndex); break; - case 44: + case 45: this.ESCAPE_CHARACTER_action(_localctx, actionIndex); break; - case 45: + case 46: this.EXPRESSION_action(_localctx, actionIndex); break; - case 46: + case 47: this.TEXT_action(_localctx, actionIndex); break; - case 47: + case 48: this.MULTILINE_SUFFIX_action(_localctx, actionIndex); break; - case 52: + case 53: this.NEWLINE_IN_STRUCTURE_NAME_action(_localctx, actionIndex); break; - case 57: + case 58: this.STRUCTURED_NEWLINE_action(_localctx, actionIndex); break; - case 58: + case 59: this.STRUCTURED_BODY_END_action(_localctx, actionIndex); break; - case 59: + case 60: this.STRUCTURE_IDENTIFIER_action(_localctx, actionIndex); break; - case 60: + case 61: this.STRUCTURE_EQUALS_action(_localctx, actionIndex); break; - case 61: + case 62: this.STRUCTURE_OR_MARK_action(_localctx, actionIndex); break; - case 62: + case 63: this.ESCAPE_CHARACTER_IN_STRUCTURE_BODY_action(_localctx, actionIndex); break; - case 63: + case 64: this.EXPRESSION_IN_STRUCTURE_BODY_action(_localctx, actionIndex); break; - case 64: + case 65: this.TEXT_IN_STRUCTURE_BODY_action(_localctx, actionIndex); break; } @@ -439,49 +439,49 @@ export class LGFileLexer extends Lexer { // @Override public sempred(_localctx: RuleContext, ruleIndex: number, predIndex: number): boolean { switch (ruleIndex) { - case 23: + case 24: return this.DASH_sempred(_localctx, predIndex); - case 24: + case 25: return this.LEFT_SQUARE_BRACKET_sempred(_localctx, predIndex); - case 35: + case 36: return this.WS_IN_BODY_sempred(_localctx, predIndex); - case 36: + case 37: return this.MULTILINE_PREFIX_sempred(_localctx, predIndex); - case 38: + case 39: return this.IF_sempred(_localctx, predIndex); - case 39: + case 40: return this.ELSEIF_sempred(_localctx, predIndex); - case 40: + case 41: return this.ELSE_sempred(_localctx, predIndex); - case 41: + case 42: return this.SWITCH_sempred(_localctx, predIndex); - case 42: + case 43: return this.CASE_sempred(_localctx, predIndex); - case 43: + case 44: return this.DEFAULT_sempred(_localctx, predIndex); - case 55: + case 56: return this.STRUCTURED_COMMENTS_sempred(_localctx, predIndex); - case 56: + case 57: return this.WS_IN_STRUCTURE_BODY_sempred(_localctx, predIndex); - case 58: + case 59: return this.STRUCTURED_BODY_END_sempred(_localctx, predIndex); - case 59: + case 60: return this.STRUCTURE_IDENTIFIER_sempred(_localctx, predIndex); - case 60: + case 61: return this.STRUCTURE_EQUALS_sempred(_localctx, predIndex); } return true; @@ -594,7 +594,7 @@ export class LGFileLexer extends Lexer { private static readonly _serializedATNSegments: number = 2; private static readonly _serializedATNSegment0: string = - "\x03\uAF6F\u8320\u479D\uB75C\u4880\u1605\u191C\uAB37\x02-\u0246\b\x01" + + "\x03\uAF6F\u8320\u479D\uB75C\u4880\u1605\u191C\uAB37\x02-\u0254\b\x01" + "\b\x01\b\x01\b\x01\b\x01\b\x01\x04\x02\t\x02\x04\x03\t\x03\x04\x04\t\x04" + "\x04\x05\t\x05\x04\x06\t\x06\x04\x07\t\x07\x04\b\t\b\x04\t\t\t\x04\n\t" + "\n\x04\v\t\v\x04\f\t\f\x04\r\t\r\x04\x0E\t\x0E\x04\x0F\t\x0F\x04\x10\t" + @@ -605,284 +605,291 @@ export class LGFileLexer extends Lexer { "\'\x04(\t(\x04)\t)\x04*\t*\x04+\t+\x04,\t,\x04-\t-\x04.\t.\x04/\t/\x04" + "0\t0\x041\t1\x042\t2\x043\t3\x044\t4\x045\t5\x046\t6\x047\t7\x048\t8\x04" + "9\t9\x04:\t:\x04;\t;\x04<\t<\x04=\t=\x04>\t>\x04?\t?\x04@\t@\x04A\tA\x04" + - "B\tB\x03\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03\x04\x03\x05\x03\x05\x03" + - "\x06\x03\x06\x03\x07\x03\x07\x03\b\x03\b\x03\t\x03\t\x03\n\x03\n\x03\v" + - "\x03\v\x03\f\x03\f\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0F\x03\x0F\x03\x10" + - "\x03\x10\x03\x11\x03\x11\x07\x11\xAB\n\x11\f\x11\x0E\x11\xAE\v\x11\x03" + - "\x11\x03\x11\x03\x12\x03\x12\x07\x12\xB4\n\x12\f\x12\x0E\x12\xB7\v\x12" + - "\x03\x12\x03\x12\x03\x12\x07\x12\xBC\n\x12\f\x12\x0E\x12\xBF\v\x12\x03" + - "\x12\x05\x12\xC2\n\x12\x03\x13\x03\x13\x03\x13\x03\x13\x03\x13\x07\x13" + - "\xC9\n\x13\f\x13\x0E\x13\xCC\v\x13\x03\x13\x03\x13\x03\x14\x03\x14\x05" + - "\x14\xD2\n\x14\x03\x15\x03\x15\x06\x15\xD6\n\x15\r\x15\x0E\x15\xD7\x03" + - "\x15\x03\x15\x03\x16\x06\x16\xDD\n\x16\r\x16\x0E\x16\xDE\x03\x16\x03\x16" + - "\x03\x17\x05\x17\xE4\n\x17\x03\x17\x03\x17\x03\x17\x03\x17\x03\x18\x03" + - "\x18\x03\x18\x03\x18\x03\x18\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03" + - "\x19\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1B\x03\x1B\x07\x1B\xFC" + - "\n\x1B\f\x1B\x0E\x1B\xFF\v\x1B\x03\x1B\x03\x1B\x03\x1B\x07\x1B\u0104\n" + - "\x1B\f\x1B\x0E\x1B\u0107\v\x1B\x03\x1B\x03\x1B\x03\x1B\x03\x1C\x03\x1C" + - "\x03\x1C\x03\x1D\x06\x1D\u0110\n\x1D\r\x1D\x0E\x1D\u0111\x03\x1D\x03\x1D" + - "\x03\x1E\x05\x1E\u0117\n\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03\x1E\x03" + - "\x1E\x03\x1F\x03\x1F\x03\x1F\x05\x1F\u0122\n\x1F\x03\x1F\x03\x1F\x03\x1F" + - "\x07\x1F\u0127\n\x1F\f\x1F\x0E\x1F\u012A\v\x1F\x03 \x03 \x03!\x03!\x03" + - "\"\x03\"\x03#\x03#\x03$\x06$\u0135\n$\r$\x0E$\u0136\x03%\x06%\u013A\n" + - "%\r%\x0E%\u013B\x03%\x03%\x03%\x03%\x03&\x03&\x03&\x03&\x03&\x03&\x03" + - "&\x03&\x03&\x03\'\x05\'\u014C\n\'\x03\'\x03\'\x03\'\x03\'\x03\'\x03\'" + - "\x03(\x03(\x03(\x07(\u0157\n(\f(\x0E(\u015A\v(\x03(\x03(\x03(\x03(\x03" + - ")\x03)\x03)\x03)\x03)\x07)\u0165\n)\f)\x0E)\u0168\v)\x03)\x03)\x03)\x07" + - ")\u016D\n)\f)\x0E)\u0170\v)\x03)\x03)\x03)\x03)\x03*\x03*\x03*\x03*\x03" + - "*\x07*\u017B\n*\f*\x0E*\u017E\v*\x03*\x03*\x03*\x03*\x03+\x03+\x03+\x03" + - "+\x03+\x03+\x03+\x07+\u018B\n+\f+\x0E+\u018E\v+\x03+\x03+\x03+\x03+\x03" + - ",\x03,\x03,\x03,\x03,\x07,\u0199\n,\f,\x0E,\u019C\v,\x03,\x03,\x03,\x03" + - ",\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x03-\x07-\u01AA\n-\f-\x0E-\u01AD" + - "\v-\x03-\x03-\x03-\x03-\x03.\x03.\x03.\x03/\x03/\x03/\x030\x060\u01BA" + - "\n0\r0\x0E0\u01BB\x030\x030\x031\x031\x031\x031\x031\x031\x031\x031\x03" + - "2\x032\x032\x032\x033\x033\x033\x033\x034\x054\u01D1\n4\x034\x034\x06" + - "4\u01D5\n4\r4\x0E4\u01D6\x034\x034\x035\x065\u01DC\n5\r5\x0E5\u01DD\x03" + - "5\x035\x036\x056\u01E3\n6\x036\x036\x036\x036\x036\x036\x036\x037\x03" + - "7\x037\x057\u01EF\n7\x037\x037\x037\x077\u01F4\n7\f7\x0E7\u01F7\v7\x03" + - "8\x068\u01FA\n8\r8\x0E8\u01FB\x039\x039\x079\u0200\n9\f9\x0E9\u0203\v" + - "9\x039\x059\u0206\n9\x039\x039\x039\x039\x039\x03:\x06:\u020E\n:\r:\x0E" + - ":\u020F\x03:\x03:\x03:\x03:\x03;\x05;\u0217\n;\x03;\x03;\x03;\x03<\x03" + - "<\x03<\x03<\x03<\x03<\x03<\x03=\x03=\x03=\x05=\u0226\n=\x03=\x03=\x03" + - "=\x07=\u022B\n=\f=\x0E=\u022E\v=\x03=\x03=\x03=\x03>\x03>\x03>\x03>\x03" + - "?\x03?\x03?\x03@\x03@\x03@\x03A\x03A\x03A\x03B\x06B\u0241\nB\rB\x0EB\u0242" + - "\x03B\x03B\n\xCA\xFD\u0105\u0136\u01BB\u01D6\u01FB\u0242\x02\x02C\b\x02" + - "\x02\n\x02\x02\f\x02\x02\x0E\x02\x02\x10\x02\x02\x12\x02\x02\x14\x02\x02" + - "\x16\x02\x02\x18\x02\x02\x1A\x02\x02\x1C\x02\x02\x1E\x02\x02 \x02\x02" + - "\"\x02\x02$\x02\x02&\x02\x02(\x02\x02*\x02\x02,\x02\x02.\x02\x030\x02" + - "\x042\x02\x054\x02\x066\x02\x078\x02\b:\x02\t<\x02\n>\x02\v@\x02\fB\x02" + - "\rD\x02\x0EF\x02\x0FH\x02\x10J\x02\x11L\x02\x12N\x02\x13P\x02\x14R\x02" + - "\x15T\x02\x16V\x02\x17X\x02\x18Z\x02\x19\\\x02\x1A^\x02\x1B`\x02\x1Cb" + - "\x02\x1Dd\x02\x1Ef\x02\x1Fh\x02\x02j\x02\x02l\x02\x02n\x02 p\x02!r\x02" + - "\"t\x02#v\x02$x\x02%z\x02&|\x02\'~\x02(\x80\x02)\x82\x02*\x84\x02+\x86" + - "\x02,\x88\x02-\b\x02\x03\x04\x05\x06\x07\x18\x04\x02CCcc\x04\x02EEee\x04" + - "\x02FFff\x04\x02GGgg\x04\x02HHhh\x04\x02JJjj\x04\x02KKkk\x04\x02NNnn\x04" + - "\x02UUuu\x04\x02VVvv\x04\x02WWww\x04\x02YYyy\x04\x02C\\c|\x06\x02\v\v" + - "\"\"\xA2\xA2\uFF01\uFF01\x05\x02\f\f\x0F\x0F))\x05\x02\f\f\x0F\x0F$$\b" + - "\x02\f\f\x0F\x0F$$))}}\x7F\x7F\x04\x02\f\f\x0F\x0F\x06\x02\f\f\x0F\x0F" + - "]]__\x05\x02\f\f\x0F\x0F*+\x04\x02//aa\x04\x02/0aa\u0261\x02.\x03\x02" + - "\x02\x02\x020\x03\x02\x02\x02\x022\x03\x02\x02\x02\x024\x03\x02\x02\x02" + + "B\tB\x04C\tC\x03\x02\x03\x02\x03\x03\x03\x03\x03\x04\x03\x04\x03\x05\x03" + + "\x05\x03\x06\x03\x06\x03\x07\x03\x07\x03\b\x03\b\x03\t\x03\t\x03\n\x03" + + "\n\x03\v\x03\v\x03\f\x03\f\x03\r\x03\r\x03\x0E\x03\x0E\x03\x0F\x03\x0F" + + "\x03\x10\x03\x10\x03\x11\x03\x11\x07\x11\xAD\n\x11\f\x11\x0E\x11\xB0\v" + + "\x11\x03\x11\x03\x11\x03\x12\x03\x12\x07\x12\xB6\n\x12\f\x12\x0E\x12\xB9" + + "\v\x12\x03\x12\x03\x12\x03\x12\x07\x12\xBE\n\x12\f\x12\x0E\x12\xC1\v\x12" + + "\x03\x12\x05\x12\xC4\n\x12\x03\x13\x03\x13\x03\x13\x03\x13\x07\x13\xCA" + + "\n\x13\f\x13\x0E\x13\xCD\v\x13\x03\x13\x03\x13\x03\x14\x03\x14\x03\x14" + + "\x03\x14\x03\x14\x03\x14\x07\x14\xD7\n\x14\f\x14\x0E\x14\xDA\v\x14\x03" + + "\x14\x03\x14\x03\x15\x03\x15\x05\x15\xE0\n\x15\x03\x16\x03\x16\x06\x16" + + "\xE4\n\x16\r\x16\x0E\x16\xE5\x03\x16\x03\x16\x03\x17\x06\x17\xEB\n\x17" + + "\r\x17\x0E\x17\xEC\x03\x17\x03\x17\x03\x18\x05\x18\xF2\n\x18\x03\x18\x03" + + "\x18\x03\x18\x03\x18\x03\x19\x03\x19\x03\x19\x03\x19\x03\x19\x03\x1A\x03" + + "\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1A\x03\x1B\x03\x1B\x03\x1B\x03\x1B\x03" + + "\x1B\x03\x1C\x03\x1C\x07\x1C\u010A\n\x1C\f\x1C\x0E\x1C\u010D\v\x1C\x03" + + "\x1C\x03\x1C\x03\x1C\x07\x1C\u0112\n\x1C\f\x1C\x0E\x1C\u0115\v\x1C\x03" + + "\x1C\x03\x1C\x03\x1C\x03\x1D\x03\x1D\x03\x1D\x03\x1E\x06\x1E\u011E\n\x1E" + + "\r\x1E\x0E\x1E\u011F\x03\x1E\x03\x1E\x03\x1F\x05\x1F\u0125\n\x1F\x03\x1F" + + "\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03\x1F\x03 \x03 \x03 \x05 \u0130\n " + + "\x03 \x03 \x03 \x07 \u0135\n \f \x0E \u0138\v \x03!\x03!\x03\"\x03\"\x03" + + "#\x03#\x03$\x03$\x03%\x06%\u0143\n%\r%\x0E%\u0144\x03&\x06&\u0148\n&\r" + + "&\x0E&\u0149\x03&\x03&\x03&\x03&\x03\'\x03\'\x03\'\x03\'\x03\'\x03\'\x03" + + "\'\x03\'\x03\'\x03(\x05(\u015A\n(\x03(\x03(\x03(\x03(\x03(\x03(\x03)\x03" + + ")\x03)\x07)\u0165\n)\f)\x0E)\u0168\v)\x03)\x03)\x03)\x03)\x03*\x03*\x03" + + "*\x03*\x03*\x07*\u0173\n*\f*\x0E*\u0176\v*\x03*\x03*\x03*\x07*\u017B\n" + + "*\f*\x0E*\u017E\v*\x03*\x03*\x03*\x03*\x03+\x03+\x03+\x03+\x03+\x07+\u0189" + + "\n+\f+\x0E+\u018C\v+\x03+\x03+\x03+\x03+\x03,\x03,\x03,\x03,\x03,\x03" + + ",\x03,\x07,\u0199\n,\f,\x0E,\u019C\v,\x03,\x03,\x03,\x03,\x03-\x03-\x03" + + "-\x03-\x03-\x07-\u01A7\n-\f-\x0E-\u01AA\v-\x03-\x03-\x03-\x03-\x03.\x03" + + ".\x03.\x03.\x03.\x03.\x03.\x03.\x07.\u01B8\n.\f.\x0E.\u01BB\v.\x03.\x03" + + ".\x03.\x03.\x03/\x03/\x03/\x030\x030\x030\x031\x061\u01C8\n1\r1\x0E1\u01C9" + + "\x031\x031\x032\x032\x032\x032\x032\x032\x032\x032\x033\x033\x033\x03" + + "3\x034\x034\x034\x034\x035\x055\u01DF\n5\x035\x035\x065\u01E3\n5\r5\x0E" + + "5\u01E4\x035\x035\x036\x066\u01EA\n6\r6\x0E6\u01EB\x036\x036\x037\x05" + + "7\u01F1\n7\x037\x037\x037\x037\x037\x037\x037\x038\x038\x038\x058\u01FD" + + "\n8\x038\x038\x038\x078\u0202\n8\f8\x0E8\u0205\v8\x039\x069\u0208\n9\r" + + "9\x0E9\u0209\x03:\x03:\x07:\u020E\n:\f:\x0E:\u0211\v:\x03:\x05:\u0214" + + "\n:\x03:\x03:\x03:\x03:\x03:\x03;\x06;\u021C\n;\r;\x0E;\u021D\x03;\x03" + + ";\x03;\x03;\x03<\x05<\u0225\n<\x03<\x03<\x03<\x03=\x03=\x03=\x03=\x03" + + "=\x03=\x03=\x03>\x03>\x03>\x05>\u0234\n>\x03>\x03>\x03>\x07>\u0239\n>" + + "\f>\x0E>\u023C\v>\x03>\x03>\x03>\x03?\x03?\x03?\x03?\x03@\x03@\x03@\x03" + + "A\x03A\x03A\x03B\x03B\x03B\x03C\x06C\u024F\nC\rC\x0EC\u0250\x03C\x03C" + + "\n\xD8\u010B\u0113\u0144\u01C9\u01E4\u0209\u0250\x02\x02D\b\x02\x02\n" + + "\x02\x02\f\x02\x02\x0E\x02\x02\x10\x02\x02\x12\x02\x02\x14\x02\x02\x16" + + "\x02\x02\x18\x02\x02\x1A\x02\x02\x1C\x02\x02\x1E\x02\x02 \x02\x02\"\x02" + + "\x02$\x02\x02&\x02\x02(\x02\x02*\x02\x02,\x02\x02.\x02\x020\x02\x032\x02" + + "\x044\x02\x056\x02\x068\x02\x07:\x02\b<\x02\t>\x02\n@\x02\vB\x02\fD\x02" + + "\rF\x02\x0EH\x02\x0FJ\x02\x10L\x02\x11N\x02\x12P\x02\x13R\x02\x14T\x02" + + "\x15V\x02\x16X\x02\x17Z\x02\x18\\\x02\x19^\x02\x1A`\x02\x1Bb\x02\x1Cd" + + "\x02\x1Df\x02\x1Eh\x02\x1Fj\x02\x02l\x02\x02n\x02\x02p\x02 r\x02!t\x02" + + "\"v\x02#x\x02$z\x02%|\x02&~\x02\'\x80\x02(\x82\x02)\x84\x02*\x86\x02+" + + "\x88\x02,\x8A\x02-\b\x02\x03\x04\x05\x06\x07\x19\x04\x02CCcc\x04\x02E" + + "Eee\x04\x02FFff\x04\x02GGgg\x04\x02HHhh\x04\x02JJjj\x04\x02KKkk\x04\x02" + + "NNnn\x04\x02UUuu\x04\x02VVvv\x04\x02WWww\x04\x02YYyy\x04\x02C\\c|\x06" + + "\x02\v\v\"\"\xA2\xA2\uFF01\uFF01\x05\x02\f\f\x0F\x0F))\x05\x02\f\f\x0F" + + "\x0F$$\x03\x02bb\t\x02\f\f\x0F\x0F$$))bb}}\x7F\x7F\x04\x02\f\f\x0F\x0F" + + "\x06\x02\f\f\x0F\x0F]]__\x05\x02\f\f\x0F\x0F*+\x04\x02//aa\x04\x02/0a" + + "a\u0271\x020\x03\x02\x02\x02\x022\x03\x02\x02\x02\x024\x03\x02\x02\x02" + "\x026\x03\x02\x02\x02\x028\x03\x02\x02\x02\x02:\x03\x02\x02\x02\x02<\x03" + - "\x02\x02\x02\x03>\x03\x02\x02\x02\x03@\x03\x02\x02\x02\x03B\x03\x02\x02" + + "\x02\x02\x02\x02>\x03\x02\x02\x02\x03@\x03\x02\x02\x02\x03B\x03\x02\x02" + "\x02\x03D\x03\x02\x02\x02\x03F\x03\x02\x02\x02\x03H\x03\x02\x02\x02\x03" + - "J\x03\x02\x02\x02\x03L\x03\x02\x02\x02\x04N\x03\x02\x02\x02\x04P\x03\x02" + + "J\x03\x02\x02\x02\x03L\x03\x02\x02\x02\x03N\x03\x02\x02\x02\x04P\x03\x02" + "\x02\x02\x04R\x03\x02\x02\x02\x04T\x03\x02\x02\x02\x04V\x03\x02\x02\x02" + "\x04X\x03\x02\x02\x02\x04Z\x03\x02\x02\x02\x04\\\x03\x02\x02\x02\x04^" + "\x03\x02\x02\x02\x04`\x03\x02\x02\x02\x04b\x03\x02\x02\x02\x04d\x03\x02" + - "\x02\x02\x05f\x03\x02\x02\x02\x05h\x03\x02\x02\x02\x05j\x03\x02\x02\x02" + - "\x05l\x03\x02\x02\x02\x06n\x03\x02\x02\x02\x06p\x03\x02\x02\x02\x06r\x03" + - "\x02\x02\x02\x06t\x03\x02\x02\x02\x07v\x03\x02\x02\x02\x07x\x03\x02\x02" + + "\x02\x02\x04f\x03\x02\x02\x02\x05h\x03\x02\x02\x02\x05j\x03\x02\x02\x02" + + "\x05l\x03\x02\x02\x02\x05n\x03\x02\x02\x02\x06p\x03\x02\x02\x02\x06r\x03" + + "\x02\x02\x02\x06t\x03\x02\x02\x02\x06v\x03\x02\x02\x02\x07x\x03\x02\x02" + "\x02\x07z\x03\x02\x02\x02\x07|\x03\x02\x02\x02\x07~\x03\x02\x02\x02\x07" + "\x80\x03\x02\x02\x02\x07\x82\x03\x02\x02\x02\x07\x84\x03\x02\x02\x02\x07" + - "\x86\x03\x02\x02\x02\x07\x88\x03\x02\x02\x02\b\x8A\x03\x02\x02\x02\n\x8C" + - "\x03\x02\x02\x02\f\x8E\x03\x02\x02\x02\x0E\x90\x03\x02\x02\x02\x10\x92" + - "\x03\x02\x02\x02\x12\x94\x03\x02\x02\x02\x14\x96\x03\x02\x02\x02\x16\x98" + - "\x03\x02\x02\x02\x18\x9A\x03\x02\x02\x02\x1A\x9C\x03\x02\x02\x02\x1C\x9E" + - "\x03\x02\x02\x02\x1E\xA0\x03\x02\x02\x02 \xA2\x03\x02\x02\x02\"\xA4\x03" + - "\x02\x02\x02$\xA6\x03\x02\x02\x02&\xA8\x03\x02\x02\x02(\xC1\x03\x02\x02" + - "\x02*\xC3\x03\x02\x02\x02,\xCF\x03\x02\x02\x02.\xD3\x03\x02\x02\x020\xDC" + - "\x03\x02\x02\x022\xE3\x03\x02\x02\x024\xE9\x03\x02\x02\x026\xEE\x03\x02" + - "\x02\x028\xF4\x03\x02\x02\x02:\xF9\x03\x02\x02\x02<\u010B\x03\x02\x02" + - "\x02>\u010F\x03\x02\x02\x02@\u0116\x03\x02\x02\x02B\u0121\x03\x02\x02" + - "\x02D\u012B\x03\x02\x02\x02F\u012D\x03\x02\x02\x02H\u012F\x03\x02\x02" + - "\x02J\u0131\x03\x02\x02\x02L\u0134\x03\x02\x02\x02N\u0139\x03\x02\x02" + - "\x02P\u0141\x03\x02\x02\x02R\u014B\x03\x02\x02\x02T\u0153\x03\x02\x02" + - "\x02V\u015F\x03\x02\x02\x02X\u0175\x03\x02\x02\x02Z\u0183\x03\x02\x02" + - "\x02\\\u0193\x03\x02\x02\x02^\u01A1\x03\x02\x02\x02`\u01B2\x03\x02\x02" + - "\x02b\u01B5\x03\x02\x02\x02d\u01B9\x03\x02\x02\x02f\u01BF\x03\x02\x02" + - "\x02h\u01C7\x03\x02\x02\x02j\u01CB\x03\x02\x02\x02l\u01D4\x03\x02\x02" + - "\x02n\u01DB\x03\x02\x02\x02p\u01E2\x03\x02\x02\x02r\u01EE\x03\x02\x02" + - "\x02t\u01F9\x03\x02\x02\x02v\u01FD\x03\x02\x02\x02x\u020D\x03\x02\x02" + - "\x02z\u0216\x03\x02\x02\x02|\u021B\x03\x02\x02\x02~\u0225\x03\x02\x02" + - "\x02\x80\u0232\x03\x02\x02\x02\x82\u0236\x03\x02\x02\x02\x84\u0239\x03" + - "\x02\x02\x02\x86\u023C\x03\x02\x02\x02\x88\u0240\x03\x02\x02\x02\x8A\x8B" + - "\t\x02\x02\x02\x8B\t\x03\x02\x02\x02\x8C\x8D\t\x03\x02\x02\x8D\v\x03\x02" + - "\x02\x02\x8E\x8F\t\x04\x02\x02\x8F\r\x03\x02\x02\x02\x90\x91\t\x05\x02" + - "\x02\x91\x0F\x03\x02\x02\x02\x92\x93\t\x06\x02\x02\x93\x11\x03\x02\x02" + - "\x02\x94\x95\t\x07\x02\x02\x95\x13\x03\x02\x02\x02\x96\x97\t\b\x02\x02" + - "\x97\x15\x03\x02\x02\x02\x98\x99\t\t\x02\x02\x99\x17\x03\x02\x02\x02\x9A" + - "\x9B\t\n\x02\x02\x9B\x19\x03\x02\x02\x02\x9C\x9D\t\v\x02\x02\x9D\x1B\x03" + - "\x02\x02\x02\x9E\x9F\t\f\x02\x02\x9F\x1D\x03\x02\x02\x02\xA0\xA1\t\r\x02" + - "\x02\xA1\x1F\x03\x02\x02\x02\xA2\xA3\t\x0E\x02\x02\xA3!\x03\x02\x02\x02" + - "\xA4\xA5\x042;\x02\xA5#\x03\x02\x02\x02\xA6\xA7\t\x0F\x02\x02\xA7%\x03" + - "\x02\x02\x02\xA8\xAC\x07}\x02\x02\xA9\xAB\x05$\x10\x02\xAA\xA9\x03\x02" + - "\x02\x02\xAB\xAE\x03\x02\x02\x02\xAC\xAA\x03\x02\x02\x02\xAC\xAD\x03\x02" + - "\x02\x02\xAD\xAF\x03\x02\x02\x02\xAE\xAC\x03\x02\x02\x02\xAF\xB0\x07\x7F" + - "\x02\x02\xB0\'\x03\x02\x02\x02\xB1\xB5\x07)\x02\x02\xB2\xB4\n\x10\x02" + - "\x02\xB3\xB2\x03\x02\x02\x02\xB4\xB7\x03\x02\x02\x02\xB5\xB3\x03\x02\x02" + - "\x02\xB5\xB6\x03\x02\x02\x02\xB6\xB8\x03\x02\x02\x02\xB7\xB5\x03\x02\x02" + - "\x02\xB8\xC2\x07)\x02\x02\xB9\xBD\x07$\x02\x02\xBA\xBC\n\x11\x02\x02\xBB" + - "\xBA\x03\x02\x02\x02\xBC\xBF\x03\x02\x02\x02\xBD\xBB\x03\x02\x02\x02\xBD" + - "\xBE\x03\x02\x02\x02\xBE\xC0\x03\x02\x02\x02\xBF\xBD\x03\x02\x02\x02\xC0" + - "\xC2\x07$\x02\x02\xC1\xB1\x03\x02\x02\x02\xC1\xB9\x03\x02\x02\x02\xC2" + - ")\x03\x02\x02\x02\xC3\xC4\x07&\x02\x02\xC4\xCA\x07}\x02\x02\xC5\xC9\x05" + - "(\x12\x02\xC6\xC9\n\x12\x02\x02\xC7\xC9\x05&\x11\x02\xC8\xC5\x03\x02\x02" + - "\x02\xC8\xC6\x03\x02\x02\x02\xC8\xC7\x03\x02\x02\x02\xC9\xCC\x03\x02\x02" + - "\x02\xCA\xCB\x03\x02\x02\x02\xCA\xC8\x03\x02\x02\x02\xCB\xCD\x03\x02\x02" + - "\x02\xCC\xCA\x03\x02\x02\x02\xCD\xCE\x07\x7F\x02\x02\xCE+\x03\x02\x02" + - "\x02\xCF\xD1\x07^\x02\x02\xD0\xD2\n\x13\x02\x02\xD1\xD0\x03\x02\x02\x02" + - "\xD1\xD2\x03\x02\x02\x02\xD2-\x03\x02\x02\x02\xD3\xD5\x07@\x02\x02\xD4" + - "\xD6\n\x13\x02\x02\xD5\xD4\x03\x02\x02\x02\xD6\xD7\x03\x02\x02\x02\xD7" + - "\xD5\x03\x02\x02\x02\xD7\xD8\x03\x02\x02\x02\xD8\xD9\x03\x02\x02\x02\xD9" + - "\xDA\b\x15\x02\x02\xDA/\x03\x02\x02\x02\xDB\xDD\x05$\x10\x02\xDC\xDB\x03" + - "\x02\x02\x02\xDD\xDE\x03\x02\x02\x02\xDE\xDC\x03\x02\x02\x02\xDE\xDF\x03" + - "\x02\x02\x02\xDF\xE0\x03\x02\x02\x02\xE0\xE1\b\x16\x02\x02\xE11\x03\x02" + - "\x02\x02\xE2\xE4\x07\x0F\x02\x02\xE3\xE2\x03\x02\x02\x02\xE3\xE4\x03\x02" + - "\x02\x02\xE4\xE5\x03\x02\x02\x02\xE5\xE6\x07\f\x02\x02\xE6\xE7\x03\x02" + - "\x02\x02\xE7\xE8\b\x17\x02\x02\xE83\x03\x02\x02\x02\xE9\xEA\x07%\x02\x02" + - "\xEA\xEB\b\x18\x03\x02\xEB\xEC\x03\x02\x02\x02\xEC\xED\b\x18\x04\x02\xED" + - "5\x03\x02\x02\x02\xEE\xEF\x07/\x02\x02\xEF\xF0\x06\x19\x02\x02\xF0\xF1" + - "\b\x19\x05\x02\xF1\xF2\x03\x02\x02\x02\xF2\xF3\b\x19\x06\x02\xF37\x03" + - "\x02\x02\x02\xF4\xF5\x07]\x02\x02\xF5\xF6\x06\x1A\x03\x02\xF6\xF7\x03" + - "\x02\x02\x02\xF7\xF8\b\x1A\x07\x02\xF89\x03\x02\x02\x02\xF9\xFD\x07]\x02" + - "\x02\xFA\xFC\n\x14\x02\x02\xFB\xFA\x03\x02\x02\x02\xFC\xFF\x03\x02\x02" + - "\x02\xFD\xFE\x03\x02\x02\x02\xFD\xFB\x03\x02\x02\x02\xFE\u0100\x03\x02" + - "\x02\x02\xFF\xFD\x03\x02\x02\x02\u0100\u0101\x07_\x02\x02\u0101\u0105" + - "\x07*\x02\x02\u0102\u0104\n\x15\x02\x02\u0103\u0102\x03\x02\x02\x02\u0104" + - "\u0107\x03\x02\x02\x02\u0105\u0106\x03\x02\x02\x02\u0105\u0103\x03\x02" + - "\x02\x02\u0106\u0108\x03\x02\x02\x02\u0107\u0105\x03\x02\x02\x02\u0108" + - "\u0109\x07+\x02\x02\u0109\u010A\b\x1B\b\x02\u010A;\x03\x02\x02\x02\u010B" + - "\u010C\v\x02\x02\x02\u010C\u010D\b\x1C\t\x02\u010D=\x03\x02\x02\x02\u010E" + - "\u0110\x05$\x10\x02\u010F\u010E\x03\x02\x02\x02\u0110\u0111\x03\x02\x02" + - "\x02\u0111\u010F\x03\x02\x02\x02\u0111\u0112\x03\x02\x02\x02\u0112\u0113" + - "\x03\x02\x02\x02\u0113\u0114\b\x1D\x02\x02\u0114?\x03\x02\x02\x02\u0115" + - "\u0117\x07\x0F\x02\x02\u0116\u0115\x03\x02\x02\x02\u0116\u0117\x03\x02" + - "\x02\x02\u0117\u0118\x03\x02\x02\x02\u0118\u0119\x07\f\x02\x02\u0119\u011A" + - "\b\x1E\n\x02\u011A\u011B\x03\x02\x02\x02\u011B\u011C\b\x1E\x02\x02\u011C" + - "\u011D\b\x1E\v\x02\u011DA\x03\x02\x02\x02\u011E\u0122\x05 \x0E\x02\u011F" + - "\u0122\x05\"\x0F\x02\u0120\u0122\x07a\x02\x02\u0121\u011E\x03\x02\x02" + - "\x02\u0121\u011F\x03\x02\x02\x02\u0121\u0120\x03\x02\x02\x02\u0122\u0128" + - "\x03\x02\x02\x02\u0123\u0127\x05 \x0E\x02\u0124\u0127\x05\"\x0F\x02\u0125" + - "\u0127\t\x16\x02\x02\u0126\u0123\x03\x02\x02\x02\u0126\u0124\x03\x02\x02" + - "\x02\u0126\u0125\x03\x02\x02\x02\u0127\u012A\x03\x02\x02\x02\u0128\u0126" + - "\x03\x02\x02\x02\u0128\u0129\x03\x02\x02\x02\u0129C\x03\x02\x02\x02\u012A" + - "\u0128\x03\x02\x02\x02\u012B\u012C\x070\x02\x02\u012CE\x03\x02\x02\x02" + - "\u012D\u012E\x07*\x02\x02\u012EG\x03\x02\x02\x02\u012F\u0130\x07+\x02" + - "\x02\u0130I\x03\x02\x02\x02\u0131\u0132\x07.\x02\x02\u0132K\x03\x02\x02" + - "\x02\u0133\u0135\n\x13\x02\x02\u0134\u0133\x03\x02\x02\x02\u0135\u0136" + - "\x03\x02\x02\x02\u0136\u0137\x03\x02\x02\x02\u0136\u0134\x03\x02\x02\x02" + - "\u0137M\x03\x02\x02\x02\u0138\u013A\x05$\x10\x02\u0139\u0138\x03\x02\x02" + - "\x02\u013A\u013B\x03\x02\x02\x02\u013B\u0139\x03\x02\x02\x02\u013B\u013C" + - "\x03\x02\x02\x02\u013C\u013D\x03\x02\x02\x02\u013D\u013E\x06%\x04\x02" + - "\u013E\u013F\x03\x02\x02\x02\u013F\u0140\b%\x02\x02\u0140O\x03\x02\x02" + - "\x02\u0141\u0142\x07b\x02\x02\u0142\u0143\x07b\x02\x02\u0143\u0144\x07" + - "b\x02\x02\u0144\u0145\x03\x02\x02\x02\u0145\u0146\x06&\x05\x02\u0146\u0147" + - "\b&\f\x02\u0147\u0148\x03\x02\x02\x02\u0148\u0149\b&\r\x02\u0149Q\x03" + - "\x02\x02\x02\u014A\u014C\x07\x0F\x02\x02\u014B\u014A\x03\x02\x02\x02\u014B" + - "\u014C\x03\x02\x02\x02\u014C\u014D\x03\x02\x02\x02\u014D\u014E\x07\f\x02" + - "\x02\u014E\u014F\b\'\x0E\x02\u014F\u0150\x03\x02\x02\x02\u0150\u0151\b" + - "\'\x02\x02\u0151\u0152\b\'\v\x02\u0152S\x03\x02\x02\x02\u0153\u0154\x05" + - "\x14\b\x02\u0154\u0158\x05\x10\x06\x02\u0155\u0157\x05$\x10\x02\u0156" + - "\u0155\x03\x02\x02\x02\u0157\u015A\x03\x02\x02\x02\u0158\u0156\x03\x02" + - "\x02\x02\u0158\u0159\x03\x02\x02\x02\u0159\u015B\x03\x02\x02\x02\u015A" + - "\u0158\x03\x02\x02\x02\u015B\u015C\x07<\x02\x02\u015C\u015D\x06(\x06\x02" + - "\u015D\u015E\b(\x0F\x02\u015EU\x03\x02\x02\x02\u015F\u0160\x05\x0E\x05" + - "\x02\u0160\u0161\x05\x16\t\x02\u0161\u0162\x05\x18\n\x02\u0162\u0166\x05" + - "\x0E\x05\x02\u0163\u0165\x05$\x10\x02\u0164\u0163\x03\x02\x02\x02\u0165" + - "\u0168\x03\x02\x02\x02\u0166\u0164\x03\x02\x02\x02\u0166\u0167\x03\x02" + - "\x02\x02\u0167\u0169\x03\x02\x02\x02\u0168\u0166\x03\x02\x02\x02\u0169" + - "\u016A\x05\x14\b\x02\u016A\u016E\x05\x10\x06\x02\u016B\u016D\x05$\x10" + - "\x02\u016C\u016B\x03\x02\x02\x02\u016D\u0170\x03\x02\x02\x02\u016E\u016C" + - "\x03\x02\x02\x02\u016E\u016F\x03\x02\x02\x02\u016F\u0171\x03\x02\x02\x02" + - "\u0170\u016E\x03\x02\x02\x02\u0171\u0172\x07<\x02\x02\u0172\u0173\x06" + - ")\x07\x02\u0173\u0174\b)\x10\x02\u0174W\x03\x02\x02\x02\u0175\u0176\x05" + - "\x0E\x05\x02\u0176\u0177\x05\x16\t\x02\u0177\u0178\x05\x18\n\x02\u0178" + - "\u017C\x05\x0E\x05\x02\u0179\u017B\x05$\x10\x02\u017A\u0179\x03\x02\x02" + - "\x02\u017B\u017E\x03\x02\x02\x02\u017C\u017A\x03\x02\x02\x02\u017C\u017D" + - "\x03\x02\x02\x02\u017D\u017F\x03\x02\x02\x02\u017E\u017C\x03\x02\x02\x02" + - "\u017F\u0180\x07<\x02\x02\u0180\u0181\x06*\b\x02\u0181\u0182\b*\x11\x02" + - "\u0182Y\x03\x02\x02\x02\u0183\u0184\x05\x18\n\x02\u0184\u0185\x05\x1E" + - "\r\x02\u0185\u0186\x05\x14\b\x02\u0186\u0187\x05\x1A\v\x02\u0187\u0188" + - "\x05\n\x03\x02\u0188\u018C\x05\x12\x07\x02\u0189\u018B\x05$\x10\x02\u018A" + - "\u0189\x03\x02\x02\x02\u018B\u018E\x03\x02\x02\x02\u018C\u018A\x03\x02" + - "\x02\x02\u018C\u018D\x03\x02\x02\x02\u018D\u018F\x03\x02\x02\x02\u018E" + - "\u018C\x03\x02\x02\x02\u018F\u0190\x07<\x02\x02\u0190\u0191\x06+\t\x02" + - "\u0191\u0192\b+\x12\x02\u0192[\x03\x02\x02\x02\u0193\u0194\x05\n\x03\x02" + - "\u0194\u0195\x05\b\x02\x02\u0195\u0196\x05\x18\n\x02\u0196\u019A\x05\x0E" + - "\x05\x02\u0197\u0199\x05$\x10\x02\u0198\u0197\x03\x02\x02\x02\u0199\u019C" + - "\x03\x02\x02\x02\u019A\u0198\x03\x02\x02\x02\u019A\u019B\x03\x02\x02\x02" + - "\u019B\u019D\x03\x02\x02\x02\u019C\u019A\x03\x02\x02\x02\u019D\u019E\x07" + - "<\x02\x02\u019E\u019F\x06,\n\x02\u019F\u01A0\b,\x13\x02\u01A0]\x03\x02" + - "\x02\x02\u01A1\u01A2\x05\f\x04\x02\u01A2\u01A3\x05\x0E\x05\x02\u01A3\u01A4" + - "\x05\x10\x06\x02\u01A4\u01A5\x05\b\x02\x02\u01A5\u01A6\x05\x1C\f\x02\u01A6" + - "\u01A7\x05\x16\t\x02\u01A7\u01AB\x05\x1A\v\x02\u01A8\u01AA\x05$\x10\x02" + - "\u01A9\u01A8\x03\x02\x02\x02\u01AA\u01AD\x03\x02\x02\x02\u01AB\u01A9\x03" + - "\x02\x02\x02\u01AB\u01AC\x03\x02\x02\x02\u01AC\u01AE\x03\x02\x02\x02\u01AD" + - "\u01AB\x03\x02\x02\x02\u01AE\u01AF\x07<\x02\x02\u01AF\u01B0\x06-\v\x02" + - "\u01B0\u01B1\b-\x14\x02\u01B1_\x03\x02\x02\x02\u01B2\u01B3\x05,\x14\x02" + - "\u01B3\u01B4\b.\x15\x02\u01B4a\x03\x02\x02\x02\u01B5\u01B6\x05*\x13\x02" + - "\u01B6\u01B7\b/\x16\x02\u01B7c\x03\x02\x02\x02\u01B8\u01BA\n\x13\x02\x02" + - "\u01B9\u01B8\x03\x02\x02\x02\u01BA\u01BB\x03\x02\x02\x02\u01BB\u01BC\x03" + - "\x02\x02\x02\u01BB\u01B9\x03\x02\x02\x02\u01BC\u01BD\x03\x02\x02\x02\u01BD" + - "\u01BE\b0\x17\x02\u01BEe\x03\x02\x02\x02\u01BF\u01C0\x07b\x02\x02\u01C0" + - "\u01C1\x07b\x02\x02\u01C1\u01C2\x07b\x02\x02\u01C2\u01C3\x03\x02\x02\x02" + - "\u01C3\u01C4\b1\x18\x02\u01C4\u01C5\x03\x02\x02\x02\u01C5\u01C6\b1\v\x02" + - "\u01C6g\x03\x02\x02\x02\u01C7\u01C8\x05,\x14\x02\u01C8\u01C9\x03\x02\x02" + - "\x02\u01C9\u01CA\b2\x19\x02\u01CAi\x03\x02\x02\x02\u01CB\u01CC\x05*\x13" + - "\x02\u01CC\u01CD\x03\x02\x02\x02\u01CD\u01CE\b3\x1A\x02\u01CEk\x03\x02" + - "\x02\x02\u01CF\u01D1\x07\x0F\x02\x02\u01D0\u01CF\x03\x02\x02\x02\u01D0" + - "\u01D1\x03\x02\x02\x02\u01D1\u01D2\x03\x02\x02\x02\u01D2\u01D5\x07\f\x02" + - "\x02\u01D3\u01D5\n\x13\x02\x02\u01D4\u01D0\x03\x02\x02\x02\u01D4\u01D3" + - "\x03\x02\x02\x02\u01D5\u01D6\x03\x02\x02\x02\u01D6\u01D7\x03\x02\x02\x02" + - "\u01D6\u01D4\x03\x02\x02\x02\u01D7\u01D8\x03\x02\x02\x02\u01D8\u01D9\b" + - "4\x1B\x02\u01D9m\x03\x02\x02\x02\u01DA\u01DC\x05$\x10\x02\u01DB\u01DA" + - "\x03\x02\x02\x02\u01DC\u01DD\x03\x02\x02\x02\u01DD\u01DB\x03\x02\x02\x02" + - "\u01DD\u01DE\x03\x02\x02\x02\u01DE\u01DF\x03\x02\x02\x02\u01DF\u01E0\b" + - "5\x02\x02\u01E0o\x03\x02\x02\x02\u01E1\u01E3\x07\x0F\x02\x02\u01E2\u01E1" + - "\x03\x02\x02\x02\u01E2\u01E3\x03\x02\x02\x02\u01E3\u01E4\x03\x02\x02\x02" + - "\u01E4\u01E5\x07\f\x02\x02\u01E5\u01E6\b6\x1C\x02\u01E6\u01E7\b6\x1D\x02" + - "\u01E7\u01E8\x03\x02\x02\x02\u01E8\u01E9\b6\x02\x02\u01E9\u01EA\b6\x1E" + - "\x02\u01EAq\x03\x02\x02\x02\u01EB\u01EF\x05 \x0E\x02\u01EC\u01EF\x05\"" + - "\x0F\x02\u01ED\u01EF\x07a\x02\x02\u01EE\u01EB\x03\x02\x02\x02\u01EE\u01EC" + - "\x03\x02\x02\x02\u01EE\u01ED\x03\x02\x02\x02\u01EF\u01F5\x03\x02\x02\x02" + - "\u01F0\u01F4\x05 \x0E\x02\u01F1\u01F4\x05\"\x0F\x02\u01F2\u01F4\t\x17" + - "\x02\x02\u01F3\u01F0\x03\x02\x02\x02\u01F3\u01F1\x03\x02\x02\x02\u01F3" + - "\u01F2\x03\x02\x02\x02\u01F4\u01F7\x03\x02\x02\x02\u01F5\u01F3\x03\x02" + - "\x02\x02\u01F5\u01F6\x03\x02\x02\x02\u01F6s\x03\x02\x02\x02\u01F7\u01F5" + - "\x03\x02\x02\x02\u01F8\u01FA\n\x13\x02\x02\u01F9\u01F8\x03\x02\x02\x02" + - "\u01FA\u01FB\x03\x02\x02\x02\u01FB\u01FC\x03\x02\x02\x02\u01FB\u01F9\x03" + - "\x02\x02\x02\u01FCu\x03\x02\x02\x02\u01FD\u0201\x07@\x02\x02\u01FE\u0200" + - "\n\x13\x02\x02\u01FF\u01FE\x03\x02\x02\x02\u0200\u0203\x03\x02\x02\x02" + - "\u0201\u01FF\x03\x02\x02\x02\u0201\u0202\x03\x02\x02\x02\u0202\u0205\x03" + - "\x02\x02\x02\u0203\u0201\x03\x02\x02\x02\u0204\u0206\x07\x0F\x02\x02\u0205" + - "\u0204\x03\x02\x02\x02\u0205\u0206\x03\x02\x02\x02\u0206\u0207\x03\x02" + - "\x02\x02\u0207\u0208\x07\f\x02\x02\u0208\u0209\x069\f\x02\u0209\u020A" + - "\x03\x02\x02\x02\u020A\u020B\b9\x02\x02\u020Bw\x03\x02\x02\x02\u020C\u020E" + - "\x05$\x10\x02\u020D\u020C\x03\x02\x02\x02\u020E\u020F\x03\x02\x02\x02" + - "\u020F\u020D\x03\x02\x02\x02\u020F\u0210\x03\x02\x02\x02\u0210\u0211\x03" + - "\x02\x02\x02\u0211\u0212\x06:\r\x02\u0212\u0213\x03\x02\x02\x02\u0213" + - "\u0214\b:\x02\x02\u0214y\x03\x02\x02\x02\u0215\u0217\x07\x0F\x02\x02\u0216" + - "\u0215\x03\x02\x02\x02\u0216\u0217\x03\x02\x02\x02\u0217\u0218\x03\x02" + - "\x02\x02\u0218\u0219\x07\f\x02\x02\u0219\u021A\b;\x1F\x02\u021A{\x03\x02" + - "\x02\x02\u021B\u021C\x07_\x02\x02\u021C\u021D\x06<\x0E\x02\u021D\u021E" + - "\b< \x02\u021E\u021F\x03\x02\x02\x02\u021F\u0220\b<\v\x02\u0220\u0221" + - "\b<\v\x02\u0221}\x03\x02\x02\x02"; + "\x86\x03\x02\x02\x02\x07\x88\x03\x02\x02\x02\x07\x8A\x03\x02\x02\x02\b" + + "\x8C\x03\x02\x02\x02\n\x8E\x03\x02\x02\x02\f\x90\x03\x02\x02\x02\x0E\x92" + + "\x03\x02\x02\x02\x10\x94\x03\x02\x02\x02\x12\x96\x03\x02\x02\x02\x14\x98" + + "\x03\x02\x02\x02\x16\x9A\x03\x02\x02\x02\x18\x9C\x03\x02\x02\x02\x1A\x9E" + + "\x03\x02\x02\x02\x1C\xA0\x03\x02\x02\x02\x1E\xA2\x03\x02\x02\x02 \xA4" + + "\x03\x02\x02\x02\"\xA6\x03\x02\x02\x02$\xA8\x03\x02\x02\x02&\xAA\x03\x02" + + "\x02\x02(\xC3\x03\x02\x02\x02*\xC5\x03\x02\x02\x02,\xD0\x03\x02\x02\x02" + + ".\xDD\x03\x02\x02\x020\xE1\x03\x02\x02\x022\xEA\x03\x02\x02\x024\xF1\x03" + + "\x02\x02\x026\xF7\x03\x02\x02\x028\xFC\x03\x02\x02\x02:\u0102\x03\x02" + + "\x02\x02<\u0107\x03\x02\x02\x02>\u0119\x03\x02\x02\x02@\u011D\x03\x02" + + "\x02\x02B\u0124\x03\x02\x02\x02D\u012F\x03\x02\x02\x02F\u0139\x03\x02" + + "\x02\x02H\u013B\x03\x02\x02\x02J\u013D\x03\x02\x02\x02L\u013F\x03\x02" + + "\x02\x02N\u0142\x03\x02\x02\x02P\u0147\x03\x02\x02\x02R\u014F\x03\x02" + + "\x02\x02T\u0159\x03\x02\x02\x02V\u0161\x03\x02\x02\x02X\u016D\x03\x02" + + "\x02\x02Z\u0183\x03\x02\x02\x02\\\u0191\x03\x02\x02\x02^\u01A1\x03\x02" + + "\x02\x02`\u01AF\x03\x02\x02\x02b\u01C0\x03\x02\x02\x02d\u01C3\x03\x02" + + "\x02\x02f\u01C7\x03\x02\x02\x02h\u01CD\x03\x02\x02\x02j\u01D5\x03\x02" + + "\x02\x02l\u01D9\x03\x02\x02\x02n\u01E2\x03\x02\x02\x02p\u01E9\x03\x02" + + "\x02\x02r\u01F0\x03\x02\x02\x02t\u01FC\x03\x02\x02\x02v\u0207\x03\x02" + + "\x02\x02x\u020B\x03\x02\x02\x02z\u021B\x03\x02\x02\x02|\u0224\x03\x02" + + "\x02\x02~\u0229\x03\x02\x02\x02\x80\u0233\x03\x02\x02\x02\x82\u0240\x03" + + "\x02\x02\x02\x84\u0244\x03\x02\x02\x02\x86\u0247\x03\x02\x02\x02\x88\u024A" + + "\x03\x02\x02\x02\x8A\u024E\x03\x02\x02\x02\x8C\x8D\t\x02\x02\x02\x8D\t" + + "\x03\x02\x02\x02\x8E\x8F\t\x03\x02\x02\x8F\v\x03\x02\x02\x02\x90\x91\t" + + "\x04\x02\x02\x91\r\x03\x02\x02\x02\x92\x93\t\x05\x02\x02\x93\x0F\x03\x02" + + "\x02\x02\x94\x95\t\x06\x02\x02\x95\x11\x03\x02\x02\x02\x96\x97\t\x07\x02" + + "\x02\x97\x13\x03\x02\x02\x02\x98\x99\t\b\x02\x02\x99\x15\x03\x02\x02\x02" + + "\x9A\x9B\t\t\x02\x02\x9B\x17\x03\x02\x02\x02\x9C\x9D\t\n\x02\x02\x9D\x19" + + "\x03\x02\x02\x02\x9E\x9F\t\v\x02\x02\x9F\x1B\x03\x02\x02\x02\xA0\xA1\t" + + "\f\x02\x02\xA1\x1D\x03\x02\x02\x02\xA2\xA3\t\r\x02\x02\xA3\x1F\x03\x02" + + "\x02\x02\xA4\xA5\t\x0E\x02\x02\xA5!\x03\x02\x02\x02\xA6\xA7\x042;\x02" + + "\xA7#\x03\x02\x02\x02\xA8\xA9\t\x0F\x02\x02\xA9%\x03\x02\x02\x02\xAA\xAE" + + "\x07}\x02\x02\xAB\xAD\x05$\x10\x02\xAC\xAB\x03\x02\x02\x02\xAD\xB0\x03" + + "\x02\x02\x02\xAE\xAC\x03\x02\x02\x02\xAE\xAF\x03\x02\x02\x02\xAF\xB1\x03" + + "\x02\x02\x02\xB0\xAE\x03\x02\x02\x02\xB1\xB2\x07\x7F\x02\x02\xB2\'\x03" + + "\x02\x02\x02\xB3\xB7\x07)\x02\x02\xB4\xB6\n\x10\x02\x02\xB5\xB4\x03\x02" + + "\x02\x02\xB6\xB9\x03\x02\x02\x02\xB7\xB5\x03\x02\x02\x02\xB7\xB8\x03\x02" + + "\x02\x02\xB8\xBA\x03\x02\x02\x02\xB9\xB7\x03\x02\x02\x02\xBA\xC4\x07)" + + "\x02\x02\xBB\xBF\x07$\x02\x02\xBC\xBE\n\x11\x02\x02\xBD\xBC\x03\x02\x02" + + "\x02\xBE\xC1\x03\x02\x02\x02\xBF\xBD\x03\x02\x02\x02\xBF\xC0\x03\x02\x02" + + "\x02\xC0\xC2\x03\x02\x02\x02\xC1\xBF\x03\x02\x02\x02\xC2\xC4\x07$\x02" + + "\x02\xC3\xB3\x03\x02\x02\x02\xC3\xBB\x03\x02\x02\x02\xC4)\x03\x02\x02" + + "\x02\xC5\xCB\x07b\x02\x02\xC6\xC7\x07^\x02\x02\xC7\xCA\x07b\x02\x02\xC8" + + "\xCA\n\x12\x02\x02\xC9\xC6\x03\x02\x02\x02\xC9\xC8\x03\x02\x02\x02\xCA" + + "\xCD\x03\x02\x02\x02\xCB\xC9\x03\x02\x02\x02\xCB\xCC\x03\x02\x02\x02\xCC" + + "\xCE\x03\x02\x02\x02\xCD\xCB\x03\x02\x02\x02\xCE\xCF\x07b\x02\x02\xCF" + + "+\x03\x02\x02\x02\xD0\xD1\x07&\x02\x02\xD1\xD8\x07}\x02\x02\xD2\xD7\x05" + + "(\x12\x02\xD3\xD7\x05*\x13\x02\xD4\xD7\x05&\x11\x02\xD5\xD7\n\x13\x02" + + "\x02\xD6\xD2\x03\x02\x02\x02\xD6\xD3\x03\x02\x02\x02\xD6\xD4\x03\x02\x02" + + "\x02\xD6\xD5\x03\x02\x02\x02\xD7\xDA\x03\x02\x02\x02\xD8\xD9\x03\x02\x02" + + "\x02\xD8\xD6\x03\x02\x02\x02\xD9\xDB\x03\x02\x02\x02\xDA\xD8\x03\x02\x02" + + "\x02\xDB\xDC\x07\x7F\x02\x02\xDC-\x03\x02\x02\x02\xDD\xDF\x07^\x02\x02" + + "\xDE\xE0\n\x14\x02\x02\xDF\xDE\x03\x02\x02\x02\xDF\xE0\x03\x02\x02\x02" + + "\xE0/\x03\x02\x02\x02\xE1\xE3\x07@\x02\x02\xE2\xE4\n\x14\x02\x02\xE3\xE2" + + "\x03\x02\x02\x02\xE4\xE5\x03\x02\x02\x02\xE5\xE3\x03\x02\x02\x02\xE5\xE6" + + "\x03\x02\x02\x02\xE6\xE7\x03\x02\x02\x02\xE7\xE8\b\x16\x02\x02\xE81\x03" + + "\x02\x02\x02\xE9\xEB\x05$\x10\x02\xEA\xE9\x03\x02\x02\x02\xEB\xEC\x03" + + "\x02\x02\x02\xEC\xEA\x03\x02\x02\x02\xEC\xED\x03\x02\x02\x02\xED\xEE\x03" + + "\x02\x02\x02\xEE\xEF\b\x17\x02\x02\xEF3\x03\x02\x02\x02\xF0\xF2\x07\x0F" + + "\x02\x02\xF1\xF0\x03\x02\x02\x02\xF1\xF2\x03\x02\x02\x02\xF2\xF3\x03\x02" + + "\x02\x02\xF3\xF4\x07\f\x02\x02\xF4\xF5\x03\x02\x02\x02\xF5\xF6\b\x18\x02" + + "\x02\xF65\x03\x02\x02\x02\xF7\xF8\x07%\x02\x02\xF8\xF9\b\x19\x03\x02\xF9" + + "\xFA\x03\x02\x02\x02\xFA\xFB\b\x19\x04\x02\xFB7\x03\x02\x02\x02\xFC\xFD" + + "\x07/\x02\x02\xFD\xFE\x06\x1A\x02\x02\xFE\xFF\b\x1A\x05\x02\xFF\u0100" + + "\x03\x02\x02\x02\u0100\u0101\b\x1A\x06\x02\u01019\x03\x02\x02\x02\u0102" + + "\u0103\x07]\x02\x02\u0103\u0104\x06\x1B\x03\x02\u0104\u0105\x03\x02\x02" + + "\x02\u0105\u0106\b\x1B\x07\x02\u0106;\x03\x02\x02\x02\u0107\u010B\x07" + + "]\x02\x02\u0108\u010A\n\x15\x02\x02\u0109\u0108\x03\x02\x02\x02\u010A" + + "\u010D\x03\x02\x02\x02\u010B\u010C\x03\x02\x02\x02\u010B\u0109\x03\x02" + + "\x02\x02\u010C\u010E\x03\x02\x02\x02\u010D\u010B\x03\x02\x02\x02\u010E" + + "\u010F\x07_\x02\x02\u010F\u0113\x07*\x02\x02\u0110\u0112\n\x16\x02\x02" + + "\u0111\u0110\x03\x02\x02\x02\u0112\u0115\x03\x02\x02\x02\u0113\u0114\x03" + + "\x02\x02\x02\u0113\u0111\x03\x02\x02\x02\u0114\u0116\x03\x02\x02\x02\u0115" + + "\u0113\x03\x02\x02\x02\u0116\u0117\x07+\x02\x02\u0117\u0118\b\x1C\b\x02" + + "\u0118=\x03\x02\x02\x02\u0119\u011A\v\x02\x02\x02\u011A\u011B\b\x1D\t" + + "\x02\u011B?\x03\x02\x02\x02\u011C\u011E\x05$\x10\x02\u011D\u011C\x03\x02" + + "\x02\x02\u011E\u011F\x03\x02\x02\x02\u011F\u011D\x03\x02\x02\x02\u011F" + + "\u0120\x03\x02\x02\x02\u0120\u0121\x03\x02\x02\x02\u0121\u0122\b\x1E\x02" + + "\x02\u0122A\x03\x02\x02\x02\u0123\u0125\x07\x0F\x02\x02\u0124\u0123\x03" + + "\x02\x02\x02\u0124\u0125\x03\x02\x02\x02\u0125\u0126\x03\x02\x02\x02\u0126" + + "\u0127\x07\f\x02\x02\u0127\u0128\b\x1F\n\x02\u0128\u0129\x03\x02\x02\x02" + + "\u0129\u012A\b\x1F\x02\x02\u012A\u012B\b\x1F\v\x02\u012BC\x03\x02\x02" + + "\x02\u012C\u0130\x05 \x0E\x02\u012D\u0130\x05\"\x0F\x02\u012E\u0130\x07" + + "a\x02\x02\u012F\u012C\x03\x02\x02\x02\u012F\u012D\x03\x02\x02\x02\u012F" + + "\u012E\x03\x02\x02\x02\u0130\u0136\x03\x02\x02\x02\u0131\u0135\x05 \x0E" + + "\x02\u0132\u0135\x05\"\x0F\x02\u0133\u0135\t\x17\x02\x02\u0134\u0131\x03" + + "\x02\x02\x02\u0134\u0132\x03\x02\x02\x02\u0134\u0133\x03\x02\x02\x02\u0135" + + "\u0138\x03\x02\x02\x02\u0136\u0134\x03\x02\x02\x02\u0136\u0137\x03\x02" + + "\x02\x02\u0137E\x03\x02\x02\x02\u0138\u0136\x03\x02\x02\x02\u0139\u013A" + + "\x070\x02\x02\u013AG\x03\x02\x02\x02\u013B\u013C\x07*\x02\x02\u013CI\x03" + + "\x02\x02\x02\u013D\u013E\x07+\x02\x02\u013EK\x03\x02\x02\x02\u013F\u0140" + + "\x07.\x02\x02\u0140M\x03\x02\x02\x02\u0141\u0143\n\x14\x02\x02\u0142\u0141" + + "\x03\x02\x02\x02\u0143\u0144\x03\x02\x02\x02\u0144\u0145\x03\x02\x02\x02" + + "\u0144\u0142\x03\x02\x02\x02\u0145O\x03\x02\x02\x02\u0146\u0148\x05$\x10" + + "\x02\u0147\u0146\x03\x02\x02\x02\u0148\u0149\x03\x02\x02\x02\u0149\u0147" + + "\x03\x02\x02\x02\u0149\u014A\x03\x02\x02\x02\u014A\u014B\x03\x02\x02\x02" + + "\u014B\u014C\x06&\x04\x02\u014C\u014D\x03\x02\x02\x02\u014D\u014E\b&\x02" + + "\x02\u014EQ\x03\x02\x02\x02\u014F\u0150\x07b\x02\x02\u0150\u0151\x07b" + + "\x02\x02\u0151\u0152\x07b\x02\x02\u0152\u0153\x03\x02\x02\x02\u0153\u0154" + + "\x06\'\x05\x02\u0154\u0155\b\'\f\x02\u0155\u0156\x03\x02\x02\x02\u0156" + + "\u0157\b\'\r\x02\u0157S\x03\x02\x02\x02\u0158\u015A\x07\x0F\x02\x02\u0159" + + "\u0158\x03\x02\x02\x02\u0159\u015A\x03\x02\x02\x02\u015A\u015B\x03\x02" + + "\x02\x02\u015B\u015C\x07\f\x02\x02\u015C\u015D\b(\x0E\x02\u015D\u015E" + + "\x03\x02\x02\x02\u015E\u015F\b(\x02\x02\u015F\u0160\b(\v\x02\u0160U\x03" + + "\x02\x02\x02\u0161\u0162\x05\x14\b\x02\u0162\u0166\x05\x10\x06\x02\u0163" + + "\u0165\x05$\x10\x02\u0164\u0163\x03\x02\x02\x02\u0165\u0168\x03\x02\x02" + + "\x02\u0166\u0164\x03\x02\x02\x02\u0166\u0167\x03\x02\x02\x02\u0167\u0169" + + "\x03\x02\x02\x02\u0168\u0166\x03\x02\x02\x02\u0169\u016A\x07<\x02\x02" + + "\u016A\u016B\x06)\x06\x02\u016B\u016C\b)\x0F\x02\u016CW\x03\x02\x02\x02" + + "\u016D\u016E\x05\x0E\x05\x02\u016E\u016F\x05\x16\t\x02\u016F\u0170\x05" + + "\x18\n\x02\u0170\u0174\x05\x0E\x05\x02\u0171\u0173\x05$\x10\x02\u0172" + + "\u0171\x03\x02\x02\x02\u0173\u0176\x03\x02\x02\x02\u0174\u0172\x03\x02" + + "\x02\x02\u0174\u0175\x03\x02\x02\x02\u0175\u0177\x03\x02\x02\x02\u0176" + + "\u0174\x03\x02\x02\x02\u0177\u0178\x05\x14\b\x02\u0178\u017C\x05\x10\x06" + + "\x02\u0179\u017B\x05$\x10\x02\u017A\u0179\x03\x02\x02\x02\u017B\u017E" + + "\x03\x02\x02\x02\u017C\u017A\x03\x02\x02\x02\u017C\u017D\x03\x02\x02\x02" + + "\u017D\u017F\x03\x02\x02\x02\u017E\u017C\x03\x02\x02\x02\u017F\u0180\x07" + + "<\x02\x02\u0180\u0181\x06*\x07\x02\u0181\u0182\b*\x10\x02\u0182Y\x03\x02" + + "\x02\x02\u0183\u0184\x05\x0E\x05\x02\u0184\u0185\x05\x16\t\x02\u0185\u0186" + + "\x05\x18\n\x02\u0186\u018A\x05\x0E\x05\x02\u0187\u0189\x05$\x10\x02\u0188" + + "\u0187\x03\x02\x02\x02\u0189\u018C\x03\x02\x02\x02\u018A\u0188\x03\x02" + + "\x02\x02\u018A\u018B\x03\x02\x02\x02\u018B\u018D\x03\x02\x02\x02\u018C" + + "\u018A\x03\x02\x02\x02\u018D\u018E\x07<\x02\x02\u018E\u018F\x06+\b\x02" + + "\u018F\u0190\b+\x11\x02\u0190[\x03\x02\x02\x02\u0191\u0192\x05\x18\n\x02" + + "\u0192\u0193\x05\x1E\r\x02\u0193\u0194\x05\x14\b\x02\u0194\u0195\x05\x1A" + + "\v\x02\u0195\u0196\x05\n\x03\x02\u0196\u019A\x05\x12\x07\x02\u0197\u0199" + + "\x05$\x10\x02\u0198\u0197\x03\x02\x02\x02\u0199\u019C\x03\x02\x02\x02" + + "\u019A\u0198\x03\x02\x02\x02\u019A\u019B\x03\x02\x02\x02\u019B\u019D\x03" + + "\x02\x02\x02\u019C\u019A\x03\x02\x02\x02\u019D\u019E\x07<\x02\x02\u019E" + + "\u019F\x06,\t\x02\u019F\u01A0\b,\x12\x02\u01A0]\x03\x02\x02\x02\u01A1" + + "\u01A2\x05\n\x03\x02\u01A2\u01A3\x05\b\x02\x02\u01A3\u01A4\x05\x18\n\x02" + + "\u01A4\u01A8\x05\x0E\x05\x02\u01A5\u01A7\x05$\x10\x02\u01A6\u01A5\x03" + + "\x02\x02\x02\u01A7\u01AA\x03\x02\x02\x02\u01A8\u01A6\x03\x02\x02\x02\u01A8" + + "\u01A9\x03\x02\x02\x02\u01A9\u01AB\x03\x02\x02\x02\u01AA\u01A8\x03\x02" + + "\x02\x02\u01AB\u01AC\x07<\x02\x02\u01AC\u01AD\x06-\n\x02\u01AD\u01AE\b" + + "-\x13\x02\u01AE_\x03\x02\x02\x02\u01AF\u01B0\x05\f\x04\x02\u01B0\u01B1" + + "\x05\x0E\x05\x02\u01B1\u01B2\x05\x10\x06\x02\u01B2\u01B3\x05\b\x02\x02" + + "\u01B3\u01B4\x05\x1C\f\x02\u01B4\u01B5\x05\x16\t\x02\u01B5\u01B9\x05\x1A" + + "\v\x02\u01B6\u01B8\x05$\x10\x02\u01B7\u01B6\x03\x02\x02\x02\u01B8\u01BB" + + "\x03\x02\x02\x02\u01B9\u01B7\x03\x02\x02\x02\u01B9\u01BA\x03\x02\x02\x02" + + "\u01BA\u01BC\x03\x02\x02\x02\u01BB\u01B9\x03\x02\x02\x02\u01BC\u01BD\x07" + + "<\x02\x02\u01BD\u01BE\x06.\v\x02\u01BE\u01BF\b.\x14\x02\u01BFa\x03\x02" + + "\x02\x02\u01C0\u01C1\x05.\x15\x02\u01C1\u01C2\b/\x15\x02\u01C2c\x03\x02" + + "\x02\x02\u01C3\u01C4\x05,\x14\x02\u01C4\u01C5\b0\x16\x02\u01C5e\x03\x02" + + "\x02\x02\u01C6\u01C8\n\x14\x02\x02\u01C7\u01C6\x03\x02\x02\x02\u01C8\u01C9" + + "\x03\x02\x02\x02\u01C9\u01CA\x03\x02\x02\x02\u01C9\u01C7\x03\x02\x02\x02" + + "\u01CA\u01CB\x03\x02\x02\x02\u01CB\u01CC\b1\x17\x02\u01CCg\x03\x02\x02" + + "\x02\u01CD\u01CE\x07b\x02\x02\u01CE\u01CF\x07b\x02\x02\u01CF\u01D0\x07" + + "b\x02\x02\u01D0\u01D1\x03\x02\x02\x02\u01D1\u01D2\b2\x18\x02\u01D2\u01D3" + + "\x03\x02\x02\x02\u01D3\u01D4\b2\v\x02\u01D4i\x03\x02\x02\x02\u01D5\u01D6" + + "\x05.\x15\x02\u01D6\u01D7\x03\x02\x02\x02\u01D7\u01D8\b3\x19\x02\u01D8" + + "k\x03\x02\x02\x02\u01D9\u01DA\x05,\x14\x02\u01DA\u01DB\x03\x02\x02\x02" + + "\u01DB\u01DC\b4\x1A\x02\u01DCm\x03\x02\x02\x02\u01DD\u01DF\x07\x0F\x02" + + "\x02\u01DE\u01DD\x03\x02\x02\x02\u01DE\u01DF\x03\x02\x02\x02\u01DF\u01E0" + + "\x03\x02\x02\x02\u01E0\u01E3\x07\f\x02\x02\u01E1\u01E3\n\x14\x02\x02\u01E2" + + "\u01DE\x03\x02\x02\x02\u01E2\u01E1\x03\x02\x02\x02\u01E3\u01E4\x03\x02" + + "\x02\x02\u01E4\u01E5\x03\x02\x02\x02\u01E4\u01E2\x03\x02\x02\x02\u01E5" + + "\u01E6\x03\x02\x02\x02\u01E6\u01E7\b5\x1B\x02\u01E7o\x03\x02\x02\x02\u01E8" + + "\u01EA\x05$\x10\x02\u01E9\u01E8\x03\x02\x02\x02\u01EA\u01EB\x03\x02\x02" + + "\x02\u01EB\u01E9\x03\x02\x02\x02\u01EB\u01EC\x03\x02\x02\x02\u01EC\u01ED" + + "\x03\x02\x02\x02\u01ED\u01EE\b6\x02\x02\u01EEq\x03\x02\x02\x02\u01EF\u01F1" + + "\x07\x0F\x02\x02\u01F0\u01EF\x03\x02\x02\x02\u01F0\u01F1\x03\x02\x02\x02" + + "\u01F1\u01F2\x03\x02\x02\x02\u01F2\u01F3\x07\f\x02\x02\u01F3\u01F4\b7" + + "\x1C\x02\u01F4\u01F5\b7\x1D\x02\u01F5\u01F6\x03\x02\x02\x02\u01F6\u01F7" + + "\b7\x02\x02\u01F7\u01F8\b7\x1E\x02\u01F8s\x03\x02\x02\x02\u01F9\u01FD" + + "\x05 \x0E\x02\u01FA\u01FD\x05\"\x0F\x02\u01FB\u01FD\x07a\x02\x02\u01FC" + + "\u01F9\x03\x02\x02\x02\u01FC\u01FA\x03\x02\x02\x02\u01FC\u01FB\x03\x02" + + "\x02\x02\u01FD\u0203\x03\x02\x02\x02\u01FE\u0202\x05 \x0E\x02\u01FF\u0202" + + "\x05\"\x0F\x02\u0200\u0202\t\x18\x02\x02\u0201\u01FE\x03\x02\x02\x02\u0201" + + "\u01FF\x03\x02\x02\x02\u0201\u0200\x03\x02\x02\x02\u0202\u0205\x03\x02" + + "\x02\x02\u0203\u0201\x03\x02\x02\x02\u0203\u0204\x03\x02\x02\x02\u0204" + + "u\x03\x02\x02\x02\u0205\u0203\x03\x02\x02\x02\u0206\u0208\n\x14\x02\x02" + + "\u0207\u0206\x03\x02\x02\x02\u0208\u0209\x03\x02\x02\x02\u0209\u020A\x03" + + "\x02\x02\x02\u0209\u0207\x03\x02\x02\x02\u020Aw\x03\x02\x02\x02\u020B" + + "\u020F\x07@\x02\x02\u020C\u020E\n\x14\x02\x02\u020D\u020C\x03\x02\x02" + + "\x02\u020E\u0211\x03\x02\x02\x02\u020F\u020D\x03\x02\x02\x02\u020F\u0210" + + "\x03\x02\x02\x02\u0210\u0213\x03\x02\x02\x02\u0211\u020F\x03\x02\x02\x02" + + "\u0212\u0214\x07\x0F\x02\x02\u0213\u0212\x03\x02\x02\x02\u0213\u0214\x03" + + "\x02\x02\x02\u0214\u0215\x03\x02\x02\x02\u0215\u0216\x07\f\x02\x02\u0216" + + "\u0217\x06:\f\x02\u0217\u0218\x03\x02\x02\x02\u0218\u0219\b:\x02\x02\u0219" + + "y\x03\x02\x02\x02\u021A\u021C\x05$\x10\x02\u021B\u021A\x03"; private static readonly _serializedATNSegment1: string = - "\u0222\u0226\x05 \x0E\x02\u0223\u0226\x05\"\x0F\x02\u0224\u0226\x07a\x02" + - "\x02\u0225\u0222\x03\x02\x02\x02\u0225\u0223\x03\x02\x02\x02\u0225\u0224" + - "\x03\x02\x02\x02\u0226\u022C\x03\x02\x02\x02\u0227\u022B\x05 \x0E\x02" + - "\u0228\u022B\x05\"\x0F\x02\u0229\u022B\t\x17\x02\x02\u022A\u0227\x03\x02" + - "\x02\x02\u022A\u0228\x03\x02\x02\x02\u022A\u0229\x03\x02\x02\x02\u022B" + - "\u022E\x03\x02\x02\x02\u022C\u022A\x03\x02\x02\x02\u022C\u022D\x03\x02" + - "\x02\x02\u022D\u022F\x03\x02\x02\x02\u022E\u022C\x03\x02\x02\x02\u022F" + - "\u0230\x06=\x0F\x02\u0230\u0231\b=!\x02\u0231\x7F\x03\x02\x02\x02\u0232" + - "\u0233\x07?\x02\x02\u0233\u0234\x06>\x10\x02\u0234\u0235\b>\"\x02\u0235" + - "\x81\x03\x02\x02\x02\u0236\u0237\x07~\x02\x02\u0237\u0238\b?#\x02\u0238" + - "\x83\x03\x02\x02\x02\u0239\u023A\x05,\x14\x02\u023A\u023B\b@$\x02\u023B" + - "\x85\x03\x02\x02\x02\u023C\u023D\x05*\x13\x02\u023D\u023E\bA%\x02\u023E" + - "\x87\x03\x02\x02\x02\u023F\u0241\n\x13\x02\x02\u0240\u023F\x03\x02\x02" + - "\x02\u0241\u0242\x03\x02\x02\x02\u0242\u0243\x03\x02\x02\x02\u0242\u0240" + - "\x03\x02\x02\x02\u0243\u0244\x03\x02\x02\x02\u0244\u0245\bB&\x02\u0245" + - "\x89\x03\x02\x02\x025\x02\x03\x04\x05\x06\x07\xAC\xB5\xBD\xC1\xC8\xCA" + - "\xD1\xD7\xDE\xE3\xFD\u0105\u0111\u0116\u0121\u0126\u0128\u0136\u013B\u014B" + - "\u0158\u0166\u016E\u017C\u018C\u019A\u01AB\u01BB\u01D0\u01D4\u01D6\u01DD" + - "\u01E2\u01EE\u01F3\u01F5\u01FB\u0201\u0205\u020F\u0216\u0225\u022A\u022C" + - "\u0242\'\b\x02\x02\x03\x18\x02\x07\x03\x02\x03\x19\x03\x07\x04\x02\x07" + - "\x06\x02\x03\x1B\x04\x03\x1C\x05\x03\x1E\x06\x06\x02\x02\x03&\x07\x07" + - "\x05\x02\x03\'\b\x03(\t\x03)\n\x03*\v\x03+\f\x03,\r\x03-\x0E\x03.\x0F" + - "\x03/\x10\x030\x11\x031\x12\t\x1C\x02\t\x1D\x02\t\x1E\x02\x036\x13\x03" + - "6\x14\x07\x07\x02\x03;\x15\x03<\x16\x03=\x17\x03>\x18\x03?\x19\x03@\x1A" + - "\x03A\x1B\x03B\x1C"; + "\x02\x02\x02\u021C\u021D\x03\x02\x02\x02\u021D\u021B\x03\x02\x02\x02\u021D" + + "\u021E\x03\x02\x02\x02\u021E\u021F\x03\x02\x02\x02\u021F\u0220\x06;\r" + + "\x02\u0220\u0221\x03\x02\x02\x02\u0221\u0222\b;\x02\x02\u0222{\x03\x02" + + "\x02\x02\u0223\u0225\x07\x0F\x02\x02\u0224\u0223\x03\x02\x02\x02\u0224" + + "\u0225\x03\x02\x02\x02\u0225\u0226\x03\x02\x02\x02\u0226\u0227\x07\f\x02" + + "\x02\u0227\u0228\b<\x1F\x02\u0228}\x03\x02\x02\x02\u0229\u022A\x07_\x02" + + "\x02\u022A\u022B\x06=\x0E\x02\u022B\u022C\b= \x02\u022C\u022D\x03\x02" + + "\x02\x02\u022D\u022E\b=\v\x02\u022E\u022F\b=\v\x02\u022F\x7F\x03\x02\x02" + + "\x02\u0230\u0234\x05 \x0E\x02\u0231\u0234\x05\"\x0F\x02\u0232\u0234\x07" + + "a\x02\x02\u0233\u0230\x03\x02\x02\x02\u0233\u0231\x03\x02\x02\x02\u0233" + + "\u0232\x03\x02\x02\x02\u0234\u023A\x03\x02\x02\x02\u0235\u0239\x05 \x0E" + + "\x02\u0236\u0239\x05\"\x0F\x02\u0237\u0239\t\x18\x02\x02\u0238\u0235\x03" + + "\x02\x02\x02\u0238\u0236\x03\x02\x02\x02\u0238\u0237\x03\x02\x02\x02\u0239" + + "\u023C\x03\x02\x02\x02\u023A\u0238\x03\x02\x02\x02\u023A\u023B\x03\x02" + + "\x02\x02\u023B\u023D\x03\x02\x02\x02\u023C\u023A\x03\x02\x02\x02\u023D" + + "\u023E\x06>\x0F\x02\u023E\u023F\b>!\x02\u023F\x81\x03\x02\x02\x02\u0240" + + "\u0241\x07?\x02\x02\u0241\u0242\x06?\x10\x02\u0242\u0243\b?\"\x02\u0243" + + "\x83\x03\x02\x02\x02\u0244\u0245\x07~\x02\x02\u0245\u0246\b@#\x02\u0246" + + "\x85\x03\x02\x02\x02\u0247\u0248\x05.\x15\x02\u0248\u0249\bA$\x02\u0249" + + "\x87\x03\x02\x02\x02\u024A\u024B\x05,\x14\x02\u024B\u024C\bB%\x02\u024C" + + "\x89\x03\x02\x02\x02\u024D\u024F\n\x14\x02\x02\u024E\u024D\x03\x02\x02" + + "\x02\u024F\u0250\x03\x02\x02\x02\u0250\u0251\x03\x02\x02\x02\u0250\u024E" + + "\x03\x02\x02\x02\u0251\u0252\x03\x02\x02\x02\u0252\u0253\bC&\x02\u0253" + + "\x8B\x03\x02\x02\x027\x02\x03\x04\x05\x06\x07\xAE\xB7\xBF\xC3\xC9\xCB" + + "\xD6\xD8\xDF\xE5\xEC\xF1\u010B\u0113\u011F\u0124\u012F\u0134\u0136\u0144" + + "\u0149\u0159\u0166\u0174\u017C\u018A\u019A\u01A8\u01B9\u01C9\u01DE\u01E2" + + "\u01E4\u01EB\u01F0\u01FC\u0201\u0203\u0209\u020F\u0213\u021D\u0224\u0233" + + "\u0238\u023A\u0250\'\b\x02\x02\x03\x19\x02\x07\x03\x02\x03\x1A\x03\x07" + + "\x04\x02\x07\x06\x02\x03\x1C\x04\x03\x1D\x05\x03\x1F\x06\x06\x02\x02\x03" + + "\'\x07\x07\x05\x02\x03(\b\x03)\t\x03*\n\x03+\v\x03,\f\x03-\r\x03.\x0E" + + "\x03/\x0F\x030\x10\x031\x11\x032\x12\t\x1C\x02\t\x1D\x02\t\x1E\x02\x03" + + "7\x13\x037\x14\x07\x07\x02\x03<\x15\x03=\x16\x03>\x17\x03?\x18\x03@\x19" + + "\x03A\x1A\x03B\x1B\x03C\x1C"; public static readonly _serializedATN: string = Utils.join( [ LGFileLexer._serializedATNSegment0, diff --git a/libraries/botbuilder-lg/tests/lg.test.js b/libraries/botbuilder-lg/tests/lg.test.js index e2058e8a3b..5bcfe10630 100644 --- a/libraries/botbuilder-lg/tests/lg.test.js +++ b/libraries/botbuilder-lg/tests/lg.test.js @@ -690,21 +690,21 @@ describe('LG', function() { var evaled = LGFile.evaluateTemplate('template', {list:[], obj: {}}); assert.strictEqual(evaled, 'list and obj are both empty'); - var evaled = LGFile.evaluateTemplate('template', {list:[], obj:new Map()}); + evaled = LGFile.evaluateTemplate('template', {list:[], obj:new Map()}); assert.strictEqual(evaled, 'list and obj are both empty'); - var evaled = LGFile.evaluateTemplate('template', {list:['hi'], obj: {}}); + evaled = LGFile.evaluateTemplate('template', {list:['hi'], obj: {}}); assert.strictEqual(evaled, 'obj is empty'); - var evaled = LGFile.evaluateTemplate('template', {list:[], obj: {a: 'a'}}); + evaled = LGFile.evaluateTemplate('template', {list:[], obj: {a: 'a'}}); assert.strictEqual(evaled, 'list is empty'); const map = new Map(); map.set('a', 'a'); - var evaled = LGFile.evaluateTemplate('template', {list:[], obj: map}); + evaled = LGFile.evaluateTemplate('template', {list:[], obj: map}); assert.strictEqual(evaled, 'list is empty'); - var evaled = LGFile.evaluateTemplate('template', {list:[{}], obj : {a : 'a'}}); + evaled = LGFile.evaluateTemplate('template', {list:[{}], obj : {a : 'a'}}); assert.strictEqual(evaled, 'list and obj are both not empty.'); }); @@ -714,10 +714,32 @@ describe('LG', function() { var evaled = LGFile.evaluateTemplate('template2', {templateName:'template1'}); assert.strictEqual(evaled, 'template template1 exists'); - var evaled = LGFile.evaluateTemplate('template2', {templateName:'wPhrase'}); + evaled = LGFile.evaluateTemplate('template2', {templateName:'wPhrase'}); assert.strictEqual(evaled, 'template wPhrase exists'); - var evaled = LGFile.evaluateTemplate('template2', {templateName:'xxx'}); + evaled = LGFile.evaluateTemplate('template2', {templateName:'xxx'}); assert.strictEqual(evaled, 'template xxx does not exist'); }); + + it('TestStringInterpolation', function() { + var LGFile = LGParser.parseFile(GetExampleFilePath('StringInterpolation.lg')); + + var evaled = LGFile.evaluateTemplate('simpleStringTemplate'); + assert.strictEqual(evaled, 'say hi'); + + evaled = LGFile.evaluateTemplate('StringTemplateWithVariable', {w:'world'}); + assert.strictEqual(evaled, 'hello world'); + + evaled = LGFile.evaluateTemplate('StringTemplateWithMixing', {name:'jack'}); + assert.strictEqual(evaled, 'I know your name is jack'); + + evaled = LGFile.evaluateTemplate('StringTemplateWithJson', {h:'hello', w: 'world'}); + assert.strictEqual(evaled, 'get \'h\' value : hello'); + + evaled = LGFile.evaluateTemplate('StringTemplateWithEscape'); + assert.strictEqual(evaled, 'just want to output ${bala\`bala}'); + + evaled = LGFile.evaluateTemplate('StringTemplateWithTemplateRef'); + assert.strictEqual(evaled, 'hello jack , welcome. nice weather!'); + }); }); diff --git a/libraries/botbuilder-lg/tests/testData/examples/StringInterpolation.lg b/libraries/botbuilder-lg/tests/testData/examples/StringInterpolation.lg new file mode 100644 index 0000000000..1f67eac958 --- /dev/null +++ b/libraries/botbuilder-lg/tests/testData/examples/StringInterpolation.lg @@ -0,0 +1,17 @@ +# simpleStringTemplate +- say ${`hi`} + +# StringTemplateWithVariable(w) +- hello ${`${w}`} + +# StringTemplateWithMixing(name) +- I know ${`your name is ${name}`} + +# StringTemplateWithJson(h, w) +- get 'h' value : ${json(`{"foo": "${h}","bar": "${w}"}`).foo} + +# StringTemplateWithEscape() +- just want to output ${`\${bala\`bala}`} + +# StringTemplateWithTemplateRef +- ${`${StringTemplateWithVariable('jack')} , welcome.`} nice weather! \ No newline at end of file