diff --git a/README.md b/README.md index 2fdf9b2..514c8a4 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ You can also get the node from comfy manager under the name of More math. - `fract(x)`: Returns the fractional part of x (x - floor(x)). - `sign(x)`: Returns -1 for negative, 1 for positive, 0 for zero. - `gamma(x)`: Gamma function. -- `range(start, end, step)`: Generates a list of values from start (inclusive) to end (exclusive) with given step. ### Trigonometric @@ -83,6 +82,8 @@ You can also get the node from comfy manager under the name of More math. - `tmax(x, y)`: Element-wise maximum of x and y. - `smin(x, ...)`: **Scalar** minimum. Returns the single smallest value across all input tensors/values. - `smax(x, ...)`: **Scalar** maximum. Returns the single largest value across all input tensors/values. +- `topk(x, k)`: Returns a **masked tensor** with only the **top K largest** values preserved at their original positions (others zeroed). For lists, returns the top K largest items sorted descending. Supports complex tensors (uses magnitude for selection). +- `botk(x, k)`: Returns a **masked tensor** with only the **bottom K smallest** values preserved at their original positions (others zeroed). For lists, returns the bottom K smallest items sorted ascending. - `tnorm(x)`: **Tensor** Normalizes x (L2 norm along last dimension). - `snorm(x)`: **Scalar** L2 norm of the entire tensor. - `swap(tensor, dim, index1, index2)`: Swaps two slices of a tensor along a specified dimension. (Tensor only) @@ -107,6 +108,9 @@ You can also get the node from comfy manager under the name of More math. - `print(x)`: Prints the value of x to the console and returns x. - `print_shape(x)` or `pshp`: Prints the shape of x to the console and returns x. +- `pinv(x)`: Computes the permutation inverse of list or tensor (>1D tensor can have interesting results). If `permute(i,x) = j`, then `permute(j,pinv(x)) = i`. +- `range(start, end, step)`: Generates a list of values from start (inclusive) to end (exclusive) with given step. + ## Variables diff --git a/more_math/Parser/MathExpr.g4 b/more_math/Parser/MathExpr.g4 index c6520e9..04327e4 100644 --- a/more_math/Parser/MathExpr.g4 +++ b/more_math/Parser/MathExpr.g4 @@ -91,6 +91,7 @@ func1 | SIGN '(' expr ')' # SignFunc | PRINT_SHAPE_L '(' expr ')' # PrintShapeFunc | PRINT_SHAPE '(' expr ')' # PrintShapeFunc + | PINV '(' expr ')' # PinvFunc ; // Two-argument functions @@ -100,6 +101,8 @@ func2 | TMIN '(' expr ',' expr ')' # TMinFunc | TMAX '(' expr ',' expr ')' # TMaxFunc | STEP '(' expr ',' expr ')' # StepFunc + | TOPK '(' expr ',' expr ')' # TopkFunc + | BOTK '(' expr ',' expr ')' # BotkFunc ; func3 @@ -176,6 +179,9 @@ SWAP : 'swap'; PERM : 'permute'; RESHAPE : 'reshape'; RANGE : 'range'; +TOPK : 'topk'; +BOTK : 'botk'; +PINV : 'pinv'; PLUS : '+'; MINUS : '-'; diff --git a/more_math/Parser/MathExpr.interp b/more_math/Parser/MathExpr.interp index 227a7eb..0ed3317 100644 --- a/more_math/Parser/MathExpr.interp +++ b/more_math/Parser/MathExpr.interp @@ -56,6 +56,9 @@ null 'permute' 'reshape' 'range' +'topk' +'botk' +'pinv' '+' '-' '*' @@ -132,6 +135,9 @@ SWAP PERM RESHAPE RANGE +TOPK +BOTK +PINV PLUS MINUS MULT @@ -166,4 +172,4 @@ funcN atn: -[4, 1, 73, 454, 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, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 120, 8, 6, 10, 6, 12, 6, 123, 9, 6, 1, 6, 1, 6, 3, 6, 127, 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, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 304, 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, 341, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 379, 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, 5, 11, 397, 8, 11, 10, 11, 12, 11, 400, 9, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 409, 8, 11, 10, 11, 12, 11, 412, 9, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 4, 11, 421, 8, 11, 11, 11, 12, 11, 422, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 4, 11, 432, 8, 11, 11, 11, 12, 11, 433, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 452, 8, 11, 1, 11, 0, 3, 2, 4, 6, 12, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 0, 0, 517, 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, 126, 1, 0, 0, 0, 14, 303, 1, 0, 0, 0, 16, 340, 1, 0, 0, 0, 18, 378, 1, 0, 0, 0, 20, 380, 1, 0, 0, 0, 22, 451, 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, 64, 0, 0, 33, 50, 3, 4, 2, 0, 34, 35, 10, 6, 0, 0, 35, 36, 5, 63, 0, 0, 36, 50, 3, 4, 2, 0, 37, 38, 10, 5, 0, 0, 38, 39, 5, 66, 0, 0, 39, 50, 3, 4, 2, 0, 40, 41, 10, 4, 0, 0, 41, 42, 5, 65, 0, 0, 42, 50, 3, 4, 2, 0, 43, 44, 10, 3, 0, 0, 44, 45, 5, 67, 0, 0, 45, 50, 3, 4, 2, 0, 46, 47, 10, 2, 0, 0, 47, 48, 5, 68, 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, 57, 0, 0, 59, 64, 3, 6, 3, 0, 60, 61, 10, 2, 0, 0, 61, 62, 5, 58, 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, 59, 0, 0, 73, 81, 3, 8, 4, 0, 74, 75, 10, 3, 0, 0, 75, 76, 5, 60, 0, 0, 76, 81, 3, 8, 4, 0, 77, 78, 10, 2, 0, 0, 78, 79, 5, 61, 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, 62, 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, 57, 0, 0, 93, 98, 3, 10, 5, 0, 94, 95, 5, 58, 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, 127, 3, 14, 7, 0, 100, 127, 3, 16, 8, 0, 101, 127, 3, 18, 9, 0, 102, 127, 3, 20, 10, 0, 103, 127, 3, 22, 11, 0, 104, 127, 5, 72, 0, 0, 105, 127, 5, 71, 0, 0, 106, 127, 5, 70, 0, 0, 107, 108, 5, 1, 0, 0, 108, 109, 3, 0, 0, 0, 109, 110, 5, 2, 0, 0, 110, 127, 1, 0, 0, 0, 111, 112, 5, 69, 0, 0, 112, 113, 3, 0, 0, 0, 113, 114, 5, 69, 0, 0, 114, 127, 1, 0, 0, 0, 115, 116, 5, 3, 0, 0, 116, 121, 3, 0, 0, 0, 117, 118, 5, 4, 0, 0, 118, 120, 3, 0, 0, 0, 119, 117, 1, 0, 0, 0, 120, 123, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 121, 122, 1, 0, 0, 0, 122, 124, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 124, 125, 5, 5, 0, 0, 125, 127, 1, 0, 0, 0, 126, 99, 1, 0, 0, 0, 126, 100, 1, 0, 0, 0, 126, 101, 1, 0, 0, 0, 126, 102, 1, 0, 0, 0, 126, 103, 1, 0, 0, 0, 126, 104, 1, 0, 0, 0, 126, 105, 1, 0, 0, 0, 126, 106, 1, 0, 0, 0, 126, 107, 1, 0, 0, 0, 126, 111, 1, 0, 0, 0, 126, 115, 1, 0, 0, 0, 127, 13, 1, 0, 0, 0, 128, 129, 5, 6, 0, 0, 129, 130, 5, 1, 0, 0, 130, 131, 3, 0, 0, 0, 131, 132, 5, 2, 0, 0, 132, 304, 1, 0, 0, 0, 133, 134, 5, 7, 0, 0, 134, 135, 5, 1, 0, 0, 135, 136, 3, 0, 0, 0, 136, 137, 5, 2, 0, 0, 137, 304, 1, 0, 0, 0, 138, 139, 5, 8, 0, 0, 139, 140, 5, 1, 0, 0, 140, 141, 3, 0, 0, 0, 141, 142, 5, 2, 0, 0, 142, 304, 1, 0, 0, 0, 143, 144, 5, 9, 0, 0, 144, 145, 5, 1, 0, 0, 145, 146, 3, 0, 0, 0, 146, 147, 5, 2, 0, 0, 147, 304, 1, 0, 0, 0, 148, 149, 5, 10, 0, 0, 149, 150, 5, 1, 0, 0, 150, 151, 3, 0, 0, 0, 151, 152, 5, 2, 0, 0, 152, 304, 1, 0, 0, 0, 153, 154, 5, 11, 0, 0, 154, 155, 5, 1, 0, 0, 155, 156, 3, 0, 0, 0, 156, 157, 5, 2, 0, 0, 157, 304, 1, 0, 0, 0, 158, 159, 5, 13, 0, 0, 159, 160, 5, 1, 0, 0, 160, 161, 3, 0, 0, 0, 161, 162, 5, 2, 0, 0, 162, 304, 1, 0, 0, 0, 163, 164, 5, 14, 0, 0, 164, 165, 5, 1, 0, 0, 165, 166, 3, 0, 0, 0, 166, 167, 5, 2, 0, 0, 167, 304, 1, 0, 0, 0, 168, 169, 5, 15, 0, 0, 169, 170, 5, 1, 0, 0, 170, 171, 3, 0, 0, 0, 171, 172, 5, 2, 0, 0, 172, 304, 1, 0, 0, 0, 173, 174, 5, 16, 0, 0, 174, 175, 5, 1, 0, 0, 175, 176, 3, 0, 0, 0, 176, 177, 5, 2, 0, 0, 177, 304, 1, 0, 0, 0, 178, 179, 5, 17, 0, 0, 179, 180, 5, 1, 0, 0, 180, 181, 3, 0, 0, 0, 181, 182, 5, 2, 0, 0, 182, 304, 1, 0, 0, 0, 183, 184, 5, 18, 0, 0, 184, 185, 5, 1, 0, 0, 185, 186, 3, 0, 0, 0, 186, 187, 5, 2, 0, 0, 187, 304, 1, 0, 0, 0, 188, 189, 5, 19, 0, 0, 189, 190, 5, 1, 0, 0, 190, 191, 3, 0, 0, 0, 191, 192, 5, 2, 0, 0, 192, 304, 1, 0, 0, 0, 193, 194, 5, 20, 0, 0, 194, 195, 5, 1, 0, 0, 195, 196, 3, 0, 0, 0, 196, 197, 5, 2, 0, 0, 197, 304, 1, 0, 0, 0, 198, 199, 5, 21, 0, 0, 199, 200, 5, 1, 0, 0, 200, 201, 3, 0, 0, 0, 201, 202, 5, 2, 0, 0, 202, 304, 1, 0, 0, 0, 203, 204, 5, 22, 0, 0, 204, 205, 5, 1, 0, 0, 205, 206, 3, 0, 0, 0, 206, 207, 5, 2, 0, 0, 207, 304, 1, 0, 0, 0, 208, 209, 5, 23, 0, 0, 209, 210, 5, 1, 0, 0, 210, 211, 3, 0, 0, 0, 211, 212, 5, 2, 0, 0, 212, 304, 1, 0, 0, 0, 213, 214, 5, 28, 0, 0, 214, 215, 5, 1, 0, 0, 215, 216, 3, 0, 0, 0, 216, 217, 5, 2, 0, 0, 217, 304, 1, 0, 0, 0, 218, 219, 5, 29, 0, 0, 219, 220, 5, 1, 0, 0, 220, 221, 3, 0, 0, 0, 221, 222, 5, 2, 0, 0, 222, 304, 1, 0, 0, 0, 223, 224, 5, 30, 0, 0, 224, 225, 5, 1, 0, 0, 225, 226, 3, 0, 0, 0, 226, 227, 5, 2, 0, 0, 227, 304, 1, 0, 0, 0, 228, 229, 5, 31, 0, 0, 229, 230, 5, 1, 0, 0, 230, 231, 3, 0, 0, 0, 231, 232, 5, 2, 0, 0, 232, 304, 1, 0, 0, 0, 233, 234, 5, 32, 0, 0, 234, 235, 5, 1, 0, 0, 235, 236, 3, 0, 0, 0, 236, 237, 5, 2, 0, 0, 237, 304, 1, 0, 0, 0, 238, 239, 5, 33, 0, 0, 239, 240, 5, 1, 0, 0, 240, 241, 3, 0, 0, 0, 241, 242, 5, 2, 0, 0, 242, 304, 1, 0, 0, 0, 243, 244, 5, 35, 0, 0, 244, 245, 5, 1, 0, 0, 245, 246, 3, 0, 0, 0, 246, 247, 5, 2, 0, 0, 247, 304, 1, 0, 0, 0, 248, 249, 5, 37, 0, 0, 249, 250, 5, 1, 0, 0, 250, 251, 3, 0, 0, 0, 251, 252, 5, 2, 0, 0, 252, 304, 1, 0, 0, 0, 253, 254, 5, 38, 0, 0, 254, 255, 5, 1, 0, 0, 255, 256, 3, 0, 0, 0, 256, 257, 5, 2, 0, 0, 257, 304, 1, 0, 0, 0, 258, 259, 5, 39, 0, 0, 259, 260, 5, 1, 0, 0, 260, 261, 3, 0, 0, 0, 261, 262, 5, 2, 0, 0, 262, 304, 1, 0, 0, 0, 263, 264, 5, 40, 0, 0, 264, 265, 5, 1, 0, 0, 265, 266, 3, 0, 0, 0, 266, 267, 5, 2, 0, 0, 267, 304, 1, 0, 0, 0, 268, 269, 5, 46, 0, 0, 269, 270, 5, 1, 0, 0, 270, 271, 3, 0, 0, 0, 271, 272, 5, 2, 0, 0, 272, 304, 1, 0, 0, 0, 273, 274, 5, 47, 0, 0, 274, 275, 5, 1, 0, 0, 275, 276, 3, 0, 0, 0, 276, 277, 5, 2, 0, 0, 277, 304, 1, 0, 0, 0, 278, 279, 5, 48, 0, 0, 279, 280, 5, 1, 0, 0, 280, 281, 3, 0, 0, 0, 281, 282, 5, 2, 0, 0, 282, 304, 1, 0, 0, 0, 283, 284, 5, 49, 0, 0, 284, 285, 5, 1, 0, 0, 285, 286, 3, 0, 0, 0, 286, 287, 5, 2, 0, 0, 287, 304, 1, 0, 0, 0, 288, 289, 5, 50, 0, 0, 289, 290, 5, 1, 0, 0, 290, 291, 3, 0, 0, 0, 291, 292, 5, 2, 0, 0, 292, 304, 1, 0, 0, 0, 293, 294, 5, 41, 0, 0, 294, 295, 5, 1, 0, 0, 295, 296, 3, 0, 0, 0, 296, 297, 5, 2, 0, 0, 297, 304, 1, 0, 0, 0, 298, 299, 5, 42, 0, 0, 299, 300, 5, 1, 0, 0, 300, 301, 3, 0, 0, 0, 301, 302, 5, 2, 0, 0, 302, 304, 1, 0, 0, 0, 303, 128, 1, 0, 0, 0, 303, 133, 1, 0, 0, 0, 303, 138, 1, 0, 0, 0, 303, 143, 1, 0, 0, 0, 303, 148, 1, 0, 0, 0, 303, 153, 1, 0, 0, 0, 303, 158, 1, 0, 0, 0, 303, 163, 1, 0, 0, 0, 303, 168, 1, 0, 0, 0, 303, 173, 1, 0, 0, 0, 303, 178, 1, 0, 0, 0, 303, 183, 1, 0, 0, 0, 303, 188, 1, 0, 0, 0, 303, 193, 1, 0, 0, 0, 303, 198, 1, 0, 0, 0, 303, 203, 1, 0, 0, 0, 303, 208, 1, 0, 0, 0, 303, 213, 1, 0, 0, 0, 303, 218, 1, 0, 0, 0, 303, 223, 1, 0, 0, 0, 303, 228, 1, 0, 0, 0, 303, 233, 1, 0, 0, 0, 303, 238, 1, 0, 0, 0, 303, 243, 1, 0, 0, 0, 303, 248, 1, 0, 0, 0, 303, 253, 1, 0, 0, 0, 303, 258, 1, 0, 0, 0, 303, 263, 1, 0, 0, 0, 303, 268, 1, 0, 0, 0, 303, 273, 1, 0, 0, 0, 303, 278, 1, 0, 0, 0, 303, 283, 1, 0, 0, 0, 303, 288, 1, 0, 0, 0, 303, 293, 1, 0, 0, 0, 303, 298, 1, 0, 0, 0, 304, 15, 1, 0, 0, 0, 305, 306, 5, 34, 0, 0, 306, 307, 5, 1, 0, 0, 307, 308, 3, 0, 0, 0, 308, 309, 5, 4, 0, 0, 309, 310, 3, 0, 0, 0, 310, 311, 5, 2, 0, 0, 311, 341, 1, 0, 0, 0, 312, 313, 5, 12, 0, 0, 313, 314, 5, 1, 0, 0, 314, 315, 3, 0, 0, 0, 315, 316, 5, 4, 0, 0, 316, 317, 3, 0, 0, 0, 317, 318, 5, 2, 0, 0, 318, 341, 1, 0, 0, 0, 319, 320, 5, 26, 0, 0, 320, 321, 5, 1, 0, 0, 321, 322, 3, 0, 0, 0, 322, 323, 5, 4, 0, 0, 323, 324, 3, 0, 0, 0, 324, 325, 5, 2, 0, 0, 325, 341, 1, 0, 0, 0, 326, 327, 5, 27, 0, 0, 327, 328, 5, 1, 0, 0, 328, 329, 3, 0, 0, 0, 329, 330, 5, 4, 0, 0, 330, 331, 3, 0, 0, 0, 331, 332, 5, 2, 0, 0, 332, 341, 1, 0, 0, 0, 333, 334, 5, 44, 0, 0, 334, 335, 5, 1, 0, 0, 335, 336, 3, 0, 0, 0, 336, 337, 5, 4, 0, 0, 337, 338, 3, 0, 0, 0, 338, 339, 5, 2, 0, 0, 339, 341, 1, 0, 0, 0, 340, 305, 1, 0, 0, 0, 340, 312, 1, 0, 0, 0, 340, 319, 1, 0, 0, 0, 340, 326, 1, 0, 0, 0, 340, 333, 1, 0, 0, 0, 341, 17, 1, 0, 0, 0, 342, 343, 5, 36, 0, 0, 343, 344, 5, 1, 0, 0, 344, 345, 3, 0, 0, 0, 345, 346, 5, 4, 0, 0, 346, 347, 3, 0, 0, 0, 347, 348, 5, 4, 0, 0, 348, 349, 3, 0, 0, 0, 349, 350, 5, 2, 0, 0, 350, 379, 1, 0, 0, 0, 351, 352, 5, 43, 0, 0, 352, 353, 5, 1, 0, 0, 353, 354, 3, 0, 0, 0, 354, 355, 5, 4, 0, 0, 355, 356, 3, 0, 0, 0, 356, 357, 5, 4, 0, 0, 357, 358, 3, 0, 0, 0, 358, 359, 5, 2, 0, 0, 359, 379, 1, 0, 0, 0, 360, 361, 5, 45, 0, 0, 361, 362, 5, 1, 0, 0, 362, 363, 3, 0, 0, 0, 363, 364, 5, 4, 0, 0, 364, 365, 3, 0, 0, 0, 365, 366, 5, 4, 0, 0, 366, 367, 3, 0, 0, 0, 367, 368, 5, 2, 0, 0, 368, 379, 1, 0, 0, 0, 369, 370, 5, 56, 0, 0, 370, 371, 5, 1, 0, 0, 371, 372, 3, 0, 0, 0, 372, 373, 5, 4, 0, 0, 373, 374, 3, 0, 0, 0, 374, 375, 5, 4, 0, 0, 375, 376, 3, 0, 0, 0, 376, 377, 5, 2, 0, 0, 377, 379, 1, 0, 0, 0, 378, 342, 1, 0, 0, 0, 378, 351, 1, 0, 0, 0, 378, 360, 1, 0, 0, 0, 378, 369, 1, 0, 0, 0, 379, 19, 1, 0, 0, 0, 380, 381, 5, 53, 0, 0, 381, 382, 5, 1, 0, 0, 382, 383, 3, 0, 0, 0, 383, 384, 5, 4, 0, 0, 384, 385, 3, 0, 0, 0, 385, 386, 5, 4, 0, 0, 386, 387, 3, 0, 0, 0, 387, 388, 5, 4, 0, 0, 388, 389, 3, 0, 0, 0, 389, 390, 5, 2, 0, 0, 390, 21, 1, 0, 0, 0, 391, 392, 5, 24, 0, 0, 392, 393, 5, 1, 0, 0, 393, 398, 3, 0, 0, 0, 394, 395, 5, 4, 0, 0, 395, 397, 3, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 400, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 398, 399, 1, 0, 0, 0, 399, 401, 1, 0, 0, 0, 400, 398, 1, 0, 0, 0, 401, 402, 5, 2, 0, 0, 402, 452, 1, 0, 0, 0, 403, 404, 5, 25, 0, 0, 404, 405, 5, 1, 0, 0, 405, 410, 3, 0, 0, 0, 406, 407, 5, 4, 0, 0, 407, 409, 3, 0, 0, 0, 408, 406, 1, 0, 0, 0, 409, 412, 1, 0, 0, 0, 410, 408, 1, 0, 0, 0, 410, 411, 1, 0, 0, 0, 411, 413, 1, 0, 0, 0, 412, 410, 1, 0, 0, 0, 413, 414, 5, 2, 0, 0, 414, 452, 1, 0, 0, 0, 415, 416, 5, 51, 0, 0, 416, 417, 5, 1, 0, 0, 417, 420, 3, 0, 0, 0, 418, 419, 5, 4, 0, 0, 419, 421, 3, 0, 0, 0, 420, 418, 1, 0, 0, 0, 421, 422, 1, 0, 0, 0, 422, 420, 1, 0, 0, 0, 422, 423, 1, 0, 0, 0, 423, 424, 1, 0, 0, 0, 424, 425, 5, 2, 0, 0, 425, 452, 1, 0, 0, 0, 426, 427, 5, 52, 0, 0, 427, 428, 5, 1, 0, 0, 428, 431, 3, 0, 0, 0, 429, 430, 5, 4, 0, 0, 430, 432, 3, 0, 0, 0, 431, 429, 1, 0, 0, 0, 432, 433, 1, 0, 0, 0, 433, 431, 1, 0, 0, 0, 433, 434, 1, 0, 0, 0, 434, 435, 1, 0, 0, 0, 435, 436, 5, 2, 0, 0, 436, 452, 1, 0, 0, 0, 437, 438, 5, 54, 0, 0, 438, 439, 5, 1, 0, 0, 439, 440, 3, 0, 0, 0, 440, 441, 5, 4, 0, 0, 441, 442, 3, 0, 0, 0, 442, 443, 5, 2, 0, 0, 443, 452, 1, 0, 0, 0, 444, 445, 5, 55, 0, 0, 445, 446, 5, 1, 0, 0, 446, 447, 3, 0, 0, 0, 447, 448, 5, 4, 0, 0, 448, 449, 3, 0, 0, 0, 449, 450, 5, 2, 0, 0, 450, 452, 1, 0, 0, 0, 451, 391, 1, 0, 0, 0, 451, 403, 1, 0, 0, 0, 451, 415, 1, 0, 0, 0, 451, 426, 1, 0, 0, 0, 451, 437, 1, 0, 0, 0, 451, 444, 1, 0, 0, 0, 452, 23, 1, 0, 0, 0, 19, 26, 49, 51, 63, 65, 80, 82, 90, 97, 121, 126, 303, 340, 378, 398, 410, 422, 433, 451] \ No newline at end of file +[4, 1, 76, 473, 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, 1, 6, 1, 6, 1, 6, 1, 6, 5, 6, 120, 8, 6, 10, 6, 12, 6, 123, 9, 6, 1, 6, 1, 6, 3, 6, 127, 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, 1, 7, 1, 7, 1, 7, 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, 309, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 360, 8, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 398, 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, 5, 11, 416, 8, 11, 10, 11, 12, 11, 419, 9, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 5, 11, 428, 8, 11, 10, 11, 12, 11, 431, 9, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 4, 11, 440, 8, 11, 11, 11, 12, 11, 441, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 4, 11, 451, 8, 11, 11, 11, 12, 11, 452, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 3, 11, 471, 8, 11, 1, 11, 0, 3, 2, 4, 6, 12, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 0, 0, 539, 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, 126, 1, 0, 0, 0, 14, 308, 1, 0, 0, 0, 16, 359, 1, 0, 0, 0, 18, 397, 1, 0, 0, 0, 20, 399, 1, 0, 0, 0, 22, 470, 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, 67, 0, 0, 33, 50, 3, 4, 2, 0, 34, 35, 10, 6, 0, 0, 35, 36, 5, 66, 0, 0, 36, 50, 3, 4, 2, 0, 37, 38, 10, 5, 0, 0, 38, 39, 5, 69, 0, 0, 39, 50, 3, 4, 2, 0, 40, 41, 10, 4, 0, 0, 41, 42, 5, 68, 0, 0, 42, 50, 3, 4, 2, 0, 43, 44, 10, 3, 0, 0, 44, 45, 5, 70, 0, 0, 45, 50, 3, 4, 2, 0, 46, 47, 10, 2, 0, 0, 47, 48, 5, 71, 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, 60, 0, 0, 59, 64, 3, 6, 3, 0, 60, 61, 10, 2, 0, 0, 61, 62, 5, 61, 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, 62, 0, 0, 73, 81, 3, 8, 4, 0, 74, 75, 10, 3, 0, 0, 75, 76, 5, 63, 0, 0, 76, 81, 3, 8, 4, 0, 77, 78, 10, 2, 0, 0, 78, 79, 5, 64, 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, 65, 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, 60, 0, 0, 93, 98, 3, 10, 5, 0, 94, 95, 5, 61, 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, 127, 3, 14, 7, 0, 100, 127, 3, 16, 8, 0, 101, 127, 3, 18, 9, 0, 102, 127, 3, 20, 10, 0, 103, 127, 3, 22, 11, 0, 104, 127, 5, 75, 0, 0, 105, 127, 5, 74, 0, 0, 106, 127, 5, 73, 0, 0, 107, 108, 5, 1, 0, 0, 108, 109, 3, 0, 0, 0, 109, 110, 5, 2, 0, 0, 110, 127, 1, 0, 0, 0, 111, 112, 5, 72, 0, 0, 112, 113, 3, 0, 0, 0, 113, 114, 5, 72, 0, 0, 114, 127, 1, 0, 0, 0, 115, 116, 5, 3, 0, 0, 116, 121, 3, 0, 0, 0, 117, 118, 5, 4, 0, 0, 118, 120, 3, 0, 0, 0, 119, 117, 1, 0, 0, 0, 120, 123, 1, 0, 0, 0, 121, 119, 1, 0, 0, 0, 121, 122, 1, 0, 0, 0, 122, 124, 1, 0, 0, 0, 123, 121, 1, 0, 0, 0, 124, 125, 5, 5, 0, 0, 125, 127, 1, 0, 0, 0, 126, 99, 1, 0, 0, 0, 126, 100, 1, 0, 0, 0, 126, 101, 1, 0, 0, 0, 126, 102, 1, 0, 0, 0, 126, 103, 1, 0, 0, 0, 126, 104, 1, 0, 0, 0, 126, 105, 1, 0, 0, 0, 126, 106, 1, 0, 0, 0, 126, 107, 1, 0, 0, 0, 126, 111, 1, 0, 0, 0, 126, 115, 1, 0, 0, 0, 127, 13, 1, 0, 0, 0, 128, 129, 5, 6, 0, 0, 129, 130, 5, 1, 0, 0, 130, 131, 3, 0, 0, 0, 131, 132, 5, 2, 0, 0, 132, 309, 1, 0, 0, 0, 133, 134, 5, 7, 0, 0, 134, 135, 5, 1, 0, 0, 135, 136, 3, 0, 0, 0, 136, 137, 5, 2, 0, 0, 137, 309, 1, 0, 0, 0, 138, 139, 5, 8, 0, 0, 139, 140, 5, 1, 0, 0, 140, 141, 3, 0, 0, 0, 141, 142, 5, 2, 0, 0, 142, 309, 1, 0, 0, 0, 143, 144, 5, 9, 0, 0, 144, 145, 5, 1, 0, 0, 145, 146, 3, 0, 0, 0, 146, 147, 5, 2, 0, 0, 147, 309, 1, 0, 0, 0, 148, 149, 5, 10, 0, 0, 149, 150, 5, 1, 0, 0, 150, 151, 3, 0, 0, 0, 151, 152, 5, 2, 0, 0, 152, 309, 1, 0, 0, 0, 153, 154, 5, 11, 0, 0, 154, 155, 5, 1, 0, 0, 155, 156, 3, 0, 0, 0, 156, 157, 5, 2, 0, 0, 157, 309, 1, 0, 0, 0, 158, 159, 5, 13, 0, 0, 159, 160, 5, 1, 0, 0, 160, 161, 3, 0, 0, 0, 161, 162, 5, 2, 0, 0, 162, 309, 1, 0, 0, 0, 163, 164, 5, 14, 0, 0, 164, 165, 5, 1, 0, 0, 165, 166, 3, 0, 0, 0, 166, 167, 5, 2, 0, 0, 167, 309, 1, 0, 0, 0, 168, 169, 5, 15, 0, 0, 169, 170, 5, 1, 0, 0, 170, 171, 3, 0, 0, 0, 171, 172, 5, 2, 0, 0, 172, 309, 1, 0, 0, 0, 173, 174, 5, 16, 0, 0, 174, 175, 5, 1, 0, 0, 175, 176, 3, 0, 0, 0, 176, 177, 5, 2, 0, 0, 177, 309, 1, 0, 0, 0, 178, 179, 5, 17, 0, 0, 179, 180, 5, 1, 0, 0, 180, 181, 3, 0, 0, 0, 181, 182, 5, 2, 0, 0, 182, 309, 1, 0, 0, 0, 183, 184, 5, 18, 0, 0, 184, 185, 5, 1, 0, 0, 185, 186, 3, 0, 0, 0, 186, 187, 5, 2, 0, 0, 187, 309, 1, 0, 0, 0, 188, 189, 5, 19, 0, 0, 189, 190, 5, 1, 0, 0, 190, 191, 3, 0, 0, 0, 191, 192, 5, 2, 0, 0, 192, 309, 1, 0, 0, 0, 193, 194, 5, 20, 0, 0, 194, 195, 5, 1, 0, 0, 195, 196, 3, 0, 0, 0, 196, 197, 5, 2, 0, 0, 197, 309, 1, 0, 0, 0, 198, 199, 5, 21, 0, 0, 199, 200, 5, 1, 0, 0, 200, 201, 3, 0, 0, 0, 201, 202, 5, 2, 0, 0, 202, 309, 1, 0, 0, 0, 203, 204, 5, 22, 0, 0, 204, 205, 5, 1, 0, 0, 205, 206, 3, 0, 0, 0, 206, 207, 5, 2, 0, 0, 207, 309, 1, 0, 0, 0, 208, 209, 5, 23, 0, 0, 209, 210, 5, 1, 0, 0, 210, 211, 3, 0, 0, 0, 211, 212, 5, 2, 0, 0, 212, 309, 1, 0, 0, 0, 213, 214, 5, 28, 0, 0, 214, 215, 5, 1, 0, 0, 215, 216, 3, 0, 0, 0, 216, 217, 5, 2, 0, 0, 217, 309, 1, 0, 0, 0, 218, 219, 5, 29, 0, 0, 219, 220, 5, 1, 0, 0, 220, 221, 3, 0, 0, 0, 221, 222, 5, 2, 0, 0, 222, 309, 1, 0, 0, 0, 223, 224, 5, 30, 0, 0, 224, 225, 5, 1, 0, 0, 225, 226, 3, 0, 0, 0, 226, 227, 5, 2, 0, 0, 227, 309, 1, 0, 0, 0, 228, 229, 5, 31, 0, 0, 229, 230, 5, 1, 0, 0, 230, 231, 3, 0, 0, 0, 231, 232, 5, 2, 0, 0, 232, 309, 1, 0, 0, 0, 233, 234, 5, 32, 0, 0, 234, 235, 5, 1, 0, 0, 235, 236, 3, 0, 0, 0, 236, 237, 5, 2, 0, 0, 237, 309, 1, 0, 0, 0, 238, 239, 5, 33, 0, 0, 239, 240, 5, 1, 0, 0, 240, 241, 3, 0, 0, 0, 241, 242, 5, 2, 0, 0, 242, 309, 1, 0, 0, 0, 243, 244, 5, 35, 0, 0, 244, 245, 5, 1, 0, 0, 245, 246, 3, 0, 0, 0, 246, 247, 5, 2, 0, 0, 247, 309, 1, 0, 0, 0, 248, 249, 5, 37, 0, 0, 249, 250, 5, 1, 0, 0, 250, 251, 3, 0, 0, 0, 251, 252, 5, 2, 0, 0, 252, 309, 1, 0, 0, 0, 253, 254, 5, 38, 0, 0, 254, 255, 5, 1, 0, 0, 255, 256, 3, 0, 0, 0, 256, 257, 5, 2, 0, 0, 257, 309, 1, 0, 0, 0, 258, 259, 5, 39, 0, 0, 259, 260, 5, 1, 0, 0, 260, 261, 3, 0, 0, 0, 261, 262, 5, 2, 0, 0, 262, 309, 1, 0, 0, 0, 263, 264, 5, 40, 0, 0, 264, 265, 5, 1, 0, 0, 265, 266, 3, 0, 0, 0, 266, 267, 5, 2, 0, 0, 267, 309, 1, 0, 0, 0, 268, 269, 5, 46, 0, 0, 269, 270, 5, 1, 0, 0, 270, 271, 3, 0, 0, 0, 271, 272, 5, 2, 0, 0, 272, 309, 1, 0, 0, 0, 273, 274, 5, 47, 0, 0, 274, 275, 5, 1, 0, 0, 275, 276, 3, 0, 0, 0, 276, 277, 5, 2, 0, 0, 277, 309, 1, 0, 0, 0, 278, 279, 5, 48, 0, 0, 279, 280, 5, 1, 0, 0, 280, 281, 3, 0, 0, 0, 281, 282, 5, 2, 0, 0, 282, 309, 1, 0, 0, 0, 283, 284, 5, 49, 0, 0, 284, 285, 5, 1, 0, 0, 285, 286, 3, 0, 0, 0, 286, 287, 5, 2, 0, 0, 287, 309, 1, 0, 0, 0, 288, 289, 5, 50, 0, 0, 289, 290, 5, 1, 0, 0, 290, 291, 3, 0, 0, 0, 291, 292, 5, 2, 0, 0, 292, 309, 1, 0, 0, 0, 293, 294, 5, 41, 0, 0, 294, 295, 5, 1, 0, 0, 295, 296, 3, 0, 0, 0, 296, 297, 5, 2, 0, 0, 297, 309, 1, 0, 0, 0, 298, 299, 5, 42, 0, 0, 299, 300, 5, 1, 0, 0, 300, 301, 3, 0, 0, 0, 301, 302, 5, 2, 0, 0, 302, 309, 1, 0, 0, 0, 303, 304, 5, 59, 0, 0, 304, 305, 5, 1, 0, 0, 305, 306, 3, 0, 0, 0, 306, 307, 5, 2, 0, 0, 307, 309, 1, 0, 0, 0, 308, 128, 1, 0, 0, 0, 308, 133, 1, 0, 0, 0, 308, 138, 1, 0, 0, 0, 308, 143, 1, 0, 0, 0, 308, 148, 1, 0, 0, 0, 308, 153, 1, 0, 0, 0, 308, 158, 1, 0, 0, 0, 308, 163, 1, 0, 0, 0, 308, 168, 1, 0, 0, 0, 308, 173, 1, 0, 0, 0, 308, 178, 1, 0, 0, 0, 308, 183, 1, 0, 0, 0, 308, 188, 1, 0, 0, 0, 308, 193, 1, 0, 0, 0, 308, 198, 1, 0, 0, 0, 308, 203, 1, 0, 0, 0, 308, 208, 1, 0, 0, 0, 308, 213, 1, 0, 0, 0, 308, 218, 1, 0, 0, 0, 308, 223, 1, 0, 0, 0, 308, 228, 1, 0, 0, 0, 308, 233, 1, 0, 0, 0, 308, 238, 1, 0, 0, 0, 308, 243, 1, 0, 0, 0, 308, 248, 1, 0, 0, 0, 308, 253, 1, 0, 0, 0, 308, 258, 1, 0, 0, 0, 308, 263, 1, 0, 0, 0, 308, 268, 1, 0, 0, 0, 308, 273, 1, 0, 0, 0, 308, 278, 1, 0, 0, 0, 308, 283, 1, 0, 0, 0, 308, 288, 1, 0, 0, 0, 308, 293, 1, 0, 0, 0, 308, 298, 1, 0, 0, 0, 308, 303, 1, 0, 0, 0, 309, 15, 1, 0, 0, 0, 310, 311, 5, 34, 0, 0, 311, 312, 5, 1, 0, 0, 312, 313, 3, 0, 0, 0, 313, 314, 5, 4, 0, 0, 314, 315, 3, 0, 0, 0, 315, 316, 5, 2, 0, 0, 316, 360, 1, 0, 0, 0, 317, 318, 5, 12, 0, 0, 318, 319, 5, 1, 0, 0, 319, 320, 3, 0, 0, 0, 320, 321, 5, 4, 0, 0, 321, 322, 3, 0, 0, 0, 322, 323, 5, 2, 0, 0, 323, 360, 1, 0, 0, 0, 324, 325, 5, 26, 0, 0, 325, 326, 5, 1, 0, 0, 326, 327, 3, 0, 0, 0, 327, 328, 5, 4, 0, 0, 328, 329, 3, 0, 0, 0, 329, 330, 5, 2, 0, 0, 330, 360, 1, 0, 0, 0, 331, 332, 5, 27, 0, 0, 332, 333, 5, 1, 0, 0, 333, 334, 3, 0, 0, 0, 334, 335, 5, 4, 0, 0, 335, 336, 3, 0, 0, 0, 336, 337, 5, 2, 0, 0, 337, 360, 1, 0, 0, 0, 338, 339, 5, 44, 0, 0, 339, 340, 5, 1, 0, 0, 340, 341, 3, 0, 0, 0, 341, 342, 5, 4, 0, 0, 342, 343, 3, 0, 0, 0, 343, 344, 5, 2, 0, 0, 344, 360, 1, 0, 0, 0, 345, 346, 5, 57, 0, 0, 346, 347, 5, 1, 0, 0, 347, 348, 3, 0, 0, 0, 348, 349, 5, 4, 0, 0, 349, 350, 3, 0, 0, 0, 350, 351, 5, 2, 0, 0, 351, 360, 1, 0, 0, 0, 352, 353, 5, 58, 0, 0, 353, 354, 5, 1, 0, 0, 354, 355, 3, 0, 0, 0, 355, 356, 5, 4, 0, 0, 356, 357, 3, 0, 0, 0, 357, 358, 5, 2, 0, 0, 358, 360, 1, 0, 0, 0, 359, 310, 1, 0, 0, 0, 359, 317, 1, 0, 0, 0, 359, 324, 1, 0, 0, 0, 359, 331, 1, 0, 0, 0, 359, 338, 1, 0, 0, 0, 359, 345, 1, 0, 0, 0, 359, 352, 1, 0, 0, 0, 360, 17, 1, 0, 0, 0, 361, 362, 5, 36, 0, 0, 362, 363, 5, 1, 0, 0, 363, 364, 3, 0, 0, 0, 364, 365, 5, 4, 0, 0, 365, 366, 3, 0, 0, 0, 366, 367, 5, 4, 0, 0, 367, 368, 3, 0, 0, 0, 368, 369, 5, 2, 0, 0, 369, 398, 1, 0, 0, 0, 370, 371, 5, 43, 0, 0, 371, 372, 5, 1, 0, 0, 372, 373, 3, 0, 0, 0, 373, 374, 5, 4, 0, 0, 374, 375, 3, 0, 0, 0, 375, 376, 5, 4, 0, 0, 376, 377, 3, 0, 0, 0, 377, 378, 5, 2, 0, 0, 378, 398, 1, 0, 0, 0, 379, 380, 5, 45, 0, 0, 380, 381, 5, 1, 0, 0, 381, 382, 3, 0, 0, 0, 382, 383, 5, 4, 0, 0, 383, 384, 3, 0, 0, 0, 384, 385, 5, 4, 0, 0, 385, 386, 3, 0, 0, 0, 386, 387, 5, 2, 0, 0, 387, 398, 1, 0, 0, 0, 388, 389, 5, 56, 0, 0, 389, 390, 5, 1, 0, 0, 390, 391, 3, 0, 0, 0, 391, 392, 5, 4, 0, 0, 392, 393, 3, 0, 0, 0, 393, 394, 5, 4, 0, 0, 394, 395, 3, 0, 0, 0, 395, 396, 5, 2, 0, 0, 396, 398, 1, 0, 0, 0, 397, 361, 1, 0, 0, 0, 397, 370, 1, 0, 0, 0, 397, 379, 1, 0, 0, 0, 397, 388, 1, 0, 0, 0, 398, 19, 1, 0, 0, 0, 399, 400, 5, 53, 0, 0, 400, 401, 5, 1, 0, 0, 401, 402, 3, 0, 0, 0, 402, 403, 5, 4, 0, 0, 403, 404, 3, 0, 0, 0, 404, 405, 5, 4, 0, 0, 405, 406, 3, 0, 0, 0, 406, 407, 5, 4, 0, 0, 407, 408, 3, 0, 0, 0, 408, 409, 5, 2, 0, 0, 409, 21, 1, 0, 0, 0, 410, 411, 5, 24, 0, 0, 411, 412, 5, 1, 0, 0, 412, 417, 3, 0, 0, 0, 413, 414, 5, 4, 0, 0, 414, 416, 3, 0, 0, 0, 415, 413, 1, 0, 0, 0, 416, 419, 1, 0, 0, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 420, 1, 0, 0, 0, 419, 417, 1, 0, 0, 0, 420, 421, 5, 2, 0, 0, 421, 471, 1, 0, 0, 0, 422, 423, 5, 25, 0, 0, 423, 424, 5, 1, 0, 0, 424, 429, 3, 0, 0, 0, 425, 426, 5, 4, 0, 0, 426, 428, 3, 0, 0, 0, 427, 425, 1, 0, 0, 0, 428, 431, 1, 0, 0, 0, 429, 427, 1, 0, 0, 0, 429, 430, 1, 0, 0, 0, 430, 432, 1, 0, 0, 0, 431, 429, 1, 0, 0, 0, 432, 433, 5, 2, 0, 0, 433, 471, 1, 0, 0, 0, 434, 435, 5, 51, 0, 0, 435, 436, 5, 1, 0, 0, 436, 439, 3, 0, 0, 0, 437, 438, 5, 4, 0, 0, 438, 440, 3, 0, 0, 0, 439, 437, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 444, 5, 2, 0, 0, 444, 471, 1, 0, 0, 0, 445, 446, 5, 52, 0, 0, 446, 447, 5, 1, 0, 0, 447, 450, 3, 0, 0, 0, 448, 449, 5, 4, 0, 0, 449, 451, 3, 0, 0, 0, 450, 448, 1, 0, 0, 0, 451, 452, 1, 0, 0, 0, 452, 450, 1, 0, 0, 0, 452, 453, 1, 0, 0, 0, 453, 454, 1, 0, 0, 0, 454, 455, 5, 2, 0, 0, 455, 471, 1, 0, 0, 0, 456, 457, 5, 54, 0, 0, 457, 458, 5, 1, 0, 0, 458, 459, 3, 0, 0, 0, 459, 460, 5, 4, 0, 0, 460, 461, 3, 0, 0, 0, 461, 462, 5, 2, 0, 0, 462, 471, 1, 0, 0, 0, 463, 464, 5, 55, 0, 0, 464, 465, 5, 1, 0, 0, 465, 466, 3, 0, 0, 0, 466, 467, 5, 4, 0, 0, 467, 468, 3, 0, 0, 0, 468, 469, 5, 2, 0, 0, 469, 471, 1, 0, 0, 0, 470, 410, 1, 0, 0, 0, 470, 422, 1, 0, 0, 0, 470, 434, 1, 0, 0, 0, 470, 445, 1, 0, 0, 0, 470, 456, 1, 0, 0, 0, 470, 463, 1, 0, 0, 0, 471, 23, 1, 0, 0, 0, 19, 26, 49, 51, 63, 65, 80, 82, 90, 97, 121, 126, 308, 359, 397, 417, 429, 441, 452, 470] \ No newline at end of file diff --git a/more_math/Parser/MathExpr.tokens b/more_math/Parser/MathExpr.tokens index e694236..254b000 100644 --- a/more_math/Parser/MathExpr.tokens +++ b/more_math/Parser/MathExpr.tokens @@ -54,23 +54,26 @@ SWAP=53 PERM=54 RESHAPE=55 RANGE=56 -PLUS=57 -MINUS=58 -MULT=59 -DIV=60 -MOD=61 -POW=62 -GE=63 -GT=64 -LE=65 -LT=66 -EQ=67 -NE=68 -PIPE=69 -CONSTANT=70 -NUMBER=71 -VARIABLE=72 -WS=73 +TOPK=57 +BOTK=58 +PINV=59 +PLUS=60 +MINUS=61 +MULT=62 +DIV=63 +MOD=64 +POW=65 +GE=66 +GT=67 +LE=68 +LT=69 +EQ=70 +NE=71 +PIPE=72 +CONSTANT=73 +NUMBER=74 +VARIABLE=75 +WS=76 '('=1 ')'=2 '['=3 @@ -127,16 +130,19 @@ WS=73 'permute'=54 'reshape'=55 'range'=56 -'+'=57 -'-'=58 -'*'=59 -'/'=60 -'%'=61 -'^'=62 -'>='=63 -'>'=64 -'<='=65 -'<'=66 -'=='=67 -'!='=68 -'|'=69 +'topk'=57 +'botk'=58 +'pinv'=59 +'+'=60 +'-'=61 +'*'=62 +'/'=63 +'%'=64 +'^'=65 +'>='=66 +'>'=67 +'<='=68 +'<'=69 +'=='=70 +'!='=71 +'|'=72 diff --git a/more_math/Parser/MathExprLexer.interp b/more_math/Parser/MathExprLexer.interp index ef7460c..bcec512 100644 --- a/more_math/Parser/MathExprLexer.interp +++ b/more_math/Parser/MathExprLexer.interp @@ -56,6 +56,9 @@ null 'permute' 'reshape' 'range' +'topk' +'botk' +'pinv' '+' '-' '*' @@ -132,6 +135,9 @@ SWAP PERM RESHAPE RANGE +TOPK +BOTK +PINV PLUS MINUS MULT @@ -207,6 +213,9 @@ SWAP PERM RESHAPE RANGE +TOPK +BOTK +PINV PLUS MINUS MULT @@ -233,4 +242,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 73, 502, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 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, 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, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 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, 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, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 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, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 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, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 57, 1, 57, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, 64, 1, 65, 1, 65, 1, 66, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 3, 69, 474, 8, 69, 1, 70, 4, 70, 477, 8, 70, 11, 70, 12, 70, 478, 1, 70, 1, 70, 4, 70, 483, 8, 70, 11, 70, 12, 70, 484, 3, 70, 487, 8, 70, 1, 71, 1, 71, 5, 71, 491, 8, 71, 10, 71, 12, 71, 494, 9, 71, 1, 72, 4, 72, 497, 8, 72, 11, 72, 12, 72, 498, 1, 72, 1, 72, 0, 0, 73, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 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, 508, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 1, 147, 1, 0, 0, 0, 3, 149, 1, 0, 0, 0, 5, 151, 1, 0, 0, 0, 7, 153, 1, 0, 0, 0, 9, 155, 1, 0, 0, 0, 11, 157, 1, 0, 0, 0, 13, 161, 1, 0, 0, 0, 15, 165, 1, 0, 0, 0, 17, 169, 1, 0, 0, 0, 19, 174, 1, 0, 0, 0, 21, 179, 1, 0, 0, 0, 23, 184, 1, 0, 0, 0, 25, 190, 1, 0, 0, 0, 27, 195, 1, 0, 0, 0, 29, 200, 1, 0, 0, 0, 31, 205, 1, 0, 0, 0, 33, 211, 1, 0, 0, 0, 35, 217, 1, 0, 0, 0, 37, 223, 1, 0, 0, 0, 39, 227, 1, 0, 0, 0, 41, 232, 1, 0, 0, 0, 43, 235, 1, 0, 0, 0, 45, 239, 1, 0, 0, 0, 47, 243, 1, 0, 0, 0, 49, 248, 1, 0, 0, 0, 51, 253, 1, 0, 0, 0, 53, 258, 1, 0, 0, 0, 55, 263, 1, 0, 0, 0, 57, 269, 1, 0, 0, 0, 59, 275, 1, 0, 0, 0, 61, 281, 1, 0, 0, 0, 63, 286, 1, 0, 0, 0, 65, 292, 1, 0, 0, 0, 67, 298, 1, 0, 0, 0, 69, 302, 1, 0, 0, 0, 71, 307, 1, 0, 0, 0, 73, 313, 1, 0, 0, 0, 75, 317, 1, 0, 0, 0, 77, 322, 1, 0, 0, 0, 79, 328, 1, 0, 0, 0, 81, 334, 1, 0, 0, 0, 83, 346, 1, 0, 0, 0, 85, 351, 1, 0, 0, 0, 87, 356, 1, 0, 0, 0, 89, 361, 1, 0, 0, 0, 91, 372, 1, 0, 0, 0, 93, 378, 1, 0, 0, 0, 95, 383, 1, 0, 0, 0, 97, 392, 1, 0, 0, 0, 99, 397, 1, 0, 0, 0, 101, 402, 1, 0, 0, 0, 103, 406, 1, 0, 0, 0, 105, 411, 1, 0, 0, 0, 107, 416, 1, 0, 0, 0, 109, 424, 1, 0, 0, 0, 111, 432, 1, 0, 0, 0, 113, 438, 1, 0, 0, 0, 115, 440, 1, 0, 0, 0, 117, 442, 1, 0, 0, 0, 119, 444, 1, 0, 0, 0, 121, 446, 1, 0, 0, 0, 123, 448, 1, 0, 0, 0, 125, 450, 1, 0, 0, 0, 127, 453, 1, 0, 0, 0, 129, 455, 1, 0, 0, 0, 131, 458, 1, 0, 0, 0, 133, 460, 1, 0, 0, 0, 135, 463, 1, 0, 0, 0, 137, 466, 1, 0, 0, 0, 139, 473, 1, 0, 0, 0, 141, 476, 1, 0, 0, 0, 143, 488, 1, 0, 0, 0, 145, 496, 1, 0, 0, 0, 147, 148, 5, 40, 0, 0, 148, 2, 1, 0, 0, 0, 149, 150, 5, 41, 0, 0, 150, 4, 1, 0, 0, 0, 151, 152, 5, 91, 0, 0, 152, 6, 1, 0, 0, 0, 153, 154, 5, 44, 0, 0, 154, 8, 1, 0, 0, 0, 155, 156, 5, 93, 0, 0, 156, 10, 1, 0, 0, 0, 157, 158, 5, 115, 0, 0, 158, 159, 5, 105, 0, 0, 159, 160, 5, 110, 0, 0, 160, 12, 1, 0, 0, 0, 161, 162, 5, 99, 0, 0, 162, 163, 5, 111, 0, 0, 163, 164, 5, 115, 0, 0, 164, 14, 1, 0, 0, 0, 165, 166, 5, 116, 0, 0, 166, 167, 5, 97, 0, 0, 167, 168, 5, 110, 0, 0, 168, 16, 1, 0, 0, 0, 169, 170, 5, 97, 0, 0, 170, 171, 5, 115, 0, 0, 171, 172, 5, 105, 0, 0, 172, 173, 5, 110, 0, 0, 173, 18, 1, 0, 0, 0, 174, 175, 5, 97, 0, 0, 175, 176, 5, 99, 0, 0, 176, 177, 5, 111, 0, 0, 177, 178, 5, 115, 0, 0, 178, 20, 1, 0, 0, 0, 179, 180, 5, 97, 0, 0, 180, 181, 5, 116, 0, 0, 181, 182, 5, 97, 0, 0, 182, 183, 5, 110, 0, 0, 183, 22, 1, 0, 0, 0, 184, 185, 5, 97, 0, 0, 185, 186, 5, 116, 0, 0, 186, 187, 5, 97, 0, 0, 187, 188, 5, 110, 0, 0, 188, 189, 5, 50, 0, 0, 189, 24, 1, 0, 0, 0, 190, 191, 5, 115, 0, 0, 191, 192, 5, 105, 0, 0, 192, 193, 5, 110, 0, 0, 193, 194, 5, 104, 0, 0, 194, 26, 1, 0, 0, 0, 195, 196, 5, 99, 0, 0, 196, 197, 5, 111, 0, 0, 197, 198, 5, 115, 0, 0, 198, 199, 5, 104, 0, 0, 199, 28, 1, 0, 0, 0, 200, 201, 5, 116, 0, 0, 201, 202, 5, 97, 0, 0, 202, 203, 5, 110, 0, 0, 203, 204, 5, 104, 0, 0, 204, 30, 1, 0, 0, 0, 205, 206, 5, 97, 0, 0, 206, 207, 5, 115, 0, 0, 207, 208, 5, 105, 0, 0, 208, 209, 5, 110, 0, 0, 209, 210, 5, 104, 0, 0, 210, 32, 1, 0, 0, 0, 211, 212, 5, 97, 0, 0, 212, 213, 5, 99, 0, 0, 213, 214, 5, 111, 0, 0, 214, 215, 5, 115, 0, 0, 215, 216, 5, 104, 0, 0, 216, 34, 1, 0, 0, 0, 217, 218, 5, 97, 0, 0, 218, 219, 5, 116, 0, 0, 219, 220, 5, 97, 0, 0, 220, 221, 5, 110, 0, 0, 221, 222, 5, 104, 0, 0, 222, 36, 1, 0, 0, 0, 223, 224, 5, 97, 0, 0, 224, 225, 5, 98, 0, 0, 225, 226, 5, 115, 0, 0, 226, 38, 1, 0, 0, 0, 227, 228, 5, 115, 0, 0, 228, 229, 5, 113, 0, 0, 229, 230, 5, 114, 0, 0, 230, 231, 5, 116, 0, 0, 231, 40, 1, 0, 0, 0, 232, 233, 5, 108, 0, 0, 233, 234, 5, 110, 0, 0, 234, 42, 1, 0, 0, 0, 235, 236, 5, 108, 0, 0, 236, 237, 5, 111, 0, 0, 237, 238, 5, 103, 0, 0, 238, 44, 1, 0, 0, 0, 239, 240, 5, 101, 0, 0, 240, 241, 5, 120, 0, 0, 241, 242, 5, 112, 0, 0, 242, 46, 1, 0, 0, 0, 243, 244, 5, 115, 0, 0, 244, 245, 5, 109, 0, 0, 245, 246, 5, 105, 0, 0, 246, 247, 5, 110, 0, 0, 247, 48, 1, 0, 0, 0, 248, 249, 5, 115, 0, 0, 249, 250, 5, 109, 0, 0, 250, 251, 5, 97, 0, 0, 251, 252, 5, 120, 0, 0, 252, 50, 1, 0, 0, 0, 253, 254, 5, 116, 0, 0, 254, 255, 5, 109, 0, 0, 255, 256, 5, 105, 0, 0, 256, 257, 5, 110, 0, 0, 257, 52, 1, 0, 0, 0, 258, 259, 5, 116, 0, 0, 259, 260, 5, 109, 0, 0, 260, 261, 5, 97, 0, 0, 261, 262, 5, 120, 0, 0, 262, 54, 1, 0, 0, 0, 263, 264, 5, 116, 0, 0, 264, 265, 5, 110, 0, 0, 265, 266, 5, 111, 0, 0, 266, 267, 5, 114, 0, 0, 267, 268, 5, 109, 0, 0, 268, 56, 1, 0, 0, 0, 269, 270, 5, 115, 0, 0, 270, 271, 5, 110, 0, 0, 271, 272, 5, 111, 0, 0, 272, 273, 5, 114, 0, 0, 273, 274, 5, 109, 0, 0, 274, 58, 1, 0, 0, 0, 275, 276, 5, 102, 0, 0, 276, 277, 5, 108, 0, 0, 277, 278, 5, 111, 0, 0, 278, 279, 5, 111, 0, 0, 279, 280, 5, 114, 0, 0, 280, 60, 1, 0, 0, 0, 281, 282, 5, 99, 0, 0, 282, 283, 5, 101, 0, 0, 283, 284, 5, 105, 0, 0, 284, 285, 5, 108, 0, 0, 285, 62, 1, 0, 0, 0, 286, 287, 5, 114, 0, 0, 287, 288, 5, 111, 0, 0, 288, 289, 5, 117, 0, 0, 289, 290, 5, 110, 0, 0, 290, 291, 5, 100, 0, 0, 291, 64, 1, 0, 0, 0, 292, 293, 5, 103, 0, 0, 293, 294, 5, 97, 0, 0, 294, 295, 5, 109, 0, 0, 295, 296, 5, 109, 0, 0, 296, 297, 5, 97, 0, 0, 297, 66, 1, 0, 0, 0, 298, 299, 5, 112, 0, 0, 299, 300, 5, 111, 0, 0, 300, 301, 5, 119, 0, 0, 301, 68, 1, 0, 0, 0, 302, 303, 5, 115, 0, 0, 303, 304, 5, 105, 0, 0, 304, 305, 5, 103, 0, 0, 305, 306, 5, 109, 0, 0, 306, 70, 1, 0, 0, 0, 307, 308, 5, 99, 0, 0, 308, 309, 5, 108, 0, 0, 309, 310, 5, 97, 0, 0, 310, 311, 5, 109, 0, 0, 311, 312, 5, 112, 0, 0, 312, 72, 1, 0, 0, 0, 313, 314, 5, 102, 0, 0, 314, 315, 5, 102, 0, 0, 315, 316, 5, 116, 0, 0, 316, 74, 1, 0, 0, 0, 317, 318, 5, 105, 0, 0, 318, 319, 5, 102, 0, 0, 319, 320, 5, 102, 0, 0, 320, 321, 5, 116, 0, 0, 321, 76, 1, 0, 0, 0, 322, 323, 5, 97, 0, 0, 323, 324, 5, 110, 0, 0, 324, 325, 5, 103, 0, 0, 325, 326, 5, 108, 0, 0, 326, 327, 5, 101, 0, 0, 327, 78, 1, 0, 0, 0, 328, 329, 5, 112, 0, 0, 329, 330, 5, 114, 0, 0, 330, 331, 5, 105, 0, 0, 331, 332, 5, 110, 0, 0, 332, 333, 5, 116, 0, 0, 333, 80, 1, 0, 0, 0, 334, 335, 5, 112, 0, 0, 335, 336, 5, 114, 0, 0, 336, 337, 5, 105, 0, 0, 337, 338, 5, 110, 0, 0, 338, 339, 5, 116, 0, 0, 339, 340, 5, 95, 0, 0, 340, 341, 5, 115, 0, 0, 341, 342, 5, 104, 0, 0, 342, 343, 5, 97, 0, 0, 343, 344, 5, 112, 0, 0, 344, 345, 5, 101, 0, 0, 345, 82, 1, 0, 0, 0, 346, 347, 5, 112, 0, 0, 347, 348, 5, 115, 0, 0, 348, 349, 5, 104, 0, 0, 349, 350, 5, 112, 0, 0, 350, 84, 1, 0, 0, 0, 351, 352, 5, 108, 0, 0, 352, 353, 5, 101, 0, 0, 353, 354, 5, 114, 0, 0, 354, 355, 5, 112, 0, 0, 355, 86, 1, 0, 0, 0, 356, 357, 5, 115, 0, 0, 357, 358, 5, 116, 0, 0, 358, 359, 5, 101, 0, 0, 359, 360, 5, 112, 0, 0, 360, 88, 1, 0, 0, 0, 361, 362, 5, 115, 0, 0, 362, 363, 5, 109, 0, 0, 363, 364, 5, 111, 0, 0, 364, 365, 5, 111, 0, 0, 365, 366, 5, 116, 0, 0, 366, 367, 5, 104, 0, 0, 367, 368, 5, 115, 0, 0, 368, 369, 5, 116, 0, 0, 369, 370, 5, 101, 0, 0, 370, 371, 5, 112, 0, 0, 371, 90, 1, 0, 0, 0, 372, 373, 5, 102, 0, 0, 373, 374, 5, 114, 0, 0, 374, 375, 5, 97, 0, 0, 375, 376, 5, 99, 0, 0, 376, 377, 5, 116, 0, 0, 377, 92, 1, 0, 0, 0, 378, 379, 5, 114, 0, 0, 379, 380, 5, 101, 0, 0, 380, 381, 5, 108, 0, 0, 381, 382, 5, 117, 0, 0, 382, 94, 1, 0, 0, 0, 383, 384, 5, 115, 0, 0, 384, 385, 5, 111, 0, 0, 385, 386, 5, 102, 0, 0, 386, 387, 5, 116, 0, 0, 387, 388, 5, 112, 0, 0, 388, 389, 5, 108, 0, 0, 389, 390, 5, 117, 0, 0, 390, 391, 5, 115, 0, 0, 391, 96, 1, 0, 0, 0, 392, 393, 5, 103, 0, 0, 393, 394, 5, 101, 0, 0, 394, 395, 5, 108, 0, 0, 395, 396, 5, 117, 0, 0, 396, 98, 1, 0, 0, 0, 397, 398, 5, 115, 0, 0, 398, 399, 5, 105, 0, 0, 399, 400, 5, 103, 0, 0, 400, 401, 5, 110, 0, 0, 401, 100, 1, 0, 0, 0, 402, 403, 5, 109, 0, 0, 403, 404, 5, 97, 0, 0, 404, 405, 5, 112, 0, 0, 405, 102, 1, 0, 0, 0, 406, 407, 5, 99, 0, 0, 407, 408, 5, 111, 0, 0, 408, 409, 5, 110, 0, 0, 409, 410, 5, 118, 0, 0, 410, 104, 1, 0, 0, 0, 411, 412, 5, 115, 0, 0, 412, 413, 5, 119, 0, 0, 413, 414, 5, 97, 0, 0, 414, 415, 5, 112, 0, 0, 415, 106, 1, 0, 0, 0, 416, 417, 5, 112, 0, 0, 417, 418, 5, 101, 0, 0, 418, 419, 5, 114, 0, 0, 419, 420, 5, 109, 0, 0, 420, 421, 5, 117, 0, 0, 421, 422, 5, 116, 0, 0, 422, 423, 5, 101, 0, 0, 423, 108, 1, 0, 0, 0, 424, 425, 5, 114, 0, 0, 425, 426, 5, 101, 0, 0, 426, 427, 5, 115, 0, 0, 427, 428, 5, 104, 0, 0, 428, 429, 5, 97, 0, 0, 429, 430, 5, 112, 0, 0, 430, 431, 5, 101, 0, 0, 431, 110, 1, 0, 0, 0, 432, 433, 5, 114, 0, 0, 433, 434, 5, 97, 0, 0, 434, 435, 5, 110, 0, 0, 435, 436, 5, 103, 0, 0, 436, 437, 5, 101, 0, 0, 437, 112, 1, 0, 0, 0, 438, 439, 5, 43, 0, 0, 439, 114, 1, 0, 0, 0, 440, 441, 5, 45, 0, 0, 441, 116, 1, 0, 0, 0, 442, 443, 5, 42, 0, 0, 443, 118, 1, 0, 0, 0, 444, 445, 5, 47, 0, 0, 445, 120, 1, 0, 0, 0, 446, 447, 5, 37, 0, 0, 447, 122, 1, 0, 0, 0, 448, 449, 5, 94, 0, 0, 449, 124, 1, 0, 0, 0, 450, 451, 5, 62, 0, 0, 451, 452, 5, 61, 0, 0, 452, 126, 1, 0, 0, 0, 453, 454, 5, 62, 0, 0, 454, 128, 1, 0, 0, 0, 455, 456, 5, 60, 0, 0, 456, 457, 5, 61, 0, 0, 457, 130, 1, 0, 0, 0, 458, 459, 5, 60, 0, 0, 459, 132, 1, 0, 0, 0, 460, 461, 5, 61, 0, 0, 461, 462, 5, 61, 0, 0, 462, 134, 1, 0, 0, 0, 463, 464, 5, 33, 0, 0, 464, 465, 5, 61, 0, 0, 465, 136, 1, 0, 0, 0, 466, 467, 5, 124, 0, 0, 467, 138, 1, 0, 0, 0, 468, 469, 5, 112, 0, 0, 469, 474, 5, 105, 0, 0, 470, 471, 5, 80, 0, 0, 471, 474, 5, 73, 0, 0, 472, 474, 7, 0, 0, 0, 473, 468, 1, 0, 0, 0, 473, 470, 1, 0, 0, 0, 473, 472, 1, 0, 0, 0, 474, 140, 1, 0, 0, 0, 475, 477, 7, 1, 0, 0, 476, 475, 1, 0, 0, 0, 477, 478, 1, 0, 0, 0, 478, 476, 1, 0, 0, 0, 478, 479, 1, 0, 0, 0, 479, 486, 1, 0, 0, 0, 480, 482, 5, 46, 0, 0, 481, 483, 7, 1, 0, 0, 482, 481, 1, 0, 0, 0, 483, 484, 1, 0, 0, 0, 484, 482, 1, 0, 0, 0, 484, 485, 1, 0, 0, 0, 485, 487, 1, 0, 0, 0, 486, 480, 1, 0, 0, 0, 486, 487, 1, 0, 0, 0, 487, 142, 1, 0, 0, 0, 488, 492, 7, 2, 0, 0, 489, 491, 7, 3, 0, 0, 490, 489, 1, 0, 0, 0, 491, 494, 1, 0, 0, 0, 492, 490, 1, 0, 0, 0, 492, 493, 1, 0, 0, 0, 493, 144, 1, 0, 0, 0, 494, 492, 1, 0, 0, 0, 495, 497, 7, 4, 0, 0, 496, 495, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, 498, 496, 1, 0, 0, 0, 498, 499, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 501, 6, 72, 0, 0, 501, 146, 1, 0, 0, 0, 7, 0, 473, 478, 484, 486, 492, 498, 1, 6, 0, 0] \ No newline at end of file +[4, 0, 76, 523, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2, 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7, 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 2, 49, 7, 49, 2, 50, 7, 50, 2, 51, 7, 51, 2, 52, 7, 52, 2, 53, 7, 53, 2, 54, 7, 54, 2, 55, 7, 55, 2, 56, 7, 56, 2, 57, 7, 57, 2, 58, 7, 58, 2, 59, 7, 59, 2, 60, 7, 60, 2, 61, 7, 61, 2, 62, 7, 62, 2, 63, 7, 63, 2, 64, 7, 64, 2, 65, 7, 65, 2, 66, 7, 66, 2, 67, 7, 67, 2, 68, 7, 68, 2, 69, 7, 69, 2, 70, 7, 70, 2, 71, 7, 71, 2, 72, 7, 72, 2, 73, 7, 73, 2, 74, 7, 74, 2, 75, 7, 75, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 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, 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, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 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, 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, 28, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 29, 1, 30, 1, 30, 1, 30, 1, 30, 1, 30, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 37, 1, 37, 1, 37, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 38, 1, 39, 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, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 43, 1, 43, 1, 43, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 44, 1, 45, 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, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 47, 1, 48, 1, 48, 1, 48, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 51, 1, 51, 1, 51, 1, 52, 1, 52, 1, 52, 1, 52, 1, 52, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 1, 56, 1, 56, 1, 56, 1, 57, 1, 57, 1, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 60, 1, 60, 1, 61, 1, 61, 1, 62, 1, 62, 1, 63, 1, 63, 1, 64, 1, 64, 1, 65, 1, 65, 1, 65, 1, 66, 1, 66, 1, 67, 1, 67, 1, 67, 1, 68, 1, 68, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 72, 1, 72, 1, 72, 3, 72, 495, 8, 72, 1, 73, 4, 73, 498, 8, 73, 11, 73, 12, 73, 499, 1, 73, 1, 73, 4, 73, 504, 8, 73, 11, 73, 12, 73, 505, 3, 73, 508, 8, 73, 1, 74, 1, 74, 5, 74, 512, 8, 74, 10, 74, 12, 74, 515, 9, 74, 1, 75, 4, 75, 518, 8, 75, 11, 75, 12, 75, 519, 1, 75, 1, 75, 0, 0, 76, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 61, 123, 62, 125, 63, 127, 64, 129, 65, 131, 66, 133, 67, 135, 68, 137, 69, 139, 70, 141, 71, 143, 72, 145, 73, 147, 74, 149, 75, 151, 76, 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, 529, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 121, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 131, 1, 0, 0, 0, 0, 133, 1, 0, 0, 0, 0, 135, 1, 0, 0, 0, 0, 137, 1, 0, 0, 0, 0, 139, 1, 0, 0, 0, 0, 141, 1, 0, 0, 0, 0, 143, 1, 0, 0, 0, 0, 145, 1, 0, 0, 0, 0, 147, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 1, 153, 1, 0, 0, 0, 3, 155, 1, 0, 0, 0, 5, 157, 1, 0, 0, 0, 7, 159, 1, 0, 0, 0, 9, 161, 1, 0, 0, 0, 11, 163, 1, 0, 0, 0, 13, 167, 1, 0, 0, 0, 15, 171, 1, 0, 0, 0, 17, 175, 1, 0, 0, 0, 19, 180, 1, 0, 0, 0, 21, 185, 1, 0, 0, 0, 23, 190, 1, 0, 0, 0, 25, 196, 1, 0, 0, 0, 27, 201, 1, 0, 0, 0, 29, 206, 1, 0, 0, 0, 31, 211, 1, 0, 0, 0, 33, 217, 1, 0, 0, 0, 35, 223, 1, 0, 0, 0, 37, 229, 1, 0, 0, 0, 39, 233, 1, 0, 0, 0, 41, 238, 1, 0, 0, 0, 43, 241, 1, 0, 0, 0, 45, 245, 1, 0, 0, 0, 47, 249, 1, 0, 0, 0, 49, 254, 1, 0, 0, 0, 51, 259, 1, 0, 0, 0, 53, 264, 1, 0, 0, 0, 55, 269, 1, 0, 0, 0, 57, 275, 1, 0, 0, 0, 59, 281, 1, 0, 0, 0, 61, 287, 1, 0, 0, 0, 63, 292, 1, 0, 0, 0, 65, 298, 1, 0, 0, 0, 67, 304, 1, 0, 0, 0, 69, 308, 1, 0, 0, 0, 71, 313, 1, 0, 0, 0, 73, 319, 1, 0, 0, 0, 75, 323, 1, 0, 0, 0, 77, 328, 1, 0, 0, 0, 79, 334, 1, 0, 0, 0, 81, 340, 1, 0, 0, 0, 83, 352, 1, 0, 0, 0, 85, 357, 1, 0, 0, 0, 87, 362, 1, 0, 0, 0, 89, 367, 1, 0, 0, 0, 91, 378, 1, 0, 0, 0, 93, 384, 1, 0, 0, 0, 95, 389, 1, 0, 0, 0, 97, 398, 1, 0, 0, 0, 99, 403, 1, 0, 0, 0, 101, 408, 1, 0, 0, 0, 103, 412, 1, 0, 0, 0, 105, 417, 1, 0, 0, 0, 107, 422, 1, 0, 0, 0, 109, 430, 1, 0, 0, 0, 111, 438, 1, 0, 0, 0, 113, 444, 1, 0, 0, 0, 115, 449, 1, 0, 0, 0, 117, 454, 1, 0, 0, 0, 119, 459, 1, 0, 0, 0, 121, 461, 1, 0, 0, 0, 123, 463, 1, 0, 0, 0, 125, 465, 1, 0, 0, 0, 127, 467, 1, 0, 0, 0, 129, 469, 1, 0, 0, 0, 131, 471, 1, 0, 0, 0, 133, 474, 1, 0, 0, 0, 135, 476, 1, 0, 0, 0, 137, 479, 1, 0, 0, 0, 139, 481, 1, 0, 0, 0, 141, 484, 1, 0, 0, 0, 143, 487, 1, 0, 0, 0, 145, 494, 1, 0, 0, 0, 147, 497, 1, 0, 0, 0, 149, 509, 1, 0, 0, 0, 151, 517, 1, 0, 0, 0, 153, 154, 5, 40, 0, 0, 154, 2, 1, 0, 0, 0, 155, 156, 5, 41, 0, 0, 156, 4, 1, 0, 0, 0, 157, 158, 5, 91, 0, 0, 158, 6, 1, 0, 0, 0, 159, 160, 5, 44, 0, 0, 160, 8, 1, 0, 0, 0, 161, 162, 5, 93, 0, 0, 162, 10, 1, 0, 0, 0, 163, 164, 5, 115, 0, 0, 164, 165, 5, 105, 0, 0, 165, 166, 5, 110, 0, 0, 166, 12, 1, 0, 0, 0, 167, 168, 5, 99, 0, 0, 168, 169, 5, 111, 0, 0, 169, 170, 5, 115, 0, 0, 170, 14, 1, 0, 0, 0, 171, 172, 5, 116, 0, 0, 172, 173, 5, 97, 0, 0, 173, 174, 5, 110, 0, 0, 174, 16, 1, 0, 0, 0, 175, 176, 5, 97, 0, 0, 176, 177, 5, 115, 0, 0, 177, 178, 5, 105, 0, 0, 178, 179, 5, 110, 0, 0, 179, 18, 1, 0, 0, 0, 180, 181, 5, 97, 0, 0, 181, 182, 5, 99, 0, 0, 182, 183, 5, 111, 0, 0, 183, 184, 5, 115, 0, 0, 184, 20, 1, 0, 0, 0, 185, 186, 5, 97, 0, 0, 186, 187, 5, 116, 0, 0, 187, 188, 5, 97, 0, 0, 188, 189, 5, 110, 0, 0, 189, 22, 1, 0, 0, 0, 190, 191, 5, 97, 0, 0, 191, 192, 5, 116, 0, 0, 192, 193, 5, 97, 0, 0, 193, 194, 5, 110, 0, 0, 194, 195, 5, 50, 0, 0, 195, 24, 1, 0, 0, 0, 196, 197, 5, 115, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 110, 0, 0, 199, 200, 5, 104, 0, 0, 200, 26, 1, 0, 0, 0, 201, 202, 5, 99, 0, 0, 202, 203, 5, 111, 0, 0, 203, 204, 5, 115, 0, 0, 204, 205, 5, 104, 0, 0, 205, 28, 1, 0, 0, 0, 206, 207, 5, 116, 0, 0, 207, 208, 5, 97, 0, 0, 208, 209, 5, 110, 0, 0, 209, 210, 5, 104, 0, 0, 210, 30, 1, 0, 0, 0, 211, 212, 5, 97, 0, 0, 212, 213, 5, 115, 0, 0, 213, 214, 5, 105, 0, 0, 214, 215, 5, 110, 0, 0, 215, 216, 5, 104, 0, 0, 216, 32, 1, 0, 0, 0, 217, 218, 5, 97, 0, 0, 218, 219, 5, 99, 0, 0, 219, 220, 5, 111, 0, 0, 220, 221, 5, 115, 0, 0, 221, 222, 5, 104, 0, 0, 222, 34, 1, 0, 0, 0, 223, 224, 5, 97, 0, 0, 224, 225, 5, 116, 0, 0, 225, 226, 5, 97, 0, 0, 226, 227, 5, 110, 0, 0, 227, 228, 5, 104, 0, 0, 228, 36, 1, 0, 0, 0, 229, 230, 5, 97, 0, 0, 230, 231, 5, 98, 0, 0, 231, 232, 5, 115, 0, 0, 232, 38, 1, 0, 0, 0, 233, 234, 5, 115, 0, 0, 234, 235, 5, 113, 0, 0, 235, 236, 5, 114, 0, 0, 236, 237, 5, 116, 0, 0, 237, 40, 1, 0, 0, 0, 238, 239, 5, 108, 0, 0, 239, 240, 5, 110, 0, 0, 240, 42, 1, 0, 0, 0, 241, 242, 5, 108, 0, 0, 242, 243, 5, 111, 0, 0, 243, 244, 5, 103, 0, 0, 244, 44, 1, 0, 0, 0, 245, 246, 5, 101, 0, 0, 246, 247, 5, 120, 0, 0, 247, 248, 5, 112, 0, 0, 248, 46, 1, 0, 0, 0, 249, 250, 5, 115, 0, 0, 250, 251, 5, 109, 0, 0, 251, 252, 5, 105, 0, 0, 252, 253, 5, 110, 0, 0, 253, 48, 1, 0, 0, 0, 254, 255, 5, 115, 0, 0, 255, 256, 5, 109, 0, 0, 256, 257, 5, 97, 0, 0, 257, 258, 5, 120, 0, 0, 258, 50, 1, 0, 0, 0, 259, 260, 5, 116, 0, 0, 260, 261, 5, 109, 0, 0, 261, 262, 5, 105, 0, 0, 262, 263, 5, 110, 0, 0, 263, 52, 1, 0, 0, 0, 264, 265, 5, 116, 0, 0, 265, 266, 5, 109, 0, 0, 266, 267, 5, 97, 0, 0, 267, 268, 5, 120, 0, 0, 268, 54, 1, 0, 0, 0, 269, 270, 5, 116, 0, 0, 270, 271, 5, 110, 0, 0, 271, 272, 5, 111, 0, 0, 272, 273, 5, 114, 0, 0, 273, 274, 5, 109, 0, 0, 274, 56, 1, 0, 0, 0, 275, 276, 5, 115, 0, 0, 276, 277, 5, 110, 0, 0, 277, 278, 5, 111, 0, 0, 278, 279, 5, 114, 0, 0, 279, 280, 5, 109, 0, 0, 280, 58, 1, 0, 0, 0, 281, 282, 5, 102, 0, 0, 282, 283, 5, 108, 0, 0, 283, 284, 5, 111, 0, 0, 284, 285, 5, 111, 0, 0, 285, 286, 5, 114, 0, 0, 286, 60, 1, 0, 0, 0, 287, 288, 5, 99, 0, 0, 288, 289, 5, 101, 0, 0, 289, 290, 5, 105, 0, 0, 290, 291, 5, 108, 0, 0, 291, 62, 1, 0, 0, 0, 292, 293, 5, 114, 0, 0, 293, 294, 5, 111, 0, 0, 294, 295, 5, 117, 0, 0, 295, 296, 5, 110, 0, 0, 296, 297, 5, 100, 0, 0, 297, 64, 1, 0, 0, 0, 298, 299, 5, 103, 0, 0, 299, 300, 5, 97, 0, 0, 300, 301, 5, 109, 0, 0, 301, 302, 5, 109, 0, 0, 302, 303, 5, 97, 0, 0, 303, 66, 1, 0, 0, 0, 304, 305, 5, 112, 0, 0, 305, 306, 5, 111, 0, 0, 306, 307, 5, 119, 0, 0, 307, 68, 1, 0, 0, 0, 308, 309, 5, 115, 0, 0, 309, 310, 5, 105, 0, 0, 310, 311, 5, 103, 0, 0, 311, 312, 5, 109, 0, 0, 312, 70, 1, 0, 0, 0, 313, 314, 5, 99, 0, 0, 314, 315, 5, 108, 0, 0, 315, 316, 5, 97, 0, 0, 316, 317, 5, 109, 0, 0, 317, 318, 5, 112, 0, 0, 318, 72, 1, 0, 0, 0, 319, 320, 5, 102, 0, 0, 320, 321, 5, 102, 0, 0, 321, 322, 5, 116, 0, 0, 322, 74, 1, 0, 0, 0, 323, 324, 5, 105, 0, 0, 324, 325, 5, 102, 0, 0, 325, 326, 5, 102, 0, 0, 326, 327, 5, 116, 0, 0, 327, 76, 1, 0, 0, 0, 328, 329, 5, 97, 0, 0, 329, 330, 5, 110, 0, 0, 330, 331, 5, 103, 0, 0, 331, 332, 5, 108, 0, 0, 332, 333, 5, 101, 0, 0, 333, 78, 1, 0, 0, 0, 334, 335, 5, 112, 0, 0, 335, 336, 5, 114, 0, 0, 336, 337, 5, 105, 0, 0, 337, 338, 5, 110, 0, 0, 338, 339, 5, 116, 0, 0, 339, 80, 1, 0, 0, 0, 340, 341, 5, 112, 0, 0, 341, 342, 5, 114, 0, 0, 342, 343, 5, 105, 0, 0, 343, 344, 5, 110, 0, 0, 344, 345, 5, 116, 0, 0, 345, 346, 5, 95, 0, 0, 346, 347, 5, 115, 0, 0, 347, 348, 5, 104, 0, 0, 348, 349, 5, 97, 0, 0, 349, 350, 5, 112, 0, 0, 350, 351, 5, 101, 0, 0, 351, 82, 1, 0, 0, 0, 352, 353, 5, 112, 0, 0, 353, 354, 5, 115, 0, 0, 354, 355, 5, 104, 0, 0, 355, 356, 5, 112, 0, 0, 356, 84, 1, 0, 0, 0, 357, 358, 5, 108, 0, 0, 358, 359, 5, 101, 0, 0, 359, 360, 5, 114, 0, 0, 360, 361, 5, 112, 0, 0, 361, 86, 1, 0, 0, 0, 362, 363, 5, 115, 0, 0, 363, 364, 5, 116, 0, 0, 364, 365, 5, 101, 0, 0, 365, 366, 5, 112, 0, 0, 366, 88, 1, 0, 0, 0, 367, 368, 5, 115, 0, 0, 368, 369, 5, 109, 0, 0, 369, 370, 5, 111, 0, 0, 370, 371, 5, 111, 0, 0, 371, 372, 5, 116, 0, 0, 372, 373, 5, 104, 0, 0, 373, 374, 5, 115, 0, 0, 374, 375, 5, 116, 0, 0, 375, 376, 5, 101, 0, 0, 376, 377, 5, 112, 0, 0, 377, 90, 1, 0, 0, 0, 378, 379, 5, 102, 0, 0, 379, 380, 5, 114, 0, 0, 380, 381, 5, 97, 0, 0, 381, 382, 5, 99, 0, 0, 382, 383, 5, 116, 0, 0, 383, 92, 1, 0, 0, 0, 384, 385, 5, 114, 0, 0, 385, 386, 5, 101, 0, 0, 386, 387, 5, 108, 0, 0, 387, 388, 5, 117, 0, 0, 388, 94, 1, 0, 0, 0, 389, 390, 5, 115, 0, 0, 390, 391, 5, 111, 0, 0, 391, 392, 5, 102, 0, 0, 392, 393, 5, 116, 0, 0, 393, 394, 5, 112, 0, 0, 394, 395, 5, 108, 0, 0, 395, 396, 5, 117, 0, 0, 396, 397, 5, 115, 0, 0, 397, 96, 1, 0, 0, 0, 398, 399, 5, 103, 0, 0, 399, 400, 5, 101, 0, 0, 400, 401, 5, 108, 0, 0, 401, 402, 5, 117, 0, 0, 402, 98, 1, 0, 0, 0, 403, 404, 5, 115, 0, 0, 404, 405, 5, 105, 0, 0, 405, 406, 5, 103, 0, 0, 406, 407, 5, 110, 0, 0, 407, 100, 1, 0, 0, 0, 408, 409, 5, 109, 0, 0, 409, 410, 5, 97, 0, 0, 410, 411, 5, 112, 0, 0, 411, 102, 1, 0, 0, 0, 412, 413, 5, 99, 0, 0, 413, 414, 5, 111, 0, 0, 414, 415, 5, 110, 0, 0, 415, 416, 5, 118, 0, 0, 416, 104, 1, 0, 0, 0, 417, 418, 5, 115, 0, 0, 418, 419, 5, 119, 0, 0, 419, 420, 5, 97, 0, 0, 420, 421, 5, 112, 0, 0, 421, 106, 1, 0, 0, 0, 422, 423, 5, 112, 0, 0, 423, 424, 5, 101, 0, 0, 424, 425, 5, 114, 0, 0, 425, 426, 5, 109, 0, 0, 426, 427, 5, 117, 0, 0, 427, 428, 5, 116, 0, 0, 428, 429, 5, 101, 0, 0, 429, 108, 1, 0, 0, 0, 430, 431, 5, 114, 0, 0, 431, 432, 5, 101, 0, 0, 432, 433, 5, 115, 0, 0, 433, 434, 5, 104, 0, 0, 434, 435, 5, 97, 0, 0, 435, 436, 5, 112, 0, 0, 436, 437, 5, 101, 0, 0, 437, 110, 1, 0, 0, 0, 438, 439, 5, 114, 0, 0, 439, 440, 5, 97, 0, 0, 440, 441, 5, 110, 0, 0, 441, 442, 5, 103, 0, 0, 442, 443, 5, 101, 0, 0, 443, 112, 1, 0, 0, 0, 444, 445, 5, 116, 0, 0, 445, 446, 5, 111, 0, 0, 446, 447, 5, 112, 0, 0, 447, 448, 5, 107, 0, 0, 448, 114, 1, 0, 0, 0, 449, 450, 5, 98, 0, 0, 450, 451, 5, 111, 0, 0, 451, 452, 5, 116, 0, 0, 452, 453, 5, 107, 0, 0, 453, 116, 1, 0, 0, 0, 454, 455, 5, 112, 0, 0, 455, 456, 5, 105, 0, 0, 456, 457, 5, 110, 0, 0, 457, 458, 5, 118, 0, 0, 458, 118, 1, 0, 0, 0, 459, 460, 5, 43, 0, 0, 460, 120, 1, 0, 0, 0, 461, 462, 5, 45, 0, 0, 462, 122, 1, 0, 0, 0, 463, 464, 5, 42, 0, 0, 464, 124, 1, 0, 0, 0, 465, 466, 5, 47, 0, 0, 466, 126, 1, 0, 0, 0, 467, 468, 5, 37, 0, 0, 468, 128, 1, 0, 0, 0, 469, 470, 5, 94, 0, 0, 470, 130, 1, 0, 0, 0, 471, 472, 5, 62, 0, 0, 472, 473, 5, 61, 0, 0, 473, 132, 1, 0, 0, 0, 474, 475, 5, 62, 0, 0, 475, 134, 1, 0, 0, 0, 476, 477, 5, 60, 0, 0, 477, 478, 5, 61, 0, 0, 478, 136, 1, 0, 0, 0, 479, 480, 5, 60, 0, 0, 480, 138, 1, 0, 0, 0, 481, 482, 5, 61, 0, 0, 482, 483, 5, 61, 0, 0, 483, 140, 1, 0, 0, 0, 484, 485, 5, 33, 0, 0, 485, 486, 5, 61, 0, 0, 486, 142, 1, 0, 0, 0, 487, 488, 5, 124, 0, 0, 488, 144, 1, 0, 0, 0, 489, 490, 5, 112, 0, 0, 490, 495, 5, 105, 0, 0, 491, 492, 5, 80, 0, 0, 492, 495, 5, 73, 0, 0, 493, 495, 7, 0, 0, 0, 494, 489, 1, 0, 0, 0, 494, 491, 1, 0, 0, 0, 494, 493, 1, 0, 0, 0, 495, 146, 1, 0, 0, 0, 496, 498, 7, 1, 0, 0, 497, 496, 1, 0, 0, 0, 498, 499, 1, 0, 0, 0, 499, 497, 1, 0, 0, 0, 499, 500, 1, 0, 0, 0, 500, 507, 1, 0, 0, 0, 501, 503, 5, 46, 0, 0, 502, 504, 7, 1, 0, 0, 503, 502, 1, 0, 0, 0, 504, 505, 1, 0, 0, 0, 505, 503, 1, 0, 0, 0, 505, 506, 1, 0, 0, 0, 506, 508, 1, 0, 0, 0, 507, 501, 1, 0, 0, 0, 507, 508, 1, 0, 0, 0, 508, 148, 1, 0, 0, 0, 509, 513, 7, 2, 0, 0, 510, 512, 7, 3, 0, 0, 511, 510, 1, 0, 0, 0, 512, 515, 1, 0, 0, 0, 513, 511, 1, 0, 0, 0, 513, 514, 1, 0, 0, 0, 514, 150, 1, 0, 0, 0, 515, 513, 1, 0, 0, 0, 516, 518, 7, 4, 0, 0, 517, 516, 1, 0, 0, 0, 518, 519, 1, 0, 0, 0, 519, 517, 1, 0, 0, 0, 519, 520, 1, 0, 0, 0, 520, 521, 1, 0, 0, 0, 521, 522, 6, 75, 0, 0, 522, 152, 1, 0, 0, 0, 7, 0, 494, 499, 505, 507, 513, 519, 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 5301283..b37ff41 100644 --- a/more_math/Parser/MathExprLexer.py +++ b/more_math/Parser/MathExprLexer.py @@ -1,7 +1,7 @@ # 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 else: @@ -10,4280 +10,197 @@ else: def serializedATN(): return [ - 4, - 0, - 73, - 502, - 6, - -1, - 2, - 0, - 7, - 0, - 2, - 1, - 7, - 1, - 2, - 2, - 7, - 2, - 2, - 3, - 7, - 3, - 2, - 4, - 7, - 4, - 2, - 5, - 7, - 5, - 2, - 6, - 7, - 6, - 2, - 7, - 7, - 7, - 2, - 8, - 7, - 8, - 2, - 9, - 7, - 9, - 2, - 10, - 7, - 10, - 2, - 11, - 7, - 11, - 2, - 12, - 7, - 12, - 2, - 13, - 7, - 13, - 2, - 14, - 7, - 14, - 2, - 15, - 7, - 15, - 2, - 16, - 7, - 16, - 2, - 17, - 7, - 17, - 2, - 18, - 7, - 18, - 2, - 19, - 7, - 19, - 2, - 20, - 7, - 20, - 2, - 21, - 7, - 21, - 2, - 22, - 7, - 22, - 2, - 23, - 7, - 23, - 2, - 24, - 7, - 24, - 2, - 25, - 7, - 25, - 2, - 26, - 7, - 26, - 2, - 27, - 7, - 27, - 2, - 28, - 7, - 28, - 2, - 29, - 7, - 29, - 2, - 30, - 7, - 30, - 2, - 31, - 7, - 31, - 2, - 32, - 7, - 32, - 2, - 33, - 7, - 33, - 2, - 34, - 7, - 34, - 2, - 35, - 7, - 35, - 2, - 36, - 7, - 36, - 2, - 37, - 7, - 37, - 2, - 38, - 7, - 38, - 2, - 39, - 7, - 39, - 2, - 40, - 7, - 40, - 2, - 41, - 7, - 41, - 2, - 42, - 7, - 42, - 2, - 43, - 7, - 43, - 2, - 44, - 7, - 44, - 2, - 45, - 7, - 45, - 2, - 46, - 7, - 46, - 2, - 47, - 7, - 47, - 2, - 48, - 7, - 48, - 2, - 49, - 7, - 49, - 2, - 50, - 7, - 50, - 2, - 51, - 7, - 51, - 2, - 52, - 7, - 52, - 2, - 53, - 7, - 53, - 2, - 54, - 7, - 54, - 2, - 55, - 7, - 55, - 2, - 56, - 7, - 56, - 2, - 57, - 7, - 57, - 2, - 58, - 7, - 58, - 2, - 59, - 7, - 59, - 2, - 60, - 7, - 60, - 2, - 61, - 7, - 61, - 2, - 62, - 7, - 62, - 2, - 63, - 7, - 63, - 2, - 64, - 7, - 64, - 2, - 65, - 7, - 65, - 2, - 66, - 7, - 66, - 2, - 67, - 7, - 67, - 2, - 68, - 7, - 68, - 2, - 69, - 7, - 69, - 2, - 70, - 7, - 70, - 2, - 71, - 7, - 71, - 2, - 72, - 7, - 72, - 1, - 0, - 1, - 0, - 1, - 1, - 1, - 1, - 1, - 2, - 1, - 2, - 1, - 3, - 1, - 3, - 1, - 4, - 1, - 4, - 1, - 5, - 1, - 5, - 1, - 5, - 1, - 5, - 1, - 6, - 1, - 6, - 1, - 6, - 1, - 6, - 1, - 7, - 1, - 7, - 1, - 7, - 1, - 7, - 1, - 8, - 1, - 8, - 1, - 8, - 1, - 8, - 1, - 8, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 10, - 1, - 10, - 1, - 10, - 1, - 10, - 1, - 10, - 1, - 11, - 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, - 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, - 16, - 1, - 16, - 1, - 17, - 1, - 17, - 1, - 17, - 1, - 17, - 1, - 17, - 1, - 17, - 1, - 18, - 1, - 18, - 1, - 18, - 1, - 18, - 1, - 19, - 1, - 19, - 1, - 19, - 1, - 19, - 1, - 19, - 1, - 20, - 1, - 20, - 1, - 20, - 1, - 21, - 1, - 21, - 1, - 21, - 1, - 21, - 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, - 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, - 28, - 1, - 29, - 1, - 29, - 1, - 29, - 1, - 29, - 1, - 29, - 1, - 29, - 1, - 30, - 1, - 30, - 1, - 30, - 1, - 30, - 1, - 30, - 1, - 31, - 1, - 31, - 1, - 31, - 1, - 31, - 1, - 31, - 1, - 31, - 1, - 32, - 1, - 32, - 1, - 32, - 1, - 32, - 1, - 32, - 1, - 32, - 1, - 33, - 1, - 33, - 1, - 33, - 1, - 33, - 1, - 34, - 1, - 34, - 1, - 34, - 1, - 34, - 1, - 34, - 1, - 35, - 1, - 35, - 1, - 35, - 1, - 35, - 1, - 35, - 1, - 35, - 1, - 36, - 1, - 36, - 1, - 36, - 1, - 36, - 1, - 37, - 1, - 37, - 1, - 37, - 1, - 37, - 1, - 37, - 1, - 38, - 1, - 38, - 1, - 38, - 1, - 38, - 1, - 38, - 1, - 38, - 1, - 39, - 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, - 40, - 1, - 41, - 1, - 41, - 1, - 41, - 1, - 41, - 1, - 41, - 1, - 42, - 1, - 42, - 1, - 42, - 1, - 42, - 1, - 42, - 1, - 43, - 1, - 43, - 1, - 43, - 1, - 43, - 1, - 43, - 1, - 44, - 1, - 44, - 1, - 44, - 1, - 44, - 1, - 44, - 1, - 44, - 1, - 44, - 1, - 44, - 1, - 44, - 1, - 44, - 1, - 44, - 1, - 45, - 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, - 47, - 1, - 47, - 1, - 47, - 1, - 47, - 1, - 47, - 1, - 47, - 1, - 47, - 1, - 48, - 1, - 48, - 1, - 48, - 1, - 48, - 1, - 48, - 1, - 49, - 1, - 49, - 1, - 49, - 1, - 49, - 1, - 49, - 1, - 50, - 1, - 50, - 1, - 50, - 1, - 50, - 1, - 51, - 1, - 51, - 1, - 51, - 1, - 51, - 1, - 51, - 1, - 52, - 1, - 52, - 1, - 52, - 1, - 52, - 1, - 52, - 1, - 53, - 1, - 53, - 1, - 53, - 1, - 53, - 1, - 53, - 1, - 53, - 1, - 53, - 1, - 53, - 1, - 54, - 1, - 54, - 1, - 54, - 1, - 54, - 1, - 54, - 1, - 54, - 1, - 54, - 1, - 54, - 1, - 55, - 1, - 55, - 1, - 55, - 1, - 55, - 1, - 55, - 1, - 55, - 1, - 56, - 1, - 56, - 1, - 57, - 1, - 57, - 1, - 58, - 1, - 58, - 1, - 59, - 1, - 59, - 1, - 60, - 1, - 60, - 1, - 61, - 1, - 61, - 1, - 62, - 1, - 62, - 1, - 62, - 1, - 63, - 1, - 63, - 1, - 64, - 1, - 64, - 1, - 64, - 1, - 65, - 1, - 65, - 1, - 66, - 1, - 66, - 1, - 66, - 1, - 67, - 1, - 67, - 1, - 67, - 1, - 68, - 1, - 68, - 1, - 69, - 1, - 69, - 1, - 69, - 1, - 69, - 1, - 69, - 3, - 69, - 474, - 8, - 69, - 1, - 70, - 4, - 70, - 477, - 8, - 70, - 11, - 70, - 12, - 70, - 478, - 1, - 70, - 1, - 70, - 4, - 70, - 483, - 8, - 70, - 11, - 70, - 12, - 70, - 484, - 3, - 70, - 487, - 8, - 70, - 1, - 71, - 1, - 71, - 5, - 71, - 491, - 8, - 71, - 10, - 71, - 12, - 71, - 494, - 9, - 71, - 1, - 72, - 4, - 72, - 497, - 8, - 72, - 11, - 72, - 12, - 72, - 498, - 1, - 72, - 1, - 72, - 0, - 0, - 73, - 1, - 1, - 3, - 2, - 5, - 3, - 7, - 4, - 9, - 5, - 11, - 6, - 13, - 7, - 15, - 8, - 17, - 9, - 19, - 10, - 21, - 11, - 23, - 12, - 25, - 13, - 27, - 14, - 29, - 15, - 31, - 16, - 33, - 17, - 35, - 18, - 37, - 19, - 39, - 20, - 41, - 21, - 43, - 22, - 45, - 23, - 47, - 24, - 49, - 25, - 51, - 26, - 53, - 27, - 55, - 28, - 57, - 29, - 59, - 30, - 61, - 31, - 63, - 32, - 65, - 33, - 67, - 34, - 69, - 35, - 71, - 36, - 73, - 37, - 75, - 38, - 77, - 39, - 79, - 40, - 81, - 41, - 83, - 42, - 85, - 43, - 87, - 44, - 89, - 45, - 91, - 46, - 93, - 47, - 95, - 48, - 97, - 49, - 99, - 50, - 101, - 51, - 103, - 52, - 105, - 53, - 107, - 54, - 109, - 55, - 111, - 56, - 113, - 57, - 115, - 58, - 117, - 59, - 119, - 60, - 121, - 61, - 123, - 62, - 125, - 63, - 127, - 64, - 129, - 65, - 131, - 66, - 133, - 67, - 135, - 68, - 137, - 69, - 139, - 70, - 141, - 71, - 143, - 72, - 145, - 73, - 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, - 508, - 0, - 1, - 1, - 0, - 0, - 0, - 0, - 3, - 1, - 0, - 0, - 0, - 0, - 5, - 1, - 0, - 0, - 0, - 0, - 7, - 1, - 0, - 0, - 0, - 0, - 9, - 1, - 0, - 0, - 0, - 0, - 11, - 1, - 0, - 0, - 0, - 0, - 13, - 1, - 0, - 0, - 0, - 0, - 15, - 1, - 0, - 0, - 0, - 0, - 17, - 1, - 0, - 0, - 0, - 0, - 19, - 1, - 0, - 0, - 0, - 0, - 21, - 1, - 0, - 0, - 0, - 0, - 23, - 1, - 0, - 0, - 0, - 0, - 25, - 1, - 0, - 0, - 0, - 0, - 27, - 1, - 0, - 0, - 0, - 0, - 29, - 1, - 0, - 0, - 0, - 0, - 31, - 1, - 0, - 0, - 0, - 0, - 33, - 1, - 0, - 0, - 0, - 0, - 35, - 1, - 0, - 0, - 0, - 0, - 37, - 1, - 0, - 0, - 0, - 0, - 39, - 1, - 0, - 0, - 0, - 0, - 41, - 1, - 0, - 0, - 0, - 0, - 43, - 1, - 0, - 0, - 0, - 0, - 45, - 1, - 0, - 0, - 0, - 0, - 47, - 1, - 0, - 0, - 0, - 0, - 49, - 1, - 0, - 0, - 0, - 0, - 51, - 1, - 0, - 0, - 0, - 0, - 53, - 1, - 0, - 0, - 0, - 0, - 55, - 1, - 0, - 0, - 0, - 0, - 57, - 1, - 0, - 0, - 0, - 0, - 59, - 1, - 0, - 0, - 0, - 0, - 61, - 1, - 0, - 0, - 0, - 0, - 63, - 1, - 0, - 0, - 0, - 0, - 65, - 1, - 0, - 0, - 0, - 0, - 67, - 1, - 0, - 0, - 0, - 0, - 69, - 1, - 0, - 0, - 0, - 0, - 71, - 1, - 0, - 0, - 0, - 0, - 73, - 1, - 0, - 0, - 0, - 0, - 75, - 1, - 0, - 0, - 0, - 0, - 77, - 1, - 0, - 0, - 0, - 0, - 79, - 1, - 0, - 0, - 0, - 0, - 81, - 1, - 0, - 0, - 0, - 0, - 83, - 1, - 0, - 0, - 0, - 0, - 85, - 1, - 0, - 0, - 0, - 0, - 87, - 1, - 0, - 0, - 0, - 0, - 89, - 1, - 0, - 0, - 0, - 0, - 91, - 1, - 0, - 0, - 0, - 0, - 93, - 1, - 0, - 0, - 0, - 0, - 95, - 1, - 0, - 0, - 0, - 0, - 97, - 1, - 0, - 0, - 0, - 0, - 99, - 1, - 0, - 0, - 0, - 0, - 101, - 1, - 0, - 0, - 0, - 0, - 103, - 1, - 0, - 0, - 0, - 0, - 105, - 1, - 0, - 0, - 0, - 0, - 107, - 1, - 0, - 0, - 0, - 0, - 109, - 1, - 0, - 0, - 0, - 0, - 111, - 1, - 0, - 0, - 0, - 0, - 113, - 1, - 0, - 0, - 0, - 0, - 115, - 1, - 0, - 0, - 0, - 0, - 117, - 1, - 0, - 0, - 0, - 0, - 119, - 1, - 0, - 0, - 0, - 0, - 121, - 1, - 0, - 0, - 0, - 0, - 123, - 1, - 0, - 0, - 0, - 0, - 125, - 1, - 0, - 0, - 0, - 0, - 127, - 1, - 0, - 0, - 0, - 0, - 129, - 1, - 0, - 0, - 0, - 0, - 131, - 1, - 0, - 0, - 0, - 0, - 133, - 1, - 0, - 0, - 0, - 0, - 135, - 1, - 0, - 0, - 0, - 0, - 137, - 1, - 0, - 0, - 0, - 0, - 139, - 1, - 0, - 0, - 0, - 0, - 141, - 1, - 0, - 0, - 0, - 0, - 143, - 1, - 0, - 0, - 0, - 0, - 145, - 1, - 0, - 0, - 0, - 1, - 147, - 1, - 0, - 0, - 0, - 3, - 149, - 1, - 0, - 0, - 0, - 5, - 151, - 1, - 0, - 0, - 0, - 7, - 153, - 1, - 0, - 0, - 0, - 9, - 155, - 1, - 0, - 0, - 0, - 11, - 157, - 1, - 0, - 0, - 0, - 13, - 161, - 1, - 0, - 0, - 0, - 15, - 165, - 1, - 0, - 0, - 0, - 17, - 169, - 1, - 0, - 0, - 0, - 19, - 174, - 1, - 0, - 0, - 0, - 21, - 179, - 1, - 0, - 0, - 0, - 23, - 184, - 1, - 0, - 0, - 0, - 25, - 190, - 1, - 0, - 0, - 0, - 27, - 195, - 1, - 0, - 0, - 0, - 29, - 200, - 1, - 0, - 0, - 0, - 31, - 205, - 1, - 0, - 0, - 0, - 33, - 211, - 1, - 0, - 0, - 0, - 35, - 217, - 1, - 0, - 0, - 0, - 37, - 223, - 1, - 0, - 0, - 0, - 39, - 227, - 1, - 0, - 0, - 0, - 41, - 232, - 1, - 0, - 0, - 0, - 43, - 235, - 1, - 0, - 0, - 0, - 45, - 239, - 1, - 0, - 0, - 0, - 47, - 243, - 1, - 0, - 0, - 0, - 49, - 248, - 1, - 0, - 0, - 0, - 51, - 253, - 1, - 0, - 0, - 0, - 53, - 258, - 1, - 0, - 0, - 0, - 55, - 263, - 1, - 0, - 0, - 0, - 57, - 269, - 1, - 0, - 0, - 0, - 59, - 275, - 1, - 0, - 0, - 0, - 61, - 281, - 1, - 0, - 0, - 0, - 63, - 286, - 1, - 0, - 0, - 0, - 65, - 292, - 1, - 0, - 0, - 0, - 67, - 298, - 1, - 0, - 0, - 0, - 69, - 302, - 1, - 0, - 0, - 0, - 71, - 307, - 1, - 0, - 0, - 0, - 73, - 313, - 1, - 0, - 0, - 0, - 75, - 317, - 1, - 0, - 0, - 0, - 77, - 322, - 1, - 0, - 0, - 0, - 79, - 328, - 1, - 0, - 0, - 0, - 81, - 334, - 1, - 0, - 0, - 0, - 83, - 346, - 1, - 0, - 0, - 0, - 85, - 351, - 1, - 0, - 0, - 0, - 87, - 356, - 1, - 0, - 0, - 0, - 89, - 361, - 1, - 0, - 0, - 0, - 91, - 372, - 1, - 0, - 0, - 0, - 93, - 378, - 1, - 0, - 0, - 0, - 95, - 383, - 1, - 0, - 0, - 0, - 97, - 392, - 1, - 0, - 0, - 0, - 99, - 397, - 1, - 0, - 0, - 0, - 101, - 402, - 1, - 0, - 0, - 0, - 103, - 406, - 1, - 0, - 0, - 0, - 105, - 411, - 1, - 0, - 0, - 0, - 107, - 416, - 1, - 0, - 0, - 0, - 109, - 424, - 1, - 0, - 0, - 0, - 111, - 432, - 1, - 0, - 0, - 0, - 113, - 438, - 1, - 0, - 0, - 0, - 115, - 440, - 1, - 0, - 0, - 0, - 117, - 442, - 1, - 0, - 0, - 0, - 119, - 444, - 1, - 0, - 0, - 0, - 121, - 446, - 1, - 0, - 0, - 0, - 123, - 448, - 1, - 0, - 0, - 0, - 125, - 450, - 1, - 0, - 0, - 0, - 127, - 453, - 1, - 0, - 0, - 0, - 129, - 455, - 1, - 0, - 0, - 0, - 131, - 458, - 1, - 0, - 0, - 0, - 133, - 460, - 1, - 0, - 0, - 0, - 135, - 463, - 1, - 0, - 0, - 0, - 137, - 466, - 1, - 0, - 0, - 0, - 139, - 473, - 1, - 0, - 0, - 0, - 141, - 476, - 1, - 0, - 0, - 0, - 143, - 488, - 1, - 0, - 0, - 0, - 145, - 496, - 1, - 0, - 0, - 0, - 147, - 148, - 5, - 40, - 0, - 0, - 148, - 2, - 1, - 0, - 0, - 0, - 149, - 150, - 5, - 41, - 0, - 0, - 150, - 4, - 1, - 0, - 0, - 0, - 151, - 152, - 5, - 91, - 0, - 0, - 152, - 6, - 1, - 0, - 0, - 0, - 153, - 154, - 5, - 44, - 0, - 0, - 154, - 8, - 1, - 0, - 0, - 0, - 155, - 156, - 5, - 93, - 0, - 0, - 156, - 10, - 1, - 0, - 0, - 0, - 157, - 158, - 5, - 115, - 0, - 0, - 158, - 159, - 5, - 105, - 0, - 0, - 159, - 160, - 5, - 110, - 0, - 0, - 160, - 12, - 1, - 0, - 0, - 0, - 161, - 162, - 5, - 99, - 0, - 0, - 162, - 163, - 5, - 111, - 0, - 0, - 163, - 164, - 5, - 115, - 0, - 0, - 164, - 14, - 1, - 0, - 0, - 0, - 165, - 166, - 5, - 116, - 0, - 0, - 166, - 167, - 5, - 97, - 0, - 0, - 167, - 168, - 5, - 110, - 0, - 0, - 168, - 16, - 1, - 0, - 0, - 0, - 169, - 170, - 5, - 97, - 0, - 0, - 170, - 171, - 5, - 115, - 0, - 0, - 171, - 172, - 5, - 105, - 0, - 0, - 172, - 173, - 5, - 110, - 0, - 0, - 173, - 18, - 1, - 0, - 0, - 0, - 174, - 175, - 5, - 97, - 0, - 0, - 175, - 176, - 5, - 99, - 0, - 0, - 176, - 177, - 5, - 111, - 0, - 0, - 177, - 178, - 5, - 115, - 0, - 0, - 178, - 20, - 1, - 0, - 0, - 0, - 179, - 180, - 5, - 97, - 0, - 0, - 180, - 181, - 5, - 116, - 0, - 0, - 181, - 182, - 5, - 97, - 0, - 0, - 182, - 183, - 5, - 110, - 0, - 0, - 183, - 22, - 1, - 0, - 0, - 0, - 184, - 185, - 5, - 97, - 0, - 0, - 185, - 186, - 5, - 116, - 0, - 0, - 186, - 187, - 5, - 97, - 0, - 0, - 187, - 188, - 5, - 110, - 0, - 0, - 188, - 189, - 5, - 50, - 0, - 0, - 189, - 24, - 1, - 0, - 0, - 0, - 190, - 191, - 5, - 115, - 0, - 0, - 191, - 192, - 5, - 105, - 0, - 0, - 192, - 193, - 5, - 110, - 0, - 0, - 193, - 194, - 5, - 104, - 0, - 0, - 194, - 26, - 1, - 0, - 0, - 0, - 195, - 196, - 5, - 99, - 0, - 0, - 196, - 197, - 5, - 111, - 0, - 0, - 197, - 198, - 5, - 115, - 0, - 0, - 198, - 199, - 5, - 104, - 0, - 0, - 199, - 28, - 1, - 0, - 0, - 0, - 200, - 201, - 5, - 116, - 0, - 0, - 201, - 202, - 5, - 97, - 0, - 0, - 202, - 203, - 5, - 110, - 0, - 0, - 203, - 204, - 5, - 104, - 0, - 0, - 204, - 30, - 1, - 0, - 0, - 0, - 205, - 206, - 5, - 97, - 0, - 0, - 206, - 207, - 5, - 115, - 0, - 0, - 207, - 208, - 5, - 105, - 0, - 0, - 208, - 209, - 5, - 110, - 0, - 0, - 209, - 210, - 5, - 104, - 0, - 0, - 210, - 32, - 1, - 0, - 0, - 0, - 211, - 212, - 5, - 97, - 0, - 0, - 212, - 213, - 5, - 99, - 0, - 0, - 213, - 214, - 5, - 111, - 0, - 0, - 214, - 215, - 5, - 115, - 0, - 0, - 215, - 216, - 5, - 104, - 0, - 0, - 216, - 34, - 1, - 0, - 0, - 0, - 217, - 218, - 5, - 97, - 0, - 0, - 218, - 219, - 5, - 116, - 0, - 0, - 219, - 220, - 5, - 97, - 0, - 0, - 220, - 221, - 5, - 110, - 0, - 0, - 221, - 222, - 5, - 104, - 0, - 0, - 222, - 36, - 1, - 0, - 0, - 0, - 223, - 224, - 5, - 97, - 0, - 0, - 224, - 225, - 5, - 98, - 0, - 0, - 225, - 226, - 5, - 115, - 0, - 0, - 226, - 38, - 1, - 0, - 0, - 0, - 227, - 228, - 5, - 115, - 0, - 0, - 228, - 229, - 5, - 113, - 0, - 0, - 229, - 230, - 5, - 114, - 0, - 0, - 230, - 231, - 5, - 116, - 0, - 0, - 231, - 40, - 1, - 0, - 0, - 0, - 232, - 233, - 5, - 108, - 0, - 0, - 233, - 234, - 5, - 110, - 0, - 0, - 234, - 42, - 1, - 0, - 0, - 0, - 235, - 236, - 5, - 108, - 0, - 0, - 236, - 237, - 5, - 111, - 0, - 0, - 237, - 238, - 5, - 103, - 0, - 0, - 238, - 44, - 1, - 0, - 0, - 0, - 239, - 240, - 5, - 101, - 0, - 0, - 240, - 241, - 5, - 120, - 0, - 0, - 241, - 242, - 5, - 112, - 0, - 0, - 242, - 46, - 1, - 0, - 0, - 0, - 243, - 244, - 5, - 115, - 0, - 0, - 244, - 245, - 5, - 109, - 0, - 0, - 245, - 246, - 5, - 105, - 0, - 0, - 246, - 247, - 5, - 110, - 0, - 0, - 247, - 48, - 1, - 0, - 0, - 0, - 248, - 249, - 5, - 115, - 0, - 0, - 249, - 250, - 5, - 109, - 0, - 0, - 250, - 251, - 5, - 97, - 0, - 0, - 251, - 252, - 5, - 120, - 0, - 0, - 252, - 50, - 1, - 0, - 0, - 0, - 253, - 254, - 5, - 116, - 0, - 0, - 254, - 255, - 5, - 109, - 0, - 0, - 255, - 256, - 5, - 105, - 0, - 0, - 256, - 257, - 5, - 110, - 0, - 0, - 257, - 52, - 1, - 0, - 0, - 0, - 258, - 259, - 5, - 116, - 0, - 0, - 259, - 260, - 5, - 109, - 0, - 0, - 260, - 261, - 5, - 97, - 0, - 0, - 261, - 262, - 5, - 120, - 0, - 0, - 262, - 54, - 1, - 0, - 0, - 0, - 263, - 264, - 5, - 116, - 0, - 0, - 264, - 265, - 5, - 110, - 0, - 0, - 265, - 266, - 5, - 111, - 0, - 0, - 266, - 267, - 5, - 114, - 0, - 0, - 267, - 268, - 5, - 109, - 0, - 0, - 268, - 56, - 1, - 0, - 0, - 0, - 269, - 270, - 5, - 115, - 0, - 0, - 270, - 271, - 5, - 110, - 0, - 0, - 271, - 272, - 5, - 111, - 0, - 0, - 272, - 273, - 5, - 114, - 0, - 0, - 273, - 274, - 5, - 109, - 0, - 0, - 274, - 58, - 1, - 0, - 0, - 0, - 275, - 276, - 5, - 102, - 0, - 0, - 276, - 277, - 5, - 108, - 0, - 0, - 277, - 278, - 5, - 111, - 0, - 0, - 278, - 279, - 5, - 111, - 0, - 0, - 279, - 280, - 5, - 114, - 0, - 0, - 280, - 60, - 1, - 0, - 0, - 0, - 281, - 282, - 5, - 99, - 0, - 0, - 282, - 283, - 5, - 101, - 0, - 0, - 283, - 284, - 5, - 105, - 0, - 0, - 284, - 285, - 5, - 108, - 0, - 0, - 285, - 62, - 1, - 0, - 0, - 0, - 286, - 287, - 5, - 114, - 0, - 0, - 287, - 288, - 5, - 111, - 0, - 0, - 288, - 289, - 5, - 117, - 0, - 0, - 289, - 290, - 5, - 110, - 0, - 0, - 290, - 291, - 5, - 100, - 0, - 0, - 291, - 64, - 1, - 0, - 0, - 0, - 292, - 293, - 5, - 103, - 0, - 0, - 293, - 294, - 5, - 97, - 0, - 0, - 294, - 295, - 5, - 109, - 0, - 0, - 295, - 296, - 5, - 109, - 0, - 0, - 296, - 297, - 5, - 97, - 0, - 0, - 297, - 66, - 1, - 0, - 0, - 0, - 298, - 299, - 5, - 112, - 0, - 0, - 299, - 300, - 5, - 111, - 0, - 0, - 300, - 301, - 5, - 119, - 0, - 0, - 301, - 68, - 1, - 0, - 0, - 0, - 302, - 303, - 5, - 115, - 0, - 0, - 303, - 304, - 5, - 105, - 0, - 0, - 304, - 305, - 5, - 103, - 0, - 0, - 305, - 306, - 5, - 109, - 0, - 0, - 306, - 70, - 1, - 0, - 0, - 0, - 307, - 308, - 5, - 99, - 0, - 0, - 308, - 309, - 5, - 108, - 0, - 0, - 309, - 310, - 5, - 97, - 0, - 0, - 310, - 311, - 5, - 109, - 0, - 0, - 311, - 312, - 5, - 112, - 0, - 0, - 312, - 72, - 1, - 0, - 0, - 0, - 313, - 314, - 5, - 102, - 0, - 0, - 314, - 315, - 5, - 102, - 0, - 0, - 315, - 316, - 5, - 116, - 0, - 0, - 316, - 74, - 1, - 0, - 0, - 0, - 317, - 318, - 5, - 105, - 0, - 0, - 318, - 319, - 5, - 102, - 0, - 0, - 319, - 320, - 5, - 102, - 0, - 0, - 320, - 321, - 5, - 116, - 0, - 0, - 321, - 76, - 1, - 0, - 0, - 0, - 322, - 323, - 5, - 97, - 0, - 0, - 323, - 324, - 5, - 110, - 0, - 0, - 324, - 325, - 5, - 103, - 0, - 0, - 325, - 326, - 5, - 108, - 0, - 0, - 326, - 327, - 5, - 101, - 0, - 0, - 327, - 78, - 1, - 0, - 0, - 0, - 328, - 329, - 5, - 112, - 0, - 0, - 329, - 330, - 5, - 114, - 0, - 0, - 330, - 331, - 5, - 105, - 0, - 0, - 331, - 332, - 5, - 110, - 0, - 0, - 332, - 333, - 5, - 116, - 0, - 0, - 333, - 80, - 1, - 0, - 0, - 0, - 334, - 335, - 5, - 112, - 0, - 0, - 335, - 336, - 5, - 114, - 0, - 0, - 336, - 337, - 5, - 105, - 0, - 0, - 337, - 338, - 5, - 110, - 0, - 0, - 338, - 339, - 5, - 116, - 0, - 0, - 339, - 340, - 5, - 95, - 0, - 0, - 340, - 341, - 5, - 115, - 0, - 0, - 341, - 342, - 5, - 104, - 0, - 0, - 342, - 343, - 5, - 97, - 0, - 0, - 343, - 344, - 5, - 112, - 0, - 0, - 344, - 345, - 5, - 101, - 0, - 0, - 345, - 82, - 1, - 0, - 0, - 0, - 346, - 347, - 5, - 112, - 0, - 0, - 347, - 348, - 5, - 115, - 0, - 0, - 348, - 349, - 5, - 104, - 0, - 0, - 349, - 350, - 5, - 112, - 0, - 0, - 350, - 84, - 1, - 0, - 0, - 0, - 351, - 352, - 5, - 108, - 0, - 0, - 352, - 353, - 5, - 101, - 0, - 0, - 353, - 354, - 5, - 114, - 0, - 0, - 354, - 355, - 5, - 112, - 0, - 0, - 355, - 86, - 1, - 0, - 0, - 0, - 356, - 357, - 5, - 115, - 0, - 0, - 357, - 358, - 5, - 116, - 0, - 0, - 358, - 359, - 5, - 101, - 0, - 0, - 359, - 360, - 5, - 112, - 0, - 0, - 360, - 88, - 1, - 0, - 0, - 0, - 361, - 362, - 5, - 115, - 0, - 0, - 362, - 363, - 5, - 109, - 0, - 0, - 363, - 364, - 5, - 111, - 0, - 0, - 364, - 365, - 5, - 111, - 0, - 0, - 365, - 366, - 5, - 116, - 0, - 0, - 366, - 367, - 5, - 104, - 0, - 0, - 367, - 368, - 5, - 115, - 0, - 0, - 368, - 369, - 5, - 116, - 0, - 0, - 369, - 370, - 5, - 101, - 0, - 0, - 370, - 371, - 5, - 112, - 0, - 0, - 371, - 90, - 1, - 0, - 0, - 0, - 372, - 373, - 5, - 102, - 0, - 0, - 373, - 374, - 5, - 114, - 0, - 0, - 374, - 375, - 5, - 97, - 0, - 0, - 375, - 376, - 5, - 99, - 0, - 0, - 376, - 377, - 5, - 116, - 0, - 0, - 377, - 92, - 1, - 0, - 0, - 0, - 378, - 379, - 5, - 114, - 0, - 0, - 379, - 380, - 5, - 101, - 0, - 0, - 380, - 381, - 5, - 108, - 0, - 0, - 381, - 382, - 5, - 117, - 0, - 0, - 382, - 94, - 1, - 0, - 0, - 0, - 383, - 384, - 5, - 115, - 0, - 0, - 384, - 385, - 5, - 111, - 0, - 0, - 385, - 386, - 5, - 102, - 0, - 0, - 386, - 387, - 5, - 116, - 0, - 0, - 387, - 388, - 5, - 112, - 0, - 0, - 388, - 389, - 5, - 108, - 0, - 0, - 389, - 390, - 5, - 117, - 0, - 0, - 390, - 391, - 5, - 115, - 0, - 0, - 391, - 96, - 1, - 0, - 0, - 0, - 392, - 393, - 5, - 103, - 0, - 0, - 393, - 394, - 5, - 101, - 0, - 0, - 394, - 395, - 5, - 108, - 0, - 0, - 395, - 396, - 5, - 117, - 0, - 0, - 396, - 98, - 1, - 0, - 0, - 0, - 397, - 398, - 5, - 115, - 0, - 0, - 398, - 399, - 5, - 105, - 0, - 0, - 399, - 400, - 5, - 103, - 0, - 0, - 400, - 401, - 5, - 110, - 0, - 0, - 401, - 100, - 1, - 0, - 0, - 0, - 402, - 403, - 5, - 109, - 0, - 0, - 403, - 404, - 5, - 97, - 0, - 0, - 404, - 405, - 5, - 112, - 0, - 0, - 405, - 102, - 1, - 0, - 0, - 0, - 406, - 407, - 5, - 99, - 0, - 0, - 407, - 408, - 5, - 111, - 0, - 0, - 408, - 409, - 5, - 110, - 0, - 0, - 409, - 410, - 5, - 118, - 0, - 0, - 410, - 104, - 1, - 0, - 0, - 0, - 411, - 412, - 5, - 115, - 0, - 0, - 412, - 413, - 5, - 119, - 0, - 0, - 413, - 414, - 5, - 97, - 0, - 0, - 414, - 415, - 5, - 112, - 0, - 0, - 415, - 106, - 1, - 0, - 0, - 0, - 416, - 417, - 5, - 112, - 0, - 0, - 417, - 418, - 5, - 101, - 0, - 0, - 418, - 419, - 5, - 114, - 0, - 0, - 419, - 420, - 5, - 109, - 0, - 0, - 420, - 421, - 5, - 117, - 0, - 0, - 421, - 422, - 5, - 116, - 0, - 0, - 422, - 423, - 5, - 101, - 0, - 0, - 423, - 108, - 1, - 0, - 0, - 0, - 424, - 425, - 5, - 114, - 0, - 0, - 425, - 426, - 5, - 101, - 0, - 0, - 426, - 427, - 5, - 115, - 0, - 0, - 427, - 428, - 5, - 104, - 0, - 0, - 428, - 429, - 5, - 97, - 0, - 0, - 429, - 430, - 5, - 112, - 0, - 0, - 430, - 431, - 5, - 101, - 0, - 0, - 431, - 110, - 1, - 0, - 0, - 0, - 432, - 433, - 5, - 114, - 0, - 0, - 433, - 434, - 5, - 97, - 0, - 0, - 434, - 435, - 5, - 110, - 0, - 0, - 435, - 436, - 5, - 103, - 0, - 0, - 436, - 437, - 5, - 101, - 0, - 0, - 437, - 112, - 1, - 0, - 0, - 0, - 438, - 439, - 5, - 43, - 0, - 0, - 439, - 114, - 1, - 0, - 0, - 0, - 440, - 441, - 5, - 45, - 0, - 0, - 441, - 116, - 1, - 0, - 0, - 0, - 442, - 443, - 5, - 42, - 0, - 0, - 443, - 118, - 1, - 0, - 0, - 0, - 444, - 445, - 5, - 47, - 0, - 0, - 445, - 120, - 1, - 0, - 0, - 0, - 446, - 447, - 5, - 37, - 0, - 0, - 447, - 122, - 1, - 0, - 0, - 0, - 448, - 449, - 5, - 94, - 0, - 0, - 449, - 124, - 1, - 0, - 0, - 0, - 450, - 451, - 5, - 62, - 0, - 0, - 451, - 452, - 5, - 61, - 0, - 0, - 452, - 126, - 1, - 0, - 0, - 0, - 453, - 454, - 5, - 62, - 0, - 0, - 454, - 128, - 1, - 0, - 0, - 0, - 455, - 456, - 5, - 60, - 0, - 0, - 456, - 457, - 5, - 61, - 0, - 0, - 457, - 130, - 1, - 0, - 0, - 0, - 458, - 459, - 5, - 60, - 0, - 0, - 459, - 132, - 1, - 0, - 0, - 0, - 460, - 461, - 5, - 61, - 0, - 0, - 461, - 462, - 5, - 61, - 0, - 0, - 462, - 134, - 1, - 0, - 0, - 0, - 463, - 464, - 5, - 33, - 0, - 0, - 464, - 465, - 5, - 61, - 0, - 0, - 465, - 136, - 1, - 0, - 0, - 0, - 466, - 467, - 5, - 124, - 0, - 0, - 467, - 138, - 1, - 0, - 0, - 0, - 468, - 469, - 5, - 112, - 0, - 0, - 469, - 474, - 5, - 105, - 0, - 0, - 470, - 471, - 5, - 80, - 0, - 0, - 471, - 474, - 5, - 73, - 0, - 0, - 472, - 474, - 7, - 0, - 0, - 0, - 473, - 468, - 1, - 0, - 0, - 0, - 473, - 470, - 1, - 0, - 0, - 0, - 473, - 472, - 1, - 0, - 0, - 0, - 474, - 140, - 1, - 0, - 0, - 0, - 475, - 477, - 7, - 1, - 0, - 0, - 476, - 475, - 1, - 0, - 0, - 0, - 477, - 478, - 1, - 0, - 0, - 0, - 478, - 476, - 1, - 0, - 0, - 0, - 478, - 479, - 1, - 0, - 0, - 0, - 479, - 486, - 1, - 0, - 0, - 0, - 480, - 482, - 5, - 46, - 0, - 0, - 481, - 483, - 7, - 1, - 0, - 0, - 482, - 481, - 1, - 0, - 0, - 0, - 483, - 484, - 1, - 0, - 0, - 0, - 484, - 482, - 1, - 0, - 0, - 0, - 484, - 485, - 1, - 0, - 0, - 0, - 485, - 487, - 1, - 0, - 0, - 0, - 486, - 480, - 1, - 0, - 0, - 0, - 486, - 487, - 1, - 0, - 0, - 0, - 487, - 142, - 1, - 0, - 0, - 0, - 488, - 492, - 7, - 2, - 0, - 0, - 489, - 491, - 7, - 3, - 0, - 0, - 490, - 489, - 1, - 0, - 0, - 0, - 491, - 494, - 1, - 0, - 0, - 0, - 492, - 490, - 1, - 0, - 0, - 0, - 492, - 493, - 1, - 0, - 0, - 0, - 493, - 144, - 1, - 0, - 0, - 0, - 494, - 492, - 1, - 0, - 0, - 0, - 495, - 497, - 7, - 4, - 0, - 0, - 496, - 495, - 1, - 0, - 0, - 0, - 497, - 498, - 1, - 0, - 0, - 0, - 498, - 496, - 1, - 0, - 0, - 0, - 498, - 499, - 1, - 0, - 0, - 0, - 499, - 500, - 1, - 0, - 0, - 0, - 500, - 501, - 6, - 72, - 0, - 0, - 501, - 146, - 1, - 0, - 0, - 0, - 7, - 0, - 473, - 478, - 484, - 486, - 492, - 498, - 1, - 6, - 0, - 0, + 4,0,76,523,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5, + 2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2, + 13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7, + 19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2, + 26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7, + 32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2, + 39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7, + 45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2, + 52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7, + 58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2, + 65,7,65,2,66,7,66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7, + 71,2,72,7,72,2,73,7,73,2,74,7,74,2,75,7,75,1,0,1,0,1,1,1,1,1,2,1, + 2,1,3,1,3,1,4,1,4,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1, + 7,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1, + 10,1,11,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,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,16,1,16,1,17,1,17,1,17,1,17,1,17,1, + 17,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1, + 21,1,21,1,21,1,21,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,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, + 28,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,31,1, + 31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,32,1,33,1,33,1, + 33,1,33,1,34,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,35,1,35,1, + 36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1, + 38,1,38,1,39,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,40,1,41,1,41,1,41,1,41,1,41,1,42,1, + 42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1, + 44,1,44,1,44,1,44,1,44,1,44,1,44,1,45,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,47,1,47,1,47,1,47,1,47,1,47,1, + 47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1, + 50,1,50,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1,52,1,53,1, + 53,1,53,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,54,1,54,1,54,1,54,1, + 54,1,54,1,55,1,55,1,55,1,55,1,55,1,55,1,56,1,56,1,56,1,56,1,56,1, + 57,1,57,1,57,1,57,1,57,1,58,1,58,1,58,1,58,1,58,1,59,1,59,1,60,1, + 60,1,61,1,61,1,62,1,62,1,63,1,63,1,64,1,64,1,65,1,65,1,65,1,66,1, + 66,1,67,1,67,1,67,1,68,1,68,1,69,1,69,1,69,1,70,1,70,1,70,1,71,1, + 71,1,72,1,72,1,72,1,72,1,72,3,72,495,8,72,1,73,4,73,498,8,73,11, + 73,12,73,499,1,73,1,73,4,73,504,8,73,11,73,12,73,505,3,73,508,8, + 73,1,74,1,74,5,74,512,8,74,10,74,12,74,515,9,74,1,75,4,75,518,8, + 75,11,75,12,75,519,1,75,1,75,0,0,76,1,1,3,2,5,3,7,4,9,5,11,6,13, + 7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18, + 37,19,39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29, + 59,30,61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77,39,79,40, + 81,41,83,42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,99,50,101, + 51,103,52,105,53,107,54,109,55,111,56,113,57,115,58,117,59,119,60, + 121,61,123,62,125,63,127,64,129,65,131,66,133,67,135,68,137,69,139, + 70,141,71,143,72,145,73,147,74,149,75,151,76,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,529,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7, + 1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17, + 1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27, + 1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37, + 1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47, + 1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57, + 1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67, + 1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77, + 1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87, + 1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97, + 1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0, + 107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0, + 0,0,0,117,1,0,0,0,0,119,1,0,0,0,0,121,1,0,0,0,0,123,1,0,0,0,0,125, + 1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0, + 0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1, + 0,0,0,0,145,1,0,0,0,0,147,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,1, + 153,1,0,0,0,3,155,1,0,0,0,5,157,1,0,0,0,7,159,1,0,0,0,9,161,1,0, + 0,0,11,163,1,0,0,0,13,167,1,0,0,0,15,171,1,0,0,0,17,175,1,0,0,0, + 19,180,1,0,0,0,21,185,1,0,0,0,23,190,1,0,0,0,25,196,1,0,0,0,27,201, + 1,0,0,0,29,206,1,0,0,0,31,211,1,0,0,0,33,217,1,0,0,0,35,223,1,0, + 0,0,37,229,1,0,0,0,39,233,1,0,0,0,41,238,1,0,0,0,43,241,1,0,0,0, + 45,245,1,0,0,0,47,249,1,0,0,0,49,254,1,0,0,0,51,259,1,0,0,0,53,264, + 1,0,0,0,55,269,1,0,0,0,57,275,1,0,0,0,59,281,1,0,0,0,61,287,1,0, + 0,0,63,292,1,0,0,0,65,298,1,0,0,0,67,304,1,0,0,0,69,308,1,0,0,0, + 71,313,1,0,0,0,73,319,1,0,0,0,75,323,1,0,0,0,77,328,1,0,0,0,79,334, + 1,0,0,0,81,340,1,0,0,0,83,352,1,0,0,0,85,357,1,0,0,0,87,362,1,0, + 0,0,89,367,1,0,0,0,91,378,1,0,0,0,93,384,1,0,0,0,95,389,1,0,0,0, + 97,398,1,0,0,0,99,403,1,0,0,0,101,408,1,0,0,0,103,412,1,0,0,0,105, + 417,1,0,0,0,107,422,1,0,0,0,109,430,1,0,0,0,111,438,1,0,0,0,113, + 444,1,0,0,0,115,449,1,0,0,0,117,454,1,0,0,0,119,459,1,0,0,0,121, + 461,1,0,0,0,123,463,1,0,0,0,125,465,1,0,0,0,127,467,1,0,0,0,129, + 469,1,0,0,0,131,471,1,0,0,0,133,474,1,0,0,0,135,476,1,0,0,0,137, + 479,1,0,0,0,139,481,1,0,0,0,141,484,1,0,0,0,143,487,1,0,0,0,145, + 494,1,0,0,0,147,497,1,0,0,0,149,509,1,0,0,0,151,517,1,0,0,0,153, + 154,5,40,0,0,154,2,1,0,0,0,155,156,5,41,0,0,156,4,1,0,0,0,157,158, + 5,91,0,0,158,6,1,0,0,0,159,160,5,44,0,0,160,8,1,0,0,0,161,162,5, + 93,0,0,162,10,1,0,0,0,163,164,5,115,0,0,164,165,5,105,0,0,165,166, + 5,110,0,0,166,12,1,0,0,0,167,168,5,99,0,0,168,169,5,111,0,0,169, + 170,5,115,0,0,170,14,1,0,0,0,171,172,5,116,0,0,172,173,5,97,0,0, + 173,174,5,110,0,0,174,16,1,0,0,0,175,176,5,97,0,0,176,177,5,115, + 0,0,177,178,5,105,0,0,178,179,5,110,0,0,179,18,1,0,0,0,180,181,5, + 97,0,0,181,182,5,99,0,0,182,183,5,111,0,0,183,184,5,115,0,0,184, + 20,1,0,0,0,185,186,5,97,0,0,186,187,5,116,0,0,187,188,5,97,0,0,188, + 189,5,110,0,0,189,22,1,0,0,0,190,191,5,97,0,0,191,192,5,116,0,0, + 192,193,5,97,0,0,193,194,5,110,0,0,194,195,5,50,0,0,195,24,1,0,0, + 0,196,197,5,115,0,0,197,198,5,105,0,0,198,199,5,110,0,0,199,200, + 5,104,0,0,200,26,1,0,0,0,201,202,5,99,0,0,202,203,5,111,0,0,203, + 204,5,115,0,0,204,205,5,104,0,0,205,28,1,0,0,0,206,207,5,116,0,0, + 207,208,5,97,0,0,208,209,5,110,0,0,209,210,5,104,0,0,210,30,1,0, + 0,0,211,212,5,97,0,0,212,213,5,115,0,0,213,214,5,105,0,0,214,215, + 5,110,0,0,215,216,5,104,0,0,216,32,1,0,0,0,217,218,5,97,0,0,218, + 219,5,99,0,0,219,220,5,111,0,0,220,221,5,115,0,0,221,222,5,104,0, + 0,222,34,1,0,0,0,223,224,5,97,0,0,224,225,5,116,0,0,225,226,5,97, + 0,0,226,227,5,110,0,0,227,228,5,104,0,0,228,36,1,0,0,0,229,230,5, + 97,0,0,230,231,5,98,0,0,231,232,5,115,0,0,232,38,1,0,0,0,233,234, + 5,115,0,0,234,235,5,113,0,0,235,236,5,114,0,0,236,237,5,116,0,0, + 237,40,1,0,0,0,238,239,5,108,0,0,239,240,5,110,0,0,240,42,1,0,0, + 0,241,242,5,108,0,0,242,243,5,111,0,0,243,244,5,103,0,0,244,44,1, + 0,0,0,245,246,5,101,0,0,246,247,5,120,0,0,247,248,5,112,0,0,248, + 46,1,0,0,0,249,250,5,115,0,0,250,251,5,109,0,0,251,252,5,105,0,0, + 252,253,5,110,0,0,253,48,1,0,0,0,254,255,5,115,0,0,255,256,5,109, + 0,0,256,257,5,97,0,0,257,258,5,120,0,0,258,50,1,0,0,0,259,260,5, + 116,0,0,260,261,5,109,0,0,261,262,5,105,0,0,262,263,5,110,0,0,263, + 52,1,0,0,0,264,265,5,116,0,0,265,266,5,109,0,0,266,267,5,97,0,0, + 267,268,5,120,0,0,268,54,1,0,0,0,269,270,5,116,0,0,270,271,5,110, + 0,0,271,272,5,111,0,0,272,273,5,114,0,0,273,274,5,109,0,0,274,56, + 1,0,0,0,275,276,5,115,0,0,276,277,5,110,0,0,277,278,5,111,0,0,278, + 279,5,114,0,0,279,280,5,109,0,0,280,58,1,0,0,0,281,282,5,102,0,0, + 282,283,5,108,0,0,283,284,5,111,0,0,284,285,5,111,0,0,285,286,5, + 114,0,0,286,60,1,0,0,0,287,288,5,99,0,0,288,289,5,101,0,0,289,290, + 5,105,0,0,290,291,5,108,0,0,291,62,1,0,0,0,292,293,5,114,0,0,293, + 294,5,111,0,0,294,295,5,117,0,0,295,296,5,110,0,0,296,297,5,100, + 0,0,297,64,1,0,0,0,298,299,5,103,0,0,299,300,5,97,0,0,300,301,5, + 109,0,0,301,302,5,109,0,0,302,303,5,97,0,0,303,66,1,0,0,0,304,305, + 5,112,0,0,305,306,5,111,0,0,306,307,5,119,0,0,307,68,1,0,0,0,308, + 309,5,115,0,0,309,310,5,105,0,0,310,311,5,103,0,0,311,312,5,109, + 0,0,312,70,1,0,0,0,313,314,5,99,0,0,314,315,5,108,0,0,315,316,5, + 97,0,0,316,317,5,109,0,0,317,318,5,112,0,0,318,72,1,0,0,0,319,320, + 5,102,0,0,320,321,5,102,0,0,321,322,5,116,0,0,322,74,1,0,0,0,323, + 324,5,105,0,0,324,325,5,102,0,0,325,326,5,102,0,0,326,327,5,116, + 0,0,327,76,1,0,0,0,328,329,5,97,0,0,329,330,5,110,0,0,330,331,5, + 103,0,0,331,332,5,108,0,0,332,333,5,101,0,0,333,78,1,0,0,0,334,335, + 5,112,0,0,335,336,5,114,0,0,336,337,5,105,0,0,337,338,5,110,0,0, + 338,339,5,116,0,0,339,80,1,0,0,0,340,341,5,112,0,0,341,342,5,114, + 0,0,342,343,5,105,0,0,343,344,5,110,0,0,344,345,5,116,0,0,345,346, + 5,95,0,0,346,347,5,115,0,0,347,348,5,104,0,0,348,349,5,97,0,0,349, + 350,5,112,0,0,350,351,5,101,0,0,351,82,1,0,0,0,352,353,5,112,0,0, + 353,354,5,115,0,0,354,355,5,104,0,0,355,356,5,112,0,0,356,84,1,0, + 0,0,357,358,5,108,0,0,358,359,5,101,0,0,359,360,5,114,0,0,360,361, + 5,112,0,0,361,86,1,0,0,0,362,363,5,115,0,0,363,364,5,116,0,0,364, + 365,5,101,0,0,365,366,5,112,0,0,366,88,1,0,0,0,367,368,5,115,0,0, + 368,369,5,109,0,0,369,370,5,111,0,0,370,371,5,111,0,0,371,372,5, + 116,0,0,372,373,5,104,0,0,373,374,5,115,0,0,374,375,5,116,0,0,375, + 376,5,101,0,0,376,377,5,112,0,0,377,90,1,0,0,0,378,379,5,102,0,0, + 379,380,5,114,0,0,380,381,5,97,0,0,381,382,5,99,0,0,382,383,5,116, + 0,0,383,92,1,0,0,0,384,385,5,114,0,0,385,386,5,101,0,0,386,387,5, + 108,0,0,387,388,5,117,0,0,388,94,1,0,0,0,389,390,5,115,0,0,390,391, + 5,111,0,0,391,392,5,102,0,0,392,393,5,116,0,0,393,394,5,112,0,0, + 394,395,5,108,0,0,395,396,5,117,0,0,396,397,5,115,0,0,397,96,1,0, + 0,0,398,399,5,103,0,0,399,400,5,101,0,0,400,401,5,108,0,0,401,402, + 5,117,0,0,402,98,1,0,0,0,403,404,5,115,0,0,404,405,5,105,0,0,405, + 406,5,103,0,0,406,407,5,110,0,0,407,100,1,0,0,0,408,409,5,109,0, + 0,409,410,5,97,0,0,410,411,5,112,0,0,411,102,1,0,0,0,412,413,5,99, + 0,0,413,414,5,111,0,0,414,415,5,110,0,0,415,416,5,118,0,0,416,104, + 1,0,0,0,417,418,5,115,0,0,418,419,5,119,0,0,419,420,5,97,0,0,420, + 421,5,112,0,0,421,106,1,0,0,0,422,423,5,112,0,0,423,424,5,101,0, + 0,424,425,5,114,0,0,425,426,5,109,0,0,426,427,5,117,0,0,427,428, + 5,116,0,0,428,429,5,101,0,0,429,108,1,0,0,0,430,431,5,114,0,0,431, + 432,5,101,0,0,432,433,5,115,0,0,433,434,5,104,0,0,434,435,5,97,0, + 0,435,436,5,112,0,0,436,437,5,101,0,0,437,110,1,0,0,0,438,439,5, + 114,0,0,439,440,5,97,0,0,440,441,5,110,0,0,441,442,5,103,0,0,442, + 443,5,101,0,0,443,112,1,0,0,0,444,445,5,116,0,0,445,446,5,111,0, + 0,446,447,5,112,0,0,447,448,5,107,0,0,448,114,1,0,0,0,449,450,5, + 98,0,0,450,451,5,111,0,0,451,452,5,116,0,0,452,453,5,107,0,0,453, + 116,1,0,0,0,454,455,5,112,0,0,455,456,5,105,0,0,456,457,5,110,0, + 0,457,458,5,118,0,0,458,118,1,0,0,0,459,460,5,43,0,0,460,120,1,0, + 0,0,461,462,5,45,0,0,462,122,1,0,0,0,463,464,5,42,0,0,464,124,1, + 0,0,0,465,466,5,47,0,0,466,126,1,0,0,0,467,468,5,37,0,0,468,128, + 1,0,0,0,469,470,5,94,0,0,470,130,1,0,0,0,471,472,5,62,0,0,472,473, + 5,61,0,0,473,132,1,0,0,0,474,475,5,62,0,0,475,134,1,0,0,0,476,477, + 5,60,0,0,477,478,5,61,0,0,478,136,1,0,0,0,479,480,5,60,0,0,480,138, + 1,0,0,0,481,482,5,61,0,0,482,483,5,61,0,0,483,140,1,0,0,0,484,485, + 5,33,0,0,485,486,5,61,0,0,486,142,1,0,0,0,487,488,5,124,0,0,488, + 144,1,0,0,0,489,490,5,112,0,0,490,495,5,105,0,0,491,492,5,80,0,0, + 492,495,5,73,0,0,493,495,7,0,0,0,494,489,1,0,0,0,494,491,1,0,0,0, + 494,493,1,0,0,0,495,146,1,0,0,0,496,498,7,1,0,0,497,496,1,0,0,0, + 498,499,1,0,0,0,499,497,1,0,0,0,499,500,1,0,0,0,500,507,1,0,0,0, + 501,503,5,46,0,0,502,504,7,1,0,0,503,502,1,0,0,0,504,505,1,0,0,0, + 505,503,1,0,0,0,505,506,1,0,0,0,506,508,1,0,0,0,507,501,1,0,0,0, + 507,508,1,0,0,0,508,148,1,0,0,0,509,513,7,2,0,0,510,512,7,3,0,0, + 511,510,1,0,0,0,512,515,1,0,0,0,513,511,1,0,0,0,513,514,1,0,0,0, + 514,150,1,0,0,0,515,513,1,0,0,0,516,518,7,4,0,0,517,516,1,0,0,0, + 518,519,1,0,0,0,519,517,1,0,0,0,519,520,1,0,0,0,520,521,1,0,0,0, + 521,522,6,75,0,0,522,152,1,0,0,0,7,0,494,499,505,507,513,519,1,6, + 0,0 ] - class MathExprLexer(Lexer): + atn = ATNDeserializer().deserialize(serializedATN()) - decisionsToDFA = [DFA(ds, i) for i, ds in enumerate(atn.decisionToState)] + decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] T__0 = 1 T__1 = 2 @@ -4341,254 +258,76 @@ class MathExprLexer(Lexer): PERM = 54 RESHAPE = 55 RANGE = 56 - PLUS = 57 - MINUS = 58 - MULT = 59 - DIV = 60 - MOD = 61 - POW = 62 - GE = 63 - GT = 64 - LE = 65 - LT = 66 - EQ = 67 - NE = 68 - PIPE = 69 - CONSTANT = 70 - NUMBER = 71 - VARIABLE = 72 - WS = 73 + TOPK = 57 + BOTK = 58 + PINV = 59 + PLUS = 60 + MINUS = 61 + MULT = 62 + DIV = 63 + MOD = 64 + POW = 65 + GE = 66 + GT = 67 + LE = 68 + LT = 69 + EQ = 70 + NE = 71 + PIPE = 72 + CONSTANT = 73 + NUMBER = 74 + VARIABLE = 75 + WS = 76 - channelNames = ["DEFAULT_TOKEN_CHANNEL", "HIDDEN"] + channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] - modeNames = ["DEFAULT_MODE"] + 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'", - "'print_shape'", - "'pshp'", - "'lerp'", - "'step'", - "'smoothstep'", - "'fract'", - "'relu'", - "'softplus'", - "'gelu'", - "'sign'", - "'map'", - "'conv'", - "'swap'", - "'permute'", - "'reshape'", - "'range'", - "'+'", - "'-'", - "'*'", - "'/'", - "'%'", - "'^'", - "'>='", - "'>'", - "'<='", - "'<'", - "'=='", - "'!='", - "'|'", - ] + 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'", "'print_shape'", "'pshp'", "'lerp'", "'step'", "'smoothstep'", + "'fract'", "'relu'", "'softplus'", "'gelu'", "'sign'", "'map'", + "'conv'", "'swap'", "'permute'", "'reshape'", "'range'", "'topk'", + "'botk'", "'pinv'", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", + "'>='", "'>'", "'<='", "'<'", "'=='", "'!='", "'|'" ] - 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", - "PRINT_SHAPE_L", - "PRINT_SHAPE", - "LERP", - "STEP", - "SMOOTHSTEP", - "FRACT", - "RELU", - "SOFTPLUS", - "GELU", - "SIGN", - "MAP", - "CONV", - "SWAP", - "PERM", - "RESHAPE", - "RANGE", - "PLUS", - "MINUS", - "MULT", - "DIV", - "MOD", - "POW", - "GE", - "GT", - "LE", - "LT", - "EQ", - "NE", - "PIPE", - "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", "PRINT_SHAPE_L", "PRINT_SHAPE", + "LERP", "STEP", "SMOOTHSTEP", "FRACT", "RELU", "SOFTPLUS", "GELU", + "SIGN", "MAP", "CONV", "SWAP", "PERM", "RESHAPE", "RANGE", "TOPK", + "BOTK", "PINV", "PLUS", "MINUS", "MULT", "DIV", "MOD", "POW", + "GE", "GT", "LE", "LT", "EQ", "NE", "PIPE", "CONSTANT", "NUMBER", + "VARIABLE", "WS" ] - ruleNames = [ - "T__0", - "T__1", - "T__2", - "T__3", - "T__4", - "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", - "PRINT_SHAPE_L", - "PRINT_SHAPE", - "LERP", - "STEP", - "SMOOTHSTEP", - "FRACT", - "RELU", - "SOFTPLUS", - "GELU", - "SIGN", - "MAP", - "CONV", - "SWAP", - "PERM", - "RESHAPE", - "RANGE", - "PLUS", - "MINUS", - "MULT", - "DIV", - "MOD", - "POW", - "GE", - "GT", - "LE", - "LT", - "EQ", - "NE", - "PIPE", - "CONSTANT", - "NUMBER", - "VARIABLE", - "WS", - ] + ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "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", "PRINT_SHAPE_L", + "PRINT_SHAPE", "LERP", "STEP", "SMOOTHSTEP", "FRACT", + "RELU", "SOFTPLUS", "GELU", "SIGN", "MAP", "CONV", "SWAP", + "PERM", "RESHAPE", "RANGE", "TOPK", "BOTK", "PINV", "PLUS", + "MINUS", "MULT", "DIV", "MOD", "POW", "GE", "GT", "LE", + "LT", "EQ", "NE", "PIPE", "CONSTANT", "NUMBER", "VARIABLE", + "WS" ] grammarFileName = "MathExpr.g4" - def __init__(self, input=None, output: TextIO = sys.stdout): + def __init__(self, input=None, output:TextIO = sys.stdout): super().__init__(input, output) self.checkVersion("4.13.2") self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._actions = None self._predicates = None + + diff --git a/more_math/Parser/MathExprLexer.tokens b/more_math/Parser/MathExprLexer.tokens index e694236..254b000 100644 --- a/more_math/Parser/MathExprLexer.tokens +++ b/more_math/Parser/MathExprLexer.tokens @@ -54,23 +54,26 @@ SWAP=53 PERM=54 RESHAPE=55 RANGE=56 -PLUS=57 -MINUS=58 -MULT=59 -DIV=60 -MOD=61 -POW=62 -GE=63 -GT=64 -LE=65 -LT=66 -EQ=67 -NE=68 -PIPE=69 -CONSTANT=70 -NUMBER=71 -VARIABLE=72 -WS=73 +TOPK=57 +BOTK=58 +PINV=59 +PLUS=60 +MINUS=61 +MULT=62 +DIV=63 +MOD=64 +POW=65 +GE=66 +GT=67 +LE=68 +LT=69 +EQ=70 +NE=71 +PIPE=72 +CONSTANT=73 +NUMBER=74 +VARIABLE=75 +WS=76 '('=1 ')'=2 '['=3 @@ -127,16 +130,19 @@ WS=73 'permute'=54 'reshape'=55 'range'=56 -'+'=57 -'-'=58 -'*'=59 -'/'=60 -'%'=61 -'^'=62 -'>='=63 -'>'=64 -'<='=65 -'<'=66 -'=='=67 -'!='=68 -'|'=69 +'topk'=57 +'botk'=58 +'pinv'=59 +'+'=60 +'-'=61 +'*'=62 +'/'=63 +'%'=64 +'^'=65 +'>='=66 +'>'=67 +'<='=68 +'<'=69 +'=='=70 +'!='=71 +'|'=72 diff --git a/more_math/Parser/MathExprListener.py b/more_math/Parser/MathExprListener.py index 1659ae9..1d6a38f 100644 --- a/more_math/Parser/MathExprListener.py +++ b/more_math/Parser/MathExprListener.py @@ -1,661 +1,768 @@ # Generated from ./MathExpr.g4 by ANTLR 4.13.2 from antlr4 import * - if "." in __name__: from .MathExprParser import MathExprParser else: from MathExprParser import MathExprParser - # This class defines a complete listener for a parse tree produced by MathExprParser. class MathExprListener(ParseTreeListener): + # Enter a parse tree produced by MathExprParser#expr. - def enterExpr(self, ctx: MathExprParser.ExprContext): + def enterExpr(self, ctx:MathExprParser.ExprContext): pass # Exit a parse tree produced by MathExprParser#expr. - def exitExpr(self, ctx: MathExprParser.ExprContext): + def exitExpr(self, ctx:MathExprParser.ExprContext): pass + # Enter a parse tree produced by MathExprParser#LtExp. - def enterLtExp(self, ctx: MathExprParser.LtExpContext): + def enterLtExp(self, ctx:MathExprParser.LtExpContext): pass # Exit a parse tree produced by MathExprParser#LtExp. - def exitLtExp(self, ctx: MathExprParser.LtExpContext): + def exitLtExp(self, ctx:MathExprParser.LtExpContext): pass + # Enter a parse tree produced by MathExprParser#EqExp. - def enterEqExp(self, ctx: MathExprParser.EqExpContext): + def enterEqExp(self, ctx:MathExprParser.EqExpContext): pass # Exit a parse tree produced by MathExprParser#EqExp. - def exitEqExp(self, ctx: MathExprParser.EqExpContext): + def exitEqExp(self, ctx:MathExprParser.EqExpContext): pass + # Enter a parse tree produced by MathExprParser#ToAdd. - def enterToAdd(self, ctx: MathExprParser.ToAddContext): + def enterToAdd(self, ctx:MathExprParser.ToAddContext): pass # Exit a parse tree produced by MathExprParser#ToAdd. - def exitToAdd(self, ctx: MathExprParser.ToAddContext): + def exitToAdd(self, ctx:MathExprParser.ToAddContext): pass + # Enter a parse tree produced by MathExprParser#GeExp. - def enterGeExp(self, ctx: MathExprParser.GeExpContext): + def enterGeExp(self, ctx:MathExprParser.GeExpContext): pass # Exit a parse tree produced by MathExprParser#GeExp. - def exitGeExp(self, ctx: MathExprParser.GeExpContext): + def exitGeExp(self, ctx:MathExprParser.GeExpContext): pass + # Enter a parse tree produced by MathExprParser#LeExp. - def enterLeExp(self, ctx: MathExprParser.LeExpContext): + def enterLeExp(self, ctx:MathExprParser.LeExpContext): pass # Exit a parse tree produced by MathExprParser#LeExp. - def exitLeExp(self, ctx: MathExprParser.LeExpContext): + def exitLeExp(self, ctx:MathExprParser.LeExpContext): pass + # Enter a parse tree produced by MathExprParser#NeExp. - def enterNeExp(self, ctx: MathExprParser.NeExpContext): + def enterNeExp(self, ctx:MathExprParser.NeExpContext): pass # Exit a parse tree produced by MathExprParser#NeExp. - def exitNeExp(self, ctx: MathExprParser.NeExpContext): + def exitNeExp(self, ctx:MathExprParser.NeExpContext): pass + # Enter a parse tree produced by MathExprParser#GtExp. - def enterGtExp(self, ctx: MathExprParser.GtExpContext): + def enterGtExp(self, ctx:MathExprParser.GtExpContext): pass # Exit a parse tree produced by MathExprParser#GtExp. - def exitGtExp(self, ctx: MathExprParser.GtExpContext): + def exitGtExp(self, ctx:MathExprParser.GtExpContext): pass + # Enter a parse tree produced by MathExprParser#AddExp. - def enterAddExp(self, ctx: MathExprParser.AddExpContext): + def enterAddExp(self, ctx:MathExprParser.AddExpContext): pass # Exit a parse tree produced by MathExprParser#AddExp. - def exitAddExp(self, ctx: MathExprParser.AddExpContext): + def exitAddExp(self, ctx:MathExprParser.AddExpContext): pass + # Enter a parse tree produced by MathExprParser#ToMul. - def enterToMul(self, ctx: MathExprParser.ToMulContext): + def enterToMul(self, ctx:MathExprParser.ToMulContext): pass # Exit a parse tree produced by MathExprParser#ToMul. - def exitToMul(self, ctx: MathExprParser.ToMulContext): + def exitToMul(self, ctx:MathExprParser.ToMulContext): pass + # Enter a parse tree produced by MathExprParser#SubExp. - def enterSubExp(self, ctx: MathExprParser.SubExpContext): + def enterSubExp(self, ctx:MathExprParser.SubExpContext): pass # Exit a parse tree produced by MathExprParser#SubExp. - def exitSubExp(self, ctx: MathExprParser.SubExpContext): + def exitSubExp(self, ctx:MathExprParser.SubExpContext): pass + # Enter a parse tree produced by MathExprParser#MulExp. - def enterMulExp(self, ctx: MathExprParser.MulExpContext): + def enterMulExp(self, ctx:MathExprParser.MulExpContext): pass # Exit a parse tree produced by MathExprParser#MulExp. - def exitMulExp(self, ctx: MathExprParser.MulExpContext): + def exitMulExp(self, ctx:MathExprParser.MulExpContext): pass + # Enter a parse tree produced by MathExprParser#ModExp. - def enterModExp(self, ctx: MathExprParser.ModExpContext): + def enterModExp(self, ctx:MathExprParser.ModExpContext): pass # Exit a parse tree produced by MathExprParser#ModExp. - def exitModExp(self, ctx: MathExprParser.ModExpContext): + def exitModExp(self, ctx:MathExprParser.ModExpContext): pass + # Enter a parse tree produced by MathExprParser#DivExp. - def enterDivExp(self, ctx: MathExprParser.DivExpContext): + def enterDivExp(self, ctx:MathExprParser.DivExpContext): pass # Exit a parse tree produced by MathExprParser#DivExp. - def exitDivExp(self, ctx: MathExprParser.DivExpContext): + def exitDivExp(self, ctx:MathExprParser.DivExpContext): pass + # Enter a parse tree produced by MathExprParser#ToPow. - def enterToPow(self, ctx: MathExprParser.ToPowContext): + def enterToPow(self, ctx:MathExprParser.ToPowContext): pass # Exit a parse tree produced by MathExprParser#ToPow. - def exitToPow(self, ctx: MathExprParser.ToPowContext): + def exitToPow(self, ctx:MathExprParser.ToPowContext): pass + # Enter a parse tree produced by MathExprParser#PowExp. - def enterPowExp(self, ctx: MathExprParser.PowExpContext): + def enterPowExp(self, ctx:MathExprParser.PowExpContext): pass # Exit a parse tree produced by MathExprParser#PowExp. - def exitPowExp(self, ctx: MathExprParser.PowExpContext): + def exitPowExp(self, ctx:MathExprParser.PowExpContext): pass + # Enter a parse tree produced by MathExprParser#ToUnary. - def enterToUnary(self, ctx: MathExprParser.ToUnaryContext): + def enterToUnary(self, ctx:MathExprParser.ToUnaryContext): pass # Exit a parse tree produced by MathExprParser#ToUnary. - def exitToUnary(self, ctx: MathExprParser.ToUnaryContext): + def exitToUnary(self, ctx:MathExprParser.ToUnaryContext): pass + # Enter a parse tree produced by MathExprParser#UnaryPlus. - def enterUnaryPlus(self, ctx: MathExprParser.UnaryPlusContext): + def enterUnaryPlus(self, ctx:MathExprParser.UnaryPlusContext): pass # Exit a parse tree produced by MathExprParser#UnaryPlus. - def exitUnaryPlus(self, ctx: MathExprParser.UnaryPlusContext): + def exitUnaryPlus(self, ctx:MathExprParser.UnaryPlusContext): pass + # Enter a parse tree produced by MathExprParser#UnaryMinus. - def enterUnaryMinus(self, ctx: MathExprParser.UnaryMinusContext): + def enterUnaryMinus(self, ctx:MathExprParser.UnaryMinusContext): pass # Exit a parse tree produced by MathExprParser#UnaryMinus. - def exitUnaryMinus(self, ctx: MathExprParser.UnaryMinusContext): + def exitUnaryMinus(self, ctx:MathExprParser.UnaryMinusContext): pass + # Enter a parse tree produced by MathExprParser#ToAtom. - def enterToAtom(self, ctx: MathExprParser.ToAtomContext): + def enterToAtom(self, ctx:MathExprParser.ToAtomContext): pass # Exit a parse tree produced by MathExprParser#ToAtom. - def exitToAtom(self, ctx: MathExprParser.ToAtomContext): + def exitToAtom(self, ctx:MathExprParser.ToAtomContext): pass + # Enter a parse tree produced by MathExprParser#Func1Exp. - def enterFunc1Exp(self, ctx: MathExprParser.Func1ExpContext): + def enterFunc1Exp(self, ctx:MathExprParser.Func1ExpContext): pass # Exit a parse tree produced by MathExprParser#Func1Exp. - def exitFunc1Exp(self, ctx: MathExprParser.Func1ExpContext): + def exitFunc1Exp(self, ctx:MathExprParser.Func1ExpContext): pass + # Enter a parse tree produced by MathExprParser#Func2Exp. - def enterFunc2Exp(self, ctx: MathExprParser.Func2ExpContext): + def enterFunc2Exp(self, ctx:MathExprParser.Func2ExpContext): pass # Exit a parse tree produced by MathExprParser#Func2Exp. - def exitFunc2Exp(self, ctx: MathExprParser.Func2ExpContext): + def exitFunc2Exp(self, ctx:MathExprParser.Func2ExpContext): pass + # Enter a parse tree produced by MathExprParser#Func3Exp. - def enterFunc3Exp(self, ctx: MathExprParser.Func3ExpContext): + def enterFunc3Exp(self, ctx:MathExprParser.Func3ExpContext): pass # Exit a parse tree produced by MathExprParser#Func3Exp. - def exitFunc3Exp(self, ctx: MathExprParser.Func3ExpContext): + def exitFunc3Exp(self, ctx:MathExprParser.Func3ExpContext): pass + # Enter a parse tree produced by MathExprParser#Func4Exp. - def enterFunc4Exp(self, ctx: MathExprParser.Func4ExpContext): + def enterFunc4Exp(self, ctx:MathExprParser.Func4ExpContext): pass # Exit a parse tree produced by MathExprParser#Func4Exp. - def exitFunc4Exp(self, ctx: MathExprParser.Func4ExpContext): + def exitFunc4Exp(self, ctx:MathExprParser.Func4ExpContext): pass + # Enter a parse tree produced by MathExprParser#FuncNExp. - def enterFuncNExp(self, ctx: MathExprParser.FuncNExpContext): + def enterFuncNExp(self, ctx:MathExprParser.FuncNExpContext): pass # Exit a parse tree produced by MathExprParser#FuncNExp. - def exitFuncNExp(self, ctx: MathExprParser.FuncNExpContext): + def exitFuncNExp(self, ctx:MathExprParser.FuncNExpContext): pass + # Enter a parse tree produced by MathExprParser#VariableExp. - def enterVariableExp(self, ctx: MathExprParser.VariableExpContext): + def enterVariableExp(self, ctx:MathExprParser.VariableExpContext): pass # Exit a parse tree produced by MathExprParser#VariableExp. - def exitVariableExp(self, ctx: MathExprParser.VariableExpContext): + def exitVariableExp(self, ctx:MathExprParser.VariableExpContext): pass + # Enter a parse tree produced by MathExprParser#NumberExp. - def enterNumberExp(self, ctx: MathExprParser.NumberExpContext): + def enterNumberExp(self, ctx:MathExprParser.NumberExpContext): pass # Exit a parse tree produced by MathExprParser#NumberExp. - def exitNumberExp(self, ctx: MathExprParser.NumberExpContext): + def exitNumberExp(self, ctx:MathExprParser.NumberExpContext): pass + # Enter a parse tree produced by MathExprParser#ConstantExp. - def enterConstantExp(self, ctx: MathExprParser.ConstantExpContext): + def enterConstantExp(self, ctx:MathExprParser.ConstantExpContext): pass # Exit a parse tree produced by MathExprParser#ConstantExp. - def exitConstantExp(self, ctx: MathExprParser.ConstantExpContext): + def exitConstantExp(self, ctx:MathExprParser.ConstantExpContext): pass + # Enter a parse tree produced by MathExprParser#ParenExp. - def enterParenExp(self, ctx: MathExprParser.ParenExpContext): + def enterParenExp(self, ctx:MathExprParser.ParenExpContext): pass # Exit a parse tree produced by MathExprParser#ParenExp. - def exitParenExp(self, ctx: MathExprParser.ParenExpContext): + def exitParenExp(self, ctx:MathExprParser.ParenExpContext): pass + # Enter a parse tree produced by MathExprParser#AbsExp. - def enterAbsExp(self, ctx: MathExprParser.AbsExpContext): + def enterAbsExp(self, ctx:MathExprParser.AbsExpContext): pass # Exit a parse tree produced by MathExprParser#AbsExp. - def exitAbsExp(self, ctx: MathExprParser.AbsExpContext): + def exitAbsExp(self, ctx:MathExprParser.AbsExpContext): pass + # Enter a parse tree produced by MathExprParser#ListExp. - def enterListExp(self, ctx: MathExprParser.ListExpContext): + def enterListExp(self, ctx:MathExprParser.ListExpContext): pass # Exit a parse tree produced by MathExprParser#ListExp. - def exitListExp(self, ctx: MathExprParser.ListExpContext): + def exitListExp(self, ctx:MathExprParser.ListExpContext): pass + # Enter a parse tree produced by MathExprParser#SinFunc. - def enterSinFunc(self, ctx: MathExprParser.SinFuncContext): + def enterSinFunc(self, ctx:MathExprParser.SinFuncContext): pass # Exit a parse tree produced by MathExprParser#SinFunc. - def exitSinFunc(self, ctx: MathExprParser.SinFuncContext): + def exitSinFunc(self, ctx:MathExprParser.SinFuncContext): pass + # Enter a parse tree produced by MathExprParser#CosFunc. - def enterCosFunc(self, ctx: MathExprParser.CosFuncContext): + def enterCosFunc(self, ctx:MathExprParser.CosFuncContext): pass # Exit a parse tree produced by MathExprParser#CosFunc. - def exitCosFunc(self, ctx: MathExprParser.CosFuncContext): + def exitCosFunc(self, ctx:MathExprParser.CosFuncContext): pass + # Enter a parse tree produced by MathExprParser#TanFunc. - def enterTanFunc(self, ctx: MathExprParser.TanFuncContext): + def enterTanFunc(self, ctx:MathExprParser.TanFuncContext): pass # Exit a parse tree produced by MathExprParser#TanFunc. - def exitTanFunc(self, ctx: MathExprParser.TanFuncContext): + def exitTanFunc(self, ctx:MathExprParser.TanFuncContext): pass + # Enter a parse tree produced by MathExprParser#AsinFunc. - def enterAsinFunc(self, ctx: MathExprParser.AsinFuncContext): + def enterAsinFunc(self, ctx:MathExprParser.AsinFuncContext): pass # Exit a parse tree produced by MathExprParser#AsinFunc. - def exitAsinFunc(self, ctx: MathExprParser.AsinFuncContext): + def exitAsinFunc(self, ctx:MathExprParser.AsinFuncContext): pass + # Enter a parse tree produced by MathExprParser#AcosFunc. - def enterAcosFunc(self, ctx: MathExprParser.AcosFuncContext): + def enterAcosFunc(self, ctx:MathExprParser.AcosFuncContext): pass # Exit a parse tree produced by MathExprParser#AcosFunc. - def exitAcosFunc(self, ctx: MathExprParser.AcosFuncContext): + def exitAcosFunc(self, ctx:MathExprParser.AcosFuncContext): pass + # Enter a parse tree produced by MathExprParser#AtanFunc. - def enterAtanFunc(self, ctx: MathExprParser.AtanFuncContext): + def enterAtanFunc(self, ctx:MathExprParser.AtanFuncContext): pass # Exit a parse tree produced by MathExprParser#AtanFunc. - def exitAtanFunc(self, ctx: MathExprParser.AtanFuncContext): + def exitAtanFunc(self, ctx:MathExprParser.AtanFuncContext): pass + # Enter a parse tree produced by MathExprParser#SinhFunc. - def enterSinhFunc(self, ctx: MathExprParser.SinhFuncContext): + def enterSinhFunc(self, ctx:MathExprParser.SinhFuncContext): pass # Exit a parse tree produced by MathExprParser#SinhFunc. - def exitSinhFunc(self, ctx: MathExprParser.SinhFuncContext): + def exitSinhFunc(self, ctx:MathExprParser.SinhFuncContext): pass + # Enter a parse tree produced by MathExprParser#CoshFunc. - def enterCoshFunc(self, ctx: MathExprParser.CoshFuncContext): + def enterCoshFunc(self, ctx:MathExprParser.CoshFuncContext): pass # Exit a parse tree produced by MathExprParser#CoshFunc. - def exitCoshFunc(self, ctx: MathExprParser.CoshFuncContext): + def exitCoshFunc(self, ctx:MathExprParser.CoshFuncContext): pass + # Enter a parse tree produced by MathExprParser#TanhFunc. - def enterTanhFunc(self, ctx: MathExprParser.TanhFuncContext): + def enterTanhFunc(self, ctx:MathExprParser.TanhFuncContext): pass # Exit a parse tree produced by MathExprParser#TanhFunc. - def exitTanhFunc(self, ctx: MathExprParser.TanhFuncContext): + def exitTanhFunc(self, ctx:MathExprParser.TanhFuncContext): pass + # Enter a parse tree produced by MathExprParser#AsinhFunc. - def enterAsinhFunc(self, ctx: MathExprParser.AsinhFuncContext): + def enterAsinhFunc(self, ctx:MathExprParser.AsinhFuncContext): pass # Exit a parse tree produced by MathExprParser#AsinhFunc. - def exitAsinhFunc(self, ctx: MathExprParser.AsinhFuncContext): + def exitAsinhFunc(self, ctx:MathExprParser.AsinhFuncContext): pass + # Enter a parse tree produced by MathExprParser#AcoshFunc. - def enterAcoshFunc(self, ctx: MathExprParser.AcoshFuncContext): + def enterAcoshFunc(self, ctx:MathExprParser.AcoshFuncContext): pass # Exit a parse tree produced by MathExprParser#AcoshFunc. - def exitAcoshFunc(self, ctx: MathExprParser.AcoshFuncContext): + def exitAcoshFunc(self, ctx:MathExprParser.AcoshFuncContext): pass + # Enter a parse tree produced by MathExprParser#AtanhFunc. - def enterAtanhFunc(self, ctx: MathExprParser.AtanhFuncContext): + def enterAtanhFunc(self, ctx:MathExprParser.AtanhFuncContext): pass # Exit a parse tree produced by MathExprParser#AtanhFunc. - def exitAtanhFunc(self, ctx: MathExprParser.AtanhFuncContext): + def exitAtanhFunc(self, ctx:MathExprParser.AtanhFuncContext): pass + # Enter a parse tree produced by MathExprParser#AbsFunc. - def enterAbsFunc(self, ctx: MathExprParser.AbsFuncContext): + def enterAbsFunc(self, ctx:MathExprParser.AbsFuncContext): pass # Exit a parse tree produced by MathExprParser#AbsFunc. - def exitAbsFunc(self, ctx: MathExprParser.AbsFuncContext): + def exitAbsFunc(self, ctx:MathExprParser.AbsFuncContext): pass + # Enter a parse tree produced by MathExprParser#SqrtFunc. - def enterSqrtFunc(self, ctx: MathExprParser.SqrtFuncContext): + def enterSqrtFunc(self, ctx:MathExprParser.SqrtFuncContext): pass # Exit a parse tree produced by MathExprParser#SqrtFunc. - def exitSqrtFunc(self, ctx: MathExprParser.SqrtFuncContext): + def exitSqrtFunc(self, ctx:MathExprParser.SqrtFuncContext): pass + # Enter a parse tree produced by MathExprParser#LnFunc. - def enterLnFunc(self, ctx: MathExprParser.LnFuncContext): + def enterLnFunc(self, ctx:MathExprParser.LnFuncContext): pass # Exit a parse tree produced by MathExprParser#LnFunc. - def exitLnFunc(self, ctx: MathExprParser.LnFuncContext): + def exitLnFunc(self, ctx:MathExprParser.LnFuncContext): pass + # Enter a parse tree produced by MathExprParser#LogFunc. - def enterLogFunc(self, ctx: MathExprParser.LogFuncContext): + def enterLogFunc(self, ctx:MathExprParser.LogFuncContext): pass # Exit a parse tree produced by MathExprParser#LogFunc. - def exitLogFunc(self, ctx: MathExprParser.LogFuncContext): + def exitLogFunc(self, ctx:MathExprParser.LogFuncContext): pass + # Enter a parse tree produced by MathExprParser#ExpFunc. - def enterExpFunc(self, ctx: MathExprParser.ExpFuncContext): + def enterExpFunc(self, ctx:MathExprParser.ExpFuncContext): pass # Exit a parse tree produced by MathExprParser#ExpFunc. - def exitExpFunc(self, ctx: MathExprParser.ExpFuncContext): + def exitExpFunc(self, ctx:MathExprParser.ExpFuncContext): pass + # Enter a parse tree produced by MathExprParser#TNormFunc. - def enterTNormFunc(self, ctx: MathExprParser.TNormFuncContext): + def enterTNormFunc(self, ctx:MathExprParser.TNormFuncContext): pass # Exit a parse tree produced by MathExprParser#TNormFunc. - def exitTNormFunc(self, ctx: MathExprParser.TNormFuncContext): + def exitTNormFunc(self, ctx:MathExprParser.TNormFuncContext): pass + # Enter a parse tree produced by MathExprParser#SNormFunc. - def enterSNormFunc(self, ctx: MathExprParser.SNormFuncContext): + def enterSNormFunc(self, ctx:MathExprParser.SNormFuncContext): pass # Exit a parse tree produced by MathExprParser#SNormFunc. - def exitSNormFunc(self, ctx: MathExprParser.SNormFuncContext): + def exitSNormFunc(self, ctx:MathExprParser.SNormFuncContext): pass + # Enter a parse tree produced by MathExprParser#FloorFunc. - def enterFloorFunc(self, ctx: MathExprParser.FloorFuncContext): + def enterFloorFunc(self, ctx:MathExprParser.FloorFuncContext): pass # Exit a parse tree produced by MathExprParser#FloorFunc. - def exitFloorFunc(self, ctx: MathExprParser.FloorFuncContext): + def exitFloorFunc(self, ctx:MathExprParser.FloorFuncContext): pass + # Enter a parse tree produced by MathExprParser#CeilFunc. - def enterCeilFunc(self, ctx: MathExprParser.CeilFuncContext): + def enterCeilFunc(self, ctx:MathExprParser.CeilFuncContext): pass # Exit a parse tree produced by MathExprParser#CeilFunc. - def exitCeilFunc(self, ctx: MathExprParser.CeilFuncContext): + def exitCeilFunc(self, ctx:MathExprParser.CeilFuncContext): pass + # Enter a parse tree produced by MathExprParser#RoundFunc. - def enterRoundFunc(self, ctx: MathExprParser.RoundFuncContext): + def enterRoundFunc(self, ctx:MathExprParser.RoundFuncContext): pass # Exit a parse tree produced by MathExprParser#RoundFunc. - def exitRoundFunc(self, ctx: MathExprParser.RoundFuncContext): + def exitRoundFunc(self, ctx:MathExprParser.RoundFuncContext): pass + # Enter a parse tree produced by MathExprParser#GammaFunc. - def enterGammaFunc(self, ctx: MathExprParser.GammaFuncContext): + def enterGammaFunc(self, ctx:MathExprParser.GammaFuncContext): pass # Exit a parse tree produced by MathExprParser#GammaFunc. - def exitGammaFunc(self, ctx: MathExprParser.GammaFuncContext): + def exitGammaFunc(self, ctx:MathExprParser.GammaFuncContext): pass + # Enter a parse tree produced by MathExprParser#sigmoidFunc. - def enterSigmoidFunc(self, ctx: MathExprParser.SigmoidFuncContext): + def enterSigmoidFunc(self, ctx:MathExprParser.SigmoidFuncContext): pass # Exit a parse tree produced by MathExprParser#sigmoidFunc. - def exitSigmoidFunc(self, ctx: MathExprParser.SigmoidFuncContext): + def exitSigmoidFunc(self, ctx:MathExprParser.SigmoidFuncContext): pass + # Enter a parse tree produced by MathExprParser#sfftFunc. - def enterSfftFunc(self, ctx: MathExprParser.SfftFuncContext): + def enterSfftFunc(self, ctx:MathExprParser.SfftFuncContext): pass # Exit a parse tree produced by MathExprParser#sfftFunc. - def exitSfftFunc(self, ctx: MathExprParser.SfftFuncContext): + def exitSfftFunc(self, ctx:MathExprParser.SfftFuncContext): pass + # Enter a parse tree produced by MathExprParser#sifftFunc. - def enterSifftFunc(self, ctx: MathExprParser.SifftFuncContext): + def enterSifftFunc(self, ctx:MathExprParser.SifftFuncContext): pass # Exit a parse tree produced by MathExprParser#sifftFunc. - def exitSifftFunc(self, ctx: MathExprParser.SifftFuncContext): + def exitSifftFunc(self, ctx:MathExprParser.SifftFuncContext): pass + # Enter a parse tree produced by MathExprParser#anglFunc. - def enterAnglFunc(self, ctx: MathExprParser.AnglFuncContext): + def enterAnglFunc(self, ctx:MathExprParser.AnglFuncContext): pass # Exit a parse tree produced by MathExprParser#anglFunc. - def exitAnglFunc(self, ctx: MathExprParser.AnglFuncContext): + def exitAnglFunc(self, ctx:MathExprParser.AnglFuncContext): pass + # Enter a parse tree produced by MathExprParser#printFunc. - def enterPrintFunc(self, ctx: MathExprParser.PrintFuncContext): + def enterPrintFunc(self, ctx:MathExprParser.PrintFuncContext): pass # Exit a parse tree produced by MathExprParser#printFunc. - def exitPrintFunc(self, ctx: MathExprParser.PrintFuncContext): + def exitPrintFunc(self, ctx:MathExprParser.PrintFuncContext): pass + # Enter a parse tree produced by MathExprParser#FractFunc. - def enterFractFunc(self, ctx: MathExprParser.FractFuncContext): + def enterFractFunc(self, ctx:MathExprParser.FractFuncContext): pass # Exit a parse tree produced by MathExprParser#FractFunc. - def exitFractFunc(self, ctx: MathExprParser.FractFuncContext): + def exitFractFunc(self, ctx:MathExprParser.FractFuncContext): pass + # Enter a parse tree produced by MathExprParser#ReluFunc. - def enterReluFunc(self, ctx: MathExprParser.ReluFuncContext): + def enterReluFunc(self, ctx:MathExprParser.ReluFuncContext): pass # Exit a parse tree produced by MathExprParser#ReluFunc. - def exitReluFunc(self, ctx: MathExprParser.ReluFuncContext): + def exitReluFunc(self, ctx:MathExprParser.ReluFuncContext): pass + # Enter a parse tree produced by MathExprParser#SoftplusFunc. - def enterSoftplusFunc(self, ctx: MathExprParser.SoftplusFuncContext): + def enterSoftplusFunc(self, ctx:MathExprParser.SoftplusFuncContext): pass # Exit a parse tree produced by MathExprParser#SoftplusFunc. - def exitSoftplusFunc(self, ctx: MathExprParser.SoftplusFuncContext): + def exitSoftplusFunc(self, ctx:MathExprParser.SoftplusFuncContext): pass + # Enter a parse tree produced by MathExprParser#GeluFunc. - def enterGeluFunc(self, ctx: MathExprParser.GeluFuncContext): + def enterGeluFunc(self, ctx:MathExprParser.GeluFuncContext): pass # Exit a parse tree produced by MathExprParser#GeluFunc. - def exitGeluFunc(self, ctx: MathExprParser.GeluFuncContext): + def exitGeluFunc(self, ctx:MathExprParser.GeluFuncContext): pass + # Enter a parse tree produced by MathExprParser#SignFunc. - def enterSignFunc(self, ctx: MathExprParser.SignFuncContext): + def enterSignFunc(self, ctx:MathExprParser.SignFuncContext): pass # Exit a parse tree produced by MathExprParser#SignFunc. - def exitSignFunc(self, ctx: MathExprParser.SignFuncContext): + def exitSignFunc(self, ctx:MathExprParser.SignFuncContext): pass + # Enter a parse tree produced by MathExprParser#PrintShapeFunc. - def enterPrintShapeFunc(self, ctx: MathExprParser.PrintShapeFuncContext): + def enterPrintShapeFunc(self, ctx:MathExprParser.PrintShapeFuncContext): pass # Exit a parse tree produced by MathExprParser#PrintShapeFunc. - def exitPrintShapeFunc(self, ctx: MathExprParser.PrintShapeFuncContext): + def exitPrintShapeFunc(self, ctx:MathExprParser.PrintShapeFuncContext): pass + + # Enter a parse tree produced by MathExprParser#PinvFunc. + def enterPinvFunc(self, ctx:MathExprParser.PinvFuncContext): + pass + + # Exit a parse tree produced by MathExprParser#PinvFunc. + def exitPinvFunc(self, ctx:MathExprParser.PinvFuncContext): + pass + + # Enter a parse tree produced by MathExprParser#PowFunc. - def enterPowFunc(self, ctx: MathExprParser.PowFuncContext): + def enterPowFunc(self, ctx:MathExprParser.PowFuncContext): pass # Exit a parse tree produced by MathExprParser#PowFunc. - def exitPowFunc(self, ctx: MathExprParser.PowFuncContext): + def exitPowFunc(self, ctx:MathExprParser.PowFuncContext): pass + # Enter a parse tree produced by MathExprParser#Atan2Func. - def enterAtan2Func(self, ctx: MathExprParser.Atan2FuncContext): + def enterAtan2Func(self, ctx:MathExprParser.Atan2FuncContext): pass # Exit a parse tree produced by MathExprParser#Atan2Func. - def exitAtan2Func(self, ctx: MathExprParser.Atan2FuncContext): + def exitAtan2Func(self, ctx:MathExprParser.Atan2FuncContext): pass + # Enter a parse tree produced by MathExprParser#TMinFunc. - def enterTMinFunc(self, ctx: MathExprParser.TMinFuncContext): + def enterTMinFunc(self, ctx:MathExprParser.TMinFuncContext): pass # Exit a parse tree produced by MathExprParser#TMinFunc. - def exitTMinFunc(self, ctx: MathExprParser.TMinFuncContext): + def exitTMinFunc(self, ctx:MathExprParser.TMinFuncContext): pass + # Enter a parse tree produced by MathExprParser#TMaxFunc. - def enterTMaxFunc(self, ctx: MathExprParser.TMaxFuncContext): + def enterTMaxFunc(self, ctx:MathExprParser.TMaxFuncContext): pass # Exit a parse tree produced by MathExprParser#TMaxFunc. - def exitTMaxFunc(self, ctx: MathExprParser.TMaxFuncContext): + def exitTMaxFunc(self, ctx:MathExprParser.TMaxFuncContext): pass + # Enter a parse tree produced by MathExprParser#StepFunc. - def enterStepFunc(self, ctx: MathExprParser.StepFuncContext): + def enterStepFunc(self, ctx:MathExprParser.StepFuncContext): pass # Exit a parse tree produced by MathExprParser#StepFunc. - def exitStepFunc(self, ctx: MathExprParser.StepFuncContext): + def exitStepFunc(self, ctx:MathExprParser.StepFuncContext): pass + + # Enter a parse tree produced by MathExprParser#TopkFunc. + def enterTopkFunc(self, ctx:MathExprParser.TopkFuncContext): + pass + + # Exit a parse tree produced by MathExprParser#TopkFunc. + def exitTopkFunc(self, ctx:MathExprParser.TopkFuncContext): + pass + + + # Enter a parse tree produced by MathExprParser#BotkFunc. + def enterBotkFunc(self, ctx:MathExprParser.BotkFuncContext): + pass + + # Exit a parse tree produced by MathExprParser#BotkFunc. + def exitBotkFunc(self, ctx:MathExprParser.BotkFuncContext): + pass + + # Enter a parse tree produced by MathExprParser#ClampFunc. - def enterClampFunc(self, ctx: MathExprParser.ClampFuncContext): + def enterClampFunc(self, ctx:MathExprParser.ClampFuncContext): pass # Exit a parse tree produced by MathExprParser#ClampFunc. - def exitClampFunc(self, ctx: MathExprParser.ClampFuncContext): + def exitClampFunc(self, ctx:MathExprParser.ClampFuncContext): pass + # Enter a parse tree produced by MathExprParser#LerpFunc. - def enterLerpFunc(self, ctx: MathExprParser.LerpFuncContext): + def enterLerpFunc(self, ctx:MathExprParser.LerpFuncContext): pass # Exit a parse tree produced by MathExprParser#LerpFunc. - def exitLerpFunc(self, ctx: MathExprParser.LerpFuncContext): + def exitLerpFunc(self, ctx:MathExprParser.LerpFuncContext): pass + # Enter a parse tree produced by MathExprParser#SmoothstepFunc. - def enterSmoothstepFunc(self, ctx: MathExprParser.SmoothstepFuncContext): + def enterSmoothstepFunc(self, ctx:MathExprParser.SmoothstepFuncContext): pass # Exit a parse tree produced by MathExprParser#SmoothstepFunc. - def exitSmoothstepFunc(self, ctx: MathExprParser.SmoothstepFuncContext): + def exitSmoothstepFunc(self, ctx:MathExprParser.SmoothstepFuncContext): pass + # Enter a parse tree produced by MathExprParser#RangeFunc. - def enterRangeFunc(self, ctx: MathExprParser.RangeFuncContext): + def enterRangeFunc(self, ctx:MathExprParser.RangeFuncContext): pass # Exit a parse tree produced by MathExprParser#RangeFunc. - def exitRangeFunc(self, ctx: MathExprParser.RangeFuncContext): + def exitRangeFunc(self, ctx:MathExprParser.RangeFuncContext): pass + # Enter a parse tree produced by MathExprParser#SwapFunc. - def enterSwapFunc(self, ctx: MathExprParser.SwapFuncContext): + def enterSwapFunc(self, ctx:MathExprParser.SwapFuncContext): pass # Exit a parse tree produced by MathExprParser#SwapFunc. - def exitSwapFunc(self, ctx: MathExprParser.SwapFuncContext): + def exitSwapFunc(self, ctx:MathExprParser.SwapFuncContext): pass + # Enter a parse tree produced by MathExprParser#SMinFunc. - def enterSMinFunc(self, ctx: MathExprParser.SMinFuncContext): + def enterSMinFunc(self, ctx:MathExprParser.SMinFuncContext): pass # Exit a parse tree produced by MathExprParser#SMinFunc. - def exitSMinFunc(self, ctx: MathExprParser.SMinFuncContext): + def exitSMinFunc(self, ctx:MathExprParser.SMinFuncContext): pass + # Enter a parse tree produced by MathExprParser#SMaxFunc. - def enterSMaxFunc(self, ctx: MathExprParser.SMaxFuncContext): + def enterSMaxFunc(self, ctx:MathExprParser.SMaxFuncContext): pass # Exit a parse tree produced by MathExprParser#SMaxFunc. - def exitSMaxFunc(self, ctx: MathExprParser.SMaxFuncContext): + def exitSMaxFunc(self, ctx:MathExprParser.SMaxFuncContext): pass + # Enter a parse tree produced by MathExprParser#MapFunc. - def enterMapFunc(self, ctx: MathExprParser.MapFuncContext): + def enterMapFunc(self, ctx:MathExprParser.MapFuncContext): pass # Exit a parse tree produced by MathExprParser#MapFunc. - def exitMapFunc(self, ctx: MathExprParser.MapFuncContext): + def exitMapFunc(self, ctx:MathExprParser.MapFuncContext): pass + # Enter a parse tree produced by MathExprParser#ConvFunc. - def enterConvFunc(self, ctx: MathExprParser.ConvFuncContext): + def enterConvFunc(self, ctx:MathExprParser.ConvFuncContext): pass # Exit a parse tree produced by MathExprParser#ConvFunc. - def exitConvFunc(self, ctx: MathExprParser.ConvFuncContext): + def exitConvFunc(self, ctx:MathExprParser.ConvFuncContext): pass + # Enter a parse tree produced by MathExprParser#PermuteFunc. - def enterPermuteFunc(self, ctx: MathExprParser.PermuteFuncContext): + def enterPermuteFunc(self, ctx:MathExprParser.PermuteFuncContext): pass # Exit a parse tree produced by MathExprParser#PermuteFunc. - def exitPermuteFunc(self, ctx: MathExprParser.PermuteFuncContext): + def exitPermuteFunc(self, ctx:MathExprParser.PermuteFuncContext): pass + # Enter a parse tree produced by MathExprParser#ReshapeFunc. - def enterReshapeFunc(self, ctx: MathExprParser.ReshapeFuncContext): + def enterReshapeFunc(self, ctx:MathExprParser.ReshapeFuncContext): pass # Exit a parse tree produced by MathExprParser#ReshapeFunc. - def exitReshapeFunc(self, ctx: MathExprParser.ReshapeFuncContext): + def exitReshapeFunc(self, ctx:MathExprParser.ReshapeFuncContext): pass -del MathExprParser + +del MathExprParser \ No newline at end of file diff --git a/more_math/Parser/MathExprParser.py b/more_math/Parser/MathExprParser.py index 71a54fc..b856a83 100644 --- a/more_math/Parser/MathExprParser.py +++ b/more_math/Parser/MathExprParser.py @@ -1,4256 +1,220 @@ # Generated from ./MathExpr.g4 by ANTLR 4.13.2 # encoding: utf-8 from antlr4 import * +from io import StringIO import sys - if sys.version_info[1] > 5: - from typing import TextIO + from typing import TextIO else: - from typing.io import TextIO - + from typing.io import TextIO def serializedATN(): return [ - 4, - 1, - 73, - 454, - 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, - 1, - 6, - 1, - 6, - 1, - 6, - 1, - 6, - 5, - 6, - 120, - 8, - 6, - 10, - 6, - 12, - 6, - 123, - 9, - 6, - 1, - 6, - 1, - 6, - 3, - 6, - 127, - 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, - 1, - 7, - 1, - 7, - 1, - 7, - 1, - 7, - 1, - 7, - 1, - 7, - 1, - 7, - 1, - 7, - 1, - 7, - 1, - 7, - 3, - 7, - 304, - 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, - 341, - 8, - 8, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 1, - 9, - 3, - 9, - 379, - 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, - 5, - 11, - 397, - 8, - 11, - 10, - 11, - 12, - 11, - 400, - 9, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 5, - 11, - 409, - 8, - 11, - 10, - 11, - 12, - 11, - 412, - 9, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 4, - 11, - 421, - 8, - 11, - 11, - 11, - 12, - 11, - 422, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 4, - 11, - 432, - 8, - 11, - 11, - 11, - 12, - 11, - 433, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 1, - 11, - 3, - 11, - 452, - 8, - 11, - 1, - 11, - 0, - 3, - 2, - 4, - 6, - 12, - 0, - 2, - 4, - 6, - 8, - 10, - 12, - 14, - 16, - 18, - 20, - 22, - 0, - 0, - 517, - 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, - 126, - 1, - 0, - 0, - 0, - 14, - 303, - 1, - 0, - 0, - 0, - 16, - 340, - 1, - 0, - 0, - 0, - 18, - 378, - 1, - 0, - 0, - 0, - 20, - 380, - 1, - 0, - 0, - 0, - 22, - 451, - 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, - 64, - 0, - 0, - 33, - 50, - 3, - 4, - 2, - 0, - 34, - 35, - 10, - 6, - 0, - 0, - 35, - 36, - 5, - 63, - 0, - 0, - 36, - 50, - 3, - 4, - 2, - 0, - 37, - 38, - 10, - 5, - 0, - 0, - 38, - 39, - 5, - 66, - 0, - 0, - 39, - 50, - 3, - 4, - 2, - 0, - 40, - 41, - 10, - 4, - 0, - 0, - 41, - 42, - 5, - 65, - 0, - 0, - 42, - 50, - 3, - 4, - 2, - 0, - 43, - 44, - 10, - 3, - 0, - 0, - 44, - 45, - 5, - 67, - 0, - 0, - 45, - 50, - 3, - 4, - 2, - 0, - 46, - 47, - 10, - 2, - 0, - 0, - 47, - 48, - 5, - 68, - 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, - 57, - 0, - 0, - 59, - 64, - 3, - 6, - 3, - 0, - 60, - 61, - 10, - 2, - 0, - 0, - 61, - 62, - 5, - 58, - 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, - 59, - 0, - 0, - 73, - 81, - 3, - 8, - 4, - 0, - 74, - 75, - 10, - 3, - 0, - 0, - 75, - 76, - 5, - 60, - 0, - 0, - 76, - 81, - 3, - 8, - 4, - 0, - 77, - 78, - 10, - 2, - 0, - 0, - 78, - 79, - 5, - 61, - 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, - 62, - 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, - 57, - 0, - 0, - 93, - 98, - 3, - 10, - 5, - 0, - 94, - 95, - 5, - 58, - 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, - 127, - 3, - 14, - 7, - 0, - 100, - 127, - 3, - 16, - 8, - 0, - 101, - 127, - 3, - 18, - 9, - 0, - 102, - 127, - 3, - 20, - 10, - 0, - 103, - 127, - 3, - 22, - 11, - 0, - 104, - 127, - 5, - 72, - 0, - 0, - 105, - 127, - 5, - 71, - 0, - 0, - 106, - 127, - 5, - 70, - 0, - 0, - 107, - 108, - 5, - 1, - 0, - 0, - 108, - 109, - 3, - 0, - 0, - 0, - 109, - 110, - 5, - 2, - 0, - 0, - 110, - 127, - 1, - 0, - 0, - 0, - 111, - 112, - 5, - 69, - 0, - 0, - 112, - 113, - 3, - 0, - 0, - 0, - 113, - 114, - 5, - 69, - 0, - 0, - 114, - 127, - 1, - 0, - 0, - 0, - 115, - 116, - 5, - 3, - 0, - 0, - 116, - 121, - 3, - 0, - 0, - 0, - 117, - 118, - 5, - 4, - 0, - 0, - 118, - 120, - 3, - 0, - 0, - 0, - 119, - 117, - 1, - 0, - 0, - 0, - 120, - 123, - 1, - 0, - 0, - 0, - 121, - 119, - 1, - 0, - 0, - 0, - 121, - 122, - 1, - 0, - 0, - 0, - 122, - 124, - 1, - 0, - 0, - 0, - 123, - 121, - 1, - 0, - 0, - 0, - 124, - 125, - 5, - 5, - 0, - 0, - 125, - 127, - 1, - 0, - 0, - 0, - 126, - 99, - 1, - 0, - 0, - 0, - 126, - 100, - 1, - 0, - 0, - 0, - 126, - 101, - 1, - 0, - 0, - 0, - 126, - 102, - 1, - 0, - 0, - 0, - 126, - 103, - 1, - 0, - 0, - 0, - 126, - 104, - 1, - 0, - 0, - 0, - 126, - 105, - 1, - 0, - 0, - 0, - 126, - 106, - 1, - 0, - 0, - 0, - 126, - 107, - 1, - 0, - 0, - 0, - 126, - 111, - 1, - 0, - 0, - 0, - 126, - 115, - 1, - 0, - 0, - 0, - 127, - 13, - 1, - 0, - 0, - 0, - 128, - 129, - 5, - 6, - 0, - 0, - 129, - 130, - 5, - 1, - 0, - 0, - 130, - 131, - 3, - 0, - 0, - 0, - 131, - 132, - 5, - 2, - 0, - 0, - 132, - 304, - 1, - 0, - 0, - 0, - 133, - 134, - 5, - 7, - 0, - 0, - 134, - 135, - 5, - 1, - 0, - 0, - 135, - 136, - 3, - 0, - 0, - 0, - 136, - 137, - 5, - 2, - 0, - 0, - 137, - 304, - 1, - 0, - 0, - 0, - 138, - 139, - 5, - 8, - 0, - 0, - 139, - 140, - 5, - 1, - 0, - 0, - 140, - 141, - 3, - 0, - 0, - 0, - 141, - 142, - 5, - 2, - 0, - 0, - 142, - 304, - 1, - 0, - 0, - 0, - 143, - 144, - 5, - 9, - 0, - 0, - 144, - 145, - 5, - 1, - 0, - 0, - 145, - 146, - 3, - 0, - 0, - 0, - 146, - 147, - 5, - 2, - 0, - 0, - 147, - 304, - 1, - 0, - 0, - 0, - 148, - 149, - 5, - 10, - 0, - 0, - 149, - 150, - 5, - 1, - 0, - 0, - 150, - 151, - 3, - 0, - 0, - 0, - 151, - 152, - 5, - 2, - 0, - 0, - 152, - 304, - 1, - 0, - 0, - 0, - 153, - 154, - 5, - 11, - 0, - 0, - 154, - 155, - 5, - 1, - 0, - 0, - 155, - 156, - 3, - 0, - 0, - 0, - 156, - 157, - 5, - 2, - 0, - 0, - 157, - 304, - 1, - 0, - 0, - 0, - 158, - 159, - 5, - 13, - 0, - 0, - 159, - 160, - 5, - 1, - 0, - 0, - 160, - 161, - 3, - 0, - 0, - 0, - 161, - 162, - 5, - 2, - 0, - 0, - 162, - 304, - 1, - 0, - 0, - 0, - 163, - 164, - 5, - 14, - 0, - 0, - 164, - 165, - 5, - 1, - 0, - 0, - 165, - 166, - 3, - 0, - 0, - 0, - 166, - 167, - 5, - 2, - 0, - 0, - 167, - 304, - 1, - 0, - 0, - 0, - 168, - 169, - 5, - 15, - 0, - 0, - 169, - 170, - 5, - 1, - 0, - 0, - 170, - 171, - 3, - 0, - 0, - 0, - 171, - 172, - 5, - 2, - 0, - 0, - 172, - 304, - 1, - 0, - 0, - 0, - 173, - 174, - 5, - 16, - 0, - 0, - 174, - 175, - 5, - 1, - 0, - 0, - 175, - 176, - 3, - 0, - 0, - 0, - 176, - 177, - 5, - 2, - 0, - 0, - 177, - 304, - 1, - 0, - 0, - 0, - 178, - 179, - 5, - 17, - 0, - 0, - 179, - 180, - 5, - 1, - 0, - 0, - 180, - 181, - 3, - 0, - 0, - 0, - 181, - 182, - 5, - 2, - 0, - 0, - 182, - 304, - 1, - 0, - 0, - 0, - 183, - 184, - 5, - 18, - 0, - 0, - 184, - 185, - 5, - 1, - 0, - 0, - 185, - 186, - 3, - 0, - 0, - 0, - 186, - 187, - 5, - 2, - 0, - 0, - 187, - 304, - 1, - 0, - 0, - 0, - 188, - 189, - 5, - 19, - 0, - 0, - 189, - 190, - 5, - 1, - 0, - 0, - 190, - 191, - 3, - 0, - 0, - 0, - 191, - 192, - 5, - 2, - 0, - 0, - 192, - 304, - 1, - 0, - 0, - 0, - 193, - 194, - 5, - 20, - 0, - 0, - 194, - 195, - 5, - 1, - 0, - 0, - 195, - 196, - 3, - 0, - 0, - 0, - 196, - 197, - 5, - 2, - 0, - 0, - 197, - 304, - 1, - 0, - 0, - 0, - 198, - 199, - 5, - 21, - 0, - 0, - 199, - 200, - 5, - 1, - 0, - 0, - 200, - 201, - 3, - 0, - 0, - 0, - 201, - 202, - 5, - 2, - 0, - 0, - 202, - 304, - 1, - 0, - 0, - 0, - 203, - 204, - 5, - 22, - 0, - 0, - 204, - 205, - 5, - 1, - 0, - 0, - 205, - 206, - 3, - 0, - 0, - 0, - 206, - 207, - 5, - 2, - 0, - 0, - 207, - 304, - 1, - 0, - 0, - 0, - 208, - 209, - 5, - 23, - 0, - 0, - 209, - 210, - 5, - 1, - 0, - 0, - 210, - 211, - 3, - 0, - 0, - 0, - 211, - 212, - 5, - 2, - 0, - 0, - 212, - 304, - 1, - 0, - 0, - 0, - 213, - 214, - 5, - 28, - 0, - 0, - 214, - 215, - 5, - 1, - 0, - 0, - 215, - 216, - 3, - 0, - 0, - 0, - 216, - 217, - 5, - 2, - 0, - 0, - 217, - 304, - 1, - 0, - 0, - 0, - 218, - 219, - 5, - 29, - 0, - 0, - 219, - 220, - 5, - 1, - 0, - 0, - 220, - 221, - 3, - 0, - 0, - 0, - 221, - 222, - 5, - 2, - 0, - 0, - 222, - 304, - 1, - 0, - 0, - 0, - 223, - 224, - 5, - 30, - 0, - 0, - 224, - 225, - 5, - 1, - 0, - 0, - 225, - 226, - 3, - 0, - 0, - 0, - 226, - 227, - 5, - 2, - 0, - 0, - 227, - 304, - 1, - 0, - 0, - 0, - 228, - 229, - 5, - 31, - 0, - 0, - 229, - 230, - 5, - 1, - 0, - 0, - 230, - 231, - 3, - 0, - 0, - 0, - 231, - 232, - 5, - 2, - 0, - 0, - 232, - 304, - 1, - 0, - 0, - 0, - 233, - 234, - 5, - 32, - 0, - 0, - 234, - 235, - 5, - 1, - 0, - 0, - 235, - 236, - 3, - 0, - 0, - 0, - 236, - 237, - 5, - 2, - 0, - 0, - 237, - 304, - 1, - 0, - 0, - 0, - 238, - 239, - 5, - 33, - 0, - 0, - 239, - 240, - 5, - 1, - 0, - 0, - 240, - 241, - 3, - 0, - 0, - 0, - 241, - 242, - 5, - 2, - 0, - 0, - 242, - 304, - 1, - 0, - 0, - 0, - 243, - 244, - 5, - 35, - 0, - 0, - 244, - 245, - 5, - 1, - 0, - 0, - 245, - 246, - 3, - 0, - 0, - 0, - 246, - 247, - 5, - 2, - 0, - 0, - 247, - 304, - 1, - 0, - 0, - 0, - 248, - 249, - 5, - 37, - 0, - 0, - 249, - 250, - 5, - 1, - 0, - 0, - 250, - 251, - 3, - 0, - 0, - 0, - 251, - 252, - 5, - 2, - 0, - 0, - 252, - 304, - 1, - 0, - 0, - 0, - 253, - 254, - 5, - 38, - 0, - 0, - 254, - 255, - 5, - 1, - 0, - 0, - 255, - 256, - 3, - 0, - 0, - 0, - 256, - 257, - 5, - 2, - 0, - 0, - 257, - 304, - 1, - 0, - 0, - 0, - 258, - 259, - 5, - 39, - 0, - 0, - 259, - 260, - 5, - 1, - 0, - 0, - 260, - 261, - 3, - 0, - 0, - 0, - 261, - 262, - 5, - 2, - 0, - 0, - 262, - 304, - 1, - 0, - 0, - 0, - 263, - 264, - 5, - 40, - 0, - 0, - 264, - 265, - 5, - 1, - 0, - 0, - 265, - 266, - 3, - 0, - 0, - 0, - 266, - 267, - 5, - 2, - 0, - 0, - 267, - 304, - 1, - 0, - 0, - 0, - 268, - 269, - 5, - 46, - 0, - 0, - 269, - 270, - 5, - 1, - 0, - 0, - 270, - 271, - 3, - 0, - 0, - 0, - 271, - 272, - 5, - 2, - 0, - 0, - 272, - 304, - 1, - 0, - 0, - 0, - 273, - 274, - 5, - 47, - 0, - 0, - 274, - 275, - 5, - 1, - 0, - 0, - 275, - 276, - 3, - 0, - 0, - 0, - 276, - 277, - 5, - 2, - 0, - 0, - 277, - 304, - 1, - 0, - 0, - 0, - 278, - 279, - 5, - 48, - 0, - 0, - 279, - 280, - 5, - 1, - 0, - 0, - 280, - 281, - 3, - 0, - 0, - 0, - 281, - 282, - 5, - 2, - 0, - 0, - 282, - 304, - 1, - 0, - 0, - 0, - 283, - 284, - 5, - 49, - 0, - 0, - 284, - 285, - 5, - 1, - 0, - 0, - 285, - 286, - 3, - 0, - 0, - 0, - 286, - 287, - 5, - 2, - 0, - 0, - 287, - 304, - 1, - 0, - 0, - 0, - 288, - 289, - 5, - 50, - 0, - 0, - 289, - 290, - 5, - 1, - 0, - 0, - 290, - 291, - 3, - 0, - 0, - 0, - 291, - 292, - 5, - 2, - 0, - 0, - 292, - 304, - 1, - 0, - 0, - 0, - 293, - 294, - 5, - 41, - 0, - 0, - 294, - 295, - 5, - 1, - 0, - 0, - 295, - 296, - 3, - 0, - 0, - 0, - 296, - 297, - 5, - 2, - 0, - 0, - 297, - 304, - 1, - 0, - 0, - 0, - 298, - 299, - 5, - 42, - 0, - 0, - 299, - 300, - 5, - 1, - 0, - 0, - 300, - 301, - 3, - 0, - 0, - 0, - 301, - 302, - 5, - 2, - 0, - 0, - 302, - 304, - 1, - 0, - 0, - 0, - 303, - 128, - 1, - 0, - 0, - 0, - 303, - 133, - 1, - 0, - 0, - 0, - 303, - 138, - 1, - 0, - 0, - 0, - 303, - 143, - 1, - 0, - 0, - 0, - 303, - 148, - 1, - 0, - 0, - 0, - 303, - 153, - 1, - 0, - 0, - 0, - 303, - 158, - 1, - 0, - 0, - 0, - 303, - 163, - 1, - 0, - 0, - 0, - 303, - 168, - 1, - 0, - 0, - 0, - 303, - 173, - 1, - 0, - 0, - 0, - 303, - 178, - 1, - 0, - 0, - 0, - 303, - 183, - 1, - 0, - 0, - 0, - 303, - 188, - 1, - 0, - 0, - 0, - 303, - 193, - 1, - 0, - 0, - 0, - 303, - 198, - 1, - 0, - 0, - 0, - 303, - 203, - 1, - 0, - 0, - 0, - 303, - 208, - 1, - 0, - 0, - 0, - 303, - 213, - 1, - 0, - 0, - 0, - 303, - 218, - 1, - 0, - 0, - 0, - 303, - 223, - 1, - 0, - 0, - 0, - 303, - 228, - 1, - 0, - 0, - 0, - 303, - 233, - 1, - 0, - 0, - 0, - 303, - 238, - 1, - 0, - 0, - 0, - 303, - 243, - 1, - 0, - 0, - 0, - 303, - 248, - 1, - 0, - 0, - 0, - 303, - 253, - 1, - 0, - 0, - 0, - 303, - 258, - 1, - 0, - 0, - 0, - 303, - 263, - 1, - 0, - 0, - 0, - 303, - 268, - 1, - 0, - 0, - 0, - 303, - 273, - 1, - 0, - 0, - 0, - 303, - 278, - 1, - 0, - 0, - 0, - 303, - 283, - 1, - 0, - 0, - 0, - 303, - 288, - 1, - 0, - 0, - 0, - 303, - 293, - 1, - 0, - 0, - 0, - 303, - 298, - 1, - 0, - 0, - 0, - 304, - 15, - 1, - 0, - 0, - 0, - 305, - 306, - 5, - 34, - 0, - 0, - 306, - 307, - 5, - 1, - 0, - 0, - 307, - 308, - 3, - 0, - 0, - 0, - 308, - 309, - 5, - 4, - 0, - 0, - 309, - 310, - 3, - 0, - 0, - 0, - 310, - 311, - 5, - 2, - 0, - 0, - 311, - 341, - 1, - 0, - 0, - 0, - 312, - 313, - 5, - 12, - 0, - 0, - 313, - 314, - 5, - 1, - 0, - 0, - 314, - 315, - 3, - 0, - 0, - 0, - 315, - 316, - 5, - 4, - 0, - 0, - 316, - 317, - 3, - 0, - 0, - 0, - 317, - 318, - 5, - 2, - 0, - 0, - 318, - 341, - 1, - 0, - 0, - 0, - 319, - 320, - 5, - 26, - 0, - 0, - 320, - 321, - 5, - 1, - 0, - 0, - 321, - 322, - 3, - 0, - 0, - 0, - 322, - 323, - 5, - 4, - 0, - 0, - 323, - 324, - 3, - 0, - 0, - 0, - 324, - 325, - 5, - 2, - 0, - 0, - 325, - 341, - 1, - 0, - 0, - 0, - 326, - 327, - 5, - 27, - 0, - 0, - 327, - 328, - 5, - 1, - 0, - 0, - 328, - 329, - 3, - 0, - 0, - 0, - 329, - 330, - 5, - 4, - 0, - 0, - 330, - 331, - 3, - 0, - 0, - 0, - 331, - 332, - 5, - 2, - 0, - 0, - 332, - 341, - 1, - 0, - 0, - 0, - 333, - 334, - 5, - 44, - 0, - 0, - 334, - 335, - 5, - 1, - 0, - 0, - 335, - 336, - 3, - 0, - 0, - 0, - 336, - 337, - 5, - 4, - 0, - 0, - 337, - 338, - 3, - 0, - 0, - 0, - 338, - 339, - 5, - 2, - 0, - 0, - 339, - 341, - 1, - 0, - 0, - 0, - 340, - 305, - 1, - 0, - 0, - 0, - 340, - 312, - 1, - 0, - 0, - 0, - 340, - 319, - 1, - 0, - 0, - 0, - 340, - 326, - 1, - 0, - 0, - 0, - 340, - 333, - 1, - 0, - 0, - 0, - 341, - 17, - 1, - 0, - 0, - 0, - 342, - 343, - 5, - 36, - 0, - 0, - 343, - 344, - 5, - 1, - 0, - 0, - 344, - 345, - 3, - 0, - 0, - 0, - 345, - 346, - 5, - 4, - 0, - 0, - 346, - 347, - 3, - 0, - 0, - 0, - 347, - 348, - 5, - 4, - 0, - 0, - 348, - 349, - 3, - 0, - 0, - 0, - 349, - 350, - 5, - 2, - 0, - 0, - 350, - 379, - 1, - 0, - 0, - 0, - 351, - 352, - 5, - 43, - 0, - 0, - 352, - 353, - 5, - 1, - 0, - 0, - 353, - 354, - 3, - 0, - 0, - 0, - 354, - 355, - 5, - 4, - 0, - 0, - 355, - 356, - 3, - 0, - 0, - 0, - 356, - 357, - 5, - 4, - 0, - 0, - 357, - 358, - 3, - 0, - 0, - 0, - 358, - 359, - 5, - 2, - 0, - 0, - 359, - 379, - 1, - 0, - 0, - 0, - 360, - 361, - 5, - 45, - 0, - 0, - 361, - 362, - 5, - 1, - 0, - 0, - 362, - 363, - 3, - 0, - 0, - 0, - 363, - 364, - 5, - 4, - 0, - 0, - 364, - 365, - 3, - 0, - 0, - 0, - 365, - 366, - 5, - 4, - 0, - 0, - 366, - 367, - 3, - 0, - 0, - 0, - 367, - 368, - 5, - 2, - 0, - 0, - 368, - 379, - 1, - 0, - 0, - 0, - 369, - 370, - 5, - 56, - 0, - 0, - 370, - 371, - 5, - 1, - 0, - 0, - 371, - 372, - 3, - 0, - 0, - 0, - 372, - 373, - 5, - 4, - 0, - 0, - 373, - 374, - 3, - 0, - 0, - 0, - 374, - 375, - 5, - 4, - 0, - 0, - 375, - 376, - 3, - 0, - 0, - 0, - 376, - 377, - 5, - 2, - 0, - 0, - 377, - 379, - 1, - 0, - 0, - 0, - 378, - 342, - 1, - 0, - 0, - 0, - 378, - 351, - 1, - 0, - 0, - 0, - 378, - 360, - 1, - 0, - 0, - 0, - 378, - 369, - 1, - 0, - 0, - 0, - 379, - 19, - 1, - 0, - 0, - 0, - 380, - 381, - 5, - 53, - 0, - 0, - 381, - 382, - 5, - 1, - 0, - 0, - 382, - 383, - 3, - 0, - 0, - 0, - 383, - 384, - 5, - 4, - 0, - 0, - 384, - 385, - 3, - 0, - 0, - 0, - 385, - 386, - 5, - 4, - 0, - 0, - 386, - 387, - 3, - 0, - 0, - 0, - 387, - 388, - 5, - 4, - 0, - 0, - 388, - 389, - 3, - 0, - 0, - 0, - 389, - 390, - 5, - 2, - 0, - 0, - 390, - 21, - 1, - 0, - 0, - 0, - 391, - 392, - 5, - 24, - 0, - 0, - 392, - 393, - 5, - 1, - 0, - 0, - 393, - 398, - 3, - 0, - 0, - 0, - 394, - 395, - 5, - 4, - 0, - 0, - 395, - 397, - 3, - 0, - 0, - 0, - 396, - 394, - 1, - 0, - 0, - 0, - 397, - 400, - 1, - 0, - 0, - 0, - 398, - 396, - 1, - 0, - 0, - 0, - 398, - 399, - 1, - 0, - 0, - 0, - 399, - 401, - 1, - 0, - 0, - 0, - 400, - 398, - 1, - 0, - 0, - 0, - 401, - 402, - 5, - 2, - 0, - 0, - 402, - 452, - 1, - 0, - 0, - 0, - 403, - 404, - 5, - 25, - 0, - 0, - 404, - 405, - 5, - 1, - 0, - 0, - 405, - 410, - 3, - 0, - 0, - 0, - 406, - 407, - 5, - 4, - 0, - 0, - 407, - 409, - 3, - 0, - 0, - 0, - 408, - 406, - 1, - 0, - 0, - 0, - 409, - 412, - 1, - 0, - 0, - 0, - 410, - 408, - 1, - 0, - 0, - 0, - 410, - 411, - 1, - 0, - 0, - 0, - 411, - 413, - 1, - 0, - 0, - 0, - 412, - 410, - 1, - 0, - 0, - 0, - 413, - 414, - 5, - 2, - 0, - 0, - 414, - 452, - 1, - 0, - 0, - 0, - 415, - 416, - 5, - 51, - 0, - 0, - 416, - 417, - 5, - 1, - 0, - 0, - 417, - 420, - 3, - 0, - 0, - 0, - 418, - 419, - 5, - 4, - 0, - 0, - 419, - 421, - 3, - 0, - 0, - 0, - 420, - 418, - 1, - 0, - 0, - 0, - 421, - 422, - 1, - 0, - 0, - 0, - 422, - 420, - 1, - 0, - 0, - 0, - 422, - 423, - 1, - 0, - 0, - 0, - 423, - 424, - 1, - 0, - 0, - 0, - 424, - 425, - 5, - 2, - 0, - 0, - 425, - 452, - 1, - 0, - 0, - 0, - 426, - 427, - 5, - 52, - 0, - 0, - 427, - 428, - 5, - 1, - 0, - 0, - 428, - 431, - 3, - 0, - 0, - 0, - 429, - 430, - 5, - 4, - 0, - 0, - 430, - 432, - 3, - 0, - 0, - 0, - 431, - 429, - 1, - 0, - 0, - 0, - 432, - 433, - 1, - 0, - 0, - 0, - 433, - 431, - 1, - 0, - 0, - 0, - 433, - 434, - 1, - 0, - 0, - 0, - 434, - 435, - 1, - 0, - 0, - 0, - 435, - 436, - 5, - 2, - 0, - 0, - 436, - 452, - 1, - 0, - 0, - 0, - 437, - 438, - 5, - 54, - 0, - 0, - 438, - 439, - 5, - 1, - 0, - 0, - 439, - 440, - 3, - 0, - 0, - 0, - 440, - 441, - 5, - 4, - 0, - 0, - 441, - 442, - 3, - 0, - 0, - 0, - 442, - 443, - 5, - 2, - 0, - 0, - 443, - 452, - 1, - 0, - 0, - 0, - 444, - 445, - 5, - 55, - 0, - 0, - 445, - 446, - 5, - 1, - 0, - 0, - 446, - 447, - 3, - 0, - 0, - 0, - 447, - 448, - 5, - 4, - 0, - 0, - 448, - 449, - 3, - 0, - 0, - 0, - 449, - 450, - 5, - 2, - 0, - 0, - 450, - 452, - 1, - 0, - 0, - 0, - 451, - 391, - 1, - 0, - 0, - 0, - 451, - 403, - 1, - 0, - 0, - 0, - 451, - 415, - 1, - 0, - 0, - 0, - 451, - 426, - 1, - 0, - 0, - 0, - 451, - 437, - 1, - 0, - 0, - 0, - 451, - 444, - 1, - 0, - 0, - 0, - 452, - 23, - 1, - 0, - 0, - 0, - 19, - 26, - 49, - 51, - 63, - 65, - 80, - 82, - 90, - 97, - 121, - 126, - 303, - 340, - 378, - 398, - 410, - 422, - 433, - 451, + 4,1,76,473,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,1,6,1, + 6,1,6,1,6,5,6,120,8,6,10,6,12,6,123,9,6,1,6,1,6,3,6,127,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,1,7,1,7,1,7,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,309,8,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, + 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, + 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8, + 1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,360,8,8,1,9,1,9,1,9,1,9,1,9,1,9, + 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9, + 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,398, + 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,5,11,416,8,11,10,11,12,11,419,9,11,1,11,1,11, + 1,11,1,11,1,11,1,11,1,11,5,11,428,8,11,10,11,12,11,431,9,11,1,11, + 1,11,1,11,1,11,1,11,1,11,1,11,4,11,440,8,11,11,11,12,11,441,1,11, + 1,11,1,11,1,11,1,11,1,11,1,11,4,11,451,8,11,11,11,12,11,452,1,11, + 1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11, + 1,11,1,11,3,11,471,8,11,1,11,0,3,2,4,6,12,0,2,4,6,8,10,12,14,16, + 18,20,22,0,0,539,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,126,1,0,0,0,14,308,1,0,0,0,16, + 359,1,0,0,0,18,397,1,0,0,0,20,399,1,0,0,0,22,470,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,67, + 0,0,33,50,3,4,2,0,34,35,10,6,0,0,35,36,5,66,0,0,36,50,3,4,2,0,37, + 38,10,5,0,0,38,39,5,69,0,0,39,50,3,4,2,0,40,41,10,4,0,0,41,42,5, + 68,0,0,42,50,3,4,2,0,43,44,10,3,0,0,44,45,5,70,0,0,45,50,3,4,2,0, + 46,47,10,2,0,0,47,48,5,71,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,60,0,0,59,64,3,6,3,0,60,61,10,2,0,0,61,62,5,61,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,62,0,0,73,81,3,8,4,0,74,75, + 10,3,0,0,75,76,5,63,0,0,76,81,3,8,4,0,77,78,10,2,0,0,78,79,5,64, + 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,65,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,60,0,0,93,98, + 3,10,5,0,94,95,5,61,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,127,3,14,7,0,100, + 127,3,16,8,0,101,127,3,18,9,0,102,127,3,20,10,0,103,127,3,22,11, + 0,104,127,5,75,0,0,105,127,5,74,0,0,106,127,5,73,0,0,107,108,5,1, + 0,0,108,109,3,0,0,0,109,110,5,2,0,0,110,127,1,0,0,0,111,112,5,72, + 0,0,112,113,3,0,0,0,113,114,5,72,0,0,114,127,1,0,0,0,115,116,5,3, + 0,0,116,121,3,0,0,0,117,118,5,4,0,0,118,120,3,0,0,0,119,117,1,0, + 0,0,120,123,1,0,0,0,121,119,1,0,0,0,121,122,1,0,0,0,122,124,1,0, + 0,0,123,121,1,0,0,0,124,125,5,5,0,0,125,127,1,0,0,0,126,99,1,0,0, + 0,126,100,1,0,0,0,126,101,1,0,0,0,126,102,1,0,0,0,126,103,1,0,0, + 0,126,104,1,0,0,0,126,105,1,0,0,0,126,106,1,0,0,0,126,107,1,0,0, + 0,126,111,1,0,0,0,126,115,1,0,0,0,127,13,1,0,0,0,128,129,5,6,0,0, + 129,130,5,1,0,0,130,131,3,0,0,0,131,132,5,2,0,0,132,309,1,0,0,0, + 133,134,5,7,0,0,134,135,5,1,0,0,135,136,3,0,0,0,136,137,5,2,0,0, + 137,309,1,0,0,0,138,139,5,8,0,0,139,140,5,1,0,0,140,141,3,0,0,0, + 141,142,5,2,0,0,142,309,1,0,0,0,143,144,5,9,0,0,144,145,5,1,0,0, + 145,146,3,0,0,0,146,147,5,2,0,0,147,309,1,0,0,0,148,149,5,10,0,0, + 149,150,5,1,0,0,150,151,3,0,0,0,151,152,5,2,0,0,152,309,1,0,0,0, + 153,154,5,11,0,0,154,155,5,1,0,0,155,156,3,0,0,0,156,157,5,2,0,0, + 157,309,1,0,0,0,158,159,5,13,0,0,159,160,5,1,0,0,160,161,3,0,0,0, + 161,162,5,2,0,0,162,309,1,0,0,0,163,164,5,14,0,0,164,165,5,1,0,0, + 165,166,3,0,0,0,166,167,5,2,0,0,167,309,1,0,0,0,168,169,5,15,0,0, + 169,170,5,1,0,0,170,171,3,0,0,0,171,172,5,2,0,0,172,309,1,0,0,0, + 173,174,5,16,0,0,174,175,5,1,0,0,175,176,3,0,0,0,176,177,5,2,0,0, + 177,309,1,0,0,0,178,179,5,17,0,0,179,180,5,1,0,0,180,181,3,0,0,0, + 181,182,5,2,0,0,182,309,1,0,0,0,183,184,5,18,0,0,184,185,5,1,0,0, + 185,186,3,0,0,0,186,187,5,2,0,0,187,309,1,0,0,0,188,189,5,19,0,0, + 189,190,5,1,0,0,190,191,3,0,0,0,191,192,5,2,0,0,192,309,1,0,0,0, + 193,194,5,20,0,0,194,195,5,1,0,0,195,196,3,0,0,0,196,197,5,2,0,0, + 197,309,1,0,0,0,198,199,5,21,0,0,199,200,5,1,0,0,200,201,3,0,0,0, + 201,202,5,2,0,0,202,309,1,0,0,0,203,204,5,22,0,0,204,205,5,1,0,0, + 205,206,3,0,0,0,206,207,5,2,0,0,207,309,1,0,0,0,208,209,5,23,0,0, + 209,210,5,1,0,0,210,211,3,0,0,0,211,212,5,2,0,0,212,309,1,0,0,0, + 213,214,5,28,0,0,214,215,5,1,0,0,215,216,3,0,0,0,216,217,5,2,0,0, + 217,309,1,0,0,0,218,219,5,29,0,0,219,220,5,1,0,0,220,221,3,0,0,0, + 221,222,5,2,0,0,222,309,1,0,0,0,223,224,5,30,0,0,224,225,5,1,0,0, + 225,226,3,0,0,0,226,227,5,2,0,0,227,309,1,0,0,0,228,229,5,31,0,0, + 229,230,5,1,0,0,230,231,3,0,0,0,231,232,5,2,0,0,232,309,1,0,0,0, + 233,234,5,32,0,0,234,235,5,1,0,0,235,236,3,0,0,0,236,237,5,2,0,0, + 237,309,1,0,0,0,238,239,5,33,0,0,239,240,5,1,0,0,240,241,3,0,0,0, + 241,242,5,2,0,0,242,309,1,0,0,0,243,244,5,35,0,0,244,245,5,1,0,0, + 245,246,3,0,0,0,246,247,5,2,0,0,247,309,1,0,0,0,248,249,5,37,0,0, + 249,250,5,1,0,0,250,251,3,0,0,0,251,252,5,2,0,0,252,309,1,0,0,0, + 253,254,5,38,0,0,254,255,5,1,0,0,255,256,3,0,0,0,256,257,5,2,0,0, + 257,309,1,0,0,0,258,259,5,39,0,0,259,260,5,1,0,0,260,261,3,0,0,0, + 261,262,5,2,0,0,262,309,1,0,0,0,263,264,5,40,0,0,264,265,5,1,0,0, + 265,266,3,0,0,0,266,267,5,2,0,0,267,309,1,0,0,0,268,269,5,46,0,0, + 269,270,5,1,0,0,270,271,3,0,0,0,271,272,5,2,0,0,272,309,1,0,0,0, + 273,274,5,47,0,0,274,275,5,1,0,0,275,276,3,0,0,0,276,277,5,2,0,0, + 277,309,1,0,0,0,278,279,5,48,0,0,279,280,5,1,0,0,280,281,3,0,0,0, + 281,282,5,2,0,0,282,309,1,0,0,0,283,284,5,49,0,0,284,285,5,1,0,0, + 285,286,3,0,0,0,286,287,5,2,0,0,287,309,1,0,0,0,288,289,5,50,0,0, + 289,290,5,1,0,0,290,291,3,0,0,0,291,292,5,2,0,0,292,309,1,0,0,0, + 293,294,5,41,0,0,294,295,5,1,0,0,295,296,3,0,0,0,296,297,5,2,0,0, + 297,309,1,0,0,0,298,299,5,42,0,0,299,300,5,1,0,0,300,301,3,0,0,0, + 301,302,5,2,0,0,302,309,1,0,0,0,303,304,5,59,0,0,304,305,5,1,0,0, + 305,306,3,0,0,0,306,307,5,2,0,0,307,309,1,0,0,0,308,128,1,0,0,0, + 308,133,1,0,0,0,308,138,1,0,0,0,308,143,1,0,0,0,308,148,1,0,0,0, + 308,153,1,0,0,0,308,158,1,0,0,0,308,163,1,0,0,0,308,168,1,0,0,0, + 308,173,1,0,0,0,308,178,1,0,0,0,308,183,1,0,0,0,308,188,1,0,0,0, + 308,193,1,0,0,0,308,198,1,0,0,0,308,203,1,0,0,0,308,208,1,0,0,0, + 308,213,1,0,0,0,308,218,1,0,0,0,308,223,1,0,0,0,308,228,1,0,0,0, + 308,233,1,0,0,0,308,238,1,0,0,0,308,243,1,0,0,0,308,248,1,0,0,0, + 308,253,1,0,0,0,308,258,1,0,0,0,308,263,1,0,0,0,308,268,1,0,0,0, + 308,273,1,0,0,0,308,278,1,0,0,0,308,283,1,0,0,0,308,288,1,0,0,0, + 308,293,1,0,0,0,308,298,1,0,0,0,308,303,1,0,0,0,309,15,1,0,0,0,310, + 311,5,34,0,0,311,312,5,1,0,0,312,313,3,0,0,0,313,314,5,4,0,0,314, + 315,3,0,0,0,315,316,5,2,0,0,316,360,1,0,0,0,317,318,5,12,0,0,318, + 319,5,1,0,0,319,320,3,0,0,0,320,321,5,4,0,0,321,322,3,0,0,0,322, + 323,5,2,0,0,323,360,1,0,0,0,324,325,5,26,0,0,325,326,5,1,0,0,326, + 327,3,0,0,0,327,328,5,4,0,0,328,329,3,0,0,0,329,330,5,2,0,0,330, + 360,1,0,0,0,331,332,5,27,0,0,332,333,5,1,0,0,333,334,3,0,0,0,334, + 335,5,4,0,0,335,336,3,0,0,0,336,337,5,2,0,0,337,360,1,0,0,0,338, + 339,5,44,0,0,339,340,5,1,0,0,340,341,3,0,0,0,341,342,5,4,0,0,342, + 343,3,0,0,0,343,344,5,2,0,0,344,360,1,0,0,0,345,346,5,57,0,0,346, + 347,5,1,0,0,347,348,3,0,0,0,348,349,5,4,0,0,349,350,3,0,0,0,350, + 351,5,2,0,0,351,360,1,0,0,0,352,353,5,58,0,0,353,354,5,1,0,0,354, + 355,3,0,0,0,355,356,5,4,0,0,356,357,3,0,0,0,357,358,5,2,0,0,358, + 360,1,0,0,0,359,310,1,0,0,0,359,317,1,0,0,0,359,324,1,0,0,0,359, + 331,1,0,0,0,359,338,1,0,0,0,359,345,1,0,0,0,359,352,1,0,0,0,360, + 17,1,0,0,0,361,362,5,36,0,0,362,363,5,1,0,0,363,364,3,0,0,0,364, + 365,5,4,0,0,365,366,3,0,0,0,366,367,5,4,0,0,367,368,3,0,0,0,368, + 369,5,2,0,0,369,398,1,0,0,0,370,371,5,43,0,0,371,372,5,1,0,0,372, + 373,3,0,0,0,373,374,5,4,0,0,374,375,3,0,0,0,375,376,5,4,0,0,376, + 377,3,0,0,0,377,378,5,2,0,0,378,398,1,0,0,0,379,380,5,45,0,0,380, + 381,5,1,0,0,381,382,3,0,0,0,382,383,5,4,0,0,383,384,3,0,0,0,384, + 385,5,4,0,0,385,386,3,0,0,0,386,387,5,2,0,0,387,398,1,0,0,0,388, + 389,5,56,0,0,389,390,5,1,0,0,390,391,3,0,0,0,391,392,5,4,0,0,392, + 393,3,0,0,0,393,394,5,4,0,0,394,395,3,0,0,0,395,396,5,2,0,0,396, + 398,1,0,0,0,397,361,1,0,0,0,397,370,1,0,0,0,397,379,1,0,0,0,397, + 388,1,0,0,0,398,19,1,0,0,0,399,400,5,53,0,0,400,401,5,1,0,0,401, + 402,3,0,0,0,402,403,5,4,0,0,403,404,3,0,0,0,404,405,5,4,0,0,405, + 406,3,0,0,0,406,407,5,4,0,0,407,408,3,0,0,0,408,409,5,2,0,0,409, + 21,1,0,0,0,410,411,5,24,0,0,411,412,5,1,0,0,412,417,3,0,0,0,413, + 414,5,4,0,0,414,416,3,0,0,0,415,413,1,0,0,0,416,419,1,0,0,0,417, + 415,1,0,0,0,417,418,1,0,0,0,418,420,1,0,0,0,419,417,1,0,0,0,420, + 421,5,2,0,0,421,471,1,0,0,0,422,423,5,25,0,0,423,424,5,1,0,0,424, + 429,3,0,0,0,425,426,5,4,0,0,426,428,3,0,0,0,427,425,1,0,0,0,428, + 431,1,0,0,0,429,427,1,0,0,0,429,430,1,0,0,0,430,432,1,0,0,0,431, + 429,1,0,0,0,432,433,5,2,0,0,433,471,1,0,0,0,434,435,5,51,0,0,435, + 436,5,1,0,0,436,439,3,0,0,0,437,438,5,4,0,0,438,440,3,0,0,0,439, + 437,1,0,0,0,440,441,1,0,0,0,441,439,1,0,0,0,441,442,1,0,0,0,442, + 443,1,0,0,0,443,444,5,2,0,0,444,471,1,0,0,0,445,446,5,52,0,0,446, + 447,5,1,0,0,447,450,3,0,0,0,448,449,5,4,0,0,449,451,3,0,0,0,450, + 448,1,0,0,0,451,452,1,0,0,0,452,450,1,0,0,0,452,453,1,0,0,0,453, + 454,1,0,0,0,454,455,5,2,0,0,455,471,1,0,0,0,456,457,5,54,0,0,457, + 458,5,1,0,0,458,459,3,0,0,0,459,460,5,4,0,0,460,461,3,0,0,0,461, + 462,5,2,0,0,462,471,1,0,0,0,463,464,5,55,0,0,464,465,5,1,0,0,465, + 466,3,0,0,0,466,467,5,4,0,0,467,468,3,0,0,0,468,469,5,2,0,0,469, + 471,1,0,0,0,470,410,1,0,0,0,470,422,1,0,0,0,470,434,1,0,0,0,470, + 445,1,0,0,0,470,456,1,0,0,0,470,463,1,0,0,0,471,23,1,0,0,0,19,26, + 49,51,63,65,80,82,90,97,121,126,308,359,397,417,429,441,452,470 ] +class MathExprParser ( Parser ): -class MathExprParser(Parser): grammarFileName = "MathExpr.g4" atn = ATNDeserializer().deserialize(serializedATN()) - decisionsToDFA = [DFA(ds, i) for i, ds in enumerate(atn.decisionToState)] + decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] 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'", - "'print_shape'", - "'pshp'", - "'lerp'", - "'step'", - "'smoothstep'", - "'fract'", - "'relu'", - "'softplus'", - "'gelu'", - "'sign'", - "'map'", - "'conv'", - "'swap'", - "'permute'", - "'reshape'", - "'range'", - "'+'", - "'-'", - "'*'", - "'/'", - "'%'", - "'^'", - "'>='", - "'>'", - "'<='", - "'<'", - "'=='", - "'!='", - "'|'", - ] + 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'", "'print_shape'", "'pshp'", "'lerp'", "'step'", + "'smoothstep'", "'fract'", "'relu'", "'softplus'", + "'gelu'", "'sign'", "'map'", "'conv'", "'swap'", "'permute'", + "'reshape'", "'range'", "'topk'", "'botk'", "'pinv'", + "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "'>='", "'>'", + "'<='", "'<'", "'=='", "'!='", "'|'" ] - 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", - "PRINT_SHAPE_L", - "PRINT_SHAPE", - "LERP", - "STEP", - "SMOOTHSTEP", - "FRACT", - "RELU", - "SOFTPLUS", - "GELU", - "SIGN", - "MAP", - "CONV", - "SWAP", - "PERM", - "RESHAPE", - "RANGE", - "PLUS", - "MINUS", - "MULT", - "DIV", - "MOD", - "POW", - "GE", - "GT", - "LE", - "LT", - "EQ", - "NE", - "PIPE", - "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", "PRINT_SHAPE_L", + "PRINT_SHAPE", "LERP", "STEP", "SMOOTHSTEP", "FRACT", + "RELU", "SOFTPLUS", "GELU", "SIGN", "MAP", "CONV", + "SWAP", "PERM", "RESHAPE", "RANGE", "TOPK", "BOTK", + "PINV", "PLUS", "MINUS", "MULT", "DIV", "MOD", "POW", + "GE", "GT", "LE", "LT", "EQ", "NE", "PIPE", "CONSTANT", + "NUMBER", "VARIABLE", "WS" ] RULE_expr = 0 RULE_compExpr = 1 @@ -4265,126 +229,140 @@ class MathExprParser(Parser): RULE_func4 = 10 RULE_funcN = 11 - ruleNames = ["expr", "compExpr", "addExpr", "mulExpr", "powExpr", "unaryExpr", "atom", "func1", "func2", "func3", "func4", "funcN"] + ruleNames = [ "expr", "compExpr", "addExpr", "mulExpr", "powExpr", + "unaryExpr", "atom", "func1", "func2", "func3", "func4", + "funcN" ] EOF = Token.EOF - T__0 = 1 - T__1 = 2 - T__2 = 3 - T__3 = 4 - T__4 = 5 - SIN = 6 - COS = 7 - TAN = 8 - ASIN = 9 - ACOS = 10 - ATAN = 11 - ATAN2 = 12 - SINH = 13 - COSH = 14 - TANH = 15 - ASINH = 16 - ACOSH = 17 - ATANH = 18 - ABS = 19 - SQRT = 20 - LN = 21 - LOG = 22 - EXP = 23 - SMIN = 24 - SMAX = 25 - TMIN = 26 - TMAX = 27 - TNORM = 28 - SNORM = 29 - FLOOR = 30 - CEIL = 31 - ROUND = 32 - GAMMA = 33 - POWE = 34 - SIGM = 35 - CLAMP = 36 - SFFT = 37 - SIFFT = 38 - ANGL = 39 - PRNT = 40 - PRINT_SHAPE_L = 41 - PRINT_SHAPE = 42 - LERP = 43 - STEP = 44 - SMOOTHSTEP = 45 - FRACT = 46 - RELU = 47 - SOFTPLUS = 48 - GELU = 49 - SIGN = 50 - MAP = 51 - CONV = 52 - SWAP = 53 - PERM = 54 - RESHAPE = 55 - RANGE = 56 - PLUS = 57 - MINUS = 58 - MULT = 59 - DIV = 60 - MOD = 61 - POW = 62 - GE = 63 - GT = 64 - LE = 65 - LT = 66 - EQ = 67 - NE = 68 - PIPE = 69 - CONSTANT = 70 - NUMBER = 71 - VARIABLE = 72 - WS = 73 + T__0=1 + T__1=2 + T__2=3 + T__3=4 + T__4=5 + SIN=6 + COS=7 + TAN=8 + ASIN=9 + ACOS=10 + ATAN=11 + ATAN2=12 + SINH=13 + COSH=14 + TANH=15 + ASINH=16 + ACOSH=17 + ATANH=18 + ABS=19 + SQRT=20 + LN=21 + LOG=22 + EXP=23 + SMIN=24 + SMAX=25 + TMIN=26 + TMAX=27 + TNORM=28 + SNORM=29 + FLOOR=30 + CEIL=31 + ROUND=32 + GAMMA=33 + POWE=34 + SIGM=35 + CLAMP=36 + SFFT=37 + SIFFT=38 + ANGL=39 + PRNT=40 + PRINT_SHAPE_L=41 + PRINT_SHAPE=42 + LERP=43 + STEP=44 + SMOOTHSTEP=45 + FRACT=46 + RELU=47 + SOFTPLUS=48 + GELU=49 + SIGN=50 + MAP=51 + CONV=52 + SWAP=53 + PERM=54 + RESHAPE=55 + RANGE=56 + TOPK=57 + BOTK=58 + PINV=59 + PLUS=60 + MINUS=61 + MULT=62 + DIV=63 + MOD=64 + POW=65 + GE=66 + GT=67 + LE=68 + LT=69 + EQ=70 + NE=71 + PIPE=72 + CONSTANT=73 + NUMBER=74 + VARIABLE=75 + WS=76 - def __init__(self, input: TokenStream, output: TextIO = sys.stdout): + def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) self.checkVersion("4.13.2") self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._predicates = None - class ExprContext(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + + + class ExprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser def atom(self): - return self.getTypedRuleContext(MathExprParser.AtomContext, 0) + return self.getTypedRuleContext(MathExprParser.AtomContext,0) + def compExpr(self): - return self.getTypedRuleContext(MathExprParser.CompExprContext, 0) + return self.getTypedRuleContext(MathExprParser.CompExprContext,0) + def getRuleIndex(self): return MathExprParser.RULE_expr - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterExpr"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpr" ): listener.enterExpr(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitExpr"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpr" ): listener.exitExpr(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitExpr"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExpr" ): return visitor.visitExpr(self) else: return visitor.visitChildren(self) + + + def expr(self): + localctx = MathExprParser.ExprContext(self, self._ctx, self.state) self.enterRule(localctx, 0, self.RULE_expr) try: self.state = 26 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 0, self._ctx) + la_ = self._interp.adaptivePredict(self._input,0,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) self.state = 24 @@ -4397,6 +375,7 @@ class MathExprParser(Parser): self.compExpr(0) pass + except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -4405,210 +384,230 @@ class MathExprParser(Parser): self.exitRule() return localctx - class CompExprContext(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class CompExprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_compExpr - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + class LtExpContext(CompExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.CompExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.CompExprContext super().__init__(parser) self.copyFrom(ctx) def compExpr(self): - return self.getTypedRuleContext(MathExprParser.CompExprContext, 0) + return self.getTypedRuleContext(MathExprParser.CompExprContext,0) def LT(self): return self.getToken(MathExprParser.LT, 0) - def addExpr(self): - return self.getTypedRuleContext(MathExprParser.AddExprContext, 0) + return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterLtExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLtExp" ): listener.enterLtExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitLtExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLtExp" ): listener.exitLtExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitLtExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLtExp" ): return visitor.visitLtExp(self) else: return visitor.visitChildren(self) + class EqExpContext(CompExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.CompExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.CompExprContext super().__init__(parser) self.copyFrom(ctx) def compExpr(self): - return self.getTypedRuleContext(MathExprParser.CompExprContext, 0) + return self.getTypedRuleContext(MathExprParser.CompExprContext,0) def EQ(self): return self.getToken(MathExprParser.EQ, 0) - def addExpr(self): - return self.getTypedRuleContext(MathExprParser.AddExprContext, 0) + return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterEqExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEqExp" ): listener.enterEqExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitEqExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEqExp" ): listener.exitEqExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitEqExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEqExp" ): return visitor.visitEqExp(self) else: return visitor.visitChildren(self) + class ToAddContext(CompExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.CompExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.CompExprContext super().__init__(parser) self.copyFrom(ctx) def addExpr(self): - return self.getTypedRuleContext(MathExprParser.AddExprContext, 0) + return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterToAdd"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterToAdd" ): listener.enterToAdd(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitToAdd"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitToAdd" ): listener.exitToAdd(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitToAdd"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitToAdd" ): return visitor.visitToAdd(self) else: return visitor.visitChildren(self) + class GeExpContext(CompExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.CompExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.CompExprContext super().__init__(parser) self.copyFrom(ctx) def compExpr(self): - return self.getTypedRuleContext(MathExprParser.CompExprContext, 0) + return self.getTypedRuleContext(MathExprParser.CompExprContext,0) def GE(self): return self.getToken(MathExprParser.GE, 0) - def addExpr(self): - return self.getTypedRuleContext(MathExprParser.AddExprContext, 0) + return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterGeExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGeExp" ): listener.enterGeExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitGeExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGeExp" ): listener.exitGeExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitGeExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitGeExp" ): return visitor.visitGeExp(self) else: return visitor.visitChildren(self) + class LeExpContext(CompExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.CompExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.CompExprContext super().__init__(parser) self.copyFrom(ctx) def compExpr(self): - return self.getTypedRuleContext(MathExprParser.CompExprContext, 0) + return self.getTypedRuleContext(MathExprParser.CompExprContext,0) def LE(self): return self.getToken(MathExprParser.LE, 0) - def addExpr(self): - return self.getTypedRuleContext(MathExprParser.AddExprContext, 0) + return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterLeExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLeExp" ): listener.enterLeExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitLeExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLeExp" ): listener.exitLeExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitLeExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLeExp" ): return visitor.visitLeExp(self) else: return visitor.visitChildren(self) + class NeExpContext(CompExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.CompExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.CompExprContext super().__init__(parser) self.copyFrom(ctx) def compExpr(self): - return self.getTypedRuleContext(MathExprParser.CompExprContext, 0) + return self.getTypedRuleContext(MathExprParser.CompExprContext,0) def NE(self): return self.getToken(MathExprParser.NE, 0) - def addExpr(self): - return self.getTypedRuleContext(MathExprParser.AddExprContext, 0) + return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterNeExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNeExp" ): listener.enterNeExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitNeExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNeExp" ): listener.exitNeExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitNeExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNeExp" ): return visitor.visitNeExp(self) else: return visitor.visitChildren(self) + class GtExpContext(CompExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.CompExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.CompExprContext super().__init__(parser) self.copyFrom(ctx) def compExpr(self): - return self.getTypedRuleContext(MathExprParser.CompExprContext, 0) + return self.getTypedRuleContext(MathExprParser.CompExprContext,0) def GT(self): return self.getToken(MathExprParser.GT, 0) - def addExpr(self): - return self.getTypedRuleContext(MathExprParser.AddExprContext, 0) + return self.getTypedRuleContext(MathExprParser.AddExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterGtExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGtExp" ): listener.enterGtExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitGtExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGtExp" ): listener.exitGtExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitGtExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitGtExp" ): return visitor.visitGtExp(self) else: return visitor.visitChildren(self) - def compExpr(self, _p: int = 0): + + + def compExpr(self, _p:int=0): _parentctx = self._ctx _parentState = self.state localctx = MathExprParser.CompExprContext(self, self._ctx, _parentState) @@ -4626,22 +625,21 @@ class MathExprParser(Parser): self._ctx.stop = self._input.LT(-1) self.state = 51 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input, 2, self._ctx) - while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER: - if _alt == 1: + _alt = self._interp.adaptivePredict(self._input,2,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx self.state = 49 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 1, self._ctx) + la_ = self._interp.adaptivePredict(self._input,1,self._ctx) if la_ == 1: localctx = MathExprParser.GtExpContext(self, MathExprParser.CompExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_compExpr) self.state = 31 if not self.precpred(self._ctx, 7): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 7)") self.state = 32 self.match(MathExprParser.GT) @@ -4655,7 +653,6 @@ class MathExprParser(Parser): self.state = 34 if not self.precpred(self._ctx, 6): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 6)") self.state = 35 self.match(MathExprParser.GE) @@ -4669,7 +666,6 @@ class MathExprParser(Parser): self.state = 37 if not self.precpred(self._ctx, 5): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 5)") self.state = 38 self.match(MathExprParser.LT) @@ -4683,7 +679,6 @@ class MathExprParser(Parser): self.state = 40 if not self.precpred(self._ctx, 4): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") self.state = 41 self.match(MathExprParser.LE) @@ -4697,7 +692,6 @@ class MathExprParser(Parser): self.state = 43 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") self.state = 44 self.match(MathExprParser.EQ) @@ -4711,7 +705,6 @@ class MathExprParser(Parser): self.state = 46 if not self.precpred(self._ctx, 2): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") self.state = 47 self.match(MathExprParser.NE) @@ -4719,9 +712,10 @@ class MathExprParser(Parser): self.addExpr(0) pass + self.state = 53 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input, 2, self._ctx) + _alt = self._interp.adaptivePredict(self._input,2,self._ctx) except RecognitionException as re: localctx.exception = re @@ -4731,98 +725,110 @@ class MathExprParser(Parser): self.unrollRecursionContexts(_parentctx) return localctx - class AddExprContext(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class AddExprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_addExpr - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + class AddExpContext(AddExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AddExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AddExprContext super().__init__(parser) self.copyFrom(ctx) def addExpr(self): - return self.getTypedRuleContext(MathExprParser.AddExprContext, 0) + return self.getTypedRuleContext(MathExprParser.AddExprContext,0) def PLUS(self): return self.getToken(MathExprParser.PLUS, 0) - def mulExpr(self): - return self.getTypedRuleContext(MathExprParser.MulExprContext, 0) + return self.getTypedRuleContext(MathExprParser.MulExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAddExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAddExp" ): listener.enterAddExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAddExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAddExp" ): listener.exitAddExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAddExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAddExp" ): return visitor.visitAddExp(self) else: return visitor.visitChildren(self) + class ToMulContext(AddExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AddExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AddExprContext super().__init__(parser) self.copyFrom(ctx) def mulExpr(self): - return self.getTypedRuleContext(MathExprParser.MulExprContext, 0) + return self.getTypedRuleContext(MathExprParser.MulExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterToMul"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterToMul" ): listener.enterToMul(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitToMul"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitToMul" ): listener.exitToMul(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitToMul"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitToMul" ): return visitor.visitToMul(self) else: return visitor.visitChildren(self) + class SubExpContext(AddExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AddExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AddExprContext super().__init__(parser) self.copyFrom(ctx) def addExpr(self): - return self.getTypedRuleContext(MathExprParser.AddExprContext, 0) + return self.getTypedRuleContext(MathExprParser.AddExprContext,0) def MINUS(self): return self.getToken(MathExprParser.MINUS, 0) - def mulExpr(self): - return self.getTypedRuleContext(MathExprParser.MulExprContext, 0) + return self.getTypedRuleContext(MathExprParser.MulExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSubExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSubExp" ): listener.enterSubExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSubExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSubExp" ): listener.exitSubExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSubExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSubExp" ): return visitor.visitSubExp(self) else: return visitor.visitChildren(self) - def addExpr(self, _p: int = 0): + + + def addExpr(self, _p:int=0): _parentctx = self._ctx _parentState = self.state localctx = MathExprParser.AddExprContext(self, self._ctx, _parentState) @@ -4840,22 +846,21 @@ class MathExprParser(Parser): self._ctx.stop = self._input.LT(-1) self.state = 65 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input, 4, self._ctx) - while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER: - if _alt == 1: + _alt = self._interp.adaptivePredict(self._input,4,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx self.state = 63 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 3, self._ctx) + la_ = self._interp.adaptivePredict(self._input,3,self._ctx) if la_ == 1: localctx = MathExprParser.AddExpContext(self, MathExprParser.AddExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_addExpr) self.state = 57 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") self.state = 58 self.match(MathExprParser.PLUS) @@ -4869,7 +874,6 @@ class MathExprParser(Parser): self.state = 60 if not self.precpred(self._ctx, 2): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") self.state = 61 self.match(MathExprParser.MINUS) @@ -4877,9 +881,10 @@ class MathExprParser(Parser): self.mulExpr(0) pass + self.state = 67 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input, 4, self._ctx) + _alt = self._interp.adaptivePredict(self._input,4,self._ctx) except RecognitionException as re: localctx.exception = re @@ -4889,126 +894,140 @@ class MathExprParser(Parser): self.unrollRecursionContexts(_parentctx) return localctx - class MulExprContext(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class MulExprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_mulExpr - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + class MulExpContext(MulExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.MulExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.MulExprContext super().__init__(parser) self.copyFrom(ctx) def mulExpr(self): - return self.getTypedRuleContext(MathExprParser.MulExprContext, 0) + return self.getTypedRuleContext(MathExprParser.MulExprContext,0) def MULT(self): return self.getToken(MathExprParser.MULT, 0) - def powExpr(self): - return self.getTypedRuleContext(MathExprParser.PowExprContext, 0) + return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterMulExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMulExp" ): listener.enterMulExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitMulExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMulExp" ): listener.exitMulExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitMulExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMulExp" ): return visitor.visitMulExp(self) else: return visitor.visitChildren(self) + class ModExpContext(MulExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.MulExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.MulExprContext super().__init__(parser) self.copyFrom(ctx) def mulExpr(self): - return self.getTypedRuleContext(MathExprParser.MulExprContext, 0) + return self.getTypedRuleContext(MathExprParser.MulExprContext,0) def MOD(self): return self.getToken(MathExprParser.MOD, 0) - def powExpr(self): - return self.getTypedRuleContext(MathExprParser.PowExprContext, 0) + return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterModExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterModExp" ): listener.enterModExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitModExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitModExp" ): listener.exitModExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitModExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitModExp" ): return visitor.visitModExp(self) else: return visitor.visitChildren(self) + class DivExpContext(MulExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.MulExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.MulExprContext super().__init__(parser) self.copyFrom(ctx) def mulExpr(self): - return self.getTypedRuleContext(MathExprParser.MulExprContext, 0) + return self.getTypedRuleContext(MathExprParser.MulExprContext,0) def DIV(self): return self.getToken(MathExprParser.DIV, 0) - def powExpr(self): - return self.getTypedRuleContext(MathExprParser.PowExprContext, 0) + return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterDivExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDivExp" ): listener.enterDivExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitDivExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDivExp" ): listener.exitDivExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitDivExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDivExp" ): return visitor.visitDivExp(self) else: return visitor.visitChildren(self) + class ToPowContext(MulExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.MulExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.MulExprContext super().__init__(parser) self.copyFrom(ctx) def powExpr(self): - return self.getTypedRuleContext(MathExprParser.PowExprContext, 0) + return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterToPow"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterToPow" ): listener.enterToPow(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitToPow"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitToPow" ): listener.exitToPow(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitToPow"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitToPow" ): return visitor.visitToPow(self) else: return visitor.visitChildren(self) - def mulExpr(self, _p: int = 0): + + + def mulExpr(self, _p:int=0): _parentctx = self._ctx _parentState = self.state localctx = MathExprParser.MulExprContext(self, self._ctx, _parentState) @@ -5026,22 +1045,21 @@ class MathExprParser(Parser): self._ctx.stop = self._input.LT(-1) self.state = 82 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input, 6, self._ctx) - while _alt != 2 and _alt != ATN.INVALID_ALT_NUMBER: - if _alt == 1: + _alt = self._interp.adaptivePredict(self._input,6,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: if self._parseListeners is not None: self.triggerExitRuleEvent() _prevctx = localctx self.state = 80 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 5, self._ctx) + la_ = self._interp.adaptivePredict(self._input,5,self._ctx) if la_ == 1: localctx = MathExprParser.MulExpContext(self, MathExprParser.MulExprContext(self, _parentctx, _parentState)) self.pushNewRecursionContext(localctx, _startState, self.RULE_mulExpr) self.state = 71 if not self.precpred(self._ctx, 4): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") self.state = 72 self.match(MathExprParser.MULT) @@ -5055,7 +1073,6 @@ class MathExprParser(Parser): self.state = 74 if not self.precpred(self._ctx, 3): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") self.state = 75 self.match(MathExprParser.DIV) @@ -5069,7 +1086,6 @@ class MathExprParser(Parser): self.state = 77 if not self.precpred(self._ctx, 2): from antlr4.error.Errors import FailedPredicateException - raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") self.state = 78 self.match(MathExprParser.MOD) @@ -5077,9 +1093,10 @@ class MathExprParser(Parser): self.powExpr() pass + self.state = 84 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input, 6, self._ctx) + _alt = self._interp.adaptivePredict(self._input,6,self._ctx) except RecognitionException as re: localctx.exception = re @@ -5089,76 +1106,88 @@ class MathExprParser(Parser): self.unrollRecursionContexts(_parentctx) return localctx - class PowExprContext(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class PowExprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_powExpr - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + + class PowExpContext(PowExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.PowExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.PowExprContext super().__init__(parser) self.copyFrom(ctx) def unaryExpr(self): - return self.getTypedRuleContext(MathExprParser.UnaryExprContext, 0) + return self.getTypedRuleContext(MathExprParser.UnaryExprContext,0) def POW(self): return self.getToken(MathExprParser.POW, 0) - def powExpr(self): - return self.getTypedRuleContext(MathExprParser.PowExprContext, 0) + return self.getTypedRuleContext(MathExprParser.PowExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterPowExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPowExp" ): listener.enterPowExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitPowExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPowExp" ): listener.exitPowExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitPowExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPowExp" ): return visitor.visitPowExp(self) else: return visitor.visitChildren(self) + class ToUnaryContext(PowExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.PowExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.PowExprContext super().__init__(parser) self.copyFrom(ctx) def unaryExpr(self): - return self.getTypedRuleContext(MathExprParser.UnaryExprContext, 0) + return self.getTypedRuleContext(MathExprParser.UnaryExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterToUnary"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterToUnary" ): listener.enterToUnary(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitToUnary"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitToUnary" ): listener.exitToUnary(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitToUnary"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitToUnary" ): return visitor.visitToUnary(self) else: return visitor.visitChildren(self) + + def powExpr(self): + localctx = MathExprParser.PowExprContext(self, self._ctx, self.state) self.enterRule(localctx, 8, self.RULE_powExpr) try: self.state = 90 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input, 7, self._ctx) + la_ = self._interp.adaptivePredict(self._input,7,self._ctx) if la_ == 1: localctx = MathExprParser.PowExpContext(self, localctx) self.enterOuterAlt(localctx, 1) @@ -5177,6 +1206,7 @@ class MathExprParser(Parser): self.unaryExpr() pass + except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) @@ -5185,99 +1215,113 @@ class MathExprParser(Parser): self.exitRule() return localctx - class UnaryExprContext(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class UnaryExprContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_unaryExpr - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + + class UnaryPlusContext(UnaryExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.UnaryExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.UnaryExprContext super().__init__(parser) self.copyFrom(ctx) def PLUS(self): return self.getToken(MathExprParser.PLUS, 0) - def unaryExpr(self): - return self.getTypedRuleContext(MathExprParser.UnaryExprContext, 0) + return self.getTypedRuleContext(MathExprParser.UnaryExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterUnaryPlus"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterUnaryPlus" ): listener.enterUnaryPlus(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitUnaryPlus"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitUnaryPlus" ): listener.exitUnaryPlus(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitUnaryPlus"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitUnaryPlus" ): return visitor.visitUnaryPlus(self) else: return visitor.visitChildren(self) + class UnaryMinusContext(UnaryExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.UnaryExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.UnaryExprContext super().__init__(parser) self.copyFrom(ctx) def MINUS(self): return self.getToken(MathExprParser.MINUS, 0) - def unaryExpr(self): - return self.getTypedRuleContext(MathExprParser.UnaryExprContext, 0) + return self.getTypedRuleContext(MathExprParser.UnaryExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterUnaryMinus"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterUnaryMinus" ): listener.enterUnaryMinus(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitUnaryMinus"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitUnaryMinus" ): listener.exitUnaryMinus(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitUnaryMinus"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitUnaryMinus" ): return visitor.visitUnaryMinus(self) else: return visitor.visitChildren(self) + class ToAtomContext(UnaryExprContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.UnaryExprContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.UnaryExprContext super().__init__(parser) self.copyFrom(ctx) def atom(self): - return self.getTypedRuleContext(MathExprParser.AtomContext, 0) + return self.getTypedRuleContext(MathExprParser.AtomContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterToAtom"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterToAtom" ): listener.enterToAtom(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitToAtom"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitToAtom" ): listener.exitToAtom(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitToAtom"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitToAtom" ): return visitor.visitToAtom(self) else: return visitor.visitChildren(self) + + def unaryExpr(self): + localctx = MathExprParser.UnaryExprContext(self, self._ctx, self.state) self.enterRule(localctx, 10, self.RULE_unaryExpr) try: self.state = 97 self._errHandler.sync(self) token = self._input.LA(1) - if token in [57]: + if token in [60]: localctx = MathExprParser.UnaryPlusContext(self, localctx) self.enterOuterAlt(localctx, 1) self.state = 92 @@ -5285,7 +1329,7 @@ class MathExprParser(Parser): self.state = 93 self.unaryExpr() pass - elif token in [58]: + elif token in [61]: localctx = MathExprParser.UnaryMinusContext(self, localctx) self.enterOuterAlt(localctx, 2) self.state = 94 @@ -5293,65 +1337,7 @@ class MathExprParser(Parser): self.state = 95 self.unaryExpr() pass - elif token in [ - 1, - 3, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34, - 35, - 36, - 37, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 69, - 70, - 71, - 72, - ]: + elif token in [1, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 72, 73, 74, 75]: localctx = MathExprParser.ToAtomContext(self, localctx) self.enterOuterAlt(localctx, 3) self.state = 96 @@ -5368,321 +1354,321 @@ class MathExprParser(Parser): self.exitRule() return localctx - class AtomContext(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class AtomContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_atom - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + + class Func4ExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) def func4(self): - return self.getTypedRuleContext(MathExprParser.Func4Context, 0) + return self.getTypedRuleContext(MathExprParser.Func4Context,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFunc4Exp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFunc4Exp" ): listener.enterFunc4Exp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFunc4Exp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFunc4Exp" ): listener.exitFunc4Exp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFunc4Exp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunc4Exp" ): return visitor.visitFunc4Exp(self) else: return visitor.visitChildren(self) + class Func2ExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) def func2(self): - return self.getTypedRuleContext(MathExprParser.Func2Context, 0) + return self.getTypedRuleContext(MathExprParser.Func2Context,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFunc2Exp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFunc2Exp" ): listener.enterFunc2Exp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFunc2Exp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFunc2Exp" ): listener.exitFunc2Exp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFunc2Exp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunc2Exp" ): return visitor.visitFunc2Exp(self) else: return visitor.visitChildren(self) + class VariableExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) def VARIABLE(self): return self.getToken(MathExprParser.VARIABLE, 0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterVariableExp"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVariableExp" ): listener.enterVariableExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitVariableExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVariableExp" ): listener.exitVariableExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitVariableExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitVariableExp" ): return visitor.visitVariableExp(self) else: return visitor.visitChildren(self) + class Func3ExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) def func3(self): - return self.getTypedRuleContext(MathExprParser.Func3Context, 0) + return self.getTypedRuleContext(MathExprParser.Func3Context,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFunc3Exp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFunc3Exp" ): listener.enterFunc3Exp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFunc3Exp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFunc3Exp" ): listener.exitFunc3Exp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFunc3Exp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunc3Exp" ): return visitor.visitFunc3Exp(self) else: return visitor.visitChildren(self) + class ParenExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterParenExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterParenExp" ): listener.enterParenExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitParenExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitParenExp" ): listener.exitParenExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitParenExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitParenExp" ): return visitor.visitParenExp(self) else: return visitor.visitChildren(self) + class ConstantExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) def CONSTANT(self): return self.getToken(MathExprParser.CONSTANT, 0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterConstantExp"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConstantExp" ): listener.enterConstantExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitConstantExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConstantExp" ): listener.exitConstantExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitConstantExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitConstantExp" ): return visitor.visitConstantExp(self) else: return visitor.visitChildren(self) + class Func1ExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) def func1(self): - return self.getTypedRuleContext(MathExprParser.Func1Context, 0) + return self.getTypedRuleContext(MathExprParser.Func1Context,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFunc1Exp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFunc1Exp" ): listener.enterFunc1Exp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFunc1Exp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFunc1Exp" ): listener.exitFunc1Exp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFunc1Exp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunc1Exp" ): return visitor.visitFunc1Exp(self) else: return visitor.visitChildren(self) + class FuncNExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) def funcN(self): - return self.getTypedRuleContext(MathExprParser.FuncNContext, 0) + return self.getTypedRuleContext(MathExprParser.FuncNContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFuncNExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFuncNExp" ): listener.enterFuncNExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFuncNExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFuncNExp" ): listener.exitFuncNExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFuncNExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFuncNExp" ): return visitor.visitFuncNExp(self) else: return visitor.visitChildren(self) + class NumberExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) def NUMBER(self): return self.getToken(MathExprParser.NUMBER, 0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterNumberExp"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNumberExp" ): listener.enterNumberExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitNumberExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNumberExp" ): listener.exitNumberExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitNumberExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNumberExp" ): return visitor.visitNumberExp(self) else: return visitor.visitChildren(self) + class AbsExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) - def PIPE(self, i: int = None): + 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) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAbsExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAbsExp" ): listener.enterAbsExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAbsExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAbsExp" ): listener.exitAbsExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAbsExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAbsExp" ): return visitor.visitAbsExp(self) else: return visitor.visitChildren(self) + class ListExpContext(AtomContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.AtomContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.AtomContext super().__init__(parser) self.copyFrom(ctx) - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterListExp"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterListExp" ): listener.enterListExp(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitListExp"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitListExp" ): listener.exitListExp(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitListExp"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitListExp" ): return visitor.visitListExp(self) else: return visitor.visitChildren(self) + + def atom(self): + localctx = MathExprParser.AtomContext(self, self._ctx, self.state) self.enterRule(localctx, 12, self.RULE_atom) - self._la = 0 # Token type + self._la = 0 # Token type try: self.state = 126 self._errHandler.sync(self) token = self._input.LA(1) - if token in [ - 6, - 7, - 8, - 9, - 10, - 11, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 28, - 29, - 30, - 31, - 32, - 33, - 35, - 37, - 38, - 39, - 40, - 41, - 42, - 46, - 47, - 48, - 49, - 50, - ]: + if token in [6, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 28, 29, 30, 31, 32, 33, 35, 37, 38, 39, 40, 41, 42, 46, 47, 48, 49, 50, 59]: localctx = MathExprParser.Func1ExpContext(self, localctx) self.enterOuterAlt(localctx, 1) self.state = 99 self.func1() pass - elif token in [12, 26, 27, 34, 44]: + elif token in [12, 26, 27, 34, 44, 57, 58]: localctx = MathExprParser.Func2ExpContext(self, localctx) self.enterOuterAlt(localctx, 2) self.state = 100 @@ -5706,19 +1692,19 @@ class MathExprParser(Parser): self.state = 103 self.funcN() pass - elif token in [72]: + elif token in [75]: localctx = MathExprParser.VariableExpContext(self, localctx) self.enterOuterAlt(localctx, 6) self.state = 104 self.match(MathExprParser.VARIABLE) pass - elif token in [71]: + elif token in [74]: localctx = MathExprParser.NumberExpContext(self, localctx) self.enterOuterAlt(localctx, 7) self.state = 105 self.match(MathExprParser.NUMBER) pass - elif token in [70]: + elif token in [73]: localctx = MathExprParser.ConstantExpContext(self, localctx) self.enterOuterAlt(localctx, 8) self.state = 106 @@ -5734,7 +1720,7 @@ class MathExprParser(Parser): self.state = 109 self.match(MathExprParser.T__1) pass - elif token in [69]: + elif token in [72]: localctx = MathExprParser.AbsExpContext(self, localctx) self.enterOuterAlt(localctx, 10) self.state = 111 @@ -5754,7 +1740,7 @@ class MathExprParser(Parser): self.state = 121 self._errHandler.sync(self) _la = self._input.LA(1) - while _la == 4: + while _la==4: self.state = 117 self.match(MathExprParser.T__3) self.state = 118 @@ -5777,877 +1763,978 @@ class MathExprParser(Parser): self.exitRule() return localctx - class Func1Context(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class Func1Context(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_func1 - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + + class SoftplusFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def SOFTPLUS(self): return self.getToken(MathExprParser.SOFTPLUS, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSoftplusFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSoftplusFunc" ): listener.enterSoftplusFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSoftplusFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSoftplusFunc" ): listener.exitSoftplusFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSoftplusFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSoftplusFunc" ): return visitor.visitSoftplusFunc(self) else: return visitor.visitChildren(self) + class TanhFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def TANH(self): return self.getToken(MathExprParser.TANH, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterTanhFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTanhFunc" ): listener.enterTanhFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitTanhFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTanhFunc" ): listener.exitTanhFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitTanhFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTanhFunc" ): return visitor.visitTanhFunc(self) else: return visitor.visitChildren(self) + class AcoshFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def ACOSH(self): return self.getToken(MathExprParser.ACOSH, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAcoshFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAcoshFunc" ): listener.enterAcoshFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAcoshFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAcoshFunc" ): listener.exitAcoshFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAcoshFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAcoshFunc" ): return visitor.visitAcoshFunc(self) else: return visitor.visitChildren(self) + class SqrtFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def SQRT(self): return self.getToken(MathExprParser.SQRT, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSqrtFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSqrtFunc" ): listener.enterSqrtFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSqrtFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSqrtFunc" ): listener.exitSqrtFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSqrtFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSqrtFunc" ): return visitor.visitSqrtFunc(self) else: return visitor.visitChildren(self) + class FloorFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def FLOOR(self): return self.getToken(MathExprParser.FLOOR, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFloorFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFloorFunc" ): listener.enterFloorFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFloorFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFloorFunc" ): listener.exitFloorFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFloorFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFloorFunc" ): return visitor.visitFloorFunc(self) else: return visitor.visitChildren(self) + class RoundFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def ROUND(self): return self.getToken(MathExprParser.ROUND, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterRoundFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRoundFunc" ): listener.enterRoundFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitRoundFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRoundFunc" ): listener.exitRoundFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitRoundFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitRoundFunc" ): return visitor.visitRoundFunc(self) else: return visitor.visitChildren(self) + class CeilFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def CEIL(self): return self.getToken(MathExprParser.CEIL, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterCeilFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCeilFunc" ): listener.enterCeilFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitCeilFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCeilFunc" ): listener.exitCeilFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitCeilFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCeilFunc" ): return visitor.visitCeilFunc(self) else: return visitor.visitChildren(self) + class GeluFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def GELU(self): return self.getToken(MathExprParser.GELU, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterGeluFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGeluFunc" ): listener.enterGeluFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitGeluFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGeluFunc" ): listener.exitGeluFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitGeluFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitGeluFunc" ): return visitor.visitGeluFunc(self) else: return visitor.visitChildren(self) + class PrintFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def PRNT(self): return self.getToken(MathExprParser.PRNT, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterPrintFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPrintFunc" ): listener.enterPrintFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitPrintFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPrintFunc" ): listener.exitPrintFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitPrintFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPrintFunc" ): return visitor.visitPrintFunc(self) else: return visitor.visitChildren(self) + class AbsFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def ABS(self): return self.getToken(MathExprParser.ABS, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAbsFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAbsFunc" ): listener.enterAbsFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAbsFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAbsFunc" ): listener.exitAbsFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAbsFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAbsFunc" ): return visitor.visitAbsFunc(self) else: return visitor.visitChildren(self) + class AtanFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def ATAN(self): return self.getToken(MathExprParser.ATAN, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAtanFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAtanFunc" ): listener.enterAtanFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAtanFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAtanFunc" ): listener.exitAtanFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAtanFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAtanFunc" ): return visitor.visitAtanFunc(self) else: return visitor.visitChildren(self) + class ReluFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def RELU(self): return self.getToken(MathExprParser.RELU, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterReluFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterReluFunc" ): listener.enterReluFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitReluFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitReluFunc" ): listener.exitReluFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitReluFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitReluFunc" ): return visitor.visitReluFunc(self) else: return visitor.visitChildren(self) + class SinhFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def SINH(self): return self.getToken(MathExprParser.SINH, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSinhFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSinhFunc" ): listener.enterSinhFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSinhFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSinhFunc" ): listener.exitSinhFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSinhFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSinhFunc" ): return visitor.visitSinhFunc(self) else: return visitor.visitChildren(self) + class SigmoidFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def SIGM(self): return self.getToken(MathExprParser.SIGM, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSigmoidFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSigmoidFunc" ): listener.enterSigmoidFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSigmoidFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSigmoidFunc" ): listener.exitSigmoidFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSigmoidFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSigmoidFunc" ): return visitor.visitSigmoidFunc(self) else: return visitor.visitChildren(self) + class LogFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def LOG(self): return self.getToken(MathExprParser.LOG, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterLogFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLogFunc" ): listener.enterLogFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitLogFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLogFunc" ): listener.exitLogFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitLogFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLogFunc" ): return visitor.visitLogFunc(self) else: return visitor.visitChildren(self) + class LnFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def LN(self): return self.getToken(MathExprParser.LN, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterLnFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLnFunc" ): listener.enterLnFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitLnFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLnFunc" ): listener.exitLnFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitLnFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLnFunc" ): return visitor.visitLnFunc(self) else: return visitor.visitChildren(self) + class TNormFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def TNORM(self): return self.getToken(MathExprParser.TNORM, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterTNormFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTNormFunc" ): listener.enterTNormFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitTNormFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTNormFunc" ): listener.exitTNormFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitTNormFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTNormFunc" ): return visitor.visitTNormFunc(self) else: return visitor.visitChildren(self) + class SNormFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def SNORM(self): return self.getToken(MathExprParser.SNORM, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSNormFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSNormFunc" ): listener.enterSNormFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSNormFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSNormFunc" ): listener.exitSNormFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSNormFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSNormFunc" ): return visitor.visitSNormFunc(self) else: return visitor.visitChildren(self) + class SinFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def SIN(self): return self.getToken(MathExprParser.SIN, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSinFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSinFunc" ): listener.enterSinFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSinFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSinFunc" ): listener.exitSinFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSinFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSinFunc" ): return visitor.visitSinFunc(self) else: return visitor.visitChildren(self) + class AcosFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def ACOS(self): return self.getToken(MathExprParser.ACOS, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAcosFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAcosFunc" ): listener.enterAcosFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAcosFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAcosFunc" ): listener.exitAcosFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAcosFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAcosFunc" ): return visitor.visitAcosFunc(self) else: return visitor.visitChildren(self) + class CoshFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def COSH(self): return self.getToken(MathExprParser.COSH, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterCoshFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCoshFunc" ): listener.enterCoshFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitCoshFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCoshFunc" ): listener.exitCoshFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitCoshFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCoshFunc" ): return visitor.visitCoshFunc(self) else: return visitor.visitChildren(self) + class AnglFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def ANGL(self): return self.getToken(MathExprParser.ANGL, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAnglFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAnglFunc" ): listener.enterAnglFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAnglFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAnglFunc" ): listener.exitAnglFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAnglFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAnglFunc" ): return visitor.visitAnglFunc(self) else: return visitor.visitChildren(self) + class SignFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def SIGN(self): return self.getToken(MathExprParser.SIGN, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSignFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSignFunc" ): listener.enterSignFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSignFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSignFunc" ): listener.exitSignFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSignFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSignFunc" ): return visitor.visitSignFunc(self) else: return visitor.visitChildren(self) + class TanFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def TAN(self): return self.getToken(MathExprParser.TAN, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterTanFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTanFunc" ): listener.enterTanFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitTanFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTanFunc" ): listener.exitTanFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitTanFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTanFunc" ): return visitor.visitTanFunc(self) else: return visitor.visitChildren(self) + + class PinvFuncContext(Func1Context): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context + super().__init__(parser) + self.copyFrom(ctx) + + def PINV(self): + return self.getToken(MathExprParser.PINV, 0) + def expr(self): + return self.getTypedRuleContext(MathExprParser.ExprContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPinvFunc" ): + listener.enterPinvFunc(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPinvFunc" ): + listener.exitPinvFunc(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPinvFunc" ): + return visitor.visitPinvFunc(self) + else: + return visitor.visitChildren(self) + + class SifftFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def SIFFT(self): return self.getToken(MathExprParser.SIFFT, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSifftFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSifftFunc" ): listener.enterSifftFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSifftFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSifftFunc" ): listener.exitSifftFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSifftFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSifftFunc" ): return visitor.visitSifftFunc(self) else: return visitor.visitChildren(self) + class FractFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def FRACT(self): return self.getToken(MathExprParser.FRACT, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterFractFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFractFunc" ): listener.enterFractFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitFractFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFractFunc" ): listener.exitFractFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitFractFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFractFunc" ): return visitor.visitFractFunc(self) else: return visitor.visitChildren(self) + class GammaFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def GAMMA(self): return self.getToken(MathExprParser.GAMMA, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterGammaFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterGammaFunc" ): listener.enterGammaFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitGammaFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitGammaFunc" ): listener.exitGammaFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitGammaFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitGammaFunc" ): return visitor.visitGammaFunc(self) else: return visitor.visitChildren(self) + class CosFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def COS(self): return self.getToken(MathExprParser.COS, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterCosFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCosFunc" ): listener.enterCosFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitCosFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCosFunc" ): listener.exitCosFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitCosFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCosFunc" ): return visitor.visitCosFunc(self) else: return visitor.visitChildren(self) + class AsinFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def ASIN(self): return self.getToken(MathExprParser.ASIN, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAsinFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAsinFunc" ): listener.enterAsinFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAsinFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAsinFunc" ): listener.exitAsinFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAsinFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAsinFunc" ): return visitor.visitAsinFunc(self) else: return visitor.visitChildren(self) + class AsinhFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def ASINH(self): return self.getToken(MathExprParser.ASINH, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAsinhFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAsinhFunc" ): listener.enterAsinhFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAsinhFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAsinhFunc" ): listener.exitAsinhFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAsinhFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAsinhFunc" ): return visitor.visitAsinhFunc(self) else: return visitor.visitChildren(self) + class SfftFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def SFFT(self): return self.getToken(MathExprParser.SFFT, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSfftFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSfftFunc" ): listener.enterSfftFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSfftFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSfftFunc" ): listener.exitSfftFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSfftFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSfftFunc" ): return visitor.visitSfftFunc(self) else: return visitor.visitChildren(self) + class AtanhFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def ATANH(self): return self.getToken(MathExprParser.ATANH, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAtanhFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAtanhFunc" ): listener.enterAtanhFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAtanhFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAtanhFunc" ): listener.exitAtanhFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAtanhFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAtanhFunc" ): return visitor.visitAtanhFunc(self) else: return visitor.visitChildren(self) + class ExpFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def EXP(self): return self.getToken(MathExprParser.EXP, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterExpFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpFunc" ): listener.enterExpFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitExpFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpFunc" ): listener.exitExpFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitExpFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExpFunc" ): return visitor.visitExpFunc(self) else: return visitor.visitChildren(self) + class PrintShapeFuncContext(Func1Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func1Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func1Context super().__init__(parser) self.copyFrom(ctx) def PRINT_SHAPE_L(self): return self.getToken(MathExprParser.PRINT_SHAPE_L, 0) - def expr(self): - return self.getTypedRuleContext(MathExprParser.ExprContext, 0) + return self.getTypedRuleContext(MathExprParser.ExprContext,0) def PRINT_SHAPE(self): return self.getToken(MathExprParser.PRINT_SHAPE, 0) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterPrintShapeFunc"): + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPrintShapeFunc" ): listener.enterPrintShapeFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitPrintShapeFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPrintShapeFunc" ): listener.exitPrintShapeFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitPrintShapeFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPrintShapeFunc" ): return visitor.visitPrintShapeFunc(self) else: return visitor.visitChildren(self) + + def func1(self): + localctx = MathExprParser.Func1Context(self, self._ctx, self.state) self.enterRule(localctx, 14, self.RULE_func1) try: - self.state = 303 + self.state = 308 self._errHandler.sync(self) token = self._input.LA(1) if token in [6]: @@ -7070,6 +3157,18 @@ class MathExprParser(Parser): self.state = 301 self.match(MathExprParser.T__1) pass + elif token in [59]: + localctx = MathExprParser.PinvFuncContext(self, localctx) + self.enterOuterAlt(localctx, 36) + self.state = 303 + self.match(MathExprParser.PINV) + self.state = 304 + self.match(MathExprParser.T__0) + self.state = 305 + self.expr() + self.state = 306 + self.match(MathExprParser.T__1) + pass else: raise NoViableAltException(self) @@ -7081,244 +3180,353 @@ class MathExprParser(Parser): self.exitRule() return localctx - class Func2Context(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class Func2Context(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_func2 - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + + + class TopkFuncContext(Func2Context): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func2Context + super().__init__(parser) + self.copyFrom(ctx) + + def TOPK(self): + return self.getToken(MathExprParser.TOPK, 0) + def expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(MathExprParser.ExprContext) + else: + return self.getTypedRuleContext(MathExprParser.ExprContext,i) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTopkFunc" ): + listener.enterTopkFunc(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTopkFunc" ): + listener.exitTopkFunc(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTopkFunc" ): + return visitor.visitTopkFunc(self) + else: + return visitor.visitChildren(self) + + + class BotkFuncContext(Func2Context): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func2Context + super().__init__(parser) + self.copyFrom(ctx) + + def BOTK(self): + return self.getToken(MathExprParser.BOTK, 0) + def expr(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(MathExprParser.ExprContext) + else: + return self.getTypedRuleContext(MathExprParser.ExprContext,i) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBotkFunc" ): + listener.enterBotkFunc(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBotkFunc" ): + listener.exitBotkFunc(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBotkFunc" ): + return visitor.visitBotkFunc(self) + else: + return visitor.visitChildren(self) + + class TMaxFuncContext(Func2Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func2Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func2Context super().__init__(parser) self.copyFrom(ctx) def TMAX(self): return self.getToken(MathExprParser.TMAX, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterTMaxFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTMaxFunc" ): listener.enterTMaxFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitTMaxFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTMaxFunc" ): listener.exitTMaxFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitTMaxFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTMaxFunc" ): return visitor.visitTMaxFunc(self) else: return visitor.visitChildren(self) + class PowFuncContext(Func2Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func2Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func2Context super().__init__(parser) self.copyFrom(ctx) def POWE(self): return self.getToken(MathExprParser.POWE, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterPowFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPowFunc" ): listener.enterPowFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitPowFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPowFunc" ): listener.exitPowFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitPowFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPowFunc" ): return visitor.visitPowFunc(self) else: return visitor.visitChildren(self) + class StepFuncContext(Func2Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func2Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func2Context super().__init__(parser) self.copyFrom(ctx) def STEP(self): return self.getToken(MathExprParser.STEP, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterStepFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStepFunc" ): listener.enterStepFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitStepFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStepFunc" ): listener.exitStepFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitStepFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitStepFunc" ): return visitor.visitStepFunc(self) else: return visitor.visitChildren(self) + class Atan2FuncContext(Func2Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func2Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func2Context super().__init__(parser) self.copyFrom(ctx) def ATAN2(self): return self.getToken(MathExprParser.ATAN2, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterAtan2Func"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAtan2Func" ): listener.enterAtan2Func(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitAtan2Func"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAtan2Func" ): listener.exitAtan2Func(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitAtan2Func"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAtan2Func" ): return visitor.visitAtan2Func(self) else: return visitor.visitChildren(self) + class TMinFuncContext(Func2Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func2Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func2Context super().__init__(parser) self.copyFrom(ctx) def TMIN(self): return self.getToken(MathExprParser.TMIN, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterTMinFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTMinFunc" ): listener.enterTMinFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitTMinFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTMinFunc" ): listener.exitTMinFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitTMinFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTMinFunc" ): return visitor.visitTMinFunc(self) else: return visitor.visitChildren(self) + + def func2(self): + localctx = MathExprParser.Func2Context(self, self._ctx, self.state) self.enterRule(localctx, 16, self.RULE_func2) try: - self.state = 340 + self.state = 359 self._errHandler.sync(self) token = self._input.LA(1) if token in [34]: localctx = MathExprParser.PowFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 305 - self.match(MathExprParser.POWE) - self.state = 306 - self.match(MathExprParser.T__0) - self.state = 307 - self.expr() - self.state = 308 - self.match(MathExprParser.T__3) - self.state = 309 - self.expr() self.state = 310 + self.match(MathExprParser.POWE) + self.state = 311 + self.match(MathExprParser.T__0) + self.state = 312 + self.expr() + self.state = 313 + self.match(MathExprParser.T__3) + self.state = 314 + self.expr() + self.state = 315 self.match(MathExprParser.T__1) pass elif token in [12]: localctx = MathExprParser.Atan2FuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 312 - self.match(MathExprParser.ATAN2) - self.state = 313 - self.match(MathExprParser.T__0) - self.state = 314 - self.expr() - self.state = 315 - self.match(MathExprParser.T__3) - self.state = 316 - self.expr() self.state = 317 + self.match(MathExprParser.ATAN2) + self.state = 318 + self.match(MathExprParser.T__0) + self.state = 319 + self.expr() + self.state = 320 + self.match(MathExprParser.T__3) + self.state = 321 + self.expr() + self.state = 322 self.match(MathExprParser.T__1) pass elif token in [26]: localctx = MathExprParser.TMinFuncContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 319 - self.match(MathExprParser.TMIN) - self.state = 320 - self.match(MathExprParser.T__0) - self.state = 321 - self.expr() - self.state = 322 - self.match(MathExprParser.T__3) - self.state = 323 - self.expr() self.state = 324 + self.match(MathExprParser.TMIN) + self.state = 325 + self.match(MathExprParser.T__0) + self.state = 326 + self.expr() + self.state = 327 + self.match(MathExprParser.T__3) + self.state = 328 + self.expr() + self.state = 329 self.match(MathExprParser.T__1) pass elif token in [27]: localctx = MathExprParser.TMaxFuncContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 326 - self.match(MathExprParser.TMAX) - self.state = 327 - self.match(MathExprParser.T__0) - self.state = 328 - self.expr() - self.state = 329 - self.match(MathExprParser.T__3) - self.state = 330 - self.expr() self.state = 331 + self.match(MathExprParser.TMAX) + self.state = 332 + self.match(MathExprParser.T__0) + self.state = 333 + self.expr() + self.state = 334 + self.match(MathExprParser.T__3) + self.state = 335 + self.expr() + self.state = 336 self.match(MathExprParser.T__1) pass elif token in [44]: localctx = MathExprParser.StepFuncContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 333 - self.match(MathExprParser.STEP) - self.state = 334 - self.match(MathExprParser.T__0) - self.state = 335 - self.expr() - self.state = 336 - self.match(MathExprParser.T__3) - self.state = 337 - self.expr() self.state = 338 + self.match(MathExprParser.STEP) + self.state = 339 + self.match(MathExprParser.T__0) + self.state = 340 + self.expr() + self.state = 341 + self.match(MathExprParser.T__3) + self.state = 342 + self.expr() + self.state = 343 + self.match(MathExprParser.T__1) + pass + elif token in [57]: + localctx = MathExprParser.TopkFuncContext(self, localctx) + self.enterOuterAlt(localctx, 6) + self.state = 345 + self.match(MathExprParser.TOPK) + self.state = 346 + self.match(MathExprParser.T__0) + self.state = 347 + self.expr() + self.state = 348 + self.match(MathExprParser.T__3) + self.state = 349 + self.expr() + self.state = 350 + self.match(MathExprParser.T__1) + pass + elif token in [58]: + localctx = MathExprParser.BotkFuncContext(self, localctx) + self.enterOuterAlt(localctx, 7) + self.state = 352 + self.match(MathExprParser.BOTK) + self.state = 353 + self.match(MathExprParser.T__0) + self.state = 354 + self.expr() + self.state = 355 + self.match(MathExprParser.T__3) + self.state = 356 + self.expr() + self.state = 357 self.match(MathExprParser.T__1) pass else: @@ -7332,216 +3540,231 @@ class MathExprParser(Parser): self.exitRule() return localctx - class Func3Context(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class Func3Context(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_func3 - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + + class LerpFuncContext(Func3Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func3Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func3Context super().__init__(parser) self.copyFrom(ctx) def LERP(self): return self.getToken(MathExprParser.LERP, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterLerpFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLerpFunc" ): listener.enterLerpFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitLerpFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLerpFunc" ): listener.exitLerpFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitLerpFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLerpFunc" ): return visitor.visitLerpFunc(self) else: return visitor.visitChildren(self) + class SmoothstepFuncContext(Func3Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func3Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func3Context super().__init__(parser) self.copyFrom(ctx) def SMOOTHSTEP(self): return self.getToken(MathExprParser.SMOOTHSTEP, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSmoothstepFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSmoothstepFunc" ): listener.enterSmoothstepFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSmoothstepFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSmoothstepFunc" ): listener.exitSmoothstepFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSmoothstepFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSmoothstepFunc" ): return visitor.visitSmoothstepFunc(self) else: return visitor.visitChildren(self) + class RangeFuncContext(Func3Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func3Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func3Context super().__init__(parser) self.copyFrom(ctx) def RANGE(self): return self.getToken(MathExprParser.RANGE, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterRangeFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRangeFunc" ): listener.enterRangeFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitRangeFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRangeFunc" ): listener.exitRangeFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitRangeFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitRangeFunc" ): return visitor.visitRangeFunc(self) else: return visitor.visitChildren(self) + class ClampFuncContext(Func3Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func3Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func3Context super().__init__(parser) self.copyFrom(ctx) def CLAMP(self): return self.getToken(MathExprParser.CLAMP, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterClampFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClampFunc" ): listener.enterClampFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitClampFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClampFunc" ): listener.exitClampFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitClampFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClampFunc" ): return visitor.visitClampFunc(self) else: return visitor.visitChildren(self) + + def func3(self): + localctx = MathExprParser.Func3Context(self, self._ctx, self.state) self.enterRule(localctx, 18, self.RULE_func3) try: - self.state = 378 + self.state = 397 self._errHandler.sync(self) token = self._input.LA(1) if token in [36]: localctx = MathExprParser.ClampFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 342 + self.state = 361 self.match(MathExprParser.CLAMP) - self.state = 343 + self.state = 362 self.match(MathExprParser.T__0) - self.state = 344 + self.state = 363 self.expr() - self.state = 345 + self.state = 364 self.match(MathExprParser.T__3) - self.state = 346 + self.state = 365 self.expr() - self.state = 347 + self.state = 366 self.match(MathExprParser.T__3) - self.state = 348 + self.state = 367 self.expr() - self.state = 349 + self.state = 368 self.match(MathExprParser.T__1) pass elif token in [43]: localctx = MathExprParser.LerpFuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 351 + self.state = 370 self.match(MathExprParser.LERP) - self.state = 352 + self.state = 371 self.match(MathExprParser.T__0) - self.state = 353 + self.state = 372 self.expr() - self.state = 354 + self.state = 373 self.match(MathExprParser.T__3) - self.state = 355 + self.state = 374 self.expr() - self.state = 356 + self.state = 375 self.match(MathExprParser.T__3) - self.state = 357 + self.state = 376 self.expr() - self.state = 358 + self.state = 377 self.match(MathExprParser.T__1) pass elif token in [45]: localctx = MathExprParser.SmoothstepFuncContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 360 + self.state = 379 self.match(MathExprParser.SMOOTHSTEP) - self.state = 361 + self.state = 380 self.match(MathExprParser.T__0) - self.state = 362 + self.state = 381 self.expr() - self.state = 363 + self.state = 382 self.match(MathExprParser.T__3) - self.state = 364 + self.state = 383 self.expr() - self.state = 365 + self.state = 384 self.match(MathExprParser.T__3) - self.state = 366 + self.state = 385 self.expr() - self.state = 367 + self.state = 386 self.match(MathExprParser.T__1) pass elif token in [56]: localctx = MathExprParser.RangeFuncContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 369 + self.state = 388 self.match(MathExprParser.RANGE) - self.state = 370 + self.state = 389 self.match(MathExprParser.T__0) - self.state = 371 + self.state = 390 self.expr() - self.state = 372 + self.state = 391 self.match(MathExprParser.T__3) - self.state = 373 + self.state = 392 self.expr() - self.state = 374 + self.state = 393 self.match(MathExprParser.T__3) - self.state = 375 + self.state = 394 self.expr() - self.state = 376 + self.state = 395 self.match(MathExprParser.T__1) pass else: @@ -7555,72 +3778,81 @@ class MathExprParser(Parser): self.exitRule() return localctx - class Func4Context(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class Func4Context(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_func4 - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + + class SwapFuncContext(Func4Context): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.Func4Context + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.Func4Context super().__init__(parser) self.copyFrom(ctx) def SWAP(self): return self.getToken(MathExprParser.SWAP, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSwapFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSwapFunc" ): listener.enterSwapFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSwapFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSwapFunc" ): listener.exitSwapFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSwapFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSwapFunc" ): return visitor.visitSwapFunc(self) else: return visitor.visitChildren(self) + + def func4(self): + localctx = MathExprParser.Func4Context(self, self._ctx, self.state) self.enterRule(localctx, 20, self.RULE_func4) try: localctx = MathExprParser.SwapFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 380 + self.state = 399 self.match(MathExprParser.SWAP) - self.state = 381 + self.state = 400 self.match(MathExprParser.T__0) - self.state = 382 + self.state = 401 self.expr() - self.state = 383 + self.state = 402 self.match(MathExprParser.T__3) - self.state = 384 + self.state = 403 self.expr() - self.state = 385 + self.state = 404 self.match(MathExprParser.T__3) - self.state = 386 + self.state = 405 self.expr() - self.state = 387 + self.state = 406 self.match(MathExprParser.T__3) - self.state = 388 + self.state = 407 self.expr() - self.state = 389 + self.state = 408 self.match(MathExprParser.T__1) except RecognitionException as re: localctx.exception = re @@ -7630,325 +3862,344 @@ class MathExprParser(Parser): self.exitRule() return localctx - class FuncNContext(ParserRuleContext): - __slots__ = "parser" - def __init__(self, parser, parent: ParserRuleContext = None, invokingState: int = -1): + class FuncNContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser + def getRuleIndex(self): return MathExprParser.RULE_funcN - def copyFrom(self, ctx: ParserRuleContext): + + def copyFrom(self, ctx:ParserRuleContext): super().copyFrom(ctx) + + class SMaxFuncContext(FuncNContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.FuncNContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.FuncNContext super().__init__(parser) self.copyFrom(ctx) def SMAX(self): return self.getToken(MathExprParser.SMAX, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSMaxFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSMaxFunc" ): listener.enterSMaxFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSMaxFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSMaxFunc" ): listener.exitSMaxFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSMaxFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSMaxFunc" ): return visitor.visitSMaxFunc(self) else: return visitor.visitChildren(self) + class MapFuncContext(FuncNContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.FuncNContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.FuncNContext super().__init__(parser) self.copyFrom(ctx) def MAP(self): return self.getToken(MathExprParser.MAP, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterMapFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMapFunc" ): listener.enterMapFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitMapFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMapFunc" ): listener.exitMapFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitMapFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMapFunc" ): return visitor.visitMapFunc(self) else: return visitor.visitChildren(self) + class PermuteFuncContext(FuncNContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.FuncNContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.FuncNContext super().__init__(parser) self.copyFrom(ctx) def PERM(self): return self.getToken(MathExprParser.PERM, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterPermuteFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPermuteFunc" ): listener.enterPermuteFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitPermuteFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPermuteFunc" ): listener.exitPermuteFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitPermuteFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPermuteFunc" ): return visitor.visitPermuteFunc(self) else: return visitor.visitChildren(self) + class ReshapeFuncContext(FuncNContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.FuncNContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.FuncNContext super().__init__(parser) self.copyFrom(ctx) def RESHAPE(self): return self.getToken(MathExprParser.RESHAPE, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterReshapeFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterReshapeFunc" ): listener.enterReshapeFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitReshapeFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitReshapeFunc" ): listener.exitReshapeFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitReshapeFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitReshapeFunc" ): return visitor.visitReshapeFunc(self) else: return visitor.visitChildren(self) + class SMinFuncContext(FuncNContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.FuncNContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.FuncNContext super().__init__(parser) self.copyFrom(ctx) def SMIN(self): return self.getToken(MathExprParser.SMIN, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterSMinFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSMinFunc" ): listener.enterSMinFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitSMinFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSMinFunc" ): listener.exitSMinFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitSMinFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSMinFunc" ): return visitor.visitSMinFunc(self) else: return visitor.visitChildren(self) + class ConvFuncContext(FuncNContext): - def __init__(self, parser, ctx: ParserRuleContext): # actually a MathExprParser.FuncNContext + + def __init__(self, parser, ctx:ParserRuleContext): # actually a MathExprParser.FuncNContext super().__init__(parser) self.copyFrom(ctx) def CONV(self): return self.getToken(MathExprParser.CONV, 0) - - def expr(self, i: int = None): + def expr(self, i:int=None): if i is None: return self.getTypedRuleContexts(MathExprParser.ExprContext) else: - return self.getTypedRuleContext(MathExprParser.ExprContext, i) + return self.getTypedRuleContext(MathExprParser.ExprContext,i) - def enterRule(self, listener: ParseTreeListener): - if hasattr(listener, "enterConvFunc"): + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConvFunc" ): listener.enterConvFunc(self) - def exitRule(self, listener: ParseTreeListener): - if hasattr(listener, "exitConvFunc"): + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConvFunc" ): listener.exitConvFunc(self) - def accept(self, visitor: ParseTreeVisitor): - if hasattr(visitor, "visitConvFunc"): + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitConvFunc" ): return visitor.visitConvFunc(self) else: return visitor.visitChildren(self) + + def funcN(self): + localctx = MathExprParser.FuncNContext(self, self._ctx, self.state) self.enterRule(localctx, 22, self.RULE_funcN) - self._la = 0 # Token type + self._la = 0 # Token type try: - self.state = 451 + self.state = 470 self._errHandler.sync(self) token = self._input.LA(1) if token in [24]: localctx = MathExprParser.SMinFuncContext(self, localctx) self.enterOuterAlt(localctx, 1) - self.state = 391 + self.state = 410 self.match(MathExprParser.SMIN) - self.state = 392 + self.state = 411 self.match(MathExprParser.T__0) - self.state = 393 + self.state = 412 self.expr() - self.state = 398 + self.state = 417 self._errHandler.sync(self) _la = self._input.LA(1) - while _la == 4: - self.state = 394 + while _la==4: + self.state = 413 self.match(MathExprParser.T__3) - self.state = 395 + self.state = 414 self.expr() - self.state = 400 + self.state = 419 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 401 + self.state = 420 self.match(MathExprParser.T__1) pass elif token in [25]: localctx = MathExprParser.SMaxFuncContext(self, localctx) self.enterOuterAlt(localctx, 2) - self.state = 403 + self.state = 422 self.match(MathExprParser.SMAX) - self.state = 404 + self.state = 423 self.match(MathExprParser.T__0) - self.state = 405 + self.state = 424 self.expr() - self.state = 410 + self.state = 429 self._errHandler.sync(self) _la = self._input.LA(1) - while _la == 4: - self.state = 406 + while _la==4: + self.state = 425 self.match(MathExprParser.T__3) - self.state = 407 + self.state = 426 self.expr() - self.state = 412 + self.state = 431 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 413 + self.state = 432 self.match(MathExprParser.T__1) pass elif token in [51]: localctx = MathExprParser.MapFuncContext(self, localctx) self.enterOuterAlt(localctx, 3) - self.state = 415 + self.state = 434 self.match(MathExprParser.MAP) - self.state = 416 + self.state = 435 self.match(MathExprParser.T__0) - self.state = 417 + self.state = 436 self.expr() - self.state = 420 + self.state = 439 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 418 + self.state = 437 self.match(MathExprParser.T__3) - self.state = 419 + self.state = 438 self.expr() - self.state = 422 + self.state = 441 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la == 4): + if not (_la==4): break - self.state = 424 + self.state = 443 self.match(MathExprParser.T__1) pass elif token in [52]: localctx = MathExprParser.ConvFuncContext(self, localctx) self.enterOuterAlt(localctx, 4) - self.state = 426 + self.state = 445 self.match(MathExprParser.CONV) - self.state = 427 + self.state = 446 self.match(MathExprParser.T__0) - self.state = 428 + self.state = 447 self.expr() - self.state = 431 + self.state = 450 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 429 + self.state = 448 self.match(MathExprParser.T__3) - self.state = 430 + self.state = 449 self.expr() - self.state = 433 + self.state = 452 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la == 4): + if not (_la==4): break - self.state = 435 + self.state = 454 self.match(MathExprParser.T__1) pass elif token in [54]: localctx = MathExprParser.PermuteFuncContext(self, localctx) self.enterOuterAlt(localctx, 5) - self.state = 437 + self.state = 456 self.match(MathExprParser.PERM) - self.state = 438 + self.state = 457 self.match(MathExprParser.T__0) - self.state = 439 + self.state = 458 self.expr() - self.state = 440 + self.state = 459 self.match(MathExprParser.T__3) - self.state = 441 + self.state = 460 self.expr() - self.state = 442 + self.state = 461 self.match(MathExprParser.T__1) pass elif token in [55]: localctx = MathExprParser.ReshapeFuncContext(self, localctx) self.enterOuterAlt(localctx, 6) - self.state = 444 + self.state = 463 self.match(MathExprParser.RESHAPE) - self.state = 445 + self.state = 464 self.match(MathExprParser.T__0) - self.state = 446 + self.state = 465 self.expr() - self.state = 447 + self.state = 466 self.match(MathExprParser.T__3) - self.state = 448 + self.state = 467 self.expr() - self.state = 449 + self.state = 468 self.match(MathExprParser.T__1) pass else: @@ -7962,7 +4213,9 @@ class MathExprParser(Parser): self.exitRule() return localctx - def sempred(self, localctx: RuleContext, ruleIndex: int, predIndex: int): + + + def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int): if self._predicates == None: self._predicates = dict() self._predicates[1] = self.compExpr_sempred @@ -7974,38 +4227,53 @@ class MathExprParser(Parser): else: return pred(localctx, predIndex) - def compExpr_sempred(self, localctx: CompExprContext, predIndex: int): - if predIndex == 0: - return self.precpred(self._ctx, 7) + 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 == 1: + return self.precpred(self._ctx, 6) + - if predIndex == 2: - return self.precpred(self._ctx, 5) + if predIndex == 2: + return self.precpred(self._ctx, 5) + - if predIndex == 3: - return self.precpred(self._ctx, 4) + if predIndex == 3: + return self.precpred(self._ctx, 4) + - if predIndex == 4: - return self.precpred(self._ctx, 3) + if predIndex == 4: + return self.precpred(self._ctx, 3) + - if predIndex == 5: - return self.precpred(self._ctx, 2) + 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) + 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) + - 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 9f4c67a..28d6e47 100644 --- a/more_math/Parser/MathExprVisitor.py +++ b/more_math/Parser/MathExprVisitor.py @@ -1,6 +1,5 @@ # Generated from ./MathExpr.g4 by ANTLR 4.13.2 from antlr4 import * - if "." in __name__: from .MathExprParser import MathExprParser else: @@ -8,331 +7,427 @@ else: # This class defines a complete generic visitor for a parse tree produced by MathExprParser. - class MathExprVisitor(ParseTreeVisitor): + # Visit a parse tree produced by MathExprParser#expr. - def visitExpr(self, ctx: MathExprParser.ExprContext): + def visitExpr(self, ctx:MathExprParser.ExprContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#LtExp. - def visitLtExp(self, ctx: MathExprParser.LtExpContext): + def visitLtExp(self, ctx:MathExprParser.LtExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#EqExp. - def visitEqExp(self, ctx: MathExprParser.EqExpContext): + def visitEqExp(self, ctx:MathExprParser.EqExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ToAdd. - def visitToAdd(self, ctx: MathExprParser.ToAddContext): + def visitToAdd(self, ctx:MathExprParser.ToAddContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#GeExp. - def visitGeExp(self, ctx: MathExprParser.GeExpContext): + def visitGeExp(self, ctx:MathExprParser.GeExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#LeExp. - def visitLeExp(self, ctx: MathExprParser.LeExpContext): + def visitLeExp(self, ctx:MathExprParser.LeExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#NeExp. - def visitNeExp(self, ctx: MathExprParser.NeExpContext): + def visitNeExp(self, ctx:MathExprParser.NeExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#GtExp. - def visitGtExp(self, ctx: MathExprParser.GtExpContext): + def visitGtExp(self, ctx:MathExprParser.GtExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AddExp. - def visitAddExp(self, ctx: MathExprParser.AddExpContext): + def visitAddExp(self, ctx:MathExprParser.AddExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ToMul. - def visitToMul(self, ctx: MathExprParser.ToMulContext): + def visitToMul(self, ctx:MathExprParser.ToMulContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SubExp. - def visitSubExp(self, ctx: MathExprParser.SubExpContext): + def visitSubExp(self, ctx:MathExprParser.SubExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#MulExp. - def visitMulExp(self, ctx: MathExprParser.MulExpContext): + def visitMulExp(self, ctx:MathExprParser.MulExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ModExp. - def visitModExp(self, ctx: MathExprParser.ModExpContext): + def visitModExp(self, ctx:MathExprParser.ModExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#DivExp. - def visitDivExp(self, ctx: MathExprParser.DivExpContext): + def visitDivExp(self, ctx:MathExprParser.DivExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ToPow. - def visitToPow(self, ctx: MathExprParser.ToPowContext): + def visitToPow(self, ctx:MathExprParser.ToPowContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#PowExp. - def visitPowExp(self, ctx: MathExprParser.PowExpContext): + def visitPowExp(self, ctx:MathExprParser.PowExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ToUnary. - def visitToUnary(self, ctx: MathExprParser.ToUnaryContext): + def visitToUnary(self, ctx:MathExprParser.ToUnaryContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#UnaryPlus. - def visitUnaryPlus(self, ctx: MathExprParser.UnaryPlusContext): + def visitUnaryPlus(self, ctx:MathExprParser.UnaryPlusContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#UnaryMinus. - def visitUnaryMinus(self, ctx: MathExprParser.UnaryMinusContext): + def visitUnaryMinus(self, ctx:MathExprParser.UnaryMinusContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ToAtom. - def visitToAtom(self, ctx: MathExprParser.ToAtomContext): + def visitToAtom(self, ctx:MathExprParser.ToAtomContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#Func1Exp. - def visitFunc1Exp(self, ctx: MathExprParser.Func1ExpContext): + def visitFunc1Exp(self, ctx:MathExprParser.Func1ExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#Func2Exp. - def visitFunc2Exp(self, ctx: MathExprParser.Func2ExpContext): + def visitFunc2Exp(self, ctx:MathExprParser.Func2ExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#Func3Exp. - def visitFunc3Exp(self, ctx: MathExprParser.Func3ExpContext): + def visitFunc3Exp(self, ctx:MathExprParser.Func3ExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#Func4Exp. - def visitFunc4Exp(self, ctx: MathExprParser.Func4ExpContext): + def visitFunc4Exp(self, ctx:MathExprParser.Func4ExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#FuncNExp. - def visitFuncNExp(self, ctx: MathExprParser.FuncNExpContext): + def visitFuncNExp(self, ctx:MathExprParser.FuncNExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#VariableExp. - def visitVariableExp(self, ctx: MathExprParser.VariableExpContext): + def visitVariableExp(self, ctx:MathExprParser.VariableExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#NumberExp. - def visitNumberExp(self, ctx: MathExprParser.NumberExpContext): + def visitNumberExp(self, ctx:MathExprParser.NumberExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ConstantExp. - def visitConstantExp(self, ctx: MathExprParser.ConstantExpContext): + def visitConstantExp(self, ctx:MathExprParser.ConstantExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ParenExp. - def visitParenExp(self, ctx: MathExprParser.ParenExpContext): + def visitParenExp(self, ctx:MathExprParser.ParenExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AbsExp. - def visitAbsExp(self, ctx: MathExprParser.AbsExpContext): + def visitAbsExp(self, ctx:MathExprParser.AbsExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ListExp. - def visitListExp(self, ctx: MathExprParser.ListExpContext): + def visitListExp(self, ctx:MathExprParser.ListExpContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SinFunc. - def visitSinFunc(self, ctx: MathExprParser.SinFuncContext): + def visitSinFunc(self, ctx:MathExprParser.SinFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#CosFunc. - def visitCosFunc(self, ctx: MathExprParser.CosFuncContext): + def visitCosFunc(self, ctx:MathExprParser.CosFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#TanFunc. - def visitTanFunc(self, ctx: MathExprParser.TanFuncContext): + def visitTanFunc(self, ctx:MathExprParser.TanFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AsinFunc. - def visitAsinFunc(self, ctx: MathExprParser.AsinFuncContext): + def visitAsinFunc(self, ctx:MathExprParser.AsinFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AcosFunc. - def visitAcosFunc(self, ctx: MathExprParser.AcosFuncContext): + def visitAcosFunc(self, ctx:MathExprParser.AcosFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AtanFunc. - def visitAtanFunc(self, ctx: MathExprParser.AtanFuncContext): + def visitAtanFunc(self, ctx:MathExprParser.AtanFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SinhFunc. - def visitSinhFunc(self, ctx: MathExprParser.SinhFuncContext): + def visitSinhFunc(self, ctx:MathExprParser.SinhFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#CoshFunc. - def visitCoshFunc(self, ctx: MathExprParser.CoshFuncContext): + def visitCoshFunc(self, ctx:MathExprParser.CoshFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#TanhFunc. - def visitTanhFunc(self, ctx: MathExprParser.TanhFuncContext): + def visitTanhFunc(self, ctx:MathExprParser.TanhFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AsinhFunc. - def visitAsinhFunc(self, ctx: MathExprParser.AsinhFuncContext): + def visitAsinhFunc(self, ctx:MathExprParser.AsinhFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AcoshFunc. - def visitAcoshFunc(self, ctx: MathExprParser.AcoshFuncContext): + def visitAcoshFunc(self, ctx:MathExprParser.AcoshFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AtanhFunc. - def visitAtanhFunc(self, ctx: MathExprParser.AtanhFuncContext): + def visitAtanhFunc(self, ctx:MathExprParser.AtanhFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#AbsFunc. - def visitAbsFunc(self, ctx: MathExprParser.AbsFuncContext): + def visitAbsFunc(self, ctx:MathExprParser.AbsFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SqrtFunc. - def visitSqrtFunc(self, ctx: MathExprParser.SqrtFuncContext): + def visitSqrtFunc(self, ctx:MathExprParser.SqrtFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#LnFunc. - def visitLnFunc(self, ctx: MathExprParser.LnFuncContext): + def visitLnFunc(self, ctx:MathExprParser.LnFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#LogFunc. - def visitLogFunc(self, ctx: MathExprParser.LogFuncContext): + def visitLogFunc(self, ctx:MathExprParser.LogFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ExpFunc. - def visitExpFunc(self, ctx: MathExprParser.ExpFuncContext): + def visitExpFunc(self, ctx:MathExprParser.ExpFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#TNormFunc. - def visitTNormFunc(self, ctx: MathExprParser.TNormFuncContext): + def visitTNormFunc(self, ctx:MathExprParser.TNormFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SNormFunc. - def visitSNormFunc(self, ctx: MathExprParser.SNormFuncContext): + def visitSNormFunc(self, ctx:MathExprParser.SNormFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#FloorFunc. - def visitFloorFunc(self, ctx: MathExprParser.FloorFuncContext): + def visitFloorFunc(self, ctx:MathExprParser.FloorFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#CeilFunc. - def visitCeilFunc(self, ctx: MathExprParser.CeilFuncContext): + def visitCeilFunc(self, ctx:MathExprParser.CeilFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#RoundFunc. - def visitRoundFunc(self, ctx: MathExprParser.RoundFuncContext): + def visitRoundFunc(self, ctx:MathExprParser.RoundFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#GammaFunc. - def visitGammaFunc(self, ctx: MathExprParser.GammaFuncContext): + def visitGammaFunc(self, ctx:MathExprParser.GammaFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#sigmoidFunc. - def visitSigmoidFunc(self, ctx: MathExprParser.SigmoidFuncContext): + def visitSigmoidFunc(self, ctx:MathExprParser.SigmoidFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#sfftFunc. - def visitSfftFunc(self, ctx: MathExprParser.SfftFuncContext): + def visitSfftFunc(self, ctx:MathExprParser.SfftFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#sifftFunc. - def visitSifftFunc(self, ctx: MathExprParser.SifftFuncContext): + def visitSifftFunc(self, ctx:MathExprParser.SifftFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#anglFunc. - def visitAnglFunc(self, ctx: MathExprParser.AnglFuncContext): + def visitAnglFunc(self, ctx:MathExprParser.AnglFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#printFunc. - def visitPrintFunc(self, ctx: MathExprParser.PrintFuncContext): + def visitPrintFunc(self, ctx:MathExprParser.PrintFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#FractFunc. - def visitFractFunc(self, ctx: MathExprParser.FractFuncContext): + def visitFractFunc(self, ctx:MathExprParser.FractFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ReluFunc. - def visitReluFunc(self, ctx: MathExprParser.ReluFuncContext): + def visitReluFunc(self, ctx:MathExprParser.ReluFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SoftplusFunc. - def visitSoftplusFunc(self, ctx: MathExprParser.SoftplusFuncContext): + def visitSoftplusFunc(self, ctx:MathExprParser.SoftplusFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#GeluFunc. - def visitGeluFunc(self, ctx: MathExprParser.GeluFuncContext): + def visitGeluFunc(self, ctx:MathExprParser.GeluFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SignFunc. - def visitSignFunc(self, ctx: MathExprParser.SignFuncContext): + def visitSignFunc(self, ctx:MathExprParser.SignFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#PrintShapeFunc. - def visitPrintShapeFunc(self, ctx: MathExprParser.PrintShapeFuncContext): + def visitPrintShapeFunc(self, ctx:MathExprParser.PrintShapeFuncContext): return self.visitChildren(ctx) + + # Visit a parse tree produced by MathExprParser#PinvFunc. + def visitPinvFunc(self, ctx:MathExprParser.PinvFuncContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by MathExprParser#PowFunc. - def visitPowFunc(self, ctx: MathExprParser.PowFuncContext): + def visitPowFunc(self, ctx:MathExprParser.PowFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#Atan2Func. - def visitAtan2Func(self, ctx: MathExprParser.Atan2FuncContext): + def visitAtan2Func(self, ctx:MathExprParser.Atan2FuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#TMinFunc. - def visitTMinFunc(self, ctx: MathExprParser.TMinFuncContext): + def visitTMinFunc(self, ctx:MathExprParser.TMinFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#TMaxFunc. - def visitTMaxFunc(self, ctx: MathExprParser.TMaxFuncContext): + def visitTMaxFunc(self, ctx:MathExprParser.TMaxFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#StepFunc. - def visitStepFunc(self, ctx: MathExprParser.StepFuncContext): + def visitStepFunc(self, ctx:MathExprParser.StepFuncContext): return self.visitChildren(ctx) + + # Visit a parse tree produced by MathExprParser#TopkFunc. + def visitTopkFunc(self, ctx:MathExprParser.TopkFuncContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by MathExprParser#BotkFunc. + def visitBotkFunc(self, ctx:MathExprParser.BotkFuncContext): + return self.visitChildren(ctx) + + # Visit a parse tree produced by MathExprParser#ClampFunc. - def visitClampFunc(self, ctx: MathExprParser.ClampFuncContext): + def visitClampFunc(self, ctx:MathExprParser.ClampFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#LerpFunc. - def visitLerpFunc(self, ctx: MathExprParser.LerpFuncContext): + def visitLerpFunc(self, ctx:MathExprParser.LerpFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SmoothstepFunc. - def visitSmoothstepFunc(self, ctx: MathExprParser.SmoothstepFuncContext): + def visitSmoothstepFunc(self, ctx:MathExprParser.SmoothstepFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#RangeFunc. - def visitRangeFunc(self, ctx: MathExprParser.RangeFuncContext): + def visitRangeFunc(self, ctx:MathExprParser.RangeFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SwapFunc. - def visitSwapFunc(self, ctx: MathExprParser.SwapFuncContext): + def visitSwapFunc(self, ctx:MathExprParser.SwapFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SMinFunc. - def visitSMinFunc(self, ctx: MathExprParser.SMinFuncContext): + def visitSMinFunc(self, ctx:MathExprParser.SMinFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#SMaxFunc. - def visitSMaxFunc(self, ctx: MathExprParser.SMaxFuncContext): + def visitSMaxFunc(self, ctx:MathExprParser.SMaxFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#MapFunc. - def visitMapFunc(self, ctx: MathExprParser.MapFuncContext): + def visitMapFunc(self, ctx:MathExprParser.MapFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ConvFunc. - def visitConvFunc(self, ctx: MathExprParser.ConvFuncContext): + def visitConvFunc(self, ctx:MathExprParser.ConvFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#PermuteFunc. - def visitPermuteFunc(self, ctx: MathExprParser.PermuteFuncContext): + def visitPermuteFunc(self, ctx:MathExprParser.PermuteFuncContext): return self.visitChildren(ctx) + # Visit a parse tree produced by MathExprParser#ReshapeFunc. - def visitReshapeFunc(self, ctx: MathExprParser.ReshapeFuncContext): + def visitReshapeFunc(self, ctx:MathExprParser.ReshapeFuncContext): return self.visitChildren(ctx) -del MathExprParser + +del MathExprParser \ No newline at end of file diff --git a/more_math/Parser/UnifiedMathVisitor.py b/more_math/Parser/UnifiedMathVisitor.py index 33885f2..fbc8354 100644 --- a/more_math/Parser/UnifiedMathVisitor.py +++ b/more_math/Parser/UnifiedMathVisitor.py @@ -23,7 +23,7 @@ class UnifiedMathVisitor(MathExprVisitor): def _promote_to_tensor(self, val): if self._is_tensor(val): - return val + return val.contiguous() if self._is_list(val): return torch.tensor(val, device=self.device) return torch.tensor(val, device=self.device) @@ -50,7 +50,7 @@ class UnifiedMathVisitor(MathExprVisitor): if self._is_tensor(a) or self._is_tensor(b): if torch_op: - return torch_op(a, b) + return torch_op(a, b).contiguous() return scalar_op(a, b) return scalar_op(a, b) @@ -59,7 +59,7 @@ class UnifiedMathVisitor(MathExprVisitor): if self._is_list(a): return [self._unary_op(x, torch_op, scalar_op) for x in a] if self._is_tensor(a): - return torch_op(a) if torch_op else scalar_op(a) + return torch_op(a).contiguous() if torch_op else scalar_op(a) return scalar_op(a) # ======================== @@ -143,7 +143,7 @@ class UnifiedMathVisitor(MathExprVisitor): if self._is_list(arg): return [self._func_dispatch(x, torch_fn, scalar_fn) for x in arg] if self._is_tensor(arg): - return torch_fn(arg) + return torch_fn(arg).contiguous() return scalar_fn(arg) def visitSinFunc(self, ctx): @@ -287,12 +287,98 @@ class UnifiedMathVisitor(MathExprVisitor): lambda x, edge: 1.0 if x >= edge else 0.0, ) + def visitTopkFunc(self, ctx): + val = self.visit(ctx.expr(0)) + k = self.visit(ctx.expr(1)) + + if self._is_tensor(k): + k_val = int(k.flatten()[0].item()) + else: + k_val = int(k) + + if self._is_tensor(val): + size = val.shape[-1] + k_val = max(1, min(k_val, size)) + score_val = val.abs() if torch.is_complex(val) else val + + _, indices = torch.topk(score_val, k=k_val, dim=-1) + indices = indices.contiguous() + mask = torch.zeros_like(score_val, dtype=torch.bool) + mask.scatter_(dim=-1, index=indices, value=True) + + result = torch.where(mask, val, torch.zeros_like(val)) + return result.contiguous() + + if self._is_list(val): + k_val = max(0, min(k_val, len(val))) + try: + return sorted(val, reverse=True)[:k_val] + except: + return val[:k_val] + + return val + + def visitBotkFunc(self, ctx): + val = self.visit(ctx.expr(0)) + k = self.visit(ctx.expr(1)) + + if self._is_tensor(k): + k_val = int(k.flatten()[0].item()) + else: + k_val = int(k) + + if self._is_tensor(val): + size = val.shape[-1] + k_val = max(1, min(k_val, size)) + score_val = val.abs() if torch.is_complex(val) else val + + _, indices = torch.topk(score_val, k=k_val, dim=-1, largest=False) + indices = indices.contiguous() + mask = torch.zeros_like(score_val, dtype=torch.bool) + mask.scatter_(dim=-1, index=indices, value=True) + + result = torch.where(mask, val, torch.zeros_like(val)) + return result.contiguous() + + if self._is_list(val): + k_val = max(0, min(k_val, len(val))) + try: + return sorted(val)[:k_val] + except: + return val[:k_val] + + return val + + def visitPinvFunc(self, ctx): + """Permutation inverse: if input[i] = j, output[j] = i.""" + val = self.visit(ctx.expr()) + + if self._is_list(val): + n = len(val) + result = [0] * n + for i, v in enumerate(val): + idx = int(v) + if 0 <= idx < n: + result[idx] = i + return result + + if self._is_tensor(val): + val_list = val.flatten().tolist() + n = len(val_list) + result = [0] * n + for i, v in enumerate(val_list): + idx = int(v) + if 0 <= idx < n: + result[idx] = i + return torch.tensor(result, device=val.device, dtype=val.dtype).reshape(val.shape) + + return val + # Three-argument functions def visitClampFunc(self, ctx): val = self.visit(ctx.expr(0)) min_v = self.visit(ctx.expr(1)) max_v = self.visit(ctx.expr(2)) - # Handle mixed types manually or promote? if any(self._is_tensor(x) for x in [val, min_v, max_v]): return torch.clamp(self._promote_to_tensor(val), self._promote_to_tensor(min_v), self._promote_to_tensor(max_v)) if self._is_list(val): diff --git a/more_math/helper_functions.py b/more_math/helper_functions.py index 86b58e4..128dbba 100644 --- a/more_math/helper_functions.py +++ b/more_math/helper_functions.py @@ -139,17 +139,3 @@ def make_zero_like(ref): return None - -# Legacy FFT functions (kept for backward compatibility, but now unused) -def time_to_freq(element: torch.Tensor) -> torch.Tensor: - if element.ndim < 2: - raise ValueError("FFT requires at least 2 dimensions (Batch, Channel)") - dims = tuple(range(2, element.ndim)) - return torch.fft.fftn(element, dim=dims) - - -def freq_to_time(element: torch.Tensor) -> torch.Tensor: - if element.ndim < 2: - raise ValueError("IFFT requires at least 2 dimensions (Batch, Channel)") - dims = tuple(range(2, element.ndim)) - return torch.fft.ifftn(element, dim=dims).real diff --git a/tests/test_more_math.py b/tests/test_more_math.py index 52593c3..74e236b 100644 --- a/tests/test_more_math.py +++ b/tests/test_more_math.py @@ -26,6 +26,7 @@ from more_math.ConditioningMathNode import ConditioningMathNode from more_math.LatentMathNode import LatentMathNode from more_math.ImageMathNode import ImageMathNode from more_math.FloatMathNode import FloatMathNode +from more_math.AudioMathNode import AudioMathNode # ========================================== @@ -264,6 +265,23 @@ def test_image_swap(): assert torch.allclose(res_swap, img_blue) +# ========================================== +# Audio Math Operations +# ========================================== + + +def test_audio_math_basic(): + node = AudioMathNode() + waveform = torch.randn(1, 1, 1024) + audio = {"waveform": waveform, "sample_rate": 44100} + # result = a * 2.0 + res = node.execute("a * 2.0", a=audio)[0] + assert isinstance(res, dict) + assert "waveform" in res + assert res["sample_rate"] == 44100 + assert torch.allclose(res["waveform"], waveform * 2.0) + + # ========================================== # Nested Expressions # ========================================== diff --git a/tests/test_unified_math.py b/tests/test_unified_math.py index 7ec2b8d..e6bda96 100644 --- a/tests/test_unified_math.py +++ b/tests/test_unified_math.py @@ -40,6 +40,12 @@ def test_scalar_ops(): assert parse_and_visit("a * b", vars) == 6.0 assert parse_and_visit("sin(0)", vars) == 0.0 assert parse_and_visit("smax(a, b)", vars) == 3.0 + assert parse_and_visit("step(2, 1)", vars) == 1.0 + assert parse_and_visit("step(0, 1)", vars) == 0.0 + assert parse_and_visit("clamp(5, 0, 10)", vars) == 5.0 + assert parse_and_visit("clamp(-5, 0, 10)", vars) == 0.0 + assert parse_and_visit("lerp(0, 10, 0.5)", vars) == 5.0 + assert parse_and_visit("fract(1.25)", vars) == 0.25 # Type check - ensure they are python float/int, not tensor res = parse_and_visit("a + b", vars) @@ -176,6 +182,77 @@ def test_bool_ops(): assert torch.all(res == torch.tensor([1.0, 0.0])) +def test_topk(): + # Tensor topk + t = torch.tensor([1.0, 5.0, 2.0, 8.0, 3.0]) + vars = {"t": t} + # Tensor topk masking + t = torch.tensor([1.0, 5.0, 2.0, 8.0, 3.0]) + vars = {"t": t} + res = parse_and_visit("topk(t, 3)", vars) + assert isinstance(res, torch.Tensor) + assert res.shape == t.shape + # Top 3 are 8, 5, 3. Masked result should be [0, 5, 0, 8, 3] + expected = torch.tensor([0.0, 5.0, 0.0, 8.0, 3.0]) + assert torch.allclose(res, expected) + assert res.is_contiguous() + + # Complex topk masking + tc = torch.tensor([1.0+1j, 5.0+5j, 2.0+2j]) + vars["tc"] = tc + res_c = parse_and_visit("topk(tc, 1)", vars) + assert res_c.shape == tc.shape + # Top 1 is 5+5j. Masked should be [0, 5+5j, 0] + expected_c = torch.tensor([0.0+0j, 5.0+5j, 0.0+0j]) + assert torch.allclose(res_c, expected_c) + + +def test_botk(): + # Tensor botk masking (bottom k smallest values) + t = torch.tensor([1.0, 5.0, 2.0, 8.0, 3.0]) + vars = {"t": t} + res = parse_and_visit("botk(t, 3)", vars) + assert isinstance(res, torch.Tensor) + assert res.shape == t.shape + # Bottom 3 are 1, 2, 3. Masked result should be [1, 0, 2, 0, 3] + expected = torch.tensor([1.0, 0.0, 2.0, 0.0, 3.0]) + assert torch.allclose(res, expected) + assert res.is_contiguous() + + # List botk + l = [1.0, 5.0, 2.0, 8.0, 3.0] + vars = {"l": l} + res_l = parse_and_visit("botk(l, 2)", vars) + assert isinstance(res_l, list) + assert res_l == [1.0, 2.0] + + +def test_pinv(): + # List permutation inverse + perm = [2, 0, 1] # 0->2, 1->0, 2->1 + vars = {"perm": perm} + res = parse_and_visit("pinv(perm)", vars) + assert isinstance(res, list) + # Inverse: if perm[i]=j, then inv[j]=i + # perm[0]=2 -> inv[2]=0 + # perm[1]=0 -> inv[0]=1 + # perm[2]=1 -> inv[1]=2 + assert res == [1, 2, 0] + + # Tensor permutation inverse + perm_t = torch.tensor([2, 0, 1]) + vars["perm_t"] = perm_t + res_t = parse_and_visit("pinv(perm_t)", vars) + assert isinstance(res_t, torch.Tensor) + assert torch.equal(res_t, torch.tensor([1, 2, 0])) + +def test_pinv_identity(): + perm = [2,0,1,6,4,3,5] + tensor = torch.rand([11,14,32,21,4,3,1]) + varbl = {'c':tensor,'a':perm} + res = parse_and_visit("permute(permute(c,a),pinv(a))",varbl) + assert torch.equal(tensor,res) + if __name__ == "__main__": try: test_scalar_ops() @@ -187,6 +264,9 @@ if __name__ == "__main__": test_hyperbolic_trig() test_kernel_coords() test_bool_ops() + test_topk() + test_botk() + test_pinv() print("All UnifiedMathVisitor tests passed!") except Exception: import traceback