From 6091c610c7aaef079e410439add550421d9d188b Mon Sep 17 00:00:00 2001 From: mgreminger Date: Wed, 9 Oct 2024 11:26:40 -0500 Subject: [PATCH 1/9] refactor: create a separate token for single character after underscore --- src/parser/LatexLexer.g4 | 13 +- src/parser/LatexLexer.ts | 939 +++++++++++++++++++------------------- src/parser/LatexParser.ts | 641 +++++++++++++------------- 3 files changed, 805 insertions(+), 788 deletions(-) diff --git a/src/parser/LatexLexer.g4 b/src/parser/LatexLexer.g4 index 35f91306..fe3d7a1a 100644 --- a/src/parser/LatexLexer.g4 +++ b/src/parser/LatexLexer.g4 @@ -16,14 +16,17 @@ DOUBLE_VBAR: '||' | '\\Vert' ; UNDERSCORE: '_' ; +UNDERSCORE_SINGLE_CHAR_NUMBER: '_' [0-9]; +UNDERSCORE_SINGLE_CHAR_ID: '_' [a-zA-Z]; + EXCLAMATION: '!' ; PI: '\\pi' ; CMD_INT: '\\int' ; CMD_INT_UNDERSCORE: '\\int' [ ]* '_' ; -CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER: '\\int' [ ]* '_' [0-9]; -CMD_INT_UNDERSCORE_SINGLE_CHAR_ID: '\\int' [ ]* '_' [a-zA-Z] ; +CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER: '\\int' [ ]* UNDERSCORE_SINGLE_CHAR_NUMBER ; +CMD_INT_UNDERSCORE_SINGLE_CHAR_ID: '\\int' [ ]* UNDERSCORE_SINGLE_CHAR_ID ; CMD_MATHRM: '\\mathrm' ; @@ -62,8 +65,8 @@ CMD_COTH: 'coth' ; CMD_LN: 'ln' ; CMD_LOG: 'log' ; CMD_SLASH_LOG_UNDERSCORE: '\\log' [ ]* '_' ; -CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER: '\\log' [ ]* '_' [0-9] ; -CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID: '\\log' [ ]* '_' [a-zA-Z] ; +CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER: '\\log' [ ]* UNDERSCORE_SINGLE_CHAR_NUMBER ; +CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID: '\\log' [ ]* UNDERSCORE_SINGLE_CHAR_ID ; COMMENT: '\\text{' .*? '}' -> skip ; @@ -116,7 +119,7 @@ AMPERSAND: '&'; DOUBLE_BACKSLASH: '\\\\'; -UNDERSCORE_SUBSCRIPT: (([ ]* '_{' [a-zA-Z0-9]+ '}') | ([ ]* '_' [a-zA-Z0-9])); +UNDERSCORE_SUBSCRIPT: (([ ]* '_{' [a-zA-Z0-9]+ '}') | ([ ]* (UNDERSCORE_SINGLE_CHAR_ID | UNDERSCORE_SINGLE_CHAR_NUMBER) )); CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT: '^'[a-zA-Z] UNDERSCORE_SUBSCRIPT; diff --git a/src/parser/LatexLexer.ts b/src/parser/LatexLexer.ts index c077a7fd..b7a42f78 100644 --- a/src/parser/LatexLexer.ts +++ b/src/parser/LatexLexer.ts @@ -22,95 +22,97 @@ export default class LatexLexer extends Lexer { public static readonly VBAR = 8; public static readonly DOUBLE_VBAR = 9; public static readonly UNDERSCORE = 10; - public static readonly EXCLAMATION = 11; - public static readonly PI = 12; - public static readonly CMD_INT = 13; - public static readonly CMD_INT_UNDERSCORE = 14; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 15; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 16; - public static readonly CMD_MATHRM = 17; - public static readonly CMD_FRAC = 18; - public static readonly CMD_FRAC_INTS = 19; - public static readonly CMD_CDOT = 20; - public static readonly CMD_TIMES = 21; - public static readonly CMD_SQRT = 22; - public static readonly CMD_SQRT_INT = 23; - public static readonly CMD_SIM = 24; - public static readonly CMD_APPROX = 25; - public static readonly CMD_PLACEHOLDER = 26; - public static readonly TRANSPOSE = 27; - public static readonly BACKSLASH = 28; - public static readonly AS_LINES = 29; - public static readonly CMD_SIN = 30; - public static readonly CMD_COS = 31; - public static readonly CMD_TAN = 32; - public static readonly CMD_COT = 33; - public static readonly CMD_SEC = 34; - public static readonly CMD_CSC = 35; - public static readonly CMD_ARCSIN = 36; - public static readonly CMD_ARCCOS = 37; - public static readonly CMD_ARCTAN = 38; - public static readonly CMD_SINH = 39; - public static readonly CMD_COSH = 40; - public static readonly CMD_TANH = 41; - public static readonly CMD_COTH = 42; - public static readonly CMD_LN = 43; - public static readonly CMD_LOG = 44; - public static readonly CMD_SLASH_LOG_UNDERSCORE = 45; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 46; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 47; - public static readonly COMMENT = 48; - public static readonly CMD_LEFT = 49; - public static readonly CMD_RIGHT = 50; - public static readonly DOUBLE_DOLLAR_SIGN = 51; - public static readonly ADD = 52; - public static readonly SUB = 53; - public static readonly CARET = 54; - public static readonly EQ = 55; - public static readonly LT = 56; - public static readonly GT = 57; - public static readonly LTE = 58; - public static readonly GTE = 59; - public static readonly COMMA = 60; - public static readonly DECIMAL_POINT = 61; - public static readonly CARET_SINGLE_CHAR_NUMBER = 62; - public static readonly CARET_SINGLE_CHAR_ID = 63; - public static readonly NUMBER = 64; - public static readonly BEGIN_MATRIX = 65; - public static readonly END_MATRIX = 66; - public static readonly AMPERSAND = 67; - public static readonly DOUBLE_BACKSLASH = 68; - public static readonly UNDERSCORE_SUBSCRIPT = 69; - public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 70; - public static readonly ID = 71; - public static readonly WS = 72; - public static readonly SLASH_SPACE = 73; - public static readonly SLASH_COLON = 74; - public static readonly NBSP = 75; - public static readonly ERROR_CHAR = 76; - public static readonly R_BRACKET = 77; - public static readonly ALT_R_BRACKET = 78; - public static readonly U_CMD_FRAC = 79; - public static readonly U_CMD_FRAC_INTS = 80; - public static readonly U_CMD_CDOT = 81; - public static readonly U_CMD_TIMES = 82; - public static readonly U_CMD_SQRT = 83; - public static readonly U_COMMA = 84; - public static readonly U_CARET = 85; - public static readonly U_NAME = 86; - public static readonly U_L_PAREN = 87; - public static readonly U_R_PAREN = 88; - public static readonly U_L_BRACE = 89; - public static readonly U_R_BRACE = 90; - public static readonly U_ONE = 91; - public static readonly U_NUMBER = 92; - public static readonly U_CMD_LEFT = 93; - public static readonly U_CMD_RIGHT = 94; - public static readonly U_WS = 95; - public static readonly U_SLASH_SPACE = 96; - public static readonly U_SLASH_COLON = 97; - public static readonly U_NBSP = 98; - public static readonly U_ERROR_CHAR = 99; + public static readonly UNDERSCORE_SINGLE_CHAR_NUMBER = 11; + public static readonly UNDERSCORE_SINGLE_CHAR_ID = 12; + public static readonly EXCLAMATION = 13; + public static readonly PI = 14; + public static readonly CMD_INT = 15; + public static readonly CMD_INT_UNDERSCORE = 16; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 17; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 18; + public static readonly CMD_MATHRM = 19; + public static readonly CMD_FRAC = 20; + public static readonly CMD_FRAC_INTS = 21; + public static readonly CMD_CDOT = 22; + public static readonly CMD_TIMES = 23; + public static readonly CMD_SQRT = 24; + public static readonly CMD_SQRT_INT = 25; + public static readonly CMD_SIM = 26; + public static readonly CMD_APPROX = 27; + public static readonly CMD_PLACEHOLDER = 28; + public static readonly TRANSPOSE = 29; + public static readonly BACKSLASH = 30; + public static readonly AS_LINES = 31; + public static readonly CMD_SIN = 32; + public static readonly CMD_COS = 33; + public static readonly CMD_TAN = 34; + public static readonly CMD_COT = 35; + public static readonly CMD_SEC = 36; + public static readonly CMD_CSC = 37; + public static readonly CMD_ARCSIN = 38; + public static readonly CMD_ARCCOS = 39; + public static readonly CMD_ARCTAN = 40; + public static readonly CMD_SINH = 41; + public static readonly CMD_COSH = 42; + public static readonly CMD_TANH = 43; + public static readonly CMD_COTH = 44; + public static readonly CMD_LN = 45; + public static readonly CMD_LOG = 46; + public static readonly CMD_SLASH_LOG_UNDERSCORE = 47; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 48; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 49; + public static readonly COMMENT = 50; + public static readonly CMD_LEFT = 51; + public static readonly CMD_RIGHT = 52; + public static readonly DOUBLE_DOLLAR_SIGN = 53; + public static readonly ADD = 54; + public static readonly SUB = 55; + public static readonly CARET = 56; + public static readonly EQ = 57; + public static readonly LT = 58; + public static readonly GT = 59; + public static readonly LTE = 60; + public static readonly GTE = 61; + public static readonly COMMA = 62; + public static readonly DECIMAL_POINT = 63; + public static readonly CARET_SINGLE_CHAR_NUMBER = 64; + public static readonly CARET_SINGLE_CHAR_ID = 65; + public static readonly NUMBER = 66; + public static readonly BEGIN_MATRIX = 67; + public static readonly END_MATRIX = 68; + public static readonly AMPERSAND = 69; + public static readonly DOUBLE_BACKSLASH = 70; + public static readonly UNDERSCORE_SUBSCRIPT = 71; + public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 72; + public static readonly ID = 73; + public static readonly WS = 74; + public static readonly SLASH_SPACE = 75; + public static readonly SLASH_COLON = 76; + public static readonly NBSP = 77; + public static readonly ERROR_CHAR = 78; + public static readonly R_BRACKET = 79; + public static readonly ALT_R_BRACKET = 80; + public static readonly U_CMD_FRAC = 81; + public static readonly U_CMD_FRAC_INTS = 82; + public static readonly U_CMD_CDOT = 83; + public static readonly U_CMD_TIMES = 84; + public static readonly U_CMD_SQRT = 85; + public static readonly U_COMMA = 86; + public static readonly U_CARET = 87; + public static readonly U_NAME = 88; + public static readonly U_L_PAREN = 89; + public static readonly U_R_PAREN = 90; + public static readonly U_L_BRACE = 91; + public static readonly U_R_BRACE = 92; + public static readonly U_ONE = 93; + public static readonly U_NUMBER = 94; + public static readonly U_CMD_LEFT = 95; + public static readonly U_CMD_RIGHT = 96; + public static readonly U_WS = 97; + public static readonly U_SLASH_SPACE = 98; + public static readonly U_SLASH_COLON = 99; + public static readonly U_NBSP = 100; + public static readonly U_ERROR_CHAR = 101; public static readonly EOF = Token.EOF; public static readonly UNITS = 1; @@ -118,15 +120,15 @@ export default class LatexLexer extends Lexer { public static readonly literalNames: string[] = [ null, "'['", "'\\lbrack'", "';'", null, null, null, null, "'|'", null, "'_'", - "'!'", "'\\pi'", "'\\int'", - null, null, null, "'\\mathrm'", + null, null, "'!'", "'\\pi'", + "'\\int'", null, null, + null, "'\\mathrm'", null, null, null, null, null, - null, null, "'\\sim'", - "'\\approx'", "'\\placeholder'", - "'^{\\mathrm{T}}'", "'\\'", - null, "'sin'", "'cos'", - "'tan'", "'cot'", "'sec'", - "'csc'", "'arcsin'", + null, "'\\sim'", "'\\approx'", + "'\\placeholder'", "'^{\\mathrm{T}}'", + "'\\'", null, "'sin'", + "'cos'", "'tan'", "'cot'", + "'sec'", "'csc'", "'arcsin'", "'arccos'", "'arctan'", "'sinh'", "'cosh'", "'tanh'", "'coth'", "'ln'", "'log'", @@ -149,8 +151,10 @@ export default class LatexLexer extends Lexer { "SEMICOLON", "L_BRACE", "R_BRACE", "L_PAREN", "R_PAREN", "VBAR", "DOUBLE_VBAR", - "UNDERSCORE", "EXCLAMATION", - "PI", "CMD_INT", "CMD_INT_UNDERSCORE", + "UNDERSCORE", "UNDERSCORE_SINGLE_CHAR_NUMBER", + "UNDERSCORE_SINGLE_CHAR_ID", + "EXCLAMATION", "PI", + "CMD_INT", "CMD_INT_UNDERSCORE", "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", "CMD_MATHRM", "CMD_FRAC", @@ -200,8 +204,9 @@ export default class LatexLexer extends Lexer { public static readonly ruleNames: string[] = [ "L_BRACKET", "ALT_L_BRACKET", "SEMICOLON", "L_BRACE", "R_BRACE", "L_PAREN", - "R_PAREN", "VBAR", "DOUBLE_VBAR", "UNDERSCORE", "EXCLAMATION", "PI", "CMD_INT", - "CMD_INT_UNDERSCORE", "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", + "R_PAREN", "VBAR", "DOUBLE_VBAR", "UNDERSCORE", "UNDERSCORE_SINGLE_CHAR_NUMBER", + "UNDERSCORE_SINGLE_CHAR_ID", "EXCLAMATION", "PI", "CMD_INT", "CMD_INT_UNDERSCORE", + "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", "CMD_MATHRM", "CMD_FRAC", "CMD_FRAC_INTS", "CMD_CDOT", "CMD_TIMES", "CMD_SQRT", "CMD_SQRT_INT", "CMD_SIM", "CMD_APPROX", "CMD_PLACEHOLDER", "TRANSPOSE", "BACKSLASH", "AS_LINES", "CMD_SIN", "CMD_COS", "CMD_TAN", "CMD_COT", "CMD_SEC", @@ -238,370 +243,374 @@ export default class LatexLexer extends Lexer { public get modeNames(): string[] { return LatexLexer.modeNames; } - public static readonly _serializedATN: number[] = [4,0,99,1084,6,-1,6,-1, - 2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8, - 2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16, - 7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7, - 23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30, - 2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2, - 38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45, - 7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7, - 52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2,59,7,59, - 2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7,65,2,66,7,66,2, - 67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74, - 7,74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7,78,2,79,7,79,2,80,7,80,2,81,7, - 81,2,82,7,82,2,83,7,83,2,84,7,84,2,85,7,85,2,86,7,86,2,87,7,87,2,88,7,88, - 2,89,7,89,2,90,7,90,2,91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7,95,2, - 96,7,96,2,97,7,97,2,98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102,7,102, - 2,103,7,103,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2, - 1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8, - 3,8,244,8,8,1,9,1,9,1,10,1,10,1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1, - 12,1,13,1,13,1,13,1,13,1,13,1,13,5,13,265,8,13,10,13,12,13,268,9,13,1,13, - 1,13,1,14,1,14,1,14,1,14,1,14,1,14,5,14,278,8,14,10,14,12,14,281,9,14,1, - 14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,5,15,292,8,15,10,15,12,15,295, - 9,15,1,15,1,15,1,15,1,16,1,16,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,18,1,18,1,18,5,18,321,8,18,10,18, - 12,18,324,9,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1, - 20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22, - 1,22,1,22,1,22,5,22,355,8,22,10,22,12,22,358,9,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,24,1,24,1,24,1,25,1,25,1,25,1,25, - 1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1, - 26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,28,1,28,1,28,1,28, - 1,28,1,28,4,28,410,8,28,11,28,12,28,411,1,28,1,28,1,28,1,28,1,28,1,28,3, - 28,420,8,28,1,29,1,29,1,29,1,29,1,30,1,30,1,30,1,30,1,31,1,31,1,31,1,31, - 1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,35,1,35,1, - 35,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37, - 1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1, - 40,1,40,1,40,1,40,1,40,1,41,1,41,1,41,1,41,1,41,1,42,1,42,1,42,1,43,1,43, - 1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,5,44,500,8,44,10,44,12,44,503,9, - 44,1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,45,5,45,513,8,45,10,45,12,45,516, - 9,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46,5,46,527,8,46,10,46,12, - 46,530,9,46,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,5,47, - 543,8,47,10,47,12,47,546,9,47,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1, - 48,1,48,1,48,3,48,559,8,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,1,49, - 1,49,3,49,571,8,49,1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,51,1,51,1,52,1, - 52,1,53,1,53,1,54,1,54,1,55,1,55,1,56,1,56,1,57,1,57,1,57,1,57,1,58,1,58, - 1,58,1,58,1,59,1,59,1,60,1,60,1,61,1,61,1,61,1,62,1,62,1,62,1,63,4,63,611, - 8,63,11,63,12,63,612,1,63,1,63,5,63,617,8,63,10,63,12,63,620,9,63,1,63, - 3,63,623,8,63,1,63,1,63,4,63,627,8,63,11,63,12,63,628,1,63,3,63,632,8,63, - 1,63,4,63,635,8,63,11,63,12,63,636,1,63,3,63,640,8,63,3,63,642,8,63,1,64, - 1,64,1,65,1,65,5,65,648,8,65,10,65,12,65,651,9,65,1,66,1,66,3,66,655,8, - 66,1,66,4,66,658,8,66,11,66,12,66,659,1,66,5,66,663,8,66,10,66,12,66,666, - 9,66,1,66,1,66,3,66,670,8,66,1,66,5,66,673,8,66,10,66,12,66,676,9,66,1, - 66,1,66,1,66,1,66,1,66,1,66,1,66,3,66,685,8,66,1,66,4,66,688,8,66,11,66, - 12,66,689,1,66,1,66,3,66,694,8,66,3,66,696,8,66,1,67,1,67,1,67,1,67,1,67, - 1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1, - 67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67, - 1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1, - 67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67, - 1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1, - 67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67, - 1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1, - 67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67, - 1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1,67,1, - 67,1,67,1,67,1,67,1,67,3,67,838,8,67,1,68,1,68,1,68,1,68,1,68,1,68,1,68, - 1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,69,1,69,1,69,1,69,1,69,1, - 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,70,1,70,1,71,1,71,1,71,1,72, - 5,72,876,8,72,10,72,12,72,879,9,72,1,72,1,72,1,72,1,72,4,72,885,8,72,11, - 72,12,72,886,1,72,1,72,5,72,891,8,72,10,72,12,72,894,9,72,1,72,1,72,3,72, - 898,8,72,1,73,1,73,1,73,1,73,1,74,1,74,3,74,906,8,74,1,74,3,74,909,8,74, - 1,75,4,75,912,8,75,11,75,12,75,913,1,75,1,75,1,76,1,76,1,76,1,76,1,76,1, - 77,1,77,1,77,1,77,1,77,1,78,1,78,1,78,1,78,1,79,1,79,1,80,1,80,1,80,1,80, - 1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,81,1,82,1,82,1,82,1,82,1, - 82,1,82,1,83,1,83,1,83,1,83,1,83,1,83,1,83,5,83,961,8,83,10,83,12,83,964, - 9,83,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85,1, - 85,1,85,1,85,1,86,1,86,1,86,1,86,1,86,1,86,1,87,1,87,1,88,1,88,1,89,1,89, - 5,89,994,8,89,10,89,12,89,997,9,89,1,90,1,90,1,91,1,91,1,92,1,92,1,93,1, - 93,1,94,1,94,1,95,3,95,1010,8,95,1,95,4,95,1013,8,95,11,95,12,95,1014,1, - 95,1,95,5,95,1019,8,95,10,95,12,95,1022,9,95,1,95,3,95,1025,8,95,1,95,1, - 95,4,95,1029,8,95,11,95,12,95,1030,1,95,3,95,1034,8,95,1,95,4,95,1037,8, - 95,11,95,12,95,1038,3,95,1041,8,95,1,96,1,96,1,97,1,97,1,97,1,97,1,97,1, - 97,1,97,1,97,1,98,1,98,1,98,1,98,1,98,1,98,1,98,1,98,1,98,1,99,4,99,1063, - 8,99,11,99,12,99,1064,1,99,1,99,1,100,1,100,1,100,1,100,1,100,1,101,1,101, - 1,101,1,101,1,101,1,102,1,102,1,102,1,102,1,103,1,103,1,544,0,104,2,1,4, - 2,6,3,8,4,10,5,12,6,14,7,16,8,18,9,20,10,22,11,24,12,26,13,28,14,30,15, - 32,16,34,17,36,18,38,19,40,20,42,21,44,22,46,23,48,24,50,25,52,26,54,27, - 56,28,58,29,60,30,62,31,64,32,66,33,68,34,70,35,72,36,74,37,76,38,78,39, - 80,40,82,41,84,42,86,43,88,44,90,45,92,46,94,47,96,48,98,49,100,50,102, - 51,104,52,106,53,108,54,110,55,112,56,114,57,116,58,118,59,120,60,122,61, - 124,62,126,63,128,64,130,0,132,0,134,0,136,0,138,65,140,66,142,67,144,68, - 146,69,148,70,150,71,152,72,154,73,156,74,158,75,160,76,162,77,164,78,166, - 79,168,80,170,81,172,82,174,83,176,84,178,85,180,86,182,87,184,88,186,89, - 188,90,190,91,192,92,194,0,196,93,198,94,200,95,202,96,204,97,206,98,208, - 99,2,0,1,8,1,0,32,32,1,0,48,57,2,0,65,90,97,122,1,0,115,115,3,0,48,57,65, - 90,97,122,2,0,69,69,101,101,2,0,43,43,45,45,3,0,9,10,13,13,32,32,1162,0, - 2,1,0,0,0,0,4,1,0,0,0,0,6,1,0,0,0,0,8,1,0,0,0,0,10,1,0,0,0,0,12,1,0,0,0, - 0,14,1,0,0,0,0,16,1,0,0,0,0,18,1,0,0,0,0,20,1,0,0,0,0,22,1,0,0,0,0,24,1, - 0,0,0,0,26,1,0,0,0,0,28,1,0,0,0,0,30,1,0,0,0,0,32,1,0,0,0,0,34,1,0,0,0, - 0,36,1,0,0,0,0,38,1,0,0,0,0,40,1,0,0,0,0,42,1,0,0,0,0,44,1,0,0,0,0,46,1, - 0,0,0,0,48,1,0,0,0,0,50,1,0,0,0,0,52,1,0,0,0,0,54,1,0,0,0,0,56,1,0,0,0, - 0,58,1,0,0,0,0,60,1,0,0,0,0,62,1,0,0,0,0,64,1,0,0,0,0,66,1,0,0,0,0,68,1, - 0,0,0,0,70,1,0,0,0,0,72,1,0,0,0,0,74,1,0,0,0,0,76,1,0,0,0,0,78,1,0,0,0, - 0,80,1,0,0,0,0,82,1,0,0,0,0,84,1,0,0,0,0,86,1,0,0,0,0,88,1,0,0,0,0,90,1, - 0,0,0,0,92,1,0,0,0,0,94,1,0,0,0,0,96,1,0,0,0,0,98,1,0,0,0,0,100,1,0,0,0, - 0,102,1,0,0,0,0,104,1,0,0,0,0,106,1,0,0,0,0,108,1,0,0,0,0,110,1,0,0,0,0, - 112,1,0,0,0,0,114,1,0,0,0,0,116,1,0,0,0,0,118,1,0,0,0,0,120,1,0,0,0,0,122, - 1,0,0,0,0,124,1,0,0,0,0,126,1,0,0,0,0,128,1,0,0,0,0,138,1,0,0,0,0,140,1, - 0,0,0,0,142,1,0,0,0,0,144,1,0,0,0,0,146,1,0,0,0,0,148,1,0,0,0,0,150,1,0, - 0,0,0,152,1,0,0,0,0,154,1,0,0,0,0,156,1,0,0,0,0,158,1,0,0,0,0,160,1,0,0, - 0,1,162,1,0,0,0,1,164,1,0,0,0,1,166,1,0,0,0,1,168,1,0,0,0,1,170,1,0,0,0, - 1,172,1,0,0,0,1,174,1,0,0,0,1,176,1,0,0,0,1,178,1,0,0,0,1,180,1,0,0,0,1, - 182,1,0,0,0,1,184,1,0,0,0,1,186,1,0,0,0,1,188,1,0,0,0,1,190,1,0,0,0,1,192, - 1,0,0,0,1,196,1,0,0,0,1,198,1,0,0,0,1,200,1,0,0,0,1,202,1,0,0,0,1,204,1, - 0,0,0,1,206,1,0,0,0,1,208,1,0,0,0,2,210,1,0,0,0,4,214,1,0,0,0,6,224,1,0, - 0,0,8,226,1,0,0,0,10,228,1,0,0,0,12,230,1,0,0,0,14,232,1,0,0,0,16,234,1, - 0,0,0,18,243,1,0,0,0,20,245,1,0,0,0,22,247,1,0,0,0,24,249,1,0,0,0,26,253, - 1,0,0,0,28,258,1,0,0,0,30,271,1,0,0,0,32,285,1,0,0,0,34,299,1,0,0,0,36, - 307,1,0,0,0,38,313,1,0,0,0,40,328,1,0,0,0,42,334,1,0,0,0,44,341,1,0,0,0, - 46,347,1,0,0,0,48,361,1,0,0,0,50,366,1,0,0,0,52,374,1,0,0,0,54,387,1,0, - 0,0,56,401,1,0,0,0,58,403,1,0,0,0,60,421,1,0,0,0,62,425,1,0,0,0,64,429, - 1,0,0,0,66,433,1,0,0,0,68,437,1,0,0,0,70,441,1,0,0,0,72,445,1,0,0,0,74, - 452,1,0,0,0,76,459,1,0,0,0,78,466,1,0,0,0,80,471,1,0,0,0,82,476,1,0,0,0, - 84,481,1,0,0,0,86,486,1,0,0,0,88,489,1,0,0,0,90,493,1,0,0,0,92,506,1,0, - 0,0,94,520,1,0,0,0,96,534,1,0,0,0,98,551,1,0,0,0,100,562,1,0,0,0,102,574, - 1,0,0,0,104,579,1,0,0,0,106,581,1,0,0,0,108,583,1,0,0,0,110,585,1,0,0,0, - 112,587,1,0,0,0,114,589,1,0,0,0,116,591,1,0,0,0,118,595,1,0,0,0,120,599, - 1,0,0,0,122,601,1,0,0,0,124,603,1,0,0,0,126,606,1,0,0,0,128,641,1,0,0,0, - 130,643,1,0,0,0,132,645,1,0,0,0,134,695,1,0,0,0,136,697,1,0,0,0,138,839, - 1,0,0,0,140,855,1,0,0,0,142,869,1,0,0,0,144,871,1,0,0,0,146,897,1,0,0,0, - 148,899,1,0,0,0,150,905,1,0,0,0,152,911,1,0,0,0,154,917,1,0,0,0,156,922, - 1,0,0,0,158,927,1,0,0,0,160,931,1,0,0,0,162,933,1,0,0,0,164,937,1,0,0,0, - 166,947,1,0,0,0,168,953,1,0,0,0,170,968,1,0,0,0,172,974,1,0,0,0,174,981, - 1,0,0,0,176,987,1,0,0,0,178,989,1,0,0,0,180,991,1,0,0,0,182,998,1,0,0,0, - 184,1000,1,0,0,0,186,1002,1,0,0,0,188,1004,1,0,0,0,190,1006,1,0,0,0,192, - 1040,1,0,0,0,194,1042,1,0,0,0,196,1044,1,0,0,0,198,1052,1,0,0,0,200,1062, - 1,0,0,0,202,1068,1,0,0,0,204,1073,1,0,0,0,206,1078,1,0,0,0,208,1082,1,0, - 0,0,210,211,5,91,0,0,211,212,1,0,0,0,212,213,6,0,0,0,213,3,1,0,0,0,214, - 215,5,92,0,0,215,216,5,108,0,0,216,217,5,98,0,0,217,218,5,114,0,0,218,219, - 5,97,0,0,219,220,5,99,0,0,220,221,5,107,0,0,221,222,1,0,0,0,222,223,6,1, - 0,0,223,5,1,0,0,0,224,225,5,59,0,0,225,7,1,0,0,0,226,227,5,123,0,0,227, - 9,1,0,0,0,228,229,5,125,0,0,229,11,1,0,0,0,230,231,5,40,0,0,231,13,1,0, - 0,0,232,233,5,41,0,0,233,15,1,0,0,0,234,235,5,124,0,0,235,17,1,0,0,0,236, - 237,5,124,0,0,237,244,5,124,0,0,238,239,5,92,0,0,239,240,5,86,0,0,240,241, - 5,101,0,0,241,242,5,114,0,0,242,244,5,116,0,0,243,236,1,0,0,0,243,238,1, - 0,0,0,244,19,1,0,0,0,245,246,5,95,0,0,246,21,1,0,0,0,247,248,5,33,0,0,248, - 23,1,0,0,0,249,250,5,92,0,0,250,251,5,112,0,0,251,252,5,105,0,0,252,25, - 1,0,0,0,253,254,5,92,0,0,254,255,5,105,0,0,255,256,5,110,0,0,256,257,5, - 116,0,0,257,27,1,0,0,0,258,259,5,92,0,0,259,260,5,105,0,0,260,261,5,110, - 0,0,261,262,5,116,0,0,262,266,1,0,0,0,263,265,7,0,0,0,264,263,1,0,0,0,265, - 268,1,0,0,0,266,264,1,0,0,0,266,267,1,0,0,0,267,269,1,0,0,0,268,266,1,0, - 0,0,269,270,5,95,0,0,270,29,1,0,0,0,271,272,5,92,0,0,272,273,5,105,0,0, - 273,274,5,110,0,0,274,275,5,116,0,0,275,279,1,0,0,0,276,278,7,0,0,0,277, - 276,1,0,0,0,278,281,1,0,0,0,279,277,1,0,0,0,279,280,1,0,0,0,280,282,1,0, - 0,0,281,279,1,0,0,0,282,283,5,95,0,0,283,284,7,1,0,0,284,31,1,0,0,0,285, - 286,5,92,0,0,286,287,5,105,0,0,287,288,5,110,0,0,288,289,5,116,0,0,289, - 293,1,0,0,0,290,292,7,0,0,0,291,290,1,0,0,0,292,295,1,0,0,0,293,291,1,0, - 0,0,293,294,1,0,0,0,294,296,1,0,0,0,295,293,1,0,0,0,296,297,5,95,0,0,297, - 298,7,2,0,0,298,33,1,0,0,0,299,300,5,92,0,0,300,301,5,109,0,0,301,302,5, - 97,0,0,302,303,5,116,0,0,303,304,5,104,0,0,304,305,5,114,0,0,305,306,5, - 109,0,0,306,35,1,0,0,0,307,308,5,92,0,0,308,309,5,102,0,0,309,310,5,114, - 0,0,310,311,5,97,0,0,311,312,5,99,0,0,312,37,1,0,0,0,313,314,5,92,0,0,314, - 315,5,102,0,0,315,316,5,114,0,0,316,317,5,97,0,0,317,318,5,99,0,0,318,322, - 1,0,0,0,319,321,7,0,0,0,320,319,1,0,0,0,321,324,1,0,0,0,322,320,1,0,0,0, - 322,323,1,0,0,0,323,325,1,0,0,0,324,322,1,0,0,0,325,326,7,1,0,0,326,327, - 7,1,0,0,327,39,1,0,0,0,328,329,5,92,0,0,329,330,5,99,0,0,330,331,5,100, - 0,0,331,332,5,111,0,0,332,333,5,116,0,0,333,41,1,0,0,0,334,335,5,92,0,0, - 335,336,5,116,0,0,336,337,5,105,0,0,337,338,5,109,0,0,338,339,5,101,0,0, - 339,340,5,115,0,0,340,43,1,0,0,0,341,342,5,92,0,0,342,343,5,115,0,0,343, - 344,5,113,0,0,344,345,5,114,0,0,345,346,5,116,0,0,346,45,1,0,0,0,347,348, - 5,92,0,0,348,349,5,115,0,0,349,350,5,113,0,0,350,351,5,114,0,0,351,352, - 5,116,0,0,352,356,1,0,0,0,353,355,7,0,0,0,354,353,1,0,0,0,355,358,1,0,0, - 0,356,354,1,0,0,0,356,357,1,0,0,0,357,359,1,0,0,0,358,356,1,0,0,0,359,360, - 7,1,0,0,360,47,1,0,0,0,361,362,5,92,0,0,362,363,5,115,0,0,363,364,5,105, - 0,0,364,365,5,109,0,0,365,49,1,0,0,0,366,367,5,92,0,0,367,368,5,97,0,0, - 368,369,5,112,0,0,369,370,5,112,0,0,370,371,5,114,0,0,371,372,5,111,0,0, - 372,373,5,120,0,0,373,51,1,0,0,0,374,375,5,92,0,0,375,376,5,112,0,0,376, - 377,5,108,0,0,377,378,5,97,0,0,378,379,5,99,0,0,379,380,5,101,0,0,380,381, - 5,104,0,0,381,382,5,111,0,0,382,383,5,108,0,0,383,384,5,100,0,0,384,385, - 5,101,0,0,385,386,5,114,0,0,386,53,1,0,0,0,387,388,5,94,0,0,388,389,5,123, - 0,0,389,390,5,92,0,0,390,391,5,109,0,0,391,392,5,97,0,0,392,393,5,116,0, - 0,393,394,5,104,0,0,394,395,5,114,0,0,395,396,5,109,0,0,396,397,5,123,0, - 0,397,398,5,84,0,0,398,399,5,125,0,0,399,400,5,125,0,0,400,55,1,0,0,0,401, - 402,5,92,0,0,402,57,1,0,0,0,403,404,5,97,0,0,404,405,5,115,0,0,405,409, - 1,0,0,0,406,410,5,32,0,0,407,408,5,92,0,0,408,410,5,58,0,0,409,406,1,0, - 0,0,409,407,1,0,0,0,410,411,1,0,0,0,411,409,1,0,0,0,411,412,1,0,0,0,412, - 413,1,0,0,0,413,414,5,108,0,0,414,415,5,105,0,0,415,416,5,110,0,0,416,417, - 5,101,0,0,417,419,1,0,0,0,418,420,7,3,0,0,419,418,1,0,0,0,419,420,1,0,0, - 0,420,59,1,0,0,0,421,422,5,115,0,0,422,423,5,105,0,0,423,424,5,110,0,0, - 424,61,1,0,0,0,425,426,5,99,0,0,426,427,5,111,0,0,427,428,5,115,0,0,428, - 63,1,0,0,0,429,430,5,116,0,0,430,431,5,97,0,0,431,432,5,110,0,0,432,65, - 1,0,0,0,433,434,5,99,0,0,434,435,5,111,0,0,435,436,5,116,0,0,436,67,1,0, - 0,0,437,438,5,115,0,0,438,439,5,101,0,0,439,440,5,99,0,0,440,69,1,0,0,0, - 441,442,5,99,0,0,442,443,5,115,0,0,443,444,5,99,0,0,444,71,1,0,0,0,445, - 446,5,97,0,0,446,447,5,114,0,0,447,448,5,99,0,0,448,449,5,115,0,0,449,450, - 5,105,0,0,450,451,5,110,0,0,451,73,1,0,0,0,452,453,5,97,0,0,453,454,5,114, - 0,0,454,455,5,99,0,0,455,456,5,99,0,0,456,457,5,111,0,0,457,458,5,115,0, - 0,458,75,1,0,0,0,459,460,5,97,0,0,460,461,5,114,0,0,461,462,5,99,0,0,462, - 463,5,116,0,0,463,464,5,97,0,0,464,465,5,110,0,0,465,77,1,0,0,0,466,467, - 5,115,0,0,467,468,5,105,0,0,468,469,5,110,0,0,469,470,5,104,0,0,470,79, - 1,0,0,0,471,472,5,99,0,0,472,473,5,111,0,0,473,474,5,115,0,0,474,475,5, - 104,0,0,475,81,1,0,0,0,476,477,5,116,0,0,477,478,5,97,0,0,478,479,5,110, - 0,0,479,480,5,104,0,0,480,83,1,0,0,0,481,482,5,99,0,0,482,483,5,111,0,0, - 483,484,5,116,0,0,484,485,5,104,0,0,485,85,1,0,0,0,486,487,5,108,0,0,487, - 488,5,110,0,0,488,87,1,0,0,0,489,490,5,108,0,0,490,491,5,111,0,0,491,492, - 5,103,0,0,492,89,1,0,0,0,493,494,5,92,0,0,494,495,5,108,0,0,495,496,5,111, - 0,0,496,497,5,103,0,0,497,501,1,0,0,0,498,500,7,0,0,0,499,498,1,0,0,0,500, - 503,1,0,0,0,501,499,1,0,0,0,501,502,1,0,0,0,502,504,1,0,0,0,503,501,1,0, - 0,0,504,505,5,95,0,0,505,91,1,0,0,0,506,507,5,92,0,0,507,508,5,108,0,0, - 508,509,5,111,0,0,509,510,5,103,0,0,510,514,1,0,0,0,511,513,7,0,0,0,512, - 511,1,0,0,0,513,516,1,0,0,0,514,512,1,0,0,0,514,515,1,0,0,0,515,517,1,0, - 0,0,516,514,1,0,0,0,517,518,5,95,0,0,518,519,7,1,0,0,519,93,1,0,0,0,520, - 521,5,92,0,0,521,522,5,108,0,0,522,523,5,111,0,0,523,524,5,103,0,0,524, - 528,1,0,0,0,525,527,7,0,0,0,526,525,1,0,0,0,527,530,1,0,0,0,528,526,1,0, - 0,0,528,529,1,0,0,0,529,531,1,0,0,0,530,528,1,0,0,0,531,532,5,95,0,0,532, - 533,7,2,0,0,533,95,1,0,0,0,534,535,5,92,0,0,535,536,5,116,0,0,536,537,5, - 101,0,0,537,538,5,120,0,0,538,539,5,116,0,0,539,540,5,123,0,0,540,544,1, - 0,0,0,541,543,9,0,0,0,542,541,1,0,0,0,543,546,1,0,0,0,544,545,1,0,0,0,544, - 542,1,0,0,0,545,547,1,0,0,0,546,544,1,0,0,0,547,548,5,125,0,0,548,549,1, - 0,0,0,549,550,6,47,1,0,550,97,1,0,0,0,551,552,5,92,0,0,552,553,5,108,0, - 0,553,554,5,101,0,0,554,555,5,102,0,0,555,556,5,116,0,0,556,558,1,0,0,0, - 557,559,5,46,0,0,558,557,1,0,0,0,558,559,1,0,0,0,559,560,1,0,0,0,560,561, - 6,48,1,0,561,99,1,0,0,0,562,563,5,92,0,0,563,564,5,114,0,0,564,565,5,105, - 0,0,565,566,5,103,0,0,566,567,5,104,0,0,567,568,5,116,0,0,568,570,1,0,0, - 0,569,571,5,46,0,0,570,569,1,0,0,0,570,571,1,0,0,0,571,572,1,0,0,0,572, - 573,6,49,1,0,573,101,1,0,0,0,574,575,5,36,0,0,575,576,5,36,0,0,576,577, - 1,0,0,0,577,578,6,50,1,0,578,103,1,0,0,0,579,580,5,43,0,0,580,105,1,0,0, - 0,581,582,5,45,0,0,582,107,1,0,0,0,583,584,5,94,0,0,584,109,1,0,0,0,585, - 586,5,61,0,0,586,111,1,0,0,0,587,588,5,60,0,0,588,113,1,0,0,0,589,590,5, - 62,0,0,590,115,1,0,0,0,591,592,5,92,0,0,592,593,5,108,0,0,593,594,5,101, - 0,0,594,117,1,0,0,0,595,596,5,92,0,0,596,597,5,103,0,0,597,598,5,101,0, - 0,598,119,1,0,0,0,599,600,5,44,0,0,600,121,1,0,0,0,601,602,5,46,0,0,602, - 123,1,0,0,0,603,604,5,94,0,0,604,605,7,1,0,0,605,125,1,0,0,0,606,607,5, - 94,0,0,607,608,7,2,0,0,608,127,1,0,0,0,609,611,3,130,64,0,610,609,1,0,0, - 0,611,612,1,0,0,0,612,610,1,0,0,0,612,613,1,0,0,0,613,614,1,0,0,0,614,618, - 5,46,0,0,615,617,3,130,64,0,616,615,1,0,0,0,617,620,1,0,0,0,618,616,1,0, - 0,0,618,619,1,0,0,0,619,622,1,0,0,0,620,618,1,0,0,0,621,623,3,134,66,0, - 622,621,1,0,0,0,622,623,1,0,0,0,623,642,1,0,0,0,624,626,5,46,0,0,625,627, - 3,130,64,0,626,625,1,0,0,0,627,628,1,0,0,0,628,626,1,0,0,0,628,629,1,0, - 0,0,629,631,1,0,0,0,630,632,3,134,66,0,631,630,1,0,0,0,631,632,1,0,0,0, - 632,642,1,0,0,0,633,635,3,130,64,0,634,633,1,0,0,0,635,636,1,0,0,0,636, - 634,1,0,0,0,636,637,1,0,0,0,637,639,1,0,0,0,638,640,3,134,66,0,639,638, - 1,0,0,0,639,640,1,0,0,0,640,642,1,0,0,0,641,610,1,0,0,0,641,624,1,0,0,0, - 641,634,1,0,0,0,642,129,1,0,0,0,643,644,7,1,0,0,644,131,1,0,0,0,645,649, - 7,2,0,0,646,648,7,4,0,0,647,646,1,0,0,0,648,651,1,0,0,0,649,647,1,0,0,0, - 649,650,1,0,0,0,650,133,1,0,0,0,651,649,1,0,0,0,652,654,7,5,0,0,653,655, - 7,6,0,0,654,653,1,0,0,0,654,655,1,0,0,0,655,657,1,0,0,0,656,658,3,130,64, - 0,657,656,1,0,0,0,658,659,1,0,0,0,659,657,1,0,0,0,659,660,1,0,0,0,660,696, - 1,0,0,0,661,663,5,32,0,0,662,661,1,0,0,0,663,666,1,0,0,0,664,662,1,0,0, - 0,664,665,1,0,0,0,665,669,1,0,0,0,666,664,1,0,0,0,667,670,3,40,19,0,668, - 670,3,42,20,0,669,667,1,0,0,0,669,668,1,0,0,0,670,674,1,0,0,0,671,673,5, - 32,0,0,672,671,1,0,0,0,673,676,1,0,0,0,674,672,1,0,0,0,674,675,1,0,0,0, - 675,677,1,0,0,0,676,674,1,0,0,0,677,678,5,49,0,0,678,679,5,48,0,0,679,680, - 1,0,0,0,680,693,3,108,53,0,681,694,3,130,64,0,682,684,3,8,3,0,683,685,7, - 6,0,0,684,683,1,0,0,0,684,685,1,0,0,0,685,687,1,0,0,0,686,688,3,130,64, - 0,687,686,1,0,0,0,688,689,1,0,0,0,689,687,1,0,0,0,689,690,1,0,0,0,690,691, - 1,0,0,0,691,692,3,10,4,0,692,694,1,0,0,0,693,681,1,0,0,0,693,682,1,0,0, - 0,694,696,1,0,0,0,695,652,1,0,0,0,695,664,1,0,0,0,696,135,1,0,0,0,697,837, - 5,92,0,0,698,699,5,97,0,0,699,700,5,108,0,0,700,701,5,112,0,0,701,702,5, - 104,0,0,702,838,5,97,0,0,703,704,5,98,0,0,704,705,5,101,0,0,705,706,5,116, - 0,0,706,838,5,97,0,0,707,708,5,103,0,0,708,709,5,97,0,0,709,710,5,109,0, - 0,710,711,5,109,0,0,711,838,5,97,0,0,712,713,5,100,0,0,713,714,5,101,0, - 0,714,715,5,108,0,0,715,716,5,116,0,0,716,838,5,97,0,0,717,718,5,101,0, - 0,718,719,5,112,0,0,719,720,5,115,0,0,720,721,5,105,0,0,721,722,5,108,0, - 0,722,723,5,111,0,0,723,838,5,110,0,0,724,725,5,122,0,0,725,726,5,101,0, - 0,726,727,5,116,0,0,727,838,5,97,0,0,728,729,5,101,0,0,729,730,5,116,0, - 0,730,838,5,97,0,0,731,732,5,116,0,0,732,733,5,104,0,0,733,734,5,101,0, - 0,734,735,5,116,0,0,735,838,5,97,0,0,736,737,5,105,0,0,737,738,5,111,0, - 0,738,739,5,116,0,0,739,838,5,97,0,0,740,741,5,107,0,0,741,742,5,97,0,0, - 742,743,5,112,0,0,743,744,5,112,0,0,744,838,5,97,0,0,745,746,5,108,0,0, - 746,747,5,97,0,0,747,748,5,109,0,0,748,749,5,98,0,0,749,750,5,100,0,0,750, - 838,5,97,0,0,751,752,5,109,0,0,752,838,5,117,0,0,753,754,5,110,0,0,754, - 838,5,117,0,0,755,756,5,120,0,0,756,838,5,105,0,0,757,758,5,114,0,0,758, - 759,5,104,0,0,759,838,5,111,0,0,760,761,5,115,0,0,761,762,5,105,0,0,762, - 763,5,103,0,0,763,764,5,109,0,0,764,838,5,97,0,0,765,766,5,116,0,0,766, - 767,5,97,0,0,767,838,5,117,0,0,768,769,5,117,0,0,769,770,5,112,0,0,770, - 771,5,115,0,0,771,772,5,105,0,0,772,773,5,108,0,0,773,774,5,111,0,0,774, - 838,5,110,0,0,775,776,5,112,0,0,776,777,5,104,0,0,777,838,5,105,0,0,778, - 779,5,99,0,0,779,780,5,104,0,0,780,838,5,105,0,0,781,782,5,112,0,0,782, - 783,5,115,0,0,783,838,5,105,0,0,784,785,5,111,0,0,785,786,5,109,0,0,786, - 787,5,101,0,0,787,788,5,103,0,0,788,838,5,97,0,0,789,790,5,71,0,0,790,791, - 5,97,0,0,791,792,5,109,0,0,792,793,5,109,0,0,793,838,5,97,0,0,794,795,5, - 68,0,0,795,796,5,101,0,0,796,797,5,108,0,0,797,798,5,116,0,0,798,838,5, - 97,0,0,799,800,5,84,0,0,800,801,5,104,0,0,801,802,5,101,0,0,802,803,5,116, - 0,0,803,838,5,97,0,0,804,805,5,76,0,0,805,806,5,97,0,0,806,807,5,109,0, - 0,807,808,5,98,0,0,808,809,5,100,0,0,809,838,5,97,0,0,810,811,5,88,0,0, - 811,838,5,105,0,0,812,813,5,80,0,0,813,838,5,105,0,0,814,815,5,83,0,0,815, - 816,5,105,0,0,816,817,5,103,0,0,817,818,5,109,0,0,818,838,5,97,0,0,819, - 820,5,85,0,0,820,821,5,112,0,0,821,822,5,115,0,0,822,823,5,105,0,0,823, - 824,5,108,0,0,824,825,5,111,0,0,825,838,5,110,0,0,826,827,5,80,0,0,827, - 828,5,104,0,0,828,838,5,105,0,0,829,830,5,80,0,0,830,831,5,115,0,0,831, - 838,5,105,0,0,832,833,5,79,0,0,833,834,5,109,0,0,834,835,5,101,0,0,835, - 836,5,103,0,0,836,838,5,97,0,0,837,698,1,0,0,0,837,703,1,0,0,0,837,707, - 1,0,0,0,837,712,1,0,0,0,837,717,1,0,0,0,837,724,1,0,0,0,837,728,1,0,0,0, - 837,731,1,0,0,0,837,736,1,0,0,0,837,740,1,0,0,0,837,745,1,0,0,0,837,751, - 1,0,0,0,837,753,1,0,0,0,837,755,1,0,0,0,837,757,1,0,0,0,837,760,1,0,0,0, - 837,765,1,0,0,0,837,768,1,0,0,0,837,775,1,0,0,0,837,778,1,0,0,0,837,781, - 1,0,0,0,837,784,1,0,0,0,837,789,1,0,0,0,837,794,1,0,0,0,837,799,1,0,0,0, - 837,804,1,0,0,0,837,810,1,0,0,0,837,812,1,0,0,0,837,814,1,0,0,0,837,819, - 1,0,0,0,837,826,1,0,0,0,837,829,1,0,0,0,837,832,1,0,0,0,838,137,1,0,0,0, - 839,840,5,92,0,0,840,841,5,98,0,0,841,842,5,101,0,0,842,843,5,103,0,0,843, - 844,5,105,0,0,844,845,5,110,0,0,845,846,5,123,0,0,846,847,5,98,0,0,847, - 848,5,109,0,0,848,849,5,97,0,0,849,850,5,116,0,0,850,851,5,114,0,0,851, - 852,5,105,0,0,852,853,5,120,0,0,853,854,5,125,0,0,854,139,1,0,0,0,855,856, - 5,92,0,0,856,857,5,101,0,0,857,858,5,110,0,0,858,859,5,100,0,0,859,860, - 5,123,0,0,860,861,5,98,0,0,861,862,5,109,0,0,862,863,5,97,0,0,863,864,5, - 116,0,0,864,865,5,114,0,0,865,866,5,105,0,0,866,867,5,120,0,0,867,868,5, - 125,0,0,868,141,1,0,0,0,869,870,5,38,0,0,870,143,1,0,0,0,871,872,5,92,0, - 0,872,873,5,92,0,0,873,145,1,0,0,0,874,876,7,0,0,0,875,874,1,0,0,0,876, - 879,1,0,0,0,877,875,1,0,0,0,877,878,1,0,0,0,878,880,1,0,0,0,879,877,1,0, - 0,0,880,881,5,95,0,0,881,882,5,123,0,0,882,884,1,0,0,0,883,885,7,4,0,0, - 884,883,1,0,0,0,885,886,1,0,0,0,886,884,1,0,0,0,886,887,1,0,0,0,887,888, - 1,0,0,0,888,898,5,125,0,0,889,891,7,0,0,0,890,889,1,0,0,0,891,894,1,0,0, - 0,892,890,1,0,0,0,892,893,1,0,0,0,893,895,1,0,0,0,894,892,1,0,0,0,895,896, - 5,95,0,0,896,898,7,4,0,0,897,877,1,0,0,0,897,892,1,0,0,0,898,147,1,0,0, - 0,899,900,5,94,0,0,900,901,7,2,0,0,901,902,3,146,72,0,902,149,1,0,0,0,903, - 906,3,132,65,0,904,906,3,136,67,0,905,903,1,0,0,0,905,904,1,0,0,0,906,908, - 1,0,0,0,907,909,3,146,72,0,908,907,1,0,0,0,908,909,1,0,0,0,909,151,1,0, - 0,0,910,912,7,7,0,0,911,910,1,0,0,0,912,913,1,0,0,0,913,911,1,0,0,0,913, - 914,1,0,0,0,914,915,1,0,0,0,915,916,6,75,1,0,916,153,1,0,0,0,917,918,5, - 92,0,0,918,919,5,32,0,0,919,920,1,0,0,0,920,921,6,76,1,0,921,155,1,0,0, - 0,922,923,5,92,0,0,923,924,5,58,0,0,924,925,1,0,0,0,925,926,6,77,1,0,926, - 157,1,0,0,0,927,928,5,160,0,0,928,929,1,0,0,0,929,930,6,78,1,0,930,159, - 1,0,0,0,931,932,9,0,0,0,932,161,1,0,0,0,933,934,5,93,0,0,934,935,1,0,0, - 0,935,936,6,80,2,0,936,163,1,0,0,0,937,938,5,92,0,0,938,939,5,114,0,0,939, - 940,5,98,0,0,940,941,5,114,0,0,941,942,5,97,0,0,942,943,5,99,0,0,943,944, - 5,107,0,0,944,945,1,0,0,0,945,946,6,81,2,0,946,165,1,0,0,0,947,948,5,92, - 0,0,948,949,5,102,0,0,949,950,5,114,0,0,950,951,5,97,0,0,951,952,5,99,0, - 0,952,167,1,0,0,0,953,954,5,92,0,0,954,955,5,102,0,0,955,956,5,114,0,0, - 956,957,5,97,0,0,957,958,5,99,0,0,958,962,1,0,0,0,959,961,7,0,0,0,960,959, - 1,0,0,0,961,964,1,0,0,0,962,960,1,0,0,0,962,963,1,0,0,0,963,965,1,0,0,0, - 964,962,1,0,0,0,965,966,7,1,0,0,966,967,7,1,0,0,967,169,1,0,0,0,968,969, - 5,92,0,0,969,970,5,99,0,0,970,971,5,100,0,0,971,972,5,111,0,0,972,973,5, - 116,0,0,973,171,1,0,0,0,974,975,5,92,0,0,975,976,5,116,0,0,976,977,5,105, - 0,0,977,978,5,109,0,0,978,979,5,101,0,0,979,980,5,115,0,0,980,173,1,0,0, - 0,981,982,5,92,0,0,982,983,5,115,0,0,983,984,5,113,0,0,984,985,5,114,0, - 0,985,986,5,116,0,0,986,175,1,0,0,0,987,988,5,44,0,0,988,177,1,0,0,0,989, - 990,5,94,0,0,990,179,1,0,0,0,991,995,7,2,0,0,992,994,7,4,0,0,993,992,1, - 0,0,0,994,997,1,0,0,0,995,993,1,0,0,0,995,996,1,0,0,0,996,181,1,0,0,0,997, - 995,1,0,0,0,998,999,5,40,0,0,999,183,1,0,0,0,1000,1001,5,41,0,0,1001,185, - 1,0,0,0,1002,1003,5,123,0,0,1003,187,1,0,0,0,1004,1005,5,125,0,0,1005,189, - 1,0,0,0,1006,1007,5,49,0,0,1007,191,1,0,0,0,1008,1010,5,45,0,0,1009,1008, - 1,0,0,0,1009,1010,1,0,0,0,1010,1012,1,0,0,0,1011,1013,3,194,96,0,1012,1011, - 1,0,0,0,1013,1014,1,0,0,0,1014,1012,1,0,0,0,1014,1015,1,0,0,0,1015,1016, - 1,0,0,0,1016,1020,5,46,0,0,1017,1019,3,194,96,0,1018,1017,1,0,0,0,1019, - 1022,1,0,0,0,1020,1018,1,0,0,0,1020,1021,1,0,0,0,1021,1041,1,0,0,0,1022, - 1020,1,0,0,0,1023,1025,5,45,0,0,1024,1023,1,0,0,0,1024,1025,1,0,0,0,1025, - 1026,1,0,0,0,1026,1028,5,46,0,0,1027,1029,3,194,96,0,1028,1027,1,0,0,0, - 1029,1030,1,0,0,0,1030,1028,1,0,0,0,1030,1031,1,0,0,0,1031,1041,1,0,0,0, - 1032,1034,5,45,0,0,1033,1032,1,0,0,0,1033,1034,1,0,0,0,1034,1036,1,0,0, - 0,1035,1037,3,194,96,0,1036,1035,1,0,0,0,1037,1038,1,0,0,0,1038,1036,1, - 0,0,0,1038,1039,1,0,0,0,1039,1041,1,0,0,0,1040,1009,1,0,0,0,1040,1024,1, - 0,0,0,1040,1033,1,0,0,0,1041,193,1,0,0,0,1042,1043,7,1,0,0,1043,195,1,0, - 0,0,1044,1045,5,92,0,0,1045,1046,5,108,0,0,1046,1047,5,101,0,0,1047,1048, - 5,102,0,0,1048,1049,5,116,0,0,1049,1050,1,0,0,0,1050,1051,6,97,1,0,1051, - 197,1,0,0,0,1052,1053,5,92,0,0,1053,1054,5,114,0,0,1054,1055,5,105,0,0, - 1055,1056,5,103,0,0,1056,1057,5,104,0,0,1057,1058,5,116,0,0,1058,1059,1, - 0,0,0,1059,1060,6,98,1,0,1060,199,1,0,0,0,1061,1063,7,7,0,0,1062,1061,1, - 0,0,0,1063,1064,1,0,0,0,1064,1062,1,0,0,0,1064,1065,1,0,0,0,1065,1066,1, - 0,0,0,1066,1067,6,99,1,0,1067,201,1,0,0,0,1068,1069,5,92,0,0,1069,1070, - 5,32,0,0,1070,1071,1,0,0,0,1071,1072,6,100,1,0,1072,203,1,0,0,0,1073,1074, - 5,92,0,0,1074,1075,5,58,0,0,1075,1076,1,0,0,0,1076,1077,6,101,1,0,1077, - 205,1,0,0,0,1078,1079,5,160,0,0,1079,1080,1,0,0,0,1080,1081,6,102,1,0,1081, - 207,1,0,0,0,1082,1083,9,0,0,0,1083,209,1,0,0,0,54,0,1,243,266,279,293,322, - 356,409,411,419,501,514,528,544,558,570,612,618,622,628,631,636,639,641, - 649,654,659,664,669,674,684,689,693,695,837,877,886,892,897,905,908,913, - 962,995,1009,1014,1020,1024,1030,1033,1038,1040,1064,3,2,1,0,6,0,0,2,0, - 0]; + public static readonly _serializedATN: number[] = [4,0,101,1092,6,-1,6, + -1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8, + 7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15, + 2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2, + 23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30, + 7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7, + 37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44, + 2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2, + 52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2,59, + 7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7,65,2,66,7, + 66,2,67,7,67,2,68,7,68,2,69,7,69,2,70,7,70,2,71,7,71,2,72,7,72,2,73,7,73, + 2,74,7,74,2,75,7,75,2,76,7,76,2,77,7,77,2,78,7,78,2,79,7,79,2,80,7,80,2, + 81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2,85,7,85,2,86,7,86,2,87,7,87,2,88, + 7,88,2,89,7,89,2,90,7,90,2,91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7, + 95,2,96,7,96,2,97,7,97,2,98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102, + 7,102,2,103,7,103,2,104,7,104,2,105,7,105,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1, + 7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,248,8,8,1,9,1,9,1,10,1,10,1,10,1,11,1, + 11,1,11,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,15,1,15, + 1,15,1,15,1,15,1,15,5,15,275,8,15,10,15,12,15,278,9,15,1,15,1,15,1,16,1, + 16,1,16,1,16,1,16,1,16,5,16,288,8,16,10,16,12,16,291,9,16,1,16,1,16,1,17, + 1,17,1,17,1,17,1,17,1,17,5,17,301,8,17,10,17,12,17,304,9,17,1,17,1,17,1, + 18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,20, + 1,20,1,20,1,20,1,20,1,20,1,20,5,20,329,8,20,10,20,12,20,332,9,20,1,20,1, + 20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22, + 1,23,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,24,5,24,363, + 8,24,10,24,12,24,366,9,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,26,1,26, + 1,26,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,27,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,28,1,28,1,28,1,28, + 1,28,1,28,1,28,1,28,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,4,30,418,8, + 30,11,30,12,30,419,1,30,1,30,1,30,1,30,1,30,1,30,3,30,428,8,30,1,31,1,31, + 1,31,1,31,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, + 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,37,1,37, + 1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,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,45,1,45,1,45,1,45,1,46,1,46,1, + 46,1,46,1,46,1,46,5,46,508,8,46,10,46,12,46,511,9,46,1,46,1,46,1,47,1,47, + 1,47,1,47,1,47,1,47,5,47,521,8,47,10,47,12,47,524,9,47,1,47,1,47,1,48,1, + 48,1,48,1,48,1,48,1,48,5,48,534,8,48,10,48,12,48,537,9,48,1,48,1,48,1,49, + 1,49,1,49,1,49,1,49,1,49,1,49,1,49,5,49,549,8,49,10,49,12,49,552,9,49,1, + 49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,50,1,50,3,50,565,8,50,1,50, + 1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,3,51,577,8,51,1,51,1,51,1, + 52,1,52,1,52,1,52,1,52,1,53,1,53,1,54,1,54,1,55,1,55,1,56,1,56,1,57,1,57, + 1,58,1,58,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1,60,1,61,1,61,1,62,1,62,1, + 63,1,63,1,63,1,64,1,64,1,64,1,65,4,65,617,8,65,11,65,12,65,618,1,65,1,65, + 5,65,623,8,65,10,65,12,65,626,9,65,1,65,3,65,629,8,65,1,65,1,65,4,65,633, + 8,65,11,65,12,65,634,1,65,3,65,638,8,65,1,65,4,65,641,8,65,11,65,12,65, + 642,1,65,3,65,646,8,65,3,65,648,8,65,1,66,1,66,1,67,1,67,5,67,654,8,67, + 10,67,12,67,657,9,67,1,68,1,68,3,68,661,8,68,1,68,4,68,664,8,68,11,68,12, + 68,665,1,68,5,68,669,8,68,10,68,12,68,672,9,68,1,68,1,68,3,68,676,8,68, + 1,68,5,68,679,8,68,10,68,12,68,682,9,68,1,68,1,68,1,68,1,68,1,68,1,68,1, + 68,3,68,691,8,68,1,68,4,68,694,8,68,11,68,12,68,695,1,68,1,68,3,68,700, + 8,68,3,68,702,8,68,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, + 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69, + 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, + 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69, + 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, + 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69, + 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, + 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69, + 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, + 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,3,69, + 844,8,69,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, + 70,1,70,1,70,1,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, + 1,71,1,71,1,71,1,72,1,72,1,73,1,73,1,73,1,74,5,74,882,8,74,10,74,12,74, + 885,9,74,1,74,1,74,1,74,1,74,4,74,891,8,74,11,74,12,74,892,1,74,1,74,5, + 74,897,8,74,10,74,12,74,900,9,74,1,74,1,74,3,74,904,8,74,3,74,906,8,74, + 1,75,1,75,1,75,1,75,1,76,1,76,3,76,914,8,76,1,76,3,76,917,8,76,1,77,4,77, + 920,8,77,11,77,12,77,921,1,77,1,77,1,78,1,78,1,78,1,78,1,78,1,79,1,79,1, + 79,1,79,1,79,1,80,1,80,1,80,1,80,1,81,1,81,1,82,1,82,1,82,1,82,1,83,1,83, + 1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84,1, + 85,1,85,1,85,1,85,1,85,1,85,1,85,5,85,969,8,85,10,85,12,85,972,9,85,1,85, + 1,85,1,85,1,86,1,86,1,86,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,87,1, + 87,1,88,1,88,1,88,1,88,1,88,1,88,1,89,1,89,1,90,1,90,1,91,1,91,5,91,1002, + 8,91,10,91,12,91,1005,9,91,1,92,1,92,1,93,1,93,1,94,1,94,1,95,1,95,1,96, + 1,96,1,97,3,97,1018,8,97,1,97,4,97,1021,8,97,11,97,12,97,1022,1,97,1,97, + 5,97,1027,8,97,10,97,12,97,1030,9,97,1,97,3,97,1033,8,97,1,97,1,97,4,97, + 1037,8,97,11,97,12,97,1038,1,97,3,97,1042,8,97,1,97,4,97,1045,8,97,11,97, + 12,97,1046,3,97,1049,8,97,1,98,1,98,1,99,1,99,1,99,1,99,1,99,1,99,1,99, + 1,99,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,101,4,101, + 1071,8,101,11,101,12,101,1072,1,101,1,101,1,102,1,102,1,102,1,102,1,102, + 1,103,1,103,1,103,1,103,1,103,1,104,1,104,1,104,1,104,1,105,1,105,1,550, + 0,106,2,1,4,2,6,3,8,4,10,5,12,6,14,7,16,8,18,9,20,10,22,11,24,12,26,13, + 28,14,30,15,32,16,34,17,36,18,38,19,40,20,42,21,44,22,46,23,48,24,50,25, + 52,26,54,27,56,28,58,29,60,30,62,31,64,32,66,33,68,34,70,35,72,36,74,37, + 76,38,78,39,80,40,82,41,84,42,86,43,88,44,90,45,92,46,94,47,96,48,98,49, + 100,50,102,51,104,52,106,53,108,54,110,55,112,56,114,57,116,58,118,59,120, + 60,122,61,124,62,126,63,128,64,130,65,132,66,134,0,136,0,138,0,140,0,142, + 67,144,68,146,69,148,70,150,71,152,72,154,73,156,74,158,75,160,76,162,77, + 164,78,166,79,168,80,170,81,172,82,174,83,176,84,178,85,180,86,182,87,184, + 88,186,89,188,90,190,91,192,92,194,93,196,94,198,0,200,95,202,96,204,97, + 206,98,208,99,210,100,212,101,2,0,1,8,1,0,48,57,2,0,65,90,97,122,1,0,32, + 32,1,0,115,115,3,0,48,57,65,90,97,122,2,0,69,69,101,101,2,0,43,43,45,45, + 3,0,9,10,13,13,32,32,1171,0,2,1,0,0,0,0,4,1,0,0,0,0,6,1,0,0,0,0,8,1,0,0, + 0,0,10,1,0,0,0,0,12,1,0,0,0,0,14,1,0,0,0,0,16,1,0,0,0,0,18,1,0,0,0,0,20, + 1,0,0,0,0,22,1,0,0,0,0,24,1,0,0,0,0,26,1,0,0,0,0,28,1,0,0,0,0,30,1,0,0, + 0,0,32,1,0,0,0,0,34,1,0,0,0,0,36,1,0,0,0,0,38,1,0,0,0,0,40,1,0,0,0,0,42, + 1,0,0,0,0,44,1,0,0,0,0,46,1,0,0,0,0,48,1,0,0,0,0,50,1,0,0,0,0,52,1,0,0, + 0,0,54,1,0,0,0,0,56,1,0,0,0,0,58,1,0,0,0,0,60,1,0,0,0,0,62,1,0,0,0,0,64, + 1,0,0,0,0,66,1,0,0,0,0,68,1,0,0,0,0,70,1,0,0,0,0,72,1,0,0,0,0,74,1,0,0, + 0,0,76,1,0,0,0,0,78,1,0,0,0,0,80,1,0,0,0,0,82,1,0,0,0,0,84,1,0,0,0,0,86, + 1,0,0,0,0,88,1,0,0,0,0,90,1,0,0,0,0,92,1,0,0,0,0,94,1,0,0,0,0,96,1,0,0, + 0,0,98,1,0,0,0,0,100,1,0,0,0,0,102,1,0,0,0,0,104,1,0,0,0,0,106,1,0,0,0, + 0,108,1,0,0,0,0,110,1,0,0,0,0,112,1,0,0,0,0,114,1,0,0,0,0,116,1,0,0,0,0, + 118,1,0,0,0,0,120,1,0,0,0,0,122,1,0,0,0,0,124,1,0,0,0,0,126,1,0,0,0,0,128, + 1,0,0,0,0,130,1,0,0,0,0,132,1,0,0,0,0,142,1,0,0,0,0,144,1,0,0,0,0,146,1, + 0,0,0,0,148,1,0,0,0,0,150,1,0,0,0,0,152,1,0,0,0,0,154,1,0,0,0,0,156,1,0, + 0,0,0,158,1,0,0,0,0,160,1,0,0,0,0,162,1,0,0,0,0,164,1,0,0,0,1,166,1,0,0, + 0,1,168,1,0,0,0,1,170,1,0,0,0,1,172,1,0,0,0,1,174,1,0,0,0,1,176,1,0,0,0, + 1,178,1,0,0,0,1,180,1,0,0,0,1,182,1,0,0,0,1,184,1,0,0,0,1,186,1,0,0,0,1, + 188,1,0,0,0,1,190,1,0,0,0,1,192,1,0,0,0,1,194,1,0,0,0,1,196,1,0,0,0,1,200, + 1,0,0,0,1,202,1,0,0,0,1,204,1,0,0,0,1,206,1,0,0,0,1,208,1,0,0,0,1,210,1, + 0,0,0,1,212,1,0,0,0,2,214,1,0,0,0,4,218,1,0,0,0,6,228,1,0,0,0,8,230,1,0, + 0,0,10,232,1,0,0,0,12,234,1,0,0,0,14,236,1,0,0,0,16,238,1,0,0,0,18,247, + 1,0,0,0,20,249,1,0,0,0,22,251,1,0,0,0,24,254,1,0,0,0,26,257,1,0,0,0,28, + 259,1,0,0,0,30,263,1,0,0,0,32,268,1,0,0,0,34,281,1,0,0,0,36,294,1,0,0,0, + 38,307,1,0,0,0,40,315,1,0,0,0,42,321,1,0,0,0,44,336,1,0,0,0,46,342,1,0, + 0,0,48,349,1,0,0,0,50,355,1,0,0,0,52,369,1,0,0,0,54,374,1,0,0,0,56,382, + 1,0,0,0,58,395,1,0,0,0,60,409,1,0,0,0,62,411,1,0,0,0,64,429,1,0,0,0,66, + 433,1,0,0,0,68,437,1,0,0,0,70,441,1,0,0,0,72,445,1,0,0,0,74,449,1,0,0,0, + 76,453,1,0,0,0,78,460,1,0,0,0,80,467,1,0,0,0,82,474,1,0,0,0,84,479,1,0, + 0,0,86,484,1,0,0,0,88,489,1,0,0,0,90,494,1,0,0,0,92,497,1,0,0,0,94,501, + 1,0,0,0,96,514,1,0,0,0,98,527,1,0,0,0,100,540,1,0,0,0,102,557,1,0,0,0,104, + 568,1,0,0,0,106,580,1,0,0,0,108,585,1,0,0,0,110,587,1,0,0,0,112,589,1,0, + 0,0,114,591,1,0,0,0,116,593,1,0,0,0,118,595,1,0,0,0,120,597,1,0,0,0,122, + 601,1,0,0,0,124,605,1,0,0,0,126,607,1,0,0,0,128,609,1,0,0,0,130,612,1,0, + 0,0,132,647,1,0,0,0,134,649,1,0,0,0,136,651,1,0,0,0,138,701,1,0,0,0,140, + 703,1,0,0,0,142,845,1,0,0,0,144,861,1,0,0,0,146,875,1,0,0,0,148,877,1,0, + 0,0,150,905,1,0,0,0,152,907,1,0,0,0,154,913,1,0,0,0,156,919,1,0,0,0,158, + 925,1,0,0,0,160,930,1,0,0,0,162,935,1,0,0,0,164,939,1,0,0,0,166,941,1,0, + 0,0,168,945,1,0,0,0,170,955,1,0,0,0,172,961,1,0,0,0,174,976,1,0,0,0,176, + 982,1,0,0,0,178,989,1,0,0,0,180,995,1,0,0,0,182,997,1,0,0,0,184,999,1,0, + 0,0,186,1006,1,0,0,0,188,1008,1,0,0,0,190,1010,1,0,0,0,192,1012,1,0,0,0, + 194,1014,1,0,0,0,196,1048,1,0,0,0,198,1050,1,0,0,0,200,1052,1,0,0,0,202, + 1060,1,0,0,0,204,1070,1,0,0,0,206,1076,1,0,0,0,208,1081,1,0,0,0,210,1086, + 1,0,0,0,212,1090,1,0,0,0,214,215,5,91,0,0,215,216,1,0,0,0,216,217,6,0,0, + 0,217,3,1,0,0,0,218,219,5,92,0,0,219,220,5,108,0,0,220,221,5,98,0,0,221, + 222,5,114,0,0,222,223,5,97,0,0,223,224,5,99,0,0,224,225,5,107,0,0,225,226, + 1,0,0,0,226,227,6,1,0,0,227,5,1,0,0,0,228,229,5,59,0,0,229,7,1,0,0,0,230, + 231,5,123,0,0,231,9,1,0,0,0,232,233,5,125,0,0,233,11,1,0,0,0,234,235,5, + 40,0,0,235,13,1,0,0,0,236,237,5,41,0,0,237,15,1,0,0,0,238,239,5,124,0,0, + 239,17,1,0,0,0,240,241,5,124,0,0,241,248,5,124,0,0,242,243,5,92,0,0,243, + 244,5,86,0,0,244,245,5,101,0,0,245,246,5,114,0,0,246,248,5,116,0,0,247, + 240,1,0,0,0,247,242,1,0,0,0,248,19,1,0,0,0,249,250,5,95,0,0,250,21,1,0, + 0,0,251,252,5,95,0,0,252,253,7,0,0,0,253,23,1,0,0,0,254,255,5,95,0,0,255, + 256,7,1,0,0,256,25,1,0,0,0,257,258,5,33,0,0,258,27,1,0,0,0,259,260,5,92, + 0,0,260,261,5,112,0,0,261,262,5,105,0,0,262,29,1,0,0,0,263,264,5,92,0,0, + 264,265,5,105,0,0,265,266,5,110,0,0,266,267,5,116,0,0,267,31,1,0,0,0,268, + 269,5,92,0,0,269,270,5,105,0,0,270,271,5,110,0,0,271,272,5,116,0,0,272, + 276,1,0,0,0,273,275,7,2,0,0,274,273,1,0,0,0,275,278,1,0,0,0,276,274,1,0, + 0,0,276,277,1,0,0,0,277,279,1,0,0,0,278,276,1,0,0,0,279,280,5,95,0,0,280, + 33,1,0,0,0,281,282,5,92,0,0,282,283,5,105,0,0,283,284,5,110,0,0,284,285, + 5,116,0,0,285,289,1,0,0,0,286,288,7,2,0,0,287,286,1,0,0,0,288,291,1,0,0, + 0,289,287,1,0,0,0,289,290,1,0,0,0,290,292,1,0,0,0,291,289,1,0,0,0,292,293, + 3,22,10,0,293,35,1,0,0,0,294,295,5,92,0,0,295,296,5,105,0,0,296,297,5,110, + 0,0,297,298,5,116,0,0,298,302,1,0,0,0,299,301,7,2,0,0,300,299,1,0,0,0,301, + 304,1,0,0,0,302,300,1,0,0,0,302,303,1,0,0,0,303,305,1,0,0,0,304,302,1,0, + 0,0,305,306,3,24,11,0,306,37,1,0,0,0,307,308,5,92,0,0,308,309,5,109,0,0, + 309,310,5,97,0,0,310,311,5,116,0,0,311,312,5,104,0,0,312,313,5,114,0,0, + 313,314,5,109,0,0,314,39,1,0,0,0,315,316,5,92,0,0,316,317,5,102,0,0,317, + 318,5,114,0,0,318,319,5,97,0,0,319,320,5,99,0,0,320,41,1,0,0,0,321,322, + 5,92,0,0,322,323,5,102,0,0,323,324,5,114,0,0,324,325,5,97,0,0,325,326,5, + 99,0,0,326,330,1,0,0,0,327,329,7,2,0,0,328,327,1,0,0,0,329,332,1,0,0,0, + 330,328,1,0,0,0,330,331,1,0,0,0,331,333,1,0,0,0,332,330,1,0,0,0,333,334, + 7,0,0,0,334,335,7,0,0,0,335,43,1,0,0,0,336,337,5,92,0,0,337,338,5,99,0, + 0,338,339,5,100,0,0,339,340,5,111,0,0,340,341,5,116,0,0,341,45,1,0,0,0, + 342,343,5,92,0,0,343,344,5,116,0,0,344,345,5,105,0,0,345,346,5,109,0,0, + 346,347,5,101,0,0,347,348,5,115,0,0,348,47,1,0,0,0,349,350,5,92,0,0,350, + 351,5,115,0,0,351,352,5,113,0,0,352,353,5,114,0,0,353,354,5,116,0,0,354, + 49,1,0,0,0,355,356,5,92,0,0,356,357,5,115,0,0,357,358,5,113,0,0,358,359, + 5,114,0,0,359,360,5,116,0,0,360,364,1,0,0,0,361,363,7,2,0,0,362,361,1,0, + 0,0,363,366,1,0,0,0,364,362,1,0,0,0,364,365,1,0,0,0,365,367,1,0,0,0,366, + 364,1,0,0,0,367,368,7,0,0,0,368,51,1,0,0,0,369,370,5,92,0,0,370,371,5,115, + 0,0,371,372,5,105,0,0,372,373,5,109,0,0,373,53,1,0,0,0,374,375,5,92,0,0, + 375,376,5,97,0,0,376,377,5,112,0,0,377,378,5,112,0,0,378,379,5,114,0,0, + 379,380,5,111,0,0,380,381,5,120,0,0,381,55,1,0,0,0,382,383,5,92,0,0,383, + 384,5,112,0,0,384,385,5,108,0,0,385,386,5,97,0,0,386,387,5,99,0,0,387,388, + 5,101,0,0,388,389,5,104,0,0,389,390,5,111,0,0,390,391,5,108,0,0,391,392, + 5,100,0,0,392,393,5,101,0,0,393,394,5,114,0,0,394,57,1,0,0,0,395,396,5, + 94,0,0,396,397,5,123,0,0,397,398,5,92,0,0,398,399,5,109,0,0,399,400,5,97, + 0,0,400,401,5,116,0,0,401,402,5,104,0,0,402,403,5,114,0,0,403,404,5,109, + 0,0,404,405,5,123,0,0,405,406,5,84,0,0,406,407,5,125,0,0,407,408,5,125, + 0,0,408,59,1,0,0,0,409,410,5,92,0,0,410,61,1,0,0,0,411,412,5,97,0,0,412, + 413,5,115,0,0,413,417,1,0,0,0,414,418,5,32,0,0,415,416,5,92,0,0,416,418, + 5,58,0,0,417,414,1,0,0,0,417,415,1,0,0,0,418,419,1,0,0,0,419,417,1,0,0, + 0,419,420,1,0,0,0,420,421,1,0,0,0,421,422,5,108,0,0,422,423,5,105,0,0,423, + 424,5,110,0,0,424,425,5,101,0,0,425,427,1,0,0,0,426,428,7,3,0,0,427,426, + 1,0,0,0,427,428,1,0,0,0,428,63,1,0,0,0,429,430,5,115,0,0,430,431,5,105, + 0,0,431,432,5,110,0,0,432,65,1,0,0,0,433,434,5,99,0,0,434,435,5,111,0,0, + 435,436,5,115,0,0,436,67,1,0,0,0,437,438,5,116,0,0,438,439,5,97,0,0,439, + 440,5,110,0,0,440,69,1,0,0,0,441,442,5,99,0,0,442,443,5,111,0,0,443,444, + 5,116,0,0,444,71,1,0,0,0,445,446,5,115,0,0,446,447,5,101,0,0,447,448,5, + 99,0,0,448,73,1,0,0,0,449,450,5,99,0,0,450,451,5,115,0,0,451,452,5,99,0, + 0,452,75,1,0,0,0,453,454,5,97,0,0,454,455,5,114,0,0,455,456,5,99,0,0,456, + 457,5,115,0,0,457,458,5,105,0,0,458,459,5,110,0,0,459,77,1,0,0,0,460,461, + 5,97,0,0,461,462,5,114,0,0,462,463,5,99,0,0,463,464,5,99,0,0,464,465,5, + 111,0,0,465,466,5,115,0,0,466,79,1,0,0,0,467,468,5,97,0,0,468,469,5,114, + 0,0,469,470,5,99,0,0,470,471,5,116,0,0,471,472,5,97,0,0,472,473,5,110,0, + 0,473,81,1,0,0,0,474,475,5,115,0,0,475,476,5,105,0,0,476,477,5,110,0,0, + 477,478,5,104,0,0,478,83,1,0,0,0,479,480,5,99,0,0,480,481,5,111,0,0,481, + 482,5,115,0,0,482,483,5,104,0,0,483,85,1,0,0,0,484,485,5,116,0,0,485,486, + 5,97,0,0,486,487,5,110,0,0,487,488,5,104,0,0,488,87,1,0,0,0,489,490,5,99, + 0,0,490,491,5,111,0,0,491,492,5,116,0,0,492,493,5,104,0,0,493,89,1,0,0, + 0,494,495,5,108,0,0,495,496,5,110,0,0,496,91,1,0,0,0,497,498,5,108,0,0, + 498,499,5,111,0,0,499,500,5,103,0,0,500,93,1,0,0,0,501,502,5,92,0,0,502, + 503,5,108,0,0,503,504,5,111,0,0,504,505,5,103,0,0,505,509,1,0,0,0,506,508, + 7,2,0,0,507,506,1,0,0,0,508,511,1,0,0,0,509,507,1,0,0,0,509,510,1,0,0,0, + 510,512,1,0,0,0,511,509,1,0,0,0,512,513,5,95,0,0,513,95,1,0,0,0,514,515, + 5,92,0,0,515,516,5,108,0,0,516,517,5,111,0,0,517,518,5,103,0,0,518,522, + 1,0,0,0,519,521,7,2,0,0,520,519,1,0,0,0,521,524,1,0,0,0,522,520,1,0,0,0, + 522,523,1,0,0,0,523,525,1,0,0,0,524,522,1,0,0,0,525,526,3,22,10,0,526,97, + 1,0,0,0,527,528,5,92,0,0,528,529,5,108,0,0,529,530,5,111,0,0,530,531,5, + 103,0,0,531,535,1,0,0,0,532,534,7,2,0,0,533,532,1,0,0,0,534,537,1,0,0,0, + 535,533,1,0,0,0,535,536,1,0,0,0,536,538,1,0,0,0,537,535,1,0,0,0,538,539, + 3,24,11,0,539,99,1,0,0,0,540,541,5,92,0,0,541,542,5,116,0,0,542,543,5,101, + 0,0,543,544,5,120,0,0,544,545,5,116,0,0,545,546,5,123,0,0,546,550,1,0,0, + 0,547,549,9,0,0,0,548,547,1,0,0,0,549,552,1,0,0,0,550,551,1,0,0,0,550,548, + 1,0,0,0,551,553,1,0,0,0,552,550,1,0,0,0,553,554,5,125,0,0,554,555,1,0,0, + 0,555,556,6,49,1,0,556,101,1,0,0,0,557,558,5,92,0,0,558,559,5,108,0,0,559, + 560,5,101,0,0,560,561,5,102,0,0,561,562,5,116,0,0,562,564,1,0,0,0,563,565, + 5,46,0,0,564,563,1,0,0,0,564,565,1,0,0,0,565,566,1,0,0,0,566,567,6,50,1, + 0,567,103,1,0,0,0,568,569,5,92,0,0,569,570,5,114,0,0,570,571,5,105,0,0, + 571,572,5,103,0,0,572,573,5,104,0,0,573,574,5,116,0,0,574,576,1,0,0,0,575, + 577,5,46,0,0,576,575,1,0,0,0,576,577,1,0,0,0,577,578,1,0,0,0,578,579,6, + 51,1,0,579,105,1,0,0,0,580,581,5,36,0,0,581,582,5,36,0,0,582,583,1,0,0, + 0,583,584,6,52,1,0,584,107,1,0,0,0,585,586,5,43,0,0,586,109,1,0,0,0,587, + 588,5,45,0,0,588,111,1,0,0,0,589,590,5,94,0,0,590,113,1,0,0,0,591,592,5, + 61,0,0,592,115,1,0,0,0,593,594,5,60,0,0,594,117,1,0,0,0,595,596,5,62,0, + 0,596,119,1,0,0,0,597,598,5,92,0,0,598,599,5,108,0,0,599,600,5,101,0,0, + 600,121,1,0,0,0,601,602,5,92,0,0,602,603,5,103,0,0,603,604,5,101,0,0,604, + 123,1,0,0,0,605,606,5,44,0,0,606,125,1,0,0,0,607,608,5,46,0,0,608,127,1, + 0,0,0,609,610,5,94,0,0,610,611,7,0,0,0,611,129,1,0,0,0,612,613,5,94,0,0, + 613,614,7,1,0,0,614,131,1,0,0,0,615,617,3,134,66,0,616,615,1,0,0,0,617, + 618,1,0,0,0,618,616,1,0,0,0,618,619,1,0,0,0,619,620,1,0,0,0,620,624,5,46, + 0,0,621,623,3,134,66,0,622,621,1,0,0,0,623,626,1,0,0,0,624,622,1,0,0,0, + 624,625,1,0,0,0,625,628,1,0,0,0,626,624,1,0,0,0,627,629,3,138,68,0,628, + 627,1,0,0,0,628,629,1,0,0,0,629,648,1,0,0,0,630,632,5,46,0,0,631,633,3, + 134,66,0,632,631,1,0,0,0,633,634,1,0,0,0,634,632,1,0,0,0,634,635,1,0,0, + 0,635,637,1,0,0,0,636,638,3,138,68,0,637,636,1,0,0,0,637,638,1,0,0,0,638, + 648,1,0,0,0,639,641,3,134,66,0,640,639,1,0,0,0,641,642,1,0,0,0,642,640, + 1,0,0,0,642,643,1,0,0,0,643,645,1,0,0,0,644,646,3,138,68,0,645,644,1,0, + 0,0,645,646,1,0,0,0,646,648,1,0,0,0,647,616,1,0,0,0,647,630,1,0,0,0,647, + 640,1,0,0,0,648,133,1,0,0,0,649,650,7,0,0,0,650,135,1,0,0,0,651,655,7,1, + 0,0,652,654,7,4,0,0,653,652,1,0,0,0,654,657,1,0,0,0,655,653,1,0,0,0,655, + 656,1,0,0,0,656,137,1,0,0,0,657,655,1,0,0,0,658,660,7,5,0,0,659,661,7,6, + 0,0,660,659,1,0,0,0,660,661,1,0,0,0,661,663,1,0,0,0,662,664,3,134,66,0, + 663,662,1,0,0,0,664,665,1,0,0,0,665,663,1,0,0,0,665,666,1,0,0,0,666,702, + 1,0,0,0,667,669,5,32,0,0,668,667,1,0,0,0,669,672,1,0,0,0,670,668,1,0,0, + 0,670,671,1,0,0,0,671,675,1,0,0,0,672,670,1,0,0,0,673,676,3,44,21,0,674, + 676,3,46,22,0,675,673,1,0,0,0,675,674,1,0,0,0,676,680,1,0,0,0,677,679,5, + 32,0,0,678,677,1,0,0,0,679,682,1,0,0,0,680,678,1,0,0,0,680,681,1,0,0,0, + 681,683,1,0,0,0,682,680,1,0,0,0,683,684,5,49,0,0,684,685,5,48,0,0,685,686, + 1,0,0,0,686,699,3,112,55,0,687,700,3,134,66,0,688,690,3,8,3,0,689,691,7, + 6,0,0,690,689,1,0,0,0,690,691,1,0,0,0,691,693,1,0,0,0,692,694,3,134,66, + 0,693,692,1,0,0,0,694,695,1,0,0,0,695,693,1,0,0,0,695,696,1,0,0,0,696,697, + 1,0,0,0,697,698,3,10,4,0,698,700,1,0,0,0,699,687,1,0,0,0,699,688,1,0,0, + 0,700,702,1,0,0,0,701,658,1,0,0,0,701,670,1,0,0,0,702,139,1,0,0,0,703,843, + 5,92,0,0,704,705,5,97,0,0,705,706,5,108,0,0,706,707,5,112,0,0,707,708,5, + 104,0,0,708,844,5,97,0,0,709,710,5,98,0,0,710,711,5,101,0,0,711,712,5,116, + 0,0,712,844,5,97,0,0,713,714,5,103,0,0,714,715,5,97,0,0,715,716,5,109,0, + 0,716,717,5,109,0,0,717,844,5,97,0,0,718,719,5,100,0,0,719,720,5,101,0, + 0,720,721,5,108,0,0,721,722,5,116,0,0,722,844,5,97,0,0,723,724,5,101,0, + 0,724,725,5,112,0,0,725,726,5,115,0,0,726,727,5,105,0,0,727,728,5,108,0, + 0,728,729,5,111,0,0,729,844,5,110,0,0,730,731,5,122,0,0,731,732,5,101,0, + 0,732,733,5,116,0,0,733,844,5,97,0,0,734,735,5,101,0,0,735,736,5,116,0, + 0,736,844,5,97,0,0,737,738,5,116,0,0,738,739,5,104,0,0,739,740,5,101,0, + 0,740,741,5,116,0,0,741,844,5,97,0,0,742,743,5,105,0,0,743,744,5,111,0, + 0,744,745,5,116,0,0,745,844,5,97,0,0,746,747,5,107,0,0,747,748,5,97,0,0, + 748,749,5,112,0,0,749,750,5,112,0,0,750,844,5,97,0,0,751,752,5,108,0,0, + 752,753,5,97,0,0,753,754,5,109,0,0,754,755,5,98,0,0,755,756,5,100,0,0,756, + 844,5,97,0,0,757,758,5,109,0,0,758,844,5,117,0,0,759,760,5,110,0,0,760, + 844,5,117,0,0,761,762,5,120,0,0,762,844,5,105,0,0,763,764,5,114,0,0,764, + 765,5,104,0,0,765,844,5,111,0,0,766,767,5,115,0,0,767,768,5,105,0,0,768, + 769,5,103,0,0,769,770,5,109,0,0,770,844,5,97,0,0,771,772,5,116,0,0,772, + 773,5,97,0,0,773,844,5,117,0,0,774,775,5,117,0,0,775,776,5,112,0,0,776, + 777,5,115,0,0,777,778,5,105,0,0,778,779,5,108,0,0,779,780,5,111,0,0,780, + 844,5,110,0,0,781,782,5,112,0,0,782,783,5,104,0,0,783,844,5,105,0,0,784, + 785,5,99,0,0,785,786,5,104,0,0,786,844,5,105,0,0,787,788,5,112,0,0,788, + 789,5,115,0,0,789,844,5,105,0,0,790,791,5,111,0,0,791,792,5,109,0,0,792, + 793,5,101,0,0,793,794,5,103,0,0,794,844,5,97,0,0,795,796,5,71,0,0,796,797, + 5,97,0,0,797,798,5,109,0,0,798,799,5,109,0,0,799,844,5,97,0,0,800,801,5, + 68,0,0,801,802,5,101,0,0,802,803,5,108,0,0,803,804,5,116,0,0,804,844,5, + 97,0,0,805,806,5,84,0,0,806,807,5,104,0,0,807,808,5,101,0,0,808,809,5,116, + 0,0,809,844,5,97,0,0,810,811,5,76,0,0,811,812,5,97,0,0,812,813,5,109,0, + 0,813,814,5,98,0,0,814,815,5,100,0,0,815,844,5,97,0,0,816,817,5,88,0,0, + 817,844,5,105,0,0,818,819,5,80,0,0,819,844,5,105,0,0,820,821,5,83,0,0,821, + 822,5,105,0,0,822,823,5,103,0,0,823,824,5,109,0,0,824,844,5,97,0,0,825, + 826,5,85,0,0,826,827,5,112,0,0,827,828,5,115,0,0,828,829,5,105,0,0,829, + 830,5,108,0,0,830,831,5,111,0,0,831,844,5,110,0,0,832,833,5,80,0,0,833, + 834,5,104,0,0,834,844,5,105,0,0,835,836,5,80,0,0,836,837,5,115,0,0,837, + 844,5,105,0,0,838,839,5,79,0,0,839,840,5,109,0,0,840,841,5,101,0,0,841, + 842,5,103,0,0,842,844,5,97,0,0,843,704,1,0,0,0,843,709,1,0,0,0,843,713, + 1,0,0,0,843,718,1,0,0,0,843,723,1,0,0,0,843,730,1,0,0,0,843,734,1,0,0,0, + 843,737,1,0,0,0,843,742,1,0,0,0,843,746,1,0,0,0,843,751,1,0,0,0,843,757, + 1,0,0,0,843,759,1,0,0,0,843,761,1,0,0,0,843,763,1,0,0,0,843,766,1,0,0,0, + 843,771,1,0,0,0,843,774,1,0,0,0,843,781,1,0,0,0,843,784,1,0,0,0,843,787, + 1,0,0,0,843,790,1,0,0,0,843,795,1,0,0,0,843,800,1,0,0,0,843,805,1,0,0,0, + 843,810,1,0,0,0,843,816,1,0,0,0,843,818,1,0,0,0,843,820,1,0,0,0,843,825, + 1,0,0,0,843,832,1,0,0,0,843,835,1,0,0,0,843,838,1,0,0,0,844,141,1,0,0,0, + 845,846,5,92,0,0,846,847,5,98,0,0,847,848,5,101,0,0,848,849,5,103,0,0,849, + 850,5,105,0,0,850,851,5,110,0,0,851,852,5,123,0,0,852,853,5,98,0,0,853, + 854,5,109,0,0,854,855,5,97,0,0,855,856,5,116,0,0,856,857,5,114,0,0,857, + 858,5,105,0,0,858,859,5,120,0,0,859,860,5,125,0,0,860,143,1,0,0,0,861,862, + 5,92,0,0,862,863,5,101,0,0,863,864,5,110,0,0,864,865,5,100,0,0,865,866, + 5,123,0,0,866,867,5,98,0,0,867,868,5,109,0,0,868,869,5,97,0,0,869,870,5, + 116,0,0,870,871,5,114,0,0,871,872,5,105,0,0,872,873,5,120,0,0,873,874,5, + 125,0,0,874,145,1,0,0,0,875,876,5,38,0,0,876,147,1,0,0,0,877,878,5,92,0, + 0,878,879,5,92,0,0,879,149,1,0,0,0,880,882,7,2,0,0,881,880,1,0,0,0,882, + 885,1,0,0,0,883,881,1,0,0,0,883,884,1,0,0,0,884,886,1,0,0,0,885,883,1,0, + 0,0,886,887,5,95,0,0,887,888,5,123,0,0,888,890,1,0,0,0,889,891,7,4,0,0, + 890,889,1,0,0,0,891,892,1,0,0,0,892,890,1,0,0,0,892,893,1,0,0,0,893,894, + 1,0,0,0,894,906,5,125,0,0,895,897,7,2,0,0,896,895,1,0,0,0,897,900,1,0,0, + 0,898,896,1,0,0,0,898,899,1,0,0,0,899,903,1,0,0,0,900,898,1,0,0,0,901,904, + 3,24,11,0,902,904,3,22,10,0,903,901,1,0,0,0,903,902,1,0,0,0,904,906,1,0, + 0,0,905,883,1,0,0,0,905,898,1,0,0,0,906,151,1,0,0,0,907,908,5,94,0,0,908, + 909,7,1,0,0,909,910,3,150,74,0,910,153,1,0,0,0,911,914,3,136,67,0,912,914, + 3,140,69,0,913,911,1,0,0,0,913,912,1,0,0,0,914,916,1,0,0,0,915,917,3,150, + 74,0,916,915,1,0,0,0,916,917,1,0,0,0,917,155,1,0,0,0,918,920,7,7,0,0,919, + 918,1,0,0,0,920,921,1,0,0,0,921,919,1,0,0,0,921,922,1,0,0,0,922,923,1,0, + 0,0,923,924,6,77,1,0,924,157,1,0,0,0,925,926,5,92,0,0,926,927,5,32,0,0, + 927,928,1,0,0,0,928,929,6,78,1,0,929,159,1,0,0,0,930,931,5,92,0,0,931,932, + 5,58,0,0,932,933,1,0,0,0,933,934,6,79,1,0,934,161,1,0,0,0,935,936,5,160, + 0,0,936,937,1,0,0,0,937,938,6,80,1,0,938,163,1,0,0,0,939,940,9,0,0,0,940, + 165,1,0,0,0,941,942,5,93,0,0,942,943,1,0,0,0,943,944,6,82,2,0,944,167,1, + 0,0,0,945,946,5,92,0,0,946,947,5,114,0,0,947,948,5,98,0,0,948,949,5,114, + 0,0,949,950,5,97,0,0,950,951,5,99,0,0,951,952,5,107,0,0,952,953,1,0,0,0, + 953,954,6,83,2,0,954,169,1,0,0,0,955,956,5,92,0,0,956,957,5,102,0,0,957, + 958,5,114,0,0,958,959,5,97,0,0,959,960,5,99,0,0,960,171,1,0,0,0,961,962, + 5,92,0,0,962,963,5,102,0,0,963,964,5,114,0,0,964,965,5,97,0,0,965,966,5, + 99,0,0,966,970,1,0,0,0,967,969,7,2,0,0,968,967,1,0,0,0,969,972,1,0,0,0, + 970,968,1,0,0,0,970,971,1,0,0,0,971,973,1,0,0,0,972,970,1,0,0,0,973,974, + 7,0,0,0,974,975,7,0,0,0,975,173,1,0,0,0,976,977,5,92,0,0,977,978,5,99,0, + 0,978,979,5,100,0,0,979,980,5,111,0,0,980,981,5,116,0,0,981,175,1,0,0,0, + 982,983,5,92,0,0,983,984,5,116,0,0,984,985,5,105,0,0,985,986,5,109,0,0, + 986,987,5,101,0,0,987,988,5,115,0,0,988,177,1,0,0,0,989,990,5,92,0,0,990, + 991,5,115,0,0,991,992,5,113,0,0,992,993,5,114,0,0,993,994,5,116,0,0,994, + 179,1,0,0,0,995,996,5,44,0,0,996,181,1,0,0,0,997,998,5,94,0,0,998,183,1, + 0,0,0,999,1003,7,1,0,0,1000,1002,7,4,0,0,1001,1000,1,0,0,0,1002,1005,1, + 0,0,0,1003,1001,1,0,0,0,1003,1004,1,0,0,0,1004,185,1,0,0,0,1005,1003,1, + 0,0,0,1006,1007,5,40,0,0,1007,187,1,0,0,0,1008,1009,5,41,0,0,1009,189,1, + 0,0,0,1010,1011,5,123,0,0,1011,191,1,0,0,0,1012,1013,5,125,0,0,1013,193, + 1,0,0,0,1014,1015,5,49,0,0,1015,195,1,0,0,0,1016,1018,5,45,0,0,1017,1016, + 1,0,0,0,1017,1018,1,0,0,0,1018,1020,1,0,0,0,1019,1021,3,198,98,0,1020,1019, + 1,0,0,0,1021,1022,1,0,0,0,1022,1020,1,0,0,0,1022,1023,1,0,0,0,1023,1024, + 1,0,0,0,1024,1028,5,46,0,0,1025,1027,3,198,98,0,1026,1025,1,0,0,0,1027, + 1030,1,0,0,0,1028,1026,1,0,0,0,1028,1029,1,0,0,0,1029,1049,1,0,0,0,1030, + 1028,1,0,0,0,1031,1033,5,45,0,0,1032,1031,1,0,0,0,1032,1033,1,0,0,0,1033, + 1034,1,0,0,0,1034,1036,5,46,0,0,1035,1037,3,198,98,0,1036,1035,1,0,0,0, + 1037,1038,1,0,0,0,1038,1036,1,0,0,0,1038,1039,1,0,0,0,1039,1049,1,0,0,0, + 1040,1042,5,45,0,0,1041,1040,1,0,0,0,1041,1042,1,0,0,0,1042,1044,1,0,0, + 0,1043,1045,3,198,98,0,1044,1043,1,0,0,0,1045,1046,1,0,0,0,1046,1044,1, + 0,0,0,1046,1047,1,0,0,0,1047,1049,1,0,0,0,1048,1017,1,0,0,0,1048,1032,1, + 0,0,0,1048,1041,1,0,0,0,1049,197,1,0,0,0,1050,1051,7,0,0,0,1051,199,1,0, + 0,0,1052,1053,5,92,0,0,1053,1054,5,108,0,0,1054,1055,5,101,0,0,1055,1056, + 5,102,0,0,1056,1057,5,116,0,0,1057,1058,1,0,0,0,1058,1059,6,99,1,0,1059, + 201,1,0,0,0,1060,1061,5,92,0,0,1061,1062,5,114,0,0,1062,1063,5,105,0,0, + 1063,1064,5,103,0,0,1064,1065,5,104,0,0,1065,1066,5,116,0,0,1066,1067,1, + 0,0,0,1067,1068,6,100,1,0,1068,203,1,0,0,0,1069,1071,7,7,0,0,1070,1069, + 1,0,0,0,1071,1072,1,0,0,0,1072,1070,1,0,0,0,1072,1073,1,0,0,0,1073,1074, + 1,0,0,0,1074,1075,6,101,1,0,1075,205,1,0,0,0,1076,1077,5,92,0,0,1077,1078, + 5,32,0,0,1078,1079,1,0,0,0,1079,1080,6,102,1,0,1080,207,1,0,0,0,1081,1082, + 5,92,0,0,1082,1083,5,58,0,0,1083,1084,1,0,0,0,1084,1085,6,103,1,0,1085, + 209,1,0,0,0,1086,1087,5,160,0,0,1087,1088,1,0,0,0,1088,1089,6,104,1,0,1089, + 211,1,0,0,0,1090,1091,9,0,0,0,1091,213,1,0,0,0,55,0,1,247,276,289,302,330, + 364,417,419,427,509,522,535,550,564,576,618,624,628,634,637,642,645,647, + 655,660,665,670,675,680,690,695,699,701,843,883,892,898,903,905,913,916, + 921,970,1003,1017,1022,1028,1032,1038,1041,1046,1048,1072,3,2,1,0,6,0,0, + 2,0,0]; private static __ATN: ATN; public static get _ATN(): ATN { diff --git a/src/parser/LatexParser.ts b/src/parser/LatexParser.ts index 91bccda2..33f98e60 100644 --- a/src/parser/LatexParser.ts +++ b/src/parser/LatexParser.ts @@ -29,95 +29,97 @@ export default class LatexParser extends Parser { public static readonly VBAR = 8; public static readonly DOUBLE_VBAR = 9; public static readonly UNDERSCORE = 10; - public static readonly EXCLAMATION = 11; - public static readonly PI = 12; - public static readonly CMD_INT = 13; - public static readonly CMD_INT_UNDERSCORE = 14; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 15; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 16; - public static readonly CMD_MATHRM = 17; - public static readonly CMD_FRAC = 18; - public static readonly CMD_FRAC_INTS = 19; - public static readonly CMD_CDOT = 20; - public static readonly CMD_TIMES = 21; - public static readonly CMD_SQRT = 22; - public static readonly CMD_SQRT_INT = 23; - public static readonly CMD_SIM = 24; - public static readonly CMD_APPROX = 25; - public static readonly CMD_PLACEHOLDER = 26; - public static readonly TRANSPOSE = 27; - public static readonly BACKSLASH = 28; - public static readonly AS_LINES = 29; - public static readonly CMD_SIN = 30; - public static readonly CMD_COS = 31; - public static readonly CMD_TAN = 32; - public static readonly CMD_COT = 33; - public static readonly CMD_SEC = 34; - public static readonly CMD_CSC = 35; - public static readonly CMD_ARCSIN = 36; - public static readonly CMD_ARCCOS = 37; - public static readonly CMD_ARCTAN = 38; - public static readonly CMD_SINH = 39; - public static readonly CMD_COSH = 40; - public static readonly CMD_TANH = 41; - public static readonly CMD_COTH = 42; - public static readonly CMD_LN = 43; - public static readonly CMD_LOG = 44; - public static readonly CMD_SLASH_LOG_UNDERSCORE = 45; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 46; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 47; - public static readonly COMMENT = 48; - public static readonly CMD_LEFT = 49; - public static readonly CMD_RIGHT = 50; - public static readonly DOUBLE_DOLLAR_SIGN = 51; - public static readonly ADD = 52; - public static readonly SUB = 53; - public static readonly CARET = 54; - public static readonly EQ = 55; - public static readonly LT = 56; - public static readonly GT = 57; - public static readonly LTE = 58; - public static readonly GTE = 59; - public static readonly COMMA = 60; - public static readonly DECIMAL_POINT = 61; - public static readonly CARET_SINGLE_CHAR_NUMBER = 62; - public static readonly CARET_SINGLE_CHAR_ID = 63; - public static readonly NUMBER = 64; - public static readonly BEGIN_MATRIX = 65; - public static readonly END_MATRIX = 66; - public static readonly AMPERSAND = 67; - public static readonly DOUBLE_BACKSLASH = 68; - public static readonly UNDERSCORE_SUBSCRIPT = 69; - public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 70; - public static readonly ID = 71; - public static readonly WS = 72; - public static readonly SLASH_SPACE = 73; - public static readonly SLASH_COLON = 74; - public static readonly NBSP = 75; - public static readonly ERROR_CHAR = 76; - public static readonly R_BRACKET = 77; - public static readonly ALT_R_BRACKET = 78; - public static readonly U_CMD_FRAC = 79; - public static readonly U_CMD_FRAC_INTS = 80; - public static readonly U_CMD_CDOT = 81; - public static readonly U_CMD_TIMES = 82; - public static readonly U_CMD_SQRT = 83; - public static readonly U_COMMA = 84; - public static readonly U_CARET = 85; - public static readonly U_NAME = 86; - public static readonly U_L_PAREN = 87; - public static readonly U_R_PAREN = 88; - public static readonly U_L_BRACE = 89; - public static readonly U_R_BRACE = 90; - public static readonly U_ONE = 91; - public static readonly U_NUMBER = 92; - public static readonly U_CMD_LEFT = 93; - public static readonly U_CMD_RIGHT = 94; - public static readonly U_WS = 95; - public static readonly U_SLASH_SPACE = 96; - public static readonly U_SLASH_COLON = 97; - public static readonly U_NBSP = 98; - public static readonly U_ERROR_CHAR = 99; + public static readonly UNDERSCORE_SINGLE_CHAR_NUMBER = 11; + public static readonly UNDERSCORE_SINGLE_CHAR_ID = 12; + public static readonly EXCLAMATION = 13; + public static readonly PI = 14; + public static readonly CMD_INT = 15; + public static readonly CMD_INT_UNDERSCORE = 16; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 17; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 18; + public static readonly CMD_MATHRM = 19; + public static readonly CMD_FRAC = 20; + public static readonly CMD_FRAC_INTS = 21; + public static readonly CMD_CDOT = 22; + public static readonly CMD_TIMES = 23; + public static readonly CMD_SQRT = 24; + public static readonly CMD_SQRT_INT = 25; + public static readonly CMD_SIM = 26; + public static readonly CMD_APPROX = 27; + public static readonly CMD_PLACEHOLDER = 28; + public static readonly TRANSPOSE = 29; + public static readonly BACKSLASH = 30; + public static readonly AS_LINES = 31; + public static readonly CMD_SIN = 32; + public static readonly CMD_COS = 33; + public static readonly CMD_TAN = 34; + public static readonly CMD_COT = 35; + public static readonly CMD_SEC = 36; + public static readonly CMD_CSC = 37; + public static readonly CMD_ARCSIN = 38; + public static readonly CMD_ARCCOS = 39; + public static readonly CMD_ARCTAN = 40; + public static readonly CMD_SINH = 41; + public static readonly CMD_COSH = 42; + public static readonly CMD_TANH = 43; + public static readonly CMD_COTH = 44; + public static readonly CMD_LN = 45; + public static readonly CMD_LOG = 46; + public static readonly CMD_SLASH_LOG_UNDERSCORE = 47; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 48; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 49; + public static readonly COMMENT = 50; + public static readonly CMD_LEFT = 51; + public static readonly CMD_RIGHT = 52; + public static readonly DOUBLE_DOLLAR_SIGN = 53; + public static readonly ADD = 54; + public static readonly SUB = 55; + public static readonly CARET = 56; + public static readonly EQ = 57; + public static readonly LT = 58; + public static readonly GT = 59; + public static readonly LTE = 60; + public static readonly GTE = 61; + public static readonly COMMA = 62; + public static readonly DECIMAL_POINT = 63; + public static readonly CARET_SINGLE_CHAR_NUMBER = 64; + public static readonly CARET_SINGLE_CHAR_ID = 65; + public static readonly NUMBER = 66; + public static readonly BEGIN_MATRIX = 67; + public static readonly END_MATRIX = 68; + public static readonly AMPERSAND = 69; + public static readonly DOUBLE_BACKSLASH = 70; + public static readonly UNDERSCORE_SUBSCRIPT = 71; + public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 72; + public static readonly ID = 73; + public static readonly WS = 74; + public static readonly SLASH_SPACE = 75; + public static readonly SLASH_COLON = 76; + public static readonly NBSP = 77; + public static readonly ERROR_CHAR = 78; + public static readonly R_BRACKET = 79; + public static readonly ALT_R_BRACKET = 80; + public static readonly U_CMD_FRAC = 81; + public static readonly U_CMD_FRAC_INTS = 82; + public static readonly U_CMD_CDOT = 83; + public static readonly U_CMD_TIMES = 84; + public static readonly U_CMD_SQRT = 85; + public static readonly U_COMMA = 86; + public static readonly U_CARET = 87; + public static readonly U_NAME = 88; + public static readonly U_L_PAREN = 89; + public static readonly U_R_PAREN = 90; + public static readonly U_L_BRACE = 91; + public static readonly U_R_BRACE = 92; + public static readonly U_ONE = 93; + public static readonly U_NUMBER = 94; + public static readonly U_CMD_LEFT = 95; + public static readonly U_CMD_RIGHT = 96; + public static readonly U_WS = 97; + public static readonly U_SLASH_SPACE = 98; + public static readonly U_SLASH_COLON = 99; + public static readonly U_NBSP = 100; + public static readonly U_ERROR_CHAR = 101; public static readonly EOF = Token.EOF; public static readonly RULE_statement = 0; public static readonly RULE_scatter_plot_query = 1; @@ -159,6 +161,7 @@ export default class LatexParser extends Parser { null, null, null, "'|'", null, "'_'", + null, null, "'!'", "'\\pi'", "'\\int'", null, null, null, @@ -215,6 +218,8 @@ export default class LatexParser extends Parser { "R_PAREN", "VBAR", "DOUBLE_VBAR", "UNDERSCORE", + "UNDERSCORE_SINGLE_CHAR_NUMBER", + "UNDERSCORE_SINGLE_CHAR_ID", "EXCLAMATION", "PI", "CMD_INT", "CMD_INT_UNDERSCORE", @@ -488,7 +493,7 @@ export default class LatexParser extends Parser { this.state = 102; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===29) { + if (_la===31) { { this.state = 101; this.match(LatexParser.AS_LINES); @@ -581,7 +586,7 @@ export default class LatexParser extends Parser { this.state = 131; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===71) { + if (_la===73) { { this.state = 127; localctx._points_id_0 = this.match(LatexParser.ID); @@ -754,7 +759,7 @@ export default class LatexParser extends Parser { this.state = 166; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===53) { + if (_la===55) { { this.state = 165; this.match(LatexParser.SUB); @@ -789,20 +794,20 @@ export default class LatexParser extends Parser { this.state = 173; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 53: - case 64: + case 55: + case 66: { this.state = 170; this.number_(); } break; - case 12: + case 14: { this.state = 171; this.match(LatexParser.PI); } break; - case 71: + case 73: { this.state = 172; this.id(); @@ -839,13 +844,13 @@ export default class LatexParser extends Parser { this.state = 179; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 71: + case 73: { this.state = 177; this.id(); } break; - case 12: + case 14: { this.state = 178; this.match(LatexParser.PI); @@ -899,7 +904,7 @@ export default class LatexParser extends Parser { this.state = 189; this._errHandler.sync(this); _la = this._input.LA(1); - } while (_la===60); + } while (_la===62); } } catch (re) { @@ -1032,13 +1037,13 @@ export default class LatexParser extends Parser { this.state = 207; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 71: + case 73: { this.state = 205; this.id(); } break; - case 12: + case 14: { this.state = 206; this.match(LatexParser.PI); @@ -1059,7 +1064,7 @@ export default class LatexParser extends Parser { this.state = 217; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===60) { + while (_la===62) { { { this.state = 213; @@ -1135,7 +1140,7 @@ export default class LatexParser extends Parser { this.state = 229; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===28) { + if (_la===30) { { this.state = 228; this.match(LatexParser.BACKSLASH); @@ -1144,7 +1149,7 @@ export default class LatexParser extends Parser { this.state = 231; _la = this._input.LA(1); - if(!(((((_la - 30)) & ~0x1F) === 0 && ((1 << (_la - 30)) & 8191) !== 0))) { + if(!(((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 8191) !== 0))) { this._errHandler.recoverInline(this); } else { @@ -1183,13 +1188,13 @@ export default class LatexParser extends Parser { this.state = 243; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 13: + case 15: { this.state = 236; this.match(LatexParser.CMD_INT); } break; - case 14: + case 16: { { this.state = 237; @@ -1219,7 +1224,7 @@ export default class LatexParser extends Parser { this.state = 254; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 17: + case 19: { this.state = 248; this.match(LatexParser.CMD_MATHRM); @@ -1231,7 +1236,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 71: + case 73: { this.state = 253; this.id(); @@ -1273,7 +1278,7 @@ export default class LatexParser extends Parser { this.state = 266; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 14: + case 16: { { this.state = 260; @@ -1287,12 +1292,12 @@ export default class LatexParser extends Parser { } } break; - case 15: - case 16: + case 17: + case 18: { this.state = 265; _la = this._input.LA(1); - if(!(_la===15 || _la===16)) { + if(!(_la===17 || _la===18)) { this._errHandler.recoverInline(this); } else { @@ -1307,7 +1312,7 @@ export default class LatexParser extends Parser { this.state = 274; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 54: + case 56: { { this.state = 268; @@ -1321,12 +1326,12 @@ export default class LatexParser extends Parser { } } break; - case 62: - case 63: + case 64: + case 65: { this.state = 273; _la = this._input.LA(1); - if(!(_la===62 || _la===63)) { + if(!(_la===64 || _la===65)) { this._errHandler.recoverInline(this); } else { @@ -1347,7 +1352,7 @@ export default class LatexParser extends Parser { this.state = 285; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 17: + case 19: { this.state = 279; this.match(LatexParser.CMD_MATHRM); @@ -1359,7 +1364,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 71: + case 73: { this.state = 284; this.id(); @@ -1404,7 +1409,7 @@ export default class LatexParser extends Parser { this.state = 299; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 17: + case 19: { this.state = 293; localctx._MATHRM_0 = this.match(LatexParser.CMD_MATHRM); @@ -1416,7 +1421,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 71: + case 73: { this.state = 298; this.id(); @@ -1432,7 +1437,7 @@ export default class LatexParser extends Parser { this.state = 309; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 17: + case 19: { this.state = 303; localctx._MATHRM_1 = this.match(LatexParser.CMD_MATHRM); @@ -1444,7 +1449,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 71: + case 73: { this.state = 308; this.id(); @@ -1497,7 +1502,7 @@ export default class LatexParser extends Parser { this.state = 327; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 17: + case 19: { this.state = 321; localctx._MATHRM_0 = this.match(LatexParser.CMD_MATHRM); @@ -1509,7 +1514,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 71: + case 73: { this.state = 326; this.id(); @@ -1521,7 +1526,7 @@ export default class LatexParser extends Parser { this.state = 335; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 54: + case 56: { { this.state = 329; @@ -1535,7 +1540,7 @@ export default class LatexParser extends Parser { } } break; - case 62: + case 64: { this.state = 334; localctx._single_char_exp1 = this.match(LatexParser.CARET_SINGLE_CHAR_NUMBER); @@ -1551,7 +1556,7 @@ export default class LatexParser extends Parser { this.state = 345; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 17: + case 19: { this.state = 339; localctx._MATHRM_1 = this.match(LatexParser.CMD_MATHRM); @@ -1563,7 +1568,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 71: + case 73: { this.state = 344; this.id(); @@ -1581,7 +1586,7 @@ export default class LatexParser extends Parser { this.state = 356; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 54: + case 56: { { this.state = 350; @@ -1595,7 +1600,7 @@ export default class LatexParser extends Parser { } } break; - case 62: + case 64: { this.state = 355; localctx._single_char_exp2 = this.match(LatexParser.CARET_SINGLE_CHAR_NUMBER); @@ -1659,7 +1664,7 @@ export default class LatexParser extends Parser { this.state = 368; localctx._lower = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===56 || _la===58)) { + if(!(_la===58 || _la===60)) { localctx._lower = this._errHandler.recoverInline(this); } else { @@ -1671,7 +1676,7 @@ export default class LatexParser extends Parser { this.state = 370; localctx._upper = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===56 || _la===58)) { + if(!(_la===58 || _la===60)) { localctx._upper = this._errHandler.recoverInline(this); } else { @@ -1762,7 +1767,7 @@ export default class LatexParser extends Parser { this.state = 384; this._errHandler.sync(this); _la = this._input.LA(1); - } while (_la===60); + } while (_la===62); } } catch (re) { @@ -1791,7 +1796,7 @@ export default class LatexParser extends Parser { this.id(); this.state = 387; _la = this._input.LA(1); - if(!(_la===24 || _la===25)) { + if(!(_la===26 || _la===27)) { this._errHandler.recoverInline(this); } else { @@ -1855,7 +1860,7 @@ export default class LatexParser extends Parser { this.state = 397; this._errHandler.sync(this); _la = this._input.LA(1); - } while (_la===60); + } while (_la===62); } } catch (re) { @@ -1885,7 +1890,7 @@ export default class LatexParser extends Parser { this.state = 400; localctx._operator = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 56)) & ~0x1F) === 0 && ((1 << (_la - 56)) & 15) !== 0))) { + if(!(((((_la - 58)) & ~0x1F) === 0 && ((1 << (_la - 58)) & 15) !== 0))) { localctx._operator = this._errHandler.recoverInline(this); } else { @@ -1923,7 +1928,7 @@ export default class LatexParser extends Parser { this.state = 404; localctx._lower = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 56)) & ~0x1F) === 0 && ((1 << (_la - 56)) & 15) !== 0))) { + if(!(((((_la - 58)) & ~0x1F) === 0 && ((1 << (_la - 58)) & 15) !== 0))) { localctx._lower = this._errHandler.recoverInline(this); } else { @@ -1935,7 +1940,7 @@ export default class LatexParser extends Parser { this.state = 406; localctx._upper = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 56)) & ~0x1F) === 0 && ((1 << (_la - 56)) & 15) !== 0))) { + if(!(((((_la - 58)) & ~0x1F) === 0 && ((1 << (_la - 58)) & 15) !== 0))) { localctx._upper = this._errHandler.recoverInline(this); } else { @@ -1973,7 +1978,7 @@ export default class LatexParser extends Parser { this.state = 414; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===67) { + while (_la===69) { { { this.state = 410; @@ -2020,7 +2025,7 @@ export default class LatexParser extends Parser { this.state = 424; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===60) { + while (_la===62) { { { this.state = 420; @@ -2077,7 +2082,7 @@ export default class LatexParser extends Parser { this.state = 440; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 17: + case 19: { this.state = 434; this.match(LatexParser.CMD_MATHRM); @@ -2089,7 +2094,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 71: + case 73: { this.state = 439; this.id(); @@ -2106,7 +2111,7 @@ export default class LatexParser extends Parser { this.state = 448; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===60) { + while (_la===62) { { { this.state = 444; @@ -2182,7 +2187,7 @@ export default class LatexParser extends Parser { this.id(); this.state = 458; _la = this._input.LA(1); - if(!(_la===62 || _la===63)) { + if(!(_la===64 || _la===65)) { this._errHandler.recoverInline(this); } else { @@ -2248,7 +2253,7 @@ export default class LatexParser extends Parser { this.state = 480; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===68) { + while (_la===70) { { { this.state = 476; @@ -2318,7 +2323,7 @@ export default class LatexParser extends Parser { this.state = 491; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===28) { + if (_la===30) { { this.state = 490; this.match(LatexParser.BACKSLASH); @@ -2343,7 +2348,7 @@ export default class LatexParser extends Parser { this.state = 499; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===28) { + if (_la===30) { { this.state = 498; this.match(LatexParser.BACKSLASH); @@ -2388,7 +2393,7 @@ export default class LatexParser extends Parser { _prevctx = localctx; this.state = 514; _la = this._input.LA(1); - if(!(_la===46 || _la===47)) { + if(!(_la===48 || _la===49)) { this._errHandler.recoverInline(this); } else { @@ -2615,26 +2620,26 @@ export default class LatexParser extends Parser { this.state = 571; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 61: + case 63: { this.state = 568; this.match(LatexParser.DECIMAL_POINT); } break; - case 53: - case 64: + case 55: + case 66: { this.state = 569; this.number_(); } break; - case 55: + case 57: { this.state = 570; this.match(LatexParser.EQ); } break; - case 17: + case 19: break; default: break; @@ -2752,7 +2757,7 @@ export default class LatexParser extends Parser { } this.state = 597; _la = this._input.LA(1); - if(!(_la===62 || _la===63)) { + if(!(_la===64 || _la===65)) { this._errHandler.recoverInline(this); } else { @@ -3033,7 +3038,7 @@ export default class LatexParser extends Parser { this.u_expr(0); this.state = 653; _la = this._input.LA(1); - if(!(_la===77 || _la===78)) { + if(!(_la===79 || _la===80)) { this._errHandler.recoverInline(this); } else { @@ -3076,7 +3081,7 @@ export default class LatexParser extends Parser { this.state = 656; localctx._numRows = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===91 || _la===92)) { + if(!(_la===93 || _la===94)) { localctx._numRows = this._errHandler.recoverInline(this); } else { @@ -3085,7 +3090,7 @@ export default class LatexParser extends Parser { } this.state = 657; _la = this._input.LA(1); - if(!(_la===82 || _la===84)) { + if(!(_la===84 || _la===86)) { this._errHandler.recoverInline(this); } else { @@ -3095,7 +3100,7 @@ export default class LatexParser extends Parser { this.state = 658; localctx._numColumns = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===91 || _la===92)) { + if(!(_la===93 || _la===94)) { localctx._numColumns = this._errHandler.recoverInline(this); } else { @@ -3104,7 +3109,7 @@ export default class LatexParser extends Parser { } this.state = 659; _la = this._input.LA(1); - if(!(_la===77 || _la===78)) { + if(!(_la===79 || _la===80)) { this._errHandler.recoverInline(this); } else { @@ -3136,7 +3141,7 @@ export default class LatexParser extends Parser { this.state = 669; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 79: + case 81: this.enterOuterAlt(localctx, 1); { this.state = 661; @@ -3145,7 +3150,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.U_L_BRACE); this.state = 663; _la = this._input.LA(1); - if(!(_la===91 || _la===92)) { + if(!(_la===93 || _la===94)) { this._errHandler.recoverInline(this); } else { @@ -3162,7 +3167,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.U_R_BRACE); } break; - case 80: + case 82: this.enterOuterAlt(localctx, 2); { this.state = 668; @@ -3209,7 +3214,7 @@ export default class LatexParser extends Parser { this.state = 693; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 83: + case 85: { localctx = new UnitSqrtContext(this, localctx); this._ctx = localctx; @@ -3225,7 +3230,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.U_R_BRACE); } break; - case 79: + case 81: { localctx = new UnitDivideContext(this, localctx); this._ctx = localctx; @@ -3237,16 +3242,16 @@ export default class LatexParser extends Parser { this.state = 681; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 79: - case 83: - case 86: - case 87: + case 81: + case 85: + case 88: + case 89: { this.state = 679; this.u_expr(0); } break; - case 91: + case 93: { this.state = 680; this.match(LatexParser.U_ONE); @@ -3265,7 +3270,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.U_R_BRACE); } break; - case 86: + case 88: { localctx = new UnitNameContext(this, localctx); this._ctx = localctx; @@ -3274,7 +3279,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.U_NAME); } break; - case 87: + case 89: { localctx = new UnitSubExprContext(this, localctx); this._ctx = localctx; @@ -3480,66 +3485,66 @@ export default class LatexParser extends Parser { return true; } - public static readonly _serializedATN: number[] = [4,1,99,721,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,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, - 1,0,1,0,1,0,1,0,3,0,86,8,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,3,1,100,8,1,1,1,3,1,103,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,3,1,116,8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, - 3,2,132,8,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,145,8,2,1,3, - 5,3,148,8,3,10,3,12,3,151,9,3,1,3,1,3,5,3,155,8,3,10,3,12,3,158,9,3,4,3, - 160,8,3,11,3,12,3,161,1,4,1,4,1,5,3,5,167,8,5,1,5,1,5,1,6,1,6,1,6,3,6,174, - 8,6,1,6,1,6,1,7,1,7,3,7,180,8,7,1,7,1,7,1,7,1,8,1,8,1,8,4,8,188,8,8,11, - 8,12,8,189,1,9,1,9,1,9,3,9,195,8,9,1,10,1,10,1,10,3,10,200,8,10,1,11,1, - 11,1,11,1,11,1,12,1,12,3,12,208,8,12,1,12,1,12,1,12,1,12,1,12,1,12,5,12, - 216,8,12,10,12,12,12,219,9,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1, - 14,3,14,230,8,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15, - 1,15,3,15,244,8,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,3,15,255, - 8,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,3,16,267,8,16,1, - 16,1,16,1,16,1,16,1,16,1,16,3,16,275,8,16,1,16,1,16,1,16,1,16,1,16,1,16, - 1,16,1,16,1,16,3,16,286,8,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1, - 17,1,17,1,17,1,17,3,17,300,8,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17, - 3,17,310,8,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1, - 18,1,18,1,18,1,18,1,18,3,18,328,8,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18, - 336,8,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,346,8,18,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,357,8,18,1,18,1,18,1,18,1,18,1, - 18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,374,8,19,1,20, - 1,20,3,20,378,8,20,1,21,1,21,1,21,4,21,383,8,21,11,21,12,21,384,1,22,1, - 22,1,22,1,22,3,22,391,8,22,1,23,1,23,1,23,4,23,396,8,23,11,23,12,23,397, - 1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,26,5,26,413, - 8,26,10,26,12,26,416,9,26,1,27,1,27,1,27,1,27,1,27,5,27,423,8,27,10,27, - 12,27,426,9,27,1,27,1,27,1,27,1,27,1,27,3,27,433,8,27,1,28,1,28,1,28,1, - 28,1,28,1,28,3,28,441,8,28,1,28,1,28,1,28,1,28,5,28,447,8,28,10,28,12,28, - 450,9,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, - 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, - 5,29,479,8,29,10,29,12,29,482,9,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, - 29,3,29,492,8,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,500,8,29,1,29,1,29, + public static readonly _serializedATN: number[] = [4,1,101,721,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,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, + 1,0,1,0,1,0,1,0,1,0,3,0,86,8,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,3,1,100,8,1,1,1,3,1,103,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,3,1,116,8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, + 1,2,3,2,132,8,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,145,8,2, + 1,3,5,3,148,8,3,10,3,12,3,151,9,3,1,3,1,3,5,3,155,8,3,10,3,12,3,158,9,3, + 4,3,160,8,3,11,3,12,3,161,1,4,1,4,1,5,3,5,167,8,5,1,5,1,5,1,6,1,6,1,6,3, + 6,174,8,6,1,6,1,6,1,7,1,7,3,7,180,8,7,1,7,1,7,1,7,1,8,1,8,1,8,4,8,188,8, + 8,11,8,12,8,189,1,9,1,9,1,9,3,9,195,8,9,1,10,1,10,1,10,3,10,200,8,10,1, + 11,1,11,1,11,1,11,1,12,1,12,3,12,208,8,12,1,12,1,12,1,12,1,12,1,12,1,12, + 5,12,216,8,12,10,12,12,12,219,9,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1, + 13,1,14,3,14,230,8,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15, + 1,15,1,15,3,15,244,8,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,3, + 15,255,8,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,3,16,267, + 8,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,275,8,16,1,16,1,16,1,16,1,16,1, + 16,1,16,1,16,1,16,1,16,3,16,286,8,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17, + 1,17,1,17,1,17,1,17,1,17,3,17,300,8,17,1,17,1,17,1,17,1,17,1,17,1,17,1, + 17,1,17,3,17,310,8,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18, + 1,18,1,18,1,18,1,18,1,18,1,18,3,18,328,8,18,1,18,1,18,1,18,1,18,1,18,1, + 18,3,18,336,8,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,346,8,18, + 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,357,8,18,1,18,1,18,1, + 18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,374, + 8,19,1,20,1,20,3,20,378,8,20,1,21,1,21,1,21,4,21,383,8,21,11,21,12,21,384, + 1,22,1,22,1,22,1,22,3,22,391,8,22,1,23,1,23,1,23,4,23,396,8,23,11,23,12, + 23,397,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,26, + 5,26,413,8,26,10,26,12,26,416,9,26,1,27,1,27,1,27,1,27,1,27,5,27,423,8, + 27,10,27,12,27,426,9,27,1,27,1,27,1,27,1,27,1,27,3,27,433,8,27,1,28,1,28, + 1,28,1,28,1,28,1,28,3,28,441,8,28,1,28,1,28,1,28,1,28,5,28,447,8,28,10, + 28,12,28,450,9,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, + 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, + 29,1,29,5,29,479,8,29,10,29,12,29,482,9,29,1,29,1,29,1,29,1,29,1,29,1,29, + 1,29,1,29,3,29,492,8,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,500,8,29,1,29, 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, - 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,560, - 8,29,1,29,1,29,1,29,1,29,1,29,3,29,567,8,29,1,29,1,29,1,29,3,29,572,8,29, - 1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,581,8,29,3,29,583,8,29,1,29,1,29, + 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29, + 560,8,29,1,29,1,29,1,29,1,29,1,29,3,29,567,8,29,1,29,1,29,1,29,3,29,572, + 8,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,581,8,29,3,29,583,8,29,1,29, 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, - 1,29,1,29,5,29,647,8,29,10,29,12,29,650,9,29,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,32,1,32,3,32,670, - 8,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,3,33,682,8,33,1, - 33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,3,33,694,8,33,1,33,1,33, - 1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1, - 33,1,33,1,33,1,33,5,33,716,8,33,10,33,12,33,719,9,33,1,33,2,149,156,2,58, - 66,34,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46, - 48,50,52,54,56,58,60,62,64,66,0,11,1,0,30,42,1,0,15,16,1,0,62,63,2,0,56, - 56,58,58,1,0,24,25,1,0,56,59,1,0,46,47,1,0,1,2,1,0,77,78,1,0,91,92,2,0, - 82,82,84,84,818,0,85,1,0,0,0,2,99,1,0,0,0,4,117,1,0,0,0,6,149,1,0,0,0,8, - 163,1,0,0,0,10,166,1,0,0,0,12,173,1,0,0,0,14,179,1,0,0,0,16,184,1,0,0,0, - 18,191,1,0,0,0,20,196,1,0,0,0,22,201,1,0,0,0,24,207,1,0,0,0,26,222,1,0, - 0,0,28,229,1,0,0,0,30,243,1,0,0,0,32,266,1,0,0,0,34,291,1,0,0,0,36,319, + 1,29,1,29,1,29,5,29,647,8,29,10,29,12,29,650,9,29,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,32,1,32,3,32, + 670,8,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,3,33,682,8,33, + 1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,3,33,694,8,33,1,33,1, + 33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33, + 1,33,1,33,1,33,1,33,5,33,716,8,33,10,33,12,33,719,9,33,1,33,2,149,156,2, + 58,66,34,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44, + 46,48,50,52,54,56,58,60,62,64,66,0,11,1,0,32,44,1,0,17,18,1,0,64,65,2,0, + 58,58,60,60,1,0,26,27,1,0,58,61,1,0,48,49,1,0,1,2,1,0,79,80,1,0,93,94,2, + 0,84,84,86,86,818,0,85,1,0,0,0,2,99,1,0,0,0,4,117,1,0,0,0,6,149,1,0,0,0, + 8,163,1,0,0,0,10,166,1,0,0,0,12,173,1,0,0,0,14,179,1,0,0,0,16,184,1,0,0, + 0,18,191,1,0,0,0,20,196,1,0,0,0,22,201,1,0,0,0,24,207,1,0,0,0,26,222,1, + 0,0,0,28,229,1,0,0,0,30,243,1,0,0,0,32,266,1,0,0,0,34,291,1,0,0,0,36,319, 1,0,0,0,38,373,1,0,0,0,40,377,1,0,0,0,42,379,1,0,0,0,44,386,1,0,0,0,46, 392,1,0,0,0,48,399,1,0,0,0,50,403,1,0,0,0,52,409,1,0,0,0,54,417,1,0,0,0, 56,440,1,0,0,0,58,582,1,0,0,0,60,651,1,0,0,0,62,655,1,0,0,0,64,669,1,0, @@ -3551,129 +3556,129 @@ export default class LatexParser extends Parser { 0,0,85,74,1,0,0,0,85,75,1,0,0,0,85,76,1,0,0,0,85,77,1,0,0,0,85,78,1,0,0, 0,85,79,1,0,0,0,85,80,1,0,0,0,85,81,1,0,0,0,85,82,1,0,0,0,85,83,1,0,0,0, 85,84,1,0,0,0,85,86,1,0,0,0,86,87,1,0,0,0,87,88,5,0,0,1,88,1,1,0,0,0,89, - 90,5,6,0,0,90,91,3,58,29,0,91,92,5,60,0,0,92,93,3,58,29,0,93,94,5,7,0,0, - 94,100,1,0,0,0,95,96,3,58,29,0,96,97,5,60,0,0,97,98,3,58,29,0,98,100,1, - 0,0,0,99,89,1,0,0,0,99,95,1,0,0,0,100,102,1,0,0,0,101,103,5,29,0,0,102, - 101,1,0,0,0,102,103,1,0,0,0,103,104,1,0,0,0,104,115,5,55,0,0,105,106,5, - 6,0,0,106,107,3,60,30,0,107,108,5,60,0,0,108,109,3,60,30,0,109,110,5,7, - 0,0,110,116,1,0,0,0,111,112,3,60,30,0,112,113,5,60,0,0,113,114,3,60,30, + 90,5,6,0,0,90,91,3,58,29,0,91,92,5,62,0,0,92,93,3,58,29,0,93,94,5,7,0,0, + 94,100,1,0,0,0,95,96,3,58,29,0,96,97,5,62,0,0,97,98,3,58,29,0,98,100,1, + 0,0,0,99,89,1,0,0,0,99,95,1,0,0,0,100,102,1,0,0,0,101,103,5,31,0,0,102, + 101,1,0,0,0,102,103,1,0,0,0,103,104,1,0,0,0,104,115,5,57,0,0,105,106,5, + 6,0,0,106,107,3,60,30,0,107,108,5,62,0,0,108,109,3,60,30,0,109,110,5,7, + 0,0,110,116,1,0,0,0,111,112,3,60,30,0,112,113,5,62,0,0,113,114,3,60,30, 0,114,116,1,0,0,0,115,105,1,0,0,0,115,111,1,0,0,0,115,116,1,0,0,0,116,3, - 1,0,0,0,117,118,5,6,0,0,118,119,3,58,29,0,119,120,5,60,0,0,120,121,3,58, - 29,0,121,122,5,7,0,0,122,123,1,0,0,0,123,124,5,71,0,0,124,125,5,6,0,0,125, - 126,3,38,19,0,126,131,5,7,0,0,127,128,5,71,0,0,128,129,3,10,5,0,129,130, - 5,71,0,0,130,132,1,0,0,0,131,127,1,0,0,0,131,132,1,0,0,0,132,133,1,0,0, - 0,133,144,5,55,0,0,134,135,5,6,0,0,135,136,3,60,30,0,136,137,5,60,0,0,137, + 1,0,0,0,117,118,5,6,0,0,118,119,3,58,29,0,119,120,5,62,0,0,120,121,3,58, + 29,0,121,122,5,7,0,0,122,123,1,0,0,0,123,124,5,73,0,0,124,125,5,6,0,0,125, + 126,3,38,19,0,126,131,5,7,0,0,127,128,5,73,0,0,128,129,3,10,5,0,129,130, + 5,73,0,0,130,132,1,0,0,0,131,127,1,0,0,0,131,132,1,0,0,0,132,133,1,0,0, + 0,133,144,5,57,0,0,134,135,5,6,0,0,135,136,3,60,30,0,136,137,5,62,0,0,137, 138,3,60,30,0,138,139,5,7,0,0,139,145,1,0,0,0,140,141,3,60,30,0,141,142, - 5,60,0,0,142,143,3,60,30,0,143,145,1,0,0,0,144,134,1,0,0,0,144,140,1,0, + 5,62,0,0,142,143,3,60,30,0,143,145,1,0,0,0,144,134,1,0,0,0,144,140,1,0, 0,0,144,145,1,0,0,0,145,5,1,0,0,0,146,148,9,0,0,0,147,146,1,0,0,0,148,151, 1,0,0,0,149,150,1,0,0,0,149,147,1,0,0,0,150,159,1,0,0,0,151,149,1,0,0,0, 152,156,3,62,31,0,153,155,9,0,0,0,154,153,1,0,0,0,155,158,1,0,0,0,156,157, 1,0,0,0,156,154,1,0,0,0,157,160,1,0,0,0,158,156,1,0,0,0,159,152,1,0,0,0, 160,161,1,0,0,0,161,159,1,0,0,0,161,162,1,0,0,0,162,7,1,0,0,0,163,164,5, - 71,0,0,164,9,1,0,0,0,165,167,5,53,0,0,166,165,1,0,0,0,166,167,1,0,0,0,167, - 168,1,0,0,0,168,169,5,64,0,0,169,11,1,0,0,0,170,174,3,10,5,0,171,174,5, - 12,0,0,172,174,3,8,4,0,173,170,1,0,0,0,173,171,1,0,0,0,173,172,1,0,0,0, + 73,0,0,164,9,1,0,0,0,165,167,5,55,0,0,166,165,1,0,0,0,166,167,1,0,0,0,167, + 168,1,0,0,0,168,169,5,66,0,0,169,11,1,0,0,0,170,174,3,10,5,0,171,174,5, + 14,0,0,172,174,3,8,4,0,173,170,1,0,0,0,173,171,1,0,0,0,173,172,1,0,0,0, 174,175,1,0,0,0,175,176,3,60,30,0,176,13,1,0,0,0,177,180,3,8,4,0,178,180, - 5,12,0,0,179,177,1,0,0,0,179,178,1,0,0,0,180,181,1,0,0,0,181,182,5,55,0, - 0,182,183,3,58,29,0,183,15,1,0,0,0,184,187,3,14,7,0,185,186,5,60,0,0,186, + 5,14,0,0,179,177,1,0,0,0,179,178,1,0,0,0,180,181,1,0,0,0,181,182,5,57,0, + 0,182,183,3,58,29,0,183,15,1,0,0,0,184,187,3,14,7,0,185,186,5,62,0,0,186, 188,3,14,7,0,187,185,1,0,0,0,188,189,1,0,0,0,189,187,1,0,0,0,189,190,1, - 0,0,0,190,17,1,0,0,0,191,192,3,14,7,0,192,194,5,55,0,0,193,195,3,60,30, + 0,0,0,190,17,1,0,0,0,191,192,3,14,7,0,192,194,5,57,0,0,193,195,3,60,30, 0,194,193,1,0,0,0,194,195,1,0,0,0,195,19,1,0,0,0,196,197,3,58,29,0,197, - 199,5,55,0,0,198,200,3,60,30,0,199,198,1,0,0,0,199,200,1,0,0,0,200,21,1, - 0,0,0,201,202,3,58,29,0,202,203,5,55,0,0,203,204,3,58,29,0,204,23,1,0,0, - 0,205,208,3,8,4,0,206,208,5,12,0,0,207,205,1,0,0,0,207,206,1,0,0,0,208, - 209,1,0,0,0,209,210,5,55,0,0,210,211,3,8,4,0,211,212,5,6,0,0,212,217,3, - 26,13,0,213,214,5,60,0,0,214,216,3,26,13,0,215,213,1,0,0,0,216,219,1,0, + 199,5,57,0,0,198,200,3,60,30,0,199,198,1,0,0,0,199,200,1,0,0,0,200,21,1, + 0,0,0,201,202,3,58,29,0,202,203,5,57,0,0,203,204,3,58,29,0,204,23,1,0,0, + 0,205,208,3,8,4,0,206,208,5,14,0,0,207,205,1,0,0,0,207,206,1,0,0,0,208, + 209,1,0,0,0,209,210,5,57,0,0,210,211,3,8,4,0,211,212,5,6,0,0,212,217,3, + 26,13,0,213,214,5,62,0,0,214,216,3,26,13,0,215,213,1,0,0,0,216,219,1,0, 0,0,217,215,1,0,0,0,217,218,1,0,0,0,218,220,1,0,0,0,219,217,1,0,0,0,220, 221,5,7,0,0,221,25,1,0,0,0,222,223,5,6,0,0,223,224,3,58,29,0,224,225,5, - 60,0,0,225,226,3,40,20,0,226,227,5,7,0,0,227,27,1,0,0,0,228,230,5,28,0, + 62,0,0,225,226,3,40,20,0,226,227,5,7,0,0,227,27,1,0,0,0,228,230,5,30,0, 0,229,228,1,0,0,0,229,230,1,0,0,0,230,231,1,0,0,0,231,232,7,0,0,0,232,233, - 5,6,0,0,233,234,3,58,29,0,234,235,5,7,0,0,235,29,1,0,0,0,236,244,5,13,0, - 0,237,238,5,14,0,0,238,239,5,4,0,0,239,240,5,5,0,0,240,241,5,54,0,0,241, + 5,6,0,0,233,234,3,58,29,0,234,235,5,7,0,0,235,29,1,0,0,0,236,244,5,15,0, + 0,237,238,5,16,0,0,238,239,5,4,0,0,239,240,5,5,0,0,240,241,5,56,0,0,241, 242,5,4,0,0,242,244,5,5,0,0,243,236,1,0,0,0,243,237,1,0,0,0,244,245,1,0, - 0,0,245,246,5,6,0,0,246,247,3,58,29,0,247,254,5,7,0,0,248,249,5,17,0,0, + 0,0,245,246,5,6,0,0,246,247,3,58,29,0,247,254,5,7,0,0,248,249,5,19,0,0, 249,250,5,4,0,0,250,251,3,8,4,0,251,252,5,5,0,0,252,255,1,0,0,0,253,255, 3,8,4,0,254,248,1,0,0,0,254,253,1,0,0,0,255,256,1,0,0,0,256,257,5,6,0,0, - 257,258,3,8,4,0,258,259,5,7,0,0,259,31,1,0,0,0,260,261,5,14,0,0,261,262, + 257,258,3,8,4,0,258,259,5,7,0,0,259,31,1,0,0,0,260,261,5,16,0,0,261,262, 5,4,0,0,262,263,3,58,29,0,263,264,5,5,0,0,264,267,1,0,0,0,265,267,7,1,0, - 0,266,260,1,0,0,0,266,265,1,0,0,0,267,274,1,0,0,0,268,269,5,54,0,0,269, + 0,266,260,1,0,0,0,266,265,1,0,0,0,267,274,1,0,0,0,268,269,5,56,0,0,269, 270,5,4,0,0,270,271,3,58,29,0,271,272,5,5,0,0,272,275,1,0,0,0,273,275,7, 2,0,0,274,268,1,0,0,0,274,273,1,0,0,0,275,276,1,0,0,0,276,277,5,6,0,0,277, - 278,3,58,29,0,278,285,5,7,0,0,279,280,5,17,0,0,280,281,5,4,0,0,281,282, + 278,3,58,29,0,278,285,5,7,0,0,279,280,5,19,0,0,280,281,5,4,0,0,281,282, 3,8,4,0,282,283,5,5,0,0,283,286,1,0,0,0,284,286,3,8,4,0,285,279,1,0,0,0, 285,284,1,0,0,0,286,287,1,0,0,0,287,288,5,6,0,0,288,289,3,8,4,0,289,290, - 5,7,0,0,290,33,1,0,0,0,291,292,5,18,0,0,292,299,5,4,0,0,293,294,5,17,0, + 5,7,0,0,290,33,1,0,0,0,291,292,5,20,0,0,292,299,5,4,0,0,293,294,5,19,0, 0,294,295,5,4,0,0,295,296,3,8,4,0,296,297,5,5,0,0,297,300,1,0,0,0,298,300, 3,8,4,0,299,293,1,0,0,0,299,298,1,0,0,0,300,301,1,0,0,0,301,302,5,5,0,0, - 302,309,5,4,0,0,303,304,5,17,0,0,304,305,5,4,0,0,305,306,3,8,4,0,306,307, + 302,309,5,4,0,0,303,304,5,19,0,0,304,305,5,4,0,0,305,306,3,8,4,0,306,307, 5,5,0,0,307,310,1,0,0,0,308,310,3,8,4,0,309,303,1,0,0,0,309,308,1,0,0,0, 310,311,1,0,0,0,311,312,5,6,0,0,312,313,3,8,4,0,313,314,5,7,0,0,314,315, 5,5,0,0,315,316,5,6,0,0,316,317,3,58,29,0,317,318,5,7,0,0,318,35,1,0,0, - 0,319,320,5,18,0,0,320,327,5,4,0,0,321,322,5,17,0,0,322,323,5,4,0,0,323, + 0,319,320,5,20,0,0,320,327,5,4,0,0,321,322,5,19,0,0,322,323,5,4,0,0,323, 324,3,8,4,0,324,325,5,5,0,0,325,328,1,0,0,0,326,328,3,8,4,0,327,321,1,0, - 0,0,327,326,1,0,0,0,328,335,1,0,0,0,329,330,5,54,0,0,330,331,5,4,0,0,331, - 332,3,10,5,0,332,333,5,5,0,0,333,336,1,0,0,0,334,336,5,62,0,0,335,329,1, + 0,0,327,326,1,0,0,0,328,335,1,0,0,0,329,330,5,56,0,0,330,331,5,4,0,0,331, + 332,3,10,5,0,332,333,5,5,0,0,333,336,1,0,0,0,334,336,5,64,0,0,335,329,1, 0,0,0,335,334,1,0,0,0,336,337,1,0,0,0,337,338,5,5,0,0,338,345,5,4,0,0,339, - 340,5,17,0,0,340,341,5,4,0,0,341,342,3,8,4,0,342,343,5,5,0,0,343,346,1, + 340,5,19,0,0,340,341,5,4,0,0,341,342,3,8,4,0,342,343,5,5,0,0,343,346,1, 0,0,0,344,346,3,8,4,0,345,339,1,0,0,0,345,344,1,0,0,0,346,347,1,0,0,0,347, - 348,5,6,0,0,348,349,3,8,4,0,349,356,5,7,0,0,350,351,5,54,0,0,351,352,5, - 4,0,0,352,353,3,10,5,0,353,354,5,5,0,0,354,357,1,0,0,0,355,357,5,62,0,0, + 348,5,6,0,0,348,349,3,8,4,0,349,356,5,7,0,0,350,351,5,56,0,0,351,352,5, + 4,0,0,352,353,3,10,5,0,353,354,5,5,0,0,354,357,1,0,0,0,355,357,5,64,0,0, 356,350,1,0,0,0,356,355,1,0,0,0,357,358,1,0,0,0,358,359,5,5,0,0,359,360, 5,6,0,0,360,361,3,58,29,0,361,362,5,7,0,0,362,37,1,0,0,0,363,364,3,8,4, - 0,364,365,5,55,0,0,365,366,3,58,29,0,366,374,1,0,0,0,367,368,3,58,29,0, + 0,364,365,5,57,0,0,365,366,3,58,29,0,366,374,1,0,0,0,367,368,3,58,29,0, 368,369,7,3,0,0,369,370,3,8,4,0,370,371,7,3,0,0,371,372,3,58,29,0,372,374, 1,0,0,0,373,363,1,0,0,0,373,367,1,0,0,0,374,39,1,0,0,0,375,378,3,48,24, 0,376,378,3,50,25,0,377,375,1,0,0,0,377,376,1,0,0,0,378,41,1,0,0,0,379, - 382,3,8,4,0,380,381,5,60,0,0,381,383,3,8,4,0,382,380,1,0,0,0,383,384,1, + 382,3,8,4,0,380,381,5,62,0,0,381,383,3,8,4,0,382,380,1,0,0,0,383,384,1, 0,0,0,384,382,1,0,0,0,384,385,1,0,0,0,385,43,1,0,0,0,386,387,3,8,4,0,387, 390,7,4,0,0,388,391,3,10,5,0,389,391,3,12,6,0,390,388,1,0,0,0,390,389,1, - 0,0,0,391,45,1,0,0,0,392,395,3,44,22,0,393,394,5,60,0,0,394,396,3,44,22, + 0,0,0,391,45,1,0,0,0,392,395,3,44,22,0,393,394,5,62,0,0,394,396,3,44,22, 0,395,393,1,0,0,0,396,397,1,0,0,0,397,395,1,0,0,0,397,398,1,0,0,0,398,47, 1,0,0,0,399,400,3,58,29,0,400,401,7,5,0,0,401,402,3,58,29,0,402,49,1,0, 0,0,403,404,3,58,29,0,404,405,7,5,0,0,405,406,3,58,29,0,406,407,7,5,0,0, - 407,408,3,58,29,0,408,51,1,0,0,0,409,414,3,58,29,0,410,411,5,67,0,0,411, + 407,408,3,58,29,0,408,51,1,0,0,0,409,414,3,58,29,0,410,411,5,69,0,0,411, 413,3,58,29,0,412,410,1,0,0,0,413,416,1,0,0,0,414,412,1,0,0,0,414,415,1, 0,0,0,415,53,1,0,0,0,416,414,1,0,0,0,417,418,3,8,4,0,418,419,5,6,0,0,419, - 424,3,38,19,0,420,421,5,60,0,0,421,423,3,38,19,0,422,420,1,0,0,0,423,426, + 424,3,38,19,0,420,421,5,62,0,0,421,423,3,38,19,0,422,420,1,0,0,0,423,426, 1,0,0,0,424,422,1,0,0,0,424,425,1,0,0,0,425,427,1,0,0,0,426,424,1,0,0,0, - 427,432,5,7,0,0,428,429,5,71,0,0,429,430,3,10,5,0,430,431,5,71,0,0,431, - 433,1,0,0,0,432,428,1,0,0,0,432,433,1,0,0,0,433,55,1,0,0,0,434,435,5,17, + 427,432,5,7,0,0,428,429,5,73,0,0,429,430,3,10,5,0,430,431,5,73,0,0,431, + 433,1,0,0,0,432,428,1,0,0,0,432,433,1,0,0,0,433,55,1,0,0,0,434,435,5,19, 0,0,435,436,5,4,0,0,436,437,3,8,4,0,437,438,5,5,0,0,438,441,1,0,0,0,439, 441,3,8,4,0,440,434,1,0,0,0,440,439,1,0,0,0,441,442,1,0,0,0,442,443,5,6, - 0,0,443,448,3,58,29,0,444,445,5,60,0,0,445,447,3,58,29,0,446,444,1,0,0, + 0,0,443,448,3,58,29,0,444,445,5,62,0,0,445,447,3,58,29,0,446,444,1,0,0, 0,447,450,1,0,0,0,448,446,1,0,0,0,448,449,1,0,0,0,449,451,1,0,0,0,450,448, 1,0,0,0,451,452,5,7,0,0,452,57,1,0,0,0,453,454,6,29,-1,0,454,455,3,8,4, - 0,455,456,5,70,0,0,456,583,1,0,0,0,457,458,3,8,4,0,458,459,7,2,0,0,459, - 460,5,69,0,0,460,583,1,0,0,0,461,462,3,8,4,0,462,463,5,54,0,0,463,464,5, - 4,0,0,464,465,3,58,29,0,465,466,5,5,0,0,466,467,5,69,0,0,467,583,1,0,0, - 0,468,583,5,23,0,0,469,470,5,22,0,0,470,471,5,4,0,0,471,472,3,58,29,0,472, - 473,5,5,0,0,473,583,1,0,0,0,474,475,5,65,0,0,475,480,3,52,26,0,476,477, - 5,68,0,0,477,479,3,52,26,0,478,476,1,0,0,0,479,482,1,0,0,0,480,478,1,0, - 0,0,480,481,1,0,0,0,481,483,1,0,0,0,482,480,1,0,0,0,483,484,5,66,0,0,484, + 0,455,456,5,72,0,0,456,583,1,0,0,0,457,458,3,8,4,0,458,459,7,2,0,0,459, + 460,5,71,0,0,460,583,1,0,0,0,461,462,3,8,4,0,462,463,5,56,0,0,463,464,5, + 4,0,0,464,465,3,58,29,0,465,466,5,5,0,0,466,467,5,71,0,0,467,583,1,0,0, + 0,468,583,5,25,0,0,469,470,5,24,0,0,470,471,5,4,0,0,471,472,3,58,29,0,472, + 473,5,5,0,0,473,583,1,0,0,0,474,475,5,67,0,0,475,480,3,52,26,0,476,477, + 5,70,0,0,477,479,3,52,26,0,478,476,1,0,0,0,479,482,1,0,0,0,480,478,1,0, + 0,0,480,481,1,0,0,0,481,483,1,0,0,0,482,480,1,0,0,0,483,484,5,68,0,0,484, 583,1,0,0,0,485,583,3,28,14,0,486,583,3,30,15,0,487,583,3,32,16,0,488,583, - 3,34,17,0,489,583,3,36,18,0,490,492,5,28,0,0,491,490,1,0,0,0,491,492,1, - 0,0,0,492,493,1,0,0,0,493,494,5,43,0,0,494,495,5,6,0,0,495,496,3,58,29, - 0,496,497,5,7,0,0,497,583,1,0,0,0,498,500,5,28,0,0,499,498,1,0,0,0,499, - 500,1,0,0,0,500,501,1,0,0,0,501,502,5,44,0,0,502,503,5,6,0,0,503,504,3, - 58,29,0,504,505,5,7,0,0,505,583,1,0,0,0,506,507,5,45,0,0,507,508,5,4,0, + 3,34,17,0,489,583,3,36,18,0,490,492,5,30,0,0,491,490,1,0,0,0,491,492,1, + 0,0,0,492,493,1,0,0,0,493,494,5,45,0,0,494,495,5,6,0,0,495,496,3,58,29, + 0,496,497,5,7,0,0,497,583,1,0,0,0,498,500,5,30,0,0,499,498,1,0,0,0,499, + 500,1,0,0,0,500,501,1,0,0,0,501,502,5,46,0,0,502,503,5,6,0,0,503,504,3, + 58,29,0,504,505,5,7,0,0,505,583,1,0,0,0,506,507,5,47,0,0,507,508,5,4,0, 0,508,509,3,58,29,0,509,510,5,5,0,0,510,511,5,6,0,0,511,512,3,58,29,0,512, 513,5,7,0,0,513,583,1,0,0,0,514,515,7,6,0,0,515,516,5,6,0,0,516,517,3,58, 29,0,517,518,5,7,0,0,518,583,1,0,0,0,519,520,5,9,0,0,520,521,3,58,29,0, 521,522,5,9,0,0,522,583,1,0,0,0,523,524,5,8,0,0,524,525,3,58,29,0,525,526, - 5,8,0,0,526,583,1,0,0,0,527,583,3,12,6,0,528,583,3,10,5,0,529,530,5,53, - 0,0,530,583,3,58,29,30,531,532,5,18,0,0,532,533,5,4,0,0,533,534,3,58,29, + 5,8,0,0,526,583,1,0,0,0,527,583,3,12,6,0,528,583,3,10,5,0,529,530,5,55, + 0,0,530,583,3,58,29,30,531,532,5,20,0,0,532,533,5,4,0,0,533,534,3,58,29, 0,534,535,5,5,0,0,535,536,5,4,0,0,536,537,3,58,29,0,537,538,5,5,0,0,538, - 583,1,0,0,0,539,583,5,19,0,0,540,583,3,8,4,0,541,583,3,54,27,0,542,583, - 3,56,28,0,543,583,5,12,0,0,544,545,5,6,0,0,545,546,3,58,29,0,546,547,5, + 583,1,0,0,0,539,583,5,21,0,0,540,583,3,8,4,0,541,583,3,54,27,0,542,583, + 3,56,28,0,543,583,5,14,0,0,544,545,5,6,0,0,545,546,3,58,29,0,546,547,5, 7,0,0,547,583,1,0,0,0,548,549,3,10,5,0,549,550,3,58,29,12,550,583,1,0,0, - 0,551,552,3,12,6,0,552,553,3,58,29,11,553,583,1,0,0,0,554,555,5,12,0,0, - 555,583,3,58,29,10,556,559,5,26,0,0,557,558,5,4,0,0,558,560,5,5,0,0,559, - 557,1,0,0,0,559,560,1,0,0,0,560,583,1,0,0,0,561,562,5,17,0,0,562,563,5, + 0,551,552,3,12,6,0,552,553,3,58,29,11,553,583,1,0,0,0,554,555,5,14,0,0, + 555,583,3,58,29,10,556,559,5,28,0,0,557,558,5,4,0,0,558,560,5,5,0,0,559, + 557,1,0,0,0,559,560,1,0,0,0,560,583,1,0,0,0,561,562,5,19,0,0,562,563,5, 4,0,0,563,564,3,58,29,0,564,565,5,5,0,0,565,567,1,0,0,0,566,561,1,0,0,0, - 566,567,1,0,0,0,567,571,1,0,0,0,568,572,5,61,0,0,569,572,3,10,5,0,570,572, - 5,55,0,0,571,568,1,0,0,0,571,569,1,0,0,0,571,570,1,0,0,0,571,572,1,0,0, - 0,572,573,1,0,0,0,573,574,5,17,0,0,574,575,5,4,0,0,575,576,3,58,29,0,576, - 580,5,5,0,0,577,581,5,61,0,0,578,581,3,10,5,0,579,581,5,55,0,0,580,577, + 566,567,1,0,0,0,567,571,1,0,0,0,568,572,5,63,0,0,569,572,3,10,5,0,570,572, + 5,57,0,0,571,568,1,0,0,0,571,569,1,0,0,0,571,570,1,0,0,0,571,572,1,0,0, + 0,572,573,1,0,0,0,573,574,5,19,0,0,574,575,5,4,0,0,575,576,3,58,29,0,576, + 580,5,5,0,0,577,581,5,63,0,0,578,581,3,10,5,0,579,581,5,57,0,0,580,577, 1,0,0,0,580,578,1,0,0,0,580,579,1,0,0,0,580,581,1,0,0,0,581,583,1,0,0,0, 582,453,1,0,0,0,582,457,1,0,0,0,582,461,1,0,0,0,582,468,1,0,0,0,582,469, 1,0,0,0,582,474,1,0,0,0,582,485,1,0,0,0,582,486,1,0,0,0,582,487,1,0,0,0, @@ -3682,18 +3687,18 @@ export default class LatexParser extends Parser { 582,528,1,0,0,0,582,529,1,0,0,0,582,531,1,0,0,0,582,539,1,0,0,0,582,540, 1,0,0,0,582,541,1,0,0,0,582,542,1,0,0,0,582,543,1,0,0,0,582,544,1,0,0,0, 582,548,1,0,0,0,582,551,1,0,0,0,582,554,1,0,0,0,582,556,1,0,0,0,582,566, - 1,0,0,0,583,648,1,0,0,0,584,585,10,29,0,0,585,586,5,21,0,0,586,647,3,58, - 29,30,587,588,10,28,0,0,588,589,5,20,0,0,589,647,3,58,29,29,590,591,10, - 25,0,0,591,592,5,53,0,0,592,647,3,58,29,26,593,594,10,24,0,0,594,595,5, - 52,0,0,595,647,3,58,29,25,596,597,10,51,0,0,597,647,7,2,0,0,598,599,10, - 50,0,0,599,600,5,54,0,0,600,601,5,4,0,0,601,602,3,58,29,0,602,603,5,5,0, + 1,0,0,0,583,648,1,0,0,0,584,585,10,29,0,0,585,586,5,23,0,0,586,647,3,58, + 29,30,587,588,10,28,0,0,588,589,5,22,0,0,589,647,3,58,29,29,590,591,10, + 25,0,0,591,592,5,55,0,0,592,647,3,58,29,26,593,594,10,24,0,0,594,595,5, + 54,0,0,595,647,3,58,29,25,596,597,10,51,0,0,597,647,7,2,0,0,598,599,10, + 50,0,0,599,600,5,56,0,0,600,601,5,4,0,0,601,602,3,58,29,0,602,603,5,5,0, 0,603,647,1,0,0,0,604,605,10,49,0,0,605,606,5,10,0,0,606,607,5,4,0,0,607, - 608,3,58,29,0,608,609,5,60,0,0,609,610,3,58,29,0,610,611,5,5,0,0,611,647, - 1,0,0,0,612,613,10,48,0,0,613,647,5,27,0,0,614,615,10,47,0,0,615,647,5, - 11,0,0,616,617,10,18,0,0,617,618,5,10,0,0,618,619,5,4,0,0,619,647,5,5,0, - 0,620,621,10,17,0,0,621,622,5,54,0,0,622,623,5,4,0,0,623,647,5,5,0,0,624, + 608,3,58,29,0,608,609,5,62,0,0,609,610,3,58,29,0,610,611,5,5,0,0,611,647, + 1,0,0,0,612,613,10,48,0,0,613,647,5,29,0,0,614,615,10,47,0,0,615,647,5, + 13,0,0,616,617,10,18,0,0,617,618,5,10,0,0,618,619,5,4,0,0,619,647,5,5,0, + 0,620,621,10,17,0,0,621,622,5,56,0,0,622,623,5,4,0,0,623,647,5,5,0,0,624, 625,10,16,0,0,625,647,3,8,4,0,626,627,10,15,0,0,627,647,3,10,5,0,628,629, - 10,14,0,0,629,647,3,12,6,0,630,631,10,13,0,0,631,647,5,12,0,0,632,633,10, + 10,14,0,0,629,647,3,12,6,0,630,631,10,13,0,0,631,647,5,14,0,0,632,633,10, 9,0,0,633,647,3,54,27,0,634,635,10,8,0,0,635,647,3,56,28,0,636,637,10,7, 0,0,637,647,3,28,14,0,638,639,10,6,0,0,639,647,3,30,15,0,640,641,10,5,0, 0,641,647,3,32,16,0,642,643,10,4,0,0,643,647,3,34,17,0,644,645,10,3,0,0, @@ -3705,21 +3710,21 @@ export default class LatexParser extends Parser { 1,0,0,0,647,650,1,0,0,0,648,646,1,0,0,0,648,649,1,0,0,0,649,59,1,0,0,0, 650,648,1,0,0,0,651,652,7,7,0,0,652,653,3,66,33,0,653,654,7,8,0,0,654,61, 1,0,0,0,655,656,7,7,0,0,656,657,7,9,0,0,657,658,7,10,0,0,658,659,7,9,0, - 0,659,660,7,8,0,0,660,63,1,0,0,0,661,662,5,79,0,0,662,663,5,89,0,0,663, - 664,7,9,0,0,664,665,5,90,0,0,665,666,5,89,0,0,666,667,5,92,0,0,667,670, - 5,90,0,0,668,670,5,80,0,0,669,661,1,0,0,0,669,668,1,0,0,0,670,65,1,0,0, - 0,671,672,6,33,-1,0,672,673,5,83,0,0,673,674,5,89,0,0,674,675,3,58,29,0, - 675,676,5,90,0,0,676,694,1,0,0,0,677,678,5,79,0,0,678,681,5,89,0,0,679, - 682,3,66,33,0,680,682,5,91,0,0,681,679,1,0,0,0,681,680,1,0,0,0,682,683, - 1,0,0,0,683,684,5,90,0,0,684,685,5,89,0,0,685,686,3,66,33,0,686,687,5,90, - 0,0,687,694,1,0,0,0,688,694,5,86,0,0,689,690,5,87,0,0,690,691,3,66,33,0, - 691,692,5,88,0,0,692,694,1,0,0,0,693,671,1,0,0,0,693,677,1,0,0,0,693,688, - 1,0,0,0,693,689,1,0,0,0,694,717,1,0,0,0,695,696,10,4,0,0,696,697,5,81,0, - 0,697,716,3,66,33,5,698,699,10,9,0,0,699,700,5,85,0,0,700,716,5,92,0,0, - 701,702,10,8,0,0,702,703,5,85,0,0,703,704,5,89,0,0,704,705,5,92,0,0,705, - 716,5,90,0,0,706,707,10,7,0,0,707,708,5,85,0,0,708,716,3,64,32,0,709,710, - 10,6,0,0,710,711,5,85,0,0,711,712,5,89,0,0,712,713,3,64,32,0,713,714,5, - 90,0,0,714,716,1,0,0,0,715,695,1,0,0,0,715,698,1,0,0,0,715,701,1,0,0,0, + 0,659,660,7,8,0,0,660,63,1,0,0,0,661,662,5,81,0,0,662,663,5,91,0,0,663, + 664,7,9,0,0,664,665,5,92,0,0,665,666,5,91,0,0,666,667,5,94,0,0,667,670, + 5,92,0,0,668,670,5,82,0,0,669,661,1,0,0,0,669,668,1,0,0,0,670,65,1,0,0, + 0,671,672,6,33,-1,0,672,673,5,85,0,0,673,674,5,91,0,0,674,675,3,58,29,0, + 675,676,5,92,0,0,676,694,1,0,0,0,677,678,5,81,0,0,678,681,5,91,0,0,679, + 682,3,66,33,0,680,682,5,93,0,0,681,679,1,0,0,0,681,680,1,0,0,0,682,683, + 1,0,0,0,683,684,5,92,0,0,684,685,5,91,0,0,685,686,3,66,33,0,686,687,5,92, + 0,0,687,694,1,0,0,0,688,694,5,88,0,0,689,690,5,89,0,0,690,691,3,66,33,0, + 691,692,5,90,0,0,692,694,1,0,0,0,693,671,1,0,0,0,693,677,1,0,0,0,693,688, + 1,0,0,0,693,689,1,0,0,0,694,717,1,0,0,0,695,696,10,4,0,0,696,697,5,83,0, + 0,697,716,3,66,33,5,698,699,10,9,0,0,699,700,5,87,0,0,700,716,5,94,0,0, + 701,702,10,8,0,0,702,703,5,87,0,0,703,704,5,91,0,0,704,705,5,94,0,0,705, + 716,5,92,0,0,706,707,10,7,0,0,707,708,5,87,0,0,708,716,3,64,32,0,709,710, + 10,6,0,0,710,711,5,87,0,0,711,712,5,91,0,0,712,713,3,64,32,0,713,714,5, + 92,0,0,714,716,1,0,0,0,715,695,1,0,0,0,715,698,1,0,0,0,715,701,1,0,0,0, 715,706,1,0,0,0,715,709,1,0,0,0,716,719,1,0,0,0,717,715,1,0,0,0,717,718, 1,0,0,0,718,67,1,0,0,0,719,717,1,0,0,0,54,85,99,102,115,131,144,149,156, 161,166,173,179,189,194,199,207,217,229,243,254,266,274,285,299,309,327, From b73db346a5f548b5bb670392b8d8b6108721429f Mon Sep 17 00:00:00 2001 From: mgreminger Date: Wed, 9 Oct 2024 16:10:10 -0500 Subject: [PATCH 2/9] feat: add summation parser rule and fix single char subscript regression --- src/parser/LatexLexer.g4 | 5 + src/parser/LatexLexer.ts | 918 ++++++------- src/parser/LatexParser.g4 | 4 + src/parser/LatexParser.ts | 2123 ++++++++++++++++-------------- src/parser/LatexParserVisitor.ts | 7 + 5 files changed, 1611 insertions(+), 1446 deletions(-) diff --git a/src/parser/LatexLexer.g4 b/src/parser/LatexLexer.g4 index fe3d7a1a..f33f9eea 100644 --- a/src/parser/LatexLexer.g4 +++ b/src/parser/LatexLexer.g4 @@ -16,7 +16,10 @@ DOUBLE_VBAR: '||' | '\\Vert' ; UNDERSCORE: '_' ; +fragment UNDERSCORE_SINGLE_CHAR_NUMBER: '_' [0-9]; + +fragment UNDERSCORE_SINGLE_CHAR_ID: '_' [a-zA-Z]; EXCLAMATION: '!' ; @@ -28,6 +31,8 @@ CMD_INT_UNDERSCORE: '\\int' [ ]* '_' ; CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER: '\\int' [ ]* UNDERSCORE_SINGLE_CHAR_NUMBER ; CMD_INT_UNDERSCORE_SINGLE_CHAR_ID: '\\int' [ ]* UNDERSCORE_SINGLE_CHAR_ID ; +CMD_SUM_UNDERSCORE: '\\sum' [ ]* '_' ; + CMD_MATHRM: '\\mathrm' ; CMD_FRAC: '\\frac' ; diff --git a/src/parser/LatexLexer.ts b/src/parser/LatexLexer.ts index b7a42f78..8e116adb 100644 --- a/src/parser/LatexLexer.ts +++ b/src/parser/LatexLexer.ts @@ -22,97 +22,96 @@ export default class LatexLexer extends Lexer { public static readonly VBAR = 8; public static readonly DOUBLE_VBAR = 9; public static readonly UNDERSCORE = 10; - public static readonly UNDERSCORE_SINGLE_CHAR_NUMBER = 11; - public static readonly UNDERSCORE_SINGLE_CHAR_ID = 12; - public static readonly EXCLAMATION = 13; - public static readonly PI = 14; - public static readonly CMD_INT = 15; - public static readonly CMD_INT_UNDERSCORE = 16; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 17; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 18; - public static readonly CMD_MATHRM = 19; - public static readonly CMD_FRAC = 20; - public static readonly CMD_FRAC_INTS = 21; - public static readonly CMD_CDOT = 22; - public static readonly CMD_TIMES = 23; - public static readonly CMD_SQRT = 24; - public static readonly CMD_SQRT_INT = 25; - public static readonly CMD_SIM = 26; - public static readonly CMD_APPROX = 27; - public static readonly CMD_PLACEHOLDER = 28; - public static readonly TRANSPOSE = 29; - public static readonly BACKSLASH = 30; - public static readonly AS_LINES = 31; - public static readonly CMD_SIN = 32; - public static readonly CMD_COS = 33; - public static readonly CMD_TAN = 34; - public static readonly CMD_COT = 35; - public static readonly CMD_SEC = 36; - public static readonly CMD_CSC = 37; - public static readonly CMD_ARCSIN = 38; - public static readonly CMD_ARCCOS = 39; - public static readonly CMD_ARCTAN = 40; - public static readonly CMD_SINH = 41; - public static readonly CMD_COSH = 42; - public static readonly CMD_TANH = 43; - public static readonly CMD_COTH = 44; - public static readonly CMD_LN = 45; - public static readonly CMD_LOG = 46; - public static readonly CMD_SLASH_LOG_UNDERSCORE = 47; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 48; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 49; - public static readonly COMMENT = 50; - public static readonly CMD_LEFT = 51; - public static readonly CMD_RIGHT = 52; - public static readonly DOUBLE_DOLLAR_SIGN = 53; - public static readonly ADD = 54; - public static readonly SUB = 55; - public static readonly CARET = 56; - public static readonly EQ = 57; - public static readonly LT = 58; - public static readonly GT = 59; - public static readonly LTE = 60; - public static readonly GTE = 61; - public static readonly COMMA = 62; - public static readonly DECIMAL_POINT = 63; - public static readonly CARET_SINGLE_CHAR_NUMBER = 64; - public static readonly CARET_SINGLE_CHAR_ID = 65; - public static readonly NUMBER = 66; - public static readonly BEGIN_MATRIX = 67; - public static readonly END_MATRIX = 68; - public static readonly AMPERSAND = 69; - public static readonly DOUBLE_BACKSLASH = 70; - public static readonly UNDERSCORE_SUBSCRIPT = 71; - public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 72; - public static readonly ID = 73; - public static readonly WS = 74; - public static readonly SLASH_SPACE = 75; - public static readonly SLASH_COLON = 76; - public static readonly NBSP = 77; - public static readonly ERROR_CHAR = 78; - public static readonly R_BRACKET = 79; - public static readonly ALT_R_BRACKET = 80; - public static readonly U_CMD_FRAC = 81; - public static readonly U_CMD_FRAC_INTS = 82; - public static readonly U_CMD_CDOT = 83; - public static readonly U_CMD_TIMES = 84; - public static readonly U_CMD_SQRT = 85; - public static readonly U_COMMA = 86; - public static readonly U_CARET = 87; - public static readonly U_NAME = 88; - public static readonly U_L_PAREN = 89; - public static readonly U_R_PAREN = 90; - public static readonly U_L_BRACE = 91; - public static readonly U_R_BRACE = 92; - public static readonly U_ONE = 93; - public static readonly U_NUMBER = 94; - public static readonly U_CMD_LEFT = 95; - public static readonly U_CMD_RIGHT = 96; - public static readonly U_WS = 97; - public static readonly U_SLASH_SPACE = 98; - public static readonly U_SLASH_COLON = 99; - public static readonly U_NBSP = 100; - public static readonly U_ERROR_CHAR = 101; + public static readonly EXCLAMATION = 11; + public static readonly PI = 12; + public static readonly CMD_INT = 13; + public static readonly CMD_INT_UNDERSCORE = 14; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 15; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 16; + public static readonly CMD_SUM_UNDERSCORE = 17; + public static readonly CMD_MATHRM = 18; + public static readonly CMD_FRAC = 19; + public static readonly CMD_FRAC_INTS = 20; + public static readonly CMD_CDOT = 21; + public static readonly CMD_TIMES = 22; + public static readonly CMD_SQRT = 23; + public static readonly CMD_SQRT_INT = 24; + public static readonly CMD_SIM = 25; + public static readonly CMD_APPROX = 26; + public static readonly CMD_PLACEHOLDER = 27; + public static readonly TRANSPOSE = 28; + public static readonly BACKSLASH = 29; + public static readonly AS_LINES = 30; + public static readonly CMD_SIN = 31; + public static readonly CMD_COS = 32; + public static readonly CMD_TAN = 33; + public static readonly CMD_COT = 34; + public static readonly CMD_SEC = 35; + public static readonly CMD_CSC = 36; + public static readonly CMD_ARCSIN = 37; + public static readonly CMD_ARCCOS = 38; + public static readonly CMD_ARCTAN = 39; + public static readonly CMD_SINH = 40; + public static readonly CMD_COSH = 41; + public static readonly CMD_TANH = 42; + public static readonly CMD_COTH = 43; + public static readonly CMD_LN = 44; + public static readonly CMD_LOG = 45; + public static readonly CMD_SLASH_LOG_UNDERSCORE = 46; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 47; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 48; + public static readonly COMMENT = 49; + public static readonly CMD_LEFT = 50; + public static readonly CMD_RIGHT = 51; + public static readonly DOUBLE_DOLLAR_SIGN = 52; + public static readonly ADD = 53; + public static readonly SUB = 54; + public static readonly CARET = 55; + public static readonly EQ = 56; + public static readonly LT = 57; + public static readonly GT = 58; + public static readonly LTE = 59; + public static readonly GTE = 60; + public static readonly COMMA = 61; + public static readonly DECIMAL_POINT = 62; + public static readonly CARET_SINGLE_CHAR_NUMBER = 63; + public static readonly CARET_SINGLE_CHAR_ID = 64; + public static readonly NUMBER = 65; + public static readonly BEGIN_MATRIX = 66; + public static readonly END_MATRIX = 67; + public static readonly AMPERSAND = 68; + public static readonly DOUBLE_BACKSLASH = 69; + public static readonly UNDERSCORE_SUBSCRIPT = 70; + public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 71; + public static readonly ID = 72; + public static readonly WS = 73; + public static readonly SLASH_SPACE = 74; + public static readonly SLASH_COLON = 75; + public static readonly NBSP = 76; + public static readonly ERROR_CHAR = 77; + public static readonly R_BRACKET = 78; + public static readonly ALT_R_BRACKET = 79; + public static readonly U_CMD_FRAC = 80; + public static readonly U_CMD_FRAC_INTS = 81; + public static readonly U_CMD_CDOT = 82; + public static readonly U_CMD_TIMES = 83; + public static readonly U_CMD_SQRT = 84; + public static readonly U_COMMA = 85; + public static readonly U_CARET = 86; + public static readonly U_NAME = 87; + public static readonly U_L_PAREN = 88; + public static readonly U_R_PAREN = 89; + public static readonly U_L_BRACE = 90; + public static readonly U_R_BRACE = 91; + public static readonly U_ONE = 92; + public static readonly U_NUMBER = 93; + public static readonly U_CMD_LEFT = 94; + public static readonly U_CMD_RIGHT = 95; + public static readonly U_WS = 96; + public static readonly U_SLASH_SPACE = 97; + public static readonly U_SLASH_COLON = 98; + public static readonly U_NBSP = 99; + public static readonly U_ERROR_CHAR = 100; public static readonly EOF = Token.EOF; public static readonly UNITS = 1; @@ -120,11 +119,11 @@ export default class LatexLexer extends Lexer { public static readonly literalNames: string[] = [ null, "'['", "'\\lbrack'", "';'", null, null, null, null, "'|'", null, "'_'", - null, null, "'!'", "'\\pi'", - "'\\int'", null, null, - null, "'\\mathrm'", null, + "'!'", "'\\pi'", "'\\int'", null, null, null, null, - null, "'\\sim'", "'\\approx'", + "'\\mathrm'", null, null, + null, null, null, null, + "'\\sim'", "'\\approx'", "'\\placeholder'", "'^{\\mathrm{T}}'", "'\\'", null, "'sin'", "'cos'", "'tan'", "'cot'", @@ -151,12 +150,11 @@ export default class LatexLexer extends Lexer { "SEMICOLON", "L_BRACE", "R_BRACE", "L_PAREN", "R_PAREN", "VBAR", "DOUBLE_VBAR", - "UNDERSCORE", "UNDERSCORE_SINGLE_CHAR_NUMBER", - "UNDERSCORE_SINGLE_CHAR_ID", - "EXCLAMATION", "PI", - "CMD_INT", "CMD_INT_UNDERSCORE", + "UNDERSCORE", "EXCLAMATION", + "PI", "CMD_INT", "CMD_INT_UNDERSCORE", "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", + "CMD_SUM_UNDERSCORE", "CMD_MATHRM", "CMD_FRAC", "CMD_FRAC_INTS", "CMD_CDOT", "CMD_TIMES", "CMD_SQRT", @@ -207,11 +205,11 @@ export default class LatexLexer extends Lexer { "R_PAREN", "VBAR", "DOUBLE_VBAR", "UNDERSCORE", "UNDERSCORE_SINGLE_CHAR_NUMBER", "UNDERSCORE_SINGLE_CHAR_ID", "EXCLAMATION", "PI", "CMD_INT", "CMD_INT_UNDERSCORE", "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", - "CMD_MATHRM", "CMD_FRAC", "CMD_FRAC_INTS", "CMD_CDOT", "CMD_TIMES", "CMD_SQRT", - "CMD_SQRT_INT", "CMD_SIM", "CMD_APPROX", "CMD_PLACEHOLDER", "TRANSPOSE", - "BACKSLASH", "AS_LINES", "CMD_SIN", "CMD_COS", "CMD_TAN", "CMD_COT", "CMD_SEC", - "CMD_CSC", "CMD_ARCSIN", "CMD_ARCCOS", "CMD_ARCTAN", "CMD_SINH", "CMD_COSH", - "CMD_TANH", "CMD_COTH", "CMD_LN", "CMD_LOG", "CMD_SLASH_LOG_UNDERSCORE", + "CMD_SUM_UNDERSCORE", "CMD_MATHRM", "CMD_FRAC", "CMD_FRAC_INTS", "CMD_CDOT", + "CMD_TIMES", "CMD_SQRT", "CMD_SQRT_INT", "CMD_SIM", "CMD_APPROX", "CMD_PLACEHOLDER", + "TRANSPOSE", "BACKSLASH", "AS_LINES", "CMD_SIN", "CMD_COS", "CMD_TAN", + "CMD_COT", "CMD_SEC", "CMD_CSC", "CMD_ARCSIN", "CMD_ARCCOS", "CMD_ARCTAN", + "CMD_SINH", "CMD_COSH", "CMD_TANH", "CMD_COTH", "CMD_LN", "CMD_LOG", "CMD_SLASH_LOG_UNDERSCORE", "CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID", "COMMENT", "CMD_LEFT", "CMD_RIGHT", "DOUBLE_DOLLAR_SIGN", "ADD", "SUB", "CARET", "EQ", "LT", "GT", "LTE", "GTE", "COMMA", "DECIMAL_POINT", "CARET_SINGLE_CHAR_NUMBER", @@ -243,7 +241,7 @@ export default class LatexLexer extends Lexer { public get modeNames(): string[] { return LatexLexer.modeNames; } - public static readonly _serializedATN: number[] = [4,0,101,1092,6,-1,6, + public static readonly _serializedATN: number[] = [4,0,100,1107,6,-1,6, -1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8, 7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15, 2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2, @@ -258,359 +256,363 @@ export default class LatexLexer extends Lexer { 81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2,85,7,85,2,86,7,86,2,87,7,87,2,88, 7,88,2,89,7,89,2,90,7,90,2,91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7, 95,2,96,7,96,2,97,7,97,2,98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102, - 7,102,2,103,7,103,2,104,7,104,2,105,7,105,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1, - 7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,248,8,8,1,9,1,9,1,10,1,10,1,10,1,11,1, - 11,1,11,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,15,1,15, - 1,15,1,15,1,15,1,15,5,15,275,8,15,10,15,12,15,278,9,15,1,15,1,15,1,16,1, - 16,1,16,1,16,1,16,1,16,5,16,288,8,16,10,16,12,16,291,9,16,1,16,1,16,1,17, - 1,17,1,17,1,17,1,17,1,17,5,17,301,8,17,10,17,12,17,304,9,17,1,17,1,17,1, - 18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,20, - 1,20,1,20,1,20,1,20,1,20,1,20,5,20,329,8,20,10,20,12,20,332,9,20,1,20,1, - 20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22, - 1,23,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,24,5,24,363, - 8,24,10,24,12,24,366,9,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,26,1,26, - 1,26,1,26,1,26,1,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,27,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,28,1,28,1,28,1,28, - 1,28,1,28,1,28,1,28,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,4,30,418,8, - 30,11,30,12,30,419,1,30,1,30,1,30,1,30,1,30,1,30,3,30,428,8,30,1,31,1,31, - 1,31,1,31,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, - 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,37,1,37, - 1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,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,45,1,45,1,45,1,45,1,46,1,46,1, - 46,1,46,1,46,1,46,5,46,508,8,46,10,46,12,46,511,9,46,1,46,1,46,1,47,1,47, - 1,47,1,47,1,47,1,47,5,47,521,8,47,10,47,12,47,524,9,47,1,47,1,47,1,48,1, - 48,1,48,1,48,1,48,1,48,5,48,534,8,48,10,48,12,48,537,9,48,1,48,1,48,1,49, - 1,49,1,49,1,49,1,49,1,49,1,49,1,49,5,49,549,8,49,10,49,12,49,552,9,49,1, - 49,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,50,1,50,3,50,565,8,50,1,50, - 1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,1,51,3,51,577,8,51,1,51,1,51,1, - 52,1,52,1,52,1,52,1,52,1,53,1,53,1,54,1,54,1,55,1,55,1,56,1,56,1,57,1,57, - 1,58,1,58,1,59,1,59,1,59,1,59,1,60,1,60,1,60,1,60,1,61,1,61,1,62,1,62,1, - 63,1,63,1,63,1,64,1,64,1,64,1,65,4,65,617,8,65,11,65,12,65,618,1,65,1,65, - 5,65,623,8,65,10,65,12,65,626,9,65,1,65,3,65,629,8,65,1,65,1,65,4,65,633, - 8,65,11,65,12,65,634,1,65,3,65,638,8,65,1,65,4,65,641,8,65,11,65,12,65, - 642,1,65,3,65,646,8,65,3,65,648,8,65,1,66,1,66,1,67,1,67,5,67,654,8,67, - 10,67,12,67,657,9,67,1,68,1,68,3,68,661,8,68,1,68,4,68,664,8,68,11,68,12, - 68,665,1,68,5,68,669,8,68,10,68,12,68,672,9,68,1,68,1,68,3,68,676,8,68, - 1,68,5,68,679,8,68,10,68,12,68,682,9,68,1,68,1,68,1,68,1,68,1,68,1,68,1, - 68,3,68,691,8,68,1,68,4,68,694,8,68,11,68,12,68,695,1,68,1,68,3,68,700, - 8,68,3,68,702,8,68,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, - 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69, - 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, - 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69, - 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, - 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69, - 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, - 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69, - 1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1, - 69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,1,69,3,69, - 844,8,69,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, - 70,1,70,1,70,1,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, - 1,71,1,71,1,71,1,72,1,72,1,73,1,73,1,73,1,74,5,74,882,8,74,10,74,12,74, - 885,9,74,1,74,1,74,1,74,1,74,4,74,891,8,74,11,74,12,74,892,1,74,1,74,5, - 74,897,8,74,10,74,12,74,900,9,74,1,74,1,74,3,74,904,8,74,3,74,906,8,74, - 1,75,1,75,1,75,1,75,1,76,1,76,3,76,914,8,76,1,76,3,76,917,8,76,1,77,4,77, - 920,8,77,11,77,12,77,921,1,77,1,77,1,78,1,78,1,78,1,78,1,78,1,79,1,79,1, - 79,1,79,1,79,1,80,1,80,1,80,1,80,1,81,1,81,1,82,1,82,1,82,1,82,1,83,1,83, - 1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,83,1,84,1,84,1,84,1,84,1,84,1,84,1, - 85,1,85,1,85,1,85,1,85,1,85,1,85,5,85,969,8,85,10,85,12,85,972,9,85,1,85, - 1,85,1,85,1,86,1,86,1,86,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,87,1, - 87,1,88,1,88,1,88,1,88,1,88,1,88,1,89,1,89,1,90,1,90,1,91,1,91,5,91,1002, - 8,91,10,91,12,91,1005,9,91,1,92,1,92,1,93,1,93,1,94,1,94,1,95,1,95,1,96, - 1,96,1,97,3,97,1018,8,97,1,97,4,97,1021,8,97,11,97,12,97,1022,1,97,1,97, - 5,97,1027,8,97,10,97,12,97,1030,9,97,1,97,3,97,1033,8,97,1,97,1,97,4,97, - 1037,8,97,11,97,12,97,1038,1,97,3,97,1042,8,97,1,97,4,97,1045,8,97,11,97, - 12,97,1046,3,97,1049,8,97,1,98,1,98,1,99,1,99,1,99,1,99,1,99,1,99,1,99, - 1,99,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,100,1,101,4,101, - 1071,8,101,11,101,12,101,1072,1,101,1,101,1,102,1,102,1,102,1,102,1,102, - 1,103,1,103,1,103,1,103,1,103,1,104,1,104,1,104,1,104,1,105,1,105,1,550, - 0,106,2,1,4,2,6,3,8,4,10,5,12,6,14,7,16,8,18,9,20,10,22,11,24,12,26,13, - 28,14,30,15,32,16,34,17,36,18,38,19,40,20,42,21,44,22,46,23,48,24,50,25, - 52,26,54,27,56,28,58,29,60,30,62,31,64,32,66,33,68,34,70,35,72,36,74,37, - 76,38,78,39,80,40,82,41,84,42,86,43,88,44,90,45,92,46,94,47,96,48,98,49, - 100,50,102,51,104,52,106,53,108,54,110,55,112,56,114,57,116,58,118,59,120, - 60,122,61,124,62,126,63,128,64,130,65,132,66,134,0,136,0,138,0,140,0,142, - 67,144,68,146,69,148,70,150,71,152,72,154,73,156,74,158,75,160,76,162,77, - 164,78,166,79,168,80,170,81,172,82,174,83,176,84,178,85,180,86,182,87,184, - 88,186,89,188,90,190,91,192,92,194,93,196,94,198,0,200,95,202,96,204,97, - 206,98,208,99,210,100,212,101,2,0,1,8,1,0,48,57,2,0,65,90,97,122,1,0,32, - 32,1,0,115,115,3,0,48,57,65,90,97,122,2,0,69,69,101,101,2,0,43,43,45,45, - 3,0,9,10,13,13,32,32,1171,0,2,1,0,0,0,0,4,1,0,0,0,0,6,1,0,0,0,0,8,1,0,0, - 0,0,10,1,0,0,0,0,12,1,0,0,0,0,14,1,0,0,0,0,16,1,0,0,0,0,18,1,0,0,0,0,20, - 1,0,0,0,0,22,1,0,0,0,0,24,1,0,0,0,0,26,1,0,0,0,0,28,1,0,0,0,0,30,1,0,0, - 0,0,32,1,0,0,0,0,34,1,0,0,0,0,36,1,0,0,0,0,38,1,0,0,0,0,40,1,0,0,0,0,42, - 1,0,0,0,0,44,1,0,0,0,0,46,1,0,0,0,0,48,1,0,0,0,0,50,1,0,0,0,0,52,1,0,0, - 0,0,54,1,0,0,0,0,56,1,0,0,0,0,58,1,0,0,0,0,60,1,0,0,0,0,62,1,0,0,0,0,64, - 1,0,0,0,0,66,1,0,0,0,0,68,1,0,0,0,0,70,1,0,0,0,0,72,1,0,0,0,0,74,1,0,0, - 0,0,76,1,0,0,0,0,78,1,0,0,0,0,80,1,0,0,0,0,82,1,0,0,0,0,84,1,0,0,0,0,86, - 1,0,0,0,0,88,1,0,0,0,0,90,1,0,0,0,0,92,1,0,0,0,0,94,1,0,0,0,0,96,1,0,0, - 0,0,98,1,0,0,0,0,100,1,0,0,0,0,102,1,0,0,0,0,104,1,0,0,0,0,106,1,0,0,0, - 0,108,1,0,0,0,0,110,1,0,0,0,0,112,1,0,0,0,0,114,1,0,0,0,0,116,1,0,0,0,0, - 118,1,0,0,0,0,120,1,0,0,0,0,122,1,0,0,0,0,124,1,0,0,0,0,126,1,0,0,0,0,128, - 1,0,0,0,0,130,1,0,0,0,0,132,1,0,0,0,0,142,1,0,0,0,0,144,1,0,0,0,0,146,1, - 0,0,0,0,148,1,0,0,0,0,150,1,0,0,0,0,152,1,0,0,0,0,154,1,0,0,0,0,156,1,0, - 0,0,0,158,1,0,0,0,0,160,1,0,0,0,0,162,1,0,0,0,0,164,1,0,0,0,1,166,1,0,0, - 0,1,168,1,0,0,0,1,170,1,0,0,0,1,172,1,0,0,0,1,174,1,0,0,0,1,176,1,0,0,0, - 1,178,1,0,0,0,1,180,1,0,0,0,1,182,1,0,0,0,1,184,1,0,0,0,1,186,1,0,0,0,1, - 188,1,0,0,0,1,190,1,0,0,0,1,192,1,0,0,0,1,194,1,0,0,0,1,196,1,0,0,0,1,200, - 1,0,0,0,1,202,1,0,0,0,1,204,1,0,0,0,1,206,1,0,0,0,1,208,1,0,0,0,1,210,1, - 0,0,0,1,212,1,0,0,0,2,214,1,0,0,0,4,218,1,0,0,0,6,228,1,0,0,0,8,230,1,0, - 0,0,10,232,1,0,0,0,12,234,1,0,0,0,14,236,1,0,0,0,16,238,1,0,0,0,18,247, - 1,0,0,0,20,249,1,0,0,0,22,251,1,0,0,0,24,254,1,0,0,0,26,257,1,0,0,0,28, - 259,1,0,0,0,30,263,1,0,0,0,32,268,1,0,0,0,34,281,1,0,0,0,36,294,1,0,0,0, - 38,307,1,0,0,0,40,315,1,0,0,0,42,321,1,0,0,0,44,336,1,0,0,0,46,342,1,0, - 0,0,48,349,1,0,0,0,50,355,1,0,0,0,52,369,1,0,0,0,54,374,1,0,0,0,56,382, - 1,0,0,0,58,395,1,0,0,0,60,409,1,0,0,0,62,411,1,0,0,0,64,429,1,0,0,0,66, - 433,1,0,0,0,68,437,1,0,0,0,70,441,1,0,0,0,72,445,1,0,0,0,74,449,1,0,0,0, - 76,453,1,0,0,0,78,460,1,0,0,0,80,467,1,0,0,0,82,474,1,0,0,0,84,479,1,0, - 0,0,86,484,1,0,0,0,88,489,1,0,0,0,90,494,1,0,0,0,92,497,1,0,0,0,94,501, - 1,0,0,0,96,514,1,0,0,0,98,527,1,0,0,0,100,540,1,0,0,0,102,557,1,0,0,0,104, - 568,1,0,0,0,106,580,1,0,0,0,108,585,1,0,0,0,110,587,1,0,0,0,112,589,1,0, - 0,0,114,591,1,0,0,0,116,593,1,0,0,0,118,595,1,0,0,0,120,597,1,0,0,0,122, - 601,1,0,0,0,124,605,1,0,0,0,126,607,1,0,0,0,128,609,1,0,0,0,130,612,1,0, - 0,0,132,647,1,0,0,0,134,649,1,0,0,0,136,651,1,0,0,0,138,701,1,0,0,0,140, - 703,1,0,0,0,142,845,1,0,0,0,144,861,1,0,0,0,146,875,1,0,0,0,148,877,1,0, - 0,0,150,905,1,0,0,0,152,907,1,0,0,0,154,913,1,0,0,0,156,919,1,0,0,0,158, - 925,1,0,0,0,160,930,1,0,0,0,162,935,1,0,0,0,164,939,1,0,0,0,166,941,1,0, - 0,0,168,945,1,0,0,0,170,955,1,0,0,0,172,961,1,0,0,0,174,976,1,0,0,0,176, - 982,1,0,0,0,178,989,1,0,0,0,180,995,1,0,0,0,182,997,1,0,0,0,184,999,1,0, - 0,0,186,1006,1,0,0,0,188,1008,1,0,0,0,190,1010,1,0,0,0,192,1012,1,0,0,0, - 194,1014,1,0,0,0,196,1048,1,0,0,0,198,1050,1,0,0,0,200,1052,1,0,0,0,202, - 1060,1,0,0,0,204,1070,1,0,0,0,206,1076,1,0,0,0,208,1081,1,0,0,0,210,1086, - 1,0,0,0,212,1090,1,0,0,0,214,215,5,91,0,0,215,216,1,0,0,0,216,217,6,0,0, - 0,217,3,1,0,0,0,218,219,5,92,0,0,219,220,5,108,0,0,220,221,5,98,0,0,221, - 222,5,114,0,0,222,223,5,97,0,0,223,224,5,99,0,0,224,225,5,107,0,0,225,226, - 1,0,0,0,226,227,6,1,0,0,227,5,1,0,0,0,228,229,5,59,0,0,229,7,1,0,0,0,230, - 231,5,123,0,0,231,9,1,0,0,0,232,233,5,125,0,0,233,11,1,0,0,0,234,235,5, - 40,0,0,235,13,1,0,0,0,236,237,5,41,0,0,237,15,1,0,0,0,238,239,5,124,0,0, - 239,17,1,0,0,0,240,241,5,124,0,0,241,248,5,124,0,0,242,243,5,92,0,0,243, - 244,5,86,0,0,244,245,5,101,0,0,245,246,5,114,0,0,246,248,5,116,0,0,247, - 240,1,0,0,0,247,242,1,0,0,0,248,19,1,0,0,0,249,250,5,95,0,0,250,21,1,0, - 0,0,251,252,5,95,0,0,252,253,7,0,0,0,253,23,1,0,0,0,254,255,5,95,0,0,255, - 256,7,1,0,0,256,25,1,0,0,0,257,258,5,33,0,0,258,27,1,0,0,0,259,260,5,92, - 0,0,260,261,5,112,0,0,261,262,5,105,0,0,262,29,1,0,0,0,263,264,5,92,0,0, - 264,265,5,105,0,0,265,266,5,110,0,0,266,267,5,116,0,0,267,31,1,0,0,0,268, - 269,5,92,0,0,269,270,5,105,0,0,270,271,5,110,0,0,271,272,5,116,0,0,272, - 276,1,0,0,0,273,275,7,2,0,0,274,273,1,0,0,0,275,278,1,0,0,0,276,274,1,0, - 0,0,276,277,1,0,0,0,277,279,1,0,0,0,278,276,1,0,0,0,279,280,5,95,0,0,280, - 33,1,0,0,0,281,282,5,92,0,0,282,283,5,105,0,0,283,284,5,110,0,0,284,285, - 5,116,0,0,285,289,1,0,0,0,286,288,7,2,0,0,287,286,1,0,0,0,288,291,1,0,0, - 0,289,287,1,0,0,0,289,290,1,0,0,0,290,292,1,0,0,0,291,289,1,0,0,0,292,293, - 3,22,10,0,293,35,1,0,0,0,294,295,5,92,0,0,295,296,5,105,0,0,296,297,5,110, - 0,0,297,298,5,116,0,0,298,302,1,0,0,0,299,301,7,2,0,0,300,299,1,0,0,0,301, - 304,1,0,0,0,302,300,1,0,0,0,302,303,1,0,0,0,303,305,1,0,0,0,304,302,1,0, - 0,0,305,306,3,24,11,0,306,37,1,0,0,0,307,308,5,92,0,0,308,309,5,109,0,0, - 309,310,5,97,0,0,310,311,5,116,0,0,311,312,5,104,0,0,312,313,5,114,0,0, - 313,314,5,109,0,0,314,39,1,0,0,0,315,316,5,92,0,0,316,317,5,102,0,0,317, - 318,5,114,0,0,318,319,5,97,0,0,319,320,5,99,0,0,320,41,1,0,0,0,321,322, - 5,92,0,0,322,323,5,102,0,0,323,324,5,114,0,0,324,325,5,97,0,0,325,326,5, - 99,0,0,326,330,1,0,0,0,327,329,7,2,0,0,328,327,1,0,0,0,329,332,1,0,0,0, - 330,328,1,0,0,0,330,331,1,0,0,0,331,333,1,0,0,0,332,330,1,0,0,0,333,334, - 7,0,0,0,334,335,7,0,0,0,335,43,1,0,0,0,336,337,5,92,0,0,337,338,5,99,0, - 0,338,339,5,100,0,0,339,340,5,111,0,0,340,341,5,116,0,0,341,45,1,0,0,0, - 342,343,5,92,0,0,343,344,5,116,0,0,344,345,5,105,0,0,345,346,5,109,0,0, - 346,347,5,101,0,0,347,348,5,115,0,0,348,47,1,0,0,0,349,350,5,92,0,0,350, - 351,5,115,0,0,351,352,5,113,0,0,352,353,5,114,0,0,353,354,5,116,0,0,354, - 49,1,0,0,0,355,356,5,92,0,0,356,357,5,115,0,0,357,358,5,113,0,0,358,359, - 5,114,0,0,359,360,5,116,0,0,360,364,1,0,0,0,361,363,7,2,0,0,362,361,1,0, - 0,0,363,366,1,0,0,0,364,362,1,0,0,0,364,365,1,0,0,0,365,367,1,0,0,0,366, - 364,1,0,0,0,367,368,7,0,0,0,368,51,1,0,0,0,369,370,5,92,0,0,370,371,5,115, - 0,0,371,372,5,105,0,0,372,373,5,109,0,0,373,53,1,0,0,0,374,375,5,92,0,0, - 375,376,5,97,0,0,376,377,5,112,0,0,377,378,5,112,0,0,378,379,5,114,0,0, - 379,380,5,111,0,0,380,381,5,120,0,0,381,55,1,0,0,0,382,383,5,92,0,0,383, - 384,5,112,0,0,384,385,5,108,0,0,385,386,5,97,0,0,386,387,5,99,0,0,387,388, - 5,101,0,0,388,389,5,104,0,0,389,390,5,111,0,0,390,391,5,108,0,0,391,392, - 5,100,0,0,392,393,5,101,0,0,393,394,5,114,0,0,394,57,1,0,0,0,395,396,5, - 94,0,0,396,397,5,123,0,0,397,398,5,92,0,0,398,399,5,109,0,0,399,400,5,97, - 0,0,400,401,5,116,0,0,401,402,5,104,0,0,402,403,5,114,0,0,403,404,5,109, - 0,0,404,405,5,123,0,0,405,406,5,84,0,0,406,407,5,125,0,0,407,408,5,125, - 0,0,408,59,1,0,0,0,409,410,5,92,0,0,410,61,1,0,0,0,411,412,5,97,0,0,412, - 413,5,115,0,0,413,417,1,0,0,0,414,418,5,32,0,0,415,416,5,92,0,0,416,418, - 5,58,0,0,417,414,1,0,0,0,417,415,1,0,0,0,418,419,1,0,0,0,419,417,1,0,0, - 0,419,420,1,0,0,0,420,421,1,0,0,0,421,422,5,108,0,0,422,423,5,105,0,0,423, - 424,5,110,0,0,424,425,5,101,0,0,425,427,1,0,0,0,426,428,7,3,0,0,427,426, - 1,0,0,0,427,428,1,0,0,0,428,63,1,0,0,0,429,430,5,115,0,0,430,431,5,105, - 0,0,431,432,5,110,0,0,432,65,1,0,0,0,433,434,5,99,0,0,434,435,5,111,0,0, - 435,436,5,115,0,0,436,67,1,0,0,0,437,438,5,116,0,0,438,439,5,97,0,0,439, - 440,5,110,0,0,440,69,1,0,0,0,441,442,5,99,0,0,442,443,5,111,0,0,443,444, - 5,116,0,0,444,71,1,0,0,0,445,446,5,115,0,0,446,447,5,101,0,0,447,448,5, - 99,0,0,448,73,1,0,0,0,449,450,5,99,0,0,450,451,5,115,0,0,451,452,5,99,0, - 0,452,75,1,0,0,0,453,454,5,97,0,0,454,455,5,114,0,0,455,456,5,99,0,0,456, - 457,5,115,0,0,457,458,5,105,0,0,458,459,5,110,0,0,459,77,1,0,0,0,460,461, - 5,97,0,0,461,462,5,114,0,0,462,463,5,99,0,0,463,464,5,99,0,0,464,465,5, - 111,0,0,465,466,5,115,0,0,466,79,1,0,0,0,467,468,5,97,0,0,468,469,5,114, - 0,0,469,470,5,99,0,0,470,471,5,116,0,0,471,472,5,97,0,0,472,473,5,110,0, - 0,473,81,1,0,0,0,474,475,5,115,0,0,475,476,5,105,0,0,476,477,5,110,0,0, - 477,478,5,104,0,0,478,83,1,0,0,0,479,480,5,99,0,0,480,481,5,111,0,0,481, - 482,5,115,0,0,482,483,5,104,0,0,483,85,1,0,0,0,484,485,5,116,0,0,485,486, - 5,97,0,0,486,487,5,110,0,0,487,488,5,104,0,0,488,87,1,0,0,0,489,490,5,99, - 0,0,490,491,5,111,0,0,491,492,5,116,0,0,492,493,5,104,0,0,493,89,1,0,0, - 0,494,495,5,108,0,0,495,496,5,110,0,0,496,91,1,0,0,0,497,498,5,108,0,0, - 498,499,5,111,0,0,499,500,5,103,0,0,500,93,1,0,0,0,501,502,5,92,0,0,502, - 503,5,108,0,0,503,504,5,111,0,0,504,505,5,103,0,0,505,509,1,0,0,0,506,508, - 7,2,0,0,507,506,1,0,0,0,508,511,1,0,0,0,509,507,1,0,0,0,509,510,1,0,0,0, - 510,512,1,0,0,0,511,509,1,0,0,0,512,513,5,95,0,0,513,95,1,0,0,0,514,515, - 5,92,0,0,515,516,5,108,0,0,516,517,5,111,0,0,517,518,5,103,0,0,518,522, - 1,0,0,0,519,521,7,2,0,0,520,519,1,0,0,0,521,524,1,0,0,0,522,520,1,0,0,0, - 522,523,1,0,0,0,523,525,1,0,0,0,524,522,1,0,0,0,525,526,3,22,10,0,526,97, - 1,0,0,0,527,528,5,92,0,0,528,529,5,108,0,0,529,530,5,111,0,0,530,531,5, - 103,0,0,531,535,1,0,0,0,532,534,7,2,0,0,533,532,1,0,0,0,534,537,1,0,0,0, - 535,533,1,0,0,0,535,536,1,0,0,0,536,538,1,0,0,0,537,535,1,0,0,0,538,539, - 3,24,11,0,539,99,1,0,0,0,540,541,5,92,0,0,541,542,5,116,0,0,542,543,5,101, - 0,0,543,544,5,120,0,0,544,545,5,116,0,0,545,546,5,123,0,0,546,550,1,0,0, - 0,547,549,9,0,0,0,548,547,1,0,0,0,549,552,1,0,0,0,550,551,1,0,0,0,550,548, - 1,0,0,0,551,553,1,0,0,0,552,550,1,0,0,0,553,554,5,125,0,0,554,555,1,0,0, - 0,555,556,6,49,1,0,556,101,1,0,0,0,557,558,5,92,0,0,558,559,5,108,0,0,559, - 560,5,101,0,0,560,561,5,102,0,0,561,562,5,116,0,0,562,564,1,0,0,0,563,565, - 5,46,0,0,564,563,1,0,0,0,564,565,1,0,0,0,565,566,1,0,0,0,566,567,6,50,1, - 0,567,103,1,0,0,0,568,569,5,92,0,0,569,570,5,114,0,0,570,571,5,105,0,0, - 571,572,5,103,0,0,572,573,5,104,0,0,573,574,5,116,0,0,574,576,1,0,0,0,575, - 577,5,46,0,0,576,575,1,0,0,0,576,577,1,0,0,0,577,578,1,0,0,0,578,579,6, - 51,1,0,579,105,1,0,0,0,580,581,5,36,0,0,581,582,5,36,0,0,582,583,1,0,0, - 0,583,584,6,52,1,0,584,107,1,0,0,0,585,586,5,43,0,0,586,109,1,0,0,0,587, - 588,5,45,0,0,588,111,1,0,0,0,589,590,5,94,0,0,590,113,1,0,0,0,591,592,5, - 61,0,0,592,115,1,0,0,0,593,594,5,60,0,0,594,117,1,0,0,0,595,596,5,62,0, - 0,596,119,1,0,0,0,597,598,5,92,0,0,598,599,5,108,0,0,599,600,5,101,0,0, - 600,121,1,0,0,0,601,602,5,92,0,0,602,603,5,103,0,0,603,604,5,101,0,0,604, - 123,1,0,0,0,605,606,5,44,0,0,606,125,1,0,0,0,607,608,5,46,0,0,608,127,1, - 0,0,0,609,610,5,94,0,0,610,611,7,0,0,0,611,129,1,0,0,0,612,613,5,94,0,0, - 613,614,7,1,0,0,614,131,1,0,0,0,615,617,3,134,66,0,616,615,1,0,0,0,617, - 618,1,0,0,0,618,616,1,0,0,0,618,619,1,0,0,0,619,620,1,0,0,0,620,624,5,46, - 0,0,621,623,3,134,66,0,622,621,1,0,0,0,623,626,1,0,0,0,624,622,1,0,0,0, - 624,625,1,0,0,0,625,628,1,0,0,0,626,624,1,0,0,0,627,629,3,138,68,0,628, - 627,1,0,0,0,628,629,1,0,0,0,629,648,1,0,0,0,630,632,5,46,0,0,631,633,3, - 134,66,0,632,631,1,0,0,0,633,634,1,0,0,0,634,632,1,0,0,0,634,635,1,0,0, - 0,635,637,1,0,0,0,636,638,3,138,68,0,637,636,1,0,0,0,637,638,1,0,0,0,638, - 648,1,0,0,0,639,641,3,134,66,0,640,639,1,0,0,0,641,642,1,0,0,0,642,640, - 1,0,0,0,642,643,1,0,0,0,643,645,1,0,0,0,644,646,3,138,68,0,645,644,1,0, - 0,0,645,646,1,0,0,0,646,648,1,0,0,0,647,616,1,0,0,0,647,630,1,0,0,0,647, - 640,1,0,0,0,648,133,1,0,0,0,649,650,7,0,0,0,650,135,1,0,0,0,651,655,7,1, - 0,0,652,654,7,4,0,0,653,652,1,0,0,0,654,657,1,0,0,0,655,653,1,0,0,0,655, - 656,1,0,0,0,656,137,1,0,0,0,657,655,1,0,0,0,658,660,7,5,0,0,659,661,7,6, - 0,0,660,659,1,0,0,0,660,661,1,0,0,0,661,663,1,0,0,0,662,664,3,134,66,0, - 663,662,1,0,0,0,664,665,1,0,0,0,665,663,1,0,0,0,665,666,1,0,0,0,666,702, - 1,0,0,0,667,669,5,32,0,0,668,667,1,0,0,0,669,672,1,0,0,0,670,668,1,0,0, - 0,670,671,1,0,0,0,671,675,1,0,0,0,672,670,1,0,0,0,673,676,3,44,21,0,674, - 676,3,46,22,0,675,673,1,0,0,0,675,674,1,0,0,0,676,680,1,0,0,0,677,679,5, - 32,0,0,678,677,1,0,0,0,679,682,1,0,0,0,680,678,1,0,0,0,680,681,1,0,0,0, - 681,683,1,0,0,0,682,680,1,0,0,0,683,684,5,49,0,0,684,685,5,48,0,0,685,686, - 1,0,0,0,686,699,3,112,55,0,687,700,3,134,66,0,688,690,3,8,3,0,689,691,7, - 6,0,0,690,689,1,0,0,0,690,691,1,0,0,0,691,693,1,0,0,0,692,694,3,134,66, - 0,693,692,1,0,0,0,694,695,1,0,0,0,695,693,1,0,0,0,695,696,1,0,0,0,696,697, - 1,0,0,0,697,698,3,10,4,0,698,700,1,0,0,0,699,687,1,0,0,0,699,688,1,0,0, - 0,700,702,1,0,0,0,701,658,1,0,0,0,701,670,1,0,0,0,702,139,1,0,0,0,703,843, - 5,92,0,0,704,705,5,97,0,0,705,706,5,108,0,0,706,707,5,112,0,0,707,708,5, - 104,0,0,708,844,5,97,0,0,709,710,5,98,0,0,710,711,5,101,0,0,711,712,5,116, - 0,0,712,844,5,97,0,0,713,714,5,103,0,0,714,715,5,97,0,0,715,716,5,109,0, - 0,716,717,5,109,0,0,717,844,5,97,0,0,718,719,5,100,0,0,719,720,5,101,0, - 0,720,721,5,108,0,0,721,722,5,116,0,0,722,844,5,97,0,0,723,724,5,101,0, - 0,724,725,5,112,0,0,725,726,5,115,0,0,726,727,5,105,0,0,727,728,5,108,0, - 0,728,729,5,111,0,0,729,844,5,110,0,0,730,731,5,122,0,0,731,732,5,101,0, - 0,732,733,5,116,0,0,733,844,5,97,0,0,734,735,5,101,0,0,735,736,5,116,0, - 0,736,844,5,97,0,0,737,738,5,116,0,0,738,739,5,104,0,0,739,740,5,101,0, - 0,740,741,5,116,0,0,741,844,5,97,0,0,742,743,5,105,0,0,743,744,5,111,0, - 0,744,745,5,116,0,0,745,844,5,97,0,0,746,747,5,107,0,0,747,748,5,97,0,0, - 748,749,5,112,0,0,749,750,5,112,0,0,750,844,5,97,0,0,751,752,5,108,0,0, - 752,753,5,97,0,0,753,754,5,109,0,0,754,755,5,98,0,0,755,756,5,100,0,0,756, - 844,5,97,0,0,757,758,5,109,0,0,758,844,5,117,0,0,759,760,5,110,0,0,760, - 844,5,117,0,0,761,762,5,120,0,0,762,844,5,105,0,0,763,764,5,114,0,0,764, - 765,5,104,0,0,765,844,5,111,0,0,766,767,5,115,0,0,767,768,5,105,0,0,768, - 769,5,103,0,0,769,770,5,109,0,0,770,844,5,97,0,0,771,772,5,116,0,0,772, - 773,5,97,0,0,773,844,5,117,0,0,774,775,5,117,0,0,775,776,5,112,0,0,776, - 777,5,115,0,0,777,778,5,105,0,0,778,779,5,108,0,0,779,780,5,111,0,0,780, - 844,5,110,0,0,781,782,5,112,0,0,782,783,5,104,0,0,783,844,5,105,0,0,784, - 785,5,99,0,0,785,786,5,104,0,0,786,844,5,105,0,0,787,788,5,112,0,0,788, - 789,5,115,0,0,789,844,5,105,0,0,790,791,5,111,0,0,791,792,5,109,0,0,792, - 793,5,101,0,0,793,794,5,103,0,0,794,844,5,97,0,0,795,796,5,71,0,0,796,797, - 5,97,0,0,797,798,5,109,0,0,798,799,5,109,0,0,799,844,5,97,0,0,800,801,5, - 68,0,0,801,802,5,101,0,0,802,803,5,108,0,0,803,804,5,116,0,0,804,844,5, - 97,0,0,805,806,5,84,0,0,806,807,5,104,0,0,807,808,5,101,0,0,808,809,5,116, - 0,0,809,844,5,97,0,0,810,811,5,76,0,0,811,812,5,97,0,0,812,813,5,109,0, - 0,813,814,5,98,0,0,814,815,5,100,0,0,815,844,5,97,0,0,816,817,5,88,0,0, - 817,844,5,105,0,0,818,819,5,80,0,0,819,844,5,105,0,0,820,821,5,83,0,0,821, - 822,5,105,0,0,822,823,5,103,0,0,823,824,5,109,0,0,824,844,5,97,0,0,825, - 826,5,85,0,0,826,827,5,112,0,0,827,828,5,115,0,0,828,829,5,105,0,0,829, - 830,5,108,0,0,830,831,5,111,0,0,831,844,5,110,0,0,832,833,5,80,0,0,833, - 834,5,104,0,0,834,844,5,105,0,0,835,836,5,80,0,0,836,837,5,115,0,0,837, - 844,5,105,0,0,838,839,5,79,0,0,839,840,5,109,0,0,840,841,5,101,0,0,841, - 842,5,103,0,0,842,844,5,97,0,0,843,704,1,0,0,0,843,709,1,0,0,0,843,713, - 1,0,0,0,843,718,1,0,0,0,843,723,1,0,0,0,843,730,1,0,0,0,843,734,1,0,0,0, - 843,737,1,0,0,0,843,742,1,0,0,0,843,746,1,0,0,0,843,751,1,0,0,0,843,757, - 1,0,0,0,843,759,1,0,0,0,843,761,1,0,0,0,843,763,1,0,0,0,843,766,1,0,0,0, - 843,771,1,0,0,0,843,774,1,0,0,0,843,781,1,0,0,0,843,784,1,0,0,0,843,787, - 1,0,0,0,843,790,1,0,0,0,843,795,1,0,0,0,843,800,1,0,0,0,843,805,1,0,0,0, - 843,810,1,0,0,0,843,816,1,0,0,0,843,818,1,0,0,0,843,820,1,0,0,0,843,825, - 1,0,0,0,843,832,1,0,0,0,843,835,1,0,0,0,843,838,1,0,0,0,844,141,1,0,0,0, - 845,846,5,92,0,0,846,847,5,98,0,0,847,848,5,101,0,0,848,849,5,103,0,0,849, - 850,5,105,0,0,850,851,5,110,0,0,851,852,5,123,0,0,852,853,5,98,0,0,853, - 854,5,109,0,0,854,855,5,97,0,0,855,856,5,116,0,0,856,857,5,114,0,0,857, - 858,5,105,0,0,858,859,5,120,0,0,859,860,5,125,0,0,860,143,1,0,0,0,861,862, - 5,92,0,0,862,863,5,101,0,0,863,864,5,110,0,0,864,865,5,100,0,0,865,866, - 5,123,0,0,866,867,5,98,0,0,867,868,5,109,0,0,868,869,5,97,0,0,869,870,5, - 116,0,0,870,871,5,114,0,0,871,872,5,105,0,0,872,873,5,120,0,0,873,874,5, - 125,0,0,874,145,1,0,0,0,875,876,5,38,0,0,876,147,1,0,0,0,877,878,5,92,0, - 0,878,879,5,92,0,0,879,149,1,0,0,0,880,882,7,2,0,0,881,880,1,0,0,0,882, - 885,1,0,0,0,883,881,1,0,0,0,883,884,1,0,0,0,884,886,1,0,0,0,885,883,1,0, - 0,0,886,887,5,95,0,0,887,888,5,123,0,0,888,890,1,0,0,0,889,891,7,4,0,0, - 890,889,1,0,0,0,891,892,1,0,0,0,892,890,1,0,0,0,892,893,1,0,0,0,893,894, - 1,0,0,0,894,906,5,125,0,0,895,897,7,2,0,0,896,895,1,0,0,0,897,900,1,0,0, - 0,898,896,1,0,0,0,898,899,1,0,0,0,899,903,1,0,0,0,900,898,1,0,0,0,901,904, - 3,24,11,0,902,904,3,22,10,0,903,901,1,0,0,0,903,902,1,0,0,0,904,906,1,0, - 0,0,905,883,1,0,0,0,905,898,1,0,0,0,906,151,1,0,0,0,907,908,5,94,0,0,908, - 909,7,1,0,0,909,910,3,150,74,0,910,153,1,0,0,0,911,914,3,136,67,0,912,914, - 3,140,69,0,913,911,1,0,0,0,913,912,1,0,0,0,914,916,1,0,0,0,915,917,3,150, - 74,0,916,915,1,0,0,0,916,917,1,0,0,0,917,155,1,0,0,0,918,920,7,7,0,0,919, - 918,1,0,0,0,920,921,1,0,0,0,921,919,1,0,0,0,921,922,1,0,0,0,922,923,1,0, - 0,0,923,924,6,77,1,0,924,157,1,0,0,0,925,926,5,92,0,0,926,927,5,32,0,0, - 927,928,1,0,0,0,928,929,6,78,1,0,929,159,1,0,0,0,930,931,5,92,0,0,931,932, - 5,58,0,0,932,933,1,0,0,0,933,934,6,79,1,0,934,161,1,0,0,0,935,936,5,160, - 0,0,936,937,1,0,0,0,937,938,6,80,1,0,938,163,1,0,0,0,939,940,9,0,0,0,940, - 165,1,0,0,0,941,942,5,93,0,0,942,943,1,0,0,0,943,944,6,82,2,0,944,167,1, - 0,0,0,945,946,5,92,0,0,946,947,5,114,0,0,947,948,5,98,0,0,948,949,5,114, - 0,0,949,950,5,97,0,0,950,951,5,99,0,0,951,952,5,107,0,0,952,953,1,0,0,0, - 953,954,6,83,2,0,954,169,1,0,0,0,955,956,5,92,0,0,956,957,5,102,0,0,957, - 958,5,114,0,0,958,959,5,97,0,0,959,960,5,99,0,0,960,171,1,0,0,0,961,962, - 5,92,0,0,962,963,5,102,0,0,963,964,5,114,0,0,964,965,5,97,0,0,965,966,5, - 99,0,0,966,970,1,0,0,0,967,969,7,2,0,0,968,967,1,0,0,0,969,972,1,0,0,0, - 970,968,1,0,0,0,970,971,1,0,0,0,971,973,1,0,0,0,972,970,1,0,0,0,973,974, - 7,0,0,0,974,975,7,0,0,0,975,173,1,0,0,0,976,977,5,92,0,0,977,978,5,99,0, - 0,978,979,5,100,0,0,979,980,5,111,0,0,980,981,5,116,0,0,981,175,1,0,0,0, - 982,983,5,92,0,0,983,984,5,116,0,0,984,985,5,105,0,0,985,986,5,109,0,0, - 986,987,5,101,0,0,987,988,5,115,0,0,988,177,1,0,0,0,989,990,5,92,0,0,990, - 991,5,115,0,0,991,992,5,113,0,0,992,993,5,114,0,0,993,994,5,116,0,0,994, - 179,1,0,0,0,995,996,5,44,0,0,996,181,1,0,0,0,997,998,5,94,0,0,998,183,1, - 0,0,0,999,1003,7,1,0,0,1000,1002,7,4,0,0,1001,1000,1,0,0,0,1002,1005,1, - 0,0,0,1003,1001,1,0,0,0,1003,1004,1,0,0,0,1004,185,1,0,0,0,1005,1003,1, - 0,0,0,1006,1007,5,40,0,0,1007,187,1,0,0,0,1008,1009,5,41,0,0,1009,189,1, - 0,0,0,1010,1011,5,123,0,0,1011,191,1,0,0,0,1012,1013,5,125,0,0,1013,193, - 1,0,0,0,1014,1015,5,49,0,0,1015,195,1,0,0,0,1016,1018,5,45,0,0,1017,1016, - 1,0,0,0,1017,1018,1,0,0,0,1018,1020,1,0,0,0,1019,1021,3,198,98,0,1020,1019, - 1,0,0,0,1021,1022,1,0,0,0,1022,1020,1,0,0,0,1022,1023,1,0,0,0,1023,1024, - 1,0,0,0,1024,1028,5,46,0,0,1025,1027,3,198,98,0,1026,1025,1,0,0,0,1027, - 1030,1,0,0,0,1028,1026,1,0,0,0,1028,1029,1,0,0,0,1029,1049,1,0,0,0,1030, - 1028,1,0,0,0,1031,1033,5,45,0,0,1032,1031,1,0,0,0,1032,1033,1,0,0,0,1033, - 1034,1,0,0,0,1034,1036,5,46,0,0,1035,1037,3,198,98,0,1036,1035,1,0,0,0, - 1037,1038,1,0,0,0,1038,1036,1,0,0,0,1038,1039,1,0,0,0,1039,1049,1,0,0,0, - 1040,1042,5,45,0,0,1041,1040,1,0,0,0,1041,1042,1,0,0,0,1042,1044,1,0,0, - 0,1043,1045,3,198,98,0,1044,1043,1,0,0,0,1045,1046,1,0,0,0,1046,1044,1, - 0,0,0,1046,1047,1,0,0,0,1047,1049,1,0,0,0,1048,1017,1,0,0,0,1048,1032,1, - 0,0,0,1048,1041,1,0,0,0,1049,197,1,0,0,0,1050,1051,7,0,0,0,1051,199,1,0, - 0,0,1052,1053,5,92,0,0,1053,1054,5,108,0,0,1054,1055,5,101,0,0,1055,1056, - 5,102,0,0,1056,1057,5,116,0,0,1057,1058,1,0,0,0,1058,1059,6,99,1,0,1059, - 201,1,0,0,0,1060,1061,5,92,0,0,1061,1062,5,114,0,0,1062,1063,5,105,0,0, - 1063,1064,5,103,0,0,1064,1065,5,104,0,0,1065,1066,5,116,0,0,1066,1067,1, - 0,0,0,1067,1068,6,100,1,0,1068,203,1,0,0,0,1069,1071,7,7,0,0,1070,1069, - 1,0,0,0,1071,1072,1,0,0,0,1072,1070,1,0,0,0,1072,1073,1,0,0,0,1073,1074, - 1,0,0,0,1074,1075,6,101,1,0,1075,205,1,0,0,0,1076,1077,5,92,0,0,1077,1078, - 5,32,0,0,1078,1079,1,0,0,0,1079,1080,6,102,1,0,1080,207,1,0,0,0,1081,1082, - 5,92,0,0,1082,1083,5,58,0,0,1083,1084,1,0,0,0,1084,1085,6,103,1,0,1085, - 209,1,0,0,0,1086,1087,5,160,0,0,1087,1088,1,0,0,0,1088,1089,6,104,1,0,1089, - 211,1,0,0,0,1090,1091,9,0,0,0,1091,213,1,0,0,0,55,0,1,247,276,289,302,330, - 364,417,419,427,509,522,535,550,564,576,618,624,628,634,637,642,645,647, - 655,660,665,670,675,680,690,695,699,701,843,883,892,898,903,905,913,916, - 921,970,1003,1017,1022,1028,1032,1038,1041,1046,1048,1072,3,2,1,0,6,0,0, - 2,0,0]; + 7,102,2,103,7,103,2,104,7,104,2,105,7,105,2,106,7,106,1,0,1,0,1,0,1,0,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1, + 6,1,6,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,250,8,8,1,9,1,9,1,10,1,10, + 1,10,1,11,1,11,1,11,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1, + 14,1,15,1,15,1,15,1,15,1,15,1,15,5,15,277,8,15,10,15,12,15,280,9,15,1,15, + 1,15,1,16,1,16,1,16,1,16,1,16,1,16,5,16,290,8,16,10,16,12,16,293,9,16,1, + 16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,5,17,303,8,17,10,17,12,17,306,9,17, + 1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,5,18,316,8,18,10,18,12,18,319,9, + 18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20, + 1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21,5,21,344,8,21,10,21,12,21, + 347,9,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1, + 23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25, + 1,25,1,25,5,25,378,8,25,10,25,12,25,381,9,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,27,1,27,1,28,1,28,1,28,1,28,1,28, + 1,28,1,28,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, + 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,31,1,31,1,31,1,31,1,31, + 1,31,4,31,433,8,31,11,31,12,31,434,1,31,1,31,1,31,1,31,1,31,1,31,3,31,443, + 8,31,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,35,1, + 35,1,35,1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38, + 1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,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,45,1,45,1,45,1,46,1,46,1,46,1, + 46,1,47,1,47,1,47,1,47,1,47,1,47,5,47,523,8,47,10,47,12,47,526,9,47,1,47, + 1,47,1,48,1,48,1,48,1,48,1,48,1,48,5,48,536,8,48,10,48,12,48,539,9,48,1, + 48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,5,49,549,8,49,10,49,12,49,552,9,49, + 1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,5,50,564,8,50,10,50,12, + 50,567,9,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,3,51, + 580,8,51,1,51,1,51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,3,52,592,8,52, + 1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,55,1,55,1,56,1,56,1,57,1, + 57,1,58,1,58,1,59,1,59,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,62,1,62, + 1,63,1,63,1,64,1,64,1,64,1,65,1,65,1,65,1,66,4,66,632,8,66,11,66,12,66, + 633,1,66,1,66,5,66,638,8,66,10,66,12,66,641,9,66,1,66,3,66,644,8,66,1,66, + 1,66,4,66,648,8,66,11,66,12,66,649,1,66,3,66,653,8,66,1,66,4,66,656,8,66, + 11,66,12,66,657,1,66,3,66,661,8,66,3,66,663,8,66,1,67,1,67,1,68,1,68,5, + 68,669,8,68,10,68,12,68,672,9,68,1,69,1,69,3,69,676,8,69,1,69,4,69,679, + 8,69,11,69,12,69,680,1,69,5,69,684,8,69,10,69,12,69,687,9,69,1,69,1,69, + 3,69,691,8,69,1,69,5,69,694,8,69,10,69,12,69,697,9,69,1,69,1,69,1,69,1, + 69,1,69,1,69,1,69,3,69,706,8,69,1,69,4,69,709,8,69,11,69,12,69,710,1,69, + 1,69,3,69,715,8,69,3,69,717,8,69,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, + 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, + 70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, + 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, + 70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, + 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, + 70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, + 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, + 70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, + 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, + 70,1,70,3,70,859,8,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, + 1,71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1, + 72,1,72,1,72,1,72,1,72,1,72,1,73,1,73,1,74,1,74,1,74,1,75,5,75,897,8,75, + 10,75,12,75,900,9,75,1,75,1,75,1,75,1,75,4,75,906,8,75,11,75,12,75,907, + 1,75,1,75,5,75,912,8,75,10,75,12,75,915,9,75,1,75,1,75,3,75,919,8,75,3, + 75,921,8,75,1,76,1,76,1,76,1,76,1,77,1,77,3,77,929,8,77,1,77,3,77,932,8, + 77,1,78,4,78,935,8,78,11,78,12,78,936,1,78,1,78,1,79,1,79,1,79,1,79,1,79, + 1,80,1,80,1,80,1,80,1,80,1,81,1,81,1,81,1,81,1,82,1,82,1,83,1,83,1,83,1, + 83,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85, + 1,85,1,85,1,86,1,86,1,86,1,86,1,86,1,86,1,86,5,86,984,8,86,10,86,12,86, + 987,9,86,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,87,1,88,1,88,1,88,1, + 88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,89,1,90,1,90,1,91,1,91,1,92, + 1,92,5,92,1017,8,92,10,92,12,92,1020,9,92,1,93,1,93,1,94,1,94,1,95,1,95, + 1,96,1,96,1,97,1,97,1,98,3,98,1033,8,98,1,98,4,98,1036,8,98,11,98,12,98, + 1037,1,98,1,98,5,98,1042,8,98,10,98,12,98,1045,9,98,1,98,3,98,1048,8,98, + 1,98,1,98,4,98,1052,8,98,11,98,12,98,1053,1,98,3,98,1057,8,98,1,98,4,98, + 1060,8,98,11,98,12,98,1061,3,98,1064,8,98,1,99,1,99,1,100,1,100,1,100,1, + 100,1,100,1,100,1,100,1,100,1,101,1,101,1,101,1,101,1,101,1,101,1,101,1, + 101,1,101,1,102,4,102,1086,8,102,11,102,12,102,1087,1,102,1,102,1,103,1, + 103,1,103,1,103,1,103,1,104,1,104,1,104,1,104,1,104,1,105,1,105,1,105,1, + 105,1,106,1,106,1,565,0,107,2,1,4,2,6,3,8,4,10,5,12,6,14,7,16,8,18,9,20, + 10,22,0,24,0,26,11,28,12,30,13,32,14,34,15,36,16,38,17,40,18,42,19,44,20, + 46,21,48,22,50,23,52,24,54,25,56,26,58,27,60,28,62,29,64,30,66,31,68,32, + 70,33,72,34,74,35,76,36,78,37,80,38,82,39,84,40,86,41,88,42,90,43,92,44, + 94,45,96,46,98,47,100,48,102,49,104,50,106,51,108,52,110,53,112,54,114, + 55,116,56,118,57,120,58,122,59,124,60,126,61,128,62,130,63,132,64,134,65, + 136,0,138,0,140,0,142,0,144,66,146,67,148,68,150,69,152,70,154,71,156,72, + 158,73,160,74,162,75,164,76,166,77,168,78,170,79,172,80,174,81,176,82,178, + 83,180,84,182,85,184,86,186,87,188,88,190,89,192,90,194,91,196,92,198,93, + 200,0,202,94,204,95,206,96,208,97,210,98,212,99,214,100,2,0,1,8,1,0,48, + 57,2,0,65,90,97,122,1,0,32,32,1,0,115,115,3,0,48,57,65,90,97,122,2,0,69, + 69,101,101,2,0,43,43,45,45,3,0,9,10,13,13,32,32,1185,0,2,1,0,0,0,0,4,1, + 0,0,0,0,6,1,0,0,0,0,8,1,0,0,0,0,10,1,0,0,0,0,12,1,0,0,0,0,14,1,0,0,0,0, + 16,1,0,0,0,0,18,1,0,0,0,0,20,1,0,0,0,0,26,1,0,0,0,0,28,1,0,0,0,0,30,1,0, + 0,0,0,32,1,0,0,0,0,34,1,0,0,0,0,36,1,0,0,0,0,38,1,0,0,0,0,40,1,0,0,0,0, + 42,1,0,0,0,0,44,1,0,0,0,0,46,1,0,0,0,0,48,1,0,0,0,0,50,1,0,0,0,0,52,1,0, + 0,0,0,54,1,0,0,0,0,56,1,0,0,0,0,58,1,0,0,0,0,60,1,0,0,0,0,62,1,0,0,0,0, + 64,1,0,0,0,0,66,1,0,0,0,0,68,1,0,0,0,0,70,1,0,0,0,0,72,1,0,0,0,0,74,1,0, + 0,0,0,76,1,0,0,0,0,78,1,0,0,0,0,80,1,0,0,0,0,82,1,0,0,0,0,84,1,0,0,0,0, + 86,1,0,0,0,0,88,1,0,0,0,0,90,1,0,0,0,0,92,1,0,0,0,0,94,1,0,0,0,0,96,1,0, + 0,0,0,98,1,0,0,0,0,100,1,0,0,0,0,102,1,0,0,0,0,104,1,0,0,0,0,106,1,0,0, + 0,0,108,1,0,0,0,0,110,1,0,0,0,0,112,1,0,0,0,0,114,1,0,0,0,0,116,1,0,0,0, + 0,118,1,0,0,0,0,120,1,0,0,0,0,122,1,0,0,0,0,124,1,0,0,0,0,126,1,0,0,0,0, + 128,1,0,0,0,0,130,1,0,0,0,0,132,1,0,0,0,0,134,1,0,0,0,0,144,1,0,0,0,0,146, + 1,0,0,0,0,148,1,0,0,0,0,150,1,0,0,0,0,152,1,0,0,0,0,154,1,0,0,0,0,156,1, + 0,0,0,0,158,1,0,0,0,0,160,1,0,0,0,0,162,1,0,0,0,0,164,1,0,0,0,0,166,1,0, + 0,0,1,168,1,0,0,0,1,170,1,0,0,0,1,172,1,0,0,0,1,174,1,0,0,0,1,176,1,0,0, + 0,1,178,1,0,0,0,1,180,1,0,0,0,1,182,1,0,0,0,1,184,1,0,0,0,1,186,1,0,0,0, + 1,188,1,0,0,0,1,190,1,0,0,0,1,192,1,0,0,0,1,194,1,0,0,0,1,196,1,0,0,0,1, + 198,1,0,0,0,1,202,1,0,0,0,1,204,1,0,0,0,1,206,1,0,0,0,1,208,1,0,0,0,1,210, + 1,0,0,0,1,212,1,0,0,0,1,214,1,0,0,0,2,216,1,0,0,0,4,220,1,0,0,0,6,230,1, + 0,0,0,8,232,1,0,0,0,10,234,1,0,0,0,12,236,1,0,0,0,14,238,1,0,0,0,16,240, + 1,0,0,0,18,249,1,0,0,0,20,251,1,0,0,0,22,253,1,0,0,0,24,256,1,0,0,0,26, + 259,1,0,0,0,28,261,1,0,0,0,30,265,1,0,0,0,32,270,1,0,0,0,34,283,1,0,0,0, + 36,296,1,0,0,0,38,309,1,0,0,0,40,322,1,0,0,0,42,330,1,0,0,0,44,336,1,0, + 0,0,46,351,1,0,0,0,48,357,1,0,0,0,50,364,1,0,0,0,52,370,1,0,0,0,54,384, + 1,0,0,0,56,389,1,0,0,0,58,397,1,0,0,0,60,410,1,0,0,0,62,424,1,0,0,0,64, + 426,1,0,0,0,66,444,1,0,0,0,68,448,1,0,0,0,70,452,1,0,0,0,72,456,1,0,0,0, + 74,460,1,0,0,0,76,464,1,0,0,0,78,468,1,0,0,0,80,475,1,0,0,0,82,482,1,0, + 0,0,84,489,1,0,0,0,86,494,1,0,0,0,88,499,1,0,0,0,90,504,1,0,0,0,92,509, + 1,0,0,0,94,512,1,0,0,0,96,516,1,0,0,0,98,529,1,0,0,0,100,542,1,0,0,0,102, + 555,1,0,0,0,104,572,1,0,0,0,106,583,1,0,0,0,108,595,1,0,0,0,110,600,1,0, + 0,0,112,602,1,0,0,0,114,604,1,0,0,0,116,606,1,0,0,0,118,608,1,0,0,0,120, + 610,1,0,0,0,122,612,1,0,0,0,124,616,1,0,0,0,126,620,1,0,0,0,128,622,1,0, + 0,0,130,624,1,0,0,0,132,627,1,0,0,0,134,662,1,0,0,0,136,664,1,0,0,0,138, + 666,1,0,0,0,140,716,1,0,0,0,142,718,1,0,0,0,144,860,1,0,0,0,146,876,1,0, + 0,0,148,890,1,0,0,0,150,892,1,0,0,0,152,920,1,0,0,0,154,922,1,0,0,0,156, + 928,1,0,0,0,158,934,1,0,0,0,160,940,1,0,0,0,162,945,1,0,0,0,164,950,1,0, + 0,0,166,954,1,0,0,0,168,956,1,0,0,0,170,960,1,0,0,0,172,970,1,0,0,0,174, + 976,1,0,0,0,176,991,1,0,0,0,178,997,1,0,0,0,180,1004,1,0,0,0,182,1010,1, + 0,0,0,184,1012,1,0,0,0,186,1014,1,0,0,0,188,1021,1,0,0,0,190,1023,1,0,0, + 0,192,1025,1,0,0,0,194,1027,1,0,0,0,196,1029,1,0,0,0,198,1063,1,0,0,0,200, + 1065,1,0,0,0,202,1067,1,0,0,0,204,1075,1,0,0,0,206,1085,1,0,0,0,208,1091, + 1,0,0,0,210,1096,1,0,0,0,212,1101,1,0,0,0,214,1105,1,0,0,0,216,217,5,91, + 0,0,217,218,1,0,0,0,218,219,6,0,0,0,219,3,1,0,0,0,220,221,5,92,0,0,221, + 222,5,108,0,0,222,223,5,98,0,0,223,224,5,114,0,0,224,225,5,97,0,0,225,226, + 5,99,0,0,226,227,5,107,0,0,227,228,1,0,0,0,228,229,6,1,0,0,229,5,1,0,0, + 0,230,231,5,59,0,0,231,7,1,0,0,0,232,233,5,123,0,0,233,9,1,0,0,0,234,235, + 5,125,0,0,235,11,1,0,0,0,236,237,5,40,0,0,237,13,1,0,0,0,238,239,5,41,0, + 0,239,15,1,0,0,0,240,241,5,124,0,0,241,17,1,0,0,0,242,243,5,124,0,0,243, + 250,5,124,0,0,244,245,5,92,0,0,245,246,5,86,0,0,246,247,5,101,0,0,247,248, + 5,114,0,0,248,250,5,116,0,0,249,242,1,0,0,0,249,244,1,0,0,0,250,19,1,0, + 0,0,251,252,5,95,0,0,252,21,1,0,0,0,253,254,5,95,0,0,254,255,7,0,0,0,255, + 23,1,0,0,0,256,257,5,95,0,0,257,258,7,1,0,0,258,25,1,0,0,0,259,260,5,33, + 0,0,260,27,1,0,0,0,261,262,5,92,0,0,262,263,5,112,0,0,263,264,5,105,0,0, + 264,29,1,0,0,0,265,266,5,92,0,0,266,267,5,105,0,0,267,268,5,110,0,0,268, + 269,5,116,0,0,269,31,1,0,0,0,270,271,5,92,0,0,271,272,5,105,0,0,272,273, + 5,110,0,0,273,274,5,116,0,0,274,278,1,0,0,0,275,277,7,2,0,0,276,275,1,0, + 0,0,277,280,1,0,0,0,278,276,1,0,0,0,278,279,1,0,0,0,279,281,1,0,0,0,280, + 278,1,0,0,0,281,282,5,95,0,0,282,33,1,0,0,0,283,284,5,92,0,0,284,285,5, + 105,0,0,285,286,5,110,0,0,286,287,5,116,0,0,287,291,1,0,0,0,288,290,7,2, + 0,0,289,288,1,0,0,0,290,293,1,0,0,0,291,289,1,0,0,0,291,292,1,0,0,0,292, + 294,1,0,0,0,293,291,1,0,0,0,294,295,3,22,10,0,295,35,1,0,0,0,296,297,5, + 92,0,0,297,298,5,105,0,0,298,299,5,110,0,0,299,300,5,116,0,0,300,304,1, + 0,0,0,301,303,7,2,0,0,302,301,1,0,0,0,303,306,1,0,0,0,304,302,1,0,0,0,304, + 305,1,0,0,0,305,307,1,0,0,0,306,304,1,0,0,0,307,308,3,24,11,0,308,37,1, + 0,0,0,309,310,5,92,0,0,310,311,5,115,0,0,311,312,5,117,0,0,312,313,5,109, + 0,0,313,317,1,0,0,0,314,316,7,2,0,0,315,314,1,0,0,0,316,319,1,0,0,0,317, + 315,1,0,0,0,317,318,1,0,0,0,318,320,1,0,0,0,319,317,1,0,0,0,320,321,5,95, + 0,0,321,39,1,0,0,0,322,323,5,92,0,0,323,324,5,109,0,0,324,325,5,97,0,0, + 325,326,5,116,0,0,326,327,5,104,0,0,327,328,5,114,0,0,328,329,5,109,0,0, + 329,41,1,0,0,0,330,331,5,92,0,0,331,332,5,102,0,0,332,333,5,114,0,0,333, + 334,5,97,0,0,334,335,5,99,0,0,335,43,1,0,0,0,336,337,5,92,0,0,337,338,5, + 102,0,0,338,339,5,114,0,0,339,340,5,97,0,0,340,341,5,99,0,0,341,345,1,0, + 0,0,342,344,7,2,0,0,343,342,1,0,0,0,344,347,1,0,0,0,345,343,1,0,0,0,345, + 346,1,0,0,0,346,348,1,0,0,0,347,345,1,0,0,0,348,349,7,0,0,0,349,350,7,0, + 0,0,350,45,1,0,0,0,351,352,5,92,0,0,352,353,5,99,0,0,353,354,5,100,0,0, + 354,355,5,111,0,0,355,356,5,116,0,0,356,47,1,0,0,0,357,358,5,92,0,0,358, + 359,5,116,0,0,359,360,5,105,0,0,360,361,5,109,0,0,361,362,5,101,0,0,362, + 363,5,115,0,0,363,49,1,0,0,0,364,365,5,92,0,0,365,366,5,115,0,0,366,367, + 5,113,0,0,367,368,5,114,0,0,368,369,5,116,0,0,369,51,1,0,0,0,370,371,5, + 92,0,0,371,372,5,115,0,0,372,373,5,113,0,0,373,374,5,114,0,0,374,375,5, + 116,0,0,375,379,1,0,0,0,376,378,7,2,0,0,377,376,1,0,0,0,378,381,1,0,0,0, + 379,377,1,0,0,0,379,380,1,0,0,0,380,382,1,0,0,0,381,379,1,0,0,0,382,383, + 7,0,0,0,383,53,1,0,0,0,384,385,5,92,0,0,385,386,5,115,0,0,386,387,5,105, + 0,0,387,388,5,109,0,0,388,55,1,0,0,0,389,390,5,92,0,0,390,391,5,97,0,0, + 391,392,5,112,0,0,392,393,5,112,0,0,393,394,5,114,0,0,394,395,5,111,0,0, + 395,396,5,120,0,0,396,57,1,0,0,0,397,398,5,92,0,0,398,399,5,112,0,0,399, + 400,5,108,0,0,400,401,5,97,0,0,401,402,5,99,0,0,402,403,5,101,0,0,403,404, + 5,104,0,0,404,405,5,111,0,0,405,406,5,108,0,0,406,407,5,100,0,0,407,408, + 5,101,0,0,408,409,5,114,0,0,409,59,1,0,0,0,410,411,5,94,0,0,411,412,5,123, + 0,0,412,413,5,92,0,0,413,414,5,109,0,0,414,415,5,97,0,0,415,416,5,116,0, + 0,416,417,5,104,0,0,417,418,5,114,0,0,418,419,5,109,0,0,419,420,5,123,0, + 0,420,421,5,84,0,0,421,422,5,125,0,0,422,423,5,125,0,0,423,61,1,0,0,0,424, + 425,5,92,0,0,425,63,1,0,0,0,426,427,5,97,0,0,427,428,5,115,0,0,428,432, + 1,0,0,0,429,433,5,32,0,0,430,431,5,92,0,0,431,433,5,58,0,0,432,429,1,0, + 0,0,432,430,1,0,0,0,433,434,1,0,0,0,434,432,1,0,0,0,434,435,1,0,0,0,435, + 436,1,0,0,0,436,437,5,108,0,0,437,438,5,105,0,0,438,439,5,110,0,0,439,440, + 5,101,0,0,440,442,1,0,0,0,441,443,7,3,0,0,442,441,1,0,0,0,442,443,1,0,0, + 0,443,65,1,0,0,0,444,445,5,115,0,0,445,446,5,105,0,0,446,447,5,110,0,0, + 447,67,1,0,0,0,448,449,5,99,0,0,449,450,5,111,0,0,450,451,5,115,0,0,451, + 69,1,0,0,0,452,453,5,116,0,0,453,454,5,97,0,0,454,455,5,110,0,0,455,71, + 1,0,0,0,456,457,5,99,0,0,457,458,5,111,0,0,458,459,5,116,0,0,459,73,1,0, + 0,0,460,461,5,115,0,0,461,462,5,101,0,0,462,463,5,99,0,0,463,75,1,0,0,0, + 464,465,5,99,0,0,465,466,5,115,0,0,466,467,5,99,0,0,467,77,1,0,0,0,468, + 469,5,97,0,0,469,470,5,114,0,0,470,471,5,99,0,0,471,472,5,115,0,0,472,473, + 5,105,0,0,473,474,5,110,0,0,474,79,1,0,0,0,475,476,5,97,0,0,476,477,5,114, + 0,0,477,478,5,99,0,0,478,479,5,99,0,0,479,480,5,111,0,0,480,481,5,115,0, + 0,481,81,1,0,0,0,482,483,5,97,0,0,483,484,5,114,0,0,484,485,5,99,0,0,485, + 486,5,116,0,0,486,487,5,97,0,0,487,488,5,110,0,0,488,83,1,0,0,0,489,490, + 5,115,0,0,490,491,5,105,0,0,491,492,5,110,0,0,492,493,5,104,0,0,493,85, + 1,0,0,0,494,495,5,99,0,0,495,496,5,111,0,0,496,497,5,115,0,0,497,498,5, + 104,0,0,498,87,1,0,0,0,499,500,5,116,0,0,500,501,5,97,0,0,501,502,5,110, + 0,0,502,503,5,104,0,0,503,89,1,0,0,0,504,505,5,99,0,0,505,506,5,111,0,0, + 506,507,5,116,0,0,507,508,5,104,0,0,508,91,1,0,0,0,509,510,5,108,0,0,510, + 511,5,110,0,0,511,93,1,0,0,0,512,513,5,108,0,0,513,514,5,111,0,0,514,515, + 5,103,0,0,515,95,1,0,0,0,516,517,5,92,0,0,517,518,5,108,0,0,518,519,5,111, + 0,0,519,520,5,103,0,0,520,524,1,0,0,0,521,523,7,2,0,0,522,521,1,0,0,0,523, + 526,1,0,0,0,524,522,1,0,0,0,524,525,1,0,0,0,525,527,1,0,0,0,526,524,1,0, + 0,0,527,528,5,95,0,0,528,97,1,0,0,0,529,530,5,92,0,0,530,531,5,108,0,0, + 531,532,5,111,0,0,532,533,5,103,0,0,533,537,1,0,0,0,534,536,7,2,0,0,535, + 534,1,0,0,0,536,539,1,0,0,0,537,535,1,0,0,0,537,538,1,0,0,0,538,540,1,0, + 0,0,539,537,1,0,0,0,540,541,3,22,10,0,541,99,1,0,0,0,542,543,5,92,0,0,543, + 544,5,108,0,0,544,545,5,111,0,0,545,546,5,103,0,0,546,550,1,0,0,0,547,549, + 7,2,0,0,548,547,1,0,0,0,549,552,1,0,0,0,550,548,1,0,0,0,550,551,1,0,0,0, + 551,553,1,0,0,0,552,550,1,0,0,0,553,554,3,24,11,0,554,101,1,0,0,0,555,556, + 5,92,0,0,556,557,5,116,0,0,557,558,5,101,0,0,558,559,5,120,0,0,559,560, + 5,116,0,0,560,561,5,123,0,0,561,565,1,0,0,0,562,564,9,0,0,0,563,562,1,0, + 0,0,564,567,1,0,0,0,565,566,1,0,0,0,565,563,1,0,0,0,566,568,1,0,0,0,567, + 565,1,0,0,0,568,569,5,125,0,0,569,570,1,0,0,0,570,571,6,50,1,0,571,103, + 1,0,0,0,572,573,5,92,0,0,573,574,5,108,0,0,574,575,5,101,0,0,575,576,5, + 102,0,0,576,577,5,116,0,0,577,579,1,0,0,0,578,580,5,46,0,0,579,578,1,0, + 0,0,579,580,1,0,0,0,580,581,1,0,0,0,581,582,6,51,1,0,582,105,1,0,0,0,583, + 584,5,92,0,0,584,585,5,114,0,0,585,586,5,105,0,0,586,587,5,103,0,0,587, + 588,5,104,0,0,588,589,5,116,0,0,589,591,1,0,0,0,590,592,5,46,0,0,591,590, + 1,0,0,0,591,592,1,0,0,0,592,593,1,0,0,0,593,594,6,52,1,0,594,107,1,0,0, + 0,595,596,5,36,0,0,596,597,5,36,0,0,597,598,1,0,0,0,598,599,6,53,1,0,599, + 109,1,0,0,0,600,601,5,43,0,0,601,111,1,0,0,0,602,603,5,45,0,0,603,113,1, + 0,0,0,604,605,5,94,0,0,605,115,1,0,0,0,606,607,5,61,0,0,607,117,1,0,0,0, + 608,609,5,60,0,0,609,119,1,0,0,0,610,611,5,62,0,0,611,121,1,0,0,0,612,613, + 5,92,0,0,613,614,5,108,0,0,614,615,5,101,0,0,615,123,1,0,0,0,616,617,5, + 92,0,0,617,618,5,103,0,0,618,619,5,101,0,0,619,125,1,0,0,0,620,621,5,44, + 0,0,621,127,1,0,0,0,622,623,5,46,0,0,623,129,1,0,0,0,624,625,5,94,0,0,625, + 626,7,0,0,0,626,131,1,0,0,0,627,628,5,94,0,0,628,629,7,1,0,0,629,133,1, + 0,0,0,630,632,3,136,67,0,631,630,1,0,0,0,632,633,1,0,0,0,633,631,1,0,0, + 0,633,634,1,0,0,0,634,635,1,0,0,0,635,639,5,46,0,0,636,638,3,136,67,0,637, + 636,1,0,0,0,638,641,1,0,0,0,639,637,1,0,0,0,639,640,1,0,0,0,640,643,1,0, + 0,0,641,639,1,0,0,0,642,644,3,140,69,0,643,642,1,0,0,0,643,644,1,0,0,0, + 644,663,1,0,0,0,645,647,5,46,0,0,646,648,3,136,67,0,647,646,1,0,0,0,648, + 649,1,0,0,0,649,647,1,0,0,0,649,650,1,0,0,0,650,652,1,0,0,0,651,653,3,140, + 69,0,652,651,1,0,0,0,652,653,1,0,0,0,653,663,1,0,0,0,654,656,3,136,67,0, + 655,654,1,0,0,0,656,657,1,0,0,0,657,655,1,0,0,0,657,658,1,0,0,0,658,660, + 1,0,0,0,659,661,3,140,69,0,660,659,1,0,0,0,660,661,1,0,0,0,661,663,1,0, + 0,0,662,631,1,0,0,0,662,645,1,0,0,0,662,655,1,0,0,0,663,135,1,0,0,0,664, + 665,7,0,0,0,665,137,1,0,0,0,666,670,7,1,0,0,667,669,7,4,0,0,668,667,1,0, + 0,0,669,672,1,0,0,0,670,668,1,0,0,0,670,671,1,0,0,0,671,139,1,0,0,0,672, + 670,1,0,0,0,673,675,7,5,0,0,674,676,7,6,0,0,675,674,1,0,0,0,675,676,1,0, + 0,0,676,678,1,0,0,0,677,679,3,136,67,0,678,677,1,0,0,0,679,680,1,0,0,0, + 680,678,1,0,0,0,680,681,1,0,0,0,681,717,1,0,0,0,682,684,5,32,0,0,683,682, + 1,0,0,0,684,687,1,0,0,0,685,683,1,0,0,0,685,686,1,0,0,0,686,690,1,0,0,0, + 687,685,1,0,0,0,688,691,3,46,22,0,689,691,3,48,23,0,690,688,1,0,0,0,690, + 689,1,0,0,0,691,695,1,0,0,0,692,694,5,32,0,0,693,692,1,0,0,0,694,697,1, + 0,0,0,695,693,1,0,0,0,695,696,1,0,0,0,696,698,1,0,0,0,697,695,1,0,0,0,698, + 699,5,49,0,0,699,700,5,48,0,0,700,701,1,0,0,0,701,714,3,114,56,0,702,715, + 3,136,67,0,703,705,3,8,3,0,704,706,7,6,0,0,705,704,1,0,0,0,705,706,1,0, + 0,0,706,708,1,0,0,0,707,709,3,136,67,0,708,707,1,0,0,0,709,710,1,0,0,0, + 710,708,1,0,0,0,710,711,1,0,0,0,711,712,1,0,0,0,712,713,3,10,4,0,713,715, + 1,0,0,0,714,702,1,0,0,0,714,703,1,0,0,0,715,717,1,0,0,0,716,673,1,0,0,0, + 716,685,1,0,0,0,717,141,1,0,0,0,718,858,5,92,0,0,719,720,5,97,0,0,720,721, + 5,108,0,0,721,722,5,112,0,0,722,723,5,104,0,0,723,859,5,97,0,0,724,725, + 5,98,0,0,725,726,5,101,0,0,726,727,5,116,0,0,727,859,5,97,0,0,728,729,5, + 103,0,0,729,730,5,97,0,0,730,731,5,109,0,0,731,732,5,109,0,0,732,859,5, + 97,0,0,733,734,5,100,0,0,734,735,5,101,0,0,735,736,5,108,0,0,736,737,5, + 116,0,0,737,859,5,97,0,0,738,739,5,101,0,0,739,740,5,112,0,0,740,741,5, + 115,0,0,741,742,5,105,0,0,742,743,5,108,0,0,743,744,5,111,0,0,744,859,5, + 110,0,0,745,746,5,122,0,0,746,747,5,101,0,0,747,748,5,116,0,0,748,859,5, + 97,0,0,749,750,5,101,0,0,750,751,5,116,0,0,751,859,5,97,0,0,752,753,5,116, + 0,0,753,754,5,104,0,0,754,755,5,101,0,0,755,756,5,116,0,0,756,859,5,97, + 0,0,757,758,5,105,0,0,758,759,5,111,0,0,759,760,5,116,0,0,760,859,5,97, + 0,0,761,762,5,107,0,0,762,763,5,97,0,0,763,764,5,112,0,0,764,765,5,112, + 0,0,765,859,5,97,0,0,766,767,5,108,0,0,767,768,5,97,0,0,768,769,5,109,0, + 0,769,770,5,98,0,0,770,771,5,100,0,0,771,859,5,97,0,0,772,773,5,109,0,0, + 773,859,5,117,0,0,774,775,5,110,0,0,775,859,5,117,0,0,776,777,5,120,0,0, + 777,859,5,105,0,0,778,779,5,114,0,0,779,780,5,104,0,0,780,859,5,111,0,0, + 781,782,5,115,0,0,782,783,5,105,0,0,783,784,5,103,0,0,784,785,5,109,0,0, + 785,859,5,97,0,0,786,787,5,116,0,0,787,788,5,97,0,0,788,859,5,117,0,0,789, + 790,5,117,0,0,790,791,5,112,0,0,791,792,5,115,0,0,792,793,5,105,0,0,793, + 794,5,108,0,0,794,795,5,111,0,0,795,859,5,110,0,0,796,797,5,112,0,0,797, + 798,5,104,0,0,798,859,5,105,0,0,799,800,5,99,0,0,800,801,5,104,0,0,801, + 859,5,105,0,0,802,803,5,112,0,0,803,804,5,115,0,0,804,859,5,105,0,0,805, + 806,5,111,0,0,806,807,5,109,0,0,807,808,5,101,0,0,808,809,5,103,0,0,809, + 859,5,97,0,0,810,811,5,71,0,0,811,812,5,97,0,0,812,813,5,109,0,0,813,814, + 5,109,0,0,814,859,5,97,0,0,815,816,5,68,0,0,816,817,5,101,0,0,817,818,5, + 108,0,0,818,819,5,116,0,0,819,859,5,97,0,0,820,821,5,84,0,0,821,822,5,104, + 0,0,822,823,5,101,0,0,823,824,5,116,0,0,824,859,5,97,0,0,825,826,5,76,0, + 0,826,827,5,97,0,0,827,828,5,109,0,0,828,829,5,98,0,0,829,830,5,100,0,0, + 830,859,5,97,0,0,831,832,5,88,0,0,832,859,5,105,0,0,833,834,5,80,0,0,834, + 859,5,105,0,0,835,836,5,83,0,0,836,837,5,105,0,0,837,838,5,103,0,0,838, + 839,5,109,0,0,839,859,5,97,0,0,840,841,5,85,0,0,841,842,5,112,0,0,842,843, + 5,115,0,0,843,844,5,105,0,0,844,845,5,108,0,0,845,846,5,111,0,0,846,859, + 5,110,0,0,847,848,5,80,0,0,848,849,5,104,0,0,849,859,5,105,0,0,850,851, + 5,80,0,0,851,852,5,115,0,0,852,859,5,105,0,0,853,854,5,79,0,0,854,855,5, + 109,0,0,855,856,5,101,0,0,856,857,5,103,0,0,857,859,5,97,0,0,858,719,1, + 0,0,0,858,724,1,0,0,0,858,728,1,0,0,0,858,733,1,0,0,0,858,738,1,0,0,0,858, + 745,1,0,0,0,858,749,1,0,0,0,858,752,1,0,0,0,858,757,1,0,0,0,858,761,1,0, + 0,0,858,766,1,0,0,0,858,772,1,0,0,0,858,774,1,0,0,0,858,776,1,0,0,0,858, + 778,1,0,0,0,858,781,1,0,0,0,858,786,1,0,0,0,858,789,1,0,0,0,858,796,1,0, + 0,0,858,799,1,0,0,0,858,802,1,0,0,0,858,805,1,0,0,0,858,810,1,0,0,0,858, + 815,1,0,0,0,858,820,1,0,0,0,858,825,1,0,0,0,858,831,1,0,0,0,858,833,1,0, + 0,0,858,835,1,0,0,0,858,840,1,0,0,0,858,847,1,0,0,0,858,850,1,0,0,0,858, + 853,1,0,0,0,859,143,1,0,0,0,860,861,5,92,0,0,861,862,5,98,0,0,862,863,5, + 101,0,0,863,864,5,103,0,0,864,865,5,105,0,0,865,866,5,110,0,0,866,867,5, + 123,0,0,867,868,5,98,0,0,868,869,5,109,0,0,869,870,5,97,0,0,870,871,5,116, + 0,0,871,872,5,114,0,0,872,873,5,105,0,0,873,874,5,120,0,0,874,875,5,125, + 0,0,875,145,1,0,0,0,876,877,5,92,0,0,877,878,5,101,0,0,878,879,5,110,0, + 0,879,880,5,100,0,0,880,881,5,123,0,0,881,882,5,98,0,0,882,883,5,109,0, + 0,883,884,5,97,0,0,884,885,5,116,0,0,885,886,5,114,0,0,886,887,5,105,0, + 0,887,888,5,120,0,0,888,889,5,125,0,0,889,147,1,0,0,0,890,891,5,38,0,0, + 891,149,1,0,0,0,892,893,5,92,0,0,893,894,5,92,0,0,894,151,1,0,0,0,895,897, + 7,2,0,0,896,895,1,0,0,0,897,900,1,0,0,0,898,896,1,0,0,0,898,899,1,0,0,0, + 899,901,1,0,0,0,900,898,1,0,0,0,901,902,5,95,0,0,902,903,5,123,0,0,903, + 905,1,0,0,0,904,906,7,4,0,0,905,904,1,0,0,0,906,907,1,0,0,0,907,905,1,0, + 0,0,907,908,1,0,0,0,908,909,1,0,0,0,909,921,5,125,0,0,910,912,7,2,0,0,911, + 910,1,0,0,0,912,915,1,0,0,0,913,911,1,0,0,0,913,914,1,0,0,0,914,918,1,0, + 0,0,915,913,1,0,0,0,916,919,3,24,11,0,917,919,3,22,10,0,918,916,1,0,0,0, + 918,917,1,0,0,0,919,921,1,0,0,0,920,898,1,0,0,0,920,913,1,0,0,0,921,153, + 1,0,0,0,922,923,5,94,0,0,923,924,7,1,0,0,924,925,3,152,75,0,925,155,1,0, + 0,0,926,929,3,138,68,0,927,929,3,142,70,0,928,926,1,0,0,0,928,927,1,0,0, + 0,929,931,1,0,0,0,930,932,3,152,75,0,931,930,1,0,0,0,931,932,1,0,0,0,932, + 157,1,0,0,0,933,935,7,7,0,0,934,933,1,0,0,0,935,936,1,0,0,0,936,934,1,0, + 0,0,936,937,1,0,0,0,937,938,1,0,0,0,938,939,6,78,1,0,939,159,1,0,0,0,940, + 941,5,92,0,0,941,942,5,32,0,0,942,943,1,0,0,0,943,944,6,79,1,0,944,161, + 1,0,0,0,945,946,5,92,0,0,946,947,5,58,0,0,947,948,1,0,0,0,948,949,6,80, + 1,0,949,163,1,0,0,0,950,951,5,160,0,0,951,952,1,0,0,0,952,953,6,81,1,0, + 953,165,1,0,0,0,954,955,9,0,0,0,955,167,1,0,0,0,956,957,5,93,0,0,957,958, + 1,0,0,0,958,959,6,83,2,0,959,169,1,0,0,0,960,961,5,92,0,0,961,962,5,114, + 0,0,962,963,5,98,0,0,963,964,5,114,0,0,964,965,5,97,0,0,965,966,5,99,0, + 0,966,967,5,107,0,0,967,968,1,0,0,0,968,969,6,84,2,0,969,171,1,0,0,0,970, + 971,5,92,0,0,971,972,5,102,0,0,972,973,5,114,0,0,973,974,5,97,0,0,974,975, + 5,99,0,0,975,173,1,0,0,0,976,977,5,92,0,0,977,978,5,102,0,0,978,979,5,114, + 0,0,979,980,5,97,0,0,980,981,5,99,0,0,981,985,1,0,0,0,982,984,7,2,0,0,983, + 982,1,0,0,0,984,987,1,0,0,0,985,983,1,0,0,0,985,986,1,0,0,0,986,988,1,0, + 0,0,987,985,1,0,0,0,988,989,7,0,0,0,989,990,7,0,0,0,990,175,1,0,0,0,991, + 992,5,92,0,0,992,993,5,99,0,0,993,994,5,100,0,0,994,995,5,111,0,0,995,996, + 5,116,0,0,996,177,1,0,0,0,997,998,5,92,0,0,998,999,5,116,0,0,999,1000,5, + 105,0,0,1000,1001,5,109,0,0,1001,1002,5,101,0,0,1002,1003,5,115,0,0,1003, + 179,1,0,0,0,1004,1005,5,92,0,0,1005,1006,5,115,0,0,1006,1007,5,113,0,0, + 1007,1008,5,114,0,0,1008,1009,5,116,0,0,1009,181,1,0,0,0,1010,1011,5,44, + 0,0,1011,183,1,0,0,0,1012,1013,5,94,0,0,1013,185,1,0,0,0,1014,1018,7,1, + 0,0,1015,1017,7,4,0,0,1016,1015,1,0,0,0,1017,1020,1,0,0,0,1018,1016,1,0, + 0,0,1018,1019,1,0,0,0,1019,187,1,0,0,0,1020,1018,1,0,0,0,1021,1022,5,40, + 0,0,1022,189,1,0,0,0,1023,1024,5,41,0,0,1024,191,1,0,0,0,1025,1026,5,123, + 0,0,1026,193,1,0,0,0,1027,1028,5,125,0,0,1028,195,1,0,0,0,1029,1030,5,49, + 0,0,1030,197,1,0,0,0,1031,1033,5,45,0,0,1032,1031,1,0,0,0,1032,1033,1,0, + 0,0,1033,1035,1,0,0,0,1034,1036,3,200,99,0,1035,1034,1,0,0,0,1036,1037, + 1,0,0,0,1037,1035,1,0,0,0,1037,1038,1,0,0,0,1038,1039,1,0,0,0,1039,1043, + 5,46,0,0,1040,1042,3,200,99,0,1041,1040,1,0,0,0,1042,1045,1,0,0,0,1043, + 1041,1,0,0,0,1043,1044,1,0,0,0,1044,1064,1,0,0,0,1045,1043,1,0,0,0,1046, + 1048,5,45,0,0,1047,1046,1,0,0,0,1047,1048,1,0,0,0,1048,1049,1,0,0,0,1049, + 1051,5,46,0,0,1050,1052,3,200,99,0,1051,1050,1,0,0,0,1052,1053,1,0,0,0, + 1053,1051,1,0,0,0,1053,1054,1,0,0,0,1054,1064,1,0,0,0,1055,1057,5,45,0, + 0,1056,1055,1,0,0,0,1056,1057,1,0,0,0,1057,1059,1,0,0,0,1058,1060,3,200, + 99,0,1059,1058,1,0,0,0,1060,1061,1,0,0,0,1061,1059,1,0,0,0,1061,1062,1, + 0,0,0,1062,1064,1,0,0,0,1063,1032,1,0,0,0,1063,1047,1,0,0,0,1063,1056,1, + 0,0,0,1064,199,1,0,0,0,1065,1066,7,0,0,0,1066,201,1,0,0,0,1067,1068,5,92, + 0,0,1068,1069,5,108,0,0,1069,1070,5,101,0,0,1070,1071,5,102,0,0,1071,1072, + 5,116,0,0,1072,1073,1,0,0,0,1073,1074,6,100,1,0,1074,203,1,0,0,0,1075,1076, + 5,92,0,0,1076,1077,5,114,0,0,1077,1078,5,105,0,0,1078,1079,5,103,0,0,1079, + 1080,5,104,0,0,1080,1081,5,116,0,0,1081,1082,1,0,0,0,1082,1083,6,101,1, + 0,1083,205,1,0,0,0,1084,1086,7,7,0,0,1085,1084,1,0,0,0,1086,1087,1,0,0, + 0,1087,1085,1,0,0,0,1087,1088,1,0,0,0,1088,1089,1,0,0,0,1089,1090,6,102, + 1,0,1090,207,1,0,0,0,1091,1092,5,92,0,0,1092,1093,5,32,0,0,1093,1094,1, + 0,0,0,1094,1095,6,103,1,0,1095,209,1,0,0,0,1096,1097,5,92,0,0,1097,1098, + 5,58,0,0,1098,1099,1,0,0,0,1099,1100,6,104,1,0,1100,211,1,0,0,0,1101,1102, + 5,160,0,0,1102,1103,1,0,0,0,1103,1104,6,105,1,0,1104,213,1,0,0,0,1105,1106, + 9,0,0,0,1106,215,1,0,0,0,56,0,1,249,278,291,304,317,345,379,432,434,442, + 524,537,550,565,579,591,633,639,643,649,652,657,660,662,670,675,680,685, + 690,695,705,710,714,716,858,898,907,913,918,920,928,931,936,985,1018,1032, + 1037,1043,1047,1053,1056,1061,1063,1087,3,2,1,0,6,0,0,2,0,0]; private static __ATN: ATN; public static get _ATN(): ATN { diff --git a/src/parser/LatexParser.g4 b/src/parser/LatexParser.g4 index 2a5c6fb8..5809ef8e 100644 --- a/src/parser/LatexParser.g4 +++ b/src/parser/LatexParser.g4 @@ -47,6 +47,10 @@ integral_cmd: ((CMD_INT_UNDERSCORE L_BRACE lower_lim_expr=expr R_BRACE) | L_PAREN integrand_expr=expr R_PAREN (CMD_MATHRM L_BRACE id R_BRACE | id) L_PAREN id R_PAREN ; +summation_cmd: (CMD_SUM_UNDERSCORE L_BRACE id EQ start_expr=expr R_BRACE) + ((CARET L_BRACE end_expr=expr R_BRACE) | (CARET_SINGLE_CHAR_ID | CARET_SINGLE_CHAR_NUMBER)) + L_PAREN operand_expr=expr R_PAREN ; + derivative_cmd: CMD_FRAC L_BRACE (MATHRM_0=CMD_MATHRM L_BRACE id R_BRACE | id) R_BRACE L_BRACE (MATHRM_1=CMD_MATHRM L_BRACE id R_BRACE | id) L_PAREN id R_PAREN R_BRACE L_PAREN expr R_PAREN; diff --git a/src/parser/LatexParser.ts b/src/parser/LatexParser.ts index 33f98e60..d3b85903 100644 --- a/src/parser/LatexParser.ts +++ b/src/parser/LatexParser.ts @@ -29,97 +29,96 @@ export default class LatexParser extends Parser { public static readonly VBAR = 8; public static readonly DOUBLE_VBAR = 9; public static readonly UNDERSCORE = 10; - public static readonly UNDERSCORE_SINGLE_CHAR_NUMBER = 11; - public static readonly UNDERSCORE_SINGLE_CHAR_ID = 12; - public static readonly EXCLAMATION = 13; - public static readonly PI = 14; - public static readonly CMD_INT = 15; - public static readonly CMD_INT_UNDERSCORE = 16; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 17; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 18; - public static readonly CMD_MATHRM = 19; - public static readonly CMD_FRAC = 20; - public static readonly CMD_FRAC_INTS = 21; - public static readonly CMD_CDOT = 22; - public static readonly CMD_TIMES = 23; - public static readonly CMD_SQRT = 24; - public static readonly CMD_SQRT_INT = 25; - public static readonly CMD_SIM = 26; - public static readonly CMD_APPROX = 27; - public static readonly CMD_PLACEHOLDER = 28; - public static readonly TRANSPOSE = 29; - public static readonly BACKSLASH = 30; - public static readonly AS_LINES = 31; - public static readonly CMD_SIN = 32; - public static readonly CMD_COS = 33; - public static readonly CMD_TAN = 34; - public static readonly CMD_COT = 35; - public static readonly CMD_SEC = 36; - public static readonly CMD_CSC = 37; - public static readonly CMD_ARCSIN = 38; - public static readonly CMD_ARCCOS = 39; - public static readonly CMD_ARCTAN = 40; - public static readonly CMD_SINH = 41; - public static readonly CMD_COSH = 42; - public static readonly CMD_TANH = 43; - public static readonly CMD_COTH = 44; - public static readonly CMD_LN = 45; - public static readonly CMD_LOG = 46; - public static readonly CMD_SLASH_LOG_UNDERSCORE = 47; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 48; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 49; - public static readonly COMMENT = 50; - public static readonly CMD_LEFT = 51; - public static readonly CMD_RIGHT = 52; - public static readonly DOUBLE_DOLLAR_SIGN = 53; - public static readonly ADD = 54; - public static readonly SUB = 55; - public static readonly CARET = 56; - public static readonly EQ = 57; - public static readonly LT = 58; - public static readonly GT = 59; - public static readonly LTE = 60; - public static readonly GTE = 61; - public static readonly COMMA = 62; - public static readonly DECIMAL_POINT = 63; - public static readonly CARET_SINGLE_CHAR_NUMBER = 64; - public static readonly CARET_SINGLE_CHAR_ID = 65; - public static readonly NUMBER = 66; - public static readonly BEGIN_MATRIX = 67; - public static readonly END_MATRIX = 68; - public static readonly AMPERSAND = 69; - public static readonly DOUBLE_BACKSLASH = 70; - public static readonly UNDERSCORE_SUBSCRIPT = 71; - public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 72; - public static readonly ID = 73; - public static readonly WS = 74; - public static readonly SLASH_SPACE = 75; - public static readonly SLASH_COLON = 76; - public static readonly NBSP = 77; - public static readonly ERROR_CHAR = 78; - public static readonly R_BRACKET = 79; - public static readonly ALT_R_BRACKET = 80; - public static readonly U_CMD_FRAC = 81; - public static readonly U_CMD_FRAC_INTS = 82; - public static readonly U_CMD_CDOT = 83; - public static readonly U_CMD_TIMES = 84; - public static readonly U_CMD_SQRT = 85; - public static readonly U_COMMA = 86; - public static readonly U_CARET = 87; - public static readonly U_NAME = 88; - public static readonly U_L_PAREN = 89; - public static readonly U_R_PAREN = 90; - public static readonly U_L_BRACE = 91; - public static readonly U_R_BRACE = 92; - public static readonly U_ONE = 93; - public static readonly U_NUMBER = 94; - public static readonly U_CMD_LEFT = 95; - public static readonly U_CMD_RIGHT = 96; - public static readonly U_WS = 97; - public static readonly U_SLASH_SPACE = 98; - public static readonly U_SLASH_COLON = 99; - public static readonly U_NBSP = 100; - public static readonly U_ERROR_CHAR = 101; + public static readonly EXCLAMATION = 11; + public static readonly PI = 12; + public static readonly CMD_INT = 13; + public static readonly CMD_INT_UNDERSCORE = 14; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 15; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 16; + public static readonly CMD_SUM_UNDERSCORE = 17; + public static readonly CMD_MATHRM = 18; + public static readonly CMD_FRAC = 19; + public static readonly CMD_FRAC_INTS = 20; + public static readonly CMD_CDOT = 21; + public static readonly CMD_TIMES = 22; + public static readonly CMD_SQRT = 23; + public static readonly CMD_SQRT_INT = 24; + public static readonly CMD_SIM = 25; + public static readonly CMD_APPROX = 26; + public static readonly CMD_PLACEHOLDER = 27; + public static readonly TRANSPOSE = 28; + public static readonly BACKSLASH = 29; + public static readonly AS_LINES = 30; + public static readonly CMD_SIN = 31; + public static readonly CMD_COS = 32; + public static readonly CMD_TAN = 33; + public static readonly CMD_COT = 34; + public static readonly CMD_SEC = 35; + public static readonly CMD_CSC = 36; + public static readonly CMD_ARCSIN = 37; + public static readonly CMD_ARCCOS = 38; + public static readonly CMD_ARCTAN = 39; + public static readonly CMD_SINH = 40; + public static readonly CMD_COSH = 41; + public static readonly CMD_TANH = 42; + public static readonly CMD_COTH = 43; + public static readonly CMD_LN = 44; + public static readonly CMD_LOG = 45; + public static readonly CMD_SLASH_LOG_UNDERSCORE = 46; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 47; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 48; + public static readonly COMMENT = 49; + public static readonly CMD_LEFT = 50; + public static readonly CMD_RIGHT = 51; + public static readonly DOUBLE_DOLLAR_SIGN = 52; + public static readonly ADD = 53; + public static readonly SUB = 54; + public static readonly CARET = 55; + public static readonly EQ = 56; + public static readonly LT = 57; + public static readonly GT = 58; + public static readonly LTE = 59; + public static readonly GTE = 60; + public static readonly COMMA = 61; + public static readonly DECIMAL_POINT = 62; + public static readonly CARET_SINGLE_CHAR_NUMBER = 63; + public static readonly CARET_SINGLE_CHAR_ID = 64; + public static readonly NUMBER = 65; + public static readonly BEGIN_MATRIX = 66; + public static readonly END_MATRIX = 67; + public static readonly AMPERSAND = 68; + public static readonly DOUBLE_BACKSLASH = 69; + public static readonly UNDERSCORE_SUBSCRIPT = 70; + public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 71; + public static readonly ID = 72; + public static readonly WS = 73; + public static readonly SLASH_SPACE = 74; + public static readonly SLASH_COLON = 75; + public static readonly NBSP = 76; + public static readonly ERROR_CHAR = 77; + public static readonly R_BRACKET = 78; + public static readonly ALT_R_BRACKET = 79; + public static readonly U_CMD_FRAC = 80; + public static readonly U_CMD_FRAC_INTS = 81; + public static readonly U_CMD_CDOT = 82; + public static readonly U_CMD_TIMES = 83; + public static readonly U_CMD_SQRT = 84; + public static readonly U_COMMA = 85; + public static readonly U_CARET = 86; + public static readonly U_NAME = 87; + public static readonly U_L_PAREN = 88; + public static readonly U_R_PAREN = 89; + public static readonly U_L_BRACE = 90; + public static readonly U_R_BRACE = 91; + public static readonly U_ONE = 92; + public static readonly U_NUMBER = 93; + public static readonly U_CMD_LEFT = 94; + public static readonly U_CMD_RIGHT = 95; + public static readonly U_WS = 96; + public static readonly U_SLASH_SPACE = 97; + public static readonly U_SLASH_COLON = 98; + public static readonly U_NBSP = 99; + public static readonly U_ERROR_CHAR = 100; public static readonly EOF = Token.EOF; public static readonly RULE_statement = 0; public static readonly RULE_scatter_plot_query = 1; @@ -138,34 +137,34 @@ export default class LatexParser extends Parser { public static readonly RULE_trig_function = 14; public static readonly RULE_indefinite_integral_cmd = 15; public static readonly RULE_integral_cmd = 16; - public static readonly RULE_derivative_cmd = 17; - public static readonly RULE_n_derivative_cmd = 18; - public static readonly RULE_argument = 19; - public static readonly RULE_condition = 20; - public static readonly RULE_id_list = 21; - public static readonly RULE_guess = 22; - public static readonly RULE_guess_list = 23; - public static readonly RULE_condition_single = 24; - public static readonly RULE_condition_chain = 25; - public static readonly RULE_matrix_row = 26; - public static readonly RULE_user_function = 27; - public static readonly RULE_builtin_function = 28; - public static readonly RULE_expr = 29; - public static readonly RULE_u_block = 30; - public static readonly RULE_u_insert_matrix = 31; - public static readonly RULE_u_fraction = 32; - public static readonly RULE_u_expr = 33; + public static readonly RULE_summation_cmd = 17; + public static readonly RULE_derivative_cmd = 18; + public static readonly RULE_n_derivative_cmd = 19; + public static readonly RULE_argument = 20; + public static readonly RULE_condition = 21; + public static readonly RULE_id_list = 22; + public static readonly RULE_guess = 23; + public static readonly RULE_guess_list = 24; + public static readonly RULE_condition_single = 25; + public static readonly RULE_condition_chain = 26; + public static readonly RULE_matrix_row = 27; + public static readonly RULE_user_function = 28; + public static readonly RULE_builtin_function = 29; + public static readonly RULE_expr = 30; + public static readonly RULE_u_block = 31; + public static readonly RULE_u_insert_matrix = 32; + public static readonly RULE_u_fraction = 33; + public static readonly RULE_u_expr = 34; public static readonly literalNames: (string | null)[] = [ null, "'['", "'\\lbrack'", "';'", null, null, null, null, "'|'", null, "'_'", - null, null, "'!'", "'\\pi'", "'\\int'", null, null, null, - "'\\mathrm'", + null, "'\\mathrm'", null, null, null, null, null, null, @@ -218,13 +217,12 @@ export default class LatexParser extends Parser { "R_PAREN", "VBAR", "DOUBLE_VBAR", "UNDERSCORE", - "UNDERSCORE_SINGLE_CHAR_NUMBER", - "UNDERSCORE_SINGLE_CHAR_ID", "EXCLAMATION", "PI", "CMD_INT", "CMD_INT_UNDERSCORE", "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", + "CMD_SUM_UNDERSCORE", "CMD_MATHRM", "CMD_FRAC", "CMD_FRAC_INTS", @@ -300,10 +298,11 @@ export default class LatexParser extends Parser { "statement", "scatter_plot_query", "parametric_plot_query", "insert_matrix", "id", "number", "number_with_units", "assign", "assign_list", "assign_plus_query", "query", "equality", "piecewise_assign", "piecewise_arg", "trig_function", - "indefinite_integral_cmd", "integral_cmd", "derivative_cmd", "n_derivative_cmd", - "argument", "condition", "id_list", "guess", "guess_list", "condition_single", - "condition_chain", "matrix_row", "user_function", "builtin_function", - "expr", "u_block", "u_insert_matrix", "u_fraction", "u_expr", + "indefinite_integral_cmd", "integral_cmd", "summation_cmd", "derivative_cmd", + "n_derivative_cmd", "argument", "condition", "id_list", "guess", "guess_list", + "condition_single", "condition_chain", "matrix_row", "user_function", + "builtin_function", "expr", "u_block", "u_insert_matrix", "u_fraction", + "u_expr", ]; public get grammarFileName(): string { return "LatexParser.g4"; } public get literalNames(): (string | null)[] { return LatexParser.literalNames; } @@ -326,113 +325,113 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 85; + this.state = 87; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 0, this._ctx) ) { case 1: { - this.state = 68; + this.state = 70; this.assign(); } break; case 2: { - this.state = 69; + this.state = 71; this.assign_list(); } break; case 3: { - this.state = 70; + this.state = 72; this.assign_plus_query(); } break; case 4: { - this.state = 71; + this.state = 73; this.query(); } break; case 5: { - this.state = 72; + this.state = 74; this.equality(); } break; case 6: { - this.state = 73; + this.state = 75; this.u_block(); } break; case 7: { - this.state = 74; + this.state = 76; this.number_(); } break; case 8: { - this.state = 75; + this.state = 77; this.id(); } break; case 9: { - this.state = 76; + this.state = 78; this.id_list(); } break; case 10: { - this.state = 77; + this.state = 79; this.guess(); } break; case 11: { - this.state = 78; + this.state = 80; this.guess_list(); } break; case 12: { - this.state = 79; + this.state = 81; this.expr(0); } break; case 13: { - this.state = 80; + this.state = 82; this.condition(); } break; case 14: { - this.state = 81; + this.state = 83; this.piecewise_assign(); } break; case 15: { - this.state = 82; + this.state = 84; this.insert_matrix(); } break; case 16: { - this.state = 83; + this.state = 85; this.scatter_plot_query(); } break; case 17: { - this.state = 84; + this.state = 86; this.parametric_plot_query(); } break; } - this.state = 87; + this.state = 89; this.match(LatexParser.EOF); } } @@ -458,21 +457,21 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 99; + this.state = 101; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 1, this._ctx) ) { case 1: { { - this.state = 89; - this.match(LatexParser.L_PAREN); - this.state = 90; - this.expr(0); this.state = 91; - this.match(LatexParser.COMMA); + this.match(LatexParser.L_PAREN); this.state = 92; this.expr(0); this.state = 93; + this.match(LatexParser.COMMA); + this.state = 94; + this.expr(0); + this.state = 95; this.match(LatexParser.R_PAREN); } } @@ -480,43 +479,43 @@ export default class LatexParser extends Parser { case 2: { { - this.state = 95; + this.state = 97; this.expr(0); - this.state = 96; + this.state = 98; this.match(LatexParser.COMMA); - this.state = 97; + this.state = 99; this.expr(0); } } break; } - this.state = 102; + this.state = 104; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===31) { + if (_la===30) { { - this.state = 101; + this.state = 103; this.match(LatexParser.AS_LINES); } } - this.state = 104; + this.state = 106; this.match(LatexParser.EQ); - this.state = 115; + this.state = 117; this._errHandler.sync(this); switch (this._input.LA(1)) { case 6: { { - this.state = 105; - this.match(LatexParser.L_PAREN); - this.state = 106; - this.u_block(); this.state = 107; - this.match(LatexParser.COMMA); + this.match(LatexParser.L_PAREN); this.state = 108; this.u_block(); this.state = 109; + this.match(LatexParser.COMMA); + this.state = 110; + this.u_block(); + this.state = 111; this.match(LatexParser.R_PAREN); } } @@ -525,11 +524,11 @@ export default class LatexParser extends Parser { case 2: { { - this.state = 111; + this.state = 113; this.u_block(); - this.state = 112; + this.state = 114; this.match(LatexParser.COMMA); - this.state = 113; + this.state = 115; this.u_block(); } } @@ -564,56 +563,56 @@ export default class LatexParser extends Parser { this.enterOuterAlt(localctx, 1); { { - this.state = 117; - this.match(LatexParser.L_PAREN); - this.state = 118; - this.expr(0); this.state = 119; - this.match(LatexParser.COMMA); + this.match(LatexParser.L_PAREN); this.state = 120; this.expr(0); this.state = 121; + this.match(LatexParser.COMMA); + this.state = 122; + this.expr(0); + this.state = 123; this.match(LatexParser.R_PAREN); } - this.state = 123; + this.state = 125; localctx._for_id = this.match(LatexParser.ID); - this.state = 124; + this.state = 126; this.match(LatexParser.L_PAREN); - this.state = 125; + this.state = 127; this.argument(); - this.state = 126; + this.state = 128; this.match(LatexParser.R_PAREN); - this.state = 131; + this.state = 133; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===73) { + if (_la===72) { { - this.state = 127; + this.state = 129; localctx._points_id_0 = this.match(LatexParser.ID); - this.state = 128; + this.state = 130; localctx._num_points = this.number_(); - this.state = 129; + this.state = 131; localctx._points_id_1 = this.match(LatexParser.ID); } } - this.state = 133; + this.state = 135; this.match(LatexParser.EQ); - this.state = 144; + this.state = 146; this._errHandler.sync(this); switch (this._input.LA(1)) { case 6: { { - this.state = 134; - this.match(LatexParser.L_PAREN); - this.state = 135; - this.u_block(); this.state = 136; - this.match(LatexParser.COMMA); + this.match(LatexParser.L_PAREN); this.state = 137; this.u_block(); this.state = 138; + this.match(LatexParser.COMMA); + this.state = 139; + this.u_block(); + this.state = 140; this.match(LatexParser.R_PAREN); } } @@ -622,11 +621,11 @@ export default class LatexParser extends Parser { case 2: { { - this.state = 140; + this.state = 142; this.u_block(); - this.state = 141; + this.state = 143; this.match(LatexParser.COMMA); - this.state = 142; + this.state = 144; this.u_block(); } } @@ -661,49 +660,49 @@ export default class LatexParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 149; + this.state = 151; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 6, this._ctx); while (_alt !== 1 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1 + 1) { { { - this.state = 146; + this.state = 148; this.matchWildcard(); } } } - this.state = 151; + this.state = 153; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 6, this._ctx); } - this.state = 159; + this.state = 161; this._errHandler.sync(this); _la = this._input.LA(1); do { { { - this.state = 152; + this.state = 154; this.u_insert_matrix(); - this.state = 156; + this.state = 158; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 7, this._ctx); while (_alt !== 1 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1 + 1) { { { - this.state = 153; + this.state = 155; this.matchWildcard(); } } } - this.state = 158; + this.state = 160; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 7, this._ctx); } } } - this.state = 161; + this.state = 163; this._errHandler.sync(this); _la = this._input.LA(1); } while (_la===1 || _la===2); @@ -730,7 +729,7 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 163; + this.state = 165; this.match(LatexParser.ID); } } @@ -756,17 +755,17 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 166; + this.state = 168; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===55) { + if (_la===54) { { - this.state = 165; + this.state = 167; this.match(LatexParser.SUB); } } - this.state = 168; + this.state = 170; this.match(LatexParser.NUMBER); } } @@ -791,32 +790,32 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 173; + this.state = 175; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 55: - case 66: + case 54: + case 65: { - this.state = 170; + this.state = 172; this.number_(); } break; - case 14: + case 12: { - this.state = 171; + this.state = 173; this.match(LatexParser.PI); } break; - case 73: + case 72: { - this.state = 172; + this.state = 174; this.id(); } break; default: throw new NoViableAltException(this); } - this.state = 175; + this.state = 177; this.u_block(); } } @@ -841,27 +840,27 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 179; + this.state = 181; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 73: + case 72: { - this.state = 177; + this.state = 179; this.id(); } break; - case 14: + case 12: { - this.state = 178; + this.state = 180; this.match(LatexParser.PI); } break; default: throw new NoViableAltException(this); } - this.state = 181; + this.state = 183; this.match(LatexParser.EQ); - this.state = 182; + this.state = 184; this.expr(0); } } @@ -887,24 +886,24 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 184; + this.state = 186; this.assign(); - this.state = 187; + this.state = 189; this._errHandler.sync(this); _la = this._input.LA(1); do { { { - this.state = 185; + this.state = 187; this.match(LatexParser.COMMA); - this.state = 186; + this.state = 188; this.assign(); } } - this.state = 189; + this.state = 191; this._errHandler.sync(this); _la = this._input.LA(1); - } while (_la===62); + } while (_la===61); } } catch (re) { @@ -929,16 +928,16 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 191; + this.state = 193; this.assign(); - this.state = 192; - this.match(LatexParser.EQ); this.state = 194; + this.match(LatexParser.EQ); + this.state = 196; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===1 || _la===2) { { - this.state = 193; + this.state = 195; this.u_block(); } } @@ -967,16 +966,16 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 196; + this.state = 198; this.expr(0); - this.state = 197; - this.match(LatexParser.EQ); this.state = 199; + this.match(LatexParser.EQ); + this.state = 201; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===1 || _la===2) { { - this.state = 198; + this.state = 200; this.u_block(); } } @@ -1004,11 +1003,11 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 201; + this.state = 203; this.expr(0); - this.state = 202; + this.state = 204; this.match(LatexParser.EQ); - this.state = 203; + this.state = 205; this.expr(0); } } @@ -1034,51 +1033,51 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 207; + this.state = 209; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 73: + case 72: { - this.state = 205; + this.state = 207; this.id(); } break; - case 14: + case 12: { - this.state = 206; + this.state = 208; this.match(LatexParser.PI); } break; default: throw new NoViableAltException(this); } - this.state = 209; + this.state = 211; this.match(LatexParser.EQ); - this.state = 210; + this.state = 212; this.id(); - this.state = 211; + this.state = 213; this.match(LatexParser.L_PAREN); { - this.state = 212; + this.state = 214; this.piecewise_arg(); - this.state = 217; + this.state = 219; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===62) { + while (_la===61) { { { - this.state = 213; + this.state = 215; this.match(LatexParser.COMMA); - this.state = 214; + this.state = 216; this.piecewise_arg(); } } - this.state = 219; + this.state = 221; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 220; + this.state = 222; this.match(LatexParser.R_PAREN); } } @@ -1103,15 +1102,15 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 222; + this.state = 224; this.match(LatexParser.L_PAREN); - this.state = 223; + this.state = 225; this.expr(0); - this.state = 224; + this.state = 226; this.match(LatexParser.COMMA); - this.state = 225; + this.state = 227; this.condition(); - this.state = 226; + this.state = 228; this.match(LatexParser.R_PAREN); } } @@ -1137,30 +1136,30 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 229; + this.state = 231; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===30) { + if (_la===29) { { - this.state = 228; + this.state = 230; this.match(LatexParser.BACKSLASH); } } - this.state = 231; + this.state = 233; _la = this._input.LA(1); - if(!(((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 8191) !== 0))) { + if(!(((((_la - 31)) & ~0x1F) === 0 && ((1 << (_la - 31)) & 8191) !== 0))) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 232; + this.state = 234; this.match(LatexParser.L_PAREN); - this.state = 233; + this.state = 235; this.expr(0); - this.state = 234; + this.state = 236; this.match(LatexParser.R_PAREN); } } @@ -1185,29 +1184,29 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 243; + this.state = 245; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 15: + case 13: { - this.state = 236; + this.state = 238; this.match(LatexParser.CMD_INT); } break; - case 16: + case 14: { { - this.state = 237; + this.state = 239; this.match(LatexParser.CMD_INT_UNDERSCORE); - this.state = 238; + this.state = 240; this.match(LatexParser.L_BRACE); - this.state = 239; + this.state = 241; this.match(LatexParser.R_BRACE); - this.state = 240; + this.state = 242; this.match(LatexParser.CARET); - this.state = 241; + this.state = 243; this.match(LatexParser.L_BRACE); - this.state = 242; + this.state = 244; this.match(LatexParser.R_BRACE); } } @@ -1215,41 +1214,41 @@ export default class LatexParser extends Parser { default: throw new NoViableAltException(this); } - this.state = 245; + this.state = 247; this.match(LatexParser.L_PAREN); - this.state = 246; + this.state = 248; this.expr(0); - this.state = 247; + this.state = 249; this.match(LatexParser.R_PAREN); - this.state = 254; + this.state = 256; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 19: + case 18: { - this.state = 248; + this.state = 250; this.match(LatexParser.CMD_MATHRM); - this.state = 249; + this.state = 251; this.match(LatexParser.L_BRACE); - this.state = 250; + this.state = 252; this.id(); - this.state = 251; + this.state = 253; this.match(LatexParser.R_BRACE); } break; - case 73: + case 72: { - this.state = 253; + this.state = 255; this.id(); } break; default: throw new NoViableAltException(this); } - this.state = 256; + this.state = 258; this.match(LatexParser.L_PAREN); - this.state = 257; + this.state = 259; this.id(); - this.state = 258; + this.state = 260; this.match(LatexParser.R_PAREN); } } @@ -1275,29 +1274,29 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 266; + this.state = 268; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 16: + case 14: { { - this.state = 260; + this.state = 262; this.match(LatexParser.CMD_INT_UNDERSCORE); - this.state = 261; + this.state = 263; this.match(LatexParser.L_BRACE); - this.state = 262; + this.state = 264; localctx._lower_lim_expr = this.expr(0); - this.state = 263; + this.state = 265; this.match(LatexParser.R_BRACE); } } break; - case 17: - case 18: + case 15: + case 16: { - this.state = 265; + this.state = 267; _la = this._input.LA(1); - if(!(_la===17 || _la===18)) { + if(!(_la===15 || _la===16)) { this._errHandler.recoverInline(this); } else { @@ -1309,29 +1308,29 @@ export default class LatexParser extends Parser { default: throw new NoViableAltException(this); } - this.state = 274; + this.state = 276; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 56: + case 55: { { - this.state = 268; + this.state = 270; this.match(LatexParser.CARET); - this.state = 269; + this.state = 271; this.match(LatexParser.L_BRACE); - this.state = 270; + this.state = 272; localctx._upper_lim_expr = this.expr(0); - this.state = 271; + this.state = 273; this.match(LatexParser.R_BRACE); } } break; + case 63: case 64: - case 65: { - this.state = 273; + this.state = 275; _la = this._input.LA(1); - if(!(_la===64 || _la===65)) { + if(!(_la===63 || _la===64)) { this._errHandler.recoverInline(this); } else { @@ -1343,41 +1342,119 @@ export default class LatexParser extends Parser { default: throw new NoViableAltException(this); } - this.state = 276; + this.state = 278; this.match(LatexParser.L_PAREN); - this.state = 277; + this.state = 279; localctx._integrand_expr = this.expr(0); - this.state = 278; + this.state = 280; this.match(LatexParser.R_PAREN); - this.state = 285; + this.state = 287; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 19: + case 18: { - this.state = 279; + this.state = 281; this.match(LatexParser.CMD_MATHRM); - this.state = 280; + this.state = 282; this.match(LatexParser.L_BRACE); - this.state = 281; + this.state = 283; this.id(); - this.state = 282; + this.state = 284; this.match(LatexParser.R_BRACE); } break; - case 73: + case 72: { - this.state = 284; + this.state = 286; this.id(); } break; default: throw new NoViableAltException(this); } - this.state = 287; + this.state = 289; this.match(LatexParser.L_PAREN); - this.state = 288; + this.state = 290; this.id(); - this.state = 289; + this.state = 291; + this.match(LatexParser.R_PAREN); + } + } + catch (re) { + if (re instanceof RecognitionException) { + localctx.exception = re; + this._errHandler.reportError(this, re); + this._errHandler.recover(this, re); + } else { + throw re; + } + } + finally { + this.exitRule(); + } + return localctx; + } + // @RuleVersion(0) + public summation_cmd(): Summation_cmdContext { + let localctx: Summation_cmdContext = new Summation_cmdContext(this, this._ctx, this.state); + this.enterRule(localctx, 34, LatexParser.RULE_summation_cmd); + let _la: number; + try { + this.enterOuterAlt(localctx, 1); + { + { + this.state = 293; + this.match(LatexParser.CMD_SUM_UNDERSCORE); + this.state = 294; + this.match(LatexParser.L_BRACE); + this.state = 295; + this.id(); + this.state = 296; + this.match(LatexParser.EQ); + this.state = 297; + localctx._start_expr = this.expr(0); + this.state = 298; + this.match(LatexParser.R_BRACE); + } + this.state = 306; + this._errHandler.sync(this); + switch (this._input.LA(1)) { + case 55: + { + { + this.state = 300; + this.match(LatexParser.CARET); + this.state = 301; + this.match(LatexParser.L_BRACE); + this.state = 302; + localctx._end_expr = this.expr(0); + this.state = 303; + this.match(LatexParser.R_BRACE); + } + } + break; + case 63: + case 64: + { + this.state = 305; + _la = this._input.LA(1); + if(!(_la===63 || _la===64)) { + this._errHandler.recoverInline(this); + } + else { + this._errHandler.reportMatch(this); + this.consume(); + } + } + break; + default: + throw new NoViableAltException(this); + } + this.state = 308; + this.match(LatexParser.L_PAREN); + this.state = 309; + localctx._operand_expr = this.expr(0); + this.state = 310; this.match(LatexParser.R_PAREN); } } @@ -1398,79 +1475,79 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public derivative_cmd(): Derivative_cmdContext { let localctx: Derivative_cmdContext = new Derivative_cmdContext(this, this._ctx, this.state); - this.enterRule(localctx, 34, LatexParser.RULE_derivative_cmd); + this.enterRule(localctx, 36, LatexParser.RULE_derivative_cmd); try { this.enterOuterAlt(localctx, 1); { - this.state = 291; + this.state = 312; this.match(LatexParser.CMD_FRAC); - this.state = 292; + this.state = 313; this.match(LatexParser.L_BRACE); - this.state = 299; + this.state = 320; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 19: + case 18: { - this.state = 293; + this.state = 314; localctx._MATHRM_0 = this.match(LatexParser.CMD_MATHRM); - this.state = 294; + this.state = 315; this.match(LatexParser.L_BRACE); - this.state = 295; + this.state = 316; this.id(); - this.state = 296; + this.state = 317; this.match(LatexParser.R_BRACE); } break; - case 73: + case 72: { - this.state = 298; + this.state = 319; this.id(); } break; default: throw new NoViableAltException(this); } - this.state = 301; + this.state = 322; this.match(LatexParser.R_BRACE); - this.state = 302; + this.state = 323; this.match(LatexParser.L_BRACE); - this.state = 309; + this.state = 330; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 19: + case 18: { - this.state = 303; + this.state = 324; localctx._MATHRM_1 = this.match(LatexParser.CMD_MATHRM); - this.state = 304; + this.state = 325; this.match(LatexParser.L_BRACE); - this.state = 305; + this.state = 326; this.id(); - this.state = 306; + this.state = 327; this.match(LatexParser.R_BRACE); } break; - case 73: + case 72: { - this.state = 308; + this.state = 329; this.id(); } break; default: throw new NoViableAltException(this); } - this.state = 311; + this.state = 332; this.match(LatexParser.L_PAREN); - this.state = 312; + this.state = 333; this.id(); - this.state = 313; + this.state = 334; this.match(LatexParser.R_PAREN); - this.state = 314; + this.state = 335; this.match(LatexParser.R_BRACE); - this.state = 315; + this.state = 336; this.match(LatexParser.L_PAREN); - this.state = 316; + this.state = 337; this.expr(0); - this.state = 317; + this.state = 338; this.match(LatexParser.R_PAREN); } } @@ -1491,131 +1568,131 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public n_derivative_cmd(): N_derivative_cmdContext { let localctx: N_derivative_cmdContext = new N_derivative_cmdContext(this, this._ctx, this.state); - this.enterRule(localctx, 36, LatexParser.RULE_n_derivative_cmd); + this.enterRule(localctx, 38, LatexParser.RULE_n_derivative_cmd); try { this.enterOuterAlt(localctx, 1); { - this.state = 319; + this.state = 340; this.match(LatexParser.CMD_FRAC); - this.state = 320; + this.state = 341; this.match(LatexParser.L_BRACE); - this.state = 327; + this.state = 348; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 19: + case 18: { - this.state = 321; + this.state = 342; localctx._MATHRM_0 = this.match(LatexParser.CMD_MATHRM); - this.state = 322; + this.state = 343; this.match(LatexParser.L_BRACE); - this.state = 323; + this.state = 344; this.id(); - this.state = 324; + this.state = 345; this.match(LatexParser.R_BRACE); } break; - case 73: + case 72: { - this.state = 326; + this.state = 347; this.id(); } break; default: throw new NoViableAltException(this); } - this.state = 335; + this.state = 356; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 56: + case 55: { { - this.state = 329; + this.state = 350; this.match(LatexParser.CARET); - this.state = 330; + this.state = 351; this.match(LatexParser.L_BRACE); - this.state = 331; + this.state = 352; this.number_(); - this.state = 332; + this.state = 353; this.match(LatexParser.R_BRACE); } } break; - case 64: + case 63: { - this.state = 334; + this.state = 355; localctx._single_char_exp1 = this.match(LatexParser.CARET_SINGLE_CHAR_NUMBER); } break; default: throw new NoViableAltException(this); } - this.state = 337; + this.state = 358; this.match(LatexParser.R_BRACE); - this.state = 338; + this.state = 359; this.match(LatexParser.L_BRACE); - this.state = 345; + this.state = 366; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 19: + case 18: { - this.state = 339; + this.state = 360; localctx._MATHRM_1 = this.match(LatexParser.CMD_MATHRM); - this.state = 340; + this.state = 361; this.match(LatexParser.L_BRACE); - this.state = 341; + this.state = 362; this.id(); - this.state = 342; + this.state = 363; this.match(LatexParser.R_BRACE); } break; - case 73: + case 72: { - this.state = 344; + this.state = 365; this.id(); } break; default: throw new NoViableAltException(this); } - this.state = 347; + this.state = 368; this.match(LatexParser.L_PAREN); - this.state = 348; + this.state = 369; this.id(); - this.state = 349; + this.state = 370; this.match(LatexParser.R_PAREN); - this.state = 356; + this.state = 377; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 56: + case 55: { { - this.state = 350; + this.state = 371; this.match(LatexParser.CARET); - this.state = 351; + this.state = 372; this.match(LatexParser.L_BRACE); - this.state = 352; + this.state = 373; this.number_(); - this.state = 353; + this.state = 374; this.match(LatexParser.R_BRACE); } } break; - case 64: + case 63: { - this.state = 355; + this.state = 376; localctx._single_char_exp2 = this.match(LatexParser.CARET_SINGLE_CHAR_NUMBER); } break; default: throw new NoViableAltException(this); } - this.state = 358; + this.state = 379; this.match(LatexParser.R_BRACE); - this.state = 359; + this.state = 380; this.match(LatexParser.L_PAREN); - this.state = 360; + this.state = 381; this.expr(0); - this.state = 361; + this.state = 382; this.match(LatexParser.R_PAREN); } } @@ -1636,21 +1713,21 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public argument(): ArgumentContext { let localctx: ArgumentContext = new ArgumentContext(this, this._ctx, this.state); - this.enterRule(localctx, 38, LatexParser.RULE_argument); + this.enterRule(localctx, 40, LatexParser.RULE_argument); let _la: number; try { - this.state = 373; + this.state = 394; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 29, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 30, this._ctx) ) { case 1: this.enterOuterAlt(localctx, 1); { { - this.state = 363; + this.state = 384; this.id(); - this.state = 364; + this.state = 385; this.match(LatexParser.EQ); - this.state = 365; + this.state = 386; this.expr(0); } } @@ -1659,31 +1736,31 @@ export default class LatexParser extends Parser { this.enterOuterAlt(localctx, 2); { { - this.state = 367; + this.state = 388; this.expr(0); - this.state = 368; + this.state = 389; localctx._lower = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===58 || _la===60)) { + if(!(_la===57 || _la===59)) { localctx._lower = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 369; + this.state = 390; this.id(); - this.state = 370; + this.state = 391; localctx._upper = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===58 || _la===60)) { + if(!(_la===57 || _la===59)) { localctx._upper = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 371; + this.state = 392; this.expr(0); } } @@ -1707,22 +1784,22 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public condition(): ConditionContext { let localctx: ConditionContext = new ConditionContext(this, this._ctx, this.state); - this.enterRule(localctx, 40, LatexParser.RULE_condition); + this.enterRule(localctx, 42, LatexParser.RULE_condition); try { - this.state = 377; + this.state = 398; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 30, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 31, this._ctx) ) { case 1: this.enterOuterAlt(localctx, 1); { - this.state = 375; + this.state = 396; this.condition_single(); } break; case 2: this.enterOuterAlt(localctx, 2); { - this.state = 376; + this.state = 397; this.condition_chain(); } break; @@ -1745,29 +1822,29 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public id_list(): Id_listContext { let localctx: Id_listContext = new Id_listContext(this, this._ctx, this.state); - this.enterRule(localctx, 42, LatexParser.RULE_id_list); + this.enterRule(localctx, 44, LatexParser.RULE_id_list); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 379; + this.state = 400; this.id(); - this.state = 382; + this.state = 403; this._errHandler.sync(this); _la = this._input.LA(1); do { { { - this.state = 380; + this.state = 401; this.match(LatexParser.COMMA); - this.state = 381; + this.state = 402; this.id(); } } - this.state = 384; + this.state = 405; this._errHandler.sync(this); _la = this._input.LA(1); - } while (_la===62); + } while (_la===61); } } catch (re) { @@ -1787,34 +1864,34 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public guess(): GuessContext { let localctx: GuessContext = new GuessContext(this, this._ctx, this.state); - this.enterRule(localctx, 44, LatexParser.RULE_guess); + this.enterRule(localctx, 46, LatexParser.RULE_guess); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 386; + this.state = 407; this.id(); - this.state = 387; + this.state = 408; _la = this._input.LA(1); - if(!(_la===26 || _la===27)) { + if(!(_la===25 || _la===26)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 390; + this.state = 411; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 32, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 33, this._ctx) ) { case 1: { - this.state = 388; + this.state = 409; this.number_(); } break; case 2: { - this.state = 389; + this.state = 410; this.number_with_units(); } break; @@ -1838,29 +1915,29 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public guess_list(): Guess_listContext { let localctx: Guess_listContext = new Guess_listContext(this, this._ctx, this.state); - this.enterRule(localctx, 46, LatexParser.RULE_guess_list); + this.enterRule(localctx, 48, LatexParser.RULE_guess_list); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 392; + this.state = 413; this.guess(); - this.state = 395; + this.state = 416; this._errHandler.sync(this); _la = this._input.LA(1); do { { { - this.state = 393; + this.state = 414; this.match(LatexParser.COMMA); - this.state = 394; + this.state = 415; this.guess(); } } - this.state = 397; + this.state = 418; this._errHandler.sync(this); _la = this._input.LA(1); - } while (_la===62); + } while (_la===61); } } catch (re) { @@ -1880,24 +1957,24 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public condition_single(): Condition_singleContext { let localctx: Condition_singleContext = new Condition_singleContext(this, this._ctx, this.state); - this.enterRule(localctx, 48, LatexParser.RULE_condition_single); + this.enterRule(localctx, 50, LatexParser.RULE_condition_single); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 399; + this.state = 420; this.expr(0); - this.state = 400; + this.state = 421; localctx._operator = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 58)) & ~0x1F) === 0 && ((1 << (_la - 58)) & 15) !== 0))) { + if(!(((((_la - 57)) & ~0x1F) === 0 && ((1 << (_la - 57)) & 15) !== 0))) { localctx._operator = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 401; + this.state = 422; this.expr(0); } } @@ -1918,36 +1995,36 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public condition_chain(): Condition_chainContext { let localctx: Condition_chainContext = new Condition_chainContext(this, this._ctx, this.state); - this.enterRule(localctx, 50, LatexParser.RULE_condition_chain); + this.enterRule(localctx, 52, LatexParser.RULE_condition_chain); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 403; + this.state = 424; this.expr(0); - this.state = 404; + this.state = 425; localctx._lower = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 58)) & ~0x1F) === 0 && ((1 << (_la - 58)) & 15) !== 0))) { + if(!(((((_la - 57)) & ~0x1F) === 0 && ((1 << (_la - 57)) & 15) !== 0))) { localctx._lower = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 405; + this.state = 426; this.expr(0); - this.state = 406; + this.state = 427; localctx._upper = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 58)) & ~0x1F) === 0 && ((1 << (_la - 58)) & 15) !== 0))) { + if(!(((((_la - 57)) & ~0x1F) === 0 && ((1 << (_la - 57)) & 15) !== 0))) { localctx._upper = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 407; + this.state = 428; this.expr(0); } } @@ -1968,26 +2045,26 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public matrix_row(): Matrix_rowContext { let localctx: Matrix_rowContext = new Matrix_rowContext(this, this._ctx, this.state); - this.enterRule(localctx, 52, LatexParser.RULE_matrix_row); + this.enterRule(localctx, 54, LatexParser.RULE_matrix_row); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 409; + this.state = 430; this.expr(0); - this.state = 414; + this.state = 435; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===69) { + while (_la===68) { { { - this.state = 410; + this.state = 431; this.match(LatexParser.AMPERSAND); - this.state = 411; + this.state = 432; this.expr(0); } } - this.state = 416; + this.state = 437; this._errHandler.sync(this); _la = this._input.LA(1); } @@ -2010,47 +2087,47 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public user_function(): User_functionContext { let localctx: User_functionContext = new User_functionContext(this, this._ctx, this.state); - this.enterRule(localctx, 54, LatexParser.RULE_user_function); + this.enterRule(localctx, 56, LatexParser.RULE_user_function); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 417; + this.state = 438; this.id(); - this.state = 418; + this.state = 439; this.match(LatexParser.L_PAREN); { - this.state = 419; + this.state = 440; this.argument(); - this.state = 424; + this.state = 445; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===62) { + while (_la===61) { { { - this.state = 420; + this.state = 441; this.match(LatexParser.COMMA); - this.state = 421; + this.state = 442; this.argument(); } } - this.state = 426; + this.state = 447; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 427; + this.state = 448; this.match(LatexParser.R_PAREN); - this.state = 432; + this.state = 453; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 36, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 37, this._ctx) ) { case 1: { - this.state = 428; + this.state = 449; localctx._points_id_0 = this.match(LatexParser.ID); - this.state = 429; + this.state = 450; localctx._num_points = this.number_(); - this.state = 430; + this.state = 451; localctx._points_id_1 = this.match(LatexParser.ID); } break; @@ -2074,58 +2151,58 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public builtin_function(): Builtin_functionContext { let localctx: Builtin_functionContext = new Builtin_functionContext(this, this._ctx, this.state); - this.enterRule(localctx, 56, LatexParser.RULE_builtin_function); + this.enterRule(localctx, 58, LatexParser.RULE_builtin_function); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 440; + this.state = 461; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 19: + case 18: { - this.state = 434; + this.state = 455; this.match(LatexParser.CMD_MATHRM); - this.state = 435; + this.state = 456; this.match(LatexParser.L_BRACE); - this.state = 436; + this.state = 457; this.id(); - this.state = 437; + this.state = 458; this.match(LatexParser.R_BRACE); } break; - case 73: + case 72: { - this.state = 439; + this.state = 460; this.id(); } break; default: throw new NoViableAltException(this); } - this.state = 442; + this.state = 463; this.match(LatexParser.L_PAREN); { - this.state = 443; + this.state = 464; this.expr(0); - this.state = 448; + this.state = 469; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===62) { + while (_la===61) { { { - this.state = 444; + this.state = 465; this.match(LatexParser.COMMA); - this.state = 445; + this.state = 466; this.expr(0); } } - this.state = 450; + this.state = 471; this._errHandler.sync(this); _la = this._input.LA(1); } } - this.state = 451; + this.state = 472; this.match(LatexParser.R_PAREN); } } @@ -2156,25 +2233,25 @@ export default class LatexParser extends Parser { let _parentState: number = this.state; let localctx: ExprContext = new ExprContext(this, this._ctx, _parentState); let _prevctx: ExprContext = localctx; - let _startState: number = 58; - this.enterRecursionRule(localctx, 58, LatexParser.RULE_expr, _p); + let _startState: number = 60; + this.enterRecursionRule(localctx, 60, LatexParser.RULE_expr, _p); let _la: number; try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 582; + this.state = 603; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 46, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 47, this._ctx) ) { case 1: { localctx = new ExponentContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 454; + this.state = 475; this.id(); - this.state = 455; + this.state = 476; this.match(LatexParser.CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT); } break; @@ -2183,18 +2260,18 @@ export default class LatexParser extends Parser { localctx = new ExponentContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 457; + this.state = 478; this.id(); - this.state = 458; + this.state = 479; _la = this._input.LA(1); - if(!(_la===64 || _la===65)) { + if(!(_la===63 || _la===64)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 459; + this.state = 480; this.match(LatexParser.UNDERSCORE_SUBSCRIPT); } break; @@ -2203,17 +2280,17 @@ export default class LatexParser extends Parser { localctx = new ExponentContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 461; + this.state = 482; this.id(); - this.state = 462; + this.state = 483; this.match(LatexParser.CARET); - this.state = 463; + this.state = 484; this.match(LatexParser.L_BRACE); - this.state = 464; + this.state = 485; this.expr(0); - this.state = 465; + this.state = 486; this.match(LatexParser.R_BRACE); - this.state = 466; + this.state = 487; this.match(LatexParser.UNDERSCORE_SUBSCRIPT); } break; @@ -2222,7 +2299,7 @@ export default class LatexParser extends Parser { localctx = new SingleIntSqrtContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 468; + this.state = 489; this.match(LatexParser.CMD_SQRT_INT); } break; @@ -2231,13 +2308,13 @@ export default class LatexParser extends Parser { localctx = new SqrtContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 469; + this.state = 490; this.match(LatexParser.CMD_SQRT); - this.state = 470; + this.state = 491; this.match(LatexParser.L_BRACE); - this.state = 471; + this.state = 492; this.expr(0); - this.state = 472; + this.state = 493; this.match(LatexParser.R_BRACE); } break; @@ -2246,27 +2323,27 @@ export default class LatexParser extends Parser { localctx = new MatrixContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 474; + this.state = 495; this.match(LatexParser.BEGIN_MATRIX); - this.state = 475; + this.state = 496; this.matrix_row(); - this.state = 480; + this.state = 501; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===70) { + while (_la===69) { { { - this.state = 476; + this.state = 497; this.match(LatexParser.DOUBLE_BACKSLASH); - this.state = 477; + this.state = 498; this.matrix_row(); } } - this.state = 482; + this.state = 503; this._errHandler.sync(this); _la = this._input.LA(1); } - this.state = 483; + this.state = 504; this.match(LatexParser.END_MATRIX); } break; @@ -2275,7 +2352,7 @@ export default class LatexParser extends Parser { localctx = new TrigFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 485; + this.state = 506; this.trig_function(); } break; @@ -2284,7 +2361,7 @@ export default class LatexParser extends Parser { localctx = new IndefiniteIntegralContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 486; + this.state = 507; this.indefinite_integral_cmd(); } break; @@ -2293,7 +2370,7 @@ export default class LatexParser extends Parser { localctx = new IntegralContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 487; + this.state = 508; this.integral_cmd(); } break; @@ -2302,7 +2379,7 @@ export default class LatexParser extends Parser { localctx = new DerivativeContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 488; + this.state = 509; this.derivative_cmd(); } break; @@ -2311,7 +2388,7 @@ export default class LatexParser extends Parser { localctx = new NDerivativeContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 489; + this.state = 510; this.n_derivative_cmd(); } break; @@ -2320,23 +2397,23 @@ export default class LatexParser extends Parser { localctx = new LnContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 491; + this.state = 512; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===30) { + if (_la===29) { { - this.state = 490; + this.state = 511; this.match(LatexParser.BACKSLASH); } } - this.state = 493; + this.state = 514; this.match(LatexParser.CMD_LN); - this.state = 494; + this.state = 515; this.match(LatexParser.L_PAREN); - this.state = 495; + this.state = 516; this.expr(0); - this.state = 496; + this.state = 517; this.match(LatexParser.R_PAREN); } break; @@ -2345,23 +2422,23 @@ export default class LatexParser extends Parser { localctx = new LogContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 499; + this.state = 520; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===30) { + if (_la===29) { { - this.state = 498; + this.state = 519; this.match(LatexParser.BACKSLASH); } } - this.state = 501; + this.state = 522; this.match(LatexParser.CMD_LOG); - this.state = 502; + this.state = 523; this.match(LatexParser.L_PAREN); - this.state = 503; + this.state = 524; this.expr(0); - this.state = 504; + this.state = 525; this.match(LatexParser.R_PAREN); } break; @@ -2370,19 +2447,19 @@ export default class LatexParser extends Parser { localctx = new BaseLogContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 506; + this.state = 527; this.match(LatexParser.CMD_SLASH_LOG_UNDERSCORE); - this.state = 507; + this.state = 528; this.match(LatexParser.L_BRACE); - this.state = 508; + this.state = 529; this.expr(0); - this.state = 509; + this.state = 530; this.match(LatexParser.R_BRACE); - this.state = 510; + this.state = 531; this.match(LatexParser.L_PAREN); - this.state = 511; + this.state = 532; this.expr(0); - this.state = 512; + this.state = 533; this.match(LatexParser.R_PAREN); } break; @@ -2391,20 +2468,20 @@ export default class LatexParser extends Parser { localctx = new BaseLogSingleCharContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 514; + this.state = 535; _la = this._input.LA(1); - if(!(_la===48 || _la===49)) { + if(!(_la===47 || _la===48)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 515; + this.state = 536; this.match(LatexParser.L_PAREN); - this.state = 516; + this.state = 537; this.expr(0); - this.state = 517; + this.state = 538; this.match(LatexParser.R_PAREN); } break; @@ -2413,11 +2490,11 @@ export default class LatexParser extends Parser { localctx = new NormContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 519; + this.state = 540; this.match(LatexParser.DOUBLE_VBAR); - this.state = 520; + this.state = 541; this.expr(0); - this.state = 521; + this.state = 542; this.match(LatexParser.DOUBLE_VBAR); } break; @@ -2426,11 +2503,11 @@ export default class LatexParser extends Parser { localctx = new AbsContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 523; + this.state = 544; this.match(LatexParser.VBAR); - this.state = 524; + this.state = 545; this.expr(0); - this.state = 525; + this.state = 546; this.match(LatexParser.VBAR); } break; @@ -2439,7 +2516,7 @@ export default class LatexParser extends Parser { localctx = new NumberWithUnitsExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 527; + this.state = 548; this.number_with_units(); } break; @@ -2448,7 +2525,7 @@ export default class LatexParser extends Parser { localctx = new NumberExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 528; + this.state = 549; this.number_(); } break; @@ -2457,9 +2534,9 @@ export default class LatexParser extends Parser { localctx = new UnaryMinusContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 529; + this.state = 550; this.match(LatexParser.SUB); - this.state = 530; + this.state = 551; this.expr(30); } break; @@ -2468,19 +2545,19 @@ export default class LatexParser extends Parser { localctx = new DivideContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 531; + this.state = 552; this.match(LatexParser.CMD_FRAC); - this.state = 532; + this.state = 553; this.match(LatexParser.L_BRACE); - this.state = 533; + this.state = 554; this.expr(0); - this.state = 534; + this.state = 555; this.match(LatexParser.R_BRACE); - this.state = 535; + this.state = 556; this.match(LatexParser.L_BRACE); - this.state = 536; + this.state = 557; this.expr(0); - this.state = 537; + this.state = 558; this.match(LatexParser.R_BRACE); } break; @@ -2489,7 +2566,7 @@ export default class LatexParser extends Parser { localctx = new DivideIntsContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 539; + this.state = 560; this.match(LatexParser.CMD_FRAC_INTS); } break; @@ -2498,7 +2575,7 @@ export default class LatexParser extends Parser { localctx = new VariableContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 540; + this.state = 561; this.id(); } break; @@ -2507,7 +2584,7 @@ export default class LatexParser extends Parser { localctx = new UserFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 541; + this.state = 562; this.user_function(); } break; @@ -2516,7 +2593,7 @@ export default class LatexParser extends Parser { localctx = new BuiltinFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 542; + this.state = 563; this.builtin_function(); } break; @@ -2525,7 +2602,7 @@ export default class LatexParser extends Parser { localctx = new PiExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 543; + this.state = 564; this.match(LatexParser.PI); } break; @@ -2534,11 +2611,11 @@ export default class LatexParser extends Parser { localctx = new SubExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 544; + this.state = 565; this.match(LatexParser.L_PAREN); - this.state = 545; + this.state = 566; this.expr(0); - this.state = 546; + this.state = 567; this.match(LatexParser.R_PAREN); } break; @@ -2547,9 +2624,9 @@ export default class LatexParser extends Parser { localctx = new MissingMultiplicationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 548; + this.state = 569; this.number_(); - this.state = 549; + this.state = 570; this.expr(12); } break; @@ -2558,9 +2635,9 @@ export default class LatexParser extends Parser { localctx = new MissingMultiplicationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 551; + this.state = 572; this.number_with_units(); - this.state = 552; + this.state = 573; this.expr(11); } break; @@ -2569,9 +2646,9 @@ export default class LatexParser extends Parser { localctx = new MissingMultiplicationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 554; + this.state = 575; this.match(LatexParser.PI); - this.state = 555; + this.state = 576; this.expr(10); } break; @@ -2580,16 +2657,16 @@ export default class LatexParser extends Parser { localctx = new EmptyPlaceholderContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 556; + this.state = 577; this.match(LatexParser.CMD_PLACEHOLDER); - this.state = 559; + this.state = 580; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 42, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 43, this._ctx) ) { case 1: { - this.state = 557; + this.state = 578; this.match(LatexParser.L_BRACE); - this.state = 558; + this.state = 579; this.match(LatexParser.R_BRACE); } break; @@ -2601,75 +2678,75 @@ export default class LatexParser extends Parser { localctx = new RemoveOperatorFontContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 566; + this.state = 587; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 43, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 44, this._ctx) ) { case 1: { - this.state = 561; + this.state = 582; this.match(LatexParser.CMD_MATHRM); - this.state = 562; + this.state = 583; this.match(LatexParser.L_BRACE); - this.state = 563; + this.state = 584; this.expr(0); - this.state = 564; + this.state = 585; this.match(LatexParser.R_BRACE); } break; } - this.state = 571; + this.state = 592; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 63: + case 62: { - this.state = 568; + this.state = 589; this.match(LatexParser.DECIMAL_POINT); } break; - case 55: - case 66: + case 54: + case 65: { - this.state = 569; + this.state = 590; this.number_(); } break; - case 57: + case 56: { - this.state = 570; + this.state = 591; this.match(LatexParser.EQ); } break; - case 19: + case 18: break; default: break; } - this.state = 573; + this.state = 594; this.match(LatexParser.CMD_MATHRM); - this.state = 574; + this.state = 595; this.match(LatexParser.L_BRACE); - this.state = 575; + this.state = 596; this.expr(0); - this.state = 576; + this.state = 597; this.match(LatexParser.R_BRACE); - this.state = 580; + this.state = 601; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 45, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 46, this._ctx) ) { case 1: { - this.state = 577; + this.state = 598; this.match(LatexParser.DECIMAL_POINT); } break; case 2: { - this.state = 578; + this.state = 599; this.number_(); } break; case 3: { - this.state = 579; + this.state = 600; this.match(LatexParser.EQ); } break; @@ -2678,9 +2755,9 @@ export default class LatexParser extends Parser { break; } this._ctx.stop = this._input.LT(-1); - this.state = 648; + this.state = 669; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 48, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 49, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { if (this._parseListeners != null) { @@ -2688,20 +2765,20 @@ export default class LatexParser extends Parser { } _prevctx = localctx; { - this.state = 646; + this.state = 667; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 47, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 48, this._ctx) ) { case 1: { localctx = new MatrixMultiplyContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 584; + this.state = 605; if (!(this.precpred(this._ctx, 29))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 29)"); } - this.state = 585; + this.state = 606; this.match(LatexParser.CMD_TIMES); - this.state = 586; + this.state = 607; this.expr(30); } break; @@ -2709,13 +2786,13 @@ export default class LatexParser extends Parser { { localctx = new MultiplyContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 587; + this.state = 608; if (!(this.precpred(this._ctx, 28))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 28)"); } - this.state = 588; + this.state = 609; this.match(LatexParser.CMD_CDOT); - this.state = 589; + this.state = 610; this.expr(29); } break; @@ -2723,13 +2800,13 @@ export default class LatexParser extends Parser { { localctx = new SubtractContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 590; + this.state = 611; if (!(this.precpred(this._ctx, 25))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 25)"); } - this.state = 591; + this.state = 612; this.match(LatexParser.SUB); - this.state = 592; + this.state = 613; this.expr(26); } break; @@ -2737,13 +2814,13 @@ export default class LatexParser extends Parser { { localctx = new AddContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 593; + this.state = 614; if (!(this.precpred(this._ctx, 24))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 24)"); } - this.state = 594; + this.state = 615; this.match(LatexParser.ADD); - this.state = 595; + this.state = 616; this.expr(25); } break; @@ -2751,13 +2828,13 @@ export default class LatexParser extends Parser { { localctx = new ExponentContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 596; + this.state = 617; if (!(this.precpred(this._ctx, 51))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 51)"); } - this.state = 597; + this.state = 618; _la = this._input.LA(1); - if(!(_la===64 || _la===65)) { + if(!(_la===63 || _la===64)) { this._errHandler.recoverInline(this); } else { @@ -2770,17 +2847,17 @@ export default class LatexParser extends Parser { { localctx = new ExponentContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 598; + this.state = 619; if (!(this.precpred(this._ctx, 50))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 50)"); } - this.state = 599; + this.state = 620; this.match(LatexParser.CARET); - this.state = 600; + this.state = 621; this.match(LatexParser.L_BRACE); - this.state = 601; + this.state = 622; this.expr(0); - this.state = 602; + this.state = 623; this.match(LatexParser.R_BRACE); } break; @@ -2788,21 +2865,21 @@ export default class LatexParser extends Parser { { localctx = new IndexContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 604; + this.state = 625; if (!(this.precpred(this._ctx, 49))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 49)"); } - this.state = 605; + this.state = 626; this.match(LatexParser.UNDERSCORE); - this.state = 606; + this.state = 627; this.match(LatexParser.L_BRACE); - this.state = 607; + this.state = 628; this.expr(0); - this.state = 608; + this.state = 629; this.match(LatexParser.COMMA); - this.state = 609; + this.state = 630; this.expr(0); - this.state = 610; + this.state = 631; this.match(LatexParser.R_BRACE); } break; @@ -2810,11 +2887,11 @@ export default class LatexParser extends Parser { { localctx = new TransposeContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 612; + this.state = 633; if (!(this.precpred(this._ctx, 48))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 48)"); } - this.state = 613; + this.state = 634; this.match(LatexParser.TRANSPOSE); } break; @@ -2822,11 +2899,11 @@ export default class LatexParser extends Parser { { localctx = new FactorialContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 614; + this.state = 635; if (!(this.precpred(this._ctx, 47))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 47)"); } - this.state = 615; + this.state = 636; this.match(LatexParser.EXCLAMATION); } break; @@ -2834,15 +2911,15 @@ export default class LatexParser extends Parser { { localctx = new EmptySubscriptContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 616; + this.state = 637; if (!(this.precpred(this._ctx, 18))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 18)"); } - this.state = 617; + this.state = 638; this.match(LatexParser.UNDERSCORE); - this.state = 618; + this.state = 639; this.match(LatexParser.L_BRACE); - this.state = 619; + this.state = 640; this.match(LatexParser.R_BRACE); } break; @@ -2850,15 +2927,15 @@ export default class LatexParser extends Parser { { localctx = new EmptySuperscriptContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 620; + this.state = 641; if (!(this.precpred(this._ctx, 17))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 17)"); } - this.state = 621; + this.state = 642; this.match(LatexParser.CARET); - this.state = 622; + this.state = 643; this.match(LatexParser.L_BRACE); - this.state = 623; + this.state = 644; this.match(LatexParser.R_BRACE); } break; @@ -2866,11 +2943,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 624; + this.state = 645; if (!(this.precpred(this._ctx, 16))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 16)"); } - this.state = 625; + this.state = 646; this.id(); } break; @@ -2878,11 +2955,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 626; + this.state = 647; if (!(this.precpred(this._ctx, 15))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 15)"); } - this.state = 627; + this.state = 648; this.number_(); } break; @@ -2890,11 +2967,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 628; + this.state = 649; if (!(this.precpred(this._ctx, 14))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 14)"); } - this.state = 629; + this.state = 650; this.number_with_units(); } break; @@ -2902,11 +2979,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 630; + this.state = 651; if (!(this.precpred(this._ctx, 13))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); } - this.state = 631; + this.state = 652; this.match(LatexParser.PI); } break; @@ -2914,11 +2991,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 632; + this.state = 653; if (!(this.precpred(this._ctx, 9))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } - this.state = 633; + this.state = 654; this.user_function(); } break; @@ -2926,11 +3003,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 634; + this.state = 655; if (!(this.precpred(this._ctx, 8))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } - this.state = 635; + this.state = 656; this.builtin_function(); } break; @@ -2938,11 +3015,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 636; + this.state = 657; if (!(this.precpred(this._ctx, 7))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } - this.state = 637; + this.state = 658; this.trig_function(); } break; @@ -2950,11 +3027,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 638; + this.state = 659; if (!(this.precpred(this._ctx, 6))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); } - this.state = 639; + this.state = 660; this.indefinite_integral_cmd(); } break; @@ -2962,11 +3039,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 640; + this.state = 661; if (!(this.precpred(this._ctx, 5))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); } - this.state = 641; + this.state = 662; this.integral_cmd(); } break; @@ -2974,11 +3051,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 642; + this.state = 663; if (!(this.precpred(this._ctx, 4))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 4)"); } - this.state = 643; + this.state = 664; this.derivative_cmd(); } break; @@ -2986,20 +3063,20 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 644; + this.state = 665; if (!(this.precpred(this._ctx, 3))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 3)"); } - this.state = 645; + this.state = 666; this.n_derivative_cmd(); } break; } } } - this.state = 650; + this.state = 671; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 48, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 49, this._ctx); } } } @@ -3020,12 +3097,12 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public u_block(): U_blockContext { let localctx: U_blockContext = new U_blockContext(this, this._ctx, this.state); - this.enterRule(localctx, 60, LatexParser.RULE_u_block); + this.enterRule(localctx, 62, LatexParser.RULE_u_block); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 651; + this.state = 672; _la = this._input.LA(1); if(!(_la===1 || _la===2)) { this._errHandler.recoverInline(this); @@ -3034,11 +3111,11 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 652; + this.state = 673; this.u_expr(0); - this.state = 653; + this.state = 674; _la = this._input.LA(1); - if(!(_la===79 || _la===80)) { + if(!(_la===78 || _la===79)) { this._errHandler.recoverInline(this); } else { @@ -3064,12 +3141,12 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public u_insert_matrix(): U_insert_matrixContext { let localctx: U_insert_matrixContext = new U_insert_matrixContext(this, this._ctx, this.state); - this.enterRule(localctx, 62, LatexParser.RULE_u_insert_matrix); + this.enterRule(localctx, 64, LatexParser.RULE_u_insert_matrix); let _la: number; try { this.enterOuterAlt(localctx, 1); { - this.state = 655; + this.state = 676; _la = this._input.LA(1); if(!(_la===1 || _la===2)) { this._errHandler.recoverInline(this); @@ -3078,38 +3155,38 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 656; + this.state = 677; localctx._numRows = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===93 || _la===94)) { + if(!(_la===92 || _la===93)) { localctx._numRows = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 657; + this.state = 678; _la = this._input.LA(1); - if(!(_la===84 || _la===86)) { + if(!(_la===83 || _la===85)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 658; + this.state = 679; localctx._numColumns = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===93 || _la===94)) { + if(!(_la===92 || _la===93)) { localctx._numColumns = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 659; + this.state = 680; _la = this._input.LA(1); - if(!(_la===79 || _la===80)) { + if(!(_la===78 || _la===79)) { this._errHandler.recoverInline(this); } else { @@ -3135,42 +3212,42 @@ export default class LatexParser extends Parser { // @RuleVersion(0) public u_fraction(): U_fractionContext { let localctx: U_fractionContext = new U_fractionContext(this, this._ctx, this.state); - this.enterRule(localctx, 64, LatexParser.RULE_u_fraction); + this.enterRule(localctx, 66, LatexParser.RULE_u_fraction); let _la: number; try { - this.state = 669; + this.state = 690; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 81: + case 80: this.enterOuterAlt(localctx, 1); { - this.state = 661; + this.state = 682; this.match(LatexParser.U_CMD_FRAC); - this.state = 662; + this.state = 683; this.match(LatexParser.U_L_BRACE); - this.state = 663; + this.state = 684; _la = this._input.LA(1); - if(!(_la===93 || _la===94)) { + if(!(_la===92 || _la===93)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 664; + this.state = 685; this.match(LatexParser.U_R_BRACE); - this.state = 665; + this.state = 686; this.match(LatexParser.U_L_BRACE); - this.state = 666; + this.state = 687; this.match(LatexParser.U_NUMBER); - this.state = 667; + this.state = 688; this.match(LatexParser.U_R_BRACE); } break; - case 82: + case 81: this.enterOuterAlt(localctx, 2); { - this.state = 668; + this.state = 689; this.match(LatexParser.U_CMD_FRAC_INTS); } break; @@ -3205,90 +3282,90 @@ export default class LatexParser extends Parser { let _parentState: number = this.state; let localctx: U_exprContext = new U_exprContext(this, this._ctx, _parentState); let _prevctx: U_exprContext = localctx; - let _startState: number = 66; - this.enterRecursionRule(localctx, 66, LatexParser.RULE_u_expr, _p); + let _startState: number = 68; + this.enterRecursionRule(localctx, 68, LatexParser.RULE_u_expr, _p); try { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 693; + this.state = 714; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 85: + case 84: { localctx = new UnitSqrtContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 672; + this.state = 693; this.match(LatexParser.U_CMD_SQRT); - this.state = 673; + this.state = 694; this.match(LatexParser.U_L_BRACE); - this.state = 674; + this.state = 695; this.expr(0); - this.state = 675; + this.state = 696; this.match(LatexParser.U_R_BRACE); } break; - case 81: + case 80: { localctx = new UnitDivideContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 677; + this.state = 698; this.match(LatexParser.U_CMD_FRAC); - this.state = 678; + this.state = 699; this.match(LatexParser.U_L_BRACE); - this.state = 681; + this.state = 702; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 81: - case 85: + case 80: + case 84: + case 87: case 88: - case 89: { - this.state = 679; + this.state = 700; this.u_expr(0); } break; - case 93: + case 92: { - this.state = 680; + this.state = 701; this.match(LatexParser.U_ONE); } break; default: throw new NoViableAltException(this); } - this.state = 683; + this.state = 704; this.match(LatexParser.U_R_BRACE); - this.state = 684; + this.state = 705; this.match(LatexParser.U_L_BRACE); - this.state = 685; + this.state = 706; this.u_expr(0); - this.state = 686; + this.state = 707; this.match(LatexParser.U_R_BRACE); } break; - case 88: + case 87: { localctx = new UnitNameContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 688; + this.state = 709; this.match(LatexParser.U_NAME); } break; - case 89: + case 88: { localctx = new UnitSubExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 689; + this.state = 710; this.match(LatexParser.U_L_PAREN); - this.state = 690; + this.state = 711; this.u_expr(0); - this.state = 691; + this.state = 712; this.match(LatexParser.U_R_PAREN); } break; @@ -3296,9 +3373,9 @@ export default class LatexParser extends Parser { throw new NoViableAltException(this); } this._ctx.stop = this._input.LT(-1); - this.state = 717; + this.state = 738; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 53, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 54, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { if (this._parseListeners != null) { @@ -3306,20 +3383,20 @@ export default class LatexParser extends Parser { } _prevctx = localctx; { - this.state = 715; + this.state = 736; this._errHandler.sync(this); - switch ( this._interp.adaptivePredict(this._input, 52, this._ctx) ) { + switch ( this._interp.adaptivePredict(this._input, 53, this._ctx) ) { case 1: { localctx = new UnitMultiplyContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 695; + this.state = 716; if (!(this.precpred(this._ctx, 4))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 4)"); } - this.state = 696; + this.state = 717; this.match(LatexParser.U_CMD_CDOT); - this.state = 697; + this.state = 718; this.u_expr(5); } break; @@ -3327,13 +3404,13 @@ export default class LatexParser extends Parser { { localctx = new UnitExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 698; + this.state = 719; if (!(this.precpred(this._ctx, 9))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } - this.state = 699; + this.state = 720; this.match(LatexParser.U_CARET); - this.state = 700; + this.state = 721; this.match(LatexParser.U_NUMBER); } break; @@ -3341,17 +3418,17 @@ export default class LatexParser extends Parser { { localctx = new UnitExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 701; + this.state = 722; if (!(this.precpred(this._ctx, 8))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } - this.state = 702; + this.state = 723; this.match(LatexParser.U_CARET); - this.state = 703; + this.state = 724; this.match(LatexParser.U_L_BRACE); - this.state = 704; + this.state = 725; this.match(LatexParser.U_NUMBER); - this.state = 705; + this.state = 726; this.match(LatexParser.U_R_BRACE); } break; @@ -3359,13 +3436,13 @@ export default class LatexParser extends Parser { { localctx = new UnitFractionalExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 706; + this.state = 727; if (!(this.precpred(this._ctx, 7))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } - this.state = 707; + this.state = 728; this.match(LatexParser.U_CARET); - this.state = 708; + this.state = 729; this.u_fraction(); } break; @@ -3373,26 +3450,26 @@ export default class LatexParser extends Parser { { localctx = new UnitFractionalExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 709; + this.state = 730; if (!(this.precpred(this._ctx, 6))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); } - this.state = 710; + this.state = 731; this.match(LatexParser.U_CARET); - this.state = 711; + this.state = 732; this.match(LatexParser.U_L_BRACE); - this.state = 712; + this.state = 733; this.u_fraction(); - this.state = 713; + this.state = 734; this.match(LatexParser.U_R_BRACE); } break; } } } - this.state = 719; + this.state = 740; this._errHandler.sync(this); - _alt = this._interp.adaptivePredict(this._input, 53, this._ctx); + _alt = this._interp.adaptivePredict(this._input, 54, this._ctx); } } } @@ -3413,9 +3490,9 @@ export default class LatexParser extends Parser { public sempred(localctx: RuleContext, ruleIndex: number, predIndex: number): boolean { switch (ruleIndex) { - case 29: + case 30: return this.expr_sempred(localctx as ExprContext, predIndex); - case 33: + case 34: return this.u_expr_sempred(localctx as U_exprContext, predIndex); } return true; @@ -3485,251 +3562,257 @@ export default class LatexParser extends Parser { return true; } - public static readonly _serializedATN: number[] = [4,1,101,721,2,0,7,0, + public static readonly _serializedATN: number[] = [4,1,100,742,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,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0, - 1,0,1,0,1,0,1,0,1,0,3,0,86,8,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,3,1,100,8,1,1,1,3,1,103,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 1,1,1,1,3,1,116,8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, - 1,2,3,2,132,8,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,145,8,2, - 1,3,5,3,148,8,3,10,3,12,3,151,9,3,1,3,1,3,5,3,155,8,3,10,3,12,3,158,9,3, - 4,3,160,8,3,11,3,12,3,161,1,4,1,4,1,5,3,5,167,8,5,1,5,1,5,1,6,1,6,1,6,3, - 6,174,8,6,1,6,1,6,1,7,1,7,3,7,180,8,7,1,7,1,7,1,7,1,8,1,8,1,8,4,8,188,8, - 8,11,8,12,8,189,1,9,1,9,1,9,3,9,195,8,9,1,10,1,10,1,10,3,10,200,8,10,1, - 11,1,11,1,11,1,11,1,12,1,12,3,12,208,8,12,1,12,1,12,1,12,1,12,1,12,1,12, - 5,12,216,8,12,10,12,12,12,219,9,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1, - 13,1,14,3,14,230,8,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15, - 1,15,1,15,3,15,244,8,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,3, - 15,255,8,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,3,16,267, - 8,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,275,8,16,1,16,1,16,1,16,1,16,1, - 16,1,16,1,16,1,16,1,16,3,16,286,8,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17, - 1,17,1,17,1,17,1,17,1,17,3,17,300,8,17,1,17,1,17,1,17,1,17,1,17,1,17,1, - 17,1,17,3,17,310,8,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18, - 1,18,1,18,1,18,1,18,1,18,1,18,3,18,328,8,18,1,18,1,18,1,18,1,18,1,18,1, - 18,3,18,336,8,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,346,8,18, - 1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,357,8,18,1,18,1,18,1, - 18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,374, - 8,19,1,20,1,20,3,20,378,8,20,1,21,1,21,1,21,4,21,383,8,21,11,21,12,21,384, - 1,22,1,22,1,22,1,22,3,22,391,8,22,1,23,1,23,1,23,4,23,396,8,23,11,23,12, - 23,397,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,26, - 5,26,413,8,26,10,26,12,26,416,9,26,1,27,1,27,1,27,1,27,1,27,5,27,423,8, - 27,10,27,12,27,426,9,27,1,27,1,27,1,27,1,27,1,27,3,27,433,8,27,1,28,1,28, - 1,28,1,28,1,28,1,28,3,28,441,8,28,1,28,1,28,1,28,1,28,5,28,447,8,28,10, - 28,12,28,450,9,28,1,28,1,28,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, - 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, - 29,1,29,5,29,479,8,29,10,29,12,29,482,9,29,1,29,1,29,1,29,1,29,1,29,1,29, - 1,29,1,29,3,29,492,8,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,500,8,29,1,29, - 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, - 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, - 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, - 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29, - 560,8,29,1,29,1,29,1,29,1,29,1,29,3,29,567,8,29,1,29,1,29,1,29,3,29,572, - 8,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,3,29,581,8,29,3,29,583,8,29,1,29, - 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, - 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, - 1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1, - 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,29, - 1,29,1,29,1,29,5,29,647,8,29,10,29,12,29,650,9,29,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,32,1,32,3,32, - 670,8,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,3,33,682,8,33, - 1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,3,33,694,8,33,1,33,1, - 33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,33, - 1,33,1,33,1,33,1,33,5,33,716,8,33,10,33,12,33,719,9,33,1,33,2,149,156,2, - 58,66,34,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44, - 46,48,50,52,54,56,58,60,62,64,66,0,11,1,0,32,44,1,0,17,18,1,0,64,65,2,0, - 58,58,60,60,1,0,26,27,1,0,58,61,1,0,48,49,1,0,1,2,1,0,79,80,1,0,93,94,2, - 0,84,84,86,86,818,0,85,1,0,0,0,2,99,1,0,0,0,4,117,1,0,0,0,6,149,1,0,0,0, - 8,163,1,0,0,0,10,166,1,0,0,0,12,173,1,0,0,0,14,179,1,0,0,0,16,184,1,0,0, - 0,18,191,1,0,0,0,20,196,1,0,0,0,22,201,1,0,0,0,24,207,1,0,0,0,26,222,1, - 0,0,0,28,229,1,0,0,0,30,243,1,0,0,0,32,266,1,0,0,0,34,291,1,0,0,0,36,319, - 1,0,0,0,38,373,1,0,0,0,40,377,1,0,0,0,42,379,1,0,0,0,44,386,1,0,0,0,46, - 392,1,0,0,0,48,399,1,0,0,0,50,403,1,0,0,0,52,409,1,0,0,0,54,417,1,0,0,0, - 56,440,1,0,0,0,58,582,1,0,0,0,60,651,1,0,0,0,62,655,1,0,0,0,64,669,1,0, - 0,0,66,693,1,0,0,0,68,86,3,14,7,0,69,86,3,16,8,0,70,86,3,18,9,0,71,86,3, - 20,10,0,72,86,3,22,11,0,73,86,3,60,30,0,74,86,3,10,5,0,75,86,3,8,4,0,76, - 86,3,42,21,0,77,86,3,44,22,0,78,86,3,46,23,0,79,86,3,58,29,0,80,86,3,40, - 20,0,81,86,3,24,12,0,82,86,3,6,3,0,83,86,3,2,1,0,84,86,3,4,2,0,85,68,1, - 0,0,0,85,69,1,0,0,0,85,70,1,0,0,0,85,71,1,0,0,0,85,72,1,0,0,0,85,73,1,0, - 0,0,85,74,1,0,0,0,85,75,1,0,0,0,85,76,1,0,0,0,85,77,1,0,0,0,85,78,1,0,0, - 0,85,79,1,0,0,0,85,80,1,0,0,0,85,81,1,0,0,0,85,82,1,0,0,0,85,83,1,0,0,0, - 85,84,1,0,0,0,85,86,1,0,0,0,86,87,1,0,0,0,87,88,5,0,0,1,88,1,1,0,0,0,89, - 90,5,6,0,0,90,91,3,58,29,0,91,92,5,62,0,0,92,93,3,58,29,0,93,94,5,7,0,0, - 94,100,1,0,0,0,95,96,3,58,29,0,96,97,5,62,0,0,97,98,3,58,29,0,98,100,1, - 0,0,0,99,89,1,0,0,0,99,95,1,0,0,0,100,102,1,0,0,0,101,103,5,31,0,0,102, - 101,1,0,0,0,102,103,1,0,0,0,103,104,1,0,0,0,104,115,5,57,0,0,105,106,5, - 6,0,0,106,107,3,60,30,0,107,108,5,62,0,0,108,109,3,60,30,0,109,110,5,7, - 0,0,110,116,1,0,0,0,111,112,3,60,30,0,112,113,5,62,0,0,113,114,3,60,30, - 0,114,116,1,0,0,0,115,105,1,0,0,0,115,111,1,0,0,0,115,116,1,0,0,0,116,3, - 1,0,0,0,117,118,5,6,0,0,118,119,3,58,29,0,119,120,5,62,0,0,120,121,3,58, - 29,0,121,122,5,7,0,0,122,123,1,0,0,0,123,124,5,73,0,0,124,125,5,6,0,0,125, - 126,3,38,19,0,126,131,5,7,0,0,127,128,5,73,0,0,128,129,3,10,5,0,129,130, - 5,73,0,0,130,132,1,0,0,0,131,127,1,0,0,0,131,132,1,0,0,0,132,133,1,0,0, - 0,133,144,5,57,0,0,134,135,5,6,0,0,135,136,3,60,30,0,136,137,5,62,0,0,137, - 138,3,60,30,0,138,139,5,7,0,0,139,145,1,0,0,0,140,141,3,60,30,0,141,142, - 5,62,0,0,142,143,3,60,30,0,143,145,1,0,0,0,144,134,1,0,0,0,144,140,1,0, - 0,0,144,145,1,0,0,0,145,5,1,0,0,0,146,148,9,0,0,0,147,146,1,0,0,0,148,151, - 1,0,0,0,149,150,1,0,0,0,149,147,1,0,0,0,150,159,1,0,0,0,151,149,1,0,0,0, - 152,156,3,62,31,0,153,155,9,0,0,0,154,153,1,0,0,0,155,158,1,0,0,0,156,157, - 1,0,0,0,156,154,1,0,0,0,157,160,1,0,0,0,158,156,1,0,0,0,159,152,1,0,0,0, - 160,161,1,0,0,0,161,159,1,0,0,0,161,162,1,0,0,0,162,7,1,0,0,0,163,164,5, - 73,0,0,164,9,1,0,0,0,165,167,5,55,0,0,166,165,1,0,0,0,166,167,1,0,0,0,167, - 168,1,0,0,0,168,169,5,66,0,0,169,11,1,0,0,0,170,174,3,10,5,0,171,174,5, - 14,0,0,172,174,3,8,4,0,173,170,1,0,0,0,173,171,1,0,0,0,173,172,1,0,0,0, - 174,175,1,0,0,0,175,176,3,60,30,0,176,13,1,0,0,0,177,180,3,8,4,0,178,180, - 5,14,0,0,179,177,1,0,0,0,179,178,1,0,0,0,180,181,1,0,0,0,181,182,5,57,0, - 0,182,183,3,58,29,0,183,15,1,0,0,0,184,187,3,14,7,0,185,186,5,62,0,0,186, - 188,3,14,7,0,187,185,1,0,0,0,188,189,1,0,0,0,189,187,1,0,0,0,189,190,1, - 0,0,0,190,17,1,0,0,0,191,192,3,14,7,0,192,194,5,57,0,0,193,195,3,60,30, - 0,194,193,1,0,0,0,194,195,1,0,0,0,195,19,1,0,0,0,196,197,3,58,29,0,197, - 199,5,57,0,0,198,200,3,60,30,0,199,198,1,0,0,0,199,200,1,0,0,0,200,21,1, - 0,0,0,201,202,3,58,29,0,202,203,5,57,0,0,203,204,3,58,29,0,204,23,1,0,0, - 0,205,208,3,8,4,0,206,208,5,14,0,0,207,205,1,0,0,0,207,206,1,0,0,0,208, - 209,1,0,0,0,209,210,5,57,0,0,210,211,3,8,4,0,211,212,5,6,0,0,212,217,3, - 26,13,0,213,214,5,62,0,0,214,216,3,26,13,0,215,213,1,0,0,0,216,219,1,0, - 0,0,217,215,1,0,0,0,217,218,1,0,0,0,218,220,1,0,0,0,219,217,1,0,0,0,220, - 221,5,7,0,0,221,25,1,0,0,0,222,223,5,6,0,0,223,224,3,58,29,0,224,225,5, - 62,0,0,225,226,3,40,20,0,226,227,5,7,0,0,227,27,1,0,0,0,228,230,5,30,0, - 0,229,228,1,0,0,0,229,230,1,0,0,0,230,231,1,0,0,0,231,232,7,0,0,0,232,233, - 5,6,0,0,233,234,3,58,29,0,234,235,5,7,0,0,235,29,1,0,0,0,236,244,5,15,0, - 0,237,238,5,16,0,0,238,239,5,4,0,0,239,240,5,5,0,0,240,241,5,56,0,0,241, - 242,5,4,0,0,242,244,5,5,0,0,243,236,1,0,0,0,243,237,1,0,0,0,244,245,1,0, - 0,0,245,246,5,6,0,0,246,247,3,58,29,0,247,254,5,7,0,0,248,249,5,19,0,0, - 249,250,5,4,0,0,250,251,3,8,4,0,251,252,5,5,0,0,252,255,1,0,0,0,253,255, - 3,8,4,0,254,248,1,0,0,0,254,253,1,0,0,0,255,256,1,0,0,0,256,257,5,6,0,0, - 257,258,3,8,4,0,258,259,5,7,0,0,259,31,1,0,0,0,260,261,5,16,0,0,261,262, - 5,4,0,0,262,263,3,58,29,0,263,264,5,5,0,0,264,267,1,0,0,0,265,267,7,1,0, - 0,266,260,1,0,0,0,266,265,1,0,0,0,267,274,1,0,0,0,268,269,5,56,0,0,269, - 270,5,4,0,0,270,271,3,58,29,0,271,272,5,5,0,0,272,275,1,0,0,0,273,275,7, - 2,0,0,274,268,1,0,0,0,274,273,1,0,0,0,275,276,1,0,0,0,276,277,5,6,0,0,277, - 278,3,58,29,0,278,285,5,7,0,0,279,280,5,19,0,0,280,281,5,4,0,0,281,282, - 3,8,4,0,282,283,5,5,0,0,283,286,1,0,0,0,284,286,3,8,4,0,285,279,1,0,0,0, - 285,284,1,0,0,0,286,287,1,0,0,0,287,288,5,6,0,0,288,289,3,8,4,0,289,290, - 5,7,0,0,290,33,1,0,0,0,291,292,5,20,0,0,292,299,5,4,0,0,293,294,5,19,0, - 0,294,295,5,4,0,0,295,296,3,8,4,0,296,297,5,5,0,0,297,300,1,0,0,0,298,300, - 3,8,4,0,299,293,1,0,0,0,299,298,1,0,0,0,300,301,1,0,0,0,301,302,5,5,0,0, - 302,309,5,4,0,0,303,304,5,19,0,0,304,305,5,4,0,0,305,306,3,8,4,0,306,307, - 5,5,0,0,307,310,1,0,0,0,308,310,3,8,4,0,309,303,1,0,0,0,309,308,1,0,0,0, - 310,311,1,0,0,0,311,312,5,6,0,0,312,313,3,8,4,0,313,314,5,7,0,0,314,315, - 5,5,0,0,315,316,5,6,0,0,316,317,3,58,29,0,317,318,5,7,0,0,318,35,1,0,0, - 0,319,320,5,20,0,0,320,327,5,4,0,0,321,322,5,19,0,0,322,323,5,4,0,0,323, - 324,3,8,4,0,324,325,5,5,0,0,325,328,1,0,0,0,326,328,3,8,4,0,327,321,1,0, - 0,0,327,326,1,0,0,0,328,335,1,0,0,0,329,330,5,56,0,0,330,331,5,4,0,0,331, - 332,3,10,5,0,332,333,5,5,0,0,333,336,1,0,0,0,334,336,5,64,0,0,335,329,1, - 0,0,0,335,334,1,0,0,0,336,337,1,0,0,0,337,338,5,5,0,0,338,345,5,4,0,0,339, - 340,5,19,0,0,340,341,5,4,0,0,341,342,3,8,4,0,342,343,5,5,0,0,343,346,1, - 0,0,0,344,346,3,8,4,0,345,339,1,0,0,0,345,344,1,0,0,0,346,347,1,0,0,0,347, - 348,5,6,0,0,348,349,3,8,4,0,349,356,5,7,0,0,350,351,5,56,0,0,351,352,5, - 4,0,0,352,353,3,10,5,0,353,354,5,5,0,0,354,357,1,0,0,0,355,357,5,64,0,0, - 356,350,1,0,0,0,356,355,1,0,0,0,357,358,1,0,0,0,358,359,5,5,0,0,359,360, - 5,6,0,0,360,361,3,58,29,0,361,362,5,7,0,0,362,37,1,0,0,0,363,364,3,8,4, - 0,364,365,5,57,0,0,365,366,3,58,29,0,366,374,1,0,0,0,367,368,3,58,29,0, - 368,369,7,3,0,0,369,370,3,8,4,0,370,371,7,3,0,0,371,372,3,58,29,0,372,374, - 1,0,0,0,373,363,1,0,0,0,373,367,1,0,0,0,374,39,1,0,0,0,375,378,3,48,24, - 0,376,378,3,50,25,0,377,375,1,0,0,0,377,376,1,0,0,0,378,41,1,0,0,0,379, - 382,3,8,4,0,380,381,5,62,0,0,381,383,3,8,4,0,382,380,1,0,0,0,383,384,1, - 0,0,0,384,382,1,0,0,0,384,385,1,0,0,0,385,43,1,0,0,0,386,387,3,8,4,0,387, - 390,7,4,0,0,388,391,3,10,5,0,389,391,3,12,6,0,390,388,1,0,0,0,390,389,1, - 0,0,0,391,45,1,0,0,0,392,395,3,44,22,0,393,394,5,62,0,0,394,396,3,44,22, - 0,395,393,1,0,0,0,396,397,1,0,0,0,397,395,1,0,0,0,397,398,1,0,0,0,398,47, - 1,0,0,0,399,400,3,58,29,0,400,401,7,5,0,0,401,402,3,58,29,0,402,49,1,0, - 0,0,403,404,3,58,29,0,404,405,7,5,0,0,405,406,3,58,29,0,406,407,7,5,0,0, - 407,408,3,58,29,0,408,51,1,0,0,0,409,414,3,58,29,0,410,411,5,69,0,0,411, - 413,3,58,29,0,412,410,1,0,0,0,413,416,1,0,0,0,414,412,1,0,0,0,414,415,1, - 0,0,0,415,53,1,0,0,0,416,414,1,0,0,0,417,418,3,8,4,0,418,419,5,6,0,0,419, - 424,3,38,19,0,420,421,5,62,0,0,421,423,3,38,19,0,422,420,1,0,0,0,423,426, - 1,0,0,0,424,422,1,0,0,0,424,425,1,0,0,0,425,427,1,0,0,0,426,424,1,0,0,0, - 427,432,5,7,0,0,428,429,5,73,0,0,429,430,3,10,5,0,430,431,5,73,0,0,431, - 433,1,0,0,0,432,428,1,0,0,0,432,433,1,0,0,0,433,55,1,0,0,0,434,435,5,19, - 0,0,435,436,5,4,0,0,436,437,3,8,4,0,437,438,5,5,0,0,438,441,1,0,0,0,439, - 441,3,8,4,0,440,434,1,0,0,0,440,439,1,0,0,0,441,442,1,0,0,0,442,443,5,6, - 0,0,443,448,3,58,29,0,444,445,5,62,0,0,445,447,3,58,29,0,446,444,1,0,0, - 0,447,450,1,0,0,0,448,446,1,0,0,0,448,449,1,0,0,0,449,451,1,0,0,0,450,448, - 1,0,0,0,451,452,5,7,0,0,452,57,1,0,0,0,453,454,6,29,-1,0,454,455,3,8,4, - 0,455,456,5,72,0,0,456,583,1,0,0,0,457,458,3,8,4,0,458,459,7,2,0,0,459, - 460,5,71,0,0,460,583,1,0,0,0,461,462,3,8,4,0,462,463,5,56,0,0,463,464,5, - 4,0,0,464,465,3,58,29,0,465,466,5,5,0,0,466,467,5,71,0,0,467,583,1,0,0, - 0,468,583,5,25,0,0,469,470,5,24,0,0,470,471,5,4,0,0,471,472,3,58,29,0,472, - 473,5,5,0,0,473,583,1,0,0,0,474,475,5,67,0,0,475,480,3,52,26,0,476,477, - 5,70,0,0,477,479,3,52,26,0,478,476,1,0,0,0,479,482,1,0,0,0,480,478,1,0, - 0,0,480,481,1,0,0,0,481,483,1,0,0,0,482,480,1,0,0,0,483,484,5,68,0,0,484, - 583,1,0,0,0,485,583,3,28,14,0,486,583,3,30,15,0,487,583,3,32,16,0,488,583, - 3,34,17,0,489,583,3,36,18,0,490,492,5,30,0,0,491,490,1,0,0,0,491,492,1, - 0,0,0,492,493,1,0,0,0,493,494,5,45,0,0,494,495,5,6,0,0,495,496,3,58,29, - 0,496,497,5,7,0,0,497,583,1,0,0,0,498,500,5,30,0,0,499,498,1,0,0,0,499, - 500,1,0,0,0,500,501,1,0,0,0,501,502,5,46,0,0,502,503,5,6,0,0,503,504,3, - 58,29,0,504,505,5,7,0,0,505,583,1,0,0,0,506,507,5,47,0,0,507,508,5,4,0, - 0,508,509,3,58,29,0,509,510,5,5,0,0,510,511,5,6,0,0,511,512,3,58,29,0,512, - 513,5,7,0,0,513,583,1,0,0,0,514,515,7,6,0,0,515,516,5,6,0,0,516,517,3,58, - 29,0,517,518,5,7,0,0,518,583,1,0,0,0,519,520,5,9,0,0,520,521,3,58,29,0, - 521,522,5,9,0,0,522,583,1,0,0,0,523,524,5,8,0,0,524,525,3,58,29,0,525,526, - 5,8,0,0,526,583,1,0,0,0,527,583,3,12,6,0,528,583,3,10,5,0,529,530,5,55, - 0,0,530,583,3,58,29,30,531,532,5,20,0,0,532,533,5,4,0,0,533,534,3,58,29, - 0,534,535,5,5,0,0,535,536,5,4,0,0,536,537,3,58,29,0,537,538,5,5,0,0,538, - 583,1,0,0,0,539,583,5,21,0,0,540,583,3,8,4,0,541,583,3,54,27,0,542,583, - 3,56,28,0,543,583,5,14,0,0,544,545,5,6,0,0,545,546,3,58,29,0,546,547,5, - 7,0,0,547,583,1,0,0,0,548,549,3,10,5,0,549,550,3,58,29,12,550,583,1,0,0, - 0,551,552,3,12,6,0,552,553,3,58,29,11,553,583,1,0,0,0,554,555,5,14,0,0, - 555,583,3,58,29,10,556,559,5,28,0,0,557,558,5,4,0,0,558,560,5,5,0,0,559, - 557,1,0,0,0,559,560,1,0,0,0,560,583,1,0,0,0,561,562,5,19,0,0,562,563,5, - 4,0,0,563,564,3,58,29,0,564,565,5,5,0,0,565,567,1,0,0,0,566,561,1,0,0,0, - 566,567,1,0,0,0,567,571,1,0,0,0,568,572,5,63,0,0,569,572,3,10,5,0,570,572, - 5,57,0,0,571,568,1,0,0,0,571,569,1,0,0,0,571,570,1,0,0,0,571,572,1,0,0, - 0,572,573,1,0,0,0,573,574,5,19,0,0,574,575,5,4,0,0,575,576,3,58,29,0,576, - 580,5,5,0,0,577,581,5,63,0,0,578,581,3,10,5,0,579,581,5,57,0,0,580,577, - 1,0,0,0,580,578,1,0,0,0,580,579,1,0,0,0,580,581,1,0,0,0,581,583,1,0,0,0, - 582,453,1,0,0,0,582,457,1,0,0,0,582,461,1,0,0,0,582,468,1,0,0,0,582,469, - 1,0,0,0,582,474,1,0,0,0,582,485,1,0,0,0,582,486,1,0,0,0,582,487,1,0,0,0, - 582,488,1,0,0,0,582,489,1,0,0,0,582,491,1,0,0,0,582,499,1,0,0,0,582,506, - 1,0,0,0,582,514,1,0,0,0,582,519,1,0,0,0,582,523,1,0,0,0,582,527,1,0,0,0, - 582,528,1,0,0,0,582,529,1,0,0,0,582,531,1,0,0,0,582,539,1,0,0,0,582,540, - 1,0,0,0,582,541,1,0,0,0,582,542,1,0,0,0,582,543,1,0,0,0,582,544,1,0,0,0, - 582,548,1,0,0,0,582,551,1,0,0,0,582,554,1,0,0,0,582,556,1,0,0,0,582,566, - 1,0,0,0,583,648,1,0,0,0,584,585,10,29,0,0,585,586,5,23,0,0,586,647,3,58, - 29,30,587,588,10,28,0,0,588,589,5,22,0,0,589,647,3,58,29,29,590,591,10, - 25,0,0,591,592,5,55,0,0,592,647,3,58,29,26,593,594,10,24,0,0,594,595,5, - 54,0,0,595,647,3,58,29,25,596,597,10,51,0,0,597,647,7,2,0,0,598,599,10, - 50,0,0,599,600,5,56,0,0,600,601,5,4,0,0,601,602,3,58,29,0,602,603,5,5,0, - 0,603,647,1,0,0,0,604,605,10,49,0,0,605,606,5,10,0,0,606,607,5,4,0,0,607, - 608,3,58,29,0,608,609,5,62,0,0,609,610,3,58,29,0,610,611,5,5,0,0,611,647, - 1,0,0,0,612,613,10,48,0,0,613,647,5,29,0,0,614,615,10,47,0,0,615,647,5, - 13,0,0,616,617,10,18,0,0,617,618,5,10,0,0,618,619,5,4,0,0,619,647,5,5,0, - 0,620,621,10,17,0,0,621,622,5,56,0,0,622,623,5,4,0,0,623,647,5,5,0,0,624, - 625,10,16,0,0,625,647,3,8,4,0,626,627,10,15,0,0,627,647,3,10,5,0,628,629, - 10,14,0,0,629,647,3,12,6,0,630,631,10,13,0,0,631,647,5,14,0,0,632,633,10, - 9,0,0,633,647,3,54,27,0,634,635,10,8,0,0,635,647,3,56,28,0,636,637,10,7, - 0,0,637,647,3,28,14,0,638,639,10,6,0,0,639,647,3,30,15,0,640,641,10,5,0, - 0,641,647,3,32,16,0,642,643,10,4,0,0,643,647,3,34,17,0,644,645,10,3,0,0, - 645,647,3,36,18,0,646,584,1,0,0,0,646,587,1,0,0,0,646,590,1,0,0,0,646,593, - 1,0,0,0,646,596,1,0,0,0,646,598,1,0,0,0,646,604,1,0,0,0,646,612,1,0,0,0, - 646,614,1,0,0,0,646,616,1,0,0,0,646,620,1,0,0,0,646,624,1,0,0,0,646,626, - 1,0,0,0,646,628,1,0,0,0,646,630,1,0,0,0,646,632,1,0,0,0,646,634,1,0,0,0, - 646,636,1,0,0,0,646,638,1,0,0,0,646,640,1,0,0,0,646,642,1,0,0,0,646,644, - 1,0,0,0,647,650,1,0,0,0,648,646,1,0,0,0,648,649,1,0,0,0,649,59,1,0,0,0, - 650,648,1,0,0,0,651,652,7,7,0,0,652,653,3,66,33,0,653,654,7,8,0,0,654,61, - 1,0,0,0,655,656,7,7,0,0,656,657,7,9,0,0,657,658,7,10,0,0,658,659,7,9,0, - 0,659,660,7,8,0,0,660,63,1,0,0,0,661,662,5,81,0,0,662,663,5,91,0,0,663, - 664,7,9,0,0,664,665,5,92,0,0,665,666,5,91,0,0,666,667,5,94,0,0,667,670, - 5,92,0,0,668,670,5,82,0,0,669,661,1,0,0,0,669,668,1,0,0,0,670,65,1,0,0, - 0,671,672,6,33,-1,0,672,673,5,85,0,0,673,674,5,91,0,0,674,675,3,58,29,0, - 675,676,5,92,0,0,676,694,1,0,0,0,677,678,5,81,0,0,678,681,5,91,0,0,679, - 682,3,66,33,0,680,682,5,93,0,0,681,679,1,0,0,0,681,680,1,0,0,0,682,683, - 1,0,0,0,683,684,5,92,0,0,684,685,5,91,0,0,685,686,3,66,33,0,686,687,5,92, - 0,0,687,694,1,0,0,0,688,694,5,88,0,0,689,690,5,89,0,0,690,691,3,66,33,0, - 691,692,5,90,0,0,692,694,1,0,0,0,693,671,1,0,0,0,693,677,1,0,0,0,693,688, - 1,0,0,0,693,689,1,0,0,0,694,717,1,0,0,0,695,696,10,4,0,0,696,697,5,83,0, - 0,697,716,3,66,33,5,698,699,10,9,0,0,699,700,5,87,0,0,700,716,5,94,0,0, - 701,702,10,8,0,0,702,703,5,87,0,0,703,704,5,91,0,0,704,705,5,94,0,0,705, - 716,5,92,0,0,706,707,10,7,0,0,707,708,5,87,0,0,708,716,3,64,32,0,709,710, - 10,6,0,0,710,711,5,87,0,0,711,712,5,91,0,0,712,713,3,64,32,0,713,714,5, - 92,0,0,714,716,1,0,0,0,715,695,1,0,0,0,715,698,1,0,0,0,715,701,1,0,0,0, - 715,706,1,0,0,0,715,709,1,0,0,0,716,719,1,0,0,0,717,715,1,0,0,0,717,718, - 1,0,0,0,718,67,1,0,0,0,719,717,1,0,0,0,54,85,99,102,115,131,144,149,156, - 161,166,173,179,189,194,199,207,217,229,243,254,266,274,285,299,309,327, - 335,345,356,373,377,384,390,397,414,424,432,440,448,480,491,499,559,566, - 571,580,582,646,648,669,681,693,715,717]; + 31,2,32,7,32,2,33,7,33,2,34,7,34,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1, + 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,3,0,88,8,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,3,1,102,8,1,1,1,3,1,105,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,1,1,1,1,1,1,1,1,3,1,118,8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,3,2,134,8,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3, + 2,147,8,2,1,3,5,3,150,8,3,10,3,12,3,153,9,3,1,3,1,3,5,3,157,8,3,10,3,12, + 3,160,9,3,4,3,162,8,3,11,3,12,3,163,1,4,1,4,1,5,3,5,169,8,5,1,5,1,5,1,6, + 1,6,1,6,3,6,176,8,6,1,6,1,6,1,7,1,7,3,7,182,8,7,1,7,1,7,1,7,1,8,1,8,1,8, + 4,8,190,8,8,11,8,12,8,191,1,9,1,9,1,9,3,9,197,8,9,1,10,1,10,1,10,3,10,202, + 8,10,1,11,1,11,1,11,1,11,1,12,1,12,3,12,210,8,12,1,12,1,12,1,12,1,12,1, + 12,1,12,5,12,218,8,12,10,12,12,12,221,9,12,1,12,1,12,1,13,1,13,1,13,1,13, + 1,13,1,13,1,14,3,14,232,8,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1, + 15,1,15,1,15,1,15,3,15,246,8,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15,1,15, + 1,15,3,15,257,8,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,16,3, + 16,269,8,16,1,16,1,16,1,16,1,16,1,16,1,16,3,16,277,8,16,1,16,1,16,1,16, + 1,16,1,16,1,16,1,16,1,16,1,16,3,16,288,8,16,1,16,1,16,1,16,1,16,1,17,1, + 17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,3,17,307,8,17, + 1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,321,8, + 18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,1,18,3,18,331,8,18,1,18,1,18,1,18, + 1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,349, + 8,19,1,19,1,19,1,19,1,19,1,19,1,19,3,19,357,8,19,1,19,1,19,1,19,1,19,1, + 19,1,19,1,19,1,19,3,19,367,8,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19, + 1,19,3,19,378,8,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1, + 20,1,20,1,20,1,20,1,20,3,20,395,8,20,1,21,1,21,3,21,399,8,21,1,22,1,22, + 1,22,4,22,404,8,22,11,22,12,22,405,1,23,1,23,1,23,1,23,3,23,412,8,23,1, + 24,1,24,1,24,4,24,417,8,24,11,24,12,24,418,1,25,1,25,1,25,1,25,1,26,1,26, + 1,26,1,26,1,26,1,26,1,27,1,27,1,27,5,27,434,8,27,10,27,12,27,437,9,27,1, + 28,1,28,1,28,1,28,1,28,5,28,444,8,28,10,28,12,28,447,9,28,1,28,1,28,1,28, + 1,28,1,28,3,28,454,8,28,1,29,1,29,1,29,1,29,1,29,1,29,3,29,462,8,29,1,29, + 1,29,1,29,1,29,5,29,468,8,29,10,29,12,29,471,9,29,1,29,1,29,1,30,1,30,1, + 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,5,30,500,8,30,10,30,12,30,503,9, + 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,3,30,513,8,30,1,30,1,30,1,30, + 1,30,1,30,1,30,3,30,521,8,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, + 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, + 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,3,30,581,8,30,1,30,1,30,1,30,1,30,1,30,3, + 30,588,8,30,1,30,1,30,1,30,3,30,593,8,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,3,30,602,8,30,3,30,604,8,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, + 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, + 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,5,30,668,8,30,10,30, + 12,30,671,9,30,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,33,1,33,1,33,1,33,3,33,691,8,33,1,34,1,34,1,34,1,34,1,34, + 1,34,1,34,1,34,1,34,1,34,3,34,703,8,34,1,34,1,34,1,34,1,34,1,34,1,34,1, + 34,1,34,1,34,1,34,3,34,715,8,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34, + 1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,5,34,737,8, + 34,10,34,12,34,740,9,34,1,34,2,151,158,2,60,68,35,0,2,4,6,8,10,12,14,16, + 18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64, + 66,68,0,11,1,0,31,43,1,0,15,16,1,0,63,64,2,0,57,57,59,59,1,0,25,26,1,0, + 57,60,1,0,47,48,1,0,1,2,1,0,78,79,1,0,92,93,2,0,83,83,85,85,839,0,87,1, + 0,0,0,2,101,1,0,0,0,4,119,1,0,0,0,6,151,1,0,0,0,8,165,1,0,0,0,10,168,1, + 0,0,0,12,175,1,0,0,0,14,181,1,0,0,0,16,186,1,0,0,0,18,193,1,0,0,0,20,198, + 1,0,0,0,22,203,1,0,0,0,24,209,1,0,0,0,26,224,1,0,0,0,28,231,1,0,0,0,30, + 245,1,0,0,0,32,268,1,0,0,0,34,293,1,0,0,0,36,312,1,0,0,0,38,340,1,0,0,0, + 40,394,1,0,0,0,42,398,1,0,0,0,44,400,1,0,0,0,46,407,1,0,0,0,48,413,1,0, + 0,0,50,420,1,0,0,0,52,424,1,0,0,0,54,430,1,0,0,0,56,438,1,0,0,0,58,461, + 1,0,0,0,60,603,1,0,0,0,62,672,1,0,0,0,64,676,1,0,0,0,66,690,1,0,0,0,68, + 714,1,0,0,0,70,88,3,14,7,0,71,88,3,16,8,0,72,88,3,18,9,0,73,88,3,20,10, + 0,74,88,3,22,11,0,75,88,3,62,31,0,76,88,3,10,5,0,77,88,3,8,4,0,78,88,3, + 44,22,0,79,88,3,46,23,0,80,88,3,48,24,0,81,88,3,60,30,0,82,88,3,42,21,0, + 83,88,3,24,12,0,84,88,3,6,3,0,85,88,3,2,1,0,86,88,3,4,2,0,87,70,1,0,0,0, + 87,71,1,0,0,0,87,72,1,0,0,0,87,73,1,0,0,0,87,74,1,0,0,0,87,75,1,0,0,0,87, + 76,1,0,0,0,87,77,1,0,0,0,87,78,1,0,0,0,87,79,1,0,0,0,87,80,1,0,0,0,87,81, + 1,0,0,0,87,82,1,0,0,0,87,83,1,0,0,0,87,84,1,0,0,0,87,85,1,0,0,0,87,86,1, + 0,0,0,87,88,1,0,0,0,88,89,1,0,0,0,89,90,5,0,0,1,90,1,1,0,0,0,91,92,5,6, + 0,0,92,93,3,60,30,0,93,94,5,61,0,0,94,95,3,60,30,0,95,96,5,7,0,0,96,102, + 1,0,0,0,97,98,3,60,30,0,98,99,5,61,0,0,99,100,3,60,30,0,100,102,1,0,0,0, + 101,91,1,0,0,0,101,97,1,0,0,0,102,104,1,0,0,0,103,105,5,30,0,0,104,103, + 1,0,0,0,104,105,1,0,0,0,105,106,1,0,0,0,106,117,5,56,0,0,107,108,5,6,0, + 0,108,109,3,62,31,0,109,110,5,61,0,0,110,111,3,62,31,0,111,112,5,7,0,0, + 112,118,1,0,0,0,113,114,3,62,31,0,114,115,5,61,0,0,115,116,3,62,31,0,116, + 118,1,0,0,0,117,107,1,0,0,0,117,113,1,0,0,0,117,118,1,0,0,0,118,3,1,0,0, + 0,119,120,5,6,0,0,120,121,3,60,30,0,121,122,5,61,0,0,122,123,3,60,30,0, + 123,124,5,7,0,0,124,125,1,0,0,0,125,126,5,72,0,0,126,127,5,6,0,0,127,128, + 3,40,20,0,128,133,5,7,0,0,129,130,5,72,0,0,130,131,3,10,5,0,131,132,5,72, + 0,0,132,134,1,0,0,0,133,129,1,0,0,0,133,134,1,0,0,0,134,135,1,0,0,0,135, + 146,5,56,0,0,136,137,5,6,0,0,137,138,3,62,31,0,138,139,5,61,0,0,139,140, + 3,62,31,0,140,141,5,7,0,0,141,147,1,0,0,0,142,143,3,62,31,0,143,144,5,61, + 0,0,144,145,3,62,31,0,145,147,1,0,0,0,146,136,1,0,0,0,146,142,1,0,0,0,146, + 147,1,0,0,0,147,5,1,0,0,0,148,150,9,0,0,0,149,148,1,0,0,0,150,153,1,0,0, + 0,151,152,1,0,0,0,151,149,1,0,0,0,152,161,1,0,0,0,153,151,1,0,0,0,154,158, + 3,64,32,0,155,157,9,0,0,0,156,155,1,0,0,0,157,160,1,0,0,0,158,159,1,0,0, + 0,158,156,1,0,0,0,159,162,1,0,0,0,160,158,1,0,0,0,161,154,1,0,0,0,162,163, + 1,0,0,0,163,161,1,0,0,0,163,164,1,0,0,0,164,7,1,0,0,0,165,166,5,72,0,0, + 166,9,1,0,0,0,167,169,5,54,0,0,168,167,1,0,0,0,168,169,1,0,0,0,169,170, + 1,0,0,0,170,171,5,65,0,0,171,11,1,0,0,0,172,176,3,10,5,0,173,176,5,12,0, + 0,174,176,3,8,4,0,175,172,1,0,0,0,175,173,1,0,0,0,175,174,1,0,0,0,176,177, + 1,0,0,0,177,178,3,62,31,0,178,13,1,0,0,0,179,182,3,8,4,0,180,182,5,12,0, + 0,181,179,1,0,0,0,181,180,1,0,0,0,182,183,1,0,0,0,183,184,5,56,0,0,184, + 185,3,60,30,0,185,15,1,0,0,0,186,189,3,14,7,0,187,188,5,61,0,0,188,190, + 3,14,7,0,189,187,1,0,0,0,190,191,1,0,0,0,191,189,1,0,0,0,191,192,1,0,0, + 0,192,17,1,0,0,0,193,194,3,14,7,0,194,196,5,56,0,0,195,197,3,62,31,0,196, + 195,1,0,0,0,196,197,1,0,0,0,197,19,1,0,0,0,198,199,3,60,30,0,199,201,5, + 56,0,0,200,202,3,62,31,0,201,200,1,0,0,0,201,202,1,0,0,0,202,21,1,0,0,0, + 203,204,3,60,30,0,204,205,5,56,0,0,205,206,3,60,30,0,206,23,1,0,0,0,207, + 210,3,8,4,0,208,210,5,12,0,0,209,207,1,0,0,0,209,208,1,0,0,0,210,211,1, + 0,0,0,211,212,5,56,0,0,212,213,3,8,4,0,213,214,5,6,0,0,214,219,3,26,13, + 0,215,216,5,61,0,0,216,218,3,26,13,0,217,215,1,0,0,0,218,221,1,0,0,0,219, + 217,1,0,0,0,219,220,1,0,0,0,220,222,1,0,0,0,221,219,1,0,0,0,222,223,5,7, + 0,0,223,25,1,0,0,0,224,225,5,6,0,0,225,226,3,60,30,0,226,227,5,61,0,0,227, + 228,3,42,21,0,228,229,5,7,0,0,229,27,1,0,0,0,230,232,5,29,0,0,231,230,1, + 0,0,0,231,232,1,0,0,0,232,233,1,0,0,0,233,234,7,0,0,0,234,235,5,6,0,0,235, + 236,3,60,30,0,236,237,5,7,0,0,237,29,1,0,0,0,238,246,5,13,0,0,239,240,5, + 14,0,0,240,241,5,4,0,0,241,242,5,5,0,0,242,243,5,55,0,0,243,244,5,4,0,0, + 244,246,5,5,0,0,245,238,1,0,0,0,245,239,1,0,0,0,246,247,1,0,0,0,247,248, + 5,6,0,0,248,249,3,60,30,0,249,256,5,7,0,0,250,251,5,18,0,0,251,252,5,4, + 0,0,252,253,3,8,4,0,253,254,5,5,0,0,254,257,1,0,0,0,255,257,3,8,4,0,256, + 250,1,0,0,0,256,255,1,0,0,0,257,258,1,0,0,0,258,259,5,6,0,0,259,260,3,8, + 4,0,260,261,5,7,0,0,261,31,1,0,0,0,262,263,5,14,0,0,263,264,5,4,0,0,264, + 265,3,60,30,0,265,266,5,5,0,0,266,269,1,0,0,0,267,269,7,1,0,0,268,262,1, + 0,0,0,268,267,1,0,0,0,269,276,1,0,0,0,270,271,5,55,0,0,271,272,5,4,0,0, + 272,273,3,60,30,0,273,274,5,5,0,0,274,277,1,0,0,0,275,277,7,2,0,0,276,270, + 1,0,0,0,276,275,1,0,0,0,277,278,1,0,0,0,278,279,5,6,0,0,279,280,3,60,30, + 0,280,287,5,7,0,0,281,282,5,18,0,0,282,283,5,4,0,0,283,284,3,8,4,0,284, + 285,5,5,0,0,285,288,1,0,0,0,286,288,3,8,4,0,287,281,1,0,0,0,287,286,1,0, + 0,0,288,289,1,0,0,0,289,290,5,6,0,0,290,291,3,8,4,0,291,292,5,7,0,0,292, + 33,1,0,0,0,293,294,5,17,0,0,294,295,5,4,0,0,295,296,3,8,4,0,296,297,5,56, + 0,0,297,298,3,60,30,0,298,299,5,5,0,0,299,306,1,0,0,0,300,301,5,55,0,0, + 301,302,5,4,0,0,302,303,3,60,30,0,303,304,5,5,0,0,304,307,1,0,0,0,305,307, + 7,2,0,0,306,300,1,0,0,0,306,305,1,0,0,0,307,308,1,0,0,0,308,309,5,6,0,0, + 309,310,3,60,30,0,310,311,5,7,0,0,311,35,1,0,0,0,312,313,5,19,0,0,313,320, + 5,4,0,0,314,315,5,18,0,0,315,316,5,4,0,0,316,317,3,8,4,0,317,318,5,5,0, + 0,318,321,1,0,0,0,319,321,3,8,4,0,320,314,1,0,0,0,320,319,1,0,0,0,321,322, + 1,0,0,0,322,323,5,5,0,0,323,330,5,4,0,0,324,325,5,18,0,0,325,326,5,4,0, + 0,326,327,3,8,4,0,327,328,5,5,0,0,328,331,1,0,0,0,329,331,3,8,4,0,330,324, + 1,0,0,0,330,329,1,0,0,0,331,332,1,0,0,0,332,333,5,6,0,0,333,334,3,8,4,0, + 334,335,5,7,0,0,335,336,5,5,0,0,336,337,5,6,0,0,337,338,3,60,30,0,338,339, + 5,7,0,0,339,37,1,0,0,0,340,341,5,19,0,0,341,348,5,4,0,0,342,343,5,18,0, + 0,343,344,5,4,0,0,344,345,3,8,4,0,345,346,5,5,0,0,346,349,1,0,0,0,347,349, + 3,8,4,0,348,342,1,0,0,0,348,347,1,0,0,0,349,356,1,0,0,0,350,351,5,55,0, + 0,351,352,5,4,0,0,352,353,3,10,5,0,353,354,5,5,0,0,354,357,1,0,0,0,355, + 357,5,63,0,0,356,350,1,0,0,0,356,355,1,0,0,0,357,358,1,0,0,0,358,359,5, + 5,0,0,359,366,5,4,0,0,360,361,5,18,0,0,361,362,5,4,0,0,362,363,3,8,4,0, + 363,364,5,5,0,0,364,367,1,0,0,0,365,367,3,8,4,0,366,360,1,0,0,0,366,365, + 1,0,0,0,367,368,1,0,0,0,368,369,5,6,0,0,369,370,3,8,4,0,370,377,5,7,0,0, + 371,372,5,55,0,0,372,373,5,4,0,0,373,374,3,10,5,0,374,375,5,5,0,0,375,378, + 1,0,0,0,376,378,5,63,0,0,377,371,1,0,0,0,377,376,1,0,0,0,378,379,1,0,0, + 0,379,380,5,5,0,0,380,381,5,6,0,0,381,382,3,60,30,0,382,383,5,7,0,0,383, + 39,1,0,0,0,384,385,3,8,4,0,385,386,5,56,0,0,386,387,3,60,30,0,387,395,1, + 0,0,0,388,389,3,60,30,0,389,390,7,3,0,0,390,391,3,8,4,0,391,392,7,3,0,0, + 392,393,3,60,30,0,393,395,1,0,0,0,394,384,1,0,0,0,394,388,1,0,0,0,395,41, + 1,0,0,0,396,399,3,50,25,0,397,399,3,52,26,0,398,396,1,0,0,0,398,397,1,0, + 0,0,399,43,1,0,0,0,400,403,3,8,4,0,401,402,5,61,0,0,402,404,3,8,4,0,403, + 401,1,0,0,0,404,405,1,0,0,0,405,403,1,0,0,0,405,406,1,0,0,0,406,45,1,0, + 0,0,407,408,3,8,4,0,408,411,7,4,0,0,409,412,3,10,5,0,410,412,3,12,6,0,411, + 409,1,0,0,0,411,410,1,0,0,0,412,47,1,0,0,0,413,416,3,46,23,0,414,415,5, + 61,0,0,415,417,3,46,23,0,416,414,1,0,0,0,417,418,1,0,0,0,418,416,1,0,0, + 0,418,419,1,0,0,0,419,49,1,0,0,0,420,421,3,60,30,0,421,422,7,5,0,0,422, + 423,3,60,30,0,423,51,1,0,0,0,424,425,3,60,30,0,425,426,7,5,0,0,426,427, + 3,60,30,0,427,428,7,5,0,0,428,429,3,60,30,0,429,53,1,0,0,0,430,435,3,60, + 30,0,431,432,5,68,0,0,432,434,3,60,30,0,433,431,1,0,0,0,434,437,1,0,0,0, + 435,433,1,0,0,0,435,436,1,0,0,0,436,55,1,0,0,0,437,435,1,0,0,0,438,439, + 3,8,4,0,439,440,5,6,0,0,440,445,3,40,20,0,441,442,5,61,0,0,442,444,3,40, + 20,0,443,441,1,0,0,0,444,447,1,0,0,0,445,443,1,0,0,0,445,446,1,0,0,0,446, + 448,1,0,0,0,447,445,1,0,0,0,448,453,5,7,0,0,449,450,5,72,0,0,450,451,3, + 10,5,0,451,452,5,72,0,0,452,454,1,0,0,0,453,449,1,0,0,0,453,454,1,0,0,0, + 454,57,1,0,0,0,455,456,5,18,0,0,456,457,5,4,0,0,457,458,3,8,4,0,458,459, + 5,5,0,0,459,462,1,0,0,0,460,462,3,8,4,0,461,455,1,0,0,0,461,460,1,0,0,0, + 462,463,1,0,0,0,463,464,5,6,0,0,464,469,3,60,30,0,465,466,5,61,0,0,466, + 468,3,60,30,0,467,465,1,0,0,0,468,471,1,0,0,0,469,467,1,0,0,0,469,470,1, + 0,0,0,470,472,1,0,0,0,471,469,1,0,0,0,472,473,5,7,0,0,473,59,1,0,0,0,474, + 475,6,30,-1,0,475,476,3,8,4,0,476,477,5,71,0,0,477,604,1,0,0,0,478,479, + 3,8,4,0,479,480,7,2,0,0,480,481,5,70,0,0,481,604,1,0,0,0,482,483,3,8,4, + 0,483,484,5,55,0,0,484,485,5,4,0,0,485,486,3,60,30,0,486,487,5,5,0,0,487, + 488,5,70,0,0,488,604,1,0,0,0,489,604,5,24,0,0,490,491,5,23,0,0,491,492, + 5,4,0,0,492,493,3,60,30,0,493,494,5,5,0,0,494,604,1,0,0,0,495,496,5,66, + 0,0,496,501,3,54,27,0,497,498,5,69,0,0,498,500,3,54,27,0,499,497,1,0,0, + 0,500,503,1,0,0,0,501,499,1,0,0,0,501,502,1,0,0,0,502,504,1,0,0,0,503,501, + 1,0,0,0,504,505,5,67,0,0,505,604,1,0,0,0,506,604,3,28,14,0,507,604,3,30, + 15,0,508,604,3,32,16,0,509,604,3,36,18,0,510,604,3,38,19,0,511,513,5,29, + 0,0,512,511,1,0,0,0,512,513,1,0,0,0,513,514,1,0,0,0,514,515,5,44,0,0,515, + 516,5,6,0,0,516,517,3,60,30,0,517,518,5,7,0,0,518,604,1,0,0,0,519,521,5, + 29,0,0,520,519,1,0,0,0,520,521,1,0,0,0,521,522,1,0,0,0,522,523,5,45,0,0, + 523,524,5,6,0,0,524,525,3,60,30,0,525,526,5,7,0,0,526,604,1,0,0,0,527,528, + 5,46,0,0,528,529,5,4,0,0,529,530,3,60,30,0,530,531,5,5,0,0,531,532,5,6, + 0,0,532,533,3,60,30,0,533,534,5,7,0,0,534,604,1,0,0,0,535,536,7,6,0,0,536, + 537,5,6,0,0,537,538,3,60,30,0,538,539,5,7,0,0,539,604,1,0,0,0,540,541,5, + 9,0,0,541,542,3,60,30,0,542,543,5,9,0,0,543,604,1,0,0,0,544,545,5,8,0,0, + 545,546,3,60,30,0,546,547,5,8,0,0,547,604,1,0,0,0,548,604,3,12,6,0,549, + 604,3,10,5,0,550,551,5,54,0,0,551,604,3,60,30,30,552,553,5,19,0,0,553,554, + 5,4,0,0,554,555,3,60,30,0,555,556,5,5,0,0,556,557,5,4,0,0,557,558,3,60, + 30,0,558,559,5,5,0,0,559,604,1,0,0,0,560,604,5,20,0,0,561,604,3,8,4,0,562, + 604,3,56,28,0,563,604,3,58,29,0,564,604,5,12,0,0,565,566,5,6,0,0,566,567, + 3,60,30,0,567,568,5,7,0,0,568,604,1,0,0,0,569,570,3,10,5,0,570,571,3,60, + 30,12,571,604,1,0,0,0,572,573,3,12,6,0,573,574,3,60,30,11,574,604,1,0,0, + 0,575,576,5,12,0,0,576,604,3,60,30,10,577,580,5,27,0,0,578,579,5,4,0,0, + 579,581,5,5,0,0,580,578,1,0,0,0,580,581,1,0,0,0,581,604,1,0,0,0,582,583, + 5,18,0,0,583,584,5,4,0,0,584,585,3,60,30,0,585,586,5,5,0,0,586,588,1,0, + 0,0,587,582,1,0,0,0,587,588,1,0,0,0,588,592,1,0,0,0,589,593,5,62,0,0,590, + 593,3,10,5,0,591,593,5,56,0,0,592,589,1,0,0,0,592,590,1,0,0,0,592,591,1, + 0,0,0,592,593,1,0,0,0,593,594,1,0,0,0,594,595,5,18,0,0,595,596,5,4,0,0, + 596,597,3,60,30,0,597,601,5,5,0,0,598,602,5,62,0,0,599,602,3,10,5,0,600, + 602,5,56,0,0,601,598,1,0,0,0,601,599,1,0,0,0,601,600,1,0,0,0,601,602,1, + 0,0,0,602,604,1,0,0,0,603,474,1,0,0,0,603,478,1,0,0,0,603,482,1,0,0,0,603, + 489,1,0,0,0,603,490,1,0,0,0,603,495,1,0,0,0,603,506,1,0,0,0,603,507,1,0, + 0,0,603,508,1,0,0,0,603,509,1,0,0,0,603,510,1,0,0,0,603,512,1,0,0,0,603, + 520,1,0,0,0,603,527,1,0,0,0,603,535,1,0,0,0,603,540,1,0,0,0,603,544,1,0, + 0,0,603,548,1,0,0,0,603,549,1,0,0,0,603,550,1,0,0,0,603,552,1,0,0,0,603, + 560,1,0,0,0,603,561,1,0,0,0,603,562,1,0,0,0,603,563,1,0,0,0,603,564,1,0, + 0,0,603,565,1,0,0,0,603,569,1,0,0,0,603,572,1,0,0,0,603,575,1,0,0,0,603, + 577,1,0,0,0,603,587,1,0,0,0,604,669,1,0,0,0,605,606,10,29,0,0,606,607,5, + 22,0,0,607,668,3,60,30,30,608,609,10,28,0,0,609,610,5,21,0,0,610,668,3, + 60,30,29,611,612,10,25,0,0,612,613,5,54,0,0,613,668,3,60,30,26,614,615, + 10,24,0,0,615,616,5,53,0,0,616,668,3,60,30,25,617,618,10,51,0,0,618,668, + 7,2,0,0,619,620,10,50,0,0,620,621,5,55,0,0,621,622,5,4,0,0,622,623,3,60, + 30,0,623,624,5,5,0,0,624,668,1,0,0,0,625,626,10,49,0,0,626,627,5,10,0,0, + 627,628,5,4,0,0,628,629,3,60,30,0,629,630,5,61,0,0,630,631,3,60,30,0,631, + 632,5,5,0,0,632,668,1,0,0,0,633,634,10,48,0,0,634,668,5,28,0,0,635,636, + 10,47,0,0,636,668,5,11,0,0,637,638,10,18,0,0,638,639,5,10,0,0,639,640,5, + 4,0,0,640,668,5,5,0,0,641,642,10,17,0,0,642,643,5,55,0,0,643,644,5,4,0, + 0,644,668,5,5,0,0,645,646,10,16,0,0,646,668,3,8,4,0,647,648,10,15,0,0,648, + 668,3,10,5,0,649,650,10,14,0,0,650,668,3,12,6,0,651,652,10,13,0,0,652,668, + 5,12,0,0,653,654,10,9,0,0,654,668,3,56,28,0,655,656,10,8,0,0,656,668,3, + 58,29,0,657,658,10,7,0,0,658,668,3,28,14,0,659,660,10,6,0,0,660,668,3,30, + 15,0,661,662,10,5,0,0,662,668,3,32,16,0,663,664,10,4,0,0,664,668,3,36,18, + 0,665,666,10,3,0,0,666,668,3,38,19,0,667,605,1,0,0,0,667,608,1,0,0,0,667, + 611,1,0,0,0,667,614,1,0,0,0,667,617,1,0,0,0,667,619,1,0,0,0,667,625,1,0, + 0,0,667,633,1,0,0,0,667,635,1,0,0,0,667,637,1,0,0,0,667,641,1,0,0,0,667, + 645,1,0,0,0,667,647,1,0,0,0,667,649,1,0,0,0,667,651,1,0,0,0,667,653,1,0, + 0,0,667,655,1,0,0,0,667,657,1,0,0,0,667,659,1,0,0,0,667,661,1,0,0,0,667, + 663,1,0,0,0,667,665,1,0,0,0,668,671,1,0,0,0,669,667,1,0,0,0,669,670,1,0, + 0,0,670,61,1,0,0,0,671,669,1,0,0,0,672,673,7,7,0,0,673,674,3,68,34,0,674, + 675,7,8,0,0,675,63,1,0,0,0,676,677,7,7,0,0,677,678,7,9,0,0,678,679,7,10, + 0,0,679,680,7,9,0,0,680,681,7,8,0,0,681,65,1,0,0,0,682,683,5,80,0,0,683, + 684,5,90,0,0,684,685,7,9,0,0,685,686,5,91,0,0,686,687,5,90,0,0,687,688, + 5,93,0,0,688,691,5,91,0,0,689,691,5,81,0,0,690,682,1,0,0,0,690,689,1,0, + 0,0,691,67,1,0,0,0,692,693,6,34,-1,0,693,694,5,84,0,0,694,695,5,90,0,0, + 695,696,3,60,30,0,696,697,5,91,0,0,697,715,1,0,0,0,698,699,5,80,0,0,699, + 702,5,90,0,0,700,703,3,68,34,0,701,703,5,92,0,0,702,700,1,0,0,0,702,701, + 1,0,0,0,703,704,1,0,0,0,704,705,5,91,0,0,705,706,5,90,0,0,706,707,3,68, + 34,0,707,708,5,91,0,0,708,715,1,0,0,0,709,715,5,87,0,0,710,711,5,88,0,0, + 711,712,3,68,34,0,712,713,5,89,0,0,713,715,1,0,0,0,714,692,1,0,0,0,714, + 698,1,0,0,0,714,709,1,0,0,0,714,710,1,0,0,0,715,738,1,0,0,0,716,717,10, + 4,0,0,717,718,5,82,0,0,718,737,3,68,34,5,719,720,10,9,0,0,720,721,5,86, + 0,0,721,737,5,93,0,0,722,723,10,8,0,0,723,724,5,86,0,0,724,725,5,90,0,0, + 725,726,5,93,0,0,726,737,5,91,0,0,727,728,10,7,0,0,728,729,5,86,0,0,729, + 737,3,66,33,0,730,731,10,6,0,0,731,732,5,86,0,0,732,733,5,90,0,0,733,734, + 3,66,33,0,734,735,5,91,0,0,735,737,1,0,0,0,736,716,1,0,0,0,736,719,1,0, + 0,0,736,722,1,0,0,0,736,727,1,0,0,0,736,730,1,0,0,0,737,740,1,0,0,0,738, + 736,1,0,0,0,738,739,1,0,0,0,739,69,1,0,0,0,740,738,1,0,0,0,55,87,101,104, + 117,133,146,151,158,163,168,175,181,191,196,201,209,219,231,245,256,268, + 276,287,306,320,330,348,356,366,377,394,398,405,411,418,435,445,453,461, + 469,501,512,520,580,587,592,601,603,667,669,690,702,714,736,738]; private static __ATN: ATN; public static get _ATN(): ATN { @@ -4486,6 +4569,70 @@ export class Integral_cmdContext extends ParserRuleContext { } +export class Summation_cmdContext extends ParserRuleContext { + public _start_expr!: ExprContext; + public _end_expr!: ExprContext; + public _operand_expr!: ExprContext; + constructor(parser?: LatexParser, parent?: ParserRuleContext, invokingState?: number) { + super(parent, invokingState); + this.parser = parser; + } + public L_PAREN(): TerminalNode { + return this.getToken(LatexParser.L_PAREN, 0); + } + public R_PAREN(): TerminalNode { + return this.getToken(LatexParser.R_PAREN, 0); + } + public expr_list(): ExprContext[] { + return this.getTypedRuleContexts(ExprContext) as ExprContext[]; + } + public expr(i: number): ExprContext { + return this.getTypedRuleContext(ExprContext, i) as ExprContext; + } + public CMD_SUM_UNDERSCORE(): TerminalNode { + return this.getToken(LatexParser.CMD_SUM_UNDERSCORE, 0); + } + public L_BRACE_list(): TerminalNode[] { + return this.getTokens(LatexParser.L_BRACE); + } + public L_BRACE(i: number): TerminalNode { + return this.getToken(LatexParser.L_BRACE, i); + } + public id(): IdContext { + return this.getTypedRuleContext(IdContext, 0) as IdContext; + } + public EQ(): TerminalNode { + return this.getToken(LatexParser.EQ, 0); + } + public R_BRACE_list(): TerminalNode[] { + return this.getTokens(LatexParser.R_BRACE); + } + public R_BRACE(i: number): TerminalNode { + return this.getToken(LatexParser.R_BRACE, i); + } + public CARET_SINGLE_CHAR_ID(): TerminalNode { + return this.getToken(LatexParser.CARET_SINGLE_CHAR_ID, 0); + } + public CARET_SINGLE_CHAR_NUMBER(): TerminalNode { + return this.getToken(LatexParser.CARET_SINGLE_CHAR_NUMBER, 0); + } + public CARET(): TerminalNode { + return this.getToken(LatexParser.CARET, 0); + } + public get ruleIndex(): number { + return LatexParser.RULE_summation_cmd; + } + // @Override + public accept(visitor: LatexParserVisitor): Result { + if (visitor.visitSummation_cmd) { + return visitor.visitSummation_cmd(this); + } else { + return visitor.visitChildren(this); + } + } +} + + export class Derivative_cmdContext extends ParserRuleContext { public _MATHRM_0!: Token; public _MATHRM_1!: Token; diff --git a/src/parser/LatexParserVisitor.ts b/src/parser/LatexParserVisitor.ts index 474ff628..9f3596ed 100644 --- a/src/parser/LatexParserVisitor.ts +++ b/src/parser/LatexParserVisitor.ts @@ -21,6 +21,7 @@ import { Piecewise_argContext } from "./LatexParser"; import { Trig_functionContext } from "./LatexParser"; import { Indefinite_integral_cmdContext } from "./LatexParser"; import { Integral_cmdContext } from "./LatexParser"; +import { Summation_cmdContext } from "./LatexParser"; import { Derivative_cmdContext } from "./LatexParser"; import { N_derivative_cmdContext } from "./LatexParser"; import { ArgumentContext } from "./LatexParser"; @@ -192,6 +193,12 @@ export default class LatexParserVisitor extends ParseTreeVisitor * @return the visitor result */ visitIntegral_cmd?: (ctx: Integral_cmdContext) => Result; + /** + * Visit a parse tree produced by `LatexParser.summation_cmd`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSummation_cmd?: (ctx: Summation_cmdContext) => Result; /** * Visit a parse tree produced by `LatexParser.derivative_cmd`. * @param ctx the parse tree From 88db36ed412f5b535fed1381e2d8db6ad26490cd Mon Sep 17 00:00:00 2001 From: mgreminger Date: Fri, 25 Oct 2024 15:06:15 -0500 Subject: [PATCH 3/9] feat: initial implementation of summation syntax Tests and virtual keyboard button needs to be added. Indexing of matrices within a sum also needs to be fixed. --- public/dimensional_analysis.py | 6 +- src/constants.ts | 1 + src/parser/LatexParser.g4 | 1 + src/parser/LatexParser.ts | 711 ++++++++++++++++--------------- src/parser/LatexParserVisitor.ts | 8 + src/parser/LatexToSympy.ts | 38 ++ 6 files changed, 422 insertions(+), 343 deletions(-) diff --git a/public/dimensional_analysis.py b/public/dimensional_analysis.py index bd2cd700..16250180 100644 --- a/public/dimensional_analysis.py +++ b/public/dimensional_analysis.py @@ -63,7 +63,8 @@ ceiling, sign, sqrt, - factorial + factorial, + summation ) class ExprWithAssumptions(Expr): @@ -1183,6 +1184,8 @@ def custom_integral_dims(local_expr: Expr, global_expr: Expr, dummy_integral_var else: return global_expr * integral_var # type: ignore +def custom_summation(operand: Expr, dummy_var: Symbol, start: Expr, end: Expr): + return summation(operand, (dummy_var, start, end)) CP = None @@ -1491,6 +1494,7 @@ def get_next_id(self): cast(Function, Function('_Integral')) : {"dim_func": custom_integral_dims, "sympy_func": custom_integral}, cast(Function, Function('_range')) : {"dim_func": custom_range, "sympy_func": custom_range}, cast(Function, Function('_factorial')) : {"dim_func": factorial, "sympy_func": CustomFactorial}, + cast(Function, Function('_summation')) : {"dim_func": custom_summation, "sympy_func": custom_summation}, } global_placeholder_set = set(global_placeholder_map.keys()) diff --git a/src/constants.ts b/src/constants.ts index ed8898fc..9dbb9d10 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -6,6 +6,7 @@ export const INLINE_SHORTCUTS = { '~': '\\approx', 'sqrt': '\\sqrt{#?}', '$int': '\\int _{#?}^{#?}\\left(#?\\right)\\mathrm{d}\\left(#?\\right)', + '$sum': '\\sum_{#?=#?}^{#?}\left(#?\\right)', '$prime': '\\frac{\\mathrm{d}}{\\mathrm{d}\\left(#?\\right)}\\left(#?\\right)', '$doubleprime': '\\frac{\\mathrm{d}^{2}}{\\mathrm{d}\\left(#?\\right)^{2}}\\left(#?\\right)', '$tripleprime': '\\frac{\\mathrm{d}^{3}}{\\mathrm{d}\\left(#?\\right)^{3}}\\left(#?\\right)', diff --git a/src/parser/LatexParser.g4 b/src/parser/LatexParser.g4 index 5809ef8e..da74ba1d 100644 --- a/src/parser/LatexParser.g4 +++ b/src/parser/LatexParser.g4 @@ -94,6 +94,7 @@ expr: id CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT #exp | integral_cmd #integral | derivative_cmd #derivative | n_derivative_cmd #nDerivative + | summation_cmd #summation | BACKSLASH? CMD_LN L_PAREN expr R_PAREN #ln | BACKSLASH? CMD_LOG L_PAREN expr R_PAREN #log | CMD_SLASH_LOG_UNDERSCORE L_BRACE expr R_BRACE L_PAREN expr R_PAREN #baseLog diff --git a/src/parser/LatexParser.ts b/src/parser/LatexParser.ts index d3b85903..ab48c473 100644 --- a/src/parser/LatexParser.ts +++ b/src/parser/LatexParser.ts @@ -2240,7 +2240,7 @@ export default class LatexParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 603; + this.state = 604; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 47, this._ctx) ) { case 1: @@ -2393,82 +2393,91 @@ export default class LatexParser extends Parser { } break; case 12: + { + localctx = new SummationContext(this, localctx); + this._ctx = localctx; + _prevctx = localctx; + this.state = 511; + this.summation_cmd(); + } + break; + case 13: { localctx = new LnContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 512; + this.state = 513; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===29) { { - this.state = 511; + this.state = 512; this.match(LatexParser.BACKSLASH); } } - this.state = 514; - this.match(LatexParser.CMD_LN); this.state = 515; - this.match(LatexParser.L_PAREN); + this.match(LatexParser.CMD_LN); this.state = 516; - this.expr(0); + this.match(LatexParser.L_PAREN); this.state = 517; + this.expr(0); + this.state = 518; this.match(LatexParser.R_PAREN); } break; - case 13: + case 14: { localctx = new LogContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 520; + this.state = 521; this._errHandler.sync(this); _la = this._input.LA(1); if (_la===29) { { - this.state = 519; + this.state = 520; this.match(LatexParser.BACKSLASH); } } - this.state = 522; - this.match(LatexParser.CMD_LOG); this.state = 523; - this.match(LatexParser.L_PAREN); + this.match(LatexParser.CMD_LOG); this.state = 524; - this.expr(0); + this.match(LatexParser.L_PAREN); this.state = 525; + this.expr(0); + this.state = 526; this.match(LatexParser.R_PAREN); } break; - case 14: + case 15: { localctx = new BaseLogContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 527; - this.match(LatexParser.CMD_SLASH_LOG_UNDERSCORE); this.state = 528; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CMD_SLASH_LOG_UNDERSCORE); this.state = 529; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 530; - this.match(LatexParser.R_BRACE); + this.expr(0); this.state = 531; - this.match(LatexParser.L_PAREN); + this.match(LatexParser.R_BRACE); this.state = 532; - this.expr(0); + this.match(LatexParser.L_PAREN); this.state = 533; + this.expr(0); + this.state = 534; this.match(LatexParser.R_PAREN); } break; - case 15: + case 16: { localctx = new BaseLogSingleCharContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 535; + this.state = 536; _la = this._input.LA(1); if(!(_la===47 || _la===48)) { this._errHandler.recoverInline(this); @@ -2477,242 +2486,242 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 536; - this.match(LatexParser.L_PAREN); this.state = 537; - this.expr(0); + this.match(LatexParser.L_PAREN); this.state = 538; + this.expr(0); + this.state = 539; this.match(LatexParser.R_PAREN); } break; - case 16: + case 17: { localctx = new NormContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 540; - this.match(LatexParser.DOUBLE_VBAR); this.state = 541; - this.expr(0); + this.match(LatexParser.DOUBLE_VBAR); this.state = 542; + this.expr(0); + this.state = 543; this.match(LatexParser.DOUBLE_VBAR); } break; - case 17: + case 18: { localctx = new AbsContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 544; - this.match(LatexParser.VBAR); this.state = 545; - this.expr(0); + this.match(LatexParser.VBAR); this.state = 546; + this.expr(0); + this.state = 547; this.match(LatexParser.VBAR); } break; - case 18: + case 19: { localctx = new NumberWithUnitsExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 548; + this.state = 549; this.number_with_units(); } break; - case 19: + case 20: { localctx = new NumberExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 549; + this.state = 550; this.number_(); } break; - case 20: + case 21: { localctx = new UnaryMinusContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 550; - this.match(LatexParser.SUB); this.state = 551; + this.match(LatexParser.SUB); + this.state = 552; this.expr(30); } break; - case 21: + case 22: { localctx = new DivideContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 552; - this.match(LatexParser.CMD_FRAC); this.state = 553; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CMD_FRAC); this.state = 554; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 555; - this.match(LatexParser.R_BRACE); + this.expr(0); this.state = 556; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.R_BRACE); this.state = 557; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 558; + this.expr(0); + this.state = 559; this.match(LatexParser.R_BRACE); } break; - case 22: + case 23: { localctx = new DivideIntsContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 560; + this.state = 561; this.match(LatexParser.CMD_FRAC_INTS); } break; - case 23: + case 24: { localctx = new VariableContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 561; + this.state = 562; this.id(); } break; - case 24: + case 25: { localctx = new UserFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 562; + this.state = 563; this.user_function(); } break; - case 25: + case 26: { localctx = new BuiltinFunctionContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 563; + this.state = 564; this.builtin_function(); } break; - case 26: + case 27: { localctx = new PiExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 564; + this.state = 565; this.match(LatexParser.PI); } break; - case 27: + case 28: { localctx = new SubExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 565; - this.match(LatexParser.L_PAREN); this.state = 566; - this.expr(0); + this.match(LatexParser.L_PAREN); this.state = 567; + this.expr(0); + this.state = 568; this.match(LatexParser.R_PAREN); } break; - case 28: + case 29: { localctx = new MissingMultiplicationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 569; - this.number_(); this.state = 570; + this.number_(); + this.state = 571; this.expr(12); } break; - case 29: + case 30: { localctx = new MissingMultiplicationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 572; - this.number_with_units(); this.state = 573; + this.number_with_units(); + this.state = 574; this.expr(11); } break; - case 30: + case 31: { localctx = new MissingMultiplicationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 575; - this.match(LatexParser.PI); this.state = 576; + this.match(LatexParser.PI); + this.state = 577; this.expr(10); } break; - case 31: + case 32: { localctx = new EmptyPlaceholderContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 577; + this.state = 578; this.match(LatexParser.CMD_PLACEHOLDER); - this.state = 580; + this.state = 581; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 43, this._ctx) ) { case 1: { - this.state = 578; - this.match(LatexParser.L_BRACE); this.state = 579; + this.match(LatexParser.L_BRACE); + this.state = 580; this.match(LatexParser.R_BRACE); } break; } } break; - case 32: + case 33: { localctx = new RemoveOperatorFontContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 587; + this.state = 588; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 44, this._ctx) ) { case 1: { - this.state = 582; - this.match(LatexParser.CMD_MATHRM); this.state = 583; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CMD_MATHRM); this.state = 584; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 585; + this.expr(0); + this.state = 586; this.match(LatexParser.R_BRACE); } break; } - this.state = 592; + this.state = 593; this._errHandler.sync(this); switch (this._input.LA(1)) { case 62: { - this.state = 589; + this.state = 590; this.match(LatexParser.DECIMAL_POINT); } break; case 54: case 65: { - this.state = 590; + this.state = 591; this.number_(); } break; case 56: { - this.state = 591; + this.state = 592; this.match(LatexParser.EQ); } break; @@ -2721,32 +2730,32 @@ export default class LatexParser extends Parser { default: break; } - this.state = 594; - this.match(LatexParser.CMD_MATHRM); this.state = 595; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CMD_MATHRM); this.state = 596; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 597; + this.expr(0); + this.state = 598; this.match(LatexParser.R_BRACE); - this.state = 601; + this.state = 602; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 46, this._ctx) ) { case 1: { - this.state = 598; + this.state = 599; this.match(LatexParser.DECIMAL_POINT); } break; case 2: { - this.state = 599; + this.state = 600; this.number_(); } break; case 3: { - this.state = 600; + this.state = 601; this.match(LatexParser.EQ); } break; @@ -2755,7 +2764,7 @@ export default class LatexParser extends Parser { break; } this._ctx.stop = this._input.LT(-1); - this.state = 669; + this.state = 670; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 49, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -2765,20 +2774,20 @@ export default class LatexParser extends Parser { } _prevctx = localctx; { - this.state = 667; + this.state = 668; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 48, this._ctx) ) { case 1: { localctx = new MatrixMultiplyContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 605; + this.state = 606; if (!(this.precpred(this._ctx, 29))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 29)"); } - this.state = 606; - this.match(LatexParser.CMD_TIMES); this.state = 607; + this.match(LatexParser.CMD_TIMES); + this.state = 608; this.expr(30); } break; @@ -2786,13 +2795,13 @@ export default class LatexParser extends Parser { { localctx = new MultiplyContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 608; + this.state = 609; if (!(this.precpred(this._ctx, 28))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 28)"); } - this.state = 609; - this.match(LatexParser.CMD_CDOT); this.state = 610; + this.match(LatexParser.CMD_CDOT); + this.state = 611; this.expr(29); } break; @@ -2800,13 +2809,13 @@ export default class LatexParser extends Parser { { localctx = new SubtractContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 611; + this.state = 612; if (!(this.precpred(this._ctx, 25))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 25)"); } - this.state = 612; - this.match(LatexParser.SUB); this.state = 613; + this.match(LatexParser.SUB); + this.state = 614; this.expr(26); } break; @@ -2814,13 +2823,13 @@ export default class LatexParser extends Parser { { localctx = new AddContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 614; + this.state = 615; if (!(this.precpred(this._ctx, 24))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 24)"); } - this.state = 615; - this.match(LatexParser.ADD); this.state = 616; + this.match(LatexParser.ADD); + this.state = 617; this.expr(25); } break; @@ -2828,11 +2837,11 @@ export default class LatexParser extends Parser { { localctx = new ExponentContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 617; - if (!(this.precpred(this._ctx, 51))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 51)"); - } this.state = 618; + if (!(this.precpred(this._ctx, 52))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 52)"); + } + this.state = 619; _la = this._input.LA(1); if(!(_la===63 || _la===64)) { this._errHandler.recoverInline(this); @@ -2847,17 +2856,17 @@ export default class LatexParser extends Parser { { localctx = new ExponentContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 619; - if (!(this.precpred(this._ctx, 50))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 50)"); - } this.state = 620; - this.match(LatexParser.CARET); + if (!(this.precpred(this._ctx, 51))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 51)"); + } this.state = 621; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CARET); this.state = 622; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 623; + this.expr(0); + this.state = 624; this.match(LatexParser.R_BRACE); } break; @@ -2865,21 +2874,21 @@ export default class LatexParser extends Parser { { localctx = new IndexContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 625; - if (!(this.precpred(this._ctx, 49))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 49)"); - } this.state = 626; - this.match(LatexParser.UNDERSCORE); + if (!(this.precpred(this._ctx, 50))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 50)"); + } this.state = 627; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.UNDERSCORE); this.state = 628; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 629; - this.match(LatexParser.COMMA); - this.state = 630; this.expr(0); + this.state = 630; + this.match(LatexParser.COMMA); this.state = 631; + this.expr(0); + this.state = 632; this.match(LatexParser.R_BRACE); } break; @@ -2887,11 +2896,11 @@ export default class LatexParser extends Parser { { localctx = new TransposeContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 633; - if (!(this.precpred(this._ctx, 48))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 48)"); - } this.state = 634; + if (!(this.precpred(this._ctx, 49))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 49)"); + } + this.state = 635; this.match(LatexParser.TRANSPOSE); } break; @@ -2899,11 +2908,11 @@ export default class LatexParser extends Parser { { localctx = new FactorialContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 635; - if (!(this.precpred(this._ctx, 47))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 47)"); - } this.state = 636; + if (!(this.precpred(this._ctx, 48))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 48)"); + } + this.state = 637; this.match(LatexParser.EXCLAMATION); } break; @@ -2911,15 +2920,15 @@ export default class LatexParser extends Parser { { localctx = new EmptySubscriptContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 637; + this.state = 638; if (!(this.precpred(this._ctx, 18))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 18)"); } - this.state = 638; - this.match(LatexParser.UNDERSCORE); this.state = 639; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.UNDERSCORE); this.state = 640; + this.match(LatexParser.L_BRACE); + this.state = 641; this.match(LatexParser.R_BRACE); } break; @@ -2927,15 +2936,15 @@ export default class LatexParser extends Parser { { localctx = new EmptySuperscriptContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 641; + this.state = 642; if (!(this.precpred(this._ctx, 17))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 17)"); } - this.state = 642; - this.match(LatexParser.CARET); this.state = 643; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CARET); this.state = 644; + this.match(LatexParser.L_BRACE); + this.state = 645; this.match(LatexParser.R_BRACE); } break; @@ -2943,11 +2952,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 645; + this.state = 646; if (!(this.precpred(this._ctx, 16))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 16)"); } - this.state = 646; + this.state = 647; this.id(); } break; @@ -2955,11 +2964,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 647; + this.state = 648; if (!(this.precpred(this._ctx, 15))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 15)"); } - this.state = 648; + this.state = 649; this.number_(); } break; @@ -2967,11 +2976,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 649; + this.state = 650; if (!(this.precpred(this._ctx, 14))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 14)"); } - this.state = 650; + this.state = 651; this.number_with_units(); } break; @@ -2979,11 +2988,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 651; + this.state = 652; if (!(this.precpred(this._ctx, 13))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); } - this.state = 652; + this.state = 653; this.match(LatexParser.PI); } break; @@ -2991,11 +3000,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 653; + this.state = 654; if (!(this.precpred(this._ctx, 9))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } - this.state = 654; + this.state = 655; this.user_function(); } break; @@ -3003,11 +3012,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 655; + this.state = 656; if (!(this.precpred(this._ctx, 8))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } - this.state = 656; + this.state = 657; this.builtin_function(); } break; @@ -3015,11 +3024,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 657; + this.state = 658; if (!(this.precpred(this._ctx, 7))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } - this.state = 658; + this.state = 659; this.trig_function(); } break; @@ -3027,11 +3036,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 659; + this.state = 660; if (!(this.precpred(this._ctx, 6))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); } - this.state = 660; + this.state = 661; this.indefinite_integral_cmd(); } break; @@ -3039,11 +3048,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 661; + this.state = 662; if (!(this.precpred(this._ctx, 5))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); } - this.state = 662; + this.state = 663; this.integral_cmd(); } break; @@ -3051,11 +3060,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 663; + this.state = 664; if (!(this.precpred(this._ctx, 4))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 4)"); } - this.state = 664; + this.state = 665; this.derivative_cmd(); } break; @@ -3063,18 +3072,18 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 665; + this.state = 666; if (!(this.precpred(this._ctx, 3))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 3)"); } - this.state = 666; + this.state = 667; this.n_derivative_cmd(); } break; } } } - this.state = 671; + this.state = 672; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 49, this._ctx); } @@ -3102,7 +3111,7 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 672; + this.state = 673; _la = this._input.LA(1); if(!(_la===1 || _la===2)) { this._errHandler.recoverInline(this); @@ -3111,9 +3120,9 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 673; - this.u_expr(0); this.state = 674; + this.u_expr(0); + this.state = 675; _la = this._input.LA(1); if(!(_la===78 || _la===79)) { this._errHandler.recoverInline(this); @@ -3146,7 +3155,7 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 676; + this.state = 677; _la = this._input.LA(1); if(!(_la===1 || _la===2)) { this._errHandler.recoverInline(this); @@ -3155,7 +3164,7 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 677; + this.state = 678; localctx._numRows = this._input.LT(1); _la = this._input.LA(1); if(!(_la===92 || _la===93)) { @@ -3165,7 +3174,7 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 678; + this.state = 679; _la = this._input.LA(1); if(!(_la===83 || _la===85)) { this._errHandler.recoverInline(this); @@ -3174,7 +3183,7 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 679; + this.state = 680; localctx._numColumns = this._input.LT(1); _la = this._input.LA(1); if(!(_la===92 || _la===93)) { @@ -3184,7 +3193,7 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 680; + this.state = 681; _la = this._input.LA(1); if(!(_la===78 || _la===79)) { this._errHandler.recoverInline(this); @@ -3215,17 +3224,17 @@ export default class LatexParser extends Parser { this.enterRule(localctx, 66, LatexParser.RULE_u_fraction); let _la: number; try { - this.state = 690; + this.state = 691; this._errHandler.sync(this); switch (this._input.LA(1)) { case 80: this.enterOuterAlt(localctx, 1); { - this.state = 682; - this.match(LatexParser.U_CMD_FRAC); this.state = 683; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_CMD_FRAC); this.state = 684; + this.match(LatexParser.U_L_BRACE); + this.state = 685; _la = this._input.LA(1); if(!(_la===92 || _la===93)) { this._errHandler.recoverInline(this); @@ -3234,20 +3243,20 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 685; - this.match(LatexParser.U_R_BRACE); this.state = 686; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_R_BRACE); this.state = 687; - this.match(LatexParser.U_NUMBER); + this.match(LatexParser.U_L_BRACE); this.state = 688; + this.match(LatexParser.U_NUMBER); + this.state = 689; this.match(LatexParser.U_R_BRACE); } break; case 81: this.enterOuterAlt(localctx, 2); { - this.state = 689; + this.state = 690; this.match(LatexParser.U_CMD_FRAC_INTS); } break; @@ -3288,7 +3297,7 @@ export default class LatexParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 714; + this.state = 715; this._errHandler.sync(this); switch (this._input.LA(1)) { case 84: @@ -3297,13 +3306,13 @@ export default class LatexParser extends Parser { this._ctx = localctx; _prevctx = localctx; - this.state = 693; - this.match(LatexParser.U_CMD_SQRT); this.state = 694; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_CMD_SQRT); this.state = 695; - this.expr(0); + this.match(LatexParser.U_L_BRACE); this.state = 696; + this.expr(0); + this.state = 697; this.match(LatexParser.U_R_BRACE); } break; @@ -3312,11 +3321,11 @@ export default class LatexParser extends Parser { localctx = new UnitDivideContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 698; - this.match(LatexParser.U_CMD_FRAC); this.state = 699; + this.match(LatexParser.U_CMD_FRAC); + this.state = 700; this.match(LatexParser.U_L_BRACE); - this.state = 702; + this.state = 703; this._errHandler.sync(this); switch (this._input.LA(1)) { case 80: @@ -3324,26 +3333,26 @@ export default class LatexParser extends Parser { case 87: case 88: { - this.state = 700; + this.state = 701; this.u_expr(0); } break; case 92: { - this.state = 701; + this.state = 702; this.match(LatexParser.U_ONE); } break; default: throw new NoViableAltException(this); } - this.state = 704; - this.match(LatexParser.U_R_BRACE); this.state = 705; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_R_BRACE); this.state = 706; - this.u_expr(0); + this.match(LatexParser.U_L_BRACE); this.state = 707; + this.u_expr(0); + this.state = 708; this.match(LatexParser.U_R_BRACE); } break; @@ -3352,7 +3361,7 @@ export default class LatexParser extends Parser { localctx = new UnitNameContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 709; + this.state = 710; this.match(LatexParser.U_NAME); } break; @@ -3361,11 +3370,11 @@ export default class LatexParser extends Parser { localctx = new UnitSubExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 710; - this.match(LatexParser.U_L_PAREN); this.state = 711; - this.u_expr(0); + this.match(LatexParser.U_L_PAREN); this.state = 712; + this.u_expr(0); + this.state = 713; this.match(LatexParser.U_R_PAREN); } break; @@ -3373,7 +3382,7 @@ export default class LatexParser extends Parser { throw new NoViableAltException(this); } this._ctx.stop = this._input.LT(-1); - this.state = 738; + this.state = 739; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 54, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -3383,20 +3392,20 @@ export default class LatexParser extends Parser { } _prevctx = localctx; { - this.state = 736; + this.state = 737; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 53, this._ctx) ) { case 1: { localctx = new UnitMultiplyContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 716; + this.state = 717; if (!(this.precpred(this._ctx, 4))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 4)"); } - this.state = 717; - this.match(LatexParser.U_CMD_CDOT); this.state = 718; + this.match(LatexParser.U_CMD_CDOT); + this.state = 719; this.u_expr(5); } break; @@ -3404,13 +3413,13 @@ export default class LatexParser extends Parser { { localctx = new UnitExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 719; + this.state = 720; if (!(this.precpred(this._ctx, 9))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } - this.state = 720; - this.match(LatexParser.U_CARET); this.state = 721; + this.match(LatexParser.U_CARET); + this.state = 722; this.match(LatexParser.U_NUMBER); } break; @@ -3418,17 +3427,17 @@ export default class LatexParser extends Parser { { localctx = new UnitExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 722; + this.state = 723; if (!(this.precpred(this._ctx, 8))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } - this.state = 723; - this.match(LatexParser.U_CARET); this.state = 724; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_CARET); this.state = 725; - this.match(LatexParser.U_NUMBER); + this.match(LatexParser.U_L_BRACE); this.state = 726; + this.match(LatexParser.U_NUMBER); + this.state = 727; this.match(LatexParser.U_R_BRACE); } break; @@ -3436,13 +3445,13 @@ export default class LatexParser extends Parser { { localctx = new UnitFractionalExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 727; + this.state = 728; if (!(this.precpred(this._ctx, 7))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } - this.state = 728; - this.match(LatexParser.U_CARET); this.state = 729; + this.match(LatexParser.U_CARET); + this.state = 730; this.u_fraction(); } break; @@ -3450,24 +3459,24 @@ export default class LatexParser extends Parser { { localctx = new UnitFractionalExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 730; + this.state = 731; if (!(this.precpred(this._ctx, 6))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); } - this.state = 731; - this.match(LatexParser.U_CARET); this.state = 732; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_CARET); this.state = 733; - this.u_fraction(); + this.match(LatexParser.U_L_BRACE); this.state = 734; + this.u_fraction(); + this.state = 735; this.match(LatexParser.U_R_BRACE); } break; } } } - this.state = 740; + this.state = 741; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 54, this._ctx); } @@ -3508,15 +3517,15 @@ export default class LatexParser extends Parser { case 3: return this.precpred(this._ctx, 24); case 4: - return this.precpred(this._ctx, 51); + return this.precpred(this._ctx, 52); case 5: - return this.precpred(this._ctx, 50); + return this.precpred(this._ctx, 51); case 6: - return this.precpred(this._ctx, 49); + return this.precpred(this._ctx, 50); case 7: - return this.precpred(this._ctx, 48); + return this.precpred(this._ctx, 49); case 8: - return this.precpred(this._ctx, 47); + return this.precpred(this._ctx, 48); case 9: return this.precpred(this._ctx, 18); case 10: @@ -3562,7 +3571,7 @@ export default class LatexParser extends Parser { return true; } - public static readonly _serializedATN: number[] = [4,1,100,742,2,0,7,0, + public static readonly _serializedATN: number[] = [4,1,100,743,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, @@ -3599,43 +3608,43 @@ export default class LatexParser extends Parser { 1,29,1,29,1,29,5,29,468,8,29,10,29,12,29,471,9,29,1,29,1,29,1,30,1,30,1, 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,5,30,500,8,30,10,30,12,30,503,9, - 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,3,30,513,8,30,1,30,1,30,1,30, - 1,30,1,30,1,30,3,30,521,8,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, + 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,3,30,514,8,30,1,30,1,30, + 1,30,1,30,1,30,1,30,3,30,522,8,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, - 1,30,1,30,1,30,1,30,1,30,1,30,3,30,581,8,30,1,30,1,30,1,30,1,30,1,30,3, - 30,588,8,30,1,30,1,30,1,30,3,30,593,8,30,1,30,1,30,1,30,1,30,1,30,1,30, - 1,30,3,30,602,8,30,3,30,604,8,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,1,30,3,30,582,8,30,1,30,1,30,1,30,1,30,1, + 30,3,30,589,8,30,1,30,1,30,1,30,3,30,594,8,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,3,30,603,8,30,3,30,605,8,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, - 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,5,30,668,8,30,10,30, - 12,30,671,9,30,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,33,1,33,1,33,1,33,3,33,691,8,33,1,34,1,34,1,34,1,34,1,34, - 1,34,1,34,1,34,1,34,1,34,3,34,703,8,34,1,34,1,34,1,34,1,34,1,34,1,34,1, - 34,1,34,1,34,1,34,3,34,715,8,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34, - 1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,5,34,737,8, - 34,10,34,12,34,740,9,34,1,34,2,151,158,2,60,68,35,0,2,4,6,8,10,12,14,16, - 18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64, - 66,68,0,11,1,0,31,43,1,0,15,16,1,0,63,64,2,0,57,57,59,59,1,0,25,26,1,0, - 57,60,1,0,47,48,1,0,1,2,1,0,78,79,1,0,92,93,2,0,83,83,85,85,839,0,87,1, - 0,0,0,2,101,1,0,0,0,4,119,1,0,0,0,6,151,1,0,0,0,8,165,1,0,0,0,10,168,1, - 0,0,0,12,175,1,0,0,0,14,181,1,0,0,0,16,186,1,0,0,0,18,193,1,0,0,0,20,198, - 1,0,0,0,22,203,1,0,0,0,24,209,1,0,0,0,26,224,1,0,0,0,28,231,1,0,0,0,30, - 245,1,0,0,0,32,268,1,0,0,0,34,293,1,0,0,0,36,312,1,0,0,0,38,340,1,0,0,0, - 40,394,1,0,0,0,42,398,1,0,0,0,44,400,1,0,0,0,46,407,1,0,0,0,48,413,1,0, - 0,0,50,420,1,0,0,0,52,424,1,0,0,0,54,430,1,0,0,0,56,438,1,0,0,0,58,461, - 1,0,0,0,60,603,1,0,0,0,62,672,1,0,0,0,64,676,1,0,0,0,66,690,1,0,0,0,68, - 714,1,0,0,0,70,88,3,14,7,0,71,88,3,16,8,0,72,88,3,18,9,0,73,88,3,20,10, - 0,74,88,3,22,11,0,75,88,3,62,31,0,76,88,3,10,5,0,77,88,3,8,4,0,78,88,3, - 44,22,0,79,88,3,46,23,0,80,88,3,48,24,0,81,88,3,60,30,0,82,88,3,42,21,0, - 83,88,3,24,12,0,84,88,3,6,3,0,85,88,3,2,1,0,86,88,3,4,2,0,87,70,1,0,0,0, - 87,71,1,0,0,0,87,72,1,0,0,0,87,73,1,0,0,0,87,74,1,0,0,0,87,75,1,0,0,0,87, - 76,1,0,0,0,87,77,1,0,0,0,87,78,1,0,0,0,87,79,1,0,0,0,87,80,1,0,0,0,87,81, - 1,0,0,0,87,82,1,0,0,0,87,83,1,0,0,0,87,84,1,0,0,0,87,85,1,0,0,0,87,86,1, - 0,0,0,87,88,1,0,0,0,88,89,1,0,0,0,89,90,5,0,0,1,90,1,1,0,0,0,91,92,5,6, - 0,0,92,93,3,60,30,0,93,94,5,61,0,0,94,95,3,60,30,0,95,96,5,7,0,0,96,102, + 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,5,30,669,8,30, + 10,30,12,30,672,9,30,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,33,1,33,1,33,1,33,3,33,692,8,33,1,34,1,34,1,34,1, + 34,1,34,1,34,1,34,1,34,1,34,1,34,3,34,704,8,34,1,34,1,34,1,34,1,34,1,34, + 1,34,1,34,1,34,1,34,1,34,3,34,716,8,34,1,34,1,34,1,34,1,34,1,34,1,34,1, + 34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,5,34, + 738,8,34,10,34,12,34,741,9,34,1,34,2,151,158,2,60,68,35,0,2,4,6,8,10,12, + 14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60, + 62,64,66,68,0,11,1,0,31,43,1,0,15,16,1,0,63,64,2,0,57,57,59,59,1,0,25,26, + 1,0,57,60,1,0,47,48,1,0,1,2,1,0,78,79,1,0,92,93,2,0,83,83,85,85,841,0,87, + 1,0,0,0,2,101,1,0,0,0,4,119,1,0,0,0,6,151,1,0,0,0,8,165,1,0,0,0,10,168, + 1,0,0,0,12,175,1,0,0,0,14,181,1,0,0,0,16,186,1,0,0,0,18,193,1,0,0,0,20, + 198,1,0,0,0,22,203,1,0,0,0,24,209,1,0,0,0,26,224,1,0,0,0,28,231,1,0,0,0, + 30,245,1,0,0,0,32,268,1,0,0,0,34,293,1,0,0,0,36,312,1,0,0,0,38,340,1,0, + 0,0,40,394,1,0,0,0,42,398,1,0,0,0,44,400,1,0,0,0,46,407,1,0,0,0,48,413, + 1,0,0,0,50,420,1,0,0,0,52,424,1,0,0,0,54,430,1,0,0,0,56,438,1,0,0,0,58, + 461,1,0,0,0,60,604,1,0,0,0,62,673,1,0,0,0,64,677,1,0,0,0,66,691,1,0,0,0, + 68,715,1,0,0,0,70,88,3,14,7,0,71,88,3,16,8,0,72,88,3,18,9,0,73,88,3,20, + 10,0,74,88,3,22,11,0,75,88,3,62,31,0,76,88,3,10,5,0,77,88,3,8,4,0,78,88, + 3,44,22,0,79,88,3,46,23,0,80,88,3,48,24,0,81,88,3,60,30,0,82,88,3,42,21, + 0,83,88,3,24,12,0,84,88,3,6,3,0,85,88,3,2,1,0,86,88,3,4,2,0,87,70,1,0,0, + 0,87,71,1,0,0,0,87,72,1,0,0,0,87,73,1,0,0,0,87,74,1,0,0,0,87,75,1,0,0,0, + 87,76,1,0,0,0,87,77,1,0,0,0,87,78,1,0,0,0,87,79,1,0,0,0,87,80,1,0,0,0,87, + 81,1,0,0,0,87,82,1,0,0,0,87,83,1,0,0,0,87,84,1,0,0,0,87,85,1,0,0,0,87,86, + 1,0,0,0,87,88,1,0,0,0,88,89,1,0,0,0,89,90,5,0,0,1,90,1,1,0,0,0,91,92,5, + 6,0,0,92,93,3,60,30,0,93,94,5,61,0,0,94,95,3,60,30,0,95,96,5,7,0,0,96,102, 1,0,0,0,97,98,3,60,30,0,98,99,5,61,0,0,99,100,3,60,30,0,100,102,1,0,0,0, 101,91,1,0,0,0,101,97,1,0,0,0,102,104,1,0,0,0,103,105,5,30,0,0,104,103, 1,0,0,0,104,105,1,0,0,0,105,106,1,0,0,0,106,117,5,56,0,0,107,108,5,6,0, @@ -3731,88 +3740,89 @@ export default class LatexParser extends Parser { 462,463,1,0,0,0,463,464,5,6,0,0,464,469,3,60,30,0,465,466,5,61,0,0,466, 468,3,60,30,0,467,465,1,0,0,0,468,471,1,0,0,0,469,467,1,0,0,0,469,470,1, 0,0,0,470,472,1,0,0,0,471,469,1,0,0,0,472,473,5,7,0,0,473,59,1,0,0,0,474, - 475,6,30,-1,0,475,476,3,8,4,0,476,477,5,71,0,0,477,604,1,0,0,0,478,479, - 3,8,4,0,479,480,7,2,0,0,480,481,5,70,0,0,481,604,1,0,0,0,482,483,3,8,4, + 475,6,30,-1,0,475,476,3,8,4,0,476,477,5,71,0,0,477,605,1,0,0,0,478,479, + 3,8,4,0,479,480,7,2,0,0,480,481,5,70,0,0,481,605,1,0,0,0,482,483,3,8,4, 0,483,484,5,55,0,0,484,485,5,4,0,0,485,486,3,60,30,0,486,487,5,5,0,0,487, - 488,5,70,0,0,488,604,1,0,0,0,489,604,5,24,0,0,490,491,5,23,0,0,491,492, - 5,4,0,0,492,493,3,60,30,0,493,494,5,5,0,0,494,604,1,0,0,0,495,496,5,66, + 488,5,70,0,0,488,605,1,0,0,0,489,605,5,24,0,0,490,491,5,23,0,0,491,492, + 5,4,0,0,492,493,3,60,30,0,493,494,5,5,0,0,494,605,1,0,0,0,495,496,5,66, 0,0,496,501,3,54,27,0,497,498,5,69,0,0,498,500,3,54,27,0,499,497,1,0,0, 0,500,503,1,0,0,0,501,499,1,0,0,0,501,502,1,0,0,0,502,504,1,0,0,0,503,501, - 1,0,0,0,504,505,5,67,0,0,505,604,1,0,0,0,506,604,3,28,14,0,507,604,3,30, - 15,0,508,604,3,32,16,0,509,604,3,36,18,0,510,604,3,38,19,0,511,513,5,29, - 0,0,512,511,1,0,0,0,512,513,1,0,0,0,513,514,1,0,0,0,514,515,5,44,0,0,515, - 516,5,6,0,0,516,517,3,60,30,0,517,518,5,7,0,0,518,604,1,0,0,0,519,521,5, - 29,0,0,520,519,1,0,0,0,520,521,1,0,0,0,521,522,1,0,0,0,522,523,5,45,0,0, - 523,524,5,6,0,0,524,525,3,60,30,0,525,526,5,7,0,0,526,604,1,0,0,0,527,528, - 5,46,0,0,528,529,5,4,0,0,529,530,3,60,30,0,530,531,5,5,0,0,531,532,5,6, - 0,0,532,533,3,60,30,0,533,534,5,7,0,0,534,604,1,0,0,0,535,536,7,6,0,0,536, - 537,5,6,0,0,537,538,3,60,30,0,538,539,5,7,0,0,539,604,1,0,0,0,540,541,5, - 9,0,0,541,542,3,60,30,0,542,543,5,9,0,0,543,604,1,0,0,0,544,545,5,8,0,0, - 545,546,3,60,30,0,546,547,5,8,0,0,547,604,1,0,0,0,548,604,3,12,6,0,549, - 604,3,10,5,0,550,551,5,54,0,0,551,604,3,60,30,30,552,553,5,19,0,0,553,554, - 5,4,0,0,554,555,3,60,30,0,555,556,5,5,0,0,556,557,5,4,0,0,557,558,3,60, - 30,0,558,559,5,5,0,0,559,604,1,0,0,0,560,604,5,20,0,0,561,604,3,8,4,0,562, - 604,3,56,28,0,563,604,3,58,29,0,564,604,5,12,0,0,565,566,5,6,0,0,566,567, - 3,60,30,0,567,568,5,7,0,0,568,604,1,0,0,0,569,570,3,10,5,0,570,571,3,60, - 30,12,571,604,1,0,0,0,572,573,3,12,6,0,573,574,3,60,30,11,574,604,1,0,0, - 0,575,576,5,12,0,0,576,604,3,60,30,10,577,580,5,27,0,0,578,579,5,4,0,0, - 579,581,5,5,0,0,580,578,1,0,0,0,580,581,1,0,0,0,581,604,1,0,0,0,582,583, - 5,18,0,0,583,584,5,4,0,0,584,585,3,60,30,0,585,586,5,5,0,0,586,588,1,0, - 0,0,587,582,1,0,0,0,587,588,1,0,0,0,588,592,1,0,0,0,589,593,5,62,0,0,590, - 593,3,10,5,0,591,593,5,56,0,0,592,589,1,0,0,0,592,590,1,0,0,0,592,591,1, - 0,0,0,592,593,1,0,0,0,593,594,1,0,0,0,594,595,5,18,0,0,595,596,5,4,0,0, - 596,597,3,60,30,0,597,601,5,5,0,0,598,602,5,62,0,0,599,602,3,10,5,0,600, - 602,5,56,0,0,601,598,1,0,0,0,601,599,1,0,0,0,601,600,1,0,0,0,601,602,1, - 0,0,0,602,604,1,0,0,0,603,474,1,0,0,0,603,478,1,0,0,0,603,482,1,0,0,0,603, - 489,1,0,0,0,603,490,1,0,0,0,603,495,1,0,0,0,603,506,1,0,0,0,603,507,1,0, - 0,0,603,508,1,0,0,0,603,509,1,0,0,0,603,510,1,0,0,0,603,512,1,0,0,0,603, - 520,1,0,0,0,603,527,1,0,0,0,603,535,1,0,0,0,603,540,1,0,0,0,603,544,1,0, - 0,0,603,548,1,0,0,0,603,549,1,0,0,0,603,550,1,0,0,0,603,552,1,0,0,0,603, - 560,1,0,0,0,603,561,1,0,0,0,603,562,1,0,0,0,603,563,1,0,0,0,603,564,1,0, - 0,0,603,565,1,0,0,0,603,569,1,0,0,0,603,572,1,0,0,0,603,575,1,0,0,0,603, - 577,1,0,0,0,603,587,1,0,0,0,604,669,1,0,0,0,605,606,10,29,0,0,606,607,5, - 22,0,0,607,668,3,60,30,30,608,609,10,28,0,0,609,610,5,21,0,0,610,668,3, - 60,30,29,611,612,10,25,0,0,612,613,5,54,0,0,613,668,3,60,30,26,614,615, - 10,24,0,0,615,616,5,53,0,0,616,668,3,60,30,25,617,618,10,51,0,0,618,668, - 7,2,0,0,619,620,10,50,0,0,620,621,5,55,0,0,621,622,5,4,0,0,622,623,3,60, - 30,0,623,624,5,5,0,0,624,668,1,0,0,0,625,626,10,49,0,0,626,627,5,10,0,0, - 627,628,5,4,0,0,628,629,3,60,30,0,629,630,5,61,0,0,630,631,3,60,30,0,631, - 632,5,5,0,0,632,668,1,0,0,0,633,634,10,48,0,0,634,668,5,28,0,0,635,636, - 10,47,0,0,636,668,5,11,0,0,637,638,10,18,0,0,638,639,5,10,0,0,639,640,5, - 4,0,0,640,668,5,5,0,0,641,642,10,17,0,0,642,643,5,55,0,0,643,644,5,4,0, - 0,644,668,5,5,0,0,645,646,10,16,0,0,646,668,3,8,4,0,647,648,10,15,0,0,648, - 668,3,10,5,0,649,650,10,14,0,0,650,668,3,12,6,0,651,652,10,13,0,0,652,668, - 5,12,0,0,653,654,10,9,0,0,654,668,3,56,28,0,655,656,10,8,0,0,656,668,3, - 58,29,0,657,658,10,7,0,0,658,668,3,28,14,0,659,660,10,6,0,0,660,668,3,30, - 15,0,661,662,10,5,0,0,662,668,3,32,16,0,663,664,10,4,0,0,664,668,3,36,18, - 0,665,666,10,3,0,0,666,668,3,38,19,0,667,605,1,0,0,0,667,608,1,0,0,0,667, - 611,1,0,0,0,667,614,1,0,0,0,667,617,1,0,0,0,667,619,1,0,0,0,667,625,1,0, - 0,0,667,633,1,0,0,0,667,635,1,0,0,0,667,637,1,0,0,0,667,641,1,0,0,0,667, - 645,1,0,0,0,667,647,1,0,0,0,667,649,1,0,0,0,667,651,1,0,0,0,667,653,1,0, - 0,0,667,655,1,0,0,0,667,657,1,0,0,0,667,659,1,0,0,0,667,661,1,0,0,0,667, - 663,1,0,0,0,667,665,1,0,0,0,668,671,1,0,0,0,669,667,1,0,0,0,669,670,1,0, - 0,0,670,61,1,0,0,0,671,669,1,0,0,0,672,673,7,7,0,0,673,674,3,68,34,0,674, - 675,7,8,0,0,675,63,1,0,0,0,676,677,7,7,0,0,677,678,7,9,0,0,678,679,7,10, - 0,0,679,680,7,9,0,0,680,681,7,8,0,0,681,65,1,0,0,0,682,683,5,80,0,0,683, - 684,5,90,0,0,684,685,7,9,0,0,685,686,5,91,0,0,686,687,5,90,0,0,687,688, - 5,93,0,0,688,691,5,91,0,0,689,691,5,81,0,0,690,682,1,0,0,0,690,689,1,0, - 0,0,691,67,1,0,0,0,692,693,6,34,-1,0,693,694,5,84,0,0,694,695,5,90,0,0, - 695,696,3,60,30,0,696,697,5,91,0,0,697,715,1,0,0,0,698,699,5,80,0,0,699, - 702,5,90,0,0,700,703,3,68,34,0,701,703,5,92,0,0,702,700,1,0,0,0,702,701, - 1,0,0,0,703,704,1,0,0,0,704,705,5,91,0,0,705,706,5,90,0,0,706,707,3,68, - 34,0,707,708,5,91,0,0,708,715,1,0,0,0,709,715,5,87,0,0,710,711,5,88,0,0, - 711,712,3,68,34,0,712,713,5,89,0,0,713,715,1,0,0,0,714,692,1,0,0,0,714, - 698,1,0,0,0,714,709,1,0,0,0,714,710,1,0,0,0,715,738,1,0,0,0,716,717,10, - 4,0,0,717,718,5,82,0,0,718,737,3,68,34,5,719,720,10,9,0,0,720,721,5,86, - 0,0,721,737,5,93,0,0,722,723,10,8,0,0,723,724,5,86,0,0,724,725,5,90,0,0, - 725,726,5,93,0,0,726,737,5,91,0,0,727,728,10,7,0,0,728,729,5,86,0,0,729, - 737,3,66,33,0,730,731,10,6,0,0,731,732,5,86,0,0,732,733,5,90,0,0,733,734, - 3,66,33,0,734,735,5,91,0,0,735,737,1,0,0,0,736,716,1,0,0,0,736,719,1,0, - 0,0,736,722,1,0,0,0,736,727,1,0,0,0,736,730,1,0,0,0,737,740,1,0,0,0,738, - 736,1,0,0,0,738,739,1,0,0,0,739,69,1,0,0,0,740,738,1,0,0,0,55,87,101,104, - 117,133,146,151,158,163,168,175,181,191,196,201,209,219,231,245,256,268, - 276,287,306,320,330,348,356,366,377,394,398,405,411,418,435,445,453,461, - 469,501,512,520,580,587,592,601,603,667,669,690,702,714,736,738]; + 1,0,0,0,504,505,5,67,0,0,505,605,1,0,0,0,506,605,3,28,14,0,507,605,3,30, + 15,0,508,605,3,32,16,0,509,605,3,36,18,0,510,605,3,38,19,0,511,605,3,34, + 17,0,512,514,5,29,0,0,513,512,1,0,0,0,513,514,1,0,0,0,514,515,1,0,0,0,515, + 516,5,44,0,0,516,517,5,6,0,0,517,518,3,60,30,0,518,519,5,7,0,0,519,605, + 1,0,0,0,520,522,5,29,0,0,521,520,1,0,0,0,521,522,1,0,0,0,522,523,1,0,0, + 0,523,524,5,45,0,0,524,525,5,6,0,0,525,526,3,60,30,0,526,527,5,7,0,0,527, + 605,1,0,0,0,528,529,5,46,0,0,529,530,5,4,0,0,530,531,3,60,30,0,531,532, + 5,5,0,0,532,533,5,6,0,0,533,534,3,60,30,0,534,535,5,7,0,0,535,605,1,0,0, + 0,536,537,7,6,0,0,537,538,5,6,0,0,538,539,3,60,30,0,539,540,5,7,0,0,540, + 605,1,0,0,0,541,542,5,9,0,0,542,543,3,60,30,0,543,544,5,9,0,0,544,605,1, + 0,0,0,545,546,5,8,0,0,546,547,3,60,30,0,547,548,5,8,0,0,548,605,1,0,0,0, + 549,605,3,12,6,0,550,605,3,10,5,0,551,552,5,54,0,0,552,605,3,60,30,30,553, + 554,5,19,0,0,554,555,5,4,0,0,555,556,3,60,30,0,556,557,5,5,0,0,557,558, + 5,4,0,0,558,559,3,60,30,0,559,560,5,5,0,0,560,605,1,0,0,0,561,605,5,20, + 0,0,562,605,3,8,4,0,563,605,3,56,28,0,564,605,3,58,29,0,565,605,5,12,0, + 0,566,567,5,6,0,0,567,568,3,60,30,0,568,569,5,7,0,0,569,605,1,0,0,0,570, + 571,3,10,5,0,571,572,3,60,30,12,572,605,1,0,0,0,573,574,3,12,6,0,574,575, + 3,60,30,11,575,605,1,0,0,0,576,577,5,12,0,0,577,605,3,60,30,10,578,581, + 5,27,0,0,579,580,5,4,0,0,580,582,5,5,0,0,581,579,1,0,0,0,581,582,1,0,0, + 0,582,605,1,0,0,0,583,584,5,18,0,0,584,585,5,4,0,0,585,586,3,60,30,0,586, + 587,5,5,0,0,587,589,1,0,0,0,588,583,1,0,0,0,588,589,1,0,0,0,589,593,1,0, + 0,0,590,594,5,62,0,0,591,594,3,10,5,0,592,594,5,56,0,0,593,590,1,0,0,0, + 593,591,1,0,0,0,593,592,1,0,0,0,593,594,1,0,0,0,594,595,1,0,0,0,595,596, + 5,18,0,0,596,597,5,4,0,0,597,598,3,60,30,0,598,602,5,5,0,0,599,603,5,62, + 0,0,600,603,3,10,5,0,601,603,5,56,0,0,602,599,1,0,0,0,602,600,1,0,0,0,602, + 601,1,0,0,0,602,603,1,0,0,0,603,605,1,0,0,0,604,474,1,0,0,0,604,478,1,0, + 0,0,604,482,1,0,0,0,604,489,1,0,0,0,604,490,1,0,0,0,604,495,1,0,0,0,604, + 506,1,0,0,0,604,507,1,0,0,0,604,508,1,0,0,0,604,509,1,0,0,0,604,510,1,0, + 0,0,604,511,1,0,0,0,604,513,1,0,0,0,604,521,1,0,0,0,604,528,1,0,0,0,604, + 536,1,0,0,0,604,541,1,0,0,0,604,545,1,0,0,0,604,549,1,0,0,0,604,550,1,0, + 0,0,604,551,1,0,0,0,604,553,1,0,0,0,604,561,1,0,0,0,604,562,1,0,0,0,604, + 563,1,0,0,0,604,564,1,0,0,0,604,565,1,0,0,0,604,566,1,0,0,0,604,570,1,0, + 0,0,604,573,1,0,0,0,604,576,1,0,0,0,604,578,1,0,0,0,604,588,1,0,0,0,605, + 670,1,0,0,0,606,607,10,29,0,0,607,608,5,22,0,0,608,669,3,60,30,30,609,610, + 10,28,0,0,610,611,5,21,0,0,611,669,3,60,30,29,612,613,10,25,0,0,613,614, + 5,54,0,0,614,669,3,60,30,26,615,616,10,24,0,0,616,617,5,53,0,0,617,669, + 3,60,30,25,618,619,10,52,0,0,619,669,7,2,0,0,620,621,10,51,0,0,621,622, + 5,55,0,0,622,623,5,4,0,0,623,624,3,60,30,0,624,625,5,5,0,0,625,669,1,0, + 0,0,626,627,10,50,0,0,627,628,5,10,0,0,628,629,5,4,0,0,629,630,3,60,30, + 0,630,631,5,61,0,0,631,632,3,60,30,0,632,633,5,5,0,0,633,669,1,0,0,0,634, + 635,10,49,0,0,635,669,5,28,0,0,636,637,10,48,0,0,637,669,5,11,0,0,638,639, + 10,18,0,0,639,640,5,10,0,0,640,641,5,4,0,0,641,669,5,5,0,0,642,643,10,17, + 0,0,643,644,5,55,0,0,644,645,5,4,0,0,645,669,5,5,0,0,646,647,10,16,0,0, + 647,669,3,8,4,0,648,649,10,15,0,0,649,669,3,10,5,0,650,651,10,14,0,0,651, + 669,3,12,6,0,652,653,10,13,0,0,653,669,5,12,0,0,654,655,10,9,0,0,655,669, + 3,56,28,0,656,657,10,8,0,0,657,669,3,58,29,0,658,659,10,7,0,0,659,669,3, + 28,14,0,660,661,10,6,0,0,661,669,3,30,15,0,662,663,10,5,0,0,663,669,3,32, + 16,0,664,665,10,4,0,0,665,669,3,36,18,0,666,667,10,3,0,0,667,669,3,38,19, + 0,668,606,1,0,0,0,668,609,1,0,0,0,668,612,1,0,0,0,668,615,1,0,0,0,668,618, + 1,0,0,0,668,620,1,0,0,0,668,626,1,0,0,0,668,634,1,0,0,0,668,636,1,0,0,0, + 668,638,1,0,0,0,668,642,1,0,0,0,668,646,1,0,0,0,668,648,1,0,0,0,668,650, + 1,0,0,0,668,652,1,0,0,0,668,654,1,0,0,0,668,656,1,0,0,0,668,658,1,0,0,0, + 668,660,1,0,0,0,668,662,1,0,0,0,668,664,1,0,0,0,668,666,1,0,0,0,669,672, + 1,0,0,0,670,668,1,0,0,0,670,671,1,0,0,0,671,61,1,0,0,0,672,670,1,0,0,0, + 673,674,7,7,0,0,674,675,3,68,34,0,675,676,7,8,0,0,676,63,1,0,0,0,677,678, + 7,7,0,0,678,679,7,9,0,0,679,680,7,10,0,0,680,681,7,9,0,0,681,682,7,8,0, + 0,682,65,1,0,0,0,683,684,5,80,0,0,684,685,5,90,0,0,685,686,7,9,0,0,686, + 687,5,91,0,0,687,688,5,90,0,0,688,689,5,93,0,0,689,692,5,91,0,0,690,692, + 5,81,0,0,691,683,1,0,0,0,691,690,1,0,0,0,692,67,1,0,0,0,693,694,6,34,-1, + 0,694,695,5,84,0,0,695,696,5,90,0,0,696,697,3,60,30,0,697,698,5,91,0,0, + 698,716,1,0,0,0,699,700,5,80,0,0,700,703,5,90,0,0,701,704,3,68,34,0,702, + 704,5,92,0,0,703,701,1,0,0,0,703,702,1,0,0,0,704,705,1,0,0,0,705,706,5, + 91,0,0,706,707,5,90,0,0,707,708,3,68,34,0,708,709,5,91,0,0,709,716,1,0, + 0,0,710,716,5,87,0,0,711,712,5,88,0,0,712,713,3,68,34,0,713,714,5,89,0, + 0,714,716,1,0,0,0,715,693,1,0,0,0,715,699,1,0,0,0,715,710,1,0,0,0,715,711, + 1,0,0,0,716,739,1,0,0,0,717,718,10,4,0,0,718,719,5,82,0,0,719,738,3,68, + 34,5,720,721,10,9,0,0,721,722,5,86,0,0,722,738,5,93,0,0,723,724,10,8,0, + 0,724,725,5,86,0,0,725,726,5,90,0,0,726,727,5,93,0,0,727,738,5,91,0,0,728, + 729,10,7,0,0,729,730,5,86,0,0,730,738,3,66,33,0,731,732,10,6,0,0,732,733, + 5,86,0,0,733,734,5,90,0,0,734,735,3,66,33,0,735,736,5,91,0,0,736,738,1, + 0,0,0,737,717,1,0,0,0,737,720,1,0,0,0,737,723,1,0,0,0,737,728,1,0,0,0,737, + 731,1,0,0,0,738,741,1,0,0,0,739,737,1,0,0,0,739,740,1,0,0,0,740,69,1,0, + 0,0,741,739,1,0,0,0,55,87,101,104,117,133,146,151,158,163,168,175,181,191, + 196,201,209,219,231,245,256,268,276,287,306,320,330,348,356,366,377,394, + 398,405,411,418,435,445,453,461,469,501,513,521,581,588,593,602,604,668, + 670,691,703,715,737,739]; private static __ATN: ATN; public static get _ATN(): ATN { @@ -5478,6 +5488,23 @@ export class SubExprContext extends ExprContext { } } } +export class SummationContext extends ExprContext { + constructor(parser: LatexParser, ctx: ExprContext) { + super(parser, ctx.parentCtx, ctx.invokingState); + super.copyFrom(ctx); + } + public summation_cmd(): Summation_cmdContext { + return this.getTypedRuleContext(Summation_cmdContext, 0) as Summation_cmdContext; + } + // @Override + public accept(visitor: LatexParserVisitor): Result { + if (visitor.visitSummation) { + return visitor.visitSummation(this); + } else { + return visitor.visitChildren(this); + } + } +} export class NormContext extends ExprContext { constructor(parser: LatexParser, ctx: ExprContext) { super(parser, ctx.parentCtx, ctx.invokingState); diff --git a/src/parser/LatexParserVisitor.ts b/src/parser/LatexParserVisitor.ts index 9f3596ed..73779d52 100644 --- a/src/parser/LatexParserVisitor.ts +++ b/src/parser/LatexParserVisitor.ts @@ -46,6 +46,7 @@ import { DerivativeContext } from "./LatexParser"; import { UserFunctionContext } from "./LatexParser"; import { MatrixContext } from "./LatexParser"; import { SubExprContext } from "./LatexParser"; +import { SummationContext } from "./LatexParser"; import { NormContext } from "./LatexParser"; import { EmptyPlaceholderContext } from "./LatexParser"; import { SqrtContext } from "./LatexParser"; @@ -355,6 +356,13 @@ export default class LatexParserVisitor extends ParseTreeVisitor * @return the visitor result */ visitSubExpr?: (ctx: SubExprContext) => Result; + /** + * Visit a parse tree produced by the `summation` + * labeled alternative in `LatexParser.expr`. + * @param ctx the parse tree + * @return the visitor result + */ + visitSummation?: (ctx: SummationContext) => Result; /** * Visit a parse tree produced by the `norm` * labeled alternative in `LatexParser.expr`. diff --git a/src/parser/LatexToSympy.ts b/src/parser/LatexToSympy.ts index edd7d2d3..2697392e 100644 --- a/src/parser/LatexToSympy.ts +++ b/src/parser/LatexToSympy.ts @@ -33,6 +33,7 @@ import { type IndefiniteIntegralContext, type Indefinite_integral_cmdContext, type Integral_cmdContext, type IntegralContext, type DerivativeContext, type Derivative_cmdContext, type NDerivativeContext, type N_derivative_cmdContext, + type Summation_cmdContext, type SummationContext, type TrigFunctionContext, type UnitExponentContext, type UnitFractionalExponentContext, type SqrtContext, type LnContext, type LogContext, type AbsContext, type UnaryMinusContext, type BaseLogContext, type UnitSqrtContext, type MultiplyContext, Number_with_unitsContext, type UnitMultiplyContext, @@ -1810,6 +1811,43 @@ export class LatexToSympy extends LatexParserVisitor { + const child = ctx.children[0] as Summation_cmdContext; + + const dummyVariable = this.visitId(child.id()); + + this.currentDummyVars.add(dummyVariable); + const operand: string = this.visit(child._operand_expr) as string; + this.currentDummyVars.delete(dummyVariable); + + const start = this.visit(child._start_expr) as string; + + let end: string; + + if (child._end_expr) { + end = this.visit(child._end_expr) as string; + } else if (child.CARET_SINGLE_CHAR_ID()) { + end = this.mapVariableNames(child.CARET_SINGLE_CHAR_ID().toString()[1]); + this.params.push(end); + + if (this.inQueryStatement && !this.currentDummyVars.has(end)) { + this.subQueryReplacements.push([end, + { + type: "replacement", + location: child.CARET_SINGLE_CHAR_ID().symbol.start+1, + deletionLength: 1, + text: `{${end}}` + }]); + + this.addSubQuery(end); + } + } else { + end = child.CARET_SINGLE_CHAR_NUMBER().toString()[1]; + } + + return `_summation(Subs(${operand}, ${dummyVariable}, ${dummyVariable}__dummy_var), ${dummyVariable}__dummy_var, ${start}, ${end})`; + } + visitTrigFunction = (ctx: TrigFunctionContext) => { let trigFunctionName; From 507dea8d1f2c575e24777362d3040da009f02779 Mon Sep 17 00:00:00 2001 From: mgreminger Date: Fri, 25 Oct 2024 16:41:20 -0500 Subject: [PATCH 4/9] fix: make matrix indexing symbolic when not numeric so that summation with matrices works Tests need to be added for summation with matrices --- public/dimensional_analysis.py | 4 ++-- src/constants.ts | 2 +- tests/test_matrix_indexing.spec.mjs | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/public/dimensional_analysis.py b/public/dimensional_analysis.py index 16250180..d7e93cbd 100644 --- a/public/dimensional_analysis.py +++ b/public/dimensional_analysis.py @@ -1123,8 +1123,8 @@ def UniversalInverse(expression: Expr) -> Expr: def IndexMatrix(expression: Expr, i: Expr, j: Expr) -> Expr: for subscript in cast(list[ExprWithAssumptions], (i,j)): - if not (subscript.is_real and subscript.is_finite and subscript.is_integer and cast(int, subscript) > 0): - raise Exception("Matrix indices must evaluate to a finite real integer and be greater than 0") + if subscript.is_real and cast(int, subscript) <= 0: + raise Exception("Matrix indices must be greater than 0") return expression[i-1, j-1] # type: ignore diff --git a/src/constants.ts b/src/constants.ts index 9dbb9d10..eb96b092 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -6,7 +6,7 @@ export const INLINE_SHORTCUTS = { '~': '\\approx', 'sqrt': '\\sqrt{#?}', '$int': '\\int _{#?}^{#?}\\left(#?\\right)\\mathrm{d}\\left(#?\\right)', - '$sum': '\\sum_{#?=#?}^{#?}\left(#?\\right)', + '$sum': '\\sum_{#?=#?}^{#?}\\left(#?\\right)', '$prime': '\\frac{\\mathrm{d}}{\\mathrm{d}\\left(#?\\right)}\\left(#?\\right)', '$doubleprime': '\\frac{\\mathrm{d}^{2}}{\\mathrm{d}\\left(#?\\right)^{2}}\\left(#?\\right)', '$tripleprime': '\\frac{\\mathrm{d}^{3}}{\\mathrm{d}\\left(#?\\right)^{3}}\\left(#?\\right)', diff --git a/tests/test_matrix_indexing.spec.mjs b/tests/test_matrix_indexing.spec.mjs index 098cdc08..18aa6548 100644 --- a/tests/test_matrix_indexing.spec.mjs +++ b/tests/test_matrix_indexing.spec.mjs @@ -81,7 +81,7 @@ test('Zero index', async () => { await page.waitForSelector('text=Updating...', {state: 'detached'}); - await expect(page.locator("text=Matrix indices must evaluate to a finite real integer and be greater than 0")).toBeVisible(); + await expect(page.locator("text=Matrix indices must be greater than 0")).toBeVisible(); }); test('Negative index', async () => { @@ -89,7 +89,7 @@ test('Negative index', async () => { await page.waitForSelector('text=Updating...', {state: 'detached'}); - await expect(page.locator("text=Matrix indices must evaluate to a finite real integer and be greater than 0")).toBeVisible(); + await expect(page.locator("text=Matrix indices must be greater than 0")).toBeVisible(); }); test('Out of range index', async () => { @@ -105,7 +105,7 @@ test('Noninteger index', async () => { await page.waitForSelector('text=Updating...', {state: 'detached'}); - await expect(page.locator("text=Matrix indices must evaluate to a finite real integer and be greater than 0")).toBeVisible(); + await expect(page.locator("text=IndexError, Invalid index")).toBeVisible(); }); test('Nonnumeric index', async () => { @@ -113,7 +113,8 @@ test('Nonnumeric index', async () => { await page.waitForSelector('text=Updating...', {state: 'detached'}); - await expect(page.locator("text=Matrix indices must evaluate to a finite real integer and be greater than 0")).toBeVisible(); + let content = await page.textContent('#result-value-0'); + expect(content).toBe(String.raw`\left[\begin{matrix}a & b\\c & d\\e & f\end{matrix}\right]_{0, z - 1}`); }); test('Indexing with expression', async () => { From 501b181a2808d1e85afe81e0ec1f61ad42d02980 Mon Sep 17 00:00:00 2001 From: mgreminger Date: Sat, 26 Oct 2024 15:55:21 -0500 Subject: [PATCH 5/9] fix: fix some factorial rendering issues by using SymPy's factorial function directly. Update tests for changed behavior for floating point negative inputs to factorial function. This change will also allow SymPy to more easily simplify expressions that used factorials --- public/dimensional_analysis.py | 27 +++++++-------------------- tests/test_basic.spec.mjs | 10 +++++++--- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/public/dimensional_analysis.py b/public/dimensional_analysis.py index d7e93cbd..5d66b1a2 100644 --- a/public/dimensional_analysis.py +++ b/public/dimensional_analysis.py @@ -1128,27 +1128,14 @@ def IndexMatrix(expression: Expr, i: Expr, j: Expr) -> Expr: return expression[i-1, j-1] # type: ignore -class CustomFactorial(Function): - is_real = True - @staticmethod - def _imp_(arg1: float): - if arg1.is_integer() and arg1 >= 0.0: - return math.factorial(int(arg1)) - else: - raise ValueError("The factorial function can only be evaluated on a nonnegative integer") - - def _eval_evalf(self, prec): - if self.args[0].is_number: - if not (self.args[0].is_real and - cast(ExprWithAssumptions, self.args[0]).is_finite and - cast(ExprWithAssumptions, self.args[0]).is_integer and - cast(int, self.args[0]) >= 0): - raise ValueError("The factorial function can only be evaluated on a nonnegative integer") - return factorial(self.args[0])._eval_evalf(prec) # type: ignore +def _factorial_imp_(arg1: float): + if arg1.is_integer() and arg1 >= 0.0: + return math.factorial(int(arg1)) + else: + raise ValueError("The factorial function can only be evaluated on a nonnegative integer") - def _latex(self, printer): - return rf"\left({printer._print(self.args[0])}\right)!" +factorial._imp_ = staticmethod(_factorial_imp_) # type: ignore def custom_norm(expression: Matrix): return expression.norm() @@ -1493,7 +1480,7 @@ def get_next_id(self): cast(Function, Function('_Derivative')) : {"dim_func": custom_derivative_dims, "sympy_func": custom_derivative}, cast(Function, Function('_Integral')) : {"dim_func": custom_integral_dims, "sympy_func": custom_integral}, cast(Function, Function('_range')) : {"dim_func": custom_range, "sympy_func": custom_range}, - cast(Function, Function('_factorial')) : {"dim_func": factorial, "sympy_func": CustomFactorial}, + cast(Function, Function('_factorial')) : {"dim_func": factorial, "sympy_func": factorial}, cast(Function, Function('_summation')) : {"dim_func": custom_summation, "sympy_func": custom_summation}, } diff --git a/tests/test_basic.spec.mjs b/tests/test_basic.spec.mjs index 7057420e..ffe23256 100644 --- a/tests/test_basic.spec.mjs +++ b/tests/test_basic.spec.mjs @@ -1764,7 +1764,7 @@ test('Test factorial function', async () => { expect(content).toBe(''); content = await page.textContent('#result-value-6'); - expect(content).toBe(String.raw`\left(a\right)!`); + expect(content).toBe('a!'); content = await page.textContent('#result-units-6'); expect(content).toBe(''); @@ -1784,7 +1784,10 @@ test('Test factorial error check for non integer input', async () => { await page.waitForSelector('text=Updating...', {state: 'detached'}); - await expect(page.locator('text=The factorial function can only be evaluated on a nonnegative integer')).toBeVisible(); + let content = await page.textContent('#result-value-0'); + expect(parseLatexFloat(content)).toBeCloseTo(1.04648584685356, precision); + content = await page.textContent('#result-units-0'); + expect(content).toBe(''); }); test('Test factorial error check for negative input', async () => { @@ -1792,7 +1795,8 @@ test('Test factorial error check for negative input', async () => { await page.waitForSelector('text=Updating...', {state: 'detached'}); - await expect(page.locator('text=The factorial function can only be evaluated on a nonnegative integer')).toBeVisible(); + let content = await page.textContent('#result-value-0'); + expect(content).toBe(String.raw`\tilde{\infty}`); }); test('Test factorial error check for input with units', async () => { From 56496f7d03f850714eecb4ea7d2be7e1df2156da Mon Sep 17 00:00:00 2001 From: mgreminger Date: Sat, 26 Oct 2024 19:22:33 -0500 Subject: [PATCH 6/9] feat: implement infinity symbol --- src/constants.ts | 1 + src/parser/LatexLexer.g4 | 2 + src/parser/LatexLexer.ts | 921 ++++++++++++------------ src/parser/LatexParser.g4 | 1 + src/parser/LatexParser.ts | 1157 +++++++++++++++--------------- src/parser/LatexParserVisitor.ts | 8 + src/parser/LatexToSympy.ts | 7 +- 7 files changed, 1075 insertions(+), 1022 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index eb96b092..183ca20d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -6,6 +6,7 @@ export const INLINE_SHORTCUTS = { '~': '\\approx', 'sqrt': '\\sqrt{#?}', '$int': '\\int _{#?}^{#?}\\left(#?\\right)\\mathrm{d}\\left(#?\\right)', + '$inf': '\\infty', '$sum': '\\sum_{#?=#?}^{#?}\\left(#?\\right)', '$prime': '\\frac{\\mathrm{d}}{\\mathrm{d}\\left(#?\\right)}\\left(#?\\right)', '$doubleprime': '\\frac{\\mathrm{d}^{2}}{\\mathrm{d}\\left(#?\\right)^{2}}\\left(#?\\right)', diff --git a/src/parser/LatexLexer.g4 b/src/parser/LatexLexer.g4 index f33f9eea..a7cd66da 100644 --- a/src/parser/LatexLexer.g4 +++ b/src/parser/LatexLexer.g4 @@ -26,6 +26,8 @@ EXCLAMATION: '!' ; PI: '\\pi' ; +INFINITY: '\\infty' ; + CMD_INT: '\\int' ; CMD_INT_UNDERSCORE: '\\int' [ ]* '_' ; CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER: '\\int' [ ]* UNDERSCORE_SINGLE_CHAR_NUMBER ; diff --git a/src/parser/LatexLexer.ts b/src/parser/LatexLexer.ts index 8e116adb..2478f044 100644 --- a/src/parser/LatexLexer.ts +++ b/src/parser/LatexLexer.ts @@ -24,94 +24,95 @@ export default class LatexLexer extends Lexer { public static readonly UNDERSCORE = 10; public static readonly EXCLAMATION = 11; public static readonly PI = 12; - public static readonly CMD_INT = 13; - public static readonly CMD_INT_UNDERSCORE = 14; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 15; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 16; - public static readonly CMD_SUM_UNDERSCORE = 17; - public static readonly CMD_MATHRM = 18; - public static readonly CMD_FRAC = 19; - public static readonly CMD_FRAC_INTS = 20; - public static readonly CMD_CDOT = 21; - public static readonly CMD_TIMES = 22; - public static readonly CMD_SQRT = 23; - public static readonly CMD_SQRT_INT = 24; - public static readonly CMD_SIM = 25; - public static readonly CMD_APPROX = 26; - public static readonly CMD_PLACEHOLDER = 27; - public static readonly TRANSPOSE = 28; - public static readonly BACKSLASH = 29; - public static readonly AS_LINES = 30; - public static readonly CMD_SIN = 31; - public static readonly CMD_COS = 32; - public static readonly CMD_TAN = 33; - public static readonly CMD_COT = 34; - public static readonly CMD_SEC = 35; - public static readonly CMD_CSC = 36; - public static readonly CMD_ARCSIN = 37; - public static readonly CMD_ARCCOS = 38; - public static readonly CMD_ARCTAN = 39; - public static readonly CMD_SINH = 40; - public static readonly CMD_COSH = 41; - public static readonly CMD_TANH = 42; - public static readonly CMD_COTH = 43; - public static readonly CMD_LN = 44; - public static readonly CMD_LOG = 45; - public static readonly CMD_SLASH_LOG_UNDERSCORE = 46; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 47; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 48; - public static readonly COMMENT = 49; - public static readonly CMD_LEFT = 50; - public static readonly CMD_RIGHT = 51; - public static readonly DOUBLE_DOLLAR_SIGN = 52; - public static readonly ADD = 53; - public static readonly SUB = 54; - public static readonly CARET = 55; - public static readonly EQ = 56; - public static readonly LT = 57; - public static readonly GT = 58; - public static readonly LTE = 59; - public static readonly GTE = 60; - public static readonly COMMA = 61; - public static readonly DECIMAL_POINT = 62; - public static readonly CARET_SINGLE_CHAR_NUMBER = 63; - public static readonly CARET_SINGLE_CHAR_ID = 64; - public static readonly NUMBER = 65; - public static readonly BEGIN_MATRIX = 66; - public static readonly END_MATRIX = 67; - public static readonly AMPERSAND = 68; - public static readonly DOUBLE_BACKSLASH = 69; - public static readonly UNDERSCORE_SUBSCRIPT = 70; - public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 71; - public static readonly ID = 72; - public static readonly WS = 73; - public static readonly SLASH_SPACE = 74; - public static readonly SLASH_COLON = 75; - public static readonly NBSP = 76; - public static readonly ERROR_CHAR = 77; - public static readonly R_BRACKET = 78; - public static readonly ALT_R_BRACKET = 79; - public static readonly U_CMD_FRAC = 80; - public static readonly U_CMD_FRAC_INTS = 81; - public static readonly U_CMD_CDOT = 82; - public static readonly U_CMD_TIMES = 83; - public static readonly U_CMD_SQRT = 84; - public static readonly U_COMMA = 85; - public static readonly U_CARET = 86; - public static readonly U_NAME = 87; - public static readonly U_L_PAREN = 88; - public static readonly U_R_PAREN = 89; - public static readonly U_L_BRACE = 90; - public static readonly U_R_BRACE = 91; - public static readonly U_ONE = 92; - public static readonly U_NUMBER = 93; - public static readonly U_CMD_LEFT = 94; - public static readonly U_CMD_RIGHT = 95; - public static readonly U_WS = 96; - public static readonly U_SLASH_SPACE = 97; - public static readonly U_SLASH_COLON = 98; - public static readonly U_NBSP = 99; - public static readonly U_ERROR_CHAR = 100; + public static readonly INFINITY = 13; + public static readonly CMD_INT = 14; + public static readonly CMD_INT_UNDERSCORE = 15; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 16; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 17; + public static readonly CMD_SUM_UNDERSCORE = 18; + public static readonly CMD_MATHRM = 19; + public static readonly CMD_FRAC = 20; + public static readonly CMD_FRAC_INTS = 21; + public static readonly CMD_CDOT = 22; + public static readonly CMD_TIMES = 23; + public static readonly CMD_SQRT = 24; + public static readonly CMD_SQRT_INT = 25; + public static readonly CMD_SIM = 26; + public static readonly CMD_APPROX = 27; + public static readonly CMD_PLACEHOLDER = 28; + public static readonly TRANSPOSE = 29; + public static readonly BACKSLASH = 30; + public static readonly AS_LINES = 31; + public static readonly CMD_SIN = 32; + public static readonly CMD_COS = 33; + public static readonly CMD_TAN = 34; + public static readonly CMD_COT = 35; + public static readonly CMD_SEC = 36; + public static readonly CMD_CSC = 37; + public static readonly CMD_ARCSIN = 38; + public static readonly CMD_ARCCOS = 39; + public static readonly CMD_ARCTAN = 40; + public static readonly CMD_SINH = 41; + public static readonly CMD_COSH = 42; + public static readonly CMD_TANH = 43; + public static readonly CMD_COTH = 44; + public static readonly CMD_LN = 45; + public static readonly CMD_LOG = 46; + public static readonly CMD_SLASH_LOG_UNDERSCORE = 47; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 48; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 49; + public static readonly COMMENT = 50; + public static readonly CMD_LEFT = 51; + public static readonly CMD_RIGHT = 52; + public static readonly DOUBLE_DOLLAR_SIGN = 53; + public static readonly ADD = 54; + public static readonly SUB = 55; + public static readonly CARET = 56; + public static readonly EQ = 57; + public static readonly LT = 58; + public static readonly GT = 59; + public static readonly LTE = 60; + public static readonly GTE = 61; + public static readonly COMMA = 62; + public static readonly DECIMAL_POINT = 63; + public static readonly CARET_SINGLE_CHAR_NUMBER = 64; + public static readonly CARET_SINGLE_CHAR_ID = 65; + public static readonly NUMBER = 66; + public static readonly BEGIN_MATRIX = 67; + public static readonly END_MATRIX = 68; + public static readonly AMPERSAND = 69; + public static readonly DOUBLE_BACKSLASH = 70; + public static readonly UNDERSCORE_SUBSCRIPT = 71; + public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 72; + public static readonly ID = 73; + public static readonly WS = 74; + public static readonly SLASH_SPACE = 75; + public static readonly SLASH_COLON = 76; + public static readonly NBSP = 77; + public static readonly ERROR_CHAR = 78; + public static readonly R_BRACKET = 79; + public static readonly ALT_R_BRACKET = 80; + public static readonly U_CMD_FRAC = 81; + public static readonly U_CMD_FRAC_INTS = 82; + public static readonly U_CMD_CDOT = 83; + public static readonly U_CMD_TIMES = 84; + public static readonly U_CMD_SQRT = 85; + public static readonly U_COMMA = 86; + public static readonly U_CARET = 87; + public static readonly U_NAME = 88; + public static readonly U_L_PAREN = 89; + public static readonly U_R_PAREN = 90; + public static readonly U_L_BRACE = 91; + public static readonly U_R_BRACE = 92; + public static readonly U_ONE = 93; + public static readonly U_NUMBER = 94; + public static readonly U_CMD_LEFT = 95; + public static readonly U_CMD_RIGHT = 96; + public static readonly U_WS = 97; + public static readonly U_SLASH_SPACE = 98; + public static readonly U_SLASH_COLON = 99; + public static readonly U_NBSP = 100; + public static readonly U_ERROR_CHAR = 101; public static readonly EOF = Token.EOF; public static readonly UNITS = 1; @@ -119,15 +120,16 @@ export default class LatexLexer extends Lexer { public static readonly literalNames: string[] = [ null, "'['", "'\\lbrack'", "';'", null, null, null, null, "'|'", null, "'_'", - "'!'", "'\\pi'", "'\\int'", + "'!'", "'\\pi'", "'\\infty'", + "'\\int'", null, null, + null, null, "'\\mathrm'", null, null, null, null, - "'\\mathrm'", null, null, - null, null, null, null, - "'\\sim'", "'\\approx'", - "'\\placeholder'", "'^{\\mathrm{T}}'", - "'\\'", null, "'sin'", - "'cos'", "'tan'", "'cot'", - "'sec'", "'csc'", "'arcsin'", + null, null, "'\\sim'", + "'\\approx'", "'\\placeholder'", + "'^{\\mathrm{T}}'", "'\\'", + null, "'sin'", "'cos'", + "'tan'", "'cot'", "'sec'", + "'csc'", "'arcsin'", "'arccos'", "'arctan'", "'sinh'", "'cosh'", "'tanh'", "'coth'", "'ln'", "'log'", @@ -151,7 +153,8 @@ export default class LatexLexer extends Lexer { "R_BRACE", "L_PAREN", "R_PAREN", "VBAR", "DOUBLE_VBAR", "UNDERSCORE", "EXCLAMATION", - "PI", "CMD_INT", "CMD_INT_UNDERSCORE", + "PI", "INFINITY", "CMD_INT", + "CMD_INT_UNDERSCORE", "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", "CMD_SUM_UNDERSCORE", @@ -203,8 +206,8 @@ export default class LatexLexer extends Lexer { public static readonly ruleNames: string[] = [ "L_BRACKET", "ALT_L_BRACKET", "SEMICOLON", "L_BRACE", "R_BRACE", "L_PAREN", "R_PAREN", "VBAR", "DOUBLE_VBAR", "UNDERSCORE", "UNDERSCORE_SINGLE_CHAR_NUMBER", - "UNDERSCORE_SINGLE_CHAR_ID", "EXCLAMATION", "PI", "CMD_INT", "CMD_INT_UNDERSCORE", - "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", + "UNDERSCORE_SINGLE_CHAR_ID", "EXCLAMATION", "PI", "INFINITY", "CMD_INT", + "CMD_INT_UNDERSCORE", "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", "CMD_SUM_UNDERSCORE", "CMD_MATHRM", "CMD_FRAC", "CMD_FRAC_INTS", "CMD_CDOT", "CMD_TIMES", "CMD_SQRT", "CMD_SQRT_INT", "CMD_SIM", "CMD_APPROX", "CMD_PLACEHOLDER", "TRANSPOSE", "BACKSLASH", "AS_LINES", "CMD_SIN", "CMD_COS", "CMD_TAN", @@ -241,7 +244,7 @@ export default class LatexLexer extends Lexer { public get modeNames(): string[] { return LatexLexer.modeNames; } - public static readonly _serializedATN: number[] = [4,0,100,1107,6,-1,6, + public static readonly _serializedATN: number[] = [4,0,101,1116,6,-1,6, -1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8, 7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15, 2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2, @@ -256,363 +259,367 @@ export default class LatexLexer extends Lexer { 81,7,81,2,82,7,82,2,83,7,83,2,84,7,84,2,85,7,85,2,86,7,86,2,87,7,87,2,88, 7,88,2,89,7,89,2,90,7,90,2,91,7,91,2,92,7,92,2,93,7,93,2,94,7,94,2,95,7, 95,2,96,7,96,2,97,7,97,2,98,7,98,2,99,7,99,2,100,7,100,2,101,7,101,2,102, - 7,102,2,103,7,103,2,104,7,104,2,105,7,105,2,106,7,106,1,0,1,0,1,0,1,0,1, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1, - 6,1,6,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,250,8,8,1,9,1,9,1,10,1,10, - 1,10,1,11,1,11,1,11,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1, - 14,1,15,1,15,1,15,1,15,1,15,1,15,5,15,277,8,15,10,15,12,15,280,9,15,1,15, - 1,15,1,16,1,16,1,16,1,16,1,16,1,16,5,16,290,8,16,10,16,12,16,293,9,16,1, - 16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,5,17,303,8,17,10,17,12,17,306,9,17, - 1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,5,18,316,8,18,10,18,12,18,319,9, - 18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20, - 1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21,5,21,344,8,21,10,21,12,21, - 347,9,21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,1, - 23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25, - 1,25,1,25,5,25,378,8,25,10,25,12,25,381,9,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,27,1,27,1,28,1,28,1,28,1,28,1,28, - 1,28,1,28,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, - 29,1,29,1,29,1,29,1,29,1,29,1,29,1,29,1,30,1,30,1,31,1,31,1,31,1,31,1,31, - 1,31,4,31,433,8,31,11,31,12,31,434,1,31,1,31,1,31,1,31,1,31,1,31,3,31,443, - 8,31,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,35,1, - 35,1,35,1,35,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38, - 1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,39,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,45,1,45,1,45,1,46,1,46,1,46,1, - 46,1,47,1,47,1,47,1,47,1,47,1,47,5,47,523,8,47,10,47,12,47,526,9,47,1,47, - 1,47,1,48,1,48,1,48,1,48,1,48,1,48,5,48,536,8,48,10,48,12,48,539,9,48,1, - 48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,5,49,549,8,49,10,49,12,49,552,9,49, - 1,49,1,49,1,50,1,50,1,50,1,50,1,50,1,50,1,50,1,50,5,50,564,8,50,10,50,12, - 50,567,9,50,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,51,1,51,3,51, - 580,8,51,1,51,1,51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,3,52,592,8,52, - 1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,54,1,54,1,55,1,55,1,56,1,56,1,57,1, - 57,1,58,1,58,1,59,1,59,1,60,1,60,1,60,1,60,1,61,1,61,1,61,1,61,1,62,1,62, - 1,63,1,63,1,64,1,64,1,64,1,65,1,65,1,65,1,66,4,66,632,8,66,11,66,12,66, - 633,1,66,1,66,5,66,638,8,66,10,66,12,66,641,9,66,1,66,3,66,644,8,66,1,66, - 1,66,4,66,648,8,66,11,66,12,66,649,1,66,3,66,653,8,66,1,66,4,66,656,8,66, - 11,66,12,66,657,1,66,3,66,661,8,66,3,66,663,8,66,1,67,1,67,1,68,1,68,5, - 68,669,8,68,10,68,12,68,672,9,68,1,69,1,69,3,69,676,8,69,1,69,4,69,679, - 8,69,11,69,12,69,680,1,69,5,69,684,8,69,10,69,12,69,687,9,69,1,69,1,69, - 3,69,691,8,69,1,69,5,69,694,8,69,10,69,12,69,697,9,69,1,69,1,69,1,69,1, - 69,1,69,1,69,1,69,3,69,706,8,69,1,69,4,69,709,8,69,11,69,12,69,710,1,69, - 1,69,3,69,715,8,69,3,69,717,8,69,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, - 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, - 70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, - 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, - 70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, - 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, - 70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, - 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, - 70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70, - 1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,1, - 70,1,70,3,70,859,8,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, - 1,71,1,71,1,71,1,71,1,71,1,71,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1, - 72,1,72,1,72,1,72,1,72,1,72,1,73,1,73,1,74,1,74,1,74,1,75,5,75,897,8,75, - 10,75,12,75,900,9,75,1,75,1,75,1,75,1,75,4,75,906,8,75,11,75,12,75,907, - 1,75,1,75,5,75,912,8,75,10,75,12,75,915,9,75,1,75,1,75,3,75,919,8,75,3, - 75,921,8,75,1,76,1,76,1,76,1,76,1,77,1,77,3,77,929,8,77,1,77,3,77,932,8, - 77,1,78,4,78,935,8,78,11,78,12,78,936,1,78,1,78,1,79,1,79,1,79,1,79,1,79, - 1,80,1,80,1,80,1,80,1,80,1,81,1,81,1,81,1,81,1,82,1,82,1,83,1,83,1,83,1, - 83,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85, - 1,85,1,85,1,86,1,86,1,86,1,86,1,86,1,86,1,86,5,86,984,8,86,10,86,12,86, - 987,9,86,1,86,1,86,1,86,1,87,1,87,1,87,1,87,1,87,1,87,1,88,1,88,1,88,1, - 88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,89,1,90,1,90,1,91,1,91,1,92, - 1,92,5,92,1017,8,92,10,92,12,92,1020,9,92,1,93,1,93,1,94,1,94,1,95,1,95, - 1,96,1,96,1,97,1,97,1,98,3,98,1033,8,98,1,98,4,98,1036,8,98,11,98,12,98, - 1037,1,98,1,98,5,98,1042,8,98,10,98,12,98,1045,9,98,1,98,3,98,1048,8,98, - 1,98,1,98,4,98,1052,8,98,11,98,12,98,1053,1,98,3,98,1057,8,98,1,98,4,98, - 1060,8,98,11,98,12,98,1061,3,98,1064,8,98,1,99,1,99,1,100,1,100,1,100,1, - 100,1,100,1,100,1,100,1,100,1,101,1,101,1,101,1,101,1,101,1,101,1,101,1, - 101,1,101,1,102,4,102,1086,8,102,11,102,12,102,1087,1,102,1,102,1,103,1, - 103,1,103,1,103,1,103,1,104,1,104,1,104,1,104,1,104,1,105,1,105,1,105,1, - 105,1,106,1,106,1,565,0,107,2,1,4,2,6,3,8,4,10,5,12,6,14,7,16,8,18,9,20, - 10,22,0,24,0,26,11,28,12,30,13,32,14,34,15,36,16,38,17,40,18,42,19,44,20, - 46,21,48,22,50,23,52,24,54,25,56,26,58,27,60,28,62,29,64,30,66,31,68,32, - 70,33,72,34,74,35,76,36,78,37,80,38,82,39,84,40,86,41,88,42,90,43,92,44, - 94,45,96,46,98,47,100,48,102,49,104,50,106,51,108,52,110,53,112,54,114, - 55,116,56,118,57,120,58,122,59,124,60,126,61,128,62,130,63,132,64,134,65, - 136,0,138,0,140,0,142,0,144,66,146,67,148,68,150,69,152,70,154,71,156,72, - 158,73,160,74,162,75,164,76,166,77,168,78,170,79,172,80,174,81,176,82,178, - 83,180,84,182,85,184,86,186,87,188,88,190,89,192,90,194,91,196,92,198,93, - 200,0,202,94,204,95,206,96,208,97,210,98,212,99,214,100,2,0,1,8,1,0,48, - 57,2,0,65,90,97,122,1,0,32,32,1,0,115,115,3,0,48,57,65,90,97,122,2,0,69, - 69,101,101,2,0,43,43,45,45,3,0,9,10,13,13,32,32,1185,0,2,1,0,0,0,0,4,1, - 0,0,0,0,6,1,0,0,0,0,8,1,0,0,0,0,10,1,0,0,0,0,12,1,0,0,0,0,14,1,0,0,0,0, - 16,1,0,0,0,0,18,1,0,0,0,0,20,1,0,0,0,0,26,1,0,0,0,0,28,1,0,0,0,0,30,1,0, - 0,0,0,32,1,0,0,0,0,34,1,0,0,0,0,36,1,0,0,0,0,38,1,0,0,0,0,40,1,0,0,0,0, - 42,1,0,0,0,0,44,1,0,0,0,0,46,1,0,0,0,0,48,1,0,0,0,0,50,1,0,0,0,0,52,1,0, - 0,0,0,54,1,0,0,0,0,56,1,0,0,0,0,58,1,0,0,0,0,60,1,0,0,0,0,62,1,0,0,0,0, - 64,1,0,0,0,0,66,1,0,0,0,0,68,1,0,0,0,0,70,1,0,0,0,0,72,1,0,0,0,0,74,1,0, - 0,0,0,76,1,0,0,0,0,78,1,0,0,0,0,80,1,0,0,0,0,82,1,0,0,0,0,84,1,0,0,0,0, - 86,1,0,0,0,0,88,1,0,0,0,0,90,1,0,0,0,0,92,1,0,0,0,0,94,1,0,0,0,0,96,1,0, - 0,0,0,98,1,0,0,0,0,100,1,0,0,0,0,102,1,0,0,0,0,104,1,0,0,0,0,106,1,0,0, - 0,0,108,1,0,0,0,0,110,1,0,0,0,0,112,1,0,0,0,0,114,1,0,0,0,0,116,1,0,0,0, - 0,118,1,0,0,0,0,120,1,0,0,0,0,122,1,0,0,0,0,124,1,0,0,0,0,126,1,0,0,0,0, - 128,1,0,0,0,0,130,1,0,0,0,0,132,1,0,0,0,0,134,1,0,0,0,0,144,1,0,0,0,0,146, - 1,0,0,0,0,148,1,0,0,0,0,150,1,0,0,0,0,152,1,0,0,0,0,154,1,0,0,0,0,156,1, - 0,0,0,0,158,1,0,0,0,0,160,1,0,0,0,0,162,1,0,0,0,0,164,1,0,0,0,0,166,1,0, - 0,0,1,168,1,0,0,0,1,170,1,0,0,0,1,172,1,0,0,0,1,174,1,0,0,0,1,176,1,0,0, - 0,1,178,1,0,0,0,1,180,1,0,0,0,1,182,1,0,0,0,1,184,1,0,0,0,1,186,1,0,0,0, - 1,188,1,0,0,0,1,190,1,0,0,0,1,192,1,0,0,0,1,194,1,0,0,0,1,196,1,0,0,0,1, - 198,1,0,0,0,1,202,1,0,0,0,1,204,1,0,0,0,1,206,1,0,0,0,1,208,1,0,0,0,1,210, - 1,0,0,0,1,212,1,0,0,0,1,214,1,0,0,0,2,216,1,0,0,0,4,220,1,0,0,0,6,230,1, - 0,0,0,8,232,1,0,0,0,10,234,1,0,0,0,12,236,1,0,0,0,14,238,1,0,0,0,16,240, - 1,0,0,0,18,249,1,0,0,0,20,251,1,0,0,0,22,253,1,0,0,0,24,256,1,0,0,0,26, - 259,1,0,0,0,28,261,1,0,0,0,30,265,1,0,0,0,32,270,1,0,0,0,34,283,1,0,0,0, - 36,296,1,0,0,0,38,309,1,0,0,0,40,322,1,0,0,0,42,330,1,0,0,0,44,336,1,0, - 0,0,46,351,1,0,0,0,48,357,1,0,0,0,50,364,1,0,0,0,52,370,1,0,0,0,54,384, - 1,0,0,0,56,389,1,0,0,0,58,397,1,0,0,0,60,410,1,0,0,0,62,424,1,0,0,0,64, - 426,1,0,0,0,66,444,1,0,0,0,68,448,1,0,0,0,70,452,1,0,0,0,72,456,1,0,0,0, - 74,460,1,0,0,0,76,464,1,0,0,0,78,468,1,0,0,0,80,475,1,0,0,0,82,482,1,0, - 0,0,84,489,1,0,0,0,86,494,1,0,0,0,88,499,1,0,0,0,90,504,1,0,0,0,92,509, - 1,0,0,0,94,512,1,0,0,0,96,516,1,0,0,0,98,529,1,0,0,0,100,542,1,0,0,0,102, - 555,1,0,0,0,104,572,1,0,0,0,106,583,1,0,0,0,108,595,1,0,0,0,110,600,1,0, - 0,0,112,602,1,0,0,0,114,604,1,0,0,0,116,606,1,0,0,0,118,608,1,0,0,0,120, - 610,1,0,0,0,122,612,1,0,0,0,124,616,1,0,0,0,126,620,1,0,0,0,128,622,1,0, - 0,0,130,624,1,0,0,0,132,627,1,0,0,0,134,662,1,0,0,0,136,664,1,0,0,0,138, - 666,1,0,0,0,140,716,1,0,0,0,142,718,1,0,0,0,144,860,1,0,0,0,146,876,1,0, - 0,0,148,890,1,0,0,0,150,892,1,0,0,0,152,920,1,0,0,0,154,922,1,0,0,0,156, - 928,1,0,0,0,158,934,1,0,0,0,160,940,1,0,0,0,162,945,1,0,0,0,164,950,1,0, - 0,0,166,954,1,0,0,0,168,956,1,0,0,0,170,960,1,0,0,0,172,970,1,0,0,0,174, - 976,1,0,0,0,176,991,1,0,0,0,178,997,1,0,0,0,180,1004,1,0,0,0,182,1010,1, - 0,0,0,184,1012,1,0,0,0,186,1014,1,0,0,0,188,1021,1,0,0,0,190,1023,1,0,0, - 0,192,1025,1,0,0,0,194,1027,1,0,0,0,196,1029,1,0,0,0,198,1063,1,0,0,0,200, - 1065,1,0,0,0,202,1067,1,0,0,0,204,1075,1,0,0,0,206,1085,1,0,0,0,208,1091, - 1,0,0,0,210,1096,1,0,0,0,212,1101,1,0,0,0,214,1105,1,0,0,0,216,217,5,91, - 0,0,217,218,1,0,0,0,218,219,6,0,0,0,219,3,1,0,0,0,220,221,5,92,0,0,221, - 222,5,108,0,0,222,223,5,98,0,0,223,224,5,114,0,0,224,225,5,97,0,0,225,226, - 5,99,0,0,226,227,5,107,0,0,227,228,1,0,0,0,228,229,6,1,0,0,229,5,1,0,0, - 0,230,231,5,59,0,0,231,7,1,0,0,0,232,233,5,123,0,0,233,9,1,0,0,0,234,235, - 5,125,0,0,235,11,1,0,0,0,236,237,5,40,0,0,237,13,1,0,0,0,238,239,5,41,0, - 0,239,15,1,0,0,0,240,241,5,124,0,0,241,17,1,0,0,0,242,243,5,124,0,0,243, - 250,5,124,0,0,244,245,5,92,0,0,245,246,5,86,0,0,246,247,5,101,0,0,247,248, - 5,114,0,0,248,250,5,116,0,0,249,242,1,0,0,0,249,244,1,0,0,0,250,19,1,0, - 0,0,251,252,5,95,0,0,252,21,1,0,0,0,253,254,5,95,0,0,254,255,7,0,0,0,255, - 23,1,0,0,0,256,257,5,95,0,0,257,258,7,1,0,0,258,25,1,0,0,0,259,260,5,33, - 0,0,260,27,1,0,0,0,261,262,5,92,0,0,262,263,5,112,0,0,263,264,5,105,0,0, - 264,29,1,0,0,0,265,266,5,92,0,0,266,267,5,105,0,0,267,268,5,110,0,0,268, - 269,5,116,0,0,269,31,1,0,0,0,270,271,5,92,0,0,271,272,5,105,0,0,272,273, - 5,110,0,0,273,274,5,116,0,0,274,278,1,0,0,0,275,277,7,2,0,0,276,275,1,0, - 0,0,277,280,1,0,0,0,278,276,1,0,0,0,278,279,1,0,0,0,279,281,1,0,0,0,280, - 278,1,0,0,0,281,282,5,95,0,0,282,33,1,0,0,0,283,284,5,92,0,0,284,285,5, - 105,0,0,285,286,5,110,0,0,286,287,5,116,0,0,287,291,1,0,0,0,288,290,7,2, - 0,0,289,288,1,0,0,0,290,293,1,0,0,0,291,289,1,0,0,0,291,292,1,0,0,0,292, - 294,1,0,0,0,293,291,1,0,0,0,294,295,3,22,10,0,295,35,1,0,0,0,296,297,5, - 92,0,0,297,298,5,105,0,0,298,299,5,110,0,0,299,300,5,116,0,0,300,304,1, - 0,0,0,301,303,7,2,0,0,302,301,1,0,0,0,303,306,1,0,0,0,304,302,1,0,0,0,304, - 305,1,0,0,0,305,307,1,0,0,0,306,304,1,0,0,0,307,308,3,24,11,0,308,37,1, - 0,0,0,309,310,5,92,0,0,310,311,5,115,0,0,311,312,5,117,0,0,312,313,5,109, - 0,0,313,317,1,0,0,0,314,316,7,2,0,0,315,314,1,0,0,0,316,319,1,0,0,0,317, - 315,1,0,0,0,317,318,1,0,0,0,318,320,1,0,0,0,319,317,1,0,0,0,320,321,5,95, - 0,0,321,39,1,0,0,0,322,323,5,92,0,0,323,324,5,109,0,0,324,325,5,97,0,0, - 325,326,5,116,0,0,326,327,5,104,0,0,327,328,5,114,0,0,328,329,5,109,0,0, - 329,41,1,0,0,0,330,331,5,92,0,0,331,332,5,102,0,0,332,333,5,114,0,0,333, - 334,5,97,0,0,334,335,5,99,0,0,335,43,1,0,0,0,336,337,5,92,0,0,337,338,5, - 102,0,0,338,339,5,114,0,0,339,340,5,97,0,0,340,341,5,99,0,0,341,345,1,0, - 0,0,342,344,7,2,0,0,343,342,1,0,0,0,344,347,1,0,0,0,345,343,1,0,0,0,345, - 346,1,0,0,0,346,348,1,0,0,0,347,345,1,0,0,0,348,349,7,0,0,0,349,350,7,0, - 0,0,350,45,1,0,0,0,351,352,5,92,0,0,352,353,5,99,0,0,353,354,5,100,0,0, - 354,355,5,111,0,0,355,356,5,116,0,0,356,47,1,0,0,0,357,358,5,92,0,0,358, - 359,5,116,0,0,359,360,5,105,0,0,360,361,5,109,0,0,361,362,5,101,0,0,362, - 363,5,115,0,0,363,49,1,0,0,0,364,365,5,92,0,0,365,366,5,115,0,0,366,367, - 5,113,0,0,367,368,5,114,0,0,368,369,5,116,0,0,369,51,1,0,0,0,370,371,5, - 92,0,0,371,372,5,115,0,0,372,373,5,113,0,0,373,374,5,114,0,0,374,375,5, - 116,0,0,375,379,1,0,0,0,376,378,7,2,0,0,377,376,1,0,0,0,378,381,1,0,0,0, - 379,377,1,0,0,0,379,380,1,0,0,0,380,382,1,0,0,0,381,379,1,0,0,0,382,383, - 7,0,0,0,383,53,1,0,0,0,384,385,5,92,0,0,385,386,5,115,0,0,386,387,5,105, - 0,0,387,388,5,109,0,0,388,55,1,0,0,0,389,390,5,92,0,0,390,391,5,97,0,0, - 391,392,5,112,0,0,392,393,5,112,0,0,393,394,5,114,0,0,394,395,5,111,0,0, - 395,396,5,120,0,0,396,57,1,0,0,0,397,398,5,92,0,0,398,399,5,112,0,0,399, - 400,5,108,0,0,400,401,5,97,0,0,401,402,5,99,0,0,402,403,5,101,0,0,403,404, - 5,104,0,0,404,405,5,111,0,0,405,406,5,108,0,0,406,407,5,100,0,0,407,408, - 5,101,0,0,408,409,5,114,0,0,409,59,1,0,0,0,410,411,5,94,0,0,411,412,5,123, - 0,0,412,413,5,92,0,0,413,414,5,109,0,0,414,415,5,97,0,0,415,416,5,116,0, - 0,416,417,5,104,0,0,417,418,5,114,0,0,418,419,5,109,0,0,419,420,5,123,0, - 0,420,421,5,84,0,0,421,422,5,125,0,0,422,423,5,125,0,0,423,61,1,0,0,0,424, - 425,5,92,0,0,425,63,1,0,0,0,426,427,5,97,0,0,427,428,5,115,0,0,428,432, - 1,0,0,0,429,433,5,32,0,0,430,431,5,92,0,0,431,433,5,58,0,0,432,429,1,0, - 0,0,432,430,1,0,0,0,433,434,1,0,0,0,434,432,1,0,0,0,434,435,1,0,0,0,435, - 436,1,0,0,0,436,437,5,108,0,0,437,438,5,105,0,0,438,439,5,110,0,0,439,440, - 5,101,0,0,440,442,1,0,0,0,441,443,7,3,0,0,442,441,1,0,0,0,442,443,1,0,0, - 0,443,65,1,0,0,0,444,445,5,115,0,0,445,446,5,105,0,0,446,447,5,110,0,0, - 447,67,1,0,0,0,448,449,5,99,0,0,449,450,5,111,0,0,450,451,5,115,0,0,451, - 69,1,0,0,0,452,453,5,116,0,0,453,454,5,97,0,0,454,455,5,110,0,0,455,71, - 1,0,0,0,456,457,5,99,0,0,457,458,5,111,0,0,458,459,5,116,0,0,459,73,1,0, - 0,0,460,461,5,115,0,0,461,462,5,101,0,0,462,463,5,99,0,0,463,75,1,0,0,0, - 464,465,5,99,0,0,465,466,5,115,0,0,466,467,5,99,0,0,467,77,1,0,0,0,468, - 469,5,97,0,0,469,470,5,114,0,0,470,471,5,99,0,0,471,472,5,115,0,0,472,473, - 5,105,0,0,473,474,5,110,0,0,474,79,1,0,0,0,475,476,5,97,0,0,476,477,5,114, - 0,0,477,478,5,99,0,0,478,479,5,99,0,0,479,480,5,111,0,0,480,481,5,115,0, - 0,481,81,1,0,0,0,482,483,5,97,0,0,483,484,5,114,0,0,484,485,5,99,0,0,485, - 486,5,116,0,0,486,487,5,97,0,0,487,488,5,110,0,0,488,83,1,0,0,0,489,490, - 5,115,0,0,490,491,5,105,0,0,491,492,5,110,0,0,492,493,5,104,0,0,493,85, - 1,0,0,0,494,495,5,99,0,0,495,496,5,111,0,0,496,497,5,115,0,0,497,498,5, - 104,0,0,498,87,1,0,0,0,499,500,5,116,0,0,500,501,5,97,0,0,501,502,5,110, - 0,0,502,503,5,104,0,0,503,89,1,0,0,0,504,505,5,99,0,0,505,506,5,111,0,0, - 506,507,5,116,0,0,507,508,5,104,0,0,508,91,1,0,0,0,509,510,5,108,0,0,510, - 511,5,110,0,0,511,93,1,0,0,0,512,513,5,108,0,0,513,514,5,111,0,0,514,515, - 5,103,0,0,515,95,1,0,0,0,516,517,5,92,0,0,517,518,5,108,0,0,518,519,5,111, - 0,0,519,520,5,103,0,0,520,524,1,0,0,0,521,523,7,2,0,0,522,521,1,0,0,0,523, - 526,1,0,0,0,524,522,1,0,0,0,524,525,1,0,0,0,525,527,1,0,0,0,526,524,1,0, - 0,0,527,528,5,95,0,0,528,97,1,0,0,0,529,530,5,92,0,0,530,531,5,108,0,0, - 531,532,5,111,0,0,532,533,5,103,0,0,533,537,1,0,0,0,534,536,7,2,0,0,535, - 534,1,0,0,0,536,539,1,0,0,0,537,535,1,0,0,0,537,538,1,0,0,0,538,540,1,0, - 0,0,539,537,1,0,0,0,540,541,3,22,10,0,541,99,1,0,0,0,542,543,5,92,0,0,543, - 544,5,108,0,0,544,545,5,111,0,0,545,546,5,103,0,0,546,550,1,0,0,0,547,549, - 7,2,0,0,548,547,1,0,0,0,549,552,1,0,0,0,550,548,1,0,0,0,550,551,1,0,0,0, - 551,553,1,0,0,0,552,550,1,0,0,0,553,554,3,24,11,0,554,101,1,0,0,0,555,556, - 5,92,0,0,556,557,5,116,0,0,557,558,5,101,0,0,558,559,5,120,0,0,559,560, - 5,116,0,0,560,561,5,123,0,0,561,565,1,0,0,0,562,564,9,0,0,0,563,562,1,0, - 0,0,564,567,1,0,0,0,565,566,1,0,0,0,565,563,1,0,0,0,566,568,1,0,0,0,567, - 565,1,0,0,0,568,569,5,125,0,0,569,570,1,0,0,0,570,571,6,50,1,0,571,103, - 1,0,0,0,572,573,5,92,0,0,573,574,5,108,0,0,574,575,5,101,0,0,575,576,5, - 102,0,0,576,577,5,116,0,0,577,579,1,0,0,0,578,580,5,46,0,0,579,578,1,0, - 0,0,579,580,1,0,0,0,580,581,1,0,0,0,581,582,6,51,1,0,582,105,1,0,0,0,583, - 584,5,92,0,0,584,585,5,114,0,0,585,586,5,105,0,0,586,587,5,103,0,0,587, - 588,5,104,0,0,588,589,5,116,0,0,589,591,1,0,0,0,590,592,5,46,0,0,591,590, - 1,0,0,0,591,592,1,0,0,0,592,593,1,0,0,0,593,594,6,52,1,0,594,107,1,0,0, - 0,595,596,5,36,0,0,596,597,5,36,0,0,597,598,1,0,0,0,598,599,6,53,1,0,599, - 109,1,0,0,0,600,601,5,43,0,0,601,111,1,0,0,0,602,603,5,45,0,0,603,113,1, - 0,0,0,604,605,5,94,0,0,605,115,1,0,0,0,606,607,5,61,0,0,607,117,1,0,0,0, - 608,609,5,60,0,0,609,119,1,0,0,0,610,611,5,62,0,0,611,121,1,0,0,0,612,613, - 5,92,0,0,613,614,5,108,0,0,614,615,5,101,0,0,615,123,1,0,0,0,616,617,5, - 92,0,0,617,618,5,103,0,0,618,619,5,101,0,0,619,125,1,0,0,0,620,621,5,44, - 0,0,621,127,1,0,0,0,622,623,5,46,0,0,623,129,1,0,0,0,624,625,5,94,0,0,625, - 626,7,0,0,0,626,131,1,0,0,0,627,628,5,94,0,0,628,629,7,1,0,0,629,133,1, - 0,0,0,630,632,3,136,67,0,631,630,1,0,0,0,632,633,1,0,0,0,633,631,1,0,0, - 0,633,634,1,0,0,0,634,635,1,0,0,0,635,639,5,46,0,0,636,638,3,136,67,0,637, - 636,1,0,0,0,638,641,1,0,0,0,639,637,1,0,0,0,639,640,1,0,0,0,640,643,1,0, - 0,0,641,639,1,0,0,0,642,644,3,140,69,0,643,642,1,0,0,0,643,644,1,0,0,0, - 644,663,1,0,0,0,645,647,5,46,0,0,646,648,3,136,67,0,647,646,1,0,0,0,648, - 649,1,0,0,0,649,647,1,0,0,0,649,650,1,0,0,0,650,652,1,0,0,0,651,653,3,140, - 69,0,652,651,1,0,0,0,652,653,1,0,0,0,653,663,1,0,0,0,654,656,3,136,67,0, - 655,654,1,0,0,0,656,657,1,0,0,0,657,655,1,0,0,0,657,658,1,0,0,0,658,660, - 1,0,0,0,659,661,3,140,69,0,660,659,1,0,0,0,660,661,1,0,0,0,661,663,1,0, - 0,0,662,631,1,0,0,0,662,645,1,0,0,0,662,655,1,0,0,0,663,135,1,0,0,0,664, - 665,7,0,0,0,665,137,1,0,0,0,666,670,7,1,0,0,667,669,7,4,0,0,668,667,1,0, - 0,0,669,672,1,0,0,0,670,668,1,0,0,0,670,671,1,0,0,0,671,139,1,0,0,0,672, - 670,1,0,0,0,673,675,7,5,0,0,674,676,7,6,0,0,675,674,1,0,0,0,675,676,1,0, - 0,0,676,678,1,0,0,0,677,679,3,136,67,0,678,677,1,0,0,0,679,680,1,0,0,0, - 680,678,1,0,0,0,680,681,1,0,0,0,681,717,1,0,0,0,682,684,5,32,0,0,683,682, - 1,0,0,0,684,687,1,0,0,0,685,683,1,0,0,0,685,686,1,0,0,0,686,690,1,0,0,0, - 687,685,1,0,0,0,688,691,3,46,22,0,689,691,3,48,23,0,690,688,1,0,0,0,690, - 689,1,0,0,0,691,695,1,0,0,0,692,694,5,32,0,0,693,692,1,0,0,0,694,697,1, - 0,0,0,695,693,1,0,0,0,695,696,1,0,0,0,696,698,1,0,0,0,697,695,1,0,0,0,698, - 699,5,49,0,0,699,700,5,48,0,0,700,701,1,0,0,0,701,714,3,114,56,0,702,715, - 3,136,67,0,703,705,3,8,3,0,704,706,7,6,0,0,705,704,1,0,0,0,705,706,1,0, - 0,0,706,708,1,0,0,0,707,709,3,136,67,0,708,707,1,0,0,0,709,710,1,0,0,0, - 710,708,1,0,0,0,710,711,1,0,0,0,711,712,1,0,0,0,712,713,3,10,4,0,713,715, - 1,0,0,0,714,702,1,0,0,0,714,703,1,0,0,0,715,717,1,0,0,0,716,673,1,0,0,0, - 716,685,1,0,0,0,717,141,1,0,0,0,718,858,5,92,0,0,719,720,5,97,0,0,720,721, - 5,108,0,0,721,722,5,112,0,0,722,723,5,104,0,0,723,859,5,97,0,0,724,725, - 5,98,0,0,725,726,5,101,0,0,726,727,5,116,0,0,727,859,5,97,0,0,728,729,5, - 103,0,0,729,730,5,97,0,0,730,731,5,109,0,0,731,732,5,109,0,0,732,859,5, - 97,0,0,733,734,5,100,0,0,734,735,5,101,0,0,735,736,5,108,0,0,736,737,5, - 116,0,0,737,859,5,97,0,0,738,739,5,101,0,0,739,740,5,112,0,0,740,741,5, - 115,0,0,741,742,5,105,0,0,742,743,5,108,0,0,743,744,5,111,0,0,744,859,5, - 110,0,0,745,746,5,122,0,0,746,747,5,101,0,0,747,748,5,116,0,0,748,859,5, - 97,0,0,749,750,5,101,0,0,750,751,5,116,0,0,751,859,5,97,0,0,752,753,5,116, - 0,0,753,754,5,104,0,0,754,755,5,101,0,0,755,756,5,116,0,0,756,859,5,97, - 0,0,757,758,5,105,0,0,758,759,5,111,0,0,759,760,5,116,0,0,760,859,5,97, - 0,0,761,762,5,107,0,0,762,763,5,97,0,0,763,764,5,112,0,0,764,765,5,112, - 0,0,765,859,5,97,0,0,766,767,5,108,0,0,767,768,5,97,0,0,768,769,5,109,0, - 0,769,770,5,98,0,0,770,771,5,100,0,0,771,859,5,97,0,0,772,773,5,109,0,0, - 773,859,5,117,0,0,774,775,5,110,0,0,775,859,5,117,0,0,776,777,5,120,0,0, - 777,859,5,105,0,0,778,779,5,114,0,0,779,780,5,104,0,0,780,859,5,111,0,0, - 781,782,5,115,0,0,782,783,5,105,0,0,783,784,5,103,0,0,784,785,5,109,0,0, - 785,859,5,97,0,0,786,787,5,116,0,0,787,788,5,97,0,0,788,859,5,117,0,0,789, - 790,5,117,0,0,790,791,5,112,0,0,791,792,5,115,0,0,792,793,5,105,0,0,793, - 794,5,108,0,0,794,795,5,111,0,0,795,859,5,110,0,0,796,797,5,112,0,0,797, - 798,5,104,0,0,798,859,5,105,0,0,799,800,5,99,0,0,800,801,5,104,0,0,801, - 859,5,105,0,0,802,803,5,112,0,0,803,804,5,115,0,0,804,859,5,105,0,0,805, - 806,5,111,0,0,806,807,5,109,0,0,807,808,5,101,0,0,808,809,5,103,0,0,809, - 859,5,97,0,0,810,811,5,71,0,0,811,812,5,97,0,0,812,813,5,109,0,0,813,814, - 5,109,0,0,814,859,5,97,0,0,815,816,5,68,0,0,816,817,5,101,0,0,817,818,5, - 108,0,0,818,819,5,116,0,0,819,859,5,97,0,0,820,821,5,84,0,0,821,822,5,104, - 0,0,822,823,5,101,0,0,823,824,5,116,0,0,824,859,5,97,0,0,825,826,5,76,0, - 0,826,827,5,97,0,0,827,828,5,109,0,0,828,829,5,98,0,0,829,830,5,100,0,0, - 830,859,5,97,0,0,831,832,5,88,0,0,832,859,5,105,0,0,833,834,5,80,0,0,834, - 859,5,105,0,0,835,836,5,83,0,0,836,837,5,105,0,0,837,838,5,103,0,0,838, - 839,5,109,0,0,839,859,5,97,0,0,840,841,5,85,0,0,841,842,5,112,0,0,842,843, - 5,115,0,0,843,844,5,105,0,0,844,845,5,108,0,0,845,846,5,111,0,0,846,859, - 5,110,0,0,847,848,5,80,0,0,848,849,5,104,0,0,849,859,5,105,0,0,850,851, - 5,80,0,0,851,852,5,115,0,0,852,859,5,105,0,0,853,854,5,79,0,0,854,855,5, - 109,0,0,855,856,5,101,0,0,856,857,5,103,0,0,857,859,5,97,0,0,858,719,1, - 0,0,0,858,724,1,0,0,0,858,728,1,0,0,0,858,733,1,0,0,0,858,738,1,0,0,0,858, - 745,1,0,0,0,858,749,1,0,0,0,858,752,1,0,0,0,858,757,1,0,0,0,858,761,1,0, - 0,0,858,766,1,0,0,0,858,772,1,0,0,0,858,774,1,0,0,0,858,776,1,0,0,0,858, - 778,1,0,0,0,858,781,1,0,0,0,858,786,1,0,0,0,858,789,1,0,0,0,858,796,1,0, - 0,0,858,799,1,0,0,0,858,802,1,0,0,0,858,805,1,0,0,0,858,810,1,0,0,0,858, - 815,1,0,0,0,858,820,1,0,0,0,858,825,1,0,0,0,858,831,1,0,0,0,858,833,1,0, - 0,0,858,835,1,0,0,0,858,840,1,0,0,0,858,847,1,0,0,0,858,850,1,0,0,0,858, - 853,1,0,0,0,859,143,1,0,0,0,860,861,5,92,0,0,861,862,5,98,0,0,862,863,5, - 101,0,0,863,864,5,103,0,0,864,865,5,105,0,0,865,866,5,110,0,0,866,867,5, - 123,0,0,867,868,5,98,0,0,868,869,5,109,0,0,869,870,5,97,0,0,870,871,5,116, - 0,0,871,872,5,114,0,0,872,873,5,105,0,0,873,874,5,120,0,0,874,875,5,125, - 0,0,875,145,1,0,0,0,876,877,5,92,0,0,877,878,5,101,0,0,878,879,5,110,0, - 0,879,880,5,100,0,0,880,881,5,123,0,0,881,882,5,98,0,0,882,883,5,109,0, - 0,883,884,5,97,0,0,884,885,5,116,0,0,885,886,5,114,0,0,886,887,5,105,0, - 0,887,888,5,120,0,0,888,889,5,125,0,0,889,147,1,0,0,0,890,891,5,38,0,0, - 891,149,1,0,0,0,892,893,5,92,0,0,893,894,5,92,0,0,894,151,1,0,0,0,895,897, - 7,2,0,0,896,895,1,0,0,0,897,900,1,0,0,0,898,896,1,0,0,0,898,899,1,0,0,0, - 899,901,1,0,0,0,900,898,1,0,0,0,901,902,5,95,0,0,902,903,5,123,0,0,903, - 905,1,0,0,0,904,906,7,4,0,0,905,904,1,0,0,0,906,907,1,0,0,0,907,905,1,0, - 0,0,907,908,1,0,0,0,908,909,1,0,0,0,909,921,5,125,0,0,910,912,7,2,0,0,911, - 910,1,0,0,0,912,915,1,0,0,0,913,911,1,0,0,0,913,914,1,0,0,0,914,918,1,0, - 0,0,915,913,1,0,0,0,916,919,3,24,11,0,917,919,3,22,10,0,918,916,1,0,0,0, - 918,917,1,0,0,0,919,921,1,0,0,0,920,898,1,0,0,0,920,913,1,0,0,0,921,153, - 1,0,0,0,922,923,5,94,0,0,923,924,7,1,0,0,924,925,3,152,75,0,925,155,1,0, - 0,0,926,929,3,138,68,0,927,929,3,142,70,0,928,926,1,0,0,0,928,927,1,0,0, - 0,929,931,1,0,0,0,930,932,3,152,75,0,931,930,1,0,0,0,931,932,1,0,0,0,932, - 157,1,0,0,0,933,935,7,7,0,0,934,933,1,0,0,0,935,936,1,0,0,0,936,934,1,0, - 0,0,936,937,1,0,0,0,937,938,1,0,0,0,938,939,6,78,1,0,939,159,1,0,0,0,940, - 941,5,92,0,0,941,942,5,32,0,0,942,943,1,0,0,0,943,944,6,79,1,0,944,161, - 1,0,0,0,945,946,5,92,0,0,946,947,5,58,0,0,947,948,1,0,0,0,948,949,6,80, - 1,0,949,163,1,0,0,0,950,951,5,160,0,0,951,952,1,0,0,0,952,953,6,81,1,0, - 953,165,1,0,0,0,954,955,9,0,0,0,955,167,1,0,0,0,956,957,5,93,0,0,957,958, - 1,0,0,0,958,959,6,83,2,0,959,169,1,0,0,0,960,961,5,92,0,0,961,962,5,114, - 0,0,962,963,5,98,0,0,963,964,5,114,0,0,964,965,5,97,0,0,965,966,5,99,0, - 0,966,967,5,107,0,0,967,968,1,0,0,0,968,969,6,84,2,0,969,171,1,0,0,0,970, - 971,5,92,0,0,971,972,5,102,0,0,972,973,5,114,0,0,973,974,5,97,0,0,974,975, - 5,99,0,0,975,173,1,0,0,0,976,977,5,92,0,0,977,978,5,102,0,0,978,979,5,114, - 0,0,979,980,5,97,0,0,980,981,5,99,0,0,981,985,1,0,0,0,982,984,7,2,0,0,983, - 982,1,0,0,0,984,987,1,0,0,0,985,983,1,0,0,0,985,986,1,0,0,0,986,988,1,0, - 0,0,987,985,1,0,0,0,988,989,7,0,0,0,989,990,7,0,0,0,990,175,1,0,0,0,991, - 992,5,92,0,0,992,993,5,99,0,0,993,994,5,100,0,0,994,995,5,111,0,0,995,996, - 5,116,0,0,996,177,1,0,0,0,997,998,5,92,0,0,998,999,5,116,0,0,999,1000,5, - 105,0,0,1000,1001,5,109,0,0,1001,1002,5,101,0,0,1002,1003,5,115,0,0,1003, - 179,1,0,0,0,1004,1005,5,92,0,0,1005,1006,5,115,0,0,1006,1007,5,113,0,0, - 1007,1008,5,114,0,0,1008,1009,5,116,0,0,1009,181,1,0,0,0,1010,1011,5,44, - 0,0,1011,183,1,0,0,0,1012,1013,5,94,0,0,1013,185,1,0,0,0,1014,1018,7,1, - 0,0,1015,1017,7,4,0,0,1016,1015,1,0,0,0,1017,1020,1,0,0,0,1018,1016,1,0, - 0,0,1018,1019,1,0,0,0,1019,187,1,0,0,0,1020,1018,1,0,0,0,1021,1022,5,40, - 0,0,1022,189,1,0,0,0,1023,1024,5,41,0,0,1024,191,1,0,0,0,1025,1026,5,123, - 0,0,1026,193,1,0,0,0,1027,1028,5,125,0,0,1028,195,1,0,0,0,1029,1030,5,49, - 0,0,1030,197,1,0,0,0,1031,1033,5,45,0,0,1032,1031,1,0,0,0,1032,1033,1,0, - 0,0,1033,1035,1,0,0,0,1034,1036,3,200,99,0,1035,1034,1,0,0,0,1036,1037, - 1,0,0,0,1037,1035,1,0,0,0,1037,1038,1,0,0,0,1038,1039,1,0,0,0,1039,1043, - 5,46,0,0,1040,1042,3,200,99,0,1041,1040,1,0,0,0,1042,1045,1,0,0,0,1043, - 1041,1,0,0,0,1043,1044,1,0,0,0,1044,1064,1,0,0,0,1045,1043,1,0,0,0,1046, - 1048,5,45,0,0,1047,1046,1,0,0,0,1047,1048,1,0,0,0,1048,1049,1,0,0,0,1049, - 1051,5,46,0,0,1050,1052,3,200,99,0,1051,1050,1,0,0,0,1052,1053,1,0,0,0, - 1053,1051,1,0,0,0,1053,1054,1,0,0,0,1054,1064,1,0,0,0,1055,1057,5,45,0, - 0,1056,1055,1,0,0,0,1056,1057,1,0,0,0,1057,1059,1,0,0,0,1058,1060,3,200, - 99,0,1059,1058,1,0,0,0,1060,1061,1,0,0,0,1061,1059,1,0,0,0,1061,1062,1, - 0,0,0,1062,1064,1,0,0,0,1063,1032,1,0,0,0,1063,1047,1,0,0,0,1063,1056,1, - 0,0,0,1064,199,1,0,0,0,1065,1066,7,0,0,0,1066,201,1,0,0,0,1067,1068,5,92, - 0,0,1068,1069,5,108,0,0,1069,1070,5,101,0,0,1070,1071,5,102,0,0,1071,1072, - 5,116,0,0,1072,1073,1,0,0,0,1073,1074,6,100,1,0,1074,203,1,0,0,0,1075,1076, - 5,92,0,0,1076,1077,5,114,0,0,1077,1078,5,105,0,0,1078,1079,5,103,0,0,1079, - 1080,5,104,0,0,1080,1081,5,116,0,0,1081,1082,1,0,0,0,1082,1083,6,101,1, - 0,1083,205,1,0,0,0,1084,1086,7,7,0,0,1085,1084,1,0,0,0,1086,1087,1,0,0, - 0,1087,1085,1,0,0,0,1087,1088,1,0,0,0,1088,1089,1,0,0,0,1089,1090,6,102, - 1,0,1090,207,1,0,0,0,1091,1092,5,92,0,0,1092,1093,5,32,0,0,1093,1094,1, - 0,0,0,1094,1095,6,103,1,0,1095,209,1,0,0,0,1096,1097,5,92,0,0,1097,1098, - 5,58,0,0,1098,1099,1,0,0,0,1099,1100,6,104,1,0,1100,211,1,0,0,0,1101,1102, - 5,160,0,0,1102,1103,1,0,0,0,1103,1104,6,105,1,0,1104,213,1,0,0,0,1105,1106, - 9,0,0,0,1106,215,1,0,0,0,56,0,1,249,278,291,304,317,345,379,432,434,442, - 524,537,550,565,579,591,633,639,643,649,652,657,660,662,670,675,680,685, - 690,695,705,710,714,716,858,898,907,913,918,920,928,931,936,985,1018,1032, - 1037,1043,1047,1053,1056,1061,1063,1087,3,2,1,0,6,0,0,2,0,0]; + 7,102,2,103,7,103,2,104,7,104,2,105,7,105,2,106,7,106,2,107,7,107,1,0,1, + 0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1, + 4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,8,252,8,8,1,9,1, + 9,1,10,1,10,1,10,1,11,1,11,1,11,1,12,1,12,1,13,1,13,1,13,1,13,1,14,1,14, + 1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1, + 16,1,16,5,16,286,8,16,10,16,12,16,289,9,16,1,16,1,16,1,17,1,17,1,17,1,17, + 1,17,1,17,5,17,299,8,17,10,17,12,17,302,9,17,1,17,1,17,1,18,1,18,1,18,1, + 18,1,18,1,18,5,18,312,8,18,10,18,12,18,315,9,18,1,18,1,18,1,19,1,19,1,19, + 1,19,1,19,1,19,5,19,325,8,19,10,19,12,19,328,9,19,1,19,1,19,1,20,1,20,1, + 20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22, + 1,22,1,22,1,22,1,22,5,22,353,8,22,10,22,12,22,356,9,22,1,22,1,22,1,22,1, + 23,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,25,1,25, + 1,25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,26,5,26,387,8,26,10, + 26,12,26,390,9,26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,28,1,28,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,29,1,29,1,29,1,29,1, + 29,1,29,1,29,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,31,1,31,1,32,1,32,1,32,1,32,1,32,1,32,4,32,442,8,32,11,32,12, + 32,443,1,32,1,32,1,32,1,32,1,32,1,32,3,32,452,8,32,1,33,1,33,1,33,1,33, + 1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,37,1,37,1, + 37,1,37,1,38,1,38,1,38,1,38,1,39,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,41,1,41,1,41,1,41,1,41,1,41,1,41,1,42,1,42,1, + 42,1,42,1,42,1,43,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,45,1,45, + 1,45,1,45,1,45,1,46,1,46,1,46,1,47,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1, + 48,1,48,5,48,532,8,48,10,48,12,48,535,9,48,1,48,1,48,1,49,1,49,1,49,1,49, + 1,49,1,49,5,49,545,8,49,10,49,12,49,548,9,49,1,49,1,49,1,50,1,50,1,50,1, + 50,1,50,1,50,5,50,558,8,50,10,50,12,50,561,9,50,1,50,1,50,1,51,1,51,1,51, + 1,51,1,51,1,51,1,51,1,51,5,51,573,8,51,10,51,12,51,576,9,51,1,51,1,51,1, + 51,1,51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,3,52,589,8,52,1,52,1,52,1,53, + 1,53,1,53,1,53,1,53,1,53,1,53,1,53,3,53,601,8,53,1,53,1,53,1,54,1,54,1, + 54,1,54,1,54,1,55,1,55,1,56,1,56,1,57,1,57,1,58,1,58,1,59,1,59,1,60,1,60, + 1,61,1,61,1,61,1,61,1,62,1,62,1,62,1,62,1,63,1,63,1,64,1,64,1,65,1,65,1, + 65,1,66,1,66,1,66,1,67,4,67,641,8,67,11,67,12,67,642,1,67,1,67,5,67,647, + 8,67,10,67,12,67,650,9,67,1,67,3,67,653,8,67,1,67,1,67,4,67,657,8,67,11, + 67,12,67,658,1,67,3,67,662,8,67,1,67,4,67,665,8,67,11,67,12,67,666,1,67, + 3,67,670,8,67,3,67,672,8,67,1,68,1,68,1,69,1,69,5,69,678,8,69,10,69,12, + 69,681,9,69,1,70,1,70,3,70,685,8,70,1,70,4,70,688,8,70,11,70,12,70,689, + 1,70,5,70,693,8,70,10,70,12,70,696,9,70,1,70,1,70,3,70,700,8,70,1,70,5, + 70,703,8,70,10,70,12,70,706,9,70,1,70,1,70,1,70,1,70,1,70,1,70,1,70,3,70, + 715,8,70,1,70,4,70,718,8,70,11,70,12,70,719,1,70,1,70,3,70,724,8,70,3,70, + 726,8,70,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1, + 71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, + 1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1, + 71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, + 1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1, + 71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, + 1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1, + 71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71, + 1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1, + 71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,1,71,3,71,868,8,71, + 1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1,72,1, + 72,1,72,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73,1,73, + 1,73,1,74,1,74,1,75,1,75,1,75,1,76,5,76,906,8,76,10,76,12,76,909,9,76,1, + 76,1,76,1,76,1,76,4,76,915,8,76,11,76,12,76,916,1,76,1,76,5,76,921,8,76, + 10,76,12,76,924,9,76,1,76,1,76,3,76,928,8,76,3,76,930,8,76,1,77,1,77,1, + 77,1,77,1,78,1,78,3,78,938,8,78,1,78,3,78,941,8,78,1,79,4,79,944,8,79,11, + 79,12,79,945,1,79,1,79,1,80,1,80,1,80,1,80,1,80,1,81,1,81,1,81,1,81,1,81, + 1,82,1,82,1,82,1,82,1,83,1,83,1,84,1,84,1,84,1,84,1,85,1,85,1,85,1,85,1, + 85,1,85,1,85,1,85,1,85,1,85,1,86,1,86,1,86,1,86,1,86,1,86,1,87,1,87,1,87, + 1,87,1,87,1,87,1,87,5,87,993,8,87,10,87,12,87,996,9,87,1,87,1,87,1,87,1, + 88,1,88,1,88,1,88,1,88,1,88,1,89,1,89,1,89,1,89,1,89,1,89,1,89,1,90,1,90, + 1,90,1,90,1,90,1,90,1,91,1,91,1,92,1,92,1,93,1,93,5,93,1026,8,93,10,93, + 12,93,1029,9,93,1,94,1,94,1,95,1,95,1,96,1,96,1,97,1,97,1,98,1,98,1,99, + 3,99,1042,8,99,1,99,4,99,1045,8,99,11,99,12,99,1046,1,99,1,99,5,99,1051, + 8,99,10,99,12,99,1054,9,99,1,99,3,99,1057,8,99,1,99,1,99,4,99,1061,8,99, + 11,99,12,99,1062,1,99,3,99,1066,8,99,1,99,4,99,1069,8,99,11,99,12,99,1070, + 3,99,1073,8,99,1,100,1,100,1,101,1,101,1,101,1,101,1,101,1,101,1,101,1, + 101,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,102,1,103,4,103,1095, + 8,103,11,103,12,103,1096,1,103,1,103,1,104,1,104,1,104,1,104,1,104,1,105, + 1,105,1,105,1,105,1,105,1,106,1,106,1,106,1,106,1,107,1,107,1,574,0,108, + 2,1,4,2,6,3,8,4,10,5,12,6,14,7,16,8,18,9,20,10,22,0,24,0,26,11,28,12,30, + 13,32,14,34,15,36,16,38,17,40,18,42,19,44,20,46,21,48,22,50,23,52,24,54, + 25,56,26,58,27,60,28,62,29,64,30,66,31,68,32,70,33,72,34,74,35,76,36,78, + 37,80,38,82,39,84,40,86,41,88,42,90,43,92,44,94,45,96,46,98,47,100,48,102, + 49,104,50,106,51,108,52,110,53,112,54,114,55,116,56,118,57,120,58,122,59, + 124,60,126,61,128,62,130,63,132,64,134,65,136,66,138,0,140,0,142,0,144, + 0,146,67,148,68,150,69,152,70,154,71,156,72,158,73,160,74,162,75,164,76, + 166,77,168,78,170,79,172,80,174,81,176,82,178,83,180,84,182,85,184,86,186, + 87,188,88,190,89,192,90,194,91,196,92,198,93,200,94,202,0,204,95,206,96, + 208,97,210,98,212,99,214,100,216,101,2,0,1,8,1,0,48,57,2,0,65,90,97,122, + 1,0,32,32,1,0,115,115,3,0,48,57,65,90,97,122,2,0,69,69,101,101,2,0,43,43, + 45,45,3,0,9,10,13,13,32,32,1194,0,2,1,0,0,0,0,4,1,0,0,0,0,6,1,0,0,0,0,8, + 1,0,0,0,0,10,1,0,0,0,0,12,1,0,0,0,0,14,1,0,0,0,0,16,1,0,0,0,0,18,1,0,0, + 0,0,20,1,0,0,0,0,26,1,0,0,0,0,28,1,0,0,0,0,30,1,0,0,0,0,32,1,0,0,0,0,34, + 1,0,0,0,0,36,1,0,0,0,0,38,1,0,0,0,0,40,1,0,0,0,0,42,1,0,0,0,0,44,1,0,0, + 0,0,46,1,0,0,0,0,48,1,0,0,0,0,50,1,0,0,0,0,52,1,0,0,0,0,54,1,0,0,0,0,56, + 1,0,0,0,0,58,1,0,0,0,0,60,1,0,0,0,0,62,1,0,0,0,0,64,1,0,0,0,0,66,1,0,0, + 0,0,68,1,0,0,0,0,70,1,0,0,0,0,72,1,0,0,0,0,74,1,0,0,0,0,76,1,0,0,0,0,78, + 1,0,0,0,0,80,1,0,0,0,0,82,1,0,0,0,0,84,1,0,0,0,0,86,1,0,0,0,0,88,1,0,0, + 0,0,90,1,0,0,0,0,92,1,0,0,0,0,94,1,0,0,0,0,96,1,0,0,0,0,98,1,0,0,0,0,100, + 1,0,0,0,0,102,1,0,0,0,0,104,1,0,0,0,0,106,1,0,0,0,0,108,1,0,0,0,0,110,1, + 0,0,0,0,112,1,0,0,0,0,114,1,0,0,0,0,116,1,0,0,0,0,118,1,0,0,0,0,120,1,0, + 0,0,0,122,1,0,0,0,0,124,1,0,0,0,0,126,1,0,0,0,0,128,1,0,0,0,0,130,1,0,0, + 0,0,132,1,0,0,0,0,134,1,0,0,0,0,136,1,0,0,0,0,146,1,0,0,0,0,148,1,0,0,0, + 0,150,1,0,0,0,0,152,1,0,0,0,0,154,1,0,0,0,0,156,1,0,0,0,0,158,1,0,0,0,0, + 160,1,0,0,0,0,162,1,0,0,0,0,164,1,0,0,0,0,166,1,0,0,0,0,168,1,0,0,0,1,170, + 1,0,0,0,1,172,1,0,0,0,1,174,1,0,0,0,1,176,1,0,0,0,1,178,1,0,0,0,1,180,1, + 0,0,0,1,182,1,0,0,0,1,184,1,0,0,0,1,186,1,0,0,0,1,188,1,0,0,0,1,190,1,0, + 0,0,1,192,1,0,0,0,1,194,1,0,0,0,1,196,1,0,0,0,1,198,1,0,0,0,1,200,1,0,0, + 0,1,204,1,0,0,0,1,206,1,0,0,0,1,208,1,0,0,0,1,210,1,0,0,0,1,212,1,0,0,0, + 1,214,1,0,0,0,1,216,1,0,0,0,2,218,1,0,0,0,4,222,1,0,0,0,6,232,1,0,0,0,8, + 234,1,0,0,0,10,236,1,0,0,0,12,238,1,0,0,0,14,240,1,0,0,0,16,242,1,0,0,0, + 18,251,1,0,0,0,20,253,1,0,0,0,22,255,1,0,0,0,24,258,1,0,0,0,26,261,1,0, + 0,0,28,263,1,0,0,0,30,267,1,0,0,0,32,274,1,0,0,0,34,279,1,0,0,0,36,292, + 1,0,0,0,38,305,1,0,0,0,40,318,1,0,0,0,42,331,1,0,0,0,44,339,1,0,0,0,46, + 345,1,0,0,0,48,360,1,0,0,0,50,366,1,0,0,0,52,373,1,0,0,0,54,379,1,0,0,0, + 56,393,1,0,0,0,58,398,1,0,0,0,60,406,1,0,0,0,62,419,1,0,0,0,64,433,1,0, + 0,0,66,435,1,0,0,0,68,453,1,0,0,0,70,457,1,0,0,0,72,461,1,0,0,0,74,465, + 1,0,0,0,76,469,1,0,0,0,78,473,1,0,0,0,80,477,1,0,0,0,82,484,1,0,0,0,84, + 491,1,0,0,0,86,498,1,0,0,0,88,503,1,0,0,0,90,508,1,0,0,0,92,513,1,0,0,0, + 94,518,1,0,0,0,96,521,1,0,0,0,98,525,1,0,0,0,100,538,1,0,0,0,102,551,1, + 0,0,0,104,564,1,0,0,0,106,581,1,0,0,0,108,592,1,0,0,0,110,604,1,0,0,0,112, + 609,1,0,0,0,114,611,1,0,0,0,116,613,1,0,0,0,118,615,1,0,0,0,120,617,1,0, + 0,0,122,619,1,0,0,0,124,621,1,0,0,0,126,625,1,0,0,0,128,629,1,0,0,0,130, + 631,1,0,0,0,132,633,1,0,0,0,134,636,1,0,0,0,136,671,1,0,0,0,138,673,1,0, + 0,0,140,675,1,0,0,0,142,725,1,0,0,0,144,727,1,0,0,0,146,869,1,0,0,0,148, + 885,1,0,0,0,150,899,1,0,0,0,152,901,1,0,0,0,154,929,1,0,0,0,156,931,1,0, + 0,0,158,937,1,0,0,0,160,943,1,0,0,0,162,949,1,0,0,0,164,954,1,0,0,0,166, + 959,1,0,0,0,168,963,1,0,0,0,170,965,1,0,0,0,172,969,1,0,0,0,174,979,1,0, + 0,0,176,985,1,0,0,0,178,1000,1,0,0,0,180,1006,1,0,0,0,182,1013,1,0,0,0, + 184,1019,1,0,0,0,186,1021,1,0,0,0,188,1023,1,0,0,0,190,1030,1,0,0,0,192, + 1032,1,0,0,0,194,1034,1,0,0,0,196,1036,1,0,0,0,198,1038,1,0,0,0,200,1072, + 1,0,0,0,202,1074,1,0,0,0,204,1076,1,0,0,0,206,1084,1,0,0,0,208,1094,1,0, + 0,0,210,1100,1,0,0,0,212,1105,1,0,0,0,214,1110,1,0,0,0,216,1114,1,0,0,0, + 218,219,5,91,0,0,219,220,1,0,0,0,220,221,6,0,0,0,221,3,1,0,0,0,222,223, + 5,92,0,0,223,224,5,108,0,0,224,225,5,98,0,0,225,226,5,114,0,0,226,227,5, + 97,0,0,227,228,5,99,0,0,228,229,5,107,0,0,229,230,1,0,0,0,230,231,6,1,0, + 0,231,5,1,0,0,0,232,233,5,59,0,0,233,7,1,0,0,0,234,235,5,123,0,0,235,9, + 1,0,0,0,236,237,5,125,0,0,237,11,1,0,0,0,238,239,5,40,0,0,239,13,1,0,0, + 0,240,241,5,41,0,0,241,15,1,0,0,0,242,243,5,124,0,0,243,17,1,0,0,0,244, + 245,5,124,0,0,245,252,5,124,0,0,246,247,5,92,0,0,247,248,5,86,0,0,248,249, + 5,101,0,0,249,250,5,114,0,0,250,252,5,116,0,0,251,244,1,0,0,0,251,246,1, + 0,0,0,252,19,1,0,0,0,253,254,5,95,0,0,254,21,1,0,0,0,255,256,5,95,0,0,256, + 257,7,0,0,0,257,23,1,0,0,0,258,259,5,95,0,0,259,260,7,1,0,0,260,25,1,0, + 0,0,261,262,5,33,0,0,262,27,1,0,0,0,263,264,5,92,0,0,264,265,5,112,0,0, + 265,266,5,105,0,0,266,29,1,0,0,0,267,268,5,92,0,0,268,269,5,105,0,0,269, + 270,5,110,0,0,270,271,5,102,0,0,271,272,5,116,0,0,272,273,5,121,0,0,273, + 31,1,0,0,0,274,275,5,92,0,0,275,276,5,105,0,0,276,277,5,110,0,0,277,278, + 5,116,0,0,278,33,1,0,0,0,279,280,5,92,0,0,280,281,5,105,0,0,281,282,5,110, + 0,0,282,283,5,116,0,0,283,287,1,0,0,0,284,286,7,2,0,0,285,284,1,0,0,0,286, + 289,1,0,0,0,287,285,1,0,0,0,287,288,1,0,0,0,288,290,1,0,0,0,289,287,1,0, + 0,0,290,291,5,95,0,0,291,35,1,0,0,0,292,293,5,92,0,0,293,294,5,105,0,0, + 294,295,5,110,0,0,295,296,5,116,0,0,296,300,1,0,0,0,297,299,7,2,0,0,298, + 297,1,0,0,0,299,302,1,0,0,0,300,298,1,0,0,0,300,301,1,0,0,0,301,303,1,0, + 0,0,302,300,1,0,0,0,303,304,3,22,10,0,304,37,1,0,0,0,305,306,5,92,0,0,306, + 307,5,105,0,0,307,308,5,110,0,0,308,309,5,116,0,0,309,313,1,0,0,0,310,312, + 7,2,0,0,311,310,1,0,0,0,312,315,1,0,0,0,313,311,1,0,0,0,313,314,1,0,0,0, + 314,316,1,0,0,0,315,313,1,0,0,0,316,317,3,24,11,0,317,39,1,0,0,0,318,319, + 5,92,0,0,319,320,5,115,0,0,320,321,5,117,0,0,321,322,5,109,0,0,322,326, + 1,0,0,0,323,325,7,2,0,0,324,323,1,0,0,0,325,328,1,0,0,0,326,324,1,0,0,0, + 326,327,1,0,0,0,327,329,1,0,0,0,328,326,1,0,0,0,329,330,5,95,0,0,330,41, + 1,0,0,0,331,332,5,92,0,0,332,333,5,109,0,0,333,334,5,97,0,0,334,335,5,116, + 0,0,335,336,5,104,0,0,336,337,5,114,0,0,337,338,5,109,0,0,338,43,1,0,0, + 0,339,340,5,92,0,0,340,341,5,102,0,0,341,342,5,114,0,0,342,343,5,97,0,0, + 343,344,5,99,0,0,344,45,1,0,0,0,345,346,5,92,0,0,346,347,5,102,0,0,347, + 348,5,114,0,0,348,349,5,97,0,0,349,350,5,99,0,0,350,354,1,0,0,0,351,353, + 7,2,0,0,352,351,1,0,0,0,353,356,1,0,0,0,354,352,1,0,0,0,354,355,1,0,0,0, + 355,357,1,0,0,0,356,354,1,0,0,0,357,358,7,0,0,0,358,359,7,0,0,0,359,47, + 1,0,0,0,360,361,5,92,0,0,361,362,5,99,0,0,362,363,5,100,0,0,363,364,5,111, + 0,0,364,365,5,116,0,0,365,49,1,0,0,0,366,367,5,92,0,0,367,368,5,116,0,0, + 368,369,5,105,0,0,369,370,5,109,0,0,370,371,5,101,0,0,371,372,5,115,0,0, + 372,51,1,0,0,0,373,374,5,92,0,0,374,375,5,115,0,0,375,376,5,113,0,0,376, + 377,5,114,0,0,377,378,5,116,0,0,378,53,1,0,0,0,379,380,5,92,0,0,380,381, + 5,115,0,0,381,382,5,113,0,0,382,383,5,114,0,0,383,384,5,116,0,0,384,388, + 1,0,0,0,385,387,7,2,0,0,386,385,1,0,0,0,387,390,1,0,0,0,388,386,1,0,0,0, + 388,389,1,0,0,0,389,391,1,0,0,0,390,388,1,0,0,0,391,392,7,0,0,0,392,55, + 1,0,0,0,393,394,5,92,0,0,394,395,5,115,0,0,395,396,5,105,0,0,396,397,5, + 109,0,0,397,57,1,0,0,0,398,399,5,92,0,0,399,400,5,97,0,0,400,401,5,112, + 0,0,401,402,5,112,0,0,402,403,5,114,0,0,403,404,5,111,0,0,404,405,5,120, + 0,0,405,59,1,0,0,0,406,407,5,92,0,0,407,408,5,112,0,0,408,409,5,108,0,0, + 409,410,5,97,0,0,410,411,5,99,0,0,411,412,5,101,0,0,412,413,5,104,0,0,413, + 414,5,111,0,0,414,415,5,108,0,0,415,416,5,100,0,0,416,417,5,101,0,0,417, + 418,5,114,0,0,418,61,1,0,0,0,419,420,5,94,0,0,420,421,5,123,0,0,421,422, + 5,92,0,0,422,423,5,109,0,0,423,424,5,97,0,0,424,425,5,116,0,0,425,426,5, + 104,0,0,426,427,5,114,0,0,427,428,5,109,0,0,428,429,5,123,0,0,429,430,5, + 84,0,0,430,431,5,125,0,0,431,432,5,125,0,0,432,63,1,0,0,0,433,434,5,92, + 0,0,434,65,1,0,0,0,435,436,5,97,0,0,436,437,5,115,0,0,437,441,1,0,0,0,438, + 442,5,32,0,0,439,440,5,92,0,0,440,442,5,58,0,0,441,438,1,0,0,0,441,439, + 1,0,0,0,442,443,1,0,0,0,443,441,1,0,0,0,443,444,1,0,0,0,444,445,1,0,0,0, + 445,446,5,108,0,0,446,447,5,105,0,0,447,448,5,110,0,0,448,449,5,101,0,0, + 449,451,1,0,0,0,450,452,7,3,0,0,451,450,1,0,0,0,451,452,1,0,0,0,452,67, + 1,0,0,0,453,454,5,115,0,0,454,455,5,105,0,0,455,456,5,110,0,0,456,69,1, + 0,0,0,457,458,5,99,0,0,458,459,5,111,0,0,459,460,5,115,0,0,460,71,1,0,0, + 0,461,462,5,116,0,0,462,463,5,97,0,0,463,464,5,110,0,0,464,73,1,0,0,0,465, + 466,5,99,0,0,466,467,5,111,0,0,467,468,5,116,0,0,468,75,1,0,0,0,469,470, + 5,115,0,0,470,471,5,101,0,0,471,472,5,99,0,0,472,77,1,0,0,0,473,474,5,99, + 0,0,474,475,5,115,0,0,475,476,5,99,0,0,476,79,1,0,0,0,477,478,5,97,0,0, + 478,479,5,114,0,0,479,480,5,99,0,0,480,481,5,115,0,0,481,482,5,105,0,0, + 482,483,5,110,0,0,483,81,1,0,0,0,484,485,5,97,0,0,485,486,5,114,0,0,486, + 487,5,99,0,0,487,488,5,99,0,0,488,489,5,111,0,0,489,490,5,115,0,0,490,83, + 1,0,0,0,491,492,5,97,0,0,492,493,5,114,0,0,493,494,5,99,0,0,494,495,5,116, + 0,0,495,496,5,97,0,0,496,497,5,110,0,0,497,85,1,0,0,0,498,499,5,115,0,0, + 499,500,5,105,0,0,500,501,5,110,0,0,501,502,5,104,0,0,502,87,1,0,0,0,503, + 504,5,99,0,0,504,505,5,111,0,0,505,506,5,115,0,0,506,507,5,104,0,0,507, + 89,1,0,0,0,508,509,5,116,0,0,509,510,5,97,0,0,510,511,5,110,0,0,511,512, + 5,104,0,0,512,91,1,0,0,0,513,514,5,99,0,0,514,515,5,111,0,0,515,516,5,116, + 0,0,516,517,5,104,0,0,517,93,1,0,0,0,518,519,5,108,0,0,519,520,5,110,0, + 0,520,95,1,0,0,0,521,522,5,108,0,0,522,523,5,111,0,0,523,524,5,103,0,0, + 524,97,1,0,0,0,525,526,5,92,0,0,526,527,5,108,0,0,527,528,5,111,0,0,528, + 529,5,103,0,0,529,533,1,0,0,0,530,532,7,2,0,0,531,530,1,0,0,0,532,535,1, + 0,0,0,533,531,1,0,0,0,533,534,1,0,0,0,534,536,1,0,0,0,535,533,1,0,0,0,536, + 537,5,95,0,0,537,99,1,0,0,0,538,539,5,92,0,0,539,540,5,108,0,0,540,541, + 5,111,0,0,541,542,5,103,0,0,542,546,1,0,0,0,543,545,7,2,0,0,544,543,1,0, + 0,0,545,548,1,0,0,0,546,544,1,0,0,0,546,547,1,0,0,0,547,549,1,0,0,0,548, + 546,1,0,0,0,549,550,3,22,10,0,550,101,1,0,0,0,551,552,5,92,0,0,552,553, + 5,108,0,0,553,554,5,111,0,0,554,555,5,103,0,0,555,559,1,0,0,0,556,558,7, + 2,0,0,557,556,1,0,0,0,558,561,1,0,0,0,559,557,1,0,0,0,559,560,1,0,0,0,560, + 562,1,0,0,0,561,559,1,0,0,0,562,563,3,24,11,0,563,103,1,0,0,0,564,565,5, + 92,0,0,565,566,5,116,0,0,566,567,5,101,0,0,567,568,5,120,0,0,568,569,5, + 116,0,0,569,570,5,123,0,0,570,574,1,0,0,0,571,573,9,0,0,0,572,571,1,0,0, + 0,573,576,1,0,0,0,574,575,1,0,0,0,574,572,1,0,0,0,575,577,1,0,0,0,576,574, + 1,0,0,0,577,578,5,125,0,0,578,579,1,0,0,0,579,580,6,51,1,0,580,105,1,0, + 0,0,581,582,5,92,0,0,582,583,5,108,0,0,583,584,5,101,0,0,584,585,5,102, + 0,0,585,586,5,116,0,0,586,588,1,0,0,0,587,589,5,46,0,0,588,587,1,0,0,0, + 588,589,1,0,0,0,589,590,1,0,0,0,590,591,6,52,1,0,591,107,1,0,0,0,592,593, + 5,92,0,0,593,594,5,114,0,0,594,595,5,105,0,0,595,596,5,103,0,0,596,597, + 5,104,0,0,597,598,5,116,0,0,598,600,1,0,0,0,599,601,5,46,0,0,600,599,1, + 0,0,0,600,601,1,0,0,0,601,602,1,0,0,0,602,603,6,53,1,0,603,109,1,0,0,0, + 604,605,5,36,0,0,605,606,5,36,0,0,606,607,1,0,0,0,607,608,6,54,1,0,608, + 111,1,0,0,0,609,610,5,43,0,0,610,113,1,0,0,0,611,612,5,45,0,0,612,115,1, + 0,0,0,613,614,5,94,0,0,614,117,1,0,0,0,615,616,5,61,0,0,616,119,1,0,0,0, + 617,618,5,60,0,0,618,121,1,0,0,0,619,620,5,62,0,0,620,123,1,0,0,0,621,622, + 5,92,0,0,622,623,5,108,0,0,623,624,5,101,0,0,624,125,1,0,0,0,625,626,5, + 92,0,0,626,627,5,103,0,0,627,628,5,101,0,0,628,127,1,0,0,0,629,630,5,44, + 0,0,630,129,1,0,0,0,631,632,5,46,0,0,632,131,1,0,0,0,633,634,5,94,0,0,634, + 635,7,0,0,0,635,133,1,0,0,0,636,637,5,94,0,0,637,638,7,1,0,0,638,135,1, + 0,0,0,639,641,3,138,68,0,640,639,1,0,0,0,641,642,1,0,0,0,642,640,1,0,0, + 0,642,643,1,0,0,0,643,644,1,0,0,0,644,648,5,46,0,0,645,647,3,138,68,0,646, + 645,1,0,0,0,647,650,1,0,0,0,648,646,1,0,0,0,648,649,1,0,0,0,649,652,1,0, + 0,0,650,648,1,0,0,0,651,653,3,142,70,0,652,651,1,0,0,0,652,653,1,0,0,0, + 653,672,1,0,0,0,654,656,5,46,0,0,655,657,3,138,68,0,656,655,1,0,0,0,657, + 658,1,0,0,0,658,656,1,0,0,0,658,659,1,0,0,0,659,661,1,0,0,0,660,662,3,142, + 70,0,661,660,1,0,0,0,661,662,1,0,0,0,662,672,1,0,0,0,663,665,3,138,68,0, + 664,663,1,0,0,0,665,666,1,0,0,0,666,664,1,0,0,0,666,667,1,0,0,0,667,669, + 1,0,0,0,668,670,3,142,70,0,669,668,1,0,0,0,669,670,1,0,0,0,670,672,1,0, + 0,0,671,640,1,0,0,0,671,654,1,0,0,0,671,664,1,0,0,0,672,137,1,0,0,0,673, + 674,7,0,0,0,674,139,1,0,0,0,675,679,7,1,0,0,676,678,7,4,0,0,677,676,1,0, + 0,0,678,681,1,0,0,0,679,677,1,0,0,0,679,680,1,0,0,0,680,141,1,0,0,0,681, + 679,1,0,0,0,682,684,7,5,0,0,683,685,7,6,0,0,684,683,1,0,0,0,684,685,1,0, + 0,0,685,687,1,0,0,0,686,688,3,138,68,0,687,686,1,0,0,0,688,689,1,0,0,0, + 689,687,1,0,0,0,689,690,1,0,0,0,690,726,1,0,0,0,691,693,5,32,0,0,692,691, + 1,0,0,0,693,696,1,0,0,0,694,692,1,0,0,0,694,695,1,0,0,0,695,699,1,0,0,0, + 696,694,1,0,0,0,697,700,3,48,23,0,698,700,3,50,24,0,699,697,1,0,0,0,699, + 698,1,0,0,0,700,704,1,0,0,0,701,703,5,32,0,0,702,701,1,0,0,0,703,706,1, + 0,0,0,704,702,1,0,0,0,704,705,1,0,0,0,705,707,1,0,0,0,706,704,1,0,0,0,707, + 708,5,49,0,0,708,709,5,48,0,0,709,710,1,0,0,0,710,723,3,116,57,0,711,724, + 3,138,68,0,712,714,3,8,3,0,713,715,7,6,0,0,714,713,1,0,0,0,714,715,1,0, + 0,0,715,717,1,0,0,0,716,718,3,138,68,0,717,716,1,0,0,0,718,719,1,0,0,0, + 719,717,1,0,0,0,719,720,1,0,0,0,720,721,1,0,0,0,721,722,3,10,4,0,722,724, + 1,0,0,0,723,711,1,0,0,0,723,712,1,0,0,0,724,726,1,0,0,0,725,682,1,0,0,0, + 725,694,1,0,0,0,726,143,1,0,0,0,727,867,5,92,0,0,728,729,5,97,0,0,729,730, + 5,108,0,0,730,731,5,112,0,0,731,732,5,104,0,0,732,868,5,97,0,0,733,734, + 5,98,0,0,734,735,5,101,0,0,735,736,5,116,0,0,736,868,5,97,0,0,737,738,5, + 103,0,0,738,739,5,97,0,0,739,740,5,109,0,0,740,741,5,109,0,0,741,868,5, + 97,0,0,742,743,5,100,0,0,743,744,5,101,0,0,744,745,5,108,0,0,745,746,5, + 116,0,0,746,868,5,97,0,0,747,748,5,101,0,0,748,749,5,112,0,0,749,750,5, + 115,0,0,750,751,5,105,0,0,751,752,5,108,0,0,752,753,5,111,0,0,753,868,5, + 110,0,0,754,755,5,122,0,0,755,756,5,101,0,0,756,757,5,116,0,0,757,868,5, + 97,0,0,758,759,5,101,0,0,759,760,5,116,0,0,760,868,5,97,0,0,761,762,5,116, + 0,0,762,763,5,104,0,0,763,764,5,101,0,0,764,765,5,116,0,0,765,868,5,97, + 0,0,766,767,5,105,0,0,767,768,5,111,0,0,768,769,5,116,0,0,769,868,5,97, + 0,0,770,771,5,107,0,0,771,772,5,97,0,0,772,773,5,112,0,0,773,774,5,112, + 0,0,774,868,5,97,0,0,775,776,5,108,0,0,776,777,5,97,0,0,777,778,5,109,0, + 0,778,779,5,98,0,0,779,780,5,100,0,0,780,868,5,97,0,0,781,782,5,109,0,0, + 782,868,5,117,0,0,783,784,5,110,0,0,784,868,5,117,0,0,785,786,5,120,0,0, + 786,868,5,105,0,0,787,788,5,114,0,0,788,789,5,104,0,0,789,868,5,111,0,0, + 790,791,5,115,0,0,791,792,5,105,0,0,792,793,5,103,0,0,793,794,5,109,0,0, + 794,868,5,97,0,0,795,796,5,116,0,0,796,797,5,97,0,0,797,868,5,117,0,0,798, + 799,5,117,0,0,799,800,5,112,0,0,800,801,5,115,0,0,801,802,5,105,0,0,802, + 803,5,108,0,0,803,804,5,111,0,0,804,868,5,110,0,0,805,806,5,112,0,0,806, + 807,5,104,0,0,807,868,5,105,0,0,808,809,5,99,0,0,809,810,5,104,0,0,810, + 868,5,105,0,0,811,812,5,112,0,0,812,813,5,115,0,0,813,868,5,105,0,0,814, + 815,5,111,0,0,815,816,5,109,0,0,816,817,5,101,0,0,817,818,5,103,0,0,818, + 868,5,97,0,0,819,820,5,71,0,0,820,821,5,97,0,0,821,822,5,109,0,0,822,823, + 5,109,0,0,823,868,5,97,0,0,824,825,5,68,0,0,825,826,5,101,0,0,826,827,5, + 108,0,0,827,828,5,116,0,0,828,868,5,97,0,0,829,830,5,84,0,0,830,831,5,104, + 0,0,831,832,5,101,0,0,832,833,5,116,0,0,833,868,5,97,0,0,834,835,5,76,0, + 0,835,836,5,97,0,0,836,837,5,109,0,0,837,838,5,98,0,0,838,839,5,100,0,0, + 839,868,5,97,0,0,840,841,5,88,0,0,841,868,5,105,0,0,842,843,5,80,0,0,843, + 868,5,105,0,0,844,845,5,83,0,0,845,846,5,105,0,0,846,847,5,103,0,0,847, + 848,5,109,0,0,848,868,5,97,0,0,849,850,5,85,0,0,850,851,5,112,0,0,851,852, + 5,115,0,0,852,853,5,105,0,0,853,854,5,108,0,0,854,855,5,111,0,0,855,868, + 5,110,0,0,856,857,5,80,0,0,857,858,5,104,0,0,858,868,5,105,0,0,859,860, + 5,80,0,0,860,861,5,115,0,0,861,868,5,105,0,0,862,863,5,79,0,0,863,864,5, + 109,0,0,864,865,5,101,0,0,865,866,5,103,0,0,866,868,5,97,0,0,867,728,1, + 0,0,0,867,733,1,0,0,0,867,737,1,0,0,0,867,742,1,0,0,0,867,747,1,0,0,0,867, + 754,1,0,0,0,867,758,1,0,0,0,867,761,1,0,0,0,867,766,1,0,0,0,867,770,1,0, + 0,0,867,775,1,0,0,0,867,781,1,0,0,0,867,783,1,0,0,0,867,785,1,0,0,0,867, + 787,1,0,0,0,867,790,1,0,0,0,867,795,1,0,0,0,867,798,1,0,0,0,867,805,1,0, + 0,0,867,808,1,0,0,0,867,811,1,0,0,0,867,814,1,0,0,0,867,819,1,0,0,0,867, + 824,1,0,0,0,867,829,1,0,0,0,867,834,1,0,0,0,867,840,1,0,0,0,867,842,1,0, + 0,0,867,844,1,0,0,0,867,849,1,0,0,0,867,856,1,0,0,0,867,859,1,0,0,0,867, + 862,1,0,0,0,868,145,1,0,0,0,869,870,5,92,0,0,870,871,5,98,0,0,871,872,5, + 101,0,0,872,873,5,103,0,0,873,874,5,105,0,0,874,875,5,110,0,0,875,876,5, + 123,0,0,876,877,5,98,0,0,877,878,5,109,0,0,878,879,5,97,0,0,879,880,5,116, + 0,0,880,881,5,114,0,0,881,882,5,105,0,0,882,883,5,120,0,0,883,884,5,125, + 0,0,884,147,1,0,0,0,885,886,5,92,0,0,886,887,5,101,0,0,887,888,5,110,0, + 0,888,889,5,100,0,0,889,890,5,123,0,0,890,891,5,98,0,0,891,892,5,109,0, + 0,892,893,5,97,0,0,893,894,5,116,0,0,894,895,5,114,0,0,895,896,5,105,0, + 0,896,897,5,120,0,0,897,898,5,125,0,0,898,149,1,0,0,0,899,900,5,38,0,0, + 900,151,1,0,0,0,901,902,5,92,0,0,902,903,5,92,0,0,903,153,1,0,0,0,904,906, + 7,2,0,0,905,904,1,0,0,0,906,909,1,0,0,0,907,905,1,0,0,0,907,908,1,0,0,0, + 908,910,1,0,0,0,909,907,1,0,0,0,910,911,5,95,0,0,911,912,5,123,0,0,912, + 914,1,0,0,0,913,915,7,4,0,0,914,913,1,0,0,0,915,916,1,0,0,0,916,914,1,0, + 0,0,916,917,1,0,0,0,917,918,1,0,0,0,918,930,5,125,0,0,919,921,7,2,0,0,920, + 919,1,0,0,0,921,924,1,0,0,0,922,920,1,0,0,0,922,923,1,0,0,0,923,927,1,0, + 0,0,924,922,1,0,0,0,925,928,3,24,11,0,926,928,3,22,10,0,927,925,1,0,0,0, + 927,926,1,0,0,0,928,930,1,0,0,0,929,907,1,0,0,0,929,922,1,0,0,0,930,155, + 1,0,0,0,931,932,5,94,0,0,932,933,7,1,0,0,933,934,3,154,76,0,934,157,1,0, + 0,0,935,938,3,140,69,0,936,938,3,144,71,0,937,935,1,0,0,0,937,936,1,0,0, + 0,938,940,1,0,0,0,939,941,3,154,76,0,940,939,1,0,0,0,940,941,1,0,0,0,941, + 159,1,0,0,0,942,944,7,7,0,0,943,942,1,0,0,0,944,945,1,0,0,0,945,943,1,0, + 0,0,945,946,1,0,0,0,946,947,1,0,0,0,947,948,6,79,1,0,948,161,1,0,0,0,949, + 950,5,92,0,0,950,951,5,32,0,0,951,952,1,0,0,0,952,953,6,80,1,0,953,163, + 1,0,0,0,954,955,5,92,0,0,955,956,5,58,0,0,956,957,1,0,0,0,957,958,6,81, + 1,0,958,165,1,0,0,0,959,960,5,160,0,0,960,961,1,0,0,0,961,962,6,82,1,0, + 962,167,1,0,0,0,963,964,9,0,0,0,964,169,1,0,0,0,965,966,5,93,0,0,966,967, + 1,0,0,0,967,968,6,84,2,0,968,171,1,0,0,0,969,970,5,92,0,0,970,971,5,114, + 0,0,971,972,5,98,0,0,972,973,5,114,0,0,973,974,5,97,0,0,974,975,5,99,0, + 0,975,976,5,107,0,0,976,977,1,0,0,0,977,978,6,85,2,0,978,173,1,0,0,0,979, + 980,5,92,0,0,980,981,5,102,0,0,981,982,5,114,0,0,982,983,5,97,0,0,983,984, + 5,99,0,0,984,175,1,0,0,0,985,986,5,92,0,0,986,987,5,102,0,0,987,988,5,114, + 0,0,988,989,5,97,0,0,989,990,5,99,0,0,990,994,1,0,0,0,991,993,7,2,0,0,992, + 991,1,0,0,0,993,996,1,0,0,0,994,992,1,0,0,0,994,995,1,0,0,0,995,997,1,0, + 0,0,996,994,1,0,0,0,997,998,7,0,0,0,998,999,7,0,0,0,999,177,1,0,0,0,1000, + 1001,5,92,0,0,1001,1002,5,99,0,0,1002,1003,5,100,0,0,1003,1004,5,111,0, + 0,1004,1005,5,116,0,0,1005,179,1,0,0,0,1006,1007,5,92,0,0,1007,1008,5,116, + 0,0,1008,1009,5,105,0,0,1009,1010,5,109,0,0,1010,1011,5,101,0,0,1011,1012, + 5,115,0,0,1012,181,1,0,0,0,1013,1014,5,92,0,0,1014,1015,5,115,0,0,1015, + 1016,5,113,0,0,1016,1017,5,114,0,0,1017,1018,5,116,0,0,1018,183,1,0,0,0, + 1019,1020,5,44,0,0,1020,185,1,0,0,0,1021,1022,5,94,0,0,1022,187,1,0,0,0, + 1023,1027,7,1,0,0,1024,1026,7,4,0,0,1025,1024,1,0,0,0,1026,1029,1,0,0,0, + 1027,1025,1,0,0,0,1027,1028,1,0,0,0,1028,189,1,0,0,0,1029,1027,1,0,0,0, + 1030,1031,5,40,0,0,1031,191,1,0,0,0,1032,1033,5,41,0,0,1033,193,1,0,0,0, + 1034,1035,5,123,0,0,1035,195,1,0,0,0,1036,1037,5,125,0,0,1037,197,1,0,0, + 0,1038,1039,5,49,0,0,1039,199,1,0,0,0,1040,1042,5,45,0,0,1041,1040,1,0, + 0,0,1041,1042,1,0,0,0,1042,1044,1,0,0,0,1043,1045,3,202,100,0,1044,1043, + 1,0,0,0,1045,1046,1,0,0,0,1046,1044,1,0,0,0,1046,1047,1,0,0,0,1047,1048, + 1,0,0,0,1048,1052,5,46,0,0,1049,1051,3,202,100,0,1050,1049,1,0,0,0,1051, + 1054,1,0,0,0,1052,1050,1,0,0,0,1052,1053,1,0,0,0,1053,1073,1,0,0,0,1054, + 1052,1,0,0,0,1055,1057,5,45,0,0,1056,1055,1,0,0,0,1056,1057,1,0,0,0,1057, + 1058,1,0,0,0,1058,1060,5,46,0,0,1059,1061,3,202,100,0,1060,1059,1,0,0,0, + 1061,1062,1,0,0,0,1062,1060,1,0,0,0,1062,1063,1,0,0,0,1063,1073,1,0,0,0, + 1064,1066,5,45,0,0,1065,1064,1,0,0,0,1065,1066,1,0,0,0,1066,1068,1,0,0, + 0,1067,1069,3,202,100,0,1068,1067,1,0,0,0,1069,1070,1,0,0,0,1070,1068,1, + 0,0,0,1070,1071,1,0,0,0,1071,1073,1,0,0,0,1072,1041,1,0,0,0,1072,1056,1, + 0,0,0,1072,1065,1,0,0,0,1073,201,1,0,0,0,1074,1075,7,0,0,0,1075,203,1,0, + 0,0,1076,1077,5,92,0,0,1077,1078,5,108,0,0,1078,1079,5,101,0,0,1079,1080, + 5,102,0,0,1080,1081,5,116,0,0,1081,1082,1,0,0,0,1082,1083,6,101,1,0,1083, + 205,1,0,0,0,1084,1085,5,92,0,0,1085,1086,5,114,0,0,1086,1087,5,105,0,0, + 1087,1088,5,103,0,0,1088,1089,5,104,0,0,1089,1090,5,116,0,0,1090,1091,1, + 0,0,0,1091,1092,6,102,1,0,1092,207,1,0,0,0,1093,1095,7,7,0,0,1094,1093, + 1,0,0,0,1095,1096,1,0,0,0,1096,1094,1,0,0,0,1096,1097,1,0,0,0,1097,1098, + 1,0,0,0,1098,1099,6,103,1,0,1099,209,1,0,0,0,1100,1101,5,92,0,0,1101,1102, + 5,32,0,0,1102,1103,1,0,0,0,1103,1104,6,104,1,0,1104,211,1,0,0,0,1105,1106, + 5,92,0,0,1106,1107,5,58,0,0,1107,1108,1,0,0,0,1108,1109,6,105,1,0,1109, + 213,1,0,0,0,1110,1111,5,160,0,0,1111,1112,1,0,0,0,1112,1113,6,106,1,0,1113, + 215,1,0,0,0,1114,1115,9,0,0,0,1115,217,1,0,0,0,56,0,1,251,287,300,313,326, + 354,388,441,443,451,533,546,559,574,588,600,642,648,652,658,661,666,669, + 671,679,684,689,694,699,704,714,719,723,725,867,907,916,922,927,929,937, + 940,945,994,1027,1041,1046,1052,1056,1062,1065,1070,1072,1096,3,2,1,0,6, + 0,0,2,0,0]; private static __ATN: ATN; public static get _ATN(): ATN { diff --git a/src/parser/LatexParser.g4 b/src/parser/LatexParser.g4 index da74ba1d..912ccdc7 100644 --- a/src/parser/LatexParser.g4 +++ b/src/parser/LatexParser.g4 @@ -114,6 +114,7 @@ expr: id CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT #exp | user_function #userFunction | builtin_function #builtinFunction | PI #piExpr + | INFINITY #infinityExpr | L_PAREN expr R_PAREN #subExpr | expr UNDERSCORE L_BRACE R_BRACE #emptySubscript | expr CARET L_BRACE R_BRACE #emptySuperscript diff --git a/src/parser/LatexParser.ts b/src/parser/LatexParser.ts index ab48c473..878a993d 100644 --- a/src/parser/LatexParser.ts +++ b/src/parser/LatexParser.ts @@ -31,94 +31,95 @@ export default class LatexParser extends Parser { public static readonly UNDERSCORE = 10; public static readonly EXCLAMATION = 11; public static readonly PI = 12; - public static readonly CMD_INT = 13; - public static readonly CMD_INT_UNDERSCORE = 14; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 15; - public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 16; - public static readonly CMD_SUM_UNDERSCORE = 17; - public static readonly CMD_MATHRM = 18; - public static readonly CMD_FRAC = 19; - public static readonly CMD_FRAC_INTS = 20; - public static readonly CMD_CDOT = 21; - public static readonly CMD_TIMES = 22; - public static readonly CMD_SQRT = 23; - public static readonly CMD_SQRT_INT = 24; - public static readonly CMD_SIM = 25; - public static readonly CMD_APPROX = 26; - public static readonly CMD_PLACEHOLDER = 27; - public static readonly TRANSPOSE = 28; - public static readonly BACKSLASH = 29; - public static readonly AS_LINES = 30; - public static readonly CMD_SIN = 31; - public static readonly CMD_COS = 32; - public static readonly CMD_TAN = 33; - public static readonly CMD_COT = 34; - public static readonly CMD_SEC = 35; - public static readonly CMD_CSC = 36; - public static readonly CMD_ARCSIN = 37; - public static readonly CMD_ARCCOS = 38; - public static readonly CMD_ARCTAN = 39; - public static readonly CMD_SINH = 40; - public static readonly CMD_COSH = 41; - public static readonly CMD_TANH = 42; - public static readonly CMD_COTH = 43; - public static readonly CMD_LN = 44; - public static readonly CMD_LOG = 45; - public static readonly CMD_SLASH_LOG_UNDERSCORE = 46; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 47; - public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 48; - public static readonly COMMENT = 49; - public static readonly CMD_LEFT = 50; - public static readonly CMD_RIGHT = 51; - public static readonly DOUBLE_DOLLAR_SIGN = 52; - public static readonly ADD = 53; - public static readonly SUB = 54; - public static readonly CARET = 55; - public static readonly EQ = 56; - public static readonly LT = 57; - public static readonly GT = 58; - public static readonly LTE = 59; - public static readonly GTE = 60; - public static readonly COMMA = 61; - public static readonly DECIMAL_POINT = 62; - public static readonly CARET_SINGLE_CHAR_NUMBER = 63; - public static readonly CARET_SINGLE_CHAR_ID = 64; - public static readonly NUMBER = 65; - public static readonly BEGIN_MATRIX = 66; - public static readonly END_MATRIX = 67; - public static readonly AMPERSAND = 68; - public static readonly DOUBLE_BACKSLASH = 69; - public static readonly UNDERSCORE_SUBSCRIPT = 70; - public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 71; - public static readonly ID = 72; - public static readonly WS = 73; - public static readonly SLASH_SPACE = 74; - public static readonly SLASH_COLON = 75; - public static readonly NBSP = 76; - public static readonly ERROR_CHAR = 77; - public static readonly R_BRACKET = 78; - public static readonly ALT_R_BRACKET = 79; - public static readonly U_CMD_FRAC = 80; - public static readonly U_CMD_FRAC_INTS = 81; - public static readonly U_CMD_CDOT = 82; - public static readonly U_CMD_TIMES = 83; - public static readonly U_CMD_SQRT = 84; - public static readonly U_COMMA = 85; - public static readonly U_CARET = 86; - public static readonly U_NAME = 87; - public static readonly U_L_PAREN = 88; - public static readonly U_R_PAREN = 89; - public static readonly U_L_BRACE = 90; - public static readonly U_R_BRACE = 91; - public static readonly U_ONE = 92; - public static readonly U_NUMBER = 93; - public static readonly U_CMD_LEFT = 94; - public static readonly U_CMD_RIGHT = 95; - public static readonly U_WS = 96; - public static readonly U_SLASH_SPACE = 97; - public static readonly U_SLASH_COLON = 98; - public static readonly U_NBSP = 99; - public static readonly U_ERROR_CHAR = 100; + public static readonly INFINITY = 13; + public static readonly CMD_INT = 14; + public static readonly CMD_INT_UNDERSCORE = 15; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER = 16; + public static readonly CMD_INT_UNDERSCORE_SINGLE_CHAR_ID = 17; + public static readonly CMD_SUM_UNDERSCORE = 18; + public static readonly CMD_MATHRM = 19; + public static readonly CMD_FRAC = 20; + public static readonly CMD_FRAC_INTS = 21; + public static readonly CMD_CDOT = 22; + public static readonly CMD_TIMES = 23; + public static readonly CMD_SQRT = 24; + public static readonly CMD_SQRT_INT = 25; + public static readonly CMD_SIM = 26; + public static readonly CMD_APPROX = 27; + public static readonly CMD_PLACEHOLDER = 28; + public static readonly TRANSPOSE = 29; + public static readonly BACKSLASH = 30; + public static readonly AS_LINES = 31; + public static readonly CMD_SIN = 32; + public static readonly CMD_COS = 33; + public static readonly CMD_TAN = 34; + public static readonly CMD_COT = 35; + public static readonly CMD_SEC = 36; + public static readonly CMD_CSC = 37; + public static readonly CMD_ARCSIN = 38; + public static readonly CMD_ARCCOS = 39; + public static readonly CMD_ARCTAN = 40; + public static readonly CMD_SINH = 41; + public static readonly CMD_COSH = 42; + public static readonly CMD_TANH = 43; + public static readonly CMD_COTH = 44; + public static readonly CMD_LN = 45; + public static readonly CMD_LOG = 46; + public static readonly CMD_SLASH_LOG_UNDERSCORE = 47; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_NUMBER = 48; + public static readonly CMD_SLASH_LOG_UNDERSCORE_SINGLE_CHAR_ID = 49; + public static readonly COMMENT = 50; + public static readonly CMD_LEFT = 51; + public static readonly CMD_RIGHT = 52; + public static readonly DOUBLE_DOLLAR_SIGN = 53; + public static readonly ADD = 54; + public static readonly SUB = 55; + public static readonly CARET = 56; + public static readonly EQ = 57; + public static readonly LT = 58; + public static readonly GT = 59; + public static readonly LTE = 60; + public static readonly GTE = 61; + public static readonly COMMA = 62; + public static readonly DECIMAL_POINT = 63; + public static readonly CARET_SINGLE_CHAR_NUMBER = 64; + public static readonly CARET_SINGLE_CHAR_ID = 65; + public static readonly NUMBER = 66; + public static readonly BEGIN_MATRIX = 67; + public static readonly END_MATRIX = 68; + public static readonly AMPERSAND = 69; + public static readonly DOUBLE_BACKSLASH = 70; + public static readonly UNDERSCORE_SUBSCRIPT = 71; + public static readonly CARET_SINGLE_CHAR_ID_UNDERSCORE_SUBSCRIPT = 72; + public static readonly ID = 73; + public static readonly WS = 74; + public static readonly SLASH_SPACE = 75; + public static readonly SLASH_COLON = 76; + public static readonly NBSP = 77; + public static readonly ERROR_CHAR = 78; + public static readonly R_BRACKET = 79; + public static readonly ALT_R_BRACKET = 80; + public static readonly U_CMD_FRAC = 81; + public static readonly U_CMD_FRAC_INTS = 82; + public static readonly U_CMD_CDOT = 83; + public static readonly U_CMD_TIMES = 84; + public static readonly U_CMD_SQRT = 85; + public static readonly U_COMMA = 86; + public static readonly U_CARET = 87; + public static readonly U_NAME = 88; + public static readonly U_L_PAREN = 89; + public static readonly U_R_PAREN = 90; + public static readonly U_L_BRACE = 91; + public static readonly U_R_BRACE = 92; + public static readonly U_ONE = 93; + public static readonly U_NUMBER = 94; + public static readonly U_CMD_LEFT = 95; + public static readonly U_CMD_RIGHT = 96; + public static readonly U_WS = 97; + public static readonly U_SLASH_SPACE = 98; + public static readonly U_SLASH_COLON = 99; + public static readonly U_NBSP = 100; + public static readonly U_ERROR_CHAR = 101; public static readonly EOF = Token.EOF; public static readonly RULE_statement = 0; public static readonly RULE_scatter_plot_query = 1; @@ -162,6 +163,7 @@ export default class LatexParser extends Parser { null, "'|'", null, "'_'", "'!'", "'\\pi'", + "'\\infty'", "'\\int'", null, null, null, null, "'\\mathrm'", @@ -218,7 +220,8 @@ export default class LatexParser extends Parser { "VBAR", "DOUBLE_VBAR", "UNDERSCORE", "EXCLAMATION", - "PI", "CMD_INT", + "PI", "INFINITY", + "CMD_INT", "CMD_INT_UNDERSCORE", "CMD_INT_UNDERSCORE_SINGLE_CHAR_NUMBER", "CMD_INT_UNDERSCORE_SINGLE_CHAR_ID", @@ -492,7 +495,7 @@ export default class LatexParser extends Parser { this.state = 104; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===30) { + if (_la===31) { { this.state = 103; this.match(LatexParser.AS_LINES); @@ -585,7 +588,7 @@ export default class LatexParser extends Parser { this.state = 133; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===72) { + if (_la===73) { { this.state = 129; localctx._points_id_0 = this.match(LatexParser.ID); @@ -758,7 +761,7 @@ export default class LatexParser extends Parser { this.state = 168; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===54) { + if (_la===55) { { this.state = 167; this.match(LatexParser.SUB); @@ -793,8 +796,8 @@ export default class LatexParser extends Parser { this.state = 175; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 54: - case 65: + case 55: + case 66: { this.state = 172; this.number_(); @@ -806,7 +809,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.PI); } break; - case 72: + case 73: { this.state = 174; this.id(); @@ -843,7 +846,7 @@ export default class LatexParser extends Parser { this.state = 181; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 72: + case 73: { this.state = 179; this.id(); @@ -903,7 +906,7 @@ export default class LatexParser extends Parser { this.state = 191; this._errHandler.sync(this); _la = this._input.LA(1); - } while (_la===61); + } while (_la===62); } } catch (re) { @@ -1036,7 +1039,7 @@ export default class LatexParser extends Parser { this.state = 209; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 72: + case 73: { this.state = 207; this.id(); @@ -1063,7 +1066,7 @@ export default class LatexParser extends Parser { this.state = 219; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===61) { + while (_la===62) { { { this.state = 215; @@ -1139,7 +1142,7 @@ export default class LatexParser extends Parser { this.state = 231; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===29) { + if (_la===30) { { this.state = 230; this.match(LatexParser.BACKSLASH); @@ -1148,7 +1151,7 @@ export default class LatexParser extends Parser { this.state = 233; _la = this._input.LA(1); - if(!(((((_la - 31)) & ~0x1F) === 0 && ((1 << (_la - 31)) & 8191) !== 0))) { + if(!(((((_la - 32)) & ~0x1F) === 0 && ((1 << (_la - 32)) & 8191) !== 0))) { this._errHandler.recoverInline(this); } else { @@ -1187,13 +1190,13 @@ export default class LatexParser extends Parser { this.state = 245; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 13: + case 14: { this.state = 238; this.match(LatexParser.CMD_INT); } break; - case 14: + case 15: { { this.state = 239; @@ -1223,7 +1226,7 @@ export default class LatexParser extends Parser { this.state = 256; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 18: + case 19: { this.state = 250; this.match(LatexParser.CMD_MATHRM); @@ -1235,7 +1238,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 72: + case 73: { this.state = 255; this.id(); @@ -1277,7 +1280,7 @@ export default class LatexParser extends Parser { this.state = 268; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 14: + case 15: { { this.state = 262; @@ -1291,12 +1294,12 @@ export default class LatexParser extends Parser { } } break; - case 15: case 16: + case 17: { this.state = 267; _la = this._input.LA(1); - if(!(_la===15 || _la===16)) { + if(!(_la===16 || _la===17)) { this._errHandler.recoverInline(this); } else { @@ -1311,7 +1314,7 @@ export default class LatexParser extends Parser { this.state = 276; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 55: + case 56: { { this.state = 270; @@ -1325,12 +1328,12 @@ export default class LatexParser extends Parser { } } break; - case 63: case 64: + case 65: { this.state = 275; _la = this._input.LA(1); - if(!(_la===63 || _la===64)) { + if(!(_la===64 || _la===65)) { this._errHandler.recoverInline(this); } else { @@ -1351,7 +1354,7 @@ export default class LatexParser extends Parser { this.state = 287; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 18: + case 19: { this.state = 281; this.match(LatexParser.CMD_MATHRM); @@ -1363,7 +1366,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 72: + case 73: { this.state = 286; this.id(); @@ -1419,7 +1422,7 @@ export default class LatexParser extends Parser { this.state = 306; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 55: + case 56: { { this.state = 300; @@ -1433,12 +1436,12 @@ export default class LatexParser extends Parser { } } break; - case 63: case 64: + case 65: { this.state = 305; _la = this._input.LA(1); - if(!(_la===63 || _la===64)) { + if(!(_la===64 || _la===65)) { this._errHandler.recoverInline(this); } else { @@ -1486,7 +1489,7 @@ export default class LatexParser extends Parser { this.state = 320; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 18: + case 19: { this.state = 314; localctx._MATHRM_0 = this.match(LatexParser.CMD_MATHRM); @@ -1498,7 +1501,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 72: + case 73: { this.state = 319; this.id(); @@ -1514,7 +1517,7 @@ export default class LatexParser extends Parser { this.state = 330; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 18: + case 19: { this.state = 324; localctx._MATHRM_1 = this.match(LatexParser.CMD_MATHRM); @@ -1526,7 +1529,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 72: + case 73: { this.state = 329; this.id(); @@ -1579,7 +1582,7 @@ export default class LatexParser extends Parser { this.state = 348; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 18: + case 19: { this.state = 342; localctx._MATHRM_0 = this.match(LatexParser.CMD_MATHRM); @@ -1591,7 +1594,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 72: + case 73: { this.state = 347; this.id(); @@ -1603,7 +1606,7 @@ export default class LatexParser extends Parser { this.state = 356; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 55: + case 56: { { this.state = 350; @@ -1617,7 +1620,7 @@ export default class LatexParser extends Parser { } } break; - case 63: + case 64: { this.state = 355; localctx._single_char_exp1 = this.match(LatexParser.CARET_SINGLE_CHAR_NUMBER); @@ -1633,7 +1636,7 @@ export default class LatexParser extends Parser { this.state = 366; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 18: + case 19: { this.state = 360; localctx._MATHRM_1 = this.match(LatexParser.CMD_MATHRM); @@ -1645,7 +1648,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 72: + case 73: { this.state = 365; this.id(); @@ -1663,7 +1666,7 @@ export default class LatexParser extends Parser { this.state = 377; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 55: + case 56: { { this.state = 371; @@ -1677,7 +1680,7 @@ export default class LatexParser extends Parser { } } break; - case 63: + case 64: { this.state = 376; localctx._single_char_exp2 = this.match(LatexParser.CARET_SINGLE_CHAR_NUMBER); @@ -1741,7 +1744,7 @@ export default class LatexParser extends Parser { this.state = 389; localctx._lower = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===57 || _la===59)) { + if(!(_la===58 || _la===60)) { localctx._lower = this._errHandler.recoverInline(this); } else { @@ -1753,7 +1756,7 @@ export default class LatexParser extends Parser { this.state = 391; localctx._upper = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===57 || _la===59)) { + if(!(_la===58 || _la===60)) { localctx._upper = this._errHandler.recoverInline(this); } else { @@ -1844,7 +1847,7 @@ export default class LatexParser extends Parser { this.state = 405; this._errHandler.sync(this); _la = this._input.LA(1); - } while (_la===61); + } while (_la===62); } } catch (re) { @@ -1873,7 +1876,7 @@ export default class LatexParser extends Parser { this.id(); this.state = 408; _la = this._input.LA(1); - if(!(_la===25 || _la===26)) { + if(!(_la===26 || _la===27)) { this._errHandler.recoverInline(this); } else { @@ -1937,7 +1940,7 @@ export default class LatexParser extends Parser { this.state = 418; this._errHandler.sync(this); _la = this._input.LA(1); - } while (_la===61); + } while (_la===62); } } catch (re) { @@ -1967,7 +1970,7 @@ export default class LatexParser extends Parser { this.state = 421; localctx._operator = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 57)) & ~0x1F) === 0 && ((1 << (_la - 57)) & 15) !== 0))) { + if(!(((((_la - 58)) & ~0x1F) === 0 && ((1 << (_la - 58)) & 15) !== 0))) { localctx._operator = this._errHandler.recoverInline(this); } else { @@ -2005,7 +2008,7 @@ export default class LatexParser extends Parser { this.state = 425; localctx._lower = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 57)) & ~0x1F) === 0 && ((1 << (_la - 57)) & 15) !== 0))) { + if(!(((((_la - 58)) & ~0x1F) === 0 && ((1 << (_la - 58)) & 15) !== 0))) { localctx._lower = this._errHandler.recoverInline(this); } else { @@ -2017,7 +2020,7 @@ export default class LatexParser extends Parser { this.state = 427; localctx._upper = this._input.LT(1); _la = this._input.LA(1); - if(!(((((_la - 57)) & ~0x1F) === 0 && ((1 << (_la - 57)) & 15) !== 0))) { + if(!(((((_la - 58)) & ~0x1F) === 0 && ((1 << (_la - 58)) & 15) !== 0))) { localctx._upper = this._errHandler.recoverInline(this); } else { @@ -2055,7 +2058,7 @@ export default class LatexParser extends Parser { this.state = 435; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===68) { + while (_la===69) { { { this.state = 431; @@ -2102,7 +2105,7 @@ export default class LatexParser extends Parser { this.state = 445; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===61) { + while (_la===62) { { { this.state = 441; @@ -2159,7 +2162,7 @@ export default class LatexParser extends Parser { this.state = 461; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 18: + case 19: { this.state = 455; this.match(LatexParser.CMD_MATHRM); @@ -2171,7 +2174,7 @@ export default class LatexParser extends Parser { this.match(LatexParser.R_BRACE); } break; - case 72: + case 73: { this.state = 460; this.id(); @@ -2188,7 +2191,7 @@ export default class LatexParser extends Parser { this.state = 469; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===61) { + while (_la===62) { { { this.state = 465; @@ -2240,7 +2243,7 @@ export default class LatexParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 604; + this.state = 605; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 47, this._ctx) ) { case 1: @@ -2264,7 +2267,7 @@ export default class LatexParser extends Parser { this.id(); this.state = 479; _la = this._input.LA(1); - if(!(_la===63 || _la===64)) { + if(!(_la===64 || _la===65)) { this._errHandler.recoverInline(this); } else { @@ -2330,7 +2333,7 @@ export default class LatexParser extends Parser { this.state = 501; this._errHandler.sync(this); _la = this._input.LA(1); - while (_la===69) { + while (_la===70) { { { this.state = 497; @@ -2409,7 +2412,7 @@ export default class LatexParser extends Parser { this.state = 513; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===29) { + if (_la===30) { { this.state = 512; this.match(LatexParser.BACKSLASH); @@ -2434,7 +2437,7 @@ export default class LatexParser extends Parser { this.state = 521; this._errHandler.sync(this); _la = this._input.LA(1); - if (_la===29) { + if (_la===30) { { this.state = 520; this.match(LatexParser.BACKSLASH); @@ -2479,7 +2482,7 @@ export default class LatexParser extends Parser { _prevctx = localctx; this.state = 536; _la = this._input.LA(1); - if(!(_la===47 || _la===48)) { + if(!(_la===48 || _la===49)) { this._errHandler.recoverInline(this); } else { @@ -2546,7 +2549,7 @@ export default class LatexParser extends Parser { this.state = 551; this.match(LatexParser.SUB); this.state = 552; - this.expr(30); + this.expr(31); } break; case 22: @@ -2617,145 +2620,154 @@ export default class LatexParser extends Parser { break; case 28: { - localctx = new SubExprContext(this, localctx); + localctx = new InfinityExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; this.state = 566; - this.match(LatexParser.L_PAREN); + this.match(LatexParser.INFINITY); + } + break; + case 29: + { + localctx = new SubExprContext(this, localctx); + this._ctx = localctx; + _prevctx = localctx; this.state = 567; - this.expr(0); + this.match(LatexParser.L_PAREN); this.state = 568; + this.expr(0); + this.state = 569; this.match(LatexParser.R_PAREN); } break; - case 29: + case 30: { localctx = new MissingMultiplicationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 570; - this.number_(); this.state = 571; + this.number_(); + this.state = 572; this.expr(12); } break; - case 30: + case 31: { localctx = new MissingMultiplicationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 573; - this.number_with_units(); this.state = 574; + this.number_with_units(); + this.state = 575; this.expr(11); } break; - case 31: + case 32: { localctx = new MissingMultiplicationContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 576; - this.match(LatexParser.PI); this.state = 577; + this.match(LatexParser.PI); + this.state = 578; this.expr(10); } break; - case 32: + case 33: { localctx = new EmptyPlaceholderContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 578; + this.state = 579; this.match(LatexParser.CMD_PLACEHOLDER); - this.state = 581; + this.state = 582; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 43, this._ctx) ) { case 1: { - this.state = 579; - this.match(LatexParser.L_BRACE); this.state = 580; + this.match(LatexParser.L_BRACE); + this.state = 581; this.match(LatexParser.R_BRACE); } break; } } break; - case 33: + case 34: { localctx = new RemoveOperatorFontContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 588; + this.state = 589; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 44, this._ctx) ) { case 1: { - this.state = 583; - this.match(LatexParser.CMD_MATHRM); this.state = 584; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CMD_MATHRM); this.state = 585; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 586; + this.expr(0); + this.state = 587; this.match(LatexParser.R_BRACE); } break; } - this.state = 593; + this.state = 594; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 62: + case 63: { - this.state = 590; + this.state = 591; this.match(LatexParser.DECIMAL_POINT); } break; - case 54: - case 65: + case 55: + case 66: { - this.state = 591; + this.state = 592; this.number_(); } break; - case 56: + case 57: { - this.state = 592; + this.state = 593; this.match(LatexParser.EQ); } break; - case 18: + case 19: break; default: break; } - this.state = 595; - this.match(LatexParser.CMD_MATHRM); this.state = 596; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CMD_MATHRM); this.state = 597; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 598; + this.expr(0); + this.state = 599; this.match(LatexParser.R_BRACE); - this.state = 602; + this.state = 603; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 46, this._ctx) ) { case 1: { - this.state = 599; + this.state = 600; this.match(LatexParser.DECIMAL_POINT); } break; case 2: { - this.state = 600; + this.state = 601; this.number_(); } break; case 3: { - this.state = 601; + this.state = 602; this.match(LatexParser.EQ); } break; @@ -2764,7 +2776,7 @@ export default class LatexParser extends Parser { break; } this._ctx.stop = this._input.LT(-1); - this.state = 670; + this.state = 671; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 49, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -2774,76 +2786,76 @@ export default class LatexParser extends Parser { } _prevctx = localctx; { - this.state = 668; + this.state = 669; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 48, this._ctx) ) { case 1: { localctx = new MatrixMultiplyContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 606; - if (!(this.precpred(this._ctx, 29))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 29)"); - } this.state = 607; - this.match(LatexParser.CMD_TIMES); + if (!(this.precpred(this._ctx, 30))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 30)"); + } this.state = 608; - this.expr(30); + this.match(LatexParser.CMD_TIMES); + this.state = 609; + this.expr(31); } break; case 2: { localctx = new MultiplyContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 609; - if (!(this.precpred(this._ctx, 28))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 28)"); - } this.state = 610; - this.match(LatexParser.CMD_CDOT); + if (!(this.precpred(this._ctx, 29))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 29)"); + } this.state = 611; - this.expr(29); + this.match(LatexParser.CMD_CDOT); + this.state = 612; + this.expr(30); } break; case 3: { localctx = new SubtractContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 612; - if (!(this.precpred(this._ctx, 25))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 25)"); - } this.state = 613; - this.match(LatexParser.SUB); + if (!(this.precpred(this._ctx, 26))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 26)"); + } this.state = 614; - this.expr(26); + this.match(LatexParser.SUB); + this.state = 615; + this.expr(27); } break; case 4: { localctx = new AddContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 615; - if (!(this.precpred(this._ctx, 24))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 24)"); - } this.state = 616; - this.match(LatexParser.ADD); + if (!(this.precpred(this._ctx, 25))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 25)"); + } this.state = 617; - this.expr(25); + this.match(LatexParser.ADD); + this.state = 618; + this.expr(26); } break; case 5: { localctx = new ExponentContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 618; - if (!(this.precpred(this._ctx, 52))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 52)"); - } this.state = 619; + if (!(this.precpred(this._ctx, 53))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 53)"); + } + this.state = 620; _la = this._input.LA(1); - if(!(_la===63 || _la===64)) { + if(!(_la===64 || _la===65)) { this._errHandler.recoverInline(this); } else { @@ -2856,17 +2868,17 @@ export default class LatexParser extends Parser { { localctx = new ExponentContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 620; - if (!(this.precpred(this._ctx, 51))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 51)"); - } this.state = 621; - this.match(LatexParser.CARET); + if (!(this.precpred(this._ctx, 52))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 52)"); + } this.state = 622; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CARET); this.state = 623; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 624; + this.expr(0); + this.state = 625; this.match(LatexParser.R_BRACE); } break; @@ -2874,21 +2886,21 @@ export default class LatexParser extends Parser { { localctx = new IndexContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 626; - if (!(this.precpred(this._ctx, 50))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 50)"); - } this.state = 627; - this.match(LatexParser.UNDERSCORE); + if (!(this.precpred(this._ctx, 51))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 51)"); + } this.state = 628; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.UNDERSCORE); this.state = 629; - this.expr(0); + this.match(LatexParser.L_BRACE); this.state = 630; - this.match(LatexParser.COMMA); - this.state = 631; this.expr(0); + this.state = 631; + this.match(LatexParser.COMMA); this.state = 632; + this.expr(0); + this.state = 633; this.match(LatexParser.R_BRACE); } break; @@ -2896,11 +2908,11 @@ export default class LatexParser extends Parser { { localctx = new TransposeContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 634; - if (!(this.precpred(this._ctx, 49))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 49)"); - } this.state = 635; + if (!(this.precpred(this._ctx, 50))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 50)"); + } + this.state = 636; this.match(LatexParser.TRANSPOSE); } break; @@ -2908,11 +2920,11 @@ export default class LatexParser extends Parser { { localctx = new FactorialContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 636; - if (!(this.precpred(this._ctx, 48))) { - throw this.createFailedPredicateException("this.precpred(this._ctx, 48)"); - } this.state = 637; + if (!(this.precpred(this._ctx, 49))) { + throw this.createFailedPredicateException("this.precpred(this._ctx, 49)"); + } + this.state = 638; this.match(LatexParser.EXCLAMATION); } break; @@ -2920,15 +2932,15 @@ export default class LatexParser extends Parser { { localctx = new EmptySubscriptContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 638; + this.state = 639; if (!(this.precpred(this._ctx, 18))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 18)"); } - this.state = 639; - this.match(LatexParser.UNDERSCORE); this.state = 640; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.UNDERSCORE); this.state = 641; + this.match(LatexParser.L_BRACE); + this.state = 642; this.match(LatexParser.R_BRACE); } break; @@ -2936,15 +2948,15 @@ export default class LatexParser extends Parser { { localctx = new EmptySuperscriptContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 642; + this.state = 643; if (!(this.precpred(this._ctx, 17))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 17)"); } - this.state = 643; - this.match(LatexParser.CARET); this.state = 644; - this.match(LatexParser.L_BRACE); + this.match(LatexParser.CARET); this.state = 645; + this.match(LatexParser.L_BRACE); + this.state = 646; this.match(LatexParser.R_BRACE); } break; @@ -2952,11 +2964,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 646; + this.state = 647; if (!(this.precpred(this._ctx, 16))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 16)"); } - this.state = 647; + this.state = 648; this.id(); } break; @@ -2964,11 +2976,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 648; + this.state = 649; if (!(this.precpred(this._ctx, 15))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 15)"); } - this.state = 649; + this.state = 650; this.number_(); } break; @@ -2976,11 +2988,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 650; + this.state = 651; if (!(this.precpred(this._ctx, 14))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 14)"); } - this.state = 651; + this.state = 652; this.number_with_units(); } break; @@ -2988,11 +3000,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 652; + this.state = 653; if (!(this.precpred(this._ctx, 13))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 13)"); } - this.state = 653; + this.state = 654; this.match(LatexParser.PI); } break; @@ -3000,11 +3012,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 654; + this.state = 655; if (!(this.precpred(this._ctx, 9))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } - this.state = 655; + this.state = 656; this.user_function(); } break; @@ -3012,11 +3024,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 656; + this.state = 657; if (!(this.precpred(this._ctx, 8))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } - this.state = 657; + this.state = 658; this.builtin_function(); } break; @@ -3024,11 +3036,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 658; + this.state = 659; if (!(this.precpred(this._ctx, 7))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } - this.state = 659; + this.state = 660; this.trig_function(); } break; @@ -3036,11 +3048,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 660; + this.state = 661; if (!(this.precpred(this._ctx, 6))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); } - this.state = 661; + this.state = 662; this.indefinite_integral_cmd(); } break; @@ -3048,11 +3060,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 662; + this.state = 663; if (!(this.precpred(this._ctx, 5))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); } - this.state = 663; + this.state = 664; this.integral_cmd(); } break; @@ -3060,11 +3072,11 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 664; + this.state = 665; if (!(this.precpred(this._ctx, 4))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 4)"); } - this.state = 665; + this.state = 666; this.derivative_cmd(); } break; @@ -3072,18 +3084,18 @@ export default class LatexParser extends Parser { { localctx = new MissingMultiplicationContext(this, new ExprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_expr); - this.state = 666; + this.state = 667; if (!(this.precpred(this._ctx, 3))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 3)"); } - this.state = 667; + this.state = 668; this.n_derivative_cmd(); } break; } } } - this.state = 672; + this.state = 673; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 49, this._ctx); } @@ -3111,7 +3123,7 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 673; + this.state = 674; _la = this._input.LA(1); if(!(_la===1 || _la===2)) { this._errHandler.recoverInline(this); @@ -3120,11 +3132,11 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 674; - this.u_expr(0); this.state = 675; + this.u_expr(0); + this.state = 676; _la = this._input.LA(1); - if(!(_la===78 || _la===79)) { + if(!(_la===79 || _la===80)) { this._errHandler.recoverInline(this); } else { @@ -3155,7 +3167,7 @@ export default class LatexParser extends Parser { try { this.enterOuterAlt(localctx, 1); { - this.state = 677; + this.state = 678; _la = this._input.LA(1); if(!(_la===1 || _la===2)) { this._errHandler.recoverInline(this); @@ -3164,38 +3176,38 @@ export default class LatexParser extends Parser { this._errHandler.reportMatch(this); this.consume(); } - this.state = 678; + this.state = 679; localctx._numRows = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===92 || _la===93)) { + if(!(_la===93 || _la===94)) { localctx._numRows = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 679; + this.state = 680; _la = this._input.LA(1); - if(!(_la===83 || _la===85)) { + if(!(_la===84 || _la===86)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 680; + this.state = 681; localctx._numColumns = this._input.LT(1); _la = this._input.LA(1); - if(!(_la===92 || _la===93)) { + if(!(_la===93 || _la===94)) { localctx._numColumns = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 681; + this.state = 682; _la = this._input.LA(1); - if(!(_la===78 || _la===79)) { + if(!(_la===79 || _la===80)) { this._errHandler.recoverInline(this); } else { @@ -3224,39 +3236,39 @@ export default class LatexParser extends Parser { this.enterRule(localctx, 66, LatexParser.RULE_u_fraction); let _la: number; try { - this.state = 691; + this.state = 692; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 80: + case 81: this.enterOuterAlt(localctx, 1); { - this.state = 683; - this.match(LatexParser.U_CMD_FRAC); this.state = 684; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_CMD_FRAC); this.state = 685; + this.match(LatexParser.U_L_BRACE); + this.state = 686; _la = this._input.LA(1); - if(!(_la===92 || _la===93)) { + if(!(_la===93 || _la===94)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } - this.state = 686; - this.match(LatexParser.U_R_BRACE); this.state = 687; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_R_BRACE); this.state = 688; - this.match(LatexParser.U_NUMBER); + this.match(LatexParser.U_L_BRACE); this.state = 689; + this.match(LatexParser.U_NUMBER); + this.state = 690; this.match(LatexParser.U_R_BRACE); } break; - case 81: + case 82: this.enterOuterAlt(localctx, 2); { - this.state = 690; + this.state = 691; this.match(LatexParser.U_CMD_FRAC_INTS); } break; @@ -3297,84 +3309,84 @@ export default class LatexParser extends Parser { let _alt: number; this.enterOuterAlt(localctx, 1); { - this.state = 715; + this.state = 716; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 84: + case 85: { localctx = new UnitSqrtContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 694; - this.match(LatexParser.U_CMD_SQRT); this.state = 695; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_CMD_SQRT); this.state = 696; - this.expr(0); + this.match(LatexParser.U_L_BRACE); this.state = 697; + this.expr(0); + this.state = 698; this.match(LatexParser.U_R_BRACE); } break; - case 80: + case 81: { localctx = new UnitDivideContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 699; - this.match(LatexParser.U_CMD_FRAC); this.state = 700; + this.match(LatexParser.U_CMD_FRAC); + this.state = 701; this.match(LatexParser.U_L_BRACE); - this.state = 703; + this.state = 704; this._errHandler.sync(this); switch (this._input.LA(1)) { - case 80: - case 84: - case 87: + case 81: + case 85: case 88: + case 89: { - this.state = 701; + this.state = 702; this.u_expr(0); } break; - case 92: + case 93: { - this.state = 702; + this.state = 703; this.match(LatexParser.U_ONE); } break; default: throw new NoViableAltException(this); } - this.state = 705; - this.match(LatexParser.U_R_BRACE); this.state = 706; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_R_BRACE); this.state = 707; - this.u_expr(0); + this.match(LatexParser.U_L_BRACE); this.state = 708; + this.u_expr(0); + this.state = 709; this.match(LatexParser.U_R_BRACE); } break; - case 87: + case 88: { localctx = new UnitNameContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 710; + this.state = 711; this.match(LatexParser.U_NAME); } break; - case 88: + case 89: { localctx = new UnitSubExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; - this.state = 711; - this.match(LatexParser.U_L_PAREN); this.state = 712; - this.u_expr(0); + this.match(LatexParser.U_L_PAREN); this.state = 713; + this.u_expr(0); + this.state = 714; this.match(LatexParser.U_R_PAREN); } break; @@ -3382,7 +3394,7 @@ export default class LatexParser extends Parser { throw new NoViableAltException(this); } this._ctx.stop = this._input.LT(-1); - this.state = 739; + this.state = 740; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 54, this._ctx); while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) { @@ -3392,20 +3404,20 @@ export default class LatexParser extends Parser { } _prevctx = localctx; { - this.state = 737; + this.state = 738; this._errHandler.sync(this); switch ( this._interp.adaptivePredict(this._input, 53, this._ctx) ) { case 1: { localctx = new UnitMultiplyContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 717; + this.state = 718; if (!(this.precpred(this._ctx, 4))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 4)"); } - this.state = 718; - this.match(LatexParser.U_CMD_CDOT); this.state = 719; + this.match(LatexParser.U_CMD_CDOT); + this.state = 720; this.u_expr(5); } break; @@ -3413,13 +3425,13 @@ export default class LatexParser extends Parser { { localctx = new UnitExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 720; + this.state = 721; if (!(this.precpred(this._ctx, 9))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } - this.state = 721; - this.match(LatexParser.U_CARET); this.state = 722; + this.match(LatexParser.U_CARET); + this.state = 723; this.match(LatexParser.U_NUMBER); } break; @@ -3427,17 +3439,17 @@ export default class LatexParser extends Parser { { localctx = new UnitExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 723; + this.state = 724; if (!(this.precpred(this._ctx, 8))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } - this.state = 724; - this.match(LatexParser.U_CARET); this.state = 725; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_CARET); this.state = 726; - this.match(LatexParser.U_NUMBER); + this.match(LatexParser.U_L_BRACE); this.state = 727; + this.match(LatexParser.U_NUMBER); + this.state = 728; this.match(LatexParser.U_R_BRACE); } break; @@ -3445,13 +3457,13 @@ export default class LatexParser extends Parser { { localctx = new UnitFractionalExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 728; + this.state = 729; if (!(this.precpred(this._ctx, 7))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } - this.state = 729; - this.match(LatexParser.U_CARET); this.state = 730; + this.match(LatexParser.U_CARET); + this.state = 731; this.u_fraction(); } break; @@ -3459,24 +3471,24 @@ export default class LatexParser extends Parser { { localctx = new UnitFractionalExponentContext(this, new U_exprContext(this, _parentctx, _parentState)); this.pushNewRecursionContext(localctx, _startState, LatexParser.RULE_u_expr); - this.state = 731; + this.state = 732; if (!(this.precpred(this._ctx, 6))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 6)"); } - this.state = 732; - this.match(LatexParser.U_CARET); this.state = 733; - this.match(LatexParser.U_L_BRACE); + this.match(LatexParser.U_CARET); this.state = 734; - this.u_fraction(); + this.match(LatexParser.U_L_BRACE); this.state = 735; + this.u_fraction(); + this.state = 736; this.match(LatexParser.U_R_BRACE); } break; } } } - this.state = 741; + this.state = 742; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 54, this._ctx); } @@ -3509,23 +3521,23 @@ export default class LatexParser extends Parser { private expr_sempred(localctx: ExprContext, predIndex: number): boolean { switch (predIndex) { case 0: - return this.precpred(this._ctx, 29); + return this.precpred(this._ctx, 30); case 1: - return this.precpred(this._ctx, 28); + return this.precpred(this._ctx, 29); case 2: - return this.precpred(this._ctx, 25); + return this.precpred(this._ctx, 26); case 3: - return this.precpred(this._ctx, 24); + return this.precpred(this._ctx, 25); case 4: - return this.precpred(this._ctx, 52); + return this.precpred(this._ctx, 53); case 5: - return this.precpred(this._ctx, 51); + return this.precpred(this._ctx, 52); case 6: - return this.precpred(this._ctx, 50); + return this.precpred(this._ctx, 51); case 7: - return this.precpred(this._ctx, 49); + return this.precpred(this._ctx, 50); case 8: - return this.precpred(this._ctx, 48); + return this.precpred(this._ctx, 49); case 9: return this.precpred(this._ctx, 18); case 10: @@ -3571,7 +3583,7 @@ export default class LatexParser extends Parser { return true; } - public static readonly _serializedATN: number[] = [4,1,100,743,2,0,7,0, + public static readonly _serializedATN: number[] = [4,1,101,744,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, @@ -3613,216 +3625,216 @@ export default class LatexParser extends Parser { 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, - 1,30,1,30,1,30,1,30,1,30,1,30,1,30,3,30,582,8,30,1,30,1,30,1,30,1,30,1, - 30,3,30,589,8,30,1,30,1,30,1,30,3,30,594,8,30,1,30,1,30,1,30,1,30,1,30, - 1,30,1,30,3,30,603,8,30,3,30,605,8,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,3,30,583,8,30,1,30,1,30,1,30,1, + 30,1,30,3,30,590,8,30,1,30,1,30,1,30,3,30,595,8,30,1,30,1,30,1,30,1,30, + 1,30,1,30,1,30,3,30,604,8,30,3,30,606,8,30,1,30,1,30,1,30,1,30,1,30,1,30, 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30, 1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1, - 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,5,30,669,8,30, - 10,30,12,30,672,9,30,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,33,1,33,1,33,1,33,3,33,692,8,33,1,34,1,34,1,34,1, - 34,1,34,1,34,1,34,1,34,1,34,1,34,3,34,704,8,34,1,34,1,34,1,34,1,34,1,34, - 1,34,1,34,1,34,1,34,1,34,3,34,716,8,34,1,34,1,34,1,34,1,34,1,34,1,34,1, - 34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,5,34, - 738,8,34,10,34,12,34,741,9,34,1,34,2,151,158,2,60,68,35,0,2,4,6,8,10,12, - 14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60, - 62,64,66,68,0,11,1,0,31,43,1,0,15,16,1,0,63,64,2,0,57,57,59,59,1,0,25,26, - 1,0,57,60,1,0,47,48,1,0,1,2,1,0,78,79,1,0,92,93,2,0,83,83,85,85,841,0,87, - 1,0,0,0,2,101,1,0,0,0,4,119,1,0,0,0,6,151,1,0,0,0,8,165,1,0,0,0,10,168, - 1,0,0,0,12,175,1,0,0,0,14,181,1,0,0,0,16,186,1,0,0,0,18,193,1,0,0,0,20, - 198,1,0,0,0,22,203,1,0,0,0,24,209,1,0,0,0,26,224,1,0,0,0,28,231,1,0,0,0, - 30,245,1,0,0,0,32,268,1,0,0,0,34,293,1,0,0,0,36,312,1,0,0,0,38,340,1,0, - 0,0,40,394,1,0,0,0,42,398,1,0,0,0,44,400,1,0,0,0,46,407,1,0,0,0,48,413, - 1,0,0,0,50,420,1,0,0,0,52,424,1,0,0,0,54,430,1,0,0,0,56,438,1,0,0,0,58, - 461,1,0,0,0,60,604,1,0,0,0,62,673,1,0,0,0,64,677,1,0,0,0,66,691,1,0,0,0, - 68,715,1,0,0,0,70,88,3,14,7,0,71,88,3,16,8,0,72,88,3,18,9,0,73,88,3,20, - 10,0,74,88,3,22,11,0,75,88,3,62,31,0,76,88,3,10,5,0,77,88,3,8,4,0,78,88, - 3,44,22,0,79,88,3,46,23,0,80,88,3,48,24,0,81,88,3,60,30,0,82,88,3,42,21, - 0,83,88,3,24,12,0,84,88,3,6,3,0,85,88,3,2,1,0,86,88,3,4,2,0,87,70,1,0,0, - 0,87,71,1,0,0,0,87,72,1,0,0,0,87,73,1,0,0,0,87,74,1,0,0,0,87,75,1,0,0,0, - 87,76,1,0,0,0,87,77,1,0,0,0,87,78,1,0,0,0,87,79,1,0,0,0,87,80,1,0,0,0,87, - 81,1,0,0,0,87,82,1,0,0,0,87,83,1,0,0,0,87,84,1,0,0,0,87,85,1,0,0,0,87,86, - 1,0,0,0,87,88,1,0,0,0,88,89,1,0,0,0,89,90,5,0,0,1,90,1,1,0,0,0,91,92,5, - 6,0,0,92,93,3,60,30,0,93,94,5,61,0,0,94,95,3,60,30,0,95,96,5,7,0,0,96,102, - 1,0,0,0,97,98,3,60,30,0,98,99,5,61,0,0,99,100,3,60,30,0,100,102,1,0,0,0, - 101,91,1,0,0,0,101,97,1,0,0,0,102,104,1,0,0,0,103,105,5,30,0,0,104,103, - 1,0,0,0,104,105,1,0,0,0,105,106,1,0,0,0,106,117,5,56,0,0,107,108,5,6,0, - 0,108,109,3,62,31,0,109,110,5,61,0,0,110,111,3,62,31,0,111,112,5,7,0,0, - 112,118,1,0,0,0,113,114,3,62,31,0,114,115,5,61,0,0,115,116,3,62,31,0,116, - 118,1,0,0,0,117,107,1,0,0,0,117,113,1,0,0,0,117,118,1,0,0,0,118,3,1,0,0, - 0,119,120,5,6,0,0,120,121,3,60,30,0,121,122,5,61,0,0,122,123,3,60,30,0, - 123,124,5,7,0,0,124,125,1,0,0,0,125,126,5,72,0,0,126,127,5,6,0,0,127,128, - 3,40,20,0,128,133,5,7,0,0,129,130,5,72,0,0,130,131,3,10,5,0,131,132,5,72, - 0,0,132,134,1,0,0,0,133,129,1,0,0,0,133,134,1,0,0,0,134,135,1,0,0,0,135, - 146,5,56,0,0,136,137,5,6,0,0,137,138,3,62,31,0,138,139,5,61,0,0,139,140, - 3,62,31,0,140,141,5,7,0,0,141,147,1,0,0,0,142,143,3,62,31,0,143,144,5,61, - 0,0,144,145,3,62,31,0,145,147,1,0,0,0,146,136,1,0,0,0,146,142,1,0,0,0,146, - 147,1,0,0,0,147,5,1,0,0,0,148,150,9,0,0,0,149,148,1,0,0,0,150,153,1,0,0, - 0,151,152,1,0,0,0,151,149,1,0,0,0,152,161,1,0,0,0,153,151,1,0,0,0,154,158, - 3,64,32,0,155,157,9,0,0,0,156,155,1,0,0,0,157,160,1,0,0,0,158,159,1,0,0, - 0,158,156,1,0,0,0,159,162,1,0,0,0,160,158,1,0,0,0,161,154,1,0,0,0,162,163, - 1,0,0,0,163,161,1,0,0,0,163,164,1,0,0,0,164,7,1,0,0,0,165,166,5,72,0,0, - 166,9,1,0,0,0,167,169,5,54,0,0,168,167,1,0,0,0,168,169,1,0,0,0,169,170, - 1,0,0,0,170,171,5,65,0,0,171,11,1,0,0,0,172,176,3,10,5,0,173,176,5,12,0, - 0,174,176,3,8,4,0,175,172,1,0,0,0,175,173,1,0,0,0,175,174,1,0,0,0,176,177, - 1,0,0,0,177,178,3,62,31,0,178,13,1,0,0,0,179,182,3,8,4,0,180,182,5,12,0, - 0,181,179,1,0,0,0,181,180,1,0,0,0,182,183,1,0,0,0,183,184,5,56,0,0,184, - 185,3,60,30,0,185,15,1,0,0,0,186,189,3,14,7,0,187,188,5,61,0,0,188,190, - 3,14,7,0,189,187,1,0,0,0,190,191,1,0,0,0,191,189,1,0,0,0,191,192,1,0,0, - 0,192,17,1,0,0,0,193,194,3,14,7,0,194,196,5,56,0,0,195,197,3,62,31,0,196, - 195,1,0,0,0,196,197,1,0,0,0,197,19,1,0,0,0,198,199,3,60,30,0,199,201,5, - 56,0,0,200,202,3,62,31,0,201,200,1,0,0,0,201,202,1,0,0,0,202,21,1,0,0,0, - 203,204,3,60,30,0,204,205,5,56,0,0,205,206,3,60,30,0,206,23,1,0,0,0,207, - 210,3,8,4,0,208,210,5,12,0,0,209,207,1,0,0,0,209,208,1,0,0,0,210,211,1, - 0,0,0,211,212,5,56,0,0,212,213,3,8,4,0,213,214,5,6,0,0,214,219,3,26,13, - 0,215,216,5,61,0,0,216,218,3,26,13,0,217,215,1,0,0,0,218,221,1,0,0,0,219, - 217,1,0,0,0,219,220,1,0,0,0,220,222,1,0,0,0,221,219,1,0,0,0,222,223,5,7, - 0,0,223,25,1,0,0,0,224,225,5,6,0,0,225,226,3,60,30,0,226,227,5,61,0,0,227, - 228,3,42,21,0,228,229,5,7,0,0,229,27,1,0,0,0,230,232,5,29,0,0,231,230,1, - 0,0,0,231,232,1,0,0,0,232,233,1,0,0,0,233,234,7,0,0,0,234,235,5,6,0,0,235, - 236,3,60,30,0,236,237,5,7,0,0,237,29,1,0,0,0,238,246,5,13,0,0,239,240,5, - 14,0,0,240,241,5,4,0,0,241,242,5,5,0,0,242,243,5,55,0,0,243,244,5,4,0,0, - 244,246,5,5,0,0,245,238,1,0,0,0,245,239,1,0,0,0,246,247,1,0,0,0,247,248, - 5,6,0,0,248,249,3,60,30,0,249,256,5,7,0,0,250,251,5,18,0,0,251,252,5,4, - 0,0,252,253,3,8,4,0,253,254,5,5,0,0,254,257,1,0,0,0,255,257,3,8,4,0,256, - 250,1,0,0,0,256,255,1,0,0,0,257,258,1,0,0,0,258,259,5,6,0,0,259,260,3,8, - 4,0,260,261,5,7,0,0,261,31,1,0,0,0,262,263,5,14,0,0,263,264,5,4,0,0,264, - 265,3,60,30,0,265,266,5,5,0,0,266,269,1,0,0,0,267,269,7,1,0,0,268,262,1, - 0,0,0,268,267,1,0,0,0,269,276,1,0,0,0,270,271,5,55,0,0,271,272,5,4,0,0, - 272,273,3,60,30,0,273,274,5,5,0,0,274,277,1,0,0,0,275,277,7,2,0,0,276,270, - 1,0,0,0,276,275,1,0,0,0,277,278,1,0,0,0,278,279,5,6,0,0,279,280,3,60,30, - 0,280,287,5,7,0,0,281,282,5,18,0,0,282,283,5,4,0,0,283,284,3,8,4,0,284, - 285,5,5,0,0,285,288,1,0,0,0,286,288,3,8,4,0,287,281,1,0,0,0,287,286,1,0, - 0,0,288,289,1,0,0,0,289,290,5,6,0,0,290,291,3,8,4,0,291,292,5,7,0,0,292, - 33,1,0,0,0,293,294,5,17,0,0,294,295,5,4,0,0,295,296,3,8,4,0,296,297,5,56, - 0,0,297,298,3,60,30,0,298,299,5,5,0,0,299,306,1,0,0,0,300,301,5,55,0,0, - 301,302,5,4,0,0,302,303,3,60,30,0,303,304,5,5,0,0,304,307,1,0,0,0,305,307, - 7,2,0,0,306,300,1,0,0,0,306,305,1,0,0,0,307,308,1,0,0,0,308,309,5,6,0,0, - 309,310,3,60,30,0,310,311,5,7,0,0,311,35,1,0,0,0,312,313,5,19,0,0,313,320, - 5,4,0,0,314,315,5,18,0,0,315,316,5,4,0,0,316,317,3,8,4,0,317,318,5,5,0, - 0,318,321,1,0,0,0,319,321,3,8,4,0,320,314,1,0,0,0,320,319,1,0,0,0,321,322, - 1,0,0,0,322,323,5,5,0,0,323,330,5,4,0,0,324,325,5,18,0,0,325,326,5,4,0, - 0,326,327,3,8,4,0,327,328,5,5,0,0,328,331,1,0,0,0,329,331,3,8,4,0,330,324, - 1,0,0,0,330,329,1,0,0,0,331,332,1,0,0,0,332,333,5,6,0,0,333,334,3,8,4,0, - 334,335,5,7,0,0,335,336,5,5,0,0,336,337,5,6,0,0,337,338,3,60,30,0,338,339, - 5,7,0,0,339,37,1,0,0,0,340,341,5,19,0,0,341,348,5,4,0,0,342,343,5,18,0, - 0,343,344,5,4,0,0,344,345,3,8,4,0,345,346,5,5,0,0,346,349,1,0,0,0,347,349, - 3,8,4,0,348,342,1,0,0,0,348,347,1,0,0,0,349,356,1,0,0,0,350,351,5,55,0, - 0,351,352,5,4,0,0,352,353,3,10,5,0,353,354,5,5,0,0,354,357,1,0,0,0,355, - 357,5,63,0,0,356,350,1,0,0,0,356,355,1,0,0,0,357,358,1,0,0,0,358,359,5, - 5,0,0,359,366,5,4,0,0,360,361,5,18,0,0,361,362,5,4,0,0,362,363,3,8,4,0, - 363,364,5,5,0,0,364,367,1,0,0,0,365,367,3,8,4,0,366,360,1,0,0,0,366,365, - 1,0,0,0,367,368,1,0,0,0,368,369,5,6,0,0,369,370,3,8,4,0,370,377,5,7,0,0, - 371,372,5,55,0,0,372,373,5,4,0,0,373,374,3,10,5,0,374,375,5,5,0,0,375,378, - 1,0,0,0,376,378,5,63,0,0,377,371,1,0,0,0,377,376,1,0,0,0,378,379,1,0,0, - 0,379,380,5,5,0,0,380,381,5,6,0,0,381,382,3,60,30,0,382,383,5,7,0,0,383, - 39,1,0,0,0,384,385,3,8,4,0,385,386,5,56,0,0,386,387,3,60,30,0,387,395,1, - 0,0,0,388,389,3,60,30,0,389,390,7,3,0,0,390,391,3,8,4,0,391,392,7,3,0,0, - 392,393,3,60,30,0,393,395,1,0,0,0,394,384,1,0,0,0,394,388,1,0,0,0,395,41, - 1,0,0,0,396,399,3,50,25,0,397,399,3,52,26,0,398,396,1,0,0,0,398,397,1,0, - 0,0,399,43,1,0,0,0,400,403,3,8,4,0,401,402,5,61,0,0,402,404,3,8,4,0,403, - 401,1,0,0,0,404,405,1,0,0,0,405,403,1,0,0,0,405,406,1,0,0,0,406,45,1,0, - 0,0,407,408,3,8,4,0,408,411,7,4,0,0,409,412,3,10,5,0,410,412,3,12,6,0,411, - 409,1,0,0,0,411,410,1,0,0,0,412,47,1,0,0,0,413,416,3,46,23,0,414,415,5, - 61,0,0,415,417,3,46,23,0,416,414,1,0,0,0,417,418,1,0,0,0,418,416,1,0,0, - 0,418,419,1,0,0,0,419,49,1,0,0,0,420,421,3,60,30,0,421,422,7,5,0,0,422, - 423,3,60,30,0,423,51,1,0,0,0,424,425,3,60,30,0,425,426,7,5,0,0,426,427, - 3,60,30,0,427,428,7,5,0,0,428,429,3,60,30,0,429,53,1,0,0,0,430,435,3,60, - 30,0,431,432,5,68,0,0,432,434,3,60,30,0,433,431,1,0,0,0,434,437,1,0,0,0, - 435,433,1,0,0,0,435,436,1,0,0,0,436,55,1,0,0,0,437,435,1,0,0,0,438,439, - 3,8,4,0,439,440,5,6,0,0,440,445,3,40,20,0,441,442,5,61,0,0,442,444,3,40, - 20,0,443,441,1,0,0,0,444,447,1,0,0,0,445,443,1,0,0,0,445,446,1,0,0,0,446, - 448,1,0,0,0,447,445,1,0,0,0,448,453,5,7,0,0,449,450,5,72,0,0,450,451,3, - 10,5,0,451,452,5,72,0,0,452,454,1,0,0,0,453,449,1,0,0,0,453,454,1,0,0,0, - 454,57,1,0,0,0,455,456,5,18,0,0,456,457,5,4,0,0,457,458,3,8,4,0,458,459, - 5,5,0,0,459,462,1,0,0,0,460,462,3,8,4,0,461,455,1,0,0,0,461,460,1,0,0,0, - 462,463,1,0,0,0,463,464,5,6,0,0,464,469,3,60,30,0,465,466,5,61,0,0,466, - 468,3,60,30,0,467,465,1,0,0,0,468,471,1,0,0,0,469,467,1,0,0,0,469,470,1, - 0,0,0,470,472,1,0,0,0,471,469,1,0,0,0,472,473,5,7,0,0,473,59,1,0,0,0,474, - 475,6,30,-1,0,475,476,3,8,4,0,476,477,5,71,0,0,477,605,1,0,0,0,478,479, - 3,8,4,0,479,480,7,2,0,0,480,481,5,70,0,0,481,605,1,0,0,0,482,483,3,8,4, - 0,483,484,5,55,0,0,484,485,5,4,0,0,485,486,3,60,30,0,486,487,5,5,0,0,487, - 488,5,70,0,0,488,605,1,0,0,0,489,605,5,24,0,0,490,491,5,23,0,0,491,492, - 5,4,0,0,492,493,3,60,30,0,493,494,5,5,0,0,494,605,1,0,0,0,495,496,5,66, - 0,0,496,501,3,54,27,0,497,498,5,69,0,0,498,500,3,54,27,0,499,497,1,0,0, - 0,500,503,1,0,0,0,501,499,1,0,0,0,501,502,1,0,0,0,502,504,1,0,0,0,503,501, - 1,0,0,0,504,505,5,67,0,0,505,605,1,0,0,0,506,605,3,28,14,0,507,605,3,30, - 15,0,508,605,3,32,16,0,509,605,3,36,18,0,510,605,3,38,19,0,511,605,3,34, - 17,0,512,514,5,29,0,0,513,512,1,0,0,0,513,514,1,0,0,0,514,515,1,0,0,0,515, - 516,5,44,0,0,516,517,5,6,0,0,517,518,3,60,30,0,518,519,5,7,0,0,519,605, - 1,0,0,0,520,522,5,29,0,0,521,520,1,0,0,0,521,522,1,0,0,0,522,523,1,0,0, - 0,523,524,5,45,0,0,524,525,5,6,0,0,525,526,3,60,30,0,526,527,5,7,0,0,527, - 605,1,0,0,0,528,529,5,46,0,0,529,530,5,4,0,0,530,531,3,60,30,0,531,532, - 5,5,0,0,532,533,5,6,0,0,533,534,3,60,30,0,534,535,5,7,0,0,535,605,1,0,0, - 0,536,537,7,6,0,0,537,538,5,6,0,0,538,539,3,60,30,0,539,540,5,7,0,0,540, - 605,1,0,0,0,541,542,5,9,0,0,542,543,3,60,30,0,543,544,5,9,0,0,544,605,1, - 0,0,0,545,546,5,8,0,0,546,547,3,60,30,0,547,548,5,8,0,0,548,605,1,0,0,0, - 549,605,3,12,6,0,550,605,3,10,5,0,551,552,5,54,0,0,552,605,3,60,30,30,553, - 554,5,19,0,0,554,555,5,4,0,0,555,556,3,60,30,0,556,557,5,5,0,0,557,558, - 5,4,0,0,558,559,3,60,30,0,559,560,5,5,0,0,560,605,1,0,0,0,561,605,5,20, - 0,0,562,605,3,8,4,0,563,605,3,56,28,0,564,605,3,58,29,0,565,605,5,12,0, - 0,566,567,5,6,0,0,567,568,3,60,30,0,568,569,5,7,0,0,569,605,1,0,0,0,570, - 571,3,10,5,0,571,572,3,60,30,12,572,605,1,0,0,0,573,574,3,12,6,0,574,575, - 3,60,30,11,575,605,1,0,0,0,576,577,5,12,0,0,577,605,3,60,30,10,578,581, - 5,27,0,0,579,580,5,4,0,0,580,582,5,5,0,0,581,579,1,0,0,0,581,582,1,0,0, - 0,582,605,1,0,0,0,583,584,5,18,0,0,584,585,5,4,0,0,585,586,3,60,30,0,586, - 587,5,5,0,0,587,589,1,0,0,0,588,583,1,0,0,0,588,589,1,0,0,0,589,593,1,0, - 0,0,590,594,5,62,0,0,591,594,3,10,5,0,592,594,5,56,0,0,593,590,1,0,0,0, - 593,591,1,0,0,0,593,592,1,0,0,0,593,594,1,0,0,0,594,595,1,0,0,0,595,596, - 5,18,0,0,596,597,5,4,0,0,597,598,3,60,30,0,598,602,5,5,0,0,599,603,5,62, - 0,0,600,603,3,10,5,0,601,603,5,56,0,0,602,599,1,0,0,0,602,600,1,0,0,0,602, - 601,1,0,0,0,602,603,1,0,0,0,603,605,1,0,0,0,604,474,1,0,0,0,604,478,1,0, - 0,0,604,482,1,0,0,0,604,489,1,0,0,0,604,490,1,0,0,0,604,495,1,0,0,0,604, - 506,1,0,0,0,604,507,1,0,0,0,604,508,1,0,0,0,604,509,1,0,0,0,604,510,1,0, - 0,0,604,511,1,0,0,0,604,513,1,0,0,0,604,521,1,0,0,0,604,528,1,0,0,0,604, - 536,1,0,0,0,604,541,1,0,0,0,604,545,1,0,0,0,604,549,1,0,0,0,604,550,1,0, - 0,0,604,551,1,0,0,0,604,553,1,0,0,0,604,561,1,0,0,0,604,562,1,0,0,0,604, - 563,1,0,0,0,604,564,1,0,0,0,604,565,1,0,0,0,604,566,1,0,0,0,604,570,1,0, - 0,0,604,573,1,0,0,0,604,576,1,0,0,0,604,578,1,0,0,0,604,588,1,0,0,0,605, - 670,1,0,0,0,606,607,10,29,0,0,607,608,5,22,0,0,608,669,3,60,30,30,609,610, - 10,28,0,0,610,611,5,21,0,0,611,669,3,60,30,29,612,613,10,25,0,0,613,614, - 5,54,0,0,614,669,3,60,30,26,615,616,10,24,0,0,616,617,5,53,0,0,617,669, - 3,60,30,25,618,619,10,52,0,0,619,669,7,2,0,0,620,621,10,51,0,0,621,622, - 5,55,0,0,622,623,5,4,0,0,623,624,3,60,30,0,624,625,5,5,0,0,625,669,1,0, - 0,0,626,627,10,50,0,0,627,628,5,10,0,0,628,629,5,4,0,0,629,630,3,60,30, - 0,630,631,5,61,0,0,631,632,3,60,30,0,632,633,5,5,0,0,633,669,1,0,0,0,634, - 635,10,49,0,0,635,669,5,28,0,0,636,637,10,48,0,0,637,669,5,11,0,0,638,639, - 10,18,0,0,639,640,5,10,0,0,640,641,5,4,0,0,641,669,5,5,0,0,642,643,10,17, - 0,0,643,644,5,55,0,0,644,645,5,4,0,0,645,669,5,5,0,0,646,647,10,16,0,0, - 647,669,3,8,4,0,648,649,10,15,0,0,649,669,3,10,5,0,650,651,10,14,0,0,651, - 669,3,12,6,0,652,653,10,13,0,0,653,669,5,12,0,0,654,655,10,9,0,0,655,669, - 3,56,28,0,656,657,10,8,0,0,657,669,3,58,29,0,658,659,10,7,0,0,659,669,3, - 28,14,0,660,661,10,6,0,0,661,669,3,30,15,0,662,663,10,5,0,0,663,669,3,32, - 16,0,664,665,10,4,0,0,665,669,3,36,18,0,666,667,10,3,0,0,667,669,3,38,19, - 0,668,606,1,0,0,0,668,609,1,0,0,0,668,612,1,0,0,0,668,615,1,0,0,0,668,618, - 1,0,0,0,668,620,1,0,0,0,668,626,1,0,0,0,668,634,1,0,0,0,668,636,1,0,0,0, - 668,638,1,0,0,0,668,642,1,0,0,0,668,646,1,0,0,0,668,648,1,0,0,0,668,650, - 1,0,0,0,668,652,1,0,0,0,668,654,1,0,0,0,668,656,1,0,0,0,668,658,1,0,0,0, - 668,660,1,0,0,0,668,662,1,0,0,0,668,664,1,0,0,0,668,666,1,0,0,0,669,672, - 1,0,0,0,670,668,1,0,0,0,670,671,1,0,0,0,671,61,1,0,0,0,672,670,1,0,0,0, - 673,674,7,7,0,0,674,675,3,68,34,0,675,676,7,8,0,0,676,63,1,0,0,0,677,678, - 7,7,0,0,678,679,7,9,0,0,679,680,7,10,0,0,680,681,7,9,0,0,681,682,7,8,0, - 0,682,65,1,0,0,0,683,684,5,80,0,0,684,685,5,90,0,0,685,686,7,9,0,0,686, - 687,5,91,0,0,687,688,5,90,0,0,688,689,5,93,0,0,689,692,5,91,0,0,690,692, - 5,81,0,0,691,683,1,0,0,0,691,690,1,0,0,0,692,67,1,0,0,0,693,694,6,34,-1, - 0,694,695,5,84,0,0,695,696,5,90,0,0,696,697,3,60,30,0,697,698,5,91,0,0, - 698,716,1,0,0,0,699,700,5,80,0,0,700,703,5,90,0,0,701,704,3,68,34,0,702, - 704,5,92,0,0,703,701,1,0,0,0,703,702,1,0,0,0,704,705,1,0,0,0,705,706,5, - 91,0,0,706,707,5,90,0,0,707,708,3,68,34,0,708,709,5,91,0,0,709,716,1,0, - 0,0,710,716,5,87,0,0,711,712,5,88,0,0,712,713,3,68,34,0,713,714,5,89,0, - 0,714,716,1,0,0,0,715,693,1,0,0,0,715,699,1,0,0,0,715,710,1,0,0,0,715,711, - 1,0,0,0,716,739,1,0,0,0,717,718,10,4,0,0,718,719,5,82,0,0,719,738,3,68, - 34,5,720,721,10,9,0,0,721,722,5,86,0,0,722,738,5,93,0,0,723,724,10,8,0, - 0,724,725,5,86,0,0,725,726,5,90,0,0,726,727,5,93,0,0,727,738,5,91,0,0,728, - 729,10,7,0,0,729,730,5,86,0,0,730,738,3,66,33,0,731,732,10,6,0,0,732,733, - 5,86,0,0,733,734,5,90,0,0,734,735,3,66,33,0,735,736,5,91,0,0,736,738,1, - 0,0,0,737,717,1,0,0,0,737,720,1,0,0,0,737,723,1,0,0,0,737,728,1,0,0,0,737, - 731,1,0,0,0,738,741,1,0,0,0,739,737,1,0,0,0,739,740,1,0,0,0,740,69,1,0, - 0,0,741,739,1,0,0,0,55,87,101,104,117,133,146,151,158,163,168,175,181,191, - 196,201,209,219,231,245,256,268,276,287,306,320,330,348,356,366,377,394, - 398,405,411,418,435,445,453,461,469,501,513,521,581,588,593,602,604,668, - 670,691,703,715,737,739]; + 30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,1,30,5,30,670, + 8,30,10,30,12,30,673,9,30,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,33,1,33,1,33,1,33,3,33,693,8,33,1,34,1,34,1, + 34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,3,34,705,8,34,1,34,1,34,1,34,1,34, + 1,34,1,34,1,34,1,34,1,34,1,34,3,34,717,8,34,1,34,1,34,1,34,1,34,1,34,1, + 34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34,1,34, + 5,34,739,8,34,10,34,12,34,742,9,34,1,34,2,151,158,2,60,68,35,0,2,4,6,8, + 10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56, + 58,60,62,64,66,68,0,11,1,0,32,44,1,0,16,17,1,0,64,65,2,0,58,58,60,60,1, + 0,26,27,1,0,58,61,1,0,48,49,1,0,1,2,1,0,79,80,1,0,93,94,2,0,84,84,86,86, + 843,0,87,1,0,0,0,2,101,1,0,0,0,4,119,1,0,0,0,6,151,1,0,0,0,8,165,1,0,0, + 0,10,168,1,0,0,0,12,175,1,0,0,0,14,181,1,0,0,0,16,186,1,0,0,0,18,193,1, + 0,0,0,20,198,1,0,0,0,22,203,1,0,0,0,24,209,1,0,0,0,26,224,1,0,0,0,28,231, + 1,0,0,0,30,245,1,0,0,0,32,268,1,0,0,0,34,293,1,0,0,0,36,312,1,0,0,0,38, + 340,1,0,0,0,40,394,1,0,0,0,42,398,1,0,0,0,44,400,1,0,0,0,46,407,1,0,0,0, + 48,413,1,0,0,0,50,420,1,0,0,0,52,424,1,0,0,0,54,430,1,0,0,0,56,438,1,0, + 0,0,58,461,1,0,0,0,60,605,1,0,0,0,62,674,1,0,0,0,64,678,1,0,0,0,66,692, + 1,0,0,0,68,716,1,0,0,0,70,88,3,14,7,0,71,88,3,16,8,0,72,88,3,18,9,0,73, + 88,3,20,10,0,74,88,3,22,11,0,75,88,3,62,31,0,76,88,3,10,5,0,77,88,3,8,4, + 0,78,88,3,44,22,0,79,88,3,46,23,0,80,88,3,48,24,0,81,88,3,60,30,0,82,88, + 3,42,21,0,83,88,3,24,12,0,84,88,3,6,3,0,85,88,3,2,1,0,86,88,3,4,2,0,87, + 70,1,0,0,0,87,71,1,0,0,0,87,72,1,0,0,0,87,73,1,0,0,0,87,74,1,0,0,0,87,75, + 1,0,0,0,87,76,1,0,0,0,87,77,1,0,0,0,87,78,1,0,0,0,87,79,1,0,0,0,87,80,1, + 0,0,0,87,81,1,0,0,0,87,82,1,0,0,0,87,83,1,0,0,0,87,84,1,0,0,0,87,85,1,0, + 0,0,87,86,1,0,0,0,87,88,1,0,0,0,88,89,1,0,0,0,89,90,5,0,0,1,90,1,1,0,0, + 0,91,92,5,6,0,0,92,93,3,60,30,0,93,94,5,62,0,0,94,95,3,60,30,0,95,96,5, + 7,0,0,96,102,1,0,0,0,97,98,3,60,30,0,98,99,5,62,0,0,99,100,3,60,30,0,100, + 102,1,0,0,0,101,91,1,0,0,0,101,97,1,0,0,0,102,104,1,0,0,0,103,105,5,31, + 0,0,104,103,1,0,0,0,104,105,1,0,0,0,105,106,1,0,0,0,106,117,5,57,0,0,107, + 108,5,6,0,0,108,109,3,62,31,0,109,110,5,62,0,0,110,111,3,62,31,0,111,112, + 5,7,0,0,112,118,1,0,0,0,113,114,3,62,31,0,114,115,5,62,0,0,115,116,3,62, + 31,0,116,118,1,0,0,0,117,107,1,0,0,0,117,113,1,0,0,0,117,118,1,0,0,0,118, + 3,1,0,0,0,119,120,5,6,0,0,120,121,3,60,30,0,121,122,5,62,0,0,122,123,3, + 60,30,0,123,124,5,7,0,0,124,125,1,0,0,0,125,126,5,73,0,0,126,127,5,6,0, + 0,127,128,3,40,20,0,128,133,5,7,0,0,129,130,5,73,0,0,130,131,3,10,5,0,131, + 132,5,73,0,0,132,134,1,0,0,0,133,129,1,0,0,0,133,134,1,0,0,0,134,135,1, + 0,0,0,135,146,5,57,0,0,136,137,5,6,0,0,137,138,3,62,31,0,138,139,5,62,0, + 0,139,140,3,62,31,0,140,141,5,7,0,0,141,147,1,0,0,0,142,143,3,62,31,0,143, + 144,5,62,0,0,144,145,3,62,31,0,145,147,1,0,0,0,146,136,1,0,0,0,146,142, + 1,0,0,0,146,147,1,0,0,0,147,5,1,0,0,0,148,150,9,0,0,0,149,148,1,0,0,0,150, + 153,1,0,0,0,151,152,1,0,0,0,151,149,1,0,0,0,152,161,1,0,0,0,153,151,1,0, + 0,0,154,158,3,64,32,0,155,157,9,0,0,0,156,155,1,0,0,0,157,160,1,0,0,0,158, + 159,1,0,0,0,158,156,1,0,0,0,159,162,1,0,0,0,160,158,1,0,0,0,161,154,1,0, + 0,0,162,163,1,0,0,0,163,161,1,0,0,0,163,164,1,0,0,0,164,7,1,0,0,0,165,166, + 5,73,0,0,166,9,1,0,0,0,167,169,5,55,0,0,168,167,1,0,0,0,168,169,1,0,0,0, + 169,170,1,0,0,0,170,171,5,66,0,0,171,11,1,0,0,0,172,176,3,10,5,0,173,176, + 5,12,0,0,174,176,3,8,4,0,175,172,1,0,0,0,175,173,1,0,0,0,175,174,1,0,0, + 0,176,177,1,0,0,0,177,178,3,62,31,0,178,13,1,0,0,0,179,182,3,8,4,0,180, + 182,5,12,0,0,181,179,1,0,0,0,181,180,1,0,0,0,182,183,1,0,0,0,183,184,5, + 57,0,0,184,185,3,60,30,0,185,15,1,0,0,0,186,189,3,14,7,0,187,188,5,62,0, + 0,188,190,3,14,7,0,189,187,1,0,0,0,190,191,1,0,0,0,191,189,1,0,0,0,191, + 192,1,0,0,0,192,17,1,0,0,0,193,194,3,14,7,0,194,196,5,57,0,0,195,197,3, + 62,31,0,196,195,1,0,0,0,196,197,1,0,0,0,197,19,1,0,0,0,198,199,3,60,30, + 0,199,201,5,57,0,0,200,202,3,62,31,0,201,200,1,0,0,0,201,202,1,0,0,0,202, + 21,1,0,0,0,203,204,3,60,30,0,204,205,5,57,0,0,205,206,3,60,30,0,206,23, + 1,0,0,0,207,210,3,8,4,0,208,210,5,12,0,0,209,207,1,0,0,0,209,208,1,0,0, + 0,210,211,1,0,0,0,211,212,5,57,0,0,212,213,3,8,4,0,213,214,5,6,0,0,214, + 219,3,26,13,0,215,216,5,62,0,0,216,218,3,26,13,0,217,215,1,0,0,0,218,221, + 1,0,0,0,219,217,1,0,0,0,219,220,1,0,0,0,220,222,1,0,0,0,221,219,1,0,0,0, + 222,223,5,7,0,0,223,25,1,0,0,0,224,225,5,6,0,0,225,226,3,60,30,0,226,227, + 5,62,0,0,227,228,3,42,21,0,228,229,5,7,0,0,229,27,1,0,0,0,230,232,5,30, + 0,0,231,230,1,0,0,0,231,232,1,0,0,0,232,233,1,0,0,0,233,234,7,0,0,0,234, + 235,5,6,0,0,235,236,3,60,30,0,236,237,5,7,0,0,237,29,1,0,0,0,238,246,5, + 14,0,0,239,240,5,15,0,0,240,241,5,4,0,0,241,242,5,5,0,0,242,243,5,56,0, + 0,243,244,5,4,0,0,244,246,5,5,0,0,245,238,1,0,0,0,245,239,1,0,0,0,246,247, + 1,0,0,0,247,248,5,6,0,0,248,249,3,60,30,0,249,256,5,7,0,0,250,251,5,19, + 0,0,251,252,5,4,0,0,252,253,3,8,4,0,253,254,5,5,0,0,254,257,1,0,0,0,255, + 257,3,8,4,0,256,250,1,0,0,0,256,255,1,0,0,0,257,258,1,0,0,0,258,259,5,6, + 0,0,259,260,3,8,4,0,260,261,5,7,0,0,261,31,1,0,0,0,262,263,5,15,0,0,263, + 264,5,4,0,0,264,265,3,60,30,0,265,266,5,5,0,0,266,269,1,0,0,0,267,269,7, + 1,0,0,268,262,1,0,0,0,268,267,1,0,0,0,269,276,1,0,0,0,270,271,5,56,0,0, + 271,272,5,4,0,0,272,273,3,60,30,0,273,274,5,5,0,0,274,277,1,0,0,0,275,277, + 7,2,0,0,276,270,1,0,0,0,276,275,1,0,0,0,277,278,1,0,0,0,278,279,5,6,0,0, + 279,280,3,60,30,0,280,287,5,7,0,0,281,282,5,19,0,0,282,283,5,4,0,0,283, + 284,3,8,4,0,284,285,5,5,0,0,285,288,1,0,0,0,286,288,3,8,4,0,287,281,1,0, + 0,0,287,286,1,0,0,0,288,289,1,0,0,0,289,290,5,6,0,0,290,291,3,8,4,0,291, + 292,5,7,0,0,292,33,1,0,0,0,293,294,5,18,0,0,294,295,5,4,0,0,295,296,3,8, + 4,0,296,297,5,57,0,0,297,298,3,60,30,0,298,299,5,5,0,0,299,306,1,0,0,0, + 300,301,5,56,0,0,301,302,5,4,0,0,302,303,3,60,30,0,303,304,5,5,0,0,304, + 307,1,0,0,0,305,307,7,2,0,0,306,300,1,0,0,0,306,305,1,0,0,0,307,308,1,0, + 0,0,308,309,5,6,0,0,309,310,3,60,30,0,310,311,5,7,0,0,311,35,1,0,0,0,312, + 313,5,20,0,0,313,320,5,4,0,0,314,315,5,19,0,0,315,316,5,4,0,0,316,317,3, + 8,4,0,317,318,5,5,0,0,318,321,1,0,0,0,319,321,3,8,4,0,320,314,1,0,0,0,320, + 319,1,0,0,0,321,322,1,0,0,0,322,323,5,5,0,0,323,330,5,4,0,0,324,325,5,19, + 0,0,325,326,5,4,0,0,326,327,3,8,4,0,327,328,5,5,0,0,328,331,1,0,0,0,329, + 331,3,8,4,0,330,324,1,0,0,0,330,329,1,0,0,0,331,332,1,0,0,0,332,333,5,6, + 0,0,333,334,3,8,4,0,334,335,5,7,0,0,335,336,5,5,0,0,336,337,5,6,0,0,337, + 338,3,60,30,0,338,339,5,7,0,0,339,37,1,0,0,0,340,341,5,20,0,0,341,348,5, + 4,0,0,342,343,5,19,0,0,343,344,5,4,0,0,344,345,3,8,4,0,345,346,5,5,0,0, + 346,349,1,0,0,0,347,349,3,8,4,0,348,342,1,0,0,0,348,347,1,0,0,0,349,356, + 1,0,0,0,350,351,5,56,0,0,351,352,5,4,0,0,352,353,3,10,5,0,353,354,5,5,0, + 0,354,357,1,0,0,0,355,357,5,64,0,0,356,350,1,0,0,0,356,355,1,0,0,0,357, + 358,1,0,0,0,358,359,5,5,0,0,359,366,5,4,0,0,360,361,5,19,0,0,361,362,5, + 4,0,0,362,363,3,8,4,0,363,364,5,5,0,0,364,367,1,0,0,0,365,367,3,8,4,0,366, + 360,1,0,0,0,366,365,1,0,0,0,367,368,1,0,0,0,368,369,5,6,0,0,369,370,3,8, + 4,0,370,377,5,7,0,0,371,372,5,56,0,0,372,373,5,4,0,0,373,374,3,10,5,0,374, + 375,5,5,0,0,375,378,1,0,0,0,376,378,5,64,0,0,377,371,1,0,0,0,377,376,1, + 0,0,0,378,379,1,0,0,0,379,380,5,5,0,0,380,381,5,6,0,0,381,382,3,60,30,0, + 382,383,5,7,0,0,383,39,1,0,0,0,384,385,3,8,4,0,385,386,5,57,0,0,386,387, + 3,60,30,0,387,395,1,0,0,0,388,389,3,60,30,0,389,390,7,3,0,0,390,391,3,8, + 4,0,391,392,7,3,0,0,392,393,3,60,30,0,393,395,1,0,0,0,394,384,1,0,0,0,394, + 388,1,0,0,0,395,41,1,0,0,0,396,399,3,50,25,0,397,399,3,52,26,0,398,396, + 1,0,0,0,398,397,1,0,0,0,399,43,1,0,0,0,400,403,3,8,4,0,401,402,5,62,0,0, + 402,404,3,8,4,0,403,401,1,0,0,0,404,405,1,0,0,0,405,403,1,0,0,0,405,406, + 1,0,0,0,406,45,1,0,0,0,407,408,3,8,4,0,408,411,7,4,0,0,409,412,3,10,5,0, + 410,412,3,12,6,0,411,409,1,0,0,0,411,410,1,0,0,0,412,47,1,0,0,0,413,416, + 3,46,23,0,414,415,5,62,0,0,415,417,3,46,23,0,416,414,1,0,0,0,417,418,1, + 0,0,0,418,416,1,0,0,0,418,419,1,0,0,0,419,49,1,0,0,0,420,421,3,60,30,0, + 421,422,7,5,0,0,422,423,3,60,30,0,423,51,1,0,0,0,424,425,3,60,30,0,425, + 426,7,5,0,0,426,427,3,60,30,0,427,428,7,5,0,0,428,429,3,60,30,0,429,53, + 1,0,0,0,430,435,3,60,30,0,431,432,5,69,0,0,432,434,3,60,30,0,433,431,1, + 0,0,0,434,437,1,0,0,0,435,433,1,0,0,0,435,436,1,0,0,0,436,55,1,0,0,0,437, + 435,1,0,0,0,438,439,3,8,4,0,439,440,5,6,0,0,440,445,3,40,20,0,441,442,5, + 62,0,0,442,444,3,40,20,0,443,441,1,0,0,0,444,447,1,0,0,0,445,443,1,0,0, + 0,445,446,1,0,0,0,446,448,1,0,0,0,447,445,1,0,0,0,448,453,5,7,0,0,449,450, + 5,73,0,0,450,451,3,10,5,0,451,452,5,73,0,0,452,454,1,0,0,0,453,449,1,0, + 0,0,453,454,1,0,0,0,454,57,1,0,0,0,455,456,5,19,0,0,456,457,5,4,0,0,457, + 458,3,8,4,0,458,459,5,5,0,0,459,462,1,0,0,0,460,462,3,8,4,0,461,455,1,0, + 0,0,461,460,1,0,0,0,462,463,1,0,0,0,463,464,5,6,0,0,464,469,3,60,30,0,465, + 466,5,62,0,0,466,468,3,60,30,0,467,465,1,0,0,0,468,471,1,0,0,0,469,467, + 1,0,0,0,469,470,1,0,0,0,470,472,1,0,0,0,471,469,1,0,0,0,472,473,5,7,0,0, + 473,59,1,0,0,0,474,475,6,30,-1,0,475,476,3,8,4,0,476,477,5,72,0,0,477,606, + 1,0,0,0,478,479,3,8,4,0,479,480,7,2,0,0,480,481,5,71,0,0,481,606,1,0,0, + 0,482,483,3,8,4,0,483,484,5,56,0,0,484,485,5,4,0,0,485,486,3,60,30,0,486, + 487,5,5,0,0,487,488,5,71,0,0,488,606,1,0,0,0,489,606,5,25,0,0,490,491,5, + 24,0,0,491,492,5,4,0,0,492,493,3,60,30,0,493,494,5,5,0,0,494,606,1,0,0, + 0,495,496,5,67,0,0,496,501,3,54,27,0,497,498,5,70,0,0,498,500,3,54,27,0, + 499,497,1,0,0,0,500,503,1,0,0,0,501,499,1,0,0,0,501,502,1,0,0,0,502,504, + 1,0,0,0,503,501,1,0,0,0,504,505,5,68,0,0,505,606,1,0,0,0,506,606,3,28,14, + 0,507,606,3,30,15,0,508,606,3,32,16,0,509,606,3,36,18,0,510,606,3,38,19, + 0,511,606,3,34,17,0,512,514,5,30,0,0,513,512,1,0,0,0,513,514,1,0,0,0,514, + 515,1,0,0,0,515,516,5,45,0,0,516,517,5,6,0,0,517,518,3,60,30,0,518,519, + 5,7,0,0,519,606,1,0,0,0,520,522,5,30,0,0,521,520,1,0,0,0,521,522,1,0,0, + 0,522,523,1,0,0,0,523,524,5,46,0,0,524,525,5,6,0,0,525,526,3,60,30,0,526, + 527,5,7,0,0,527,606,1,0,0,0,528,529,5,47,0,0,529,530,5,4,0,0,530,531,3, + 60,30,0,531,532,5,5,0,0,532,533,5,6,0,0,533,534,3,60,30,0,534,535,5,7,0, + 0,535,606,1,0,0,0,536,537,7,6,0,0,537,538,5,6,0,0,538,539,3,60,30,0,539, + 540,5,7,0,0,540,606,1,0,0,0,541,542,5,9,0,0,542,543,3,60,30,0,543,544,5, + 9,0,0,544,606,1,0,0,0,545,546,5,8,0,0,546,547,3,60,30,0,547,548,5,8,0,0, + 548,606,1,0,0,0,549,606,3,12,6,0,550,606,3,10,5,0,551,552,5,55,0,0,552, + 606,3,60,30,31,553,554,5,20,0,0,554,555,5,4,0,0,555,556,3,60,30,0,556,557, + 5,5,0,0,557,558,5,4,0,0,558,559,3,60,30,0,559,560,5,5,0,0,560,606,1,0,0, + 0,561,606,5,21,0,0,562,606,3,8,4,0,563,606,3,56,28,0,564,606,3,58,29,0, + 565,606,5,12,0,0,566,606,5,13,0,0,567,568,5,6,0,0,568,569,3,60,30,0,569, + 570,5,7,0,0,570,606,1,0,0,0,571,572,3,10,5,0,572,573,3,60,30,12,573,606, + 1,0,0,0,574,575,3,12,6,0,575,576,3,60,30,11,576,606,1,0,0,0,577,578,5,12, + 0,0,578,606,3,60,30,10,579,582,5,28,0,0,580,581,5,4,0,0,581,583,5,5,0,0, + 582,580,1,0,0,0,582,583,1,0,0,0,583,606,1,0,0,0,584,585,5,19,0,0,585,586, + 5,4,0,0,586,587,3,60,30,0,587,588,5,5,0,0,588,590,1,0,0,0,589,584,1,0,0, + 0,589,590,1,0,0,0,590,594,1,0,0,0,591,595,5,63,0,0,592,595,3,10,5,0,593, + 595,5,57,0,0,594,591,1,0,0,0,594,592,1,0,0,0,594,593,1,0,0,0,594,595,1, + 0,0,0,595,596,1,0,0,0,596,597,5,19,0,0,597,598,5,4,0,0,598,599,3,60,30, + 0,599,603,5,5,0,0,600,604,5,63,0,0,601,604,3,10,5,0,602,604,5,57,0,0,603, + 600,1,0,0,0,603,601,1,0,0,0,603,602,1,0,0,0,603,604,1,0,0,0,604,606,1,0, + 0,0,605,474,1,0,0,0,605,478,1,0,0,0,605,482,1,0,0,0,605,489,1,0,0,0,605, + 490,1,0,0,0,605,495,1,0,0,0,605,506,1,0,0,0,605,507,1,0,0,0,605,508,1,0, + 0,0,605,509,1,0,0,0,605,510,1,0,0,0,605,511,1,0,0,0,605,513,1,0,0,0,605, + 521,1,0,0,0,605,528,1,0,0,0,605,536,1,0,0,0,605,541,1,0,0,0,605,545,1,0, + 0,0,605,549,1,0,0,0,605,550,1,0,0,0,605,551,1,0,0,0,605,553,1,0,0,0,605, + 561,1,0,0,0,605,562,1,0,0,0,605,563,1,0,0,0,605,564,1,0,0,0,605,565,1,0, + 0,0,605,566,1,0,0,0,605,567,1,0,0,0,605,571,1,0,0,0,605,574,1,0,0,0,605, + 577,1,0,0,0,605,579,1,0,0,0,605,589,1,0,0,0,606,671,1,0,0,0,607,608,10, + 30,0,0,608,609,5,23,0,0,609,670,3,60,30,31,610,611,10,29,0,0,611,612,5, + 22,0,0,612,670,3,60,30,30,613,614,10,26,0,0,614,615,5,55,0,0,615,670,3, + 60,30,27,616,617,10,25,0,0,617,618,5,54,0,0,618,670,3,60,30,26,619,620, + 10,53,0,0,620,670,7,2,0,0,621,622,10,52,0,0,622,623,5,56,0,0,623,624,5, + 4,0,0,624,625,3,60,30,0,625,626,5,5,0,0,626,670,1,0,0,0,627,628,10,51,0, + 0,628,629,5,10,0,0,629,630,5,4,0,0,630,631,3,60,30,0,631,632,5,62,0,0,632, + 633,3,60,30,0,633,634,5,5,0,0,634,670,1,0,0,0,635,636,10,50,0,0,636,670, + 5,29,0,0,637,638,10,49,0,0,638,670,5,11,0,0,639,640,10,18,0,0,640,641,5, + 10,0,0,641,642,5,4,0,0,642,670,5,5,0,0,643,644,10,17,0,0,644,645,5,56,0, + 0,645,646,5,4,0,0,646,670,5,5,0,0,647,648,10,16,0,0,648,670,3,8,4,0,649, + 650,10,15,0,0,650,670,3,10,5,0,651,652,10,14,0,0,652,670,3,12,6,0,653,654, + 10,13,0,0,654,670,5,12,0,0,655,656,10,9,0,0,656,670,3,56,28,0,657,658,10, + 8,0,0,658,670,3,58,29,0,659,660,10,7,0,0,660,670,3,28,14,0,661,662,10,6, + 0,0,662,670,3,30,15,0,663,664,10,5,0,0,664,670,3,32,16,0,665,666,10,4,0, + 0,666,670,3,36,18,0,667,668,10,3,0,0,668,670,3,38,19,0,669,607,1,0,0,0, + 669,610,1,0,0,0,669,613,1,0,0,0,669,616,1,0,0,0,669,619,1,0,0,0,669,621, + 1,0,0,0,669,627,1,0,0,0,669,635,1,0,0,0,669,637,1,0,0,0,669,639,1,0,0,0, + 669,643,1,0,0,0,669,647,1,0,0,0,669,649,1,0,0,0,669,651,1,0,0,0,669,653, + 1,0,0,0,669,655,1,0,0,0,669,657,1,0,0,0,669,659,1,0,0,0,669,661,1,0,0,0, + 669,663,1,0,0,0,669,665,1,0,0,0,669,667,1,0,0,0,670,673,1,0,0,0,671,669, + 1,0,0,0,671,672,1,0,0,0,672,61,1,0,0,0,673,671,1,0,0,0,674,675,7,7,0,0, + 675,676,3,68,34,0,676,677,7,8,0,0,677,63,1,0,0,0,678,679,7,7,0,0,679,680, + 7,9,0,0,680,681,7,10,0,0,681,682,7,9,0,0,682,683,7,8,0,0,683,65,1,0,0,0, + 684,685,5,81,0,0,685,686,5,91,0,0,686,687,7,9,0,0,687,688,5,92,0,0,688, + 689,5,91,0,0,689,690,5,94,0,0,690,693,5,92,0,0,691,693,5,82,0,0,692,684, + 1,0,0,0,692,691,1,0,0,0,693,67,1,0,0,0,694,695,6,34,-1,0,695,696,5,85,0, + 0,696,697,5,91,0,0,697,698,3,60,30,0,698,699,5,92,0,0,699,717,1,0,0,0,700, + 701,5,81,0,0,701,704,5,91,0,0,702,705,3,68,34,0,703,705,5,93,0,0,704,702, + 1,0,0,0,704,703,1,0,0,0,705,706,1,0,0,0,706,707,5,92,0,0,707,708,5,91,0, + 0,708,709,3,68,34,0,709,710,5,92,0,0,710,717,1,0,0,0,711,717,5,88,0,0,712, + 713,5,89,0,0,713,714,3,68,34,0,714,715,5,90,0,0,715,717,1,0,0,0,716,694, + 1,0,0,0,716,700,1,0,0,0,716,711,1,0,0,0,716,712,1,0,0,0,717,740,1,0,0,0, + 718,719,10,4,0,0,719,720,5,83,0,0,720,739,3,68,34,5,721,722,10,9,0,0,722, + 723,5,87,0,0,723,739,5,94,0,0,724,725,10,8,0,0,725,726,5,87,0,0,726,727, + 5,91,0,0,727,728,5,94,0,0,728,739,5,92,0,0,729,730,10,7,0,0,730,731,5,87, + 0,0,731,739,3,66,33,0,732,733,10,6,0,0,733,734,5,87,0,0,734,735,5,91,0, + 0,735,736,3,66,33,0,736,737,5,92,0,0,737,739,1,0,0,0,738,718,1,0,0,0,738, + 721,1,0,0,0,738,724,1,0,0,0,738,729,1,0,0,0,738,732,1,0,0,0,739,742,1,0, + 0,0,740,738,1,0,0,0,740,741,1,0,0,0,741,69,1,0,0,0,742,740,1,0,0,0,55,87, + 101,104,117,133,146,151,158,163,168,175,181,191,196,201,209,219,231,245, + 256,268,276,287,306,320,330,348,356,366,377,394,398,405,411,418,435,445, + 453,461,469,501,513,521,582,589,594,603,605,669,671,692,704,716,738,740]; private static __ATN: ATN; public static get _ATN(): ATN { @@ -5844,6 +5856,23 @@ export class BaseLogContext extends ExprContext { } } } +export class InfinityExprContext extends ExprContext { + constructor(parser: LatexParser, ctx: ExprContext) { + super(parser, ctx.parentCtx, ctx.invokingState); + super.copyFrom(ctx); + } + public INFINITY(): TerminalNode { + return this.getToken(LatexParser.INFINITY, 0); + } + // @Override + public accept(visitor: LatexParserVisitor): Result { + if (visitor.visitInfinityExpr) { + return visitor.visitInfinityExpr(this); + } else { + return visitor.visitChildren(this); + } + } +} export class AddContext extends ExprContext { constructor(parser: LatexParser, ctx: ExprContext) { super(parser, ctx.parentCtx, ctx.invokingState); diff --git a/src/parser/LatexParserVisitor.ts b/src/parser/LatexParserVisitor.ts index 73779d52..35bb503f 100644 --- a/src/parser/LatexParserVisitor.ts +++ b/src/parser/LatexParserVisitor.ts @@ -59,6 +59,7 @@ import { MultiplyContext } from "./LatexParser"; import { BaseLogSingleCharContext } from "./LatexParser"; import { ExponentContext } from "./LatexParser"; import { BaseLogContext } from "./LatexParser"; +import { InfinityExprContext } from "./LatexParser"; import { AddContext } from "./LatexParser"; import { SingleIntSqrtContext } from "./LatexParser"; import { SubtractContext } from "./LatexParser"; @@ -447,6 +448,13 @@ export default class LatexParserVisitor extends ParseTreeVisitor * @return the visitor result */ visitBaseLog?: (ctx: BaseLogContext) => Result; + /** + * Visit a parse tree produced by the `infinityExpr` + * labeled alternative in `LatexParser.expr`. + * @param ctx the parse tree + * @return the visitor result + */ + visitInfinityExpr?: (ctx: InfinityExprContext) => Result; /** * Visit a parse tree produced by the `add` * labeled alternative in `LatexParser.expr`. diff --git a/src/parser/LatexToSympy.ts b/src/parser/LatexToSympy.ts index 2697392e..7a0baec6 100644 --- a/src/parser/LatexToSympy.ts +++ b/src/parser/LatexToSympy.ts @@ -48,7 +48,8 @@ import { type MatrixContext, type IndexContext, type MatrixMultiplyContext, type TransposeContext, type NormContext, type EmptySubscriptContext, type EmptySuperscriptContext, type MissingMultiplicationContext, type BuiltinFunctionContext, type UserFunctionContext, type EmptyPlaceholderContext, type Scatter_plot_queryContext, - type Parametric_plot_queryContext, type RemoveOperatorFontContext, type FactorialContext + type Parametric_plot_queryContext, type RemoveOperatorFontContext, type FactorialContext, + type InfinityExprContext } from "./LatexParser"; import { getBlankMatrixLatex } from "../utility"; @@ -1087,6 +1088,10 @@ export class LatexToSympy extends LatexParserVisitor { + return "oo"; + } + visitExponent = (ctx: ExponentContext) => { const exponentVariableName = this.getNextUnitlessSubExpressionName(); From 99ac607aa13cf33e0c7bb043b0523ff84f233919 Mon Sep 17 00:00:00 2001 From: mgreminger Date: Sat, 26 Oct 2024 21:40:25 -0500 Subject: [PATCH 7/9] tests: add initial tests for summation notation Still need to add tests that ensure lower and upper limits are unitless --- tests/test_sum_and_prod.spec.mjs | 85 ++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 tests/test_sum_and_prod.spec.mjs diff --git a/tests/test_sum_and_prod.spec.mjs b/tests/test_sum_and_prod.spec.mjs new file mode 100644 index 00000000..884daaf9 --- /dev/null +++ b/tests/test_sum_and_prod.spec.mjs @@ -0,0 +1,85 @@ +import { test, expect } from '@playwright/test'; +import { cot, pi, sqrt, tan, cos, e} from 'mathjs'; + +import { precision, loadPyodide, newSheet, parseLatexFloat } from './utility.mjs'; + +let page; + +// loading pyodide takes a long time (especially in resource constrained CI environments) +// load page once and use for all tests in this file +test.beforeAll(async ({ browser }) => {page = await loadPyodide(browser, page);} ); + +// give each test a blank sheet to start with (this doesn't reload pyodide) +test.beforeEach(async () => newSheet(page)); + +test('Test finite sum with no units', async () => { + await page.setLatex(0, String.raw`\sum_{n=0}^4\left(n\cdot2\right)=`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + let content = await page.textContent('#result-value-0'); + expect(parseLatexFloat(content)).toBeCloseTo(20, precision); + content = await page.textContent('#result-units-0'); + expect(content).toBe(''); + }); + + test('Test finite sum with units', async () => { + await page.setLatex(0, String.raw`\sum_{n=1}^3\left(n\cdot2\left\lbrack m\right\rbrack\right)=`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + let content = await page.textContent('#result-value-0'); + expect(parseLatexFloat(content)).toBeCloseTo(12, precision); + content = await page.textContent('#result-units-0'); + expect(content).toBe('m'); + }); + + test('Test infinte sum with factorial', async () => { + await page.setLatex(0, String.raw`\sum_{n=0}^{\infty}\left(\frac{2}{n!}\right)=`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + let content = await page.textContent('#result-value-0'); + expect(parseLatexFloat(content)).toBeCloseTo(2*e, precision); + content = await page.textContent('#result-units-0'); + expect(content).toBe(''); + }); + + test('Test sum over vector without units', async () => { + await page.setLatex(0, String.raw`\sum_{n=1}^{\mathrm{count}\left(B\right)}\left(B_{n,1}\right)=`); + + await page.locator('#add-math-cell').click(); + await page.setLatex(1, String.raw`B=\begin{bmatrix}1\\ 2\\ 3\end{bmatrix}`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + let content = await page.textContent('#result-value-0'); + expect(parseLatexFloat(content)).toBeCloseTo(6, precision); + content = await page.textContent('#result-units-0'); + expect(content).toBe(''); + }); + + test('Test sum over vector with units', async () => { + await page.setLatex(0, String.raw`\sum_{n=1}^{\mathrm{count}\left(B\right)}\left(B_{n,1}\right)=`); + + await page.locator('#add-math-cell').click(); + await page.setLatex(1, String.raw`B=\begin{bmatrix}1\\ 2\\ 3\end{bmatrix}\cdot1\left\lbrack m\right\rbrack=`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + let content = await page.textContent('#result-value-0'); + expect(parseLatexFloat(content)).toBeCloseTo(6, precision); + content = await page.textContent('#result-units-0'); + expect(content).toBe('m'); + }); + + test('Test sum over vector with inconsistent units', async () => { + await page.setLatex(0, String.raw`\sum_{n=1}^3\left(A_{n,1}\right)=`); + + await page.locator('#add-math-cell').click(); + await page.setLatex(1, String.raw`A=\begin{bmatrix}1\left\lbrack m\right\rbrack\\ 2\left\lbrack s\right\rbrack\\ 3\left\lbrack kg\right\rbrack\end{bmatrix}`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + await expect(page.locator('#cell-0 >> text=Dimension Error')).toBeVisible(); + }); \ No newline at end of file From f5d4bf1cbd9cf1088cbd8470432c1dfffcdec3b7 Mon Sep 17 00:00:00 2001 From: mgreminger Date: Sat, 26 Oct 2024 23:08:06 -0500 Subject: [PATCH 8/9] tests: add tests for handling units in summation limits --- tests/test_sum_and_prod.spec.mjs | 40 +++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/tests/test_sum_and_prod.spec.mjs b/tests/test_sum_and_prod.spec.mjs index 884daaf9..bd5630c6 100644 --- a/tests/test_sum_and_prod.spec.mjs +++ b/tests/test_sum_and_prod.spec.mjs @@ -82,4 +82,42 @@ test('Test finite sum with no units', async () => { await page.waitForSelector('text=Updating...', {state: 'detached'}); await expect(page.locator('#cell-0 >> text=Dimension Error')).toBeVisible(); - }); \ No newline at end of file + }); + + test('Test finite sum with consistent limit units', async () => { + await page.setLatex(0, String.raw`\sum_{n=1\left\lbrack m\right\rbrack}^{3\left\lbrack m\right\rbrack}\left(n^2\cdot1\left\lbrack m\right\rbrack\right)=`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + let content = await page.textContent('#result-value-0'); + expect(parseLatexFloat(content)).toBeCloseTo(14, precision); + content = await page.textContent('#result-units-0'); + expect(content).toBe('m^3'); + }); + + test('Test finite sum with inconsistent limit units', async () => { + await page.setLatex(0, String.raw`\sum_{n=1\left\lbrack m\right\rbrack}^{3\left\lbrack s\right\rbrack}\left(n^2\cdot1\left\lbrack m\right\rbrack\right)=`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + await expect(page.locator('#cell-0 >> text=Dimension Error')).toBeVisible(); + }); + + test('Test sum over vector with limit units', async () => { + await page.setLatex(0, String.raw`\sum_{n=1\left\lbrack m\right\rbrack}^{3\left\lbrack m\right\rbrack}\left(A_{n,1}\right)=`); + + await page.locator('#add-math-cell').click(); + await page.setLatex(1, String.raw`A=\begin{bmatrix}1\\ 2\\ 3\end{bmatrix}`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + await expect(page.locator('#cell-0 >> text=Dimension Error')).toBeVisible(); + }); + + test('Test finite sum with dummy variable in exponent', async () => { + await page.setLatex(0, String.raw`\sum_{n=1\left\lbrack m\right\rbrack}^{3\left\lbrack m\right\rbrack}\left(2^{n}\right)=`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + await expect(page.locator('#cell-0 >> text=Dimension Error')).toBeVisible(); + }); From d92550b4582bc902a3df86fa879dc323046f5812 Mon Sep 17 00:00:00 2001 From: mgreminger Date: Sun, 27 Oct 2024 13:42:42 -0500 Subject: [PATCH 9/9] tests: add test for nested sum --- tests/test_sum_and_prod.spec.mjs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_sum_and_prod.spec.mjs b/tests/test_sum_and_prod.spec.mjs index bd5630c6..93190713 100644 --- a/tests/test_sum_and_prod.spec.mjs +++ b/tests/test_sum_and_prod.spec.mjs @@ -121,3 +121,19 @@ test('Test finite sum with no units', async () => { await expect(page.locator('#cell-0 >> text=Dimension Error')).toBeVisible(); }); + + test('Test nested sum', async () => { + await page.setLatex(0, String.raw`\sum_{i=1}^{\mathrm{count}\left(A\right)}\left(\sum_{j=1}^{\mathrm{count}\left(B\right)}\left(A_{i,1}\cdot B_{1,j}\right)\right)=`); + + await page.locator('#add-math-cell').click(); + await page.setLatex(1, String.raw`A=\begin{bmatrix}a\\ b\end{bmatrix}`); + + await page.locator('#add-math-cell').click(); + await page.setLatex(2, String.raw`B=\begin{bmatrix}c & d\end{bmatrix}`); + + await page.waitForSelector('text=Updating...', {state: 'detached'}); + + let content = await page.textContent('#result-value-0'); + expect(content).toBe(String.raw`a \cdot c + a \cdot d + b \cdot c + b \cdot d`); + }); +