From 8e0b1c65f5f7aa2eb54cc03185d68d1250feace1 Mon Sep 17 00:00:00 2001 From: mcDandy Date: Mon, 19 Jan 2026 17:22:23 +0100 Subject: [PATCH] (ai) add custom functions --- README.md | 1 + more_math/Parser/MathExpr.g4 | 16 +- more_math/Parser/MathExpr.interp | 10 +- more_math/Parser/MathExpr.tokens | 20 +- more_math/Parser/MathExprLexer.interp | 8 +- more_math/Parser/MathExprLexer.py | 489 ++--- more_math/Parser/MathExprLexer.tokens | 20 +- more_math/Parser/MathExprListener.py | 45 + more_math/Parser/MathExprParser.py | 2730 ++++++++++-------------- more_math/Parser/MathExprVisitor.py | 25 + more_math/Parser/UnifiedMathVisitor.py | 51 +- more_math/helper_functions.py | 2 +- tests/test_unified_math.py | 34 +- 13 files changed, 1598 insertions(+), 1853 deletions(-) diff --git a/README.md b/README.md index a29141b..10692ae 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ You can also get the node from comfy manager under the name of More math. - Conversion between INT and FLOAT; AUDIO and IMAGE (red - real - strenght of cosine of frequency; blue - imaginary - strenght of sine of frequency; green - log1p of amplitude - just so it looks good to humans) - Nodes for FLOAT, CONDITIONING, LATENT, IMAGE, MASK, NOISE, AUDIO, VIDEO, MODEL, CLIP, VAE and SIGMAS - Vector Math: Support for List literals `[v1, v2, ...]` and operations between lists/scalars/tensors +- Custom functions `funcname(variable,variable,...)->expression;` they can be used in any later defined custom function or in expression. Shadowing inbuilt functions do not work. ## Operators diff --git a/more_math/Parser/MathExpr.g4 b/more_math/Parser/MathExpr.g4 index f708bee..44296c9 100644 --- a/more_math/Parser/MathExpr.g4 +++ b/more_math/Parser/MathExpr.g4 @@ -1,6 +1,13 @@ grammar MathExpr; -// Top-level expression, with operator precedence (lowest to highest) +// Top-level entry point +start: funcDef* expr EOF; + +funcDef: + VARIABLE LPAREN paramList? RPAREN ARROW expr SEMICOLON # FunctionDef; + +paramList: VARIABLE (COMMA VARIABLE)*; + expr: atom | compExpr; compExpr: @@ -46,7 +53,10 @@ atom: | CONSTANT # ConstantExp | LPAREN expr RPAREN # ParenExp | PIPE expr PIPE # AbsExp - | LBRACKET expr (COMMA expr)* RBRACKET # ListExp; + | LBRACKET expr (COMMA expr)* RBRACKET # ListExp + | VARIABLE LPAREN exprList? RPAREN # CallExp; + +exprList: expr (COMMA expr)*; // Single-argument functions func1: @@ -217,6 +227,8 @@ PIPE: '|'; LPAREN: '('; RPAREN: ')'; COMMA: ','; +SEMICOLON: ';'; +ARROW: '->'; LBRACKET: '['; RBRACKET: ']'; diff --git a/more_math/Parser/MathExpr.interp b/more_math/Parser/MathExpr.interp index 617fdf9..89c376e 100644 --- a/more_math/Parser/MathExpr.interp +++ b/more_math/Parser/MathExpr.interp @@ -83,6 +83,8 @@ null '(' ')' ',' +';' +'->' '[' ']' null @@ -175,6 +177,8 @@ PIPE LPAREN RPAREN COMMA +SEMICOLON +ARROW LBRACKET RBRACKET CONSTANT @@ -183,6 +187,9 @@ VARIABLE WS rule names: +start +funcDef +paramList expr compExpr addExpr @@ -191,6 +198,7 @@ powExpr unaryExpr indexExpr atom +exprList func1 func2 func3 @@ -199,4 +207,4 @@ funcN atn: -[4, 1, 89, 591, 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, 1, 0, 1, 0, 3, 0, 29, 8, 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, 1, 1, 1, 1, 1, 1, 5, 1, 52, 8, 1, 10, 1, 12, 1, 55, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 66, 8, 2, 10, 2, 12, 2, 69, 9, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 5, 3, 83, 8, 3, 10, 3, 12, 3, 86, 9, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 93, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 100, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 110, 8, 6, 10, 6, 12, 6, 113, 9, 6, 1, 6, 1, 6, 5, 6, 117, 8, 6, 10, 6, 12, 6, 120, 9, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 142, 8, 7, 10, 7, 12, 7, 145, 9, 7, 1, 7, 1, 7, 3, 7, 149, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 351, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 458, 8, 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, 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, 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, 1, 10, 1, 10, 1, 10, 3, 10, 505, 8, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 523, 8, 12, 10, 12, 12, 12, 526, 9, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 5, 12, 535, 8, 12, 10, 12, 12, 12, 538, 9, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 4, 12, 547, 8, 12, 11, 12, 12, 12, 548, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 4, 12, 558, 8, 12, 11, 12, 12, 12, 559, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 4, 12, 569, 8, 12, 11, 12, 12, 12, 570, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 589, 8, 12, 1, 12, 0, 4, 2, 4, 6, 12, 13, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 0, 0, 673, 0, 28, 1, 0, 0, 0, 2, 30, 1, 0, 0, 0, 4, 56, 1, 0, 0, 0, 6, 70, 1, 0, 0, 0, 8, 92, 1, 0, 0, 0, 10, 99, 1, 0, 0, 0, 12, 101, 1, 0, 0, 0, 14, 148, 1, 0, 0, 0, 16, 350, 1, 0, 0, 0, 18, 457, 1, 0, 0, 0, 20, 504, 1, 0, 0, 0, 22, 506, 1, 0, 0, 0, 24, 588, 1, 0, 0, 0, 26, 29, 3, 14, 7, 0, 27, 29, 3, 2, 1, 0, 28, 26, 1, 0, 0, 0, 28, 27, 1, 0, 0, 0, 29, 1, 1, 0, 0, 0, 30, 31, 6, 1, -1, 0, 31, 32, 3, 4, 2, 0, 32, 53, 1, 0, 0, 0, 33, 34, 10, 7, 0, 0, 34, 35, 5, 75, 0, 0, 35, 52, 3, 4, 2, 0, 36, 37, 10, 6, 0, 0, 37, 38, 5, 74, 0, 0, 38, 52, 3, 4, 2, 0, 39, 40, 10, 5, 0, 0, 40, 41, 5, 77, 0, 0, 41, 52, 3, 4, 2, 0, 42, 43, 10, 4, 0, 0, 43, 44, 5, 76, 0, 0, 44, 52, 3, 4, 2, 0, 45, 46, 10, 3, 0, 0, 46, 47, 5, 78, 0, 0, 47, 52, 3, 4, 2, 0, 48, 49, 10, 2, 0, 0, 49, 50, 5, 79, 0, 0, 50, 52, 3, 4, 2, 0, 51, 33, 1, 0, 0, 0, 51, 36, 1, 0, 0, 0, 51, 39, 1, 0, 0, 0, 51, 42, 1, 0, 0, 0, 51, 45, 1, 0, 0, 0, 51, 48, 1, 0, 0, 0, 52, 55, 1, 0, 0, 0, 53, 51, 1, 0, 0, 0, 53, 54, 1, 0, 0, 0, 54, 3, 1, 0, 0, 0, 55, 53, 1, 0, 0, 0, 56, 57, 6, 2, -1, 0, 57, 58, 3, 6, 3, 0, 58, 67, 1, 0, 0, 0, 59, 60, 10, 3, 0, 0, 60, 61, 5, 68, 0, 0, 61, 66, 3, 6, 3, 0, 62, 63, 10, 2, 0, 0, 63, 64, 5, 69, 0, 0, 64, 66, 3, 6, 3, 0, 65, 59, 1, 0, 0, 0, 65, 62, 1, 0, 0, 0, 66, 69, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 5, 1, 0, 0, 0, 69, 67, 1, 0, 0, 0, 70, 71, 6, 3, -1, 0, 71, 72, 3, 8, 4, 0, 72, 84, 1, 0, 0, 0, 73, 74, 10, 4, 0, 0, 74, 75, 5, 70, 0, 0, 75, 83, 3, 8, 4, 0, 76, 77, 10, 3, 0, 0, 77, 78, 5, 71, 0, 0, 78, 83, 3, 8, 4, 0, 79, 80, 10, 2, 0, 0, 80, 81, 5, 72, 0, 0, 81, 83, 3, 8, 4, 0, 82, 73, 1, 0, 0, 0, 82, 76, 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, 7, 1, 0, 0, 0, 86, 84, 1, 0, 0, 0, 87, 88, 3, 10, 5, 0, 88, 89, 5, 73, 0, 0, 89, 90, 3, 8, 4, 0, 90, 93, 1, 0, 0, 0, 91, 93, 3, 10, 5, 0, 92, 87, 1, 0, 0, 0, 92, 91, 1, 0, 0, 0, 93, 9, 1, 0, 0, 0, 94, 95, 5, 68, 0, 0, 95, 100, 3, 10, 5, 0, 96, 97, 5, 69, 0, 0, 97, 100, 3, 10, 5, 0, 98, 100, 3, 12, 6, 0, 99, 94, 1, 0, 0, 0, 99, 96, 1, 0, 0, 0, 99, 98, 1, 0, 0, 0, 100, 11, 1, 0, 0, 0, 101, 102, 6, 6, -1, 0, 102, 103, 3, 14, 7, 0, 103, 118, 1, 0, 0, 0, 104, 105, 10, 2, 0, 0, 105, 106, 5, 84, 0, 0, 106, 111, 3, 0, 0, 0, 107, 108, 5, 83, 0, 0, 108, 110, 3, 0, 0, 0, 109, 107, 1, 0, 0, 0, 110, 113, 1, 0, 0, 0, 111, 109, 1, 0, 0, 0, 111, 112, 1, 0, 0, 0, 112, 114, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 114, 115, 5, 85, 0, 0, 115, 117, 1, 0, 0, 0, 116, 104, 1, 0, 0, 0, 117, 120, 1, 0, 0, 0, 118, 116, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 13, 1, 0, 0, 0, 120, 118, 1, 0, 0, 0, 121, 149, 3, 16, 8, 0, 122, 149, 3, 18, 9, 0, 123, 149, 3, 20, 10, 0, 124, 149, 3, 22, 11, 0, 125, 149, 3, 24, 12, 0, 126, 149, 5, 88, 0, 0, 127, 149, 5, 87, 0, 0, 128, 149, 5, 86, 0, 0, 129, 130, 5, 81, 0, 0, 130, 131, 3, 0, 0, 0, 131, 132, 5, 82, 0, 0, 132, 149, 1, 0, 0, 0, 133, 134, 5, 80, 0, 0, 134, 135, 3, 0, 0, 0, 135, 136, 5, 80, 0, 0, 136, 149, 1, 0, 0, 0, 137, 138, 5, 84, 0, 0, 138, 143, 3, 0, 0, 0, 139, 140, 5, 83, 0, 0, 140, 142, 3, 0, 0, 0, 141, 139, 1, 0, 0, 0, 142, 145, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 146, 1, 0, 0, 0, 145, 143, 1, 0, 0, 0, 146, 147, 5, 85, 0, 0, 147, 149, 1, 0, 0, 0, 148, 121, 1, 0, 0, 0, 148, 122, 1, 0, 0, 0, 148, 123, 1, 0, 0, 0, 148, 124, 1, 0, 0, 0, 148, 125, 1, 0, 0, 0, 148, 126, 1, 0, 0, 0, 148, 127, 1, 0, 0, 0, 148, 128, 1, 0, 0, 0, 148, 129, 1, 0, 0, 0, 148, 133, 1, 0, 0, 0, 148, 137, 1, 0, 0, 0, 149, 15, 1, 0, 0, 0, 150, 151, 5, 1, 0, 0, 151, 152, 5, 81, 0, 0, 152, 153, 3, 0, 0, 0, 153, 154, 5, 82, 0, 0, 154, 351, 1, 0, 0, 0, 155, 156, 5, 2, 0, 0, 156, 157, 5, 81, 0, 0, 157, 158, 3, 0, 0, 0, 158, 159, 5, 82, 0, 0, 159, 351, 1, 0, 0, 0, 160, 161, 5, 3, 0, 0, 161, 162, 5, 81, 0, 0, 162, 163, 3, 0, 0, 0, 163, 164, 5, 82, 0, 0, 164, 351, 1, 0, 0, 0, 165, 166, 5, 4, 0, 0, 166, 167, 5, 81, 0, 0, 167, 168, 3, 0, 0, 0, 168, 169, 5, 82, 0, 0, 169, 351, 1, 0, 0, 0, 170, 171, 5, 5, 0, 0, 171, 172, 5, 81, 0, 0, 172, 173, 3, 0, 0, 0, 173, 174, 5, 82, 0, 0, 174, 351, 1, 0, 0, 0, 175, 176, 5, 6, 0, 0, 176, 177, 5, 81, 0, 0, 177, 178, 3, 0, 0, 0, 178, 179, 5, 82, 0, 0, 179, 351, 1, 0, 0, 0, 180, 181, 5, 8, 0, 0, 181, 182, 5, 81, 0, 0, 182, 183, 3, 0, 0, 0, 183, 184, 5, 82, 0, 0, 184, 351, 1, 0, 0, 0, 185, 186, 5, 9, 0, 0, 186, 187, 5, 81, 0, 0, 187, 188, 3, 0, 0, 0, 188, 189, 5, 82, 0, 0, 189, 351, 1, 0, 0, 0, 190, 191, 5, 10, 0, 0, 191, 192, 5, 81, 0, 0, 192, 193, 3, 0, 0, 0, 193, 194, 5, 82, 0, 0, 194, 351, 1, 0, 0, 0, 195, 196, 5, 11, 0, 0, 196, 197, 5, 81, 0, 0, 197, 198, 3, 0, 0, 0, 198, 199, 5, 82, 0, 0, 199, 351, 1, 0, 0, 0, 200, 201, 5, 12, 0, 0, 201, 202, 5, 81, 0, 0, 202, 203, 3, 0, 0, 0, 203, 204, 5, 82, 0, 0, 204, 351, 1, 0, 0, 0, 205, 206, 5, 13, 0, 0, 206, 207, 5, 81, 0, 0, 207, 208, 3, 0, 0, 0, 208, 209, 5, 82, 0, 0, 209, 351, 1, 0, 0, 0, 210, 211, 5, 14, 0, 0, 211, 212, 5, 81, 0, 0, 212, 213, 3, 0, 0, 0, 213, 214, 5, 82, 0, 0, 214, 351, 1, 0, 0, 0, 215, 216, 5, 15, 0, 0, 216, 217, 5, 81, 0, 0, 217, 218, 3, 0, 0, 0, 218, 219, 5, 82, 0, 0, 219, 351, 1, 0, 0, 0, 220, 221, 5, 16, 0, 0, 221, 222, 5, 81, 0, 0, 222, 223, 3, 0, 0, 0, 223, 224, 5, 82, 0, 0, 224, 351, 1, 0, 0, 0, 225, 226, 5, 17, 0, 0, 226, 227, 5, 81, 0, 0, 227, 228, 3, 0, 0, 0, 228, 229, 5, 82, 0, 0, 229, 351, 1, 0, 0, 0, 230, 231, 5, 18, 0, 0, 231, 232, 5, 81, 0, 0, 232, 233, 3, 0, 0, 0, 233, 234, 5, 82, 0, 0, 234, 351, 1, 0, 0, 0, 235, 236, 5, 23, 0, 0, 236, 237, 5, 81, 0, 0, 237, 238, 3, 0, 0, 0, 238, 239, 5, 82, 0, 0, 239, 351, 1, 0, 0, 0, 240, 241, 5, 24, 0, 0, 241, 242, 5, 81, 0, 0, 242, 243, 3, 0, 0, 0, 243, 244, 5, 82, 0, 0, 244, 351, 1, 0, 0, 0, 245, 246, 5, 25, 0, 0, 246, 247, 5, 81, 0, 0, 247, 248, 3, 0, 0, 0, 248, 249, 5, 82, 0, 0, 249, 351, 1, 0, 0, 0, 250, 251, 5, 26, 0, 0, 251, 252, 5, 81, 0, 0, 252, 253, 3, 0, 0, 0, 253, 254, 5, 82, 0, 0, 254, 351, 1, 0, 0, 0, 255, 256, 5, 27, 0, 0, 256, 257, 5, 81, 0, 0, 257, 258, 3, 0, 0, 0, 258, 259, 5, 82, 0, 0, 259, 351, 1, 0, 0, 0, 260, 261, 5, 28, 0, 0, 261, 262, 5, 81, 0, 0, 262, 263, 3, 0, 0, 0, 263, 264, 5, 82, 0, 0, 264, 351, 1, 0, 0, 0, 265, 266, 5, 30, 0, 0, 266, 267, 5, 81, 0, 0, 267, 268, 3, 0, 0, 0, 268, 269, 5, 82, 0, 0, 269, 351, 1, 0, 0, 0, 270, 271, 5, 32, 0, 0, 271, 272, 5, 81, 0, 0, 272, 273, 3, 0, 0, 0, 273, 274, 5, 82, 0, 0, 274, 351, 1, 0, 0, 0, 275, 276, 5, 33, 0, 0, 276, 277, 5, 81, 0, 0, 277, 278, 3, 0, 0, 0, 278, 279, 5, 82, 0, 0, 279, 351, 1, 0, 0, 0, 280, 281, 5, 34, 0, 0, 281, 282, 5, 81, 0, 0, 282, 283, 3, 0, 0, 0, 283, 284, 5, 82, 0, 0, 284, 351, 1, 0, 0, 0, 285, 286, 5, 35, 0, 0, 286, 287, 5, 81, 0, 0, 287, 288, 3, 0, 0, 0, 288, 289, 5, 82, 0, 0, 289, 351, 1, 0, 0, 0, 290, 291, 5, 40, 0, 0, 291, 292, 5, 81, 0, 0, 292, 293, 3, 0, 0, 0, 293, 294, 5, 82, 0, 0, 294, 351, 1, 0, 0, 0, 295, 296, 5, 41, 0, 0, 296, 297, 5, 81, 0, 0, 297, 298, 3, 0, 0, 0, 298, 299, 5, 82, 0, 0, 299, 351, 1, 0, 0, 0, 300, 301, 5, 42, 0, 0, 301, 302, 5, 81, 0, 0, 302, 303, 3, 0, 0, 0, 303, 304, 5, 82, 0, 0, 304, 351, 1, 0, 0, 0, 305, 306, 5, 43, 0, 0, 306, 307, 5, 81, 0, 0, 307, 308, 3, 0, 0, 0, 308, 309, 5, 82, 0, 0, 309, 351, 1, 0, 0, 0, 310, 311, 5, 44, 0, 0, 311, 312, 5, 81, 0, 0, 312, 313, 3, 0, 0, 0, 313, 314, 5, 82, 0, 0, 314, 351, 1, 0, 0, 0, 315, 316, 5, 36, 0, 0, 316, 317, 5, 81, 0, 0, 317, 318, 3, 0, 0, 0, 318, 319, 5, 82, 0, 0, 319, 351, 1, 0, 0, 0, 320, 321, 5, 54, 0, 0, 321, 322, 5, 81, 0, 0, 322, 323, 3, 0, 0, 0, 323, 324, 5, 82, 0, 0, 324, 351, 1, 0, 0, 0, 325, 326, 5, 55, 0, 0, 326, 327, 5, 81, 0, 0, 327, 328, 3, 0, 0, 0, 328, 329, 5, 82, 0, 0, 329, 351, 1, 0, 0, 0, 330, 331, 5, 56, 0, 0, 331, 332, 5, 81, 0, 0, 332, 333, 3, 0, 0, 0, 333, 334, 5, 82, 0, 0, 334, 351, 1, 0, 0, 0, 335, 336, 5, 57, 0, 0, 336, 337, 5, 81, 0, 0, 337, 338, 3, 0, 0, 0, 338, 339, 5, 82, 0, 0, 339, 351, 1, 0, 0, 0, 340, 341, 5, 58, 0, 0, 341, 342, 5, 81, 0, 0, 342, 343, 3, 0, 0, 0, 343, 344, 5, 82, 0, 0, 344, 351, 1, 0, 0, 0, 345, 346, 5, 67, 0, 0, 346, 347, 5, 81, 0, 0, 347, 348, 3, 0, 0, 0, 348, 349, 5, 82, 0, 0, 349, 351, 1, 0, 0, 0, 350, 150, 1, 0, 0, 0, 350, 155, 1, 0, 0, 0, 350, 160, 1, 0, 0, 0, 350, 165, 1, 0, 0, 0, 350, 170, 1, 0, 0, 0, 350, 175, 1, 0, 0, 0, 350, 180, 1, 0, 0, 0, 350, 185, 1, 0, 0, 0, 350, 190, 1, 0, 0, 0, 350, 195, 1, 0, 0, 0, 350, 200, 1, 0, 0, 0, 350, 205, 1, 0, 0, 0, 350, 210, 1, 0, 0, 0, 350, 215, 1, 0, 0, 0, 350, 220, 1, 0, 0, 0, 350, 225, 1, 0, 0, 0, 350, 230, 1, 0, 0, 0, 350, 235, 1, 0, 0, 0, 350, 240, 1, 0, 0, 0, 350, 245, 1, 0, 0, 0, 350, 250, 1, 0, 0, 0, 350, 255, 1, 0, 0, 0, 350, 260, 1, 0, 0, 0, 350, 265, 1, 0, 0, 0, 350, 270, 1, 0, 0, 0, 350, 275, 1, 0, 0, 0, 350, 280, 1, 0, 0, 0, 350, 285, 1, 0, 0, 0, 350, 290, 1, 0, 0, 0, 350, 295, 1, 0, 0, 0, 350, 300, 1, 0, 0, 0, 350, 305, 1, 0, 0, 0, 350, 310, 1, 0, 0, 0, 350, 315, 1, 0, 0, 0, 350, 320, 1, 0, 0, 0, 350, 325, 1, 0, 0, 0, 350, 330, 1, 0, 0, 0, 350, 335, 1, 0, 0, 0, 350, 340, 1, 0, 0, 0, 350, 345, 1, 0, 0, 0, 351, 17, 1, 0, 0, 0, 352, 353, 5, 29, 0, 0, 353, 354, 5, 81, 0, 0, 354, 355, 3, 0, 0, 0, 355, 356, 5, 83, 0, 0, 356, 357, 3, 0, 0, 0, 357, 358, 5, 82, 0, 0, 358, 458, 1, 0, 0, 0, 359, 360, 5, 7, 0, 0, 360, 361, 5, 81, 0, 0, 361, 362, 3, 0, 0, 0, 362, 363, 5, 83, 0, 0, 363, 364, 3, 0, 0, 0, 364, 365, 5, 82, 0, 0, 365, 458, 1, 0, 0, 0, 366, 367, 5, 21, 0, 0, 367, 368, 5, 81, 0, 0, 368, 369, 3, 0, 0, 0, 369, 370, 5, 83, 0, 0, 370, 371, 3, 0, 0, 0, 371, 372, 5, 82, 0, 0, 372, 458, 1, 0, 0, 0, 373, 374, 5, 22, 0, 0, 374, 375, 5, 81, 0, 0, 375, 376, 3, 0, 0, 0, 376, 377, 5, 83, 0, 0, 377, 378, 3, 0, 0, 0, 378, 379, 5, 82, 0, 0, 379, 458, 1, 0, 0, 0, 380, 381, 5, 38, 0, 0, 381, 382, 5, 81, 0, 0, 382, 383, 3, 0, 0, 0, 383, 384, 5, 83, 0, 0, 384, 385, 3, 0, 0, 0, 385, 386, 5, 82, 0, 0, 386, 458, 1, 0, 0, 0, 387, 388, 5, 52, 0, 0, 388, 389, 5, 81, 0, 0, 389, 390, 3, 0, 0, 0, 390, 391, 5, 83, 0, 0, 391, 392, 3, 0, 0, 0, 392, 393, 5, 82, 0, 0, 393, 458, 1, 0, 0, 0, 394, 395, 5, 53, 0, 0, 395, 396, 5, 81, 0, 0, 396, 397, 3, 0, 0, 0, 397, 398, 5, 83, 0, 0, 398, 399, 3, 0, 0, 0, 399, 400, 5, 82, 0, 0, 400, 458, 1, 0, 0, 0, 401, 402, 5, 59, 0, 0, 402, 403, 5, 81, 0, 0, 403, 404, 3, 0, 0, 0, 404, 405, 5, 83, 0, 0, 405, 406, 3, 0, 0, 0, 406, 407, 5, 82, 0, 0, 407, 458, 1, 0, 0, 0, 408, 409, 5, 60, 0, 0, 409, 410, 5, 81, 0, 0, 410, 411, 3, 0, 0, 0, 411, 412, 5, 83, 0, 0, 412, 413, 3, 0, 0, 0, 413, 414, 5, 82, 0, 0, 414, 458, 1, 0, 0, 0, 415, 416, 5, 61, 0, 0, 416, 417, 5, 81, 0, 0, 417, 418, 3, 0, 0, 0, 418, 419, 5, 83, 0, 0, 419, 420, 3, 0, 0, 0, 420, 421, 5, 82, 0, 0, 421, 458, 1, 0, 0, 0, 422, 423, 5, 61, 0, 0, 423, 424, 5, 81, 0, 0, 424, 425, 3, 0, 0, 0, 425, 426, 5, 83, 0, 0, 426, 427, 3, 0, 0, 0, 427, 428, 5, 82, 0, 0, 428, 458, 1, 0, 0, 0, 429, 430, 5, 62, 0, 0, 430, 431, 5, 81, 0, 0, 431, 432, 3, 0, 0, 0, 432, 433, 5, 83, 0, 0, 433, 434, 3, 0, 0, 0, 434, 435, 5, 82, 0, 0, 435, 458, 1, 0, 0, 0, 436, 437, 5, 64, 0, 0, 437, 438, 5, 81, 0, 0, 438, 439, 3, 0, 0, 0, 439, 440, 5, 83, 0, 0, 440, 441, 3, 0, 0, 0, 441, 442, 5, 82, 0, 0, 442, 458, 1, 0, 0, 0, 443, 444, 5, 65, 0, 0, 444, 445, 5, 81, 0, 0, 445, 446, 3, 0, 0, 0, 446, 447, 5, 83, 0, 0, 447, 448, 3, 0, 0, 0, 448, 449, 5, 82, 0, 0, 449, 458, 1, 0, 0, 0, 450, 451, 5, 66, 0, 0, 451, 452, 5, 81, 0, 0, 452, 453, 3, 0, 0, 0, 453, 454, 5, 83, 0, 0, 454, 455, 3, 0, 0, 0, 455, 456, 5, 82, 0, 0, 456, 458, 1, 0, 0, 0, 457, 352, 1, 0, 0, 0, 457, 359, 1, 0, 0, 0, 457, 366, 1, 0, 0, 0, 457, 373, 1, 0, 0, 0, 457, 380, 1, 0, 0, 0, 457, 387, 1, 0, 0, 0, 457, 394, 1, 0, 0, 0, 457, 401, 1, 0, 0, 0, 457, 408, 1, 0, 0, 0, 457, 415, 1, 0, 0, 0, 457, 422, 1, 0, 0, 0, 457, 429, 1, 0, 0, 0, 457, 436, 1, 0, 0, 0, 457, 443, 1, 0, 0, 0, 457, 450, 1, 0, 0, 0, 458, 19, 1, 0, 0, 0, 459, 460, 5, 31, 0, 0, 460, 461, 5, 81, 0, 0, 461, 462, 3, 0, 0, 0, 462, 463, 5, 83, 0, 0, 463, 464, 3, 0, 0, 0, 464, 465, 5, 83, 0, 0, 465, 466, 3, 0, 0, 0, 466, 467, 5, 82, 0, 0, 467, 505, 1, 0, 0, 0, 468, 469, 5, 37, 0, 0, 469, 470, 5, 81, 0, 0, 470, 471, 3, 0, 0, 0, 471, 472, 5, 83, 0, 0, 472, 473, 3, 0, 0, 0, 473, 474, 5, 83, 0, 0, 474, 475, 3, 0, 0, 0, 475, 476, 5, 82, 0, 0, 476, 505, 1, 0, 0, 0, 477, 478, 5, 39, 0, 0, 478, 479, 5, 81, 0, 0, 479, 480, 3, 0, 0, 0, 480, 481, 5, 83, 0, 0, 481, 482, 3, 0, 0, 0, 482, 483, 5, 83, 0, 0, 483, 484, 3, 0, 0, 0, 484, 485, 5, 82, 0, 0, 485, 505, 1, 0, 0, 0, 486, 487, 5, 51, 0, 0, 487, 488, 5, 81, 0, 0, 488, 489, 3, 0, 0, 0, 489, 490, 5, 83, 0, 0, 490, 491, 3, 0, 0, 0, 491, 492, 5, 83, 0, 0, 492, 493, 3, 0, 0, 0, 493, 494, 5, 82, 0, 0, 494, 505, 1, 0, 0, 0, 495, 496, 5, 63, 0, 0, 496, 497, 5, 81, 0, 0, 497, 498, 3, 0, 0, 0, 498, 499, 5, 83, 0, 0, 499, 500, 3, 0, 0, 0, 500, 501, 5, 83, 0, 0, 501, 502, 3, 0, 0, 0, 502, 503, 5, 82, 0, 0, 503, 505, 1, 0, 0, 0, 504, 459, 1, 0, 0, 0, 504, 468, 1, 0, 0, 0, 504, 477, 1, 0, 0, 0, 504, 486, 1, 0, 0, 0, 504, 495, 1, 0, 0, 0, 505, 21, 1, 0, 0, 0, 506, 507, 5, 48, 0, 0, 507, 508, 5, 81, 0, 0, 508, 509, 3, 0, 0, 0, 509, 510, 5, 83, 0, 0, 510, 511, 3, 0, 0, 0, 511, 512, 5, 83, 0, 0, 512, 513, 3, 0, 0, 0, 513, 514, 5, 83, 0, 0, 514, 515, 3, 0, 0, 0, 515, 516, 5, 82, 0, 0, 516, 23, 1, 0, 0, 0, 517, 518, 5, 19, 0, 0, 518, 519, 5, 81, 0, 0, 519, 524, 3, 0, 0, 0, 520, 521, 5, 83, 0, 0, 521, 523, 3, 0, 0, 0, 522, 520, 1, 0, 0, 0, 523, 526, 1, 0, 0, 0, 524, 522, 1, 0, 0, 0, 524, 525, 1, 0, 0, 0, 525, 527, 1, 0, 0, 0, 526, 524, 1, 0, 0, 0, 527, 528, 5, 82, 0, 0, 528, 589, 1, 0, 0, 0, 529, 530, 5, 20, 0, 0, 530, 531, 5, 81, 0, 0, 531, 536, 3, 0, 0, 0, 532, 533, 5, 83, 0, 0, 533, 535, 3, 0, 0, 0, 534, 532, 1, 0, 0, 0, 535, 538, 1, 0, 0, 0, 536, 534, 1, 0, 0, 0, 536, 537, 1, 0, 0, 0, 537, 539, 1, 0, 0, 0, 538, 536, 1, 0, 0, 0, 539, 540, 5, 82, 0, 0, 540, 589, 1, 0, 0, 0, 541, 542, 5, 45, 0, 0, 542, 543, 5, 81, 0, 0, 543, 546, 3, 0, 0, 0, 544, 545, 5, 83, 0, 0, 545, 547, 3, 0, 0, 0, 546, 544, 1, 0, 0, 0, 547, 548, 1, 0, 0, 0, 548, 546, 1, 0, 0, 0, 548, 549, 1, 0, 0, 0, 549, 550, 1, 0, 0, 0, 550, 551, 5, 82, 0, 0, 551, 589, 1, 0, 0, 0, 552, 553, 5, 46, 0, 0, 553, 554, 5, 81, 0, 0, 554, 557, 3, 0, 0, 0, 555, 556, 5, 83, 0, 0, 556, 558, 3, 0, 0, 0, 557, 555, 1, 0, 0, 0, 558, 559, 1, 0, 0, 0, 559, 557, 1, 0, 0, 0, 559, 560, 1, 0, 0, 0, 560, 561, 1, 0, 0, 0, 561, 562, 5, 82, 0, 0, 562, 589, 1, 0, 0, 0, 563, 564, 5, 47, 0, 0, 564, 565, 5, 81, 0, 0, 565, 568, 3, 0, 0, 0, 566, 567, 5, 83, 0, 0, 567, 569, 3, 0, 0, 0, 568, 566, 1, 0, 0, 0, 569, 570, 1, 0, 0, 0, 570, 568, 1, 0, 0, 0, 570, 571, 1, 0, 0, 0, 571, 572, 1, 0, 0, 0, 572, 573, 5, 82, 0, 0, 573, 589, 1, 0, 0, 0, 574, 575, 5, 49, 0, 0, 575, 576, 5, 81, 0, 0, 576, 577, 3, 0, 0, 0, 577, 578, 5, 83, 0, 0, 578, 579, 3, 0, 0, 0, 579, 580, 5, 82, 0, 0, 580, 589, 1, 0, 0, 0, 581, 582, 5, 50, 0, 0, 582, 583, 5, 81, 0, 0, 583, 584, 3, 0, 0, 0, 584, 585, 5, 83, 0, 0, 585, 586, 3, 0, 0, 0, 586, 587, 5, 82, 0, 0, 587, 589, 1, 0, 0, 0, 588, 517, 1, 0, 0, 0, 588, 529, 1, 0, 0, 0, 588, 541, 1, 0, 0, 0, 588, 552, 1, 0, 0, 0, 588, 563, 1, 0, 0, 0, 588, 574, 1, 0, 0, 0, 588, 581, 1, 0, 0, 0, 589, 25, 1, 0, 0, 0, 22, 28, 51, 53, 65, 67, 82, 84, 92, 99, 111, 118, 143, 148, 350, 457, 504, 524, 536, 548, 559, 570, 588] \ No newline at end of file +[4, 1, 91, 640, 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, 1, 0, 5, 0, 36, 8, 0, 10, 0, 12, 0, 39, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 3, 1, 47, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 5, 2, 57, 8, 2, 10, 2, 12, 2, 60, 9, 2, 1, 3, 1, 3, 3, 3, 64, 8, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 5, 4, 87, 8, 4, 10, 4, 12, 4, 90, 9, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5, 5, 101, 8, 5, 10, 5, 12, 5, 104, 9, 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, 5, 6, 118, 8, 6, 10, 6, 12, 6, 121, 9, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 128, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 135, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 5, 9, 145, 8, 9, 10, 9, 12, 9, 148, 9, 9, 1, 9, 1, 9, 5, 9, 152, 8, 9, 10, 9, 12, 9, 155, 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, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 5, 10, 177, 8, 10, 10, 10, 12, 10, 180, 9, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 187, 8, 10, 1, 10, 3, 10, 190, 8, 10, 1, 11, 1, 11, 1, 11, 5, 11, 195, 8, 11, 10, 11, 12, 11, 198, 9, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 3, 12, 400, 8, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 3, 13, 507, 8, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 3, 14, 554, 8, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 572, 8, 16, 10, 16, 12, 16, 575, 9, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 5, 16, 584, 8, 16, 10, 16, 12, 16, 587, 9, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 4, 16, 596, 8, 16, 11, 16, 12, 16, 597, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 4, 16, 607, 8, 16, 11, 16, 12, 16, 608, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 4, 16, 618, 8, 16, 11, 16, 12, 16, 619, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 3, 16, 638, 8, 16, 1, 16, 0, 4, 8, 10, 12, 18, 17, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 0, 0, 724, 0, 37, 1, 0, 0, 0, 2, 43, 1, 0, 0, 0, 4, 53, 1, 0, 0, 0, 6, 63, 1, 0, 0, 0, 8, 65, 1, 0, 0, 0, 10, 91, 1, 0, 0, 0, 12, 105, 1, 0, 0, 0, 14, 127, 1, 0, 0, 0, 16, 134, 1, 0, 0, 0, 18, 136, 1, 0, 0, 0, 20, 189, 1, 0, 0, 0, 22, 191, 1, 0, 0, 0, 24, 399, 1, 0, 0, 0, 26, 506, 1, 0, 0, 0, 28, 553, 1, 0, 0, 0, 30, 555, 1, 0, 0, 0, 32, 637, 1, 0, 0, 0, 34, 36, 3, 2, 1, 0, 35, 34, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 40, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 41, 3, 6, 3, 0, 41, 42, 5, 0, 0, 1, 42, 1, 1, 0, 0, 0, 43, 44, 5, 90, 0, 0, 44, 46, 5, 81, 0, 0, 45, 47, 3, 4, 2, 0, 46, 45, 1, 0, 0, 0, 46, 47, 1, 0, 0, 0, 47, 48, 1, 0, 0, 0, 48, 49, 5, 82, 0, 0, 49, 50, 5, 85, 0, 0, 50, 51, 3, 6, 3, 0, 51, 52, 5, 84, 0, 0, 52, 3, 1, 0, 0, 0, 53, 58, 5, 90, 0, 0, 54, 55, 5, 83, 0, 0, 55, 57, 5, 90, 0, 0, 56, 54, 1, 0, 0, 0, 57, 60, 1, 0, 0, 0, 58, 56, 1, 0, 0, 0, 58, 59, 1, 0, 0, 0, 59, 5, 1, 0, 0, 0, 60, 58, 1, 0, 0, 0, 61, 64, 3, 20, 10, 0, 62, 64, 3, 8, 4, 0, 63, 61, 1, 0, 0, 0, 63, 62, 1, 0, 0, 0, 64, 7, 1, 0, 0, 0, 65, 66, 6, 4, -1, 0, 66, 67, 3, 10, 5, 0, 67, 88, 1, 0, 0, 0, 68, 69, 10, 7, 0, 0, 69, 70, 5, 75, 0, 0, 70, 87, 3, 10, 5, 0, 71, 72, 10, 6, 0, 0, 72, 73, 5, 74, 0, 0, 73, 87, 3, 10, 5, 0, 74, 75, 10, 5, 0, 0, 75, 76, 5, 77, 0, 0, 76, 87, 3, 10, 5, 0, 77, 78, 10, 4, 0, 0, 78, 79, 5, 76, 0, 0, 79, 87, 3, 10, 5, 0, 80, 81, 10, 3, 0, 0, 81, 82, 5, 78, 0, 0, 82, 87, 3, 10, 5, 0, 83, 84, 10, 2, 0, 0, 84, 85, 5, 79, 0, 0, 85, 87, 3, 10, 5, 0, 86, 68, 1, 0, 0, 0, 86, 71, 1, 0, 0, 0, 86, 74, 1, 0, 0, 0, 86, 77, 1, 0, 0, 0, 86, 80, 1, 0, 0, 0, 86, 83, 1, 0, 0, 0, 87, 90, 1, 0, 0, 0, 88, 86, 1, 0, 0, 0, 88, 89, 1, 0, 0, 0, 89, 9, 1, 0, 0, 0, 90, 88, 1, 0, 0, 0, 91, 92, 6, 5, -1, 0, 92, 93, 3, 12, 6, 0, 93, 102, 1, 0, 0, 0, 94, 95, 10, 3, 0, 0, 95, 96, 5, 68, 0, 0, 96, 101, 3, 12, 6, 0, 97, 98, 10, 2, 0, 0, 98, 99, 5, 69, 0, 0, 99, 101, 3, 12, 6, 0, 100, 94, 1, 0, 0, 0, 100, 97, 1, 0, 0, 0, 101, 104, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 11, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 106, 6, 6, -1, 0, 106, 107, 3, 14, 7, 0, 107, 119, 1, 0, 0, 0, 108, 109, 10, 4, 0, 0, 109, 110, 5, 70, 0, 0, 110, 118, 3, 14, 7, 0, 111, 112, 10, 3, 0, 0, 112, 113, 5, 71, 0, 0, 113, 118, 3, 14, 7, 0, 114, 115, 10, 2, 0, 0, 115, 116, 5, 72, 0, 0, 116, 118, 3, 14, 7, 0, 117, 108, 1, 0, 0, 0, 117, 111, 1, 0, 0, 0, 117, 114, 1, 0, 0, 0, 118, 121, 1, 0, 0, 0, 119, 117, 1, 0, 0, 0, 119, 120, 1, 0, 0, 0, 120, 13, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 122, 123, 3, 16, 8, 0, 123, 124, 5, 73, 0, 0, 124, 125, 3, 14, 7, 0, 125, 128, 1, 0, 0, 0, 126, 128, 3, 16, 8, 0, 127, 122, 1, 0, 0, 0, 127, 126, 1, 0, 0, 0, 128, 15, 1, 0, 0, 0, 129, 130, 5, 68, 0, 0, 130, 135, 3, 16, 8, 0, 131, 132, 5, 69, 0, 0, 132, 135, 3, 16, 8, 0, 133, 135, 3, 18, 9, 0, 134, 129, 1, 0, 0, 0, 134, 131, 1, 0, 0, 0, 134, 133, 1, 0, 0, 0, 135, 17, 1, 0, 0, 0, 136, 137, 6, 9, -1, 0, 137, 138, 3, 20, 10, 0, 138, 153, 1, 0, 0, 0, 139, 140, 10, 2, 0, 0, 140, 141, 5, 86, 0, 0, 141, 146, 3, 6, 3, 0, 142, 143, 5, 83, 0, 0, 143, 145, 3, 6, 3, 0, 144, 142, 1, 0, 0, 0, 145, 148, 1, 0, 0, 0, 146, 144, 1, 0, 0, 0, 146, 147, 1, 0, 0, 0, 147, 149, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 149, 150, 5, 87, 0, 0, 150, 152, 1, 0, 0, 0, 151, 139, 1, 0, 0, 0, 152, 155, 1, 0, 0, 0, 153, 151, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 19, 1, 0, 0, 0, 155, 153, 1, 0, 0, 0, 156, 190, 3, 24, 12, 0, 157, 190, 3, 26, 13, 0, 158, 190, 3, 28, 14, 0, 159, 190, 3, 30, 15, 0, 160, 190, 3, 32, 16, 0, 161, 190, 5, 90, 0, 0, 162, 190, 5, 89, 0, 0, 163, 190, 5, 88, 0, 0, 164, 165, 5, 81, 0, 0, 165, 166, 3, 6, 3, 0, 166, 167, 5, 82, 0, 0, 167, 190, 1, 0, 0, 0, 168, 169, 5, 80, 0, 0, 169, 170, 3, 6, 3, 0, 170, 171, 5, 80, 0, 0, 171, 190, 1, 0, 0, 0, 172, 173, 5, 86, 0, 0, 173, 178, 3, 6, 3, 0, 174, 175, 5, 83, 0, 0, 175, 177, 3, 6, 3, 0, 176, 174, 1, 0, 0, 0, 177, 180, 1, 0, 0, 0, 178, 176, 1, 0, 0, 0, 178, 179, 1, 0, 0, 0, 179, 181, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 181, 182, 5, 87, 0, 0, 182, 190, 1, 0, 0, 0, 183, 184, 5, 90, 0, 0, 184, 186, 5, 81, 0, 0, 185, 187, 3, 22, 11, 0, 186, 185, 1, 0, 0, 0, 186, 187, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 190, 5, 82, 0, 0, 189, 156, 1, 0, 0, 0, 189, 157, 1, 0, 0, 0, 189, 158, 1, 0, 0, 0, 189, 159, 1, 0, 0, 0, 189, 160, 1, 0, 0, 0, 189, 161, 1, 0, 0, 0, 189, 162, 1, 0, 0, 0, 189, 163, 1, 0, 0, 0, 189, 164, 1, 0, 0, 0, 189, 168, 1, 0, 0, 0, 189, 172, 1, 0, 0, 0, 189, 183, 1, 0, 0, 0, 190, 21, 1, 0, 0, 0, 191, 196, 3, 6, 3, 0, 192, 193, 5, 83, 0, 0, 193, 195, 3, 6, 3, 0, 194, 192, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 23, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 200, 5, 1, 0, 0, 200, 201, 5, 81, 0, 0, 201, 202, 3, 6, 3, 0, 202, 203, 5, 82, 0, 0, 203, 400, 1, 0, 0, 0, 204, 205, 5, 2, 0, 0, 205, 206, 5, 81, 0, 0, 206, 207, 3, 6, 3, 0, 207, 208, 5, 82, 0, 0, 208, 400, 1, 0, 0, 0, 209, 210, 5, 3, 0, 0, 210, 211, 5, 81, 0, 0, 211, 212, 3, 6, 3, 0, 212, 213, 5, 82, 0, 0, 213, 400, 1, 0, 0, 0, 214, 215, 5, 4, 0, 0, 215, 216, 5, 81, 0, 0, 216, 217, 3, 6, 3, 0, 217, 218, 5, 82, 0, 0, 218, 400, 1, 0, 0, 0, 219, 220, 5, 5, 0, 0, 220, 221, 5, 81, 0, 0, 221, 222, 3, 6, 3, 0, 222, 223, 5, 82, 0, 0, 223, 400, 1, 0, 0, 0, 224, 225, 5, 6, 0, 0, 225, 226, 5, 81, 0, 0, 226, 227, 3, 6, 3, 0, 227, 228, 5, 82, 0, 0, 228, 400, 1, 0, 0, 0, 229, 230, 5, 8, 0, 0, 230, 231, 5, 81, 0, 0, 231, 232, 3, 6, 3, 0, 232, 233, 5, 82, 0, 0, 233, 400, 1, 0, 0, 0, 234, 235, 5, 9, 0, 0, 235, 236, 5, 81, 0, 0, 236, 237, 3, 6, 3, 0, 237, 238, 5, 82, 0, 0, 238, 400, 1, 0, 0, 0, 239, 240, 5, 10, 0, 0, 240, 241, 5, 81, 0, 0, 241, 242, 3, 6, 3, 0, 242, 243, 5, 82, 0, 0, 243, 400, 1, 0, 0, 0, 244, 245, 5, 11, 0, 0, 245, 246, 5, 81, 0, 0, 246, 247, 3, 6, 3, 0, 247, 248, 5, 82, 0, 0, 248, 400, 1, 0, 0, 0, 249, 250, 5, 12, 0, 0, 250, 251, 5, 81, 0, 0, 251, 252, 3, 6, 3, 0, 252, 253, 5, 82, 0, 0, 253, 400, 1, 0, 0, 0, 254, 255, 5, 13, 0, 0, 255, 256, 5, 81, 0, 0, 256, 257, 3, 6, 3, 0, 257, 258, 5, 82, 0, 0, 258, 400, 1, 0, 0, 0, 259, 260, 5, 14, 0, 0, 260, 261, 5, 81, 0, 0, 261, 262, 3, 6, 3, 0, 262, 263, 5, 82, 0, 0, 263, 400, 1, 0, 0, 0, 264, 265, 5, 15, 0, 0, 265, 266, 5, 81, 0, 0, 266, 267, 3, 6, 3, 0, 267, 268, 5, 82, 0, 0, 268, 400, 1, 0, 0, 0, 269, 270, 5, 16, 0, 0, 270, 271, 5, 81, 0, 0, 271, 272, 3, 6, 3, 0, 272, 273, 5, 82, 0, 0, 273, 400, 1, 0, 0, 0, 274, 275, 5, 17, 0, 0, 275, 276, 5, 81, 0, 0, 276, 277, 3, 6, 3, 0, 277, 278, 5, 82, 0, 0, 278, 400, 1, 0, 0, 0, 279, 280, 5, 18, 0, 0, 280, 281, 5, 81, 0, 0, 281, 282, 3, 6, 3, 0, 282, 283, 5, 82, 0, 0, 283, 400, 1, 0, 0, 0, 284, 285, 5, 23, 0, 0, 285, 286, 5, 81, 0, 0, 286, 287, 3, 6, 3, 0, 287, 288, 5, 82, 0, 0, 288, 400, 1, 0, 0, 0, 289, 290, 5, 24, 0, 0, 290, 291, 5, 81, 0, 0, 291, 292, 3, 6, 3, 0, 292, 293, 5, 82, 0, 0, 293, 400, 1, 0, 0, 0, 294, 295, 5, 25, 0, 0, 295, 296, 5, 81, 0, 0, 296, 297, 3, 6, 3, 0, 297, 298, 5, 82, 0, 0, 298, 400, 1, 0, 0, 0, 299, 300, 5, 26, 0, 0, 300, 301, 5, 81, 0, 0, 301, 302, 3, 6, 3, 0, 302, 303, 5, 82, 0, 0, 303, 400, 1, 0, 0, 0, 304, 305, 5, 27, 0, 0, 305, 306, 5, 81, 0, 0, 306, 307, 3, 6, 3, 0, 307, 308, 5, 82, 0, 0, 308, 400, 1, 0, 0, 0, 309, 310, 5, 28, 0, 0, 310, 311, 5, 81, 0, 0, 311, 312, 3, 6, 3, 0, 312, 313, 5, 82, 0, 0, 313, 400, 1, 0, 0, 0, 314, 315, 5, 30, 0, 0, 315, 316, 5, 81, 0, 0, 316, 317, 3, 6, 3, 0, 317, 318, 5, 82, 0, 0, 318, 400, 1, 0, 0, 0, 319, 320, 5, 32, 0, 0, 320, 321, 5, 81, 0, 0, 321, 322, 3, 6, 3, 0, 322, 323, 5, 82, 0, 0, 323, 400, 1, 0, 0, 0, 324, 325, 5, 33, 0, 0, 325, 326, 5, 81, 0, 0, 326, 327, 3, 6, 3, 0, 327, 328, 5, 82, 0, 0, 328, 400, 1, 0, 0, 0, 329, 330, 5, 34, 0, 0, 330, 331, 5, 81, 0, 0, 331, 332, 3, 6, 3, 0, 332, 333, 5, 82, 0, 0, 333, 400, 1, 0, 0, 0, 334, 335, 5, 35, 0, 0, 335, 336, 5, 81, 0, 0, 336, 337, 3, 6, 3, 0, 337, 338, 5, 82, 0, 0, 338, 400, 1, 0, 0, 0, 339, 340, 5, 40, 0, 0, 340, 341, 5, 81, 0, 0, 341, 342, 3, 6, 3, 0, 342, 343, 5, 82, 0, 0, 343, 400, 1, 0, 0, 0, 344, 345, 5, 41, 0, 0, 345, 346, 5, 81, 0, 0, 346, 347, 3, 6, 3, 0, 347, 348, 5, 82, 0, 0, 348, 400, 1, 0, 0, 0, 349, 350, 5, 42, 0, 0, 350, 351, 5, 81, 0, 0, 351, 352, 3, 6, 3, 0, 352, 353, 5, 82, 0, 0, 353, 400, 1, 0, 0, 0, 354, 355, 5, 43, 0, 0, 355, 356, 5, 81, 0, 0, 356, 357, 3, 6, 3, 0, 357, 358, 5, 82, 0, 0, 358, 400, 1, 0, 0, 0, 359, 360, 5, 44, 0, 0, 360, 361, 5, 81, 0, 0, 361, 362, 3, 6, 3, 0, 362, 363, 5, 82, 0, 0, 363, 400, 1, 0, 0, 0, 364, 365, 5, 36, 0, 0, 365, 366, 5, 81, 0, 0, 366, 367, 3, 6, 3, 0, 367, 368, 5, 82, 0, 0, 368, 400, 1, 0, 0, 0, 369, 370, 5, 54, 0, 0, 370, 371, 5, 81, 0, 0, 371, 372, 3, 6, 3, 0, 372, 373, 5, 82, 0, 0, 373, 400, 1, 0, 0, 0, 374, 375, 5, 55, 0, 0, 375, 376, 5, 81, 0, 0, 376, 377, 3, 6, 3, 0, 377, 378, 5, 82, 0, 0, 378, 400, 1, 0, 0, 0, 379, 380, 5, 56, 0, 0, 380, 381, 5, 81, 0, 0, 381, 382, 3, 6, 3, 0, 382, 383, 5, 82, 0, 0, 383, 400, 1, 0, 0, 0, 384, 385, 5, 57, 0, 0, 385, 386, 5, 81, 0, 0, 386, 387, 3, 6, 3, 0, 387, 388, 5, 82, 0, 0, 388, 400, 1, 0, 0, 0, 389, 390, 5, 58, 0, 0, 390, 391, 5, 81, 0, 0, 391, 392, 3, 6, 3, 0, 392, 393, 5, 82, 0, 0, 393, 400, 1, 0, 0, 0, 394, 395, 5, 67, 0, 0, 395, 396, 5, 81, 0, 0, 396, 397, 3, 6, 3, 0, 397, 398, 5, 82, 0, 0, 398, 400, 1, 0, 0, 0, 399, 199, 1, 0, 0, 0, 399, 204, 1, 0, 0, 0, 399, 209, 1, 0, 0, 0, 399, 214, 1, 0, 0, 0, 399, 219, 1, 0, 0, 0, 399, 224, 1, 0, 0, 0, 399, 229, 1, 0, 0, 0, 399, 234, 1, 0, 0, 0, 399, 239, 1, 0, 0, 0, 399, 244, 1, 0, 0, 0, 399, 249, 1, 0, 0, 0, 399, 254, 1, 0, 0, 0, 399, 259, 1, 0, 0, 0, 399, 264, 1, 0, 0, 0, 399, 269, 1, 0, 0, 0, 399, 274, 1, 0, 0, 0, 399, 279, 1, 0, 0, 0, 399, 284, 1, 0, 0, 0, 399, 289, 1, 0, 0, 0, 399, 294, 1, 0, 0, 0, 399, 299, 1, 0, 0, 0, 399, 304, 1, 0, 0, 0, 399, 309, 1, 0, 0, 0, 399, 314, 1, 0, 0, 0, 399, 319, 1, 0, 0, 0, 399, 324, 1, 0, 0, 0, 399, 329, 1, 0, 0, 0, 399, 334, 1, 0, 0, 0, 399, 339, 1, 0, 0, 0, 399, 344, 1, 0, 0, 0, 399, 349, 1, 0, 0, 0, 399, 354, 1, 0, 0, 0, 399, 359, 1, 0, 0, 0, 399, 364, 1, 0, 0, 0, 399, 369, 1, 0, 0, 0, 399, 374, 1, 0, 0, 0, 399, 379, 1, 0, 0, 0, 399, 384, 1, 0, 0, 0, 399, 389, 1, 0, 0, 0, 399, 394, 1, 0, 0, 0, 400, 25, 1, 0, 0, 0, 401, 402, 5, 29, 0, 0, 402, 403, 5, 81, 0, 0, 403, 404, 3, 6, 3, 0, 404, 405, 5, 83, 0, 0, 405, 406, 3, 6, 3, 0, 406, 407, 5, 82, 0, 0, 407, 507, 1, 0, 0, 0, 408, 409, 5, 7, 0, 0, 409, 410, 5, 81, 0, 0, 410, 411, 3, 6, 3, 0, 411, 412, 5, 83, 0, 0, 412, 413, 3, 6, 3, 0, 413, 414, 5, 82, 0, 0, 414, 507, 1, 0, 0, 0, 415, 416, 5, 21, 0, 0, 416, 417, 5, 81, 0, 0, 417, 418, 3, 6, 3, 0, 418, 419, 5, 83, 0, 0, 419, 420, 3, 6, 3, 0, 420, 421, 5, 82, 0, 0, 421, 507, 1, 0, 0, 0, 422, 423, 5, 22, 0, 0, 423, 424, 5, 81, 0, 0, 424, 425, 3, 6, 3, 0, 425, 426, 5, 83, 0, 0, 426, 427, 3, 6, 3, 0, 427, 428, 5, 82, 0, 0, 428, 507, 1, 0, 0, 0, 429, 430, 5, 38, 0, 0, 430, 431, 5, 81, 0, 0, 431, 432, 3, 6, 3, 0, 432, 433, 5, 83, 0, 0, 433, 434, 3, 6, 3, 0, 434, 435, 5, 82, 0, 0, 435, 507, 1, 0, 0, 0, 436, 437, 5, 52, 0, 0, 437, 438, 5, 81, 0, 0, 438, 439, 3, 6, 3, 0, 439, 440, 5, 83, 0, 0, 440, 441, 3, 6, 3, 0, 441, 442, 5, 82, 0, 0, 442, 507, 1, 0, 0, 0, 443, 444, 5, 53, 0, 0, 444, 445, 5, 81, 0, 0, 445, 446, 3, 6, 3, 0, 446, 447, 5, 83, 0, 0, 447, 448, 3, 6, 3, 0, 448, 449, 5, 82, 0, 0, 449, 507, 1, 0, 0, 0, 450, 451, 5, 59, 0, 0, 451, 452, 5, 81, 0, 0, 452, 453, 3, 6, 3, 0, 453, 454, 5, 83, 0, 0, 454, 455, 3, 6, 3, 0, 455, 456, 5, 82, 0, 0, 456, 507, 1, 0, 0, 0, 457, 458, 5, 60, 0, 0, 458, 459, 5, 81, 0, 0, 459, 460, 3, 6, 3, 0, 460, 461, 5, 83, 0, 0, 461, 462, 3, 6, 3, 0, 462, 463, 5, 82, 0, 0, 463, 507, 1, 0, 0, 0, 464, 465, 5, 61, 0, 0, 465, 466, 5, 81, 0, 0, 466, 467, 3, 6, 3, 0, 467, 468, 5, 83, 0, 0, 468, 469, 3, 6, 3, 0, 469, 470, 5, 82, 0, 0, 470, 507, 1, 0, 0, 0, 471, 472, 5, 61, 0, 0, 472, 473, 5, 81, 0, 0, 473, 474, 3, 6, 3, 0, 474, 475, 5, 83, 0, 0, 475, 476, 3, 6, 3, 0, 476, 477, 5, 82, 0, 0, 477, 507, 1, 0, 0, 0, 478, 479, 5, 62, 0, 0, 479, 480, 5, 81, 0, 0, 480, 481, 3, 6, 3, 0, 481, 482, 5, 83, 0, 0, 482, 483, 3, 6, 3, 0, 483, 484, 5, 82, 0, 0, 484, 507, 1, 0, 0, 0, 485, 486, 5, 64, 0, 0, 486, 487, 5, 81, 0, 0, 487, 488, 3, 6, 3, 0, 488, 489, 5, 83, 0, 0, 489, 490, 3, 6, 3, 0, 490, 491, 5, 82, 0, 0, 491, 507, 1, 0, 0, 0, 492, 493, 5, 65, 0, 0, 493, 494, 5, 81, 0, 0, 494, 495, 3, 6, 3, 0, 495, 496, 5, 83, 0, 0, 496, 497, 3, 6, 3, 0, 497, 498, 5, 82, 0, 0, 498, 507, 1, 0, 0, 0, 499, 500, 5, 66, 0, 0, 500, 501, 5, 81, 0, 0, 501, 502, 3, 6, 3, 0, 502, 503, 5, 83, 0, 0, 503, 504, 3, 6, 3, 0, 504, 505, 5, 82, 0, 0, 505, 507, 1, 0, 0, 0, 506, 401, 1, 0, 0, 0, 506, 408, 1, 0, 0, 0, 506, 415, 1, 0, 0, 0, 506, 422, 1, 0, 0, 0, 506, 429, 1, 0, 0, 0, 506, 436, 1, 0, 0, 0, 506, 443, 1, 0, 0, 0, 506, 450, 1, 0, 0, 0, 506, 457, 1, 0, 0, 0, 506, 464, 1, 0, 0, 0, 506, 471, 1, 0, 0, 0, 506, 478, 1, 0, 0, 0, 506, 485, 1, 0, 0, 0, 506, 492, 1, 0, 0, 0, 506, 499, 1, 0, 0, 0, 507, 27, 1, 0, 0, 0, 508, 509, 5, 31, 0, 0, 509, 510, 5, 81, 0, 0, 510, 511, 3, 6, 3, 0, 511, 512, 5, 83, 0, 0, 512, 513, 3, 6, 3, 0, 513, 514, 5, 83, 0, 0, 514, 515, 3, 6, 3, 0, 515, 516, 5, 82, 0, 0, 516, 554, 1, 0, 0, 0, 517, 518, 5, 37, 0, 0, 518, 519, 5, 81, 0, 0, 519, 520, 3, 6, 3, 0, 520, 521, 5, 83, 0, 0, 521, 522, 3, 6, 3, 0, 522, 523, 5, 83, 0, 0, 523, 524, 3, 6, 3, 0, 524, 525, 5, 82, 0, 0, 525, 554, 1, 0, 0, 0, 526, 527, 5, 39, 0, 0, 527, 528, 5, 81, 0, 0, 528, 529, 3, 6, 3, 0, 529, 530, 5, 83, 0, 0, 530, 531, 3, 6, 3, 0, 531, 532, 5, 83, 0, 0, 532, 533, 3, 6, 3, 0, 533, 534, 5, 82, 0, 0, 534, 554, 1, 0, 0, 0, 535, 536, 5, 51, 0, 0, 536, 537, 5, 81, 0, 0, 537, 538, 3, 6, 3, 0, 538, 539, 5, 83, 0, 0, 539, 540, 3, 6, 3, 0, 540, 541, 5, 83, 0, 0, 541, 542, 3, 6, 3, 0, 542, 543, 5, 82, 0, 0, 543, 554, 1, 0, 0, 0, 544, 545, 5, 63, 0, 0, 545, 546, 5, 81, 0, 0, 546, 547, 3, 6, 3, 0, 547, 548, 5, 83, 0, 0, 548, 549, 3, 6, 3, 0, 549, 550, 5, 83, 0, 0, 550, 551, 3, 6, 3, 0, 551, 552, 5, 82, 0, 0, 552, 554, 1, 0, 0, 0, 553, 508, 1, 0, 0, 0, 553, 517, 1, 0, 0, 0, 553, 526, 1, 0, 0, 0, 553, 535, 1, 0, 0, 0, 553, 544, 1, 0, 0, 0, 554, 29, 1, 0, 0, 0, 555, 556, 5, 48, 0, 0, 556, 557, 5, 81, 0, 0, 557, 558, 3, 6, 3, 0, 558, 559, 5, 83, 0, 0, 559, 560, 3, 6, 3, 0, 560, 561, 5, 83, 0, 0, 561, 562, 3, 6, 3, 0, 562, 563, 5, 83, 0, 0, 563, 564, 3, 6, 3, 0, 564, 565, 5, 82, 0, 0, 565, 31, 1, 0, 0, 0, 566, 567, 5, 19, 0, 0, 567, 568, 5, 81, 0, 0, 568, 573, 3, 6, 3, 0, 569, 570, 5, 83, 0, 0, 570, 572, 3, 6, 3, 0, 571, 569, 1, 0, 0, 0, 572, 575, 1, 0, 0, 0, 573, 571, 1, 0, 0, 0, 573, 574, 1, 0, 0, 0, 574, 576, 1, 0, 0, 0, 575, 573, 1, 0, 0, 0, 576, 577, 5, 82, 0, 0, 577, 638, 1, 0, 0, 0, 578, 579, 5, 20, 0, 0, 579, 580, 5, 81, 0, 0, 580, 585, 3, 6, 3, 0, 581, 582, 5, 83, 0, 0, 582, 584, 3, 6, 3, 0, 583, 581, 1, 0, 0, 0, 584, 587, 1, 0, 0, 0, 585, 583, 1, 0, 0, 0, 585, 586, 1, 0, 0, 0, 586, 588, 1, 0, 0, 0, 587, 585, 1, 0, 0, 0, 588, 589, 5, 82, 0, 0, 589, 638, 1, 0, 0, 0, 590, 591, 5, 45, 0, 0, 591, 592, 5, 81, 0, 0, 592, 595, 3, 6, 3, 0, 593, 594, 5, 83, 0, 0, 594, 596, 3, 6, 3, 0, 595, 593, 1, 0, 0, 0, 596, 597, 1, 0, 0, 0, 597, 595, 1, 0, 0, 0, 597, 598, 1, 0, 0, 0, 598, 599, 1, 0, 0, 0, 599, 600, 5, 82, 0, 0, 600, 638, 1, 0, 0, 0, 601, 602, 5, 46, 0, 0, 602, 603, 5, 81, 0, 0, 603, 606, 3, 6, 3, 0, 604, 605, 5, 83, 0, 0, 605, 607, 3, 6, 3, 0, 606, 604, 1, 0, 0, 0, 607, 608, 1, 0, 0, 0, 608, 606, 1, 0, 0, 0, 608, 609, 1, 0, 0, 0, 609, 610, 1, 0, 0, 0, 610, 611, 5, 82, 0, 0, 611, 638, 1, 0, 0, 0, 612, 613, 5, 47, 0, 0, 613, 614, 5, 81, 0, 0, 614, 617, 3, 6, 3, 0, 615, 616, 5, 83, 0, 0, 616, 618, 3, 6, 3, 0, 617, 615, 1, 0, 0, 0, 618, 619, 1, 0, 0, 0, 619, 617, 1, 0, 0, 0, 619, 620, 1, 0, 0, 0, 620, 621, 1, 0, 0, 0, 621, 622, 5, 82, 0, 0, 622, 638, 1, 0, 0, 0, 623, 624, 5, 49, 0, 0, 624, 625, 5, 81, 0, 0, 625, 626, 3, 6, 3, 0, 626, 627, 5, 83, 0, 0, 627, 628, 3, 6, 3, 0, 628, 629, 5, 82, 0, 0, 629, 638, 1, 0, 0, 0, 630, 631, 5, 50, 0, 0, 631, 632, 5, 81, 0, 0, 632, 633, 3, 6, 3, 0, 633, 634, 5, 83, 0, 0, 634, 635, 3, 6, 3, 0, 635, 636, 5, 82, 0, 0, 636, 638, 1, 0, 0, 0, 637, 566, 1, 0, 0, 0, 637, 578, 1, 0, 0, 0, 637, 590, 1, 0, 0, 0, 637, 601, 1, 0, 0, 0, 637, 612, 1, 0, 0, 0, 637, 623, 1, 0, 0, 0, 637, 630, 1, 0, 0, 0, 638, 33, 1, 0, 0, 0, 27, 37, 46, 58, 63, 86, 88, 100, 102, 117, 119, 127, 134, 146, 153, 178, 186, 189, 196, 399, 506, 553, 573, 585, 597, 608, 619, 637] \ No newline at end of file diff --git a/more_math/Parser/MathExpr.tokens b/more_math/Parser/MathExpr.tokens index 4aa476e..f3279b4 100644 --- a/more_math/Parser/MathExpr.tokens +++ b/more_math/Parser/MathExpr.tokens @@ -81,12 +81,14 @@ PIPE=80 LPAREN=81 RPAREN=82 COMMA=83 -LBRACKET=84 -RBRACKET=85 -CONSTANT=86 -NUMBER=87 -VARIABLE=88 -WS=89 +SEMICOLON=84 +ARROW=85 +LBRACKET=86 +RBRACKET=87 +CONSTANT=88 +NUMBER=89 +VARIABLE=90 +WS=91 'sin'=1 'cos'=2 'tan'=3 @@ -163,5 +165,7 @@ WS=89 '('=81 ')'=82 ','=83 -'['=84 -']'=85 +';'=84 +'->'=85 +'['=86 +']'=87 diff --git a/more_math/Parser/MathExprLexer.interp b/more_math/Parser/MathExprLexer.interp index bf04bfd..a9b1dae 100644 --- a/more_math/Parser/MathExprLexer.interp +++ b/more_math/Parser/MathExprLexer.interp @@ -83,6 +83,8 @@ null '(' ')' ',' +';' +'->' '[' ']' null @@ -175,6 +177,8 @@ PIPE LPAREN RPAREN COMMA +SEMICOLON +ARROW LBRACKET RBRACKET CONSTANT @@ -266,6 +270,8 @@ PIPE LPAREN RPAREN COMMA +SEMICOLON +ARROW LBRACKET RBRACKET CONSTANT @@ -281,4 +287,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 89, 684, 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, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 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, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 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, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 372, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 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, 41, 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, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 448, 8, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 465, 8, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 483, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 496, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 551, 8, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 568, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 80, 1, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 85, 1, 85, 1, 85, 1, 85, 1, 85, 3, 85, 656, 8, 85, 1, 86, 4, 86, 659, 8, 86, 11, 86, 12, 86, 660, 1, 86, 1, 86, 4, 86, 665, 8, 86, 11, 86, 12, 86, 666, 3, 86, 669, 8, 86, 1, 87, 1, 87, 5, 87, 673, 8, 87, 10, 87, 12, 87, 676, 9, 87, 1, 88, 4, 88, 679, 8, 88, 11, 88, 12, 88, 680, 1, 88, 1, 88, 0, 0, 89, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 1, 0, 5, 2, 0, 69, 69, 101, 101, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 9, 10, 13, 13, 32, 32, 697, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 1, 179, 1, 0, 0, 0, 3, 183, 1, 0, 0, 0, 5, 187, 1, 0, 0, 0, 7, 191, 1, 0, 0, 0, 9, 196, 1, 0, 0, 0, 11, 201, 1, 0, 0, 0, 13, 206, 1, 0, 0, 0, 15, 212, 1, 0, 0, 0, 17, 217, 1, 0, 0, 0, 19, 222, 1, 0, 0, 0, 21, 227, 1, 0, 0, 0, 23, 233, 1, 0, 0, 0, 25, 239, 1, 0, 0, 0, 27, 245, 1, 0, 0, 0, 29, 249, 1, 0, 0, 0, 31, 254, 1, 0, 0, 0, 33, 257, 1, 0, 0, 0, 35, 261, 1, 0, 0, 0, 37, 265, 1, 0, 0, 0, 39, 270, 1, 0, 0, 0, 41, 275, 1, 0, 0, 0, 43, 280, 1, 0, 0, 0, 45, 285, 1, 0, 0, 0, 47, 291, 1, 0, 0, 0, 49, 297, 1, 0, 0, 0, 51, 303, 1, 0, 0, 0, 53, 308, 1, 0, 0, 0, 55, 314, 1, 0, 0, 0, 57, 320, 1, 0, 0, 0, 59, 324, 1, 0, 0, 0, 61, 329, 1, 0, 0, 0, 63, 335, 1, 0, 0, 0, 65, 339, 1, 0, 0, 0, 67, 344, 1, 0, 0, 0, 69, 350, 1, 0, 0, 0, 71, 371, 1, 0, 0, 0, 73, 373, 1, 0, 0, 0, 75, 378, 1, 0, 0, 0, 77, 383, 1, 0, 0, 0, 79, 394, 1, 0, 0, 0, 81, 400, 1, 0, 0, 0, 83, 405, 1, 0, 0, 0, 85, 414, 1, 0, 0, 0, 87, 419, 1, 0, 0, 0, 89, 424, 1, 0, 0, 0, 91, 447, 1, 0, 0, 0, 93, 464, 1, 0, 0, 0, 95, 466, 1, 0, 0, 0, 97, 482, 1, 0, 0, 0, 99, 495, 1, 0, 0, 0, 101, 497, 1, 0, 0, 0, 103, 503, 1, 0, 0, 0, 105, 508, 1, 0, 0, 0, 107, 513, 1, 0, 0, 0, 109, 518, 1, 0, 0, 0, 111, 522, 1, 0, 0, 0, 113, 527, 1, 0, 0, 0, 115, 531, 1, 0, 0, 0, 117, 550, 1, 0, 0, 0, 119, 567, 1, 0, 0, 0, 121, 569, 1, 0, 0, 0, 123, 578, 1, 0, 0, 0, 125, 582, 1, 0, 0, 0, 127, 589, 1, 0, 0, 0, 129, 596, 1, 0, 0, 0, 131, 601, 1, 0, 0, 0, 133, 605, 1, 0, 0, 0, 135, 610, 1, 0, 0, 0, 137, 612, 1, 0, 0, 0, 139, 614, 1, 0, 0, 0, 141, 616, 1, 0, 0, 0, 143, 618, 1, 0, 0, 0, 145, 620, 1, 0, 0, 0, 147, 622, 1, 0, 0, 0, 149, 625, 1, 0, 0, 0, 151, 627, 1, 0, 0, 0, 153, 630, 1, 0, 0, 0, 155, 632, 1, 0, 0, 0, 157, 635, 1, 0, 0, 0, 159, 638, 1, 0, 0, 0, 161, 640, 1, 0, 0, 0, 163, 642, 1, 0, 0, 0, 165, 644, 1, 0, 0, 0, 167, 646, 1, 0, 0, 0, 169, 648, 1, 0, 0, 0, 171, 655, 1, 0, 0, 0, 173, 658, 1, 0, 0, 0, 175, 670, 1, 0, 0, 0, 177, 678, 1, 0, 0, 0, 179, 180, 5, 115, 0, 0, 180, 181, 5, 105, 0, 0, 181, 182, 5, 110, 0, 0, 182, 2, 1, 0, 0, 0, 183, 184, 5, 99, 0, 0, 184, 185, 5, 111, 0, 0, 185, 186, 5, 115, 0, 0, 186, 4, 1, 0, 0, 0, 187, 188, 5, 116, 0, 0, 188, 189, 5, 97, 0, 0, 189, 190, 5, 110, 0, 0, 190, 6, 1, 0, 0, 0, 191, 192, 5, 97, 0, 0, 192, 193, 5, 115, 0, 0, 193, 194, 5, 105, 0, 0, 194, 195, 5, 110, 0, 0, 195, 8, 1, 0, 0, 0, 196, 197, 5, 97, 0, 0, 197, 198, 5, 99, 0, 0, 198, 199, 5, 111, 0, 0, 199, 200, 5, 115, 0, 0, 200, 10, 1, 0, 0, 0, 201, 202, 5, 97, 0, 0, 202, 203, 5, 116, 0, 0, 203, 204, 5, 97, 0, 0, 204, 205, 5, 110, 0, 0, 205, 12, 1, 0, 0, 0, 206, 207, 5, 97, 0, 0, 207, 208, 5, 116, 0, 0, 208, 209, 5, 97, 0, 0, 209, 210, 5, 110, 0, 0, 210, 211, 5, 50, 0, 0, 211, 14, 1, 0, 0, 0, 212, 213, 5, 115, 0, 0, 213, 214, 5, 105, 0, 0, 214, 215, 5, 110, 0, 0, 215, 216, 5, 104, 0, 0, 216, 16, 1, 0, 0, 0, 217, 218, 5, 99, 0, 0, 218, 219, 5, 111, 0, 0, 219, 220, 5, 115, 0, 0, 220, 221, 5, 104, 0, 0, 221, 18, 1, 0, 0, 0, 222, 223, 5, 116, 0, 0, 223, 224, 5, 97, 0, 0, 224, 225, 5, 110, 0, 0, 225, 226, 5, 104, 0, 0, 226, 20, 1, 0, 0, 0, 227, 228, 5, 97, 0, 0, 228, 229, 5, 115, 0, 0, 229, 230, 5, 105, 0, 0, 230, 231, 5, 110, 0, 0, 231, 232, 5, 104, 0, 0, 232, 22, 1, 0, 0, 0, 233, 234, 5, 97, 0, 0, 234, 235, 5, 99, 0, 0, 235, 236, 5, 111, 0, 0, 236, 237, 5, 115, 0, 0, 237, 238, 5, 104, 0, 0, 238, 24, 1, 0, 0, 0, 239, 240, 5, 97, 0, 0, 240, 241, 5, 116, 0, 0, 241, 242, 5, 97, 0, 0, 242, 243, 5, 110, 0, 0, 243, 244, 5, 104, 0, 0, 244, 26, 1, 0, 0, 0, 245, 246, 5, 97, 0, 0, 246, 247, 5, 98, 0, 0, 247, 248, 5, 115, 0, 0, 248, 28, 1, 0, 0, 0, 249, 250, 5, 115, 0, 0, 250, 251, 5, 113, 0, 0, 251, 252, 5, 114, 0, 0, 252, 253, 5, 116, 0, 0, 253, 30, 1, 0, 0, 0, 254, 255, 5, 108, 0, 0, 255, 256, 5, 110, 0, 0, 256, 32, 1, 0, 0, 0, 257, 258, 5, 108, 0, 0, 258, 259, 5, 111, 0, 0, 259, 260, 5, 103, 0, 0, 260, 34, 1, 0, 0, 0, 261, 262, 5, 101, 0, 0, 262, 263, 5, 120, 0, 0, 263, 264, 5, 112, 0, 0, 264, 36, 1, 0, 0, 0, 265, 266, 5, 115, 0, 0, 266, 267, 5, 109, 0, 0, 267, 268, 5, 105, 0, 0, 268, 269, 5, 110, 0, 0, 269, 38, 1, 0, 0, 0, 270, 271, 5, 115, 0, 0, 271, 272, 5, 109, 0, 0, 272, 273, 5, 97, 0, 0, 273, 274, 5, 120, 0, 0, 274, 40, 1, 0, 0, 0, 275, 276, 5, 116, 0, 0, 276, 277, 5, 109, 0, 0, 277, 278, 5, 105, 0, 0, 278, 279, 5, 110, 0, 0, 279, 42, 1, 0, 0, 0, 280, 281, 5, 116, 0, 0, 281, 282, 5, 109, 0, 0, 282, 283, 5, 97, 0, 0, 283, 284, 5, 120, 0, 0, 284, 44, 1, 0, 0, 0, 285, 286, 5, 116, 0, 0, 286, 287, 5, 110, 0, 0, 287, 288, 5, 111, 0, 0, 288, 289, 5, 114, 0, 0, 289, 290, 5, 109, 0, 0, 290, 46, 1, 0, 0, 0, 291, 292, 5, 115, 0, 0, 292, 293, 5, 110, 0, 0, 293, 294, 5, 111, 0, 0, 294, 295, 5, 114, 0, 0, 295, 296, 5, 109, 0, 0, 296, 48, 1, 0, 0, 0, 297, 298, 5, 102, 0, 0, 298, 299, 5, 108, 0, 0, 299, 300, 5, 111, 0, 0, 300, 301, 5, 111, 0, 0, 301, 302, 5, 114, 0, 0, 302, 50, 1, 0, 0, 0, 303, 304, 5, 99, 0, 0, 304, 305, 5, 101, 0, 0, 305, 306, 5, 105, 0, 0, 306, 307, 5, 108, 0, 0, 307, 52, 1, 0, 0, 0, 308, 309, 5, 114, 0, 0, 309, 310, 5, 111, 0, 0, 310, 311, 5, 117, 0, 0, 311, 312, 5, 110, 0, 0, 312, 313, 5, 100, 0, 0, 313, 54, 1, 0, 0, 0, 314, 315, 5, 103, 0, 0, 315, 316, 5, 97, 0, 0, 316, 317, 5, 109, 0, 0, 317, 318, 5, 109, 0, 0, 318, 319, 5, 97, 0, 0, 319, 56, 1, 0, 0, 0, 320, 321, 5, 112, 0, 0, 321, 322, 5, 111, 0, 0, 322, 323, 5, 119, 0, 0, 323, 58, 1, 0, 0, 0, 324, 325, 5, 115, 0, 0, 325, 326, 5, 105, 0, 0, 326, 327, 5, 103, 0, 0, 327, 328, 5, 109, 0, 0, 328, 60, 1, 0, 0, 0, 329, 330, 5, 99, 0, 0, 330, 331, 5, 108, 0, 0, 331, 332, 5, 97, 0, 0, 332, 333, 5, 109, 0, 0, 333, 334, 5, 112, 0, 0, 334, 62, 1, 0, 0, 0, 335, 336, 5, 102, 0, 0, 336, 337, 5, 102, 0, 0, 337, 338, 5, 116, 0, 0, 338, 64, 1, 0, 0, 0, 339, 340, 5, 105, 0, 0, 340, 341, 5, 102, 0, 0, 341, 342, 5, 102, 0, 0, 342, 343, 5, 116, 0, 0, 343, 66, 1, 0, 0, 0, 344, 345, 5, 97, 0, 0, 345, 346, 5, 110, 0, 0, 346, 347, 5, 103, 0, 0, 347, 348, 5, 108, 0, 0, 348, 349, 5, 101, 0, 0, 349, 68, 1, 0, 0, 0, 350, 351, 5, 112, 0, 0, 351, 352, 5, 114, 0, 0, 352, 353, 5, 105, 0, 0, 353, 354, 5, 110, 0, 0, 354, 355, 5, 116, 0, 0, 355, 70, 1, 0, 0, 0, 356, 357, 5, 112, 0, 0, 357, 358, 5, 114, 0, 0, 358, 359, 5, 105, 0, 0, 359, 360, 5, 110, 0, 0, 360, 361, 5, 116, 0, 0, 361, 362, 5, 95, 0, 0, 362, 363, 5, 115, 0, 0, 363, 364, 5, 104, 0, 0, 364, 365, 5, 97, 0, 0, 365, 366, 5, 112, 0, 0, 366, 372, 5, 101, 0, 0, 367, 368, 5, 112, 0, 0, 368, 369, 5, 115, 0, 0, 369, 370, 5, 104, 0, 0, 370, 372, 5, 112, 0, 0, 371, 356, 1, 0, 0, 0, 371, 367, 1, 0, 0, 0, 372, 72, 1, 0, 0, 0, 373, 374, 5, 108, 0, 0, 374, 375, 5, 101, 0, 0, 375, 376, 5, 114, 0, 0, 376, 377, 5, 112, 0, 0, 377, 74, 1, 0, 0, 0, 378, 379, 5, 115, 0, 0, 379, 380, 5, 116, 0, 0, 380, 381, 5, 101, 0, 0, 381, 382, 5, 112, 0, 0, 382, 76, 1, 0, 0, 0, 383, 384, 5, 115, 0, 0, 384, 385, 5, 109, 0, 0, 385, 386, 5, 111, 0, 0, 386, 387, 5, 111, 0, 0, 387, 388, 5, 116, 0, 0, 388, 389, 5, 104, 0, 0, 389, 390, 5, 115, 0, 0, 390, 391, 5, 116, 0, 0, 391, 392, 5, 101, 0, 0, 392, 393, 5, 112, 0, 0, 393, 78, 1, 0, 0, 0, 394, 395, 5, 102, 0, 0, 395, 396, 5, 114, 0, 0, 396, 397, 5, 97, 0, 0, 397, 398, 5, 99, 0, 0, 398, 399, 5, 116, 0, 0, 399, 80, 1, 0, 0, 0, 400, 401, 5, 114, 0, 0, 401, 402, 5, 101, 0, 0, 402, 403, 5, 108, 0, 0, 403, 404, 5, 117, 0, 0, 404, 82, 1, 0, 0, 0, 405, 406, 5, 115, 0, 0, 406, 407, 5, 111, 0, 0, 407, 408, 5, 102, 0, 0, 408, 409, 5, 116, 0, 0, 409, 410, 5, 112, 0, 0, 410, 411, 5, 108, 0, 0, 411, 412, 5, 117, 0, 0, 412, 413, 5, 115, 0, 0, 413, 84, 1, 0, 0, 0, 414, 415, 5, 103, 0, 0, 415, 416, 5, 101, 0, 0, 416, 417, 5, 108, 0, 0, 417, 418, 5, 117, 0, 0, 418, 86, 1, 0, 0, 0, 419, 420, 5, 115, 0, 0, 420, 421, 5, 105, 0, 0, 421, 422, 5, 103, 0, 0, 422, 423, 5, 110, 0, 0, 423, 88, 1, 0, 0, 0, 424, 425, 5, 109, 0, 0, 425, 426, 5, 97, 0, 0, 426, 427, 5, 112, 0, 0, 427, 90, 1, 0, 0, 0, 428, 429, 5, 101, 0, 0, 429, 430, 5, 122, 0, 0, 430, 431, 5, 99, 0, 0, 431, 432, 5, 111, 0, 0, 432, 433, 5, 110, 0, 0, 433, 434, 5, 118, 0, 0, 434, 435, 5, 111, 0, 0, 435, 436, 5, 108, 0, 0, 436, 437, 5, 117, 0, 0, 437, 438, 5, 116, 0, 0, 438, 439, 5, 105, 0, 0, 439, 440, 5, 111, 0, 0, 440, 448, 5, 110, 0, 0, 441, 442, 5, 101, 0, 0, 442, 443, 5, 122, 0, 0, 443, 444, 5, 99, 0, 0, 444, 445, 5, 111, 0, 0, 445, 446, 5, 110, 0, 0, 446, 448, 5, 118, 0, 0, 447, 428, 1, 0, 0, 0, 447, 441, 1, 0, 0, 0, 448, 92, 1, 0, 0, 0, 449, 450, 5, 99, 0, 0, 450, 451, 5, 111, 0, 0, 451, 452, 5, 110, 0, 0, 452, 453, 5, 118, 0, 0, 453, 454, 5, 111, 0, 0, 454, 455, 5, 108, 0, 0, 455, 456, 5, 117, 0, 0, 456, 457, 5, 116, 0, 0, 457, 458, 5, 105, 0, 0, 458, 459, 5, 111, 0, 0, 459, 465, 5, 110, 0, 0, 460, 461, 5, 99, 0, 0, 461, 462, 5, 111, 0, 0, 462, 463, 5, 110, 0, 0, 463, 465, 5, 118, 0, 0, 464, 449, 1, 0, 0, 0, 464, 460, 1, 0, 0, 0, 465, 94, 1, 0, 0, 0, 466, 467, 5, 115, 0, 0, 467, 468, 5, 119, 0, 0, 468, 469, 5, 97, 0, 0, 469, 470, 5, 112, 0, 0, 470, 96, 1, 0, 0, 0, 471, 472, 5, 112, 0, 0, 472, 473, 5, 101, 0, 0, 473, 474, 5, 114, 0, 0, 474, 475, 5, 109, 0, 0, 475, 476, 5, 117, 0, 0, 476, 477, 5, 116, 0, 0, 477, 483, 5, 101, 0, 0, 478, 479, 5, 112, 0, 0, 479, 480, 5, 101, 0, 0, 480, 481, 5, 114, 0, 0, 481, 483, 5, 109, 0, 0, 482, 471, 1, 0, 0, 0, 482, 478, 1, 0, 0, 0, 483, 98, 1, 0, 0, 0, 484, 485, 5, 114, 0, 0, 485, 486, 5, 101, 0, 0, 486, 487, 5, 115, 0, 0, 487, 488, 5, 104, 0, 0, 488, 489, 5, 97, 0, 0, 489, 490, 5, 112, 0, 0, 490, 496, 5, 101, 0, 0, 491, 492, 5, 114, 0, 0, 492, 493, 5, 115, 0, 0, 493, 494, 5, 104, 0, 0, 494, 496, 5, 112, 0, 0, 495, 484, 1, 0, 0, 0, 495, 491, 1, 0, 0, 0, 496, 100, 1, 0, 0, 0, 497, 498, 5, 114, 0, 0, 498, 499, 5, 97, 0, 0, 499, 500, 5, 110, 0, 0, 500, 501, 5, 103, 0, 0, 501, 502, 5, 101, 0, 0, 502, 102, 1, 0, 0, 0, 503, 504, 5, 116, 0, 0, 504, 505, 5, 111, 0, 0, 505, 506, 5, 112, 0, 0, 506, 507, 5, 107, 0, 0, 507, 104, 1, 0, 0, 0, 508, 509, 5, 98, 0, 0, 509, 510, 5, 111, 0, 0, 510, 511, 5, 116, 0, 0, 511, 512, 5, 107, 0, 0, 512, 106, 1, 0, 0, 0, 513, 514, 5, 112, 0, 0, 514, 515, 5, 105, 0, 0, 515, 516, 5, 110, 0, 0, 516, 517, 5, 118, 0, 0, 517, 108, 1, 0, 0, 0, 518, 519, 5, 115, 0, 0, 519, 520, 5, 117, 0, 0, 520, 521, 5, 109, 0, 0, 521, 110, 1, 0, 0, 0, 522, 523, 5, 109, 0, 0, 523, 524, 5, 101, 0, 0, 524, 525, 5, 97, 0, 0, 525, 526, 5, 110, 0, 0, 526, 112, 1, 0, 0, 0, 527, 528, 5, 115, 0, 0, 528, 529, 5, 116, 0, 0, 529, 530, 5, 100, 0, 0, 530, 114, 1, 0, 0, 0, 531, 532, 5, 118, 0, 0, 532, 533, 5, 97, 0, 0, 533, 534, 5, 114, 0, 0, 534, 116, 1, 0, 0, 0, 535, 536, 5, 113, 0, 0, 536, 537, 5, 117, 0, 0, 537, 538, 5, 97, 0, 0, 538, 539, 5, 114, 0, 0, 539, 540, 5, 116, 0, 0, 540, 541, 5, 105, 0, 0, 541, 542, 5, 108, 0, 0, 542, 551, 5, 101, 0, 0, 543, 544, 5, 113, 0, 0, 544, 545, 5, 117, 0, 0, 545, 546, 5, 97, 0, 0, 546, 547, 5, 114, 0, 0, 547, 548, 5, 116, 0, 0, 548, 549, 5, 105, 0, 0, 549, 551, 5, 108, 0, 0, 550, 535, 1, 0, 0, 0, 550, 543, 1, 0, 0, 0, 551, 118, 1, 0, 0, 0, 552, 553, 5, 112, 0, 0, 553, 554, 5, 101, 0, 0, 554, 555, 5, 114, 0, 0, 555, 556, 5, 99, 0, 0, 556, 557, 5, 101, 0, 0, 557, 558, 5, 110, 0, 0, 558, 559, 5, 116, 0, 0, 559, 560, 5, 105, 0, 0, 560, 561, 5, 108, 0, 0, 561, 568, 5, 101, 0, 0, 562, 563, 5, 112, 0, 0, 563, 564, 5, 114, 0, 0, 564, 565, 5, 99, 0, 0, 565, 566, 5, 110, 0, 0, 566, 568, 5, 116, 0, 0, 567, 552, 1, 0, 0, 0, 567, 562, 1, 0, 0, 0, 568, 120, 1, 0, 0, 0, 569, 570, 5, 113, 0, 0, 570, 571, 5, 117, 0, 0, 571, 572, 5, 97, 0, 0, 572, 573, 5, 110, 0, 0, 573, 574, 5, 116, 0, 0, 574, 575, 5, 105, 0, 0, 575, 576, 5, 108, 0, 0, 576, 577, 5, 101, 0, 0, 577, 122, 1, 0, 0, 0, 578, 579, 5, 100, 0, 0, 579, 580, 5, 111, 0, 0, 580, 581, 5, 116, 0, 0, 581, 124, 1, 0, 0, 0, 582, 583, 5, 109, 0, 0, 583, 584, 5, 111, 0, 0, 584, 585, 5, 109, 0, 0, 585, 586, 5, 101, 0, 0, 586, 587, 5, 110, 0, 0, 587, 588, 5, 116, 0, 0, 588, 126, 1, 0, 0, 0, 589, 590, 5, 99, 0, 0, 590, 591, 5, 111, 0, 0, 591, 592, 5, 115, 0, 0, 592, 593, 5, 115, 0, 0, 593, 594, 5, 105, 0, 0, 594, 595, 5, 109, 0, 0, 595, 128, 1, 0, 0, 0, 596, 597, 5, 102, 0, 0, 597, 598, 5, 108, 0, 0, 598, 599, 5, 105, 0, 0, 599, 600, 5, 112, 0, 0, 600, 130, 1, 0, 0, 0, 601, 602, 5, 99, 0, 0, 602, 603, 5, 111, 0, 0, 603, 604, 5, 118, 0, 0, 604, 132, 1, 0, 0, 0, 605, 606, 5, 115, 0, 0, 606, 607, 5, 111, 0, 0, 607, 608, 5, 114, 0, 0, 608, 609, 5, 116, 0, 0, 609, 134, 1, 0, 0, 0, 610, 611, 5, 43, 0, 0, 611, 136, 1, 0, 0, 0, 612, 613, 5, 45, 0, 0, 613, 138, 1, 0, 0, 0, 614, 615, 5, 42, 0, 0, 615, 140, 1, 0, 0, 0, 616, 617, 5, 47, 0, 0, 617, 142, 1, 0, 0, 0, 618, 619, 5, 37, 0, 0, 619, 144, 1, 0, 0, 0, 620, 621, 5, 94, 0, 0, 621, 146, 1, 0, 0, 0, 622, 623, 5, 62, 0, 0, 623, 624, 5, 61, 0, 0, 624, 148, 1, 0, 0, 0, 625, 626, 5, 62, 0, 0, 626, 150, 1, 0, 0, 0, 627, 628, 5, 60, 0, 0, 628, 629, 5, 61, 0, 0, 629, 152, 1, 0, 0, 0, 630, 631, 5, 60, 0, 0, 631, 154, 1, 0, 0, 0, 632, 633, 5, 61, 0, 0, 633, 634, 5, 61, 0, 0, 634, 156, 1, 0, 0, 0, 635, 636, 5, 33, 0, 0, 636, 637, 5, 61, 0, 0, 637, 158, 1, 0, 0, 0, 638, 639, 5, 124, 0, 0, 639, 160, 1, 0, 0, 0, 640, 641, 5, 40, 0, 0, 641, 162, 1, 0, 0, 0, 642, 643, 5, 41, 0, 0, 643, 164, 1, 0, 0, 0, 644, 645, 5, 44, 0, 0, 645, 166, 1, 0, 0, 0, 646, 647, 5, 91, 0, 0, 647, 168, 1, 0, 0, 0, 648, 649, 5, 93, 0, 0, 649, 170, 1, 0, 0, 0, 650, 651, 5, 112, 0, 0, 651, 656, 5, 105, 0, 0, 652, 653, 5, 80, 0, 0, 653, 656, 5, 73, 0, 0, 654, 656, 7, 0, 0, 0, 655, 650, 1, 0, 0, 0, 655, 652, 1, 0, 0, 0, 655, 654, 1, 0, 0, 0, 656, 172, 1, 0, 0, 0, 657, 659, 7, 1, 0, 0, 658, 657, 1, 0, 0, 0, 659, 660, 1, 0, 0, 0, 660, 658, 1, 0, 0, 0, 660, 661, 1, 0, 0, 0, 661, 668, 1, 0, 0, 0, 662, 664, 5, 46, 0, 0, 663, 665, 7, 1, 0, 0, 664, 663, 1, 0, 0, 0, 665, 666, 1, 0, 0, 0, 666, 664, 1, 0, 0, 0, 666, 667, 1, 0, 0, 0, 667, 669, 1, 0, 0, 0, 668, 662, 1, 0, 0, 0, 668, 669, 1, 0, 0, 0, 669, 174, 1, 0, 0, 0, 670, 674, 7, 2, 0, 0, 671, 673, 7, 3, 0, 0, 672, 671, 1, 0, 0, 0, 673, 676, 1, 0, 0, 0, 674, 672, 1, 0, 0, 0, 674, 675, 1, 0, 0, 0, 675, 176, 1, 0, 0, 0, 676, 674, 1, 0, 0, 0, 677, 679, 7, 4, 0, 0, 678, 677, 1, 0, 0, 0, 679, 680, 1, 0, 0, 0, 680, 678, 1, 0, 0, 0, 680, 681, 1, 0, 0, 0, 681, 682, 1, 0, 0, 0, 682, 683, 6, 88, 0, 0, 683, 178, 1, 0, 0, 0, 14, 0, 371, 447, 464, 482, 495, 550, 567, 655, 660, 666, 668, 674, 680, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 91, 693, 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, 2, 83, 7, 83, 2, 84, 7, 84, 2, 85, 7, 85, 2, 86, 7, 86, 2, 87, 7, 87, 2, 88, 7, 88, 2, 89, 7, 89, 2, 90, 7, 90, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 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, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 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, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 28, 1, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 3, 35, 376, 8, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 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, 41, 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, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 3, 45, 452, 8, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 3, 46, 469, 8, 46, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 3, 48, 487, 8, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 3, 49, 500, 8, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 3, 58, 555, 8, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 1, 59, 3, 59, 572, 8, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 61, 1, 61, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 73, 1, 73, 1, 73, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 1, 79, 1, 79, 1, 80, 1, 80, 1, 81, 1, 81, 1, 82, 1, 82, 1, 83, 1, 83, 1, 84, 1, 84, 1, 84, 1, 85, 1, 85, 1, 86, 1, 86, 1, 87, 1, 87, 1, 87, 1, 87, 1, 87, 3, 87, 665, 8, 87, 1, 88, 4, 88, 668, 8, 88, 11, 88, 12, 88, 669, 1, 88, 1, 88, 4, 88, 674, 8, 88, 11, 88, 12, 88, 675, 3, 88, 678, 8, 88, 1, 89, 1, 89, 5, 89, 682, 8, 89, 10, 89, 12, 89, 685, 9, 89, 1, 90, 4, 90, 688, 8, 90, 11, 90, 12, 90, 689, 1, 90, 1, 90, 0, 0, 91, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 153, 77, 155, 78, 157, 79, 159, 80, 161, 81, 163, 82, 165, 83, 167, 84, 169, 85, 171, 86, 173, 87, 175, 88, 177, 89, 179, 90, 181, 91, 1, 0, 5, 2, 0, 69, 69, 101, 101, 1, 0, 48, 57, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 3, 0, 9, 10, 13, 13, 32, 32, 706, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 0, 159, 1, 0, 0, 0, 0, 161, 1, 0, 0, 0, 0, 163, 1, 0, 0, 0, 0, 165, 1, 0, 0, 0, 0, 167, 1, 0, 0, 0, 0, 169, 1, 0, 0, 0, 0, 171, 1, 0, 0, 0, 0, 173, 1, 0, 0, 0, 0, 175, 1, 0, 0, 0, 0, 177, 1, 0, 0, 0, 0, 179, 1, 0, 0, 0, 0, 181, 1, 0, 0, 0, 1, 183, 1, 0, 0, 0, 3, 187, 1, 0, 0, 0, 5, 191, 1, 0, 0, 0, 7, 195, 1, 0, 0, 0, 9, 200, 1, 0, 0, 0, 11, 205, 1, 0, 0, 0, 13, 210, 1, 0, 0, 0, 15, 216, 1, 0, 0, 0, 17, 221, 1, 0, 0, 0, 19, 226, 1, 0, 0, 0, 21, 231, 1, 0, 0, 0, 23, 237, 1, 0, 0, 0, 25, 243, 1, 0, 0, 0, 27, 249, 1, 0, 0, 0, 29, 253, 1, 0, 0, 0, 31, 258, 1, 0, 0, 0, 33, 261, 1, 0, 0, 0, 35, 265, 1, 0, 0, 0, 37, 269, 1, 0, 0, 0, 39, 274, 1, 0, 0, 0, 41, 279, 1, 0, 0, 0, 43, 284, 1, 0, 0, 0, 45, 289, 1, 0, 0, 0, 47, 295, 1, 0, 0, 0, 49, 301, 1, 0, 0, 0, 51, 307, 1, 0, 0, 0, 53, 312, 1, 0, 0, 0, 55, 318, 1, 0, 0, 0, 57, 324, 1, 0, 0, 0, 59, 328, 1, 0, 0, 0, 61, 333, 1, 0, 0, 0, 63, 339, 1, 0, 0, 0, 65, 343, 1, 0, 0, 0, 67, 348, 1, 0, 0, 0, 69, 354, 1, 0, 0, 0, 71, 375, 1, 0, 0, 0, 73, 377, 1, 0, 0, 0, 75, 382, 1, 0, 0, 0, 77, 387, 1, 0, 0, 0, 79, 398, 1, 0, 0, 0, 81, 404, 1, 0, 0, 0, 83, 409, 1, 0, 0, 0, 85, 418, 1, 0, 0, 0, 87, 423, 1, 0, 0, 0, 89, 428, 1, 0, 0, 0, 91, 451, 1, 0, 0, 0, 93, 468, 1, 0, 0, 0, 95, 470, 1, 0, 0, 0, 97, 486, 1, 0, 0, 0, 99, 499, 1, 0, 0, 0, 101, 501, 1, 0, 0, 0, 103, 507, 1, 0, 0, 0, 105, 512, 1, 0, 0, 0, 107, 517, 1, 0, 0, 0, 109, 522, 1, 0, 0, 0, 111, 526, 1, 0, 0, 0, 113, 531, 1, 0, 0, 0, 115, 535, 1, 0, 0, 0, 117, 554, 1, 0, 0, 0, 119, 571, 1, 0, 0, 0, 121, 573, 1, 0, 0, 0, 123, 582, 1, 0, 0, 0, 125, 586, 1, 0, 0, 0, 127, 593, 1, 0, 0, 0, 129, 600, 1, 0, 0, 0, 131, 605, 1, 0, 0, 0, 133, 609, 1, 0, 0, 0, 135, 614, 1, 0, 0, 0, 137, 616, 1, 0, 0, 0, 139, 618, 1, 0, 0, 0, 141, 620, 1, 0, 0, 0, 143, 622, 1, 0, 0, 0, 145, 624, 1, 0, 0, 0, 147, 626, 1, 0, 0, 0, 149, 629, 1, 0, 0, 0, 151, 631, 1, 0, 0, 0, 153, 634, 1, 0, 0, 0, 155, 636, 1, 0, 0, 0, 157, 639, 1, 0, 0, 0, 159, 642, 1, 0, 0, 0, 161, 644, 1, 0, 0, 0, 163, 646, 1, 0, 0, 0, 165, 648, 1, 0, 0, 0, 167, 650, 1, 0, 0, 0, 169, 652, 1, 0, 0, 0, 171, 655, 1, 0, 0, 0, 173, 657, 1, 0, 0, 0, 175, 664, 1, 0, 0, 0, 177, 667, 1, 0, 0, 0, 179, 679, 1, 0, 0, 0, 181, 687, 1, 0, 0, 0, 183, 184, 5, 115, 0, 0, 184, 185, 5, 105, 0, 0, 185, 186, 5, 110, 0, 0, 186, 2, 1, 0, 0, 0, 187, 188, 5, 99, 0, 0, 188, 189, 5, 111, 0, 0, 189, 190, 5, 115, 0, 0, 190, 4, 1, 0, 0, 0, 191, 192, 5, 116, 0, 0, 192, 193, 5, 97, 0, 0, 193, 194, 5, 110, 0, 0, 194, 6, 1, 0, 0, 0, 195, 196, 5, 97, 0, 0, 196, 197, 5, 115, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 110, 0, 0, 199, 8, 1, 0, 0, 0, 200, 201, 5, 97, 0, 0, 201, 202, 5, 99, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 115, 0, 0, 204, 10, 1, 0, 0, 0, 205, 206, 5, 97, 0, 0, 206, 207, 5, 116, 0, 0, 207, 208, 5, 97, 0, 0, 208, 209, 5, 110, 0, 0, 209, 12, 1, 0, 0, 0, 210, 211, 5, 97, 0, 0, 211, 212, 5, 116, 0, 0, 212, 213, 5, 97, 0, 0, 213, 214, 5, 110, 0, 0, 214, 215, 5, 50, 0, 0, 215, 14, 1, 0, 0, 0, 216, 217, 5, 115, 0, 0, 217, 218, 5, 105, 0, 0, 218, 219, 5, 110, 0, 0, 219, 220, 5, 104, 0, 0, 220, 16, 1, 0, 0, 0, 221, 222, 5, 99, 0, 0, 222, 223, 5, 111, 0, 0, 223, 224, 5, 115, 0, 0, 224, 225, 5, 104, 0, 0, 225, 18, 1, 0, 0, 0, 226, 227, 5, 116, 0, 0, 227, 228, 5, 97, 0, 0, 228, 229, 5, 110, 0, 0, 229, 230, 5, 104, 0, 0, 230, 20, 1, 0, 0, 0, 231, 232, 5, 97, 0, 0, 232, 233, 5, 115, 0, 0, 233, 234, 5, 105, 0, 0, 234, 235, 5, 110, 0, 0, 235, 236, 5, 104, 0, 0, 236, 22, 1, 0, 0, 0, 237, 238, 5, 97, 0, 0, 238, 239, 5, 99, 0, 0, 239, 240, 5, 111, 0, 0, 240, 241, 5, 115, 0, 0, 241, 242, 5, 104, 0, 0, 242, 24, 1, 0, 0, 0, 243, 244, 5, 97, 0, 0, 244, 245, 5, 116, 0, 0, 245, 246, 5, 97, 0, 0, 246, 247, 5, 110, 0, 0, 247, 248, 5, 104, 0, 0, 248, 26, 1, 0, 0, 0, 249, 250, 5, 97, 0, 0, 250, 251, 5, 98, 0, 0, 251, 252, 5, 115, 0, 0, 252, 28, 1, 0, 0, 0, 253, 254, 5, 115, 0, 0, 254, 255, 5, 113, 0, 0, 255, 256, 5, 114, 0, 0, 256, 257, 5, 116, 0, 0, 257, 30, 1, 0, 0, 0, 258, 259, 5, 108, 0, 0, 259, 260, 5, 110, 0, 0, 260, 32, 1, 0, 0, 0, 261, 262, 5, 108, 0, 0, 262, 263, 5, 111, 0, 0, 263, 264, 5, 103, 0, 0, 264, 34, 1, 0, 0, 0, 265, 266, 5, 101, 0, 0, 266, 267, 5, 120, 0, 0, 267, 268, 5, 112, 0, 0, 268, 36, 1, 0, 0, 0, 269, 270, 5, 115, 0, 0, 270, 271, 5, 109, 0, 0, 271, 272, 5, 105, 0, 0, 272, 273, 5, 110, 0, 0, 273, 38, 1, 0, 0, 0, 274, 275, 5, 115, 0, 0, 275, 276, 5, 109, 0, 0, 276, 277, 5, 97, 0, 0, 277, 278, 5, 120, 0, 0, 278, 40, 1, 0, 0, 0, 279, 280, 5, 116, 0, 0, 280, 281, 5, 109, 0, 0, 281, 282, 5, 105, 0, 0, 282, 283, 5, 110, 0, 0, 283, 42, 1, 0, 0, 0, 284, 285, 5, 116, 0, 0, 285, 286, 5, 109, 0, 0, 286, 287, 5, 97, 0, 0, 287, 288, 5, 120, 0, 0, 288, 44, 1, 0, 0, 0, 289, 290, 5, 116, 0, 0, 290, 291, 5, 110, 0, 0, 291, 292, 5, 111, 0, 0, 292, 293, 5, 114, 0, 0, 293, 294, 5, 109, 0, 0, 294, 46, 1, 0, 0, 0, 295, 296, 5, 115, 0, 0, 296, 297, 5, 110, 0, 0, 297, 298, 5, 111, 0, 0, 298, 299, 5, 114, 0, 0, 299, 300, 5, 109, 0, 0, 300, 48, 1, 0, 0, 0, 301, 302, 5, 102, 0, 0, 302, 303, 5, 108, 0, 0, 303, 304, 5, 111, 0, 0, 304, 305, 5, 111, 0, 0, 305, 306, 5, 114, 0, 0, 306, 50, 1, 0, 0, 0, 307, 308, 5, 99, 0, 0, 308, 309, 5, 101, 0, 0, 309, 310, 5, 105, 0, 0, 310, 311, 5, 108, 0, 0, 311, 52, 1, 0, 0, 0, 312, 313, 5, 114, 0, 0, 313, 314, 5, 111, 0, 0, 314, 315, 5, 117, 0, 0, 315, 316, 5, 110, 0, 0, 316, 317, 5, 100, 0, 0, 317, 54, 1, 0, 0, 0, 318, 319, 5, 103, 0, 0, 319, 320, 5, 97, 0, 0, 320, 321, 5, 109, 0, 0, 321, 322, 5, 109, 0, 0, 322, 323, 5, 97, 0, 0, 323, 56, 1, 0, 0, 0, 324, 325, 5, 112, 0, 0, 325, 326, 5, 111, 0, 0, 326, 327, 5, 119, 0, 0, 327, 58, 1, 0, 0, 0, 328, 329, 5, 115, 0, 0, 329, 330, 5, 105, 0, 0, 330, 331, 5, 103, 0, 0, 331, 332, 5, 109, 0, 0, 332, 60, 1, 0, 0, 0, 333, 334, 5, 99, 0, 0, 334, 335, 5, 108, 0, 0, 335, 336, 5, 97, 0, 0, 336, 337, 5, 109, 0, 0, 337, 338, 5, 112, 0, 0, 338, 62, 1, 0, 0, 0, 339, 340, 5, 102, 0, 0, 340, 341, 5, 102, 0, 0, 341, 342, 5, 116, 0, 0, 342, 64, 1, 0, 0, 0, 343, 344, 5, 105, 0, 0, 344, 345, 5, 102, 0, 0, 345, 346, 5, 102, 0, 0, 346, 347, 5, 116, 0, 0, 347, 66, 1, 0, 0, 0, 348, 349, 5, 97, 0, 0, 349, 350, 5, 110, 0, 0, 350, 351, 5, 103, 0, 0, 351, 352, 5, 108, 0, 0, 352, 353, 5, 101, 0, 0, 353, 68, 1, 0, 0, 0, 354, 355, 5, 112, 0, 0, 355, 356, 5, 114, 0, 0, 356, 357, 5, 105, 0, 0, 357, 358, 5, 110, 0, 0, 358, 359, 5, 116, 0, 0, 359, 70, 1, 0, 0, 0, 360, 361, 5, 112, 0, 0, 361, 362, 5, 114, 0, 0, 362, 363, 5, 105, 0, 0, 363, 364, 5, 110, 0, 0, 364, 365, 5, 116, 0, 0, 365, 366, 5, 95, 0, 0, 366, 367, 5, 115, 0, 0, 367, 368, 5, 104, 0, 0, 368, 369, 5, 97, 0, 0, 369, 370, 5, 112, 0, 0, 370, 376, 5, 101, 0, 0, 371, 372, 5, 112, 0, 0, 372, 373, 5, 115, 0, 0, 373, 374, 5, 104, 0, 0, 374, 376, 5, 112, 0, 0, 375, 360, 1, 0, 0, 0, 375, 371, 1, 0, 0, 0, 376, 72, 1, 0, 0, 0, 377, 378, 5, 108, 0, 0, 378, 379, 5, 101, 0, 0, 379, 380, 5, 114, 0, 0, 380, 381, 5, 112, 0, 0, 381, 74, 1, 0, 0, 0, 382, 383, 5, 115, 0, 0, 383, 384, 5, 116, 0, 0, 384, 385, 5, 101, 0, 0, 385, 386, 5, 112, 0, 0, 386, 76, 1, 0, 0, 0, 387, 388, 5, 115, 0, 0, 388, 389, 5, 109, 0, 0, 389, 390, 5, 111, 0, 0, 390, 391, 5, 111, 0, 0, 391, 392, 5, 116, 0, 0, 392, 393, 5, 104, 0, 0, 393, 394, 5, 115, 0, 0, 394, 395, 5, 116, 0, 0, 395, 396, 5, 101, 0, 0, 396, 397, 5, 112, 0, 0, 397, 78, 1, 0, 0, 0, 398, 399, 5, 102, 0, 0, 399, 400, 5, 114, 0, 0, 400, 401, 5, 97, 0, 0, 401, 402, 5, 99, 0, 0, 402, 403, 5, 116, 0, 0, 403, 80, 1, 0, 0, 0, 404, 405, 5, 114, 0, 0, 405, 406, 5, 101, 0, 0, 406, 407, 5, 108, 0, 0, 407, 408, 5, 117, 0, 0, 408, 82, 1, 0, 0, 0, 409, 410, 5, 115, 0, 0, 410, 411, 5, 111, 0, 0, 411, 412, 5, 102, 0, 0, 412, 413, 5, 116, 0, 0, 413, 414, 5, 112, 0, 0, 414, 415, 5, 108, 0, 0, 415, 416, 5, 117, 0, 0, 416, 417, 5, 115, 0, 0, 417, 84, 1, 0, 0, 0, 418, 419, 5, 103, 0, 0, 419, 420, 5, 101, 0, 0, 420, 421, 5, 108, 0, 0, 421, 422, 5, 117, 0, 0, 422, 86, 1, 0, 0, 0, 423, 424, 5, 115, 0, 0, 424, 425, 5, 105, 0, 0, 425, 426, 5, 103, 0, 0, 426, 427, 5, 110, 0, 0, 427, 88, 1, 0, 0, 0, 428, 429, 5, 109, 0, 0, 429, 430, 5, 97, 0, 0, 430, 431, 5, 112, 0, 0, 431, 90, 1, 0, 0, 0, 432, 433, 5, 101, 0, 0, 433, 434, 5, 122, 0, 0, 434, 435, 5, 99, 0, 0, 435, 436, 5, 111, 0, 0, 436, 437, 5, 110, 0, 0, 437, 438, 5, 118, 0, 0, 438, 439, 5, 111, 0, 0, 439, 440, 5, 108, 0, 0, 440, 441, 5, 117, 0, 0, 441, 442, 5, 116, 0, 0, 442, 443, 5, 105, 0, 0, 443, 444, 5, 111, 0, 0, 444, 452, 5, 110, 0, 0, 445, 446, 5, 101, 0, 0, 446, 447, 5, 122, 0, 0, 447, 448, 5, 99, 0, 0, 448, 449, 5, 111, 0, 0, 449, 450, 5, 110, 0, 0, 450, 452, 5, 118, 0, 0, 451, 432, 1, 0, 0, 0, 451, 445, 1, 0, 0, 0, 452, 92, 1, 0, 0, 0, 453, 454, 5, 99, 0, 0, 454, 455, 5, 111, 0, 0, 455, 456, 5, 110, 0, 0, 456, 457, 5, 118, 0, 0, 457, 458, 5, 111, 0, 0, 458, 459, 5, 108, 0, 0, 459, 460, 5, 117, 0, 0, 460, 461, 5, 116, 0, 0, 461, 462, 5, 105, 0, 0, 462, 463, 5, 111, 0, 0, 463, 469, 5, 110, 0, 0, 464, 465, 5, 99, 0, 0, 465, 466, 5, 111, 0, 0, 466, 467, 5, 110, 0, 0, 467, 469, 5, 118, 0, 0, 468, 453, 1, 0, 0, 0, 468, 464, 1, 0, 0, 0, 469, 94, 1, 0, 0, 0, 470, 471, 5, 115, 0, 0, 471, 472, 5, 119, 0, 0, 472, 473, 5, 97, 0, 0, 473, 474, 5, 112, 0, 0, 474, 96, 1, 0, 0, 0, 475, 476, 5, 112, 0, 0, 476, 477, 5, 101, 0, 0, 477, 478, 5, 114, 0, 0, 478, 479, 5, 109, 0, 0, 479, 480, 5, 117, 0, 0, 480, 481, 5, 116, 0, 0, 481, 487, 5, 101, 0, 0, 482, 483, 5, 112, 0, 0, 483, 484, 5, 101, 0, 0, 484, 485, 5, 114, 0, 0, 485, 487, 5, 109, 0, 0, 486, 475, 1, 0, 0, 0, 486, 482, 1, 0, 0, 0, 487, 98, 1, 0, 0, 0, 488, 489, 5, 114, 0, 0, 489, 490, 5, 101, 0, 0, 490, 491, 5, 115, 0, 0, 491, 492, 5, 104, 0, 0, 492, 493, 5, 97, 0, 0, 493, 494, 5, 112, 0, 0, 494, 500, 5, 101, 0, 0, 495, 496, 5, 114, 0, 0, 496, 497, 5, 115, 0, 0, 497, 498, 5, 104, 0, 0, 498, 500, 5, 112, 0, 0, 499, 488, 1, 0, 0, 0, 499, 495, 1, 0, 0, 0, 500, 100, 1, 0, 0, 0, 501, 502, 5, 114, 0, 0, 502, 503, 5, 97, 0, 0, 503, 504, 5, 110, 0, 0, 504, 505, 5, 103, 0, 0, 505, 506, 5, 101, 0, 0, 506, 102, 1, 0, 0, 0, 507, 508, 5, 116, 0, 0, 508, 509, 5, 111, 0, 0, 509, 510, 5, 112, 0, 0, 510, 511, 5, 107, 0, 0, 511, 104, 1, 0, 0, 0, 512, 513, 5, 98, 0, 0, 513, 514, 5, 111, 0, 0, 514, 515, 5, 116, 0, 0, 515, 516, 5, 107, 0, 0, 516, 106, 1, 0, 0, 0, 517, 518, 5, 112, 0, 0, 518, 519, 5, 105, 0, 0, 519, 520, 5, 110, 0, 0, 520, 521, 5, 118, 0, 0, 521, 108, 1, 0, 0, 0, 522, 523, 5, 115, 0, 0, 523, 524, 5, 117, 0, 0, 524, 525, 5, 109, 0, 0, 525, 110, 1, 0, 0, 0, 526, 527, 5, 109, 0, 0, 527, 528, 5, 101, 0, 0, 528, 529, 5, 97, 0, 0, 529, 530, 5, 110, 0, 0, 530, 112, 1, 0, 0, 0, 531, 532, 5, 115, 0, 0, 532, 533, 5, 116, 0, 0, 533, 534, 5, 100, 0, 0, 534, 114, 1, 0, 0, 0, 535, 536, 5, 118, 0, 0, 536, 537, 5, 97, 0, 0, 537, 538, 5, 114, 0, 0, 538, 116, 1, 0, 0, 0, 539, 540, 5, 113, 0, 0, 540, 541, 5, 117, 0, 0, 541, 542, 5, 97, 0, 0, 542, 543, 5, 114, 0, 0, 543, 544, 5, 116, 0, 0, 544, 545, 5, 105, 0, 0, 545, 546, 5, 108, 0, 0, 546, 555, 5, 101, 0, 0, 547, 548, 5, 113, 0, 0, 548, 549, 5, 117, 0, 0, 549, 550, 5, 97, 0, 0, 550, 551, 5, 114, 0, 0, 551, 552, 5, 116, 0, 0, 552, 553, 5, 105, 0, 0, 553, 555, 5, 108, 0, 0, 554, 539, 1, 0, 0, 0, 554, 547, 1, 0, 0, 0, 555, 118, 1, 0, 0, 0, 556, 557, 5, 112, 0, 0, 557, 558, 5, 101, 0, 0, 558, 559, 5, 114, 0, 0, 559, 560, 5, 99, 0, 0, 560, 561, 5, 101, 0, 0, 561, 562, 5, 110, 0, 0, 562, 563, 5, 116, 0, 0, 563, 564, 5, 105, 0, 0, 564, 565, 5, 108, 0, 0, 565, 572, 5, 101, 0, 0, 566, 567, 5, 112, 0, 0, 567, 568, 5, 114, 0, 0, 568, 569, 5, 99, 0, 0, 569, 570, 5, 110, 0, 0, 570, 572, 5, 116, 0, 0, 571, 556, 1, 0, 0, 0, 571, 566, 1, 0, 0, 0, 572, 120, 1, 0, 0, 0, 573, 574, 5, 113, 0, 0, 574, 575, 5, 117, 0, 0, 575, 576, 5, 97, 0, 0, 576, 577, 5, 110, 0, 0, 577, 578, 5, 116, 0, 0, 578, 579, 5, 105, 0, 0, 579, 580, 5, 108, 0, 0, 580, 581, 5, 101, 0, 0, 581, 122, 1, 0, 0, 0, 582, 583, 5, 100, 0, 0, 583, 584, 5, 111, 0, 0, 584, 585, 5, 116, 0, 0, 585, 124, 1, 0, 0, 0, 586, 587, 5, 109, 0, 0, 587, 588, 5, 111, 0, 0, 588, 589, 5, 109, 0, 0, 589, 590, 5, 101, 0, 0, 590, 591, 5, 110, 0, 0, 591, 592, 5, 116, 0, 0, 592, 126, 1, 0, 0, 0, 593, 594, 5, 99, 0, 0, 594, 595, 5, 111, 0, 0, 595, 596, 5, 115, 0, 0, 596, 597, 5, 115, 0, 0, 597, 598, 5, 105, 0, 0, 598, 599, 5, 109, 0, 0, 599, 128, 1, 0, 0, 0, 600, 601, 5, 102, 0, 0, 601, 602, 5, 108, 0, 0, 602, 603, 5, 105, 0, 0, 603, 604, 5, 112, 0, 0, 604, 130, 1, 0, 0, 0, 605, 606, 5, 99, 0, 0, 606, 607, 5, 111, 0, 0, 607, 608, 5, 118, 0, 0, 608, 132, 1, 0, 0, 0, 609, 610, 5, 115, 0, 0, 610, 611, 5, 111, 0, 0, 611, 612, 5, 114, 0, 0, 612, 613, 5, 116, 0, 0, 613, 134, 1, 0, 0, 0, 614, 615, 5, 43, 0, 0, 615, 136, 1, 0, 0, 0, 616, 617, 5, 45, 0, 0, 617, 138, 1, 0, 0, 0, 618, 619, 5, 42, 0, 0, 619, 140, 1, 0, 0, 0, 620, 621, 5, 47, 0, 0, 621, 142, 1, 0, 0, 0, 622, 623, 5, 37, 0, 0, 623, 144, 1, 0, 0, 0, 624, 625, 5, 94, 0, 0, 625, 146, 1, 0, 0, 0, 626, 627, 5, 62, 0, 0, 627, 628, 5, 61, 0, 0, 628, 148, 1, 0, 0, 0, 629, 630, 5, 62, 0, 0, 630, 150, 1, 0, 0, 0, 631, 632, 5, 60, 0, 0, 632, 633, 5, 61, 0, 0, 633, 152, 1, 0, 0, 0, 634, 635, 5, 60, 0, 0, 635, 154, 1, 0, 0, 0, 636, 637, 5, 61, 0, 0, 637, 638, 5, 61, 0, 0, 638, 156, 1, 0, 0, 0, 639, 640, 5, 33, 0, 0, 640, 641, 5, 61, 0, 0, 641, 158, 1, 0, 0, 0, 642, 643, 5, 124, 0, 0, 643, 160, 1, 0, 0, 0, 644, 645, 5, 40, 0, 0, 645, 162, 1, 0, 0, 0, 646, 647, 5, 41, 0, 0, 647, 164, 1, 0, 0, 0, 648, 649, 5, 44, 0, 0, 649, 166, 1, 0, 0, 0, 650, 651, 5, 59, 0, 0, 651, 168, 1, 0, 0, 0, 652, 653, 5, 45, 0, 0, 653, 654, 5, 62, 0, 0, 654, 170, 1, 0, 0, 0, 655, 656, 5, 91, 0, 0, 656, 172, 1, 0, 0, 0, 657, 658, 5, 93, 0, 0, 658, 174, 1, 0, 0, 0, 659, 660, 5, 112, 0, 0, 660, 665, 5, 105, 0, 0, 661, 662, 5, 80, 0, 0, 662, 665, 5, 73, 0, 0, 663, 665, 7, 0, 0, 0, 664, 659, 1, 0, 0, 0, 664, 661, 1, 0, 0, 0, 664, 663, 1, 0, 0, 0, 665, 176, 1, 0, 0, 0, 666, 668, 7, 1, 0, 0, 667, 666, 1, 0, 0, 0, 668, 669, 1, 0, 0, 0, 669, 667, 1, 0, 0, 0, 669, 670, 1, 0, 0, 0, 670, 677, 1, 0, 0, 0, 671, 673, 5, 46, 0, 0, 672, 674, 7, 1, 0, 0, 673, 672, 1, 0, 0, 0, 674, 675, 1, 0, 0, 0, 675, 673, 1, 0, 0, 0, 675, 676, 1, 0, 0, 0, 676, 678, 1, 0, 0, 0, 677, 671, 1, 0, 0, 0, 677, 678, 1, 0, 0, 0, 678, 178, 1, 0, 0, 0, 679, 683, 7, 2, 0, 0, 680, 682, 7, 3, 0, 0, 681, 680, 1, 0, 0, 0, 682, 685, 1, 0, 0, 0, 683, 681, 1, 0, 0, 0, 683, 684, 1, 0, 0, 0, 684, 180, 1, 0, 0, 0, 685, 683, 1, 0, 0, 0, 686, 688, 7, 4, 0, 0, 687, 686, 1, 0, 0, 0, 688, 689, 1, 0, 0, 0, 689, 687, 1, 0, 0, 0, 689, 690, 1, 0, 0, 0, 690, 691, 1, 0, 0, 0, 691, 692, 6, 90, 0, 0, 692, 182, 1, 0, 0, 0, 14, 0, 375, 451, 468, 486, 499, 554, 571, 664, 669, 675, 677, 683, 689, 1, 6, 0, 0] \ No newline at end of file diff --git a/more_math/Parser/MathExprLexer.py b/more_math/Parser/MathExprLexer.py index 4e57b54..c37c91c 100644 --- a/more_math/Parser/MathExprLexer.py +++ b/more_math/Parser/MathExprLexer.py @@ -10,7 +10,7 @@ else: def serializedATN(): return [ - 4,0,89,684,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, + 4,0,91,693,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, @@ -23,235 +23,238 @@ def serializedATN(): 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,2,83,7,83,2,84,7, - 84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,1,0,1,0,1,0,1,0,1,1,1, - 1,1,1,1,1,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1, - 4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1, - 7,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,10,1,10,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,12,1, - 12,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,15,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,18,1,18,1,18,1, - 19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1, - 21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1,23,1,23,1, - 23,1,24,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,26,1, - 26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,28,1,28,1, - 28,1,28,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1, - 31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1, - 33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,1, - 35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,3,35,372,8,35,1, - 36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1, - 38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,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,41,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,1,43,1,44,1, - 44,1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1, - 45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,3,45,448,8,45,1,46,1, - 46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1, - 46,3,46,465,8,46,1,47,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1, - 48,1,48,1,48,1,48,1,48,1,48,1,48,3,48,483,8,48,1,49,1,49,1,49,1, - 49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,3,49,496,8,49,1,50,1,50,1, - 50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1, - 52,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,55,1,55,1,55,1, - 55,1,55,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1, - 58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,3,58,551, - 8,58,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59, - 1,59,1,59,1,59,3,59,568,8,59,1,60,1,60,1,60,1,60,1,60,1,60,1,60, - 1,60,1,60,1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,62,1,62,1,62, - 1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64,1,64,1,64,1,64,1,65, - 1,65,1,65,1,65,1,66,1,66,1,66,1,66,1,66,1,67,1,67,1,68,1,68,1,69, - 1,69,1,70,1,70,1,71,1,71,1,72,1,72,1,73,1,73,1,73,1,74,1,74,1,75, - 1,75,1,75,1,76,1,76,1,77,1,77,1,77,1,78,1,78,1,78,1,79,1,79,1,80, - 1,80,1,81,1,81,1,82,1,82,1,83,1,83,1,84,1,84,1,85,1,85,1,85,1,85, - 1,85,3,85,656,8,85,1,86,4,86,659,8,86,11,86,12,86,660,1,86,1,86, - 4,86,665,8,86,11,86,12,86,666,3,86,669,8,86,1,87,1,87,5,87,673,8, - 87,10,87,12,87,676,9,87,1,88,4,88,679,8,88,11,88,12,88,680,1,88, - 1,88,0,0,89,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11, - 23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,22, - 45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30,61,31,63,32,65,33, - 67,34,69,35,71,36,73,37,75,38,77,39,79,40,81,41,83,42,85,43,87,44, - 89,45,91,46,93,47,95,48,97,49,99,50,101,51,103,52,105,53,107,54, - 109,55,111,56,113,57,115,58,117,59,119,60,121,61,123,62,125,63,127, - 64,129,65,131,66,133,67,135,68,137,69,139,70,141,71,143,72,145,73, - 147,74,149,75,151,76,153,77,155,78,157,79,159,80,161,81,163,82,165, - 83,167,84,169,85,171,86,173,87,175,88,177,89,1,0,5,2,0,69,69,101, - 101,1,0,48,57,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122, - 3,0,9,10,13,13,32,32,697,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7, - 1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17, - 1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27, - 1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37, - 1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47, - 1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57, - 1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67, - 1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77, - 1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87, - 1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97, - 1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0, - 107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0, - 0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125, - 1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0, - 0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1, - 0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0, - 153,1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0, - 0,0,0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171, - 1,0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,1,179,1,0,0,0, - 3,183,1,0,0,0,5,187,1,0,0,0,7,191,1,0,0,0,9,196,1,0,0,0,11,201,1, - 0,0,0,13,206,1,0,0,0,15,212,1,0,0,0,17,217,1,0,0,0,19,222,1,0,0, - 0,21,227,1,0,0,0,23,233,1,0,0,0,25,239,1,0,0,0,27,245,1,0,0,0,29, - 249,1,0,0,0,31,254,1,0,0,0,33,257,1,0,0,0,35,261,1,0,0,0,37,265, - 1,0,0,0,39,270,1,0,0,0,41,275,1,0,0,0,43,280,1,0,0,0,45,285,1,0, - 0,0,47,291,1,0,0,0,49,297,1,0,0,0,51,303,1,0,0,0,53,308,1,0,0,0, - 55,314,1,0,0,0,57,320,1,0,0,0,59,324,1,0,0,0,61,329,1,0,0,0,63,335, - 1,0,0,0,65,339,1,0,0,0,67,344,1,0,0,0,69,350,1,0,0,0,71,371,1,0, - 0,0,73,373,1,0,0,0,75,378,1,0,0,0,77,383,1,0,0,0,79,394,1,0,0,0, - 81,400,1,0,0,0,83,405,1,0,0,0,85,414,1,0,0,0,87,419,1,0,0,0,89,424, - 1,0,0,0,91,447,1,0,0,0,93,464,1,0,0,0,95,466,1,0,0,0,97,482,1,0, - 0,0,99,495,1,0,0,0,101,497,1,0,0,0,103,503,1,0,0,0,105,508,1,0,0, - 0,107,513,1,0,0,0,109,518,1,0,0,0,111,522,1,0,0,0,113,527,1,0,0, - 0,115,531,1,0,0,0,117,550,1,0,0,0,119,567,1,0,0,0,121,569,1,0,0, - 0,123,578,1,0,0,0,125,582,1,0,0,0,127,589,1,0,0,0,129,596,1,0,0, - 0,131,601,1,0,0,0,133,605,1,0,0,0,135,610,1,0,0,0,137,612,1,0,0, - 0,139,614,1,0,0,0,141,616,1,0,0,0,143,618,1,0,0,0,145,620,1,0,0, - 0,147,622,1,0,0,0,149,625,1,0,0,0,151,627,1,0,0,0,153,630,1,0,0, - 0,155,632,1,0,0,0,157,635,1,0,0,0,159,638,1,0,0,0,161,640,1,0,0, - 0,163,642,1,0,0,0,165,644,1,0,0,0,167,646,1,0,0,0,169,648,1,0,0, - 0,171,655,1,0,0,0,173,658,1,0,0,0,175,670,1,0,0,0,177,678,1,0,0, - 0,179,180,5,115,0,0,180,181,5,105,0,0,181,182,5,110,0,0,182,2,1, - 0,0,0,183,184,5,99,0,0,184,185,5,111,0,0,185,186,5,115,0,0,186,4, - 1,0,0,0,187,188,5,116,0,0,188,189,5,97,0,0,189,190,5,110,0,0,190, - 6,1,0,0,0,191,192,5,97,0,0,192,193,5,115,0,0,193,194,5,105,0,0,194, - 195,5,110,0,0,195,8,1,0,0,0,196,197,5,97,0,0,197,198,5,99,0,0,198, - 199,5,111,0,0,199,200,5,115,0,0,200,10,1,0,0,0,201,202,5,97,0,0, - 202,203,5,116,0,0,203,204,5,97,0,0,204,205,5,110,0,0,205,12,1,0, - 0,0,206,207,5,97,0,0,207,208,5,116,0,0,208,209,5,97,0,0,209,210, - 5,110,0,0,210,211,5,50,0,0,211,14,1,0,0,0,212,213,5,115,0,0,213, - 214,5,105,0,0,214,215,5,110,0,0,215,216,5,104,0,0,216,16,1,0,0,0, - 217,218,5,99,0,0,218,219,5,111,0,0,219,220,5,115,0,0,220,221,5,104, - 0,0,221,18,1,0,0,0,222,223,5,116,0,0,223,224,5,97,0,0,224,225,5, - 110,0,0,225,226,5,104,0,0,226,20,1,0,0,0,227,228,5,97,0,0,228,229, - 5,115,0,0,229,230,5,105,0,0,230,231,5,110,0,0,231,232,5,104,0,0, - 232,22,1,0,0,0,233,234,5,97,0,0,234,235,5,99,0,0,235,236,5,111,0, - 0,236,237,5,115,0,0,237,238,5,104,0,0,238,24,1,0,0,0,239,240,5,97, - 0,0,240,241,5,116,0,0,241,242,5,97,0,0,242,243,5,110,0,0,243,244, - 5,104,0,0,244,26,1,0,0,0,245,246,5,97,0,0,246,247,5,98,0,0,247,248, - 5,115,0,0,248,28,1,0,0,0,249,250,5,115,0,0,250,251,5,113,0,0,251, - 252,5,114,0,0,252,253,5,116,0,0,253,30,1,0,0,0,254,255,5,108,0,0, - 255,256,5,110,0,0,256,32,1,0,0,0,257,258,5,108,0,0,258,259,5,111, - 0,0,259,260,5,103,0,0,260,34,1,0,0,0,261,262,5,101,0,0,262,263,5, - 120,0,0,263,264,5,112,0,0,264,36,1,0,0,0,265,266,5,115,0,0,266,267, - 5,109,0,0,267,268,5,105,0,0,268,269,5,110,0,0,269,38,1,0,0,0,270, - 271,5,115,0,0,271,272,5,109,0,0,272,273,5,97,0,0,273,274,5,120,0, - 0,274,40,1,0,0,0,275,276,5,116,0,0,276,277,5,109,0,0,277,278,5,105, - 0,0,278,279,5,110,0,0,279,42,1,0,0,0,280,281,5,116,0,0,281,282,5, - 109,0,0,282,283,5,97,0,0,283,284,5,120,0,0,284,44,1,0,0,0,285,286, - 5,116,0,0,286,287,5,110,0,0,287,288,5,111,0,0,288,289,5,114,0,0, - 289,290,5,109,0,0,290,46,1,0,0,0,291,292,5,115,0,0,292,293,5,110, - 0,0,293,294,5,111,0,0,294,295,5,114,0,0,295,296,5,109,0,0,296,48, - 1,0,0,0,297,298,5,102,0,0,298,299,5,108,0,0,299,300,5,111,0,0,300, - 301,5,111,0,0,301,302,5,114,0,0,302,50,1,0,0,0,303,304,5,99,0,0, - 304,305,5,101,0,0,305,306,5,105,0,0,306,307,5,108,0,0,307,52,1,0, - 0,0,308,309,5,114,0,0,309,310,5,111,0,0,310,311,5,117,0,0,311,312, - 5,110,0,0,312,313,5,100,0,0,313,54,1,0,0,0,314,315,5,103,0,0,315, - 316,5,97,0,0,316,317,5,109,0,0,317,318,5,109,0,0,318,319,5,97,0, - 0,319,56,1,0,0,0,320,321,5,112,0,0,321,322,5,111,0,0,322,323,5,119, - 0,0,323,58,1,0,0,0,324,325,5,115,0,0,325,326,5,105,0,0,326,327,5, - 103,0,0,327,328,5,109,0,0,328,60,1,0,0,0,329,330,5,99,0,0,330,331, - 5,108,0,0,331,332,5,97,0,0,332,333,5,109,0,0,333,334,5,112,0,0,334, - 62,1,0,0,0,335,336,5,102,0,0,336,337,5,102,0,0,337,338,5,116,0,0, - 338,64,1,0,0,0,339,340,5,105,0,0,340,341,5,102,0,0,341,342,5,102, - 0,0,342,343,5,116,0,0,343,66,1,0,0,0,344,345,5,97,0,0,345,346,5, - 110,0,0,346,347,5,103,0,0,347,348,5,108,0,0,348,349,5,101,0,0,349, - 68,1,0,0,0,350,351,5,112,0,0,351,352,5,114,0,0,352,353,5,105,0,0, - 353,354,5,110,0,0,354,355,5,116,0,0,355,70,1,0,0,0,356,357,5,112, - 0,0,357,358,5,114,0,0,358,359,5,105,0,0,359,360,5,110,0,0,360,361, - 5,116,0,0,361,362,5,95,0,0,362,363,5,115,0,0,363,364,5,104,0,0,364, - 365,5,97,0,0,365,366,5,112,0,0,366,372,5,101,0,0,367,368,5,112,0, - 0,368,369,5,115,0,0,369,370,5,104,0,0,370,372,5,112,0,0,371,356, - 1,0,0,0,371,367,1,0,0,0,372,72,1,0,0,0,373,374,5,108,0,0,374,375, - 5,101,0,0,375,376,5,114,0,0,376,377,5,112,0,0,377,74,1,0,0,0,378, - 379,5,115,0,0,379,380,5,116,0,0,380,381,5,101,0,0,381,382,5,112, - 0,0,382,76,1,0,0,0,383,384,5,115,0,0,384,385,5,109,0,0,385,386,5, - 111,0,0,386,387,5,111,0,0,387,388,5,116,0,0,388,389,5,104,0,0,389, - 390,5,115,0,0,390,391,5,116,0,0,391,392,5,101,0,0,392,393,5,112, - 0,0,393,78,1,0,0,0,394,395,5,102,0,0,395,396,5,114,0,0,396,397,5, - 97,0,0,397,398,5,99,0,0,398,399,5,116,0,0,399,80,1,0,0,0,400,401, - 5,114,0,0,401,402,5,101,0,0,402,403,5,108,0,0,403,404,5,117,0,0, - 404,82,1,0,0,0,405,406,5,115,0,0,406,407,5,111,0,0,407,408,5,102, - 0,0,408,409,5,116,0,0,409,410,5,112,0,0,410,411,5,108,0,0,411,412, - 5,117,0,0,412,413,5,115,0,0,413,84,1,0,0,0,414,415,5,103,0,0,415, - 416,5,101,0,0,416,417,5,108,0,0,417,418,5,117,0,0,418,86,1,0,0,0, - 419,420,5,115,0,0,420,421,5,105,0,0,421,422,5,103,0,0,422,423,5, - 110,0,0,423,88,1,0,0,0,424,425,5,109,0,0,425,426,5,97,0,0,426,427, - 5,112,0,0,427,90,1,0,0,0,428,429,5,101,0,0,429,430,5,122,0,0,430, - 431,5,99,0,0,431,432,5,111,0,0,432,433,5,110,0,0,433,434,5,118,0, - 0,434,435,5,111,0,0,435,436,5,108,0,0,436,437,5,117,0,0,437,438, - 5,116,0,0,438,439,5,105,0,0,439,440,5,111,0,0,440,448,5,110,0,0, - 441,442,5,101,0,0,442,443,5,122,0,0,443,444,5,99,0,0,444,445,5,111, - 0,0,445,446,5,110,0,0,446,448,5,118,0,0,447,428,1,0,0,0,447,441, - 1,0,0,0,448,92,1,0,0,0,449,450,5,99,0,0,450,451,5,111,0,0,451,452, - 5,110,0,0,452,453,5,118,0,0,453,454,5,111,0,0,454,455,5,108,0,0, - 455,456,5,117,0,0,456,457,5,116,0,0,457,458,5,105,0,0,458,459,5, - 111,0,0,459,465,5,110,0,0,460,461,5,99,0,0,461,462,5,111,0,0,462, - 463,5,110,0,0,463,465,5,118,0,0,464,449,1,0,0,0,464,460,1,0,0,0, - 465,94,1,0,0,0,466,467,5,115,0,0,467,468,5,119,0,0,468,469,5,97, - 0,0,469,470,5,112,0,0,470,96,1,0,0,0,471,472,5,112,0,0,472,473,5, - 101,0,0,473,474,5,114,0,0,474,475,5,109,0,0,475,476,5,117,0,0,476, - 477,5,116,0,0,477,483,5,101,0,0,478,479,5,112,0,0,479,480,5,101, - 0,0,480,481,5,114,0,0,481,483,5,109,0,0,482,471,1,0,0,0,482,478, - 1,0,0,0,483,98,1,0,0,0,484,485,5,114,0,0,485,486,5,101,0,0,486,487, - 5,115,0,0,487,488,5,104,0,0,488,489,5,97,0,0,489,490,5,112,0,0,490, - 496,5,101,0,0,491,492,5,114,0,0,492,493,5,115,0,0,493,494,5,104, - 0,0,494,496,5,112,0,0,495,484,1,0,0,0,495,491,1,0,0,0,496,100,1, - 0,0,0,497,498,5,114,0,0,498,499,5,97,0,0,499,500,5,110,0,0,500,501, - 5,103,0,0,501,502,5,101,0,0,502,102,1,0,0,0,503,504,5,116,0,0,504, - 505,5,111,0,0,505,506,5,112,0,0,506,507,5,107,0,0,507,104,1,0,0, - 0,508,509,5,98,0,0,509,510,5,111,0,0,510,511,5,116,0,0,511,512,5, - 107,0,0,512,106,1,0,0,0,513,514,5,112,0,0,514,515,5,105,0,0,515, - 516,5,110,0,0,516,517,5,118,0,0,517,108,1,0,0,0,518,519,5,115,0, - 0,519,520,5,117,0,0,520,521,5,109,0,0,521,110,1,0,0,0,522,523,5, - 109,0,0,523,524,5,101,0,0,524,525,5,97,0,0,525,526,5,110,0,0,526, - 112,1,0,0,0,527,528,5,115,0,0,528,529,5,116,0,0,529,530,5,100,0, - 0,530,114,1,0,0,0,531,532,5,118,0,0,532,533,5,97,0,0,533,534,5,114, - 0,0,534,116,1,0,0,0,535,536,5,113,0,0,536,537,5,117,0,0,537,538, - 5,97,0,0,538,539,5,114,0,0,539,540,5,116,0,0,540,541,5,105,0,0,541, - 542,5,108,0,0,542,551,5,101,0,0,543,544,5,113,0,0,544,545,5,117, - 0,0,545,546,5,97,0,0,546,547,5,114,0,0,547,548,5,116,0,0,548,549, - 5,105,0,0,549,551,5,108,0,0,550,535,1,0,0,0,550,543,1,0,0,0,551, - 118,1,0,0,0,552,553,5,112,0,0,553,554,5,101,0,0,554,555,5,114,0, - 0,555,556,5,99,0,0,556,557,5,101,0,0,557,558,5,110,0,0,558,559,5, - 116,0,0,559,560,5,105,0,0,560,561,5,108,0,0,561,568,5,101,0,0,562, - 563,5,112,0,0,563,564,5,114,0,0,564,565,5,99,0,0,565,566,5,110,0, - 0,566,568,5,116,0,0,567,552,1,0,0,0,567,562,1,0,0,0,568,120,1,0, - 0,0,569,570,5,113,0,0,570,571,5,117,0,0,571,572,5,97,0,0,572,573, - 5,110,0,0,573,574,5,116,0,0,574,575,5,105,0,0,575,576,5,108,0,0, - 576,577,5,101,0,0,577,122,1,0,0,0,578,579,5,100,0,0,579,580,5,111, - 0,0,580,581,5,116,0,0,581,124,1,0,0,0,582,583,5,109,0,0,583,584, - 5,111,0,0,584,585,5,109,0,0,585,586,5,101,0,0,586,587,5,110,0,0, - 587,588,5,116,0,0,588,126,1,0,0,0,589,590,5,99,0,0,590,591,5,111, - 0,0,591,592,5,115,0,0,592,593,5,115,0,0,593,594,5,105,0,0,594,595, - 5,109,0,0,595,128,1,0,0,0,596,597,5,102,0,0,597,598,5,108,0,0,598, - 599,5,105,0,0,599,600,5,112,0,0,600,130,1,0,0,0,601,602,5,99,0,0, - 602,603,5,111,0,0,603,604,5,118,0,0,604,132,1,0,0,0,605,606,5,115, - 0,0,606,607,5,111,0,0,607,608,5,114,0,0,608,609,5,116,0,0,609,134, - 1,0,0,0,610,611,5,43,0,0,611,136,1,0,0,0,612,613,5,45,0,0,613,138, - 1,0,0,0,614,615,5,42,0,0,615,140,1,0,0,0,616,617,5,47,0,0,617,142, - 1,0,0,0,618,619,5,37,0,0,619,144,1,0,0,0,620,621,5,94,0,0,621,146, - 1,0,0,0,622,623,5,62,0,0,623,624,5,61,0,0,624,148,1,0,0,0,625,626, - 5,62,0,0,626,150,1,0,0,0,627,628,5,60,0,0,628,629,5,61,0,0,629,152, - 1,0,0,0,630,631,5,60,0,0,631,154,1,0,0,0,632,633,5,61,0,0,633,634, - 5,61,0,0,634,156,1,0,0,0,635,636,5,33,0,0,636,637,5,61,0,0,637,158, - 1,0,0,0,638,639,5,124,0,0,639,160,1,0,0,0,640,641,5,40,0,0,641,162, - 1,0,0,0,642,643,5,41,0,0,643,164,1,0,0,0,644,645,5,44,0,0,645,166, - 1,0,0,0,646,647,5,91,0,0,647,168,1,0,0,0,648,649,5,93,0,0,649,170, - 1,0,0,0,650,651,5,112,0,0,651,656,5,105,0,0,652,653,5,80,0,0,653, - 656,5,73,0,0,654,656,7,0,0,0,655,650,1,0,0,0,655,652,1,0,0,0,655, - 654,1,0,0,0,656,172,1,0,0,0,657,659,7,1,0,0,658,657,1,0,0,0,659, - 660,1,0,0,0,660,658,1,0,0,0,660,661,1,0,0,0,661,668,1,0,0,0,662, - 664,5,46,0,0,663,665,7,1,0,0,664,663,1,0,0,0,665,666,1,0,0,0,666, - 664,1,0,0,0,666,667,1,0,0,0,667,669,1,0,0,0,668,662,1,0,0,0,668, - 669,1,0,0,0,669,174,1,0,0,0,670,674,7,2,0,0,671,673,7,3,0,0,672, - 671,1,0,0,0,673,676,1,0,0,0,674,672,1,0,0,0,674,675,1,0,0,0,675, - 176,1,0,0,0,676,674,1,0,0,0,677,679,7,4,0,0,678,677,1,0,0,0,679, - 680,1,0,0,0,680,678,1,0,0,0,680,681,1,0,0,0,681,682,1,0,0,0,682, - 683,6,88,0,0,683,178,1,0,0,0,14,0,371,447,464,482,495,550,567,655, - 660,666,668,674,680,1,6,0,0 + 84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88,2,89,7,89,2,90,7,90,1, + 0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,3,1, + 3,1,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1, + 6,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1, + 10,1,10,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,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1, + 14,1,15,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,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1, + 20,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1, + 23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1, + 25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1, + 27,1,27,1,28,1,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1, + 30,1,30,1,30,1,30,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1, + 33,1,33,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,34,1,34,1,35,1, + 35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1,35,1, + 35,3,35,376,8,35,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1, + 37,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,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,41,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,1,43,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,45,1, + 45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,1,45,3, + 45,452,8,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1, + 46,1,46,1,46,1,46,1,46,3,46,469,8,46,1,47,1,47,1,47,1,47,1,47,1, + 48,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,48,1,48,3,48,487,8, + 48,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,49,3,49,500, + 8,49,1,50,1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,52, + 1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54, + 1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57, + 1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58,1,58, + 1,58,1,58,3,58,555,8,58,1,59,1,59,1,59,1,59,1,59,1,59,1,59,1,59, + 1,59,1,59,1,59,1,59,1,59,1,59,1,59,3,59,572,8,59,1,60,1,60,1,60, + 1,60,1,60,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,62,1,62,1,62, + 1,62,1,62,1,62,1,62,1,63,1,63,1,63,1,63,1,63,1,63,1,63,1,64,1,64, + 1,64,1,64,1,64,1,65,1,65,1,65,1,65,1,66,1,66,1,66,1,66,1,66,1,67, + 1,67,1,68,1,68,1,69,1,69,1,70,1,70,1,71,1,71,1,72,1,72,1,73,1,73, + 1,73,1,74,1,74,1,75,1,75,1,75,1,76,1,76,1,77,1,77,1,77,1,78,1,78, + 1,78,1,79,1,79,1,80,1,80,1,81,1,81,1,82,1,82,1,83,1,83,1,84,1,84, + 1,84,1,85,1,85,1,86,1,86,1,87,1,87,1,87,1,87,1,87,3,87,665,8,87, + 1,88,4,88,668,8,88,11,88,12,88,669,1,88,1,88,4,88,674,8,88,11,88, + 12,88,675,3,88,678,8,88,1,89,1,89,5,89,682,8,89,10,89,12,89,685, + 9,89,1,90,4,90,688,8,90,11,90,12,90,689,1,90,1,90,0,0,91,1,1,3,2, + 5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29, + 15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51, + 26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73, + 37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95, + 48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113,57, + 115,58,117,59,119,60,121,61,123,62,125,63,127,64,129,65,131,66,133, + 67,135,68,137,69,139,70,141,71,143,72,145,73,147,74,149,75,151,76, + 153,77,155,78,157,79,159,80,161,81,163,82,165,83,167,84,169,85,171, + 86,173,87,175,88,177,89,179,90,181,91,1,0,5,2,0,69,69,101,101,1, + 0,48,57,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,3,0, + 9,10,13,13,32,32,706,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0, + 0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0, + 0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0, + 0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0, + 0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0, + 0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0, + 0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0, + 0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0, + 0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0, + 0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0, + 0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107, + 1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0, + 0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125,1, + 0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0,0, + 135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0, + 0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153, + 1,0,0,0,0,155,1,0,0,0,0,157,1,0,0,0,0,159,1,0,0,0,0,161,1,0,0,0, + 0,163,1,0,0,0,0,165,1,0,0,0,0,167,1,0,0,0,0,169,1,0,0,0,0,171,1, + 0,0,0,0,173,1,0,0,0,0,175,1,0,0,0,0,177,1,0,0,0,0,179,1,0,0,0,0, + 181,1,0,0,0,1,183,1,0,0,0,3,187,1,0,0,0,5,191,1,0,0,0,7,195,1,0, + 0,0,9,200,1,0,0,0,11,205,1,0,0,0,13,210,1,0,0,0,15,216,1,0,0,0,17, + 221,1,0,0,0,19,226,1,0,0,0,21,231,1,0,0,0,23,237,1,0,0,0,25,243, + 1,0,0,0,27,249,1,0,0,0,29,253,1,0,0,0,31,258,1,0,0,0,33,261,1,0, + 0,0,35,265,1,0,0,0,37,269,1,0,0,0,39,274,1,0,0,0,41,279,1,0,0,0, + 43,284,1,0,0,0,45,289,1,0,0,0,47,295,1,0,0,0,49,301,1,0,0,0,51,307, + 1,0,0,0,53,312,1,0,0,0,55,318,1,0,0,0,57,324,1,0,0,0,59,328,1,0, + 0,0,61,333,1,0,0,0,63,339,1,0,0,0,65,343,1,0,0,0,67,348,1,0,0,0, + 69,354,1,0,0,0,71,375,1,0,0,0,73,377,1,0,0,0,75,382,1,0,0,0,77,387, + 1,0,0,0,79,398,1,0,0,0,81,404,1,0,0,0,83,409,1,0,0,0,85,418,1,0, + 0,0,87,423,1,0,0,0,89,428,1,0,0,0,91,451,1,0,0,0,93,468,1,0,0,0, + 95,470,1,0,0,0,97,486,1,0,0,0,99,499,1,0,0,0,101,501,1,0,0,0,103, + 507,1,0,0,0,105,512,1,0,0,0,107,517,1,0,0,0,109,522,1,0,0,0,111, + 526,1,0,0,0,113,531,1,0,0,0,115,535,1,0,0,0,117,554,1,0,0,0,119, + 571,1,0,0,0,121,573,1,0,0,0,123,582,1,0,0,0,125,586,1,0,0,0,127, + 593,1,0,0,0,129,600,1,0,0,0,131,605,1,0,0,0,133,609,1,0,0,0,135, + 614,1,0,0,0,137,616,1,0,0,0,139,618,1,0,0,0,141,620,1,0,0,0,143, + 622,1,0,0,0,145,624,1,0,0,0,147,626,1,0,0,0,149,629,1,0,0,0,151, + 631,1,0,0,0,153,634,1,0,0,0,155,636,1,0,0,0,157,639,1,0,0,0,159, + 642,1,0,0,0,161,644,1,0,0,0,163,646,1,0,0,0,165,648,1,0,0,0,167, + 650,1,0,0,0,169,652,1,0,0,0,171,655,1,0,0,0,173,657,1,0,0,0,175, + 664,1,0,0,0,177,667,1,0,0,0,179,679,1,0,0,0,181,687,1,0,0,0,183, + 184,5,115,0,0,184,185,5,105,0,0,185,186,5,110,0,0,186,2,1,0,0,0, + 187,188,5,99,0,0,188,189,5,111,0,0,189,190,5,115,0,0,190,4,1,0,0, + 0,191,192,5,116,0,0,192,193,5,97,0,0,193,194,5,110,0,0,194,6,1,0, + 0,0,195,196,5,97,0,0,196,197,5,115,0,0,197,198,5,105,0,0,198,199, + 5,110,0,0,199,8,1,0,0,0,200,201,5,97,0,0,201,202,5,99,0,0,202,203, + 5,111,0,0,203,204,5,115,0,0,204,10,1,0,0,0,205,206,5,97,0,0,206, + 207,5,116,0,0,207,208,5,97,0,0,208,209,5,110,0,0,209,12,1,0,0,0, + 210,211,5,97,0,0,211,212,5,116,0,0,212,213,5,97,0,0,213,214,5,110, + 0,0,214,215,5,50,0,0,215,14,1,0,0,0,216,217,5,115,0,0,217,218,5, + 105,0,0,218,219,5,110,0,0,219,220,5,104,0,0,220,16,1,0,0,0,221,222, + 5,99,0,0,222,223,5,111,0,0,223,224,5,115,0,0,224,225,5,104,0,0,225, + 18,1,0,0,0,226,227,5,116,0,0,227,228,5,97,0,0,228,229,5,110,0,0, + 229,230,5,104,0,0,230,20,1,0,0,0,231,232,5,97,0,0,232,233,5,115, + 0,0,233,234,5,105,0,0,234,235,5,110,0,0,235,236,5,104,0,0,236,22, + 1,0,0,0,237,238,5,97,0,0,238,239,5,99,0,0,239,240,5,111,0,0,240, + 241,5,115,0,0,241,242,5,104,0,0,242,24,1,0,0,0,243,244,5,97,0,0, + 244,245,5,116,0,0,245,246,5,97,0,0,246,247,5,110,0,0,247,248,5,104, + 0,0,248,26,1,0,0,0,249,250,5,97,0,0,250,251,5,98,0,0,251,252,5,115, + 0,0,252,28,1,0,0,0,253,254,5,115,0,0,254,255,5,113,0,0,255,256,5, + 114,0,0,256,257,5,116,0,0,257,30,1,0,0,0,258,259,5,108,0,0,259,260, + 5,110,0,0,260,32,1,0,0,0,261,262,5,108,0,0,262,263,5,111,0,0,263, + 264,5,103,0,0,264,34,1,0,0,0,265,266,5,101,0,0,266,267,5,120,0,0, + 267,268,5,112,0,0,268,36,1,0,0,0,269,270,5,115,0,0,270,271,5,109, + 0,0,271,272,5,105,0,0,272,273,5,110,0,0,273,38,1,0,0,0,274,275,5, + 115,0,0,275,276,5,109,0,0,276,277,5,97,0,0,277,278,5,120,0,0,278, + 40,1,0,0,0,279,280,5,116,0,0,280,281,5,109,0,0,281,282,5,105,0,0, + 282,283,5,110,0,0,283,42,1,0,0,0,284,285,5,116,0,0,285,286,5,109, + 0,0,286,287,5,97,0,0,287,288,5,120,0,0,288,44,1,0,0,0,289,290,5, + 116,0,0,290,291,5,110,0,0,291,292,5,111,0,0,292,293,5,114,0,0,293, + 294,5,109,0,0,294,46,1,0,0,0,295,296,5,115,0,0,296,297,5,110,0,0, + 297,298,5,111,0,0,298,299,5,114,0,0,299,300,5,109,0,0,300,48,1,0, + 0,0,301,302,5,102,0,0,302,303,5,108,0,0,303,304,5,111,0,0,304,305, + 5,111,0,0,305,306,5,114,0,0,306,50,1,0,0,0,307,308,5,99,0,0,308, + 309,5,101,0,0,309,310,5,105,0,0,310,311,5,108,0,0,311,52,1,0,0,0, + 312,313,5,114,0,0,313,314,5,111,0,0,314,315,5,117,0,0,315,316,5, + 110,0,0,316,317,5,100,0,0,317,54,1,0,0,0,318,319,5,103,0,0,319,320, + 5,97,0,0,320,321,5,109,0,0,321,322,5,109,0,0,322,323,5,97,0,0,323, + 56,1,0,0,0,324,325,5,112,0,0,325,326,5,111,0,0,326,327,5,119,0,0, + 327,58,1,0,0,0,328,329,5,115,0,0,329,330,5,105,0,0,330,331,5,103, + 0,0,331,332,5,109,0,0,332,60,1,0,0,0,333,334,5,99,0,0,334,335,5, + 108,0,0,335,336,5,97,0,0,336,337,5,109,0,0,337,338,5,112,0,0,338, + 62,1,0,0,0,339,340,5,102,0,0,340,341,5,102,0,0,341,342,5,116,0,0, + 342,64,1,0,0,0,343,344,5,105,0,0,344,345,5,102,0,0,345,346,5,102, + 0,0,346,347,5,116,0,0,347,66,1,0,0,0,348,349,5,97,0,0,349,350,5, + 110,0,0,350,351,5,103,0,0,351,352,5,108,0,0,352,353,5,101,0,0,353, + 68,1,0,0,0,354,355,5,112,0,0,355,356,5,114,0,0,356,357,5,105,0,0, + 357,358,5,110,0,0,358,359,5,116,0,0,359,70,1,0,0,0,360,361,5,112, + 0,0,361,362,5,114,0,0,362,363,5,105,0,0,363,364,5,110,0,0,364,365, + 5,116,0,0,365,366,5,95,0,0,366,367,5,115,0,0,367,368,5,104,0,0,368, + 369,5,97,0,0,369,370,5,112,0,0,370,376,5,101,0,0,371,372,5,112,0, + 0,372,373,5,115,0,0,373,374,5,104,0,0,374,376,5,112,0,0,375,360, + 1,0,0,0,375,371,1,0,0,0,376,72,1,0,0,0,377,378,5,108,0,0,378,379, + 5,101,0,0,379,380,5,114,0,0,380,381,5,112,0,0,381,74,1,0,0,0,382, + 383,5,115,0,0,383,384,5,116,0,0,384,385,5,101,0,0,385,386,5,112, + 0,0,386,76,1,0,0,0,387,388,5,115,0,0,388,389,5,109,0,0,389,390,5, + 111,0,0,390,391,5,111,0,0,391,392,5,116,0,0,392,393,5,104,0,0,393, + 394,5,115,0,0,394,395,5,116,0,0,395,396,5,101,0,0,396,397,5,112, + 0,0,397,78,1,0,0,0,398,399,5,102,0,0,399,400,5,114,0,0,400,401,5, + 97,0,0,401,402,5,99,0,0,402,403,5,116,0,0,403,80,1,0,0,0,404,405, + 5,114,0,0,405,406,5,101,0,0,406,407,5,108,0,0,407,408,5,117,0,0, + 408,82,1,0,0,0,409,410,5,115,0,0,410,411,5,111,0,0,411,412,5,102, + 0,0,412,413,5,116,0,0,413,414,5,112,0,0,414,415,5,108,0,0,415,416, + 5,117,0,0,416,417,5,115,0,0,417,84,1,0,0,0,418,419,5,103,0,0,419, + 420,5,101,0,0,420,421,5,108,0,0,421,422,5,117,0,0,422,86,1,0,0,0, + 423,424,5,115,0,0,424,425,5,105,0,0,425,426,5,103,0,0,426,427,5, + 110,0,0,427,88,1,0,0,0,428,429,5,109,0,0,429,430,5,97,0,0,430,431, + 5,112,0,0,431,90,1,0,0,0,432,433,5,101,0,0,433,434,5,122,0,0,434, + 435,5,99,0,0,435,436,5,111,0,0,436,437,5,110,0,0,437,438,5,118,0, + 0,438,439,5,111,0,0,439,440,5,108,0,0,440,441,5,117,0,0,441,442, + 5,116,0,0,442,443,5,105,0,0,443,444,5,111,0,0,444,452,5,110,0,0, + 445,446,5,101,0,0,446,447,5,122,0,0,447,448,5,99,0,0,448,449,5,111, + 0,0,449,450,5,110,0,0,450,452,5,118,0,0,451,432,1,0,0,0,451,445, + 1,0,0,0,452,92,1,0,0,0,453,454,5,99,0,0,454,455,5,111,0,0,455,456, + 5,110,0,0,456,457,5,118,0,0,457,458,5,111,0,0,458,459,5,108,0,0, + 459,460,5,117,0,0,460,461,5,116,0,0,461,462,5,105,0,0,462,463,5, + 111,0,0,463,469,5,110,0,0,464,465,5,99,0,0,465,466,5,111,0,0,466, + 467,5,110,0,0,467,469,5,118,0,0,468,453,1,0,0,0,468,464,1,0,0,0, + 469,94,1,0,0,0,470,471,5,115,0,0,471,472,5,119,0,0,472,473,5,97, + 0,0,473,474,5,112,0,0,474,96,1,0,0,0,475,476,5,112,0,0,476,477,5, + 101,0,0,477,478,5,114,0,0,478,479,5,109,0,0,479,480,5,117,0,0,480, + 481,5,116,0,0,481,487,5,101,0,0,482,483,5,112,0,0,483,484,5,101, + 0,0,484,485,5,114,0,0,485,487,5,109,0,0,486,475,1,0,0,0,486,482, + 1,0,0,0,487,98,1,0,0,0,488,489,5,114,0,0,489,490,5,101,0,0,490,491, + 5,115,0,0,491,492,5,104,0,0,492,493,5,97,0,0,493,494,5,112,0,0,494, + 500,5,101,0,0,495,496,5,114,0,0,496,497,5,115,0,0,497,498,5,104, + 0,0,498,500,5,112,0,0,499,488,1,0,0,0,499,495,1,0,0,0,500,100,1, + 0,0,0,501,502,5,114,0,0,502,503,5,97,0,0,503,504,5,110,0,0,504,505, + 5,103,0,0,505,506,5,101,0,0,506,102,1,0,0,0,507,508,5,116,0,0,508, + 509,5,111,0,0,509,510,5,112,0,0,510,511,5,107,0,0,511,104,1,0,0, + 0,512,513,5,98,0,0,513,514,5,111,0,0,514,515,5,116,0,0,515,516,5, + 107,0,0,516,106,1,0,0,0,517,518,5,112,0,0,518,519,5,105,0,0,519, + 520,5,110,0,0,520,521,5,118,0,0,521,108,1,0,0,0,522,523,5,115,0, + 0,523,524,5,117,0,0,524,525,5,109,0,0,525,110,1,0,0,0,526,527,5, + 109,0,0,527,528,5,101,0,0,528,529,5,97,0,0,529,530,5,110,0,0,530, + 112,1,0,0,0,531,532,5,115,0,0,532,533,5,116,0,0,533,534,5,100,0, + 0,534,114,1,0,0,0,535,536,5,118,0,0,536,537,5,97,0,0,537,538,5,114, + 0,0,538,116,1,0,0,0,539,540,5,113,0,0,540,541,5,117,0,0,541,542, + 5,97,0,0,542,543,5,114,0,0,543,544,5,116,0,0,544,545,5,105,0,0,545, + 546,5,108,0,0,546,555,5,101,0,0,547,548,5,113,0,0,548,549,5,117, + 0,0,549,550,5,97,0,0,550,551,5,114,0,0,551,552,5,116,0,0,552,553, + 5,105,0,0,553,555,5,108,0,0,554,539,1,0,0,0,554,547,1,0,0,0,555, + 118,1,0,0,0,556,557,5,112,0,0,557,558,5,101,0,0,558,559,5,114,0, + 0,559,560,5,99,0,0,560,561,5,101,0,0,561,562,5,110,0,0,562,563,5, + 116,0,0,563,564,5,105,0,0,564,565,5,108,0,0,565,572,5,101,0,0,566, + 567,5,112,0,0,567,568,5,114,0,0,568,569,5,99,0,0,569,570,5,110,0, + 0,570,572,5,116,0,0,571,556,1,0,0,0,571,566,1,0,0,0,572,120,1,0, + 0,0,573,574,5,113,0,0,574,575,5,117,0,0,575,576,5,97,0,0,576,577, + 5,110,0,0,577,578,5,116,0,0,578,579,5,105,0,0,579,580,5,108,0,0, + 580,581,5,101,0,0,581,122,1,0,0,0,582,583,5,100,0,0,583,584,5,111, + 0,0,584,585,5,116,0,0,585,124,1,0,0,0,586,587,5,109,0,0,587,588, + 5,111,0,0,588,589,5,109,0,0,589,590,5,101,0,0,590,591,5,110,0,0, + 591,592,5,116,0,0,592,126,1,0,0,0,593,594,5,99,0,0,594,595,5,111, + 0,0,595,596,5,115,0,0,596,597,5,115,0,0,597,598,5,105,0,0,598,599, + 5,109,0,0,599,128,1,0,0,0,600,601,5,102,0,0,601,602,5,108,0,0,602, + 603,5,105,0,0,603,604,5,112,0,0,604,130,1,0,0,0,605,606,5,99,0,0, + 606,607,5,111,0,0,607,608,5,118,0,0,608,132,1,0,0,0,609,610,5,115, + 0,0,610,611,5,111,0,0,611,612,5,114,0,0,612,613,5,116,0,0,613,134, + 1,0,0,0,614,615,5,43,0,0,615,136,1,0,0,0,616,617,5,45,0,0,617,138, + 1,0,0,0,618,619,5,42,0,0,619,140,1,0,0,0,620,621,5,47,0,0,621,142, + 1,0,0,0,622,623,5,37,0,0,623,144,1,0,0,0,624,625,5,94,0,0,625,146, + 1,0,0,0,626,627,5,62,0,0,627,628,5,61,0,0,628,148,1,0,0,0,629,630, + 5,62,0,0,630,150,1,0,0,0,631,632,5,60,0,0,632,633,5,61,0,0,633,152, + 1,0,0,0,634,635,5,60,0,0,635,154,1,0,0,0,636,637,5,61,0,0,637,638, + 5,61,0,0,638,156,1,0,0,0,639,640,5,33,0,0,640,641,5,61,0,0,641,158, + 1,0,0,0,642,643,5,124,0,0,643,160,1,0,0,0,644,645,5,40,0,0,645,162, + 1,0,0,0,646,647,5,41,0,0,647,164,1,0,0,0,648,649,5,44,0,0,649,166, + 1,0,0,0,650,651,5,59,0,0,651,168,1,0,0,0,652,653,5,45,0,0,653,654, + 5,62,0,0,654,170,1,0,0,0,655,656,5,91,0,0,656,172,1,0,0,0,657,658, + 5,93,0,0,658,174,1,0,0,0,659,660,5,112,0,0,660,665,5,105,0,0,661, + 662,5,80,0,0,662,665,5,73,0,0,663,665,7,0,0,0,664,659,1,0,0,0,664, + 661,1,0,0,0,664,663,1,0,0,0,665,176,1,0,0,0,666,668,7,1,0,0,667, + 666,1,0,0,0,668,669,1,0,0,0,669,667,1,0,0,0,669,670,1,0,0,0,670, + 677,1,0,0,0,671,673,5,46,0,0,672,674,7,1,0,0,673,672,1,0,0,0,674, + 675,1,0,0,0,675,673,1,0,0,0,675,676,1,0,0,0,676,678,1,0,0,0,677, + 671,1,0,0,0,677,678,1,0,0,0,678,178,1,0,0,0,679,683,7,2,0,0,680, + 682,7,3,0,0,681,680,1,0,0,0,682,685,1,0,0,0,683,681,1,0,0,0,683, + 684,1,0,0,0,684,180,1,0,0,0,685,683,1,0,0,0,686,688,7,4,0,0,687, + 686,1,0,0,0,688,689,1,0,0,0,689,687,1,0,0,0,689,690,1,0,0,0,690, + 691,1,0,0,0,691,692,6,90,0,0,692,182,1,0,0,0,14,0,375,451,468,486, + 499,554,571,664,669,675,677,683,689,1,6,0,0 ] class MathExprLexer(Lexer): @@ -343,12 +346,14 @@ class MathExprLexer(Lexer): LPAREN = 81 RPAREN = 82 COMMA = 83 - LBRACKET = 84 - RBRACKET = 85 - CONSTANT = 86 - NUMBER = 87 - VARIABLE = 88 - WS = 89 + SEMICOLON = 84 + ARROW = 85 + LBRACKET = 86 + RBRACKET = 87 + CONSTANT = 88 + NUMBER = 89 + VARIABLE = 90 + WS = 91 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] @@ -366,7 +371,7 @@ class MathExprLexer(Lexer): "'mean'", "'std'", "'var'", "'quantile'", "'dot'", "'moment'", "'cossim'", "'flip'", "'cov'", "'sort'", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "'>='", "'>'", "'<='", "'<'", "'=='", "'!='", - "'|'", "'('", "')'", "','", "'['", "']'" ] + "'|'", "'('", "')'", "','", "';'", "'->'", "'['", "']'" ] symbolicNames = [ "", "SIN", "COS", "TAN", "ASIN", "ACOS", "ATAN", "ATAN2", "SINH", @@ -379,8 +384,9 @@ class MathExprLexer(Lexer): "BOTK", "PINV", "SUM", "MEAN", "STD", "VAR", "QUARTILE", "PERCENTILE", "QUANTILE", "DOT", "MOMENT", "COSSIM", "FLIP", "COV", "SORT", "PLUS", "MINUS", "MULT", "DIV", "MOD", "POW", "GE", "GT", "LE", - "LT", "EQ", "NE", "PIPE", "LPAREN", "RPAREN", "COMMA", "LBRACKET", - "RBRACKET", "CONSTANT", "NUMBER", "VARIABLE", "WS" ] + "LT", "EQ", "NE", "PIPE", "LPAREN", "RPAREN", "COMMA", "SEMICOLON", + "ARROW", "LBRACKET", "RBRACKET", "CONSTANT", "NUMBER", "VARIABLE", + "WS" ] ruleNames = [ "SIN", "COS", "TAN", "ASIN", "ACOS", "ATAN", "ATAN2", "SINH", "COSH", "TANH", "ASINH", "ACOSH", "ATANH", "ABS", @@ -393,8 +399,9 @@ class MathExprLexer(Lexer): "STD", "VAR", "QUARTILE", "PERCENTILE", "QUANTILE", "DOT", "MOMENT", "COSSIM", "FLIP", "COV", "SORT", "PLUS", "MINUS", "MULT", "DIV", "MOD", "POW", "GE", "GT", "LE", "LT", "EQ", - "NE", "PIPE", "LPAREN", "RPAREN", "COMMA", "LBRACKET", - "RBRACKET", "CONSTANT", "NUMBER", "VARIABLE", "WS" ] + "NE", "PIPE", "LPAREN", "RPAREN", "COMMA", "SEMICOLON", + "ARROW", "LBRACKET", "RBRACKET", "CONSTANT", "NUMBER", + "VARIABLE", "WS" ] grammarFileName = "MathExpr.g4" diff --git a/more_math/Parser/MathExprLexer.tokens b/more_math/Parser/MathExprLexer.tokens index 4aa476e..f3279b4 100644 --- a/more_math/Parser/MathExprLexer.tokens +++ b/more_math/Parser/MathExprLexer.tokens @@ -81,12 +81,14 @@ PIPE=80 LPAREN=81 RPAREN=82 COMMA=83 -LBRACKET=84 -RBRACKET=85 -CONSTANT=86 -NUMBER=87 -VARIABLE=88 -WS=89 +SEMICOLON=84 +ARROW=85 +LBRACKET=86 +RBRACKET=87 +CONSTANT=88 +NUMBER=89 +VARIABLE=90 +WS=91 'sin'=1 'cos'=2 'tan'=3 @@ -163,5 +165,7 @@ WS=89 '('=81 ')'=82 ','=83 -'['=84 -']'=85 +';'=84 +'->'=85 +'['=86 +']'=87 diff --git a/more_math/Parser/MathExprListener.py b/more_math/Parser/MathExprListener.py index 32fac82..4255c36 100644 --- a/more_math/Parser/MathExprListener.py +++ b/more_math/Parser/MathExprListener.py @@ -8,6 +8,33 @@ else: # This class defines a complete listener for a parse tree produced by MathExprParser. class MathExprListener(ParseTreeListener): + # Enter a parse tree produced by MathExprParser#start. + def enterStart(self, ctx:MathExprParser.StartContext): + pass + + # Exit a parse tree produced by MathExprParser#start. + def exitStart(self, ctx:MathExprParser.StartContext): + pass + + + # Enter a parse tree produced by MathExprParser#FunctionDef. + def enterFunctionDef(self, ctx:MathExprParser.FunctionDefContext): + pass + + # Exit a parse tree produced by MathExprParser#FunctionDef. + def exitFunctionDef(self, ctx:MathExprParser.FunctionDefContext): + pass + + + # Enter a parse tree produced by MathExprParser#paramList. + def enterParamList(self, ctx:MathExprParser.ParamListContext): + pass + + # Exit a parse tree produced by MathExprParser#paramList. + def exitParamList(self, ctx:MathExprParser.ParamListContext): + pass + + # Enter a parse tree produced by MathExprParser#expr. def enterExpr(self, ctx:MathExprParser.ExprContext): pass @@ -305,6 +332,24 @@ class MathExprListener(ParseTreeListener): pass + # Enter a parse tree produced by MathExprParser#CallExp. + def enterCallExp(self, ctx:MathExprParser.CallExpContext): + pass + + # Exit a parse tree produced by MathExprParser#CallExp. + def exitCallExp(self, ctx:MathExprParser.CallExpContext): + pass + + + # Enter a parse tree produced by MathExprParser#exprList. + def enterExprList(self, ctx:MathExprParser.ExprListContext): + pass + + # Exit a parse tree produced by MathExprParser#exprList. + def exitExprList(self, ctx:MathExprParser.ExprListContext): + pass + + # Enter a parse tree produced by MathExprParser#SinFunc. def enterSinFunc(self, ctx:MathExprParser.SinFuncContext): pass diff --git a/more_math/Parser/MathExprParser.py b/more_math/Parser/MathExprParser.py index a81962f..fff3e69 100644 --- a/more_math/Parser/MathExprParser.py +++ b/more_math/Parser/MathExprParser.py @@ -10,215 +10,238 @@ else: def serializedATN(): return [ - 4,1,89,591,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,1,0,1,0, - 3,0,29,8,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,1,1,1,1,1,1,5,1,52,8,1,10,1,12,1,55,9,1,1,2,1, - 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,2,66,8,2,10,2,12,2,69,9,2,1,3,1, - 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,5,3,83,8,3,10,3,12,3,86, - 9,3,1,4,1,4,1,4,1,4,1,4,3,4,93,8,4,1,5,1,5,1,5,1,5,1,5,3,5,100,8, - 5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,5,6,110,8,6,10,6,12,6,113,9,6, - 1,6,1,6,5,6,117,8,6,10,6,12,6,120,9,6,1,7,1,7,1,7,1,7,1,7,1,7,1, - 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,5,7,142,8, - 7,10,7,12,7,145,9,7,1,7,1,7,3,7,149,8,7,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 1,8,1,8,3,8,351,8,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9, - 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9, - 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9, - 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9, - 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9, - 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9, - 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,458, - 8,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,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,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,1,10,1,10,1,10,3,10,505,8,10,1,11,1,11,1,11, - 1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12, - 5,12,523,8,12,10,12,12,12,526,9,12,1,12,1,12,1,12,1,12,1,12,1,12, - 1,12,5,12,535,8,12,10,12,12,12,538,9,12,1,12,1,12,1,12,1,12,1,12, - 1,12,1,12,4,12,547,8,12,11,12,12,12,548,1,12,1,12,1,12,1,12,1,12, - 1,12,1,12,4,12,558,8,12,11,12,12,12,559,1,12,1,12,1,12,1,12,1,12, - 1,12,1,12,4,12,569,8,12,11,12,12,12,570,1,12,1,12,1,12,1,12,1,12, - 1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,3,12,589, - 8,12,1,12,0,4,2,4,6,12,13,0,2,4,6,8,10,12,14,16,18,20,22,24,0,0, - 673,0,28,1,0,0,0,2,30,1,0,0,0,4,56,1,0,0,0,6,70,1,0,0,0,8,92,1,0, - 0,0,10,99,1,0,0,0,12,101,1,0,0,0,14,148,1,0,0,0,16,350,1,0,0,0,18, - 457,1,0,0,0,20,504,1,0,0,0,22,506,1,0,0,0,24,588,1,0,0,0,26,29,3, - 14,7,0,27,29,3,2,1,0,28,26,1,0,0,0,28,27,1,0,0,0,29,1,1,0,0,0,30, - 31,6,1,-1,0,31,32,3,4,2,0,32,53,1,0,0,0,33,34,10,7,0,0,34,35,5,75, - 0,0,35,52,3,4,2,0,36,37,10,6,0,0,37,38,5,74,0,0,38,52,3,4,2,0,39, - 40,10,5,0,0,40,41,5,77,0,0,41,52,3,4,2,0,42,43,10,4,0,0,43,44,5, - 76,0,0,44,52,3,4,2,0,45,46,10,3,0,0,46,47,5,78,0,0,47,52,3,4,2,0, - 48,49,10,2,0,0,49,50,5,79,0,0,50,52,3,4,2,0,51,33,1,0,0,0,51,36, - 1,0,0,0,51,39,1,0,0,0,51,42,1,0,0,0,51,45,1,0,0,0,51,48,1,0,0,0, - 52,55,1,0,0,0,53,51,1,0,0,0,53,54,1,0,0,0,54,3,1,0,0,0,55,53,1,0, - 0,0,56,57,6,2,-1,0,57,58,3,6,3,0,58,67,1,0,0,0,59,60,10,3,0,0,60, - 61,5,68,0,0,61,66,3,6,3,0,62,63,10,2,0,0,63,64,5,69,0,0,64,66,3, - 6,3,0,65,59,1,0,0,0,65,62,1,0,0,0,66,69,1,0,0,0,67,65,1,0,0,0,67, - 68,1,0,0,0,68,5,1,0,0,0,69,67,1,0,0,0,70,71,6,3,-1,0,71,72,3,8,4, - 0,72,84,1,0,0,0,73,74,10,4,0,0,74,75,5,70,0,0,75,83,3,8,4,0,76,77, - 10,3,0,0,77,78,5,71,0,0,78,83,3,8,4,0,79,80,10,2,0,0,80,81,5,72, - 0,0,81,83,3,8,4,0,82,73,1,0,0,0,82,76,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,7,1,0,0,0,86,84,1,0,0,0,87, - 88,3,10,5,0,88,89,5,73,0,0,89,90,3,8,4,0,90,93,1,0,0,0,91,93,3,10, - 5,0,92,87,1,0,0,0,92,91,1,0,0,0,93,9,1,0,0,0,94,95,5,68,0,0,95,100, - 3,10,5,0,96,97,5,69,0,0,97,100,3,10,5,0,98,100,3,12,6,0,99,94,1, - 0,0,0,99,96,1,0,0,0,99,98,1,0,0,0,100,11,1,0,0,0,101,102,6,6,-1, - 0,102,103,3,14,7,0,103,118,1,0,0,0,104,105,10,2,0,0,105,106,5,84, - 0,0,106,111,3,0,0,0,107,108,5,83,0,0,108,110,3,0,0,0,109,107,1,0, - 0,0,110,113,1,0,0,0,111,109,1,0,0,0,111,112,1,0,0,0,112,114,1,0, - 0,0,113,111,1,0,0,0,114,115,5,85,0,0,115,117,1,0,0,0,116,104,1,0, - 0,0,117,120,1,0,0,0,118,116,1,0,0,0,118,119,1,0,0,0,119,13,1,0,0, - 0,120,118,1,0,0,0,121,149,3,16,8,0,122,149,3,18,9,0,123,149,3,20, - 10,0,124,149,3,22,11,0,125,149,3,24,12,0,126,149,5,88,0,0,127,149, - 5,87,0,0,128,149,5,86,0,0,129,130,5,81,0,0,130,131,3,0,0,0,131,132, - 5,82,0,0,132,149,1,0,0,0,133,134,5,80,0,0,134,135,3,0,0,0,135,136, - 5,80,0,0,136,149,1,0,0,0,137,138,5,84,0,0,138,143,3,0,0,0,139,140, - 5,83,0,0,140,142,3,0,0,0,141,139,1,0,0,0,142,145,1,0,0,0,143,141, - 1,0,0,0,143,144,1,0,0,0,144,146,1,0,0,0,145,143,1,0,0,0,146,147, - 5,85,0,0,147,149,1,0,0,0,148,121,1,0,0,0,148,122,1,0,0,0,148,123, - 1,0,0,0,148,124,1,0,0,0,148,125,1,0,0,0,148,126,1,0,0,0,148,127, - 1,0,0,0,148,128,1,0,0,0,148,129,1,0,0,0,148,133,1,0,0,0,148,137, - 1,0,0,0,149,15,1,0,0,0,150,151,5,1,0,0,151,152,5,81,0,0,152,153, - 3,0,0,0,153,154,5,82,0,0,154,351,1,0,0,0,155,156,5,2,0,0,156,157, - 5,81,0,0,157,158,3,0,0,0,158,159,5,82,0,0,159,351,1,0,0,0,160,161, - 5,3,0,0,161,162,5,81,0,0,162,163,3,0,0,0,163,164,5,82,0,0,164,351, - 1,0,0,0,165,166,5,4,0,0,166,167,5,81,0,0,167,168,3,0,0,0,168,169, - 5,82,0,0,169,351,1,0,0,0,170,171,5,5,0,0,171,172,5,81,0,0,172,173, - 3,0,0,0,173,174,5,82,0,0,174,351,1,0,0,0,175,176,5,6,0,0,176,177, - 5,81,0,0,177,178,3,0,0,0,178,179,5,82,0,0,179,351,1,0,0,0,180,181, - 5,8,0,0,181,182,5,81,0,0,182,183,3,0,0,0,183,184,5,82,0,0,184,351, - 1,0,0,0,185,186,5,9,0,0,186,187,5,81,0,0,187,188,3,0,0,0,188,189, - 5,82,0,0,189,351,1,0,0,0,190,191,5,10,0,0,191,192,5,81,0,0,192,193, - 3,0,0,0,193,194,5,82,0,0,194,351,1,0,0,0,195,196,5,11,0,0,196,197, - 5,81,0,0,197,198,3,0,0,0,198,199,5,82,0,0,199,351,1,0,0,0,200,201, - 5,12,0,0,201,202,5,81,0,0,202,203,3,0,0,0,203,204,5,82,0,0,204,351, - 1,0,0,0,205,206,5,13,0,0,206,207,5,81,0,0,207,208,3,0,0,0,208,209, - 5,82,0,0,209,351,1,0,0,0,210,211,5,14,0,0,211,212,5,81,0,0,212,213, - 3,0,0,0,213,214,5,82,0,0,214,351,1,0,0,0,215,216,5,15,0,0,216,217, - 5,81,0,0,217,218,3,0,0,0,218,219,5,82,0,0,219,351,1,0,0,0,220,221, - 5,16,0,0,221,222,5,81,0,0,222,223,3,0,0,0,223,224,5,82,0,0,224,351, - 1,0,0,0,225,226,5,17,0,0,226,227,5,81,0,0,227,228,3,0,0,0,228,229, - 5,82,0,0,229,351,1,0,0,0,230,231,5,18,0,0,231,232,5,81,0,0,232,233, - 3,0,0,0,233,234,5,82,0,0,234,351,1,0,0,0,235,236,5,23,0,0,236,237, - 5,81,0,0,237,238,3,0,0,0,238,239,5,82,0,0,239,351,1,0,0,0,240,241, - 5,24,0,0,241,242,5,81,0,0,242,243,3,0,0,0,243,244,5,82,0,0,244,351, - 1,0,0,0,245,246,5,25,0,0,246,247,5,81,0,0,247,248,3,0,0,0,248,249, - 5,82,0,0,249,351,1,0,0,0,250,251,5,26,0,0,251,252,5,81,0,0,252,253, - 3,0,0,0,253,254,5,82,0,0,254,351,1,0,0,0,255,256,5,27,0,0,256,257, - 5,81,0,0,257,258,3,0,0,0,258,259,5,82,0,0,259,351,1,0,0,0,260,261, - 5,28,0,0,261,262,5,81,0,0,262,263,3,0,0,0,263,264,5,82,0,0,264,351, - 1,0,0,0,265,266,5,30,0,0,266,267,5,81,0,0,267,268,3,0,0,0,268,269, - 5,82,0,0,269,351,1,0,0,0,270,271,5,32,0,0,271,272,5,81,0,0,272,273, - 3,0,0,0,273,274,5,82,0,0,274,351,1,0,0,0,275,276,5,33,0,0,276,277, - 5,81,0,0,277,278,3,0,0,0,278,279,5,82,0,0,279,351,1,0,0,0,280,281, - 5,34,0,0,281,282,5,81,0,0,282,283,3,0,0,0,283,284,5,82,0,0,284,351, - 1,0,0,0,285,286,5,35,0,0,286,287,5,81,0,0,287,288,3,0,0,0,288,289, - 5,82,0,0,289,351,1,0,0,0,290,291,5,40,0,0,291,292,5,81,0,0,292,293, - 3,0,0,0,293,294,5,82,0,0,294,351,1,0,0,0,295,296,5,41,0,0,296,297, - 5,81,0,0,297,298,3,0,0,0,298,299,5,82,0,0,299,351,1,0,0,0,300,301, - 5,42,0,0,301,302,5,81,0,0,302,303,3,0,0,0,303,304,5,82,0,0,304,351, - 1,0,0,0,305,306,5,43,0,0,306,307,5,81,0,0,307,308,3,0,0,0,308,309, - 5,82,0,0,309,351,1,0,0,0,310,311,5,44,0,0,311,312,5,81,0,0,312,313, - 3,0,0,0,313,314,5,82,0,0,314,351,1,0,0,0,315,316,5,36,0,0,316,317, - 5,81,0,0,317,318,3,0,0,0,318,319,5,82,0,0,319,351,1,0,0,0,320,321, - 5,54,0,0,321,322,5,81,0,0,322,323,3,0,0,0,323,324,5,82,0,0,324,351, - 1,0,0,0,325,326,5,55,0,0,326,327,5,81,0,0,327,328,3,0,0,0,328,329, - 5,82,0,0,329,351,1,0,0,0,330,331,5,56,0,0,331,332,5,81,0,0,332,333, - 3,0,0,0,333,334,5,82,0,0,334,351,1,0,0,0,335,336,5,57,0,0,336,337, - 5,81,0,0,337,338,3,0,0,0,338,339,5,82,0,0,339,351,1,0,0,0,340,341, - 5,58,0,0,341,342,5,81,0,0,342,343,3,0,0,0,343,344,5,82,0,0,344,351, - 1,0,0,0,345,346,5,67,0,0,346,347,5,81,0,0,347,348,3,0,0,0,348,349, - 5,82,0,0,349,351,1,0,0,0,350,150,1,0,0,0,350,155,1,0,0,0,350,160, - 1,0,0,0,350,165,1,0,0,0,350,170,1,0,0,0,350,175,1,0,0,0,350,180, - 1,0,0,0,350,185,1,0,0,0,350,190,1,0,0,0,350,195,1,0,0,0,350,200, - 1,0,0,0,350,205,1,0,0,0,350,210,1,0,0,0,350,215,1,0,0,0,350,220, - 1,0,0,0,350,225,1,0,0,0,350,230,1,0,0,0,350,235,1,0,0,0,350,240, - 1,0,0,0,350,245,1,0,0,0,350,250,1,0,0,0,350,255,1,0,0,0,350,260, - 1,0,0,0,350,265,1,0,0,0,350,270,1,0,0,0,350,275,1,0,0,0,350,280, - 1,0,0,0,350,285,1,0,0,0,350,290,1,0,0,0,350,295,1,0,0,0,350,300, - 1,0,0,0,350,305,1,0,0,0,350,310,1,0,0,0,350,315,1,0,0,0,350,320, - 1,0,0,0,350,325,1,0,0,0,350,330,1,0,0,0,350,335,1,0,0,0,350,340, - 1,0,0,0,350,345,1,0,0,0,351,17,1,0,0,0,352,353,5,29,0,0,353,354, - 5,81,0,0,354,355,3,0,0,0,355,356,5,83,0,0,356,357,3,0,0,0,357,358, - 5,82,0,0,358,458,1,0,0,0,359,360,5,7,0,0,360,361,5,81,0,0,361,362, - 3,0,0,0,362,363,5,83,0,0,363,364,3,0,0,0,364,365,5,82,0,0,365,458, - 1,0,0,0,366,367,5,21,0,0,367,368,5,81,0,0,368,369,3,0,0,0,369,370, - 5,83,0,0,370,371,3,0,0,0,371,372,5,82,0,0,372,458,1,0,0,0,373,374, - 5,22,0,0,374,375,5,81,0,0,375,376,3,0,0,0,376,377,5,83,0,0,377,378, - 3,0,0,0,378,379,5,82,0,0,379,458,1,0,0,0,380,381,5,38,0,0,381,382, - 5,81,0,0,382,383,3,0,0,0,383,384,5,83,0,0,384,385,3,0,0,0,385,386, - 5,82,0,0,386,458,1,0,0,0,387,388,5,52,0,0,388,389,5,81,0,0,389,390, - 3,0,0,0,390,391,5,83,0,0,391,392,3,0,0,0,392,393,5,82,0,0,393,458, - 1,0,0,0,394,395,5,53,0,0,395,396,5,81,0,0,396,397,3,0,0,0,397,398, - 5,83,0,0,398,399,3,0,0,0,399,400,5,82,0,0,400,458,1,0,0,0,401,402, - 5,59,0,0,402,403,5,81,0,0,403,404,3,0,0,0,404,405,5,83,0,0,405,406, - 3,0,0,0,406,407,5,82,0,0,407,458,1,0,0,0,408,409,5,60,0,0,409,410, - 5,81,0,0,410,411,3,0,0,0,411,412,5,83,0,0,412,413,3,0,0,0,413,414, - 5,82,0,0,414,458,1,0,0,0,415,416,5,61,0,0,416,417,5,81,0,0,417,418, - 3,0,0,0,418,419,5,83,0,0,419,420,3,0,0,0,420,421,5,82,0,0,421,458, - 1,0,0,0,422,423,5,61,0,0,423,424,5,81,0,0,424,425,3,0,0,0,425,426, - 5,83,0,0,426,427,3,0,0,0,427,428,5,82,0,0,428,458,1,0,0,0,429,430, - 5,62,0,0,430,431,5,81,0,0,431,432,3,0,0,0,432,433,5,83,0,0,433,434, - 3,0,0,0,434,435,5,82,0,0,435,458,1,0,0,0,436,437,5,64,0,0,437,438, - 5,81,0,0,438,439,3,0,0,0,439,440,5,83,0,0,440,441,3,0,0,0,441,442, - 5,82,0,0,442,458,1,0,0,0,443,444,5,65,0,0,444,445,5,81,0,0,445,446, - 3,0,0,0,446,447,5,83,0,0,447,448,3,0,0,0,448,449,5,82,0,0,449,458, - 1,0,0,0,450,451,5,66,0,0,451,452,5,81,0,0,452,453,3,0,0,0,453,454, - 5,83,0,0,454,455,3,0,0,0,455,456,5,82,0,0,456,458,1,0,0,0,457,352, - 1,0,0,0,457,359,1,0,0,0,457,366,1,0,0,0,457,373,1,0,0,0,457,380, - 1,0,0,0,457,387,1,0,0,0,457,394,1,0,0,0,457,401,1,0,0,0,457,408, - 1,0,0,0,457,415,1,0,0,0,457,422,1,0,0,0,457,429,1,0,0,0,457,436, - 1,0,0,0,457,443,1,0,0,0,457,450,1,0,0,0,458,19,1,0,0,0,459,460,5, - 31,0,0,460,461,5,81,0,0,461,462,3,0,0,0,462,463,5,83,0,0,463,464, - 3,0,0,0,464,465,5,83,0,0,465,466,3,0,0,0,466,467,5,82,0,0,467,505, - 1,0,0,0,468,469,5,37,0,0,469,470,5,81,0,0,470,471,3,0,0,0,471,472, - 5,83,0,0,472,473,3,0,0,0,473,474,5,83,0,0,474,475,3,0,0,0,475,476, - 5,82,0,0,476,505,1,0,0,0,477,478,5,39,0,0,478,479,5,81,0,0,479,480, - 3,0,0,0,480,481,5,83,0,0,481,482,3,0,0,0,482,483,5,83,0,0,483,484, - 3,0,0,0,484,485,5,82,0,0,485,505,1,0,0,0,486,487,5,51,0,0,487,488, - 5,81,0,0,488,489,3,0,0,0,489,490,5,83,0,0,490,491,3,0,0,0,491,492, - 5,83,0,0,492,493,3,0,0,0,493,494,5,82,0,0,494,505,1,0,0,0,495,496, - 5,63,0,0,496,497,5,81,0,0,497,498,3,0,0,0,498,499,5,83,0,0,499,500, - 3,0,0,0,500,501,5,83,0,0,501,502,3,0,0,0,502,503,5,82,0,0,503,505, - 1,0,0,0,504,459,1,0,0,0,504,468,1,0,0,0,504,477,1,0,0,0,504,486, - 1,0,0,0,504,495,1,0,0,0,505,21,1,0,0,0,506,507,5,48,0,0,507,508, - 5,81,0,0,508,509,3,0,0,0,509,510,5,83,0,0,510,511,3,0,0,0,511,512, - 5,83,0,0,512,513,3,0,0,0,513,514,5,83,0,0,514,515,3,0,0,0,515,516, - 5,82,0,0,516,23,1,0,0,0,517,518,5,19,0,0,518,519,5,81,0,0,519,524, - 3,0,0,0,520,521,5,83,0,0,521,523,3,0,0,0,522,520,1,0,0,0,523,526, - 1,0,0,0,524,522,1,0,0,0,524,525,1,0,0,0,525,527,1,0,0,0,526,524, - 1,0,0,0,527,528,5,82,0,0,528,589,1,0,0,0,529,530,5,20,0,0,530,531, - 5,81,0,0,531,536,3,0,0,0,532,533,5,83,0,0,533,535,3,0,0,0,534,532, - 1,0,0,0,535,538,1,0,0,0,536,534,1,0,0,0,536,537,1,0,0,0,537,539, - 1,0,0,0,538,536,1,0,0,0,539,540,5,82,0,0,540,589,1,0,0,0,541,542, - 5,45,0,0,542,543,5,81,0,0,543,546,3,0,0,0,544,545,5,83,0,0,545,547, - 3,0,0,0,546,544,1,0,0,0,547,548,1,0,0,0,548,546,1,0,0,0,548,549, - 1,0,0,0,549,550,1,0,0,0,550,551,5,82,0,0,551,589,1,0,0,0,552,553, - 5,46,0,0,553,554,5,81,0,0,554,557,3,0,0,0,555,556,5,83,0,0,556,558, - 3,0,0,0,557,555,1,0,0,0,558,559,1,0,0,0,559,557,1,0,0,0,559,560, - 1,0,0,0,560,561,1,0,0,0,561,562,5,82,0,0,562,589,1,0,0,0,563,564, - 5,47,0,0,564,565,5,81,0,0,565,568,3,0,0,0,566,567,5,83,0,0,567,569, - 3,0,0,0,568,566,1,0,0,0,569,570,1,0,0,0,570,568,1,0,0,0,570,571, - 1,0,0,0,571,572,1,0,0,0,572,573,5,82,0,0,573,589,1,0,0,0,574,575, - 5,49,0,0,575,576,5,81,0,0,576,577,3,0,0,0,577,578,5,83,0,0,578,579, - 3,0,0,0,579,580,5,82,0,0,580,589,1,0,0,0,581,582,5,50,0,0,582,583, - 5,81,0,0,583,584,3,0,0,0,584,585,5,83,0,0,585,586,3,0,0,0,586,587, - 5,82,0,0,587,589,1,0,0,0,588,517,1,0,0,0,588,529,1,0,0,0,588,541, - 1,0,0,0,588,552,1,0,0,0,588,563,1,0,0,0,588,574,1,0,0,0,588,581, - 1,0,0,0,589,25,1,0,0,0,22,28,51,53,65,67,82,84,92,99,111,118,143, - 148,350,457,504,524,536,548,559,570,588 + 4,1,91,640,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,1,0,5,0,36,8,0,10,0,12,0,39,9,0,1, + 0,1,0,1,0,1,1,1,1,1,1,3,1,47,8,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2, + 5,2,57,8,2,10,2,12,2,60,9,2,1,3,1,3,3,3,64,8,3,1,4,1,4,1,4,1,4,1, + 4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1, + 4,5,4,87,8,4,10,4,12,4,90,9,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1, + 5,5,5,101,8,5,10,5,12,5,104,9,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,5,6,118,8,6,10,6,12,6,121,9,6,1,7,1,7,1,7,1,7,1, + 7,3,7,128,8,7,1,8,1,8,1,8,1,8,1,8,3,8,135,8,8,1,9,1,9,1,9,1,9,1, + 9,1,9,1,9,1,9,5,9,145,8,9,10,9,12,9,148,9,9,1,9,1,9,5,9,152,8,9, + 10,9,12,9,155,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,1,10,1,10,1,10,1,10,1,10,1,10,5,10,177,8, + 10,10,10,12,10,180,9,10,1,10,1,10,1,10,1,10,1,10,3,10,187,8,10,1, + 10,3,10,190,8,10,1,11,1,11,1,11,5,11,195,8,11,10,11,12,11,198,9, + 11,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,3,12,400,8,12,1,13,1,13,1,13,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1, + 13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,1,13,3,13,507,8,13,1, + 14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1, + 14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1, + 14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1,14,1, + 14,1,14,1,14,1,14,1,14,1,14,3,14,554,8,14,1,15,1,15,1,15,1,15,1, + 15,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,5,16,572, + 8,16,10,16,12,16,575,9,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,5,16, + 584,8,16,10,16,12,16,587,9,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16, + 4,16,596,8,16,11,16,12,16,597,1,16,1,16,1,16,1,16,1,16,1,16,1,16, + 4,16,607,8,16,11,16,12,16,608,1,16,1,16,1,16,1,16,1,16,1,16,1,16, + 4,16,618,8,16,11,16,12,16,619,1,16,1,16,1,16,1,16,1,16,1,16,1,16, + 1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,638,8,16,1,16, + 0,4,8,10,12,18,17,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32, + 0,0,724,0,37,1,0,0,0,2,43,1,0,0,0,4,53,1,0,0,0,6,63,1,0,0,0,8,65, + 1,0,0,0,10,91,1,0,0,0,12,105,1,0,0,0,14,127,1,0,0,0,16,134,1,0,0, + 0,18,136,1,0,0,0,20,189,1,0,0,0,22,191,1,0,0,0,24,399,1,0,0,0,26, + 506,1,0,0,0,28,553,1,0,0,0,30,555,1,0,0,0,32,637,1,0,0,0,34,36,3, + 2,1,0,35,34,1,0,0,0,36,39,1,0,0,0,37,35,1,0,0,0,37,38,1,0,0,0,38, + 40,1,0,0,0,39,37,1,0,0,0,40,41,3,6,3,0,41,42,5,0,0,1,42,1,1,0,0, + 0,43,44,5,90,0,0,44,46,5,81,0,0,45,47,3,4,2,0,46,45,1,0,0,0,46,47, + 1,0,0,0,47,48,1,0,0,0,48,49,5,82,0,0,49,50,5,85,0,0,50,51,3,6,3, + 0,51,52,5,84,0,0,52,3,1,0,0,0,53,58,5,90,0,0,54,55,5,83,0,0,55,57, + 5,90,0,0,56,54,1,0,0,0,57,60,1,0,0,0,58,56,1,0,0,0,58,59,1,0,0,0, + 59,5,1,0,0,0,60,58,1,0,0,0,61,64,3,20,10,0,62,64,3,8,4,0,63,61,1, + 0,0,0,63,62,1,0,0,0,64,7,1,0,0,0,65,66,6,4,-1,0,66,67,3,10,5,0,67, + 88,1,0,0,0,68,69,10,7,0,0,69,70,5,75,0,0,70,87,3,10,5,0,71,72,10, + 6,0,0,72,73,5,74,0,0,73,87,3,10,5,0,74,75,10,5,0,0,75,76,5,77,0, + 0,76,87,3,10,5,0,77,78,10,4,0,0,78,79,5,76,0,0,79,87,3,10,5,0,80, + 81,10,3,0,0,81,82,5,78,0,0,82,87,3,10,5,0,83,84,10,2,0,0,84,85,5, + 79,0,0,85,87,3,10,5,0,86,68,1,0,0,0,86,71,1,0,0,0,86,74,1,0,0,0, + 86,77,1,0,0,0,86,80,1,0,0,0,86,83,1,0,0,0,87,90,1,0,0,0,88,86,1, + 0,0,0,88,89,1,0,0,0,89,9,1,0,0,0,90,88,1,0,0,0,91,92,6,5,-1,0,92, + 93,3,12,6,0,93,102,1,0,0,0,94,95,10,3,0,0,95,96,5,68,0,0,96,101, + 3,12,6,0,97,98,10,2,0,0,98,99,5,69,0,0,99,101,3,12,6,0,100,94,1, + 0,0,0,100,97,1,0,0,0,101,104,1,0,0,0,102,100,1,0,0,0,102,103,1,0, + 0,0,103,11,1,0,0,0,104,102,1,0,0,0,105,106,6,6,-1,0,106,107,3,14, + 7,0,107,119,1,0,0,0,108,109,10,4,0,0,109,110,5,70,0,0,110,118,3, + 14,7,0,111,112,10,3,0,0,112,113,5,71,0,0,113,118,3,14,7,0,114,115, + 10,2,0,0,115,116,5,72,0,0,116,118,3,14,7,0,117,108,1,0,0,0,117,111, + 1,0,0,0,117,114,1,0,0,0,118,121,1,0,0,0,119,117,1,0,0,0,119,120, + 1,0,0,0,120,13,1,0,0,0,121,119,1,0,0,0,122,123,3,16,8,0,123,124, + 5,73,0,0,124,125,3,14,7,0,125,128,1,0,0,0,126,128,3,16,8,0,127,122, + 1,0,0,0,127,126,1,0,0,0,128,15,1,0,0,0,129,130,5,68,0,0,130,135, + 3,16,8,0,131,132,5,69,0,0,132,135,3,16,8,0,133,135,3,18,9,0,134, + 129,1,0,0,0,134,131,1,0,0,0,134,133,1,0,0,0,135,17,1,0,0,0,136,137, + 6,9,-1,0,137,138,3,20,10,0,138,153,1,0,0,0,139,140,10,2,0,0,140, + 141,5,86,0,0,141,146,3,6,3,0,142,143,5,83,0,0,143,145,3,6,3,0,144, + 142,1,0,0,0,145,148,1,0,0,0,146,144,1,0,0,0,146,147,1,0,0,0,147, + 149,1,0,0,0,148,146,1,0,0,0,149,150,5,87,0,0,150,152,1,0,0,0,151, + 139,1,0,0,0,152,155,1,0,0,0,153,151,1,0,0,0,153,154,1,0,0,0,154, + 19,1,0,0,0,155,153,1,0,0,0,156,190,3,24,12,0,157,190,3,26,13,0,158, + 190,3,28,14,0,159,190,3,30,15,0,160,190,3,32,16,0,161,190,5,90,0, + 0,162,190,5,89,0,0,163,190,5,88,0,0,164,165,5,81,0,0,165,166,3,6, + 3,0,166,167,5,82,0,0,167,190,1,0,0,0,168,169,5,80,0,0,169,170,3, + 6,3,0,170,171,5,80,0,0,171,190,1,0,0,0,172,173,5,86,0,0,173,178, + 3,6,3,0,174,175,5,83,0,0,175,177,3,6,3,0,176,174,1,0,0,0,177,180, + 1,0,0,0,178,176,1,0,0,0,178,179,1,0,0,0,179,181,1,0,0,0,180,178, + 1,0,0,0,181,182,5,87,0,0,182,190,1,0,0,0,183,184,5,90,0,0,184,186, + 5,81,0,0,185,187,3,22,11,0,186,185,1,0,0,0,186,187,1,0,0,0,187,188, + 1,0,0,0,188,190,5,82,0,0,189,156,1,0,0,0,189,157,1,0,0,0,189,158, + 1,0,0,0,189,159,1,0,0,0,189,160,1,0,0,0,189,161,1,0,0,0,189,162, + 1,0,0,0,189,163,1,0,0,0,189,164,1,0,0,0,189,168,1,0,0,0,189,172, + 1,0,0,0,189,183,1,0,0,0,190,21,1,0,0,0,191,196,3,6,3,0,192,193,5, + 83,0,0,193,195,3,6,3,0,194,192,1,0,0,0,195,198,1,0,0,0,196,194,1, + 0,0,0,196,197,1,0,0,0,197,23,1,0,0,0,198,196,1,0,0,0,199,200,5,1, + 0,0,200,201,5,81,0,0,201,202,3,6,3,0,202,203,5,82,0,0,203,400,1, + 0,0,0,204,205,5,2,0,0,205,206,5,81,0,0,206,207,3,6,3,0,207,208,5, + 82,0,0,208,400,1,0,0,0,209,210,5,3,0,0,210,211,5,81,0,0,211,212, + 3,6,3,0,212,213,5,82,0,0,213,400,1,0,0,0,214,215,5,4,0,0,215,216, + 5,81,0,0,216,217,3,6,3,0,217,218,5,82,0,0,218,400,1,0,0,0,219,220, + 5,5,0,0,220,221,5,81,0,0,221,222,3,6,3,0,222,223,5,82,0,0,223,400, + 1,0,0,0,224,225,5,6,0,0,225,226,5,81,0,0,226,227,3,6,3,0,227,228, + 5,82,0,0,228,400,1,0,0,0,229,230,5,8,0,0,230,231,5,81,0,0,231,232, + 3,6,3,0,232,233,5,82,0,0,233,400,1,0,0,0,234,235,5,9,0,0,235,236, + 5,81,0,0,236,237,3,6,3,0,237,238,5,82,0,0,238,400,1,0,0,0,239,240, + 5,10,0,0,240,241,5,81,0,0,241,242,3,6,3,0,242,243,5,82,0,0,243,400, + 1,0,0,0,244,245,5,11,0,0,245,246,5,81,0,0,246,247,3,6,3,0,247,248, + 5,82,0,0,248,400,1,0,0,0,249,250,5,12,0,0,250,251,5,81,0,0,251,252, + 3,6,3,0,252,253,5,82,0,0,253,400,1,0,0,0,254,255,5,13,0,0,255,256, + 5,81,0,0,256,257,3,6,3,0,257,258,5,82,0,0,258,400,1,0,0,0,259,260, + 5,14,0,0,260,261,5,81,0,0,261,262,3,6,3,0,262,263,5,82,0,0,263,400, + 1,0,0,0,264,265,5,15,0,0,265,266,5,81,0,0,266,267,3,6,3,0,267,268, + 5,82,0,0,268,400,1,0,0,0,269,270,5,16,0,0,270,271,5,81,0,0,271,272, + 3,6,3,0,272,273,5,82,0,0,273,400,1,0,0,0,274,275,5,17,0,0,275,276, + 5,81,0,0,276,277,3,6,3,0,277,278,5,82,0,0,278,400,1,0,0,0,279,280, + 5,18,0,0,280,281,5,81,0,0,281,282,3,6,3,0,282,283,5,82,0,0,283,400, + 1,0,0,0,284,285,5,23,0,0,285,286,5,81,0,0,286,287,3,6,3,0,287,288, + 5,82,0,0,288,400,1,0,0,0,289,290,5,24,0,0,290,291,5,81,0,0,291,292, + 3,6,3,0,292,293,5,82,0,0,293,400,1,0,0,0,294,295,5,25,0,0,295,296, + 5,81,0,0,296,297,3,6,3,0,297,298,5,82,0,0,298,400,1,0,0,0,299,300, + 5,26,0,0,300,301,5,81,0,0,301,302,3,6,3,0,302,303,5,82,0,0,303,400, + 1,0,0,0,304,305,5,27,0,0,305,306,5,81,0,0,306,307,3,6,3,0,307,308, + 5,82,0,0,308,400,1,0,0,0,309,310,5,28,0,0,310,311,5,81,0,0,311,312, + 3,6,3,0,312,313,5,82,0,0,313,400,1,0,0,0,314,315,5,30,0,0,315,316, + 5,81,0,0,316,317,3,6,3,0,317,318,5,82,0,0,318,400,1,0,0,0,319,320, + 5,32,0,0,320,321,5,81,0,0,321,322,3,6,3,0,322,323,5,82,0,0,323,400, + 1,0,0,0,324,325,5,33,0,0,325,326,5,81,0,0,326,327,3,6,3,0,327,328, + 5,82,0,0,328,400,1,0,0,0,329,330,5,34,0,0,330,331,5,81,0,0,331,332, + 3,6,3,0,332,333,5,82,0,0,333,400,1,0,0,0,334,335,5,35,0,0,335,336, + 5,81,0,0,336,337,3,6,3,0,337,338,5,82,0,0,338,400,1,0,0,0,339,340, + 5,40,0,0,340,341,5,81,0,0,341,342,3,6,3,0,342,343,5,82,0,0,343,400, + 1,0,0,0,344,345,5,41,0,0,345,346,5,81,0,0,346,347,3,6,3,0,347,348, + 5,82,0,0,348,400,1,0,0,0,349,350,5,42,0,0,350,351,5,81,0,0,351,352, + 3,6,3,0,352,353,5,82,0,0,353,400,1,0,0,0,354,355,5,43,0,0,355,356, + 5,81,0,0,356,357,3,6,3,0,357,358,5,82,0,0,358,400,1,0,0,0,359,360, + 5,44,0,0,360,361,5,81,0,0,361,362,3,6,3,0,362,363,5,82,0,0,363,400, + 1,0,0,0,364,365,5,36,0,0,365,366,5,81,0,0,366,367,3,6,3,0,367,368, + 5,82,0,0,368,400,1,0,0,0,369,370,5,54,0,0,370,371,5,81,0,0,371,372, + 3,6,3,0,372,373,5,82,0,0,373,400,1,0,0,0,374,375,5,55,0,0,375,376, + 5,81,0,0,376,377,3,6,3,0,377,378,5,82,0,0,378,400,1,0,0,0,379,380, + 5,56,0,0,380,381,5,81,0,0,381,382,3,6,3,0,382,383,5,82,0,0,383,400, + 1,0,0,0,384,385,5,57,0,0,385,386,5,81,0,0,386,387,3,6,3,0,387,388, + 5,82,0,0,388,400,1,0,0,0,389,390,5,58,0,0,390,391,5,81,0,0,391,392, + 3,6,3,0,392,393,5,82,0,0,393,400,1,0,0,0,394,395,5,67,0,0,395,396, + 5,81,0,0,396,397,3,6,3,0,397,398,5,82,0,0,398,400,1,0,0,0,399,199, + 1,0,0,0,399,204,1,0,0,0,399,209,1,0,0,0,399,214,1,0,0,0,399,219, + 1,0,0,0,399,224,1,0,0,0,399,229,1,0,0,0,399,234,1,0,0,0,399,239, + 1,0,0,0,399,244,1,0,0,0,399,249,1,0,0,0,399,254,1,0,0,0,399,259, + 1,0,0,0,399,264,1,0,0,0,399,269,1,0,0,0,399,274,1,0,0,0,399,279, + 1,0,0,0,399,284,1,0,0,0,399,289,1,0,0,0,399,294,1,0,0,0,399,299, + 1,0,0,0,399,304,1,0,0,0,399,309,1,0,0,0,399,314,1,0,0,0,399,319, + 1,0,0,0,399,324,1,0,0,0,399,329,1,0,0,0,399,334,1,0,0,0,399,339, + 1,0,0,0,399,344,1,0,0,0,399,349,1,0,0,0,399,354,1,0,0,0,399,359, + 1,0,0,0,399,364,1,0,0,0,399,369,1,0,0,0,399,374,1,0,0,0,399,379, + 1,0,0,0,399,384,1,0,0,0,399,389,1,0,0,0,399,394,1,0,0,0,400,25,1, + 0,0,0,401,402,5,29,0,0,402,403,5,81,0,0,403,404,3,6,3,0,404,405, + 5,83,0,0,405,406,3,6,3,0,406,407,5,82,0,0,407,507,1,0,0,0,408,409, + 5,7,0,0,409,410,5,81,0,0,410,411,3,6,3,0,411,412,5,83,0,0,412,413, + 3,6,3,0,413,414,5,82,0,0,414,507,1,0,0,0,415,416,5,21,0,0,416,417, + 5,81,0,0,417,418,3,6,3,0,418,419,5,83,0,0,419,420,3,6,3,0,420,421, + 5,82,0,0,421,507,1,0,0,0,422,423,5,22,0,0,423,424,5,81,0,0,424,425, + 3,6,3,0,425,426,5,83,0,0,426,427,3,6,3,0,427,428,5,82,0,0,428,507, + 1,0,0,0,429,430,5,38,0,0,430,431,5,81,0,0,431,432,3,6,3,0,432,433, + 5,83,0,0,433,434,3,6,3,0,434,435,5,82,0,0,435,507,1,0,0,0,436,437, + 5,52,0,0,437,438,5,81,0,0,438,439,3,6,3,0,439,440,5,83,0,0,440,441, + 3,6,3,0,441,442,5,82,0,0,442,507,1,0,0,0,443,444,5,53,0,0,444,445, + 5,81,0,0,445,446,3,6,3,0,446,447,5,83,0,0,447,448,3,6,3,0,448,449, + 5,82,0,0,449,507,1,0,0,0,450,451,5,59,0,0,451,452,5,81,0,0,452,453, + 3,6,3,0,453,454,5,83,0,0,454,455,3,6,3,0,455,456,5,82,0,0,456,507, + 1,0,0,0,457,458,5,60,0,0,458,459,5,81,0,0,459,460,3,6,3,0,460,461, + 5,83,0,0,461,462,3,6,3,0,462,463,5,82,0,0,463,507,1,0,0,0,464,465, + 5,61,0,0,465,466,5,81,0,0,466,467,3,6,3,0,467,468,5,83,0,0,468,469, + 3,6,3,0,469,470,5,82,0,0,470,507,1,0,0,0,471,472,5,61,0,0,472,473, + 5,81,0,0,473,474,3,6,3,0,474,475,5,83,0,0,475,476,3,6,3,0,476,477, + 5,82,0,0,477,507,1,0,0,0,478,479,5,62,0,0,479,480,5,81,0,0,480,481, + 3,6,3,0,481,482,5,83,0,0,482,483,3,6,3,0,483,484,5,82,0,0,484,507, + 1,0,0,0,485,486,5,64,0,0,486,487,5,81,0,0,487,488,3,6,3,0,488,489, + 5,83,0,0,489,490,3,6,3,0,490,491,5,82,0,0,491,507,1,0,0,0,492,493, + 5,65,0,0,493,494,5,81,0,0,494,495,3,6,3,0,495,496,5,83,0,0,496,497, + 3,6,3,0,497,498,5,82,0,0,498,507,1,0,0,0,499,500,5,66,0,0,500,501, + 5,81,0,0,501,502,3,6,3,0,502,503,5,83,0,0,503,504,3,6,3,0,504,505, + 5,82,0,0,505,507,1,0,0,0,506,401,1,0,0,0,506,408,1,0,0,0,506,415, + 1,0,0,0,506,422,1,0,0,0,506,429,1,0,0,0,506,436,1,0,0,0,506,443, + 1,0,0,0,506,450,1,0,0,0,506,457,1,0,0,0,506,464,1,0,0,0,506,471, + 1,0,0,0,506,478,1,0,0,0,506,485,1,0,0,0,506,492,1,0,0,0,506,499, + 1,0,0,0,507,27,1,0,0,0,508,509,5,31,0,0,509,510,5,81,0,0,510,511, + 3,6,3,0,511,512,5,83,0,0,512,513,3,6,3,0,513,514,5,83,0,0,514,515, + 3,6,3,0,515,516,5,82,0,0,516,554,1,0,0,0,517,518,5,37,0,0,518,519, + 5,81,0,0,519,520,3,6,3,0,520,521,5,83,0,0,521,522,3,6,3,0,522,523, + 5,83,0,0,523,524,3,6,3,0,524,525,5,82,0,0,525,554,1,0,0,0,526,527, + 5,39,0,0,527,528,5,81,0,0,528,529,3,6,3,0,529,530,5,83,0,0,530,531, + 3,6,3,0,531,532,5,83,0,0,532,533,3,6,3,0,533,534,5,82,0,0,534,554, + 1,0,0,0,535,536,5,51,0,0,536,537,5,81,0,0,537,538,3,6,3,0,538,539, + 5,83,0,0,539,540,3,6,3,0,540,541,5,83,0,0,541,542,3,6,3,0,542,543, + 5,82,0,0,543,554,1,0,0,0,544,545,5,63,0,0,545,546,5,81,0,0,546,547, + 3,6,3,0,547,548,5,83,0,0,548,549,3,6,3,0,549,550,5,83,0,0,550,551, + 3,6,3,0,551,552,5,82,0,0,552,554,1,0,0,0,553,508,1,0,0,0,553,517, + 1,0,0,0,553,526,1,0,0,0,553,535,1,0,0,0,553,544,1,0,0,0,554,29,1, + 0,0,0,555,556,5,48,0,0,556,557,5,81,0,0,557,558,3,6,3,0,558,559, + 5,83,0,0,559,560,3,6,3,0,560,561,5,83,0,0,561,562,3,6,3,0,562,563, + 5,83,0,0,563,564,3,6,3,0,564,565,5,82,0,0,565,31,1,0,0,0,566,567, + 5,19,0,0,567,568,5,81,0,0,568,573,3,6,3,0,569,570,5,83,0,0,570,572, + 3,6,3,0,571,569,1,0,0,0,572,575,1,0,0,0,573,571,1,0,0,0,573,574, + 1,0,0,0,574,576,1,0,0,0,575,573,1,0,0,0,576,577,5,82,0,0,577,638, + 1,0,0,0,578,579,5,20,0,0,579,580,5,81,0,0,580,585,3,6,3,0,581,582, + 5,83,0,0,582,584,3,6,3,0,583,581,1,0,0,0,584,587,1,0,0,0,585,583, + 1,0,0,0,585,586,1,0,0,0,586,588,1,0,0,0,587,585,1,0,0,0,588,589, + 5,82,0,0,589,638,1,0,0,0,590,591,5,45,0,0,591,592,5,81,0,0,592,595, + 3,6,3,0,593,594,5,83,0,0,594,596,3,6,3,0,595,593,1,0,0,0,596,597, + 1,0,0,0,597,595,1,0,0,0,597,598,1,0,0,0,598,599,1,0,0,0,599,600, + 5,82,0,0,600,638,1,0,0,0,601,602,5,46,0,0,602,603,5,81,0,0,603,606, + 3,6,3,0,604,605,5,83,0,0,605,607,3,6,3,0,606,604,1,0,0,0,607,608, + 1,0,0,0,608,606,1,0,0,0,608,609,1,0,0,0,609,610,1,0,0,0,610,611, + 5,82,0,0,611,638,1,0,0,0,612,613,5,47,0,0,613,614,5,81,0,0,614,617, + 3,6,3,0,615,616,5,83,0,0,616,618,3,6,3,0,617,615,1,0,0,0,618,619, + 1,0,0,0,619,617,1,0,0,0,619,620,1,0,0,0,620,621,1,0,0,0,621,622, + 5,82,0,0,622,638,1,0,0,0,623,624,5,49,0,0,624,625,5,81,0,0,625,626, + 3,6,3,0,626,627,5,83,0,0,627,628,3,6,3,0,628,629,5,82,0,0,629,638, + 1,0,0,0,630,631,5,50,0,0,631,632,5,81,0,0,632,633,3,6,3,0,633,634, + 5,83,0,0,634,635,3,6,3,0,635,636,5,82,0,0,636,638,1,0,0,0,637,566, + 1,0,0,0,637,578,1,0,0,0,637,590,1,0,0,0,637,601,1,0,0,0,637,612, + 1,0,0,0,637,623,1,0,0,0,637,630,1,0,0,0,638,33,1,0,0,0,27,37,46, + 58,63,86,88,100,102,117,119,127,134,146,153,178,186,189,196,399, + 506,553,573,585,597,608,619,637 ] class MathExprParser ( Parser ): @@ -246,7 +269,7 @@ class MathExprParser ( Parser ): "'moment'", "'cossim'", "'flip'", "'cov'", "'sort'", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "'>='", "'>'", "'<='", "'<'", "'=='", "'!='", "'|'", "'('", "')'", - "','", "'['", "']'" ] + "','", "';'", "'->'", "'['", "']'" ] symbolicNames = [ "", "SIN", "COS", "TAN", "ASIN", "ACOS", "ATAN", "ATAN2", "SINH", "COSH", "TANH", "ASINH", @@ -261,26 +284,31 @@ class MathExprParser ( Parser ): "DOT", "MOMENT", "COSSIM", "FLIP", "COV", "SORT", "PLUS", "MINUS", "MULT", "DIV", "MOD", "POW", "GE", "GT", "LE", "LT", "EQ", "NE", "PIPE", "LPAREN", "RPAREN", - "COMMA", "LBRACKET", "RBRACKET", "CONSTANT", "NUMBER", - "VARIABLE", "WS" ] + "COMMA", "SEMICOLON", "ARROW", "LBRACKET", "RBRACKET", + "CONSTANT", "NUMBER", "VARIABLE", "WS" ] - RULE_expr = 0 - RULE_compExpr = 1 - RULE_addExpr = 2 - RULE_mulExpr = 3 - RULE_powExpr = 4 - RULE_unaryExpr = 5 - RULE_indexExpr = 6 - RULE_atom = 7 - RULE_func1 = 8 - RULE_func2 = 9 - RULE_func3 = 10 - RULE_func4 = 11 - RULE_funcN = 12 + RULE_start = 0 + RULE_funcDef = 1 + RULE_paramList = 2 + RULE_expr = 3 + RULE_compExpr = 4 + RULE_addExpr = 5 + RULE_mulExpr = 6 + RULE_powExpr = 7 + RULE_unaryExpr = 8 + RULE_indexExpr = 9 + RULE_atom = 10 + RULE_exprList = 11 + RULE_func1 = 12 + RULE_func2 = 13 + RULE_func3 = 14 + RULE_func4 = 15 + RULE_funcN = 16 - ruleNames = [ "expr", "compExpr", "addExpr", "mulExpr", "powExpr", - "unaryExpr", "indexExpr", "atom", "func1", "func2", "func3", - "func4", "funcN" ] + ruleNames = [ "start", "funcDef", "paramList", "expr", "compExpr", + "addExpr", "mulExpr", "powExpr", "unaryExpr", "indexExpr", + "atom", "exprList", "func1", "func2", "func3", "func4", + "funcN" ] EOF = Token.EOF SIN=1 @@ -366,12 +394,14 @@ class MathExprParser ( Parser ): LPAREN=81 RPAREN=82 COMMA=83 - LBRACKET=84 - RBRACKET=85 - CONSTANT=86 - NUMBER=87 - VARIABLE=88 - WS=89 + SEMICOLON=84 + ARROW=85 + LBRACKET=86 + RBRACKET=87 + CONSTANT=88 + NUMBER=89 + VARIABLE=90 + WS=91 def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) @@ -382,6 +412,215 @@ class MathExprParser ( Parser ): + class StartContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expr(self): + return self.getTypedRuleContext(MathExprParser.ExprContext,0) + + + def EOF(self): + return self.getToken(MathExprParser.EOF, 0) + + def funcDef(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(MathExprParser.FuncDefContext) + else: + return self.getTypedRuleContext(MathExprParser.FuncDefContext,i) + + + def getRuleIndex(self): + return MathExprParser.RULE_start + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitStart" ): + return visitor.visitStart(self) + else: + return visitor.visitChildren(self) + + + + + def start(self): + + localctx = MathExprParser.StartContext(self, self._ctx, self.state) + self.enterRule(localctx, 0, self.RULE_start) + try: + self.enterOuterAlt(localctx, 1) + self.state = 37 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,0,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 34 + self.funcDef() + self.state = 39 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,0,self._ctx) + + self.state = 40 + self.expr() + self.state = 41 + self.match(MathExprParser.EOF) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FuncDefContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return MathExprParser.RULE_funcDef + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class FunctionDefContext(FuncDefContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.FuncDefContext + super().__init__(parser) + self.copyFrom(ctx) + + def VARIABLE(self): + return self.getToken(MathExprParser.VARIABLE, 0) + def LPAREN(self): + return self.getToken(MathExprParser.LPAREN, 0) + def RPAREN(self): + return self.getToken(MathExprParser.RPAREN, 0) + def ARROW(self): + return self.getToken(MathExprParser.ARROW, 0) + def expr(self): + return self.getTypedRuleContext(MathExprParser.ExprContext,0) + + def SEMICOLON(self): + return self.getToken(MathExprParser.SEMICOLON, 0) + def paramList(self): + return self.getTypedRuleContext(MathExprParser.ParamListContext,0) + + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunctionDef" ): + return visitor.visitFunctionDef(self) + else: + return visitor.visitChildren(self) + + + + def funcDef(self): + + localctx = MathExprParser.FuncDefContext(self, self._ctx, self.state) + self.enterRule(localctx, 2, self.RULE_funcDef) + self._la = 0 # Token type + try: + localctx = MathExprParser.FunctionDefContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 43 + self.match(MathExprParser.VARIABLE) + self.state = 44 + self.match(MathExprParser.LPAREN) + self.state = 46 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==90: + self.state = 45 + self.paramList() + + + self.state = 48 + self.match(MathExprParser.RPAREN) + self.state = 49 + self.match(MathExprParser.ARROW) + self.state = 50 + self.expr() + self.state = 51 + self.match(MathExprParser.SEMICOLON) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ParamListContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def VARIABLE(self, i:int=None): + if i is None: + return self.getTokens(MathExprParser.VARIABLE) + else: + return self.getToken(MathExprParser.VARIABLE, i) + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(MathExprParser.COMMA) + else: + return self.getToken(MathExprParser.COMMA, i) + + def getRuleIndex(self): + return MathExprParser.RULE_paramList + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitParamList" ): + return visitor.visitParamList(self) + else: + return visitor.visitChildren(self) + + + + + def paramList(self): + + localctx = MathExprParser.ParamListContext(self, self._ctx, self.state) + self.enterRule(localctx, 4, self.RULE_paramList) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 53 + self.match(MathExprParser.VARIABLE) + self.state = 58 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==83: + self.state = 54 + self.match(MathExprParser.COMMA) + self.state = 55 + self.match(MathExprParser.VARIABLE) + self.state = 60 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + class ExprContext(ParserRuleContext): __slots__ = 'parser' @@ -400,14 +639,6 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_expr - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterExpr" ): - listener.enterExpr(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitExpr" ): - listener.exitExpr(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitExpr" ): return visitor.visitExpr(self) @@ -420,20 +651,20 @@ class MathExprParser ( Parser ): def expr(self): localctx = MathExprParser.ExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 0, self.RULE_expr) + self.enterRule(localctx, 6, self.RULE_expr) try: - self.state = 28 + self.state = 63 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,0,self._ctx) + la_ = self._interp.adaptivePredict(self._input,3,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 26 + self.state = 61 self.atom() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 27 + self.state = 62 self.compExpr(0) pass @@ -478,14 +709,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterLtExp" ): - listener.enterLtExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitLtExp" ): - listener.exitLtExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitLtExp" ): return visitor.visitLtExp(self) @@ -508,14 +731,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterEqExp" ): - listener.enterEqExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitEqExp" ): - listener.exitEqExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitEqExp" ): return visitor.visitEqExp(self) @@ -533,14 +748,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterToAdd" ): - listener.enterToAdd(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitToAdd" ): - listener.exitToAdd(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitToAdd" ): return visitor.visitToAdd(self) @@ -563,14 +770,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterGeExp" ): - listener.enterGeExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitGeExp" ): - listener.exitGeExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitGeExp" ): return visitor.visitGeExp(self) @@ -593,14 +792,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterLeExp" ): - listener.enterLeExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitLeExp" ): - listener.exitLeExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitLeExp" ): return visitor.visitLeExp(self) @@ -623,14 +814,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterNeExp" ): - listener.enterNeExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitNeExp" ): - listener.exitNeExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitNeExp" ): return visitor.visitNeExp(self) @@ -653,14 +836,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterGtExp" ): - listener.enterGtExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitGtExp" ): - listener.exitGtExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitGtExp" ): return visitor.visitGtExp(self) @@ -674,110 +849,110 @@ class MathExprParser ( Parser ): _parentState = self.state localctx = MathExprParser.CompExprContext(self, self._ctx, _parentState) _prevctx = localctx - _startState = 2 - self.enterRecursionRule(localctx, 2, self.RULE_compExpr, _p) + _startState = 8 + self.enterRecursionRule(localctx, 8, self.RULE_compExpr, _p) try: self.enterOuterAlt(localctx, 1) localctx = MathExprParser.ToAddContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 31 + self.state = 66 self.addExpr(0) self._ctx.stop = self._input.LT(-1) - self.state = 53 + self.state = 88 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,2,self._ctx) + _alt = self._interp.adaptivePredict(self._input,5,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx - self.state = 51 + self.state = 86 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,1,self._ctx) + la_ = self._interp.adaptivePredict(self._input,4,self._ctx) if la_ == 1: localctx = MathExprParser.GtExpContext(self, MathExprParser.CompExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_compExpr) - self.state = 33 + self.state = 68 if not self.precpred(self._ctx, 7): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 7)") - self.state = 34 + self.state = 69 self.match(MathExprParser.GT) - self.state = 35 + self.state = 70 self.addExpr(0) pass elif la_ == 2: localctx = MathExprParser.GeExpContext(self, MathExprParser.CompExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_compExpr) - self.state = 36 + self.state = 71 if not self.precpred(self._ctx, 6): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 6)") - self.state = 37 + self.state = 72 self.match(MathExprParser.GE) - self.state = 38 + self.state = 73 self.addExpr(0) pass elif la_ == 3: localctx = MathExprParser.LtExpContext(self, MathExprParser.CompExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_compExpr) - self.state = 39 + self.state = 74 if not self.precpred(self._ctx, 5): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 5)") - self.state = 40 + self.state = 75 self.match(MathExprParser.LT) - self.state = 41 + self.state = 76 self.addExpr(0) pass elif la_ == 4: localctx = MathExprParser.LeExpContext(self, MathExprParser.CompExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_compExpr) - self.state = 42 + self.state = 77 if not self.precpred(self._ctx, 4): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") - self.state = 43 + self.state = 78 self.match(MathExprParser.LE) - self.state = 44 + self.state = 79 self.addExpr(0) pass elif la_ == 5: localctx = MathExprParser.EqExpContext(self, MathExprParser.CompExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_compExpr) - self.state = 45 + self.state = 80 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") - self.state = 46 + self.state = 81 self.match(MathExprParser.EQ) - self.state = 47 + self.state = 82 self.addExpr(0) pass elif la_ == 6: localctx = MathExprParser.NeExpContext(self, MathExprParser.CompExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_compExpr) - self.state = 48 + self.state = 83 if not self.precpred(self._ctx, 2): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") - self.state = 49 + self.state = 84 self.match(MathExprParser.NE) - self.state = 50 + self.state = 85 self.addExpr(0) pass - self.state = 55 + self.state = 90 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,2,self._ctx) + _alt = self._interp.adaptivePredict(self._input,5,self._ctx) except RecognitionException as re: localctx.exception = re @@ -819,14 +994,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.MulExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAddExp" ): - listener.enterAddExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAddExp" ): - listener.exitAddExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAddExp" ): return visitor.visitAddExp(self) @@ -844,14 +1011,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.MulExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterToMul" ): - listener.enterToMul(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitToMul" ): - listener.exitToMul(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitToMul" ): return visitor.visitToMul(self) @@ -874,14 +1033,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.MulExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSubExp" ): - listener.enterSubExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSubExp" ): - listener.exitSubExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSubExp" ): return visitor.visitSubExp(self) @@ -895,58 +1046,58 @@ class MathExprParser ( Parser ): _parentState = self.state localctx = MathExprParser.AddExprContext(self, self._ctx, _parentState) _prevctx = localctx - _startState = 4 - self.enterRecursionRule(localctx, 4, self.RULE_addExpr, _p) + _startState = 10 + self.enterRecursionRule(localctx, 10, self.RULE_addExpr, _p) try: self.enterOuterAlt(localctx, 1) localctx = MathExprParser.ToMulContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 57 + self.state = 92 self.mulExpr(0) self._ctx.stop = self._input.LT(-1) - self.state = 67 + self.state = 102 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,4,self._ctx) + _alt = self._interp.adaptivePredict(self._input,7,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx - self.state = 65 + self.state = 100 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,3,self._ctx) + la_ = self._interp.adaptivePredict(self._input,6,self._ctx) if la_ == 1: localctx = MathExprParser.AddExpContext(self, MathExprParser.AddExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_addExpr) - self.state = 59 + self.state = 94 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") - self.state = 60 + self.state = 95 self.match(MathExprParser.PLUS) - self.state = 61 + self.state = 96 self.mulExpr(0) pass elif la_ == 2: localctx = MathExprParser.SubExpContext(self, MathExprParser.AddExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_addExpr) - self.state = 62 + self.state = 97 if not self.precpred(self._ctx, 2): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") - self.state = 63 + self.state = 98 self.match(MathExprParser.MINUS) - self.state = 64 + self.state = 99 self.mulExpr(0) pass - self.state = 69 + self.state = 104 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,4,self._ctx) + _alt = self._interp.adaptivePredict(self._input,7,self._ctx) except RecognitionException as re: localctx.exception = re @@ -988,14 +1139,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterMulExp" ): - listener.enterMulExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitMulExp" ): - listener.exitMulExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitMulExp" ): return visitor.visitMulExp(self) @@ -1018,14 +1161,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterModExp" ): - listener.enterModExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitModExp" ): - listener.exitModExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitModExp" ): return visitor.visitModExp(self) @@ -1048,14 +1183,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterDivExp" ): - listener.enterDivExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitDivExp" ): - listener.exitDivExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitDivExp" ): return visitor.visitDivExp(self) @@ -1073,14 +1200,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterToPow" ): - listener.enterToPow(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitToPow" ): - listener.exitToPow(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitToPow" ): return visitor.visitToPow(self) @@ -1094,71 +1213,71 @@ class MathExprParser ( Parser ): _parentState = self.state localctx = MathExprParser.MulExprContext(self, self._ctx, _parentState) _prevctx = localctx - _startState = 6 - self.enterRecursionRule(localctx, 6, self.RULE_mulExpr, _p) + _startState = 12 + self.enterRecursionRule(localctx, 12, self.RULE_mulExpr, _p) try: self.enterOuterAlt(localctx, 1) localctx = MathExprParser.ToPowContext(self, localctx) self._ctx = localctx _prevctx = localctx - self.state = 71 + self.state = 106 self.powExpr() self._ctx.stop = self._input.LT(-1) - self.state = 84 + self.state = 119 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,6,self._ctx) + _alt = self._interp.adaptivePredict(self._input,9,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx - self.state = 82 + self.state = 117 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,5,self._ctx) + la_ = self._interp.adaptivePredict(self._input,8,self._ctx) if la_ == 1: localctx = MathExprParser.MulExpContext(self, MathExprParser.MulExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_mulExpr) - self.state = 73 + self.state = 108 if not self.precpred(self._ctx, 4): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") - self.state = 74 + self.state = 109 self.match(MathExprParser.MULT) - self.state = 75 + self.state = 110 self.powExpr() pass elif la_ == 2: localctx = MathExprParser.DivExpContext(self, MathExprParser.MulExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_mulExpr) - self.state = 76 + self.state = 111 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") - self.state = 77 + self.state = 112 self.match(MathExprParser.DIV) - self.state = 78 + self.state = 113 self.powExpr() pass elif la_ == 3: localctx = MathExprParser.ModExpContext(self, MathExprParser.MulExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_mulExpr) - self.state = 79 + self.state = 114 if not self.precpred(self._ctx, 2): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") - self.state = 80 + self.state = 115 self.match(MathExprParser.MOD) - self.state = 81 + self.state = 116 self.powExpr() pass - self.state = 86 + self.state = 121 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,6,self._ctx) + _alt = self._interp.adaptivePredict(self._input,9,self._ctx) except RecognitionException as re: localctx.exception = re @@ -1201,14 +1320,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterPowExp" ): - listener.enterPowExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitPowExp" ): - listener.exitPowExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitPowExp" ): return visitor.visitPowExp(self) @@ -1226,14 +1337,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.UnaryExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterToUnary" ): - listener.enterToUnary(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitToUnary" ): - listener.exitToUnary(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitToUnary" ): return visitor.visitToUnary(self) @@ -1245,26 +1348,26 @@ class MathExprParser ( Parser ): def powExpr(self): localctx = MathExprParser.PowExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 8, self.RULE_powExpr) + self.enterRule(localctx, 14, self.RULE_powExpr) try: - self.state = 92 + self.state = 127 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,7,self._ctx) + la_ = self._interp.adaptivePredict(self._input,10,self._ctx) if la_ == 1: localctx = MathExprParser.PowExpContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 87 + self.state = 122 self.unaryExpr() - self.state = 88 + self.state = 123 self.match(MathExprParser.POW) - self.state = 89 + self.state = 124 self.powExpr() pass elif la_ == 2: localctx = MathExprParser.ToUnaryContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 91 + self.state = 126 self.unaryExpr() pass @@ -1307,14 +1410,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.UnaryExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterUnaryPlus" ): - listener.enterUnaryPlus(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitUnaryPlus" ): - listener.exitUnaryPlus(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitUnaryPlus" ): return visitor.visitUnaryPlus(self) @@ -1334,14 +1429,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.UnaryExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterUnaryMinus" ): - listener.enterUnaryMinus(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitUnaryMinus" ): - listener.exitUnaryMinus(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitUnaryMinus" ): return visitor.visitUnaryMinus(self) @@ -1359,14 +1446,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.IndexExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterToIndex" ): - listener.enterToIndex(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitToIndex" ): - listener.exitToIndex(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitToIndex" ): return visitor.visitToIndex(self) @@ -1378,31 +1457,31 @@ class MathExprParser ( Parser ): def unaryExpr(self): localctx = MathExprParser.UnaryExprContext(self, self._ctx, self.state) - self.enterRule(localctx, 10, self.RULE_unaryExpr) + self.enterRule(localctx, 16, self.RULE_unaryExpr) try: - self.state = 99 + self.state = 134 self._errHandler.sync(self) token = self._input.LA(1) if token in [68]: localctx = MathExprParser.UnaryPlusContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 94 + self.state = 129 self.match(MathExprParser.PLUS) - self.state = 95 + self.state = 130 self.unaryExpr() pass elif token in [69]: localctx = MathExprParser.UnaryMinusContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 96 + self.state = 131 self.match(MathExprParser.MINUS) - self.state = 97 + self.state = 132 self.unaryExpr() pass - elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 80, 81, 84, 86, 87, 88]: + elif token in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 80, 81, 86, 88, 89, 90]: localctx = MathExprParser.ToIndexContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 98 + self.state = 133 self.indexExpr(0) pass else: @@ -1458,14 +1537,6 @@ class MathExprParser ( Parser ): else: return self.getToken(MathExprParser.COMMA, i) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterIndexExp" ): - listener.enterIndexExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitIndexExp" ): - listener.exitIndexExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitIndexExp" ): return visitor.visitIndexExp(self) @@ -1483,14 +1554,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.AtomContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterToAtom" ): - listener.enterToAtom(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitToAtom" ): - listener.exitToAtom(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitToAtom" ): return visitor.visitToAtom(self) @@ -1504,8 +1567,8 @@ class MathExprParser ( Parser ): _parentState = self.state localctx = MathExprParser.IndexExprContext(self, self._ctx, _parentState) _prevctx = localctx - _startState = 12 - self.enterRecursionRule(localctx, 12, self.RULE_indexExpr, _p) + _startState = 18 + self.enterRecursionRule(localctx, 18, self.RULE_indexExpr, _p) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) @@ -1513,12 +1576,12 @@ class MathExprParser ( Parser ): self._ctx = localctx _prevctx = localctx - self.state = 102 + self.state = 137 self.atom() self._ctx.stop = self._input.LT(-1) - self.state = 118 + self.state = 153 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,10,self._ctx) + _alt = self._interp.adaptivePredict(self._input,13,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: if self._parseListeners is not None: @@ -1526,31 +1589,31 @@ class MathExprParser ( Parser ): _prevctx = localctx localctx = MathExprParser.IndexExpContext(self, MathExprParser.IndexExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_indexExpr) - self.state = 104 + self.state = 139 if not self.precpred(self._ctx, 2): from antlr4.error.Errors import FailedPredicateException raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") - self.state = 105 + self.state = 140 self.match(MathExprParser.LBRACKET) - self.state = 106 + self.state = 141 self.expr() - self.state = 111 + self.state = 146 self._errHandler.sync(self) _la = self._input.LA(1) while _la==83: - self.state = 107 + self.state = 142 self.match(MathExprParser.COMMA) - self.state = 108 + self.state = 143 self.expr() - self.state = 113 + self.state = 148 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 114 + self.state = 149 self.match(MathExprParser.RBRACKET) - self.state = 120 + self.state = 155 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,10,self._ctx) + _alt = self._interp.adaptivePredict(self._input,13,self._ctx) except RecognitionException as re: localctx.exception = re @@ -1588,14 +1651,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.Func4Context,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterFunc4Exp" ): - listener.enterFunc4Exp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitFunc4Exp" ): - listener.exitFunc4Exp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitFunc4Exp" ): return visitor.visitFunc4Exp(self) @@ -1613,14 +1668,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.Func2Context,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterFunc2Exp" ): - listener.enterFunc2Exp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitFunc2Exp" ): - listener.exitFunc2Exp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitFunc2Exp" ): return visitor.visitFunc2Exp(self) @@ -1637,14 +1684,6 @@ class MathExprParser ( Parser ): def VARIABLE(self): return self.getToken(MathExprParser.VARIABLE, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterVariableExp" ): - listener.enterVariableExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitVariableExp" ): - listener.exitVariableExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitVariableExp" ): return visitor.visitVariableExp(self) @@ -1652,6 +1691,29 @@ class MathExprParser ( Parser ): return visitor.visitChildren(self) + class CallExpContext(AtomContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext + super().__init__(parser) + self.copyFrom(ctx) + + def VARIABLE(self): + return self.getToken(MathExprParser.VARIABLE, 0) + def LPAREN(self): + return self.getToken(MathExprParser.LPAREN, 0) + def RPAREN(self): + return self.getToken(MathExprParser.RPAREN, 0) + def exprList(self): + return self.getTypedRuleContext(MathExprParser.ExprListContext,0) + + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCallExp" ): + return visitor.visitCallExp(self) + else: + return visitor.visitChildren(self) + + class Func3ExpContext(AtomContext): def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext @@ -1662,14 +1724,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.Func3Context,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterFunc3Exp" ): - listener.enterFunc3Exp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitFunc3Exp" ): - listener.exitFunc3Exp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitFunc3Exp" ): return visitor.visitFunc3Exp(self) @@ -1691,14 +1745,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterParenExp" ): - listener.enterParenExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitParenExp" ): - listener.exitParenExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitParenExp" ): return visitor.visitParenExp(self) @@ -1715,14 +1761,6 @@ class MathExprParser ( Parser ): def CONSTANT(self): return self.getToken(MathExprParser.CONSTANT, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterConstantExp" ): - listener.enterConstantExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitConstantExp" ): - listener.exitConstantExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitConstantExp" ): return visitor.visitConstantExp(self) @@ -1740,14 +1778,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.Func1Context,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterFunc1Exp" ): - listener.enterFunc1Exp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitFunc1Exp" ): - listener.exitFunc1Exp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitFunc1Exp" ): return visitor.visitFunc1Exp(self) @@ -1765,14 +1795,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.FuncNContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterFuncNExp" ): - listener.enterFuncNExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitFuncNExp" ): - listener.exitFuncNExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitFuncNExp" ): return visitor.visitFuncNExp(self) @@ -1789,14 +1811,6 @@ class MathExprParser ( Parser ): def NUMBER(self): return self.getToken(MathExprParser.NUMBER, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterNumberExp" ): - listener.enterNumberExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitNumberExp" ): - listener.exitNumberExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitNumberExp" ): return visitor.visitNumberExp(self) @@ -1819,14 +1833,6 @@ class MathExprParser ( Parser ): return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAbsExp" ): - listener.enterAbsExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAbsExp" ): - listener.exitAbsExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAbsExp" ): return visitor.visitAbsExp(self) @@ -1856,14 +1862,6 @@ class MathExprParser ( Parser ): else: return self.getToken(MathExprParser.COMMA, i) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterListExp" ): - listener.enterListExp(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitListExp" ): - listener.exitListExp(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitListExp" ): return visitor.visitListExp(self) @@ -1875,104 +1873,194 @@ class MathExprParser ( Parser ): def atom(self): localctx = MathExprParser.AtomContext(self, self._ctx, self.state) - self.enterRule(localctx, 14, self.RULE_atom) + self.enterRule(localctx, 20, self.RULE_atom) self._la = 0 # Token type try: - self.state = 148 + self.state = 189 self._errHandler.sync(self) - token = self._input.LA(1) - if token in [1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 23, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 40, 41, 42, 43, 44, 54, 55, 56, 57, 58, 67]: + la_ = self._interp.adaptivePredict(self._input,16,self._ctx) + if la_ == 1: localctx = MathExprParser.Func1ExpContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 121 + self.state = 156 self.func1() pass - elif token in [7, 21, 22, 29, 38, 52, 53, 59, 60, 61, 62, 64, 65, 66]: + + elif la_ == 2: localctx = MathExprParser.Func2ExpContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 122 + self.state = 157 self.func2() pass - elif token in [31, 37, 39, 51, 63]: + + elif la_ == 3: localctx = MathExprParser.Func3ExpContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 123 + self.state = 158 self.func3() pass - elif token in [48]: + + elif la_ == 4: localctx = MathExprParser.Func4ExpContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 124 + self.state = 159 self.func4() pass - elif token in [19, 20, 45, 46, 47, 49, 50]: + + elif la_ == 5: localctx = MathExprParser.FuncNExpContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 125 + self.state = 160 self.funcN() pass - elif token in [88]: + + elif la_ == 6: localctx = MathExprParser.VariableExpContext(self, localctx) self.enterOuterAlt(localctx, 6) - self.state = 126 + self.state = 161 self.match(MathExprParser.VARIABLE) pass - elif token in [87]: + + elif la_ == 7: localctx = MathExprParser.NumberExpContext(self, localctx) self.enterOuterAlt(localctx, 7) - self.state = 127 + self.state = 162 self.match(MathExprParser.NUMBER) pass - elif token in [86]: + + elif la_ == 8: localctx = MathExprParser.ConstantExpContext(self, localctx) self.enterOuterAlt(localctx, 8) - self.state = 128 + self.state = 163 self.match(MathExprParser.CONSTANT) pass - elif token in [81]: + + elif la_ == 9: localctx = MathExprParser.ParenExpContext(self, localctx) self.enterOuterAlt(localctx, 9) - self.state = 129 + self.state = 164 self.match(MathExprParser.LPAREN) - self.state = 130 + self.state = 165 self.expr() - self.state = 131 + self.state = 166 self.match(MathExprParser.RPAREN) pass - elif token in [80]: + + elif la_ == 10: localctx = MathExprParser.AbsExpContext(self, localctx) self.enterOuterAlt(localctx, 10) - self.state = 133 + self.state = 168 self.match(MathExprParser.PIPE) - self.state = 134 + self.state = 169 self.expr() - self.state = 135 + self.state = 170 self.match(MathExprParser.PIPE) pass - elif token in [84]: + + elif la_ == 11: localctx = MathExprParser.ListExpContext(self, localctx) self.enterOuterAlt(localctx, 11) - self.state = 137 + self.state = 172 self.match(MathExprParser.LBRACKET) - self.state = 138 + self.state = 173 self.expr() - self.state = 143 + self.state = 178 self._errHandler.sync(self) _la = self._input.LA(1) while _la==83: - self.state = 139 + self.state = 174 self.match(MathExprParser.COMMA) - self.state = 140 + self.state = 175 self.expr() - self.state = 145 + self.state = 180 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 146 + self.state = 181 self.match(MathExprParser.RBRACKET) pass + + elif la_ == 12: + localctx = MathExprParser.CallExpContext(self, localctx) + self.enterOuterAlt(localctx, 12) + self.state = 183 + self.match(MathExprParser.VARIABLE) + self.state = 184 + self.match(MathExprParser.LPAREN) + self.state = 186 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & -2) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & 121831487) != 0): + self.state = 185 + self.exprList() + + + self.state = 188 + self.match(MathExprParser.RPAREN) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExprListContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - raise NoViableAltException(self) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) + + + def COMMA(self, i:int=None): + if i is None: + return self.getTokens(MathExprParser.COMMA) + else: + return self.getToken(MathExprParser.COMMA, i) + + def getRuleIndex(self): + return MathExprParser.RULE_exprList + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExprList" ): + return visitor.visitExprList(self) + else: + return visitor.visitChildren(self) + + + + + def exprList(self): + + localctx = MathExprParser.ExprListContext(self, self._ctx, self.state) + self.enterRule(localctx, 22, self.RULE_exprList) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 191 + self.expr() + self.state = 196 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==83: + self.state = 192 + self.match(MathExprParser.COMMA) + self.state = 193 + self.expr() + self.state = 198 + self._errHandler.sync(self) + _la = self._input.LA(1) except RecognitionException as re: localctx.exception = re @@ -2016,14 +2104,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSoftplusFunc" ): - listener.enterSoftplusFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSoftplusFunc" ): - listener.exitSoftplusFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSoftplusFunc" ): return visitor.visitSoftplusFunc(self) @@ -2047,14 +2127,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSortFunc" ): - listener.enterSortFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSortFunc" ): - listener.exitSortFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSortFunc" ): return visitor.visitSortFunc(self) @@ -2078,14 +2150,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterTanhFunc" ): - listener.enterTanhFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitTanhFunc" ): - listener.exitTanhFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitTanhFunc" ): return visitor.visitTanhFunc(self) @@ -2109,14 +2173,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAcoshFunc" ): - listener.enterAcoshFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAcoshFunc" ): - listener.exitAcoshFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAcoshFunc" ): return visitor.visitAcoshFunc(self) @@ -2140,14 +2196,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSqrtFunc" ): - listener.enterSqrtFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSqrtFunc" ): - listener.exitSqrtFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSqrtFunc" ): return visitor.visitSqrtFunc(self) @@ -2171,14 +2219,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterFloorFunc" ): - listener.enterFloorFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitFloorFunc" ): - listener.exitFloorFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitFloorFunc" ): return visitor.visitFloorFunc(self) @@ -2202,14 +2242,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterRoundFunc" ): - listener.enterRoundFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitRoundFunc" ): - listener.exitRoundFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitRoundFunc" ): return visitor.visitRoundFunc(self) @@ -2233,14 +2265,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterMeanFunc" ): - listener.enterMeanFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitMeanFunc" ): - listener.exitMeanFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitMeanFunc" ): return visitor.visitMeanFunc(self) @@ -2264,14 +2288,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterCeilFunc" ): - listener.enterCeilFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitCeilFunc" ): - listener.exitCeilFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitCeilFunc" ): return visitor.visitCeilFunc(self) @@ -2295,14 +2311,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterGeluFunc" ): - listener.enterGeluFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitGeluFunc" ): - listener.exitGeluFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitGeluFunc" ): return visitor.visitGeluFunc(self) @@ -2326,14 +2334,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterPrintFunc" ): - listener.enterPrintFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitPrintFunc" ): - listener.exitPrintFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitPrintFunc" ): return visitor.visitPrintFunc(self) @@ -2357,14 +2357,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAbsFunc" ): - listener.enterAbsFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAbsFunc" ): - listener.exitAbsFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAbsFunc" ): return visitor.visitAbsFunc(self) @@ -2388,14 +2380,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAtanFunc" ): - listener.enterAtanFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAtanFunc" ): - listener.exitAtanFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAtanFunc" ): return visitor.visitAtanFunc(self) @@ -2419,14 +2403,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterReluFunc" ): - listener.enterReluFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitReluFunc" ): - listener.exitReluFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitReluFunc" ): return visitor.visitReluFunc(self) @@ -2450,14 +2426,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSinhFunc" ): - listener.enterSinhFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSinhFunc" ): - listener.exitSinhFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSinhFunc" ): return visitor.visitSinhFunc(self) @@ -2481,14 +2449,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSigmoidFunc" ): - listener.enterSigmoidFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSigmoidFunc" ): - listener.exitSigmoidFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSigmoidFunc" ): return visitor.visitSigmoidFunc(self) @@ -2512,14 +2472,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterLogFunc" ): - listener.enterLogFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitLogFunc" ): - listener.exitLogFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitLogFunc" ): return visitor.visitLogFunc(self) @@ -2543,14 +2495,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterLnFunc" ): - listener.enterLnFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitLnFunc" ): - listener.exitLnFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitLnFunc" ): return visitor.visitLnFunc(self) @@ -2574,14 +2518,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterTNormFunc" ): - listener.enterTNormFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitTNormFunc" ): - listener.exitTNormFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitTNormFunc" ): return visitor.visitTNormFunc(self) @@ -2605,14 +2541,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSNormFunc" ): - listener.enterSNormFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSNormFunc" ): - listener.exitSNormFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSNormFunc" ): return visitor.visitSNormFunc(self) @@ -2636,14 +2564,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSinFunc" ): - listener.enterSinFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSinFunc" ): - listener.exitSinFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSinFunc" ): return visitor.visitSinFunc(self) @@ -2667,14 +2587,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterStdFunc" ): - listener.enterStdFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitStdFunc" ): - listener.exitStdFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitStdFunc" ): return visitor.visitStdFunc(self) @@ -2698,14 +2610,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAcosFunc" ): - listener.enterAcosFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAcosFunc" ): - listener.exitAcosFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAcosFunc" ): return visitor.visitAcosFunc(self) @@ -2729,14 +2633,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterCoshFunc" ): - listener.enterCoshFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitCoshFunc" ): - listener.exitCoshFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitCoshFunc" ): return visitor.visitCoshFunc(self) @@ -2760,14 +2656,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAnglFunc" ): - listener.enterAnglFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAnglFunc" ): - listener.exitAnglFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAnglFunc" ): return visitor.visitAnglFunc(self) @@ -2791,14 +2679,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSumFunc" ): - listener.enterSumFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSumFunc" ): - listener.exitSumFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSumFunc" ): return visitor.visitSumFunc(self) @@ -2822,14 +2702,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSignFunc" ): - listener.enterSignFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSignFunc" ): - listener.exitSignFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSignFunc" ): return visitor.visitSignFunc(self) @@ -2853,14 +2725,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterTanFunc" ): - listener.enterTanFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitTanFunc" ): - listener.exitTanFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitTanFunc" ): return visitor.visitTanFunc(self) @@ -2884,14 +2748,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterPinvFunc" ): - listener.enterPinvFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitPinvFunc" ): - listener.exitPinvFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitPinvFunc" ): return visitor.visitPinvFunc(self) @@ -2915,14 +2771,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSifftFunc" ): - listener.enterSifftFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSifftFunc" ): - listener.exitSifftFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSifftFunc" ): return visitor.visitSifftFunc(self) @@ -2946,14 +2794,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterFractFunc" ): - listener.enterFractFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitFractFunc" ): - listener.exitFractFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitFractFunc" ): return visitor.visitFractFunc(self) @@ -2977,14 +2817,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterGammaFunc" ): - listener.enterGammaFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitGammaFunc" ): - listener.exitGammaFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitGammaFunc" ): return visitor.visitGammaFunc(self) @@ -3008,14 +2840,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterCosFunc" ): - listener.enterCosFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitCosFunc" ): - listener.exitCosFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitCosFunc" ): return visitor.visitCosFunc(self) @@ -3039,14 +2863,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterVarFunc" ): - listener.enterVarFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitVarFunc" ): - listener.exitVarFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitVarFunc" ): return visitor.visitVarFunc(self) @@ -3070,14 +2886,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAsinFunc" ): - listener.enterAsinFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAsinFunc" ): - listener.exitAsinFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAsinFunc" ): return visitor.visitAsinFunc(self) @@ -3101,14 +2909,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAsinhFunc" ): - listener.enterAsinhFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAsinhFunc" ): - listener.exitAsinhFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAsinhFunc" ): return visitor.visitAsinhFunc(self) @@ -3132,14 +2932,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSfftFunc" ): - listener.enterSfftFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSfftFunc" ): - listener.exitSfftFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSfftFunc" ): return visitor.visitSfftFunc(self) @@ -3163,14 +2955,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAtanhFunc" ): - listener.enterAtanhFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAtanhFunc" ): - listener.exitAtanhFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAtanhFunc" ): return visitor.visitAtanhFunc(self) @@ -3194,14 +2978,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterExpFunc" ): - listener.enterExpFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitExpFunc" ): - listener.exitExpFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitExpFunc" ): return visitor.visitExpFunc(self) @@ -3225,14 +3001,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterPrintShapeFunc" ): - listener.enterPrintShapeFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitPrintShapeFunc" ): - listener.exitPrintShapeFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitPrintShapeFunc" ): return visitor.visitPrintShapeFunc(self) @@ -3244,489 +3012,489 @@ class MathExprParser ( Parser ): def func1(self): localctx = MathExprParser.Func1Context(self, self._ctx, self.state) - self.enterRule(localctx, 16, self.RULE_func1) + self.enterRule(localctx, 24, self.RULE_func1) try: - self.state = 350 + self.state = 399 self._errHandler.sync(self) token = self._input.LA(1) if token in [1]: localctx = MathExprParser.SinFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 150 + self.state = 199 self.match(MathExprParser.SIN) - self.state = 151 + self.state = 200 self.match(MathExprParser.LPAREN) - self.state = 152 + self.state = 201 self.expr() - self.state = 153 + self.state = 202 self.match(MathExprParser.RPAREN) pass elif token in [2]: localctx = MathExprParser.CosFuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 155 + self.state = 204 self.match(MathExprParser.COS) - self.state = 156 + self.state = 205 self.match(MathExprParser.LPAREN) - self.state = 157 + self.state = 206 self.expr() - self.state = 158 + self.state = 207 self.match(MathExprParser.RPAREN) pass elif token in [3]: localctx = MathExprParser.TanFuncContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 160 + self.state = 209 self.match(MathExprParser.TAN) - self.state = 161 + self.state = 210 self.match(MathExprParser.LPAREN) - self.state = 162 + self.state = 211 self.expr() - self.state = 163 + self.state = 212 self.match(MathExprParser.RPAREN) pass elif token in [4]: localctx = MathExprParser.AsinFuncContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 165 + self.state = 214 self.match(MathExprParser.ASIN) - self.state = 166 + self.state = 215 self.match(MathExprParser.LPAREN) - self.state = 167 + self.state = 216 self.expr() - self.state = 168 + self.state = 217 self.match(MathExprParser.RPAREN) pass elif token in [5]: localctx = MathExprParser.AcosFuncContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 170 + self.state = 219 self.match(MathExprParser.ACOS) - self.state = 171 + self.state = 220 self.match(MathExprParser.LPAREN) - self.state = 172 + self.state = 221 self.expr() - self.state = 173 + self.state = 222 self.match(MathExprParser.RPAREN) pass elif token in [6]: localctx = MathExprParser.AtanFuncContext(self, localctx) self.enterOuterAlt(localctx, 6) - self.state = 175 + self.state = 224 self.match(MathExprParser.ATAN) - self.state = 176 + self.state = 225 self.match(MathExprParser.LPAREN) - self.state = 177 + self.state = 226 self.expr() - self.state = 178 + self.state = 227 self.match(MathExprParser.RPAREN) pass elif token in [8]: localctx = MathExprParser.SinhFuncContext(self, localctx) self.enterOuterAlt(localctx, 7) - self.state = 180 + self.state = 229 self.match(MathExprParser.SINH) - self.state = 181 + self.state = 230 self.match(MathExprParser.LPAREN) - self.state = 182 + self.state = 231 self.expr() - self.state = 183 + self.state = 232 self.match(MathExprParser.RPAREN) pass elif token in [9]: localctx = MathExprParser.CoshFuncContext(self, localctx) self.enterOuterAlt(localctx, 8) - self.state = 185 + self.state = 234 self.match(MathExprParser.COSH) - self.state = 186 + self.state = 235 self.match(MathExprParser.LPAREN) - self.state = 187 + self.state = 236 self.expr() - self.state = 188 + self.state = 237 self.match(MathExprParser.RPAREN) pass elif token in [10]: localctx = MathExprParser.TanhFuncContext(self, localctx) self.enterOuterAlt(localctx, 9) - self.state = 190 + self.state = 239 self.match(MathExprParser.TANH) - self.state = 191 + self.state = 240 self.match(MathExprParser.LPAREN) - self.state = 192 + self.state = 241 self.expr() - self.state = 193 + self.state = 242 self.match(MathExprParser.RPAREN) pass elif token in [11]: localctx = MathExprParser.AsinhFuncContext(self, localctx) self.enterOuterAlt(localctx, 10) - self.state = 195 + self.state = 244 self.match(MathExprParser.ASINH) - self.state = 196 + self.state = 245 self.match(MathExprParser.LPAREN) - self.state = 197 + self.state = 246 self.expr() - self.state = 198 + self.state = 247 self.match(MathExprParser.RPAREN) pass elif token in [12]: localctx = MathExprParser.AcoshFuncContext(self, localctx) self.enterOuterAlt(localctx, 11) - self.state = 200 + self.state = 249 self.match(MathExprParser.ACOSH) - self.state = 201 + self.state = 250 self.match(MathExprParser.LPAREN) - self.state = 202 + self.state = 251 self.expr() - self.state = 203 + self.state = 252 self.match(MathExprParser.RPAREN) pass elif token in [13]: localctx = MathExprParser.AtanhFuncContext(self, localctx) self.enterOuterAlt(localctx, 12) - self.state = 205 + self.state = 254 self.match(MathExprParser.ATANH) - self.state = 206 + self.state = 255 self.match(MathExprParser.LPAREN) - self.state = 207 + self.state = 256 self.expr() - self.state = 208 + self.state = 257 self.match(MathExprParser.RPAREN) pass elif token in [14]: localctx = MathExprParser.AbsFuncContext(self, localctx) self.enterOuterAlt(localctx, 13) - self.state = 210 + self.state = 259 self.match(MathExprParser.ABS) - self.state = 211 + self.state = 260 self.match(MathExprParser.LPAREN) - self.state = 212 + self.state = 261 self.expr() - self.state = 213 + self.state = 262 self.match(MathExprParser.RPAREN) pass elif token in [15]: localctx = MathExprParser.SqrtFuncContext(self, localctx) self.enterOuterAlt(localctx, 14) - self.state = 215 + self.state = 264 self.match(MathExprParser.SQRT) - self.state = 216 + self.state = 265 self.match(MathExprParser.LPAREN) - self.state = 217 + self.state = 266 self.expr() - self.state = 218 + self.state = 267 self.match(MathExprParser.RPAREN) pass elif token in [16]: localctx = MathExprParser.LnFuncContext(self, localctx) self.enterOuterAlt(localctx, 15) - self.state = 220 + self.state = 269 self.match(MathExprParser.LN) - self.state = 221 + self.state = 270 self.match(MathExprParser.LPAREN) - self.state = 222 + self.state = 271 self.expr() - self.state = 223 + self.state = 272 self.match(MathExprParser.RPAREN) pass elif token in [17]: localctx = MathExprParser.LogFuncContext(self, localctx) self.enterOuterAlt(localctx, 16) - self.state = 225 + self.state = 274 self.match(MathExprParser.LOG) - self.state = 226 + self.state = 275 self.match(MathExprParser.LPAREN) - self.state = 227 + self.state = 276 self.expr() - self.state = 228 + self.state = 277 self.match(MathExprParser.RPAREN) pass elif token in [18]: localctx = MathExprParser.ExpFuncContext(self, localctx) self.enterOuterAlt(localctx, 17) - self.state = 230 + self.state = 279 self.match(MathExprParser.EXP) - self.state = 231 + self.state = 280 self.match(MathExprParser.LPAREN) - self.state = 232 + self.state = 281 self.expr() - self.state = 233 + self.state = 282 self.match(MathExprParser.RPAREN) pass elif token in [23]: localctx = MathExprParser.TNormFuncContext(self, localctx) self.enterOuterAlt(localctx, 18) - self.state = 235 + self.state = 284 self.match(MathExprParser.TNORM) - self.state = 236 + self.state = 285 self.match(MathExprParser.LPAREN) - self.state = 237 + self.state = 286 self.expr() - self.state = 238 + self.state = 287 self.match(MathExprParser.RPAREN) pass elif token in [24]: localctx = MathExprParser.SNormFuncContext(self, localctx) self.enterOuterAlt(localctx, 19) - self.state = 240 + self.state = 289 self.match(MathExprParser.SNORM) - self.state = 241 + self.state = 290 self.match(MathExprParser.LPAREN) - self.state = 242 + self.state = 291 self.expr() - self.state = 243 + self.state = 292 self.match(MathExprParser.RPAREN) pass elif token in [25]: localctx = MathExprParser.FloorFuncContext(self, localctx) self.enterOuterAlt(localctx, 20) - self.state = 245 + self.state = 294 self.match(MathExprParser.FLOOR) - self.state = 246 + self.state = 295 self.match(MathExprParser.LPAREN) - self.state = 247 + self.state = 296 self.expr() - self.state = 248 + self.state = 297 self.match(MathExprParser.RPAREN) pass elif token in [26]: localctx = MathExprParser.CeilFuncContext(self, localctx) self.enterOuterAlt(localctx, 21) - self.state = 250 + self.state = 299 self.match(MathExprParser.CEIL) - self.state = 251 + self.state = 300 self.match(MathExprParser.LPAREN) - self.state = 252 + self.state = 301 self.expr() - self.state = 253 + self.state = 302 self.match(MathExprParser.RPAREN) pass elif token in [27]: localctx = MathExprParser.RoundFuncContext(self, localctx) self.enterOuterAlt(localctx, 22) - self.state = 255 + self.state = 304 self.match(MathExprParser.ROUND) - self.state = 256 + self.state = 305 self.match(MathExprParser.LPAREN) - self.state = 257 + self.state = 306 self.expr() - self.state = 258 + self.state = 307 self.match(MathExprParser.RPAREN) pass elif token in [28]: localctx = MathExprParser.GammaFuncContext(self, localctx) self.enterOuterAlt(localctx, 23) - self.state = 260 + self.state = 309 self.match(MathExprParser.GAMMA) - self.state = 261 + self.state = 310 self.match(MathExprParser.LPAREN) - self.state = 262 + self.state = 311 self.expr() - self.state = 263 + self.state = 312 self.match(MathExprParser.RPAREN) pass elif token in [30]: localctx = MathExprParser.SigmoidFuncContext(self, localctx) self.enterOuterAlt(localctx, 24) - self.state = 265 + self.state = 314 self.match(MathExprParser.SIGM) - self.state = 266 + self.state = 315 self.match(MathExprParser.LPAREN) - self.state = 267 + self.state = 316 self.expr() - self.state = 268 + self.state = 317 self.match(MathExprParser.RPAREN) pass elif token in [32]: localctx = MathExprParser.SfftFuncContext(self, localctx) self.enterOuterAlt(localctx, 25) - self.state = 270 + self.state = 319 self.match(MathExprParser.SFFT) - self.state = 271 + self.state = 320 self.match(MathExprParser.LPAREN) - self.state = 272 + self.state = 321 self.expr() - self.state = 273 + self.state = 322 self.match(MathExprParser.RPAREN) pass elif token in [33]: localctx = MathExprParser.SifftFuncContext(self, localctx) self.enterOuterAlt(localctx, 26) - self.state = 275 + self.state = 324 self.match(MathExprParser.SIFFT) - self.state = 276 + self.state = 325 self.match(MathExprParser.LPAREN) - self.state = 277 + self.state = 326 self.expr() - self.state = 278 + self.state = 327 self.match(MathExprParser.RPAREN) pass elif token in [34]: localctx = MathExprParser.AnglFuncContext(self, localctx) self.enterOuterAlt(localctx, 27) - self.state = 280 + self.state = 329 self.match(MathExprParser.ANGL) - self.state = 281 + self.state = 330 self.match(MathExprParser.LPAREN) - self.state = 282 + self.state = 331 self.expr() - self.state = 283 + self.state = 332 self.match(MathExprParser.RPAREN) pass elif token in [35]: localctx = MathExprParser.PrintFuncContext(self, localctx) self.enterOuterAlt(localctx, 28) - self.state = 285 + self.state = 334 self.match(MathExprParser.PRNT) - self.state = 286 + self.state = 335 self.match(MathExprParser.LPAREN) - self.state = 287 + self.state = 336 self.expr() - self.state = 288 + self.state = 337 self.match(MathExprParser.RPAREN) pass elif token in [40]: localctx = MathExprParser.FractFuncContext(self, localctx) self.enterOuterAlt(localctx, 29) - self.state = 290 + self.state = 339 self.match(MathExprParser.FRACT) - self.state = 291 + self.state = 340 self.match(MathExprParser.LPAREN) - self.state = 292 + self.state = 341 self.expr() - self.state = 293 + self.state = 342 self.match(MathExprParser.RPAREN) pass elif token in [41]: localctx = MathExprParser.ReluFuncContext(self, localctx) self.enterOuterAlt(localctx, 30) - self.state = 295 + self.state = 344 self.match(MathExprParser.RELU) - self.state = 296 + self.state = 345 self.match(MathExprParser.LPAREN) - self.state = 297 + self.state = 346 self.expr() - self.state = 298 + self.state = 347 self.match(MathExprParser.RPAREN) pass elif token in [42]: localctx = MathExprParser.SoftplusFuncContext(self, localctx) self.enterOuterAlt(localctx, 31) - self.state = 300 + self.state = 349 self.match(MathExprParser.SOFTPLUS) - self.state = 301 + self.state = 350 self.match(MathExprParser.LPAREN) - self.state = 302 + self.state = 351 self.expr() - self.state = 303 + self.state = 352 self.match(MathExprParser.RPAREN) pass elif token in [43]: localctx = MathExprParser.GeluFuncContext(self, localctx) self.enterOuterAlt(localctx, 32) - self.state = 305 + self.state = 354 self.match(MathExprParser.GELU) - self.state = 306 + self.state = 355 self.match(MathExprParser.LPAREN) - self.state = 307 + self.state = 356 self.expr() - self.state = 308 + self.state = 357 self.match(MathExprParser.RPAREN) pass elif token in [44]: localctx = MathExprParser.SignFuncContext(self, localctx) self.enterOuterAlt(localctx, 33) - self.state = 310 + self.state = 359 self.match(MathExprParser.SIGN) - self.state = 311 + self.state = 360 self.match(MathExprParser.LPAREN) - self.state = 312 + self.state = 361 self.expr() - self.state = 313 + self.state = 362 self.match(MathExprParser.RPAREN) pass elif token in [36]: localctx = MathExprParser.PrintShapeFuncContext(self, localctx) self.enterOuterAlt(localctx, 34) - self.state = 315 + self.state = 364 self.match(MathExprParser.PRINT_SHAPE) - self.state = 316 + self.state = 365 self.match(MathExprParser.LPAREN) - self.state = 317 + self.state = 366 self.expr() - self.state = 318 + self.state = 367 self.match(MathExprParser.RPAREN) pass elif token in [54]: localctx = MathExprParser.PinvFuncContext(self, localctx) self.enterOuterAlt(localctx, 35) - self.state = 320 + self.state = 369 self.match(MathExprParser.PINV) - self.state = 321 + self.state = 370 self.match(MathExprParser.LPAREN) - self.state = 322 + self.state = 371 self.expr() - self.state = 323 + self.state = 372 self.match(MathExprParser.RPAREN) pass elif token in [55]: localctx = MathExprParser.SumFuncContext(self, localctx) self.enterOuterAlt(localctx, 36) - self.state = 325 + self.state = 374 self.match(MathExprParser.SUM) - self.state = 326 + self.state = 375 self.match(MathExprParser.LPAREN) - self.state = 327 + self.state = 376 self.expr() - self.state = 328 + self.state = 377 self.match(MathExprParser.RPAREN) pass elif token in [56]: localctx = MathExprParser.MeanFuncContext(self, localctx) self.enterOuterAlt(localctx, 37) - self.state = 330 + self.state = 379 self.match(MathExprParser.MEAN) - self.state = 331 + self.state = 380 self.match(MathExprParser.LPAREN) - self.state = 332 + self.state = 381 self.expr() - self.state = 333 + self.state = 382 self.match(MathExprParser.RPAREN) pass elif token in [57]: localctx = MathExprParser.StdFuncContext(self, localctx) self.enterOuterAlt(localctx, 38) - self.state = 335 + self.state = 384 self.match(MathExprParser.STD) - self.state = 336 + self.state = 385 self.match(MathExprParser.LPAREN) - self.state = 337 + self.state = 386 self.expr() - self.state = 338 + self.state = 387 self.match(MathExprParser.RPAREN) pass elif token in [58]: localctx = MathExprParser.VarFuncContext(self, localctx) self.enterOuterAlt(localctx, 39) - self.state = 340 + self.state = 389 self.match(MathExprParser.VAR) - self.state = 341 + self.state = 390 self.match(MathExprParser.LPAREN) - self.state = 342 + self.state = 391 self.expr() - self.state = 343 + self.state = 392 self.match(MathExprParser.RPAREN) pass elif token in [67]: localctx = MathExprParser.SortFuncContext(self, localctx) self.enterOuterAlt(localctx, 40) - self.state = 345 + self.state = 394 self.match(MathExprParser.SORT) - self.state = 346 + self.state = 395 self.match(MathExprParser.LPAREN) - self.state = 347 + self.state = 396 self.expr() - self.state = 348 + self.state = 397 self.match(MathExprParser.RPAREN) pass else: @@ -3779,14 +3547,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterTopkFunc" ): - listener.enterTopkFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitTopkFunc" ): - listener.exitTopkFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitTopkFunc" ): return visitor.visitTopkFunc(self) @@ -3815,14 +3575,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterPercentileFunc" ): - listener.enterPercentileFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitPercentileFunc" ): - listener.exitPercentileFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitPercentileFunc" ): return visitor.visitPercentileFunc(self) @@ -3851,14 +3603,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterCovFunc" ): - listener.enterCovFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitCovFunc" ): - listener.exitCovFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitCovFunc" ): return visitor.visitCovFunc(self) @@ -3887,14 +3631,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterStepFunc" ): - listener.enterStepFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitStepFunc" ): - listener.exitStepFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitStepFunc" ): return visitor.visitStepFunc(self) @@ -3923,14 +3659,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterAtan2Func" ): - listener.enterAtan2Func(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitAtan2Func" ): - listener.exitAtan2Func(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitAtan2Func" ): return visitor.visitAtan2Func(self) @@ -3959,14 +3687,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterQuantileFunc" ): - listener.enterQuantileFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitQuantileFunc" ): - listener.exitQuantileFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitQuantileFunc" ): return visitor.visitQuantileFunc(self) @@ -3995,14 +3715,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterBotkFunc" ): - listener.enterBotkFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitBotkFunc" ): - listener.exitBotkFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitBotkFunc" ): return visitor.visitBotkFunc(self) @@ -4031,14 +3743,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterTMaxFunc" ): - listener.enterTMaxFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitTMaxFunc" ): - listener.exitTMaxFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitTMaxFunc" ): return visitor.visitTMaxFunc(self) @@ -4067,14 +3771,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterCossimFunc" ): - listener.enterCossimFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitCossimFunc" ): - listener.exitCossimFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitCossimFunc" ): return visitor.visitCossimFunc(self) @@ -4103,14 +3799,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterPowFunc" ): - listener.enterPowFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitPowFunc" ): - listener.exitPowFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitPowFunc" ): return visitor.visitPowFunc(self) @@ -4139,14 +3827,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterDotFunc" ): - listener.enterDotFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitDotFunc" ): - listener.exitDotFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitDotFunc" ): return visitor.visitDotFunc(self) @@ -4175,14 +3855,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterFlipFunc" ): - listener.enterFlipFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitFlipFunc" ): - listener.exitFlipFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitFlipFunc" ): return visitor.visitFlipFunc(self) @@ -4211,14 +3883,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterQuartileFunc" ): - listener.enterQuartileFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitQuartileFunc" ): - listener.exitQuartileFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitQuartileFunc" ): return visitor.visitQuartileFunc(self) @@ -4247,14 +3911,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterTMinFunc" ): - listener.enterTMinFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitTMinFunc" ): - listener.exitTMinFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitTMinFunc" ): return visitor.visitTMinFunc(self) @@ -4266,135 +3922,16 @@ class MathExprParser ( Parser ): def func2(self): localctx = MathExprParser.Func2Context(self, self._ctx, self.state) - self.enterRule(localctx, 18, self.RULE_func2) + self.enterRule(localctx, 26, self.RULE_func2) try: - self.state = 457 + self.state = 506 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,14,self._ctx) + la_ = self._interp.adaptivePredict(self._input,19,self._ctx) if la_ == 1: localctx = MathExprParser.PowFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 352 - self.match(MathExprParser.POWE) - self.state = 353 - self.match(MathExprParser.LPAREN) - self.state = 354 - self.expr() - self.state = 355 - self.match(MathExprParser.COMMA) - self.state = 356 - self.expr() - self.state = 357 - self.match(MathExprParser.RPAREN) - pass - - elif la_ == 2: - localctx = MathExprParser.Atan2FuncContext(self, localctx) - self.enterOuterAlt(localctx, 2) - self.state = 359 - self.match(MathExprParser.ATAN2) - self.state = 360 - self.match(MathExprParser.LPAREN) - self.state = 361 - self.expr() - self.state = 362 - self.match(MathExprParser.COMMA) - self.state = 363 - self.expr() - self.state = 364 - self.match(MathExprParser.RPAREN) - pass - - elif la_ == 3: - localctx = MathExprParser.TMinFuncContext(self, localctx) - self.enterOuterAlt(localctx, 3) - self.state = 366 - self.match(MathExprParser.TMIN) - self.state = 367 - self.match(MathExprParser.LPAREN) - self.state = 368 - self.expr() - self.state = 369 - self.match(MathExprParser.COMMA) - self.state = 370 - self.expr() - self.state = 371 - self.match(MathExprParser.RPAREN) - pass - - elif la_ == 4: - localctx = MathExprParser.TMaxFuncContext(self, localctx) - self.enterOuterAlt(localctx, 4) - self.state = 373 - self.match(MathExprParser.TMAX) - self.state = 374 - self.match(MathExprParser.LPAREN) - self.state = 375 - self.expr() - self.state = 376 - self.match(MathExprParser.COMMA) - self.state = 377 - self.expr() - self.state = 378 - self.match(MathExprParser.RPAREN) - pass - - elif la_ == 5: - localctx = MathExprParser.StepFuncContext(self, localctx) - self.enterOuterAlt(localctx, 5) - self.state = 380 - self.match(MathExprParser.STEP) - self.state = 381 - self.match(MathExprParser.LPAREN) - self.state = 382 - self.expr() - self.state = 383 - self.match(MathExprParser.COMMA) - self.state = 384 - self.expr() - self.state = 385 - self.match(MathExprParser.RPAREN) - pass - - elif la_ == 6: - localctx = MathExprParser.TopkFuncContext(self, localctx) - self.enterOuterAlt(localctx, 6) - self.state = 387 - self.match(MathExprParser.TOPK) - self.state = 388 - self.match(MathExprParser.LPAREN) - self.state = 389 - self.expr() - self.state = 390 - self.match(MathExprParser.COMMA) - self.state = 391 - self.expr() - self.state = 392 - self.match(MathExprParser.RPAREN) - pass - - elif la_ == 7: - localctx = MathExprParser.BotkFuncContext(self, localctx) - self.enterOuterAlt(localctx, 7) - self.state = 394 - self.match(MathExprParser.BOTK) - self.state = 395 - self.match(MathExprParser.LPAREN) - self.state = 396 - self.expr() - self.state = 397 - self.match(MathExprParser.COMMA) - self.state = 398 - self.expr() - self.state = 399 - self.match(MathExprParser.RPAREN) - pass - - elif la_ == 8: - localctx = MathExprParser.QuartileFuncContext(self, localctx) - self.enterOuterAlt(localctx, 8) self.state = 401 - self.match(MathExprParser.QUARTILE) + self.match(MathExprParser.POWE) self.state = 402 self.match(MathExprParser.LPAREN) self.state = 403 @@ -4407,11 +3944,11 @@ class MathExprParser ( Parser ): self.match(MathExprParser.RPAREN) pass - elif la_ == 9: - localctx = MathExprParser.PercentileFuncContext(self, localctx) - self.enterOuterAlt(localctx, 9) + elif la_ == 2: + localctx = MathExprParser.Atan2FuncContext(self, localctx) + self.enterOuterAlt(localctx, 2) self.state = 408 - self.match(MathExprParser.PERCENTILE) + self.match(MathExprParser.ATAN2) self.state = 409 self.match(MathExprParser.LPAREN) self.state = 410 @@ -4424,11 +3961,11 @@ class MathExprParser ( Parser ): self.match(MathExprParser.RPAREN) pass - elif la_ == 10: - localctx = MathExprParser.QuantileFuncContext(self, localctx) - self.enterOuterAlt(localctx, 10) + elif la_ == 3: + localctx = MathExprParser.TMinFuncContext(self, localctx) + self.enterOuterAlt(localctx, 3) self.state = 415 - self.match(MathExprParser.QUANTILE) + self.match(MathExprParser.TMIN) self.state = 416 self.match(MathExprParser.LPAREN) self.state = 417 @@ -4441,11 +3978,11 @@ class MathExprParser ( Parser ): self.match(MathExprParser.RPAREN) pass - elif la_ == 11: - localctx = MathExprParser.QuantileFuncContext(self, localctx) - self.enterOuterAlt(localctx, 11) + elif la_ == 4: + localctx = MathExprParser.TMaxFuncContext(self, localctx) + self.enterOuterAlt(localctx, 4) self.state = 422 - self.match(MathExprParser.QUANTILE) + self.match(MathExprParser.TMAX) self.state = 423 self.match(MathExprParser.LPAREN) self.state = 424 @@ -4458,11 +3995,11 @@ class MathExprParser ( Parser ): self.match(MathExprParser.RPAREN) pass - elif la_ == 12: - localctx = MathExprParser.DotFuncContext(self, localctx) - self.enterOuterAlt(localctx, 12) + elif la_ == 5: + localctx = MathExprParser.StepFuncContext(self, localctx) + self.enterOuterAlt(localctx, 5) self.state = 429 - self.match(MathExprParser.DOT) + self.match(MathExprParser.STEP) self.state = 430 self.match(MathExprParser.LPAREN) self.state = 431 @@ -4475,11 +4012,11 @@ class MathExprParser ( Parser ): self.match(MathExprParser.RPAREN) pass - elif la_ == 13: - localctx = MathExprParser.CossimFuncContext(self, localctx) - self.enterOuterAlt(localctx, 13) + elif la_ == 6: + localctx = MathExprParser.TopkFuncContext(self, localctx) + self.enterOuterAlt(localctx, 6) self.state = 436 - self.match(MathExprParser.COSSIM) + self.match(MathExprParser.TOPK) self.state = 437 self.match(MathExprParser.LPAREN) self.state = 438 @@ -4492,11 +4029,11 @@ class MathExprParser ( Parser ): self.match(MathExprParser.RPAREN) pass - elif la_ == 14: - localctx = MathExprParser.FlipFuncContext(self, localctx) - self.enterOuterAlt(localctx, 14) + elif la_ == 7: + localctx = MathExprParser.BotkFuncContext(self, localctx) + self.enterOuterAlt(localctx, 7) self.state = 443 - self.match(MathExprParser.FLIP) + self.match(MathExprParser.BOTK) self.state = 444 self.match(MathExprParser.LPAREN) self.state = 445 @@ -4509,11 +4046,11 @@ class MathExprParser ( Parser ): self.match(MathExprParser.RPAREN) pass - elif la_ == 15: - localctx = MathExprParser.CovFuncContext(self, localctx) - self.enterOuterAlt(localctx, 15) + elif la_ == 8: + localctx = MathExprParser.QuartileFuncContext(self, localctx) + self.enterOuterAlt(localctx, 8) self.state = 450 - self.match(MathExprParser.COV) + self.match(MathExprParser.QUARTILE) self.state = 451 self.match(MathExprParser.LPAREN) self.state = 452 @@ -4526,6 +4063,125 @@ class MathExprParser ( Parser ): self.match(MathExprParser.RPAREN) pass + elif la_ == 9: + localctx = MathExprParser.PercentileFuncContext(self, localctx) + self.enterOuterAlt(localctx, 9) + self.state = 457 + self.match(MathExprParser.PERCENTILE) + self.state = 458 + self.match(MathExprParser.LPAREN) + self.state = 459 + self.expr() + self.state = 460 + self.match(MathExprParser.COMMA) + self.state = 461 + self.expr() + self.state = 462 + self.match(MathExprParser.RPAREN) + pass + + elif la_ == 10: + localctx = MathExprParser.QuantileFuncContext(self, localctx) + self.enterOuterAlt(localctx, 10) + self.state = 464 + self.match(MathExprParser.QUANTILE) + self.state = 465 + self.match(MathExprParser.LPAREN) + self.state = 466 + self.expr() + self.state = 467 + self.match(MathExprParser.COMMA) + self.state = 468 + self.expr() + self.state = 469 + self.match(MathExprParser.RPAREN) + pass + + elif la_ == 11: + localctx = MathExprParser.QuantileFuncContext(self, localctx) + self.enterOuterAlt(localctx, 11) + self.state = 471 + self.match(MathExprParser.QUANTILE) + self.state = 472 + self.match(MathExprParser.LPAREN) + self.state = 473 + self.expr() + self.state = 474 + self.match(MathExprParser.COMMA) + self.state = 475 + self.expr() + self.state = 476 + self.match(MathExprParser.RPAREN) + pass + + elif la_ == 12: + localctx = MathExprParser.DotFuncContext(self, localctx) + self.enterOuterAlt(localctx, 12) + self.state = 478 + self.match(MathExprParser.DOT) + self.state = 479 + self.match(MathExprParser.LPAREN) + self.state = 480 + self.expr() + self.state = 481 + self.match(MathExprParser.COMMA) + self.state = 482 + self.expr() + self.state = 483 + self.match(MathExprParser.RPAREN) + pass + + elif la_ == 13: + localctx = MathExprParser.CossimFuncContext(self, localctx) + self.enterOuterAlt(localctx, 13) + self.state = 485 + self.match(MathExprParser.COSSIM) + self.state = 486 + self.match(MathExprParser.LPAREN) + self.state = 487 + self.expr() + self.state = 488 + self.match(MathExprParser.COMMA) + self.state = 489 + self.expr() + self.state = 490 + self.match(MathExprParser.RPAREN) + pass + + elif la_ == 14: + localctx = MathExprParser.FlipFuncContext(self, localctx) + self.enterOuterAlt(localctx, 14) + self.state = 492 + self.match(MathExprParser.FLIP) + self.state = 493 + self.match(MathExprParser.LPAREN) + self.state = 494 + self.expr() + self.state = 495 + self.match(MathExprParser.COMMA) + self.state = 496 + self.expr() + self.state = 497 + self.match(MathExprParser.RPAREN) + pass + + elif la_ == 15: + localctx = MathExprParser.CovFuncContext(self, localctx) + self.enterOuterAlt(localctx, 15) + self.state = 499 + self.match(MathExprParser.COV) + self.state = 500 + self.match(MathExprParser.LPAREN) + self.state = 501 + self.expr() + self.state = 502 + self.match(MathExprParser.COMMA) + self.state = 503 + self.expr() + self.state = 504 + self.match(MathExprParser.RPAREN) + pass + except RecognitionException as re: localctx.exception = re @@ -4577,14 +4233,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterMomentFunc" ): - listener.enterMomentFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitMomentFunc" ): - listener.exitMomentFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitMomentFunc" ): return visitor.visitMomentFunc(self) @@ -4616,14 +4264,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterLerpFunc" ): - listener.enterLerpFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitLerpFunc" ): - listener.exitLerpFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitLerpFunc" ): return visitor.visitLerpFunc(self) @@ -4655,14 +4295,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSmoothstepFunc" ): - listener.enterSmoothstepFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSmoothstepFunc" ): - listener.exitSmoothstepFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSmoothstepFunc" ): return visitor.visitSmoothstepFunc(self) @@ -4694,14 +4326,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterRangeFunc" ): - listener.enterRangeFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitRangeFunc" ): - listener.exitRangeFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitRangeFunc" ): return visitor.visitRangeFunc(self) @@ -4733,14 +4357,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterClampFunc" ): - listener.enterClampFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitClampFunc" ): - listener.exitClampFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitClampFunc" ): return visitor.visitClampFunc(self) @@ -4752,109 +4368,109 @@ class MathExprParser ( Parser ): def func3(self): localctx = MathExprParser.Func3Context(self, self._ctx, self.state) - self.enterRule(localctx, 20, self.RULE_func3) + self.enterRule(localctx, 28, self.RULE_func3) try: - self.state = 504 + self.state = 553 self._errHandler.sync(self) token = self._input.LA(1) if token in [31]: localctx = MathExprParser.ClampFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 459 + self.state = 508 self.match(MathExprParser.CLAMP) - self.state = 460 + self.state = 509 self.match(MathExprParser.LPAREN) - self.state = 461 + self.state = 510 self.expr() - self.state = 462 + self.state = 511 self.match(MathExprParser.COMMA) - self.state = 463 + self.state = 512 self.expr() - self.state = 464 + self.state = 513 self.match(MathExprParser.COMMA) - self.state = 465 + self.state = 514 self.expr() - self.state = 466 + self.state = 515 self.match(MathExprParser.RPAREN) pass elif token in [37]: localctx = MathExprParser.LerpFuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 468 + self.state = 517 self.match(MathExprParser.LERP) - self.state = 469 + self.state = 518 self.match(MathExprParser.LPAREN) - self.state = 470 + self.state = 519 self.expr() - self.state = 471 + self.state = 520 self.match(MathExprParser.COMMA) - self.state = 472 + self.state = 521 self.expr() - self.state = 473 + self.state = 522 self.match(MathExprParser.COMMA) - self.state = 474 + self.state = 523 self.expr() - self.state = 475 + self.state = 524 self.match(MathExprParser.RPAREN) pass elif token in [39]: localctx = MathExprParser.SmoothstepFuncContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 477 + self.state = 526 self.match(MathExprParser.SMOOTHSTEP) - self.state = 478 + self.state = 527 self.match(MathExprParser.LPAREN) - self.state = 479 + self.state = 528 self.expr() - self.state = 480 + self.state = 529 self.match(MathExprParser.COMMA) - self.state = 481 + self.state = 530 self.expr() - self.state = 482 + self.state = 531 self.match(MathExprParser.COMMA) - self.state = 483 + self.state = 532 self.expr() - self.state = 484 + self.state = 533 self.match(MathExprParser.RPAREN) pass elif token in [51]: localctx = MathExprParser.RangeFuncContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 486 + self.state = 535 self.match(MathExprParser.RANGE) - self.state = 487 + self.state = 536 self.match(MathExprParser.LPAREN) - self.state = 488 + self.state = 537 self.expr() - self.state = 489 + self.state = 538 self.match(MathExprParser.COMMA) - self.state = 490 + self.state = 539 self.expr() - self.state = 491 + self.state = 540 self.match(MathExprParser.COMMA) - self.state = 492 + self.state = 541 self.expr() - self.state = 493 + self.state = 542 self.match(MathExprParser.RPAREN) pass elif token in [63]: localctx = MathExprParser.MomentFuncContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 495 + self.state = 544 self.match(MathExprParser.MOMENT) - self.state = 496 + self.state = 545 self.match(MathExprParser.LPAREN) - self.state = 497 + self.state = 546 self.expr() - self.state = 498 + self.state = 547 self.match(MathExprParser.COMMA) - self.state = 499 + self.state = 548 self.expr() - self.state = 500 + self.state = 549 self.match(MathExprParser.COMMA) - self.state = 501 + self.state = 550 self.expr() - self.state = 502 + self.state = 551 self.match(MathExprParser.RPAREN) pass else: @@ -4910,14 +4526,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSwapFunc" ): - listener.enterSwapFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSwapFunc" ): - listener.exitSwapFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSwapFunc" ): return visitor.visitSwapFunc(self) @@ -4929,29 +4537,29 @@ class MathExprParser ( Parser ): def func4(self): localctx = MathExprParser.Func4Context(self, self._ctx, self.state) - self.enterRule(localctx, 22, self.RULE_func4) + self.enterRule(localctx, 30, self.RULE_func4) try: localctx = MathExprParser.SwapFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 506 + self.state = 555 self.match(MathExprParser.SWAP) - self.state = 507 + self.state = 556 self.match(MathExprParser.LPAREN) - self.state = 508 + self.state = 557 self.expr() - self.state = 509 + self.state = 558 self.match(MathExprParser.COMMA) - self.state = 510 + self.state = 559 self.expr() - self.state = 511 + self.state = 560 self.match(MathExprParser.COMMA) - self.state = 512 + self.state = 561 self.expr() - self.state = 513 + self.state = 562 self.match(MathExprParser.COMMA) - self.state = 514 + self.state = 563 self.expr() - self.state = 515 + self.state = 564 self.match(MathExprParser.RPAREN) except RecognitionException as re: localctx.exception = re @@ -5003,14 +4611,6 @@ class MathExprParser ( Parser ): else: return self.getToken(MathExprParser.COMMA, i) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSMaxFunc" ): - listener.enterSMaxFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSMaxFunc" ): - listener.exitSMaxFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSMaxFunc" ): return visitor.visitSMaxFunc(self) @@ -5042,14 +4642,6 @@ class MathExprParser ( Parser ): else: return self.getToken(MathExprParser.COMMA, i) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterMapFunc" ): - listener.enterMapFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitMapFunc" ): - listener.exitMapFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitMapFunc" ): return visitor.visitMapFunc(self) @@ -5081,14 +4673,6 @@ class MathExprParser ( Parser ): else: return self.getToken(MathExprParser.COMMA, i) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterEzConvFunc" ): - listener.enterEzConvFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitEzConvFunc" ): - listener.exitEzConvFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitEzConvFunc" ): return visitor.visitEzConvFunc(self) @@ -5117,14 +4701,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterPermuteFunc" ): - listener.enterPermuteFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitPermuteFunc" ): - listener.exitPermuteFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitPermuteFunc" ): return visitor.visitPermuteFunc(self) @@ -5153,14 +4729,6 @@ class MathExprParser ( Parser ): def RPAREN(self): return self.getToken(MathExprParser.RPAREN, 0) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterReshapeFunc" ): - listener.enterReshapeFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitReshapeFunc" ): - listener.exitReshapeFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitReshapeFunc" ): return visitor.visitReshapeFunc(self) @@ -5192,14 +4760,6 @@ class MathExprParser ( Parser ): else: return self.getToken(MathExprParser.COMMA, i) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterSMinFunc" ): - listener.enterSMinFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitSMinFunc" ): - listener.exitSMinFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitSMinFunc" ): return visitor.visitSMinFunc(self) @@ -5231,14 +4791,6 @@ class MathExprParser ( Parser ): else: return self.getToken(MathExprParser.COMMA, i) - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterConvFunc" ): - listener.enterConvFunc(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitConvFunc" ): - listener.exitConvFunc(self) - def accept(self, visitor:ParseTreeVisitor): if hasattr( visitor, "visitConvFunc" ): return visitor.visitConvFunc(self) @@ -5250,168 +4802,168 @@ class MathExprParser ( Parser ): def funcN(self): localctx = MathExprParser.FuncNContext(self, self._ctx, self.state) - self.enterRule(localctx, 24, self.RULE_funcN) + self.enterRule(localctx, 32, self.RULE_funcN) self._la = 0 # Token type try: - self.state = 588 + self.state = 637 self._errHandler.sync(self) token = self._input.LA(1) if token in [19]: localctx = MathExprParser.SMinFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 517 + self.state = 566 self.match(MathExprParser.SMIN) - self.state = 518 + self.state = 567 self.match(MathExprParser.LPAREN) - self.state = 519 + self.state = 568 self.expr() - self.state = 524 + self.state = 573 self._errHandler.sync(self) _la = self._input.LA(1) while _la==83: - self.state = 520 + self.state = 569 self.match(MathExprParser.COMMA) - self.state = 521 + self.state = 570 self.expr() - self.state = 526 + self.state = 575 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 527 + self.state = 576 self.match(MathExprParser.RPAREN) pass elif token in [20]: localctx = MathExprParser.SMaxFuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 529 + self.state = 578 self.match(MathExprParser.SMAX) - self.state = 530 + self.state = 579 self.match(MathExprParser.LPAREN) - self.state = 531 + self.state = 580 self.expr() - self.state = 536 + self.state = 585 self._errHandler.sync(self) _la = self._input.LA(1) while _la==83: - self.state = 532 + self.state = 581 self.match(MathExprParser.COMMA) - self.state = 533 + self.state = 582 self.expr() - self.state = 538 + self.state = 587 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 539 + self.state = 588 self.match(MathExprParser.RPAREN) pass elif token in [45]: localctx = MathExprParser.MapFuncContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 541 + self.state = 590 self.match(MathExprParser.MAP) - self.state = 542 + self.state = 591 self.match(MathExprParser.LPAREN) - self.state = 543 + self.state = 592 self.expr() - self.state = 546 + self.state = 595 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 544 + self.state = 593 self.match(MathExprParser.COMMA) - self.state = 545 + self.state = 594 self.expr() - self.state = 548 + self.state = 597 self._errHandler.sync(self) _la = self._input.LA(1) if not (_la==83): break - self.state = 550 + self.state = 599 self.match(MathExprParser.RPAREN) pass elif token in [46]: localctx = MathExprParser.EzConvFuncContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 552 + self.state = 601 self.match(MathExprParser.EZCONV) - self.state = 553 + self.state = 602 self.match(MathExprParser.LPAREN) - self.state = 554 + self.state = 603 self.expr() - self.state = 557 + self.state = 606 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 555 + self.state = 604 self.match(MathExprParser.COMMA) - self.state = 556 + self.state = 605 self.expr() - self.state = 559 + self.state = 608 self._errHandler.sync(self) _la = self._input.LA(1) if not (_la==83): break - self.state = 561 + self.state = 610 self.match(MathExprParser.RPAREN) pass elif token in [47]: localctx = MathExprParser.ConvFuncContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 563 + self.state = 612 self.match(MathExprParser.CONV) - self.state = 564 + self.state = 613 self.match(MathExprParser.LPAREN) - self.state = 565 + self.state = 614 self.expr() - self.state = 568 + self.state = 617 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 566 + self.state = 615 self.match(MathExprParser.COMMA) - self.state = 567 + self.state = 616 self.expr() - self.state = 570 + self.state = 619 self._errHandler.sync(self) _la = self._input.LA(1) if not (_la==83): break - self.state = 572 + self.state = 621 self.match(MathExprParser.RPAREN) pass elif token in [49]: localctx = MathExprParser.PermuteFuncContext(self, localctx) self.enterOuterAlt(localctx, 6) - self.state = 574 + self.state = 623 self.match(MathExprParser.PERM) - self.state = 575 + self.state = 624 self.match(MathExprParser.LPAREN) - self.state = 576 + self.state = 625 self.expr() - self.state = 577 + self.state = 626 self.match(MathExprParser.COMMA) - self.state = 578 + self.state = 627 self.expr() - self.state = 579 + self.state = 628 self.match(MathExprParser.RPAREN) pass elif token in [50]: localctx = MathExprParser.ReshapeFuncContext(self, localctx) self.enterOuterAlt(localctx, 7) - self.state = 581 + self.state = 630 self.match(MathExprParser.RESHAPE) - self.state = 582 + self.state = 631 self.match(MathExprParser.LPAREN) - self.state = 583 + self.state = 632 self.expr() - self.state = 584 + self.state = 633 self.match(MathExprParser.COMMA) - self.state = 585 + self.state = 634 self.expr() - self.state = 586 + self.state = 635 self.match(MathExprParser.RPAREN) pass else: @@ -5430,10 +4982,10 @@ class MathExprParser ( Parser ): def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int): if self._predicates == None: self._predicates = dict() - self._predicates[1] = self.compExpr_sempred - self._predicates[2] = self.addExpr_sempred - self._predicates[3] = self.mulExpr_sempred - self._predicates[6] = self.indexExpr_sempred + self._predicates[4] = self.compExpr_sempred + self._predicates[5] = self.addExpr_sempred + self._predicates[6] = self.mulExpr_sempred + self._predicates[9] = self.indexExpr_sempred pred = self._predicates.get(ruleIndex, None) if pred is None: raise Exception("No predicate with index:" + str(ruleIndex)) diff --git a/more_math/Parser/MathExprVisitor.py b/more_math/Parser/MathExprVisitor.py index 088ec28..eca7824 100644 --- a/more_math/Parser/MathExprVisitor.py +++ b/more_math/Parser/MathExprVisitor.py @@ -9,6 +9,21 @@ else: class MathExprVisitor(ParseTreeVisitor): + # Visit a parse tree produced by MathExprParser#start. + def visitStart(self, ctx:MathExprParser.StartContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by MathExprParser#FunctionDef. + def visitFunctionDef(self, ctx:MathExprParser.FunctionDefContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by MathExprParser#paramList. + def visitParamList(self, ctx:MathExprParser.ParamListContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by MathExprParser#expr. def visitExpr(self, ctx:MathExprParser.ExprContext): return self.visitChildren(ctx) @@ -174,6 +189,16 @@ class MathExprVisitor(ParseTreeVisitor): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#CallExp. + def visitCallExp(self, ctx:MathExprParser.CallExpContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by MathExprParser#exprList. + def visitExprList(self, ctx:MathExprParser.ExprListContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by MathExprParser#SinFunc. def visitSinFunc(self, ctx:MathExprParser.SinFuncContext): return self.visitChildren(ctx) diff --git a/more_math/Parser/UnifiedMathVisitor.py b/more_math/Parser/UnifiedMathVisitor.py index c7d6ecf..1707200 100644 --- a/more_math/Parser/UnifiedMathVisitor.py +++ b/more_math/Parser/UnifiedMathVisitor.py @@ -6,7 +6,7 @@ from ..helper_functions import generate_dim_variables class UnifiedMathVisitor(MathExprVisitor): - def __init__(self, variables, shape=None, device=None): + def __init__(self, variables, shape=None, device=None, functions=None): self.variables = variables self.spatial_variables = variables.copy() self.shape = shape if shape is not None else () @@ -14,6 +14,7 @@ class UnifiedMathVisitor(MathExprVisitor): self.device = next((v.device for v in variables.values() if isinstance(v, torch.Tensor)), torch.device("cpu")) else: self.device = device + self.functions = functions if functions is not None else {} def _is_tensor(self, val): return isinstance(val, torch.Tensor) @@ -1041,3 +1042,51 @@ class UnifiedMathVisitor(MathExprVisitor): result = self._apply_conv_internal(conv_input, kernel_val, kernel_sizes, spatial_dims_count) return result.reshape(*batch_shape, in_channels, *spatial_shape) + + def visitStart(self, ctx): + # Visit all statements (function definitions) + if ctx.funcDef(): + for i in range(len(ctx.funcDef())): + self.visit(ctx.funcDef(i)) + + return self.visit(ctx.expr()) + + + def visitFunctionDef(self, ctx): + func_name = ctx.VARIABLE().getText() + params = [] + if ctx.paramList(): + params = [node.getText() for node in ctx.paramList().VARIABLE()] + + self.functions[func_name] = { + "params": params, + "body": ctx.expr() + } + return None + + def visitCallExp(self, ctx): + func_name = ctx.VARIABLE().getText() + + # Check if it is a user-defined function + if func_name in self.functions: + func_def = self.functions[func_name] + params = func_def["params"] + + # Evaluate arguments + args = [] + if ctx.exprList(): + args = [self.visit(e) for e in ctx.exprList().expr()] + + if len(args) != len(params): + raise ValueError(f"Function '{func_name}' expects {len(params)} arguments, got {len(args)}") + + # Create a new scope for function execution + new_vars = self.variables.copy() + for param, arg in zip(params, args): + new_vars[param] = arg + + # Create a new visitor to execute the function body in the new scope - easier than managing stack of variables and call stack + visitor = UnifiedMathVisitor(new_vars, self.shape, self.device, self.functions) + return visitor.visit(func_def["body"]) + + raise ValueError(f"Unknown function: {func_name}") diff --git a/more_math/helper_functions.py b/more_math/helper_functions.py index 063b7fa..217dbe9 100644 --- a/more_math/helper_functions.py +++ b/more_math/helper_functions.py @@ -29,7 +29,7 @@ def parse_expr(expr: str): stream = CommonTokenStream(lexer) parser = MathExprParser(stream) parser.addErrorListener(ThrowingErrorListener()) - return parser.expr() + return parser.start() def getIndexTensorAlongDim(tensor, dim): diff --git a/tests/test_unified_math.py b/tests/test_unified_math.py index 0833e00..ca6b3db 100644 --- a/tests/test_unified_math.py +++ b/tests/test_unified_math.py @@ -21,7 +21,7 @@ def parse_and_visit(expr_str, variables): lexer = MathExprLexer(InputStream(expr_str)) stream = CommonTokenStream(lexer) parser = MathExprParser(stream) - tree = parser.expr() + tree = parser.start() # We might need to pass shape/device if UnifiedMathVisitor requires it for tensor creation # For now assuming it can infer or defaults. @@ -291,6 +291,36 @@ def test_percentile(): assert parse_and_visit("prcnt(l, 50)", vars) == 5.0 +def test_custom_functions(): + vars = {} + + # 1. Simple function definition and call + # f(x) -> x + 1; f(10) + expr1 = "f(x) -> x + 1; f(10)" + assert parse_and_visit(expr1, vars) == 11.0 + + # 2. Multi-arg function + # add(a, b) -> a + b; add(3, 4) + expr2 = "add(a, b) -> a + b; add(3, 4)" + assert parse_and_visit(expr2, vars) == 7.0 + + # 3. Function reusing other functions (simulated by defining in same block) + # sq(x) -> x * x; sumsq(a, b) -> sq(a) + sq(b); sumsq(3, 4) + expr3 = "sq(x) -> x * x; sumsq(a, b) -> sq(a) + sq(b); sumsq(3, 4)" + assert parse_and_visit(expr3, vars) == 25.0 + + # 4. Global variable access & Shadowing + # x = 10 (global) + # f(x) -> x * 2; f(5) -> should be 10, not 20 + vars = {"x": 10.0} + expr4 = "f(x) -> x * 2; f(5)" + assert parse_and_visit(expr4, vars) == 10.0 + + # f(y) -> x + y; f(5) -> global x(10) + param y(5) = 15 + expr5 = "f(y) -> x + y; f(5)" + assert parse_and_visit(expr5, vars) == 15.0 + + if __name__ == "__main__": try: test_scalar_ops() @@ -305,7 +335,9 @@ if __name__ == "__main__": test_topk() test_botk() test_pinv() + test_pinv() test_quartil() + test_custom_functions() print("All UnifiedMathVisitor tests passed!") except Exception: import traceback