diff --git a/oap-formats/oap-template/src/main/antlr4/TemplateGrammar.g4 b/oap-formats/oap-template/src/main/antlr4/TemplateGrammar.g4 index 865c31bac5..3ae14f0807 100644 --- a/oap-formats/oap-template/src/main/antlr4/TemplateGrammar.g4 +++ b/oap-formats/oap-template/src/main/antlr4/TemplateGrammar.g4 @@ -12,6 +12,7 @@ package oap.template; import oap.template.tree.*; import oap.template.tree.BlockIfElement; import oap.template.tree.BlockWithElement; +import oap.template.tree.BlockRangeElement; import org.apache.commons.lang3.StringUtils; import java.lang.reflect.Method; @@ -40,6 +41,7 @@ element[Map aliases] returns [Element ret] | expression[aliases] { $ret = new ExpressionElement( $expression.ret, $expression.trimLeft, $expression.trimRight ); } | blockIfElement[aliases] { $ret = $blockIfElement.ret; } | blockWithElement[aliases] { $ret = $blockWithElement.ret; } + | blockRangeElement[aliases] { $ret = $blockRangeElement.ret; } ; blockIfElement[Map aliases] returns [BlockIfElement ret] @@ -69,6 +71,20 @@ blockWithElement[Map aliases] returns [BlockWithElement ret] } ; +blockRangeElement[Map aliases] returns [BlockRangeElement ret] + : STARTBLOCKRANGE BLOCK_IF_CONTENT BLOCK_IF_RBRACE + thenBranch=blockBody[aliases] + ( STARTBLOCKELSE elseBranch=blockBody[aliases] )? + STARTBLOCKEND + { + $ret = new BlockRangeElement( + StringUtils.trim( $BLOCK_IF_CONTENT.text ), + $thenBranch.ret, + $elseBranch.ctx != null ? $elseBranch.ret : null + ); + } + ; + blockBody[Map aliases] returns [Elements ret = new Elements()] : ( element[aliases] { if( $element.ret != null ) $ret.elements.add( $element.ret ); } diff --git a/oap-formats/oap-template/src/main/antlr4/TemplateGrammarExpression.g4 b/oap-formats/oap-template/src/main/antlr4/TemplateGrammarExpression.g4 index e46447c1d6..56fe8eac4e 100644 --- a/oap-formats/oap-template/src/main/antlr4/TemplateGrammarExpression.g4 +++ b/oap-formats/oap-template/src/main/antlr4/TemplateGrammarExpression.g4 @@ -112,6 +112,9 @@ exprs returns [Exprs ret = new Exprs()] : ROOT DOT expr { $ret.rootScoped = true; $ret.exprs.add( $expr.ret ); } (DOT expr { $ret.exprs.add( $expr.ret ); })* math? { if( $math.ctx != null ) $ret.math = $math.ret; } + | VAR_ID { $ret.varName = $VAR_ID.text.substring( 1 ); } + (DOT expr { $ret.exprs.add( $expr.ret ); })* + math? { if( $math.ctx != null ) $ret.math = $math.ret; } | expr { $ret.exprs.add( $expr.ret ); } math? { if( $math.ctx != null ) $ret.math = $math.ret; } | expr { $ret.exprs.add( $expr.ret ); } diff --git a/oap-formats/oap-template/src/main/antlr4/TemplateLexer.g4 b/oap-formats/oap-template/src/main/antlr4/TemplateLexer.g4 index 449b687467..7a641e2a12 100644 --- a/oap-formats/oap-template/src/main/antlr4/TemplateLexer.g4 +++ b/oap-formats/oap-template/src/main/antlr4/TemplateLexer.g4 @@ -10,6 +10,7 @@ fragment EndExpr2 : '}}' ; +STARTBLOCKRANGE : '{{%' [ \t]* 'range' [ \t]+ -> pushMode(BlockIfContent) ; STARTBLOCKWITH : '{{%' [ \t]* 'with' [ \t]+ -> pushMode(BlockIfContent) ; STARTBLOCKIF_LTRIM : '{{%-' [ \t]* 'if' [ \t]+ -> pushMode(BlockIfContent) ; STARTBLOCKIF : '{{%' [ \t]* 'if' [ \t]+ -> pushMode(BlockIfContent) ; diff --git a/oap-formats/oap-template/src/main/antlr4/TemplateLexerExpression.g4 b/oap-formats/oap-template/src/main/antlr4/TemplateLexerExpression.g4 index e8e6b3761c..4b5ceb0dc9 100644 --- a/oap-formats/oap-template/src/main/antlr4/TemplateLexerExpression.g4 +++ b/oap-formats/oap-template/src/main/antlr4/TemplateLexerExpression.g4 @@ -86,6 +86,7 @@ THEN : 'then' ; ELSE : 'else' ; END : 'end' ; WITH : 'with' ; +VAR_ID : '$' NameChar (NameChar|DecDigit)* ; ROOT : '$' ; BLOCK_COMMENT : BlockComment; diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.interp b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.interp index 6ccbe28c8d..25dde22904 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.interp +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.interp @@ -7,6 +7,7 @@ null null null null +null '{{-' null null @@ -22,6 +23,7 @@ null token symbolic names: null +STARTBLOCKRANGE STARTBLOCKWITH STARTBLOCKIF_LTRIM STARTBLOCKIF @@ -47,6 +49,7 @@ elements element blockIfElement blockWithElement +blockRangeElement blockBody text comment @@ -55,4 +58,4 @@ expressionContent atn: -[4, 1, 19, 91, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 1, 0, 1, 0, 1, 0, 5, 0, 22, 8, 0, 10, 0, 12, 0, 25, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 44, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 52, 8, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 5, 4, 67, 8, 4, 10, 4, 12, 4, 70, 9, 4, 1, 5, 4, 5, 73, 8, 5, 11, 5, 12, 5, 74, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 4, 8, 87, 8, 8, 11, 8, 12, 8, 88, 1, 8, 0, 0, 9, 0, 2, 4, 6, 8, 10, 12, 14, 16, 0, 4, 1, 0, 2, 3, 1, 0, 7, 9, 2, 0, 12, 12, 15, 16, 2, 0, 11, 14, 16, 17, 90, 0, 23, 1, 0, 0, 0, 2, 43, 1, 0, 0, 0, 4, 45, 1, 0, 0, 0, 6, 56, 1, 0, 0, 0, 8, 68, 1, 0, 0, 0, 10, 72, 1, 0, 0, 0, 12, 76, 1, 0, 0, 0, 14, 80, 1, 0, 0, 0, 16, 86, 1, 0, 0, 0, 18, 19, 3, 2, 1, 0, 19, 20, 6, 0, -1, 0, 20, 22, 1, 0, 0, 0, 21, 18, 1, 0, 0, 0, 22, 25, 1, 0, 0, 0, 23, 21, 1, 0, 0, 0, 23, 24, 1, 0, 0, 0, 24, 26, 1, 0, 0, 0, 25, 23, 1, 0, 0, 0, 26, 27, 5, 0, 0, 1, 27, 1, 1, 0, 0, 0, 28, 29, 3, 10, 5, 0, 29, 30, 6, 1, -1, 0, 30, 44, 1, 0, 0, 0, 31, 32, 3, 12, 6, 0, 32, 33, 6, 1, -1, 0, 33, 44, 1, 0, 0, 0, 34, 35, 3, 14, 7, 0, 35, 36, 6, 1, -1, 0, 36, 44, 1, 0, 0, 0, 37, 38, 3, 4, 2, 0, 38, 39, 6, 1, -1, 0, 39, 44, 1, 0, 0, 0, 40, 41, 3, 6, 3, 0, 41, 42, 6, 1, -1, 0, 42, 44, 1, 0, 0, 0, 43, 28, 1, 0, 0, 0, 43, 31, 1, 0, 0, 0, 43, 34, 1, 0, 0, 0, 43, 37, 1, 0, 0, 0, 43, 40, 1, 0, 0, 0, 44, 3, 1, 0, 0, 0, 45, 46, 7, 0, 0, 0, 46, 47, 5, 18, 0, 0, 47, 48, 5, 19, 0, 0, 48, 51, 3, 8, 4, 0, 49, 50, 5, 4, 0, 0, 50, 52, 3, 8, 4, 0, 51, 49, 1, 0, 0, 0, 51, 52, 1, 0, 0, 0, 52, 53, 1, 0, 0, 0, 53, 54, 5, 5, 0, 0, 54, 55, 6, 2, -1, 0, 55, 5, 1, 0, 0, 0, 56, 57, 5, 1, 0, 0, 57, 58, 5, 18, 0, 0, 58, 59, 5, 19, 0, 0, 59, 60, 3, 8, 4, 0, 60, 61, 5, 5, 0, 0, 61, 62, 6, 3, -1, 0, 62, 7, 1, 0, 0, 0, 63, 64, 3, 2, 1, 0, 64, 65, 6, 4, -1, 0, 65, 67, 1, 0, 0, 0, 66, 63, 1, 0, 0, 0, 67, 70, 1, 0, 0, 0, 68, 66, 1, 0, 0, 0, 68, 69, 1, 0, 0, 0, 69, 9, 1, 0, 0, 0, 70, 68, 1, 0, 0, 0, 71, 73, 5, 10, 0, 0, 72, 71, 1, 0, 0, 0, 73, 74, 1, 0, 0, 0, 74, 72, 1, 0, 0, 0, 74, 75, 1, 0, 0, 0, 75, 11, 1, 0, 0, 0, 76, 77, 5, 6, 0, 0, 77, 78, 3, 16, 8, 0, 78, 79, 5, 12, 0, 0, 79, 13, 1, 0, 0, 0, 80, 81, 7, 1, 0, 0, 81, 82, 3, 16, 8, 0, 82, 83, 7, 2, 0, 0, 83, 84, 6, 7, -1, 0, 84, 15, 1, 0, 0, 0, 85, 87, 7, 3, 0, 0, 86, 85, 1, 0, 0, 0, 87, 88, 1, 0, 0, 0, 88, 86, 1, 0, 0, 0, 88, 89, 1, 0, 0, 0, 89, 17, 1, 0, 0, 0, 6, 23, 43, 51, 68, 74, 88] \ No newline at end of file +[4, 1, 20, 107, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 1, 0, 1, 0, 1, 0, 5, 0, 24, 8, 0, 10, 0, 12, 0, 27, 9, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 49, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 57, 8, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 75, 8, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 5, 5, 83, 8, 5, 10, 5, 12, 5, 86, 9, 5, 1, 6, 4, 6, 89, 8, 6, 11, 6, 12, 6, 90, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 4, 9, 103, 8, 9, 11, 9, 12, 9, 104, 1, 9, 0, 0, 10, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 4, 1, 0, 3, 4, 1, 0, 8, 10, 2, 0, 13, 13, 16, 17, 2, 0, 12, 15, 17, 18, 107, 0, 25, 1, 0, 0, 0, 2, 48, 1, 0, 0, 0, 4, 50, 1, 0, 0, 0, 6, 61, 1, 0, 0, 0, 8, 68, 1, 0, 0, 0, 10, 84, 1, 0, 0, 0, 12, 88, 1, 0, 0, 0, 14, 92, 1, 0, 0, 0, 16, 96, 1, 0, 0, 0, 18, 102, 1, 0, 0, 0, 20, 21, 3, 2, 1, 0, 21, 22, 6, 0, -1, 0, 22, 24, 1, 0, 0, 0, 23, 20, 1, 0, 0, 0, 24, 27, 1, 0, 0, 0, 25, 23, 1, 0, 0, 0, 25, 26, 1, 0, 0, 0, 26, 28, 1, 0, 0, 0, 27, 25, 1, 0, 0, 0, 28, 29, 5, 0, 0, 1, 29, 1, 1, 0, 0, 0, 30, 31, 3, 12, 6, 0, 31, 32, 6, 1, -1, 0, 32, 49, 1, 0, 0, 0, 33, 34, 3, 14, 7, 0, 34, 35, 6, 1, -1, 0, 35, 49, 1, 0, 0, 0, 36, 37, 3, 16, 8, 0, 37, 38, 6, 1, -1, 0, 38, 49, 1, 0, 0, 0, 39, 40, 3, 4, 2, 0, 40, 41, 6, 1, -1, 0, 41, 49, 1, 0, 0, 0, 42, 43, 3, 6, 3, 0, 43, 44, 6, 1, -1, 0, 44, 49, 1, 0, 0, 0, 45, 46, 3, 8, 4, 0, 46, 47, 6, 1, -1, 0, 47, 49, 1, 0, 0, 0, 48, 30, 1, 0, 0, 0, 48, 33, 1, 0, 0, 0, 48, 36, 1, 0, 0, 0, 48, 39, 1, 0, 0, 0, 48, 42, 1, 0, 0, 0, 48, 45, 1, 0, 0, 0, 49, 3, 1, 0, 0, 0, 50, 51, 7, 0, 0, 0, 51, 52, 5, 19, 0, 0, 52, 53, 5, 20, 0, 0, 53, 56, 3, 10, 5, 0, 54, 55, 5, 5, 0, 0, 55, 57, 3, 10, 5, 0, 56, 54, 1, 0, 0, 0, 56, 57, 1, 0, 0, 0, 57, 58, 1, 0, 0, 0, 58, 59, 5, 6, 0, 0, 59, 60, 6, 2, -1, 0, 60, 5, 1, 0, 0, 0, 61, 62, 5, 2, 0, 0, 62, 63, 5, 19, 0, 0, 63, 64, 5, 20, 0, 0, 64, 65, 3, 10, 5, 0, 65, 66, 5, 6, 0, 0, 66, 67, 6, 3, -1, 0, 67, 7, 1, 0, 0, 0, 68, 69, 5, 1, 0, 0, 69, 70, 5, 19, 0, 0, 70, 71, 5, 20, 0, 0, 71, 74, 3, 10, 5, 0, 72, 73, 5, 5, 0, 0, 73, 75, 3, 10, 5, 0, 74, 72, 1, 0, 0, 0, 74, 75, 1, 0, 0, 0, 75, 76, 1, 0, 0, 0, 76, 77, 5, 6, 0, 0, 77, 78, 6, 4, -1, 0, 78, 9, 1, 0, 0, 0, 79, 80, 3, 2, 1, 0, 80, 81, 6, 5, -1, 0, 81, 83, 1, 0, 0, 0, 82, 79, 1, 0, 0, 0, 83, 86, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 11, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 87, 89, 5, 11, 0, 0, 88, 87, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 88, 1, 0, 0, 0, 90, 91, 1, 0, 0, 0, 91, 13, 1, 0, 0, 0, 92, 93, 5, 7, 0, 0, 93, 94, 3, 18, 9, 0, 94, 95, 5, 13, 0, 0, 95, 15, 1, 0, 0, 0, 96, 97, 7, 1, 0, 0, 97, 98, 3, 18, 9, 0, 98, 99, 7, 2, 0, 0, 99, 100, 6, 8, -1, 0, 100, 17, 1, 0, 0, 0, 101, 103, 7, 3, 0, 0, 102, 101, 1, 0, 0, 0, 103, 104, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 104, 105, 1, 0, 0, 0, 105, 19, 1, 0, 0, 0, 7, 25, 48, 56, 74, 84, 90, 104] \ No newline at end of file diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.java b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.java index f4537125ec..02fd0ba3c2 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.java +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.java @@ -5,6 +5,7 @@ import oap.template.tree.*; import oap.template.tree.BlockIfElement; import oap.template.tree.BlockWithElement; +import oap.template.tree.BlockRangeElement; import org.apache.commons.lang3.StringUtils; import java.lang.reflect.Method; @@ -29,34 +30,34 @@ public class TemplateGrammar extends TemplateGrammarAdaptor { protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int - STARTBLOCKWITH=1, STARTBLOCKIF_LTRIM=2, STARTBLOCKIF=3, STARTBLOCKELSE=4, - STARTBLOCKEND=5, STARTESCEXPR=6, STARTEXPR=7, STARTEXPR2_LTRIM=8, STARTEXPR2=9, - TEXT=10, LBRACE=11, RBRACE=12, EXPRESSION=13, LBRACE2=14, RBRACE2_RTRIM=15, - RBRACE2=16, EXPRESSION2=17, BLOCK_IF_CONTENT=18, BLOCK_IF_RBRACE=19; + STARTBLOCKRANGE=1, STARTBLOCKWITH=2, STARTBLOCKIF_LTRIM=3, STARTBLOCKIF=4, + STARTBLOCKELSE=5, STARTBLOCKEND=6, STARTESCEXPR=7, STARTEXPR=8, STARTEXPR2_LTRIM=9, + STARTEXPR2=10, TEXT=11, LBRACE=12, RBRACE=13, EXPRESSION=14, LBRACE2=15, + RBRACE2_RTRIM=16, RBRACE2=17, EXPRESSION2=18, BLOCK_IF_CONTENT=19, BLOCK_IF_RBRACE=20; public static final int RULE_elements = 0, RULE_element = 1, RULE_blockIfElement = 2, RULE_blockWithElement = 3, - RULE_blockBody = 4, RULE_text = 5, RULE_comment = 6, RULE_expression = 7, - RULE_expressionContent = 8; + RULE_blockRangeElement = 4, RULE_blockBody = 5, RULE_text = 6, RULE_comment = 7, + RULE_expression = 8, RULE_expressionContent = 9; private static String[] makeRuleNames() { return new String[] { - "elements", "element", "blockIfElement", "blockWithElement", "blockBody", - "text", "comment", "expression", "expressionContent" + "elements", "element", "blockIfElement", "blockWithElement", "blockRangeElement", + "blockBody", "text", "comment", "expression", "expressionContent" }; } public static final String[] ruleNames = makeRuleNames(); private static String[] makeLiteralNames() { return new String[] { - null, null, null, null, null, null, null, null, "'{{-'", null, null, - null, null, null, null, "'-}}'", null, null, null, "'}}'" + null, null, null, null, null, null, null, null, null, "'{{-'", null, + null, null, null, null, null, "'-}}'", null, null, null, "'}}'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); private static String[] makeSymbolicNames() { return new String[] { - null, "STARTBLOCKWITH", "STARTBLOCKIF_LTRIM", "STARTBLOCKIF", "STARTBLOCKELSE", - "STARTBLOCKEND", "STARTESCEXPR", "STARTEXPR", "STARTEXPR2_LTRIM", "STARTEXPR2", - "TEXT", "LBRACE", "RBRACE", "EXPRESSION", "LBRACE2", "RBRACE2_RTRIM", + null, "STARTBLOCKRANGE", "STARTBLOCKWITH", "STARTBLOCKIF_LTRIM", "STARTBLOCKIF", + "STARTBLOCKELSE", "STARTBLOCKEND", "STARTESCEXPR", "STARTEXPR", "STARTEXPR2_LTRIM", + "STARTEXPR2", "TEXT", "LBRACE", "RBRACE", "EXPRESSION", "LBRACE2", "RBRACE2_RTRIM", "RBRACE2", "EXPRESSION2", "BLOCK_IF_CONTENT", "BLOCK_IF_RBRACE" }; } @@ -155,22 +156,22 @@ public final ElementsContext elements(Map aliases) throws Recogni try { enterOuterAlt(_localctx, 1); { - setState(23); + setState(25); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1998L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3998L) != 0)) { { { - setState(18); + setState(20); ((ElementsContext)_localctx).element = element(aliases); _localctx.ret.elements.add( ((ElementsContext)_localctx).element.ret ); } } - setState(25); + setState(27); _errHandler.sync(this); _la = _input.LA(1); } - setState(26); + setState(28); match(EOF); } } @@ -194,6 +195,7 @@ public static class ElementContext extends ParserRuleContext { public ExpressionContext expression; public BlockIfElementContext blockIfElement; public BlockWithElementContext blockWithElement; + public BlockRangeElementContext blockRangeElement; public TextContext text() { return getRuleContext(TextContext.class,0); } @@ -209,6 +211,9 @@ public BlockIfElementContext blockIfElement() { public BlockWithElementContext blockWithElement() { return getRuleContext(BlockWithElementContext.class,0); } + public BlockRangeElementContext blockRangeElement() { + return getRuleContext(BlockRangeElementContext.class,0); + } public ElementContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } public ElementContext(ParserRuleContext parent, int invokingState, Map aliases) { super(parent, invokingState); @@ -229,13 +234,13 @@ public final ElementContext element(Map aliases) throws Recogniti ElementContext _localctx = new ElementContext(_ctx, getState(), aliases); enterRule(_localctx, 2, RULE_element); try { - setState(43); + setState(48); _errHandler.sync(this); switch (_input.LA(1)) { case TEXT: enterOuterAlt(_localctx, 1); { - setState(28); + setState(30); ((ElementContext)_localctx).t = text(); ((ElementContext)_localctx).ret = new TextElement( (((ElementContext)_localctx).t!=null?_input.getText(((ElementContext)_localctx).t.start,((ElementContext)_localctx).t.stop):null) ); } @@ -243,7 +248,7 @@ public final ElementContext element(Map aliases) throws Recogniti case STARTESCEXPR: enterOuterAlt(_localctx, 2); { - setState(31); + setState(33); ((ElementContext)_localctx).comment = comment(); ((ElementContext)_localctx).ret = new TextElement( (((ElementContext)_localctx).comment!=null?_input.getText(((ElementContext)_localctx).comment.start,((ElementContext)_localctx).comment.stop):null).substring(1) ); } @@ -253,7 +258,7 @@ public final ElementContext element(Map aliases) throws Recogniti case STARTEXPR2: enterOuterAlt(_localctx, 3); { - setState(34); + setState(36); ((ElementContext)_localctx).expression = expression(aliases); ((ElementContext)_localctx).ret = new ExpressionElement( ((ElementContext)_localctx).expression.ret, ((ElementContext)_localctx).expression.trimLeft, ((ElementContext)_localctx).expression.trimRight ); } @@ -262,7 +267,7 @@ public final ElementContext element(Map aliases) throws Recogniti case STARTBLOCKIF: enterOuterAlt(_localctx, 4); { - setState(37); + setState(39); ((ElementContext)_localctx).blockIfElement = blockIfElement(aliases); ((ElementContext)_localctx).ret = ((ElementContext)_localctx).blockIfElement.ret; } @@ -270,11 +275,19 @@ public final ElementContext element(Map aliases) throws Recogniti case STARTBLOCKWITH: enterOuterAlt(_localctx, 5); { - setState(40); + setState(42); ((ElementContext)_localctx).blockWithElement = blockWithElement(aliases); ((ElementContext)_localctx).ret = ((ElementContext)_localctx).blockWithElement.ret; } break; + case STARTBLOCKRANGE: + enterOuterAlt(_localctx, 6); + { + setState(45); + ((ElementContext)_localctx).blockRangeElement = blockRangeElement(aliases); + ((ElementContext)_localctx).ret = ((ElementContext)_localctx).blockRangeElement.ret; + } + break; default: throw new NoViableAltException(this); } @@ -332,7 +345,7 @@ public final BlockIfElementContext blockIfElement(Map aliases) th try { enterOuterAlt(_localctx, 1); { - setState(45); + setState(50); _la = _input.LA(1); if ( !(_la==STARTBLOCKIF_LTRIM || _la==STARTBLOCKIF) ) { _errHandler.recoverInline(this); @@ -342,25 +355,25 @@ public final BlockIfElementContext blockIfElement(Map aliases) th _errHandler.reportMatch(this); consume(); } - setState(46); + setState(51); ((BlockIfElementContext)_localctx).BLOCK_IF_CONTENT = match(BLOCK_IF_CONTENT); - setState(47); + setState(52); match(BLOCK_IF_RBRACE); - setState(48); + setState(53); ((BlockIfElementContext)_localctx).thenBranch = blockBody(aliases); - setState(51); + setState(56); _errHandler.sync(this); _la = _input.LA(1); if (_la==STARTBLOCKELSE) { { - setState(49); + setState(54); match(STARTBLOCKELSE); - setState(50); + setState(55); ((BlockIfElementContext)_localctx).elseBranch = blockBody(aliases); } } - setState(53); + setState(58); match(STARTBLOCKEND); ((BlockIfElementContext)_localctx).ret = new BlockIfElement( @@ -418,15 +431,15 @@ public final BlockWithElementContext blockWithElement(Map aliases try { enterOuterAlt(_localctx, 1); { - setState(56); + setState(61); match(STARTBLOCKWITH); - setState(57); + setState(62); ((BlockWithElementContext)_localctx).BLOCK_IF_CONTENT = match(BLOCK_IF_CONTENT); - setState(58); + setState(63); match(BLOCK_IF_RBRACE); - setState(59); + setState(64); ((BlockWithElementContext)_localctx).body = blockBody(aliases); - setState(60); + setState(65); match(STARTBLOCKEND); ((BlockWithElementContext)_localctx).ret = new BlockWithElement( @@ -447,6 +460,89 @@ public final BlockWithElementContext blockWithElement(Map aliases return _localctx; } + @SuppressWarnings("CheckReturnValue") + public static class BlockRangeElementContext extends ParserRuleContext { + public Map aliases; + public BlockRangeElement ret; + public Token BLOCK_IF_CONTENT; + public BlockBodyContext thenBranch; + public BlockBodyContext elseBranch; + public TerminalNode STARTBLOCKRANGE() { return getToken(TemplateGrammar.STARTBLOCKRANGE, 0); } + public TerminalNode BLOCK_IF_CONTENT() { return getToken(TemplateGrammar.BLOCK_IF_CONTENT, 0); } + public TerminalNode BLOCK_IF_RBRACE() { return getToken(TemplateGrammar.BLOCK_IF_RBRACE, 0); } + public TerminalNode STARTBLOCKEND() { return getToken(TemplateGrammar.STARTBLOCKEND, 0); } + public List blockBody() { + return getRuleContexts(BlockBodyContext.class); + } + public BlockBodyContext blockBody(int i) { + return getRuleContext(BlockBodyContext.class,i); + } + public TerminalNode STARTBLOCKELSE() { return getToken(TemplateGrammar.STARTBLOCKELSE, 0); } + public BlockRangeElementContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } + public BlockRangeElementContext(ParserRuleContext parent, int invokingState, Map aliases) { + super(parent, invokingState); + this.aliases = aliases; + } + @Override public int getRuleIndex() { return RULE_blockRangeElement; } + @Override + public void enterRule(ParseTreeListener listener) { + if ( listener instanceof TemplateGrammarListener ) ((TemplateGrammarListener)listener).enterBlockRangeElement(this); + } + @Override + public void exitRule(ParseTreeListener listener) { + if ( listener instanceof TemplateGrammarListener ) ((TemplateGrammarListener)listener).exitBlockRangeElement(this); + } + } + + public final BlockRangeElementContext blockRangeElement(Map aliases) throws RecognitionException { + BlockRangeElementContext _localctx = new BlockRangeElementContext(_ctx, getState(), aliases); + enterRule(_localctx, 8, RULE_blockRangeElement); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(68); + match(STARTBLOCKRANGE); + setState(69); + ((BlockRangeElementContext)_localctx).BLOCK_IF_CONTENT = match(BLOCK_IF_CONTENT); + setState(70); + match(BLOCK_IF_RBRACE); + setState(71); + ((BlockRangeElementContext)_localctx).thenBranch = blockBody(aliases); + setState(74); + _errHandler.sync(this); + _la = _input.LA(1); + if (_la==STARTBLOCKELSE) { + { + setState(72); + match(STARTBLOCKELSE); + setState(73); + ((BlockRangeElementContext)_localctx).elseBranch = blockBody(aliases); + } + } + + setState(76); + match(STARTBLOCKEND); + + ((BlockRangeElementContext)_localctx).ret = new BlockRangeElement( + StringUtils.trim( (((BlockRangeElementContext)_localctx).BLOCK_IF_CONTENT!=null?((BlockRangeElementContext)_localctx).BLOCK_IF_CONTENT.getText():null) ), + ((BlockRangeElementContext)_localctx).thenBranch.ret, + ((BlockRangeElementContext)_localctx).elseBranch != null ? ((BlockRangeElementContext)_localctx).elseBranch.ret : null + ); + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + @SuppressWarnings("CheckReturnValue") public static class BlockBodyContext extends ParserRuleContext { public Map aliases; @@ -476,23 +572,23 @@ public void exitRule(ParseTreeListener listener) { public final BlockBodyContext blockBody(Map aliases) throws RecognitionException { BlockBodyContext _localctx = new BlockBodyContext(_ctx, getState(), aliases); - enterRule(_localctx, 8, RULE_blockBody); + enterRule(_localctx, 10, RULE_blockBody); int _la; try { enterOuterAlt(_localctx, 1); { - setState(68); + setState(84); _errHandler.sync(this); _la = _input.LA(1); - while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1998L) != 0)) { + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & 3998L) != 0)) { { { - setState(63); + setState(79); ((BlockBodyContext)_localctx).element = element(aliases); if( ((BlockBodyContext)_localctx).element.ret != null ) _localctx.ret.elements.add( ((BlockBodyContext)_localctx).element.ret ); } } - setState(70); + setState(86); _errHandler.sync(this); _la = _input.LA(1); } @@ -531,12 +627,12 @@ public void exitRule(ParseTreeListener listener) { public final TextContext text() throws RecognitionException { TextContext _localctx = new TextContext(_ctx, getState()); - enterRule(_localctx, 10, RULE_text); + enterRule(_localctx, 12, RULE_text); try { int _alt; enterOuterAlt(_localctx, 1); { - setState(72); + setState(88); _errHandler.sync(this); _alt = 1; do { @@ -544,7 +640,7 @@ public final TextContext text() throws RecognitionException { case 1: { { - setState(71); + setState(87); match(TEXT); } } @@ -552,9 +648,9 @@ public final TextContext text() throws RecognitionException { default: throw new NoViableAltException(this); } - setState(74); + setState(90); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,4,_ctx); + _alt = getInterpreter().adaptivePredict(_input,5,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } } @@ -592,15 +688,15 @@ public void exitRule(ParseTreeListener listener) { public final CommentContext comment() throws RecognitionException { CommentContext _localctx = new CommentContext(_ctx, getState()); - enterRule(_localctx, 12, RULE_comment); + enterRule(_localctx, 14, RULE_comment); try { enterOuterAlt(_localctx, 1); { - setState(76); + setState(92); match(STARTESCEXPR); - setState(77); + setState(93); expressionContent(); - setState(78); + setState(94); match(RBRACE); } } @@ -649,14 +745,14 @@ public void exitRule(ParseTreeListener listener) { public final ExpressionContext expression(Map aliases) throws RecognitionException { ExpressionContext _localctx = new ExpressionContext(_ctx, getState(), aliases); - enterRule(_localctx, 14, RULE_expression); + enterRule(_localctx, 16, RULE_expression); int _la; try { enterOuterAlt(_localctx, 1); { - setState(80); + setState(96); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 896L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 1792L) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -664,11 +760,11 @@ public final ExpressionContext expression(Map aliases) throws Rec _errHandler.reportMatch(this); consume(); } - setState(81); + setState(97); ((ExpressionContext)_localctx).expressionContent = expressionContent(); - setState(82); + setState(98); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 102400L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 204800L) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -738,13 +834,13 @@ public void exitRule(ParseTreeListener listener) { public final ExpressionContentContext expressionContent() throws RecognitionException { ExpressionContentContext _localctx = new ExpressionContentContext(_ctx, getState()); - enterRule(_localctx, 16, RULE_expressionContent); + enterRule(_localctx, 18, RULE_expressionContent); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { - setState(86); + setState(102); _errHandler.sync(this); _alt = 1; do { @@ -752,9 +848,9 @@ public final ExpressionContentContext expressionContent() throws RecognitionExce case 1: { { - setState(85); + setState(101); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 227328L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 454656L) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -768,9 +864,9 @@ public final ExpressionContentContext expressionContent() throws RecognitionExce default: throw new NoViableAltException(this); } - setState(88); + setState(104); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,5,_ctx); + _alt = getInterpreter().adaptivePredict(_input,6,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); } } @@ -786,60 +882,68 @@ public final ExpressionContentContext expressionContent() throws RecognitionExce } public static final String _serializedATN = - "\u0004\u0001\u0013[\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0004\u0001\u0014k\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+ "\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007\u0002"+ - "\b\u0007\b\u0001\u0000\u0001\u0000\u0001\u0000\u0005\u0000\u0016\b\u0000"+ - "\n\u0000\f\u0000\u0019\t\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001"+ + "\b\u0007\b\u0002\t\u0007\t\u0001\u0000\u0001\u0000\u0001\u0000\u0005\u0000"+ + "\u0018\b\u0000\n\u0000\f\u0000\u001b\t\u0000\u0001\u0000\u0001\u0000\u0001"+ "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+ "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+ - "\u0001\u0001\u0001\u0003\u0001,\b\u0001\u0001\u0002\u0001\u0002\u0001"+ - "\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0003\u00024\b\u0002\u0001"+ - "\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001"+ - "\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001"+ - "\u0004\u0005\u0004C\b\u0004\n\u0004\f\u0004F\t\u0004\u0001\u0005\u0004"+ - "\u0005I\b\u0005\u000b\u0005\f\u0005J\u0001\u0006\u0001\u0006\u0001\u0006"+ - "\u0001\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007"+ - "\u0001\b\u0004\bW\b\b\u000b\b\f\bX\u0001\b\u0000\u0000\t\u0000\u0002\u0004"+ - "\u0006\b\n\f\u000e\u0010\u0000\u0004\u0001\u0000\u0002\u0003\u0001\u0000"+ - "\u0007\t\u0002\u0000\f\f\u000f\u0010\u0002\u0000\u000b\u000e\u0010\u0011"+ - "Z\u0000\u0017\u0001\u0000\u0000\u0000\u0002+\u0001\u0000\u0000\u0000\u0004"+ - "-\u0001\u0000\u0000\u0000\u00068\u0001\u0000\u0000\u0000\bD\u0001\u0000"+ - "\u0000\u0000\nH\u0001\u0000\u0000\u0000\fL\u0001\u0000\u0000\u0000\u000e"+ - "P\u0001\u0000\u0000\u0000\u0010V\u0001\u0000\u0000\u0000\u0012\u0013\u0003"+ - "\u0002\u0001\u0000\u0013\u0014\u0006\u0000\uffff\uffff\u0000\u0014\u0016"+ - "\u0001\u0000\u0000\u0000\u0015\u0012\u0001\u0000\u0000\u0000\u0016\u0019"+ - "\u0001\u0000\u0000\u0000\u0017\u0015\u0001\u0000\u0000\u0000\u0017\u0018"+ - "\u0001\u0000\u0000\u0000\u0018\u001a\u0001\u0000\u0000\u0000\u0019\u0017"+ - "\u0001\u0000\u0000\u0000\u001a\u001b\u0005\u0000\u0000\u0001\u001b\u0001"+ - "\u0001\u0000\u0000\u0000\u001c\u001d\u0003\n\u0005\u0000\u001d\u001e\u0006"+ - "\u0001\uffff\uffff\u0000\u001e,\u0001\u0000\u0000\u0000\u001f \u0003\f"+ - "\u0006\u0000 !\u0006\u0001\uffff\uffff\u0000!,\u0001\u0000\u0000\u0000"+ - "\"#\u0003\u000e\u0007\u0000#$\u0006\u0001\uffff\uffff\u0000$,\u0001\u0000"+ - "\u0000\u0000%&\u0003\u0004\u0002\u0000&\'\u0006\u0001\uffff\uffff\u0000"+ - "\',\u0001\u0000\u0000\u0000()\u0003\u0006\u0003\u0000)*\u0006\u0001\uffff"+ - "\uffff\u0000*,\u0001\u0000\u0000\u0000+\u001c\u0001\u0000\u0000\u0000"+ - "+\u001f\u0001\u0000\u0000\u0000+\"\u0001\u0000\u0000\u0000+%\u0001\u0000"+ - "\u0000\u0000+(\u0001\u0000\u0000\u0000,\u0003\u0001\u0000\u0000\u0000"+ - "-.\u0007\u0000\u0000\u0000./\u0005\u0012\u0000\u0000/0\u0005\u0013\u0000"+ - "\u000003\u0003\b\u0004\u000012\u0005\u0004\u0000\u000024\u0003\b\u0004"+ - "\u000031\u0001\u0000\u0000\u000034\u0001\u0000\u0000\u000045\u0001\u0000"+ - "\u0000\u000056\u0005\u0005\u0000\u000067\u0006\u0002\uffff\uffff\u0000"+ - "7\u0005\u0001\u0000\u0000\u000089\u0005\u0001\u0000\u00009:\u0005\u0012"+ - "\u0000\u0000:;\u0005\u0013\u0000\u0000;<\u0003\b\u0004\u0000<=\u0005\u0005"+ - "\u0000\u0000=>\u0006\u0003\uffff\uffff\u0000>\u0007\u0001\u0000\u0000"+ - "\u0000?@\u0003\u0002\u0001\u0000@A\u0006\u0004\uffff\uffff\u0000AC\u0001"+ - "\u0000\u0000\u0000B?\u0001\u0000\u0000\u0000CF\u0001\u0000\u0000\u0000"+ - "DB\u0001\u0000\u0000\u0000DE\u0001\u0000\u0000\u0000E\t\u0001\u0000\u0000"+ - "\u0000FD\u0001\u0000\u0000\u0000GI\u0005\n\u0000\u0000HG\u0001\u0000\u0000"+ - "\u0000IJ\u0001\u0000\u0000\u0000JH\u0001\u0000\u0000\u0000JK\u0001\u0000"+ - "\u0000\u0000K\u000b\u0001\u0000\u0000\u0000LM\u0005\u0006\u0000\u0000"+ - "MN\u0003\u0010\b\u0000NO\u0005\f\u0000\u0000O\r\u0001\u0000\u0000\u0000"+ - "PQ\u0007\u0001\u0000\u0000QR\u0003\u0010\b\u0000RS\u0007\u0002\u0000\u0000"+ - "ST\u0006\u0007\uffff\uffff\u0000T\u000f\u0001\u0000\u0000\u0000UW\u0007"+ - "\u0003\u0000\u0000VU\u0001\u0000\u0000\u0000WX\u0001\u0000\u0000\u0000"+ - "XV\u0001\u0000\u0000\u0000XY\u0001\u0000\u0000\u0000Y\u0011\u0001\u0000"+ - "\u0000\u0000\u0006\u0017+3DJX"; + "\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0003"+ + "\u00011\b\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+ + "\u0002\u0001\u0002\u0003\u00029\b\u0002\u0001\u0002\u0001\u0002\u0001"+ + "\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001"+ + "\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0004\u0003\u0004K\b\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0005\u0005S\b\u0005\n\u0005"+ + "\f\u0005V\t\u0005\u0001\u0006\u0004\u0006Y\b\u0006\u000b\u0006\f\u0006"+ + "Z\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001"+ + "\b\u0001\b\u0001\b\u0001\t\u0004\tg\b\t\u000b\t\f\th\u0001\t\u0000\u0000"+ + "\n\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0000\u0004\u0001\u0000"+ + "\u0003\u0004\u0001\u0000\b\n\u0002\u0000\r\r\u0010\u0011\u0002\u0000\f"+ + "\u000f\u0011\u0012k\u0000\u0019\u0001\u0000\u0000\u0000\u00020\u0001\u0000"+ + "\u0000\u0000\u00042\u0001\u0000\u0000\u0000\u0006=\u0001\u0000\u0000\u0000"+ + "\bD\u0001\u0000\u0000\u0000\nT\u0001\u0000\u0000\u0000\fX\u0001\u0000"+ + "\u0000\u0000\u000e\\\u0001\u0000\u0000\u0000\u0010`\u0001\u0000\u0000"+ + "\u0000\u0012f\u0001\u0000\u0000\u0000\u0014\u0015\u0003\u0002\u0001\u0000"+ + "\u0015\u0016\u0006\u0000\uffff\uffff\u0000\u0016\u0018\u0001\u0000\u0000"+ + "\u0000\u0017\u0014\u0001\u0000\u0000\u0000\u0018\u001b\u0001\u0000\u0000"+ + "\u0000\u0019\u0017\u0001\u0000\u0000\u0000\u0019\u001a\u0001\u0000\u0000"+ + "\u0000\u001a\u001c\u0001\u0000\u0000\u0000\u001b\u0019\u0001\u0000\u0000"+ + "\u0000\u001c\u001d\u0005\u0000\u0000\u0001\u001d\u0001\u0001\u0000\u0000"+ + "\u0000\u001e\u001f\u0003\f\u0006\u0000\u001f \u0006\u0001\uffff\uffff"+ + "\u0000 1\u0001\u0000\u0000\u0000!\"\u0003\u000e\u0007\u0000\"#\u0006\u0001"+ + "\uffff\uffff\u0000#1\u0001\u0000\u0000\u0000$%\u0003\u0010\b\u0000%&\u0006"+ + "\u0001\uffff\uffff\u0000&1\u0001\u0000\u0000\u0000\'(\u0003\u0004\u0002"+ + "\u0000()\u0006\u0001\uffff\uffff\u0000)1\u0001\u0000\u0000\u0000*+\u0003"+ + "\u0006\u0003\u0000+,\u0006\u0001\uffff\uffff\u0000,1\u0001\u0000\u0000"+ + "\u0000-.\u0003\b\u0004\u0000./\u0006\u0001\uffff\uffff\u0000/1\u0001\u0000"+ + "\u0000\u00000\u001e\u0001\u0000\u0000\u00000!\u0001\u0000\u0000\u0000"+ + "0$\u0001\u0000\u0000\u00000\'\u0001\u0000\u0000\u00000*\u0001\u0000\u0000"+ + "\u00000-\u0001\u0000\u0000\u00001\u0003\u0001\u0000\u0000\u000023\u0007"+ + "\u0000\u0000\u000034\u0005\u0013\u0000\u000045\u0005\u0014\u0000\u0000"+ + "58\u0003\n\u0005\u000067\u0005\u0005\u0000\u000079\u0003\n\u0005\u0000"+ + "86\u0001\u0000\u0000\u000089\u0001\u0000\u0000\u00009:\u0001\u0000\u0000"+ + "\u0000:;\u0005\u0006\u0000\u0000;<\u0006\u0002\uffff\uffff\u0000<\u0005"+ + "\u0001\u0000\u0000\u0000=>\u0005\u0002\u0000\u0000>?\u0005\u0013\u0000"+ + "\u0000?@\u0005\u0014\u0000\u0000@A\u0003\n\u0005\u0000AB\u0005\u0006\u0000"+ + "\u0000BC\u0006\u0003\uffff\uffff\u0000C\u0007\u0001\u0000\u0000\u0000"+ + "DE\u0005\u0001\u0000\u0000EF\u0005\u0013\u0000\u0000FG\u0005\u0014\u0000"+ + "\u0000GJ\u0003\n\u0005\u0000HI\u0005\u0005\u0000\u0000IK\u0003\n\u0005"+ + "\u0000JH\u0001\u0000\u0000\u0000JK\u0001\u0000\u0000\u0000KL\u0001\u0000"+ + "\u0000\u0000LM\u0005\u0006\u0000\u0000MN\u0006\u0004\uffff\uffff\u0000"+ + "N\t\u0001\u0000\u0000\u0000OP\u0003\u0002\u0001\u0000PQ\u0006\u0005\uffff"+ + "\uffff\u0000QS\u0001\u0000\u0000\u0000RO\u0001\u0000\u0000\u0000SV\u0001"+ + "\u0000\u0000\u0000TR\u0001\u0000\u0000\u0000TU\u0001\u0000\u0000\u0000"+ + "U\u000b\u0001\u0000\u0000\u0000VT\u0001\u0000\u0000\u0000WY\u0005\u000b"+ + "\u0000\u0000XW\u0001\u0000\u0000\u0000YZ\u0001\u0000\u0000\u0000ZX\u0001"+ + "\u0000\u0000\u0000Z[\u0001\u0000\u0000\u0000[\r\u0001\u0000\u0000\u0000"+ + "\\]\u0005\u0007\u0000\u0000]^\u0003\u0012\t\u0000^_\u0005\r\u0000\u0000"+ + "_\u000f\u0001\u0000\u0000\u0000`a\u0007\u0001\u0000\u0000ab\u0003\u0012"+ + "\t\u0000bc\u0007\u0002\u0000\u0000cd\u0006\b\uffff\uffff\u0000d\u0011"+ + "\u0001\u0000\u0000\u0000eg\u0007\u0003\u0000\u0000fe\u0001\u0000\u0000"+ + "\u0000gh\u0001\u0000\u0000\u0000hf\u0001\u0000\u0000\u0000hi\u0001\u0000"+ + "\u0000\u0000i\u0013\u0001\u0000\u0000\u0000\u0007\u001908JTZh"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.tokens b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.tokens index 0a2b3e8acc..a55f6a0f05 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.tokens +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammar.tokens @@ -1,22 +1,23 @@ -STARTBLOCKWITH=1 -STARTBLOCKIF_LTRIM=2 -STARTBLOCKIF=3 -STARTBLOCKELSE=4 -STARTBLOCKEND=5 -STARTESCEXPR=6 -STARTEXPR=7 -STARTEXPR2_LTRIM=8 -STARTEXPR2=9 -TEXT=10 -LBRACE=11 -RBRACE=12 -EXPRESSION=13 -LBRACE2=14 -RBRACE2_RTRIM=15 -RBRACE2=16 -EXPRESSION2=17 -BLOCK_IF_CONTENT=18 -BLOCK_IF_RBRACE=19 -'{{-'=8 -'-}}'=15 -'}}'=19 +STARTBLOCKRANGE=1 +STARTBLOCKWITH=2 +STARTBLOCKIF_LTRIM=3 +STARTBLOCKIF=4 +STARTBLOCKELSE=5 +STARTBLOCKEND=6 +STARTESCEXPR=7 +STARTEXPR=8 +STARTEXPR2_LTRIM=9 +STARTEXPR2=10 +TEXT=11 +LBRACE=12 +RBRACE=13 +EXPRESSION=14 +LBRACE2=15 +RBRACE2_RTRIM=16 +RBRACE2=17 +EXPRESSION2=18 +BLOCK_IF_CONTENT=19 +BLOCK_IF_RBRACE=20 +'{{-'=9 +'-}}'=16 +'}}'=20 diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarBaseListener.java b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarBaseListener.java index 318521c2aa..3c0caea2b1 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarBaseListener.java +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarBaseListener.java @@ -5,6 +5,7 @@ import oap.template.tree.*; import oap.template.tree.BlockIfElement; import oap.template.tree.BlockWithElement; +import oap.template.tree.BlockRangeElement; import org.apache.commons.lang3.StringUtils; import java.lang.reflect.Method; @@ -72,6 +73,18 @@ public class TemplateGrammarBaseListener implements TemplateGrammarListener { *

The default implementation does nothing.

*/ @Override public void exitBlockWithElement(TemplateGrammar.BlockWithElementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void enterBlockRangeElement(TemplateGrammar.BlockRangeElementContext ctx) { } + /** + * {@inheritDoc} + * + *

The default implementation does nothing.

+ */ + @Override public void exitBlockRangeElement(TemplateGrammar.BlockRangeElementContext ctx) { } /** * {@inheritDoc} * diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.interp b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.interp index de3a898332..55889a542d 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.interp +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.interp @@ -6,6 +6,7 @@ null 'else' 'end' 'with' +null '$' null null @@ -45,6 +46,7 @@ THEN ELSE END WITH +VAR_ID ROOT BLOCK_COMMENT HORZ_WS @@ -100,4 +102,4 @@ mathOperation atn: -[4, 1, 36, 298, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 1, 0, 3, 0, 42, 8, 0, 1, 0, 3, 0, 45, 8, 0, 1, 0, 1, 0, 1, 0, 3, 0, 50, 8, 0, 1, 0, 3, 0, 53, 8, 0, 1, 0, 3, 0, 56, 8, 0, 1, 0, 1, 0, 3, 0, 60, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 70, 8, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 108, 8, 6, 1, 7, 3, 7, 111, 8, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 119, 8, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 130, 8, 9, 10, 9, 12, 9, 133, 9, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 149, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 158, 8, 11, 10, 11, 12, 11, 161, 9, 11, 1, 11, 3, 11, 164, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 174, 8, 12, 10, 12, 12, 12, 177, 9, 12, 1, 12, 3, 12, 180, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 187, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 194, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 205, 8, 12, 10, 12, 12, 12, 208, 9, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 214, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 224, 8, 12, 10, 12, 12, 12, 227, 9, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 233, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 238, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 245, 8, 12, 1, 13, 1, 13, 1, 13, 3, 13, 250, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 257, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 270, 8, 15, 10, 15, 12, 15, 273, 9, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 285, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 3, 18, 294, 8, 18, 1, 19, 1, 19, 1, 19, 0, 0, 20, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 0, 1, 1, 0, 21, 25, 323, 0, 41, 1, 0, 0, 0, 2, 63, 1, 0, 0, 0, 4, 74, 1, 0, 0, 0, 6, 82, 1, 0, 0, 0, 8, 86, 1, 0, 0, 0, 10, 89, 1, 0, 0, 0, 12, 107, 1, 0, 0, 0, 14, 110, 1, 0, 0, 0, 16, 114, 1, 0, 0, 0, 18, 123, 1, 0, 0, 0, 20, 148, 1, 0, 0, 0, 22, 163, 1, 0, 0, 0, 24, 244, 1, 0, 0, 0, 26, 256, 1, 0, 0, 0, 28, 258, 1, 0, 0, 0, 30, 263, 1, 0, 0, 0, 32, 284, 1, 0, 0, 0, 34, 286, 1, 0, 0, 0, 36, 293, 1, 0, 0, 0, 38, 295, 1, 0, 0, 0, 40, 42, 5, 8, 0, 0, 41, 40, 1, 0, 0, 0, 41, 42, 1, 0, 0, 0, 42, 44, 1, 0, 0, 0, 43, 45, 5, 32, 0, 0, 44, 43, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 49, 1, 0, 0, 0, 46, 50, 3, 2, 1, 0, 47, 50, 3, 4, 2, 0, 48, 50, 3, 6, 3, 0, 49, 46, 1, 0, 0, 0, 49, 47, 1, 0, 0, 0, 49, 48, 1, 0, 0, 0, 50, 52, 1, 0, 0, 0, 51, 53, 3, 10, 5, 0, 52, 51, 1, 0, 0, 0, 52, 53, 1, 0, 0, 0, 53, 55, 1, 0, 0, 0, 54, 56, 3, 16, 8, 0, 55, 54, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 59, 1, 0, 0, 0, 57, 58, 5, 2, 0, 0, 58, 60, 3, 8, 4, 0, 59, 57, 1, 0, 0, 0, 59, 60, 1, 0, 0, 0, 60, 61, 1, 0, 0, 0, 61, 62, 6, 0, -1, 0, 62, 1, 1, 0, 0, 0, 63, 64, 5, 2, 0, 0, 64, 65, 3, 8, 4, 0, 65, 66, 5, 3, 0, 0, 66, 69, 3, 24, 12, 0, 67, 68, 5, 4, 0, 0, 68, 70, 3, 24, 12, 0, 69, 67, 1, 0, 0, 0, 69, 70, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 72, 5, 5, 0, 0, 72, 73, 6, 1, -1, 0, 73, 3, 1, 0, 0, 0, 74, 75, 5, 6, 0, 0, 75, 76, 5, 14, 0, 0, 76, 77, 3, 24, 12, 0, 77, 78, 5, 15, 0, 0, 78, 79, 3, 6, 3, 0, 79, 80, 5, 5, 0, 0, 80, 81, 6, 2, -1, 0, 81, 5, 1, 0, 0, 0, 82, 83, 3, 24, 12, 0, 83, 84, 3, 22, 11, 0, 84, 85, 6, 3, -1, 0, 85, 7, 1, 0, 0, 0, 86, 87, 3, 24, 12, 0, 87, 88, 6, 4, -1, 0, 88, 9, 1, 0, 0, 0, 89, 90, 5, 18, 0, 0, 90, 91, 3, 12, 6, 0, 91, 92, 6, 5, -1, 0, 92, 11, 1, 0, 0, 0, 93, 94, 5, 27, 0, 0, 94, 108, 6, 6, -1, 0, 95, 96, 5, 26, 0, 0, 96, 108, 6, 6, -1, 0, 97, 98, 3, 14, 7, 0, 98, 99, 6, 6, -1, 0, 99, 108, 1, 0, 0, 0, 100, 101, 5, 29, 0, 0, 101, 108, 6, 6, -1, 0, 102, 103, 5, 30, 0, 0, 103, 108, 6, 6, -1, 0, 104, 105, 5, 16, 0, 0, 105, 106, 5, 17, 0, 0, 106, 108, 6, 6, -1, 0, 107, 93, 1, 0, 0, 0, 107, 95, 1, 0, 0, 0, 107, 97, 1, 0, 0, 0, 107, 100, 1, 0, 0, 0, 107, 102, 1, 0, 0, 0, 107, 104, 1, 0, 0, 0, 108, 13, 1, 0, 0, 0, 109, 111, 5, 25, 0, 0, 110, 109, 1, 0, 0, 0, 110, 111, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 113, 5, 28, 0, 0, 113, 15, 1, 0, 0, 0, 114, 115, 5, 19, 0, 0, 115, 116, 5, 31, 0, 0, 116, 118, 5, 14, 0, 0, 117, 119, 3, 18, 9, 0, 118, 117, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 5, 15, 0, 0, 121, 122, 6, 8, -1, 0, 122, 17, 1, 0, 0, 0, 123, 124, 3, 20, 10, 0, 124, 131, 6, 9, -1, 0, 125, 126, 5, 20, 0, 0, 126, 127, 3, 20, 10, 0, 127, 128, 6, 9, -1, 0, 128, 130, 1, 0, 0, 0, 129, 125, 1, 0, 0, 0, 130, 133, 1, 0, 0, 0, 131, 129, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 19, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 134, 135, 5, 28, 0, 0, 135, 149, 6, 10, -1, 0, 136, 137, 5, 25, 0, 0, 137, 138, 5, 28, 0, 0, 138, 149, 6, 10, -1, 0, 139, 140, 5, 29, 0, 0, 140, 149, 6, 10, -1, 0, 141, 142, 5, 25, 0, 0, 142, 143, 5, 29, 0, 0, 143, 149, 6, 10, -1, 0, 144, 145, 5, 27, 0, 0, 145, 149, 6, 10, -1, 0, 146, 147, 5, 26, 0, 0, 147, 149, 6, 10, -1, 0, 148, 134, 1, 0, 0, 0, 148, 136, 1, 0, 0, 0, 148, 139, 1, 0, 0, 0, 148, 141, 1, 0, 0, 0, 148, 144, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 149, 21, 1, 0, 0, 0, 150, 151, 5, 1, 0, 0, 151, 152, 3, 24, 12, 0, 152, 159, 6, 11, -1, 0, 153, 154, 5, 1, 0, 0, 154, 155, 3, 24, 12, 0, 155, 156, 6, 11, -1, 0, 156, 158, 1, 0, 0, 0, 157, 153, 1, 0, 0, 0, 158, 161, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 164, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 162, 164, 1, 0, 0, 0, 163, 150, 1, 0, 0, 0, 163, 162, 1, 0, 0, 0, 164, 23, 1, 0, 0, 0, 165, 166, 5, 7, 0, 0, 166, 167, 5, 13, 0, 0, 167, 168, 3, 26, 13, 0, 168, 175, 6, 12, -1, 0, 169, 170, 5, 13, 0, 0, 170, 171, 3, 26, 13, 0, 171, 172, 6, 12, -1, 0, 172, 174, 1, 0, 0, 0, 173, 169, 1, 0, 0, 0, 174, 177, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 179, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 178, 180, 3, 34, 17, 0, 179, 178, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 182, 6, 12, -1, 0, 182, 245, 1, 0, 0, 0, 183, 184, 3, 26, 13, 0, 184, 186, 6, 12, -1, 0, 185, 187, 3, 34, 17, 0, 186, 185, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 189, 6, 12, -1, 0, 189, 245, 1, 0, 0, 0, 190, 191, 3, 26, 13, 0, 191, 193, 6, 12, -1, 0, 192, 194, 5, 13, 0, 0, 193, 192, 1, 0, 0, 0, 193, 194, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195, 196, 3, 28, 14, 0, 196, 197, 6, 12, -1, 0, 197, 245, 1, 0, 0, 0, 198, 199, 3, 26, 13, 0, 199, 206, 6, 12, -1, 0, 200, 201, 5, 13, 0, 0, 201, 202, 3, 26, 13, 0, 202, 203, 6, 12, -1, 0, 203, 205, 1, 0, 0, 0, 204, 200, 1, 0, 0, 0, 205, 208, 1, 0, 0, 0, 206, 204, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 209, 1, 0, 0, 0, 208, 206, 1, 0, 0, 0, 209, 210, 5, 13, 0, 0, 210, 211, 3, 26, 13, 0, 211, 213, 6, 12, -1, 0, 212, 214, 3, 34, 17, 0, 213, 212, 1, 0, 0, 0, 213, 214, 1, 0, 0, 0, 214, 215, 1, 0, 0, 0, 215, 216, 6, 12, -1, 0, 216, 245, 1, 0, 0, 0, 217, 218, 3, 26, 13, 0, 218, 225, 6, 12, -1, 0, 219, 220, 5, 13, 0, 0, 220, 221, 3, 26, 13, 0, 221, 222, 6, 12, -1, 0, 222, 224, 1, 0, 0, 0, 223, 219, 1, 0, 0, 0, 224, 227, 1, 0, 0, 0, 225, 223, 1, 0, 0, 0, 225, 226, 1, 0, 0, 0, 226, 228, 1, 0, 0, 0, 227, 225, 1, 0, 0, 0, 228, 229, 5, 13, 0, 0, 229, 230, 3, 26, 13, 0, 230, 232, 6, 12, -1, 0, 231, 233, 5, 13, 0, 0, 232, 231, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 235, 3, 28, 14, 0, 235, 237, 6, 12, -1, 0, 236, 238, 3, 34, 17, 0, 237, 236, 1, 0, 0, 0, 237, 238, 1, 0, 0, 0, 238, 239, 1, 0, 0, 0, 239, 240, 6, 12, -1, 0, 240, 245, 1, 0, 0, 0, 241, 242, 3, 28, 14, 0, 242, 243, 6, 12, -1, 0, 243, 245, 1, 0, 0, 0, 244, 165, 1, 0, 0, 0, 244, 183, 1, 0, 0, 0, 244, 190, 1, 0, 0, 0, 244, 198, 1, 0, 0, 0, 244, 217, 1, 0, 0, 0, 244, 241, 1, 0, 0, 0, 245, 25, 1, 0, 0, 0, 246, 247, 5, 31, 0, 0, 247, 249, 5, 14, 0, 0, 248, 250, 3, 18, 9, 0, 249, 248, 1, 0, 0, 0, 249, 250, 1, 0, 0, 0, 250, 251, 1, 0, 0, 0, 251, 252, 5, 15, 0, 0, 252, 253, 1, 0, 0, 0, 253, 257, 6, 13, -1, 0, 254, 255, 5, 31, 0, 0, 255, 257, 6, 13, -1, 0, 256, 246, 1, 0, 0, 0, 256, 254, 1, 0, 0, 0, 257, 27, 1, 0, 0, 0, 258, 259, 5, 11, 0, 0, 259, 260, 3, 30, 15, 0, 260, 261, 6, 14, -1, 0, 261, 262, 5, 12, 0, 0, 262, 29, 1, 0, 0, 0, 263, 264, 3, 32, 16, 0, 264, 271, 6, 15, -1, 0, 265, 266, 5, 20, 0, 0, 266, 267, 3, 32, 16, 0, 267, 268, 6, 15, -1, 0, 268, 270, 1, 0, 0, 0, 269, 265, 1, 0, 0, 0, 270, 273, 1, 0, 0, 0, 271, 269, 1, 0, 0, 0, 271, 272, 1, 0, 0, 0, 272, 31, 1, 0, 0, 0, 273, 271, 1, 0, 0, 0, 274, 275, 5, 31, 0, 0, 275, 285, 6, 16, -1, 0, 276, 277, 5, 26, 0, 0, 277, 285, 6, 16, -1, 0, 278, 279, 5, 27, 0, 0, 279, 285, 6, 16, -1, 0, 280, 281, 5, 28, 0, 0, 281, 285, 6, 16, -1, 0, 282, 283, 5, 29, 0, 0, 283, 285, 6, 16, -1, 0, 284, 274, 1, 0, 0, 0, 284, 276, 1, 0, 0, 0, 284, 278, 1, 0, 0, 0, 284, 280, 1, 0, 0, 0, 284, 282, 1, 0, 0, 0, 285, 33, 1, 0, 0, 0, 286, 287, 3, 38, 19, 0, 287, 288, 3, 36, 18, 0, 288, 289, 6, 17, -1, 0, 289, 35, 1, 0, 0, 0, 290, 294, 1, 0, 0, 0, 291, 294, 5, 28, 0, 0, 292, 294, 5, 29, 0, 0, 293, 290, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 292, 1, 0, 0, 0, 294, 37, 1, 0, 0, 0, 295, 296, 7, 0, 0, 0, 296, 39, 1, 0, 0, 0, 29, 41, 44, 49, 52, 55, 59, 69, 107, 110, 118, 131, 148, 159, 163, 175, 179, 186, 193, 206, 213, 225, 232, 237, 244, 249, 256, 271, 284, 293] \ No newline at end of file +[4, 1, 37, 313, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 1, 0, 3, 0, 42, 8, 0, 1, 0, 3, 0, 45, 8, 0, 1, 0, 1, 0, 1, 0, 3, 0, 50, 8, 0, 1, 0, 3, 0, 53, 8, 0, 1, 0, 3, 0, 56, 8, 0, 1, 0, 1, 0, 3, 0, 60, 8, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 70, 8, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 108, 8, 6, 1, 7, 3, 7, 111, 8, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 119, 8, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 130, 8, 9, 10, 9, 12, 9, 133, 9, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 149, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 158, 8, 11, 10, 11, 12, 11, 161, 9, 11, 1, 11, 3, 11, 164, 8, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 174, 8, 12, 10, 12, 12, 12, 177, 9, 12, 1, 12, 3, 12, 180, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 190, 8, 12, 10, 12, 12, 12, 193, 9, 12, 1, 12, 3, 12, 196, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 202, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 209, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 220, 8, 12, 10, 12, 12, 12, 223, 9, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 229, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 239, 8, 12, 10, 12, 12, 12, 242, 9, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 248, 8, 12, 1, 12, 1, 12, 1, 12, 3, 12, 253, 8, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 260, 8, 12, 1, 13, 1, 13, 1, 13, 3, 13, 265, 8, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 272, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 5, 15, 285, 8, 15, 10, 15, 12, 15, 288, 9, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 300, 8, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 3, 18, 309, 8, 18, 1, 19, 1, 19, 1, 19, 0, 0, 20, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 0, 1, 1, 0, 22, 26, 341, 0, 41, 1, 0, 0, 0, 2, 63, 1, 0, 0, 0, 4, 74, 1, 0, 0, 0, 6, 82, 1, 0, 0, 0, 8, 86, 1, 0, 0, 0, 10, 89, 1, 0, 0, 0, 12, 107, 1, 0, 0, 0, 14, 110, 1, 0, 0, 0, 16, 114, 1, 0, 0, 0, 18, 123, 1, 0, 0, 0, 20, 148, 1, 0, 0, 0, 22, 163, 1, 0, 0, 0, 24, 259, 1, 0, 0, 0, 26, 271, 1, 0, 0, 0, 28, 273, 1, 0, 0, 0, 30, 278, 1, 0, 0, 0, 32, 299, 1, 0, 0, 0, 34, 301, 1, 0, 0, 0, 36, 308, 1, 0, 0, 0, 38, 310, 1, 0, 0, 0, 40, 42, 5, 9, 0, 0, 41, 40, 1, 0, 0, 0, 41, 42, 1, 0, 0, 0, 42, 44, 1, 0, 0, 0, 43, 45, 5, 33, 0, 0, 44, 43, 1, 0, 0, 0, 44, 45, 1, 0, 0, 0, 45, 49, 1, 0, 0, 0, 46, 50, 3, 2, 1, 0, 47, 50, 3, 4, 2, 0, 48, 50, 3, 6, 3, 0, 49, 46, 1, 0, 0, 0, 49, 47, 1, 0, 0, 0, 49, 48, 1, 0, 0, 0, 50, 52, 1, 0, 0, 0, 51, 53, 3, 10, 5, 0, 52, 51, 1, 0, 0, 0, 52, 53, 1, 0, 0, 0, 53, 55, 1, 0, 0, 0, 54, 56, 3, 16, 8, 0, 55, 54, 1, 0, 0, 0, 55, 56, 1, 0, 0, 0, 56, 59, 1, 0, 0, 0, 57, 58, 5, 2, 0, 0, 58, 60, 3, 8, 4, 0, 59, 57, 1, 0, 0, 0, 59, 60, 1, 0, 0, 0, 60, 61, 1, 0, 0, 0, 61, 62, 6, 0, -1, 0, 62, 1, 1, 0, 0, 0, 63, 64, 5, 2, 0, 0, 64, 65, 3, 8, 4, 0, 65, 66, 5, 3, 0, 0, 66, 69, 3, 24, 12, 0, 67, 68, 5, 4, 0, 0, 68, 70, 3, 24, 12, 0, 69, 67, 1, 0, 0, 0, 69, 70, 1, 0, 0, 0, 70, 71, 1, 0, 0, 0, 71, 72, 5, 5, 0, 0, 72, 73, 6, 1, -1, 0, 73, 3, 1, 0, 0, 0, 74, 75, 5, 6, 0, 0, 75, 76, 5, 15, 0, 0, 76, 77, 3, 24, 12, 0, 77, 78, 5, 16, 0, 0, 78, 79, 3, 6, 3, 0, 79, 80, 5, 5, 0, 0, 80, 81, 6, 2, -1, 0, 81, 5, 1, 0, 0, 0, 82, 83, 3, 24, 12, 0, 83, 84, 3, 22, 11, 0, 84, 85, 6, 3, -1, 0, 85, 7, 1, 0, 0, 0, 86, 87, 3, 24, 12, 0, 87, 88, 6, 4, -1, 0, 88, 9, 1, 0, 0, 0, 89, 90, 5, 19, 0, 0, 90, 91, 3, 12, 6, 0, 91, 92, 6, 5, -1, 0, 92, 11, 1, 0, 0, 0, 93, 94, 5, 28, 0, 0, 94, 108, 6, 6, -1, 0, 95, 96, 5, 27, 0, 0, 96, 108, 6, 6, -1, 0, 97, 98, 3, 14, 7, 0, 98, 99, 6, 6, -1, 0, 99, 108, 1, 0, 0, 0, 100, 101, 5, 30, 0, 0, 101, 108, 6, 6, -1, 0, 102, 103, 5, 31, 0, 0, 103, 108, 6, 6, -1, 0, 104, 105, 5, 17, 0, 0, 105, 106, 5, 18, 0, 0, 106, 108, 6, 6, -1, 0, 107, 93, 1, 0, 0, 0, 107, 95, 1, 0, 0, 0, 107, 97, 1, 0, 0, 0, 107, 100, 1, 0, 0, 0, 107, 102, 1, 0, 0, 0, 107, 104, 1, 0, 0, 0, 108, 13, 1, 0, 0, 0, 109, 111, 5, 26, 0, 0, 110, 109, 1, 0, 0, 0, 110, 111, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 113, 5, 29, 0, 0, 113, 15, 1, 0, 0, 0, 114, 115, 5, 20, 0, 0, 115, 116, 5, 32, 0, 0, 116, 118, 5, 15, 0, 0, 117, 119, 3, 18, 9, 0, 118, 117, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 121, 5, 16, 0, 0, 121, 122, 6, 8, -1, 0, 122, 17, 1, 0, 0, 0, 123, 124, 3, 20, 10, 0, 124, 131, 6, 9, -1, 0, 125, 126, 5, 21, 0, 0, 126, 127, 3, 20, 10, 0, 127, 128, 6, 9, -1, 0, 128, 130, 1, 0, 0, 0, 129, 125, 1, 0, 0, 0, 130, 133, 1, 0, 0, 0, 131, 129, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 19, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 134, 135, 5, 29, 0, 0, 135, 149, 6, 10, -1, 0, 136, 137, 5, 26, 0, 0, 137, 138, 5, 29, 0, 0, 138, 149, 6, 10, -1, 0, 139, 140, 5, 30, 0, 0, 140, 149, 6, 10, -1, 0, 141, 142, 5, 26, 0, 0, 142, 143, 5, 30, 0, 0, 143, 149, 6, 10, -1, 0, 144, 145, 5, 28, 0, 0, 145, 149, 6, 10, -1, 0, 146, 147, 5, 27, 0, 0, 147, 149, 6, 10, -1, 0, 148, 134, 1, 0, 0, 0, 148, 136, 1, 0, 0, 0, 148, 139, 1, 0, 0, 0, 148, 141, 1, 0, 0, 0, 148, 144, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 149, 21, 1, 0, 0, 0, 150, 151, 5, 1, 0, 0, 151, 152, 3, 24, 12, 0, 152, 159, 6, 11, -1, 0, 153, 154, 5, 1, 0, 0, 154, 155, 3, 24, 12, 0, 155, 156, 6, 11, -1, 0, 156, 158, 1, 0, 0, 0, 157, 153, 1, 0, 0, 0, 158, 161, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 164, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 162, 164, 1, 0, 0, 0, 163, 150, 1, 0, 0, 0, 163, 162, 1, 0, 0, 0, 164, 23, 1, 0, 0, 0, 165, 166, 5, 8, 0, 0, 166, 167, 5, 14, 0, 0, 167, 168, 3, 26, 13, 0, 168, 175, 6, 12, -1, 0, 169, 170, 5, 14, 0, 0, 170, 171, 3, 26, 13, 0, 171, 172, 6, 12, -1, 0, 172, 174, 1, 0, 0, 0, 173, 169, 1, 0, 0, 0, 174, 177, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 175, 176, 1, 0, 0, 0, 176, 179, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 178, 180, 3, 34, 17, 0, 179, 178, 1, 0, 0, 0, 179, 180, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 181, 182, 6, 12, -1, 0, 182, 260, 1, 0, 0, 0, 183, 184, 5, 7, 0, 0, 184, 191, 6, 12, -1, 0, 185, 186, 5, 14, 0, 0, 186, 187, 3, 26, 13, 0, 187, 188, 6, 12, -1, 0, 188, 190, 1, 0, 0, 0, 189, 185, 1, 0, 0, 0, 190, 193, 1, 0, 0, 0, 191, 189, 1, 0, 0, 0, 191, 192, 1, 0, 0, 0, 192, 195, 1, 0, 0, 0, 193, 191, 1, 0, 0, 0, 194, 196, 3, 34, 17, 0, 195, 194, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 260, 6, 12, -1, 0, 198, 199, 3, 26, 13, 0, 199, 201, 6, 12, -1, 0, 200, 202, 3, 34, 17, 0, 201, 200, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 204, 6, 12, -1, 0, 204, 260, 1, 0, 0, 0, 205, 206, 3, 26, 13, 0, 206, 208, 6, 12, -1, 0, 207, 209, 5, 14, 0, 0, 208, 207, 1, 0, 0, 0, 208, 209, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 211, 3, 28, 14, 0, 211, 212, 6, 12, -1, 0, 212, 260, 1, 0, 0, 0, 213, 214, 3, 26, 13, 0, 214, 221, 6, 12, -1, 0, 215, 216, 5, 14, 0, 0, 216, 217, 3, 26, 13, 0, 217, 218, 6, 12, -1, 0, 218, 220, 1, 0, 0, 0, 219, 215, 1, 0, 0, 0, 220, 223, 1, 0, 0, 0, 221, 219, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 224, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 224, 225, 5, 14, 0, 0, 225, 226, 3, 26, 13, 0, 226, 228, 6, 12, -1, 0, 227, 229, 3, 34, 17, 0, 228, 227, 1, 0, 0, 0, 228, 229, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 231, 6, 12, -1, 0, 231, 260, 1, 0, 0, 0, 232, 233, 3, 26, 13, 0, 233, 240, 6, 12, -1, 0, 234, 235, 5, 14, 0, 0, 235, 236, 3, 26, 13, 0, 236, 237, 6, 12, -1, 0, 237, 239, 1, 0, 0, 0, 238, 234, 1, 0, 0, 0, 239, 242, 1, 0, 0, 0, 240, 238, 1, 0, 0, 0, 240, 241, 1, 0, 0, 0, 241, 243, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 243, 244, 5, 14, 0, 0, 244, 245, 3, 26, 13, 0, 245, 247, 6, 12, -1, 0, 246, 248, 5, 14, 0, 0, 247, 246, 1, 0, 0, 0, 247, 248, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 250, 3, 28, 14, 0, 250, 252, 6, 12, -1, 0, 251, 253, 3, 34, 17, 0, 252, 251, 1, 0, 0, 0, 252, 253, 1, 0, 0, 0, 253, 254, 1, 0, 0, 0, 254, 255, 6, 12, -1, 0, 255, 260, 1, 0, 0, 0, 256, 257, 3, 28, 14, 0, 257, 258, 6, 12, -1, 0, 258, 260, 1, 0, 0, 0, 259, 165, 1, 0, 0, 0, 259, 183, 1, 0, 0, 0, 259, 198, 1, 0, 0, 0, 259, 205, 1, 0, 0, 0, 259, 213, 1, 0, 0, 0, 259, 232, 1, 0, 0, 0, 259, 256, 1, 0, 0, 0, 260, 25, 1, 0, 0, 0, 261, 262, 5, 32, 0, 0, 262, 264, 5, 15, 0, 0, 263, 265, 3, 18, 9, 0, 264, 263, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 267, 5, 16, 0, 0, 267, 268, 1, 0, 0, 0, 268, 272, 6, 13, -1, 0, 269, 270, 5, 32, 0, 0, 270, 272, 6, 13, -1, 0, 271, 261, 1, 0, 0, 0, 271, 269, 1, 0, 0, 0, 272, 27, 1, 0, 0, 0, 273, 274, 5, 12, 0, 0, 274, 275, 3, 30, 15, 0, 275, 276, 6, 14, -1, 0, 276, 277, 5, 13, 0, 0, 277, 29, 1, 0, 0, 0, 278, 279, 3, 32, 16, 0, 279, 286, 6, 15, -1, 0, 280, 281, 5, 21, 0, 0, 281, 282, 3, 32, 16, 0, 282, 283, 6, 15, -1, 0, 283, 285, 1, 0, 0, 0, 284, 280, 1, 0, 0, 0, 285, 288, 1, 0, 0, 0, 286, 284, 1, 0, 0, 0, 286, 287, 1, 0, 0, 0, 287, 31, 1, 0, 0, 0, 288, 286, 1, 0, 0, 0, 289, 290, 5, 32, 0, 0, 290, 300, 6, 16, -1, 0, 291, 292, 5, 27, 0, 0, 292, 300, 6, 16, -1, 0, 293, 294, 5, 28, 0, 0, 294, 300, 6, 16, -1, 0, 295, 296, 5, 29, 0, 0, 296, 300, 6, 16, -1, 0, 297, 298, 5, 30, 0, 0, 298, 300, 6, 16, -1, 0, 299, 289, 1, 0, 0, 0, 299, 291, 1, 0, 0, 0, 299, 293, 1, 0, 0, 0, 299, 295, 1, 0, 0, 0, 299, 297, 1, 0, 0, 0, 300, 33, 1, 0, 0, 0, 301, 302, 3, 38, 19, 0, 302, 303, 3, 36, 18, 0, 303, 304, 6, 17, -1, 0, 304, 35, 1, 0, 0, 0, 305, 309, 1, 0, 0, 0, 306, 309, 5, 29, 0, 0, 307, 309, 5, 30, 0, 0, 308, 305, 1, 0, 0, 0, 308, 306, 1, 0, 0, 0, 308, 307, 1, 0, 0, 0, 309, 37, 1, 0, 0, 0, 310, 311, 7, 0, 0, 0, 311, 39, 1, 0, 0, 0, 31, 41, 44, 49, 52, 55, 59, 69, 107, 110, 118, 131, 148, 159, 163, 175, 179, 191, 195, 201, 208, 221, 228, 240, 247, 252, 259, 264, 271, 286, 299, 308] \ No newline at end of file diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.java b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.java index 6837cdee01..4256e92ec8 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.java +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.java @@ -31,12 +31,12 @@ public class TemplateGrammarExpression extends TemplateGrammarAdaptor { protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int - DEFAULT=1, IF=2, THEN=3, ELSE=4, END=5, WITH=6, ROOT=7, BLOCK_COMMENT=8, - HORZ_WS=9, VERT_WS=10, LBRACE=11, RBRACE=12, DOT=13, LPAREN=14, RPAREN=15, - LBRACK=16, RBRACK=17, DQUESTION=18, SEMI=19, COMMA=20, STAR=21, SLASH=22, - PERCENT=23, PLUS=24, MINUS=25, DSTRING=26, SSTRING=27, DECDIGITS=28, FLOAT=29, - BOOLEAN=30, ID=31, CAST_TYPE=32, ERR_CHAR=33, C_HORZ_WS=34, C_VERT_WS=35, - CERR_CHAR=36; + DEFAULT=1, IF=2, THEN=3, ELSE=4, END=5, WITH=6, VAR_ID=7, ROOT=8, BLOCK_COMMENT=9, + HORZ_WS=10, VERT_WS=11, LBRACE=12, RBRACE=13, DOT=14, LPAREN=15, RPAREN=16, + LBRACK=17, RBRACK=18, DQUESTION=19, SEMI=20, COMMA=21, STAR=22, SLASH=23, + PERCENT=24, PLUS=25, MINUS=26, DSTRING=27, SSTRING=28, DECDIGITS=29, FLOAT=30, + BOOLEAN=31, ID=32, CAST_TYPE=33, ERR_CHAR=34, C_HORZ_WS=35, C_VERT_WS=36, + CERR_CHAR=37; public static final int RULE_expression = 0, RULE_ifCode = 1, RULE_withCode = 2, RULE_exprsCode = 3, RULE_ifCondition = 4, RULE_defaultValue = 5, RULE_defaultValueType = 6, @@ -55,17 +55,17 @@ private static String[] makeRuleNames() { private static String[] makeLiteralNames() { return new String[] { - null, null, "'if'", "'then'", "'else'", "'end'", "'with'", "'$'" + null, null, "'if'", "'then'", "'else'", "'end'", "'with'", null, "'$'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); private static String[] makeSymbolicNames() { return new String[] { - null, "DEFAULT", "IF", "THEN", "ELSE", "END", "WITH", "ROOT", "BLOCK_COMMENT", - "HORZ_WS", "VERT_WS", "LBRACE", "RBRACE", "DOT", "LPAREN", "RPAREN", - "LBRACK", "RBRACK", "DQUESTION", "SEMI", "COMMA", "STAR", "SLASH", "PERCENT", - "PLUS", "MINUS", "DSTRING", "SSTRING", "DECDIGITS", "FLOAT", "BOOLEAN", - "ID", "CAST_TYPE", "ERR_CHAR", "C_HORZ_WS", "C_VERT_WS", "CERR_CHAR" + null, "DEFAULT", "IF", "THEN", "ELSE", "END", "WITH", "VAR_ID", "ROOT", + "BLOCK_COMMENT", "HORZ_WS", "VERT_WS", "LBRACE", "RBRACE", "DOT", "LPAREN", + "RPAREN", "LBRACK", "RBRACK", "DQUESTION", "SEMI", "COMMA", "STAR", "SLASH", + "PERCENT", "PLUS", "MINUS", "DSTRING", "SSTRING", "DECDIGITS", "FLOAT", + "BOOLEAN", "ID", "CAST_TYPE", "ERR_CHAR", "C_HORZ_WS", "C_VERT_WS", "CERR_CHAR" }; } private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); @@ -215,6 +215,7 @@ public final ExpressionContext expression() throws RecognitionException { ((ExpressionContext)_localctx).withCode = withCode(); } break; + case VAR_ID: case ROOT: case LBRACE: case ID: @@ -759,7 +760,7 @@ public final FunctionContext function() throws RecognitionException { setState(118); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1040187392L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2080374784L) != 0)) { { setState(117); ((FunctionContext)_localctx).functionArgs = functionArgs(); @@ -1042,6 +1043,7 @@ public static class ExprsContext extends ParserRuleContext { public Exprs ret = new Exprs(); public ExprContext expr; public MathContext math; + public Token VAR_ID; public ConcatenationContext concatenation; public TerminalNode ROOT() { return getToken(TemplateGrammarExpression.ROOT, 0); } public List DOT() { return getTokens(TemplateGrammarExpression.DOT); } @@ -1057,6 +1059,7 @@ public ExprContext expr(int i) { public MathContext math() { return getRuleContext(MathContext.class,0); } + public TerminalNode VAR_ID() { return getToken(TemplateGrammarExpression.VAR_ID, 0); } public ConcatenationContext concatenation() { return getRuleContext(ConcatenationContext.class,0); } @@ -1080,9 +1083,9 @@ public final ExprsContext exprs() throws RecognitionException { int _la; try { int _alt; - setState(244); + setState(259); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,23,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { @@ -1113,7 +1116,7 @@ public final ExprsContext exprs() throws RecognitionException { setState(179); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 65011712L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 130023424L) != 0)) { { setState(178); ((ExprsContext)_localctx).math = math(); @@ -1127,14 +1130,31 @@ public final ExprsContext exprs() throws RecognitionException { enterOuterAlt(_localctx, 2); { setState(183); - ((ExprsContext)_localctx).expr = expr(); - _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); - setState(186); + ((ExprsContext)_localctx).VAR_ID = match(VAR_ID); + _localctx.ret.varName = (((ExprsContext)_localctx).VAR_ID!=null?((ExprsContext)_localctx).VAR_ID.getText():null).substring( 1 ); + setState(191); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 65011712L) != 0)) { + while (_la==DOT) { + { { setState(185); + match(DOT); + setState(186); + ((ExprsContext)_localctx).expr = expr(); + _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); + } + } + setState(193); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(195); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 130023424L) != 0)) { + { + setState(194); ((ExprsContext)_localctx).math = math(); } } @@ -1145,40 +1165,59 @@ public final ExprsContext exprs() throws RecognitionException { case 3: enterOuterAlt(_localctx, 3); { - setState(190); + setState(198); ((ExprsContext)_localctx).expr = expr(); _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); - setState(193); + setState(201); + _errHandler.sync(this); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 130023424L) != 0)) { + { + setState(200); + ((ExprsContext)_localctx).math = math(); + } + } + + if( ((ExprsContext)_localctx).math != null ) _localctx.ret.math = ((ExprsContext)_localctx).math.ret; + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(205); + ((ExprsContext)_localctx).expr = expr(); + _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); + setState(208); _errHandler.sync(this); _la = _input.LA(1); if (_la==DOT) { { - setState(192); + setState(207); match(DOT); } } - setState(195); + setState(210); ((ExprsContext)_localctx).concatenation = concatenation(); _localctx.ret.concatenation = ((ExprsContext)_localctx).concatenation.ret; } break; - case 4: - enterOuterAlt(_localctx, 4); + case 5: + enterOuterAlt(_localctx, 5); { - setState(198); + setState(213); ((ExprsContext)_localctx).expr = expr(); _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); - setState(206); + setState(221); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,18,_ctx); + _alt = getInterpreter().adaptivePredict(_input,20,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(200); + setState(215); match(DOT); - setState(201); + setState(216); ((ExprsContext)_localctx).expr = expr(); _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); @@ -1186,21 +1225,21 @@ public final ExprsContext exprs() throws RecognitionException { } } } - setState(208); + setState(223); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,18,_ctx); + _alt = getInterpreter().adaptivePredict(_input,20,_ctx); } - setState(209); + setState(224); match(DOT); - setState(210); + setState(225); ((ExprsContext)_localctx).expr = expr(); _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); - setState(213); + setState(228); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 65011712L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 130023424L) != 0)) { { - setState(212); + setState(227); ((ExprsContext)_localctx).math = math(); } } @@ -1208,55 +1247,55 @@ public final ExprsContext exprs() throws RecognitionException { if( ((ExprsContext)_localctx).math != null ) _localctx.ret.math = ((ExprsContext)_localctx).math.ret; } break; - case 5: - enterOuterAlt(_localctx, 5); + case 6: + enterOuterAlt(_localctx, 6); { - setState(217); + setState(232); ((ExprsContext)_localctx).expr = expr(); _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); - setState(225); + setState(240); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,20,_ctx); + _alt = getInterpreter().adaptivePredict(_input,22,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { - setState(219); + setState(234); match(DOT); - setState(220); + setState(235); ((ExprsContext)_localctx).expr = expr(); _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); } } } - setState(227); + setState(242); _errHandler.sync(this); - _alt = getInterpreter().adaptivePredict(_input,20,_ctx); + _alt = getInterpreter().adaptivePredict(_input,22,_ctx); } - setState(228); + setState(243); match(DOT); - setState(229); + setState(244); ((ExprsContext)_localctx).expr = expr(); _localctx.ret.exprs.add( ((ExprsContext)_localctx).expr.ret ); - setState(232); + setState(247); _errHandler.sync(this); _la = _input.LA(1); if (_la==DOT) { { - setState(231); + setState(246); match(DOT); } } - setState(234); + setState(249); ((ExprsContext)_localctx).concatenation = concatenation(); _localctx.ret.concatenation = ((ExprsContext)_localctx).concatenation.ret; - setState(237); + setState(252); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 65011712L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 130023424L) != 0)) { { - setState(236); + setState(251); ((ExprsContext)_localctx).math = math(); } } @@ -1264,10 +1303,10 @@ public final ExprsContext exprs() throws RecognitionException { if( ((ExprsContext)_localctx).math != null ) _localctx.ret.math = ((ExprsContext)_localctx).math.ret; } break; - case 6: - enterOuterAlt(_localctx, 6); + case 7: + enterOuterAlt(_localctx, 7); { - setState(241); + setState(256); ((ExprsContext)_localctx).concatenation = concatenation(); _localctx.ret.concatenation = ((ExprsContext)_localctx).concatenation.ret; } @@ -1315,28 +1354,28 @@ public final ExprContext expr() throws RecognitionException { enterRule(_localctx, 26, RULE_expr); int _la; try { - setState(256); + setState(271); _errHandler.sync(this); - switch ( getInterpreter().adaptivePredict(_input,25,_ctx) ) { + switch ( getInterpreter().adaptivePredict(_input,27,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { { - setState(246); + setState(261); ((ExprContext)_localctx).ID = match(ID); - setState(247); + setState(262); match(LPAREN); - setState(249); + setState(264); _errHandler.sync(this); _la = _input.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 1040187392L) != 0)) { + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & 2080374784L) != 0)) { { - setState(248); + setState(263); ((ExprContext)_localctx).functionArgs = functionArgs(); } } - setState(251); + setState(266); match(RPAREN); } ((ExprContext)_localctx).ret = new Expr((((ExprContext)_localctx).ID!=null?((ExprContext)_localctx).ID.getText():null), true, ((ExprContext)_localctx).functionArgs != null ? ((ExprContext)_localctx).functionArgs.ret : List.of() ); @@ -1345,7 +1384,7 @@ public final ExprContext expr() throws RecognitionException { case 2: enterOuterAlt(_localctx, 2); { - setState(254); + setState(269); ((ExprContext)_localctx).ID = match(ID); ((ExprContext)_localctx).ret = new Expr((((ExprContext)_localctx).ID!=null?((ExprContext)_localctx).ID.getText():null), false, List.of() ); } @@ -1392,12 +1431,12 @@ public final ConcatenationContext concatenation() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(258); + setState(273); match(LBRACE); - setState(259); + setState(274); ((ConcatenationContext)_localctx).citems = citems(); ((ConcatenationContext)_localctx).ret = new Concatenation( ((ConcatenationContext)_localctx).citems.ret ); - setState(261); + setState(276); match(RBRACE); } } @@ -1447,23 +1486,23 @@ public final CitemsContext citems() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(263); + setState(278); ((CitemsContext)_localctx).citem = citem(); _localctx.ret.add(((CitemsContext)_localctx).citem.ret); - setState(271); + setState(286); _errHandler.sync(this); _la = _input.LA(1); while (_la==COMMA) { { { - setState(265); + setState(280); match(COMMA); - setState(266); + setState(281); ((CitemsContext)_localctx).citem = citem(); _localctx.ret.add(((CitemsContext)_localctx).citem.ret); } } - setState(273); + setState(288); _errHandler.sync(this); _la = _input.LA(1); } @@ -1511,13 +1550,13 @@ public final CitemContext citem() throws RecognitionException { CitemContext _localctx = new CitemContext(_ctx, getState()); enterRule(_localctx, 32, RULE_citem); try { - setState(284); + setState(299); _errHandler.sync(this); switch (_input.LA(1)) { case ID: enterOuterAlt(_localctx, 1); { - setState(274); + setState(289); ((CitemContext)_localctx).ID = match(ID); ((CitemContext)_localctx).ret = new Expr( (((CitemContext)_localctx).ID!=null?((CitemContext)_localctx).ID.getText():null), false, List.of() ); } @@ -1525,7 +1564,7 @@ public final CitemContext citem() throws RecognitionException { case DSTRING: enterOuterAlt(_localctx, 2); { - setState(276); + setState(291); ((CitemContext)_localctx).DSTRING = match(DSTRING); ((CitemContext)_localctx).ret = sdStringToString( (((CitemContext)_localctx).DSTRING!=null?((CitemContext)_localctx).DSTRING.getText():null) ); } @@ -1533,7 +1572,7 @@ public final CitemContext citem() throws RecognitionException { case SSTRING: enterOuterAlt(_localctx, 3); { - setState(278); + setState(293); ((CitemContext)_localctx).SSTRING = match(SSTRING); ((CitemContext)_localctx).ret = sdStringToString( (((CitemContext)_localctx).SSTRING!=null?((CitemContext)_localctx).SSTRING.getText():null) ); } @@ -1541,7 +1580,7 @@ public final CitemContext citem() throws RecognitionException { case DECDIGITS: enterOuterAlt(_localctx, 4); { - setState(280); + setState(295); ((CitemContext)_localctx).DECDIGITS = match(DECDIGITS); ((CitemContext)_localctx).ret = String.valueOf( (((CitemContext)_localctx).DECDIGITS!=null?((CitemContext)_localctx).DECDIGITS.getText():null) ); } @@ -1549,7 +1588,7 @@ public final CitemContext citem() throws RecognitionException { case FLOAT: enterOuterAlt(_localctx, 5); { - setState(282); + setState(297); ((CitemContext)_localctx).FLOAT = match(FLOAT); ((CitemContext)_localctx).ret = String.valueOf( (((CitemContext)_localctx).FLOAT!=null?((CitemContext)_localctx).FLOAT.getText():null) ); } @@ -1600,9 +1639,9 @@ public final MathContext math() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(286); + setState(301); ((MathContext)_localctx).mathOperation = mathOperation(); - setState(287); + setState(302); ((MathContext)_localctx).number = number(); ((MathContext)_localctx).ret = new Math( (((MathContext)_localctx).mathOperation!=null?_input.getText(((MathContext)_localctx).mathOperation.start,((MathContext)_localctx).mathOperation.stop):null), (((MathContext)_localctx).number!=null?_input.getText(((MathContext)_localctx).number.start,((MathContext)_localctx).number.stop):null) ); } @@ -1640,7 +1679,7 @@ public final NumberContext number() throws RecognitionException { NumberContext _localctx = new NumberContext(_ctx, getState()); enterRule(_localctx, 36, RULE_number); try { - setState(293); + setState(308); _errHandler.sync(this); switch (_input.LA(1)) { case EOF: @@ -1659,14 +1698,14 @@ public final NumberContext number() throws RecognitionException { case DECDIGITS: enterOuterAlt(_localctx, 2); { - setState(291); + setState(306); match(DECDIGITS); } break; case FLOAT: enterOuterAlt(_localctx, 3); { - setState(292); + setState(307); match(FLOAT); } break; @@ -1713,9 +1752,9 @@ public final MathOperationContext mathOperation() throws RecognitionException { try { enterOuterAlt(_localctx, 1); { - setState(295); + setState(310); _la = _input.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 65011712L) != 0)) ) { + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & 130023424L) != 0)) ) { _errHandler.recoverInline(this); } else { @@ -1737,7 +1776,7 @@ public final MathOperationContext mathOperation() throws RecognitionException { } public static final String _serializedATN = - "\u0004\u0001$\u012a\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ + "\u0004\u0001%\u0139\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+ "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+ "\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007\u0002"+ "\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b\u0007\u000b\u0002"+ @@ -1764,172 +1803,183 @@ public final MathOperationContext mathOperation() throws RecognitionException { "\b\u000b\n\u000b\f\u000b\u00a1\t\u000b\u0001\u000b\u0003\u000b\u00a4\b"+ "\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f"+ "\u0005\f\u00ae\b\f\n\f\f\f\u00b1\t\f\u0001\f\u0003\f\u00b4\b\f\u0001\f"+ - "\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u00bb\b\f\u0001\f\u0001\f\u0001"+ - "\f\u0001\f\u0001\f\u0003\f\u00c2\b\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ - "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0005\f\u00cd\b\f\n\f\f\f\u00d0\t\f"+ - "\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u00d6\b\f\u0001\f\u0001\f\u0001"+ - "\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0005\f\u00e0\b\f\n\f\f\f\u00e3"+ - "\t\f\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u00e9\b\f\u0001\f\u0001\f"+ - "\u0001\f\u0003\f\u00ee\b\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0003"+ - "\f\u00f5\b\f\u0001\r\u0001\r\u0001\r\u0003\r\u00fa\b\r\u0001\r\u0001\r"+ - "\u0001\r\u0001\r\u0001\r\u0003\r\u0101\b\r\u0001\u000e\u0001\u000e\u0001"+ - "\u000e\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+ - "\u000f\u0001\u000f\u0001\u000f\u0005\u000f\u010e\b\u000f\n\u000f\f\u000f"+ - "\u0111\t\u000f\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010"+ - "\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0003\u0010"+ - "\u011d\b\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012"+ - "\u0001\u0012\u0001\u0012\u0003\u0012\u0126\b\u0012\u0001\u0013\u0001\u0013"+ - "\u0001\u0013\u0000\u0000\u0014\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010"+ - "\u0012\u0014\u0016\u0018\u001a\u001c\u001e \"$&\u0000\u0001\u0001\u0000"+ - "\u0015\u0019\u0143\u0000)\u0001\u0000\u0000\u0000\u0002?\u0001\u0000\u0000"+ - "\u0000\u0004J\u0001\u0000\u0000\u0000\u0006R\u0001\u0000\u0000\u0000\b"+ - "V\u0001\u0000\u0000\u0000\nY\u0001\u0000\u0000\u0000\fk\u0001\u0000\u0000"+ - "\u0000\u000en\u0001\u0000\u0000\u0000\u0010r\u0001\u0000\u0000\u0000\u0012"+ - "{\u0001\u0000\u0000\u0000\u0014\u0094\u0001\u0000\u0000\u0000\u0016\u00a3"+ - "\u0001\u0000\u0000\u0000\u0018\u00f4\u0001\u0000\u0000\u0000\u001a\u0100"+ - "\u0001\u0000\u0000\u0000\u001c\u0102\u0001\u0000\u0000\u0000\u001e\u0107"+ - "\u0001\u0000\u0000\u0000 \u011c\u0001\u0000\u0000\u0000\"\u011e\u0001"+ - "\u0000\u0000\u0000$\u0125\u0001\u0000\u0000\u0000&\u0127\u0001\u0000\u0000"+ - "\u0000(*\u0005\b\u0000\u0000)(\u0001\u0000\u0000\u0000)*\u0001\u0000\u0000"+ - "\u0000*,\u0001\u0000\u0000\u0000+-\u0005 \u0000\u0000,+\u0001\u0000\u0000"+ - "\u0000,-\u0001\u0000\u0000\u0000-1\u0001\u0000\u0000\u0000.2\u0003\u0002"+ - "\u0001\u0000/2\u0003\u0004\u0002\u000002\u0003\u0006\u0003\u00001.\u0001"+ - "\u0000\u0000\u00001/\u0001\u0000\u0000\u000010\u0001\u0000\u0000\u0000"+ - "24\u0001\u0000\u0000\u000035\u0003\n\u0005\u000043\u0001\u0000\u0000\u0000"+ - "45\u0001\u0000\u0000\u000057\u0001\u0000\u0000\u000068\u0003\u0010\b\u0000"+ - "76\u0001\u0000\u0000\u000078\u0001\u0000\u0000\u00008;\u0001\u0000\u0000"+ - "\u00009:\u0005\u0002\u0000\u0000:<\u0003\b\u0004\u0000;9\u0001\u0000\u0000"+ - "\u0000;<\u0001\u0000\u0000\u0000<=\u0001\u0000\u0000\u0000=>\u0006\u0000"+ - "\uffff\uffff\u0000>\u0001\u0001\u0000\u0000\u0000?@\u0005\u0002\u0000"+ - "\u0000@A\u0003\b\u0004\u0000AB\u0005\u0003\u0000\u0000BE\u0003\u0018\f"+ - "\u0000CD\u0005\u0004\u0000\u0000DF\u0003\u0018\f\u0000EC\u0001\u0000\u0000"+ - "\u0000EF\u0001\u0000\u0000\u0000FG\u0001\u0000\u0000\u0000GH\u0005\u0005"+ - "\u0000\u0000HI\u0006\u0001\uffff\uffff\u0000I\u0003\u0001\u0000\u0000"+ - "\u0000JK\u0005\u0006\u0000\u0000KL\u0005\u000e\u0000\u0000LM\u0003\u0018"+ - "\f\u0000MN\u0005\u000f\u0000\u0000NO\u0003\u0006\u0003\u0000OP\u0005\u0005"+ - "\u0000\u0000PQ\u0006\u0002\uffff\uffff\u0000Q\u0005\u0001\u0000\u0000"+ - "\u0000RS\u0003\u0018\f\u0000ST\u0003\u0016\u000b\u0000TU\u0006\u0003\uffff"+ - "\uffff\u0000U\u0007\u0001\u0000\u0000\u0000VW\u0003\u0018\f\u0000WX\u0006"+ - "\u0004\uffff\uffff\u0000X\t\u0001\u0000\u0000\u0000YZ\u0005\u0012\u0000"+ - "\u0000Z[\u0003\f\u0006\u0000[\\\u0006\u0005\uffff\uffff\u0000\\\u000b"+ - "\u0001\u0000\u0000\u0000]^\u0005\u001b\u0000\u0000^l\u0006\u0006\uffff"+ - "\uffff\u0000_`\u0005\u001a\u0000\u0000`l\u0006\u0006\uffff\uffff\u0000"+ - "ab\u0003\u000e\u0007\u0000bc\u0006\u0006\uffff\uffff\u0000cl\u0001\u0000"+ - "\u0000\u0000de\u0005\u001d\u0000\u0000el\u0006\u0006\uffff\uffff\u0000"+ - "fg\u0005\u001e\u0000\u0000gl\u0006\u0006\uffff\uffff\u0000hi\u0005\u0010"+ - "\u0000\u0000ij\u0005\u0011\u0000\u0000jl\u0006\u0006\uffff\uffff\u0000"+ - "k]\u0001\u0000\u0000\u0000k_\u0001\u0000\u0000\u0000ka\u0001\u0000\u0000"+ - "\u0000kd\u0001\u0000\u0000\u0000kf\u0001\u0000\u0000\u0000kh\u0001\u0000"+ - "\u0000\u0000l\r\u0001\u0000\u0000\u0000mo\u0005\u0019\u0000\u0000nm\u0001"+ - "\u0000\u0000\u0000no\u0001\u0000\u0000\u0000op\u0001\u0000\u0000\u0000"+ - "pq\u0005\u001c\u0000\u0000q\u000f\u0001\u0000\u0000\u0000rs\u0005\u0013"+ - "\u0000\u0000st\u0005\u001f\u0000\u0000tv\u0005\u000e\u0000\u0000uw\u0003"+ - "\u0012\t\u0000vu\u0001\u0000\u0000\u0000vw\u0001\u0000\u0000\u0000wx\u0001"+ - "\u0000\u0000\u0000xy\u0005\u000f\u0000\u0000yz\u0006\b\uffff\uffff\u0000"+ - "z\u0011\u0001\u0000\u0000\u0000{|\u0003\u0014\n\u0000|\u0083\u0006\t\uffff"+ - "\uffff\u0000}~\u0005\u0014\u0000\u0000~\u007f\u0003\u0014\n\u0000\u007f"+ - "\u0080\u0006\t\uffff\uffff\u0000\u0080\u0082\u0001\u0000\u0000\u0000\u0081"+ - "}\u0001\u0000\u0000\u0000\u0082\u0085\u0001\u0000\u0000\u0000\u0083\u0081"+ - "\u0001\u0000\u0000\u0000\u0083\u0084\u0001\u0000\u0000\u0000\u0084\u0013"+ - "\u0001\u0000\u0000\u0000\u0085\u0083\u0001\u0000\u0000\u0000\u0086\u0087"+ - "\u0005\u001c\u0000\u0000\u0087\u0095\u0006\n\uffff\uffff\u0000\u0088\u0089"+ - "\u0005\u0019\u0000\u0000\u0089\u008a\u0005\u001c\u0000\u0000\u008a\u0095"+ - "\u0006\n\uffff\uffff\u0000\u008b\u008c\u0005\u001d\u0000\u0000\u008c\u0095"+ - "\u0006\n\uffff\uffff\u0000\u008d\u008e\u0005\u0019\u0000\u0000\u008e\u008f"+ - "\u0005\u001d\u0000\u0000\u008f\u0095\u0006\n\uffff\uffff\u0000\u0090\u0091"+ - "\u0005\u001b\u0000\u0000\u0091\u0095\u0006\n\uffff\uffff\u0000\u0092\u0093"+ - "\u0005\u001a\u0000\u0000\u0093\u0095\u0006\n\uffff\uffff\u0000\u0094\u0086"+ - "\u0001\u0000\u0000\u0000\u0094\u0088\u0001\u0000\u0000\u0000\u0094\u008b"+ - "\u0001\u0000\u0000\u0000\u0094\u008d\u0001\u0000\u0000\u0000\u0094\u0090"+ - "\u0001\u0000\u0000\u0000\u0094\u0092\u0001\u0000\u0000\u0000\u0095\u0015"+ - "\u0001\u0000\u0000\u0000\u0096\u0097\u0005\u0001\u0000\u0000\u0097\u0098"+ - "\u0003\u0018\f\u0000\u0098\u009f\u0006\u000b\uffff\uffff\u0000\u0099\u009a"+ - "\u0005\u0001\u0000\u0000\u009a\u009b\u0003\u0018\f\u0000\u009b\u009c\u0006"+ - "\u000b\uffff\uffff\u0000\u009c\u009e\u0001\u0000\u0000\u0000\u009d\u0099"+ - "\u0001\u0000\u0000\u0000\u009e\u00a1\u0001\u0000\u0000\u0000\u009f\u009d"+ - "\u0001\u0000\u0000\u0000\u009f\u00a0\u0001\u0000\u0000\u0000\u00a0\u00a4"+ - "\u0001\u0000\u0000\u0000\u00a1\u009f\u0001\u0000\u0000\u0000\u00a2\u00a4"+ - "\u0001\u0000\u0000\u0000\u00a3\u0096\u0001\u0000\u0000\u0000\u00a3\u00a2"+ - "\u0001\u0000\u0000\u0000\u00a4\u0017\u0001\u0000\u0000\u0000\u00a5\u00a6"+ - "\u0005\u0007\u0000\u0000\u00a6\u00a7\u0005\r\u0000\u0000\u00a7\u00a8\u0003"+ - "\u001a\r\u0000\u00a8\u00af\u0006\f\uffff\uffff\u0000\u00a9\u00aa\u0005"+ - "\r\u0000\u0000\u00aa\u00ab\u0003\u001a\r\u0000\u00ab\u00ac\u0006\f\uffff"+ + "\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0005\f\u00be"+ + "\b\f\n\f\f\f\u00c1\t\f\u0001\f\u0003\f\u00c4\b\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0003\f\u00ca\b\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0003"+ + "\f\u00d1\b\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0005\f\u00dc\b\f\n\f\f\f\u00df\t\f\u0001\f\u0001\f\u0001\f"+ + "\u0001\f\u0003\f\u00e5\b\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0001\f\u0005\f\u00ef\b\f\n\f\f\f\u00f2\t\f\u0001\f\u0001\f"+ + "\u0001\f\u0001\f\u0003\f\u00f8\b\f\u0001\f\u0001\f\u0001\f\u0003\f\u00fd"+ + "\b\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0003\f\u0104\b\f\u0001\r"+ + "\u0001\r\u0001\r\u0003\r\u0109\b\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001"+ + "\r\u0003\r\u0110\b\r\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001"+ + "\u000e\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001"+ + "\u000f\u0005\u000f\u011d\b\u000f\n\u000f\f\u000f\u0120\t\u000f\u0001\u0010"+ + "\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010"+ + "\u0001\u0010\u0001\u0010\u0001\u0010\u0003\u0010\u012c\b\u0010\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012"+ + "\u0003\u0012\u0135\b\u0012\u0001\u0013\u0001\u0013\u0001\u0013\u0000\u0000"+ + "\u0014\u0000\u0002\u0004\u0006\b\n\f\u000e\u0010\u0012\u0014\u0016\u0018"+ + "\u001a\u001c\u001e \"$&\u0000\u0001\u0001\u0000\u0016\u001a\u0155\u0000"+ + ")\u0001\u0000\u0000\u0000\u0002?\u0001\u0000\u0000\u0000\u0004J\u0001"+ + "\u0000\u0000\u0000\u0006R\u0001\u0000\u0000\u0000\bV\u0001\u0000\u0000"+ + "\u0000\nY\u0001\u0000\u0000\u0000\fk\u0001\u0000\u0000\u0000\u000en\u0001"+ + "\u0000\u0000\u0000\u0010r\u0001\u0000\u0000\u0000\u0012{\u0001\u0000\u0000"+ + "\u0000\u0014\u0094\u0001\u0000\u0000\u0000\u0016\u00a3\u0001\u0000\u0000"+ + "\u0000\u0018\u0103\u0001\u0000\u0000\u0000\u001a\u010f\u0001\u0000\u0000"+ + "\u0000\u001c\u0111\u0001\u0000\u0000\u0000\u001e\u0116\u0001\u0000\u0000"+ + "\u0000 \u012b\u0001\u0000\u0000\u0000\"\u012d\u0001\u0000\u0000\u0000"+ + "$\u0134\u0001\u0000\u0000\u0000&\u0136\u0001\u0000\u0000\u0000(*\u0005"+ + "\t\u0000\u0000)(\u0001\u0000\u0000\u0000)*\u0001\u0000\u0000\u0000*,\u0001"+ + "\u0000\u0000\u0000+-\u0005!\u0000\u0000,+\u0001\u0000\u0000\u0000,-\u0001"+ + "\u0000\u0000\u0000-1\u0001\u0000\u0000\u0000.2\u0003\u0002\u0001\u0000"+ + "/2\u0003\u0004\u0002\u000002\u0003\u0006\u0003\u00001.\u0001\u0000\u0000"+ + "\u00001/\u0001\u0000\u0000\u000010\u0001\u0000\u0000\u000024\u0001\u0000"+ + "\u0000\u000035\u0003\n\u0005\u000043\u0001\u0000\u0000\u000045\u0001\u0000"+ + "\u0000\u000057\u0001\u0000\u0000\u000068\u0003\u0010\b\u000076\u0001\u0000"+ + "\u0000\u000078\u0001\u0000\u0000\u00008;\u0001\u0000\u0000\u00009:\u0005"+ + "\u0002\u0000\u0000:<\u0003\b\u0004\u0000;9\u0001\u0000\u0000\u0000;<\u0001"+ + "\u0000\u0000\u0000<=\u0001\u0000\u0000\u0000=>\u0006\u0000\uffff\uffff"+ + "\u0000>\u0001\u0001\u0000\u0000\u0000?@\u0005\u0002\u0000\u0000@A\u0003"+ + "\b\u0004\u0000AB\u0005\u0003\u0000\u0000BE\u0003\u0018\f\u0000CD\u0005"+ + "\u0004\u0000\u0000DF\u0003\u0018\f\u0000EC\u0001\u0000\u0000\u0000EF\u0001"+ + "\u0000\u0000\u0000FG\u0001\u0000\u0000\u0000GH\u0005\u0005\u0000\u0000"+ + "HI\u0006\u0001\uffff\uffff\u0000I\u0003\u0001\u0000\u0000\u0000JK\u0005"+ + "\u0006\u0000\u0000KL\u0005\u000f\u0000\u0000LM\u0003\u0018\f\u0000MN\u0005"+ + "\u0010\u0000\u0000NO\u0003\u0006\u0003\u0000OP\u0005\u0005\u0000\u0000"+ + "PQ\u0006\u0002\uffff\uffff\u0000Q\u0005\u0001\u0000\u0000\u0000RS\u0003"+ + "\u0018\f\u0000ST\u0003\u0016\u000b\u0000TU\u0006\u0003\uffff\uffff\u0000"+ + "U\u0007\u0001\u0000\u0000\u0000VW\u0003\u0018\f\u0000WX\u0006\u0004\uffff"+ + "\uffff\u0000X\t\u0001\u0000\u0000\u0000YZ\u0005\u0013\u0000\u0000Z[\u0003"+ + "\f\u0006\u0000[\\\u0006\u0005\uffff\uffff\u0000\\\u000b\u0001\u0000\u0000"+ + "\u0000]^\u0005\u001c\u0000\u0000^l\u0006\u0006\uffff\uffff\u0000_`\u0005"+ + "\u001b\u0000\u0000`l\u0006\u0006\uffff\uffff\u0000ab\u0003\u000e\u0007"+ + "\u0000bc\u0006\u0006\uffff\uffff\u0000cl\u0001\u0000\u0000\u0000de\u0005"+ + "\u001e\u0000\u0000el\u0006\u0006\uffff\uffff\u0000fg\u0005\u001f\u0000"+ + "\u0000gl\u0006\u0006\uffff\uffff\u0000hi\u0005\u0011\u0000\u0000ij\u0005"+ + "\u0012\u0000\u0000jl\u0006\u0006\uffff\uffff\u0000k]\u0001\u0000\u0000"+ + "\u0000k_\u0001\u0000\u0000\u0000ka\u0001\u0000\u0000\u0000kd\u0001\u0000"+ + "\u0000\u0000kf\u0001\u0000\u0000\u0000kh\u0001\u0000\u0000\u0000l\r\u0001"+ + "\u0000\u0000\u0000mo\u0005\u001a\u0000\u0000nm\u0001\u0000\u0000\u0000"+ + "no\u0001\u0000\u0000\u0000op\u0001\u0000\u0000\u0000pq\u0005\u001d\u0000"+ + "\u0000q\u000f\u0001\u0000\u0000\u0000rs\u0005\u0014\u0000\u0000st\u0005"+ + " \u0000\u0000tv\u0005\u000f\u0000\u0000uw\u0003\u0012\t\u0000vu\u0001"+ + "\u0000\u0000\u0000vw\u0001\u0000\u0000\u0000wx\u0001\u0000\u0000\u0000"+ + "xy\u0005\u0010\u0000\u0000yz\u0006\b\uffff\uffff\u0000z\u0011\u0001\u0000"+ + "\u0000\u0000{|\u0003\u0014\n\u0000|\u0083\u0006\t\uffff\uffff\u0000}~"+ + "\u0005\u0015\u0000\u0000~\u007f\u0003\u0014\n\u0000\u007f\u0080\u0006"+ + "\t\uffff\uffff\u0000\u0080\u0082\u0001\u0000\u0000\u0000\u0081}\u0001"+ + "\u0000\u0000\u0000\u0082\u0085\u0001\u0000\u0000\u0000\u0083\u0081\u0001"+ + "\u0000\u0000\u0000\u0083\u0084\u0001\u0000\u0000\u0000\u0084\u0013\u0001"+ + "\u0000\u0000\u0000\u0085\u0083\u0001\u0000\u0000\u0000\u0086\u0087\u0005"+ + "\u001d\u0000\u0000\u0087\u0095\u0006\n\uffff\uffff\u0000\u0088\u0089\u0005"+ + "\u001a\u0000\u0000\u0089\u008a\u0005\u001d\u0000\u0000\u008a\u0095\u0006"+ + "\n\uffff\uffff\u0000\u008b\u008c\u0005\u001e\u0000\u0000\u008c\u0095\u0006"+ + "\n\uffff\uffff\u0000\u008d\u008e\u0005\u001a\u0000\u0000\u008e\u008f\u0005"+ + "\u001e\u0000\u0000\u008f\u0095\u0006\n\uffff\uffff\u0000\u0090\u0091\u0005"+ + "\u001c\u0000\u0000\u0091\u0095\u0006\n\uffff\uffff\u0000\u0092\u0093\u0005"+ + "\u001b\u0000\u0000\u0093\u0095\u0006\n\uffff\uffff\u0000\u0094\u0086\u0001"+ + "\u0000\u0000\u0000\u0094\u0088\u0001\u0000\u0000\u0000\u0094\u008b\u0001"+ + "\u0000\u0000\u0000\u0094\u008d\u0001\u0000\u0000\u0000\u0094\u0090\u0001"+ + "\u0000\u0000\u0000\u0094\u0092\u0001\u0000\u0000\u0000\u0095\u0015\u0001"+ + "\u0000\u0000\u0000\u0096\u0097\u0005\u0001\u0000\u0000\u0097\u0098\u0003"+ + "\u0018\f\u0000\u0098\u009f\u0006\u000b\uffff\uffff\u0000\u0099\u009a\u0005"+ + "\u0001\u0000\u0000\u009a\u009b\u0003\u0018\f\u0000\u009b\u009c\u0006\u000b"+ + "\uffff\uffff\u0000\u009c\u009e\u0001\u0000\u0000\u0000\u009d\u0099\u0001"+ + "\u0000\u0000\u0000\u009e\u00a1\u0001\u0000\u0000\u0000\u009f\u009d\u0001"+ + "\u0000\u0000\u0000\u009f\u00a0\u0001\u0000\u0000\u0000\u00a0\u00a4\u0001"+ + "\u0000\u0000\u0000\u00a1\u009f\u0001\u0000\u0000\u0000\u00a2\u00a4\u0001"+ + "\u0000\u0000\u0000\u00a3\u0096\u0001\u0000\u0000\u0000\u00a3\u00a2\u0001"+ + "\u0000\u0000\u0000\u00a4\u0017\u0001\u0000\u0000\u0000\u00a5\u00a6\u0005"+ + "\b\u0000\u0000\u00a6\u00a7\u0005\u000e\u0000\u0000\u00a7\u00a8\u0003\u001a"+ + "\r\u0000\u00a8\u00af\u0006\f\uffff\uffff\u0000\u00a9\u00aa\u0005\u000e"+ + "\u0000\u0000\u00aa\u00ab\u0003\u001a\r\u0000\u00ab\u00ac\u0006\f\uffff"+ "\uffff\u0000\u00ac\u00ae\u0001\u0000\u0000\u0000\u00ad\u00a9\u0001\u0000"+ "\u0000\u0000\u00ae\u00b1\u0001\u0000\u0000\u0000\u00af\u00ad\u0001\u0000"+ "\u0000\u0000\u00af\u00b0\u0001\u0000\u0000\u0000\u00b0\u00b3\u0001\u0000"+ "\u0000\u0000\u00b1\u00af\u0001\u0000\u0000\u0000\u00b2\u00b4\u0003\"\u0011"+ "\u0000\u00b3\u00b2\u0001\u0000\u0000\u0000\u00b3\u00b4\u0001\u0000\u0000"+ "\u0000\u00b4\u00b5\u0001\u0000\u0000\u0000\u00b5\u00b6\u0006\f\uffff\uffff"+ - "\u0000\u00b6\u00f5\u0001\u0000\u0000\u0000\u00b7\u00b8\u0003\u001a\r\u0000"+ - "\u00b8\u00ba\u0006\f\uffff\uffff\u0000\u00b9\u00bb\u0003\"\u0011\u0000"+ - "\u00ba\u00b9\u0001\u0000\u0000\u0000\u00ba\u00bb\u0001\u0000\u0000\u0000"+ - "\u00bb\u00bc\u0001\u0000\u0000\u0000\u00bc\u00bd\u0006\f\uffff\uffff\u0000"+ - "\u00bd\u00f5\u0001\u0000\u0000\u0000\u00be\u00bf\u0003\u001a\r\u0000\u00bf"+ - "\u00c1\u0006\f\uffff\uffff\u0000\u00c0\u00c2\u0005\r\u0000\u0000\u00c1"+ - "\u00c0\u0001\u0000\u0000\u0000\u00c1\u00c2\u0001\u0000\u0000\u0000\u00c2"+ - "\u00c3\u0001\u0000\u0000\u0000\u00c3\u00c4\u0003\u001c\u000e\u0000\u00c4"+ - "\u00c5\u0006\f\uffff\uffff\u0000\u00c5\u00f5\u0001\u0000\u0000\u0000\u00c6"+ - "\u00c7\u0003\u001a\r\u0000\u00c7\u00ce\u0006\f\uffff\uffff\u0000\u00c8"+ - "\u00c9\u0005\r\u0000\u0000\u00c9\u00ca\u0003\u001a\r\u0000\u00ca\u00cb"+ - "\u0006\f\uffff\uffff\u0000\u00cb\u00cd\u0001\u0000\u0000\u0000\u00cc\u00c8"+ - "\u0001\u0000\u0000\u0000\u00cd\u00d0\u0001\u0000\u0000\u0000\u00ce\u00cc"+ - "\u0001\u0000\u0000\u0000\u00ce\u00cf\u0001\u0000\u0000\u0000\u00cf\u00d1"+ - "\u0001\u0000\u0000\u0000\u00d0\u00ce\u0001\u0000\u0000\u0000\u00d1\u00d2"+ - "\u0005\r\u0000\u0000\u00d2\u00d3\u0003\u001a\r\u0000\u00d3\u00d5\u0006"+ - "\f\uffff\uffff\u0000\u00d4\u00d6\u0003\"\u0011\u0000\u00d5\u00d4\u0001"+ - "\u0000\u0000\u0000\u00d5\u00d6\u0001\u0000\u0000\u0000\u00d6\u00d7\u0001"+ - "\u0000\u0000\u0000\u00d7\u00d8\u0006\f\uffff\uffff\u0000\u00d8\u00f5\u0001"+ - "\u0000\u0000\u0000\u00d9\u00da\u0003\u001a\r\u0000\u00da\u00e1\u0006\f"+ - "\uffff\uffff\u0000\u00db\u00dc\u0005\r\u0000\u0000\u00dc\u00dd\u0003\u001a"+ - "\r\u0000\u00dd\u00de\u0006\f\uffff\uffff\u0000\u00de\u00e0\u0001\u0000"+ - "\u0000\u0000\u00df\u00db\u0001\u0000\u0000\u0000\u00e0\u00e3\u0001\u0000"+ - "\u0000\u0000\u00e1\u00df\u0001\u0000\u0000\u0000\u00e1\u00e2\u0001\u0000"+ - "\u0000\u0000\u00e2\u00e4\u0001\u0000\u0000\u0000\u00e3\u00e1\u0001\u0000"+ - "\u0000\u0000\u00e4\u00e5\u0005\r\u0000\u0000\u00e5\u00e6\u0003\u001a\r"+ - "\u0000\u00e6\u00e8\u0006\f\uffff\uffff\u0000\u00e7\u00e9\u0005\r\u0000"+ - "\u0000\u00e8\u00e7\u0001\u0000\u0000\u0000\u00e8\u00e9\u0001\u0000\u0000"+ - "\u0000\u00e9\u00ea\u0001\u0000\u0000\u0000\u00ea\u00eb\u0003\u001c\u000e"+ - "\u0000\u00eb\u00ed\u0006\f\uffff\uffff\u0000\u00ec\u00ee\u0003\"\u0011"+ - "\u0000\u00ed\u00ec\u0001\u0000\u0000\u0000\u00ed\u00ee\u0001\u0000\u0000"+ - "\u0000\u00ee\u00ef\u0001\u0000\u0000\u0000\u00ef\u00f0\u0006\f\uffff\uffff"+ - "\u0000\u00f0\u00f5\u0001\u0000\u0000\u0000\u00f1\u00f2\u0003\u001c\u000e"+ - "\u0000\u00f2\u00f3\u0006\f\uffff\uffff\u0000\u00f3\u00f5\u0001\u0000\u0000"+ - "\u0000\u00f4\u00a5\u0001\u0000\u0000\u0000\u00f4\u00b7\u0001\u0000\u0000"+ - "\u0000\u00f4\u00be\u0001\u0000\u0000\u0000\u00f4\u00c6\u0001\u0000\u0000"+ - "\u0000\u00f4\u00d9\u0001\u0000\u0000\u0000\u00f4\u00f1\u0001\u0000\u0000"+ - "\u0000\u00f5\u0019\u0001\u0000\u0000\u0000\u00f6\u00f7\u0005\u001f\u0000"+ - "\u0000\u00f7\u00f9\u0005\u000e\u0000\u0000\u00f8\u00fa\u0003\u0012\t\u0000"+ - "\u00f9\u00f8\u0001\u0000\u0000\u0000\u00f9\u00fa\u0001\u0000\u0000\u0000"+ - "\u00fa\u00fb\u0001\u0000\u0000\u0000\u00fb\u00fc\u0005\u000f\u0000\u0000"+ - "\u00fc\u00fd\u0001\u0000\u0000\u0000\u00fd\u0101\u0006\r\uffff\uffff\u0000"+ - "\u00fe\u00ff\u0005\u001f\u0000\u0000\u00ff\u0101\u0006\r\uffff\uffff\u0000"+ - "\u0100\u00f6\u0001\u0000\u0000\u0000\u0100\u00fe\u0001\u0000\u0000\u0000"+ - "\u0101\u001b\u0001\u0000\u0000\u0000\u0102\u0103\u0005\u000b\u0000\u0000"+ - "\u0103\u0104\u0003\u001e\u000f\u0000\u0104\u0105\u0006\u000e\uffff\uffff"+ - "\u0000\u0105\u0106\u0005\f\u0000\u0000\u0106\u001d\u0001\u0000\u0000\u0000"+ - "\u0107\u0108\u0003 \u0010\u0000\u0108\u010f\u0006\u000f\uffff\uffff\u0000"+ - "\u0109\u010a\u0005\u0014\u0000\u0000\u010a\u010b\u0003 \u0010\u0000\u010b"+ - "\u010c\u0006\u000f\uffff\uffff\u0000\u010c\u010e\u0001\u0000\u0000\u0000"+ - "\u010d\u0109\u0001\u0000\u0000\u0000\u010e\u0111\u0001\u0000\u0000\u0000"+ - "\u010f\u010d\u0001\u0000\u0000\u0000\u010f\u0110\u0001\u0000\u0000\u0000"+ - "\u0110\u001f\u0001\u0000\u0000\u0000\u0111\u010f\u0001\u0000\u0000\u0000"+ - "\u0112\u0113\u0005\u001f\u0000\u0000\u0113\u011d\u0006\u0010\uffff\uffff"+ - "\u0000\u0114\u0115\u0005\u001a\u0000\u0000\u0115\u011d\u0006\u0010\uffff"+ - "\uffff\u0000\u0116\u0117\u0005\u001b\u0000\u0000\u0117\u011d\u0006\u0010"+ - "\uffff\uffff\u0000\u0118\u0119\u0005\u001c\u0000\u0000\u0119\u011d\u0006"+ - "\u0010\uffff\uffff\u0000\u011a\u011b\u0005\u001d\u0000\u0000\u011b\u011d"+ - "\u0006\u0010\uffff\uffff\u0000\u011c\u0112\u0001\u0000\u0000\u0000\u011c"+ - "\u0114\u0001\u0000\u0000\u0000\u011c\u0116\u0001\u0000\u0000\u0000\u011c"+ - "\u0118\u0001\u0000\u0000\u0000\u011c\u011a\u0001\u0000\u0000\u0000\u011d"+ - "!\u0001\u0000\u0000\u0000\u011e\u011f\u0003&\u0013\u0000\u011f\u0120\u0003"+ - "$\u0012\u0000\u0120\u0121\u0006\u0011\uffff\uffff\u0000\u0121#\u0001\u0000"+ - "\u0000\u0000\u0122\u0126\u0001\u0000\u0000\u0000\u0123\u0126\u0005\u001c"+ - "\u0000\u0000\u0124\u0126\u0005\u001d\u0000\u0000\u0125\u0122\u0001\u0000"+ - "\u0000\u0000\u0125\u0123\u0001\u0000\u0000\u0000\u0125\u0124\u0001\u0000"+ - "\u0000\u0000\u0126%\u0001\u0000\u0000\u0000\u0127\u0128\u0007\u0000\u0000"+ - "\u0000\u0128\'\u0001\u0000\u0000\u0000\u001d),147;Eknv\u0083\u0094\u009f"+ - "\u00a3\u00af\u00b3\u00ba\u00c1\u00ce\u00d5\u00e1\u00e8\u00ed\u00f4\u00f9"+ - "\u0100\u010f\u011c\u0125"; + "\u0000\u00b6\u0104\u0001\u0000\u0000\u0000\u00b7\u00b8\u0005\u0007\u0000"+ + "\u0000\u00b8\u00bf\u0006\f\uffff\uffff\u0000\u00b9\u00ba\u0005\u000e\u0000"+ + "\u0000\u00ba\u00bb\u0003\u001a\r\u0000\u00bb\u00bc\u0006\f\uffff\uffff"+ + "\u0000\u00bc\u00be\u0001\u0000\u0000\u0000\u00bd\u00b9\u0001\u0000\u0000"+ + "\u0000\u00be\u00c1\u0001\u0000\u0000\u0000\u00bf\u00bd\u0001\u0000\u0000"+ + "\u0000\u00bf\u00c0\u0001\u0000\u0000\u0000\u00c0\u00c3\u0001\u0000\u0000"+ + "\u0000\u00c1\u00bf\u0001\u0000\u0000\u0000\u00c2\u00c4\u0003\"\u0011\u0000"+ + "\u00c3\u00c2\u0001\u0000\u0000\u0000\u00c3\u00c4\u0001\u0000\u0000\u0000"+ + "\u00c4\u00c5\u0001\u0000\u0000\u0000\u00c5\u0104\u0006\f\uffff\uffff\u0000"+ + "\u00c6\u00c7\u0003\u001a\r\u0000\u00c7\u00c9\u0006\f\uffff\uffff\u0000"+ + "\u00c8\u00ca\u0003\"\u0011\u0000\u00c9\u00c8\u0001\u0000\u0000\u0000\u00c9"+ + "\u00ca\u0001\u0000\u0000\u0000\u00ca\u00cb\u0001\u0000\u0000\u0000\u00cb"+ + "\u00cc\u0006\f\uffff\uffff\u0000\u00cc\u0104\u0001\u0000\u0000\u0000\u00cd"+ + "\u00ce\u0003\u001a\r\u0000\u00ce\u00d0\u0006\f\uffff\uffff\u0000\u00cf"+ + "\u00d1\u0005\u000e\u0000\u0000\u00d0\u00cf\u0001\u0000\u0000\u0000\u00d0"+ + "\u00d1\u0001\u0000\u0000\u0000\u00d1\u00d2\u0001\u0000\u0000\u0000\u00d2"+ + "\u00d3\u0003\u001c\u000e\u0000\u00d3\u00d4\u0006\f\uffff\uffff\u0000\u00d4"+ + "\u0104\u0001\u0000\u0000\u0000\u00d5\u00d6\u0003\u001a\r\u0000\u00d6\u00dd"+ + "\u0006\f\uffff\uffff\u0000\u00d7\u00d8\u0005\u000e\u0000\u0000\u00d8\u00d9"+ + "\u0003\u001a\r\u0000\u00d9\u00da\u0006\f\uffff\uffff\u0000\u00da\u00dc"+ + "\u0001\u0000\u0000\u0000\u00db\u00d7\u0001\u0000\u0000\u0000\u00dc\u00df"+ + "\u0001\u0000\u0000\u0000\u00dd\u00db\u0001\u0000\u0000\u0000\u00dd\u00de"+ + "\u0001\u0000\u0000\u0000\u00de\u00e0\u0001\u0000\u0000\u0000\u00df\u00dd"+ + "\u0001\u0000\u0000\u0000\u00e0\u00e1\u0005\u000e\u0000\u0000\u00e1\u00e2"+ + "\u0003\u001a\r\u0000\u00e2\u00e4\u0006\f\uffff\uffff\u0000\u00e3\u00e5"+ + "\u0003\"\u0011\u0000\u00e4\u00e3\u0001\u0000\u0000\u0000\u00e4\u00e5\u0001"+ + "\u0000\u0000\u0000\u00e5\u00e6\u0001\u0000\u0000\u0000\u00e6\u00e7\u0006"+ + "\f\uffff\uffff\u0000\u00e7\u0104\u0001\u0000\u0000\u0000\u00e8\u00e9\u0003"+ + "\u001a\r\u0000\u00e9\u00f0\u0006\f\uffff\uffff\u0000\u00ea\u00eb\u0005"+ + "\u000e\u0000\u0000\u00eb\u00ec\u0003\u001a\r\u0000\u00ec\u00ed\u0006\f"+ + "\uffff\uffff\u0000\u00ed\u00ef\u0001\u0000\u0000\u0000\u00ee\u00ea\u0001"+ + "\u0000\u0000\u0000\u00ef\u00f2\u0001\u0000\u0000\u0000\u00f0\u00ee\u0001"+ + "\u0000\u0000\u0000\u00f0\u00f1\u0001\u0000\u0000\u0000\u00f1\u00f3\u0001"+ + "\u0000\u0000\u0000\u00f2\u00f0\u0001\u0000\u0000\u0000\u00f3\u00f4\u0005"+ + "\u000e\u0000\u0000\u00f4\u00f5\u0003\u001a\r\u0000\u00f5\u00f7\u0006\f"+ + "\uffff\uffff\u0000\u00f6\u00f8\u0005\u000e\u0000\u0000\u00f7\u00f6\u0001"+ + "\u0000\u0000\u0000\u00f7\u00f8\u0001\u0000\u0000\u0000\u00f8\u00f9\u0001"+ + "\u0000\u0000\u0000\u00f9\u00fa\u0003\u001c\u000e\u0000\u00fa\u00fc\u0006"+ + "\f\uffff\uffff\u0000\u00fb\u00fd\u0003\"\u0011\u0000\u00fc\u00fb\u0001"+ + "\u0000\u0000\u0000\u00fc\u00fd\u0001\u0000\u0000\u0000\u00fd\u00fe\u0001"+ + "\u0000\u0000\u0000\u00fe\u00ff\u0006\f\uffff\uffff\u0000\u00ff\u0104\u0001"+ + "\u0000\u0000\u0000\u0100\u0101\u0003\u001c\u000e\u0000\u0101\u0102\u0006"+ + "\f\uffff\uffff\u0000\u0102\u0104\u0001\u0000\u0000\u0000\u0103\u00a5\u0001"+ + "\u0000\u0000\u0000\u0103\u00b7\u0001\u0000\u0000\u0000\u0103\u00c6\u0001"+ + "\u0000\u0000\u0000\u0103\u00cd\u0001\u0000\u0000\u0000\u0103\u00d5\u0001"+ + "\u0000\u0000\u0000\u0103\u00e8\u0001\u0000\u0000\u0000\u0103\u0100\u0001"+ + "\u0000\u0000\u0000\u0104\u0019\u0001\u0000\u0000\u0000\u0105\u0106\u0005"+ + " \u0000\u0000\u0106\u0108\u0005\u000f\u0000\u0000\u0107\u0109\u0003\u0012"+ + "\t\u0000\u0108\u0107\u0001\u0000\u0000\u0000\u0108\u0109\u0001\u0000\u0000"+ + "\u0000\u0109\u010a\u0001\u0000\u0000\u0000\u010a\u010b\u0005\u0010\u0000"+ + "\u0000\u010b\u010c\u0001\u0000\u0000\u0000\u010c\u0110\u0006\r\uffff\uffff"+ + "\u0000\u010d\u010e\u0005 \u0000\u0000\u010e\u0110\u0006\r\uffff\uffff"+ + "\u0000\u010f\u0105\u0001\u0000\u0000\u0000\u010f\u010d\u0001\u0000\u0000"+ + "\u0000\u0110\u001b\u0001\u0000\u0000\u0000\u0111\u0112\u0005\f\u0000\u0000"+ + "\u0112\u0113\u0003\u001e\u000f\u0000\u0113\u0114\u0006\u000e\uffff\uffff"+ + "\u0000\u0114\u0115\u0005\r\u0000\u0000\u0115\u001d\u0001\u0000\u0000\u0000"+ + "\u0116\u0117\u0003 \u0010\u0000\u0117\u011e\u0006\u000f\uffff\uffff\u0000"+ + "\u0118\u0119\u0005\u0015\u0000\u0000\u0119\u011a\u0003 \u0010\u0000\u011a"+ + "\u011b\u0006\u000f\uffff\uffff\u0000\u011b\u011d\u0001\u0000\u0000\u0000"+ + "\u011c\u0118\u0001\u0000\u0000\u0000\u011d\u0120\u0001\u0000\u0000\u0000"+ + "\u011e\u011c\u0001\u0000\u0000\u0000\u011e\u011f\u0001\u0000\u0000\u0000"+ + "\u011f\u001f\u0001\u0000\u0000\u0000\u0120\u011e\u0001\u0000\u0000\u0000"+ + "\u0121\u0122\u0005 \u0000\u0000\u0122\u012c\u0006\u0010\uffff\uffff\u0000"+ + "\u0123\u0124\u0005\u001b\u0000\u0000\u0124\u012c\u0006\u0010\uffff\uffff"+ + "\u0000\u0125\u0126\u0005\u001c\u0000\u0000\u0126\u012c\u0006\u0010\uffff"+ + "\uffff\u0000\u0127\u0128\u0005\u001d\u0000\u0000\u0128\u012c\u0006\u0010"+ + "\uffff\uffff\u0000\u0129\u012a\u0005\u001e\u0000\u0000\u012a\u012c\u0006"+ + "\u0010\uffff\uffff\u0000\u012b\u0121\u0001\u0000\u0000\u0000\u012b\u0123"+ + "\u0001\u0000\u0000\u0000\u012b\u0125\u0001\u0000\u0000\u0000\u012b\u0127"+ + "\u0001\u0000\u0000\u0000\u012b\u0129\u0001\u0000\u0000\u0000\u012c!\u0001"+ + "\u0000\u0000\u0000\u012d\u012e\u0003&\u0013\u0000\u012e\u012f\u0003$\u0012"+ + "\u0000\u012f\u0130\u0006\u0011\uffff\uffff\u0000\u0130#\u0001\u0000\u0000"+ + "\u0000\u0131\u0135\u0001\u0000\u0000\u0000\u0132\u0135\u0005\u001d\u0000"+ + "\u0000\u0133\u0135\u0005\u001e\u0000\u0000\u0134\u0131\u0001\u0000\u0000"+ + "\u0000\u0134\u0132\u0001\u0000\u0000\u0000\u0134\u0133\u0001\u0000\u0000"+ + "\u0000\u0135%\u0001\u0000\u0000\u0000\u0136\u0137\u0007\u0000\u0000\u0000"+ + "\u0137\'\u0001\u0000\u0000\u0000\u001f),147;Eknv\u0083\u0094\u009f\u00a3"+ + "\u00af\u00b3\u00bf\u00c3\u00c9\u00d0\u00dd\u00e4\u00f0\u00f7\u00fc\u0103"+ + "\u0108\u010f\u011e\u012b\u0134"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.tokens b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.tokens index d3d7a228e6..d384822c9a 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.tokens +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarExpression.tokens @@ -4,39 +4,40 @@ THEN=3 ELSE=4 END=5 WITH=6 -ROOT=7 -BLOCK_COMMENT=8 -HORZ_WS=9 -VERT_WS=10 -LBRACE=11 -RBRACE=12 -DOT=13 -LPAREN=14 -RPAREN=15 -LBRACK=16 -RBRACK=17 -DQUESTION=18 -SEMI=19 -COMMA=20 -STAR=21 -SLASH=22 -PERCENT=23 -PLUS=24 -MINUS=25 -DSTRING=26 -SSTRING=27 -DECDIGITS=28 -FLOAT=29 -BOOLEAN=30 -ID=31 -CAST_TYPE=32 -ERR_CHAR=33 -C_HORZ_WS=34 -C_VERT_WS=35 -CERR_CHAR=36 +VAR_ID=7 +ROOT=8 +BLOCK_COMMENT=9 +HORZ_WS=10 +VERT_WS=11 +LBRACE=12 +RBRACE=13 +DOT=14 +LPAREN=15 +RPAREN=16 +LBRACK=17 +RBRACK=18 +DQUESTION=19 +SEMI=20 +COMMA=21 +STAR=22 +SLASH=23 +PERCENT=24 +PLUS=25 +MINUS=26 +DSTRING=27 +SSTRING=28 +DECDIGITS=29 +FLOAT=30 +BOOLEAN=31 +ID=32 +CAST_TYPE=33 +ERR_CHAR=34 +C_HORZ_WS=35 +C_VERT_WS=36 +CERR_CHAR=37 'if'=2 'then'=3 'else'=4 'end'=5 'with'=6 -'$'=7 +'$'=8 diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarListener.java b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarListener.java index 685c27d7a7..7ad8a6c98e 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarListener.java +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateGrammarListener.java @@ -5,6 +5,7 @@ import oap.template.tree.*; import oap.template.tree.BlockIfElement; import oap.template.tree.BlockWithElement; +import oap.template.tree.BlockRangeElement; import org.apache.commons.lang3.StringUtils; import java.lang.reflect.Method; @@ -59,6 +60,16 @@ public interface TemplateGrammarListener extends ParseTreeListener { * @param ctx the parse tree */ void exitBlockWithElement(TemplateGrammar.BlockWithElementContext ctx); + /** + * Enter a parse tree produced by {@link TemplateGrammar#blockRangeElement}. + * @param ctx the parse tree + */ + void enterBlockRangeElement(TemplateGrammar.BlockRangeElementContext ctx); + /** + * Exit a parse tree produced by {@link TemplateGrammar#blockRangeElement}. + * @param ctx the parse tree + */ + void exitBlockRangeElement(TemplateGrammar.BlockRangeElementContext ctx); /** * Enter a parse tree produced by {@link TemplateGrammar#blockBody}. * @param ctx the parse tree diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.interp b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.interp index 7ea4a81d20..963672b15e 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.interp +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.interp @@ -7,6 +7,7 @@ null null null null +null '{{-' null null @@ -22,6 +23,7 @@ null token symbolic names: null +STARTBLOCKRANGE STARTBLOCKWITH STARTBLOCKIF_LTRIM STARTBLOCKIF @@ -47,6 +49,7 @@ StartEscExpr StartExpr StartExpr2 EndExpr2 +STARTBLOCKRANGE STARTBLOCKWITH STARTBLOCKIF_LTRIM STARTBLOCKIF @@ -80,4 +83,4 @@ Expression2 BlockIfContent atn: -[4, 0, 19, 237, 6, -1, 6, -1, 6, -1, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 5, 4, 73, 8, 4, 10, 4, 12, 4, 76, 9, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 4, 4, 84, 8, 4, 11, 4, 12, 4, 85, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 96, 8, 5, 10, 5, 12, 5, 99, 9, 5, 1, 5, 1, 5, 1, 5, 1, 5, 4, 5, 105, 8, 5, 11, 5, 12, 5, 106, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 116, 8, 6, 10, 6, 12, 6, 119, 9, 6, 1, 6, 1, 6, 1, 6, 1, 6, 4, 6, 125, 8, 6, 11, 6, 12, 6, 126, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 136, 8, 7, 10, 7, 12, 7, 139, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 147, 8, 7, 10, 7, 12, 7, 150, 9, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 160, 8, 8, 10, 8, 12, 8, 163, 9, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 170, 8, 8, 10, 8, 12, 8, 173, 9, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 4, 23, 229, 8, 23, 11, 23, 12, 23, 230, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 0, 0, 25, 4, 0, 6, 0, 8, 0, 10, 0, 12, 1, 14, 2, 16, 3, 18, 4, 20, 5, 22, 6, 24, 7, 26, 8, 28, 9, 30, 10, 32, 0, 34, 0, 36, 11, 38, 12, 40, 13, 42, 14, 44, 15, 46, 16, 48, 17, 50, 18, 52, 19, 4, 0, 1, 2, 3, 2, 2, 0, 9, 9, 32, 32, 1, 0, 125, 125, 238, 0, 12, 1, 0, 0, 0, 0, 14, 1, 0, 0, 0, 0, 16, 1, 0, 0, 0, 0, 18, 1, 0, 0, 0, 0, 20, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 24, 1, 0, 0, 0, 0, 26, 1, 0, 0, 0, 0, 28, 1, 0, 0, 0, 0, 30, 1, 0, 0, 0, 1, 36, 1, 0, 0, 0, 1, 38, 1, 0, 0, 0, 1, 40, 1, 0, 0, 0, 2, 42, 1, 0, 0, 0, 2, 44, 1, 0, 0, 0, 2, 46, 1, 0, 0, 0, 2, 48, 1, 0, 0, 0, 3, 50, 1, 0, 0, 0, 3, 52, 1, 0, 0, 0, 4, 54, 1, 0, 0, 0, 6, 58, 1, 0, 0, 0, 8, 61, 1, 0, 0, 0, 10, 64, 1, 0, 0, 0, 12, 67, 1, 0, 0, 0, 14, 89, 1, 0, 0, 0, 16, 110, 1, 0, 0, 0, 18, 130, 1, 0, 0, 0, 20, 154, 1, 0, 0, 0, 22, 177, 1, 0, 0, 0, 24, 181, 1, 0, 0, 0, 26, 185, 1, 0, 0, 0, 28, 191, 1, 0, 0, 0, 30, 195, 1, 0, 0, 0, 32, 197, 1, 0, 0, 0, 34, 199, 1, 0, 0, 0, 36, 201, 1, 0, 0, 0, 38, 205, 1, 0, 0, 0, 40, 209, 1, 0, 0, 0, 42, 211, 1, 0, 0, 0, 44, 215, 1, 0, 0, 0, 46, 221, 1, 0, 0, 0, 48, 225, 1, 0, 0, 0, 50, 228, 1, 0, 0, 0, 52, 232, 1, 0, 0, 0, 54, 55, 5, 36, 0, 0, 55, 56, 5, 36, 0, 0, 56, 57, 5, 123, 0, 0, 57, 5, 1, 0, 0, 0, 58, 59, 5, 36, 0, 0, 59, 60, 5, 123, 0, 0, 60, 7, 1, 0, 0, 0, 61, 62, 5, 123, 0, 0, 62, 63, 5, 123, 0, 0, 63, 9, 1, 0, 0, 0, 64, 65, 5, 125, 0, 0, 65, 66, 5, 125, 0, 0, 66, 11, 1, 0, 0, 0, 67, 68, 5, 123, 0, 0, 68, 69, 5, 123, 0, 0, 69, 70, 5, 37, 0, 0, 70, 74, 1, 0, 0, 0, 71, 73, 7, 0, 0, 0, 72, 71, 1, 0, 0, 0, 73, 76, 1, 0, 0, 0, 74, 72, 1, 0, 0, 0, 74, 75, 1, 0, 0, 0, 75, 77, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 77, 78, 5, 119, 0, 0, 78, 79, 5, 105, 0, 0, 79, 80, 5, 116, 0, 0, 80, 81, 5, 104, 0, 0, 81, 83, 1, 0, 0, 0, 82, 84, 7, 0, 0, 0, 83, 82, 1, 0, 0, 0, 84, 85, 1, 0, 0, 0, 85, 83, 1, 0, 0, 0, 85, 86, 1, 0, 0, 0, 86, 87, 1, 0, 0, 0, 87, 88, 6, 4, 0, 0, 88, 13, 1, 0, 0, 0, 89, 90, 5, 123, 0, 0, 90, 91, 5, 123, 0, 0, 91, 92, 5, 37, 0, 0, 92, 93, 5, 45, 0, 0, 93, 97, 1, 0, 0, 0, 94, 96, 7, 0, 0, 0, 95, 94, 1, 0, 0, 0, 96, 99, 1, 0, 0, 0, 97, 95, 1, 0, 0, 0, 97, 98, 1, 0, 0, 0, 98, 100, 1, 0, 0, 0, 99, 97, 1, 0, 0, 0, 100, 101, 5, 105, 0, 0, 101, 102, 5, 102, 0, 0, 102, 104, 1, 0, 0, 0, 103, 105, 7, 0, 0, 0, 104, 103, 1, 0, 0, 0, 105, 106, 1, 0, 0, 0, 106, 104, 1, 0, 0, 0, 106, 107, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 109, 6, 5, 0, 0, 109, 15, 1, 0, 0, 0, 110, 111, 5, 123, 0, 0, 111, 112, 5, 123, 0, 0, 112, 113, 5, 37, 0, 0, 113, 117, 1, 0, 0, 0, 114, 116, 7, 0, 0, 0, 115, 114, 1, 0, 0, 0, 116, 119, 1, 0, 0, 0, 117, 115, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 120, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 120, 121, 5, 105, 0, 0, 121, 122, 5, 102, 0, 0, 122, 124, 1, 0, 0, 0, 123, 125, 7, 0, 0, 0, 124, 123, 1, 0, 0, 0, 125, 126, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 128, 1, 0, 0, 0, 128, 129, 6, 6, 0, 0, 129, 17, 1, 0, 0, 0, 130, 131, 5, 123, 0, 0, 131, 132, 5, 123, 0, 0, 132, 133, 5, 37, 0, 0, 133, 137, 1, 0, 0, 0, 134, 136, 7, 0, 0, 0, 135, 134, 1, 0, 0, 0, 136, 139, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 140, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 140, 141, 5, 101, 0, 0, 141, 142, 5, 108, 0, 0, 142, 143, 5, 115, 0, 0, 143, 144, 5, 101, 0, 0, 144, 148, 1, 0, 0, 0, 145, 147, 7, 0, 0, 0, 146, 145, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 151, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 152, 5, 125, 0, 0, 152, 153, 5, 125, 0, 0, 153, 19, 1, 0, 0, 0, 154, 155, 5, 123, 0, 0, 155, 156, 5, 123, 0, 0, 156, 157, 5, 37, 0, 0, 157, 161, 1, 0, 0, 0, 158, 160, 7, 0, 0, 0, 159, 158, 1, 0, 0, 0, 160, 163, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 164, 1, 0, 0, 0, 163, 161, 1, 0, 0, 0, 164, 165, 5, 101, 0, 0, 165, 166, 5, 110, 0, 0, 166, 167, 5, 100, 0, 0, 167, 171, 1, 0, 0, 0, 168, 170, 7, 0, 0, 0, 169, 168, 1, 0, 0, 0, 170, 173, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 174, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 174, 175, 5, 125, 0, 0, 175, 176, 5, 125, 0, 0, 176, 21, 1, 0, 0, 0, 177, 178, 3, 4, 0, 0, 178, 179, 1, 0, 0, 0, 179, 180, 6, 9, 1, 0, 180, 23, 1, 0, 0, 0, 181, 182, 3, 6, 1, 0, 182, 183, 1, 0, 0, 0, 183, 184, 6, 10, 1, 0, 184, 25, 1, 0, 0, 0, 185, 186, 5, 123, 0, 0, 186, 187, 5, 123, 0, 0, 187, 188, 5, 45, 0, 0, 188, 189, 1, 0, 0, 0, 189, 190, 6, 11, 2, 0, 190, 27, 1, 0, 0, 0, 191, 192, 3, 8, 2, 0, 192, 193, 1, 0, 0, 0, 193, 194, 6, 12, 2, 0, 194, 29, 1, 0, 0, 0, 195, 196, 9, 0, 0, 0, 196, 31, 1, 0, 0, 0, 197, 198, 5, 123, 0, 0, 198, 33, 1, 0, 0, 0, 199, 200, 5, 125, 0, 0, 200, 35, 1, 0, 0, 0, 201, 202, 3, 32, 14, 0, 202, 203, 1, 0, 0, 0, 203, 204, 6, 16, 1, 0, 204, 37, 1, 0, 0, 0, 205, 206, 3, 34, 15, 0, 206, 207, 1, 0, 0, 0, 207, 208, 6, 17, 3, 0, 208, 39, 1, 0, 0, 0, 209, 210, 9, 0, 0, 0, 210, 41, 1, 0, 0, 0, 211, 212, 3, 32, 14, 0, 212, 213, 1, 0, 0, 0, 213, 214, 6, 19, 1, 0, 214, 43, 1, 0, 0, 0, 215, 216, 5, 45, 0, 0, 216, 217, 5, 125, 0, 0, 217, 218, 5, 125, 0, 0, 218, 219, 1, 0, 0, 0, 219, 220, 6, 20, 3, 0, 220, 45, 1, 0, 0, 0, 221, 222, 3, 10, 3, 0, 222, 223, 1, 0, 0, 0, 223, 224, 6, 21, 3, 0, 224, 47, 1, 0, 0, 0, 225, 226, 9, 0, 0, 0, 226, 49, 1, 0, 0, 0, 227, 229, 8, 1, 0, 0, 228, 227, 1, 0, 0, 0, 229, 230, 1, 0, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 51, 1, 0, 0, 0, 232, 233, 5, 125, 0, 0, 233, 234, 5, 125, 0, 0, 234, 235, 1, 0, 0, 0, 235, 236, 6, 24, 3, 0, 236, 53, 1, 0, 0, 0, 15, 0, 1, 2, 3, 74, 85, 97, 106, 117, 126, 137, 148, 161, 171, 230, 4, 5, 3, 0, 5, 1, 0, 5, 2, 0, 4, 0, 0] \ No newline at end of file +[4, 0, 20, 262, 6, -1, 6, -1, 6, -1, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 5, 4, 75, 8, 4, 10, 4, 12, 4, 78, 9, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 4, 4, 87, 8, 4, 11, 4, 12, 4, 88, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 98, 8, 5, 10, 5, 12, 5, 101, 9, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 4, 5, 109, 8, 5, 11, 5, 12, 5, 110, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 121, 8, 6, 10, 6, 12, 6, 124, 9, 6, 1, 6, 1, 6, 1, 6, 1, 6, 4, 6, 130, 8, 6, 11, 6, 12, 6, 131, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 141, 8, 7, 10, 7, 12, 7, 144, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 4, 7, 150, 8, 7, 11, 7, 12, 7, 151, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 161, 8, 8, 10, 8, 12, 8, 164, 9, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 5, 8, 172, 8, 8, 10, 8, 12, 8, 175, 9, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 185, 8, 9, 10, 9, 12, 9, 188, 9, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 195, 8, 9, 10, 9, 12, 9, 198, 9, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 4, 24, 254, 8, 24, 11, 24, 12, 24, 255, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 0, 0, 26, 4, 0, 6, 0, 8, 0, 10, 0, 12, 1, 14, 2, 16, 3, 18, 4, 20, 5, 22, 6, 24, 7, 26, 8, 28, 9, 30, 10, 32, 11, 34, 0, 36, 0, 38, 12, 40, 13, 42, 14, 44, 15, 46, 16, 48, 17, 50, 18, 52, 19, 54, 20, 4, 0, 1, 2, 3, 2, 2, 0, 9, 9, 32, 32, 1, 0, 125, 125, 265, 0, 12, 1, 0, 0, 0, 0, 14, 1, 0, 0, 0, 0, 16, 1, 0, 0, 0, 0, 18, 1, 0, 0, 0, 0, 20, 1, 0, 0, 0, 0, 22, 1, 0, 0, 0, 0, 24, 1, 0, 0, 0, 0, 26, 1, 0, 0, 0, 0, 28, 1, 0, 0, 0, 0, 30, 1, 0, 0, 0, 0, 32, 1, 0, 0, 0, 1, 38, 1, 0, 0, 0, 1, 40, 1, 0, 0, 0, 1, 42, 1, 0, 0, 0, 2, 44, 1, 0, 0, 0, 2, 46, 1, 0, 0, 0, 2, 48, 1, 0, 0, 0, 2, 50, 1, 0, 0, 0, 3, 52, 1, 0, 0, 0, 3, 54, 1, 0, 0, 0, 4, 56, 1, 0, 0, 0, 6, 60, 1, 0, 0, 0, 8, 63, 1, 0, 0, 0, 10, 66, 1, 0, 0, 0, 12, 69, 1, 0, 0, 0, 14, 92, 1, 0, 0, 0, 16, 114, 1, 0, 0, 0, 18, 135, 1, 0, 0, 0, 20, 155, 1, 0, 0, 0, 22, 179, 1, 0, 0, 0, 24, 202, 1, 0, 0, 0, 26, 206, 1, 0, 0, 0, 28, 210, 1, 0, 0, 0, 30, 216, 1, 0, 0, 0, 32, 220, 1, 0, 0, 0, 34, 222, 1, 0, 0, 0, 36, 224, 1, 0, 0, 0, 38, 226, 1, 0, 0, 0, 40, 230, 1, 0, 0, 0, 42, 234, 1, 0, 0, 0, 44, 236, 1, 0, 0, 0, 46, 240, 1, 0, 0, 0, 48, 246, 1, 0, 0, 0, 50, 250, 1, 0, 0, 0, 52, 253, 1, 0, 0, 0, 54, 257, 1, 0, 0, 0, 56, 57, 5, 36, 0, 0, 57, 58, 5, 36, 0, 0, 58, 59, 5, 123, 0, 0, 59, 5, 1, 0, 0, 0, 60, 61, 5, 36, 0, 0, 61, 62, 5, 123, 0, 0, 62, 7, 1, 0, 0, 0, 63, 64, 5, 123, 0, 0, 64, 65, 5, 123, 0, 0, 65, 9, 1, 0, 0, 0, 66, 67, 5, 125, 0, 0, 67, 68, 5, 125, 0, 0, 68, 11, 1, 0, 0, 0, 69, 70, 5, 123, 0, 0, 70, 71, 5, 123, 0, 0, 71, 72, 5, 37, 0, 0, 72, 76, 1, 0, 0, 0, 73, 75, 7, 0, 0, 0, 74, 73, 1, 0, 0, 0, 75, 78, 1, 0, 0, 0, 76, 74, 1, 0, 0, 0, 76, 77, 1, 0, 0, 0, 77, 79, 1, 0, 0, 0, 78, 76, 1, 0, 0, 0, 79, 80, 5, 114, 0, 0, 80, 81, 5, 97, 0, 0, 81, 82, 5, 110, 0, 0, 82, 83, 5, 103, 0, 0, 83, 84, 5, 101, 0, 0, 84, 86, 1, 0, 0, 0, 85, 87, 7, 0, 0, 0, 86, 85, 1, 0, 0, 0, 87, 88, 1, 0, 0, 0, 88, 86, 1, 0, 0, 0, 88, 89, 1, 0, 0, 0, 89, 90, 1, 0, 0, 0, 90, 91, 6, 4, 0, 0, 91, 13, 1, 0, 0, 0, 92, 93, 5, 123, 0, 0, 93, 94, 5, 123, 0, 0, 94, 95, 5, 37, 0, 0, 95, 99, 1, 0, 0, 0, 96, 98, 7, 0, 0, 0, 97, 96, 1, 0, 0, 0, 98, 101, 1, 0, 0, 0, 99, 97, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100, 102, 1, 0, 0, 0, 101, 99, 1, 0, 0, 0, 102, 103, 5, 119, 0, 0, 103, 104, 5, 105, 0, 0, 104, 105, 5, 116, 0, 0, 105, 106, 5, 104, 0, 0, 106, 108, 1, 0, 0, 0, 107, 109, 7, 0, 0, 0, 108, 107, 1, 0, 0, 0, 109, 110, 1, 0, 0, 0, 110, 108, 1, 0, 0, 0, 110, 111, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 113, 6, 5, 0, 0, 113, 15, 1, 0, 0, 0, 114, 115, 5, 123, 0, 0, 115, 116, 5, 123, 0, 0, 116, 117, 5, 37, 0, 0, 117, 118, 5, 45, 0, 0, 118, 122, 1, 0, 0, 0, 119, 121, 7, 0, 0, 0, 120, 119, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 125, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 126, 5, 105, 0, 0, 126, 127, 5, 102, 0, 0, 127, 129, 1, 0, 0, 0, 128, 130, 7, 0, 0, 0, 129, 128, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, 131, 129, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 133, 1, 0, 0, 0, 133, 134, 6, 6, 0, 0, 134, 17, 1, 0, 0, 0, 135, 136, 5, 123, 0, 0, 136, 137, 5, 123, 0, 0, 137, 138, 5, 37, 0, 0, 138, 142, 1, 0, 0, 0, 139, 141, 7, 0, 0, 0, 140, 139, 1, 0, 0, 0, 141, 144, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 145, 1, 0, 0, 0, 144, 142, 1, 0, 0, 0, 145, 146, 5, 105, 0, 0, 146, 147, 5, 102, 0, 0, 147, 149, 1, 0, 0, 0, 148, 150, 7, 0, 0, 0, 149, 148, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 149, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 154, 6, 7, 0, 0, 154, 19, 1, 0, 0, 0, 155, 156, 5, 123, 0, 0, 156, 157, 5, 123, 0, 0, 157, 158, 5, 37, 0, 0, 158, 162, 1, 0, 0, 0, 159, 161, 7, 0, 0, 0, 160, 159, 1, 0, 0, 0, 161, 164, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 165, 1, 0, 0, 0, 164, 162, 1, 0, 0, 0, 165, 166, 5, 101, 0, 0, 166, 167, 5, 108, 0, 0, 167, 168, 5, 115, 0, 0, 168, 169, 5, 101, 0, 0, 169, 173, 1, 0, 0, 0, 170, 172, 7, 0, 0, 0, 171, 170, 1, 0, 0, 0, 172, 175, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 173, 174, 1, 0, 0, 0, 174, 176, 1, 0, 0, 0, 175, 173, 1, 0, 0, 0, 176, 177, 5, 125, 0, 0, 177, 178, 5, 125, 0, 0, 178, 21, 1, 0, 0, 0, 179, 180, 5, 123, 0, 0, 180, 181, 5, 123, 0, 0, 181, 182, 5, 37, 0, 0, 182, 186, 1, 0, 0, 0, 183, 185, 7, 0, 0, 0, 184, 183, 1, 0, 0, 0, 185, 188, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 189, 1, 0, 0, 0, 188, 186, 1, 0, 0, 0, 189, 190, 5, 101, 0, 0, 190, 191, 5, 110, 0, 0, 191, 192, 5, 100, 0, 0, 192, 196, 1, 0, 0, 0, 193, 195, 7, 0, 0, 0, 194, 193, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 199, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 200, 5, 125, 0, 0, 200, 201, 5, 125, 0, 0, 201, 23, 1, 0, 0, 0, 202, 203, 3, 4, 0, 0, 203, 204, 1, 0, 0, 0, 204, 205, 6, 10, 1, 0, 205, 25, 1, 0, 0, 0, 206, 207, 3, 6, 1, 0, 207, 208, 1, 0, 0, 0, 208, 209, 6, 11, 1, 0, 209, 27, 1, 0, 0, 0, 210, 211, 5, 123, 0, 0, 211, 212, 5, 123, 0, 0, 212, 213, 5, 45, 0, 0, 213, 214, 1, 0, 0, 0, 214, 215, 6, 12, 2, 0, 215, 29, 1, 0, 0, 0, 216, 217, 3, 8, 2, 0, 217, 218, 1, 0, 0, 0, 218, 219, 6, 13, 2, 0, 219, 31, 1, 0, 0, 0, 220, 221, 9, 0, 0, 0, 221, 33, 1, 0, 0, 0, 222, 223, 5, 123, 0, 0, 223, 35, 1, 0, 0, 0, 224, 225, 5, 125, 0, 0, 225, 37, 1, 0, 0, 0, 226, 227, 3, 34, 15, 0, 227, 228, 1, 0, 0, 0, 228, 229, 6, 17, 1, 0, 229, 39, 1, 0, 0, 0, 230, 231, 3, 36, 16, 0, 231, 232, 1, 0, 0, 0, 232, 233, 6, 18, 3, 0, 233, 41, 1, 0, 0, 0, 234, 235, 9, 0, 0, 0, 235, 43, 1, 0, 0, 0, 236, 237, 3, 34, 15, 0, 237, 238, 1, 0, 0, 0, 238, 239, 6, 20, 1, 0, 239, 45, 1, 0, 0, 0, 240, 241, 5, 45, 0, 0, 241, 242, 5, 125, 0, 0, 242, 243, 5, 125, 0, 0, 243, 244, 1, 0, 0, 0, 244, 245, 6, 21, 3, 0, 245, 47, 1, 0, 0, 0, 246, 247, 3, 10, 3, 0, 247, 248, 1, 0, 0, 0, 248, 249, 6, 22, 3, 0, 249, 49, 1, 0, 0, 0, 250, 251, 9, 0, 0, 0, 251, 51, 1, 0, 0, 0, 252, 254, 8, 1, 0, 0, 253, 252, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 253, 1, 0, 0, 0, 255, 256, 1, 0, 0, 0, 256, 53, 1, 0, 0, 0, 257, 258, 5, 125, 0, 0, 258, 259, 5, 125, 0, 0, 259, 260, 1, 0, 0, 0, 260, 261, 6, 25, 3, 0, 261, 55, 1, 0, 0, 0, 17, 0, 1, 2, 3, 76, 88, 99, 110, 122, 131, 142, 151, 162, 173, 186, 196, 255, 4, 5, 3, 0, 5, 1, 0, 5, 2, 0, 4, 0, 0] \ No newline at end of file diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.java b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.java index 6edf61c5a7..56a8413242 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.java +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.java @@ -19,10 +19,10 @@ public class TemplateLexer extends Lexer { protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int - STARTBLOCKWITH=1, STARTBLOCKIF_LTRIM=2, STARTBLOCKIF=3, STARTBLOCKELSE=4, - STARTBLOCKEND=5, STARTESCEXPR=6, STARTEXPR=7, STARTEXPR2_LTRIM=8, STARTEXPR2=9, - TEXT=10, LBRACE=11, RBRACE=12, EXPRESSION=13, LBRACE2=14, RBRACE2_RTRIM=15, - RBRACE2=16, EXPRESSION2=17, BLOCK_IF_CONTENT=18, BLOCK_IF_RBRACE=19; + STARTBLOCKRANGE=1, STARTBLOCKWITH=2, STARTBLOCKIF_LTRIM=3, STARTBLOCKIF=4, + STARTBLOCKELSE=5, STARTBLOCKEND=6, STARTESCEXPR=7, STARTEXPR=8, STARTEXPR2_LTRIM=9, + STARTEXPR2=10, TEXT=11, LBRACE=12, RBRACE=13, EXPRESSION=14, LBRACE2=15, + RBRACE2_RTRIM=16, RBRACE2=17, EXPRESSION2=18, BLOCK_IF_CONTENT=19, BLOCK_IF_RBRACE=20; public static final int Expression=1, Expression2=2, BlockIfContent=3; public static String[] channelNames = { @@ -35,27 +35,27 @@ public class TemplateLexer extends Lexer { private static String[] makeRuleNames() { return new String[] { - "StartEscExpr", "StartExpr", "StartExpr2", "EndExpr2", "STARTBLOCKWITH", - "STARTBLOCKIF_LTRIM", "STARTBLOCKIF", "STARTBLOCKELSE", "STARTBLOCKEND", - "STARTESCEXPR", "STARTEXPR", "STARTEXPR2_LTRIM", "STARTEXPR2", "TEXT", - "LBrace", "RBrace", "LBRACE", "RBRACE", "EXPRESSION", "LBRACE2", "RBRACE2_RTRIM", - "RBRACE2", "EXPRESSION2", "BLOCK_IF_CONTENT", "BLOCK_IF_RBRACE" + "StartEscExpr", "StartExpr", "StartExpr2", "EndExpr2", "STARTBLOCKRANGE", + "STARTBLOCKWITH", "STARTBLOCKIF_LTRIM", "STARTBLOCKIF", "STARTBLOCKELSE", + "STARTBLOCKEND", "STARTESCEXPR", "STARTEXPR", "STARTEXPR2_LTRIM", "STARTEXPR2", + "TEXT", "LBrace", "RBrace", "LBRACE", "RBRACE", "EXPRESSION", "LBRACE2", + "RBRACE2_RTRIM", "RBRACE2", "EXPRESSION2", "BLOCK_IF_CONTENT", "BLOCK_IF_RBRACE" }; } public static final String[] ruleNames = makeRuleNames(); private static String[] makeLiteralNames() { return new String[] { - null, null, null, null, null, null, null, null, "'{{-'", null, null, - null, null, null, null, "'-}}'", null, null, null, "'}}'" + null, null, null, null, null, null, null, null, null, "'{{-'", null, + null, null, null, null, null, "'-}}'", null, null, null, "'}}'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); private static String[] makeSymbolicNames() { return new String[] { - null, "STARTBLOCKWITH", "STARTBLOCKIF_LTRIM", "STARTBLOCKIF", "STARTBLOCKELSE", - "STARTBLOCKEND", "STARTESCEXPR", "STARTEXPR", "STARTEXPR2_LTRIM", "STARTEXPR2", - "TEXT", "LBRACE", "RBRACE", "EXPRESSION", "LBRACE2", "RBRACE2_RTRIM", + null, "STARTBLOCKRANGE", "STARTBLOCKWITH", "STARTBLOCKIF_LTRIM", "STARTBLOCKIF", + "STARTBLOCKELSE", "STARTBLOCKEND", "STARTESCEXPR", "STARTEXPR", "STARTEXPR2_LTRIM", + "STARTEXPR2", "TEXT", "LBRACE", "RBRACE", "EXPRESSION", "LBRACE2", "RBRACE2_RTRIM", "RBRACE2", "EXPRESSION2", "BLOCK_IF_CONTENT", "BLOCK_IF_RBRACE" }; } @@ -118,7 +118,7 @@ public TemplateLexer(CharStream input) { public ATN getATN() { return _ATN; } public static final String _serializedATN = - "\u0004\u0000\u0013\u00ed\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff"+ + "\u0004\u0000\u0014\u0106\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff"+ "\uffff\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001"+ "\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004"+ "\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007\u0007\u0007"+ @@ -127,140 +127,157 @@ public TemplateLexer(CharStream input) { "\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002\u0012\u0007"+ "\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002\u0015\u0007"+ "\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002\u0018\u0007"+ - "\u0018\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001"+ - "\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001"+ - "\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ - "\u0004\u0005\u0004I\b\u0004\n\u0004\f\u0004L\t\u0004\u0001\u0004\u0001"+ - "\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0004\u0004T\b"+ - "\u0004\u000b\u0004\f\u0004U\u0001\u0004\u0001\u0004\u0001\u0005\u0001"+ - "\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0005\u0005`\b"+ - "\u0005\n\u0005\f\u0005c\t\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001"+ - "\u0005\u0004\u0005i\b\u0005\u000b\u0005\f\u0005j\u0001\u0005\u0001\u0005"+ - "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0005\u0006"+ - "t\b\u0006\n\u0006\f\u0006w\t\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+ - "\u0001\u0006\u0004\u0006}\b\u0006\u000b\u0006\f\u0006~\u0001\u0006\u0001"+ + "\u0018\u0002\u0019\u0007\u0019\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+ + "\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001\u0002\u0001"+ + "\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0004\u0001\u0004\u0005\u0004K\b\u0004\n\u0004\f\u0004N\t"+ + "\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+ + "\u0004\u0001\u0004\u0004\u0004W\b\u0004\u000b\u0004\f\u0004X\u0001\u0004"+ + "\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+ + "\u0005\u0005b\b\u0005\n\u0005\f\u0005e\t\u0005\u0001\u0005\u0001\u0005"+ + "\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0004\u0005m\b\u0005"+ + "\u000b\u0005\f\u0005n\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006"+ + "\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0005\u0006y\b\u0006"+ + "\n\u0006\f\u0006|\t\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006"+ + "\u0004\u0006\u0082\b\u0006\u000b\u0006\f\u0006\u0083\u0001\u0006\u0001"+ "\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0005"+ - "\u0007\u0088\b\u0007\n\u0007\f\u0007\u008b\t\u0007\u0001\u0007\u0001\u0007"+ - "\u0001\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0005\u0007\u0093\b\u0007"+ - "\n\u0007\f\u0007\u0096\t\u0007\u0001\u0007\u0001\u0007\u0001\u0007\u0001"+ - "\b\u0001\b\u0001\b\u0001\b\u0001\b\u0005\b\u00a0\b\b\n\b\f\b\u00a3\t\b"+ - "\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b\u0005\b\u00aa\b\b\n\b\f\b\u00ad"+ - "\t\b\u0001\b\u0001\b\u0001\b\u0001\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001"+ - "\n\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001"+ - "\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001"+ - "\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001"+ - "\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001"+ - "\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001"+ - "\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001"+ - "\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001"+ - "\u0017\u0004\u0017\u00e5\b\u0017\u000b\u0017\f\u0017\u00e6\u0001\u0018"+ - "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0000\u0000\u0019\u0004"+ - "\u0000\u0006\u0000\b\u0000\n\u0000\f\u0001\u000e\u0002\u0010\u0003\u0012"+ - "\u0004\u0014\u0005\u0016\u0006\u0018\u0007\u001a\b\u001c\t\u001e\n \u0000"+ - "\"\u0000$\u000b&\f(\r*\u000e,\u000f.\u00100\u00112\u00124\u0013\u0004"+ - "\u0000\u0001\u0002\u0003\u0002\u0002\u0000\t\t \u0001\u0000}}\u00ee\u0000"+ - "\f\u0001\u0000\u0000\u0000\u0000\u000e\u0001\u0000\u0000\u0000\u0000\u0010"+ - "\u0001\u0000\u0000\u0000\u0000\u0012\u0001\u0000\u0000\u0000\u0000\u0014"+ - "\u0001\u0000\u0000\u0000\u0000\u0016\u0001\u0000\u0000\u0000\u0000\u0018"+ - "\u0001\u0000\u0000\u0000\u0000\u001a\u0001\u0000\u0000\u0000\u0000\u001c"+ - "\u0001\u0000\u0000\u0000\u0000\u001e\u0001\u0000\u0000\u0000\u0001$\u0001"+ - "\u0000\u0000\u0000\u0001&\u0001\u0000\u0000\u0000\u0001(\u0001\u0000\u0000"+ - "\u0000\u0002*\u0001\u0000\u0000\u0000\u0002,\u0001\u0000\u0000\u0000\u0002"+ - ".\u0001\u0000\u0000\u0000\u00020\u0001\u0000\u0000\u0000\u00032\u0001"+ - "\u0000\u0000\u0000\u00034\u0001\u0000\u0000\u0000\u00046\u0001\u0000\u0000"+ - "\u0000\u0006:\u0001\u0000\u0000\u0000\b=\u0001\u0000\u0000\u0000\n@\u0001"+ - "\u0000\u0000\u0000\fC\u0001\u0000\u0000\u0000\u000eY\u0001\u0000\u0000"+ - "\u0000\u0010n\u0001\u0000\u0000\u0000\u0012\u0082\u0001\u0000\u0000\u0000"+ - "\u0014\u009a\u0001\u0000\u0000\u0000\u0016\u00b1\u0001\u0000\u0000\u0000"+ - "\u0018\u00b5\u0001\u0000\u0000\u0000\u001a\u00b9\u0001\u0000\u0000\u0000"+ - "\u001c\u00bf\u0001\u0000\u0000\u0000\u001e\u00c3\u0001\u0000\u0000\u0000"+ - " \u00c5\u0001\u0000\u0000\u0000\"\u00c7\u0001\u0000\u0000\u0000$\u00c9"+ - "\u0001\u0000\u0000\u0000&\u00cd\u0001\u0000\u0000\u0000(\u00d1\u0001\u0000"+ - "\u0000\u0000*\u00d3\u0001\u0000\u0000\u0000,\u00d7\u0001\u0000\u0000\u0000"+ - ".\u00dd\u0001\u0000\u0000\u00000\u00e1\u0001\u0000\u0000\u00002\u00e4"+ - "\u0001\u0000\u0000\u00004\u00e8\u0001\u0000\u0000\u000067\u0005$\u0000"+ - "\u000078\u0005$\u0000\u000089\u0005{\u0000\u00009\u0005\u0001\u0000\u0000"+ - "\u0000:;\u0005$\u0000\u0000;<\u0005{\u0000\u0000<\u0007\u0001\u0000\u0000"+ - "\u0000=>\u0005{\u0000\u0000>?\u0005{\u0000\u0000?\t\u0001\u0000\u0000"+ - "\u0000@A\u0005}\u0000\u0000AB\u0005}\u0000\u0000B\u000b\u0001\u0000\u0000"+ - "\u0000CD\u0005{\u0000\u0000DE\u0005{\u0000\u0000EF\u0005%\u0000\u0000"+ - "FJ\u0001\u0000\u0000\u0000GI\u0007\u0000\u0000\u0000HG\u0001\u0000\u0000"+ - "\u0000IL\u0001\u0000\u0000\u0000JH\u0001\u0000\u0000\u0000JK\u0001\u0000"+ - "\u0000\u0000KM\u0001\u0000\u0000\u0000LJ\u0001\u0000\u0000\u0000MN\u0005"+ - "w\u0000\u0000NO\u0005i\u0000\u0000OP\u0005t\u0000\u0000PQ\u0005h\u0000"+ - "\u0000QS\u0001\u0000\u0000\u0000RT\u0007\u0000\u0000\u0000SR\u0001\u0000"+ - "\u0000\u0000TU\u0001\u0000\u0000\u0000US\u0001\u0000\u0000\u0000UV\u0001"+ - "\u0000\u0000\u0000VW\u0001\u0000\u0000\u0000WX\u0006\u0004\u0000\u0000"+ - "X\r\u0001\u0000\u0000\u0000YZ\u0005{\u0000\u0000Z[\u0005{\u0000\u0000"+ - "[\\\u0005%\u0000\u0000\\]\u0005-\u0000\u0000]a\u0001\u0000\u0000\u0000"+ - "^`\u0007\u0000\u0000\u0000_^\u0001\u0000\u0000\u0000`c\u0001\u0000\u0000"+ - "\u0000a_\u0001\u0000\u0000\u0000ab\u0001\u0000\u0000\u0000bd\u0001\u0000"+ - "\u0000\u0000ca\u0001\u0000\u0000\u0000de\u0005i\u0000\u0000ef\u0005f\u0000"+ - "\u0000fh\u0001\u0000\u0000\u0000gi\u0007\u0000\u0000\u0000hg\u0001\u0000"+ - "\u0000\u0000ij\u0001\u0000\u0000\u0000jh\u0001\u0000\u0000\u0000jk\u0001"+ - "\u0000\u0000\u0000kl\u0001\u0000\u0000\u0000lm\u0006\u0005\u0000\u0000"+ - "m\u000f\u0001\u0000\u0000\u0000no\u0005{\u0000\u0000op\u0005{\u0000\u0000"+ - "pq\u0005%\u0000\u0000qu\u0001\u0000\u0000\u0000rt\u0007\u0000\u0000\u0000"+ - "sr\u0001\u0000\u0000\u0000tw\u0001\u0000\u0000\u0000us\u0001\u0000\u0000"+ - "\u0000uv\u0001\u0000\u0000\u0000vx\u0001\u0000\u0000\u0000wu\u0001\u0000"+ - "\u0000\u0000xy\u0005i\u0000\u0000yz\u0005f\u0000\u0000z|\u0001\u0000\u0000"+ - "\u0000{}\u0007\u0000\u0000\u0000|{\u0001\u0000\u0000\u0000}~\u0001\u0000"+ - "\u0000\u0000~|\u0001\u0000\u0000\u0000~\u007f\u0001\u0000\u0000\u0000"+ - "\u007f\u0080\u0001\u0000\u0000\u0000\u0080\u0081\u0006\u0006\u0000\u0000"+ - "\u0081\u0011\u0001\u0000\u0000\u0000\u0082\u0083\u0005{\u0000\u0000\u0083"+ - "\u0084\u0005{\u0000\u0000\u0084\u0085\u0005%\u0000\u0000\u0085\u0089\u0001"+ - "\u0000\u0000\u0000\u0086\u0088\u0007\u0000\u0000\u0000\u0087\u0086\u0001"+ - "\u0000\u0000\u0000\u0088\u008b\u0001\u0000\u0000\u0000\u0089\u0087\u0001"+ - "\u0000\u0000\u0000\u0089\u008a\u0001\u0000\u0000\u0000\u008a\u008c\u0001"+ - "\u0000\u0000\u0000\u008b\u0089\u0001\u0000\u0000\u0000\u008c\u008d\u0005"+ - "e\u0000\u0000\u008d\u008e\u0005l\u0000\u0000\u008e\u008f\u0005s\u0000"+ - "\u0000\u008f\u0090\u0005e\u0000\u0000\u0090\u0094\u0001\u0000\u0000\u0000"+ - "\u0091\u0093\u0007\u0000\u0000\u0000\u0092\u0091\u0001\u0000\u0000\u0000"+ - "\u0093\u0096\u0001\u0000\u0000\u0000\u0094\u0092\u0001\u0000\u0000\u0000"+ - "\u0094\u0095\u0001\u0000\u0000\u0000\u0095\u0097\u0001\u0000\u0000\u0000"+ - "\u0096\u0094\u0001\u0000\u0000\u0000\u0097\u0098\u0005}\u0000\u0000\u0098"+ - "\u0099\u0005}\u0000\u0000\u0099\u0013\u0001\u0000\u0000\u0000\u009a\u009b"+ - "\u0005{\u0000\u0000\u009b\u009c\u0005{\u0000\u0000\u009c\u009d\u0005%"+ - "\u0000\u0000\u009d\u00a1\u0001\u0000\u0000\u0000\u009e\u00a0\u0007\u0000"+ - "\u0000\u0000\u009f\u009e\u0001\u0000\u0000\u0000\u00a0\u00a3\u0001\u0000"+ - "\u0000\u0000\u00a1\u009f\u0001\u0000\u0000\u0000\u00a1\u00a2\u0001\u0000"+ - "\u0000\u0000\u00a2\u00a4\u0001\u0000\u0000\u0000\u00a3\u00a1\u0001\u0000"+ - "\u0000\u0000\u00a4\u00a5\u0005e\u0000\u0000\u00a5\u00a6\u0005n\u0000\u0000"+ - "\u00a6\u00a7\u0005d\u0000\u0000\u00a7\u00ab\u0001\u0000\u0000\u0000\u00a8"+ - "\u00aa\u0007\u0000\u0000\u0000\u00a9\u00a8\u0001\u0000\u0000\u0000\u00aa"+ - "\u00ad\u0001\u0000\u0000\u0000\u00ab\u00a9\u0001\u0000\u0000\u0000\u00ab"+ - "\u00ac\u0001\u0000\u0000\u0000\u00ac\u00ae\u0001\u0000\u0000\u0000\u00ad"+ - "\u00ab\u0001\u0000\u0000\u0000\u00ae\u00af\u0005}\u0000\u0000\u00af\u00b0"+ - "\u0005}\u0000\u0000\u00b0\u0015\u0001\u0000\u0000\u0000\u00b1\u00b2\u0003"+ - "\u0004\u0000\u0000\u00b2\u00b3\u0001\u0000\u0000\u0000\u00b3\u00b4\u0006"+ - "\t\u0001\u0000\u00b4\u0017\u0001\u0000\u0000\u0000\u00b5\u00b6\u0003\u0006"+ - "\u0001\u0000\u00b6\u00b7\u0001\u0000\u0000\u0000\u00b7\u00b8\u0006\n\u0001"+ - "\u0000\u00b8\u0019\u0001\u0000\u0000\u0000\u00b9\u00ba\u0005{\u0000\u0000"+ - "\u00ba\u00bb\u0005{\u0000\u0000\u00bb\u00bc\u0005-\u0000\u0000\u00bc\u00bd"+ - "\u0001\u0000\u0000\u0000\u00bd\u00be\u0006\u000b\u0002\u0000\u00be\u001b"+ - "\u0001\u0000\u0000\u0000\u00bf\u00c0\u0003\b\u0002\u0000\u00c0\u00c1\u0001"+ - "\u0000\u0000\u0000\u00c1\u00c2\u0006\f\u0002\u0000\u00c2\u001d\u0001\u0000"+ - "\u0000\u0000\u00c3\u00c4\t\u0000\u0000\u0000\u00c4\u001f\u0001\u0000\u0000"+ - "\u0000\u00c5\u00c6\u0005{\u0000\u0000\u00c6!\u0001\u0000\u0000\u0000\u00c7"+ - "\u00c8\u0005}\u0000\u0000\u00c8#\u0001\u0000\u0000\u0000\u00c9\u00ca\u0003"+ - " \u000e\u0000\u00ca\u00cb\u0001\u0000\u0000\u0000\u00cb\u00cc\u0006\u0010"+ - "\u0001\u0000\u00cc%\u0001\u0000\u0000\u0000\u00cd\u00ce\u0003\"\u000f"+ - "\u0000\u00ce\u00cf\u0001\u0000\u0000\u0000\u00cf\u00d0\u0006\u0011\u0003"+ - "\u0000\u00d0\'\u0001\u0000\u0000\u0000\u00d1\u00d2\t\u0000\u0000\u0000"+ - "\u00d2)\u0001\u0000\u0000\u0000\u00d3\u00d4\u0003 \u000e\u0000\u00d4\u00d5"+ - "\u0001\u0000\u0000\u0000\u00d5\u00d6\u0006\u0013\u0001\u0000\u00d6+\u0001"+ - "\u0000\u0000\u0000\u00d7\u00d8\u0005-\u0000\u0000\u00d8\u00d9\u0005}\u0000"+ - "\u0000\u00d9\u00da\u0005}\u0000\u0000\u00da\u00db\u0001\u0000\u0000\u0000"+ - "\u00db\u00dc\u0006\u0014\u0003\u0000\u00dc-\u0001\u0000\u0000\u0000\u00dd"+ - "\u00de\u0003\n\u0003\u0000\u00de\u00df\u0001\u0000\u0000\u0000\u00df\u00e0"+ - "\u0006\u0015\u0003\u0000\u00e0/\u0001\u0000\u0000\u0000\u00e1\u00e2\t"+ - "\u0000\u0000\u0000\u00e21\u0001\u0000\u0000\u0000\u00e3\u00e5\b\u0001"+ - "\u0000\u0000\u00e4\u00e3\u0001\u0000\u0000\u0000\u00e5\u00e6\u0001\u0000"+ - "\u0000\u0000\u00e6\u00e4\u0001\u0000\u0000\u0000\u00e6\u00e7\u0001\u0000"+ - "\u0000\u0000\u00e73\u0001\u0000\u0000\u0000\u00e8\u00e9\u0005}\u0000\u0000"+ - "\u00e9\u00ea\u0005}\u0000\u0000\u00ea\u00eb\u0001\u0000\u0000\u0000\u00eb"+ - "\u00ec\u0006\u0018\u0003\u0000\u00ec5\u0001\u0000\u0000\u0000\u000f\u0000"+ - "\u0001\u0002\u0003JUaju~\u0089\u0094\u00a1\u00ab\u00e6\u0004\u0005\u0003"+ + "\u0007\u008d\b\u0007\n\u0007\f\u0007\u0090\t\u0007\u0001\u0007\u0001\u0007"+ + "\u0001\u0007\u0001\u0007\u0004\u0007\u0096\b\u0007\u000b\u0007\f\u0007"+ + "\u0097\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b"+ + "\u0005\b\u00a1\b\b\n\b\f\b\u00a4\t\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001"+ + "\b\u0001\b\u0005\b\u00ac\b\b\n\b\f\b\u00af\t\b\u0001\b\u0001\b\u0001\b"+ + "\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0005\t\u00b9\b\t\n\t\f\t\u00bc"+ + "\t\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\t\u0005\t\u00c3\b\t\n\t\f\t"+ + "\u00c6\t\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001"+ + "\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001"+ + "\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e"+ + "\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0011\u0001\u0011"+ + "\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012"+ + "\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014"+ + "\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015"+ + "\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017"+ + "\u0001\u0018\u0004\u0018\u00fe\b\u0018\u000b\u0018\f\u0018\u00ff\u0001"+ + "\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0001\u0019\u0000\u0000\u001a"+ + "\u0004\u0000\u0006\u0000\b\u0000\n\u0000\f\u0001\u000e\u0002\u0010\u0003"+ + "\u0012\u0004\u0014\u0005\u0016\u0006\u0018\u0007\u001a\b\u001c\t\u001e"+ + "\n \u000b\"\u0000$\u0000&\f(\r*\u000e,\u000f.\u00100\u00112\u00124\u0013"+ + "6\u0014\u0004\u0000\u0001\u0002\u0003\u0002\u0002\u0000\t\t \u0001\u0000"+ + "}}\u0109\u0000\f\u0001\u0000\u0000\u0000\u0000\u000e\u0001\u0000\u0000"+ + "\u0000\u0000\u0010\u0001\u0000\u0000\u0000\u0000\u0012\u0001\u0000\u0000"+ + "\u0000\u0000\u0014\u0001\u0000\u0000\u0000\u0000\u0016\u0001\u0000\u0000"+ + "\u0000\u0000\u0018\u0001\u0000\u0000\u0000\u0000\u001a\u0001\u0000\u0000"+ + "\u0000\u0000\u001c\u0001\u0000\u0000\u0000\u0000\u001e\u0001\u0000\u0000"+ + "\u0000\u0000 \u0001\u0000\u0000\u0000\u0001&\u0001\u0000\u0000\u0000\u0001"+ + "(\u0001\u0000\u0000\u0000\u0001*\u0001\u0000\u0000\u0000\u0002,\u0001"+ + "\u0000\u0000\u0000\u0002.\u0001\u0000\u0000\u0000\u00020\u0001\u0000\u0000"+ + "\u0000\u00022\u0001\u0000\u0000\u0000\u00034\u0001\u0000\u0000\u0000\u0003"+ + "6\u0001\u0000\u0000\u0000\u00048\u0001\u0000\u0000\u0000\u0006<\u0001"+ + "\u0000\u0000\u0000\b?\u0001\u0000\u0000\u0000\nB\u0001\u0000\u0000\u0000"+ + "\fE\u0001\u0000\u0000\u0000\u000e\\\u0001\u0000\u0000\u0000\u0010r\u0001"+ + "\u0000\u0000\u0000\u0012\u0087\u0001\u0000\u0000\u0000\u0014\u009b\u0001"+ + "\u0000\u0000\u0000\u0016\u00b3\u0001\u0000\u0000\u0000\u0018\u00ca\u0001"+ + "\u0000\u0000\u0000\u001a\u00ce\u0001\u0000\u0000\u0000\u001c\u00d2\u0001"+ + "\u0000\u0000\u0000\u001e\u00d8\u0001\u0000\u0000\u0000 \u00dc\u0001\u0000"+ + "\u0000\u0000\"\u00de\u0001\u0000\u0000\u0000$\u00e0\u0001\u0000\u0000"+ + "\u0000&\u00e2\u0001\u0000\u0000\u0000(\u00e6\u0001\u0000\u0000\u0000*"+ + "\u00ea\u0001\u0000\u0000\u0000,\u00ec\u0001\u0000\u0000\u0000.\u00f0\u0001"+ + "\u0000\u0000\u00000\u00f6\u0001\u0000\u0000\u00002\u00fa\u0001\u0000\u0000"+ + "\u00004\u00fd\u0001\u0000\u0000\u00006\u0101\u0001\u0000\u0000\u00008"+ + "9\u0005$\u0000\u00009:\u0005$\u0000\u0000:;\u0005{\u0000\u0000;\u0005"+ + "\u0001\u0000\u0000\u0000<=\u0005$\u0000\u0000=>\u0005{\u0000\u0000>\u0007"+ + "\u0001\u0000\u0000\u0000?@\u0005{\u0000\u0000@A\u0005{\u0000\u0000A\t"+ + "\u0001\u0000\u0000\u0000BC\u0005}\u0000\u0000CD\u0005}\u0000\u0000D\u000b"+ + "\u0001\u0000\u0000\u0000EF\u0005{\u0000\u0000FG\u0005{\u0000\u0000GH\u0005"+ + "%\u0000\u0000HL\u0001\u0000\u0000\u0000IK\u0007\u0000\u0000\u0000JI\u0001"+ + "\u0000\u0000\u0000KN\u0001\u0000\u0000\u0000LJ\u0001\u0000\u0000\u0000"+ + "LM\u0001\u0000\u0000\u0000MO\u0001\u0000\u0000\u0000NL\u0001\u0000\u0000"+ + "\u0000OP\u0005r\u0000\u0000PQ\u0005a\u0000\u0000QR\u0005n\u0000\u0000"+ + "RS\u0005g\u0000\u0000ST\u0005e\u0000\u0000TV\u0001\u0000\u0000\u0000U"+ + "W\u0007\u0000\u0000\u0000VU\u0001\u0000\u0000\u0000WX\u0001\u0000\u0000"+ + "\u0000XV\u0001\u0000\u0000\u0000XY\u0001\u0000\u0000\u0000YZ\u0001\u0000"+ + "\u0000\u0000Z[\u0006\u0004\u0000\u0000[\r\u0001\u0000\u0000\u0000\\]\u0005"+ + "{\u0000\u0000]^\u0005{\u0000\u0000^_\u0005%\u0000\u0000_c\u0001\u0000"+ + "\u0000\u0000`b\u0007\u0000\u0000\u0000a`\u0001\u0000\u0000\u0000be\u0001"+ + "\u0000\u0000\u0000ca\u0001\u0000\u0000\u0000cd\u0001\u0000\u0000\u0000"+ + "df\u0001\u0000\u0000\u0000ec\u0001\u0000\u0000\u0000fg\u0005w\u0000\u0000"+ + "gh\u0005i\u0000\u0000hi\u0005t\u0000\u0000ij\u0005h\u0000\u0000jl\u0001"+ + "\u0000\u0000\u0000km\u0007\u0000\u0000\u0000lk\u0001\u0000\u0000\u0000"+ + "mn\u0001\u0000\u0000\u0000nl\u0001\u0000\u0000\u0000no\u0001\u0000\u0000"+ + "\u0000op\u0001\u0000\u0000\u0000pq\u0006\u0005\u0000\u0000q\u000f\u0001"+ + "\u0000\u0000\u0000rs\u0005{\u0000\u0000st\u0005{\u0000\u0000tu\u0005%"+ + "\u0000\u0000uv\u0005-\u0000\u0000vz\u0001\u0000\u0000\u0000wy\u0007\u0000"+ + "\u0000\u0000xw\u0001\u0000\u0000\u0000y|\u0001\u0000\u0000\u0000zx\u0001"+ + "\u0000\u0000\u0000z{\u0001\u0000\u0000\u0000{}\u0001\u0000\u0000\u0000"+ + "|z\u0001\u0000\u0000\u0000}~\u0005i\u0000\u0000~\u007f\u0005f\u0000\u0000"+ + "\u007f\u0081\u0001\u0000\u0000\u0000\u0080\u0082\u0007\u0000\u0000\u0000"+ + "\u0081\u0080\u0001\u0000\u0000\u0000\u0082\u0083\u0001\u0000\u0000\u0000"+ + "\u0083\u0081\u0001\u0000\u0000\u0000\u0083\u0084\u0001\u0000\u0000\u0000"+ + "\u0084\u0085\u0001\u0000\u0000\u0000\u0085\u0086\u0006\u0006\u0000\u0000"+ + "\u0086\u0011\u0001\u0000\u0000\u0000\u0087\u0088\u0005{\u0000\u0000\u0088"+ + "\u0089\u0005{\u0000\u0000\u0089\u008a\u0005%\u0000\u0000\u008a\u008e\u0001"+ + "\u0000\u0000\u0000\u008b\u008d\u0007\u0000\u0000\u0000\u008c\u008b\u0001"+ + "\u0000\u0000\u0000\u008d\u0090\u0001\u0000\u0000\u0000\u008e\u008c\u0001"+ + "\u0000\u0000\u0000\u008e\u008f\u0001\u0000\u0000\u0000\u008f\u0091\u0001"+ + "\u0000\u0000\u0000\u0090\u008e\u0001\u0000\u0000\u0000\u0091\u0092\u0005"+ + "i\u0000\u0000\u0092\u0093\u0005f\u0000\u0000\u0093\u0095\u0001\u0000\u0000"+ + "\u0000\u0094\u0096\u0007\u0000\u0000\u0000\u0095\u0094\u0001\u0000\u0000"+ + "\u0000\u0096\u0097\u0001\u0000\u0000\u0000\u0097\u0095\u0001\u0000\u0000"+ + "\u0000\u0097\u0098\u0001\u0000\u0000\u0000\u0098\u0099\u0001\u0000\u0000"+ + "\u0000\u0099\u009a\u0006\u0007\u0000\u0000\u009a\u0013\u0001\u0000\u0000"+ + "\u0000\u009b\u009c\u0005{\u0000\u0000\u009c\u009d\u0005{\u0000\u0000\u009d"+ + "\u009e\u0005%\u0000\u0000\u009e\u00a2\u0001\u0000\u0000\u0000\u009f\u00a1"+ + "\u0007\u0000\u0000\u0000\u00a0\u009f\u0001\u0000\u0000\u0000\u00a1\u00a4"+ + "\u0001\u0000\u0000\u0000\u00a2\u00a0\u0001\u0000\u0000\u0000\u00a2\u00a3"+ + "\u0001\u0000\u0000\u0000\u00a3\u00a5\u0001\u0000\u0000\u0000\u00a4\u00a2"+ + "\u0001\u0000\u0000\u0000\u00a5\u00a6\u0005e\u0000\u0000\u00a6\u00a7\u0005"+ + "l\u0000\u0000\u00a7\u00a8\u0005s\u0000\u0000\u00a8\u00a9\u0005e\u0000"+ + "\u0000\u00a9\u00ad\u0001\u0000\u0000\u0000\u00aa\u00ac\u0007\u0000\u0000"+ + "\u0000\u00ab\u00aa\u0001\u0000\u0000\u0000\u00ac\u00af\u0001\u0000\u0000"+ + "\u0000\u00ad\u00ab\u0001\u0000\u0000\u0000\u00ad\u00ae\u0001\u0000\u0000"+ + "\u0000\u00ae\u00b0\u0001\u0000\u0000\u0000\u00af\u00ad\u0001\u0000\u0000"+ + "\u0000\u00b0\u00b1\u0005}\u0000\u0000\u00b1\u00b2\u0005}\u0000\u0000\u00b2"+ + "\u0015\u0001\u0000\u0000\u0000\u00b3\u00b4\u0005{\u0000\u0000\u00b4\u00b5"+ + "\u0005{\u0000\u0000\u00b5\u00b6\u0005%\u0000\u0000\u00b6\u00ba\u0001\u0000"+ + "\u0000\u0000\u00b7\u00b9\u0007\u0000\u0000\u0000\u00b8\u00b7\u0001\u0000"+ + "\u0000\u0000\u00b9\u00bc\u0001\u0000\u0000\u0000\u00ba\u00b8\u0001\u0000"+ + "\u0000\u0000\u00ba\u00bb\u0001\u0000\u0000\u0000\u00bb\u00bd\u0001\u0000"+ + "\u0000\u0000\u00bc\u00ba\u0001\u0000\u0000\u0000\u00bd\u00be\u0005e\u0000"+ + "\u0000\u00be\u00bf\u0005n\u0000\u0000\u00bf\u00c0\u0005d\u0000\u0000\u00c0"+ + "\u00c4\u0001\u0000\u0000\u0000\u00c1\u00c3\u0007\u0000\u0000\u0000\u00c2"+ + "\u00c1\u0001\u0000\u0000\u0000\u00c3\u00c6\u0001\u0000\u0000\u0000\u00c4"+ + "\u00c2\u0001\u0000\u0000\u0000\u00c4\u00c5\u0001\u0000\u0000\u0000\u00c5"+ + "\u00c7\u0001\u0000\u0000\u0000\u00c6\u00c4\u0001\u0000\u0000\u0000\u00c7"+ + "\u00c8\u0005}\u0000\u0000\u00c8\u00c9\u0005}\u0000\u0000\u00c9\u0017\u0001"+ + "\u0000\u0000\u0000\u00ca\u00cb\u0003\u0004\u0000\u0000\u00cb\u00cc\u0001"+ + "\u0000\u0000\u0000\u00cc\u00cd\u0006\n\u0001\u0000\u00cd\u0019\u0001\u0000"+ + "\u0000\u0000\u00ce\u00cf\u0003\u0006\u0001\u0000\u00cf\u00d0\u0001\u0000"+ + "\u0000\u0000\u00d0\u00d1\u0006\u000b\u0001\u0000\u00d1\u001b\u0001\u0000"+ + "\u0000\u0000\u00d2\u00d3\u0005{\u0000\u0000\u00d3\u00d4\u0005{\u0000\u0000"+ + "\u00d4\u00d5\u0005-\u0000\u0000\u00d5\u00d6\u0001\u0000\u0000\u0000\u00d6"+ + "\u00d7\u0006\f\u0002\u0000\u00d7\u001d\u0001\u0000\u0000\u0000\u00d8\u00d9"+ + "\u0003\b\u0002\u0000\u00d9\u00da\u0001\u0000\u0000\u0000\u00da\u00db\u0006"+ + "\r\u0002\u0000\u00db\u001f\u0001\u0000\u0000\u0000\u00dc\u00dd\t\u0000"+ + "\u0000\u0000\u00dd!\u0001\u0000\u0000\u0000\u00de\u00df\u0005{\u0000\u0000"+ + "\u00df#\u0001\u0000\u0000\u0000\u00e0\u00e1\u0005}\u0000\u0000\u00e1%"+ + "\u0001\u0000\u0000\u0000\u00e2\u00e3\u0003\"\u000f\u0000\u00e3\u00e4\u0001"+ + "\u0000\u0000\u0000\u00e4\u00e5\u0006\u0011\u0001\u0000\u00e5\'\u0001\u0000"+ + "\u0000\u0000\u00e6\u00e7\u0003$\u0010\u0000\u00e7\u00e8\u0001\u0000\u0000"+ + "\u0000\u00e8\u00e9\u0006\u0012\u0003\u0000\u00e9)\u0001\u0000\u0000\u0000"+ + "\u00ea\u00eb\t\u0000\u0000\u0000\u00eb+\u0001\u0000\u0000\u0000\u00ec"+ + "\u00ed\u0003\"\u000f\u0000\u00ed\u00ee\u0001\u0000\u0000\u0000\u00ee\u00ef"+ + "\u0006\u0014\u0001\u0000\u00ef-\u0001\u0000\u0000\u0000\u00f0\u00f1\u0005"+ + "-\u0000\u0000\u00f1\u00f2\u0005}\u0000\u0000\u00f2\u00f3\u0005}\u0000"+ + "\u0000\u00f3\u00f4\u0001\u0000\u0000\u0000\u00f4\u00f5\u0006\u0015\u0003"+ + "\u0000\u00f5/\u0001\u0000\u0000\u0000\u00f6\u00f7\u0003\n\u0003\u0000"+ + "\u00f7\u00f8\u0001\u0000\u0000\u0000\u00f8\u00f9\u0006\u0016\u0003\u0000"+ + "\u00f91\u0001\u0000\u0000\u0000\u00fa\u00fb\t\u0000\u0000\u0000\u00fb"+ + "3\u0001\u0000\u0000\u0000\u00fc\u00fe\b\u0001\u0000\u0000\u00fd\u00fc"+ + "\u0001\u0000\u0000\u0000\u00fe\u00ff\u0001\u0000\u0000\u0000\u00ff\u00fd"+ + "\u0001\u0000\u0000\u0000\u00ff\u0100\u0001\u0000\u0000\u0000\u01005\u0001"+ + "\u0000\u0000\u0000\u0101\u0102\u0005}\u0000\u0000\u0102\u0103\u0005}\u0000"+ + "\u0000\u0103\u0104\u0001\u0000\u0000\u0000\u0104\u0105\u0006\u0019\u0003"+ + "\u0000\u01057\u0001\u0000\u0000\u0000\u0011\u0000\u0001\u0002\u0003LX"+ + "cnz\u0083\u008e\u0097\u00a2\u00ad\u00ba\u00c4\u00ff\u0004\u0005\u0003"+ "\u0000\u0005\u0001\u0000\u0005\u0002\u0000\u0004\u0000\u0000"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.tokens b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.tokens index 0a2b3e8acc..a55f6a0f05 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.tokens +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexer.tokens @@ -1,22 +1,23 @@ -STARTBLOCKWITH=1 -STARTBLOCKIF_LTRIM=2 -STARTBLOCKIF=3 -STARTBLOCKELSE=4 -STARTBLOCKEND=5 -STARTESCEXPR=6 -STARTEXPR=7 -STARTEXPR2_LTRIM=8 -STARTEXPR2=9 -TEXT=10 -LBRACE=11 -RBRACE=12 -EXPRESSION=13 -LBRACE2=14 -RBRACE2_RTRIM=15 -RBRACE2=16 -EXPRESSION2=17 -BLOCK_IF_CONTENT=18 -BLOCK_IF_RBRACE=19 -'{{-'=8 -'-}}'=15 -'}}'=19 +STARTBLOCKRANGE=1 +STARTBLOCKWITH=2 +STARTBLOCKIF_LTRIM=3 +STARTBLOCKIF=4 +STARTBLOCKELSE=5 +STARTBLOCKEND=6 +STARTESCEXPR=7 +STARTEXPR=8 +STARTEXPR2_LTRIM=9 +STARTEXPR2=10 +TEXT=11 +LBRACE=12 +RBRACE=13 +EXPRESSION=14 +LBRACE2=15 +RBRACE2_RTRIM=16 +RBRACE2=17 +EXPRESSION2=18 +BLOCK_IF_CONTENT=19 +BLOCK_IF_RBRACE=20 +'{{-'=9 +'-}}'=16 +'}}'=20 diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.interp b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.interp index d906c75700..17ea4c3aab 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.interp +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.interp @@ -6,6 +6,7 @@ null 'else' 'end' 'with' +null '$' null null @@ -45,6 +46,7 @@ THEN ELSE END WITH +VAR_ID ROOT BLOCK_COMMENT HORZ_WS @@ -120,6 +122,7 @@ THEN ELSE END WITH +VAR_ID ROOT BLOCK_COMMENT HORZ_WS @@ -169,4 +172,4 @@ DEFAULT_MODE Concatenation atn: -[4, 0, 36, 485, 6, -1, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 1, 0, 1, 0, 3, 0, 169, 8, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 179, 8, 3, 10, 3, 12, 3, 182, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 187, 8, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 3, 25, 241, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 248, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 255, 8, 27, 3, 27, 257, 8, 27, 3, 27, 259, 8, 27, 3, 27, 261, 8, 27, 1, 28, 1, 28, 1, 28, 5, 28, 266, 8, 28, 10, 28, 12, 28, 269, 9, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 5, 29, 276, 8, 29, 10, 29, 12, 29, 279, 9, 29, 1, 29, 1, 29, 1, 30, 1, 30, 3, 30, 285, 8, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 4, 33, 292, 8, 33, 11, 33, 12, 33, 293, 1, 34, 1, 34, 1, 34, 3, 34, 299, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 5, 37, 314, 8, 37, 10, 37, 12, 37, 317, 9, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 4, 45, 348, 8, 45, 11, 45, 12, 45, 349, 1, 45, 1, 45, 1, 46, 4, 46, 355, 8, 46, 11, 46, 12, 46, 356, 1, 46, 1, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 5, 67, 408, 8, 67, 10, 67, 12, 67, 411, 9, 67, 1, 68, 1, 68, 1, 68, 4, 68, 416, 8, 68, 11, 68, 12, 68, 417, 1, 68, 3, 68, 421, 8, 68, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 4, 72, 434, 8, 72, 11, 72, 12, 72, 435, 1, 72, 1, 72, 1, 73, 4, 73, 441, 8, 73, 11, 73, 12, 73, 442, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 5, 76, 459, 8, 76, 10, 76, 12, 76, 462, 9, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 180, 0, 82, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 0, 14, 0, 16, 0, 18, 0, 20, 0, 22, 0, 24, 0, 26, 0, 28, 0, 30, 0, 32, 0, 34, 0, 36, 0, 38, 0, 40, 0, 42, 0, 44, 0, 46, 0, 48, 0, 50, 0, 52, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, 64, 0, 66, 0, 68, 0, 70, 0, 72, 0, 74, 0, 76, 1, 78, 2, 80, 3, 82, 4, 84, 5, 86, 6, 88, 7, 90, 8, 92, 9, 94, 10, 96, 11, 98, 12, 100, 13, 102, 14, 104, 15, 106, 16, 108, 17, 110, 18, 112, 19, 114, 20, 116, 21, 118, 22, 120, 23, 122, 24, 124, 25, 126, 26, 128, 27, 130, 28, 132, 29, 134, 30, 136, 31, 138, 32, 140, 33, 142, 0, 144, 0, 146, 34, 148, 35, 150, 0, 152, 0, 154, 0, 156, 0, 158, 0, 160, 0, 162, 0, 164, 36, 2, 0, 1, 9, 2, 0, 9, 9, 32, 32, 2, 0, 10, 10, 12, 13, 13, 0, 65, 90, 97, 122, 192, 214, 216, 246, 248, 767, 880, 893, 895, 8191, 8204, 8205, 8304, 8591, 11264, 12271, 12289, 55295, 63744, 64975, 65008, 65533, 3, 0, 183, 183, 768, 879, 8255, 8256, 8, 0, 34, 34, 39, 39, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, 116, 4, 0, 10, 10, 13, 13, 39, 39, 92, 92, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 3, 0, 48, 57, 65, 70, 97, 102, 1, 0, 48, 57, 475, 0, 76, 1, 0, 0, 0, 0, 78, 1, 0, 0, 0, 0, 80, 1, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 84, 1, 0, 0, 0, 0, 86, 1, 0, 0, 0, 0, 88, 1, 0, 0, 0, 0, 90, 1, 0, 0, 0, 0, 92, 1, 0, 0, 0, 0, 94, 1, 0, 0, 0, 0, 96, 1, 0, 0, 0, 0, 98, 1, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 102, 1, 0, 0, 0, 0, 104, 1, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 108, 1, 0, 0, 0, 0, 110, 1, 0, 0, 0, 0, 112, 1, 0, 0, 0, 0, 114, 1, 0, 0, 0, 0, 116, 1, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 120, 1, 0, 0, 0, 0, 122, 1, 0, 0, 0, 0, 124, 1, 0, 0, 0, 0, 126, 1, 0, 0, 0, 0, 128, 1, 0, 0, 0, 0, 130, 1, 0, 0, 0, 0, 132, 1, 0, 0, 0, 0, 134, 1, 0, 0, 0, 0, 136, 1, 0, 0, 0, 0, 138, 1, 0, 0, 0, 0, 140, 1, 0, 0, 0, 1, 146, 1, 0, 0, 0, 1, 148, 1, 0, 0, 0, 1, 150, 1, 0, 0, 0, 1, 152, 1, 0, 0, 0, 1, 154, 1, 0, 0, 0, 1, 156, 1, 0, 0, 0, 1, 158, 1, 0, 0, 0, 1, 160, 1, 0, 0, 0, 1, 162, 1, 0, 0, 0, 1, 164, 1, 0, 0, 0, 2, 168, 1, 0, 0, 0, 4, 170, 1, 0, 0, 0, 6, 172, 1, 0, 0, 0, 8, 174, 1, 0, 0, 0, 10, 188, 1, 0, 0, 0, 12, 190, 1, 0, 0, 0, 14, 192, 1, 0, 0, 0, 16, 194, 1, 0, 0, 0, 18, 196, 1, 0, 0, 0, 20, 198, 1, 0, 0, 0, 22, 200, 1, 0, 0, 0, 24, 202, 1, 0, 0, 0, 26, 204, 1, 0, 0, 0, 28, 206, 1, 0, 0, 0, 30, 208, 1, 0, 0, 0, 32, 210, 1, 0, 0, 0, 34, 212, 1, 0, 0, 0, 36, 214, 1, 0, 0, 0, 38, 216, 1, 0, 0, 0, 40, 218, 1, 0, 0, 0, 42, 220, 1, 0, 0, 0, 44, 222, 1, 0, 0, 0, 46, 225, 1, 0, 0, 0, 48, 227, 1, 0, 0, 0, 50, 229, 1, 0, 0, 0, 52, 240, 1, 0, 0, 0, 54, 242, 1, 0, 0, 0, 56, 249, 1, 0, 0, 0, 58, 262, 1, 0, 0, 0, 60, 272, 1, 0, 0, 0, 62, 284, 1, 0, 0, 0, 64, 286, 1, 0, 0, 0, 66, 288, 1, 0, 0, 0, 68, 291, 1, 0, 0, 0, 70, 295, 1, 0, 0, 0, 72, 300, 1, 0, 0, 0, 74, 305, 1, 0, 0, 0, 76, 311, 1, 0, 0, 0, 78, 320, 1, 0, 0, 0, 80, 323, 1, 0, 0, 0, 82, 328, 1, 0, 0, 0, 84, 333, 1, 0, 0, 0, 86, 337, 1, 0, 0, 0, 88, 342, 1, 0, 0, 0, 90, 344, 1, 0, 0, 0, 92, 347, 1, 0, 0, 0, 94, 354, 1, 0, 0, 0, 96, 360, 1, 0, 0, 0, 98, 364, 1, 0, 0, 0, 100, 368, 1, 0, 0, 0, 102, 370, 1, 0, 0, 0, 104, 372, 1, 0, 0, 0, 106, 374, 1, 0, 0, 0, 108, 376, 1, 0, 0, 0, 110, 378, 1, 0, 0, 0, 112, 380, 1, 0, 0, 0, 114, 382, 1, 0, 0, 0, 116, 384, 1, 0, 0, 0, 118, 386, 1, 0, 0, 0, 120, 388, 1, 0, 0, 0, 122, 390, 1, 0, 0, 0, 124, 392, 1, 0, 0, 0, 126, 394, 1, 0, 0, 0, 128, 396, 1, 0, 0, 0, 130, 398, 1, 0, 0, 0, 132, 400, 1, 0, 0, 0, 134, 402, 1, 0, 0, 0, 136, 404, 1, 0, 0, 0, 138, 412, 1, 0, 0, 0, 140, 424, 1, 0, 0, 0, 142, 428, 1, 0, 0, 0, 144, 430, 1, 0, 0, 0, 146, 433, 1, 0, 0, 0, 148, 440, 1, 0, 0, 0, 150, 446, 1, 0, 0, 0, 152, 451, 1, 0, 0, 0, 154, 455, 1, 0, 0, 0, 156, 465, 1, 0, 0, 0, 158, 469, 1, 0, 0, 0, 160, 473, 1, 0, 0, 0, 162, 477, 1, 0, 0, 0, 164, 481, 1, 0, 0, 0, 166, 169, 3, 4, 1, 0, 167, 169, 3, 6, 2, 0, 168, 166, 1, 0, 0, 0, 168, 167, 1, 0, 0, 0, 169, 3, 1, 0, 0, 0, 170, 171, 7, 0, 0, 0, 171, 5, 1, 0, 0, 0, 172, 173, 7, 1, 0, 0, 173, 7, 1, 0, 0, 0, 174, 175, 5, 47, 0, 0, 175, 176, 5, 42, 0, 0, 176, 180, 1, 0, 0, 0, 177, 179, 9, 0, 0, 0, 178, 177, 1, 0, 0, 0, 179, 182, 1, 0, 0, 0, 180, 181, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 181, 186, 1, 0, 0, 0, 182, 180, 1, 0, 0, 0, 183, 184, 5, 42, 0, 0, 184, 187, 5, 47, 0, 0, 185, 187, 5, 0, 0, 1, 186, 183, 1, 0, 0, 0, 186, 185, 1, 0, 0, 0, 187, 9, 1, 0, 0, 0, 188, 189, 5, 92, 0, 0, 189, 11, 1, 0, 0, 0, 190, 191, 5, 39, 0, 0, 191, 13, 1, 0, 0, 0, 192, 193, 5, 34, 0, 0, 193, 15, 1, 0, 0, 0, 194, 195, 5, 95, 0, 0, 195, 17, 1, 0, 0, 0, 196, 197, 5, 44, 0, 0, 197, 19, 1, 0, 0, 0, 198, 199, 5, 59, 0, 0, 199, 21, 1, 0, 0, 0, 200, 201, 5, 124, 0, 0, 201, 23, 1, 0, 0, 0, 202, 203, 5, 46, 0, 0, 203, 25, 1, 0, 0, 0, 204, 205, 5, 40, 0, 0, 205, 27, 1, 0, 0, 0, 206, 207, 5, 41, 0, 0, 207, 29, 1, 0, 0, 0, 208, 209, 5, 91, 0, 0, 209, 31, 1, 0, 0, 0, 210, 211, 5, 93, 0, 0, 211, 33, 1, 0, 0, 0, 212, 213, 5, 42, 0, 0, 213, 35, 1, 0, 0, 0, 214, 215, 5, 47, 0, 0, 215, 37, 1, 0, 0, 0, 216, 217, 5, 37, 0, 0, 217, 39, 1, 0, 0, 0, 218, 219, 5, 43, 0, 0, 219, 41, 1, 0, 0, 0, 220, 221, 5, 45, 0, 0, 221, 43, 1, 0, 0, 0, 222, 223, 5, 63, 0, 0, 223, 224, 5, 63, 0, 0, 224, 45, 1, 0, 0, 0, 225, 226, 5, 60, 0, 0, 226, 47, 1, 0, 0, 0, 227, 228, 5, 62, 0, 0, 228, 49, 1, 0, 0, 0, 229, 230, 5, 100, 0, 0, 230, 231, 5, 101, 0, 0, 231, 232, 5, 102, 0, 0, 232, 233, 5, 97, 0, 0, 233, 234, 5, 117, 0, 0, 234, 235, 5, 108, 0, 0, 235, 236, 5, 116, 0, 0, 236, 51, 1, 0, 0, 0, 237, 241, 7, 2, 0, 0, 238, 241, 3, 16, 7, 0, 239, 241, 7, 3, 0, 0, 240, 237, 1, 0, 0, 0, 240, 238, 1, 0, 0, 0, 240, 239, 1, 0, 0, 0, 241, 53, 1, 0, 0, 0, 242, 247, 3, 10, 4, 0, 243, 248, 7, 4, 0, 0, 244, 248, 3, 56, 27, 0, 245, 248, 9, 0, 0, 0, 246, 248, 5, 0, 0, 1, 247, 243, 1, 0, 0, 0, 247, 244, 1, 0, 0, 0, 247, 245, 1, 0, 0, 0, 247, 246, 1, 0, 0, 0, 248, 55, 1, 0, 0, 0, 249, 260, 5, 117, 0, 0, 250, 258, 3, 64, 31, 0, 251, 256, 3, 64, 31, 0, 252, 254, 3, 64, 31, 0, 253, 255, 3, 64, 31, 0, 254, 253, 1, 0, 0, 0, 254, 255, 1, 0, 0, 0, 255, 257, 1, 0, 0, 0, 256, 252, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 259, 1, 0, 0, 0, 258, 251, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 261, 1, 0, 0, 0, 260, 250, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 57, 1, 0, 0, 0, 262, 267, 3, 12, 5, 0, 263, 266, 3, 54, 26, 0, 264, 266, 8, 5, 0, 0, 265, 263, 1, 0, 0, 0, 265, 264, 1, 0, 0, 0, 266, 269, 1, 0, 0, 0, 267, 265, 1, 0, 0, 0, 267, 268, 1, 0, 0, 0, 268, 270, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 270, 271, 3, 12, 5, 0, 271, 59, 1, 0, 0, 0, 272, 277, 3, 14, 6, 0, 273, 276, 3, 54, 26, 0, 274, 276, 8, 6, 0, 0, 275, 273, 1, 0, 0, 0, 275, 274, 1, 0, 0, 0, 276, 279, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 280, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 280, 281, 3, 14, 6, 0, 281, 61, 1, 0, 0, 0, 282, 285, 3, 72, 35, 0, 283, 285, 3, 74, 36, 0, 284, 282, 1, 0, 0, 0, 284, 283, 1, 0, 0, 0, 285, 63, 1, 0, 0, 0, 286, 287, 7, 7, 0, 0, 287, 65, 1, 0, 0, 0, 288, 289, 7, 8, 0, 0, 289, 67, 1, 0, 0, 0, 290, 292, 3, 66, 32, 0, 291, 290, 1, 0, 0, 0, 292, 293, 1, 0, 0, 0, 293, 291, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 69, 1, 0, 0, 0, 295, 296, 3, 68, 33, 0, 296, 298, 3, 24, 11, 0, 297, 299, 3, 68, 33, 0, 298, 297, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 71, 1, 0, 0, 0, 300, 301, 5, 116, 0, 0, 301, 302, 5, 114, 0, 0, 302, 303, 5, 117, 0, 0, 303, 304, 5, 101, 0, 0, 304, 73, 1, 0, 0, 0, 305, 306, 5, 102, 0, 0, 306, 307, 5, 97, 0, 0, 307, 308, 5, 108, 0, 0, 308, 309, 5, 115, 0, 0, 309, 310, 5, 101, 0, 0, 310, 75, 1, 0, 0, 0, 311, 315, 3, 22, 10, 0, 312, 314, 3, 4, 1, 0, 313, 312, 1, 0, 0, 0, 314, 317, 1, 0, 0, 0, 315, 313, 1, 0, 0, 0, 315, 316, 1, 0, 0, 0, 316, 318, 1, 0, 0, 0, 317, 315, 1, 0, 0, 0, 318, 319, 3, 50, 24, 0, 319, 77, 1, 0, 0, 0, 320, 321, 5, 105, 0, 0, 321, 322, 5, 102, 0, 0, 322, 79, 1, 0, 0, 0, 323, 324, 5, 116, 0, 0, 324, 325, 5, 104, 0, 0, 325, 326, 5, 101, 0, 0, 326, 327, 5, 110, 0, 0, 327, 81, 1, 0, 0, 0, 328, 329, 5, 101, 0, 0, 329, 330, 5, 108, 0, 0, 330, 331, 5, 115, 0, 0, 331, 332, 5, 101, 0, 0, 332, 83, 1, 0, 0, 0, 333, 334, 5, 101, 0, 0, 334, 335, 5, 110, 0, 0, 335, 336, 5, 100, 0, 0, 336, 85, 1, 0, 0, 0, 337, 338, 5, 119, 0, 0, 338, 339, 5, 105, 0, 0, 339, 340, 5, 116, 0, 0, 340, 341, 5, 104, 0, 0, 341, 87, 1, 0, 0, 0, 342, 343, 5, 36, 0, 0, 343, 89, 1, 0, 0, 0, 344, 345, 3, 8, 3, 0, 345, 91, 1, 0, 0, 0, 346, 348, 3, 4, 1, 0, 347, 346, 1, 0, 0, 0, 348, 349, 1, 0, 0, 0, 349, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 352, 6, 45, 0, 0, 352, 93, 1, 0, 0, 0, 353, 355, 3, 6, 2, 0, 354, 353, 1, 0, 0, 0, 355, 356, 1, 0, 0, 0, 356, 354, 1, 0, 0, 0, 356, 357, 1, 0, 0, 0, 357, 358, 1, 0, 0, 0, 358, 359, 6, 46, 0, 0, 359, 95, 1, 0, 0, 0, 360, 361, 3, 142, 70, 0, 361, 362, 1, 0, 0, 0, 362, 363, 6, 47, 1, 0, 363, 97, 1, 0, 0, 0, 364, 365, 3, 144, 71, 0, 365, 366, 1, 0, 0, 0, 366, 367, 6, 48, 2, 0, 367, 99, 1, 0, 0, 0, 368, 369, 3, 24, 11, 0, 369, 101, 1, 0, 0, 0, 370, 371, 3, 26, 12, 0, 371, 103, 1, 0, 0, 0, 372, 373, 3, 28, 13, 0, 373, 105, 1, 0, 0, 0, 374, 375, 3, 30, 14, 0, 375, 107, 1, 0, 0, 0, 376, 377, 3, 32, 15, 0, 377, 109, 1, 0, 0, 0, 378, 379, 3, 44, 21, 0, 379, 111, 1, 0, 0, 0, 380, 381, 3, 20, 9, 0, 381, 113, 1, 0, 0, 0, 382, 383, 3, 18, 8, 0, 383, 115, 1, 0, 0, 0, 384, 385, 3, 34, 16, 0, 385, 117, 1, 0, 0, 0, 386, 387, 3, 36, 17, 0, 387, 119, 1, 0, 0, 0, 388, 389, 3, 38, 18, 0, 389, 121, 1, 0, 0, 0, 390, 391, 3, 40, 19, 0, 391, 123, 1, 0, 0, 0, 392, 393, 3, 42, 20, 0, 393, 125, 1, 0, 0, 0, 394, 395, 3, 60, 29, 0, 395, 127, 1, 0, 0, 0, 396, 397, 3, 58, 28, 0, 397, 129, 1, 0, 0, 0, 398, 399, 3, 68, 33, 0, 399, 131, 1, 0, 0, 0, 400, 401, 3, 70, 34, 0, 401, 133, 1, 0, 0, 0, 402, 403, 3, 62, 30, 0, 403, 135, 1, 0, 0, 0, 404, 409, 3, 52, 25, 0, 405, 408, 3, 52, 25, 0, 406, 408, 3, 66, 32, 0, 407, 405, 1, 0, 0, 0, 407, 406, 1, 0, 0, 0, 408, 411, 1, 0, 0, 0, 409, 407, 1, 0, 0, 0, 409, 410, 1, 0, 0, 0, 410, 137, 1, 0, 0, 0, 411, 409, 1, 0, 0, 0, 412, 415, 3, 46, 22, 0, 413, 416, 3, 52, 25, 0, 414, 416, 3, 100, 49, 0, 415, 413, 1, 0, 0, 0, 415, 414, 1, 0, 0, 0, 416, 417, 1, 0, 0, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 420, 1, 0, 0, 0, 419, 421, 3, 138, 68, 0, 420, 419, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 422, 1, 0, 0, 0, 422, 423, 3, 48, 23, 0, 423, 139, 1, 0, 0, 0, 424, 425, 3, 4, 1, 0, 425, 426, 1, 0, 0, 0, 426, 427, 6, 69, 0, 0, 427, 141, 1, 0, 0, 0, 428, 429, 5, 123, 0, 0, 429, 143, 1, 0, 0, 0, 430, 431, 5, 125, 0, 0, 431, 145, 1, 0, 0, 0, 432, 434, 3, 4, 1, 0, 433, 432, 1, 0, 0, 0, 434, 435, 1, 0, 0, 0, 435, 433, 1, 0, 0, 0, 435, 436, 1, 0, 0, 0, 436, 437, 1, 0, 0, 0, 437, 438, 6, 72, 0, 0, 438, 147, 1, 0, 0, 0, 439, 441, 3, 6, 2, 0, 440, 439, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 440, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 444, 1, 0, 0, 0, 444, 445, 6, 73, 0, 0, 445, 149, 1, 0, 0, 0, 446, 447, 3, 144, 71, 0, 447, 448, 1, 0, 0, 0, 448, 449, 6, 74, 2, 0, 449, 450, 6, 74, 3, 0, 450, 151, 1, 0, 0, 0, 451, 452, 3, 18, 8, 0, 452, 453, 1, 0, 0, 0, 453, 454, 6, 75, 4, 0, 454, 153, 1, 0, 0, 0, 455, 460, 3, 52, 25, 0, 456, 459, 3, 52, 25, 0, 457, 459, 3, 66, 32, 0, 458, 456, 1, 0, 0, 0, 458, 457, 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 460, 461, 1, 0, 0, 0, 461, 463, 1, 0, 0, 0, 462, 460, 1, 0, 0, 0, 463, 464, 6, 76, 5, 0, 464, 155, 1, 0, 0, 0, 465, 466, 3, 60, 29, 0, 466, 467, 1, 0, 0, 0, 467, 468, 6, 77, 6, 0, 468, 157, 1, 0, 0, 0, 469, 470, 3, 58, 28, 0, 470, 471, 1, 0, 0, 0, 471, 472, 6, 78, 7, 0, 472, 159, 1, 0, 0, 0, 473, 474, 3, 68, 33, 0, 474, 475, 1, 0, 0, 0, 475, 476, 6, 79, 8, 0, 476, 161, 1, 0, 0, 0, 477, 478, 3, 70, 34, 0, 478, 479, 1, 0, 0, 0, 479, 480, 6, 80, 9, 0, 480, 163, 1, 0, 0, 0, 481, 482, 7, 0, 0, 0, 482, 483, 1, 0, 0, 0, 483, 484, 6, 81, 0, 0, 484, 165, 1, 0, 0, 0, 30, 0, 1, 168, 180, 186, 240, 247, 254, 256, 258, 260, 265, 267, 275, 277, 284, 293, 298, 315, 349, 356, 407, 409, 415, 417, 420, 435, 442, 458, 460, 10, 6, 0, 0, 5, 1, 0, 4, 0, 0, 7, 12, 0, 7, 20, 0, 7, 31, 0, 7, 26, 0, 7, 27, 0, 7, 28, 0, 7, 29, 0] \ No newline at end of file +[4, 0, 37, 496, 6, -1, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 2, 76, 7, 76, 2, 77, 7, 77, 2, 78, 7, 78, 2, 79, 7, 79, 2, 80, 7, 80, 2, 81, 7, 81, 2, 82, 7, 82, 1, 0, 1, 0, 3, 0, 171, 8, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 181, 8, 3, 10, 3, 12, 3, 184, 9, 3, 1, 3, 1, 3, 1, 3, 3, 3, 189, 8, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 16, 1, 16, 1, 17, 1, 17, 1, 18, 1, 18, 1, 19, 1, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 3, 25, 243, 8, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 3, 26, 250, 8, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 3, 27, 257, 8, 27, 3, 27, 259, 8, 27, 3, 27, 261, 8, 27, 3, 27, 263, 8, 27, 1, 28, 1, 28, 1, 28, 5, 28, 268, 8, 28, 10, 28, 12, 28, 271, 9, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 5, 29, 278, 8, 29, 10, 29, 12, 29, 281, 9, 29, 1, 29, 1, 29, 1, 30, 1, 30, 3, 30, 287, 8, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 4, 33, 294, 8, 33, 11, 33, 12, 33, 295, 1, 34, 1, 34, 1, 34, 3, 34, 301, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 5, 37, 316, 8, 37, 10, 37, 12, 37, 319, 9, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 5, 43, 349, 8, 43, 10, 43, 12, 43, 352, 9, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 4, 46, 359, 8, 46, 11, 46, 12, 46, 360, 1, 46, 1, 46, 1, 47, 4, 47, 366, 8, 47, 11, 47, 12, 47, 367, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, 67, 1, 68, 1, 68, 1, 68, 5, 68, 419, 8, 68, 10, 68, 12, 68, 422, 9, 68, 1, 69, 1, 69, 1, 69, 4, 69, 427, 8, 69, 11, 69, 12, 69, 428, 1, 69, 3, 69, 432, 8, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 73, 4, 73, 445, 8, 73, 11, 73, 12, 73, 446, 1, 73, 1, 73, 1, 74, 4, 74, 452, 8, 74, 11, 74, 12, 74, 453, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 5, 77, 470, 8, 77, 10, 77, 12, 77, 473, 9, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 79, 1, 79, 1, 80, 1, 80, 1, 80, 1, 80, 1, 81, 1, 81, 1, 81, 1, 81, 1, 82, 1, 82, 1, 82, 1, 82, 1, 182, 0, 83, 2, 0, 4, 0, 6, 0, 8, 0, 10, 0, 12, 0, 14, 0, 16, 0, 18, 0, 20, 0, 22, 0, 24, 0, 26, 0, 28, 0, 30, 0, 32, 0, 34, 0, 36, 0, 38, 0, 40, 0, 42, 0, 44, 0, 46, 0, 48, 0, 50, 0, 52, 0, 54, 0, 56, 0, 58, 0, 60, 0, 62, 0, 64, 0, 66, 0, 68, 0, 70, 0, 72, 0, 74, 0, 76, 1, 78, 2, 80, 3, 82, 4, 84, 5, 86, 6, 88, 7, 90, 8, 92, 9, 94, 10, 96, 11, 98, 12, 100, 13, 102, 14, 104, 15, 106, 16, 108, 17, 110, 18, 112, 19, 114, 20, 116, 21, 118, 22, 120, 23, 122, 24, 124, 25, 126, 26, 128, 27, 130, 28, 132, 29, 134, 30, 136, 31, 138, 32, 140, 33, 142, 34, 144, 0, 146, 0, 148, 35, 150, 36, 152, 0, 154, 0, 156, 0, 158, 0, 160, 0, 162, 0, 164, 0, 166, 37, 2, 0, 1, 9, 2, 0, 9, 9, 32, 32, 2, 0, 10, 10, 12, 13, 13, 0, 65, 90, 97, 122, 192, 214, 216, 246, 248, 767, 880, 893, 895, 8191, 8204, 8205, 8304, 8591, 11264, 12271, 12289, 55295, 63744, 64975, 65008, 65533, 3, 0, 183, 183, 768, 879, 8255, 8256, 8, 0, 34, 34, 39, 39, 92, 92, 98, 98, 102, 102, 110, 110, 114, 114, 116, 116, 4, 0, 10, 10, 13, 13, 39, 39, 92, 92, 4, 0, 10, 10, 13, 13, 34, 34, 92, 92, 3, 0, 48, 57, 65, 70, 97, 102, 1, 0, 48, 57, 488, 0, 76, 1, 0, 0, 0, 0, 78, 1, 0, 0, 0, 0, 80, 1, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 84, 1, 0, 0, 0, 0, 86, 1, 0, 0, 0, 0, 88, 1, 0, 0, 0, 0, 90, 1, 0, 0, 0, 0, 92, 1, 0, 0, 0, 0, 94, 1, 0, 0, 0, 0, 96, 1, 0, 0, 0, 0, 98, 1, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 102, 1, 0, 0, 0, 0, 104, 1, 0, 0, 0, 0, 106, 1, 0, 0, 0, 0, 108, 1, 0, 0, 0, 0, 110, 1, 0, 0, 0, 0, 112, 1, 0, 0, 0, 0, 114, 1, 0, 0, 0, 0, 116, 1, 0, 0, 0, 0, 118, 1, 0, 0, 0, 0, 120, 1, 0, 0, 0, 0, 122, 1, 0, 0, 0, 0, 124, 1, 0, 0, 0, 0, 126, 1, 0, 0, 0, 0, 128, 1, 0, 0, 0, 0, 130, 1, 0, 0, 0, 0, 132, 1, 0, 0, 0, 0, 134, 1, 0, 0, 0, 0, 136, 1, 0, 0, 0, 0, 138, 1, 0, 0, 0, 0, 140, 1, 0, 0, 0, 0, 142, 1, 0, 0, 0, 1, 148, 1, 0, 0, 0, 1, 150, 1, 0, 0, 0, 1, 152, 1, 0, 0, 0, 1, 154, 1, 0, 0, 0, 1, 156, 1, 0, 0, 0, 1, 158, 1, 0, 0, 0, 1, 160, 1, 0, 0, 0, 1, 162, 1, 0, 0, 0, 1, 164, 1, 0, 0, 0, 1, 166, 1, 0, 0, 0, 2, 170, 1, 0, 0, 0, 4, 172, 1, 0, 0, 0, 6, 174, 1, 0, 0, 0, 8, 176, 1, 0, 0, 0, 10, 190, 1, 0, 0, 0, 12, 192, 1, 0, 0, 0, 14, 194, 1, 0, 0, 0, 16, 196, 1, 0, 0, 0, 18, 198, 1, 0, 0, 0, 20, 200, 1, 0, 0, 0, 22, 202, 1, 0, 0, 0, 24, 204, 1, 0, 0, 0, 26, 206, 1, 0, 0, 0, 28, 208, 1, 0, 0, 0, 30, 210, 1, 0, 0, 0, 32, 212, 1, 0, 0, 0, 34, 214, 1, 0, 0, 0, 36, 216, 1, 0, 0, 0, 38, 218, 1, 0, 0, 0, 40, 220, 1, 0, 0, 0, 42, 222, 1, 0, 0, 0, 44, 224, 1, 0, 0, 0, 46, 227, 1, 0, 0, 0, 48, 229, 1, 0, 0, 0, 50, 231, 1, 0, 0, 0, 52, 242, 1, 0, 0, 0, 54, 244, 1, 0, 0, 0, 56, 251, 1, 0, 0, 0, 58, 264, 1, 0, 0, 0, 60, 274, 1, 0, 0, 0, 62, 286, 1, 0, 0, 0, 64, 288, 1, 0, 0, 0, 66, 290, 1, 0, 0, 0, 68, 293, 1, 0, 0, 0, 70, 297, 1, 0, 0, 0, 72, 302, 1, 0, 0, 0, 74, 307, 1, 0, 0, 0, 76, 313, 1, 0, 0, 0, 78, 322, 1, 0, 0, 0, 80, 325, 1, 0, 0, 0, 82, 330, 1, 0, 0, 0, 84, 335, 1, 0, 0, 0, 86, 339, 1, 0, 0, 0, 88, 344, 1, 0, 0, 0, 90, 353, 1, 0, 0, 0, 92, 355, 1, 0, 0, 0, 94, 358, 1, 0, 0, 0, 96, 365, 1, 0, 0, 0, 98, 371, 1, 0, 0, 0, 100, 375, 1, 0, 0, 0, 102, 379, 1, 0, 0, 0, 104, 381, 1, 0, 0, 0, 106, 383, 1, 0, 0, 0, 108, 385, 1, 0, 0, 0, 110, 387, 1, 0, 0, 0, 112, 389, 1, 0, 0, 0, 114, 391, 1, 0, 0, 0, 116, 393, 1, 0, 0, 0, 118, 395, 1, 0, 0, 0, 120, 397, 1, 0, 0, 0, 122, 399, 1, 0, 0, 0, 124, 401, 1, 0, 0, 0, 126, 403, 1, 0, 0, 0, 128, 405, 1, 0, 0, 0, 130, 407, 1, 0, 0, 0, 132, 409, 1, 0, 0, 0, 134, 411, 1, 0, 0, 0, 136, 413, 1, 0, 0, 0, 138, 415, 1, 0, 0, 0, 140, 423, 1, 0, 0, 0, 142, 435, 1, 0, 0, 0, 144, 439, 1, 0, 0, 0, 146, 441, 1, 0, 0, 0, 148, 444, 1, 0, 0, 0, 150, 451, 1, 0, 0, 0, 152, 457, 1, 0, 0, 0, 154, 462, 1, 0, 0, 0, 156, 466, 1, 0, 0, 0, 158, 476, 1, 0, 0, 0, 160, 480, 1, 0, 0, 0, 162, 484, 1, 0, 0, 0, 164, 488, 1, 0, 0, 0, 166, 492, 1, 0, 0, 0, 168, 171, 3, 4, 1, 0, 169, 171, 3, 6, 2, 0, 170, 168, 1, 0, 0, 0, 170, 169, 1, 0, 0, 0, 171, 3, 1, 0, 0, 0, 172, 173, 7, 0, 0, 0, 173, 5, 1, 0, 0, 0, 174, 175, 7, 1, 0, 0, 175, 7, 1, 0, 0, 0, 176, 177, 5, 47, 0, 0, 177, 178, 5, 42, 0, 0, 178, 182, 1, 0, 0, 0, 179, 181, 9, 0, 0, 0, 180, 179, 1, 0, 0, 0, 181, 184, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 182, 180, 1, 0, 0, 0, 183, 188, 1, 0, 0, 0, 184, 182, 1, 0, 0, 0, 185, 186, 5, 42, 0, 0, 186, 189, 5, 47, 0, 0, 187, 189, 5, 0, 0, 1, 188, 185, 1, 0, 0, 0, 188, 187, 1, 0, 0, 0, 189, 9, 1, 0, 0, 0, 190, 191, 5, 92, 0, 0, 191, 11, 1, 0, 0, 0, 192, 193, 5, 39, 0, 0, 193, 13, 1, 0, 0, 0, 194, 195, 5, 34, 0, 0, 195, 15, 1, 0, 0, 0, 196, 197, 5, 95, 0, 0, 197, 17, 1, 0, 0, 0, 198, 199, 5, 44, 0, 0, 199, 19, 1, 0, 0, 0, 200, 201, 5, 59, 0, 0, 201, 21, 1, 0, 0, 0, 202, 203, 5, 124, 0, 0, 203, 23, 1, 0, 0, 0, 204, 205, 5, 46, 0, 0, 205, 25, 1, 0, 0, 0, 206, 207, 5, 40, 0, 0, 207, 27, 1, 0, 0, 0, 208, 209, 5, 41, 0, 0, 209, 29, 1, 0, 0, 0, 210, 211, 5, 91, 0, 0, 211, 31, 1, 0, 0, 0, 212, 213, 5, 93, 0, 0, 213, 33, 1, 0, 0, 0, 214, 215, 5, 42, 0, 0, 215, 35, 1, 0, 0, 0, 216, 217, 5, 47, 0, 0, 217, 37, 1, 0, 0, 0, 218, 219, 5, 37, 0, 0, 219, 39, 1, 0, 0, 0, 220, 221, 5, 43, 0, 0, 221, 41, 1, 0, 0, 0, 222, 223, 5, 45, 0, 0, 223, 43, 1, 0, 0, 0, 224, 225, 5, 63, 0, 0, 225, 226, 5, 63, 0, 0, 226, 45, 1, 0, 0, 0, 227, 228, 5, 60, 0, 0, 228, 47, 1, 0, 0, 0, 229, 230, 5, 62, 0, 0, 230, 49, 1, 0, 0, 0, 231, 232, 5, 100, 0, 0, 232, 233, 5, 101, 0, 0, 233, 234, 5, 102, 0, 0, 234, 235, 5, 97, 0, 0, 235, 236, 5, 117, 0, 0, 236, 237, 5, 108, 0, 0, 237, 238, 5, 116, 0, 0, 238, 51, 1, 0, 0, 0, 239, 243, 7, 2, 0, 0, 240, 243, 3, 16, 7, 0, 241, 243, 7, 3, 0, 0, 242, 239, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 242, 241, 1, 0, 0, 0, 243, 53, 1, 0, 0, 0, 244, 249, 3, 10, 4, 0, 245, 250, 7, 4, 0, 0, 246, 250, 3, 56, 27, 0, 247, 250, 9, 0, 0, 0, 248, 250, 5, 0, 0, 1, 249, 245, 1, 0, 0, 0, 249, 246, 1, 0, 0, 0, 249, 247, 1, 0, 0, 0, 249, 248, 1, 0, 0, 0, 250, 55, 1, 0, 0, 0, 251, 262, 5, 117, 0, 0, 252, 260, 3, 64, 31, 0, 253, 258, 3, 64, 31, 0, 254, 256, 3, 64, 31, 0, 255, 257, 3, 64, 31, 0, 256, 255, 1, 0, 0, 0, 256, 257, 1, 0, 0, 0, 257, 259, 1, 0, 0, 0, 258, 254, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 261, 1, 0, 0, 0, 260, 253, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 263, 1, 0, 0, 0, 262, 252, 1, 0, 0, 0, 262, 263, 1, 0, 0, 0, 263, 57, 1, 0, 0, 0, 264, 269, 3, 12, 5, 0, 265, 268, 3, 54, 26, 0, 266, 268, 8, 5, 0, 0, 267, 265, 1, 0, 0, 0, 267, 266, 1, 0, 0, 0, 268, 271, 1, 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 272, 1, 0, 0, 0, 271, 269, 1, 0, 0, 0, 272, 273, 3, 12, 5, 0, 273, 59, 1, 0, 0, 0, 274, 279, 3, 14, 6, 0, 275, 278, 3, 54, 26, 0, 276, 278, 8, 6, 0, 0, 277, 275, 1, 0, 0, 0, 277, 276, 1, 0, 0, 0, 278, 281, 1, 0, 0, 0, 279, 277, 1, 0, 0, 0, 279, 280, 1, 0, 0, 0, 280, 282, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 282, 283, 3, 14, 6, 0, 283, 61, 1, 0, 0, 0, 284, 287, 3, 72, 35, 0, 285, 287, 3, 74, 36, 0, 286, 284, 1, 0, 0, 0, 286, 285, 1, 0, 0, 0, 287, 63, 1, 0, 0, 0, 288, 289, 7, 7, 0, 0, 289, 65, 1, 0, 0, 0, 290, 291, 7, 8, 0, 0, 291, 67, 1, 0, 0, 0, 292, 294, 3, 66, 32, 0, 293, 292, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 293, 1, 0, 0, 0, 295, 296, 1, 0, 0, 0, 296, 69, 1, 0, 0, 0, 297, 298, 3, 68, 33, 0, 298, 300, 3, 24, 11, 0, 299, 301, 3, 68, 33, 0, 300, 299, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 71, 1, 0, 0, 0, 302, 303, 5, 116, 0, 0, 303, 304, 5, 114, 0, 0, 304, 305, 5, 117, 0, 0, 305, 306, 5, 101, 0, 0, 306, 73, 1, 0, 0, 0, 307, 308, 5, 102, 0, 0, 308, 309, 5, 97, 0, 0, 309, 310, 5, 108, 0, 0, 310, 311, 5, 115, 0, 0, 311, 312, 5, 101, 0, 0, 312, 75, 1, 0, 0, 0, 313, 317, 3, 22, 10, 0, 314, 316, 3, 4, 1, 0, 315, 314, 1, 0, 0, 0, 316, 319, 1, 0, 0, 0, 317, 315, 1, 0, 0, 0, 317, 318, 1, 0, 0, 0, 318, 320, 1, 0, 0, 0, 319, 317, 1, 0, 0, 0, 320, 321, 3, 50, 24, 0, 321, 77, 1, 0, 0, 0, 322, 323, 5, 105, 0, 0, 323, 324, 5, 102, 0, 0, 324, 79, 1, 0, 0, 0, 325, 326, 5, 116, 0, 0, 326, 327, 5, 104, 0, 0, 327, 328, 5, 101, 0, 0, 328, 329, 5, 110, 0, 0, 329, 81, 1, 0, 0, 0, 330, 331, 5, 101, 0, 0, 331, 332, 5, 108, 0, 0, 332, 333, 5, 115, 0, 0, 333, 334, 5, 101, 0, 0, 334, 83, 1, 0, 0, 0, 335, 336, 5, 101, 0, 0, 336, 337, 5, 110, 0, 0, 337, 338, 5, 100, 0, 0, 338, 85, 1, 0, 0, 0, 339, 340, 5, 119, 0, 0, 340, 341, 5, 105, 0, 0, 341, 342, 5, 116, 0, 0, 342, 343, 5, 104, 0, 0, 343, 87, 1, 0, 0, 0, 344, 345, 5, 36, 0, 0, 345, 350, 3, 52, 25, 0, 346, 349, 3, 52, 25, 0, 347, 349, 3, 66, 32, 0, 348, 346, 1, 0, 0, 0, 348, 347, 1, 0, 0, 0, 349, 352, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 89, 1, 0, 0, 0, 352, 350, 1, 0, 0, 0, 353, 354, 5, 36, 0, 0, 354, 91, 1, 0, 0, 0, 355, 356, 3, 8, 3, 0, 356, 93, 1, 0, 0, 0, 357, 359, 3, 4, 1, 0, 358, 357, 1, 0, 0, 0, 359, 360, 1, 0, 0, 0, 360, 358, 1, 0, 0, 0, 360, 361, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 363, 6, 46, 0, 0, 363, 95, 1, 0, 0, 0, 364, 366, 3, 6, 2, 0, 365, 364, 1, 0, 0, 0, 366, 367, 1, 0, 0, 0, 367, 365, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 370, 6, 47, 0, 0, 370, 97, 1, 0, 0, 0, 371, 372, 3, 144, 71, 0, 372, 373, 1, 0, 0, 0, 373, 374, 6, 48, 1, 0, 374, 99, 1, 0, 0, 0, 375, 376, 3, 146, 72, 0, 376, 377, 1, 0, 0, 0, 377, 378, 6, 49, 2, 0, 378, 101, 1, 0, 0, 0, 379, 380, 3, 24, 11, 0, 380, 103, 1, 0, 0, 0, 381, 382, 3, 26, 12, 0, 382, 105, 1, 0, 0, 0, 383, 384, 3, 28, 13, 0, 384, 107, 1, 0, 0, 0, 385, 386, 3, 30, 14, 0, 386, 109, 1, 0, 0, 0, 387, 388, 3, 32, 15, 0, 388, 111, 1, 0, 0, 0, 389, 390, 3, 44, 21, 0, 390, 113, 1, 0, 0, 0, 391, 392, 3, 20, 9, 0, 392, 115, 1, 0, 0, 0, 393, 394, 3, 18, 8, 0, 394, 117, 1, 0, 0, 0, 395, 396, 3, 34, 16, 0, 396, 119, 1, 0, 0, 0, 397, 398, 3, 36, 17, 0, 398, 121, 1, 0, 0, 0, 399, 400, 3, 38, 18, 0, 400, 123, 1, 0, 0, 0, 401, 402, 3, 40, 19, 0, 402, 125, 1, 0, 0, 0, 403, 404, 3, 42, 20, 0, 404, 127, 1, 0, 0, 0, 405, 406, 3, 60, 29, 0, 406, 129, 1, 0, 0, 0, 407, 408, 3, 58, 28, 0, 408, 131, 1, 0, 0, 0, 409, 410, 3, 68, 33, 0, 410, 133, 1, 0, 0, 0, 411, 412, 3, 70, 34, 0, 412, 135, 1, 0, 0, 0, 413, 414, 3, 62, 30, 0, 414, 137, 1, 0, 0, 0, 415, 420, 3, 52, 25, 0, 416, 419, 3, 52, 25, 0, 417, 419, 3, 66, 32, 0, 418, 416, 1, 0, 0, 0, 418, 417, 1, 0, 0, 0, 419, 422, 1, 0, 0, 0, 420, 418, 1, 0, 0, 0, 420, 421, 1, 0, 0, 0, 421, 139, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 423, 426, 3, 46, 22, 0, 424, 427, 3, 52, 25, 0, 425, 427, 3, 102, 50, 0, 426, 424, 1, 0, 0, 0, 426, 425, 1, 0, 0, 0, 427, 428, 1, 0, 0, 0, 428, 426, 1, 0, 0, 0, 428, 429, 1, 0, 0, 0, 429, 431, 1, 0, 0, 0, 430, 432, 3, 140, 69, 0, 431, 430, 1, 0, 0, 0, 431, 432, 1, 0, 0, 0, 432, 433, 1, 0, 0, 0, 433, 434, 3, 48, 23, 0, 434, 141, 1, 0, 0, 0, 435, 436, 3, 4, 1, 0, 436, 437, 1, 0, 0, 0, 437, 438, 6, 70, 0, 0, 438, 143, 1, 0, 0, 0, 439, 440, 5, 123, 0, 0, 440, 145, 1, 0, 0, 0, 441, 442, 5, 125, 0, 0, 442, 147, 1, 0, 0, 0, 443, 445, 3, 4, 1, 0, 444, 443, 1, 0, 0, 0, 445, 446, 1, 0, 0, 0, 446, 444, 1, 0, 0, 0, 446, 447, 1, 0, 0, 0, 447, 448, 1, 0, 0, 0, 448, 449, 6, 73, 0, 0, 449, 149, 1, 0, 0, 0, 450, 452, 3, 6, 2, 0, 451, 450, 1, 0, 0, 0, 452, 453, 1, 0, 0, 0, 453, 451, 1, 0, 0, 0, 453, 454, 1, 0, 0, 0, 454, 455, 1, 0, 0, 0, 455, 456, 6, 74, 0, 0, 456, 151, 1, 0, 0, 0, 457, 458, 3, 146, 72, 0, 458, 459, 1, 0, 0, 0, 459, 460, 6, 75, 2, 0, 460, 461, 6, 75, 3, 0, 461, 153, 1, 0, 0, 0, 462, 463, 3, 18, 8, 0, 463, 464, 1, 0, 0, 0, 464, 465, 6, 76, 4, 0, 465, 155, 1, 0, 0, 0, 466, 471, 3, 52, 25, 0, 467, 470, 3, 52, 25, 0, 468, 470, 3, 66, 32, 0, 469, 467, 1, 0, 0, 0, 469, 468, 1, 0, 0, 0, 470, 473, 1, 0, 0, 0, 471, 469, 1, 0, 0, 0, 471, 472, 1, 0, 0, 0, 472, 474, 1, 0, 0, 0, 473, 471, 1, 0, 0, 0, 474, 475, 6, 77, 5, 0, 475, 157, 1, 0, 0, 0, 476, 477, 3, 60, 29, 0, 477, 478, 1, 0, 0, 0, 478, 479, 6, 78, 6, 0, 479, 159, 1, 0, 0, 0, 480, 481, 3, 58, 28, 0, 481, 482, 1, 0, 0, 0, 482, 483, 6, 79, 7, 0, 483, 161, 1, 0, 0, 0, 484, 485, 3, 68, 33, 0, 485, 486, 1, 0, 0, 0, 486, 487, 6, 80, 8, 0, 487, 163, 1, 0, 0, 0, 488, 489, 3, 70, 34, 0, 489, 490, 1, 0, 0, 0, 490, 491, 6, 81, 9, 0, 491, 165, 1, 0, 0, 0, 492, 493, 7, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 495, 6, 82, 0, 0, 495, 167, 1, 0, 0, 0, 32, 0, 1, 170, 182, 188, 242, 249, 256, 258, 260, 262, 267, 269, 277, 279, 286, 295, 300, 317, 348, 350, 360, 367, 418, 420, 426, 428, 431, 446, 453, 469, 471, 10, 6, 0, 0, 5, 1, 0, 4, 0, 0, 7, 13, 0, 7, 21, 0, 7, 32, 0, 7, 27, 0, 7, 28, 0, 7, 29, 0, 7, 30, 0] \ No newline at end of file diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.java b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.java index 8c12bf5ed1..dcd9335a70 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.java +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.java @@ -19,12 +19,12 @@ public class TemplateLexerExpression extends Lexer { protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int - DEFAULT=1, IF=2, THEN=3, ELSE=4, END=5, WITH=6, ROOT=7, BLOCK_COMMENT=8, - HORZ_WS=9, VERT_WS=10, LBRACE=11, RBRACE=12, DOT=13, LPAREN=14, RPAREN=15, - LBRACK=16, RBRACK=17, DQUESTION=18, SEMI=19, COMMA=20, STAR=21, SLASH=22, - PERCENT=23, PLUS=24, MINUS=25, DSTRING=26, SSTRING=27, DECDIGITS=28, FLOAT=29, - BOOLEAN=30, ID=31, CAST_TYPE=32, ERR_CHAR=33, C_HORZ_WS=34, C_VERT_WS=35, - CERR_CHAR=36; + DEFAULT=1, IF=2, THEN=3, ELSE=4, END=5, WITH=6, VAR_ID=7, ROOT=8, BLOCK_COMMENT=9, + HORZ_WS=10, VERT_WS=11, LBRACE=12, RBRACE=13, DOT=14, LPAREN=15, RPAREN=16, + LBRACK=17, RBRACK=18, DQUESTION=19, SEMI=20, COMMA=21, STAR=22, SLASH=23, + PERCENT=24, PLUS=25, MINUS=26, DSTRING=27, SSTRING=28, DECDIGITS=29, FLOAT=30, + BOOLEAN=31, ID=32, CAST_TYPE=33, ERR_CHAR=34, C_HORZ_WS=35, C_VERT_WS=36, + CERR_CHAR=37; public static final int Concatenation=1; public static String[] channelNames = { @@ -42,30 +42,30 @@ private static String[] makeRuleNames() { "Star", "Slash", "Percent", "Plus", "Minus", "DQuestion", "LT", "GT", "Default", "NameChar", "EscSeq", "UnicodeEsc", "SQuoteLiteral", "DQuoteLiteral", "BoolLiteral", "HexDigit", "DecDigit", "DecDigits", "Float", "True", - "False", "DEFAULT", "IF", "THEN", "ELSE", "END", "WITH", "ROOT", "BLOCK_COMMENT", - "HORZ_WS", "VERT_WS", "LBRACE", "RBRACE", "DOT", "LPAREN", "RPAREN", - "LBRACK", "RBRACK", "DQUESTION", "SEMI", "COMMA", "STAR", "SLASH", "PERCENT", - "PLUS", "MINUS", "DSTRING", "SSTRING", "DECDIGITS", "FLOAT", "BOOLEAN", - "ID", "CAST_TYPE", "ERR_CHAR", "LBrace", "RBrace", "C_HORZ_WS", "C_VERT_WS", - "CRBRACE", "CCOMMA", "CID", "CDSTRING", "CSSTRING", "CDECDIGITS", "CFLOAT", - "CERR_CHAR" + "False", "DEFAULT", "IF", "THEN", "ELSE", "END", "WITH", "VAR_ID", "ROOT", + "BLOCK_COMMENT", "HORZ_WS", "VERT_WS", "LBRACE", "RBRACE", "DOT", "LPAREN", + "RPAREN", "LBRACK", "RBRACK", "DQUESTION", "SEMI", "COMMA", "STAR", "SLASH", + "PERCENT", "PLUS", "MINUS", "DSTRING", "SSTRING", "DECDIGITS", "FLOAT", + "BOOLEAN", "ID", "CAST_TYPE", "ERR_CHAR", "LBrace", "RBrace", "C_HORZ_WS", + "C_VERT_WS", "CRBRACE", "CCOMMA", "CID", "CDSTRING", "CSSTRING", "CDECDIGITS", + "CFLOAT", "CERR_CHAR" }; } public static final String[] ruleNames = makeRuleNames(); private static String[] makeLiteralNames() { return new String[] { - null, null, "'if'", "'then'", "'else'", "'end'", "'with'", "'$'" + null, null, "'if'", "'then'", "'else'", "'end'", "'with'", null, "'$'" }; } private static final String[] _LITERAL_NAMES = makeLiteralNames(); private static String[] makeSymbolicNames() { return new String[] { - null, "DEFAULT", "IF", "THEN", "ELSE", "END", "WITH", "ROOT", "BLOCK_COMMENT", - "HORZ_WS", "VERT_WS", "LBRACE", "RBRACE", "DOT", "LPAREN", "RPAREN", - "LBRACK", "RBRACK", "DQUESTION", "SEMI", "COMMA", "STAR", "SLASH", "PERCENT", - "PLUS", "MINUS", "DSTRING", "SSTRING", "DECDIGITS", "FLOAT", "BOOLEAN", - "ID", "CAST_TYPE", "ERR_CHAR", "C_HORZ_WS", "C_VERT_WS", "CERR_CHAR" + null, "DEFAULT", "IF", "THEN", "ELSE", "END", "WITH", "VAR_ID", "ROOT", + "BLOCK_COMMENT", "HORZ_WS", "VERT_WS", "LBRACE", "RBRACE", "DOT", "LPAREN", + "RPAREN", "LBRACK", "RBRACK", "DQUESTION", "SEMI", "COMMA", "STAR", "SLASH", + "PERCENT", "PLUS", "MINUS", "DSTRING", "SSTRING", "DECDIGITS", "FLOAT", + "BOOLEAN", "ID", "CAST_TYPE", "ERR_CHAR", "C_HORZ_WS", "C_VERT_WS", "CERR_CHAR" }; } private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); @@ -127,7 +127,7 @@ public TemplateLexerExpression(CharStream input) { public ATN getATN() { return _ATN; } public static final String _serializedATN = - "\u0004\u0000$\u01e5\u0006\uffff\uffff\u0006\uffff\uffff\u0002\u0000\u0007"+ + "\u0004\u0000%\u01f0\u0006\uffff\uffff\u0006\uffff\uffff\u0002\u0000\u0007"+ "\u0000\u0002\u0001\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007"+ "\u0003\u0002\u0004\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007"+ "\u0006\u0002\u0007\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n"+ @@ -147,286 +147,293 @@ public TemplateLexerExpression(CharStream input) { ">\u0007>\u0002?\u0007?\u0002@\u0007@\u0002A\u0007A\u0002B\u0007B\u0002"+ "C\u0007C\u0002D\u0007D\u0002E\u0007E\u0002F\u0007F\u0002G\u0007G\u0002"+ "H\u0007H\u0002I\u0007I\u0002J\u0007J\u0002K\u0007K\u0002L\u0007L\u0002"+ - "M\u0007M\u0002N\u0007N\u0002O\u0007O\u0002P\u0007P\u0002Q\u0007Q\u0001"+ - "\u0000\u0001\u0000\u0003\u0000\u00a9\b\u0000\u0001\u0001\u0001\u0001\u0001"+ - "\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0005"+ - "\u0003\u00b3\b\u0003\n\u0003\f\u0003\u00b6\t\u0003\u0001\u0003\u0001\u0003"+ - "\u0001\u0003\u0003\u0003\u00bb\b\u0003\u0001\u0004\u0001\u0004\u0001\u0005"+ - "\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0007\u0001\u0007\u0001\b\u0001"+ - "\b\u0001\t\u0001\t\u0001\n\u0001\n\u0001\u000b\u0001\u000b\u0001\f\u0001"+ - "\f\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f\u0001"+ - "\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012\u0001"+ - "\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015\u0001"+ - "\u0015\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017\u0001\u0018\u0001"+ - "\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001"+ - "\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0003\u0019\u00f1\b\u0019\u0001"+ - "\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0003\u001a\u00f8"+ - "\b\u001a\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b\u0003"+ - "\u001b\u00ff\b\u001b\u0003\u001b\u0101\b\u001b\u0003\u001b\u0103\b\u001b"+ - "\u0003\u001b\u0105\b\u001b\u0001\u001c\u0001\u001c\u0001\u001c\u0005\u001c"+ - "\u010a\b\u001c\n\u001c\f\u001c\u010d\t\u001c\u0001\u001c\u0001\u001c\u0001"+ - "\u001d\u0001\u001d\u0001\u001d\u0005\u001d\u0114\b\u001d\n\u001d\f\u001d"+ - "\u0117\t\u001d\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e\u0003\u001e"+ - "\u011d\b\u001e\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001!\u0004!\u0124"+ - "\b!\u000b!\f!\u0125\u0001\"\u0001\"\u0001\"\u0003\"\u012b\b\"\u0001#\u0001"+ - "#\u0001#\u0001#\u0001#\u0001$\u0001$\u0001$\u0001$\u0001$\u0001$\u0001"+ - "%\u0001%\u0005%\u013a\b%\n%\f%\u013d\t%\u0001%\u0001%\u0001&\u0001&\u0001"+ - "&\u0001\'\u0001\'\u0001\'\u0001\'\u0001\'\u0001(\u0001(\u0001(\u0001("+ - "\u0001(\u0001)\u0001)\u0001)\u0001)\u0001*\u0001*\u0001*\u0001*\u0001"+ - "*\u0001+\u0001+\u0001,\u0001,\u0001-\u0004-\u015c\b-\u000b-\f-\u015d\u0001"+ - "-\u0001-\u0001.\u0004.\u0163\b.\u000b.\f.\u0164\u0001.\u0001.\u0001/\u0001"+ - "/\u0001/\u0001/\u00010\u00010\u00010\u00010\u00011\u00011\u00012\u0001"+ - "2\u00013\u00013\u00014\u00014\u00015\u00015\u00016\u00016\u00017\u0001"+ - "7\u00018\u00018\u00019\u00019\u0001:\u0001:\u0001;\u0001;\u0001<\u0001"+ - "<\u0001=\u0001=\u0001>\u0001>\u0001?\u0001?\u0001@\u0001@\u0001A\u0001"+ - "A\u0001B\u0001B\u0001C\u0001C\u0001C\u0005C\u0198\bC\nC\fC\u019b\tC\u0001"+ - "D\u0001D\u0001D\u0004D\u01a0\bD\u000bD\fD\u01a1\u0001D\u0003D\u01a5\b"+ - "D\u0001D\u0001D\u0001E\u0001E\u0001E\u0001E\u0001F\u0001F\u0001G\u0001"+ - "G\u0001H\u0004H\u01b2\bH\u000bH\fH\u01b3\u0001H\u0001H\u0001I\u0004I\u01b9"+ - "\bI\u000bI\fI\u01ba\u0001I\u0001I\u0001J\u0001J\u0001J\u0001J\u0001J\u0001"+ - "K\u0001K\u0001K\u0001K\u0001L\u0001L\u0001L\u0005L\u01cb\bL\nL\fL\u01ce"+ - "\tL\u0001L\u0001L\u0001M\u0001M\u0001M\u0001M\u0001N\u0001N\u0001N\u0001"+ + "M\u0007M\u0002N\u0007N\u0002O\u0007O\u0002P\u0007P\u0002Q\u0007Q\u0002"+ + "R\u0007R\u0001\u0000\u0001\u0000\u0003\u0000\u00ab\b\u0000\u0001\u0001"+ + "\u0001\u0001\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003"+ + "\u0001\u0003\u0005\u0003\u00b5\b\u0003\n\u0003\f\u0003\u00b8\t\u0003\u0001"+ + "\u0003\u0001\u0003\u0001\u0003\u0003\u0003\u00bd\b\u0003\u0001\u0004\u0001"+ + "\u0004\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0007\u0001"+ + "\u0007\u0001\b\u0001\b\u0001\t\u0001\t\u0001\n\u0001\n\u0001\u000b\u0001"+ + "\u000b\u0001\f\u0001\f\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000f"+ + "\u0001\u000f\u0001\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0012"+ + "\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014\u0001\u0015"+ + "\u0001\u0015\u0001\u0015\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017"+ + "\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018\u0001\u0018"+ + "\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019\u0001\u0019\u0003\u0019"+ + "\u00f3\b\u0019\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a\u0001\u001a"+ + "\u0003\u001a\u00fa\b\u001a\u0001\u001b\u0001\u001b\u0001\u001b\u0001\u001b"+ + "\u0001\u001b\u0003\u001b\u0101\b\u001b\u0003\u001b\u0103\b\u001b\u0003"+ + "\u001b\u0105\b\u001b\u0003\u001b\u0107\b\u001b\u0001\u001c\u0001\u001c"+ + "\u0001\u001c\u0005\u001c\u010c\b\u001c\n\u001c\f\u001c\u010f\t\u001c\u0001"+ + "\u001c\u0001\u001c\u0001\u001d\u0001\u001d\u0001\u001d\u0005\u001d\u0116"+ + "\b\u001d\n\u001d\f\u001d\u0119\t\u001d\u0001\u001d\u0001\u001d\u0001\u001e"+ + "\u0001\u001e\u0003\u001e\u011f\b\u001e\u0001\u001f\u0001\u001f\u0001 "+ + "\u0001 \u0001!\u0004!\u0126\b!\u000b!\f!\u0127\u0001\"\u0001\"\u0001\""+ + "\u0003\"\u012d\b\"\u0001#\u0001#\u0001#\u0001#\u0001#\u0001$\u0001$\u0001"+ + "$\u0001$\u0001$\u0001$\u0001%\u0001%\u0005%\u013c\b%\n%\f%\u013f\t%\u0001"+ + "%\u0001%\u0001&\u0001&\u0001&\u0001\'\u0001\'\u0001\'\u0001\'\u0001\'"+ + "\u0001(\u0001(\u0001(\u0001(\u0001(\u0001)\u0001)\u0001)\u0001)\u0001"+ + "*\u0001*\u0001*\u0001*\u0001*\u0001+\u0001+\u0001+\u0001+\u0005+\u015d"+ + "\b+\n+\f+\u0160\t+\u0001,\u0001,\u0001-\u0001-\u0001.\u0004.\u0167\b."+ + "\u000b.\f.\u0168\u0001.\u0001.\u0001/\u0004/\u016e\b/\u000b/\f/\u016f"+ + "\u0001/\u0001/\u00010\u00010\u00010\u00010\u00011\u00011\u00011\u0001"+ + "1\u00012\u00012\u00013\u00013\u00014\u00014\u00015\u00015\u00016\u0001"+ + "6\u00017\u00017\u00018\u00018\u00019\u00019\u0001:\u0001:\u0001;\u0001"+ + ";\u0001<\u0001<\u0001=\u0001=\u0001>\u0001>\u0001?\u0001?\u0001@\u0001"+ + "@\u0001A\u0001A\u0001B\u0001B\u0001C\u0001C\u0001D\u0001D\u0001D\u0005"+ + "D\u01a3\bD\nD\fD\u01a6\tD\u0001E\u0001E\u0001E\u0004E\u01ab\bE\u000bE"+ + "\fE\u01ac\u0001E\u0003E\u01b0\bE\u0001E\u0001E\u0001F\u0001F\u0001F\u0001"+ + "F\u0001G\u0001G\u0001H\u0001H\u0001I\u0004I\u01bd\bI\u000bI\fI\u01be\u0001"+ + "I\u0001I\u0001J\u0004J\u01c4\bJ\u000bJ\fJ\u01c5\u0001J\u0001J\u0001K\u0001"+ + "K\u0001K\u0001K\u0001K\u0001L\u0001L\u0001L\u0001L\u0001M\u0001M\u0001"+ + "M\u0005M\u01d6\bM\nM\fM\u01d9\tM\u0001M\u0001M\u0001N\u0001N\u0001N\u0001"+ "N\u0001O\u0001O\u0001O\u0001O\u0001P\u0001P\u0001P\u0001P\u0001Q\u0001"+ - "Q\u0001Q\u0001Q\u0001\u00b4\u0000R\u0002\u0000\u0004\u0000\u0006\u0000"+ - "\b\u0000\n\u0000\f\u0000\u000e\u0000\u0010\u0000\u0012\u0000\u0014\u0000"+ - "\u0016\u0000\u0018\u0000\u001a\u0000\u001c\u0000\u001e\u0000 \u0000\""+ - "\u0000$\u0000&\u0000(\u0000*\u0000,\u0000.\u00000\u00002\u00004\u0000"+ - "6\u00008\u0000:\u0000<\u0000>\u0000@\u0000B\u0000D\u0000F\u0000H\u0000"+ - "J\u0000L\u0001N\u0002P\u0003R\u0004T\u0005V\u0006X\u0007Z\b\\\t^\n`\u000b"+ - "b\fd\rf\u000eh\u000fj\u0010l\u0011n\u0012p\u0013r\u0014t\u0015v\u0016"+ - "x\u0017z\u0018|\u0019~\u001a\u0080\u001b\u0082\u001c\u0084\u001d\u0086"+ - "\u001e\u0088\u001f\u008a \u008c!\u008e\u0000\u0090\u0000\u0092\"\u0094"+ - "#\u0096\u0000\u0098\u0000\u009a\u0000\u009c\u0000\u009e\u0000\u00a0\u0000"+ - "\u00a2\u0000\u00a4$\u0002\u0000\u0001\t\u0002\u0000\t\t \u0002\u0000"+ - "\n\n\f\r\r\u0000AZaz\u00c0\u00d6\u00d8\u00f6\u00f8\u02ff\u0370\u037d\u037f"+ - "\u1fff\u200c\u200d\u2070\u218f\u2c00\u2fef\u3001\u8000\ud7ff\u8000\uf900"+ - "\u8000\ufdcf\u8000\ufdf0\u8000\ufffd\u0003\u0000\u00b7\u00b7\u0300\u036f"+ - "\u203f\u2040\b\u0000\"\"\'\'\\\\bbffnnrrtt\u0004\u0000\n\n\r\r\'\'\\\\"+ - "\u0004\u0000\n\n\r\r\"\"\\\\\u0003\u000009AFaf\u0001\u000009\u01db\u0000"+ - "L\u0001\u0000\u0000\u0000\u0000N\u0001\u0000\u0000\u0000\u0000P\u0001"+ - "\u0000\u0000\u0000\u0000R\u0001\u0000\u0000\u0000\u0000T\u0001\u0000\u0000"+ - "\u0000\u0000V\u0001\u0000\u0000\u0000\u0000X\u0001\u0000\u0000\u0000\u0000"+ - "Z\u0001\u0000\u0000\u0000\u0000\\\u0001\u0000\u0000\u0000\u0000^\u0001"+ - "\u0000\u0000\u0000\u0000`\u0001\u0000\u0000\u0000\u0000b\u0001\u0000\u0000"+ - "\u0000\u0000d\u0001\u0000\u0000\u0000\u0000f\u0001\u0000\u0000\u0000\u0000"+ - "h\u0001\u0000\u0000\u0000\u0000j\u0001\u0000\u0000\u0000\u0000l\u0001"+ - "\u0000\u0000\u0000\u0000n\u0001\u0000\u0000\u0000\u0000p\u0001\u0000\u0000"+ - "\u0000\u0000r\u0001\u0000\u0000\u0000\u0000t\u0001\u0000\u0000\u0000\u0000"+ - "v\u0001\u0000\u0000\u0000\u0000x\u0001\u0000\u0000\u0000\u0000z\u0001"+ - "\u0000\u0000\u0000\u0000|\u0001\u0000\u0000\u0000\u0000~\u0001\u0000\u0000"+ - "\u0000\u0000\u0080\u0001\u0000\u0000\u0000\u0000\u0082\u0001\u0000\u0000"+ - "\u0000\u0000\u0084\u0001\u0000\u0000\u0000\u0000\u0086\u0001\u0000\u0000"+ - "\u0000\u0000\u0088\u0001\u0000\u0000\u0000\u0000\u008a\u0001\u0000\u0000"+ - "\u0000\u0000\u008c\u0001\u0000\u0000\u0000\u0001\u0092\u0001\u0000\u0000"+ - "\u0000\u0001\u0094\u0001\u0000\u0000\u0000\u0001\u0096\u0001\u0000\u0000"+ - "\u0000\u0001\u0098\u0001\u0000\u0000\u0000\u0001\u009a\u0001\u0000\u0000"+ - "\u0000\u0001\u009c\u0001\u0000\u0000\u0000\u0001\u009e\u0001\u0000\u0000"+ - "\u0000\u0001\u00a0\u0001\u0000\u0000\u0000\u0001\u00a2\u0001\u0000\u0000"+ - "\u0000\u0001\u00a4\u0001\u0000\u0000\u0000\u0002\u00a8\u0001\u0000\u0000"+ - "\u0000\u0004\u00aa\u0001\u0000\u0000\u0000\u0006\u00ac\u0001\u0000\u0000"+ - "\u0000\b\u00ae\u0001\u0000\u0000\u0000\n\u00bc\u0001\u0000\u0000\u0000"+ - "\f\u00be\u0001\u0000\u0000\u0000\u000e\u00c0\u0001\u0000\u0000\u0000\u0010"+ - "\u00c2\u0001\u0000\u0000\u0000\u0012\u00c4\u0001\u0000\u0000\u0000\u0014"+ - "\u00c6\u0001\u0000\u0000\u0000\u0016\u00c8\u0001\u0000\u0000\u0000\u0018"+ - "\u00ca\u0001\u0000\u0000\u0000\u001a\u00cc\u0001\u0000\u0000\u0000\u001c"+ - "\u00ce\u0001\u0000\u0000\u0000\u001e\u00d0\u0001\u0000\u0000\u0000 \u00d2"+ - "\u0001\u0000\u0000\u0000\"\u00d4\u0001\u0000\u0000\u0000$\u00d6\u0001"+ - "\u0000\u0000\u0000&\u00d8\u0001\u0000\u0000\u0000(\u00da\u0001\u0000\u0000"+ - "\u0000*\u00dc\u0001\u0000\u0000\u0000,\u00de\u0001\u0000\u0000\u0000."+ - "\u00e1\u0001\u0000\u0000\u00000\u00e3\u0001\u0000\u0000\u00002\u00e5\u0001"+ - "\u0000\u0000\u00004\u00f0\u0001\u0000\u0000\u00006\u00f2\u0001\u0000\u0000"+ - "\u00008\u00f9\u0001\u0000\u0000\u0000:\u0106\u0001\u0000\u0000\u0000<"+ - "\u0110\u0001\u0000\u0000\u0000>\u011c\u0001\u0000\u0000\u0000@\u011e\u0001"+ - "\u0000\u0000\u0000B\u0120\u0001\u0000\u0000\u0000D\u0123\u0001\u0000\u0000"+ - "\u0000F\u0127\u0001\u0000\u0000\u0000H\u012c\u0001\u0000\u0000\u0000J"+ - "\u0131\u0001\u0000\u0000\u0000L\u0137\u0001\u0000\u0000\u0000N\u0140\u0001"+ - "\u0000\u0000\u0000P\u0143\u0001\u0000\u0000\u0000R\u0148\u0001\u0000\u0000"+ - "\u0000T\u014d\u0001\u0000\u0000\u0000V\u0151\u0001\u0000\u0000\u0000X"+ - "\u0156\u0001\u0000\u0000\u0000Z\u0158\u0001\u0000\u0000\u0000\\\u015b"+ - "\u0001\u0000\u0000\u0000^\u0162\u0001\u0000\u0000\u0000`\u0168\u0001\u0000"+ - "\u0000\u0000b\u016c\u0001\u0000\u0000\u0000d\u0170\u0001\u0000\u0000\u0000"+ - "f\u0172\u0001\u0000\u0000\u0000h\u0174\u0001\u0000\u0000\u0000j\u0176"+ - "\u0001\u0000\u0000\u0000l\u0178\u0001\u0000\u0000\u0000n\u017a\u0001\u0000"+ - "\u0000\u0000p\u017c\u0001\u0000\u0000\u0000r\u017e\u0001\u0000\u0000\u0000"+ - "t\u0180\u0001\u0000\u0000\u0000v\u0182\u0001\u0000\u0000\u0000x\u0184"+ - "\u0001\u0000\u0000\u0000z\u0186\u0001\u0000\u0000\u0000|\u0188\u0001\u0000"+ - "\u0000\u0000~\u018a\u0001\u0000\u0000\u0000\u0080\u018c\u0001\u0000\u0000"+ - "\u0000\u0082\u018e\u0001\u0000\u0000\u0000\u0084\u0190\u0001\u0000\u0000"+ - "\u0000\u0086\u0192\u0001\u0000\u0000\u0000\u0088\u0194\u0001\u0000\u0000"+ - "\u0000\u008a\u019c\u0001\u0000\u0000\u0000\u008c\u01a8\u0001\u0000\u0000"+ - "\u0000\u008e\u01ac\u0001\u0000\u0000\u0000\u0090\u01ae\u0001\u0000\u0000"+ - "\u0000\u0092\u01b1\u0001\u0000\u0000\u0000\u0094\u01b8\u0001\u0000\u0000"+ - "\u0000\u0096\u01be\u0001\u0000\u0000\u0000\u0098\u01c3\u0001\u0000\u0000"+ - "\u0000\u009a\u01c7\u0001\u0000\u0000\u0000\u009c\u01d1\u0001\u0000\u0000"+ - "\u0000\u009e\u01d5\u0001\u0000\u0000\u0000\u00a0\u01d9\u0001\u0000\u0000"+ - "\u0000\u00a2\u01dd\u0001\u0000\u0000\u0000\u00a4\u01e1\u0001\u0000\u0000"+ - "\u0000\u00a6\u00a9\u0003\u0004\u0001\u0000\u00a7\u00a9\u0003\u0006\u0002"+ - "\u0000\u00a8\u00a6\u0001\u0000\u0000\u0000\u00a8\u00a7\u0001\u0000\u0000"+ - "\u0000\u00a9\u0003\u0001\u0000\u0000\u0000\u00aa\u00ab\u0007\u0000\u0000"+ - "\u0000\u00ab\u0005\u0001\u0000\u0000\u0000\u00ac\u00ad\u0007\u0001\u0000"+ - "\u0000\u00ad\u0007\u0001\u0000\u0000\u0000\u00ae\u00af\u0005/\u0000\u0000"+ - "\u00af\u00b0\u0005*\u0000\u0000\u00b0\u00b4\u0001\u0000\u0000\u0000\u00b1"+ - "\u00b3\t\u0000\u0000\u0000\u00b2\u00b1\u0001\u0000\u0000\u0000\u00b3\u00b6"+ - "\u0001\u0000\u0000\u0000\u00b4\u00b5\u0001\u0000\u0000\u0000\u00b4\u00b2"+ - "\u0001\u0000\u0000\u0000\u00b5\u00ba\u0001\u0000\u0000\u0000\u00b6\u00b4"+ - "\u0001\u0000\u0000\u0000\u00b7\u00b8\u0005*\u0000\u0000\u00b8\u00bb\u0005"+ - "/\u0000\u0000\u00b9\u00bb\u0005\u0000\u0000\u0001\u00ba\u00b7\u0001\u0000"+ - "\u0000\u0000\u00ba\u00b9\u0001\u0000\u0000\u0000\u00bb\t\u0001\u0000\u0000"+ - "\u0000\u00bc\u00bd\u0005\\\u0000\u0000\u00bd\u000b\u0001\u0000\u0000\u0000"+ - "\u00be\u00bf\u0005\'\u0000\u0000\u00bf\r\u0001\u0000\u0000\u0000\u00c0"+ - "\u00c1\u0005\"\u0000\u0000\u00c1\u000f\u0001\u0000\u0000\u0000\u00c2\u00c3"+ - "\u0005_\u0000\u0000\u00c3\u0011\u0001\u0000\u0000\u0000\u00c4\u00c5\u0005"+ - ",\u0000\u0000\u00c5\u0013\u0001\u0000\u0000\u0000\u00c6\u00c7\u0005;\u0000"+ - "\u0000\u00c7\u0015\u0001\u0000\u0000\u0000\u00c8\u00c9\u0005|\u0000\u0000"+ - "\u00c9\u0017\u0001\u0000\u0000\u0000\u00ca\u00cb\u0005.\u0000\u0000\u00cb"+ - "\u0019\u0001\u0000\u0000\u0000\u00cc\u00cd\u0005(\u0000\u0000\u00cd\u001b"+ - "\u0001\u0000\u0000\u0000\u00ce\u00cf\u0005)\u0000\u0000\u00cf\u001d\u0001"+ - "\u0000\u0000\u0000\u00d0\u00d1\u0005[\u0000\u0000\u00d1\u001f\u0001\u0000"+ - "\u0000\u0000\u00d2\u00d3\u0005]\u0000\u0000\u00d3!\u0001\u0000\u0000\u0000"+ - "\u00d4\u00d5\u0005*\u0000\u0000\u00d5#\u0001\u0000\u0000\u0000\u00d6\u00d7"+ - "\u0005/\u0000\u0000\u00d7%\u0001\u0000\u0000\u0000\u00d8\u00d9\u0005%"+ - "\u0000\u0000\u00d9\'\u0001\u0000\u0000\u0000\u00da\u00db\u0005+\u0000"+ - "\u0000\u00db)\u0001\u0000\u0000\u0000\u00dc\u00dd\u0005-\u0000\u0000\u00dd"+ - "+\u0001\u0000\u0000\u0000\u00de\u00df\u0005?\u0000\u0000\u00df\u00e0\u0005"+ - "?\u0000\u0000\u00e0-\u0001\u0000\u0000\u0000\u00e1\u00e2\u0005<\u0000"+ - "\u0000\u00e2/\u0001\u0000\u0000\u0000\u00e3\u00e4\u0005>\u0000\u0000\u00e4"+ - "1\u0001\u0000\u0000\u0000\u00e5\u00e6\u0005d\u0000\u0000\u00e6\u00e7\u0005"+ - "e\u0000\u0000\u00e7\u00e8\u0005f\u0000\u0000\u00e8\u00e9\u0005a\u0000"+ - "\u0000\u00e9\u00ea\u0005u\u0000\u0000\u00ea\u00eb\u0005l\u0000\u0000\u00eb"+ - "\u00ec\u0005t\u0000\u0000\u00ec3\u0001\u0000\u0000\u0000\u00ed\u00f1\u0007"+ - "\u0002\u0000\u0000\u00ee\u00f1\u0003\u0010\u0007\u0000\u00ef\u00f1\u0007"+ - "\u0003\u0000\u0000\u00f0\u00ed\u0001\u0000\u0000\u0000\u00f0\u00ee\u0001"+ - "\u0000\u0000\u0000\u00f0\u00ef\u0001\u0000\u0000\u0000\u00f15\u0001\u0000"+ - "\u0000\u0000\u00f2\u00f7\u0003\n\u0004\u0000\u00f3\u00f8\u0007\u0004\u0000"+ - "\u0000\u00f4\u00f8\u00038\u001b\u0000\u00f5\u00f8\t\u0000\u0000\u0000"+ - "\u00f6\u00f8\u0005\u0000\u0000\u0001\u00f7\u00f3\u0001\u0000\u0000\u0000"+ - "\u00f7\u00f4\u0001\u0000\u0000\u0000\u00f7\u00f5\u0001\u0000\u0000\u0000"+ - "\u00f7\u00f6\u0001\u0000\u0000\u0000\u00f87\u0001\u0000\u0000\u0000\u00f9"+ - "\u0104\u0005u\u0000\u0000\u00fa\u0102\u0003@\u001f\u0000\u00fb\u0100\u0003"+ - "@\u001f\u0000\u00fc\u00fe\u0003@\u001f\u0000\u00fd\u00ff\u0003@\u001f"+ - "\u0000\u00fe\u00fd\u0001\u0000\u0000\u0000\u00fe\u00ff\u0001\u0000\u0000"+ - "\u0000\u00ff\u0101\u0001\u0000\u0000\u0000\u0100\u00fc\u0001\u0000\u0000"+ + "Q\u0001Q\u0001Q\u0001R\u0001R\u0001R\u0001R\u0001\u00b6\u0000S\u0002\u0000"+ + "\u0004\u0000\u0006\u0000\b\u0000\n\u0000\f\u0000\u000e\u0000\u0010\u0000"+ + "\u0012\u0000\u0014\u0000\u0016\u0000\u0018\u0000\u001a\u0000\u001c\u0000"+ + "\u001e\u0000 \u0000\"\u0000$\u0000&\u0000(\u0000*\u0000,\u0000.\u0000"+ + "0\u00002\u00004\u00006\u00008\u0000:\u0000<\u0000>\u0000@\u0000B\u0000"+ + "D\u0000F\u0000H\u0000J\u0000L\u0001N\u0002P\u0003R\u0004T\u0005V\u0006"+ + "X\u0007Z\b\\\t^\n`\u000bb\fd\rf\u000eh\u000fj\u0010l\u0011n\u0012p\u0013"+ + "r\u0014t\u0015v\u0016x\u0017z\u0018|\u0019~\u001a\u0080\u001b\u0082\u001c"+ + "\u0084\u001d\u0086\u001e\u0088\u001f\u008a \u008c!\u008e\"\u0090\u0000"+ + "\u0092\u0000\u0094#\u0096$\u0098\u0000\u009a\u0000\u009c\u0000\u009e\u0000"+ + "\u00a0\u0000\u00a2\u0000\u00a4\u0000\u00a6%\u0002\u0000\u0001\t\u0002"+ + "\u0000\t\t \u0002\u0000\n\n\f\r\r\u0000AZaz\u00c0\u00d6\u00d8\u00f6\u00f8"+ + "\u02ff\u0370\u037d\u037f\u1fff\u200c\u200d\u2070\u218f\u2c00\u2fef\u3001"+ + "\u8000\ud7ff\u8000\uf900\u8000\ufdcf\u8000\ufdf0\u8000\ufffd\u0003\u0000"+ + "\u00b7\u00b7\u0300\u036f\u203f\u2040\b\u0000\"\"\'\'\\\\bbffnnrrtt\u0004"+ + "\u0000\n\n\r\r\'\'\\\\\u0004\u0000\n\n\r\r\"\"\\\\\u0003\u000009AFaf\u0001"+ + "\u000009\u01e8\u0000L\u0001\u0000\u0000\u0000\u0000N\u0001\u0000\u0000"+ + "\u0000\u0000P\u0001\u0000\u0000\u0000\u0000R\u0001\u0000\u0000\u0000\u0000"+ + "T\u0001\u0000\u0000\u0000\u0000V\u0001\u0000\u0000\u0000\u0000X\u0001"+ + "\u0000\u0000\u0000\u0000Z\u0001\u0000\u0000\u0000\u0000\\\u0001\u0000"+ + "\u0000\u0000\u0000^\u0001\u0000\u0000\u0000\u0000`\u0001\u0000\u0000\u0000"+ + "\u0000b\u0001\u0000\u0000\u0000\u0000d\u0001\u0000\u0000\u0000\u0000f"+ + "\u0001\u0000\u0000\u0000\u0000h\u0001\u0000\u0000\u0000\u0000j\u0001\u0000"+ + "\u0000\u0000\u0000l\u0001\u0000\u0000\u0000\u0000n\u0001\u0000\u0000\u0000"+ + "\u0000p\u0001\u0000\u0000\u0000\u0000r\u0001\u0000\u0000\u0000\u0000t"+ + "\u0001\u0000\u0000\u0000\u0000v\u0001\u0000\u0000\u0000\u0000x\u0001\u0000"+ + "\u0000\u0000\u0000z\u0001\u0000\u0000\u0000\u0000|\u0001\u0000\u0000\u0000"+ + "\u0000~\u0001\u0000\u0000\u0000\u0000\u0080\u0001\u0000\u0000\u0000\u0000"+ + "\u0082\u0001\u0000\u0000\u0000\u0000\u0084\u0001\u0000\u0000\u0000\u0000"+ + "\u0086\u0001\u0000\u0000\u0000\u0000\u0088\u0001\u0000\u0000\u0000\u0000"+ + "\u008a\u0001\u0000\u0000\u0000\u0000\u008c\u0001\u0000\u0000\u0000\u0000"+ + "\u008e\u0001\u0000\u0000\u0000\u0001\u0094\u0001\u0000\u0000\u0000\u0001"+ + "\u0096\u0001\u0000\u0000\u0000\u0001\u0098\u0001\u0000\u0000\u0000\u0001"+ + "\u009a\u0001\u0000\u0000\u0000\u0001\u009c\u0001\u0000\u0000\u0000\u0001"+ + "\u009e\u0001\u0000\u0000\u0000\u0001\u00a0\u0001\u0000\u0000\u0000\u0001"+ + "\u00a2\u0001\u0000\u0000\u0000\u0001\u00a4\u0001\u0000\u0000\u0000\u0001"+ + "\u00a6\u0001\u0000\u0000\u0000\u0002\u00aa\u0001\u0000\u0000\u0000\u0004"+ + "\u00ac\u0001\u0000\u0000\u0000\u0006\u00ae\u0001\u0000\u0000\u0000\b\u00b0"+ + "\u0001\u0000\u0000\u0000\n\u00be\u0001\u0000\u0000\u0000\f\u00c0\u0001"+ + "\u0000\u0000\u0000\u000e\u00c2\u0001\u0000\u0000\u0000\u0010\u00c4\u0001"+ + "\u0000\u0000\u0000\u0012\u00c6\u0001\u0000\u0000\u0000\u0014\u00c8\u0001"+ + "\u0000\u0000\u0000\u0016\u00ca\u0001\u0000\u0000\u0000\u0018\u00cc\u0001"+ + "\u0000\u0000\u0000\u001a\u00ce\u0001\u0000\u0000\u0000\u001c\u00d0\u0001"+ + "\u0000\u0000\u0000\u001e\u00d2\u0001\u0000\u0000\u0000 \u00d4\u0001\u0000"+ + "\u0000\u0000\"\u00d6\u0001\u0000\u0000\u0000$\u00d8\u0001\u0000\u0000"+ + "\u0000&\u00da\u0001\u0000\u0000\u0000(\u00dc\u0001\u0000\u0000\u0000*"+ + "\u00de\u0001\u0000\u0000\u0000,\u00e0\u0001\u0000\u0000\u0000.\u00e3\u0001"+ + "\u0000\u0000\u00000\u00e5\u0001\u0000\u0000\u00002\u00e7\u0001\u0000\u0000"+ + "\u00004\u00f2\u0001\u0000\u0000\u00006\u00f4\u0001\u0000\u0000\u00008"+ + "\u00fb\u0001\u0000\u0000\u0000:\u0108\u0001\u0000\u0000\u0000<\u0112\u0001"+ + "\u0000\u0000\u0000>\u011e\u0001\u0000\u0000\u0000@\u0120\u0001\u0000\u0000"+ + "\u0000B\u0122\u0001\u0000\u0000\u0000D\u0125\u0001\u0000\u0000\u0000F"+ + "\u0129\u0001\u0000\u0000\u0000H\u012e\u0001\u0000\u0000\u0000J\u0133\u0001"+ + "\u0000\u0000\u0000L\u0139\u0001\u0000\u0000\u0000N\u0142\u0001\u0000\u0000"+ + "\u0000P\u0145\u0001\u0000\u0000\u0000R\u014a\u0001\u0000\u0000\u0000T"+ + "\u014f\u0001\u0000\u0000\u0000V\u0153\u0001\u0000\u0000\u0000X\u0158\u0001"+ + "\u0000\u0000\u0000Z\u0161\u0001\u0000\u0000\u0000\\\u0163\u0001\u0000"+ + "\u0000\u0000^\u0166\u0001\u0000\u0000\u0000`\u016d\u0001\u0000\u0000\u0000"+ + "b\u0173\u0001\u0000\u0000\u0000d\u0177\u0001\u0000\u0000\u0000f\u017b"+ + "\u0001\u0000\u0000\u0000h\u017d\u0001\u0000\u0000\u0000j\u017f\u0001\u0000"+ + "\u0000\u0000l\u0181\u0001\u0000\u0000\u0000n\u0183\u0001\u0000\u0000\u0000"+ + "p\u0185\u0001\u0000\u0000\u0000r\u0187\u0001\u0000\u0000\u0000t\u0189"+ + "\u0001\u0000\u0000\u0000v\u018b\u0001\u0000\u0000\u0000x\u018d\u0001\u0000"+ + "\u0000\u0000z\u018f\u0001\u0000\u0000\u0000|\u0191\u0001\u0000\u0000\u0000"+ + "~\u0193\u0001\u0000\u0000\u0000\u0080\u0195\u0001\u0000\u0000\u0000\u0082"+ + "\u0197\u0001\u0000\u0000\u0000\u0084\u0199\u0001\u0000\u0000\u0000\u0086"+ + "\u019b\u0001\u0000\u0000\u0000\u0088\u019d\u0001\u0000\u0000\u0000\u008a"+ + "\u019f\u0001\u0000\u0000\u0000\u008c\u01a7\u0001\u0000\u0000\u0000\u008e"+ + "\u01b3\u0001\u0000\u0000\u0000\u0090\u01b7\u0001\u0000\u0000\u0000\u0092"+ + "\u01b9\u0001\u0000\u0000\u0000\u0094\u01bc\u0001\u0000\u0000\u0000\u0096"+ + "\u01c3\u0001\u0000\u0000\u0000\u0098\u01c9\u0001\u0000\u0000\u0000\u009a"+ + "\u01ce\u0001\u0000\u0000\u0000\u009c\u01d2\u0001\u0000\u0000\u0000\u009e"+ + "\u01dc\u0001\u0000\u0000\u0000\u00a0\u01e0\u0001\u0000\u0000\u0000\u00a2"+ + "\u01e4\u0001\u0000\u0000\u0000\u00a4\u01e8\u0001\u0000\u0000\u0000\u00a6"+ + "\u01ec\u0001\u0000\u0000\u0000\u00a8\u00ab\u0003\u0004\u0001\u0000\u00a9"+ + "\u00ab\u0003\u0006\u0002\u0000\u00aa\u00a8\u0001\u0000\u0000\u0000\u00aa"+ + "\u00a9\u0001\u0000\u0000\u0000\u00ab\u0003\u0001\u0000\u0000\u0000\u00ac"+ + "\u00ad\u0007\u0000\u0000\u0000\u00ad\u0005\u0001\u0000\u0000\u0000\u00ae"+ + "\u00af\u0007\u0001\u0000\u0000\u00af\u0007\u0001\u0000\u0000\u0000\u00b0"+ + "\u00b1\u0005/\u0000\u0000\u00b1\u00b2\u0005*\u0000\u0000\u00b2\u00b6\u0001"+ + "\u0000\u0000\u0000\u00b3\u00b5\t\u0000\u0000\u0000\u00b4\u00b3\u0001\u0000"+ + "\u0000\u0000\u00b5\u00b8\u0001\u0000\u0000\u0000\u00b6\u00b7\u0001\u0000"+ + "\u0000\u0000\u00b6\u00b4\u0001\u0000\u0000\u0000\u00b7\u00bc\u0001\u0000"+ + "\u0000\u0000\u00b8\u00b6\u0001\u0000\u0000\u0000\u00b9\u00ba\u0005*\u0000"+ + "\u0000\u00ba\u00bd\u0005/\u0000\u0000\u00bb\u00bd\u0005\u0000\u0000\u0001"+ + "\u00bc\u00b9\u0001\u0000\u0000\u0000\u00bc\u00bb\u0001\u0000\u0000\u0000"+ + "\u00bd\t\u0001\u0000\u0000\u0000\u00be\u00bf\u0005\\\u0000\u0000\u00bf"+ + "\u000b\u0001\u0000\u0000\u0000\u00c0\u00c1\u0005\'\u0000\u0000\u00c1\r"+ + "\u0001\u0000\u0000\u0000\u00c2\u00c3\u0005\"\u0000\u0000\u00c3\u000f\u0001"+ + "\u0000\u0000\u0000\u00c4\u00c5\u0005_\u0000\u0000\u00c5\u0011\u0001\u0000"+ + "\u0000\u0000\u00c6\u00c7\u0005,\u0000\u0000\u00c7\u0013\u0001\u0000\u0000"+ + "\u0000\u00c8\u00c9\u0005;\u0000\u0000\u00c9\u0015\u0001\u0000\u0000\u0000"+ + "\u00ca\u00cb\u0005|\u0000\u0000\u00cb\u0017\u0001\u0000\u0000\u0000\u00cc"+ + "\u00cd\u0005.\u0000\u0000\u00cd\u0019\u0001\u0000\u0000\u0000\u00ce\u00cf"+ + "\u0005(\u0000\u0000\u00cf\u001b\u0001\u0000\u0000\u0000\u00d0\u00d1\u0005"+ + ")\u0000\u0000\u00d1\u001d\u0001\u0000\u0000\u0000\u00d2\u00d3\u0005[\u0000"+ + "\u0000\u00d3\u001f\u0001\u0000\u0000\u0000\u00d4\u00d5\u0005]\u0000\u0000"+ + "\u00d5!\u0001\u0000\u0000\u0000\u00d6\u00d7\u0005*\u0000\u0000\u00d7#"+ + "\u0001\u0000\u0000\u0000\u00d8\u00d9\u0005/\u0000\u0000\u00d9%\u0001\u0000"+ + "\u0000\u0000\u00da\u00db\u0005%\u0000\u0000\u00db\'\u0001\u0000\u0000"+ + "\u0000\u00dc\u00dd\u0005+\u0000\u0000\u00dd)\u0001\u0000\u0000\u0000\u00de"+ + "\u00df\u0005-\u0000\u0000\u00df+\u0001\u0000\u0000\u0000\u00e0\u00e1\u0005"+ + "?\u0000\u0000\u00e1\u00e2\u0005?\u0000\u0000\u00e2-\u0001\u0000\u0000"+ + "\u0000\u00e3\u00e4\u0005<\u0000\u0000\u00e4/\u0001\u0000\u0000\u0000\u00e5"+ + "\u00e6\u0005>\u0000\u0000\u00e61\u0001\u0000\u0000\u0000\u00e7\u00e8\u0005"+ + "d\u0000\u0000\u00e8\u00e9\u0005e\u0000\u0000\u00e9\u00ea\u0005f\u0000"+ + "\u0000\u00ea\u00eb\u0005a\u0000\u0000\u00eb\u00ec\u0005u\u0000\u0000\u00ec"+ + "\u00ed\u0005l\u0000\u0000\u00ed\u00ee\u0005t\u0000\u0000\u00ee3\u0001"+ + "\u0000\u0000\u0000\u00ef\u00f3\u0007\u0002\u0000\u0000\u00f0\u00f3\u0003"+ + "\u0010\u0007\u0000\u00f1\u00f3\u0007\u0003\u0000\u0000\u00f2\u00ef\u0001"+ + "\u0000\u0000\u0000\u00f2\u00f0\u0001\u0000\u0000\u0000\u00f2\u00f1\u0001"+ + "\u0000\u0000\u0000\u00f35\u0001\u0000\u0000\u0000\u00f4\u00f9\u0003\n"+ + "\u0004\u0000\u00f5\u00fa\u0007\u0004\u0000\u0000\u00f6\u00fa\u00038\u001b"+ + "\u0000\u00f7\u00fa\t\u0000\u0000\u0000\u00f8\u00fa\u0005\u0000\u0000\u0001"+ + "\u00f9\u00f5\u0001\u0000\u0000\u0000\u00f9\u00f6\u0001\u0000\u0000\u0000"+ + "\u00f9\u00f7\u0001\u0000\u0000\u0000\u00f9\u00f8\u0001\u0000\u0000\u0000"+ + "\u00fa7\u0001\u0000\u0000\u0000\u00fb\u0106\u0005u\u0000\u0000\u00fc\u0104"+ + "\u0003@\u001f\u0000\u00fd\u0102\u0003@\u001f\u0000\u00fe\u0100\u0003@"+ + "\u001f\u0000\u00ff\u0101\u0003@\u001f\u0000\u0100\u00ff\u0001\u0000\u0000"+ "\u0000\u0100\u0101\u0001\u0000\u0000\u0000\u0101\u0103\u0001\u0000\u0000"+ - "\u0000\u0102\u00fb\u0001\u0000\u0000\u0000\u0102\u0103\u0001\u0000\u0000"+ - "\u0000\u0103\u0105\u0001\u0000\u0000\u0000\u0104\u00fa\u0001\u0000\u0000"+ - "\u0000\u0104\u0105\u0001\u0000\u0000\u0000\u01059\u0001\u0000\u0000\u0000"+ - "\u0106\u010b\u0003\f\u0005\u0000\u0107\u010a\u00036\u001a\u0000\u0108"+ - "\u010a\b\u0005\u0000\u0000\u0109\u0107\u0001\u0000\u0000\u0000\u0109\u0108"+ - "\u0001\u0000\u0000\u0000\u010a\u010d\u0001\u0000\u0000\u0000\u010b\u0109"+ - "\u0001\u0000\u0000\u0000\u010b\u010c\u0001\u0000\u0000\u0000\u010c\u010e"+ - "\u0001\u0000\u0000\u0000\u010d\u010b\u0001\u0000\u0000\u0000\u010e\u010f"+ - "\u0003\f\u0005\u0000\u010f;\u0001\u0000\u0000\u0000\u0110\u0115\u0003"+ - "\u000e\u0006\u0000\u0111\u0114\u00036\u001a\u0000\u0112\u0114\b\u0006"+ - "\u0000\u0000\u0113\u0111\u0001\u0000\u0000\u0000\u0113\u0112\u0001\u0000"+ - "\u0000\u0000\u0114\u0117\u0001\u0000\u0000\u0000\u0115\u0113\u0001\u0000"+ - "\u0000\u0000\u0115\u0116\u0001\u0000\u0000\u0000\u0116\u0118\u0001\u0000"+ - "\u0000\u0000\u0117\u0115\u0001\u0000\u0000\u0000\u0118\u0119\u0003\u000e"+ - "\u0006\u0000\u0119=\u0001\u0000\u0000\u0000\u011a\u011d\u0003H#\u0000"+ - "\u011b\u011d\u0003J$\u0000\u011c\u011a\u0001\u0000\u0000\u0000\u011c\u011b"+ - "\u0001\u0000\u0000\u0000\u011d?\u0001\u0000\u0000\u0000\u011e\u011f\u0007"+ - "\u0007\u0000\u0000\u011fA\u0001\u0000\u0000\u0000\u0120\u0121\u0007\b"+ - "\u0000\u0000\u0121C\u0001\u0000\u0000\u0000\u0122\u0124\u0003B \u0000"+ - "\u0123\u0122\u0001\u0000\u0000\u0000\u0124\u0125\u0001\u0000\u0000\u0000"+ - "\u0125\u0123\u0001\u0000\u0000\u0000\u0125\u0126\u0001\u0000\u0000\u0000"+ - "\u0126E\u0001\u0000\u0000\u0000\u0127\u0128\u0003D!\u0000\u0128\u012a"+ - "\u0003\u0018\u000b\u0000\u0129\u012b\u0003D!\u0000\u012a\u0129\u0001\u0000"+ - "\u0000\u0000\u012a\u012b\u0001\u0000\u0000\u0000\u012bG\u0001\u0000\u0000"+ - "\u0000\u012c\u012d\u0005t\u0000\u0000\u012d\u012e\u0005r\u0000\u0000\u012e"+ - "\u012f\u0005u\u0000\u0000\u012f\u0130\u0005e\u0000\u0000\u0130I\u0001"+ - "\u0000\u0000\u0000\u0131\u0132\u0005f\u0000\u0000\u0132\u0133\u0005a\u0000"+ - "\u0000\u0133\u0134\u0005l\u0000\u0000\u0134\u0135\u0005s\u0000\u0000\u0135"+ - "\u0136\u0005e\u0000\u0000\u0136K\u0001\u0000\u0000\u0000\u0137\u013b\u0003"+ - "\u0016\n\u0000\u0138\u013a\u0003\u0004\u0001\u0000\u0139\u0138\u0001\u0000"+ - "\u0000\u0000\u013a\u013d\u0001\u0000\u0000\u0000\u013b\u0139\u0001\u0000"+ - "\u0000\u0000\u013b\u013c\u0001\u0000\u0000\u0000\u013c\u013e\u0001\u0000"+ - "\u0000\u0000\u013d\u013b\u0001\u0000\u0000\u0000\u013e\u013f\u00032\u0018"+ - "\u0000\u013fM\u0001\u0000\u0000\u0000\u0140\u0141\u0005i\u0000\u0000\u0141"+ - "\u0142\u0005f\u0000\u0000\u0142O\u0001\u0000\u0000\u0000\u0143\u0144\u0005"+ - "t\u0000\u0000\u0144\u0145\u0005h\u0000\u0000\u0145\u0146\u0005e\u0000"+ - "\u0000\u0146\u0147\u0005n\u0000\u0000\u0147Q\u0001\u0000\u0000\u0000\u0148"+ - "\u0149\u0005e\u0000\u0000\u0149\u014a\u0005l\u0000\u0000\u014a\u014b\u0005"+ - "s\u0000\u0000\u014b\u014c\u0005e\u0000\u0000\u014cS\u0001\u0000\u0000"+ - "\u0000\u014d\u014e\u0005e\u0000\u0000\u014e\u014f\u0005n\u0000\u0000\u014f"+ - "\u0150\u0005d\u0000\u0000\u0150U\u0001\u0000\u0000\u0000\u0151\u0152\u0005"+ - "w\u0000\u0000\u0152\u0153\u0005i\u0000\u0000\u0153\u0154\u0005t\u0000"+ - "\u0000\u0154\u0155\u0005h\u0000\u0000\u0155W\u0001\u0000\u0000\u0000\u0156"+ - "\u0157\u0005$\u0000\u0000\u0157Y\u0001\u0000\u0000\u0000\u0158\u0159\u0003"+ - "\b\u0003\u0000\u0159[\u0001\u0000\u0000\u0000\u015a\u015c\u0003\u0004"+ - "\u0001\u0000\u015b\u015a\u0001\u0000\u0000\u0000\u015c\u015d\u0001\u0000"+ - "\u0000\u0000\u015d\u015b\u0001\u0000\u0000\u0000\u015d\u015e\u0001\u0000"+ - "\u0000\u0000\u015e\u015f\u0001\u0000\u0000\u0000\u015f\u0160\u0006-\u0000"+ - "\u0000\u0160]\u0001\u0000\u0000\u0000\u0161\u0163\u0003\u0006\u0002\u0000"+ - "\u0162\u0161\u0001\u0000\u0000\u0000\u0163\u0164\u0001\u0000\u0000\u0000"+ - "\u0164\u0162\u0001\u0000\u0000\u0000\u0164\u0165\u0001\u0000\u0000\u0000"+ - "\u0165\u0166\u0001\u0000\u0000\u0000\u0166\u0167\u0006.\u0000\u0000\u0167"+ - "_\u0001\u0000\u0000\u0000\u0168\u0169\u0003\u008eF\u0000\u0169\u016a\u0001"+ - "\u0000\u0000\u0000\u016a\u016b\u0006/\u0001\u0000\u016ba\u0001\u0000\u0000"+ - "\u0000\u016c\u016d\u0003\u0090G\u0000\u016d\u016e\u0001\u0000\u0000\u0000"+ - "\u016e\u016f\u00060\u0002\u0000\u016fc\u0001\u0000\u0000\u0000\u0170\u0171"+ - "\u0003\u0018\u000b\u0000\u0171e\u0001\u0000\u0000\u0000\u0172\u0173\u0003"+ - "\u001a\f\u0000\u0173g\u0001\u0000\u0000\u0000\u0174\u0175\u0003\u001c"+ - "\r\u0000\u0175i\u0001\u0000\u0000\u0000\u0176\u0177\u0003\u001e\u000e"+ - "\u0000\u0177k\u0001\u0000\u0000\u0000\u0178\u0179\u0003 \u000f\u0000\u0179"+ - "m\u0001\u0000\u0000\u0000\u017a\u017b\u0003,\u0015\u0000\u017bo\u0001"+ - "\u0000\u0000\u0000\u017c\u017d\u0003\u0014\t\u0000\u017dq\u0001\u0000"+ - "\u0000\u0000\u017e\u017f\u0003\u0012\b\u0000\u017fs\u0001\u0000\u0000"+ - "\u0000\u0180\u0181\u0003\"\u0010\u0000\u0181u\u0001\u0000\u0000\u0000"+ - "\u0182\u0183\u0003$\u0011\u0000\u0183w\u0001\u0000\u0000\u0000\u0184\u0185"+ - "\u0003&\u0012\u0000\u0185y\u0001\u0000\u0000\u0000\u0186\u0187\u0003("+ - "\u0013\u0000\u0187{\u0001\u0000\u0000\u0000\u0188\u0189\u0003*\u0014\u0000"+ - "\u0189}\u0001\u0000\u0000\u0000\u018a\u018b\u0003<\u001d\u0000\u018b\u007f"+ - "\u0001\u0000\u0000\u0000\u018c\u018d\u0003:\u001c\u0000\u018d\u0081\u0001"+ - "\u0000\u0000\u0000\u018e\u018f\u0003D!\u0000\u018f\u0083\u0001\u0000\u0000"+ - "\u0000\u0190\u0191\u0003F\"\u0000\u0191\u0085\u0001\u0000\u0000\u0000"+ - "\u0192\u0193\u0003>\u001e\u0000\u0193\u0087\u0001\u0000\u0000\u0000\u0194"+ - "\u0199\u00034\u0019\u0000\u0195\u0198\u00034\u0019\u0000\u0196\u0198\u0003"+ - "B \u0000\u0197\u0195\u0001\u0000\u0000\u0000\u0197\u0196\u0001\u0000\u0000"+ - "\u0000\u0198\u019b\u0001\u0000\u0000\u0000\u0199\u0197\u0001\u0000\u0000"+ - "\u0000\u0199\u019a\u0001\u0000\u0000\u0000\u019a\u0089\u0001\u0000\u0000"+ - "\u0000\u019b\u0199\u0001\u0000\u0000\u0000\u019c\u019f\u0003.\u0016\u0000"+ - "\u019d\u01a0\u00034\u0019\u0000\u019e\u01a0\u0003d1\u0000\u019f\u019d"+ - "\u0001\u0000\u0000\u0000\u019f\u019e\u0001\u0000\u0000\u0000\u01a0\u01a1"+ - "\u0001\u0000\u0000\u0000\u01a1\u019f\u0001\u0000\u0000\u0000\u01a1\u01a2"+ - "\u0001\u0000\u0000\u0000\u01a2\u01a4\u0001\u0000\u0000\u0000\u01a3\u01a5"+ - "\u0003\u008aD\u0000\u01a4\u01a3\u0001\u0000\u0000\u0000\u01a4\u01a5\u0001"+ - "\u0000\u0000\u0000\u01a5\u01a6\u0001\u0000\u0000\u0000\u01a6\u01a7\u0003"+ - "0\u0017\u0000\u01a7\u008b\u0001\u0000\u0000\u0000\u01a8\u01a9\u0003\u0004"+ - "\u0001\u0000\u01a9\u01aa\u0001\u0000\u0000\u0000\u01aa\u01ab\u0006E\u0000"+ - "\u0000\u01ab\u008d\u0001\u0000\u0000\u0000\u01ac\u01ad\u0005{\u0000\u0000"+ - "\u01ad\u008f\u0001\u0000\u0000\u0000\u01ae\u01af\u0005}\u0000\u0000\u01af"+ - "\u0091\u0001\u0000\u0000\u0000\u01b0\u01b2\u0003\u0004\u0001\u0000\u01b1"+ - "\u01b0\u0001\u0000\u0000\u0000\u01b2\u01b3\u0001\u0000\u0000\u0000\u01b3"+ - "\u01b1\u0001\u0000\u0000\u0000\u01b3\u01b4\u0001\u0000\u0000\u0000\u01b4"+ - "\u01b5\u0001\u0000\u0000\u0000\u01b5\u01b6\u0006H\u0000\u0000\u01b6\u0093"+ - "\u0001\u0000\u0000\u0000\u01b7\u01b9\u0003\u0006\u0002\u0000\u01b8\u01b7"+ - "\u0001\u0000\u0000\u0000\u01b9\u01ba\u0001\u0000\u0000\u0000\u01ba\u01b8"+ - "\u0001\u0000\u0000\u0000\u01ba\u01bb\u0001\u0000\u0000\u0000\u01bb\u01bc"+ - "\u0001\u0000\u0000\u0000\u01bc\u01bd\u0006I\u0000\u0000\u01bd\u0095\u0001"+ - "\u0000\u0000\u0000\u01be\u01bf\u0003\u0090G\u0000\u01bf\u01c0\u0001\u0000"+ - "\u0000\u0000\u01c0\u01c1\u0006J\u0002\u0000\u01c1\u01c2\u0006J\u0003\u0000"+ - "\u01c2\u0097\u0001\u0000\u0000\u0000\u01c3\u01c4\u0003\u0012\b\u0000\u01c4"+ - "\u01c5\u0001\u0000\u0000\u0000\u01c5\u01c6\u0006K\u0004\u0000\u01c6\u0099"+ - "\u0001\u0000\u0000\u0000\u01c7\u01cc\u00034\u0019\u0000\u01c8\u01cb\u0003"+ - "4\u0019\u0000\u01c9\u01cb\u0003B \u0000\u01ca\u01c8\u0001\u0000\u0000"+ - "\u0000\u01ca\u01c9\u0001\u0000\u0000\u0000\u01cb\u01ce\u0001\u0000\u0000"+ - "\u0000\u01cc\u01ca\u0001\u0000\u0000\u0000\u01cc\u01cd\u0001\u0000\u0000"+ - "\u0000\u01cd\u01cf\u0001\u0000\u0000\u0000\u01ce\u01cc\u0001\u0000\u0000"+ - "\u0000\u01cf\u01d0\u0006L\u0005\u0000\u01d0\u009b\u0001\u0000\u0000\u0000"+ - "\u01d1\u01d2\u0003<\u001d\u0000\u01d2\u01d3\u0001\u0000\u0000\u0000\u01d3"+ - "\u01d4\u0006M\u0006\u0000\u01d4\u009d\u0001\u0000\u0000\u0000\u01d5\u01d6"+ - "\u0003:\u001c\u0000\u01d6\u01d7\u0001\u0000\u0000\u0000\u01d7\u01d8\u0006"+ - "N\u0007\u0000\u01d8\u009f\u0001\u0000\u0000\u0000\u01d9\u01da\u0003D!"+ - "\u0000\u01da\u01db\u0001\u0000\u0000\u0000\u01db\u01dc\u0006O\b\u0000"+ - "\u01dc\u00a1\u0001\u0000\u0000\u0000\u01dd\u01de\u0003F\"\u0000\u01de"+ - "\u01df\u0001\u0000\u0000\u0000\u01df\u01e0\u0006P\t\u0000\u01e0\u00a3"+ - "\u0001\u0000\u0000\u0000\u01e1\u01e2\u0007\u0000\u0000\u0000\u01e2\u01e3"+ - "\u0001\u0000\u0000\u0000\u01e3\u01e4\u0006Q\u0000\u0000\u01e4\u00a5\u0001"+ - "\u0000\u0000\u0000\u001e\u0000\u0001\u00a8\u00b4\u00ba\u00f0\u00f7\u00fe"+ - "\u0100\u0102\u0104\u0109\u010b\u0113\u0115\u011c\u0125\u012a\u013b\u015d"+ - "\u0164\u0197\u0199\u019f\u01a1\u01a4\u01b3\u01ba\u01ca\u01cc\n\u0006\u0000"+ - "\u0000\u0005\u0001\u0000\u0004\u0000\u0000\u0007\f\u0000\u0007\u0014\u0000"+ - "\u0007\u001f\u0000\u0007\u001a\u0000\u0007\u001b\u0000\u0007\u001c\u0000"+ - "\u0007\u001d\u0000"; + "\u0000\u0102\u00fe\u0001\u0000\u0000\u0000\u0102\u0103\u0001\u0000\u0000"+ + "\u0000\u0103\u0105\u0001\u0000\u0000\u0000\u0104\u00fd\u0001\u0000\u0000"+ + "\u0000\u0104\u0105\u0001\u0000\u0000\u0000\u0105\u0107\u0001\u0000\u0000"+ + "\u0000\u0106\u00fc\u0001\u0000\u0000\u0000\u0106\u0107\u0001\u0000\u0000"+ + "\u0000\u01079\u0001\u0000\u0000\u0000\u0108\u010d\u0003\f\u0005\u0000"+ + "\u0109\u010c\u00036\u001a\u0000\u010a\u010c\b\u0005\u0000\u0000\u010b"+ + "\u0109\u0001\u0000\u0000\u0000\u010b\u010a\u0001\u0000\u0000\u0000\u010c"+ + "\u010f\u0001\u0000\u0000\u0000\u010d\u010b\u0001\u0000\u0000\u0000\u010d"+ + "\u010e\u0001\u0000\u0000\u0000\u010e\u0110\u0001\u0000\u0000\u0000\u010f"+ + "\u010d\u0001\u0000\u0000\u0000\u0110\u0111\u0003\f\u0005\u0000\u0111;"+ + "\u0001\u0000\u0000\u0000\u0112\u0117\u0003\u000e\u0006\u0000\u0113\u0116"+ + "\u00036\u001a\u0000\u0114\u0116\b\u0006\u0000\u0000\u0115\u0113\u0001"+ + "\u0000\u0000\u0000\u0115\u0114\u0001\u0000\u0000\u0000\u0116\u0119\u0001"+ + "\u0000\u0000\u0000\u0117\u0115\u0001\u0000\u0000\u0000\u0117\u0118\u0001"+ + "\u0000\u0000\u0000\u0118\u011a\u0001\u0000\u0000\u0000\u0119\u0117\u0001"+ + "\u0000\u0000\u0000\u011a\u011b\u0003\u000e\u0006\u0000\u011b=\u0001\u0000"+ + "\u0000\u0000\u011c\u011f\u0003H#\u0000\u011d\u011f\u0003J$\u0000\u011e"+ + "\u011c\u0001\u0000\u0000\u0000\u011e\u011d\u0001\u0000\u0000\u0000\u011f"+ + "?\u0001\u0000\u0000\u0000\u0120\u0121\u0007\u0007\u0000\u0000\u0121A\u0001"+ + "\u0000\u0000\u0000\u0122\u0123\u0007\b\u0000\u0000\u0123C\u0001\u0000"+ + "\u0000\u0000\u0124\u0126\u0003B \u0000\u0125\u0124\u0001\u0000\u0000\u0000"+ + "\u0126\u0127\u0001\u0000\u0000\u0000\u0127\u0125\u0001\u0000\u0000\u0000"+ + "\u0127\u0128\u0001\u0000\u0000\u0000\u0128E\u0001\u0000\u0000\u0000\u0129"+ + "\u012a\u0003D!\u0000\u012a\u012c\u0003\u0018\u000b\u0000\u012b\u012d\u0003"+ + "D!\u0000\u012c\u012b\u0001\u0000\u0000\u0000\u012c\u012d\u0001\u0000\u0000"+ + "\u0000\u012dG\u0001\u0000\u0000\u0000\u012e\u012f\u0005t\u0000\u0000\u012f"+ + "\u0130\u0005r\u0000\u0000\u0130\u0131\u0005u\u0000\u0000\u0131\u0132\u0005"+ + "e\u0000\u0000\u0132I\u0001\u0000\u0000\u0000\u0133\u0134\u0005f\u0000"+ + "\u0000\u0134\u0135\u0005a\u0000\u0000\u0135\u0136\u0005l\u0000\u0000\u0136"+ + "\u0137\u0005s\u0000\u0000\u0137\u0138\u0005e\u0000\u0000\u0138K\u0001"+ + "\u0000\u0000\u0000\u0139\u013d\u0003\u0016\n\u0000\u013a\u013c\u0003\u0004"+ + "\u0001\u0000\u013b\u013a\u0001\u0000\u0000\u0000\u013c\u013f\u0001\u0000"+ + "\u0000\u0000\u013d\u013b\u0001\u0000\u0000\u0000\u013d\u013e\u0001\u0000"+ + "\u0000\u0000\u013e\u0140\u0001\u0000\u0000\u0000\u013f\u013d\u0001\u0000"+ + "\u0000\u0000\u0140\u0141\u00032\u0018\u0000\u0141M\u0001\u0000\u0000\u0000"+ + "\u0142\u0143\u0005i\u0000\u0000\u0143\u0144\u0005f\u0000\u0000\u0144O"+ + "\u0001\u0000\u0000\u0000\u0145\u0146\u0005t\u0000\u0000\u0146\u0147\u0005"+ + "h\u0000\u0000\u0147\u0148\u0005e\u0000\u0000\u0148\u0149\u0005n\u0000"+ + "\u0000\u0149Q\u0001\u0000\u0000\u0000\u014a\u014b\u0005e\u0000\u0000\u014b"+ + "\u014c\u0005l\u0000\u0000\u014c\u014d\u0005s\u0000\u0000\u014d\u014e\u0005"+ + "e\u0000\u0000\u014eS\u0001\u0000\u0000\u0000\u014f\u0150\u0005e\u0000"+ + "\u0000\u0150\u0151\u0005n\u0000\u0000\u0151\u0152\u0005d\u0000\u0000\u0152"+ + "U\u0001\u0000\u0000\u0000\u0153\u0154\u0005w\u0000\u0000\u0154\u0155\u0005"+ + "i\u0000\u0000\u0155\u0156\u0005t\u0000\u0000\u0156\u0157\u0005h\u0000"+ + "\u0000\u0157W\u0001\u0000\u0000\u0000\u0158\u0159\u0005$\u0000\u0000\u0159"+ + "\u015e\u00034\u0019\u0000\u015a\u015d\u00034\u0019\u0000\u015b\u015d\u0003"+ + "B \u0000\u015c\u015a\u0001\u0000\u0000\u0000\u015c\u015b\u0001\u0000\u0000"+ + "\u0000\u015d\u0160\u0001\u0000\u0000\u0000\u015e\u015c\u0001\u0000\u0000"+ + "\u0000\u015e\u015f\u0001\u0000\u0000\u0000\u015fY\u0001\u0000\u0000\u0000"+ + "\u0160\u015e\u0001\u0000\u0000\u0000\u0161\u0162\u0005$\u0000\u0000\u0162"+ + "[\u0001\u0000\u0000\u0000\u0163\u0164\u0003\b\u0003\u0000\u0164]\u0001"+ + "\u0000\u0000\u0000\u0165\u0167\u0003\u0004\u0001\u0000\u0166\u0165\u0001"+ + "\u0000\u0000\u0000\u0167\u0168\u0001\u0000\u0000\u0000\u0168\u0166\u0001"+ + "\u0000\u0000\u0000\u0168\u0169\u0001\u0000\u0000\u0000\u0169\u016a\u0001"+ + "\u0000\u0000\u0000\u016a\u016b\u0006.\u0000\u0000\u016b_\u0001\u0000\u0000"+ + "\u0000\u016c\u016e\u0003\u0006\u0002\u0000\u016d\u016c\u0001\u0000\u0000"+ + "\u0000\u016e\u016f\u0001\u0000\u0000\u0000\u016f\u016d\u0001\u0000\u0000"+ + "\u0000\u016f\u0170\u0001\u0000\u0000\u0000\u0170\u0171\u0001\u0000\u0000"+ + "\u0000\u0171\u0172\u0006/\u0000\u0000\u0172a\u0001\u0000\u0000\u0000\u0173"+ + "\u0174\u0003\u0090G\u0000\u0174\u0175\u0001\u0000\u0000\u0000\u0175\u0176"+ + "\u00060\u0001\u0000\u0176c\u0001\u0000\u0000\u0000\u0177\u0178\u0003\u0092"+ + "H\u0000\u0178\u0179\u0001\u0000\u0000\u0000\u0179\u017a\u00061\u0002\u0000"+ + "\u017ae\u0001\u0000\u0000\u0000\u017b\u017c\u0003\u0018\u000b\u0000\u017c"+ + "g\u0001\u0000\u0000\u0000\u017d\u017e\u0003\u001a\f\u0000\u017ei\u0001"+ + "\u0000\u0000\u0000\u017f\u0180\u0003\u001c\r\u0000\u0180k\u0001\u0000"+ + "\u0000\u0000\u0181\u0182\u0003\u001e\u000e\u0000\u0182m\u0001\u0000\u0000"+ + "\u0000\u0183\u0184\u0003 \u000f\u0000\u0184o\u0001\u0000\u0000\u0000\u0185"+ + "\u0186\u0003,\u0015\u0000\u0186q\u0001\u0000\u0000\u0000\u0187\u0188\u0003"+ + "\u0014\t\u0000\u0188s\u0001\u0000\u0000\u0000\u0189\u018a\u0003\u0012"+ + "\b\u0000\u018au\u0001\u0000\u0000\u0000\u018b\u018c\u0003\"\u0010\u0000"+ + "\u018cw\u0001\u0000\u0000\u0000\u018d\u018e\u0003$\u0011\u0000\u018ey"+ + "\u0001\u0000\u0000\u0000\u018f\u0190\u0003&\u0012\u0000\u0190{\u0001\u0000"+ + "\u0000\u0000\u0191\u0192\u0003(\u0013\u0000\u0192}\u0001\u0000\u0000\u0000"+ + "\u0193\u0194\u0003*\u0014\u0000\u0194\u007f\u0001\u0000\u0000\u0000\u0195"+ + "\u0196\u0003<\u001d\u0000\u0196\u0081\u0001\u0000\u0000\u0000\u0197\u0198"+ + "\u0003:\u001c\u0000\u0198\u0083\u0001\u0000\u0000\u0000\u0199\u019a\u0003"+ + "D!\u0000\u019a\u0085\u0001\u0000\u0000\u0000\u019b\u019c\u0003F\"\u0000"+ + "\u019c\u0087\u0001\u0000\u0000\u0000\u019d\u019e\u0003>\u001e\u0000\u019e"+ + "\u0089\u0001\u0000\u0000\u0000\u019f\u01a4\u00034\u0019\u0000\u01a0\u01a3"+ + "\u00034\u0019\u0000\u01a1\u01a3\u0003B \u0000\u01a2\u01a0\u0001\u0000"+ + "\u0000\u0000\u01a2\u01a1\u0001\u0000\u0000\u0000\u01a3\u01a6\u0001\u0000"+ + "\u0000\u0000\u01a4\u01a2\u0001\u0000\u0000\u0000\u01a4\u01a5\u0001\u0000"+ + "\u0000\u0000\u01a5\u008b\u0001\u0000\u0000\u0000\u01a6\u01a4\u0001\u0000"+ + "\u0000\u0000\u01a7\u01aa\u0003.\u0016\u0000\u01a8\u01ab\u00034\u0019\u0000"+ + "\u01a9\u01ab\u0003f2\u0000\u01aa\u01a8\u0001\u0000\u0000\u0000\u01aa\u01a9"+ + "\u0001\u0000\u0000\u0000\u01ab\u01ac\u0001\u0000\u0000\u0000\u01ac\u01aa"+ + "\u0001\u0000\u0000\u0000\u01ac\u01ad\u0001\u0000\u0000\u0000\u01ad\u01af"+ + "\u0001\u0000\u0000\u0000\u01ae\u01b0\u0003\u008cE\u0000\u01af\u01ae\u0001"+ + "\u0000\u0000\u0000\u01af\u01b0\u0001\u0000\u0000\u0000\u01b0\u01b1\u0001"+ + "\u0000\u0000\u0000\u01b1\u01b2\u00030\u0017\u0000\u01b2\u008d\u0001\u0000"+ + "\u0000\u0000\u01b3\u01b4\u0003\u0004\u0001\u0000\u01b4\u01b5\u0001\u0000"+ + "\u0000\u0000\u01b5\u01b6\u0006F\u0000\u0000\u01b6\u008f\u0001\u0000\u0000"+ + "\u0000\u01b7\u01b8\u0005{\u0000\u0000\u01b8\u0091\u0001\u0000\u0000\u0000"+ + "\u01b9\u01ba\u0005}\u0000\u0000\u01ba\u0093\u0001\u0000\u0000\u0000\u01bb"+ + "\u01bd\u0003\u0004\u0001\u0000\u01bc\u01bb\u0001\u0000\u0000\u0000\u01bd"+ + "\u01be\u0001\u0000\u0000\u0000\u01be\u01bc\u0001\u0000\u0000\u0000\u01be"+ + "\u01bf\u0001\u0000\u0000\u0000\u01bf\u01c0\u0001\u0000\u0000\u0000\u01c0"+ + "\u01c1\u0006I\u0000\u0000\u01c1\u0095\u0001\u0000\u0000\u0000\u01c2\u01c4"+ + "\u0003\u0006\u0002\u0000\u01c3\u01c2\u0001\u0000\u0000\u0000\u01c4\u01c5"+ + "\u0001\u0000\u0000\u0000\u01c5\u01c3\u0001\u0000\u0000\u0000\u01c5\u01c6"+ + "\u0001\u0000\u0000\u0000\u01c6\u01c7\u0001\u0000\u0000\u0000\u01c7\u01c8"+ + "\u0006J\u0000\u0000\u01c8\u0097\u0001\u0000\u0000\u0000\u01c9\u01ca\u0003"+ + "\u0092H\u0000\u01ca\u01cb\u0001\u0000\u0000\u0000\u01cb\u01cc\u0006K\u0002"+ + "\u0000\u01cc\u01cd\u0006K\u0003\u0000\u01cd\u0099\u0001\u0000\u0000\u0000"+ + "\u01ce\u01cf\u0003\u0012\b\u0000\u01cf\u01d0\u0001\u0000\u0000\u0000\u01d0"+ + "\u01d1\u0006L\u0004\u0000\u01d1\u009b\u0001\u0000\u0000\u0000\u01d2\u01d7"+ + "\u00034\u0019\u0000\u01d3\u01d6\u00034\u0019\u0000\u01d4\u01d6\u0003B"+ + " \u0000\u01d5\u01d3\u0001\u0000\u0000\u0000\u01d5\u01d4\u0001\u0000\u0000"+ + "\u0000\u01d6\u01d9\u0001\u0000\u0000\u0000\u01d7\u01d5\u0001\u0000\u0000"+ + "\u0000\u01d7\u01d8\u0001\u0000\u0000\u0000\u01d8\u01da\u0001\u0000\u0000"+ + "\u0000\u01d9\u01d7\u0001\u0000\u0000\u0000\u01da\u01db\u0006M\u0005\u0000"+ + "\u01db\u009d\u0001\u0000\u0000\u0000\u01dc\u01dd\u0003<\u001d\u0000\u01dd"+ + "\u01de\u0001\u0000\u0000\u0000\u01de\u01df\u0006N\u0006\u0000\u01df\u009f"+ + "\u0001\u0000\u0000\u0000\u01e0\u01e1\u0003:\u001c\u0000\u01e1\u01e2\u0001"+ + "\u0000\u0000\u0000\u01e2\u01e3\u0006O\u0007\u0000\u01e3\u00a1\u0001\u0000"+ + "\u0000\u0000\u01e4\u01e5\u0003D!\u0000\u01e5\u01e6\u0001\u0000\u0000\u0000"+ + "\u01e6\u01e7\u0006P\b\u0000\u01e7\u00a3\u0001\u0000\u0000\u0000\u01e8"+ + "\u01e9\u0003F\"\u0000\u01e9\u01ea\u0001\u0000\u0000\u0000\u01ea\u01eb"+ + "\u0006Q\t\u0000\u01eb\u00a5\u0001\u0000\u0000\u0000\u01ec\u01ed\u0007"+ + "\u0000\u0000\u0000\u01ed\u01ee\u0001\u0000\u0000\u0000\u01ee\u01ef\u0006"+ + "R\u0000\u0000\u01ef\u00a7\u0001\u0000\u0000\u0000 \u0000\u0001\u00aa\u00b6"+ + "\u00bc\u00f2\u00f9\u0100\u0102\u0104\u0106\u010b\u010d\u0115\u0117\u011e"+ + "\u0127\u012c\u013d\u015c\u015e\u0168\u016f\u01a2\u01a4\u01aa\u01ac\u01af"+ + "\u01be\u01c5\u01d5\u01d7\n\u0006\u0000\u0000\u0005\u0001\u0000\u0004\u0000"+ + "\u0000\u0007\r\u0000\u0007\u0015\u0000\u0007 \u0000\u0007\u001b\u0000"+ + "\u0007\u001c\u0000\u0007\u001d\u0000\u0007\u001e\u0000"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { diff --git a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.tokens b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.tokens index d3d7a228e6..d384822c9a 100644 --- a/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.tokens +++ b/oap-formats/oap-template/src/main/java-antlr-generated/oap/template/TemplateLexerExpression.tokens @@ -4,39 +4,40 @@ THEN=3 ELSE=4 END=5 WITH=6 -ROOT=7 -BLOCK_COMMENT=8 -HORZ_WS=9 -VERT_WS=10 -LBRACE=11 -RBRACE=12 -DOT=13 -LPAREN=14 -RPAREN=15 -LBRACK=16 -RBRACK=17 -DQUESTION=18 -SEMI=19 -COMMA=20 -STAR=21 -SLASH=22 -PERCENT=23 -PLUS=24 -MINUS=25 -DSTRING=26 -SSTRING=27 -DECDIGITS=28 -FLOAT=29 -BOOLEAN=30 -ID=31 -CAST_TYPE=32 -ERR_CHAR=33 -C_HORZ_WS=34 -C_VERT_WS=35 -CERR_CHAR=36 +VAR_ID=7 +ROOT=8 +BLOCK_COMMENT=9 +HORZ_WS=10 +VERT_WS=11 +LBRACE=12 +RBRACE=13 +DOT=14 +LPAREN=15 +RPAREN=16 +LBRACK=17 +RBRACK=18 +DQUESTION=19 +SEMI=20 +COMMA=21 +STAR=22 +SLASH=23 +PERCENT=24 +PLUS=25 +MINUS=26 +DSTRING=27 +SSTRING=28 +DECDIGITS=29 +FLOAT=30 +BOOLEAN=31 +ID=32 +CAST_TYPE=33 +ERR_CHAR=34 +C_HORZ_WS=35 +C_VERT_WS=36 +CERR_CHAR=37 'if'=2 'then'=3 'else'=4 'end'=5 'with'=6 -'$'=7 +'$'=8 diff --git a/oap-formats/oap-template/src/main/java/oap/template/TemplateEngine.java b/oap-formats/oap-template/src/main/java/oap/template/TemplateEngine.java index b6b28b26dd..46eda98d78 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/TemplateEngine.java +++ b/oap-formats/oap-template/src/main/java/oap/template/TemplateEngine.java @@ -43,6 +43,7 @@ import oap.template.render.TemplateAstUtils; import oap.template.render.TemplateType; import oap.template.tree.Elements; +import oap.template.tree.ToStringRender; import oap.util.Dates; import oap.util.function.Try; import org.antlr.v4.runtime.BufferedTokenStream; @@ -188,7 +189,9 @@ private void loadFunctions() { grammar.addErrorListener( ThrowingErrorListener.INSTANCE ); } Elements elements = grammar.elements( aliases ).ret; - log.trace( "\n" + elements.print() ); + ToStringRender render = new ToStringRender(); + elements.print( render ); + log.trace( "\n{}", render ); AstRenderRoot ast = TemplateAstUtils.toAst( elements, new TemplateType( type.type() ), builtInFunction, errorStrategy ); diff --git a/oap-formats/oap-template/src/main/java/oap/template/render/AstRenderBlockRange.java b/oap-formats/oap-template/src/main/java/oap/template/render/AstRenderBlockRange.java new file mode 100644 index 0000000000..e0f8d0d202 --- /dev/null +++ b/oap-formats/oap-template/src/main/java/oap/template/render/AstRenderBlockRange.java @@ -0,0 +1,151 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) Open Application Platform Authors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package oap.template.render; + +import lombok.ToString; + +import javax.annotation.Nullable; +import java.util.List; + +/** + * Block range over a collection or map. + * {{% range .list }} body {{% end %}} + * {{% range $item := .list }} body {{% end %}} + * {{% range $index,$item := .list }} body {{% end %}} + * {{% range $key,$value := .map }} body {{% end %}} + */ +@ToString( callSuper = true ) +public class AstRenderBlockRange extends AstRender { + public enum Mode { IMPLICIT_SCOPE, NAMED_ITEM, NAMED_INDEX_ITEM, MAP_KEY_VALUE } + + private final AstRender collectionAst; + private final TemplateType collectionType; + private final TemplateType itemType; + private final Mode mode; + @Nullable private final String itemVarName; + @Nullable private final String indexOrKeyVarName; + @Nullable private final TemplateType keyType; + @Nullable private final TemplateType valueType; + private final List bodyChildren; + @Nullable private final List elseChildren; + + public AstRenderBlockRange( TemplateType type, AstRender collectionAst, TemplateType collectionType, + TemplateType itemType, Mode mode, + @Nullable String itemVarName, @Nullable String indexOrKeyVarName, + @Nullable TemplateType keyType, @Nullable TemplateType valueType, + List bodyChildren, @Nullable List elseChildren ) { + super( type ); + this.collectionAst = collectionAst; + this.collectionType = collectionType; + this.itemType = itemType; + this.mode = mode; + this.itemVarName = itemVarName; + this.indexOrKeyVarName = indexOrKeyVarName; + this.keyType = keyType; + this.valueType = valueType; + this.bodyChildren = bodyChildren; + this.elseChildren = elseChildren; + } + + @Override + public void render( Render render ) { + String collVar = render.newVariable(); + render.ntab().append( "%s %s = null;", collectionType.getTypeName(), collVar ); + collectionAst.render( render.withScopeVar( collVar ) ); + + boolean isMap = mode == Mode.MAP_KEY_VALUE; + String emptyCheck = collVar + " != null && !" + collVar + ".isEmpty()"; + render.ntab().append( "if( %s ) {", emptyCheck ); + + Render outerRender = render.tabInc().newBlock(); + + if( isMap ) { + renderMap( render, outerRender, collVar ); + } else if( mode == Mode.IMPLICIT_SCOPE ) { + renderImplicit( render, outerRender, collVar ); + } else if( mode == Mode.NAMED_INDEX_ITEM ) { + renderIndexItem( render, outerRender, collVar ); + } else { + renderNamedItem( render, outerRender, collVar ); + } + + render.ntab().append( "}" ); + + if( elseChildren != null ) { + render.append( " else {" ); + Render elseRender = render.tabInc().newBlock(); + for( AstRender child : elseChildren ) child.render( elseRender ); + render.ntab().append( "}" ); + } + } + + private void renderImplicit( Render render, Render outerRender, String collVar ) { + String itemVar = render.newVariable(); + outerRender.ntab().append( "for( %s %s : %s ) {", itemType.getTypeName(), itemVar, collVar ); + Render innerRender = outerRender.tabInc().newBlock(); + Render bodyRender = innerRender.withField( itemVar ).withParentType( itemType ); + for( AstRender child : bodyChildren ) child.render( bodyRender ); + outerRender.ntab().append( "}" ); + } + + private void renderNamedItem( Render render, Render outerRender, String collVar ) { + String itemVar = render.newVariable(); + outerRender.ntab().append( "for( %s %s : %s ) {", itemType.getTypeName(), itemVar, collVar ); + Render innerRender = outerRender.tabInc().newBlock(); + Render bodyRender = innerRender.withRangeVar( itemVarName, itemVar ); + for( AstRender child : bodyChildren ) child.render( bodyRender ); + outerRender.ntab().append( "}" ); + } + + private void renderIndexItem( Render render, Render outerRender, String collVar ) { + String idxVar = render.newVariable(); + outerRender.ntab().append( "int %s = 0;", idxVar ); + String itemVar = render.newVariable(); + outerRender.ntab().append( "for( %s %s : %s ) {", itemType.getTypeName(), itemVar, collVar ); + Render innerRender = outerRender.tabInc().newBlock(); + Render bodyRender = innerRender + .withRangeVar( indexOrKeyVarName, idxVar ) + .withRangeVar( itemVarName, itemVar ); + for( AstRender child : bodyChildren ) child.render( bodyRender ); + innerRender.ntab().append( "%s++;", idxVar ); + outerRender.ntab().append( "}" ); + } + + private void renderMap( Render render, Render outerRender, String collVar ) { + String entryVar = render.newVariable(); + String entryType = "Map.Entry<" + keyType.getTypeName() + "," + valueType.getTypeName() + ">"; + outerRender.ntab().append( "for( %s %s : %s.entrySet() ) {", entryType, entryVar, collVar ); + Render innerRender = outerRender.tabInc().newBlock(); + String keyVar = render.newVariable(); + String valueVar = render.newVariable(); + innerRender.ntab().append( "%s %s = %s.getKey();", keyType.getTypeName(), keyVar, entryVar ); + innerRender.ntab().append( "%s %s = %s.getValue();", valueType.getTypeName(), valueVar, entryVar ); + Render bodyRender = innerRender + .withRangeVar( indexOrKeyVarName, keyVar ) + .withRangeVar( itemVarName, valueVar ); + for( AstRender child : bodyChildren ) child.render( bodyRender ); + outerRender.ntab().append( "}" ); + } +} diff --git a/oap-formats/oap-template/src/main/java/oap/template/render/AstRenderBlockRangeInterval.java b/oap-formats/oap-template/src/main/java/oap/template/render/AstRenderBlockRangeInterval.java new file mode 100644 index 0000000000..9901f83de3 --- /dev/null +++ b/oap-formats/oap-template/src/main/java/oap/template/render/AstRenderBlockRangeInterval.java @@ -0,0 +1,91 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) Open Application Platform Authors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package oap.template.render; + +import lombok.ToString; + +import javax.annotation.Nullable; +import java.util.List; + +/** + * Block range over an integer interval. + * {{% range $k := 1 .. 10 }} body {{% end %}} + * {{% range $k := 1 .. 10 step 2 }} body {{% end %}} + * {{% range $k := start .. end step step }} body {{% end %}} + */ +@ToString( callSuper = true ) +public class AstRenderBlockRangeInterval extends AstRender { + + public sealed interface IntRangeValue permits IntRangeValue.Literal, IntRangeValue.Field { + record Literal( int value ) implements IntRangeValue { + @Override + public String toCode( String obj ) { + return String.valueOf( value ); + } + } + record Field( String fieldName ) implements IntRangeValue { + @Override + public String toCode( String obj ) { + return obj + "." + fieldName; + } + } + String toCode( String currentObj ); + } + + private final String varName; + private final IntRangeValue from; + private final IntRangeValue to; + private final IntRangeValue step; + private final List bodyChildren; + @Nullable private final List elseChildren; + + public AstRenderBlockRangeInterval( TemplateType type, String varName, + IntRangeValue from, IntRangeValue to, IntRangeValue step, + List bodyChildren, @Nullable List elseChildren ) { + super( type ); + this.varName = varName; + this.from = from; + this.to = to; + this.step = step; + this.bodyChildren = bodyChildren; + this.elseChildren = elseChildren; + } + + @Override + public void render( Render render ) { + String loopVar = render.newVariable(); + String fromCode = from.toCode( render.field ); + String toCode = to.toCode( render.field ); + String stepCode = step.toCode( render.field ); + + render.ntab().append( "for( int %s = %s; %s <= %s; %s += %s ) {", + loopVar, fromCode, loopVar, toCode, loopVar, stepCode ); + + Render innerRender = render.tabInc().newBlock().withRangeVar( varName, loopVar ); + for( AstRender child : bodyChildren ) child.render( innerRender ); + + render.ntab().append( "}" ); + } +} diff --git a/oap-formats/oap-template/src/main/java/oap/template/render/AstRenderVarRef.java b/oap-formats/oap-template/src/main/java/oap/template/render/AstRenderVarRef.java new file mode 100644 index 0000000000..ff70281c95 --- /dev/null +++ b/oap-formats/oap-template/src/main/java/oap/template/render/AstRenderVarRef.java @@ -0,0 +1,48 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) Open Application Platform Authors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package oap.template.render; + +import lombok.ToString; + +/** + * Redirects render.field to the Java variable bound to a named range variable ($varName). + * Used when an expression inside a range body starts with $varName (e.g., {{ $item.field }}). + */ +@ToString( callSuper = true ) +class AstRenderVarRef extends AstRender { + private final String varName; + + AstRenderVarRef( String varName, TemplateType varType ) { + super( varType ); + this.varName = varName; + } + + @Override + public void render( Render render ) { + String javaVar = render.rangeVarMap.get( varName ); + Render varRender = render.withField( javaVar ).withParentType( type ); + children.forEach( c -> c.render( varRender ) ); + } +} diff --git a/oap-formats/oap-template/src/main/java/oap/template/render/Render.java b/oap-formats/oap-template/src/main/java/oap/template/render/Render.java index 69e1661ce3..942a4c9e30 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/render/Render.java +++ b/oap-formats/oap-template/src/main/java/oap/template/render/Render.java @@ -29,7 +29,9 @@ import org.apache.commons.text.StringEscapeUtils; import java.util.ArrayDeque; +import java.util.HashMap; import java.util.HashSet; +import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; @ToString @@ -46,6 +48,7 @@ public class Render { public final String scopeVar; public final String rootField; public final String prefix; + public final Map rangeVarMap; private final AtomicInteger ids; private final StringBuilder sb; private final ArrayDeque> variables; @@ -53,7 +56,7 @@ public class Render { private Render( String templateName, String content, TemplateType parentType, TemplateAccumulator templateAccumulator, String field, String templateAccumulatorName, int tab, AtomicInteger ids, String tryVariable ) { this( new StringBuilder(), templateName, content, parentType, templateAccumulator, field, templateAccumulatorName, tab, ids, tryVariable, - null, null, null, "", new ArrayDeque<>() { + null, null, null, "", Map.of(), new ArrayDeque<>() { { this.addFirst( new HashSet<>() ); } @@ -63,7 +66,7 @@ private Render( String templateName, String content, TemplateType parentType, Te public Render( StringBuilder sb, String templateName, String content, TemplateType parentType, TemplateAccumulator templateAccumulator, String field, String templateAccumulatorName, int tab, AtomicInteger ids, String tryVariable, String booleanIfVar, String scopeVar, String rootField, String prefix, - ArrayDeque> variables ) { + Map rangeVarMap, ArrayDeque> variables ) { this.sb = sb; this.templateName = templateName; this.content = content; @@ -78,7 +81,7 @@ public Render( StringBuilder sb, String templateName, String content, TemplateTy this.scopeVar = scopeVar; this.rootField = rootField; this.prefix = prefix; - + this.rangeVarMap = rangeVarMap; this.variables = variables; } @@ -88,32 +91,32 @@ public static Render init( String templateName, String content, TemplateType typ public Render withField( String field ) { return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, field, - this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, variableNameWithPrefix( field ), variables ); + this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, variableNameWithPrefix( field ), rangeVarMap, variables ); } public Render withContent( String content ) { return new Render( this.sb, this.templateName, content, this.parentType, this.templateAccumulator, field, - this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, variables ); + this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, variables ); } public Render withTemplateAccumulatorName( String templateAccumulatorName ) { return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, this.field, - templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, variables ); + templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, variables ); } public Render tabInc() { return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, this.field, - this.templateAccumulatorName, this.tab + 1, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, variables ); + this.templateAccumulatorName, this.tab + 1, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, variables ); } public Render tabDec() { return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, this.field, - this.templateAccumulatorName, this.tab - 1, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, variables ); + this.templateAccumulatorName, this.tab - 1, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, variables ); } public Render withParentType( TemplateType parentType ) { return new Render( this.sb, this.templateName, this.content, parentType, this.templateAccumulator, this.field, - this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, variables ); + this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, variables ); } public Render n() { @@ -126,7 +129,7 @@ public Render ntab() { } public Render tab() { - sb.append( " ".repeat( tab ) ); + sb.repeat( " ", tab ); return this; } @@ -184,22 +187,29 @@ public NewVariable newVariable( String name ) { public Render withTryVariable( String tryVariable ) { return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, this.field, - this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, variables ); + this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, variables ); } public Render withBooleanIfVar( String booleanIfVar ) { return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, this.field, - this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, variables ); + this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, variables ); } public Render withScopeVar( String scopeVar ) { return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, this.field, - this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, variables ); + this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, variables ); } public Render withRootField( String rootField ) { return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, this.field, - this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, variables ); + this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, variables ); + } + + public Render withRangeVar( String name, String javaName ) { + var newMap = new HashMap<>( rangeVarMap ); + newMap.put( name, javaName ); + return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, this.field, + this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, newMap, variables ); } public Render newBlock() { @@ -210,7 +220,7 @@ public Render newBlock() { newStack.addFirst( new HashSet<>() ); return new Render( this.sb, this.templateName, this.content, this.parentType, this.templateAccumulator, this.field, - this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, newStack ); + this.templateAccumulatorName, this.tab, ids, tryVariable, booleanIfVar, scopeVar, rootField, prefix, rangeVarMap, newStack ); } private String variableNameWithPrefix( String name ) { diff --git a/oap-formats/oap-template/src/main/java/oap/template/render/TemplateAstUtils.java b/oap-formats/oap-template/src/main/java/oap/template/render/TemplateAstUtils.java index 2107e166c1..b99c073208 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/render/TemplateAstUtils.java +++ b/oap-formats/oap-template/src/main/java/oap/template/render/TemplateAstUtils.java @@ -35,6 +35,7 @@ import oap.template.TemplateLexerExpression; import oap.template.ThrowingErrorListener; import oap.template.tree.BlockIfElement; +import oap.template.tree.BlockRangeElement; import oap.template.tree.BlockWithElement; import oap.template.tree.Element; import oap.template.tree.Elements; @@ -56,9 +57,12 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import static oap.template.ErrorStrategy.IGNORE; import static org.apache.commons.lang3.StringUtils.stripEnd; @@ -68,8 +72,21 @@ public class TemplateAstUtils { @SuppressWarnings( "checkstyle:ModifiedControlVariable" ) public static TemplateType findExpressionResultType( TemplateType rootTemplateType, Exprs exprs, ErrorStrategy errorStrategy ) { + return findExpressionResultType( rootTemplateType, exprs, errorStrategy, Map.of() ); + } + + @SuppressWarnings( "checkstyle:ModifiedControlVariable" ) + static TemplateType findExpressionResultType( TemplateType rootTemplateType, Exprs exprs, ErrorStrategy errorStrategy, + Map rangeVarTypes ) { if( exprs.concatenation != null ) return new TemplateType( String.class, false ); + if( exprs.varName != null ) { + TemplateType varType = rangeVarTypes.get( exprs.varName ); + if( varType == null ) return new TemplateType( Object.class, true ); + if( exprs.exprs.isEmpty() ) return varType; + return findExpressionResultType( varType, new Exprs( exprs.exprs ), errorStrategy, Map.of() ); + } + try { TemplateType currentType = rootTemplateType; ArrayList exprArrayList = exprs.exprs; @@ -152,11 +169,17 @@ static Field findField( Class clazz, String fieldName ) throws NoSuchFieldExc static AstRender toAst( Expression expression, TemplateType templateType, String castType, String defaultValue, Map> builtInFunction, ErrorStrategy errorStrategy ) throws ClassNotFoundException { - return toAst( expression, templateType, templateType, castType, defaultValue, builtInFunction, errorStrategy ); + return toAst( expression, templateType, templateType, castType, defaultValue, builtInFunction, errorStrategy, Map.of() ); } static AstRender toAst( Expression expression, TemplateType templateType, TemplateType rootTemplateType, String castType, String defaultValue, Map> builtInFunction, ErrorStrategy errorStrategy ) throws ClassNotFoundException { + return toAst( expression, templateType, rootTemplateType, castType, defaultValue, builtInFunction, errorStrategy, Map.of() ); + } + + private static AstRender toAst( Expression expression, TemplateType templateType, TemplateType rootTemplateType, String castType, String defaultValue, + Map> builtInFunction, ErrorStrategy errorStrategy, + Map rangeVarTypes ) throws ClassNotFoundException { ArrayList orAst = new ArrayList(); TemplateType lastTemplateType = null; @@ -164,13 +187,16 @@ static AstRender toAst( Expression expression, TemplateType templateType, Templa for( int i = 0; i < expression.or.size(); i++ ) { Exprs item = expression.or.get( i ); - TemplateType effectiveType = item.rootScoped ? rootTemplateType : templateType; - TemplateType expressionResultType = TemplateAstUtils.findExpressionResultType( effectiveType, item, errorStrategy ); + TemplateType effectiveType = item.rootScoped ? rootTemplateType + : ( item.varName != null && rangeVarTypes.containsKey( item.varName ) ) + ? rangeVarTypes.get( item.varName ) + : templateType; + TemplateType expressionResultType = TemplateAstUtils.findExpressionResultType( effectiveType, item, errorStrategy, rangeVarTypes ); ErrorStrategy itemErrorStrategy = i < expression.or.size() - 1 ? IGNORE : errorStrategy; AstRender itemAst = TemplateAstUtils.toAst( item, expression.or.size() == 1 ? expression.function : null, - effectiveType, rootTemplateType, expressionResultType, castType, defaultValue, builtInFunction, itemErrorStrategy ); + effectiveType, rootTemplateType, expressionResultType, castType, defaultValue, builtInFunction, itemErrorStrategy, rangeVarTypes ); orAst.add( itemAst ); TemplateType itemTemplateType = findLastsTemplateType( itemAst ); @@ -231,7 +257,7 @@ static AstRender toAst( Expression expression, TemplateType templateType, Templa } Expression expandedExpression = new Expression( expression.comment, expression.castType, null, null, expandedOr, expression.defaultValue, expression.function ); - return toAst( expandedExpression, templateType, rootTemplateType, castType, defaultValue, builtInFunction, errorStrategy ); + return toAst( expandedExpression, templateType, rootTemplateType, castType, defaultValue, builtInFunction, errorStrategy, rangeVarTypes ); } return mainAst; @@ -389,16 +415,27 @@ private static TemplateType findLastsTemplateType( AstRender astRender ) { @SuppressWarnings( { "checkstyle:ModifiedControlVariable", "checkstyle:UnnecessaryParentheses", "checkstyle:OverloadMethodsDeclarationOrder", "checkstyle:ParameterAssignment" } ) private static AstRender toAst( Exprs exprs, Func function, TemplateType templateType, TemplateType resultType, String castType, String defaultValue, Map> builtInFunction, ErrorStrategy errorStrategy ) { - return toAst( exprs, function, templateType, templateType, resultType, castType, defaultValue, builtInFunction, errorStrategy ); + return toAst( exprs, function, templateType, templateType, resultType, castType, defaultValue, builtInFunction, errorStrategy, Map.of() ); } @SuppressWarnings( { "checkstyle:ModifiedControlVariable", "checkstyle:UnnecessaryParentheses", "checkstyle:OverloadMethodsDeclarationOrder", "checkstyle:ParameterAssignment" } ) private static AstRender toAst( Exprs exprs, Func function, TemplateType templateType, TemplateType rootTemplateType, TemplateType resultType, String castType, String defaultValue, Map> builtInFunction, ErrorStrategy errorStrategy ) { + return toAst( exprs, function, templateType, rootTemplateType, resultType, castType, defaultValue, builtInFunction, errorStrategy, Map.of() ); + } + + @SuppressWarnings( { "checkstyle:ModifiedControlVariable", "checkstyle:UnnecessaryParentheses", "checkstyle:OverloadMethodsDeclarationOrder", "checkstyle:ParameterAssignment" } ) + private static AstRender toAst( Exprs exprs, Func function, TemplateType templateType, TemplateType rootTemplateType, TemplateType resultType, + String castType, String defaultValue, Map> builtInFunction, ErrorStrategy errorStrategy, + Map rangeVarTypes ) { TemplateType currentTemplateType = templateType; Chain result = new Chain(); - if( exprs.rootScoped ) { + if( exprs.varName != null ) { + TemplateType varType = rangeVarTypes.getOrDefault( exprs.varName, new TemplateType( Object.class, false ) ); + result.add( new AstRenderVarRef( exprs.varName, varType ) ); + currentTemplateType = varType; + } else if( exprs.rootScoped ) { result.add( new AstRenderSwitchToRoot( rootTemplateType ) ); } @@ -577,12 +614,13 @@ private static void applyWhitespaceTrim( List elements ) { @SuppressWarnings( "checkstyle:OverloadMethodsDeclarationOrder" ) public static AstRenderRoot toAst( Elements elements, TemplateType templateType, Map> builtInFunction, ErrorStrategy errorStrategy ) { - return toAst( elements, templateType, templateType, builtInFunction, errorStrategy ); + return toAst( elements, templateType, templateType, builtInFunction, errorStrategy, Map.of() ); } @SuppressWarnings( "checkstyle:OverloadMethodsDeclarationOrder" ) private static AstRenderRoot toAst( Elements elements, TemplateType templateType, TemplateType rootTemplateType, - Map> builtInFunction, ErrorStrategy errorStrategy ) { + Map> builtInFunction, ErrorStrategy errorStrategy, + Map rangeVarTypes ) { applyWhitespaceTrim( elements.elements ); AstRenderRoot astRoot = new AstRenderRoot( templateType ); for( Element element : elements.elements ) { @@ -601,7 +639,7 @@ private static AstRenderRoot toAst( Elements elements, TemplateType templateType log.trace( e.expression + "\n" + tree.print() ); astRender = new AstRenderComment( templateType, "// " + e.expression ); - astRender.addChild( toAst( tree, templateType, rootTemplateType, tree.castType, tree.defaultValue, builtInFunction, errorStrategy ) ); + astRender.addChild( toAst( tree, templateType, rootTemplateType, tree.castType, tree.defaultValue, builtInFunction, errorStrategy, rangeVarTypes ) ); } catch( Exception exp ) { throw new TemplateException( e.expression + ": " + exp.getMessage(), exp ); } @@ -615,9 +653,9 @@ private static AstRenderRoot toAst( Elements elements, TemplateType templateType } Exprs conditionExprs = grammar.exprs().ret; AstRender conditionAst = toConditionAst( conditionExprs, templateType, errorStrategy ); - AstRenderRoot thenRoot = toAst( b.thenElements, templateType, rootTemplateType, builtInFunction, errorStrategy ); + AstRenderRoot thenRoot = toAst( b.thenElements, templateType, rootTemplateType, builtInFunction, errorStrategy, rangeVarTypes ); AstRenderRoot elseRoot = b.elseElements != null - ? toAst( b.elseElements, templateType, rootTemplateType, builtInFunction, errorStrategy ) + ? toAst( b.elseElements, templateType, rootTemplateType, builtInFunction, errorStrategy, rangeVarTypes ) : null; astRender = new AstRenderBlockIf( templateType, conditionAst, thenRoot.children, elseRoot != null ? elseRoot.children : null ); @@ -634,11 +672,17 @@ private static AstRenderRoot toAst( Elements elements, TemplateType templateType } Exprs scopeExprs = grammar.exprs().ret; ScopeAstResult scopeResult = toScopeAst( scopeExprs, templateType, errorStrategy ); - AstRenderRoot bodyRoot = toAst( w.body, scopeResult.scopeType, rootTemplateType, builtInFunction, errorStrategy ); + AstRenderRoot bodyRoot = toAst( w.body, scopeResult.scopeType, rootTemplateType, builtInFunction, errorStrategy, rangeVarTypes ); astRender = new AstRenderBlockWith( templateType, scopeResult.scopeAst, scopeResult.scopeType, bodyRoot.children ); } catch( Exception exp ) { throw new TemplateException( w.scopePath + ": " + exp.getMessage(), exp ); } + } else if( element instanceof BlockRangeElement r ) { + try { + astRender = buildRangeAst( r, templateType, rootTemplateType, builtInFunction, errorStrategy ); + } catch( Exception exp ) { + throw new TemplateException( r.rangeSpec + ": " + exp.getMessage(), exp ); + } } else { throw new TemplateException( "Unknown element " + element.getClass() ); } @@ -647,6 +691,148 @@ private static AstRenderRoot toAst( Elements elements, TemplateType templateType return astRoot; } + private static final Pattern STEP_PATTERN = Pattern.compile( "(?:^|\\s)step\\s" ); + + private static AstRender buildRangeAst( BlockRangeElement r, TemplateType templateType, TemplateType rootTemplateType, + Map> builtInFunction, ErrorStrategy errorStrategy ) throws NoSuchFieldException { + String spec = r.rangeSpec; + int assignIdx = spec.indexOf( ":=" ); + + if( assignIdx < 0 ) { + // Implicit scope: "{{% range .list }}" + String collPath = spec.startsWith( "." ) ? spec.substring( 1 ).trim() : spec.trim(); + return buildCollectionRange( collPath, List.of(), AstRenderBlockRange.Mode.IMPLICIT_SCOPE, + templateType, rootTemplateType, r, builtInFunction, errorStrategy ); + } + + String varPart = spec.substring( 0, assignIdx ).trim(); + String sourcePart = spec.substring( assignIdx + 2 ).trim(); + + List varNames = new ArrayList<>(); + for( String v : varPart.split( "," ) ) { + String vn = v.trim(); + if( vn.startsWith( "$" ) ) vn = vn.substring( 1 ); + varNames.add( vn ); + } + + if( sourcePart.contains( ".." ) ) { + return buildIntervalRange( varNames, sourcePart, templateType, rootTemplateType, r, builtInFunction, errorStrategy ); + } + + String collPath = sourcePart.startsWith( "." ) ? sourcePart.substring( 1 ).trim() : sourcePart.trim(); + + AstRenderBlockRange.Mode mode; + if( varNames.size() == 2 ) { + // Check if it's a map (key,value) or list (index,item) — determined later from collection type + mode = AstRenderBlockRange.Mode.NAMED_INDEX_ITEM; + } else { + mode = AstRenderBlockRange.Mode.NAMED_ITEM; + } + + return buildCollectionRange( collPath, varNames, mode, templateType, rootTemplateType, r, builtInFunction, errorStrategy ); + } + + @SuppressWarnings( "checkstyle:ParameterAssignment" ) + private static AstRender buildCollectionRange( String collPath, List varNames, AstRenderBlockRange.Mode mode, + TemplateType templateType, TemplateType rootTemplateType, + BlockRangeElement r, Map> builtInFunction, + ErrorStrategy errorStrategy ) throws NoSuchFieldException { + TemplateLexerExpression lexer = new TemplateLexerExpression( CharStreams.fromString( collPath ) ); + TemplateGrammarExpression grammar = new TemplateGrammarExpression( new BufferedTokenStream( lexer ), builtInFunction, errorStrategy ); + if( errorStrategy == ErrorStrategy.ERROR ) { + lexer.addErrorListener( ThrowingErrorListener.INSTANCE ); + grammar.addErrorListener( ThrowingErrorListener.INSTANCE ); + } + Exprs collExprs = grammar.exprs().ret; + ScopeAstResult scopeResult = toScopeAst( collExprs, templateType, errorStrategy ); + TemplateType collectionType = scopeResult.scopeType; + + boolean isMap = collectionType.isInstanceOf( Map.class ); + + TemplateType itemType; + TemplateType keyType = null; + TemplateType valueType = null; + String itemVarName = null; + String indexOrKeyVarName = null; + + Map bodyRangeVarTypes = new HashMap<>(); + + if( isMap ) { + mode = AstRenderBlockRange.Mode.MAP_KEY_VALUE; + keyType = collectionType.getActualTypeArguments0(); + valueType = collectionType.getActualTypeArguments1( false ); + itemType = valueType; + if( varNames.size() >= 2 ) { + indexOrKeyVarName = varNames.get( 0 ); + itemVarName = varNames.get( 1 ); + bodyRangeVarTypes.put( indexOrKeyVarName, keyType ); + bodyRangeVarTypes.put( itemVarName, valueType ); + } + } else { + itemType = collectionType.getActualTypeArguments0(); + if( mode == AstRenderBlockRange.Mode.NAMED_ITEM && !varNames.isEmpty() ) { + itemVarName = varNames.get( 0 ); + bodyRangeVarTypes.put( itemVarName, itemType ); + } else if( mode == AstRenderBlockRange.Mode.NAMED_INDEX_ITEM && varNames.size() >= 2 ) { + indexOrKeyVarName = varNames.get( 0 ); + itemVarName = varNames.get( 1 ); + bodyRangeVarTypes.put( indexOrKeyVarName, new TemplateType( int.class, false ) ); + bodyRangeVarTypes.put( itemVarName, itemType ); + } + } + + TemplateType bodyTemplateType = mode == AstRenderBlockRange.Mode.IMPLICIT_SCOPE ? itemType : templateType; + AstRenderRoot bodyRoot = toAst( r.body, bodyTemplateType, rootTemplateType, builtInFunction, errorStrategy, bodyRangeVarTypes ); + AstRenderRoot elseRoot = r.elseElements != null + ? toAst( r.elseElements, templateType, rootTemplateType, builtInFunction, errorStrategy, Map.of() ) + : null; + + return new AstRenderBlockRange( templateType, scopeResult.scopeAst, collectionType, + itemType, mode, itemVarName, indexOrKeyVarName, keyType, valueType, + bodyRoot.children, elseRoot != null ? elseRoot.children : null ); + } + + private static AstRender buildIntervalRange( List varNames, String sourcePart, + TemplateType templateType, TemplateType rootTemplateType, + BlockRangeElement r, Map> builtInFunction, + ErrorStrategy errorStrategy ) { + int dotDotIdx = sourcePart.indexOf( ".." ); + String fromStr = sourcePart.substring( 0, dotDotIdx ).trim(); + String rest = sourcePart.substring( dotDotIdx + 2 ).trim(); + + String toStr; + String stepStr = "1"; + Matcher m = STEP_PATTERN.matcher( rest ); + if( m.find() ) { + toStr = rest.substring( 0, m.start() ).trim(); + stepStr = rest.substring( m.end() ).trim(); + } else { + toStr = rest.trim(); + } + + AstRenderBlockRangeInterval.IntRangeValue from = parseIntRangeValue( fromStr ); + AstRenderBlockRangeInterval.IntRangeValue to = parseIntRangeValue( toStr ); + AstRenderBlockRangeInterval.IntRangeValue step = parseIntRangeValue( stepStr ); + + String varName = varNames.isEmpty() ? "_k" : varNames.get( 0 ); + Map bodyRangeVarTypes = Map.of( varName, new TemplateType( int.class, false ) ); + AstRenderRoot bodyRoot = toAst( r.body, templateType, rootTemplateType, builtInFunction, errorStrategy, bodyRangeVarTypes ); + AstRenderRoot elseRoot = r.elseElements != null + ? toAst( r.elseElements, templateType, rootTemplateType, builtInFunction, errorStrategy, Map.of() ) + : null; + + return new AstRenderBlockRangeInterval( templateType, varName, from, to, step, + bodyRoot.children, elseRoot != null ? elseRoot.children : null ); + } + + private static AstRenderBlockRangeInterval.IntRangeValue parseIntRangeValue( String s ) { + try { + return new AstRenderBlockRangeInterval.IntRangeValue.Literal( Integer.parseInt( s ) ); + } catch( NumberFormatException e ) { + return new AstRenderBlockRangeInterval.IntRangeValue.Field( s ); + } + } + public static AstRender getFunction( String name, List args, Map> builtInFunction, ErrorStrategy errorStrategy ) { List list = builtInFunction.get( name ); if( list == null ) { diff --git a/oap-formats/oap-template/src/main/java/oap/template/tree/BlockIfElement.java b/oap-formats/oap-template/src/main/java/oap/template/tree/BlockIfElement.java index 29ac4a10a0..e74919ffa0 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/tree/BlockIfElement.java +++ b/oap-formats/oap-template/src/main/java/oap/template/tree/BlockIfElement.java @@ -48,13 +48,15 @@ public BlockIfElement( String conditionPath, Elements thenElements, @Nullable El } @Override - public String print() { - StringBuilder sb = new StringBuilder( "BLOCK_IF" ).append( trimLeft ? "_LTRIM" : "" ) - .append( ' ' ).append( conditionPath ).append( '\n' ); - sb.append( " THEN\n" ).append( thenElements.print() ); + public void print( ToStringRender render ) { + render.append( "IF" ).append( trimLeft ? " [LTRIM]" : "" ).append( ' ' ).append( conditionPath ).nspace(); + render.append( elseElements != null ? "├── " : "└── " ); + thenElements.print( render.spaceInc( 4 ) ); + if( elseElements != null ) { - sb.append( " ELSE\n" ).append( elseElements.print() ); + render.nspace(); + render.append( "└── ELSE " ); + elseElements.print( render.spaceInc( 9 ) ); } - return sb.toString(); } } diff --git a/oap-formats/oap-template/src/main/java/oap/template/tree/BlockRangeElement.java b/oap-formats/oap-template/src/main/java/oap/template/tree/BlockRangeElement.java new file mode 100644 index 0000000000..e4c86f5712 --- /dev/null +++ b/oap-formats/oap-template/src/main/java/oap/template/tree/BlockRangeElement.java @@ -0,0 +1,57 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) Open Application Platform Authors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package oap.template.tree; + +import lombok.ToString; + +import javax.annotation.Nullable; + +@ToString +public class BlockRangeElement implements Element { + public final String rangeSpec; + public final Elements body; + @Nullable + public final Elements elseElements; + + public BlockRangeElement( String rangeSpec, Elements body, @Nullable Elements elseElements ) { + this.rangeSpec = rangeSpec; + this.body = body; + this.elseElements = elseElements; + } + + @Override + public void print( ToStringRender render ) { + render.append( "RANGE " ).append( rangeSpec ).nspace(); + + render.append( elseElements != null ? "├── " : "└── " ); + + body.print( render.spaceInc( 4 ) ); + + if( elseElements != null ) { + render.append( "└── " ); + elseElements.print( render.spaceInc( 4 ) ); + } + } +} diff --git a/oap-formats/oap-template/src/main/java/oap/template/tree/BlockWithElement.java b/oap-formats/oap-template/src/main/java/oap/template/tree/BlockWithElement.java index 8971e01814..3661aac4e6 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/tree/BlockWithElement.java +++ b/oap-formats/oap-template/src/main/java/oap/template/tree/BlockWithElement.java @@ -37,9 +37,9 @@ public BlockWithElement( String scopePath, Elements body ) { } @Override - public String print() { - StringBuilder sb = new StringBuilder( "BLOCK_WITH " ).append( scopePath ).append( '\n' ); - sb.append( " BODY\n" ).append( body.print() ); - return sb.toString(); + public void print( ToStringRender render ) { + render.append( "WITH " ).append( scopePath ).nspace(); + render.append( "└── " ); + body.print( render.spaceInc( 4 ) ); } } diff --git a/oap-formats/oap-template/src/main/java/oap/template/tree/Elements.java b/oap-formats/oap-template/src/main/java/oap/template/tree/Elements.java index 180b152910..cd38837f0b 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/tree/Elements.java +++ b/oap-formats/oap-template/src/main/java/oap/template/tree/Elements.java @@ -27,23 +27,21 @@ import lombok.ToString; import java.util.ArrayList; +import java.util.Iterator; @ToString public class Elements implements Node { public final ArrayList elements = new ArrayList<>(); - public String print() { - StringBuilder sb = new StringBuilder( "LIST\n" ); - var it = elements.iterator(); + @SuppressWarnings( "checkstyle:ParameterAssignment" ) + public void print( ToStringRender render ) { + render.append( "ELEMENTS" ); + Iterator it = elements.iterator(); while( it.hasNext() ) { - var item = it.next(); - - sb - .append( it.hasNext() ? "├── " : "└── " ) - .append( item.print() ) - .append( '\n' ); + Element item = it.next(); + render.nspace(); + render.append( it.hasNext() ? "├── " : "└── " ); + item.print( render.spaceInc( 4 ) ); } - - return sb.toString(); } } diff --git a/oap-formats/oap-template/src/main/java/oap/template/tree/ExpressionElement.java b/oap-formats/oap-template/src/main/java/oap/template/tree/ExpressionElement.java index e6b3b18521..aea2df6301 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/tree/ExpressionElement.java +++ b/oap-formats/oap-template/src/main/java/oap/template/tree/ExpressionElement.java @@ -45,7 +45,7 @@ public ExpressionElement( String expression, boolean trimLeft, boolean trimRight } @Override - public String print() { - return "EXPR '" + expression + "'" + ( trimLeft ? " TRIML" : "" ) + ( trimRight ? " TRIMR" : "" ); + public void print( ToStringRender render ) { + render.append( "EXPR '" + expression + "'" + ( trimLeft ? " TRIML" : "" ) + ( trimRight ? " TRIMR" : "" ) ); } } diff --git a/oap-formats/oap-template/src/main/java/oap/template/tree/Exprs.java b/oap-formats/oap-template/src/main/java/oap/template/tree/Exprs.java index 8a047033bd..3b124c7621 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/tree/Exprs.java +++ b/oap-formats/oap-template/src/main/java/oap/template/tree/Exprs.java @@ -26,6 +26,7 @@ import lombok.ToString; +import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; @@ -35,6 +36,7 @@ public class Exprs { public Math math = null; public Concatenation concatenation = null; public boolean rootScoped = false; + @Nullable public String varName = null; public Exprs() { } diff --git a/oap-formats/oap-template/src/main/java/oap/template/tree/Node.java b/oap-formats/oap-template/src/main/java/oap/template/tree/Node.java index 2d31e57fdd..6ee62a2acd 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/tree/Node.java +++ b/oap-formats/oap-template/src/main/java/oap/template/tree/Node.java @@ -35,5 +35,5 @@ * @see TextElement */ public interface Node { - String print(); + void print( ToStringRender render ); } diff --git a/oap-formats/oap-template/src/main/java/oap/template/tree/TextElement.java b/oap-formats/oap-template/src/main/java/oap/template/tree/TextElement.java index fba6d171d9..2858467582 100644 --- a/oap-formats/oap-template/src/main/java/oap/template/tree/TextElement.java +++ b/oap-formats/oap-template/src/main/java/oap/template/tree/TextElement.java @@ -35,7 +35,7 @@ public TextElement( String text ) { } @Override - public String print() { - return "TEXT " + text; + public void print( ToStringRender render ) { + render.append( "TEXT " + text ); } } diff --git a/oap-formats/oap-template/src/main/java/oap/template/tree/ToStringRender.java b/oap-formats/oap-template/src/main/java/oap/template/tree/ToStringRender.java new file mode 100644 index 0000000000..3900ad00fd --- /dev/null +++ b/oap-formats/oap-template/src/main/java/oap/template/tree/ToStringRender.java @@ -0,0 +1,70 @@ +package oap.template.tree; + +public class ToStringRender { + public final StringBuilder sb; + public final int space; + + public ToStringRender() { + this( new StringBuilder(), 0 ); + } + + private ToStringRender( StringBuilder sb, int space ) { + this.sb = sb; + this.space = space; + } + + public ToStringRender append( String str ) { + sb.append( str ); + + return this; + } + + public ToStringRender append( String format, Object... args ) { + sb.append( String.format( format, args ) ); + + return this; + } + + public ToStringRender append( char ch ) { + sb.append( ch ); + + return this; + } + + + public ToStringRender spaceInc( int space ) { + return new ToStringRender( sb, this.space + space ); + } + + public ToStringRender spaceInc() { + return spaceInc( 2 ); + } + + public ToStringRender spaceDec( int space ) { + return new ToStringRender( sb, this.space - space ); + } + + public ToStringRender spaceDec() { + return spaceDec( 2 ); + } + + public ToStringRender n() { + sb.append( '\n' ); + return this; + } + + public ToStringRender space() { + sb.repeat( " ", space ); + + return this; + } + + public ToStringRender nspace() { + return this.n().space(); + } + + @Override + public String toString() { + return sb.toString(); + } +} diff --git a/oap-formats/oap-template/src/test/java/oap/template/TemplateEngineRangeTest.java b/oap-formats/oap-template/src/test/java/oap/template/TemplateEngineRangeTest.java new file mode 100644 index 0000000000..ad6f8394c8 --- /dev/null +++ b/oap-formats/oap-template/src/test/java/oap/template/TemplateEngineRangeTest.java @@ -0,0 +1,139 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) Open Application Platform Authors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package oap.template; + +import oap.reflect.TypeRef; +import oap.testng.Fixtures; +import oap.util.Dates; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import java.lang.reflect.Method; + +import static oap.template.TemplateAccumulators.STRING; +import static org.assertj.core.api.Assertions.assertThat; + +public class TemplateEngineRangeTest extends Fixtures { + private TemplateEngine engine; + private String testMethodName; + + @BeforeMethod + public void beforeMethod() { + engine = new TemplateEngine( Dates.d( 10 ) ); + } + + @BeforeMethod + public void nameBefore( Method method ) { + testMethodName = method.getName(); + } + + private TestTemplateClass root( String... fieldValues ) { + TestTemplateClass c = new TestTemplateClass(); + for( String fv : fieldValues ) { + TestTemplateClass item = new TestTemplateClass(); + item.field = fv; + c.listItems.add( item ); + } + return c; + } + + @Test + public void testRangeImplicitScope() { + TestTemplateClass c = root( "a", "b", "c" ); + assertThat( engine.getTemplate( testMethodName, new TypeRef() {}, + "{{% range listItems }}{{ field }}{{% end }}", STRING, null ).render( c ).get() ) + .isEqualTo( "abc" ); + } + + @Test + public void testRangeNamedItem() { + TestTemplateClass c = root( "x", "y" ); + assertThat( engine.getTemplate( testMethodName, new TypeRef() {}, + "{{% range $item := listItems }}{{ $item.field }}{{% end }}", STRING, null ).render( c ).get() ) + .isEqualTo( "xy" ); + } + + @Test + public void testRangeNamedIndexItem() { + TestTemplateClass c = root( "a", "b", "c" ); + assertThat( engine.getTemplate( testMethodName, new TypeRef() {}, + "{{% range $i,$item := listItems }}{{ $i }}:{{ $item.field }} {{% end }}", STRING, null ).render( c ).get() ) + .isEqualTo( "0:a 1:b 2:c " ); + } + + @Test + public void testRangeMap() { + TestTemplateClass c = new TestTemplateClass(); + TestTemplateClass v1 = new TestTemplateClass(); + v1.field = "val1"; + c.mapItems.put( "k1", v1 ); + assertThat( engine.getTemplate( testMethodName, new TypeRef() {}, + "{{% range $k,$v := mapItems }}{{ $k }}={{ $v.field }}{{% end }}", STRING, null ).render( c ).get() ) + .isEqualTo( "k1=val1" ); + } + + @Test + public void testRangeElseEmpty() { + TestTemplateClass c = new TestTemplateClass(); + assertThat( engine.getTemplate( testMethodName, new TypeRef() {}, + "{{% range listItems }}{{ field }}{{% else }}empty{{% end }}", STRING, null ).render( c ).get() ) + .isEqualTo( "empty" ); + } + + @Test + public void testRangeElseNonEmpty() { + TestTemplateClass c = root( "v" ); + assertThat( engine.getTemplate( testMethodName, new TypeRef() {}, + "{{% range listItems }}{{ field }}{{% else }}empty{{% end }}", STRING, null ).render( c ).get() ) + .isEqualTo( "v" ); + } + + @Test + public void testRangeIntervalLiteral() { + TestTemplateClass c = new TestTemplateClass(); + assertThat( engine.getTemplate( testMethodName, new TypeRef() {}, + "{{% range $k := 1 .. 3 }}{{ $k }}{{% end }}", STRING, null ).render( c ).get() ) + .isEqualTo( "123" ); + } + + @Test + public void testRangeIntervalWithStep() { + TestTemplateClass c = new TestTemplateClass(); + assertThat( engine.getTemplate( testMethodName, new TypeRef() {}, + "{{% range $k := 1 .. 5 step 2 }}{{ $k }}{{% end }}", STRING, null ).render( c ).get() ) + .isEqualTo( "135" ); + } + + @Test + public void testRangeIntervalFieldBased() { + TestTemplateClass c = new TestTemplateClass(); + c.rangeStart = 2; + c.rangeEnd = 4; + c.rangeStep = 1; + assertThat( engine.getTemplate( testMethodName, new TypeRef() {}, + "{{% range $k := rangeStart .. rangeEnd step rangeStep }}{{ $k }}{{% end }}", STRING, null ).render( c ).get() ) + .isEqualTo( "234" ); + } +} diff --git a/oap-formats/oap-template/src/test/java/oap/template/TestTemplateClass.java b/oap-formats/oap-template/src/test/java/oap/template/TestTemplateClass.java index 16a9b8e943..ce8aac3924 100644 --- a/oap-formats/oap-template/src/test/java/oap/template/TestTemplateClass.java +++ b/oap-formats/oap-template/src/test/java/oap/template/TestTemplateClass.java @@ -31,6 +31,8 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; import java.util.Optional; import java.util.Set; @@ -74,6 +76,12 @@ public class TestTemplateClass { public List list2; public List listString; + public ArrayList listItems = new ArrayList<>(); + public HashMap mapItems = new HashMap<>(); + public int rangeStart; + public int rangeEnd; + public int rangeStep; + public DateTime dateTime; public Optional dateTimeOptional = Optional.empty(); public List listEnum; diff --git a/pom.xml b/pom.xml index d889ba5197..df1e831c86 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ - 25.5.5 + 25.5.6 25.0.1 25.0.0