From 967188b681ff284cfb76a9345bb49b485991b224 Mon Sep 17 00:00:00 2001 From: mcDandy Date: Fri, 19 Dec 2025 22:53:08 +0100 Subject: [PATCH] Added || shorthand for abs and snorm --- README.md | 4 +- more_math/Parser/FloatEvalVisitor.py | 1 + more_math/Parser/MathExpr.g4 | 2 + more_math/Parser/MathExpr.interp | 23 +- more_math/Parser/MathExpr.tokens | 10 +- more_math/Parser/MathExprLexer.interp | 32 +- more_math/Parser/MathExprLexer.py | 352 +++++----- more_math/Parser/MathExprLexer.tokens | 10 +- more_math/Parser/MathExprParser.py | 892 ++++++++++++++------------ more_math/Parser/MathExprVisitor.py | 9 +- more_math/Parser/TensorEvalVisitor.py | 1 + 11 files changed, 720 insertions(+), 616 deletions(-) diff --git a/README.md b/README.md index abfe0ec..d957c37 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,14 @@ You can also get the node from comfy manager under the name of More math. - Nodes for CONDITIONING, LATENT, IMAGE, NOISE, FLOAT, VIDEO and AUDIO ## Operators -- Math: `+`, `-`, `*`, `/`, `%`, `^` +- Math: `+`, `-`, `*`, `/`, `%`, `^`, `||` - Boolean: `<`, `<=`, `>`, `>=`, `==`, `!=` (`false = 0.0`, `true = 1.0`) ## Functions ### Basic Math -- `abs(x)`: Absolute value. +- `abs(x)` or `|x|`: Absolute value. For **float** `abs(x)` and `|x|` are the same. For **tensor** `abs(x)` calculates element-wise absolute value and for `|x|` it calculates L2 norm (euclidean norm). - `sqrt(x)`: Square root. - `ln(x)`: Natural logarithm (base e). - `log(x)`: Logarithm base 10. diff --git a/more_math/Parser/FloatEvalVisitor.py b/more_math/Parser/FloatEvalVisitor.py index 46cc932..ae0b5bf 100644 --- a/more_math/Parser/FloatEvalVisitor.py +++ b/more_math/Parser/FloatEvalVisitor.py @@ -105,6 +105,7 @@ class FloatEvalVisitor(MathExprVisitor): def visitAcoshFunc(self, ctx): return math.acosh(self.visit(ctx.expr())) def visitAtanhFunc(self, ctx): return math.atanh(self.visit(ctx.expr())) def visitAbsFunc(self, ctx): return math.abs(self.visit(ctx.expr())) + def visitAbsExp(self, ctx): return math.abs(self.visit(ctx.expr())) def visitSqrtFunc(self, ctx): return math.sqrt(self.visit(ctx.expr())) def visitLnFunc(self, ctx): return math.log(self.visit(ctx.expr())) def visitLogFunc(self, ctx): return math.log10(self.visit(ctx.expr())) diff --git a/more_math/Parser/MathExpr.g4 b/more_math/Parser/MathExpr.g4 index 5151296..8f70369 100644 --- a/more_math/Parser/MathExpr.g4 +++ b/more_math/Parser/MathExpr.g4 @@ -50,6 +50,7 @@ atom | NUMBER # NumberExp | CONSTANT # ConstantExp | '(' expr ')' # ParenExp + | PIPE expr PIPE # AbsExp ; // Single-argument functions @@ -174,6 +175,7 @@ LE : '<='; LT : '<'; EQ : '=='; NE : '!='; +PIPE : '|'; CONSTANT : ('pi'|'PI'|'e'|'E'); NUMBER : [0-9]+ ('.' [0-9]+)?; diff --git a/more_math/Parser/MathExpr.interp b/more_math/Parser/MathExpr.interp index ea18ff0..a4fc763 100644 --- a/more_math/Parser/MathExpr.interp +++ b/more_math/Parser/MathExpr.interp @@ -38,6 +38,15 @@ null 'ifft' 'angle' 'print' +'lerp' +'step' +'smoothstep' +'fract' +'relu' +'softplus' +'gelu' +'sign' +'swap' '+' '-' '*' @@ -50,6 +59,7 @@ null '<' '==' '!=' +'|' null null null @@ -95,6 +105,15 @@ SFFT SIFFT ANGL PRNT +LERP +STEP +SMOOTHSTEP +FRACT +RELU +SOFTPLUS +GELU +SIGN +SWAP PLUS MINUS MULT @@ -107,6 +126,7 @@ LE LT EQ NE +PIPE CONSTANT NUMBER VARIABLE @@ -123,8 +143,9 @@ atom func1 func2 func3 +func4 funcN atn: -[4, 1, 54, 316, 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, 1, 0, 1, 0, 3, 0, 25, 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, 48, 8, 1, 10, 1, 12, 1, 51, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 62, 8, 2, 10, 2, 12, 2, 65, 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, 79, 8, 3, 10, 3, 12, 3, 82, 9, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 89, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 96, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 109, 8, 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, 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, 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, 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, 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, 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, 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, 3, 7, 251, 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, 3, 8, 281, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 4, 10, 297, 8, 10, 11, 10, 12, 10, 298, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 4, 10, 308, 8, 10, 11, 10, 12, 10, 309, 1, 10, 1, 10, 3, 10, 314, 8, 10, 1, 10, 0, 3, 2, 4, 6, 11, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 0, 0, 359, 0, 24, 1, 0, 0, 0, 2, 26, 1, 0, 0, 0, 4, 52, 1, 0, 0, 0, 6, 66, 1, 0, 0, 0, 8, 88, 1, 0, 0, 0, 10, 95, 1, 0, 0, 0, 12, 108, 1, 0, 0, 0, 14, 250, 1, 0, 0, 0, 16, 280, 1, 0, 0, 0, 18, 282, 1, 0, 0, 0, 20, 313, 1, 0, 0, 0, 22, 25, 3, 12, 6, 0, 23, 25, 3, 2, 1, 0, 24, 22, 1, 0, 0, 0, 24, 23, 1, 0, 0, 0, 25, 1, 1, 0, 0, 0, 26, 27, 6, 1, -1, 0, 27, 28, 3, 4, 2, 0, 28, 49, 1, 0, 0, 0, 29, 30, 10, 7, 0, 0, 30, 31, 5, 46, 0, 0, 31, 48, 3, 4, 2, 0, 32, 33, 10, 6, 0, 0, 33, 34, 5, 45, 0, 0, 34, 48, 3, 4, 2, 0, 35, 36, 10, 5, 0, 0, 36, 37, 5, 48, 0, 0, 37, 48, 3, 4, 2, 0, 38, 39, 10, 4, 0, 0, 39, 40, 5, 47, 0, 0, 40, 48, 3, 4, 2, 0, 41, 42, 10, 3, 0, 0, 42, 43, 5, 49, 0, 0, 43, 48, 3, 4, 2, 0, 44, 45, 10, 2, 0, 0, 45, 46, 5, 50, 0, 0, 46, 48, 3, 4, 2, 0, 47, 29, 1, 0, 0, 0, 47, 32, 1, 0, 0, 0, 47, 35, 1, 0, 0, 0, 47, 38, 1, 0, 0, 0, 47, 41, 1, 0, 0, 0, 47, 44, 1, 0, 0, 0, 48, 51, 1, 0, 0, 0, 49, 47, 1, 0, 0, 0, 49, 50, 1, 0, 0, 0, 50, 3, 1, 0, 0, 0, 51, 49, 1, 0, 0, 0, 52, 53, 6, 2, -1, 0, 53, 54, 3, 6, 3, 0, 54, 63, 1, 0, 0, 0, 55, 56, 10, 3, 0, 0, 56, 57, 5, 39, 0, 0, 57, 62, 3, 6, 3, 0, 58, 59, 10, 2, 0, 0, 59, 60, 5, 40, 0, 0, 60, 62, 3, 6, 3, 0, 61, 55, 1, 0, 0, 0, 61, 58, 1, 0, 0, 0, 62, 65, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 63, 64, 1, 0, 0, 0, 64, 5, 1, 0, 0, 0, 65, 63, 1, 0, 0, 0, 66, 67, 6, 3, -1, 0, 67, 68, 3, 8, 4, 0, 68, 80, 1, 0, 0, 0, 69, 70, 10, 4, 0, 0, 70, 71, 5, 41, 0, 0, 71, 79, 3, 8, 4, 0, 72, 73, 10, 3, 0, 0, 73, 74, 5, 42, 0, 0, 74, 79, 3, 8, 4, 0, 75, 76, 10, 2, 0, 0, 76, 77, 5, 43, 0, 0, 77, 79, 3, 8, 4, 0, 78, 69, 1, 0, 0, 0, 78, 72, 1, 0, 0, 0, 78, 75, 1, 0, 0, 0, 79, 82, 1, 0, 0, 0, 80, 78, 1, 0, 0, 0, 80, 81, 1, 0, 0, 0, 81, 7, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 83, 84, 3, 10, 5, 0, 84, 85, 5, 44, 0, 0, 85, 86, 3, 8, 4, 0, 86, 89, 1, 0, 0, 0, 87, 89, 3, 10, 5, 0, 88, 83, 1, 0, 0, 0, 88, 87, 1, 0, 0, 0, 89, 9, 1, 0, 0, 0, 90, 91, 5, 39, 0, 0, 91, 96, 3, 10, 5, 0, 92, 93, 5, 40, 0, 0, 93, 96, 3, 10, 5, 0, 94, 96, 3, 12, 6, 0, 95, 90, 1, 0, 0, 0, 95, 92, 1, 0, 0, 0, 95, 94, 1, 0, 0, 0, 96, 11, 1, 0, 0, 0, 97, 109, 3, 14, 7, 0, 98, 109, 3, 16, 8, 0, 99, 109, 3, 18, 9, 0, 100, 109, 3, 20, 10, 0, 101, 109, 5, 53, 0, 0, 102, 109, 5, 52, 0, 0, 103, 109, 5, 51, 0, 0, 104, 105, 5, 1, 0, 0, 105, 106, 3, 0, 0, 0, 106, 107, 5, 2, 0, 0, 107, 109, 1, 0, 0, 0, 108, 97, 1, 0, 0, 0, 108, 98, 1, 0, 0, 0, 108, 99, 1, 0, 0, 0, 108, 100, 1, 0, 0, 0, 108, 101, 1, 0, 0, 0, 108, 102, 1, 0, 0, 0, 108, 103, 1, 0, 0, 0, 108, 104, 1, 0, 0, 0, 109, 13, 1, 0, 0, 0, 110, 111, 5, 4, 0, 0, 111, 112, 5, 1, 0, 0, 112, 113, 3, 0, 0, 0, 113, 114, 5, 2, 0, 0, 114, 251, 1, 0, 0, 0, 115, 116, 5, 5, 0, 0, 116, 117, 5, 1, 0, 0, 117, 118, 3, 0, 0, 0, 118, 119, 5, 2, 0, 0, 119, 251, 1, 0, 0, 0, 120, 121, 5, 6, 0, 0, 121, 122, 5, 1, 0, 0, 122, 123, 3, 0, 0, 0, 123, 124, 5, 2, 0, 0, 124, 251, 1, 0, 0, 0, 125, 126, 5, 7, 0, 0, 126, 127, 5, 1, 0, 0, 127, 128, 3, 0, 0, 0, 128, 129, 5, 2, 0, 0, 129, 251, 1, 0, 0, 0, 130, 131, 5, 8, 0, 0, 131, 132, 5, 1, 0, 0, 132, 133, 3, 0, 0, 0, 133, 134, 5, 2, 0, 0, 134, 251, 1, 0, 0, 0, 135, 136, 5, 9, 0, 0, 136, 137, 5, 1, 0, 0, 137, 138, 3, 0, 0, 0, 138, 139, 5, 2, 0, 0, 139, 251, 1, 0, 0, 0, 140, 141, 5, 11, 0, 0, 141, 142, 5, 1, 0, 0, 142, 143, 3, 0, 0, 0, 143, 144, 5, 2, 0, 0, 144, 251, 1, 0, 0, 0, 145, 146, 5, 12, 0, 0, 146, 147, 5, 1, 0, 0, 147, 148, 3, 0, 0, 0, 148, 149, 5, 2, 0, 0, 149, 251, 1, 0, 0, 0, 150, 151, 5, 13, 0, 0, 151, 152, 5, 1, 0, 0, 152, 153, 3, 0, 0, 0, 153, 154, 5, 2, 0, 0, 154, 251, 1, 0, 0, 0, 155, 156, 5, 14, 0, 0, 156, 157, 5, 1, 0, 0, 157, 158, 3, 0, 0, 0, 158, 159, 5, 2, 0, 0, 159, 251, 1, 0, 0, 0, 160, 161, 5, 15, 0, 0, 161, 162, 5, 1, 0, 0, 162, 163, 3, 0, 0, 0, 163, 164, 5, 2, 0, 0, 164, 251, 1, 0, 0, 0, 165, 166, 5, 16, 0, 0, 166, 167, 5, 1, 0, 0, 167, 168, 3, 0, 0, 0, 168, 169, 5, 2, 0, 0, 169, 251, 1, 0, 0, 0, 170, 171, 5, 17, 0, 0, 171, 172, 5, 1, 0, 0, 172, 173, 3, 0, 0, 0, 173, 174, 5, 2, 0, 0, 174, 251, 1, 0, 0, 0, 175, 176, 5, 18, 0, 0, 176, 177, 5, 1, 0, 0, 177, 178, 3, 0, 0, 0, 178, 179, 5, 2, 0, 0, 179, 251, 1, 0, 0, 0, 180, 181, 5, 19, 0, 0, 181, 182, 5, 1, 0, 0, 182, 183, 3, 0, 0, 0, 183, 184, 5, 2, 0, 0, 184, 251, 1, 0, 0, 0, 185, 186, 5, 20, 0, 0, 186, 187, 5, 1, 0, 0, 187, 188, 3, 0, 0, 0, 188, 189, 5, 2, 0, 0, 189, 251, 1, 0, 0, 0, 190, 191, 5, 21, 0, 0, 191, 192, 5, 1, 0, 0, 192, 193, 3, 0, 0, 0, 193, 194, 5, 2, 0, 0, 194, 251, 1, 0, 0, 0, 195, 196, 5, 26, 0, 0, 196, 197, 5, 1, 0, 0, 197, 198, 3, 0, 0, 0, 198, 199, 5, 2, 0, 0, 199, 251, 1, 0, 0, 0, 200, 201, 5, 27, 0, 0, 201, 202, 5, 1, 0, 0, 202, 203, 3, 0, 0, 0, 203, 204, 5, 2, 0, 0, 204, 251, 1, 0, 0, 0, 205, 206, 5, 28, 0, 0, 206, 207, 5, 1, 0, 0, 207, 208, 3, 0, 0, 0, 208, 209, 5, 2, 0, 0, 209, 251, 1, 0, 0, 0, 210, 211, 5, 29, 0, 0, 211, 212, 5, 1, 0, 0, 212, 213, 3, 0, 0, 0, 213, 214, 5, 2, 0, 0, 214, 251, 1, 0, 0, 0, 215, 216, 5, 30, 0, 0, 216, 217, 5, 1, 0, 0, 217, 218, 3, 0, 0, 0, 218, 219, 5, 2, 0, 0, 219, 251, 1, 0, 0, 0, 220, 221, 5, 31, 0, 0, 221, 222, 5, 1, 0, 0, 222, 223, 3, 0, 0, 0, 223, 224, 5, 2, 0, 0, 224, 251, 1, 0, 0, 0, 225, 226, 5, 33, 0, 0, 226, 227, 5, 1, 0, 0, 227, 228, 3, 0, 0, 0, 228, 229, 5, 2, 0, 0, 229, 251, 1, 0, 0, 0, 230, 231, 5, 35, 0, 0, 231, 232, 5, 1, 0, 0, 232, 233, 3, 0, 0, 0, 233, 234, 5, 2, 0, 0, 234, 251, 1, 0, 0, 0, 235, 236, 5, 36, 0, 0, 236, 237, 5, 1, 0, 0, 237, 238, 3, 0, 0, 0, 238, 239, 5, 2, 0, 0, 239, 251, 1, 0, 0, 0, 240, 241, 5, 37, 0, 0, 241, 242, 5, 1, 0, 0, 242, 243, 3, 0, 0, 0, 243, 244, 5, 2, 0, 0, 244, 251, 1, 0, 0, 0, 245, 246, 5, 38, 0, 0, 246, 247, 5, 1, 0, 0, 247, 248, 3, 0, 0, 0, 248, 249, 5, 2, 0, 0, 249, 251, 1, 0, 0, 0, 250, 110, 1, 0, 0, 0, 250, 115, 1, 0, 0, 0, 250, 120, 1, 0, 0, 0, 250, 125, 1, 0, 0, 0, 250, 130, 1, 0, 0, 0, 250, 135, 1, 0, 0, 0, 250, 140, 1, 0, 0, 0, 250, 145, 1, 0, 0, 0, 250, 150, 1, 0, 0, 0, 250, 155, 1, 0, 0, 0, 250, 160, 1, 0, 0, 0, 250, 165, 1, 0, 0, 0, 250, 170, 1, 0, 0, 0, 250, 175, 1, 0, 0, 0, 250, 180, 1, 0, 0, 0, 250, 185, 1, 0, 0, 0, 250, 190, 1, 0, 0, 0, 250, 195, 1, 0, 0, 0, 250, 200, 1, 0, 0, 0, 250, 205, 1, 0, 0, 0, 250, 210, 1, 0, 0, 0, 250, 215, 1, 0, 0, 0, 250, 220, 1, 0, 0, 0, 250, 225, 1, 0, 0, 0, 250, 230, 1, 0, 0, 0, 250, 235, 1, 0, 0, 0, 250, 240, 1, 0, 0, 0, 250, 245, 1, 0, 0, 0, 251, 15, 1, 0, 0, 0, 252, 253, 5, 32, 0, 0, 253, 254, 5, 1, 0, 0, 254, 255, 3, 0, 0, 0, 255, 256, 5, 3, 0, 0, 256, 257, 3, 0, 0, 0, 257, 258, 5, 2, 0, 0, 258, 281, 1, 0, 0, 0, 259, 260, 5, 10, 0, 0, 260, 261, 5, 1, 0, 0, 261, 262, 3, 0, 0, 0, 262, 263, 5, 3, 0, 0, 263, 264, 3, 0, 0, 0, 264, 265, 5, 2, 0, 0, 265, 281, 1, 0, 0, 0, 266, 267, 5, 24, 0, 0, 267, 268, 5, 1, 0, 0, 268, 269, 3, 0, 0, 0, 269, 270, 5, 3, 0, 0, 270, 271, 3, 0, 0, 0, 271, 272, 5, 2, 0, 0, 272, 281, 1, 0, 0, 0, 273, 274, 5, 25, 0, 0, 274, 275, 5, 1, 0, 0, 275, 276, 3, 0, 0, 0, 276, 277, 5, 3, 0, 0, 277, 278, 3, 0, 0, 0, 278, 279, 5, 2, 0, 0, 279, 281, 1, 0, 0, 0, 280, 252, 1, 0, 0, 0, 280, 259, 1, 0, 0, 0, 280, 266, 1, 0, 0, 0, 280, 273, 1, 0, 0, 0, 281, 17, 1, 0, 0, 0, 282, 283, 5, 34, 0, 0, 283, 284, 5, 1, 0, 0, 284, 285, 3, 0, 0, 0, 285, 286, 5, 3, 0, 0, 286, 287, 3, 0, 0, 0, 287, 288, 5, 3, 0, 0, 288, 289, 3, 0, 0, 0, 289, 290, 5, 2, 0, 0, 290, 19, 1, 0, 0, 0, 291, 292, 5, 22, 0, 0, 292, 293, 5, 1, 0, 0, 293, 296, 3, 0, 0, 0, 294, 295, 5, 3, 0, 0, 295, 297, 3, 0, 0, 0, 296, 294, 1, 0, 0, 0, 297, 298, 1, 0, 0, 0, 298, 296, 1, 0, 0, 0, 298, 299, 1, 0, 0, 0, 299, 300, 1, 0, 0, 0, 300, 301, 5, 2, 0, 0, 301, 314, 1, 0, 0, 0, 302, 303, 5, 23, 0, 0, 303, 304, 5, 1, 0, 0, 304, 307, 3, 0, 0, 0, 305, 306, 5, 3, 0, 0, 306, 308, 3, 0, 0, 0, 307, 305, 1, 0, 0, 0, 308, 309, 1, 0, 0, 0, 309, 307, 1, 0, 0, 0, 309, 310, 1, 0, 0, 0, 310, 311, 1, 0, 0, 0, 311, 312, 5, 2, 0, 0, 312, 314, 1, 0, 0, 0, 313, 291, 1, 0, 0, 0, 313, 302, 1, 0, 0, 0, 314, 21, 1, 0, 0, 0, 15, 24, 47, 49, 61, 63, 78, 80, 88, 95, 108, 250, 280, 298, 309, 313] \ No newline at end of file +[4, 1, 64, 386, 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, 1, 0, 1, 0, 3, 0, 27, 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, 50, 8, 1, 10, 1, 12, 1, 53, 9, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 5, 2, 64, 8, 2, 10, 2, 12, 2, 67, 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, 81, 8, 3, 10, 3, 12, 3, 84, 9, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 3, 4, 91, 8, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 98, 8, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 116, 8, 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, 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, 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, 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, 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, 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, 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, 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, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 283, 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, 3, 8, 320, 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, 3, 9, 349, 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, 11, 1, 11, 1, 11, 1, 11, 1, 11, 4, 11, 367, 8, 11, 11, 11, 12, 11, 368, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 4, 11, 378, 8, 11, 11, 11, 12, 11, 379, 1, 11, 1, 11, 3, 11, 384, 8, 11, 1, 11, 0, 3, 2, 4, 6, 12, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 0, 0, 438, 0, 26, 1, 0, 0, 0, 2, 28, 1, 0, 0, 0, 4, 54, 1, 0, 0, 0, 6, 68, 1, 0, 0, 0, 8, 90, 1, 0, 0, 0, 10, 97, 1, 0, 0, 0, 12, 115, 1, 0, 0, 0, 14, 282, 1, 0, 0, 0, 16, 319, 1, 0, 0, 0, 18, 348, 1, 0, 0, 0, 20, 350, 1, 0, 0, 0, 22, 383, 1, 0, 0, 0, 24, 27, 3, 12, 6, 0, 25, 27, 3, 2, 1, 0, 26, 24, 1, 0, 0, 0, 26, 25, 1, 0, 0, 0, 27, 1, 1, 0, 0, 0, 28, 29, 6, 1, -1, 0, 29, 30, 3, 4, 2, 0, 30, 51, 1, 0, 0, 0, 31, 32, 10, 7, 0, 0, 32, 33, 5, 55, 0, 0, 33, 50, 3, 4, 2, 0, 34, 35, 10, 6, 0, 0, 35, 36, 5, 54, 0, 0, 36, 50, 3, 4, 2, 0, 37, 38, 10, 5, 0, 0, 38, 39, 5, 57, 0, 0, 39, 50, 3, 4, 2, 0, 40, 41, 10, 4, 0, 0, 41, 42, 5, 56, 0, 0, 42, 50, 3, 4, 2, 0, 43, 44, 10, 3, 0, 0, 44, 45, 5, 58, 0, 0, 45, 50, 3, 4, 2, 0, 46, 47, 10, 2, 0, 0, 47, 48, 5, 59, 0, 0, 48, 50, 3, 4, 2, 0, 49, 31, 1, 0, 0, 0, 49, 34, 1, 0, 0, 0, 49, 37, 1, 0, 0, 0, 49, 40, 1, 0, 0, 0, 49, 43, 1, 0, 0, 0, 49, 46, 1, 0, 0, 0, 50, 53, 1, 0, 0, 0, 51, 49, 1, 0, 0, 0, 51, 52, 1, 0, 0, 0, 52, 3, 1, 0, 0, 0, 53, 51, 1, 0, 0, 0, 54, 55, 6, 2, -1, 0, 55, 56, 3, 6, 3, 0, 56, 65, 1, 0, 0, 0, 57, 58, 10, 3, 0, 0, 58, 59, 5, 48, 0, 0, 59, 64, 3, 6, 3, 0, 60, 61, 10, 2, 0, 0, 61, 62, 5, 49, 0, 0, 62, 64, 3, 6, 3, 0, 63, 57, 1, 0, 0, 0, 63, 60, 1, 0, 0, 0, 64, 67, 1, 0, 0, 0, 65, 63, 1, 0, 0, 0, 65, 66, 1, 0, 0, 0, 66, 5, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 68, 69, 6, 3, -1, 0, 69, 70, 3, 8, 4, 0, 70, 82, 1, 0, 0, 0, 71, 72, 10, 4, 0, 0, 72, 73, 5, 50, 0, 0, 73, 81, 3, 8, 4, 0, 74, 75, 10, 3, 0, 0, 75, 76, 5, 51, 0, 0, 76, 81, 3, 8, 4, 0, 77, 78, 10, 2, 0, 0, 78, 79, 5, 52, 0, 0, 79, 81, 3, 8, 4, 0, 80, 71, 1, 0, 0, 0, 80, 74, 1, 0, 0, 0, 80, 77, 1, 0, 0, 0, 81, 84, 1, 0, 0, 0, 82, 80, 1, 0, 0, 0, 82, 83, 1, 0, 0, 0, 83, 7, 1, 0, 0, 0, 84, 82, 1, 0, 0, 0, 85, 86, 3, 10, 5, 0, 86, 87, 5, 53, 0, 0, 87, 88, 3, 8, 4, 0, 88, 91, 1, 0, 0, 0, 89, 91, 3, 10, 5, 0, 90, 85, 1, 0, 0, 0, 90, 89, 1, 0, 0, 0, 91, 9, 1, 0, 0, 0, 92, 93, 5, 48, 0, 0, 93, 98, 3, 10, 5, 0, 94, 95, 5, 49, 0, 0, 95, 98, 3, 10, 5, 0, 96, 98, 3, 12, 6, 0, 97, 92, 1, 0, 0, 0, 97, 94, 1, 0, 0, 0, 97, 96, 1, 0, 0, 0, 98, 11, 1, 0, 0, 0, 99, 116, 3, 14, 7, 0, 100, 116, 3, 16, 8, 0, 101, 116, 3, 18, 9, 0, 102, 116, 3, 20, 10, 0, 103, 116, 3, 22, 11, 0, 104, 116, 5, 63, 0, 0, 105, 116, 5, 62, 0, 0, 106, 116, 5, 61, 0, 0, 107, 108, 5, 1, 0, 0, 108, 109, 3, 0, 0, 0, 109, 110, 5, 2, 0, 0, 110, 116, 1, 0, 0, 0, 111, 112, 5, 60, 0, 0, 112, 113, 3, 0, 0, 0, 113, 114, 5, 60, 0, 0, 114, 116, 1, 0, 0, 0, 115, 99, 1, 0, 0, 0, 115, 100, 1, 0, 0, 0, 115, 101, 1, 0, 0, 0, 115, 102, 1, 0, 0, 0, 115, 103, 1, 0, 0, 0, 115, 104, 1, 0, 0, 0, 115, 105, 1, 0, 0, 0, 115, 106, 1, 0, 0, 0, 115, 107, 1, 0, 0, 0, 115, 111, 1, 0, 0, 0, 116, 13, 1, 0, 0, 0, 117, 118, 5, 4, 0, 0, 118, 119, 5, 1, 0, 0, 119, 120, 3, 0, 0, 0, 120, 121, 5, 2, 0, 0, 121, 283, 1, 0, 0, 0, 122, 123, 5, 5, 0, 0, 123, 124, 5, 1, 0, 0, 124, 125, 3, 0, 0, 0, 125, 126, 5, 2, 0, 0, 126, 283, 1, 0, 0, 0, 127, 128, 5, 6, 0, 0, 128, 129, 5, 1, 0, 0, 129, 130, 3, 0, 0, 0, 130, 131, 5, 2, 0, 0, 131, 283, 1, 0, 0, 0, 132, 133, 5, 7, 0, 0, 133, 134, 5, 1, 0, 0, 134, 135, 3, 0, 0, 0, 135, 136, 5, 2, 0, 0, 136, 283, 1, 0, 0, 0, 137, 138, 5, 8, 0, 0, 138, 139, 5, 1, 0, 0, 139, 140, 3, 0, 0, 0, 140, 141, 5, 2, 0, 0, 141, 283, 1, 0, 0, 0, 142, 143, 5, 9, 0, 0, 143, 144, 5, 1, 0, 0, 144, 145, 3, 0, 0, 0, 145, 146, 5, 2, 0, 0, 146, 283, 1, 0, 0, 0, 147, 148, 5, 11, 0, 0, 148, 149, 5, 1, 0, 0, 149, 150, 3, 0, 0, 0, 150, 151, 5, 2, 0, 0, 151, 283, 1, 0, 0, 0, 152, 153, 5, 12, 0, 0, 153, 154, 5, 1, 0, 0, 154, 155, 3, 0, 0, 0, 155, 156, 5, 2, 0, 0, 156, 283, 1, 0, 0, 0, 157, 158, 5, 13, 0, 0, 158, 159, 5, 1, 0, 0, 159, 160, 3, 0, 0, 0, 160, 161, 5, 2, 0, 0, 161, 283, 1, 0, 0, 0, 162, 163, 5, 14, 0, 0, 163, 164, 5, 1, 0, 0, 164, 165, 3, 0, 0, 0, 165, 166, 5, 2, 0, 0, 166, 283, 1, 0, 0, 0, 167, 168, 5, 15, 0, 0, 168, 169, 5, 1, 0, 0, 169, 170, 3, 0, 0, 0, 170, 171, 5, 2, 0, 0, 171, 283, 1, 0, 0, 0, 172, 173, 5, 16, 0, 0, 173, 174, 5, 1, 0, 0, 174, 175, 3, 0, 0, 0, 175, 176, 5, 2, 0, 0, 176, 283, 1, 0, 0, 0, 177, 178, 5, 17, 0, 0, 178, 179, 5, 1, 0, 0, 179, 180, 3, 0, 0, 0, 180, 181, 5, 2, 0, 0, 181, 283, 1, 0, 0, 0, 182, 183, 5, 18, 0, 0, 183, 184, 5, 1, 0, 0, 184, 185, 3, 0, 0, 0, 185, 186, 5, 2, 0, 0, 186, 283, 1, 0, 0, 0, 187, 188, 5, 19, 0, 0, 188, 189, 5, 1, 0, 0, 189, 190, 3, 0, 0, 0, 190, 191, 5, 2, 0, 0, 191, 283, 1, 0, 0, 0, 192, 193, 5, 20, 0, 0, 193, 194, 5, 1, 0, 0, 194, 195, 3, 0, 0, 0, 195, 196, 5, 2, 0, 0, 196, 283, 1, 0, 0, 0, 197, 198, 5, 21, 0, 0, 198, 199, 5, 1, 0, 0, 199, 200, 3, 0, 0, 0, 200, 201, 5, 2, 0, 0, 201, 283, 1, 0, 0, 0, 202, 203, 5, 26, 0, 0, 203, 204, 5, 1, 0, 0, 204, 205, 3, 0, 0, 0, 205, 206, 5, 2, 0, 0, 206, 283, 1, 0, 0, 0, 207, 208, 5, 27, 0, 0, 208, 209, 5, 1, 0, 0, 209, 210, 3, 0, 0, 0, 210, 211, 5, 2, 0, 0, 211, 283, 1, 0, 0, 0, 212, 213, 5, 28, 0, 0, 213, 214, 5, 1, 0, 0, 214, 215, 3, 0, 0, 0, 215, 216, 5, 2, 0, 0, 216, 283, 1, 0, 0, 0, 217, 218, 5, 29, 0, 0, 218, 219, 5, 1, 0, 0, 219, 220, 3, 0, 0, 0, 220, 221, 5, 2, 0, 0, 221, 283, 1, 0, 0, 0, 222, 223, 5, 30, 0, 0, 223, 224, 5, 1, 0, 0, 224, 225, 3, 0, 0, 0, 225, 226, 5, 2, 0, 0, 226, 283, 1, 0, 0, 0, 227, 228, 5, 31, 0, 0, 228, 229, 5, 1, 0, 0, 229, 230, 3, 0, 0, 0, 230, 231, 5, 2, 0, 0, 231, 283, 1, 0, 0, 0, 232, 233, 5, 33, 0, 0, 233, 234, 5, 1, 0, 0, 234, 235, 3, 0, 0, 0, 235, 236, 5, 2, 0, 0, 236, 283, 1, 0, 0, 0, 237, 238, 5, 35, 0, 0, 238, 239, 5, 1, 0, 0, 239, 240, 3, 0, 0, 0, 240, 241, 5, 2, 0, 0, 241, 283, 1, 0, 0, 0, 242, 243, 5, 36, 0, 0, 243, 244, 5, 1, 0, 0, 244, 245, 3, 0, 0, 0, 245, 246, 5, 2, 0, 0, 246, 283, 1, 0, 0, 0, 247, 248, 5, 37, 0, 0, 248, 249, 5, 1, 0, 0, 249, 250, 3, 0, 0, 0, 250, 251, 5, 2, 0, 0, 251, 283, 1, 0, 0, 0, 252, 253, 5, 38, 0, 0, 253, 254, 5, 1, 0, 0, 254, 255, 3, 0, 0, 0, 255, 256, 5, 2, 0, 0, 256, 283, 1, 0, 0, 0, 257, 258, 5, 42, 0, 0, 258, 259, 5, 1, 0, 0, 259, 260, 3, 0, 0, 0, 260, 261, 5, 2, 0, 0, 261, 283, 1, 0, 0, 0, 262, 263, 5, 43, 0, 0, 263, 264, 5, 1, 0, 0, 264, 265, 3, 0, 0, 0, 265, 266, 5, 2, 0, 0, 266, 283, 1, 0, 0, 0, 267, 268, 5, 44, 0, 0, 268, 269, 5, 1, 0, 0, 269, 270, 3, 0, 0, 0, 270, 271, 5, 2, 0, 0, 271, 283, 1, 0, 0, 0, 272, 273, 5, 45, 0, 0, 273, 274, 5, 1, 0, 0, 274, 275, 3, 0, 0, 0, 275, 276, 5, 2, 0, 0, 276, 283, 1, 0, 0, 0, 277, 278, 5, 46, 0, 0, 278, 279, 5, 1, 0, 0, 279, 280, 3, 0, 0, 0, 280, 281, 5, 2, 0, 0, 281, 283, 1, 0, 0, 0, 282, 117, 1, 0, 0, 0, 282, 122, 1, 0, 0, 0, 282, 127, 1, 0, 0, 0, 282, 132, 1, 0, 0, 0, 282, 137, 1, 0, 0, 0, 282, 142, 1, 0, 0, 0, 282, 147, 1, 0, 0, 0, 282, 152, 1, 0, 0, 0, 282, 157, 1, 0, 0, 0, 282, 162, 1, 0, 0, 0, 282, 167, 1, 0, 0, 0, 282, 172, 1, 0, 0, 0, 282, 177, 1, 0, 0, 0, 282, 182, 1, 0, 0, 0, 282, 187, 1, 0, 0, 0, 282, 192, 1, 0, 0, 0, 282, 197, 1, 0, 0, 0, 282, 202, 1, 0, 0, 0, 282, 207, 1, 0, 0, 0, 282, 212, 1, 0, 0, 0, 282, 217, 1, 0, 0, 0, 282, 222, 1, 0, 0, 0, 282, 227, 1, 0, 0, 0, 282, 232, 1, 0, 0, 0, 282, 237, 1, 0, 0, 0, 282, 242, 1, 0, 0, 0, 282, 247, 1, 0, 0, 0, 282, 252, 1, 0, 0, 0, 282, 257, 1, 0, 0, 0, 282, 262, 1, 0, 0, 0, 282, 267, 1, 0, 0, 0, 282, 272, 1, 0, 0, 0, 282, 277, 1, 0, 0, 0, 283, 15, 1, 0, 0, 0, 284, 285, 5, 32, 0, 0, 285, 286, 5, 1, 0, 0, 286, 287, 3, 0, 0, 0, 287, 288, 5, 3, 0, 0, 288, 289, 3, 0, 0, 0, 289, 290, 5, 2, 0, 0, 290, 320, 1, 0, 0, 0, 291, 292, 5, 10, 0, 0, 292, 293, 5, 1, 0, 0, 293, 294, 3, 0, 0, 0, 294, 295, 5, 3, 0, 0, 295, 296, 3, 0, 0, 0, 296, 297, 5, 2, 0, 0, 297, 320, 1, 0, 0, 0, 298, 299, 5, 24, 0, 0, 299, 300, 5, 1, 0, 0, 300, 301, 3, 0, 0, 0, 301, 302, 5, 3, 0, 0, 302, 303, 3, 0, 0, 0, 303, 304, 5, 2, 0, 0, 304, 320, 1, 0, 0, 0, 305, 306, 5, 25, 0, 0, 306, 307, 5, 1, 0, 0, 307, 308, 3, 0, 0, 0, 308, 309, 5, 3, 0, 0, 309, 310, 3, 0, 0, 0, 310, 311, 5, 2, 0, 0, 311, 320, 1, 0, 0, 0, 312, 313, 5, 40, 0, 0, 313, 314, 5, 1, 0, 0, 314, 315, 3, 0, 0, 0, 315, 316, 5, 3, 0, 0, 316, 317, 3, 0, 0, 0, 317, 318, 5, 2, 0, 0, 318, 320, 1, 0, 0, 0, 319, 284, 1, 0, 0, 0, 319, 291, 1, 0, 0, 0, 319, 298, 1, 0, 0, 0, 319, 305, 1, 0, 0, 0, 319, 312, 1, 0, 0, 0, 320, 17, 1, 0, 0, 0, 321, 322, 5, 34, 0, 0, 322, 323, 5, 1, 0, 0, 323, 324, 3, 0, 0, 0, 324, 325, 5, 3, 0, 0, 325, 326, 3, 0, 0, 0, 326, 327, 5, 3, 0, 0, 327, 328, 3, 0, 0, 0, 328, 329, 5, 2, 0, 0, 329, 349, 1, 0, 0, 0, 330, 331, 5, 39, 0, 0, 331, 332, 5, 1, 0, 0, 332, 333, 3, 0, 0, 0, 333, 334, 5, 3, 0, 0, 334, 335, 3, 0, 0, 0, 335, 336, 5, 3, 0, 0, 336, 337, 3, 0, 0, 0, 337, 338, 5, 2, 0, 0, 338, 349, 1, 0, 0, 0, 339, 340, 5, 41, 0, 0, 340, 341, 5, 1, 0, 0, 341, 342, 3, 0, 0, 0, 342, 343, 5, 3, 0, 0, 343, 344, 3, 0, 0, 0, 344, 345, 5, 3, 0, 0, 345, 346, 3, 0, 0, 0, 346, 347, 5, 2, 0, 0, 347, 349, 1, 0, 0, 0, 348, 321, 1, 0, 0, 0, 348, 330, 1, 0, 0, 0, 348, 339, 1, 0, 0, 0, 349, 19, 1, 0, 0, 0, 350, 351, 5, 47, 0, 0, 351, 352, 5, 1, 0, 0, 352, 353, 3, 0, 0, 0, 353, 354, 5, 3, 0, 0, 354, 355, 3, 0, 0, 0, 355, 356, 5, 3, 0, 0, 356, 357, 3, 0, 0, 0, 357, 358, 5, 3, 0, 0, 358, 359, 3, 0, 0, 0, 359, 360, 5, 2, 0, 0, 360, 21, 1, 0, 0, 0, 361, 362, 5, 22, 0, 0, 362, 363, 5, 1, 0, 0, 363, 366, 3, 0, 0, 0, 364, 365, 5, 3, 0, 0, 365, 367, 3, 0, 0, 0, 366, 364, 1, 0, 0, 0, 367, 368, 1, 0, 0, 0, 368, 366, 1, 0, 0, 0, 368, 369, 1, 0, 0, 0, 369, 370, 1, 0, 0, 0, 370, 371, 5, 2, 0, 0, 371, 384, 1, 0, 0, 0, 372, 373, 5, 23, 0, 0, 373, 374, 5, 1, 0, 0, 374, 377, 3, 0, 0, 0, 375, 376, 5, 3, 0, 0, 376, 378, 3, 0, 0, 0, 377, 375, 1, 0, 0, 0, 378, 379, 1, 0, 0, 0, 379, 377, 1, 0, 0, 0, 379, 380, 1, 0, 0, 0, 380, 381, 1, 0, 0, 0, 381, 382, 5, 2, 0, 0, 382, 384, 1, 0, 0, 0, 383, 361, 1, 0, 0, 0, 383, 372, 1, 0, 0, 0, 384, 23, 1, 0, 0, 0, 16, 26, 49, 51, 63, 65, 80, 82, 90, 97, 115, 282, 319, 348, 368, 379, 383] \ No newline at end of file diff --git a/more_math/Parser/MathExpr.tokens b/more_math/Parser/MathExpr.tokens index 7dbacf6..c8a40c6 100644 --- a/more_math/Parser/MathExpr.tokens +++ b/more_math/Parser/MathExpr.tokens @@ -57,10 +57,11 @@ LE=56 LT=57 EQ=58 NE=59 -CONSTANT=60 -NUMBER=61 -VARIABLE=62 -WS=63 +PIPE=60 +CONSTANT=61 +NUMBER=62 +VARIABLE=63 +WS=64 '('=1 ')'=2 ','=3 @@ -120,3 +121,4 @@ WS=63 '<'=57 '=='=58 '!='=59 +'|'=60 diff --git a/more_math/Parser/MathExprLexer.interp b/more_math/Parser/MathExprLexer.interp index 8acfce6..b6fe411 100644 --- a/more_math/Parser/MathExprLexer.interp +++ b/more_math/Parser/MathExprLexer.interp @@ -38,6 +38,15 @@ null 'ifft' 'angle' 'print' +'lerp' +'step' +'smoothstep' +'fract' +'relu' +'softplus' +'gelu' +'sign' +'swap' '+' '-' '*' @@ -50,6 +59,7 @@ null '<' '==' '!=' +'|' null null null @@ -95,6 +105,15 @@ SFFT SIFFT ANGL PRNT +LERP +STEP +SMOOTHSTEP +FRACT +RELU +SOFTPLUS +GELU +SIGN +SWAP PLUS MINUS MULT @@ -107,6 +126,7 @@ LE LT EQ NE +PIPE CONSTANT NUMBER VARIABLE @@ -151,6 +171,15 @@ SFFT SIFFT ANGL PRNT +LERP +STEP +SMOOTHSTEP +FRACT +RELU +SOFTPLUS +GELU +SIGN +SWAP PLUS MINUS MULT @@ -163,6 +192,7 @@ LE LT EQ NE +PIPE CONSTANT NUMBER VARIABLE @@ -176,4 +206,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 54, 354, 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, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 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, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 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, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 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, 28, 1, 29, 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, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 40, 1, 40, 1, 41, 1, 41, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 50, 3, 50, 326, 8, 50, 1, 51, 4, 51, 329, 8, 51, 11, 51, 12, 51, 330, 1, 51, 1, 51, 4, 51, 335, 8, 51, 11, 51, 12, 51, 336, 3, 51, 339, 8, 51, 1, 52, 1, 52, 5, 52, 343, 8, 52, 10, 52, 12, 52, 346, 9, 52, 1, 53, 4, 53, 349, 8, 53, 11, 53, 12, 53, 350, 1, 53, 1, 53, 0, 0, 54, 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, 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, 360, 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, 1, 109, 1, 0, 0, 0, 3, 111, 1, 0, 0, 0, 5, 113, 1, 0, 0, 0, 7, 115, 1, 0, 0, 0, 9, 119, 1, 0, 0, 0, 11, 123, 1, 0, 0, 0, 13, 127, 1, 0, 0, 0, 15, 132, 1, 0, 0, 0, 17, 137, 1, 0, 0, 0, 19, 142, 1, 0, 0, 0, 21, 148, 1, 0, 0, 0, 23, 153, 1, 0, 0, 0, 25, 158, 1, 0, 0, 0, 27, 163, 1, 0, 0, 0, 29, 169, 1, 0, 0, 0, 31, 175, 1, 0, 0, 0, 33, 181, 1, 0, 0, 0, 35, 185, 1, 0, 0, 0, 37, 190, 1, 0, 0, 0, 39, 193, 1, 0, 0, 0, 41, 197, 1, 0, 0, 0, 43, 201, 1, 0, 0, 0, 45, 206, 1, 0, 0, 0, 47, 211, 1, 0, 0, 0, 49, 216, 1, 0, 0, 0, 51, 221, 1, 0, 0, 0, 53, 227, 1, 0, 0, 0, 55, 233, 1, 0, 0, 0, 57, 239, 1, 0, 0, 0, 59, 244, 1, 0, 0, 0, 61, 250, 1, 0, 0, 0, 63, 256, 1, 0, 0, 0, 65, 260, 1, 0, 0, 0, 67, 265, 1, 0, 0, 0, 69, 271, 1, 0, 0, 0, 71, 275, 1, 0, 0, 0, 73, 280, 1, 0, 0, 0, 75, 286, 1, 0, 0, 0, 77, 292, 1, 0, 0, 0, 79, 294, 1, 0, 0, 0, 81, 296, 1, 0, 0, 0, 83, 298, 1, 0, 0, 0, 85, 300, 1, 0, 0, 0, 87, 302, 1, 0, 0, 0, 89, 304, 1, 0, 0, 0, 91, 307, 1, 0, 0, 0, 93, 309, 1, 0, 0, 0, 95, 312, 1, 0, 0, 0, 97, 314, 1, 0, 0, 0, 99, 317, 1, 0, 0, 0, 101, 325, 1, 0, 0, 0, 103, 328, 1, 0, 0, 0, 105, 340, 1, 0, 0, 0, 107, 348, 1, 0, 0, 0, 109, 110, 5, 40, 0, 0, 110, 2, 1, 0, 0, 0, 111, 112, 5, 41, 0, 0, 112, 4, 1, 0, 0, 0, 113, 114, 5, 44, 0, 0, 114, 6, 1, 0, 0, 0, 115, 116, 5, 115, 0, 0, 116, 117, 5, 105, 0, 0, 117, 118, 5, 110, 0, 0, 118, 8, 1, 0, 0, 0, 119, 120, 5, 99, 0, 0, 120, 121, 5, 111, 0, 0, 121, 122, 5, 115, 0, 0, 122, 10, 1, 0, 0, 0, 123, 124, 5, 116, 0, 0, 124, 125, 5, 97, 0, 0, 125, 126, 5, 110, 0, 0, 126, 12, 1, 0, 0, 0, 127, 128, 5, 97, 0, 0, 128, 129, 5, 115, 0, 0, 129, 130, 5, 105, 0, 0, 130, 131, 5, 110, 0, 0, 131, 14, 1, 0, 0, 0, 132, 133, 5, 97, 0, 0, 133, 134, 5, 99, 0, 0, 134, 135, 5, 111, 0, 0, 135, 136, 5, 115, 0, 0, 136, 16, 1, 0, 0, 0, 137, 138, 5, 97, 0, 0, 138, 139, 5, 116, 0, 0, 139, 140, 5, 97, 0, 0, 140, 141, 5, 110, 0, 0, 141, 18, 1, 0, 0, 0, 142, 143, 5, 97, 0, 0, 143, 144, 5, 116, 0, 0, 144, 145, 5, 97, 0, 0, 145, 146, 5, 110, 0, 0, 146, 147, 5, 50, 0, 0, 147, 20, 1, 0, 0, 0, 148, 149, 5, 115, 0, 0, 149, 150, 5, 105, 0, 0, 150, 151, 5, 110, 0, 0, 151, 152, 5, 104, 0, 0, 152, 22, 1, 0, 0, 0, 153, 154, 5, 99, 0, 0, 154, 155, 5, 111, 0, 0, 155, 156, 5, 115, 0, 0, 156, 157, 5, 104, 0, 0, 157, 24, 1, 0, 0, 0, 158, 159, 5, 116, 0, 0, 159, 160, 5, 97, 0, 0, 160, 161, 5, 110, 0, 0, 161, 162, 5, 104, 0, 0, 162, 26, 1, 0, 0, 0, 163, 164, 5, 97, 0, 0, 164, 165, 5, 115, 0, 0, 165, 166, 5, 105, 0, 0, 166, 167, 5, 110, 0, 0, 167, 168, 5, 104, 0, 0, 168, 28, 1, 0, 0, 0, 169, 170, 5, 97, 0, 0, 170, 171, 5, 99, 0, 0, 171, 172, 5, 111, 0, 0, 172, 173, 5, 115, 0, 0, 173, 174, 5, 104, 0, 0, 174, 30, 1, 0, 0, 0, 175, 176, 5, 97, 0, 0, 176, 177, 5, 116, 0, 0, 177, 178, 5, 97, 0, 0, 178, 179, 5, 110, 0, 0, 179, 180, 5, 104, 0, 0, 180, 32, 1, 0, 0, 0, 181, 182, 5, 97, 0, 0, 182, 183, 5, 98, 0, 0, 183, 184, 5, 115, 0, 0, 184, 34, 1, 0, 0, 0, 185, 186, 5, 115, 0, 0, 186, 187, 5, 113, 0, 0, 187, 188, 5, 114, 0, 0, 188, 189, 5, 116, 0, 0, 189, 36, 1, 0, 0, 0, 190, 191, 5, 108, 0, 0, 191, 192, 5, 110, 0, 0, 192, 38, 1, 0, 0, 0, 193, 194, 5, 108, 0, 0, 194, 195, 5, 111, 0, 0, 195, 196, 5, 103, 0, 0, 196, 40, 1, 0, 0, 0, 197, 198, 5, 101, 0, 0, 198, 199, 5, 120, 0, 0, 199, 200, 5, 112, 0, 0, 200, 42, 1, 0, 0, 0, 201, 202, 5, 115, 0, 0, 202, 203, 5, 109, 0, 0, 203, 204, 5, 105, 0, 0, 204, 205, 5, 110, 0, 0, 205, 44, 1, 0, 0, 0, 206, 207, 5, 115, 0, 0, 207, 208, 5, 109, 0, 0, 208, 209, 5, 97, 0, 0, 209, 210, 5, 120, 0, 0, 210, 46, 1, 0, 0, 0, 211, 212, 5, 116, 0, 0, 212, 213, 5, 109, 0, 0, 213, 214, 5, 105, 0, 0, 214, 215, 5, 110, 0, 0, 215, 48, 1, 0, 0, 0, 216, 217, 5, 116, 0, 0, 217, 218, 5, 109, 0, 0, 218, 219, 5, 97, 0, 0, 219, 220, 5, 120, 0, 0, 220, 50, 1, 0, 0, 0, 221, 222, 5, 116, 0, 0, 222, 223, 5, 110, 0, 0, 223, 224, 5, 111, 0, 0, 224, 225, 5, 114, 0, 0, 225, 226, 5, 109, 0, 0, 226, 52, 1, 0, 0, 0, 227, 228, 5, 115, 0, 0, 228, 229, 5, 110, 0, 0, 229, 230, 5, 111, 0, 0, 230, 231, 5, 114, 0, 0, 231, 232, 5, 109, 0, 0, 232, 54, 1, 0, 0, 0, 233, 234, 5, 102, 0, 0, 234, 235, 5, 108, 0, 0, 235, 236, 5, 111, 0, 0, 236, 237, 5, 111, 0, 0, 237, 238, 5, 114, 0, 0, 238, 56, 1, 0, 0, 0, 239, 240, 5, 99, 0, 0, 240, 241, 5, 101, 0, 0, 241, 242, 5, 105, 0, 0, 242, 243, 5, 108, 0, 0, 243, 58, 1, 0, 0, 0, 244, 245, 5, 114, 0, 0, 245, 246, 5, 111, 0, 0, 246, 247, 5, 117, 0, 0, 247, 248, 5, 110, 0, 0, 248, 249, 5, 100, 0, 0, 249, 60, 1, 0, 0, 0, 250, 251, 5, 103, 0, 0, 251, 252, 5, 97, 0, 0, 252, 253, 5, 109, 0, 0, 253, 254, 5, 109, 0, 0, 254, 255, 5, 97, 0, 0, 255, 62, 1, 0, 0, 0, 256, 257, 5, 112, 0, 0, 257, 258, 5, 111, 0, 0, 258, 259, 5, 119, 0, 0, 259, 64, 1, 0, 0, 0, 260, 261, 5, 115, 0, 0, 261, 262, 5, 105, 0, 0, 262, 263, 5, 103, 0, 0, 263, 264, 5, 109, 0, 0, 264, 66, 1, 0, 0, 0, 265, 266, 5, 99, 0, 0, 266, 267, 5, 108, 0, 0, 267, 268, 5, 97, 0, 0, 268, 269, 5, 109, 0, 0, 269, 270, 5, 112, 0, 0, 270, 68, 1, 0, 0, 0, 271, 272, 5, 102, 0, 0, 272, 273, 5, 102, 0, 0, 273, 274, 5, 116, 0, 0, 274, 70, 1, 0, 0, 0, 275, 276, 5, 105, 0, 0, 276, 277, 5, 102, 0, 0, 277, 278, 5, 102, 0, 0, 278, 279, 5, 116, 0, 0, 279, 72, 1, 0, 0, 0, 280, 281, 5, 97, 0, 0, 281, 282, 5, 110, 0, 0, 282, 283, 5, 103, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 101, 0, 0, 285, 74, 1, 0, 0, 0, 286, 287, 5, 112, 0, 0, 287, 288, 5, 114, 0, 0, 288, 289, 5, 105, 0, 0, 289, 290, 5, 110, 0, 0, 290, 291, 5, 116, 0, 0, 291, 76, 1, 0, 0, 0, 292, 293, 5, 43, 0, 0, 293, 78, 1, 0, 0, 0, 294, 295, 5, 45, 0, 0, 295, 80, 1, 0, 0, 0, 296, 297, 5, 42, 0, 0, 297, 82, 1, 0, 0, 0, 298, 299, 5, 47, 0, 0, 299, 84, 1, 0, 0, 0, 300, 301, 5, 37, 0, 0, 301, 86, 1, 0, 0, 0, 302, 303, 5, 94, 0, 0, 303, 88, 1, 0, 0, 0, 304, 305, 5, 62, 0, 0, 305, 306, 5, 61, 0, 0, 306, 90, 1, 0, 0, 0, 307, 308, 5, 62, 0, 0, 308, 92, 1, 0, 0, 0, 309, 310, 5, 60, 0, 0, 310, 311, 5, 61, 0, 0, 311, 94, 1, 0, 0, 0, 312, 313, 5, 60, 0, 0, 313, 96, 1, 0, 0, 0, 314, 315, 5, 61, 0, 0, 315, 316, 5, 61, 0, 0, 316, 98, 1, 0, 0, 0, 317, 318, 5, 33, 0, 0, 318, 319, 5, 61, 0, 0, 319, 100, 1, 0, 0, 0, 320, 321, 5, 112, 0, 0, 321, 326, 5, 105, 0, 0, 322, 323, 5, 80, 0, 0, 323, 326, 5, 73, 0, 0, 324, 326, 7, 0, 0, 0, 325, 320, 1, 0, 0, 0, 325, 322, 1, 0, 0, 0, 325, 324, 1, 0, 0, 0, 326, 102, 1, 0, 0, 0, 327, 329, 7, 1, 0, 0, 328, 327, 1, 0, 0, 0, 329, 330, 1, 0, 0, 0, 330, 328, 1, 0, 0, 0, 330, 331, 1, 0, 0, 0, 331, 338, 1, 0, 0, 0, 332, 334, 5, 46, 0, 0, 333, 335, 7, 1, 0, 0, 334, 333, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 334, 1, 0, 0, 0, 336, 337, 1, 0, 0, 0, 337, 339, 1, 0, 0, 0, 338, 332, 1, 0, 0, 0, 338, 339, 1, 0, 0, 0, 339, 104, 1, 0, 0, 0, 340, 344, 7, 2, 0, 0, 341, 343, 7, 3, 0, 0, 342, 341, 1, 0, 0, 0, 343, 346, 1, 0, 0, 0, 344, 342, 1, 0, 0, 0, 344, 345, 1, 0, 0, 0, 345, 106, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 347, 349, 7, 4, 0, 0, 348, 347, 1, 0, 0, 0, 349, 350, 1, 0, 0, 0, 350, 348, 1, 0, 0, 0, 350, 351, 1, 0, 0, 0, 351, 352, 1, 0, 0, 0, 352, 353, 6, 53, 0, 0, 353, 108, 1, 0, 0, 0, 7, 0, 325, 330, 336, 338, 344, 350, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 64, 432, 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, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 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, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 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, 23, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 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, 28, 1, 29, 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, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 1, 40, 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, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 1, 45, 1, 45, 1, 45, 1, 45, 1, 46, 1, 46, 1, 46, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 3, 60, 404, 8, 60, 1, 61, 4, 61, 407, 8, 61, 11, 61, 12, 61, 408, 1, 61, 1, 61, 4, 61, 413, 8, 61, 11, 61, 12, 61, 414, 3, 61, 417, 8, 61, 1, 62, 1, 62, 5, 62, 421, 8, 62, 10, 62, 12, 62, 424, 9, 62, 1, 63, 4, 63, 427, 8, 63, 11, 63, 12, 63, 428, 1, 63, 1, 63, 0, 0, 64, 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, 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, 438, 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, 1, 129, 1, 0, 0, 0, 3, 131, 1, 0, 0, 0, 5, 133, 1, 0, 0, 0, 7, 135, 1, 0, 0, 0, 9, 139, 1, 0, 0, 0, 11, 143, 1, 0, 0, 0, 13, 147, 1, 0, 0, 0, 15, 152, 1, 0, 0, 0, 17, 157, 1, 0, 0, 0, 19, 162, 1, 0, 0, 0, 21, 168, 1, 0, 0, 0, 23, 173, 1, 0, 0, 0, 25, 178, 1, 0, 0, 0, 27, 183, 1, 0, 0, 0, 29, 189, 1, 0, 0, 0, 31, 195, 1, 0, 0, 0, 33, 201, 1, 0, 0, 0, 35, 205, 1, 0, 0, 0, 37, 210, 1, 0, 0, 0, 39, 213, 1, 0, 0, 0, 41, 217, 1, 0, 0, 0, 43, 221, 1, 0, 0, 0, 45, 226, 1, 0, 0, 0, 47, 231, 1, 0, 0, 0, 49, 236, 1, 0, 0, 0, 51, 241, 1, 0, 0, 0, 53, 247, 1, 0, 0, 0, 55, 253, 1, 0, 0, 0, 57, 259, 1, 0, 0, 0, 59, 264, 1, 0, 0, 0, 61, 270, 1, 0, 0, 0, 63, 276, 1, 0, 0, 0, 65, 280, 1, 0, 0, 0, 67, 285, 1, 0, 0, 0, 69, 291, 1, 0, 0, 0, 71, 295, 1, 0, 0, 0, 73, 300, 1, 0, 0, 0, 75, 306, 1, 0, 0, 0, 77, 312, 1, 0, 0, 0, 79, 317, 1, 0, 0, 0, 81, 322, 1, 0, 0, 0, 83, 333, 1, 0, 0, 0, 85, 339, 1, 0, 0, 0, 87, 344, 1, 0, 0, 0, 89, 353, 1, 0, 0, 0, 91, 358, 1, 0, 0, 0, 93, 363, 1, 0, 0, 0, 95, 368, 1, 0, 0, 0, 97, 370, 1, 0, 0, 0, 99, 372, 1, 0, 0, 0, 101, 374, 1, 0, 0, 0, 103, 376, 1, 0, 0, 0, 105, 378, 1, 0, 0, 0, 107, 380, 1, 0, 0, 0, 109, 383, 1, 0, 0, 0, 111, 385, 1, 0, 0, 0, 113, 388, 1, 0, 0, 0, 115, 390, 1, 0, 0, 0, 117, 393, 1, 0, 0, 0, 119, 396, 1, 0, 0, 0, 121, 403, 1, 0, 0, 0, 123, 406, 1, 0, 0, 0, 125, 418, 1, 0, 0, 0, 127, 426, 1, 0, 0, 0, 129, 130, 5, 40, 0, 0, 130, 2, 1, 0, 0, 0, 131, 132, 5, 41, 0, 0, 132, 4, 1, 0, 0, 0, 133, 134, 5, 44, 0, 0, 134, 6, 1, 0, 0, 0, 135, 136, 5, 115, 0, 0, 136, 137, 5, 105, 0, 0, 137, 138, 5, 110, 0, 0, 138, 8, 1, 0, 0, 0, 139, 140, 5, 99, 0, 0, 140, 141, 5, 111, 0, 0, 141, 142, 5, 115, 0, 0, 142, 10, 1, 0, 0, 0, 143, 144, 5, 116, 0, 0, 144, 145, 5, 97, 0, 0, 145, 146, 5, 110, 0, 0, 146, 12, 1, 0, 0, 0, 147, 148, 5, 97, 0, 0, 148, 149, 5, 115, 0, 0, 149, 150, 5, 105, 0, 0, 150, 151, 5, 110, 0, 0, 151, 14, 1, 0, 0, 0, 152, 153, 5, 97, 0, 0, 153, 154, 5, 99, 0, 0, 154, 155, 5, 111, 0, 0, 155, 156, 5, 115, 0, 0, 156, 16, 1, 0, 0, 0, 157, 158, 5, 97, 0, 0, 158, 159, 5, 116, 0, 0, 159, 160, 5, 97, 0, 0, 160, 161, 5, 110, 0, 0, 161, 18, 1, 0, 0, 0, 162, 163, 5, 97, 0, 0, 163, 164, 5, 116, 0, 0, 164, 165, 5, 97, 0, 0, 165, 166, 5, 110, 0, 0, 166, 167, 5, 50, 0, 0, 167, 20, 1, 0, 0, 0, 168, 169, 5, 115, 0, 0, 169, 170, 5, 105, 0, 0, 170, 171, 5, 110, 0, 0, 171, 172, 5, 104, 0, 0, 172, 22, 1, 0, 0, 0, 173, 174, 5, 99, 0, 0, 174, 175, 5, 111, 0, 0, 175, 176, 5, 115, 0, 0, 176, 177, 5, 104, 0, 0, 177, 24, 1, 0, 0, 0, 178, 179, 5, 116, 0, 0, 179, 180, 5, 97, 0, 0, 180, 181, 5, 110, 0, 0, 181, 182, 5, 104, 0, 0, 182, 26, 1, 0, 0, 0, 183, 184, 5, 97, 0, 0, 184, 185, 5, 115, 0, 0, 185, 186, 5, 105, 0, 0, 186, 187, 5, 110, 0, 0, 187, 188, 5, 104, 0, 0, 188, 28, 1, 0, 0, 0, 189, 190, 5, 97, 0, 0, 190, 191, 5, 99, 0, 0, 191, 192, 5, 111, 0, 0, 192, 193, 5, 115, 0, 0, 193, 194, 5, 104, 0, 0, 194, 30, 1, 0, 0, 0, 195, 196, 5, 97, 0, 0, 196, 197, 5, 116, 0, 0, 197, 198, 5, 97, 0, 0, 198, 199, 5, 110, 0, 0, 199, 200, 5, 104, 0, 0, 200, 32, 1, 0, 0, 0, 201, 202, 5, 97, 0, 0, 202, 203, 5, 98, 0, 0, 203, 204, 5, 115, 0, 0, 204, 34, 1, 0, 0, 0, 205, 206, 5, 115, 0, 0, 206, 207, 5, 113, 0, 0, 207, 208, 5, 114, 0, 0, 208, 209, 5, 116, 0, 0, 209, 36, 1, 0, 0, 0, 210, 211, 5, 108, 0, 0, 211, 212, 5, 110, 0, 0, 212, 38, 1, 0, 0, 0, 213, 214, 5, 108, 0, 0, 214, 215, 5, 111, 0, 0, 215, 216, 5, 103, 0, 0, 216, 40, 1, 0, 0, 0, 217, 218, 5, 101, 0, 0, 218, 219, 5, 120, 0, 0, 219, 220, 5, 112, 0, 0, 220, 42, 1, 0, 0, 0, 221, 222, 5, 115, 0, 0, 222, 223, 5, 109, 0, 0, 223, 224, 5, 105, 0, 0, 224, 225, 5, 110, 0, 0, 225, 44, 1, 0, 0, 0, 226, 227, 5, 115, 0, 0, 227, 228, 5, 109, 0, 0, 228, 229, 5, 97, 0, 0, 229, 230, 5, 120, 0, 0, 230, 46, 1, 0, 0, 0, 231, 232, 5, 116, 0, 0, 232, 233, 5, 109, 0, 0, 233, 234, 5, 105, 0, 0, 234, 235, 5, 110, 0, 0, 235, 48, 1, 0, 0, 0, 236, 237, 5, 116, 0, 0, 237, 238, 5, 109, 0, 0, 238, 239, 5, 97, 0, 0, 239, 240, 5, 120, 0, 0, 240, 50, 1, 0, 0, 0, 241, 242, 5, 116, 0, 0, 242, 243, 5, 110, 0, 0, 243, 244, 5, 111, 0, 0, 244, 245, 5, 114, 0, 0, 245, 246, 5, 109, 0, 0, 246, 52, 1, 0, 0, 0, 247, 248, 5, 115, 0, 0, 248, 249, 5, 110, 0, 0, 249, 250, 5, 111, 0, 0, 250, 251, 5, 114, 0, 0, 251, 252, 5, 109, 0, 0, 252, 54, 1, 0, 0, 0, 253, 254, 5, 102, 0, 0, 254, 255, 5, 108, 0, 0, 255, 256, 5, 111, 0, 0, 256, 257, 5, 111, 0, 0, 257, 258, 5, 114, 0, 0, 258, 56, 1, 0, 0, 0, 259, 260, 5, 99, 0, 0, 260, 261, 5, 101, 0, 0, 261, 262, 5, 105, 0, 0, 262, 263, 5, 108, 0, 0, 263, 58, 1, 0, 0, 0, 264, 265, 5, 114, 0, 0, 265, 266, 5, 111, 0, 0, 266, 267, 5, 117, 0, 0, 267, 268, 5, 110, 0, 0, 268, 269, 5, 100, 0, 0, 269, 60, 1, 0, 0, 0, 270, 271, 5, 103, 0, 0, 271, 272, 5, 97, 0, 0, 272, 273, 5, 109, 0, 0, 273, 274, 5, 109, 0, 0, 274, 275, 5, 97, 0, 0, 275, 62, 1, 0, 0, 0, 276, 277, 5, 112, 0, 0, 277, 278, 5, 111, 0, 0, 278, 279, 5, 119, 0, 0, 279, 64, 1, 0, 0, 0, 280, 281, 5, 115, 0, 0, 281, 282, 5, 105, 0, 0, 282, 283, 5, 103, 0, 0, 283, 284, 5, 109, 0, 0, 284, 66, 1, 0, 0, 0, 285, 286, 5, 99, 0, 0, 286, 287, 5, 108, 0, 0, 287, 288, 5, 97, 0, 0, 288, 289, 5, 109, 0, 0, 289, 290, 5, 112, 0, 0, 290, 68, 1, 0, 0, 0, 291, 292, 5, 102, 0, 0, 292, 293, 5, 102, 0, 0, 293, 294, 5, 116, 0, 0, 294, 70, 1, 0, 0, 0, 295, 296, 5, 105, 0, 0, 296, 297, 5, 102, 0, 0, 297, 298, 5, 102, 0, 0, 298, 299, 5, 116, 0, 0, 299, 72, 1, 0, 0, 0, 300, 301, 5, 97, 0, 0, 301, 302, 5, 110, 0, 0, 302, 303, 5, 103, 0, 0, 303, 304, 5, 108, 0, 0, 304, 305, 5, 101, 0, 0, 305, 74, 1, 0, 0, 0, 306, 307, 5, 112, 0, 0, 307, 308, 5, 114, 0, 0, 308, 309, 5, 105, 0, 0, 309, 310, 5, 110, 0, 0, 310, 311, 5, 116, 0, 0, 311, 76, 1, 0, 0, 0, 312, 313, 5, 108, 0, 0, 313, 314, 5, 101, 0, 0, 314, 315, 5, 114, 0, 0, 315, 316, 5, 112, 0, 0, 316, 78, 1, 0, 0, 0, 317, 318, 5, 115, 0, 0, 318, 319, 5, 116, 0, 0, 319, 320, 5, 101, 0, 0, 320, 321, 5, 112, 0, 0, 321, 80, 1, 0, 0, 0, 322, 323, 5, 115, 0, 0, 323, 324, 5, 109, 0, 0, 324, 325, 5, 111, 0, 0, 325, 326, 5, 111, 0, 0, 326, 327, 5, 116, 0, 0, 327, 328, 5, 104, 0, 0, 328, 329, 5, 115, 0, 0, 329, 330, 5, 116, 0, 0, 330, 331, 5, 101, 0, 0, 331, 332, 5, 112, 0, 0, 332, 82, 1, 0, 0, 0, 333, 334, 5, 102, 0, 0, 334, 335, 5, 114, 0, 0, 335, 336, 5, 97, 0, 0, 336, 337, 5, 99, 0, 0, 337, 338, 5, 116, 0, 0, 338, 84, 1, 0, 0, 0, 339, 340, 5, 114, 0, 0, 340, 341, 5, 101, 0, 0, 341, 342, 5, 108, 0, 0, 342, 343, 5, 117, 0, 0, 343, 86, 1, 0, 0, 0, 344, 345, 5, 115, 0, 0, 345, 346, 5, 111, 0, 0, 346, 347, 5, 102, 0, 0, 347, 348, 5, 116, 0, 0, 348, 349, 5, 112, 0, 0, 349, 350, 5, 108, 0, 0, 350, 351, 5, 117, 0, 0, 351, 352, 5, 115, 0, 0, 352, 88, 1, 0, 0, 0, 353, 354, 5, 103, 0, 0, 354, 355, 5, 101, 0, 0, 355, 356, 5, 108, 0, 0, 356, 357, 5, 117, 0, 0, 357, 90, 1, 0, 0, 0, 358, 359, 5, 115, 0, 0, 359, 360, 5, 105, 0, 0, 360, 361, 5, 103, 0, 0, 361, 362, 5, 110, 0, 0, 362, 92, 1, 0, 0, 0, 363, 364, 5, 115, 0, 0, 364, 365, 5, 119, 0, 0, 365, 366, 5, 97, 0, 0, 366, 367, 5, 112, 0, 0, 367, 94, 1, 0, 0, 0, 368, 369, 5, 43, 0, 0, 369, 96, 1, 0, 0, 0, 370, 371, 5, 45, 0, 0, 371, 98, 1, 0, 0, 0, 372, 373, 5, 42, 0, 0, 373, 100, 1, 0, 0, 0, 374, 375, 5, 47, 0, 0, 375, 102, 1, 0, 0, 0, 376, 377, 5, 37, 0, 0, 377, 104, 1, 0, 0, 0, 378, 379, 5, 94, 0, 0, 379, 106, 1, 0, 0, 0, 380, 381, 5, 62, 0, 0, 381, 382, 5, 61, 0, 0, 382, 108, 1, 0, 0, 0, 383, 384, 5, 62, 0, 0, 384, 110, 1, 0, 0, 0, 385, 386, 5, 60, 0, 0, 386, 387, 5, 61, 0, 0, 387, 112, 1, 0, 0, 0, 388, 389, 5, 60, 0, 0, 389, 114, 1, 0, 0, 0, 390, 391, 5, 61, 0, 0, 391, 392, 5, 61, 0, 0, 392, 116, 1, 0, 0, 0, 393, 394, 5, 33, 0, 0, 394, 395, 5, 61, 0, 0, 395, 118, 1, 0, 0, 0, 396, 397, 5, 124, 0, 0, 397, 120, 1, 0, 0, 0, 398, 399, 5, 112, 0, 0, 399, 404, 5, 105, 0, 0, 400, 401, 5, 80, 0, 0, 401, 404, 5, 73, 0, 0, 402, 404, 7, 0, 0, 0, 403, 398, 1, 0, 0, 0, 403, 400, 1, 0, 0, 0, 403, 402, 1, 0, 0, 0, 404, 122, 1, 0, 0, 0, 405, 407, 7, 1, 0, 0, 406, 405, 1, 0, 0, 0, 407, 408, 1, 0, 0, 0, 408, 406, 1, 0, 0, 0, 408, 409, 1, 0, 0, 0, 409, 416, 1, 0, 0, 0, 410, 412, 5, 46, 0, 0, 411, 413, 7, 1, 0, 0, 412, 411, 1, 0, 0, 0, 413, 414, 1, 0, 0, 0, 414, 412, 1, 0, 0, 0, 414, 415, 1, 0, 0, 0, 415, 417, 1, 0, 0, 0, 416, 410, 1, 0, 0, 0, 416, 417, 1, 0, 0, 0, 417, 124, 1, 0, 0, 0, 418, 422, 7, 2, 0, 0, 419, 421, 7, 3, 0, 0, 420, 419, 1, 0, 0, 0, 421, 424, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 422, 423, 1, 0, 0, 0, 423, 126, 1, 0, 0, 0, 424, 422, 1, 0, 0, 0, 425, 427, 7, 4, 0, 0, 426, 425, 1, 0, 0, 0, 427, 428, 1, 0, 0, 0, 428, 426, 1, 0, 0, 0, 428, 429, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 431, 6, 63, 0, 0, 431, 128, 1, 0, 0, 0, 7, 0, 403, 408, 414, 416, 422, 428, 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 edd55ef..e16123a 100644 --- a/more_math/Parser/MathExprLexer.py +++ b/more_math/Parser/MathExprLexer.py @@ -1,5 +1,6 @@ -# Generated from src/more_math/Parser/MathExpr.g4 by ANTLR 4.13.2 -from antlr4 import ATNDeserializer, LexerATNSimulator, PredictionContextCache, Lexer,DFA +# Generated from ./MathExpr.g4 by ANTLR 4.13.2 +from antlr4 import * +from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO @@ -9,7 +10,7 @@ else: def serializedATN(): return [ - 4,0,63,428,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,64,432,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, @@ -18,147 +19,149 @@ def serializedATN(): 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,1,0,1,0,1,1,1,1,1,2,1, - 2,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1, - 6,1,6,1,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,9,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,12,1,12, - 1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14, - 1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,17, - 1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,19,1,19,1,19,1,19,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,23, - 1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,25,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,28,1,29,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,35,1,35, - 1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37, - 1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,40, - 1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,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,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45, - 1,45,1,46,1,46,1,46,1,46,1,46,1,47,1,47,1,48,1,48,1,49,1,49,1,50, - 1,50,1,51,1,51,1,52,1,52,1,53,1,53,1,53,1,54,1,54,1,55,1,55,1,55, - 1,56,1,56,1,57,1,57,1,57,1,58,1,58,1,58,1,59,1,59,1,59,1,59,1,59, - 3,59,400,8,59,1,60,4,60,403,8,60,11,60,12,60,404,1,60,1,60,4,60, - 409,8,60,11,60,12,60,410,3,60,413,8,60,1,61,1,61,5,61,417,8,61,10, - 61,12,61,420,9,61,1,62,4,62,423,8,62,11,62,12,62,424,1,62,1,62,0, - 0,63,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,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,434,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,1,127,1,0,0,0,3,129,1,0,0,0,5,131,1,0,0,0,7,133, - 1,0,0,0,9,137,1,0,0,0,11,141,1,0,0,0,13,145,1,0,0,0,15,150,1,0,0, - 0,17,155,1,0,0,0,19,160,1,0,0,0,21,166,1,0,0,0,23,171,1,0,0,0,25, - 176,1,0,0,0,27,181,1,0,0,0,29,187,1,0,0,0,31,193,1,0,0,0,33,199, - 1,0,0,0,35,203,1,0,0,0,37,208,1,0,0,0,39,211,1,0,0,0,41,215,1,0, - 0,0,43,219,1,0,0,0,45,224,1,0,0,0,47,229,1,0,0,0,49,234,1,0,0,0, - 51,239,1,0,0,0,53,245,1,0,0,0,55,251,1,0,0,0,57,257,1,0,0,0,59,262, - 1,0,0,0,61,268,1,0,0,0,63,274,1,0,0,0,65,278,1,0,0,0,67,283,1,0, - 0,0,69,289,1,0,0,0,71,293,1,0,0,0,73,298,1,0,0,0,75,304,1,0,0,0, - 77,310,1,0,0,0,79,315,1,0,0,0,81,320,1,0,0,0,83,331,1,0,0,0,85,337, - 1,0,0,0,87,342,1,0,0,0,89,351,1,0,0,0,91,356,1,0,0,0,93,361,1,0, - 0,0,95,366,1,0,0,0,97,368,1,0,0,0,99,370,1,0,0,0,101,372,1,0,0,0, - 103,374,1,0,0,0,105,376,1,0,0,0,107,378,1,0,0,0,109,381,1,0,0,0, - 111,383,1,0,0,0,113,386,1,0,0,0,115,388,1,0,0,0,117,391,1,0,0,0, - 119,399,1,0,0,0,121,402,1,0,0,0,123,414,1,0,0,0,125,422,1,0,0,0, - 127,128,5,40,0,0,128,2,1,0,0,0,129,130,5,41,0,0,130,4,1,0,0,0,131, - 132,5,44,0,0,132,6,1,0,0,0,133,134,5,115,0,0,134,135,5,105,0,0,135, - 136,5,110,0,0,136,8,1,0,0,0,137,138,5,99,0,0,138,139,5,111,0,0,139, - 140,5,115,0,0,140,10,1,0,0,0,141,142,5,116,0,0,142,143,5,97,0,0, - 143,144,5,110,0,0,144,12,1,0,0,0,145,146,5,97,0,0,146,147,5,115, - 0,0,147,148,5,105,0,0,148,149,5,110,0,0,149,14,1,0,0,0,150,151,5, - 97,0,0,151,152,5,99,0,0,152,153,5,111,0,0,153,154,5,115,0,0,154, - 16,1,0,0,0,155,156,5,97,0,0,156,157,5,116,0,0,157,158,5,97,0,0,158, - 159,5,110,0,0,159,18,1,0,0,0,160,161,5,97,0,0,161,162,5,116,0,0, - 162,163,5,97,0,0,163,164,5,110,0,0,164,165,5,50,0,0,165,20,1,0,0, - 0,166,167,5,115,0,0,167,168,5,105,0,0,168,169,5,110,0,0,169,170, - 5,104,0,0,170,22,1,0,0,0,171,172,5,99,0,0,172,173,5,111,0,0,173, - 174,5,115,0,0,174,175,5,104,0,0,175,24,1,0,0,0,176,177,5,116,0,0, - 177,178,5,97,0,0,178,179,5,110,0,0,179,180,5,104,0,0,180,26,1,0, - 0,0,181,182,5,97,0,0,182,183,5,115,0,0,183,184,5,105,0,0,184,185, - 5,110,0,0,185,186,5,104,0,0,186,28,1,0,0,0,187,188,5,97,0,0,188, - 189,5,99,0,0,189,190,5,111,0,0,190,191,5,115,0,0,191,192,5,104,0, - 0,192,30,1,0,0,0,193,194,5,97,0,0,194,195,5,116,0,0,195,196,5,97, - 0,0,196,197,5,110,0,0,197,198,5,104,0,0,198,32,1,0,0,0,199,200,5, - 97,0,0,200,201,5,98,0,0,201,202,5,115,0,0,202,34,1,0,0,0,203,204, - 5,115,0,0,204,205,5,113,0,0,205,206,5,114,0,0,206,207,5,116,0,0, - 207,36,1,0,0,0,208,209,5,108,0,0,209,210,5,110,0,0,210,38,1,0,0, - 0,211,212,5,108,0,0,212,213,5,111,0,0,213,214,5,103,0,0,214,40,1, - 0,0,0,215,216,5,101,0,0,216,217,5,120,0,0,217,218,5,112,0,0,218, - 42,1,0,0,0,219,220,5,115,0,0,220,221,5,109,0,0,221,222,5,105,0,0, - 222,223,5,110,0,0,223,44,1,0,0,0,224,225,5,115,0,0,225,226,5,109, - 0,0,226,227,5,97,0,0,227,228,5,120,0,0,228,46,1,0,0,0,229,230,5, - 116,0,0,230,231,5,109,0,0,231,232,5,105,0,0,232,233,5,110,0,0,233, - 48,1,0,0,0,234,235,5,116,0,0,235,236,5,109,0,0,236,237,5,97,0,0, - 237,238,5,120,0,0,238,50,1,0,0,0,239,240,5,116,0,0,240,241,5,110, - 0,0,241,242,5,111,0,0,242,243,5,114,0,0,243,244,5,109,0,0,244,52, - 1,0,0,0,245,246,5,115,0,0,246,247,5,110,0,0,247,248,5,111,0,0,248, - 249,5,114,0,0,249,250,5,109,0,0,250,54,1,0,0,0,251,252,5,102,0,0, - 252,253,5,108,0,0,253,254,5,111,0,0,254,255,5,111,0,0,255,256,5, - 114,0,0,256,56,1,0,0,0,257,258,5,99,0,0,258,259,5,101,0,0,259,260, - 5,105,0,0,260,261,5,108,0,0,261,58,1,0,0,0,262,263,5,114,0,0,263, - 264,5,111,0,0,264,265,5,117,0,0,265,266,5,110,0,0,266,267,5,100, - 0,0,267,60,1,0,0,0,268,269,5,103,0,0,269,270,5,97,0,0,270,271,5, - 109,0,0,271,272,5,109,0,0,272,273,5,97,0,0,273,62,1,0,0,0,274,275, - 5,112,0,0,275,276,5,111,0,0,276,277,5,119,0,0,277,64,1,0,0,0,278, - 279,5,115,0,0,279,280,5,105,0,0,280,281,5,103,0,0,281,282,5,109, - 0,0,282,66,1,0,0,0,283,284,5,99,0,0,284,285,5,108,0,0,285,286,5, - 97,0,0,286,287,5,109,0,0,287,288,5,112,0,0,288,68,1,0,0,0,289,290, - 5,102,0,0,290,291,5,102,0,0,291,292,5,116,0,0,292,70,1,0,0,0,293, - 294,5,105,0,0,294,295,5,102,0,0,295,296,5,102,0,0,296,297,5,116, - 0,0,297,72,1,0,0,0,298,299,5,97,0,0,299,300,5,110,0,0,300,301,5, - 103,0,0,301,302,5,108,0,0,302,303,5,101,0,0,303,74,1,0,0,0,304,305, - 5,112,0,0,305,306,5,114,0,0,306,307,5,105,0,0,307,308,5,110,0,0, - 308,309,5,116,0,0,309,76,1,0,0,0,310,311,5,108,0,0,311,312,5,101, - 0,0,312,313,5,114,0,0,313,314,5,112,0,0,314,78,1,0,0,0,315,316,5, - 115,0,0,316,317,5,116,0,0,317,318,5,101,0,0,318,319,5,112,0,0,319, - 80,1,0,0,0,320,321,5,115,0,0,321,322,5,109,0,0,322,323,5,111,0,0, - 323,324,5,111,0,0,324,325,5,116,0,0,325,326,5,104,0,0,326,327,5, - 115,0,0,327,328,5,116,0,0,328,329,5,101,0,0,329,330,5,112,0,0,330, - 82,1,0,0,0,331,332,5,102,0,0,332,333,5,114,0,0,333,334,5,97,0,0, - 334,335,5,99,0,0,335,336,5,116,0,0,336,84,1,0,0,0,337,338,5,114, - 0,0,338,339,5,101,0,0,339,340,5,108,0,0,340,341,5,117,0,0,341,86, - 1,0,0,0,342,343,5,115,0,0,343,344,5,111,0,0,344,345,5,102,0,0,345, - 346,5,116,0,0,346,347,5,112,0,0,347,348,5,108,0,0,348,349,5,117, - 0,0,349,350,5,115,0,0,350,88,1,0,0,0,351,352,5,103,0,0,352,353,5, - 101,0,0,353,354,5,108,0,0,354,355,5,117,0,0,355,90,1,0,0,0,356,357, - 5,115,0,0,357,358,5,105,0,0,358,359,5,103,0,0,359,360,5,110,0,0, - 360,92,1,0,0,0,361,362,5,115,0,0,362,363,5,119,0,0,363,364,5,97, - 0,0,364,365,5,112,0,0,365,94,1,0,0,0,366,367,5,43,0,0,367,96,1,0, - 0,0,368,369,5,45,0,0,369,98,1,0,0,0,370,371,5,42,0,0,371,100,1,0, - 0,0,372,373,5,47,0,0,373,102,1,0,0,0,374,375,5,37,0,0,375,104,1, - 0,0,0,376,377,5,94,0,0,377,106,1,0,0,0,378,379,5,62,0,0,379,380, - 5,61,0,0,380,108,1,0,0,0,381,382,5,62,0,0,382,110,1,0,0,0,383,384, - 5,60,0,0,384,385,5,61,0,0,385,112,1,0,0,0,386,387,5,60,0,0,387,114, - 1,0,0,0,388,389,5,61,0,0,389,390,5,61,0,0,390,116,1,0,0,0,391,392, - 5,33,0,0,392,393,5,61,0,0,393,118,1,0,0,0,394,395,5,112,0,0,395, - 400,5,105,0,0,396,397,5,80,0,0,397,400,5,73,0,0,398,400,7,0,0,0, - 399,394,1,0,0,0,399,396,1,0,0,0,399,398,1,0,0,0,400,120,1,0,0,0, - 401,403,7,1,0,0,402,401,1,0,0,0,403,404,1,0,0,0,404,402,1,0,0,0, - 404,405,1,0,0,0,405,412,1,0,0,0,406,408,5,46,0,0,407,409,7,1,0,0, - 408,407,1,0,0,0,409,410,1,0,0,0,410,408,1,0,0,0,410,411,1,0,0,0, - 411,413,1,0,0,0,412,406,1,0,0,0,412,413,1,0,0,0,413,122,1,0,0,0, - 414,418,7,2,0,0,415,417,7,3,0,0,416,415,1,0,0,0,417,420,1,0,0,0, - 418,416,1,0,0,0,418,419,1,0,0,0,419,124,1,0,0,0,420,418,1,0,0,0, - 421,423,7,4,0,0,422,421,1,0,0,0,423,424,1,0,0,0,424,422,1,0,0,0, - 424,425,1,0,0,0,425,426,1,0,0,0,426,427,6,62,0,0,427,126,1,0,0,0, - 7,0,399,404,410,412,418,424,1,6,0,0 + 58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,1,0,1,0,1,1, + 1,1,1,2,1,2,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,6, + 1,6,1,6,1,6,1,6,1,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,9,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11, + 1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14, + 1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16, + 1,16,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,19,1,19,1,19,1,19, + 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,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,25,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,28,1,29,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,35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37, + 1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39, + 1,39,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,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,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,45,1,45, + 1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,47,1,47,1,48,1,48,1,49, + 1,49,1,50,1,50,1,51,1,51,1,52,1,52,1,53,1,53,1,53,1,54,1,54,1,55, + 1,55,1,55,1,56,1,56,1,57,1,57,1,57,1,58,1,58,1,58,1,59,1,59,1,60, + 1,60,1,60,1,60,1,60,3,60,404,8,60,1,61,4,61,407,8,61,11,61,12,61, + 408,1,61,1,61,4,61,413,8,61,11,61,12,61,414,3,61,417,8,61,1,62,1, + 62,5,62,421,8,62,10,62,12,62,424,9,62,1,63,4,63,427,8,63,11,63,12, + 63,428,1,63,1,63,0,0,64,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,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,438,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,1,129, + 1,0,0,0,3,131,1,0,0,0,5,133,1,0,0,0,7,135,1,0,0,0,9,139,1,0,0,0, + 11,143,1,0,0,0,13,147,1,0,0,0,15,152,1,0,0,0,17,157,1,0,0,0,19,162, + 1,0,0,0,21,168,1,0,0,0,23,173,1,0,0,0,25,178,1,0,0,0,27,183,1,0, + 0,0,29,189,1,0,0,0,31,195,1,0,0,0,33,201,1,0,0,0,35,205,1,0,0,0, + 37,210,1,0,0,0,39,213,1,0,0,0,41,217,1,0,0,0,43,221,1,0,0,0,45,226, + 1,0,0,0,47,231,1,0,0,0,49,236,1,0,0,0,51,241,1,0,0,0,53,247,1,0, + 0,0,55,253,1,0,0,0,57,259,1,0,0,0,59,264,1,0,0,0,61,270,1,0,0,0, + 63,276,1,0,0,0,65,280,1,0,0,0,67,285,1,0,0,0,69,291,1,0,0,0,71,295, + 1,0,0,0,73,300,1,0,0,0,75,306,1,0,0,0,77,312,1,0,0,0,79,317,1,0, + 0,0,81,322,1,0,0,0,83,333,1,0,0,0,85,339,1,0,0,0,87,344,1,0,0,0, + 89,353,1,0,0,0,91,358,1,0,0,0,93,363,1,0,0,0,95,368,1,0,0,0,97,370, + 1,0,0,0,99,372,1,0,0,0,101,374,1,0,0,0,103,376,1,0,0,0,105,378,1, + 0,0,0,107,380,1,0,0,0,109,383,1,0,0,0,111,385,1,0,0,0,113,388,1, + 0,0,0,115,390,1,0,0,0,117,393,1,0,0,0,119,396,1,0,0,0,121,403,1, + 0,0,0,123,406,1,0,0,0,125,418,1,0,0,0,127,426,1,0,0,0,129,130,5, + 40,0,0,130,2,1,0,0,0,131,132,5,41,0,0,132,4,1,0,0,0,133,134,5,44, + 0,0,134,6,1,0,0,0,135,136,5,115,0,0,136,137,5,105,0,0,137,138,5, + 110,0,0,138,8,1,0,0,0,139,140,5,99,0,0,140,141,5,111,0,0,141,142, + 5,115,0,0,142,10,1,0,0,0,143,144,5,116,0,0,144,145,5,97,0,0,145, + 146,5,110,0,0,146,12,1,0,0,0,147,148,5,97,0,0,148,149,5,115,0,0, + 149,150,5,105,0,0,150,151,5,110,0,0,151,14,1,0,0,0,152,153,5,97, + 0,0,153,154,5,99,0,0,154,155,5,111,0,0,155,156,5,115,0,0,156,16, + 1,0,0,0,157,158,5,97,0,0,158,159,5,116,0,0,159,160,5,97,0,0,160, + 161,5,110,0,0,161,18,1,0,0,0,162,163,5,97,0,0,163,164,5,116,0,0, + 164,165,5,97,0,0,165,166,5,110,0,0,166,167,5,50,0,0,167,20,1,0,0, + 0,168,169,5,115,0,0,169,170,5,105,0,0,170,171,5,110,0,0,171,172, + 5,104,0,0,172,22,1,0,0,0,173,174,5,99,0,0,174,175,5,111,0,0,175, + 176,5,115,0,0,176,177,5,104,0,0,177,24,1,0,0,0,178,179,5,116,0,0, + 179,180,5,97,0,0,180,181,5,110,0,0,181,182,5,104,0,0,182,26,1,0, + 0,0,183,184,5,97,0,0,184,185,5,115,0,0,185,186,5,105,0,0,186,187, + 5,110,0,0,187,188,5,104,0,0,188,28,1,0,0,0,189,190,5,97,0,0,190, + 191,5,99,0,0,191,192,5,111,0,0,192,193,5,115,0,0,193,194,5,104,0, + 0,194,30,1,0,0,0,195,196,5,97,0,0,196,197,5,116,0,0,197,198,5,97, + 0,0,198,199,5,110,0,0,199,200,5,104,0,0,200,32,1,0,0,0,201,202,5, + 97,0,0,202,203,5,98,0,0,203,204,5,115,0,0,204,34,1,0,0,0,205,206, + 5,115,0,0,206,207,5,113,0,0,207,208,5,114,0,0,208,209,5,116,0,0, + 209,36,1,0,0,0,210,211,5,108,0,0,211,212,5,110,0,0,212,38,1,0,0, + 0,213,214,5,108,0,0,214,215,5,111,0,0,215,216,5,103,0,0,216,40,1, + 0,0,0,217,218,5,101,0,0,218,219,5,120,0,0,219,220,5,112,0,0,220, + 42,1,0,0,0,221,222,5,115,0,0,222,223,5,109,0,0,223,224,5,105,0,0, + 224,225,5,110,0,0,225,44,1,0,0,0,226,227,5,115,0,0,227,228,5,109, + 0,0,228,229,5,97,0,0,229,230,5,120,0,0,230,46,1,0,0,0,231,232,5, + 116,0,0,232,233,5,109,0,0,233,234,5,105,0,0,234,235,5,110,0,0,235, + 48,1,0,0,0,236,237,5,116,0,0,237,238,5,109,0,0,238,239,5,97,0,0, + 239,240,5,120,0,0,240,50,1,0,0,0,241,242,5,116,0,0,242,243,5,110, + 0,0,243,244,5,111,0,0,244,245,5,114,0,0,245,246,5,109,0,0,246,52, + 1,0,0,0,247,248,5,115,0,0,248,249,5,110,0,0,249,250,5,111,0,0,250, + 251,5,114,0,0,251,252,5,109,0,0,252,54,1,0,0,0,253,254,5,102,0,0, + 254,255,5,108,0,0,255,256,5,111,0,0,256,257,5,111,0,0,257,258,5, + 114,0,0,258,56,1,0,0,0,259,260,5,99,0,0,260,261,5,101,0,0,261,262, + 5,105,0,0,262,263,5,108,0,0,263,58,1,0,0,0,264,265,5,114,0,0,265, + 266,5,111,0,0,266,267,5,117,0,0,267,268,5,110,0,0,268,269,5,100, + 0,0,269,60,1,0,0,0,270,271,5,103,0,0,271,272,5,97,0,0,272,273,5, + 109,0,0,273,274,5,109,0,0,274,275,5,97,0,0,275,62,1,0,0,0,276,277, + 5,112,0,0,277,278,5,111,0,0,278,279,5,119,0,0,279,64,1,0,0,0,280, + 281,5,115,0,0,281,282,5,105,0,0,282,283,5,103,0,0,283,284,5,109, + 0,0,284,66,1,0,0,0,285,286,5,99,0,0,286,287,5,108,0,0,287,288,5, + 97,0,0,288,289,5,109,0,0,289,290,5,112,0,0,290,68,1,0,0,0,291,292, + 5,102,0,0,292,293,5,102,0,0,293,294,5,116,0,0,294,70,1,0,0,0,295, + 296,5,105,0,0,296,297,5,102,0,0,297,298,5,102,0,0,298,299,5,116, + 0,0,299,72,1,0,0,0,300,301,5,97,0,0,301,302,5,110,0,0,302,303,5, + 103,0,0,303,304,5,108,0,0,304,305,5,101,0,0,305,74,1,0,0,0,306,307, + 5,112,0,0,307,308,5,114,0,0,308,309,5,105,0,0,309,310,5,110,0,0, + 310,311,5,116,0,0,311,76,1,0,0,0,312,313,5,108,0,0,313,314,5,101, + 0,0,314,315,5,114,0,0,315,316,5,112,0,0,316,78,1,0,0,0,317,318,5, + 115,0,0,318,319,5,116,0,0,319,320,5,101,0,0,320,321,5,112,0,0,321, + 80,1,0,0,0,322,323,5,115,0,0,323,324,5,109,0,0,324,325,5,111,0,0, + 325,326,5,111,0,0,326,327,5,116,0,0,327,328,5,104,0,0,328,329,5, + 115,0,0,329,330,5,116,0,0,330,331,5,101,0,0,331,332,5,112,0,0,332, + 82,1,0,0,0,333,334,5,102,0,0,334,335,5,114,0,0,335,336,5,97,0,0, + 336,337,5,99,0,0,337,338,5,116,0,0,338,84,1,0,0,0,339,340,5,114, + 0,0,340,341,5,101,0,0,341,342,5,108,0,0,342,343,5,117,0,0,343,86, + 1,0,0,0,344,345,5,115,0,0,345,346,5,111,0,0,346,347,5,102,0,0,347, + 348,5,116,0,0,348,349,5,112,0,0,349,350,5,108,0,0,350,351,5,117, + 0,0,351,352,5,115,0,0,352,88,1,0,0,0,353,354,5,103,0,0,354,355,5, + 101,0,0,355,356,5,108,0,0,356,357,5,117,0,0,357,90,1,0,0,0,358,359, + 5,115,0,0,359,360,5,105,0,0,360,361,5,103,0,0,361,362,5,110,0,0, + 362,92,1,0,0,0,363,364,5,115,0,0,364,365,5,119,0,0,365,366,5,97, + 0,0,366,367,5,112,0,0,367,94,1,0,0,0,368,369,5,43,0,0,369,96,1,0, + 0,0,370,371,5,45,0,0,371,98,1,0,0,0,372,373,5,42,0,0,373,100,1,0, + 0,0,374,375,5,47,0,0,375,102,1,0,0,0,376,377,5,37,0,0,377,104,1, + 0,0,0,378,379,5,94,0,0,379,106,1,0,0,0,380,381,5,62,0,0,381,382, + 5,61,0,0,382,108,1,0,0,0,383,384,5,62,0,0,384,110,1,0,0,0,385,386, + 5,60,0,0,386,387,5,61,0,0,387,112,1,0,0,0,388,389,5,60,0,0,389,114, + 1,0,0,0,390,391,5,61,0,0,391,392,5,61,0,0,392,116,1,0,0,0,393,394, + 5,33,0,0,394,395,5,61,0,0,395,118,1,0,0,0,396,397,5,124,0,0,397, + 120,1,0,0,0,398,399,5,112,0,0,399,404,5,105,0,0,400,401,5,80,0,0, + 401,404,5,73,0,0,402,404,7,0,0,0,403,398,1,0,0,0,403,400,1,0,0,0, + 403,402,1,0,0,0,404,122,1,0,0,0,405,407,7,1,0,0,406,405,1,0,0,0, + 407,408,1,0,0,0,408,406,1,0,0,0,408,409,1,0,0,0,409,416,1,0,0,0, + 410,412,5,46,0,0,411,413,7,1,0,0,412,411,1,0,0,0,413,414,1,0,0,0, + 414,412,1,0,0,0,414,415,1,0,0,0,415,417,1,0,0,0,416,410,1,0,0,0, + 416,417,1,0,0,0,417,124,1,0,0,0,418,422,7,2,0,0,419,421,7,3,0,0, + 420,419,1,0,0,0,421,424,1,0,0,0,422,420,1,0,0,0,422,423,1,0,0,0, + 423,126,1,0,0,0,424,422,1,0,0,0,425,427,7,4,0,0,426,425,1,0,0,0, + 427,428,1,0,0,0,428,426,1,0,0,0,428,429,1,0,0,0,429,430,1,0,0,0, + 430,431,6,63,0,0,431,128,1,0,0,0,7,0,403,408,414,416,422,428,1,6, + 0,0 ] class MathExprLexer(Lexer): @@ -226,45 +229,46 @@ class MathExprLexer(Lexer): LT = 57 EQ = 58 NE = 59 - CONSTANT = 60 - NUMBER = 61 - VARIABLE = 62 - WS = 63 + PIPE = 60 + CONSTANT = 61 + NUMBER = 62 + VARIABLE = 63 + WS = 64 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] modeNames = [ "DEFAULT_MODE" ] literalNames = [ "", - "'('", "')'", "','", "'sin'", "'cos'", "'tan'", "'asin'", "'acos'", - "'atan'", "'atan2'", "'sinh'", "'cosh'", "'tanh'", "'asinh'", - "'acosh'", "'atanh'", "'abs'", "'sqrt'", "'ln'", "'log'", "'exp'", - "'smin'", "'smax'", "'tmin'", "'tmax'", "'tnorm'", "'snorm'", - "'floor'", "'ceil'", "'round'", "'gamma'", "'pow'", "'sigm'", - "'clamp'", "'fft'", "'ifft'", "'angle'", "'print'", "'lerp'", - "'step'", "'smoothstep'", "'fract'", "'relu'", "'softplus'", - "'gelu'", "'sign'", "'swap'", "'+'", "'-'", "'*'", "'/'", "'%'", - "'^'", "'>='", "'>'", "'<='", "'<'", "'=='", "'!='" ] + "'('", "')'", "','", "'sin'", "'cos'", "'tan'", "'asin'", "'acos'", + "'atan'", "'atan2'", "'sinh'", "'cosh'", "'tanh'", "'asinh'", + "'acosh'", "'atanh'", "'abs'", "'sqrt'", "'ln'", "'log'", "'exp'", + "'smin'", "'smax'", "'tmin'", "'tmax'", "'tnorm'", "'snorm'", + "'floor'", "'ceil'", "'round'", "'gamma'", "'pow'", "'sigm'", + "'clamp'", "'fft'", "'ifft'", "'angle'", "'print'", "'lerp'", + "'step'", "'smoothstep'", "'fract'", "'relu'", "'softplus'", + "'gelu'", "'sign'", "'swap'", "'+'", "'-'", "'*'", "'/'", "'%'", + "'^'", "'>='", "'>'", "'<='", "'<'", "'=='", "'!='", "'|'" ] symbolicNames = [ "", - "SIN", "COS", "TAN", "ASIN", "ACOS", "ATAN", "ATAN2", "SINH", - "COSH", "TANH", "ASINH", "ACOSH", "ATANH", "ABS", "SQRT", "LN", - "LOG", "EXP", "SMIN", "SMAX", "TMIN", "TMAX", "TNORM", "SNORM", - "FLOOR", "CEIL", "ROUND", "GAMMA", "POWE", "SIGM", "CLAMP", - "SFFT", "SIFFT", "ANGL", "PRNT", "LERP", "STEP", "SMOOTHSTEP", - "FRACT", "RELU", "SOFTPLUS", "GELU", "SIGN", "SWAP", "PLUS", - "MINUS", "MULT", "DIV", "MOD", "POW", "GE", "GT", "LE", "LT", - "EQ", "NE", "CONSTANT", "NUMBER", "VARIABLE", "WS" ] + "SIN", "COS", "TAN", "ASIN", "ACOS", "ATAN", "ATAN2", "SINH", + "COSH", "TANH", "ASINH", "ACOSH", "ATANH", "ABS", "SQRT", "LN", + "LOG", "EXP", "SMIN", "SMAX", "TMIN", "TMAX", "TNORM", "SNORM", + "FLOOR", "CEIL", "ROUND", "GAMMA", "POWE", "SIGM", "CLAMP", + "SFFT", "SIFFT", "ANGL", "PRNT", "LERP", "STEP", "SMOOTHSTEP", + "FRACT", "RELU", "SOFTPLUS", "GELU", "SIGN", "SWAP", "PLUS", + "MINUS", "MULT", "DIV", "MOD", "POW", "GE", "GT", "LE", "LT", + "EQ", "NE", "PIPE", "CONSTANT", "NUMBER", "VARIABLE", "WS" ] - ruleNames = [ "T__0", "T__1", "T__2", "SIN", "COS", "TAN", "ASIN", "ACOS", - "ATAN", "ATAN2", "SINH", "COSH", "TANH", "ASINH", "ACOSH", - "ATANH", "ABS", "SQRT", "LN", "LOG", "EXP", "SMIN", "SMAX", - "TMIN", "TMAX", "TNORM", "SNORM", "FLOOR", "CEIL", "ROUND", - "GAMMA", "POWE", "SIGM", "CLAMP", "SFFT", "SIFFT", "ANGL", - "PRNT", "LERP", "STEP", "SMOOTHSTEP", "FRACT", "RELU", - "SOFTPLUS", "GELU", "SIGN", "SWAP", "PLUS", "MINUS", "MULT", - "DIV", "MOD", "POW", "GE", "GT", "LE", "LT", "EQ", "NE", - "CONSTANT", "NUMBER", "VARIABLE", "WS" ] + ruleNames = [ "T__0", "T__1", "T__2", "SIN", "COS", "TAN", "ASIN", "ACOS", + "ATAN", "ATAN2", "SINH", "COSH", "TANH", "ASINH", "ACOSH", + "ATANH", "ABS", "SQRT", "LN", "LOG", "EXP", "SMIN", "SMAX", + "TMIN", "TMAX", "TNORM", "SNORM", "FLOOR", "CEIL", "ROUND", + "GAMMA", "POWE", "SIGM", "CLAMP", "SFFT", "SIFFT", "ANGL", + "PRNT", "LERP", "STEP", "SMOOTHSTEP", "FRACT", "RELU", + "SOFTPLUS", "GELU", "SIGN", "SWAP", "PLUS", "MINUS", "MULT", + "DIV", "MOD", "POW", "GE", "GT", "LE", "LT", "EQ", "NE", + "PIPE", "CONSTANT", "NUMBER", "VARIABLE", "WS" ] grammarFileName = "MathExpr.g4" diff --git a/more_math/Parser/MathExprLexer.tokens b/more_math/Parser/MathExprLexer.tokens index 7dbacf6..c8a40c6 100644 --- a/more_math/Parser/MathExprLexer.tokens +++ b/more_math/Parser/MathExprLexer.tokens @@ -57,10 +57,11 @@ LE=56 LT=57 EQ=58 NE=59 -CONSTANT=60 -NUMBER=61 -VARIABLE=62 -WS=63 +PIPE=60 +CONSTANT=61 +NUMBER=62 +VARIABLE=63 +WS=64 '('=1 ')'=2 ','=3 @@ -120,3 +121,4 @@ WS=63 '<'=57 '=='=58 '!='=59 +'|'=60 diff --git a/more_math/Parser/MathExprParser.py b/more_math/Parser/MathExprParser.py index e12dc8d..5446ec3 100644 --- a/more_math/Parser/MathExprParser.py +++ b/more_math/Parser/MathExprParser.py @@ -1,6 +1,7 @@ -# Generated from src/more_math/Parser/MathExpr.g4 by ANTLR 4.13.2 +# Generated from ./MathExpr.g4 by ANTLR 4.13.2 # encoding: utf-8 -from antlr4 import ATNDeserializer,Parser,PredictionContextCache,Token,TokenStream,DFA,ParserATNSimulator,ATN, RecognitionException,ParserRuleContext,ParseTreeVisitor,NoViableAltException,RuleContext +from antlr4 import * +from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO @@ -9,139 +10,141 @@ else: def serializedATN(): return [ - 4,1,63,382,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, + 4,1,64,386,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,1,0,1,0,3,0,27,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,50,8,1,10,1,12,1,53,9,1,1,2,1,2,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,5,2,64,8,2,10,2,12,2,67,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,81,8,3,10,3,12,3,84,9,3,1,4, 1,4,1,4,1,4,1,4,3,4,91,8,4,1,5,1,5,1,5,1,5,1,5,3,5,98,8,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,3,6,112,8,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,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,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,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,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,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,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,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,1,7,1,7,1, - 7,1,7,1,7,3,7,279,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,3,8,316,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,3,9,345,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,11,1,11,1,11,1,11,1,11,4,11,363,8, - 11,11,11,12,11,364,1,11,1,11,1,11,1,11,1,11,1,11,1,11,4,11,374,8, - 11,11,11,12,11,375,1,11,1,11,3,11,380,8,11,1,11,0,3,2,4,6,12,0,2, - 4,6,8,10,12,14,16,18,20,22,0,0,433,0,26,1,0,0,0,2,28,1,0,0,0,4,54, - 1,0,0,0,6,68,1,0,0,0,8,90,1,0,0,0,10,97,1,0,0,0,12,111,1,0,0,0,14, - 278,1,0,0,0,16,315,1,0,0,0,18,344,1,0,0,0,20,346,1,0,0,0,22,379, - 1,0,0,0,24,27,3,12,6,0,25,27,3,2,1,0,26,24,1,0,0,0,26,25,1,0,0,0, - 27,1,1,0,0,0,28,29,6,1,-1,0,29,30,3,4,2,0,30,51,1,0,0,0,31,32,10, - 7,0,0,32,33,5,55,0,0,33,50,3,4,2,0,34,35,10,6,0,0,35,36,5,54,0,0, - 36,50,3,4,2,0,37,38,10,5,0,0,38,39,5,57,0,0,39,50,3,4,2,0,40,41, - 10,4,0,0,41,42,5,56,0,0,42,50,3,4,2,0,43,44,10,3,0,0,44,45,5,58, - 0,0,45,50,3,4,2,0,46,47,10,2,0,0,47,48,5,59,0,0,48,50,3,4,2,0,49, - 31,1,0,0,0,49,34,1,0,0,0,49,37,1,0,0,0,49,40,1,0,0,0,49,43,1,0,0, - 0,49,46,1,0,0,0,50,53,1,0,0,0,51,49,1,0,0,0,51,52,1,0,0,0,52,3,1, - 0,0,0,53,51,1,0,0,0,54,55,6,2,-1,0,55,56,3,6,3,0,56,65,1,0,0,0,57, - 58,10,3,0,0,58,59,5,48,0,0,59,64,3,6,3,0,60,61,10,2,0,0,61,62,5, - 49,0,0,62,64,3,6,3,0,63,57,1,0,0,0,63,60,1,0,0,0,64,67,1,0,0,0,65, - 63,1,0,0,0,65,66,1,0,0,0,66,5,1,0,0,0,67,65,1,0,0,0,68,69,6,3,-1, - 0,69,70,3,8,4,0,70,82,1,0,0,0,71,72,10,4,0,0,72,73,5,50,0,0,73,81, - 3,8,4,0,74,75,10,3,0,0,75,76,5,51,0,0,76,81,3,8,4,0,77,78,10,2,0, - 0,78,79,5,52,0,0,79,81,3,8,4,0,80,71,1,0,0,0,80,74,1,0,0,0,80,77, - 1,0,0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83,1,0,0,0,83,7,1,0,0,0,84, - 82,1,0,0,0,85,86,3,10,5,0,86,87,5,53,0,0,87,88,3,8,4,0,88,91,1,0, - 0,0,89,91,3,10,5,0,90,85,1,0,0,0,90,89,1,0,0,0,91,9,1,0,0,0,92,93, - 5,48,0,0,93,98,3,10,5,0,94,95,5,49,0,0,95,98,3,10,5,0,96,98,3,12, - 6,0,97,92,1,0,0,0,97,94,1,0,0,0,97,96,1,0,0,0,98,11,1,0,0,0,99,112, - 3,14,7,0,100,112,3,16,8,0,101,112,3,18,9,0,102,112,3,20,10,0,103, - 112,3,22,11,0,104,112,5,62,0,0,105,112,5,61,0,0,106,112,5,60,0,0, - 107,108,5,1,0,0,108,109,3,0,0,0,109,110,5,2,0,0,110,112,1,0,0,0, - 111,99,1,0,0,0,111,100,1,0,0,0,111,101,1,0,0,0,111,102,1,0,0,0,111, - 103,1,0,0,0,111,104,1,0,0,0,111,105,1,0,0,0,111,106,1,0,0,0,111, - 107,1,0,0,0,112,13,1,0,0,0,113,114,5,4,0,0,114,115,5,1,0,0,115,116, - 3,0,0,0,116,117,5,2,0,0,117,279,1,0,0,0,118,119,5,5,0,0,119,120, - 5,1,0,0,120,121,3,0,0,0,121,122,5,2,0,0,122,279,1,0,0,0,123,124, - 5,6,0,0,124,125,5,1,0,0,125,126,3,0,0,0,126,127,5,2,0,0,127,279, - 1,0,0,0,128,129,5,7,0,0,129,130,5,1,0,0,130,131,3,0,0,0,131,132, - 5,2,0,0,132,279,1,0,0,0,133,134,5,8,0,0,134,135,5,1,0,0,135,136, - 3,0,0,0,136,137,5,2,0,0,137,279,1,0,0,0,138,139,5,9,0,0,139,140, - 5,1,0,0,140,141,3,0,0,0,141,142,5,2,0,0,142,279,1,0,0,0,143,144, - 5,11,0,0,144,145,5,1,0,0,145,146,3,0,0,0,146,147,5,2,0,0,147,279, - 1,0,0,0,148,149,5,12,0,0,149,150,5,1,0,0,150,151,3,0,0,0,151,152, - 5,2,0,0,152,279,1,0,0,0,153,154,5,13,0,0,154,155,5,1,0,0,155,156, - 3,0,0,0,156,157,5,2,0,0,157,279,1,0,0,0,158,159,5,14,0,0,159,160, - 5,1,0,0,160,161,3,0,0,0,161,162,5,2,0,0,162,279,1,0,0,0,163,164, - 5,15,0,0,164,165,5,1,0,0,165,166,3,0,0,0,166,167,5,2,0,0,167,279, - 1,0,0,0,168,169,5,16,0,0,169,170,5,1,0,0,170,171,3,0,0,0,171,172, - 5,2,0,0,172,279,1,0,0,0,173,174,5,17,0,0,174,175,5,1,0,0,175,176, - 3,0,0,0,176,177,5,2,0,0,177,279,1,0,0,0,178,179,5,18,0,0,179,180, - 5,1,0,0,180,181,3,0,0,0,181,182,5,2,0,0,182,279,1,0,0,0,183,184, - 5,19,0,0,184,185,5,1,0,0,185,186,3,0,0,0,186,187,5,2,0,0,187,279, - 1,0,0,0,188,189,5,20,0,0,189,190,5,1,0,0,190,191,3,0,0,0,191,192, - 5,2,0,0,192,279,1,0,0,0,193,194,5,21,0,0,194,195,5,1,0,0,195,196, - 3,0,0,0,196,197,5,2,0,0,197,279,1,0,0,0,198,199,5,26,0,0,199,200, - 5,1,0,0,200,201,3,0,0,0,201,202,5,2,0,0,202,279,1,0,0,0,203,204, - 5,27,0,0,204,205,5,1,0,0,205,206,3,0,0,0,206,207,5,2,0,0,207,279, - 1,0,0,0,208,209,5,28,0,0,209,210,5,1,0,0,210,211,3,0,0,0,211,212, - 5,2,0,0,212,279,1,0,0,0,213,214,5,29,0,0,214,215,5,1,0,0,215,216, - 3,0,0,0,216,217,5,2,0,0,217,279,1,0,0,0,218,219,5,30,0,0,219,220, - 5,1,0,0,220,221,3,0,0,0,221,222,5,2,0,0,222,279,1,0,0,0,223,224, - 5,31,0,0,224,225,5,1,0,0,225,226,3,0,0,0,226,227,5,2,0,0,227,279, - 1,0,0,0,228,229,5,33,0,0,229,230,5,1,0,0,230,231,3,0,0,0,231,232, - 5,2,0,0,232,279,1,0,0,0,233,234,5,35,0,0,234,235,5,1,0,0,235,236, - 3,0,0,0,236,237,5,2,0,0,237,279,1,0,0,0,238,239,5,36,0,0,239,240, - 5,1,0,0,240,241,3,0,0,0,241,242,5,2,0,0,242,279,1,0,0,0,243,244, - 5,37,0,0,244,245,5,1,0,0,245,246,3,0,0,0,246,247,5,2,0,0,247,279, - 1,0,0,0,248,249,5,38,0,0,249,250,5,1,0,0,250,251,3,0,0,0,251,252, - 5,2,0,0,252,279,1,0,0,0,253,254,5,42,0,0,254,255,5,1,0,0,255,256, - 3,0,0,0,256,257,5,2,0,0,257,279,1,0,0,0,258,259,5,43,0,0,259,260, - 5,1,0,0,260,261,3,0,0,0,261,262,5,2,0,0,262,279,1,0,0,0,263,264, - 5,44,0,0,264,265,5,1,0,0,265,266,3,0,0,0,266,267,5,2,0,0,267,279, - 1,0,0,0,268,269,5,45,0,0,269,270,5,1,0,0,270,271,3,0,0,0,271,272, - 5,2,0,0,272,279,1,0,0,0,273,274,5,46,0,0,274,275,5,1,0,0,275,276, - 3,0,0,0,276,277,5,2,0,0,277,279,1,0,0,0,278,113,1,0,0,0,278,118, - 1,0,0,0,278,123,1,0,0,0,278,128,1,0,0,0,278,133,1,0,0,0,278,138, - 1,0,0,0,278,143,1,0,0,0,278,148,1,0,0,0,278,153,1,0,0,0,278,158, - 1,0,0,0,278,163,1,0,0,0,278,168,1,0,0,0,278,173,1,0,0,0,278,178, - 1,0,0,0,278,183,1,0,0,0,278,188,1,0,0,0,278,193,1,0,0,0,278,198, - 1,0,0,0,278,203,1,0,0,0,278,208,1,0,0,0,278,213,1,0,0,0,278,218, - 1,0,0,0,278,223,1,0,0,0,278,228,1,0,0,0,278,233,1,0,0,0,278,238, - 1,0,0,0,278,243,1,0,0,0,278,248,1,0,0,0,278,253,1,0,0,0,278,258, - 1,0,0,0,278,263,1,0,0,0,278,268,1,0,0,0,278,273,1,0,0,0,279,15,1, - 0,0,0,280,281,5,32,0,0,281,282,5,1,0,0,282,283,3,0,0,0,283,284,5, - 3,0,0,284,285,3,0,0,0,285,286,5,2,0,0,286,316,1,0,0,0,287,288,5, - 10,0,0,288,289,5,1,0,0,289,290,3,0,0,0,290,291,5,3,0,0,291,292,3, - 0,0,0,292,293,5,2,0,0,293,316,1,0,0,0,294,295,5,24,0,0,295,296,5, - 1,0,0,296,297,3,0,0,0,297,298,5,3,0,0,298,299,3,0,0,0,299,300,5, - 2,0,0,300,316,1,0,0,0,301,302,5,25,0,0,302,303,5,1,0,0,303,304,3, - 0,0,0,304,305,5,3,0,0,305,306,3,0,0,0,306,307,5,2,0,0,307,316,1, - 0,0,0,308,309,5,40,0,0,309,310,5,1,0,0,310,311,3,0,0,0,311,312,5, - 3,0,0,312,313,3,0,0,0,313,314,5,2,0,0,314,316,1,0,0,0,315,280,1, - 0,0,0,315,287,1,0,0,0,315,294,1,0,0,0,315,301,1,0,0,0,315,308,1, - 0,0,0,316,17,1,0,0,0,317,318,5,34,0,0,318,319,5,1,0,0,319,320,3, - 0,0,0,320,321,5,3,0,0,321,322,3,0,0,0,322,323,5,3,0,0,323,324,3, - 0,0,0,324,325,5,2,0,0,325,345,1,0,0,0,326,327,5,39,0,0,327,328,5, - 1,0,0,328,329,3,0,0,0,329,330,5,3,0,0,330,331,3,0,0,0,331,332,5, - 3,0,0,332,333,3,0,0,0,333,334,5,2,0,0,334,345,1,0,0,0,335,336,5, - 41,0,0,336,337,5,1,0,0,337,338,3,0,0,0,338,339,5,3,0,0,339,340,3, - 0,0,0,340,341,5,3,0,0,341,342,3,0,0,0,342,343,5,2,0,0,343,345,1, - 0,0,0,344,317,1,0,0,0,344,326,1,0,0,0,344,335,1,0,0,0,345,19,1,0, - 0,0,346,347,5,47,0,0,347,348,5,1,0,0,348,349,3,0,0,0,349,350,5,3, - 0,0,350,351,3,0,0,0,351,352,5,3,0,0,352,353,3,0,0,0,353,354,5,3, - 0,0,354,355,3,0,0,0,355,356,5,2,0,0,356,21,1,0,0,0,357,358,5,22, - 0,0,358,359,5,1,0,0,359,362,3,0,0,0,360,361,5,3,0,0,361,363,3,0, - 0,0,362,360,1,0,0,0,363,364,1,0,0,0,364,362,1,0,0,0,364,365,1,0, - 0,0,365,366,1,0,0,0,366,367,5,2,0,0,367,380,1,0,0,0,368,369,5,23, - 0,0,369,370,5,1,0,0,370,373,3,0,0,0,371,372,5,3,0,0,372,374,3,0, - 0,0,373,371,1,0,0,0,374,375,1,0,0,0,375,373,1,0,0,0,375,376,1,0, - 0,0,376,377,1,0,0,0,377,378,5,2,0,0,378,380,1,0,0,0,379,357,1,0, - 0,0,379,368,1,0,0,0,380,23,1,0,0,0,16,26,49,51,63,65,80,82,90,97, - 111,278,315,344,364,375,379 + 6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,3,6,116, + 8,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,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,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,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,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,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,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,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,1,7,1,7,1,7,1,7,1,7,3,7,283,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,3,8,320,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,3,9,349,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,11,1,11,1,11,1,11,1, + 11,4,11,367,8,11,11,11,12,11,368,1,11,1,11,1,11,1,11,1,11,1,11,1, + 11,4,11,378,8,11,11,11,12,11,379,1,11,1,11,3,11,384,8,11,1,11,0, + 3,2,4,6,12,0,2,4,6,8,10,12,14,16,18,20,22,0,0,438,0,26,1,0,0,0,2, + 28,1,0,0,0,4,54,1,0,0,0,6,68,1,0,0,0,8,90,1,0,0,0,10,97,1,0,0,0, + 12,115,1,0,0,0,14,282,1,0,0,0,16,319,1,0,0,0,18,348,1,0,0,0,20,350, + 1,0,0,0,22,383,1,0,0,0,24,27,3,12,6,0,25,27,3,2,1,0,26,24,1,0,0, + 0,26,25,1,0,0,0,27,1,1,0,0,0,28,29,6,1,-1,0,29,30,3,4,2,0,30,51, + 1,0,0,0,31,32,10,7,0,0,32,33,5,55,0,0,33,50,3,4,2,0,34,35,10,6,0, + 0,35,36,5,54,0,0,36,50,3,4,2,0,37,38,10,5,0,0,38,39,5,57,0,0,39, + 50,3,4,2,0,40,41,10,4,0,0,41,42,5,56,0,0,42,50,3,4,2,0,43,44,10, + 3,0,0,44,45,5,58,0,0,45,50,3,4,2,0,46,47,10,2,0,0,47,48,5,59,0,0, + 48,50,3,4,2,0,49,31,1,0,0,0,49,34,1,0,0,0,49,37,1,0,0,0,49,40,1, + 0,0,0,49,43,1,0,0,0,49,46,1,0,0,0,50,53,1,0,0,0,51,49,1,0,0,0,51, + 52,1,0,0,0,52,3,1,0,0,0,53,51,1,0,0,0,54,55,6,2,-1,0,55,56,3,6,3, + 0,56,65,1,0,0,0,57,58,10,3,0,0,58,59,5,48,0,0,59,64,3,6,3,0,60,61, + 10,2,0,0,61,62,5,49,0,0,62,64,3,6,3,0,63,57,1,0,0,0,63,60,1,0,0, + 0,64,67,1,0,0,0,65,63,1,0,0,0,65,66,1,0,0,0,66,5,1,0,0,0,67,65,1, + 0,0,0,68,69,6,3,-1,0,69,70,3,8,4,0,70,82,1,0,0,0,71,72,10,4,0,0, + 72,73,5,50,0,0,73,81,3,8,4,0,74,75,10,3,0,0,75,76,5,51,0,0,76,81, + 3,8,4,0,77,78,10,2,0,0,78,79,5,52,0,0,79,81,3,8,4,0,80,71,1,0,0, + 0,80,74,1,0,0,0,80,77,1,0,0,0,81,84,1,0,0,0,82,80,1,0,0,0,82,83, + 1,0,0,0,83,7,1,0,0,0,84,82,1,0,0,0,85,86,3,10,5,0,86,87,5,53,0,0, + 87,88,3,8,4,0,88,91,1,0,0,0,89,91,3,10,5,0,90,85,1,0,0,0,90,89,1, + 0,0,0,91,9,1,0,0,0,92,93,5,48,0,0,93,98,3,10,5,0,94,95,5,49,0,0, + 95,98,3,10,5,0,96,98,3,12,6,0,97,92,1,0,0,0,97,94,1,0,0,0,97,96, + 1,0,0,0,98,11,1,0,0,0,99,116,3,14,7,0,100,116,3,16,8,0,101,116,3, + 18,9,0,102,116,3,20,10,0,103,116,3,22,11,0,104,116,5,63,0,0,105, + 116,5,62,0,0,106,116,5,61,0,0,107,108,5,1,0,0,108,109,3,0,0,0,109, + 110,5,2,0,0,110,116,1,0,0,0,111,112,5,60,0,0,112,113,3,0,0,0,113, + 114,5,60,0,0,114,116,1,0,0,0,115,99,1,0,0,0,115,100,1,0,0,0,115, + 101,1,0,0,0,115,102,1,0,0,0,115,103,1,0,0,0,115,104,1,0,0,0,115, + 105,1,0,0,0,115,106,1,0,0,0,115,107,1,0,0,0,115,111,1,0,0,0,116, + 13,1,0,0,0,117,118,5,4,0,0,118,119,5,1,0,0,119,120,3,0,0,0,120,121, + 5,2,0,0,121,283,1,0,0,0,122,123,5,5,0,0,123,124,5,1,0,0,124,125, + 3,0,0,0,125,126,5,2,0,0,126,283,1,0,0,0,127,128,5,6,0,0,128,129, + 5,1,0,0,129,130,3,0,0,0,130,131,5,2,0,0,131,283,1,0,0,0,132,133, + 5,7,0,0,133,134,5,1,0,0,134,135,3,0,0,0,135,136,5,2,0,0,136,283, + 1,0,0,0,137,138,5,8,0,0,138,139,5,1,0,0,139,140,3,0,0,0,140,141, + 5,2,0,0,141,283,1,0,0,0,142,143,5,9,0,0,143,144,5,1,0,0,144,145, + 3,0,0,0,145,146,5,2,0,0,146,283,1,0,0,0,147,148,5,11,0,0,148,149, + 5,1,0,0,149,150,3,0,0,0,150,151,5,2,0,0,151,283,1,0,0,0,152,153, + 5,12,0,0,153,154,5,1,0,0,154,155,3,0,0,0,155,156,5,2,0,0,156,283, + 1,0,0,0,157,158,5,13,0,0,158,159,5,1,0,0,159,160,3,0,0,0,160,161, + 5,2,0,0,161,283,1,0,0,0,162,163,5,14,0,0,163,164,5,1,0,0,164,165, + 3,0,0,0,165,166,5,2,0,0,166,283,1,0,0,0,167,168,5,15,0,0,168,169, + 5,1,0,0,169,170,3,0,0,0,170,171,5,2,0,0,171,283,1,0,0,0,172,173, + 5,16,0,0,173,174,5,1,0,0,174,175,3,0,0,0,175,176,5,2,0,0,176,283, + 1,0,0,0,177,178,5,17,0,0,178,179,5,1,0,0,179,180,3,0,0,0,180,181, + 5,2,0,0,181,283,1,0,0,0,182,183,5,18,0,0,183,184,5,1,0,0,184,185, + 3,0,0,0,185,186,5,2,0,0,186,283,1,0,0,0,187,188,5,19,0,0,188,189, + 5,1,0,0,189,190,3,0,0,0,190,191,5,2,0,0,191,283,1,0,0,0,192,193, + 5,20,0,0,193,194,5,1,0,0,194,195,3,0,0,0,195,196,5,2,0,0,196,283, + 1,0,0,0,197,198,5,21,0,0,198,199,5,1,0,0,199,200,3,0,0,0,200,201, + 5,2,0,0,201,283,1,0,0,0,202,203,5,26,0,0,203,204,5,1,0,0,204,205, + 3,0,0,0,205,206,5,2,0,0,206,283,1,0,0,0,207,208,5,27,0,0,208,209, + 5,1,0,0,209,210,3,0,0,0,210,211,5,2,0,0,211,283,1,0,0,0,212,213, + 5,28,0,0,213,214,5,1,0,0,214,215,3,0,0,0,215,216,5,2,0,0,216,283, + 1,0,0,0,217,218,5,29,0,0,218,219,5,1,0,0,219,220,3,0,0,0,220,221, + 5,2,0,0,221,283,1,0,0,0,222,223,5,30,0,0,223,224,5,1,0,0,224,225, + 3,0,0,0,225,226,5,2,0,0,226,283,1,0,0,0,227,228,5,31,0,0,228,229, + 5,1,0,0,229,230,3,0,0,0,230,231,5,2,0,0,231,283,1,0,0,0,232,233, + 5,33,0,0,233,234,5,1,0,0,234,235,3,0,0,0,235,236,5,2,0,0,236,283, + 1,0,0,0,237,238,5,35,0,0,238,239,5,1,0,0,239,240,3,0,0,0,240,241, + 5,2,0,0,241,283,1,0,0,0,242,243,5,36,0,0,243,244,5,1,0,0,244,245, + 3,0,0,0,245,246,5,2,0,0,246,283,1,0,0,0,247,248,5,37,0,0,248,249, + 5,1,0,0,249,250,3,0,0,0,250,251,5,2,0,0,251,283,1,0,0,0,252,253, + 5,38,0,0,253,254,5,1,0,0,254,255,3,0,0,0,255,256,5,2,0,0,256,283, + 1,0,0,0,257,258,5,42,0,0,258,259,5,1,0,0,259,260,3,0,0,0,260,261, + 5,2,0,0,261,283,1,0,0,0,262,263,5,43,0,0,263,264,5,1,0,0,264,265, + 3,0,0,0,265,266,5,2,0,0,266,283,1,0,0,0,267,268,5,44,0,0,268,269, + 5,1,0,0,269,270,3,0,0,0,270,271,5,2,0,0,271,283,1,0,0,0,272,273, + 5,45,0,0,273,274,5,1,0,0,274,275,3,0,0,0,275,276,5,2,0,0,276,283, + 1,0,0,0,277,278,5,46,0,0,278,279,5,1,0,0,279,280,3,0,0,0,280,281, + 5,2,0,0,281,283,1,0,0,0,282,117,1,0,0,0,282,122,1,0,0,0,282,127, + 1,0,0,0,282,132,1,0,0,0,282,137,1,0,0,0,282,142,1,0,0,0,282,147, + 1,0,0,0,282,152,1,0,0,0,282,157,1,0,0,0,282,162,1,0,0,0,282,167, + 1,0,0,0,282,172,1,0,0,0,282,177,1,0,0,0,282,182,1,0,0,0,282,187, + 1,0,0,0,282,192,1,0,0,0,282,197,1,0,0,0,282,202,1,0,0,0,282,207, + 1,0,0,0,282,212,1,0,0,0,282,217,1,0,0,0,282,222,1,0,0,0,282,227, + 1,0,0,0,282,232,1,0,0,0,282,237,1,0,0,0,282,242,1,0,0,0,282,247, + 1,0,0,0,282,252,1,0,0,0,282,257,1,0,0,0,282,262,1,0,0,0,282,267, + 1,0,0,0,282,272,1,0,0,0,282,277,1,0,0,0,283,15,1,0,0,0,284,285,5, + 32,0,0,285,286,5,1,0,0,286,287,3,0,0,0,287,288,5,3,0,0,288,289,3, + 0,0,0,289,290,5,2,0,0,290,320,1,0,0,0,291,292,5,10,0,0,292,293,5, + 1,0,0,293,294,3,0,0,0,294,295,5,3,0,0,295,296,3,0,0,0,296,297,5, + 2,0,0,297,320,1,0,0,0,298,299,5,24,0,0,299,300,5,1,0,0,300,301,3, + 0,0,0,301,302,5,3,0,0,302,303,3,0,0,0,303,304,5,2,0,0,304,320,1, + 0,0,0,305,306,5,25,0,0,306,307,5,1,0,0,307,308,3,0,0,0,308,309,5, + 3,0,0,309,310,3,0,0,0,310,311,5,2,0,0,311,320,1,0,0,0,312,313,5, + 40,0,0,313,314,5,1,0,0,314,315,3,0,0,0,315,316,5,3,0,0,316,317,3, + 0,0,0,317,318,5,2,0,0,318,320,1,0,0,0,319,284,1,0,0,0,319,291,1, + 0,0,0,319,298,1,0,0,0,319,305,1,0,0,0,319,312,1,0,0,0,320,17,1,0, + 0,0,321,322,5,34,0,0,322,323,5,1,0,0,323,324,3,0,0,0,324,325,5,3, + 0,0,325,326,3,0,0,0,326,327,5,3,0,0,327,328,3,0,0,0,328,329,5,2, + 0,0,329,349,1,0,0,0,330,331,5,39,0,0,331,332,5,1,0,0,332,333,3,0, + 0,0,333,334,5,3,0,0,334,335,3,0,0,0,335,336,5,3,0,0,336,337,3,0, + 0,0,337,338,5,2,0,0,338,349,1,0,0,0,339,340,5,41,0,0,340,341,5,1, + 0,0,341,342,3,0,0,0,342,343,5,3,0,0,343,344,3,0,0,0,344,345,5,3, + 0,0,345,346,3,0,0,0,346,347,5,2,0,0,347,349,1,0,0,0,348,321,1,0, + 0,0,348,330,1,0,0,0,348,339,1,0,0,0,349,19,1,0,0,0,350,351,5,47, + 0,0,351,352,5,1,0,0,352,353,3,0,0,0,353,354,5,3,0,0,354,355,3,0, + 0,0,355,356,5,3,0,0,356,357,3,0,0,0,357,358,5,3,0,0,358,359,3,0, + 0,0,359,360,5,2,0,0,360,21,1,0,0,0,361,362,5,22,0,0,362,363,5,1, + 0,0,363,366,3,0,0,0,364,365,5,3,0,0,365,367,3,0,0,0,366,364,1,0, + 0,0,367,368,1,0,0,0,368,366,1,0,0,0,368,369,1,0,0,0,369,370,1,0, + 0,0,370,371,5,2,0,0,371,384,1,0,0,0,372,373,5,23,0,0,373,374,5,1, + 0,0,374,377,3,0,0,0,375,376,5,3,0,0,376,378,3,0,0,0,377,375,1,0, + 0,0,378,379,1,0,0,0,379,377,1,0,0,0,379,380,1,0,0,0,380,381,1,0, + 0,0,381,382,5,2,0,0,382,384,1,0,0,0,383,361,1,0,0,0,383,372,1,0, + 0,0,384,23,1,0,0,0,16,26,49,51,63,65,80,82,90,97,115,282,319,348, + 368,379,383 ] class MathExprParser ( Parser ): @@ -154,29 +157,29 @@ class MathExprParser ( Parser ): sharedContextCache = PredictionContextCache() - literalNames = [ "", "'('", "')'", "','", "'sin'", "'cos'", - "'tan'", "'asin'", "'acos'", "'atan'", "'atan2'", "'sinh'", - "'cosh'", "'tanh'", "'asinh'", "'acosh'", "'atanh'", - "'abs'", "'sqrt'", "'ln'", "'log'", "'exp'", "'smin'", - "'smax'", "'tmin'", "'tmax'", "'tnorm'", "'snorm'", - "'floor'", "'ceil'", "'round'", "'gamma'", "'pow'", - "'sigm'", "'clamp'", "'fft'", "'ifft'", "'angle'", - "'print'", "'lerp'", "'step'", "'smoothstep'", "'fract'", - "'relu'", "'softplus'", "'gelu'", "'sign'", "'swap'", - "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "'>='", "'>'", - "'<='", "'<'", "'=='", "'!='" ] + literalNames = [ "", "'('", "')'", "','", "'sin'", "'cos'", + "'tan'", "'asin'", "'acos'", "'atan'", "'atan2'", "'sinh'", + "'cosh'", "'tanh'", "'asinh'", "'acosh'", "'atanh'", + "'abs'", "'sqrt'", "'ln'", "'log'", "'exp'", "'smin'", + "'smax'", "'tmin'", "'tmax'", "'tnorm'", "'snorm'", + "'floor'", "'ceil'", "'round'", "'gamma'", "'pow'", + "'sigm'", "'clamp'", "'fft'", "'ifft'", "'angle'", + "'print'", "'lerp'", "'step'", "'smoothstep'", "'fract'", + "'relu'", "'softplus'", "'gelu'", "'sign'", "'swap'", + "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "'>='", "'>'", + "'<='", "'<'", "'=='", "'!='", "'|'" ] - symbolicNames = [ "", "", "", "", - "SIN", "COS", "TAN", "ASIN", "ACOS", "ATAN", "ATAN2", - "SINH", "COSH", "TANH", "ASINH", "ACOSH", "ATANH", - "ABS", "SQRT", "LN", "LOG", "EXP", "SMIN", "SMAX", - "TMIN", "TMAX", "TNORM", "SNORM", "FLOOR", "CEIL", - "ROUND", "GAMMA", "POWE", "SIGM", "CLAMP", "SFFT", - "SIFFT", "ANGL", "PRNT", "LERP", "STEP", "SMOOTHSTEP", - "FRACT", "RELU", "SOFTPLUS", "GELU", "SIGN", "SWAP", - "PLUS", "MINUS", "MULT", "DIV", "MOD", "POW", "GE", - "GT", "LE", "LT", "EQ", "NE", "CONSTANT", "NUMBER", - "VARIABLE", "WS" ] + symbolicNames = [ "", "", "", "", + "SIN", "COS", "TAN", "ASIN", "ACOS", "ATAN", "ATAN2", + "SINH", "COSH", "TANH", "ASINH", "ACOSH", "ATANH", + "ABS", "SQRT", "LN", "LOG", "EXP", "SMIN", "SMAX", + "TMIN", "TMAX", "TNORM", "SNORM", "FLOOR", "CEIL", + "ROUND", "GAMMA", "POWE", "SIGM", "CLAMP", "SFFT", + "SIFFT", "ANGL", "PRNT", "LERP", "STEP", "SMOOTHSTEP", + "FRACT", "RELU", "SOFTPLUS", "GELU", "SIGN", "SWAP", + "PLUS", "MINUS", "MULT", "DIV", "MOD", "POW", "GE", + "GT", "LE", "LT", "EQ", "NE", "PIPE", "CONSTANT", + "NUMBER", "VARIABLE", "WS" ] RULE_expr = 0 RULE_compExpr = 1 @@ -191,8 +194,8 @@ class MathExprParser ( Parser ): RULE_func4 = 10 RULE_funcN = 11 - ruleNames = [ "expr", "compExpr", "addExpr", "mulExpr", "powExpr", - "unaryExpr", "atom", "func1", "func2", "func3", "func4", + ruleNames = [ "expr", "compExpr", "addExpr", "mulExpr", "powExpr", + "unaryExpr", "atom", "func1", "func2", "func3", "func4", "funcN" ] EOF = Token.EOF @@ -255,10 +258,11 @@ class MathExprParser ( Parser ): LT=57 EQ=58 NE=59 - CONSTANT=60 - NUMBER=61 - VARIABLE=62 - WS=63 + PIPE=60 + CONSTANT=61 + NUMBER=62 + VARIABLE=63 + WS=64 def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) @@ -337,7 +341,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_compExpr - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -597,7 +601,7 @@ class MathExprParser ( Parser ): self.addExpr(0) pass - + self.state = 53 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,2,self._ctx) @@ -622,7 +626,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_addExpr - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -742,7 +746,7 @@ class MathExprParser ( Parser ): self.mulExpr(0) pass - + self.state = 67 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,4,self._ctx) @@ -767,7 +771,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_mulExpr - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -922,7 +926,7 @@ class MathExprParser ( Parser ): self.powExpr() pass - + self.state = 84 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,6,self._ctx) @@ -947,7 +951,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_powExpr - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -1040,7 +1044,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_unaryExpr - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -1126,7 +1130,7 @@ class MathExprParser ( Parser ): self.state = 95 self.unaryExpr() pass - elif token in [1, 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, 60, 61, 62]: + elif token in [1, 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, 60, 61, 62, 63]: localctx = MathExprParser.ToAtomContext(self, localctx) self.enterOuterAlt(localctx, 3) self.state = 96 @@ -1155,7 +1159,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_atom - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -1311,13 +1315,35 @@ class MathExprParser ( Parser ): return visitor.visitChildren(self) + class AbsExpContext(AtomContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext + super().__init__(parser) + self.copyFrom(ctx) + + def PIPE(self, i:int=None): + if i is None: + return self.getTokens(MathExprParser.PIPE) + else: + return self.getToken(MathExprParser.PIPE, i) + def expr(self): + return self.getTypedRuleContext(MathExprParser.ExprContext,0) + + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAbsExp" ): + return visitor.visitAbsExp(self) + else: + return visitor.visitChildren(self) + + def atom(self): localctx = MathExprParser.AtomContext(self, self._ctx, self.state) self.enterRule(localctx, 12, self.RULE_atom) try: - self.state = 111 + self.state = 115 self._errHandler.sync(self) token = self._input.LA(1) if token in [4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 26, 27, 28, 29, 30, 31, 33, 35, 36, 37, 38, 42, 43, 44, 45, 46]: @@ -1350,19 +1376,19 @@ class MathExprParser ( Parser ): self.state = 103 self.funcN() pass - elif token in [62]: + elif token in [63]: localctx = MathExprParser.VariableExpContext(self, localctx) self.enterOuterAlt(localctx, 6) self.state = 104 self.match(MathExprParser.VARIABLE) pass - elif token in [61]: + elif token in [62]: localctx = MathExprParser.NumberExpContext(self, localctx) self.enterOuterAlt(localctx, 7) self.state = 105 self.match(MathExprParser.NUMBER) pass - elif token in [60]: + elif token in [61]: localctx = MathExprParser.ConstantExpContext(self, localctx) self.enterOuterAlt(localctx, 8) self.state = 106 @@ -1378,6 +1404,16 @@ class MathExprParser ( Parser ): self.state = 109 self.match(MathExprParser.T__1) pass + elif token in [60]: + localctx = MathExprParser.AbsExpContext(self, localctx) + self.enterOuterAlt(localctx, 10) + self.state = 111 + self.match(MathExprParser.PIPE) + self.state = 112 + self.expr() + self.state = 113 + self.match(MathExprParser.PIPE) + pass else: raise NoViableAltException(self) @@ -1401,7 +1437,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_func1 - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -2040,403 +2076,403 @@ class MathExprParser ( Parser ): localctx = MathExprParser.Func1Context(self, self._ctx, self.state) self.enterRule(localctx, 14, self.RULE_func1) try: - self.state = 278 + self.state = 282 self._errHandler.sync(self) token = self._input.LA(1) if token in [4]: localctx = MathExprParser.SinFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 113 + self.state = 117 self.match(MathExprParser.SIN) - self.state = 114 + self.state = 118 self.match(MathExprParser.T__0) - self.state = 115 + self.state = 119 self.expr() - self.state = 116 + self.state = 120 self.match(MathExprParser.T__1) pass elif token in [5]: localctx = MathExprParser.CosFuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 118 + self.state = 122 self.match(MathExprParser.COS) - self.state = 119 + self.state = 123 self.match(MathExprParser.T__0) - self.state = 120 + self.state = 124 self.expr() - self.state = 121 + self.state = 125 self.match(MathExprParser.T__1) pass elif token in [6]: localctx = MathExprParser.TanFuncContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 123 + self.state = 127 self.match(MathExprParser.TAN) - self.state = 124 + self.state = 128 self.match(MathExprParser.T__0) - self.state = 125 + self.state = 129 self.expr() - self.state = 126 + self.state = 130 self.match(MathExprParser.T__1) pass elif token in [7]: localctx = MathExprParser.AsinFuncContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 128 + self.state = 132 self.match(MathExprParser.ASIN) - self.state = 129 + self.state = 133 self.match(MathExprParser.T__0) - self.state = 130 + self.state = 134 self.expr() - self.state = 131 + self.state = 135 self.match(MathExprParser.T__1) pass elif token in [8]: localctx = MathExprParser.AcosFuncContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 133 + self.state = 137 self.match(MathExprParser.ACOS) - self.state = 134 + self.state = 138 self.match(MathExprParser.T__0) - self.state = 135 + self.state = 139 self.expr() - self.state = 136 + self.state = 140 self.match(MathExprParser.T__1) pass elif token in [9]: localctx = MathExprParser.AtanFuncContext(self, localctx) self.enterOuterAlt(localctx, 6) - self.state = 138 + self.state = 142 self.match(MathExprParser.ATAN) - self.state = 139 + self.state = 143 self.match(MathExprParser.T__0) - self.state = 140 + self.state = 144 self.expr() - self.state = 141 + self.state = 145 self.match(MathExprParser.T__1) pass elif token in [11]: localctx = MathExprParser.SinhFuncContext(self, localctx) self.enterOuterAlt(localctx, 7) - self.state = 143 + self.state = 147 self.match(MathExprParser.SINH) - self.state = 144 + self.state = 148 self.match(MathExprParser.T__0) - self.state = 145 + self.state = 149 self.expr() - self.state = 146 + self.state = 150 self.match(MathExprParser.T__1) pass elif token in [12]: localctx = MathExprParser.CoshFuncContext(self, localctx) self.enterOuterAlt(localctx, 8) - self.state = 148 + self.state = 152 self.match(MathExprParser.COSH) - self.state = 149 + self.state = 153 self.match(MathExprParser.T__0) - self.state = 150 + self.state = 154 self.expr() - self.state = 151 + self.state = 155 self.match(MathExprParser.T__1) pass elif token in [13]: localctx = MathExprParser.TanhFuncContext(self, localctx) self.enterOuterAlt(localctx, 9) - self.state = 153 + self.state = 157 self.match(MathExprParser.TANH) - self.state = 154 + self.state = 158 self.match(MathExprParser.T__0) - self.state = 155 + self.state = 159 self.expr() - self.state = 156 + self.state = 160 self.match(MathExprParser.T__1) pass elif token in [14]: localctx = MathExprParser.AsinhFuncContext(self, localctx) self.enterOuterAlt(localctx, 10) - self.state = 158 + self.state = 162 self.match(MathExprParser.ASINH) - self.state = 159 + self.state = 163 self.match(MathExprParser.T__0) - self.state = 160 + self.state = 164 self.expr() - self.state = 161 + self.state = 165 self.match(MathExprParser.T__1) pass elif token in [15]: localctx = MathExprParser.AcoshFuncContext(self, localctx) self.enterOuterAlt(localctx, 11) - self.state = 163 + self.state = 167 self.match(MathExprParser.ACOSH) - self.state = 164 + self.state = 168 self.match(MathExprParser.T__0) - self.state = 165 + self.state = 169 self.expr() - self.state = 166 + self.state = 170 self.match(MathExprParser.T__1) pass elif token in [16]: localctx = MathExprParser.AtanhFuncContext(self, localctx) self.enterOuterAlt(localctx, 12) - self.state = 168 + self.state = 172 self.match(MathExprParser.ATANH) - self.state = 169 + self.state = 173 self.match(MathExprParser.T__0) - self.state = 170 + self.state = 174 self.expr() - self.state = 171 + self.state = 175 self.match(MathExprParser.T__1) pass elif token in [17]: localctx = MathExprParser.AbsFuncContext(self, localctx) self.enterOuterAlt(localctx, 13) - self.state = 173 + self.state = 177 self.match(MathExprParser.ABS) - self.state = 174 + self.state = 178 self.match(MathExprParser.T__0) - self.state = 175 + self.state = 179 self.expr() - self.state = 176 + self.state = 180 self.match(MathExprParser.T__1) pass elif token in [18]: localctx = MathExprParser.SqrtFuncContext(self, localctx) self.enterOuterAlt(localctx, 14) - self.state = 178 + self.state = 182 self.match(MathExprParser.SQRT) - self.state = 179 + self.state = 183 self.match(MathExprParser.T__0) - self.state = 180 + self.state = 184 self.expr() - self.state = 181 + self.state = 185 self.match(MathExprParser.T__1) pass elif token in [19]: localctx = MathExprParser.LnFuncContext(self, localctx) self.enterOuterAlt(localctx, 15) - self.state = 183 + self.state = 187 self.match(MathExprParser.LN) - self.state = 184 + self.state = 188 self.match(MathExprParser.T__0) - self.state = 185 + self.state = 189 self.expr() - self.state = 186 + self.state = 190 self.match(MathExprParser.T__1) pass elif token in [20]: localctx = MathExprParser.LogFuncContext(self, localctx) self.enterOuterAlt(localctx, 16) - self.state = 188 + self.state = 192 self.match(MathExprParser.LOG) - self.state = 189 + self.state = 193 self.match(MathExprParser.T__0) - self.state = 190 + self.state = 194 self.expr() - self.state = 191 + self.state = 195 self.match(MathExprParser.T__1) pass elif token in [21]: localctx = MathExprParser.ExpFuncContext(self, localctx) self.enterOuterAlt(localctx, 17) - self.state = 193 + self.state = 197 self.match(MathExprParser.EXP) - self.state = 194 + self.state = 198 self.match(MathExprParser.T__0) - self.state = 195 + self.state = 199 self.expr() - self.state = 196 + self.state = 200 self.match(MathExprParser.T__1) pass elif token in [26]: localctx = MathExprParser.TNormFuncContext(self, localctx) self.enterOuterAlt(localctx, 18) - self.state = 198 + self.state = 202 self.match(MathExprParser.TNORM) - self.state = 199 + self.state = 203 self.match(MathExprParser.T__0) - self.state = 200 + self.state = 204 self.expr() - self.state = 201 + self.state = 205 self.match(MathExprParser.T__1) pass elif token in [27]: localctx = MathExprParser.SNormFuncContext(self, localctx) self.enterOuterAlt(localctx, 19) - self.state = 203 + self.state = 207 self.match(MathExprParser.SNORM) - self.state = 204 + self.state = 208 self.match(MathExprParser.T__0) - self.state = 205 + self.state = 209 self.expr() - self.state = 206 + self.state = 210 self.match(MathExprParser.T__1) pass elif token in [28]: localctx = MathExprParser.FloorFuncContext(self, localctx) self.enterOuterAlt(localctx, 20) - self.state = 208 + self.state = 212 self.match(MathExprParser.FLOOR) - self.state = 209 + self.state = 213 self.match(MathExprParser.T__0) - self.state = 210 + self.state = 214 self.expr() - self.state = 211 + self.state = 215 self.match(MathExprParser.T__1) pass elif token in [29]: localctx = MathExprParser.CeilFuncContext(self, localctx) self.enterOuterAlt(localctx, 21) - self.state = 213 + self.state = 217 self.match(MathExprParser.CEIL) - self.state = 214 + self.state = 218 self.match(MathExprParser.T__0) - self.state = 215 + self.state = 219 self.expr() - self.state = 216 + self.state = 220 self.match(MathExprParser.T__1) pass elif token in [30]: localctx = MathExprParser.RoundFuncContext(self, localctx) self.enterOuterAlt(localctx, 22) - self.state = 218 + self.state = 222 self.match(MathExprParser.ROUND) - self.state = 219 + self.state = 223 self.match(MathExprParser.T__0) - self.state = 220 + self.state = 224 self.expr() - self.state = 221 + self.state = 225 self.match(MathExprParser.T__1) pass elif token in [31]: localctx = MathExprParser.GammaFuncContext(self, localctx) self.enterOuterAlt(localctx, 23) - self.state = 223 + self.state = 227 self.match(MathExprParser.GAMMA) - self.state = 224 + self.state = 228 self.match(MathExprParser.T__0) - self.state = 225 + self.state = 229 self.expr() - self.state = 226 + self.state = 230 self.match(MathExprParser.T__1) pass elif token in [33]: localctx = MathExprParser.SigmoidFuncContext(self, localctx) self.enterOuterAlt(localctx, 24) - self.state = 228 + self.state = 232 self.match(MathExprParser.SIGM) - self.state = 229 + self.state = 233 self.match(MathExprParser.T__0) - self.state = 230 + self.state = 234 self.expr() - self.state = 231 + self.state = 235 self.match(MathExprParser.T__1) pass elif token in [35]: localctx = MathExprParser.SfftFuncContext(self, localctx) self.enterOuterAlt(localctx, 25) - self.state = 233 + self.state = 237 self.match(MathExprParser.SFFT) - self.state = 234 + self.state = 238 self.match(MathExprParser.T__0) - self.state = 235 + self.state = 239 self.expr() - self.state = 236 + self.state = 240 self.match(MathExprParser.T__1) pass elif token in [36]: localctx = MathExprParser.SifftFuncContext(self, localctx) self.enterOuterAlt(localctx, 26) - self.state = 238 + self.state = 242 self.match(MathExprParser.SIFFT) - self.state = 239 + self.state = 243 self.match(MathExprParser.T__0) - self.state = 240 + self.state = 244 self.expr() - self.state = 241 + self.state = 245 self.match(MathExprParser.T__1) pass elif token in [37]: localctx = MathExprParser.AnglFuncContext(self, localctx) self.enterOuterAlt(localctx, 27) - self.state = 243 + self.state = 247 self.match(MathExprParser.ANGL) - self.state = 244 + self.state = 248 self.match(MathExprParser.T__0) - self.state = 245 + self.state = 249 self.expr() - self.state = 246 + self.state = 250 self.match(MathExprParser.T__1) pass elif token in [38]: localctx = MathExprParser.PrintFuncContext(self, localctx) self.enterOuterAlt(localctx, 28) - self.state = 248 + self.state = 252 self.match(MathExprParser.PRNT) - self.state = 249 + self.state = 253 self.match(MathExprParser.T__0) - self.state = 250 + self.state = 254 self.expr() - self.state = 251 + self.state = 255 self.match(MathExprParser.T__1) pass elif token in [42]: localctx = MathExprParser.FractFuncContext(self, localctx) self.enterOuterAlt(localctx, 29) - self.state = 253 + self.state = 257 self.match(MathExprParser.FRACT) - self.state = 254 + self.state = 258 self.match(MathExprParser.T__0) - self.state = 255 + self.state = 259 self.expr() - self.state = 256 + self.state = 260 self.match(MathExprParser.T__1) pass elif token in [43]: localctx = MathExprParser.ReluFuncContext(self, localctx) self.enterOuterAlt(localctx, 30) - self.state = 258 + self.state = 262 self.match(MathExprParser.RELU) - self.state = 259 + self.state = 263 self.match(MathExprParser.T__0) - self.state = 260 + self.state = 264 self.expr() - self.state = 261 + self.state = 265 self.match(MathExprParser.T__1) pass elif token in [44]: localctx = MathExprParser.SoftplusFuncContext(self, localctx) self.enterOuterAlt(localctx, 31) - self.state = 263 + self.state = 267 self.match(MathExprParser.SOFTPLUS) - self.state = 264 + self.state = 268 self.match(MathExprParser.T__0) - self.state = 265 + self.state = 269 self.expr() - self.state = 266 + self.state = 270 self.match(MathExprParser.T__1) pass elif token in [45]: localctx = MathExprParser.GeluFuncContext(self, localctx) self.enterOuterAlt(localctx, 32) - self.state = 268 + self.state = 272 self.match(MathExprParser.GELU) - self.state = 269 + self.state = 273 self.match(MathExprParser.T__0) - self.state = 270 + self.state = 274 self.expr() - self.state = 271 + self.state = 275 self.match(MathExprParser.T__1) pass elif token in [46]: localctx = MathExprParser.SignFuncContext(self, localctx) self.enterOuterAlt(localctx, 33) - self.state = 273 + self.state = 277 self.match(MathExprParser.SIGN) - self.state = 274 + self.state = 278 self.match(MathExprParser.T__0) - self.state = 275 + self.state = 279 self.expr() - self.state = 276 + self.state = 280 self.match(MathExprParser.T__1) pass else: @@ -2462,7 +2498,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_func2 - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -2584,87 +2620,87 @@ class MathExprParser ( Parser ): localctx = MathExprParser.Func2Context(self, self._ctx, self.state) self.enterRule(localctx, 16, self.RULE_func2) try: - self.state = 315 + self.state = 319 self._errHandler.sync(self) token = self._input.LA(1) if token in [32]: localctx = MathExprParser.PowFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 280 - self.match(MathExprParser.POWE) - self.state = 281 - self.match(MathExprParser.T__0) - self.state = 282 - self.expr() - self.state = 283 - self.match(MathExprParser.T__2) self.state = 284 - self.expr() + self.match(MathExprParser.POWE) self.state = 285 + self.match(MathExprParser.T__0) + self.state = 286 + self.expr() + self.state = 287 + self.match(MathExprParser.T__2) + self.state = 288 + self.expr() + self.state = 289 self.match(MathExprParser.T__1) pass elif token in [10]: localctx = MathExprParser.Atan2FuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 287 - self.match(MathExprParser.ATAN2) - self.state = 288 - self.match(MathExprParser.T__0) - self.state = 289 - self.expr() - self.state = 290 - self.match(MathExprParser.T__2) self.state = 291 - self.expr() + self.match(MathExprParser.ATAN2) self.state = 292 + self.match(MathExprParser.T__0) + self.state = 293 + self.expr() + self.state = 294 + self.match(MathExprParser.T__2) + self.state = 295 + self.expr() + self.state = 296 self.match(MathExprParser.T__1) pass elif token in [24]: localctx = MathExprParser.TMinFuncContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 294 - self.match(MathExprParser.TMIN) - self.state = 295 - self.match(MathExprParser.T__0) - self.state = 296 - self.expr() - self.state = 297 - self.match(MathExprParser.T__2) self.state = 298 - self.expr() + self.match(MathExprParser.TMIN) self.state = 299 + self.match(MathExprParser.T__0) + self.state = 300 + self.expr() + self.state = 301 + self.match(MathExprParser.T__2) + self.state = 302 + self.expr() + self.state = 303 self.match(MathExprParser.T__1) pass elif token in [25]: localctx = MathExprParser.TMaxFuncContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 301 - self.match(MathExprParser.TMAX) - self.state = 302 - self.match(MathExprParser.T__0) - self.state = 303 - self.expr() - self.state = 304 - self.match(MathExprParser.T__2) self.state = 305 - self.expr() + self.match(MathExprParser.TMAX) self.state = 306 + self.match(MathExprParser.T__0) + self.state = 307 + self.expr() + self.state = 308 + self.match(MathExprParser.T__2) + self.state = 309 + self.expr() + self.state = 310 self.match(MathExprParser.T__1) pass elif token in [40]: localctx = MathExprParser.StepFuncContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 308 - self.match(MathExprParser.STEP) - self.state = 309 - self.match(MathExprParser.T__0) - self.state = 310 - self.expr() - self.state = 311 - self.match(MathExprParser.T__2) self.state = 312 - self.expr() + self.match(MathExprParser.STEP) self.state = 313 + self.match(MathExprParser.T__0) + self.state = 314 + self.expr() + self.state = 315 + self.match(MathExprParser.T__2) + self.state = 316 + self.expr() + self.state = 317 self.match(MathExprParser.T__1) pass else: @@ -2690,7 +2726,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_func3 - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -2768,67 +2804,67 @@ class MathExprParser ( Parser ): localctx = MathExprParser.Func3Context(self, self._ctx, self.state) self.enterRule(localctx, 18, self.RULE_func3) try: - self.state = 344 + self.state = 348 self._errHandler.sync(self) token = self._input.LA(1) if token in [34]: localctx = MathExprParser.ClampFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 317 - self.match(MathExprParser.CLAMP) - self.state = 318 - self.match(MathExprParser.T__0) - self.state = 319 - self.expr() - self.state = 320 - self.match(MathExprParser.T__2) self.state = 321 - self.expr() + self.match(MathExprParser.CLAMP) self.state = 322 - self.match(MathExprParser.T__2) + self.match(MathExprParser.T__0) self.state = 323 self.expr() self.state = 324 + self.match(MathExprParser.T__2) + self.state = 325 + self.expr() + self.state = 326 + self.match(MathExprParser.T__2) + self.state = 327 + self.expr() + self.state = 328 self.match(MathExprParser.T__1) pass elif token in [39]: localctx = MathExprParser.LerpFuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 326 - self.match(MathExprParser.LERP) - self.state = 327 - self.match(MathExprParser.T__0) - self.state = 328 - self.expr() - self.state = 329 - self.match(MathExprParser.T__2) self.state = 330 - self.expr() + self.match(MathExprParser.LERP) self.state = 331 - self.match(MathExprParser.T__2) + self.match(MathExprParser.T__0) self.state = 332 self.expr() self.state = 333 + self.match(MathExprParser.T__2) + self.state = 334 + self.expr() + self.state = 335 + self.match(MathExprParser.T__2) + self.state = 336 + self.expr() + self.state = 337 self.match(MathExprParser.T__1) pass elif token in [41]: localctx = MathExprParser.SmoothstepFuncContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 335 - self.match(MathExprParser.SMOOTHSTEP) - self.state = 336 - self.match(MathExprParser.T__0) - self.state = 337 - self.expr() - self.state = 338 - self.match(MathExprParser.T__2) self.state = 339 - self.expr() + self.match(MathExprParser.SMOOTHSTEP) self.state = 340 - self.match(MathExprParser.T__2) + self.match(MathExprParser.T__0) self.state = 341 self.expr() self.state = 342 + self.match(MathExprParser.T__2) + self.state = 343 + self.expr() + self.state = 344 + self.match(MathExprParser.T__2) + self.state = 345 + self.expr() + self.state = 346 self.match(MathExprParser.T__1) pass else: @@ -2854,7 +2890,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_func4 - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -2890,18 +2926,10 @@ class MathExprParser ( Parser ): try: localctx = MathExprParser.SwapFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 346 - self.match(MathExprParser.SWAP) - self.state = 347 - self.match(MathExprParser.T__0) - self.state = 348 - self.expr() - self.state = 349 - self.match(MathExprParser.T__2) self.state = 350 - self.expr() + self.match(MathExprParser.SWAP) self.state = 351 - self.match(MathExprParser.T__2) + self.match(MathExprParser.T__0) self.state = 352 self.expr() self.state = 353 @@ -2909,6 +2937,14 @@ class MathExprParser ( Parser ): self.state = 354 self.expr() self.state = 355 + self.match(MathExprParser.T__2) + self.state = 356 + self.expr() + self.state = 357 + self.match(MathExprParser.T__2) + self.state = 358 + self.expr() + self.state = 359 self.match(MathExprParser.T__1) except RecognitionException as re: localctx.exception = re @@ -2930,7 +2966,7 @@ class MathExprParser ( Parser ): def getRuleIndex(self): return MathExprParser.RULE_funcN - + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) @@ -2987,59 +3023,59 @@ class MathExprParser ( Parser ): self.enterRule(localctx, 22, self.RULE_funcN) self._la = 0 # Token type try: - self.state = 379 + self.state = 383 self._errHandler.sync(self) token = self._input.LA(1) if token in [22]: localctx = MathExprParser.SMinFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 357 + self.state = 361 self.match(MathExprParser.SMIN) - self.state = 358 - self.match(MathExprParser.T__0) - self.state = 359 - self.expr() self.state = 362 + self.match(MathExprParser.T__0) + self.state = 363 + self.expr() + self.state = 366 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 360 - self.match(MathExprParser.T__2) - self.state = 361 - self.expr() self.state = 364 + self.match(MathExprParser.T__2) + self.state = 365 + self.expr() + self.state = 368 self._errHandler.sync(self) _la = self._input.LA(1) if not (_la==3): break - self.state = 366 + self.state = 370 self.match(MathExprParser.T__1) pass elif token in [23]: localctx = MathExprParser.SMaxFuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 368 + self.state = 372 self.match(MathExprParser.SMAX) - self.state = 369 - self.match(MathExprParser.T__0) - self.state = 370 - self.expr() self.state = 373 + self.match(MathExprParser.T__0) + self.state = 374 + self.expr() + self.state = 377 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 371 - self.match(MathExprParser.T__2) - self.state = 372 - self.expr() self.state = 375 + self.match(MathExprParser.T__2) + self.state = 376 + self.expr() + self.state = 379 self._errHandler.sync(self) _la = self._input.LA(1) if not (_la==3): break - self.state = 377 + self.state = 381 self.match(MathExprParser.T__1) pass else: @@ -3070,49 +3106,49 @@ class MathExprParser ( Parser ): def compExpr_sempred(self, localctx:CompExprContext, predIndex:int): if predIndex == 0: return self.precpred(self._ctx, 7) - + if predIndex == 1: return self.precpred(self._ctx, 6) - + if predIndex == 2: return self.precpred(self._ctx, 5) - + if predIndex == 3: return self.precpred(self._ctx, 4) - + if predIndex == 4: return self.precpred(self._ctx, 3) - + if predIndex == 5: return self.precpred(self._ctx, 2) - + def addExpr_sempred(self, localctx:AddExprContext, predIndex:int): if predIndex == 6: return self.precpred(self._ctx, 3) - + if predIndex == 7: return self.precpred(self._ctx, 2) - + def mulExpr_sempred(self, localctx:MulExprContext, predIndex:int): if predIndex == 8: return self.precpred(self._ctx, 4) - + if predIndex == 9: return self.precpred(self._ctx, 3) - + if predIndex == 10: return self.precpred(self._ctx, 2) - + diff --git a/more_math/Parser/MathExprVisitor.py b/more_math/Parser/MathExprVisitor.py index bddbbc3..2143e19 100644 --- a/more_math/Parser/MathExprVisitor.py +++ b/more_math/Parser/MathExprVisitor.py @@ -1,5 +1,5 @@ -# Generated from src/more_math/Parser/MathExpr.g4 by ANTLR 4.13.2 -from antlr4 import ParseTreeVisitor +# Generated from ./MathExpr.g4 by ANTLR 4.13.2 +from antlr4 import * if "." in __name__: from .MathExprParser import MathExprParser else: @@ -154,6 +154,11 @@ class MathExprVisitor(ParseTreeVisitor): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AbsExp. + def visitAbsExp(self, ctx:MathExprParser.AbsExpContext): + 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/TensorEvalVisitor.py b/more_math/Parser/TensorEvalVisitor.py index a5b927b..1092e52 100644 --- a/more_math/Parser/TensorEvalVisitor.py +++ b/more_math/Parser/TensorEvalVisitor.py @@ -116,6 +116,7 @@ class TensorEvalVisitor(MathExprVisitor): def visitAcoshFunc(self, ctx): return torch.acosh(self.visit(ctx.expr())) def visitAtanhFunc(self, ctx): return torch.atanh(self.visit(ctx.expr())) def visitAbsFunc(self, ctx): return torch.abs(self.visit(ctx.expr())) + def visitNormExp(self, ctx): return torch.full(self.shape, torch.linalg.norm(self.visit(ctx.expr())).item(), device=self.device) def visitSqrtFunc(self, ctx): return torch.sqrt(self.visit(ctx.expr())) def visitLnFunc(self, ctx): return torch.log(self.visit(ctx.expr())) def visitLogFunc(self, ctx): return torch.log10(self.visit(ctx.expr()))