diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c0362fc..ef44b45 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -27,7 +27,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 pytest + python -m pip install flake8 pytest pytest-subtests if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: | diff --git a/luaparser/astnodes.py b/luaparser/astnodes.py index 15e0f0a..49e79f3 100644 --- a/luaparser/astnodes.py +++ b/luaparser/astnodes.py @@ -628,18 +628,21 @@ class String(Expression): """Define the Lua string expression. Attributes: - s: String value. + s: String value in bytes. + raw: Unescaped string delimiter: The string delimiter """ def __init__( self, - s: str, + s: bytes, + raw: str, delimiter: StringDelimiter = StringDelimiter.SINGLE_QUOTE, **kwargs ): super(String, self).__init__("String", **kwargs) - self.s: str = s + self.s: bytes = s + self.raw: str = raw self.delimiter: StringDelimiter = delimiter diff --git a/luaparser/builder.py b/luaparser/builder.py index 2954534..1e71c8b 100644 --- a/luaparser/builder.py +++ b/luaparser/builder.py @@ -10,6 +10,7 @@ from luaparser.parser.LuaLexer import LuaLexer from luaparser.parser.LuaParser import LuaParser from luaparser.parser.LuaParserVisitor import LuaParserVisitor +from luaparser.utils.string_literals import unescape_lua_string TNode = TypeVar("TNode", bound=Node) @@ -659,9 +660,8 @@ def visitString(self, ctx: LuaParser.StringContext): elif p.match(lua_str): lua_str = p.search(lua_str).group(1) - # Eval string to unescape: - try: - lua_str = ast.literal_eval(F'"{lua_str}"') - except: - pass - return String(lua_str, delimiter) + if delimiter == StringDelimiter.DOUBLE_QUOTE or delimiter == StringDelimiter.SINGLE_QUOTE: + unescaped_str = unescape_lua_string(lua_str) + else: + unescaped_str = lua_str.encode("utf-8") + return String(unescaped_str, lua_str, delimiter) diff --git a/luaparser/parser/LuaLexer.g4 b/luaparser/parser/LuaLexer.g4 index f5f2a56..47c6ff6 100644 --- a/luaparser/parser/LuaLexer.g4 +++ b/luaparser/parser/LuaLexer.g4 @@ -102,11 +102,30 @@ fragment EscapeSequence: | UtfEscape ; -fragment DecimalEscape: '\\' Digit | '\\' Digit Digit | '\\' [0-2] Digit Digit; +fragment DecimalEscape: + '\\' + ( Digit + | Digit Digit + | [0-1] Digit Digit + | '2' ('5' [0-5] | [0-4] Digit) + ) +; fragment HexEscape: '\\' 'x' HexDigit HexDigit; -fragment UtfEscape: '\\' 'u{' HexDigit+ '}'; +fragment UtfEscape: + '\\' 'u{' + ( HexDigit + | HexDigit HexDigit + | HexDigit HexDigit HexDigit + | HexDigit HexDigit HexDigit HexDigit + | HexDigit HexDigit HexDigit HexDigit HexDigit + | HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit + | HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit + | [0-7] HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit HexDigit + ) + '}' +; fragment Digit: [0-9]; diff --git a/luaparser/parser/LuaLexer.interp b/luaparser/parser/LuaLexer.interp index bb216b3..00df37f 100644 --- a/luaparser/parser/LuaLexer.interp +++ b/luaparser/parser/LuaLexer.interp @@ -231,4 +231,4 @@ mode names: DEFAULT_MODE atn: -[4, 0, 69, 620, 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, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 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, 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, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 5, 56, 360, 8, 56, 10, 56, 12, 56, 363, 9, 56, 1, 57, 1, 57, 1, 57, 5, 57, 368, 8, 57, 10, 57, 12, 57, 371, 9, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 5, 58, 378, 8, 58, 10, 58, 12, 58, 381, 9, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 395, 8, 60, 10, 60, 12, 60, 398, 9, 60, 1, 60, 3, 60, 401, 8, 60, 1, 61, 4, 61, 404, 8, 61, 11, 61, 12, 61, 405, 1, 62, 1, 62, 1, 62, 4, 62, 411, 8, 62, 11, 62, 12, 62, 412, 1, 63, 4, 63, 416, 8, 63, 11, 63, 12, 63, 417, 1, 63, 1, 63, 5, 63, 422, 8, 63, 10, 63, 12, 63, 425, 9, 63, 1, 63, 3, 63, 428, 8, 63, 1, 63, 1, 63, 4, 63, 432, 8, 63, 11, 63, 12, 63, 433, 1, 63, 3, 63, 437, 8, 63, 1, 63, 4, 63, 440, 8, 63, 11, 63, 12, 63, 441, 1, 63, 1, 63, 3, 63, 446, 8, 63, 1, 64, 1, 64, 1, 64, 4, 64, 451, 8, 64, 11, 64, 12, 64, 452, 1, 64, 1, 64, 5, 64, 457, 8, 64, 10, 64, 12, 64, 460, 9, 64, 1, 64, 3, 64, 463, 8, 64, 1, 64, 1, 64, 1, 64, 1, 64, 4, 64, 469, 8, 64, 11, 64, 12, 64, 470, 1, 64, 3, 64, 474, 8, 64, 1, 64, 1, 64, 1, 64, 4, 64, 479, 8, 64, 11, 64, 12, 64, 480, 1, 64, 1, 64, 3, 64, 485, 8, 64, 1, 65, 1, 65, 3, 65, 489, 8, 65, 1, 65, 4, 65, 492, 8, 65, 11, 65, 12, 65, 493, 1, 66, 1, 66, 3, 66, 498, 8, 66, 1, 66, 4, 66, 501, 8, 66, 11, 66, 12, 66, 502, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 509, 8, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 515, 8, 67, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 1, 68, 3, 68, 528, 8, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 69, 1, 70, 1, 70, 1, 70, 1, 70, 1, 70, 4, 70, 540, 8, 70, 11, 70, 12, 70, 541, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 5, 75, 567, 8, 75, 10, 75, 12, 75, 570, 9, 75, 1, 75, 1, 75, 5, 75, 574, 8, 75, 10, 75, 12, 75, 577, 9, 75, 1, 75, 1, 75, 5, 75, 581, 8, 75, 10, 75, 12, 75, 584, 9, 75, 1, 75, 1, 75, 5, 75, 588, 8, 75, 10, 75, 12, 75, 591, 9, 75, 3, 75, 593, 8, 75, 1, 75, 1, 75, 1, 76, 4, 76, 598, 8, 76, 11, 76, 12, 76, 599, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 3, 78, 611, 8, 78, 1, 78, 5, 78, 614, 8, 78, 10, 78, 12, 78, 617, 9, 78, 1, 78, 1, 78, 1, 396, 0, 79, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 0, 123, 61, 125, 62, 127, 63, 129, 64, 131, 0, 133, 0, 135, 0, 137, 0, 139, 0, 141, 0, 143, 0, 145, 0, 147, 0, 149, 65, 151, 66, 153, 67, 155, 68, 157, 69, 1, 0, 18, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 34, 34, 92, 92, 2, 0, 39, 39, 92, 92, 2, 0, 88, 88, 120, 120, 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 2, 0, 80, 80, 112, 112, 11, 0, 34, 36, 39, 39, 92, 92, 97, 98, 102, 102, 110, 110, 114, 114, 116, 116, 118, 118, 122, 122, 124, 124, 1, 0, 48, 50, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, 97, 102, 4, 0, 10, 10, 13, 13, 133, 133, 8232, 8233, 4, 0, 10, 10, 13, 13, 61, 61, 91, 91, 2, 0, 10, 10, 13, 13, 3, 0, 10, 10, 13, 13, 91, 91, 3, 0, 9, 9, 12, 13, 32, 32, 1, 0, 10, 10, 656, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 1, 159, 1, 0, 0, 0, 3, 161, 1, 0, 0, 0, 5, 163, 1, 0, 0, 0, 7, 169, 1, 0, 0, 0, 9, 174, 1, 0, 0, 0, 11, 177, 1, 0, 0, 0, 13, 181, 1, 0, 0, 0, 15, 187, 1, 0, 0, 0, 17, 194, 1, 0, 0, 0, 19, 200, 1, 0, 0, 0, 21, 203, 1, 0, 0, 0, 23, 208, 1, 0, 0, 0, 25, 215, 1, 0, 0, 0, 27, 220, 1, 0, 0, 0, 29, 224, 1, 0, 0, 0, 31, 226, 1, 0, 0, 0, 33, 229, 1, 0, 0, 0, 35, 238, 1, 0, 0, 0, 37, 244, 1, 0, 0, 0, 39, 246, 1, 0, 0, 0, 41, 248, 1, 0, 0, 0, 43, 255, 1, 0, 0, 0, 45, 264, 1, 0, 0, 0, 47, 267, 1, 0, 0, 0, 49, 271, 1, 0, 0, 0, 51, 277, 1, 0, 0, 0, 53, 282, 1, 0, 0, 0, 55, 284, 1, 0, 0, 0, 57, 286, 1, 0, 0, 0, 59, 288, 1, 0, 0, 0, 61, 290, 1, 0, 0, 0, 63, 292, 1, 0, 0, 0, 65, 294, 1, 0, 0, 0, 67, 298, 1, 0, 0, 0, 69, 301, 1, 0, 0, 0, 71, 304, 1, 0, 0, 0, 73, 306, 1, 0, 0, 0, 75, 309, 1, 0, 0, 0, 77, 311, 1, 0, 0, 0, 79, 313, 1, 0, 0, 0, 81, 316, 1, 0, 0, 0, 83, 319, 1, 0, 0, 0, 85, 323, 1, 0, 0, 0, 87, 326, 1, 0, 0, 0, 89, 328, 1, 0, 0, 0, 91, 330, 1, 0, 0, 0, 93, 332, 1, 0, 0, 0, 95, 334, 1, 0, 0, 0, 97, 336, 1, 0, 0, 0, 99, 338, 1, 0, 0, 0, 101, 341, 1, 0, 0, 0, 103, 344, 1, 0, 0, 0, 105, 346, 1, 0, 0, 0, 107, 348, 1, 0, 0, 0, 109, 350, 1, 0, 0, 0, 111, 354, 1, 0, 0, 0, 113, 357, 1, 0, 0, 0, 115, 364, 1, 0, 0, 0, 117, 374, 1, 0, 0, 0, 119, 384, 1, 0, 0, 0, 121, 400, 1, 0, 0, 0, 123, 403, 1, 0, 0, 0, 125, 407, 1, 0, 0, 0, 127, 445, 1, 0, 0, 0, 129, 484, 1, 0, 0, 0, 131, 486, 1, 0, 0, 0, 133, 495, 1, 0, 0, 0, 135, 514, 1, 0, 0, 0, 137, 527, 1, 0, 0, 0, 139, 529, 1, 0, 0, 0, 141, 534, 1, 0, 0, 0, 143, 545, 1, 0, 0, 0, 145, 547, 1, 0, 0, 0, 147, 549, 1, 0, 0, 0, 149, 551, 1, 0, 0, 0, 151, 560, 1, 0, 0, 0, 153, 597, 1, 0, 0, 0, 155, 603, 1, 0, 0, 0, 157, 607, 1, 0, 0, 0, 159, 160, 5, 59, 0, 0, 160, 2, 1, 0, 0, 0, 161, 162, 5, 61, 0, 0, 162, 4, 1, 0, 0, 0, 163, 164, 5, 98, 0, 0, 164, 165, 5, 114, 0, 0, 165, 166, 5, 101, 0, 0, 166, 167, 5, 97, 0, 0, 167, 168, 5, 107, 0, 0, 168, 6, 1, 0, 0, 0, 169, 170, 5, 103, 0, 0, 170, 171, 5, 111, 0, 0, 171, 172, 5, 116, 0, 0, 172, 173, 5, 111, 0, 0, 173, 8, 1, 0, 0, 0, 174, 175, 5, 100, 0, 0, 175, 176, 5, 111, 0, 0, 176, 10, 1, 0, 0, 0, 177, 178, 5, 101, 0, 0, 178, 179, 5, 110, 0, 0, 179, 180, 5, 100, 0, 0, 180, 12, 1, 0, 0, 0, 181, 182, 5, 119, 0, 0, 182, 183, 5, 104, 0, 0, 183, 184, 5, 105, 0, 0, 184, 185, 5, 108, 0, 0, 185, 186, 5, 101, 0, 0, 186, 14, 1, 0, 0, 0, 187, 188, 5, 114, 0, 0, 188, 189, 5, 101, 0, 0, 189, 190, 5, 112, 0, 0, 190, 191, 5, 101, 0, 0, 191, 192, 5, 97, 0, 0, 192, 193, 5, 116, 0, 0, 193, 16, 1, 0, 0, 0, 194, 195, 5, 117, 0, 0, 195, 196, 5, 110, 0, 0, 196, 197, 5, 116, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 108, 0, 0, 199, 18, 1, 0, 0, 0, 200, 201, 5, 105, 0, 0, 201, 202, 5, 102, 0, 0, 202, 20, 1, 0, 0, 0, 203, 204, 5, 116, 0, 0, 204, 205, 5, 104, 0, 0, 205, 206, 5, 101, 0, 0, 206, 207, 5, 110, 0, 0, 207, 22, 1, 0, 0, 0, 208, 209, 5, 101, 0, 0, 209, 210, 5, 108, 0, 0, 210, 211, 5, 115, 0, 0, 211, 212, 5, 101, 0, 0, 212, 213, 5, 105, 0, 0, 213, 214, 5, 102, 0, 0, 214, 24, 1, 0, 0, 0, 215, 216, 5, 101, 0, 0, 216, 217, 5, 108, 0, 0, 217, 218, 5, 115, 0, 0, 218, 219, 5, 101, 0, 0, 219, 26, 1, 0, 0, 0, 220, 221, 5, 102, 0, 0, 221, 222, 5, 111, 0, 0, 222, 223, 5, 114, 0, 0, 223, 28, 1, 0, 0, 0, 224, 225, 5, 44, 0, 0, 225, 30, 1, 0, 0, 0, 226, 227, 5, 105, 0, 0, 227, 228, 5, 110, 0, 0, 228, 32, 1, 0, 0, 0, 229, 230, 5, 102, 0, 0, 230, 231, 5, 117, 0, 0, 231, 232, 5, 110, 0, 0, 232, 233, 5, 99, 0, 0, 233, 234, 5, 116, 0, 0, 234, 235, 5, 105, 0, 0, 235, 236, 5, 111, 0, 0, 236, 237, 5, 110, 0, 0, 237, 34, 1, 0, 0, 0, 238, 239, 5, 108, 0, 0, 239, 240, 5, 111, 0, 0, 240, 241, 5, 99, 0, 0, 241, 242, 5, 97, 0, 0, 242, 243, 5, 108, 0, 0, 243, 36, 1, 0, 0, 0, 244, 245, 5, 60, 0, 0, 245, 38, 1, 0, 0, 0, 246, 247, 5, 62, 0, 0, 247, 40, 1, 0, 0, 0, 248, 249, 5, 114, 0, 0, 249, 250, 5, 101, 0, 0, 250, 251, 5, 116, 0, 0, 251, 252, 5, 117, 0, 0, 252, 253, 5, 114, 0, 0, 253, 254, 5, 110, 0, 0, 254, 42, 1, 0, 0, 0, 255, 256, 5, 99, 0, 0, 256, 257, 5, 111, 0, 0, 257, 258, 5, 110, 0, 0, 258, 259, 5, 116, 0, 0, 259, 260, 5, 105, 0, 0, 260, 261, 5, 110, 0, 0, 261, 262, 5, 117, 0, 0, 262, 263, 5, 101, 0, 0, 263, 44, 1, 0, 0, 0, 264, 265, 5, 58, 0, 0, 265, 266, 5, 58, 0, 0, 266, 46, 1, 0, 0, 0, 267, 268, 5, 110, 0, 0, 268, 269, 5, 105, 0, 0, 269, 270, 5, 108, 0, 0, 270, 48, 1, 0, 0, 0, 271, 272, 5, 102, 0, 0, 272, 273, 5, 97, 0, 0, 273, 274, 5, 108, 0, 0, 274, 275, 5, 115, 0, 0, 275, 276, 5, 101, 0, 0, 276, 50, 1, 0, 0, 0, 277, 278, 5, 116, 0, 0, 278, 279, 5, 114, 0, 0, 279, 280, 5, 117, 0, 0, 280, 281, 5, 101, 0, 0, 281, 52, 1, 0, 0, 0, 282, 283, 5, 46, 0, 0, 283, 54, 1, 0, 0, 0, 284, 285, 5, 126, 0, 0, 285, 56, 1, 0, 0, 0, 286, 287, 5, 45, 0, 0, 287, 58, 1, 0, 0, 0, 288, 289, 5, 35, 0, 0, 289, 60, 1, 0, 0, 0, 290, 291, 5, 40, 0, 0, 291, 62, 1, 0, 0, 0, 292, 293, 5, 41, 0, 0, 293, 64, 1, 0, 0, 0, 294, 295, 5, 110, 0, 0, 295, 296, 5, 111, 0, 0, 296, 297, 5, 116, 0, 0, 297, 66, 1, 0, 0, 0, 298, 299, 5, 60, 0, 0, 299, 300, 5, 60, 0, 0, 300, 68, 1, 0, 0, 0, 301, 302, 5, 62, 0, 0, 302, 303, 5, 62, 0, 0, 303, 70, 1, 0, 0, 0, 304, 305, 5, 38, 0, 0, 305, 72, 1, 0, 0, 0, 306, 307, 5, 47, 0, 0, 307, 308, 5, 47, 0, 0, 308, 74, 1, 0, 0, 0, 309, 310, 5, 37, 0, 0, 310, 76, 1, 0, 0, 0, 311, 312, 5, 58, 0, 0, 312, 78, 1, 0, 0, 0, 313, 314, 5, 60, 0, 0, 314, 315, 5, 61, 0, 0, 315, 80, 1, 0, 0, 0, 316, 317, 5, 62, 0, 0, 317, 318, 5, 61, 0, 0, 318, 82, 1, 0, 0, 0, 319, 320, 5, 97, 0, 0, 320, 321, 5, 110, 0, 0, 321, 322, 5, 100, 0, 0, 322, 84, 1, 0, 0, 0, 323, 324, 5, 111, 0, 0, 324, 325, 5, 114, 0, 0, 325, 86, 1, 0, 0, 0, 326, 327, 5, 43, 0, 0, 327, 88, 1, 0, 0, 0, 328, 329, 5, 42, 0, 0, 329, 90, 1, 0, 0, 0, 330, 331, 5, 123, 0, 0, 331, 92, 1, 0, 0, 0, 332, 333, 5, 125, 0, 0, 333, 94, 1, 0, 0, 0, 334, 335, 5, 91, 0, 0, 335, 96, 1, 0, 0, 0, 336, 337, 5, 93, 0, 0, 337, 98, 1, 0, 0, 0, 338, 339, 5, 61, 0, 0, 339, 340, 5, 61, 0, 0, 340, 100, 1, 0, 0, 0, 341, 342, 5, 46, 0, 0, 342, 343, 5, 46, 0, 0, 343, 102, 1, 0, 0, 0, 344, 345, 5, 124, 0, 0, 345, 104, 1, 0, 0, 0, 346, 347, 5, 94, 0, 0, 347, 106, 1, 0, 0, 0, 348, 349, 5, 47, 0, 0, 349, 108, 1, 0, 0, 0, 350, 351, 5, 46, 0, 0, 351, 352, 5, 46, 0, 0, 352, 353, 5, 46, 0, 0, 353, 110, 1, 0, 0, 0, 354, 355, 5, 126, 0, 0, 355, 356, 5, 61, 0, 0, 356, 112, 1, 0, 0, 0, 357, 361, 7, 0, 0, 0, 358, 360, 7, 1, 0, 0, 359, 358, 1, 0, 0, 0, 360, 363, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 114, 1, 0, 0, 0, 363, 361, 1, 0, 0, 0, 364, 369, 5, 34, 0, 0, 365, 368, 3, 135, 67, 0, 366, 368, 8, 2, 0, 0, 367, 365, 1, 0, 0, 0, 367, 366, 1, 0, 0, 0, 368, 371, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 369, 370, 1, 0, 0, 0, 370, 372, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 372, 373, 5, 34, 0, 0, 373, 116, 1, 0, 0, 0, 374, 379, 5, 39, 0, 0, 375, 378, 3, 135, 67, 0, 376, 378, 8, 3, 0, 0, 377, 375, 1, 0, 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, 5, 39, 0, 0, 383, 118, 1, 0, 0, 0, 384, 385, 5, 91, 0, 0, 385, 386, 3, 121, 60, 0, 386, 387, 5, 93, 0, 0, 387, 120, 1, 0, 0, 0, 388, 389, 5, 61, 0, 0, 389, 390, 3, 121, 60, 0, 390, 391, 5, 61, 0, 0, 391, 401, 1, 0, 0, 0, 392, 396, 5, 91, 0, 0, 393, 395, 9, 0, 0, 0, 394, 393, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 399, 401, 5, 93, 0, 0, 400, 388, 1, 0, 0, 0, 400, 392, 1, 0, 0, 0, 401, 122, 1, 0, 0, 0, 402, 404, 3, 143, 71, 0, 403, 402, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 405, 406, 1, 0, 0, 0, 406, 124, 1, 0, 0, 0, 407, 408, 5, 48, 0, 0, 408, 410, 7, 4, 0, 0, 409, 411, 3, 145, 72, 0, 410, 409, 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 410, 1, 0, 0, 0, 412, 413, 1, 0, 0, 0, 413, 126, 1, 0, 0, 0, 414, 416, 3, 143, 71, 0, 415, 414, 1, 0, 0, 0, 416, 417, 1, 0, 0, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 419, 1, 0, 0, 0, 419, 423, 5, 46, 0, 0, 420, 422, 3, 143, 71, 0, 421, 420, 1, 0, 0, 0, 422, 425, 1, 0, 0, 0, 423, 421, 1, 0, 0, 0, 423, 424, 1, 0, 0, 0, 424, 427, 1, 0, 0, 0, 425, 423, 1, 0, 0, 0, 426, 428, 3, 131, 65, 0, 427, 426, 1, 0, 0, 0, 427, 428, 1, 0, 0, 0, 428, 446, 1, 0, 0, 0, 429, 431, 5, 46, 0, 0, 430, 432, 3, 143, 71, 0, 431, 430, 1, 0, 0, 0, 432, 433, 1, 0, 0, 0, 433, 431, 1, 0, 0, 0, 433, 434, 1, 0, 0, 0, 434, 436, 1, 0, 0, 0, 435, 437, 3, 131, 65, 0, 436, 435, 1, 0, 0, 0, 436, 437, 1, 0, 0, 0, 437, 446, 1, 0, 0, 0, 438, 440, 3, 143, 71, 0, 439, 438, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 444, 3, 131, 65, 0, 444, 446, 1, 0, 0, 0, 445, 415, 1, 0, 0, 0, 445, 429, 1, 0, 0, 0, 445, 439, 1, 0, 0, 0, 446, 128, 1, 0, 0, 0, 447, 448, 5, 48, 0, 0, 448, 450, 7, 4, 0, 0, 449, 451, 3, 145, 72, 0, 450, 449, 1, 0, 0, 0, 451, 452, 1, 0, 0, 0, 452, 450, 1, 0, 0, 0, 452, 453, 1, 0, 0, 0, 453, 454, 1, 0, 0, 0, 454, 458, 5, 46, 0, 0, 455, 457, 3, 145, 72, 0, 456, 455, 1, 0, 0, 0, 457, 460, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 458, 459, 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 461, 463, 3, 133, 66, 0, 462, 461, 1, 0, 0, 0, 462, 463, 1, 0, 0, 0, 463, 485, 1, 0, 0, 0, 464, 465, 5, 48, 0, 0, 465, 466, 7, 4, 0, 0, 466, 468, 5, 46, 0, 0, 467, 469, 3, 145, 72, 0, 468, 467, 1, 0, 0, 0, 469, 470, 1, 0, 0, 0, 470, 468, 1, 0, 0, 0, 470, 471, 1, 0, 0, 0, 471, 473, 1, 0, 0, 0, 472, 474, 3, 133, 66, 0, 473, 472, 1, 0, 0, 0, 473, 474, 1, 0, 0, 0, 474, 485, 1, 0, 0, 0, 475, 476, 5, 48, 0, 0, 476, 478, 7, 4, 0, 0, 477, 479, 3, 145, 72, 0, 478, 477, 1, 0, 0, 0, 479, 480, 1, 0, 0, 0, 480, 478, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 482, 1, 0, 0, 0, 482, 483, 3, 133, 66, 0, 483, 485, 1, 0, 0, 0, 484, 447, 1, 0, 0, 0, 484, 464, 1, 0, 0, 0, 484, 475, 1, 0, 0, 0, 485, 130, 1, 0, 0, 0, 486, 488, 7, 5, 0, 0, 487, 489, 7, 6, 0, 0, 488, 487, 1, 0, 0, 0, 488, 489, 1, 0, 0, 0, 489, 491, 1, 0, 0, 0, 490, 492, 3, 143, 71, 0, 491, 490, 1, 0, 0, 0, 492, 493, 1, 0, 0, 0, 493, 491, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 132, 1, 0, 0, 0, 495, 497, 7, 7, 0, 0, 496, 498, 7, 6, 0, 0, 497, 496, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, 498, 500, 1, 0, 0, 0, 499, 501, 3, 143, 71, 0, 500, 499, 1, 0, 0, 0, 501, 502, 1, 0, 0, 0, 502, 500, 1, 0, 0, 0, 502, 503, 1, 0, 0, 0, 503, 134, 1, 0, 0, 0, 504, 505, 5, 92, 0, 0, 505, 515, 7, 8, 0, 0, 506, 508, 5, 92, 0, 0, 507, 509, 5, 13, 0, 0, 508, 507, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 510, 1, 0, 0, 0, 510, 515, 5, 10, 0, 0, 511, 515, 3, 137, 68, 0, 512, 515, 3, 139, 69, 0, 513, 515, 3, 141, 70, 0, 514, 504, 1, 0, 0, 0, 514, 506, 1, 0, 0, 0, 514, 511, 1, 0, 0, 0, 514, 512, 1, 0, 0, 0, 514, 513, 1, 0, 0, 0, 515, 136, 1, 0, 0, 0, 516, 517, 5, 92, 0, 0, 517, 528, 3, 143, 71, 0, 518, 519, 5, 92, 0, 0, 519, 520, 3, 143, 71, 0, 520, 521, 3, 143, 71, 0, 521, 528, 1, 0, 0, 0, 522, 523, 5, 92, 0, 0, 523, 524, 7, 9, 0, 0, 524, 525, 3, 143, 71, 0, 525, 526, 3, 143, 71, 0, 526, 528, 1, 0, 0, 0, 527, 516, 1, 0, 0, 0, 527, 518, 1, 0, 0, 0, 527, 522, 1, 0, 0, 0, 528, 138, 1, 0, 0, 0, 529, 530, 5, 92, 0, 0, 530, 531, 5, 120, 0, 0, 531, 532, 3, 145, 72, 0, 532, 533, 3, 145, 72, 0, 533, 140, 1, 0, 0, 0, 534, 535, 5, 92, 0, 0, 535, 536, 5, 117, 0, 0, 536, 537, 5, 123, 0, 0, 537, 539, 1, 0, 0, 0, 538, 540, 3, 145, 72, 0, 539, 538, 1, 0, 0, 0, 540, 541, 1, 0, 0, 0, 541, 539, 1, 0, 0, 0, 541, 542, 1, 0, 0, 0, 542, 543, 1, 0, 0, 0, 543, 544, 5, 125, 0, 0, 544, 142, 1, 0, 0, 0, 545, 546, 7, 10, 0, 0, 546, 144, 1, 0, 0, 0, 547, 548, 7, 11, 0, 0, 548, 146, 1, 0, 0, 0, 549, 550, 8, 12, 0, 0, 550, 148, 1, 0, 0, 0, 551, 552, 5, 45, 0, 0, 552, 553, 5, 45, 0, 0, 553, 554, 5, 91, 0, 0, 554, 555, 1, 0, 0, 0, 555, 556, 3, 121, 60, 0, 556, 557, 5, 93, 0, 0, 557, 558, 1, 0, 0, 0, 558, 559, 6, 74, 0, 0, 559, 150, 1, 0, 0, 0, 560, 561, 5, 45, 0, 0, 561, 562, 5, 45, 0, 0, 562, 592, 1, 0, 0, 0, 563, 593, 1, 0, 0, 0, 564, 568, 5, 91, 0, 0, 565, 567, 5, 61, 0, 0, 566, 565, 1, 0, 0, 0, 567, 570, 1, 0, 0, 0, 568, 566, 1, 0, 0, 0, 568, 569, 1, 0, 0, 0, 569, 593, 1, 0, 0, 0, 570, 568, 1, 0, 0, 0, 571, 575, 5, 91, 0, 0, 572, 574, 5, 61, 0, 0, 573, 572, 1, 0, 0, 0, 574, 577, 1, 0, 0, 0, 575, 573, 1, 0, 0, 0, 575, 576, 1, 0, 0, 0, 576, 578, 1, 0, 0, 0, 577, 575, 1, 0, 0, 0, 578, 582, 8, 13, 0, 0, 579, 581, 8, 14, 0, 0, 580, 579, 1, 0, 0, 0, 581, 584, 1, 0, 0, 0, 582, 580, 1, 0, 0, 0, 582, 583, 1, 0, 0, 0, 583, 593, 1, 0, 0, 0, 584, 582, 1, 0, 0, 0, 585, 589, 8, 15, 0, 0, 586, 588, 8, 14, 0, 0, 587, 586, 1, 0, 0, 0, 588, 591, 1, 0, 0, 0, 589, 587, 1, 0, 0, 0, 589, 590, 1, 0, 0, 0, 590, 593, 1, 0, 0, 0, 591, 589, 1, 0, 0, 0, 592, 563, 1, 0, 0, 0, 592, 564, 1, 0, 0, 0, 592, 571, 1, 0, 0, 0, 592, 585, 1, 0, 0, 0, 593, 594, 1, 0, 0, 0, 594, 595, 6, 75, 0, 0, 595, 152, 1, 0, 0, 0, 596, 598, 7, 16, 0, 0, 597, 596, 1, 0, 0, 0, 598, 599, 1, 0, 0, 0, 599, 597, 1, 0, 0, 0, 599, 600, 1, 0, 0, 0, 600, 601, 1, 0, 0, 0, 601, 602, 6, 76, 1, 0, 602, 154, 1, 0, 0, 0, 603, 604, 7, 17, 0, 0, 604, 605, 1, 0, 0, 0, 605, 606, 6, 77, 1, 0, 606, 156, 1, 0, 0, 0, 607, 608, 5, 35, 0, 0, 608, 610, 4, 78, 0, 0, 609, 611, 5, 33, 0, 0, 610, 609, 1, 0, 0, 0, 610, 611, 1, 0, 0, 0, 611, 615, 1, 0, 0, 0, 612, 614, 3, 147, 73, 0, 613, 612, 1, 0, 0, 0, 614, 617, 1, 0, 0, 0, 615, 613, 1, 0, 0, 0, 615, 616, 1, 0, 0, 0, 616, 618, 1, 0, 0, 0, 617, 615, 1, 0, 0, 0, 618, 619, 6, 78, 1, 0, 619, 158, 1, 0, 0, 0, 40, 0, 361, 367, 369, 377, 379, 396, 400, 405, 412, 417, 423, 427, 433, 436, 441, 445, 452, 458, 462, 470, 473, 480, 484, 488, 493, 497, 502, 508, 514, 527, 541, 568, 575, 582, 589, 592, 599, 610, 615, 2, 0, 2, 0, 0, 1, 0] \ No newline at end of file +[4, 0, 69, 665, 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, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 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, 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, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 36, 1, 37, 1, 37, 1, 38, 1, 38, 1, 39, 1, 39, 1, 39, 1, 40, 1, 40, 1, 40, 1, 41, 1, 41, 1, 41, 1, 41, 1, 42, 1, 42, 1, 42, 1, 43, 1, 43, 1, 44, 1, 44, 1, 45, 1, 45, 1, 46, 1, 46, 1, 47, 1, 47, 1, 48, 1, 48, 1, 49, 1, 49, 1, 49, 1, 50, 1, 50, 1, 50, 1, 51, 1, 51, 1, 52, 1, 52, 1, 53, 1, 53, 1, 54, 1, 54, 1, 54, 1, 54, 1, 55, 1, 55, 1, 55, 1, 56, 1, 56, 5, 56, 360, 8, 56, 10, 56, 12, 56, 363, 9, 56, 1, 57, 1, 57, 1, 57, 5, 57, 368, 8, 57, 10, 57, 12, 57, 371, 9, 57, 1, 57, 1, 57, 1, 58, 1, 58, 1, 58, 5, 58, 378, 8, 58, 10, 58, 12, 58, 381, 9, 58, 1, 58, 1, 58, 1, 59, 1, 59, 1, 59, 1, 59, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 1, 60, 5, 60, 395, 8, 60, 10, 60, 12, 60, 398, 9, 60, 1, 60, 3, 60, 401, 8, 60, 1, 61, 4, 61, 404, 8, 61, 11, 61, 12, 61, 405, 1, 62, 1, 62, 1, 62, 4, 62, 411, 8, 62, 11, 62, 12, 62, 412, 1, 63, 4, 63, 416, 8, 63, 11, 63, 12, 63, 417, 1, 63, 1, 63, 5, 63, 422, 8, 63, 10, 63, 12, 63, 425, 9, 63, 1, 63, 3, 63, 428, 8, 63, 1, 63, 1, 63, 4, 63, 432, 8, 63, 11, 63, 12, 63, 433, 1, 63, 3, 63, 437, 8, 63, 1, 63, 4, 63, 440, 8, 63, 11, 63, 12, 63, 441, 1, 63, 1, 63, 3, 63, 446, 8, 63, 1, 64, 1, 64, 1, 64, 4, 64, 451, 8, 64, 11, 64, 12, 64, 452, 1, 64, 1, 64, 5, 64, 457, 8, 64, 10, 64, 12, 64, 460, 9, 64, 1, 64, 3, 64, 463, 8, 64, 1, 64, 1, 64, 1, 64, 1, 64, 4, 64, 469, 8, 64, 11, 64, 12, 64, 470, 1, 64, 3, 64, 474, 8, 64, 1, 64, 1, 64, 1, 64, 4, 64, 479, 8, 64, 11, 64, 12, 64, 480, 1, 64, 1, 64, 3, 64, 485, 8, 64, 1, 65, 1, 65, 3, 65, 489, 8, 65, 1, 65, 4, 65, 492, 8, 65, 11, 65, 12, 65, 493, 1, 66, 1, 66, 3, 66, 498, 8, 66, 1, 66, 4, 66, 501, 8, 66, 11, 66, 12, 66, 502, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 509, 8, 67, 1, 67, 1, 67, 1, 67, 1, 67, 3, 67, 515, 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, 3, 68, 531, 8, 68, 3, 68, 533, 8, 68, 1, 69, 1, 69, 1, 69, 1, 69, 1, 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, 3, 70, 587, 8, 70, 1, 70, 1, 70, 1, 71, 1, 71, 1, 72, 1, 72, 1, 73, 1, 73, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 74, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 1, 75, 5, 75, 612, 8, 75, 10, 75, 12, 75, 615, 9, 75, 1, 75, 1, 75, 5, 75, 619, 8, 75, 10, 75, 12, 75, 622, 9, 75, 1, 75, 1, 75, 5, 75, 626, 8, 75, 10, 75, 12, 75, 629, 9, 75, 1, 75, 1, 75, 5, 75, 633, 8, 75, 10, 75, 12, 75, 636, 9, 75, 3, 75, 638, 8, 75, 1, 75, 1, 75, 1, 76, 4, 76, 643, 8, 76, 11, 76, 12, 76, 644, 1, 76, 1, 76, 1, 77, 1, 77, 1, 77, 1, 77, 1, 78, 1, 78, 1, 78, 3, 78, 656, 8, 78, 1, 78, 5, 78, 659, 8, 78, 10, 78, 12, 78, 662, 9, 78, 1, 78, 1, 78, 1, 396, 0, 79, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 77, 39, 79, 40, 81, 41, 83, 42, 85, 43, 87, 44, 89, 45, 91, 46, 93, 47, 95, 48, 97, 49, 99, 50, 101, 51, 103, 52, 105, 53, 107, 54, 109, 55, 111, 56, 113, 57, 115, 58, 117, 59, 119, 60, 121, 0, 123, 61, 125, 62, 127, 63, 129, 64, 131, 0, 133, 0, 135, 0, 137, 0, 139, 0, 141, 0, 143, 0, 145, 0, 147, 0, 149, 65, 151, 66, 153, 67, 155, 68, 157, 69, 1, 0, 21, 3, 0, 65, 90, 95, 95, 97, 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 2, 0, 34, 34, 92, 92, 2, 0, 39, 39, 92, 92, 2, 0, 88, 88, 120, 120, 2, 0, 69, 69, 101, 101, 2, 0, 43, 43, 45, 45, 2, 0, 80, 80, 112, 112, 11, 0, 34, 36, 39, 39, 92, 92, 97, 98, 102, 102, 110, 110, 114, 114, 116, 116, 118, 118, 122, 122, 124, 124, 1, 0, 48, 49, 1, 0, 48, 53, 1, 0, 48, 52, 1, 0, 48, 55, 1, 0, 48, 57, 3, 0, 48, 57, 65, 70, 97, 102, 4, 0, 10, 10, 13, 13, 133, 133, 8232, 8233, 4, 0, 10, 10, 13, 13, 61, 61, 91, 91, 2, 0, 10, 10, 13, 13, 3, 0, 10, 10, 13, 13, 91, 91, 3, 0, 9, 9, 12, 13, 32, 32, 1, 0, 10, 10, 709, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0, 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 95, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 0, 99, 1, 0, 0, 0, 0, 101, 1, 0, 0, 0, 0, 103, 1, 0, 0, 0, 0, 105, 1, 0, 0, 0, 0, 107, 1, 0, 0, 0, 0, 109, 1, 0, 0, 0, 0, 111, 1, 0, 0, 0, 0, 113, 1, 0, 0, 0, 0, 115, 1, 0, 0, 0, 0, 117, 1, 0, 0, 0, 0, 119, 1, 0, 0, 0, 0, 123, 1, 0, 0, 0, 0, 125, 1, 0, 0, 0, 0, 127, 1, 0, 0, 0, 0, 129, 1, 0, 0, 0, 0, 149, 1, 0, 0, 0, 0, 151, 1, 0, 0, 0, 0, 153, 1, 0, 0, 0, 0, 155, 1, 0, 0, 0, 0, 157, 1, 0, 0, 0, 1, 159, 1, 0, 0, 0, 3, 161, 1, 0, 0, 0, 5, 163, 1, 0, 0, 0, 7, 169, 1, 0, 0, 0, 9, 174, 1, 0, 0, 0, 11, 177, 1, 0, 0, 0, 13, 181, 1, 0, 0, 0, 15, 187, 1, 0, 0, 0, 17, 194, 1, 0, 0, 0, 19, 200, 1, 0, 0, 0, 21, 203, 1, 0, 0, 0, 23, 208, 1, 0, 0, 0, 25, 215, 1, 0, 0, 0, 27, 220, 1, 0, 0, 0, 29, 224, 1, 0, 0, 0, 31, 226, 1, 0, 0, 0, 33, 229, 1, 0, 0, 0, 35, 238, 1, 0, 0, 0, 37, 244, 1, 0, 0, 0, 39, 246, 1, 0, 0, 0, 41, 248, 1, 0, 0, 0, 43, 255, 1, 0, 0, 0, 45, 264, 1, 0, 0, 0, 47, 267, 1, 0, 0, 0, 49, 271, 1, 0, 0, 0, 51, 277, 1, 0, 0, 0, 53, 282, 1, 0, 0, 0, 55, 284, 1, 0, 0, 0, 57, 286, 1, 0, 0, 0, 59, 288, 1, 0, 0, 0, 61, 290, 1, 0, 0, 0, 63, 292, 1, 0, 0, 0, 65, 294, 1, 0, 0, 0, 67, 298, 1, 0, 0, 0, 69, 301, 1, 0, 0, 0, 71, 304, 1, 0, 0, 0, 73, 306, 1, 0, 0, 0, 75, 309, 1, 0, 0, 0, 77, 311, 1, 0, 0, 0, 79, 313, 1, 0, 0, 0, 81, 316, 1, 0, 0, 0, 83, 319, 1, 0, 0, 0, 85, 323, 1, 0, 0, 0, 87, 326, 1, 0, 0, 0, 89, 328, 1, 0, 0, 0, 91, 330, 1, 0, 0, 0, 93, 332, 1, 0, 0, 0, 95, 334, 1, 0, 0, 0, 97, 336, 1, 0, 0, 0, 99, 338, 1, 0, 0, 0, 101, 341, 1, 0, 0, 0, 103, 344, 1, 0, 0, 0, 105, 346, 1, 0, 0, 0, 107, 348, 1, 0, 0, 0, 109, 350, 1, 0, 0, 0, 111, 354, 1, 0, 0, 0, 113, 357, 1, 0, 0, 0, 115, 364, 1, 0, 0, 0, 117, 374, 1, 0, 0, 0, 119, 384, 1, 0, 0, 0, 121, 400, 1, 0, 0, 0, 123, 403, 1, 0, 0, 0, 125, 407, 1, 0, 0, 0, 127, 445, 1, 0, 0, 0, 129, 484, 1, 0, 0, 0, 131, 486, 1, 0, 0, 0, 133, 495, 1, 0, 0, 0, 135, 514, 1, 0, 0, 0, 137, 516, 1, 0, 0, 0, 139, 534, 1, 0, 0, 0, 141, 539, 1, 0, 0, 0, 143, 590, 1, 0, 0, 0, 145, 592, 1, 0, 0, 0, 147, 594, 1, 0, 0, 0, 149, 596, 1, 0, 0, 0, 151, 605, 1, 0, 0, 0, 153, 642, 1, 0, 0, 0, 155, 648, 1, 0, 0, 0, 157, 652, 1, 0, 0, 0, 159, 160, 5, 59, 0, 0, 160, 2, 1, 0, 0, 0, 161, 162, 5, 61, 0, 0, 162, 4, 1, 0, 0, 0, 163, 164, 5, 98, 0, 0, 164, 165, 5, 114, 0, 0, 165, 166, 5, 101, 0, 0, 166, 167, 5, 97, 0, 0, 167, 168, 5, 107, 0, 0, 168, 6, 1, 0, 0, 0, 169, 170, 5, 103, 0, 0, 170, 171, 5, 111, 0, 0, 171, 172, 5, 116, 0, 0, 172, 173, 5, 111, 0, 0, 173, 8, 1, 0, 0, 0, 174, 175, 5, 100, 0, 0, 175, 176, 5, 111, 0, 0, 176, 10, 1, 0, 0, 0, 177, 178, 5, 101, 0, 0, 178, 179, 5, 110, 0, 0, 179, 180, 5, 100, 0, 0, 180, 12, 1, 0, 0, 0, 181, 182, 5, 119, 0, 0, 182, 183, 5, 104, 0, 0, 183, 184, 5, 105, 0, 0, 184, 185, 5, 108, 0, 0, 185, 186, 5, 101, 0, 0, 186, 14, 1, 0, 0, 0, 187, 188, 5, 114, 0, 0, 188, 189, 5, 101, 0, 0, 189, 190, 5, 112, 0, 0, 190, 191, 5, 101, 0, 0, 191, 192, 5, 97, 0, 0, 192, 193, 5, 116, 0, 0, 193, 16, 1, 0, 0, 0, 194, 195, 5, 117, 0, 0, 195, 196, 5, 110, 0, 0, 196, 197, 5, 116, 0, 0, 197, 198, 5, 105, 0, 0, 198, 199, 5, 108, 0, 0, 199, 18, 1, 0, 0, 0, 200, 201, 5, 105, 0, 0, 201, 202, 5, 102, 0, 0, 202, 20, 1, 0, 0, 0, 203, 204, 5, 116, 0, 0, 204, 205, 5, 104, 0, 0, 205, 206, 5, 101, 0, 0, 206, 207, 5, 110, 0, 0, 207, 22, 1, 0, 0, 0, 208, 209, 5, 101, 0, 0, 209, 210, 5, 108, 0, 0, 210, 211, 5, 115, 0, 0, 211, 212, 5, 101, 0, 0, 212, 213, 5, 105, 0, 0, 213, 214, 5, 102, 0, 0, 214, 24, 1, 0, 0, 0, 215, 216, 5, 101, 0, 0, 216, 217, 5, 108, 0, 0, 217, 218, 5, 115, 0, 0, 218, 219, 5, 101, 0, 0, 219, 26, 1, 0, 0, 0, 220, 221, 5, 102, 0, 0, 221, 222, 5, 111, 0, 0, 222, 223, 5, 114, 0, 0, 223, 28, 1, 0, 0, 0, 224, 225, 5, 44, 0, 0, 225, 30, 1, 0, 0, 0, 226, 227, 5, 105, 0, 0, 227, 228, 5, 110, 0, 0, 228, 32, 1, 0, 0, 0, 229, 230, 5, 102, 0, 0, 230, 231, 5, 117, 0, 0, 231, 232, 5, 110, 0, 0, 232, 233, 5, 99, 0, 0, 233, 234, 5, 116, 0, 0, 234, 235, 5, 105, 0, 0, 235, 236, 5, 111, 0, 0, 236, 237, 5, 110, 0, 0, 237, 34, 1, 0, 0, 0, 238, 239, 5, 108, 0, 0, 239, 240, 5, 111, 0, 0, 240, 241, 5, 99, 0, 0, 241, 242, 5, 97, 0, 0, 242, 243, 5, 108, 0, 0, 243, 36, 1, 0, 0, 0, 244, 245, 5, 60, 0, 0, 245, 38, 1, 0, 0, 0, 246, 247, 5, 62, 0, 0, 247, 40, 1, 0, 0, 0, 248, 249, 5, 114, 0, 0, 249, 250, 5, 101, 0, 0, 250, 251, 5, 116, 0, 0, 251, 252, 5, 117, 0, 0, 252, 253, 5, 114, 0, 0, 253, 254, 5, 110, 0, 0, 254, 42, 1, 0, 0, 0, 255, 256, 5, 99, 0, 0, 256, 257, 5, 111, 0, 0, 257, 258, 5, 110, 0, 0, 258, 259, 5, 116, 0, 0, 259, 260, 5, 105, 0, 0, 260, 261, 5, 110, 0, 0, 261, 262, 5, 117, 0, 0, 262, 263, 5, 101, 0, 0, 263, 44, 1, 0, 0, 0, 264, 265, 5, 58, 0, 0, 265, 266, 5, 58, 0, 0, 266, 46, 1, 0, 0, 0, 267, 268, 5, 110, 0, 0, 268, 269, 5, 105, 0, 0, 269, 270, 5, 108, 0, 0, 270, 48, 1, 0, 0, 0, 271, 272, 5, 102, 0, 0, 272, 273, 5, 97, 0, 0, 273, 274, 5, 108, 0, 0, 274, 275, 5, 115, 0, 0, 275, 276, 5, 101, 0, 0, 276, 50, 1, 0, 0, 0, 277, 278, 5, 116, 0, 0, 278, 279, 5, 114, 0, 0, 279, 280, 5, 117, 0, 0, 280, 281, 5, 101, 0, 0, 281, 52, 1, 0, 0, 0, 282, 283, 5, 46, 0, 0, 283, 54, 1, 0, 0, 0, 284, 285, 5, 126, 0, 0, 285, 56, 1, 0, 0, 0, 286, 287, 5, 45, 0, 0, 287, 58, 1, 0, 0, 0, 288, 289, 5, 35, 0, 0, 289, 60, 1, 0, 0, 0, 290, 291, 5, 40, 0, 0, 291, 62, 1, 0, 0, 0, 292, 293, 5, 41, 0, 0, 293, 64, 1, 0, 0, 0, 294, 295, 5, 110, 0, 0, 295, 296, 5, 111, 0, 0, 296, 297, 5, 116, 0, 0, 297, 66, 1, 0, 0, 0, 298, 299, 5, 60, 0, 0, 299, 300, 5, 60, 0, 0, 300, 68, 1, 0, 0, 0, 301, 302, 5, 62, 0, 0, 302, 303, 5, 62, 0, 0, 303, 70, 1, 0, 0, 0, 304, 305, 5, 38, 0, 0, 305, 72, 1, 0, 0, 0, 306, 307, 5, 47, 0, 0, 307, 308, 5, 47, 0, 0, 308, 74, 1, 0, 0, 0, 309, 310, 5, 37, 0, 0, 310, 76, 1, 0, 0, 0, 311, 312, 5, 58, 0, 0, 312, 78, 1, 0, 0, 0, 313, 314, 5, 60, 0, 0, 314, 315, 5, 61, 0, 0, 315, 80, 1, 0, 0, 0, 316, 317, 5, 62, 0, 0, 317, 318, 5, 61, 0, 0, 318, 82, 1, 0, 0, 0, 319, 320, 5, 97, 0, 0, 320, 321, 5, 110, 0, 0, 321, 322, 5, 100, 0, 0, 322, 84, 1, 0, 0, 0, 323, 324, 5, 111, 0, 0, 324, 325, 5, 114, 0, 0, 325, 86, 1, 0, 0, 0, 326, 327, 5, 43, 0, 0, 327, 88, 1, 0, 0, 0, 328, 329, 5, 42, 0, 0, 329, 90, 1, 0, 0, 0, 330, 331, 5, 123, 0, 0, 331, 92, 1, 0, 0, 0, 332, 333, 5, 125, 0, 0, 333, 94, 1, 0, 0, 0, 334, 335, 5, 91, 0, 0, 335, 96, 1, 0, 0, 0, 336, 337, 5, 93, 0, 0, 337, 98, 1, 0, 0, 0, 338, 339, 5, 61, 0, 0, 339, 340, 5, 61, 0, 0, 340, 100, 1, 0, 0, 0, 341, 342, 5, 46, 0, 0, 342, 343, 5, 46, 0, 0, 343, 102, 1, 0, 0, 0, 344, 345, 5, 124, 0, 0, 345, 104, 1, 0, 0, 0, 346, 347, 5, 94, 0, 0, 347, 106, 1, 0, 0, 0, 348, 349, 5, 47, 0, 0, 349, 108, 1, 0, 0, 0, 350, 351, 5, 46, 0, 0, 351, 352, 5, 46, 0, 0, 352, 353, 5, 46, 0, 0, 353, 110, 1, 0, 0, 0, 354, 355, 5, 126, 0, 0, 355, 356, 5, 61, 0, 0, 356, 112, 1, 0, 0, 0, 357, 361, 7, 0, 0, 0, 358, 360, 7, 1, 0, 0, 359, 358, 1, 0, 0, 0, 360, 363, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 361, 362, 1, 0, 0, 0, 362, 114, 1, 0, 0, 0, 363, 361, 1, 0, 0, 0, 364, 369, 5, 34, 0, 0, 365, 368, 3, 135, 67, 0, 366, 368, 8, 2, 0, 0, 367, 365, 1, 0, 0, 0, 367, 366, 1, 0, 0, 0, 368, 371, 1, 0, 0, 0, 369, 367, 1, 0, 0, 0, 369, 370, 1, 0, 0, 0, 370, 372, 1, 0, 0, 0, 371, 369, 1, 0, 0, 0, 372, 373, 5, 34, 0, 0, 373, 116, 1, 0, 0, 0, 374, 379, 5, 39, 0, 0, 375, 378, 3, 135, 67, 0, 376, 378, 8, 3, 0, 0, 377, 375, 1, 0, 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, 5, 39, 0, 0, 383, 118, 1, 0, 0, 0, 384, 385, 5, 91, 0, 0, 385, 386, 3, 121, 60, 0, 386, 387, 5, 93, 0, 0, 387, 120, 1, 0, 0, 0, 388, 389, 5, 61, 0, 0, 389, 390, 3, 121, 60, 0, 390, 391, 5, 61, 0, 0, 391, 401, 1, 0, 0, 0, 392, 396, 5, 91, 0, 0, 393, 395, 9, 0, 0, 0, 394, 393, 1, 0, 0, 0, 395, 398, 1, 0, 0, 0, 396, 397, 1, 0, 0, 0, 396, 394, 1, 0, 0, 0, 397, 399, 1, 0, 0, 0, 398, 396, 1, 0, 0, 0, 399, 401, 5, 93, 0, 0, 400, 388, 1, 0, 0, 0, 400, 392, 1, 0, 0, 0, 401, 122, 1, 0, 0, 0, 402, 404, 3, 143, 71, 0, 403, 402, 1, 0, 0, 0, 404, 405, 1, 0, 0, 0, 405, 403, 1, 0, 0, 0, 405, 406, 1, 0, 0, 0, 406, 124, 1, 0, 0, 0, 407, 408, 5, 48, 0, 0, 408, 410, 7, 4, 0, 0, 409, 411, 3, 145, 72, 0, 410, 409, 1, 0, 0, 0, 411, 412, 1, 0, 0, 0, 412, 410, 1, 0, 0, 0, 412, 413, 1, 0, 0, 0, 413, 126, 1, 0, 0, 0, 414, 416, 3, 143, 71, 0, 415, 414, 1, 0, 0, 0, 416, 417, 1, 0, 0, 0, 417, 415, 1, 0, 0, 0, 417, 418, 1, 0, 0, 0, 418, 419, 1, 0, 0, 0, 419, 423, 5, 46, 0, 0, 420, 422, 3, 143, 71, 0, 421, 420, 1, 0, 0, 0, 422, 425, 1, 0, 0, 0, 423, 421, 1, 0, 0, 0, 423, 424, 1, 0, 0, 0, 424, 427, 1, 0, 0, 0, 425, 423, 1, 0, 0, 0, 426, 428, 3, 131, 65, 0, 427, 426, 1, 0, 0, 0, 427, 428, 1, 0, 0, 0, 428, 446, 1, 0, 0, 0, 429, 431, 5, 46, 0, 0, 430, 432, 3, 143, 71, 0, 431, 430, 1, 0, 0, 0, 432, 433, 1, 0, 0, 0, 433, 431, 1, 0, 0, 0, 433, 434, 1, 0, 0, 0, 434, 436, 1, 0, 0, 0, 435, 437, 3, 131, 65, 0, 436, 435, 1, 0, 0, 0, 436, 437, 1, 0, 0, 0, 437, 446, 1, 0, 0, 0, 438, 440, 3, 143, 71, 0, 439, 438, 1, 0, 0, 0, 440, 441, 1, 0, 0, 0, 441, 439, 1, 0, 0, 0, 441, 442, 1, 0, 0, 0, 442, 443, 1, 0, 0, 0, 443, 444, 3, 131, 65, 0, 444, 446, 1, 0, 0, 0, 445, 415, 1, 0, 0, 0, 445, 429, 1, 0, 0, 0, 445, 439, 1, 0, 0, 0, 446, 128, 1, 0, 0, 0, 447, 448, 5, 48, 0, 0, 448, 450, 7, 4, 0, 0, 449, 451, 3, 145, 72, 0, 450, 449, 1, 0, 0, 0, 451, 452, 1, 0, 0, 0, 452, 450, 1, 0, 0, 0, 452, 453, 1, 0, 0, 0, 453, 454, 1, 0, 0, 0, 454, 458, 5, 46, 0, 0, 455, 457, 3, 145, 72, 0, 456, 455, 1, 0, 0, 0, 457, 460, 1, 0, 0, 0, 458, 456, 1, 0, 0, 0, 458, 459, 1, 0, 0, 0, 459, 462, 1, 0, 0, 0, 460, 458, 1, 0, 0, 0, 461, 463, 3, 133, 66, 0, 462, 461, 1, 0, 0, 0, 462, 463, 1, 0, 0, 0, 463, 485, 1, 0, 0, 0, 464, 465, 5, 48, 0, 0, 465, 466, 7, 4, 0, 0, 466, 468, 5, 46, 0, 0, 467, 469, 3, 145, 72, 0, 468, 467, 1, 0, 0, 0, 469, 470, 1, 0, 0, 0, 470, 468, 1, 0, 0, 0, 470, 471, 1, 0, 0, 0, 471, 473, 1, 0, 0, 0, 472, 474, 3, 133, 66, 0, 473, 472, 1, 0, 0, 0, 473, 474, 1, 0, 0, 0, 474, 485, 1, 0, 0, 0, 475, 476, 5, 48, 0, 0, 476, 478, 7, 4, 0, 0, 477, 479, 3, 145, 72, 0, 478, 477, 1, 0, 0, 0, 479, 480, 1, 0, 0, 0, 480, 478, 1, 0, 0, 0, 480, 481, 1, 0, 0, 0, 481, 482, 1, 0, 0, 0, 482, 483, 3, 133, 66, 0, 483, 485, 1, 0, 0, 0, 484, 447, 1, 0, 0, 0, 484, 464, 1, 0, 0, 0, 484, 475, 1, 0, 0, 0, 485, 130, 1, 0, 0, 0, 486, 488, 7, 5, 0, 0, 487, 489, 7, 6, 0, 0, 488, 487, 1, 0, 0, 0, 488, 489, 1, 0, 0, 0, 489, 491, 1, 0, 0, 0, 490, 492, 3, 143, 71, 0, 491, 490, 1, 0, 0, 0, 492, 493, 1, 0, 0, 0, 493, 491, 1, 0, 0, 0, 493, 494, 1, 0, 0, 0, 494, 132, 1, 0, 0, 0, 495, 497, 7, 7, 0, 0, 496, 498, 7, 6, 0, 0, 497, 496, 1, 0, 0, 0, 497, 498, 1, 0, 0, 0, 498, 500, 1, 0, 0, 0, 499, 501, 3, 143, 71, 0, 500, 499, 1, 0, 0, 0, 501, 502, 1, 0, 0, 0, 502, 500, 1, 0, 0, 0, 502, 503, 1, 0, 0, 0, 503, 134, 1, 0, 0, 0, 504, 505, 5, 92, 0, 0, 505, 515, 7, 8, 0, 0, 506, 508, 5, 92, 0, 0, 507, 509, 5, 13, 0, 0, 508, 507, 1, 0, 0, 0, 508, 509, 1, 0, 0, 0, 509, 510, 1, 0, 0, 0, 510, 515, 5, 10, 0, 0, 511, 515, 3, 137, 68, 0, 512, 515, 3, 139, 69, 0, 513, 515, 3, 141, 70, 0, 514, 504, 1, 0, 0, 0, 514, 506, 1, 0, 0, 0, 514, 511, 1, 0, 0, 0, 514, 512, 1, 0, 0, 0, 514, 513, 1, 0, 0, 0, 515, 136, 1, 0, 0, 0, 516, 532, 5, 92, 0, 0, 517, 533, 3, 143, 71, 0, 518, 519, 3, 143, 71, 0, 519, 520, 3, 143, 71, 0, 520, 533, 1, 0, 0, 0, 521, 522, 7, 9, 0, 0, 522, 523, 3, 143, 71, 0, 523, 524, 3, 143, 71, 0, 524, 533, 1, 0, 0, 0, 525, 530, 5, 50, 0, 0, 526, 527, 5, 53, 0, 0, 527, 531, 7, 10, 0, 0, 528, 529, 7, 11, 0, 0, 529, 531, 3, 143, 71, 0, 530, 526, 1, 0, 0, 0, 530, 528, 1, 0, 0, 0, 531, 533, 1, 0, 0, 0, 532, 517, 1, 0, 0, 0, 532, 518, 1, 0, 0, 0, 532, 521, 1, 0, 0, 0, 532, 525, 1, 0, 0, 0, 533, 138, 1, 0, 0, 0, 534, 535, 5, 92, 0, 0, 535, 536, 5, 120, 0, 0, 536, 537, 3, 145, 72, 0, 537, 538, 3, 145, 72, 0, 538, 140, 1, 0, 0, 0, 539, 540, 5, 92, 0, 0, 540, 541, 5, 117, 0, 0, 541, 542, 5, 123, 0, 0, 542, 586, 1, 0, 0, 0, 543, 587, 3, 145, 72, 0, 544, 545, 3, 145, 72, 0, 545, 546, 3, 145, 72, 0, 546, 587, 1, 0, 0, 0, 547, 548, 3, 145, 72, 0, 548, 549, 3, 145, 72, 0, 549, 550, 3, 145, 72, 0, 550, 587, 1, 0, 0, 0, 551, 552, 3, 145, 72, 0, 552, 553, 3, 145, 72, 0, 553, 554, 3, 145, 72, 0, 554, 555, 3, 145, 72, 0, 555, 587, 1, 0, 0, 0, 556, 557, 3, 145, 72, 0, 557, 558, 3, 145, 72, 0, 558, 559, 3, 145, 72, 0, 559, 560, 3, 145, 72, 0, 560, 561, 3, 145, 72, 0, 561, 587, 1, 0, 0, 0, 562, 563, 3, 145, 72, 0, 563, 564, 3, 145, 72, 0, 564, 565, 3, 145, 72, 0, 565, 566, 3, 145, 72, 0, 566, 567, 3, 145, 72, 0, 567, 568, 3, 145, 72, 0, 568, 587, 1, 0, 0, 0, 569, 570, 3, 145, 72, 0, 570, 571, 3, 145, 72, 0, 571, 572, 3, 145, 72, 0, 572, 573, 3, 145, 72, 0, 573, 574, 3, 145, 72, 0, 574, 575, 3, 145, 72, 0, 575, 576, 3, 145, 72, 0, 576, 587, 1, 0, 0, 0, 577, 578, 7, 12, 0, 0, 578, 579, 3, 145, 72, 0, 579, 580, 3, 145, 72, 0, 580, 581, 3, 145, 72, 0, 581, 582, 3, 145, 72, 0, 582, 583, 3, 145, 72, 0, 583, 584, 3, 145, 72, 0, 584, 585, 3, 145, 72, 0, 585, 587, 1, 0, 0, 0, 586, 543, 1, 0, 0, 0, 586, 544, 1, 0, 0, 0, 586, 547, 1, 0, 0, 0, 586, 551, 1, 0, 0, 0, 586, 556, 1, 0, 0, 0, 586, 562, 1, 0, 0, 0, 586, 569, 1, 0, 0, 0, 586, 577, 1, 0, 0, 0, 587, 588, 1, 0, 0, 0, 588, 589, 5, 125, 0, 0, 589, 142, 1, 0, 0, 0, 590, 591, 7, 13, 0, 0, 591, 144, 1, 0, 0, 0, 592, 593, 7, 14, 0, 0, 593, 146, 1, 0, 0, 0, 594, 595, 8, 15, 0, 0, 595, 148, 1, 0, 0, 0, 596, 597, 5, 45, 0, 0, 597, 598, 5, 45, 0, 0, 598, 599, 5, 91, 0, 0, 599, 600, 1, 0, 0, 0, 600, 601, 3, 121, 60, 0, 601, 602, 5, 93, 0, 0, 602, 603, 1, 0, 0, 0, 603, 604, 6, 74, 0, 0, 604, 150, 1, 0, 0, 0, 605, 606, 5, 45, 0, 0, 606, 607, 5, 45, 0, 0, 607, 637, 1, 0, 0, 0, 608, 638, 1, 0, 0, 0, 609, 613, 5, 91, 0, 0, 610, 612, 5, 61, 0, 0, 611, 610, 1, 0, 0, 0, 612, 615, 1, 0, 0, 0, 613, 611, 1, 0, 0, 0, 613, 614, 1, 0, 0, 0, 614, 638, 1, 0, 0, 0, 615, 613, 1, 0, 0, 0, 616, 620, 5, 91, 0, 0, 617, 619, 5, 61, 0, 0, 618, 617, 1, 0, 0, 0, 619, 622, 1, 0, 0, 0, 620, 618, 1, 0, 0, 0, 620, 621, 1, 0, 0, 0, 621, 623, 1, 0, 0, 0, 622, 620, 1, 0, 0, 0, 623, 627, 8, 16, 0, 0, 624, 626, 8, 17, 0, 0, 625, 624, 1, 0, 0, 0, 626, 629, 1, 0, 0, 0, 627, 625, 1, 0, 0, 0, 627, 628, 1, 0, 0, 0, 628, 638, 1, 0, 0, 0, 629, 627, 1, 0, 0, 0, 630, 634, 8, 18, 0, 0, 631, 633, 8, 17, 0, 0, 632, 631, 1, 0, 0, 0, 633, 636, 1, 0, 0, 0, 634, 632, 1, 0, 0, 0, 634, 635, 1, 0, 0, 0, 635, 638, 1, 0, 0, 0, 636, 634, 1, 0, 0, 0, 637, 608, 1, 0, 0, 0, 637, 609, 1, 0, 0, 0, 637, 616, 1, 0, 0, 0, 637, 630, 1, 0, 0, 0, 638, 639, 1, 0, 0, 0, 639, 640, 6, 75, 0, 0, 640, 152, 1, 0, 0, 0, 641, 643, 7, 19, 0, 0, 642, 641, 1, 0, 0, 0, 643, 644, 1, 0, 0, 0, 644, 642, 1, 0, 0, 0, 644, 645, 1, 0, 0, 0, 645, 646, 1, 0, 0, 0, 646, 647, 6, 76, 1, 0, 647, 154, 1, 0, 0, 0, 648, 649, 7, 20, 0, 0, 649, 650, 1, 0, 0, 0, 650, 651, 6, 77, 1, 0, 651, 156, 1, 0, 0, 0, 652, 653, 5, 35, 0, 0, 653, 655, 4, 78, 0, 0, 654, 656, 5, 33, 0, 0, 655, 654, 1, 0, 0, 0, 655, 656, 1, 0, 0, 0, 656, 660, 1, 0, 0, 0, 657, 659, 3, 147, 73, 0, 658, 657, 1, 0, 0, 0, 659, 662, 1, 0, 0, 0, 660, 658, 1, 0, 0, 0, 660, 661, 1, 0, 0, 0, 661, 663, 1, 0, 0, 0, 662, 660, 1, 0, 0, 0, 663, 664, 6, 78, 1, 0, 664, 158, 1, 0, 0, 0, 41, 0, 361, 367, 369, 377, 379, 396, 400, 405, 412, 417, 423, 427, 433, 436, 441, 445, 452, 458, 462, 470, 473, 480, 484, 488, 493, 497, 502, 508, 514, 530, 532, 586, 613, 620, 627, 634, 637, 644, 655, 660, 2, 0, 2, 0, 0, 1, 0] \ No newline at end of file diff --git a/luaparser/parser/LuaLexer.py b/luaparser/parser/LuaLexer.py index 994c673..9ca5b61 100644 --- a/luaparser/parser/LuaLexer.py +++ b/luaparser/parser/LuaLexer.py @@ -1,4 +1,4 @@ -# Generated from ./luaparser/parser/LuaLexer.g4 by ANTLR 4.13.2 +# Generated from luaparser/parser/LuaLexer.g4 by ANTLR 4.13.2 from antlr4 import * from io import StringIO import sys @@ -15,7 +15,7 @@ def serializedATN(): return [ - 4,0,69,620,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5, + 4,0,69,665,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, @@ -57,196 +57,214 @@ def serializedATN(): 485,8,64,1,65,1,65,3,65,489,8,65,1,65,4,65,492,8,65,11,65,12,65, 493,1,66,1,66,3,66,498,8,66,1,66,4,66,501,8,66,11,66,12,66,502,1, 67,1,67,1,67,1,67,3,67,509,8,67,1,67,1,67,1,67,1,67,3,67,515,8,67, - 1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,1,68,3,68,528, - 8,68,1,69,1,69,1,69,1,69,1,69,1,70,1,70,1,70,1,70,1,70,4,70,540, - 8,70,11,70,12,70,541,1,70,1,70,1,71,1,71,1,72,1,72,1,73,1,73,1,74, - 1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,75,1,75,1,75,1,75,1,75, - 1,75,5,75,567,8,75,10,75,12,75,570,9,75,1,75,1,75,5,75,574,8,75, - 10,75,12,75,577,9,75,1,75,1,75,5,75,581,8,75,10,75,12,75,584,9,75, - 1,75,1,75,5,75,588,8,75,10,75,12,75,591,9,75,3,75,593,8,75,1,75, - 1,75,1,76,4,76,598,8,76,11,76,12,76,599,1,76,1,76,1,77,1,77,1,77, - 1,77,1,78,1,78,1,78,3,78,611,8,78,1,78,5,78,614,8,78,10,78,12,78, - 617,9,78,1,78,1,78,1,396,0,79,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8, - 17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19, - 39,20,41,21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,59,30, - 61,31,63,32,65,33,67,34,69,35,71,36,73,37,75,38,77,39,79,40,81,41, - 83,42,85,43,87,44,89,45,91,46,93,47,95,48,97,49,99,50,101,51,103, - 52,105,53,107,54,109,55,111,56,113,57,115,58,117,59,119,60,121,0, - 123,61,125,62,127,63,129,64,131,0,133,0,135,0,137,0,139,0,141,0, - 143,0,145,0,147,0,149,65,151,66,153,67,155,68,157,69,1,0,18,3,0, - 65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,2,0,34,34,92,92, - 2,0,39,39,92,92,2,0,88,88,120,120,2,0,69,69,101,101,2,0,43,43,45, - 45,2,0,80,80,112,112,11,0,34,36,39,39,92,92,97,98,102,102,110,110, - 114,114,116,116,118,118,122,122,124,124,1,0,48,50,1,0,48,57,3,0, - 48,57,65,70,97,102,4,0,10,10,13,13,133,133,8232,8233,4,0,10,10,13, - 13,61,61,91,91,2,0,10,10,13,13,3,0,10,10,13,13,91,91,3,0,9,9,12, - 13,32,32,1,0,10,10,656,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1, - 0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1, - 0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1, - 0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1, - 0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1, - 0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1, - 0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1, - 0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1, - 0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1, - 0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1, - 0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107, - 1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0, - 0,117,1,0,0,0,0,119,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1, - 0,0,0,0,129,1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0, - 155,1,0,0,0,0,157,1,0,0,0,1,159,1,0,0,0,3,161,1,0,0,0,5,163,1,0, - 0,0,7,169,1,0,0,0,9,174,1,0,0,0,11,177,1,0,0,0,13,181,1,0,0,0,15, - 187,1,0,0,0,17,194,1,0,0,0,19,200,1,0,0,0,21,203,1,0,0,0,23,208, - 1,0,0,0,25,215,1,0,0,0,27,220,1,0,0,0,29,224,1,0,0,0,31,226,1,0, - 0,0,33,229,1,0,0,0,35,238,1,0,0,0,37,244,1,0,0,0,39,246,1,0,0,0, - 41,248,1,0,0,0,43,255,1,0,0,0,45,264,1,0,0,0,47,267,1,0,0,0,49,271, - 1,0,0,0,51,277,1,0,0,0,53,282,1,0,0,0,55,284,1,0,0,0,57,286,1,0, - 0,0,59,288,1,0,0,0,61,290,1,0,0,0,63,292,1,0,0,0,65,294,1,0,0,0, - 67,298,1,0,0,0,69,301,1,0,0,0,71,304,1,0,0,0,73,306,1,0,0,0,75,309, - 1,0,0,0,77,311,1,0,0,0,79,313,1,0,0,0,81,316,1,0,0,0,83,319,1,0, - 0,0,85,323,1,0,0,0,87,326,1,0,0,0,89,328,1,0,0,0,91,330,1,0,0,0, - 93,332,1,0,0,0,95,334,1,0,0,0,97,336,1,0,0,0,99,338,1,0,0,0,101, - 341,1,0,0,0,103,344,1,0,0,0,105,346,1,0,0,0,107,348,1,0,0,0,109, - 350,1,0,0,0,111,354,1,0,0,0,113,357,1,0,0,0,115,364,1,0,0,0,117, - 374,1,0,0,0,119,384,1,0,0,0,121,400,1,0,0,0,123,403,1,0,0,0,125, - 407,1,0,0,0,127,445,1,0,0,0,129,484,1,0,0,0,131,486,1,0,0,0,133, - 495,1,0,0,0,135,514,1,0,0,0,137,527,1,0,0,0,139,529,1,0,0,0,141, - 534,1,0,0,0,143,545,1,0,0,0,145,547,1,0,0,0,147,549,1,0,0,0,149, - 551,1,0,0,0,151,560,1,0,0,0,153,597,1,0,0,0,155,603,1,0,0,0,157, - 607,1,0,0,0,159,160,5,59,0,0,160,2,1,0,0,0,161,162,5,61,0,0,162, - 4,1,0,0,0,163,164,5,98,0,0,164,165,5,114,0,0,165,166,5,101,0,0,166, - 167,5,97,0,0,167,168,5,107,0,0,168,6,1,0,0,0,169,170,5,103,0,0,170, - 171,5,111,0,0,171,172,5,116,0,0,172,173,5,111,0,0,173,8,1,0,0,0, - 174,175,5,100,0,0,175,176,5,111,0,0,176,10,1,0,0,0,177,178,5,101, - 0,0,178,179,5,110,0,0,179,180,5,100,0,0,180,12,1,0,0,0,181,182,5, - 119,0,0,182,183,5,104,0,0,183,184,5,105,0,0,184,185,5,108,0,0,185, - 186,5,101,0,0,186,14,1,0,0,0,187,188,5,114,0,0,188,189,5,101,0,0, - 189,190,5,112,0,0,190,191,5,101,0,0,191,192,5,97,0,0,192,193,5,116, - 0,0,193,16,1,0,0,0,194,195,5,117,0,0,195,196,5,110,0,0,196,197,5, - 116,0,0,197,198,5,105,0,0,198,199,5,108,0,0,199,18,1,0,0,0,200,201, - 5,105,0,0,201,202,5,102,0,0,202,20,1,0,0,0,203,204,5,116,0,0,204, - 205,5,104,0,0,205,206,5,101,0,0,206,207,5,110,0,0,207,22,1,0,0,0, - 208,209,5,101,0,0,209,210,5,108,0,0,210,211,5,115,0,0,211,212,5, - 101,0,0,212,213,5,105,0,0,213,214,5,102,0,0,214,24,1,0,0,0,215,216, - 5,101,0,0,216,217,5,108,0,0,217,218,5,115,0,0,218,219,5,101,0,0, - 219,26,1,0,0,0,220,221,5,102,0,0,221,222,5,111,0,0,222,223,5,114, - 0,0,223,28,1,0,0,0,224,225,5,44,0,0,225,30,1,0,0,0,226,227,5,105, - 0,0,227,228,5,110,0,0,228,32,1,0,0,0,229,230,5,102,0,0,230,231,5, - 117,0,0,231,232,5,110,0,0,232,233,5,99,0,0,233,234,5,116,0,0,234, - 235,5,105,0,0,235,236,5,111,0,0,236,237,5,110,0,0,237,34,1,0,0,0, - 238,239,5,108,0,0,239,240,5,111,0,0,240,241,5,99,0,0,241,242,5,97, - 0,0,242,243,5,108,0,0,243,36,1,0,0,0,244,245,5,60,0,0,245,38,1,0, - 0,0,246,247,5,62,0,0,247,40,1,0,0,0,248,249,5,114,0,0,249,250,5, - 101,0,0,250,251,5,116,0,0,251,252,5,117,0,0,252,253,5,114,0,0,253, - 254,5,110,0,0,254,42,1,0,0,0,255,256,5,99,0,0,256,257,5,111,0,0, - 257,258,5,110,0,0,258,259,5,116,0,0,259,260,5,105,0,0,260,261,5, - 110,0,0,261,262,5,117,0,0,262,263,5,101,0,0,263,44,1,0,0,0,264,265, - 5,58,0,0,265,266,5,58,0,0,266,46,1,0,0,0,267,268,5,110,0,0,268,269, - 5,105,0,0,269,270,5,108,0,0,270,48,1,0,0,0,271,272,5,102,0,0,272, - 273,5,97,0,0,273,274,5,108,0,0,274,275,5,115,0,0,275,276,5,101,0, - 0,276,50,1,0,0,0,277,278,5,116,0,0,278,279,5,114,0,0,279,280,5,117, - 0,0,280,281,5,101,0,0,281,52,1,0,0,0,282,283,5,46,0,0,283,54,1,0, - 0,0,284,285,5,126,0,0,285,56,1,0,0,0,286,287,5,45,0,0,287,58,1,0, - 0,0,288,289,5,35,0,0,289,60,1,0,0,0,290,291,5,40,0,0,291,62,1,0, - 0,0,292,293,5,41,0,0,293,64,1,0,0,0,294,295,5,110,0,0,295,296,5, - 111,0,0,296,297,5,116,0,0,297,66,1,0,0,0,298,299,5,60,0,0,299,300, - 5,60,0,0,300,68,1,0,0,0,301,302,5,62,0,0,302,303,5,62,0,0,303,70, - 1,0,0,0,304,305,5,38,0,0,305,72,1,0,0,0,306,307,5,47,0,0,307,308, - 5,47,0,0,308,74,1,0,0,0,309,310,5,37,0,0,310,76,1,0,0,0,311,312, - 5,58,0,0,312,78,1,0,0,0,313,314,5,60,0,0,314,315,5,61,0,0,315,80, - 1,0,0,0,316,317,5,62,0,0,317,318,5,61,0,0,318,82,1,0,0,0,319,320, - 5,97,0,0,320,321,5,110,0,0,321,322,5,100,0,0,322,84,1,0,0,0,323, - 324,5,111,0,0,324,325,5,114,0,0,325,86,1,0,0,0,326,327,5,43,0,0, - 327,88,1,0,0,0,328,329,5,42,0,0,329,90,1,0,0,0,330,331,5,123,0,0, - 331,92,1,0,0,0,332,333,5,125,0,0,333,94,1,0,0,0,334,335,5,91,0,0, - 335,96,1,0,0,0,336,337,5,93,0,0,337,98,1,0,0,0,338,339,5,61,0,0, - 339,340,5,61,0,0,340,100,1,0,0,0,341,342,5,46,0,0,342,343,5,46,0, - 0,343,102,1,0,0,0,344,345,5,124,0,0,345,104,1,0,0,0,346,347,5,94, - 0,0,347,106,1,0,0,0,348,349,5,47,0,0,349,108,1,0,0,0,350,351,5,46, - 0,0,351,352,5,46,0,0,352,353,5,46,0,0,353,110,1,0,0,0,354,355,5, - 126,0,0,355,356,5,61,0,0,356,112,1,0,0,0,357,361,7,0,0,0,358,360, - 7,1,0,0,359,358,1,0,0,0,360,363,1,0,0,0,361,359,1,0,0,0,361,362, - 1,0,0,0,362,114,1,0,0,0,363,361,1,0,0,0,364,369,5,34,0,0,365,368, - 3,135,67,0,366,368,8,2,0,0,367,365,1,0,0,0,367,366,1,0,0,0,368,371, - 1,0,0,0,369,367,1,0,0,0,369,370,1,0,0,0,370,372,1,0,0,0,371,369, - 1,0,0,0,372,373,5,34,0,0,373,116,1,0,0,0,374,379,5,39,0,0,375,378, - 3,135,67,0,376,378,8,3,0,0,377,375,1,0,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,5,39,0,0,383,118,1,0,0,0,384,385,5,91,0,0,385,386, - 3,121,60,0,386,387,5,93,0,0,387,120,1,0,0,0,388,389,5,61,0,0,389, - 390,3,121,60,0,390,391,5,61,0,0,391,401,1,0,0,0,392,396,5,91,0,0, - 393,395,9,0,0,0,394,393,1,0,0,0,395,398,1,0,0,0,396,397,1,0,0,0, - 396,394,1,0,0,0,397,399,1,0,0,0,398,396,1,0,0,0,399,401,5,93,0,0, - 400,388,1,0,0,0,400,392,1,0,0,0,401,122,1,0,0,0,402,404,3,143,71, - 0,403,402,1,0,0,0,404,405,1,0,0,0,405,403,1,0,0,0,405,406,1,0,0, - 0,406,124,1,0,0,0,407,408,5,48,0,0,408,410,7,4,0,0,409,411,3,145, - 72,0,410,409,1,0,0,0,411,412,1,0,0,0,412,410,1,0,0,0,412,413,1,0, - 0,0,413,126,1,0,0,0,414,416,3,143,71,0,415,414,1,0,0,0,416,417,1, - 0,0,0,417,415,1,0,0,0,417,418,1,0,0,0,418,419,1,0,0,0,419,423,5, - 46,0,0,420,422,3,143,71,0,421,420,1,0,0,0,422,425,1,0,0,0,423,421, - 1,0,0,0,423,424,1,0,0,0,424,427,1,0,0,0,425,423,1,0,0,0,426,428, - 3,131,65,0,427,426,1,0,0,0,427,428,1,0,0,0,428,446,1,0,0,0,429,431, - 5,46,0,0,430,432,3,143,71,0,431,430,1,0,0,0,432,433,1,0,0,0,433, - 431,1,0,0,0,433,434,1,0,0,0,434,436,1,0,0,0,435,437,3,131,65,0,436, - 435,1,0,0,0,436,437,1,0,0,0,437,446,1,0,0,0,438,440,3,143,71,0,439, - 438,1,0,0,0,440,441,1,0,0,0,441,439,1,0,0,0,441,442,1,0,0,0,442, - 443,1,0,0,0,443,444,3,131,65,0,444,446,1,0,0,0,445,415,1,0,0,0,445, - 429,1,0,0,0,445,439,1,0,0,0,446,128,1,0,0,0,447,448,5,48,0,0,448, - 450,7,4,0,0,449,451,3,145,72,0,450,449,1,0,0,0,451,452,1,0,0,0,452, - 450,1,0,0,0,452,453,1,0,0,0,453,454,1,0,0,0,454,458,5,46,0,0,455, - 457,3,145,72,0,456,455,1,0,0,0,457,460,1,0,0,0,458,456,1,0,0,0,458, - 459,1,0,0,0,459,462,1,0,0,0,460,458,1,0,0,0,461,463,3,133,66,0,462, - 461,1,0,0,0,462,463,1,0,0,0,463,485,1,0,0,0,464,465,5,48,0,0,465, - 466,7,4,0,0,466,468,5,46,0,0,467,469,3,145,72,0,468,467,1,0,0,0, - 469,470,1,0,0,0,470,468,1,0,0,0,470,471,1,0,0,0,471,473,1,0,0,0, - 472,474,3,133,66,0,473,472,1,0,0,0,473,474,1,0,0,0,474,485,1,0,0, - 0,475,476,5,48,0,0,476,478,7,4,0,0,477,479,3,145,72,0,478,477,1, - 0,0,0,479,480,1,0,0,0,480,478,1,0,0,0,480,481,1,0,0,0,481,482,1, - 0,0,0,482,483,3,133,66,0,483,485,1,0,0,0,484,447,1,0,0,0,484,464, - 1,0,0,0,484,475,1,0,0,0,485,130,1,0,0,0,486,488,7,5,0,0,487,489, - 7,6,0,0,488,487,1,0,0,0,488,489,1,0,0,0,489,491,1,0,0,0,490,492, - 3,143,71,0,491,490,1,0,0,0,492,493,1,0,0,0,493,491,1,0,0,0,493,494, - 1,0,0,0,494,132,1,0,0,0,495,497,7,7,0,0,496,498,7,6,0,0,497,496, - 1,0,0,0,497,498,1,0,0,0,498,500,1,0,0,0,499,501,3,143,71,0,500,499, - 1,0,0,0,501,502,1,0,0,0,502,500,1,0,0,0,502,503,1,0,0,0,503,134, - 1,0,0,0,504,505,5,92,0,0,505,515,7,8,0,0,506,508,5,92,0,0,507,509, + 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,3,68,531,8,68,3,68,533,8,68,1,69,1,69,1,69,1,69,1,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,3,70,587,8,70,1,70,1,70,1,71,1, + 71,1,72,1,72,1,73,1,73,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1,74,1, + 74,1,75,1,75,1,75,1,75,1,75,1,75,5,75,612,8,75,10,75,12,75,615,9, + 75,1,75,1,75,5,75,619,8,75,10,75,12,75,622,9,75,1,75,1,75,5,75,626, + 8,75,10,75,12,75,629,9,75,1,75,1,75,5,75,633,8,75,10,75,12,75,636, + 9,75,3,75,638,8,75,1,75,1,75,1,76,4,76,643,8,76,11,76,12,76,644, + 1,76,1,76,1,77,1,77,1,77,1,77,1,78,1,78,1,78,3,78,656,8,78,1,78, + 5,78,659,8,78,10,78,12,78,662,9,78,1,78,1,78,1,396,0,79,1,1,3,2, + 5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29, + 15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51, + 26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,67,34,69,35,71,36,73, + 37,75,38,77,39,79,40,81,41,83,42,85,43,87,44,89,45,91,46,93,47,95, + 48,97,49,99,50,101,51,103,52,105,53,107,54,109,55,111,56,113,57, + 115,58,117,59,119,60,121,0,123,61,125,62,127,63,129,64,131,0,133, + 0,135,0,137,0,139,0,141,0,143,0,145,0,147,0,149,65,151,66,153,67, + 155,68,157,69,1,0,21,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95, + 97,122,2,0,34,34,92,92,2,0,39,39,92,92,2,0,88,88,120,120,2,0,69, + 69,101,101,2,0,43,43,45,45,2,0,80,80,112,112,11,0,34,36,39,39,92, + 92,97,98,102,102,110,110,114,114,116,116,118,118,122,122,124,124, + 1,0,48,49,1,0,48,53,1,0,48,52,1,0,48,55,1,0,48,57,3,0,48,57,65,70, + 97,102,4,0,10,10,13,13,133,133,8232,8233,4,0,10,10,13,13,61,61,91, + 91,2,0,10,10,13,13,3,0,10,10,13,13,91,91,3,0,9,9,12,13,32,32,1,0, + 10,10,709,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1, + 0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1, + 0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1, + 0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1, + 0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1, + 0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1, + 0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1, + 0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1, + 0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1, + 0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1, + 0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0, + 109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0, + 0,0,0,119,1,0,0,0,0,123,1,0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129, + 1,0,0,0,0,149,1,0,0,0,0,151,1,0,0,0,0,153,1,0,0,0,0,155,1,0,0,0, + 0,157,1,0,0,0,1,159,1,0,0,0,3,161,1,0,0,0,5,163,1,0,0,0,7,169,1, + 0,0,0,9,174,1,0,0,0,11,177,1,0,0,0,13,181,1,0,0,0,15,187,1,0,0,0, + 17,194,1,0,0,0,19,200,1,0,0,0,21,203,1,0,0,0,23,208,1,0,0,0,25,215, + 1,0,0,0,27,220,1,0,0,0,29,224,1,0,0,0,31,226,1,0,0,0,33,229,1,0, + 0,0,35,238,1,0,0,0,37,244,1,0,0,0,39,246,1,0,0,0,41,248,1,0,0,0, + 43,255,1,0,0,0,45,264,1,0,0,0,47,267,1,0,0,0,49,271,1,0,0,0,51,277, + 1,0,0,0,53,282,1,0,0,0,55,284,1,0,0,0,57,286,1,0,0,0,59,288,1,0, + 0,0,61,290,1,0,0,0,63,292,1,0,0,0,65,294,1,0,0,0,67,298,1,0,0,0, + 69,301,1,0,0,0,71,304,1,0,0,0,73,306,1,0,0,0,75,309,1,0,0,0,77,311, + 1,0,0,0,79,313,1,0,0,0,81,316,1,0,0,0,83,319,1,0,0,0,85,323,1,0, + 0,0,87,326,1,0,0,0,89,328,1,0,0,0,91,330,1,0,0,0,93,332,1,0,0,0, + 95,334,1,0,0,0,97,336,1,0,0,0,99,338,1,0,0,0,101,341,1,0,0,0,103, + 344,1,0,0,0,105,346,1,0,0,0,107,348,1,0,0,0,109,350,1,0,0,0,111, + 354,1,0,0,0,113,357,1,0,0,0,115,364,1,0,0,0,117,374,1,0,0,0,119, + 384,1,0,0,0,121,400,1,0,0,0,123,403,1,0,0,0,125,407,1,0,0,0,127, + 445,1,0,0,0,129,484,1,0,0,0,131,486,1,0,0,0,133,495,1,0,0,0,135, + 514,1,0,0,0,137,516,1,0,0,0,139,534,1,0,0,0,141,539,1,0,0,0,143, + 590,1,0,0,0,145,592,1,0,0,0,147,594,1,0,0,0,149,596,1,0,0,0,151, + 605,1,0,0,0,153,642,1,0,0,0,155,648,1,0,0,0,157,652,1,0,0,0,159, + 160,5,59,0,0,160,2,1,0,0,0,161,162,5,61,0,0,162,4,1,0,0,0,163,164, + 5,98,0,0,164,165,5,114,0,0,165,166,5,101,0,0,166,167,5,97,0,0,167, + 168,5,107,0,0,168,6,1,0,0,0,169,170,5,103,0,0,170,171,5,111,0,0, + 171,172,5,116,0,0,172,173,5,111,0,0,173,8,1,0,0,0,174,175,5,100, + 0,0,175,176,5,111,0,0,176,10,1,0,0,0,177,178,5,101,0,0,178,179,5, + 110,0,0,179,180,5,100,0,0,180,12,1,0,0,0,181,182,5,119,0,0,182,183, + 5,104,0,0,183,184,5,105,0,0,184,185,5,108,0,0,185,186,5,101,0,0, + 186,14,1,0,0,0,187,188,5,114,0,0,188,189,5,101,0,0,189,190,5,112, + 0,0,190,191,5,101,0,0,191,192,5,97,0,0,192,193,5,116,0,0,193,16, + 1,0,0,0,194,195,5,117,0,0,195,196,5,110,0,0,196,197,5,116,0,0,197, + 198,5,105,0,0,198,199,5,108,0,0,199,18,1,0,0,0,200,201,5,105,0,0, + 201,202,5,102,0,0,202,20,1,0,0,0,203,204,5,116,0,0,204,205,5,104, + 0,0,205,206,5,101,0,0,206,207,5,110,0,0,207,22,1,0,0,0,208,209,5, + 101,0,0,209,210,5,108,0,0,210,211,5,115,0,0,211,212,5,101,0,0,212, + 213,5,105,0,0,213,214,5,102,0,0,214,24,1,0,0,0,215,216,5,101,0,0, + 216,217,5,108,0,0,217,218,5,115,0,0,218,219,5,101,0,0,219,26,1,0, + 0,0,220,221,5,102,0,0,221,222,5,111,0,0,222,223,5,114,0,0,223,28, + 1,0,0,0,224,225,5,44,0,0,225,30,1,0,0,0,226,227,5,105,0,0,227,228, + 5,110,0,0,228,32,1,0,0,0,229,230,5,102,0,0,230,231,5,117,0,0,231, + 232,5,110,0,0,232,233,5,99,0,0,233,234,5,116,0,0,234,235,5,105,0, + 0,235,236,5,111,0,0,236,237,5,110,0,0,237,34,1,0,0,0,238,239,5,108, + 0,0,239,240,5,111,0,0,240,241,5,99,0,0,241,242,5,97,0,0,242,243, + 5,108,0,0,243,36,1,0,0,0,244,245,5,60,0,0,245,38,1,0,0,0,246,247, + 5,62,0,0,247,40,1,0,0,0,248,249,5,114,0,0,249,250,5,101,0,0,250, + 251,5,116,0,0,251,252,5,117,0,0,252,253,5,114,0,0,253,254,5,110, + 0,0,254,42,1,0,0,0,255,256,5,99,0,0,256,257,5,111,0,0,257,258,5, + 110,0,0,258,259,5,116,0,0,259,260,5,105,0,0,260,261,5,110,0,0,261, + 262,5,117,0,0,262,263,5,101,0,0,263,44,1,0,0,0,264,265,5,58,0,0, + 265,266,5,58,0,0,266,46,1,0,0,0,267,268,5,110,0,0,268,269,5,105, + 0,0,269,270,5,108,0,0,270,48,1,0,0,0,271,272,5,102,0,0,272,273,5, + 97,0,0,273,274,5,108,0,0,274,275,5,115,0,0,275,276,5,101,0,0,276, + 50,1,0,0,0,277,278,5,116,0,0,278,279,5,114,0,0,279,280,5,117,0,0, + 280,281,5,101,0,0,281,52,1,0,0,0,282,283,5,46,0,0,283,54,1,0,0,0, + 284,285,5,126,0,0,285,56,1,0,0,0,286,287,5,45,0,0,287,58,1,0,0,0, + 288,289,5,35,0,0,289,60,1,0,0,0,290,291,5,40,0,0,291,62,1,0,0,0, + 292,293,5,41,0,0,293,64,1,0,0,0,294,295,5,110,0,0,295,296,5,111, + 0,0,296,297,5,116,0,0,297,66,1,0,0,0,298,299,5,60,0,0,299,300,5, + 60,0,0,300,68,1,0,0,0,301,302,5,62,0,0,302,303,5,62,0,0,303,70,1, + 0,0,0,304,305,5,38,0,0,305,72,1,0,0,0,306,307,5,47,0,0,307,308,5, + 47,0,0,308,74,1,0,0,0,309,310,5,37,0,0,310,76,1,0,0,0,311,312,5, + 58,0,0,312,78,1,0,0,0,313,314,5,60,0,0,314,315,5,61,0,0,315,80,1, + 0,0,0,316,317,5,62,0,0,317,318,5,61,0,0,318,82,1,0,0,0,319,320,5, + 97,0,0,320,321,5,110,0,0,321,322,5,100,0,0,322,84,1,0,0,0,323,324, + 5,111,0,0,324,325,5,114,0,0,325,86,1,0,0,0,326,327,5,43,0,0,327, + 88,1,0,0,0,328,329,5,42,0,0,329,90,1,0,0,0,330,331,5,123,0,0,331, + 92,1,0,0,0,332,333,5,125,0,0,333,94,1,0,0,0,334,335,5,91,0,0,335, + 96,1,0,0,0,336,337,5,93,0,0,337,98,1,0,0,0,338,339,5,61,0,0,339, + 340,5,61,0,0,340,100,1,0,0,0,341,342,5,46,0,0,342,343,5,46,0,0,343, + 102,1,0,0,0,344,345,5,124,0,0,345,104,1,0,0,0,346,347,5,94,0,0,347, + 106,1,0,0,0,348,349,5,47,0,0,349,108,1,0,0,0,350,351,5,46,0,0,351, + 352,5,46,0,0,352,353,5,46,0,0,353,110,1,0,0,0,354,355,5,126,0,0, + 355,356,5,61,0,0,356,112,1,0,0,0,357,361,7,0,0,0,358,360,7,1,0,0, + 359,358,1,0,0,0,360,363,1,0,0,0,361,359,1,0,0,0,361,362,1,0,0,0, + 362,114,1,0,0,0,363,361,1,0,0,0,364,369,5,34,0,0,365,368,3,135,67, + 0,366,368,8,2,0,0,367,365,1,0,0,0,367,366,1,0,0,0,368,371,1,0,0, + 0,369,367,1,0,0,0,369,370,1,0,0,0,370,372,1,0,0,0,371,369,1,0,0, + 0,372,373,5,34,0,0,373,116,1,0,0,0,374,379,5,39,0,0,375,378,3,135, + 67,0,376,378,8,3,0,0,377,375,1,0,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,5,39,0,0,383,118,1,0,0,0,384,385,5,91,0,0,385,386,3, + 121,60,0,386,387,5,93,0,0,387,120,1,0,0,0,388,389,5,61,0,0,389,390, + 3,121,60,0,390,391,5,61,0,0,391,401,1,0,0,0,392,396,5,91,0,0,393, + 395,9,0,0,0,394,393,1,0,0,0,395,398,1,0,0,0,396,397,1,0,0,0,396, + 394,1,0,0,0,397,399,1,0,0,0,398,396,1,0,0,0,399,401,5,93,0,0,400, + 388,1,0,0,0,400,392,1,0,0,0,401,122,1,0,0,0,402,404,3,143,71,0,403, + 402,1,0,0,0,404,405,1,0,0,0,405,403,1,0,0,0,405,406,1,0,0,0,406, + 124,1,0,0,0,407,408,5,48,0,0,408,410,7,4,0,0,409,411,3,145,72,0, + 410,409,1,0,0,0,411,412,1,0,0,0,412,410,1,0,0,0,412,413,1,0,0,0, + 413,126,1,0,0,0,414,416,3,143,71,0,415,414,1,0,0,0,416,417,1,0,0, + 0,417,415,1,0,0,0,417,418,1,0,0,0,418,419,1,0,0,0,419,423,5,46,0, + 0,420,422,3,143,71,0,421,420,1,0,0,0,422,425,1,0,0,0,423,421,1,0, + 0,0,423,424,1,0,0,0,424,427,1,0,0,0,425,423,1,0,0,0,426,428,3,131, + 65,0,427,426,1,0,0,0,427,428,1,0,0,0,428,446,1,0,0,0,429,431,5,46, + 0,0,430,432,3,143,71,0,431,430,1,0,0,0,432,433,1,0,0,0,433,431,1, + 0,0,0,433,434,1,0,0,0,434,436,1,0,0,0,435,437,3,131,65,0,436,435, + 1,0,0,0,436,437,1,0,0,0,437,446,1,0,0,0,438,440,3,143,71,0,439,438, + 1,0,0,0,440,441,1,0,0,0,441,439,1,0,0,0,441,442,1,0,0,0,442,443, + 1,0,0,0,443,444,3,131,65,0,444,446,1,0,0,0,445,415,1,0,0,0,445,429, + 1,0,0,0,445,439,1,0,0,0,446,128,1,0,0,0,447,448,5,48,0,0,448,450, + 7,4,0,0,449,451,3,145,72,0,450,449,1,0,0,0,451,452,1,0,0,0,452,450, + 1,0,0,0,452,453,1,0,0,0,453,454,1,0,0,0,454,458,5,46,0,0,455,457, + 3,145,72,0,456,455,1,0,0,0,457,460,1,0,0,0,458,456,1,0,0,0,458,459, + 1,0,0,0,459,462,1,0,0,0,460,458,1,0,0,0,461,463,3,133,66,0,462,461, + 1,0,0,0,462,463,1,0,0,0,463,485,1,0,0,0,464,465,5,48,0,0,465,466, + 7,4,0,0,466,468,5,46,0,0,467,469,3,145,72,0,468,467,1,0,0,0,469, + 470,1,0,0,0,470,468,1,0,0,0,470,471,1,0,0,0,471,473,1,0,0,0,472, + 474,3,133,66,0,473,472,1,0,0,0,473,474,1,0,0,0,474,485,1,0,0,0,475, + 476,5,48,0,0,476,478,7,4,0,0,477,479,3,145,72,0,478,477,1,0,0,0, + 479,480,1,0,0,0,480,478,1,0,0,0,480,481,1,0,0,0,481,482,1,0,0,0, + 482,483,3,133,66,0,483,485,1,0,0,0,484,447,1,0,0,0,484,464,1,0,0, + 0,484,475,1,0,0,0,485,130,1,0,0,0,486,488,7,5,0,0,487,489,7,6,0, + 0,488,487,1,0,0,0,488,489,1,0,0,0,489,491,1,0,0,0,490,492,3,143, + 71,0,491,490,1,0,0,0,492,493,1,0,0,0,493,491,1,0,0,0,493,494,1,0, + 0,0,494,132,1,0,0,0,495,497,7,7,0,0,496,498,7,6,0,0,497,496,1,0, + 0,0,497,498,1,0,0,0,498,500,1,0,0,0,499,501,3,143,71,0,500,499,1, + 0,0,0,501,502,1,0,0,0,502,500,1,0,0,0,502,503,1,0,0,0,503,134,1, + 0,0,0,504,505,5,92,0,0,505,515,7,8,0,0,506,508,5,92,0,0,507,509, 5,13,0,0,508,507,1,0,0,0,508,509,1,0,0,0,509,510,1,0,0,0,510,515, 5,10,0,0,511,515,3,137,68,0,512,515,3,139,69,0,513,515,3,141,70, 0,514,504,1,0,0,0,514,506,1,0,0,0,514,511,1,0,0,0,514,512,1,0,0, - 0,514,513,1,0,0,0,515,136,1,0,0,0,516,517,5,92,0,0,517,528,3,143, - 71,0,518,519,5,92,0,0,519,520,3,143,71,0,520,521,3,143,71,0,521, - 528,1,0,0,0,522,523,5,92,0,0,523,524,7,9,0,0,524,525,3,143,71,0, - 525,526,3,143,71,0,526,528,1,0,0,0,527,516,1,0,0,0,527,518,1,0,0, - 0,527,522,1,0,0,0,528,138,1,0,0,0,529,530,5,92,0,0,530,531,5,120, - 0,0,531,532,3,145,72,0,532,533,3,145,72,0,533,140,1,0,0,0,534,535, - 5,92,0,0,535,536,5,117,0,0,536,537,5,123,0,0,537,539,1,0,0,0,538, - 540,3,145,72,0,539,538,1,0,0,0,540,541,1,0,0,0,541,539,1,0,0,0,541, - 542,1,0,0,0,542,543,1,0,0,0,543,544,5,125,0,0,544,142,1,0,0,0,545, - 546,7,10,0,0,546,144,1,0,0,0,547,548,7,11,0,0,548,146,1,0,0,0,549, - 550,8,12,0,0,550,148,1,0,0,0,551,552,5,45,0,0,552,553,5,45,0,0,553, - 554,5,91,0,0,554,555,1,0,0,0,555,556,3,121,60,0,556,557,5,93,0,0, - 557,558,1,0,0,0,558,559,6,74,0,0,559,150,1,0,0,0,560,561,5,45,0, - 0,561,562,5,45,0,0,562,592,1,0,0,0,563,593,1,0,0,0,564,568,5,91, - 0,0,565,567,5,61,0,0,566,565,1,0,0,0,567,570,1,0,0,0,568,566,1,0, - 0,0,568,569,1,0,0,0,569,593,1,0,0,0,570,568,1,0,0,0,571,575,5,91, - 0,0,572,574,5,61,0,0,573,572,1,0,0,0,574,577,1,0,0,0,575,573,1,0, - 0,0,575,576,1,0,0,0,576,578,1,0,0,0,577,575,1,0,0,0,578,582,8,13, - 0,0,579,581,8,14,0,0,580,579,1,0,0,0,581,584,1,0,0,0,582,580,1,0, - 0,0,582,583,1,0,0,0,583,593,1,0,0,0,584,582,1,0,0,0,585,589,8,15, - 0,0,586,588,8,14,0,0,587,586,1,0,0,0,588,591,1,0,0,0,589,587,1,0, - 0,0,589,590,1,0,0,0,590,593,1,0,0,0,591,589,1,0,0,0,592,563,1,0, - 0,0,592,564,1,0,0,0,592,571,1,0,0,0,592,585,1,0,0,0,593,594,1,0, - 0,0,594,595,6,75,0,0,595,152,1,0,0,0,596,598,7,16,0,0,597,596,1, - 0,0,0,598,599,1,0,0,0,599,597,1,0,0,0,599,600,1,0,0,0,600,601,1, - 0,0,0,601,602,6,76,1,0,602,154,1,0,0,0,603,604,7,17,0,0,604,605, - 1,0,0,0,605,606,6,77,1,0,606,156,1,0,0,0,607,608,5,35,0,0,608,610, - 4,78,0,0,609,611,5,33,0,0,610,609,1,0,0,0,610,611,1,0,0,0,611,615, - 1,0,0,0,612,614,3,147,73,0,613,612,1,0,0,0,614,617,1,0,0,0,615,613, - 1,0,0,0,615,616,1,0,0,0,616,618,1,0,0,0,617,615,1,0,0,0,618,619, - 6,78,1,0,619,158,1,0,0,0,40,0,361,367,369,377,379,396,400,405,412, - 417,423,427,433,436,441,445,452,458,462,470,473,480,484,488,493, - 497,502,508,514,527,541,568,575,582,589,592,599,610,615,2,0,2,0, - 0,1,0 + 0,514,513,1,0,0,0,515,136,1,0,0,0,516,532,5,92,0,0,517,533,3,143, + 71,0,518,519,3,143,71,0,519,520,3,143,71,0,520,533,1,0,0,0,521,522, + 7,9,0,0,522,523,3,143,71,0,523,524,3,143,71,0,524,533,1,0,0,0,525, + 530,5,50,0,0,526,527,5,53,0,0,527,531,7,10,0,0,528,529,7,11,0,0, + 529,531,3,143,71,0,530,526,1,0,0,0,530,528,1,0,0,0,531,533,1,0,0, + 0,532,517,1,0,0,0,532,518,1,0,0,0,532,521,1,0,0,0,532,525,1,0,0, + 0,533,138,1,0,0,0,534,535,5,92,0,0,535,536,5,120,0,0,536,537,3,145, + 72,0,537,538,3,145,72,0,538,140,1,0,0,0,539,540,5,92,0,0,540,541, + 5,117,0,0,541,542,5,123,0,0,542,586,1,0,0,0,543,587,3,145,72,0,544, + 545,3,145,72,0,545,546,3,145,72,0,546,587,1,0,0,0,547,548,3,145, + 72,0,548,549,3,145,72,0,549,550,3,145,72,0,550,587,1,0,0,0,551,552, + 3,145,72,0,552,553,3,145,72,0,553,554,3,145,72,0,554,555,3,145,72, + 0,555,587,1,0,0,0,556,557,3,145,72,0,557,558,3,145,72,0,558,559, + 3,145,72,0,559,560,3,145,72,0,560,561,3,145,72,0,561,587,1,0,0,0, + 562,563,3,145,72,0,563,564,3,145,72,0,564,565,3,145,72,0,565,566, + 3,145,72,0,566,567,3,145,72,0,567,568,3,145,72,0,568,587,1,0,0,0, + 569,570,3,145,72,0,570,571,3,145,72,0,571,572,3,145,72,0,572,573, + 3,145,72,0,573,574,3,145,72,0,574,575,3,145,72,0,575,576,3,145,72, + 0,576,587,1,0,0,0,577,578,7,12,0,0,578,579,3,145,72,0,579,580,3, + 145,72,0,580,581,3,145,72,0,581,582,3,145,72,0,582,583,3,145,72, + 0,583,584,3,145,72,0,584,585,3,145,72,0,585,587,1,0,0,0,586,543, + 1,0,0,0,586,544,1,0,0,0,586,547,1,0,0,0,586,551,1,0,0,0,586,556, + 1,0,0,0,586,562,1,0,0,0,586,569,1,0,0,0,586,577,1,0,0,0,587,588, + 1,0,0,0,588,589,5,125,0,0,589,142,1,0,0,0,590,591,7,13,0,0,591,144, + 1,0,0,0,592,593,7,14,0,0,593,146,1,0,0,0,594,595,8,15,0,0,595,148, + 1,0,0,0,596,597,5,45,0,0,597,598,5,45,0,0,598,599,5,91,0,0,599,600, + 1,0,0,0,600,601,3,121,60,0,601,602,5,93,0,0,602,603,1,0,0,0,603, + 604,6,74,0,0,604,150,1,0,0,0,605,606,5,45,0,0,606,607,5,45,0,0,607, + 637,1,0,0,0,608,638,1,0,0,0,609,613,5,91,0,0,610,612,5,61,0,0,611, + 610,1,0,0,0,612,615,1,0,0,0,613,611,1,0,0,0,613,614,1,0,0,0,614, + 638,1,0,0,0,615,613,1,0,0,0,616,620,5,91,0,0,617,619,5,61,0,0,618, + 617,1,0,0,0,619,622,1,0,0,0,620,618,1,0,0,0,620,621,1,0,0,0,621, + 623,1,0,0,0,622,620,1,0,0,0,623,627,8,16,0,0,624,626,8,17,0,0,625, + 624,1,0,0,0,626,629,1,0,0,0,627,625,1,0,0,0,627,628,1,0,0,0,628, + 638,1,0,0,0,629,627,1,0,0,0,630,634,8,18,0,0,631,633,8,17,0,0,632, + 631,1,0,0,0,633,636,1,0,0,0,634,632,1,0,0,0,634,635,1,0,0,0,635, + 638,1,0,0,0,636,634,1,0,0,0,637,608,1,0,0,0,637,609,1,0,0,0,637, + 616,1,0,0,0,637,630,1,0,0,0,638,639,1,0,0,0,639,640,6,75,0,0,640, + 152,1,0,0,0,641,643,7,19,0,0,642,641,1,0,0,0,643,644,1,0,0,0,644, + 642,1,0,0,0,644,645,1,0,0,0,645,646,1,0,0,0,646,647,6,76,1,0,647, + 154,1,0,0,0,648,649,7,20,0,0,649,650,1,0,0,0,650,651,6,77,1,0,651, + 156,1,0,0,0,652,653,5,35,0,0,653,655,4,78,0,0,654,656,5,33,0,0,655, + 654,1,0,0,0,655,656,1,0,0,0,656,660,1,0,0,0,657,659,3,147,73,0,658, + 657,1,0,0,0,659,662,1,0,0,0,660,658,1,0,0,0,660,661,1,0,0,0,661, + 663,1,0,0,0,662,660,1,0,0,0,663,664,6,78,1,0,664,158,1,0,0,0,41, + 0,361,367,369,377,379,396,400,405,412,417,423,427,433,436,441,445, + 452,458,462,470,473,480,484,488,493,497,502,508,514,530,532,586, + 613,620,627,634,637,644,655,660,2,0,2,0,0,1,0 ] class LuaLexer(LuaLexerBase): diff --git a/luaparser/printers.py b/luaparser/printers.py index ba5e141..3f11dc4 100644 --- a/luaparser/printers.py +++ b/luaparser/printers.py @@ -28,6 +28,10 @@ def __init__(self, indent): def visit(self, node): return repr(node) + @visitor(bytes) + def visit(self, node): + return repr(node) + @visitor(float) def visit(self, node): return str(node) @@ -124,41 +128,6 @@ def visit(self, node): return res -escape_dict = { - "\a": r"\a", - "\b": r"\b", - "\c": r"\c", - "\f": r"\f", - "\n": r"\n", - "\r": r"\r", - "\t": r"\t", - "\v": r"\v", - "'": r"\'", - '"': r"\"", - "\0": r"\0", - "\1": r"\1", - "\2": r"\2", - "\3": r"\3", - "\4": r"\4", - "\5": r"\5", - "\6": r"\6", - "\7": r"\7", - "\8": r"\8", - "\9": r"\9", -} - - -def raw(text): - """Returns a raw string representation of text""" - new_string = "" - for char in text: - try: - new_string += escape_dict[char] - except KeyError: - new_string += char - return new_string - - class HTMLStyleVisitor: def __init__(self): pass @@ -172,6 +141,12 @@ def get_xml_string(self, tree): return minidom.parseString(ElementTree.tostring(doc)).toprettyxml(indent=" ") + @visitor(bytes) + def visit(self, node): + if node.startswith(b'"') and node.endswith(b'"'): + node = node[1:-1] + return node + @visitor(str) def visit(self, node): if node.startswith('"') and node.endswith('"'): @@ -208,6 +183,8 @@ def visit(self, node): child_node = self.visit(attrValue) if type(child_node) is str: xml_attr.text = child_node + elif type(child_node) is bytes: + pass elif type(child_node) is list: xml_attr.extend(child_node) else: @@ -420,11 +397,11 @@ def visit(self, node: Number) -> str: @visit.register def visit(self, node: String) -> str: if node.delimiter == StringDelimiter.SINGLE_QUOTE: - return "'" + self.do_visit(node.s) + "'" + return "'" + self.do_visit(node.raw) + "'" elif node.delimiter == StringDelimiter.DOUBLE_QUOTE: - return '"' + self.do_visit(node.s) + '"' + return '"' + self.do_visit(node.raw) + '"' else: - return "[[" + self.do_visit(node.s) + "]]" + return "[[" + self.do_visit(node.raw) + "]]" @visit.register def visit(self, node: Table): diff --git a/luaparser/tests/test_comments.py b/luaparser/tests/test_comments.py index ca39895..88ff9b6 100644 --- a/luaparser/tests/test_comments.py +++ b/luaparser/tests/test_comments.py @@ -141,7 +141,7 @@ def test_comment_in_table(self): ), Field( Number(1), - String("foo", StringDelimiter.DOUBLE_QUOTE), + String(b"foo", "foo", StringDelimiter.DOUBLE_QUOTE), comments=[Comment("-- just a value")], between_brackets=True, ), diff --git a/luaparser/tests/test_expressions.py b/luaparser/tests/test_expressions.py index 34acc97..d0f95f7 100644 --- a/luaparser/tests/test_expressions.py +++ b/luaparser/tests/test_expressions.py @@ -368,8 +368,8 @@ def test_string_concatenation(self): targets=[Name("str")], values=[ Concat( - left=String("begin", StringDelimiter.DOUBLE_QUOTE), - right=String("end", StringDelimiter.DOUBLE_QUOTE), + left=String(b"begin", "begin", StringDelimiter.DOUBLE_QUOTE), + right=String(b"end", "end", StringDelimiter.DOUBLE_QUOTE), ) ], ) @@ -429,11 +429,11 @@ def test_dict(self): [ Field( Name("foo"), - String("bar", StringDelimiter.DOUBLE_QUOTE), + String(b"bar", "bar", StringDelimiter.DOUBLE_QUOTE), ), Field( Name("bar"), - String("foo", StringDelimiter.DOUBLE_QUOTE), + String(b"foo", "foo", StringDelimiter.DOUBLE_QUOTE), ), ] ) @@ -467,7 +467,7 @@ def test_nested_dict(self): [ Field( Name("car"), - Table([Field(Name("name"), String("bmw"))]), + Table([Field(Name("name"), String(b"bmw", "bmw"))]), ), Field( Name("options"), @@ -555,7 +555,7 @@ def test_mix_dict_array(self): ), Field( Number(1), - String("enabled", StringDelimiter.DOUBLE_QUOTE), + String(b"enabled", "enabled", StringDelimiter.DOUBLE_QUOTE), between_brackets=True, ), Field(Number(2), Number(157), between_brackets=True), @@ -563,7 +563,7 @@ def test_mix_dict_array(self): TrueExpr(), FalseExpr(), between_brackets=True ), Field( - String("true"), + String(b"true", "true"), TrueExpr(), between_brackets=True, ), @@ -588,7 +588,7 @@ def test_function_call_simple(self): [ Call( func=Name("print"), - args=[String("hello", StringDelimiter.DOUBLE_QUOTE)], + args=[String(b"hello", "hello", StringDelimiter.DOUBLE_QUOTE)], ) ] ) @@ -602,7 +602,7 @@ def test_function_call_no_par_string(self): [ Call( func=Name("print"), - args=[String("hello", StringDelimiter.DOUBLE_QUOTE)], + args=[String(b"hello", "hello", StringDelimiter.DOUBLE_QUOTE)], style=CallStyle.NO_PARENTHESIS, ) ] @@ -630,7 +630,7 @@ def test_function_invoke(self): Invoke( source=Name("foo"), func=Name("print"), - args=[String("hello", StringDelimiter.DOUBLE_QUOTE)], + args=[String(b"hello", "hello", StringDelimiter.DOUBLE_QUOTE)], ) ] ) @@ -645,7 +645,7 @@ def test_function_nested_invoke(self): Invoke( source=Invoke(source=Name("foo"), func=Name("bar"), args=[]), func=Name("print"), - args=[String("hello", StringDelimiter.DOUBLE_QUOTE)], + args=[String(b"hello", "hello", StringDelimiter.DOUBLE_QUOTE)], ) ] ) @@ -660,7 +660,7 @@ def test_function_call_args(self): Call( func=Name("print"), args=[ - String("hello", StringDelimiter.DOUBLE_QUOTE), + String(b"hello", "hello", StringDelimiter.DOUBLE_QUOTE), Number(n=42), ], ) @@ -708,7 +708,7 @@ def test_function_exp_invoke(self): notation=IndexNotation.SQUARE ), func=Name("hello"), - args=[String("ok", delimiter=StringDelimiter.DOUBLE_QUOTE)], + args=[String(b"ok", "ok", delimiter=StringDelimiter.DOUBLE_QUOTE)], style=CallStyle.NO_PARENTHESIS, ) ] diff --git a/luaparser/tests/test_integration.py b/luaparser/tests/test_integration.py index 87be805..1d7fa2a 100644 --- a/luaparser/tests/test_integration.py +++ b/luaparser/tests/test_integration.py @@ -34,7 +34,7 @@ def test_cont_int_1(self): Call( Name("describe"), [ - String("", StringDelimiter.DOUBLE_QUOTE), + String(b"", "", StringDelimiter.DOUBLE_QUOTE), AnonymousFunction( [], Block( @@ -119,7 +119,7 @@ def test_cont_int_3(self): tree = ast.parse(textwrap.dedent(r"""print(x['a'])""")) exp = Chunk(Block([Call( func=Name("print"), - args=[Index(idx=String("a"), value=Name("x"), notation=IndexNotation.SQUARE)], + args=[Index(idx=String(b"a", "a"), value=Name("x"), notation=IndexNotation.SQUARE)], )])) self.assertEqual(exp, tree) @@ -171,9 +171,10 @@ def test_cont_int_4(self): id: 'print' args: [] 1 item 0: {} 1 key - String: {} 4 keys + String: {} 5 keys wrapped: False - s: 'hello world !' + s: b'hello world !' + raw: 'hello world !' delimiter: SINGLE_QUOTE style: DEFAULT 1: {} 1 key @@ -255,6 +256,7 @@ def test_cont_int_6(self): Field( Name("mykey"), String( + b"myvalue", "myvalue", delimiter=StringDelimiter.DOUBLE_QUOTE, ), @@ -323,7 +325,7 @@ def test_cont_int_10(self): If( test=AndLoOp(left=GreaterThanOp(left=ULengthOP(Name("setting")), right=Number(10)), right=EqToOp(left=Name("setting_name"), - right=String("user", StringDelimiter.DOUBLE_QUOTE))), + right=String(b"user", "user", StringDelimiter.DOUBLE_QUOTE))), body=Block([ Return([Number(100)]) ]), @@ -340,7 +342,7 @@ def test_cont_int_12(self): """)) exp = Chunk( Block([ - Assign([Name("a")], [String("\x00\n\ta", StringDelimiter.SINGLE_QUOTE)]) + Assign([Name("a")], [String(b"\x00\n\ta", "\\0\\n\\ta", StringDelimiter.SINGLE_QUOTE)]) ]) ) self.assertEqual(exp, tree) diff --git a/luaparser/tests/test_lua_output.py b/luaparser/tests/test_lua_output.py index 178debe..ab3ad01 100644 --- a/luaparser/tests/test_lua_output.py +++ b/luaparser/tests/test_lua_output.py @@ -140,3 +140,33 @@ def test_int_24(self): def test_parenthesis(self): source = "a = (1 * 2) + 3" self.assertEqual(source, ast.to_lua_source(ast.parse(source))) + + def test_escapes(self): + escapes = [ + r"\a", + r"\b", + r"\f", + r"\n", + r"\r", + r"\t", + r"\v", + r"\\", + r"\"", + r"\'", + r"\z", + r"\x0A", + r"\1", + r"\12", + r"\123", + r"\u{13AA}", + r"\u{1F34B}", + r"\u{7FFFFFFF}", + ] + for escape in escapes: + with self.subTest(escape=escape): + source = rf's = "{escape}"' + self.assertEqual(source, ast.to_lua_source(ast.parse(source))) + + def test_unicode_string_literal(self): + source = 's = "🖥️"' + self.assertEqual(source, ast.to_lua_source(ast.parse(source))) diff --git a/luaparser/tests/test_statements.py b/luaparser/tests/test_statements.py index 87c5dbb..bad380b 100644 --- a/luaparser/tests/test_statements.py +++ b/luaparser/tests/test_statements.py @@ -44,7 +44,7 @@ def test_set_string(self): [ Assign( targets=[Name("i")], - values=[String("foo bar \\u{41}", StringDelimiter.DOUBLE_QUOTE)], + values=[String(b"foo bar A", "foo bar \\u{41}", StringDelimiter.DOUBLE_QUOTE)], ) ] ) @@ -317,7 +317,7 @@ def test_do_end(self): [ Do( body=Block( - [LocalAssign(targets=[Name("foo")], values=[String("bar")])] + [LocalAssign(targets=[Name("foo")], values=[String(b"bar", "bar")])] ) ) ] @@ -340,7 +340,7 @@ def test_while(self): While( test=TrueExpr(), body=Block( - [Call(func=Name("print"), args=[String("hello world")])] + [Call(func=Name("print"), args=[String(b"hello world", "hello world")])] ), ) ] @@ -536,7 +536,7 @@ def test_return_multiple(self): Return( [ Nil(), - String("error", StringDelimiter.DOUBLE_QUOTE), + String(b"error", "error", StringDelimiter.DOUBLE_QUOTE), Number(42), ] ) @@ -558,7 +558,7 @@ def test_index(self): [ Assign( targets=[Index(idx=Name("bar"), value=Name("foo"))], - values=[String("bar")], + values=[String(b"bar", "bar")], ) ] ) diff --git a/luaparser/tests/test_types_values.py b/luaparser/tests/test_types_values.py index 8a83933..5cd9ab5 100644 --- a/luaparser/tests/test_types_values.py +++ b/luaparser/tests/test_types_values.py @@ -58,7 +58,7 @@ def test_string_dbl_quote(self): [ Assign( targets=[Name("a")], - values=[String("a line", StringDelimiter.DOUBLE_QUOTE)], + values=[String(b"a line", "a line", StringDelimiter.DOUBLE_QUOTE)], ) ] ) @@ -68,7 +68,7 @@ def test_string_dbl_quote(self): def test_string_quote(self): tree = ast.parse(r"b = 'another line'") exp = Chunk( - Block([Assign(targets=[Name("b")], values=[String("another line")])]) + Block([Assign(targets=[Name("b")], values=[String(b"another line", "another line")])]) ) self.assertEqual(exp, tree) @@ -81,7 +81,8 @@ def test_string_escape(self): targets=[Name("b")], values=[ String( - "one line\nnext line\n\"in quotes\", 'in quotes'", + b"one line\nnext line\n\"in quotes\", 'in quotes'", + "one line\\nnext line\\n\\\"in quotes\\\", 'in quotes'", StringDelimiter.DOUBLE_QUOTE, ) ], @@ -98,7 +99,7 @@ def test_string_dbl_square(self): [ Assign( targets=[Name("b")], - values=[String("hello", StringDelimiter.DOUBLE_SQUARE)], + values=[String(b"hello", "hello", StringDelimiter.DOUBLE_SQUARE)], ) ] ) @@ -121,6 +122,7 @@ def test_string_dbl_square(self): targets=[Name("b")], values=[ String( + b"Multiple lines of text\ncan be enclosed in double square\nbrackets.", "Multiple lines of text\ncan be enclosed in double square\nbrackets.", StringDelimiter.DOUBLE_SQUARE, ) @@ -134,13 +136,13 @@ def test_string_dbl_square(self): def test_string_dbl_square_equal(self): tree = ast.parse(r"b = [=[one [[two]] one]=]") exp = Chunk( - Block([Assign(targets=[Name("b")], values=[String("one [[two]] one")])]) + Block([Assign(targets=[Name("b")], values=[String(b"one [[two]] one", "one [[two]] one")])]) ) self.assertEqual(exp, tree) def test_string_literal(self): tree = ast.parse(r'a="\u{9}"') exp = Chunk( - Block([Assign(targets=[Name("a")], values=[String(r"\u{9}", delimiter=StringDelimiter.DOUBLE_QUOTE)])]) + Block([Assign(targets=[Name("a")], values=[String(b"\x09", r"\u{9}", StringDelimiter.DOUBLE_QUOTE)])]) ) self.assertEqual(exp, tree) diff --git a/luaparser/utils/string_literals.py b/luaparser/utils/string_literals.py new file mode 100644 index 0000000..5fc75eb --- /dev/null +++ b/luaparser/utils/string_literals.py @@ -0,0 +1,108 @@ +def ucs_to_utf8(code_point): + if code_point < 0x80: + # 1-byte sequence (0xxxxxxx) + return bytes([code_point]) + elif code_point < 0x800: + # 2-byte sequence (110xxxxx 10xxxxxx) + return bytes([ + 0xC0 | (code_point >> 6), + 0x80 | (code_point & 0x3F) + ]) + elif code_point < 0x10000: + # 3-byte sequence (1110xxxx 10xxxxxx 10xxxxxx) + return bytes([ + 0xE0 | (code_point >> 12), + 0x80 | ((code_point >> 6) & 0x3F), + 0x80 | (code_point & 0x3F) + ]) + elif code_point < 0x200000: + # 4-byte sequence (11110xxx 10xxxxxx 10xxxxxx 10xxxxxx) + return bytes([ + 0xF0 | (code_point >> 18), + 0x80 | ((code_point >> 12) & 0x3F), + 0x80 | ((code_point >> 6) & 0x3F), + 0x80 | (code_point & 0x3F) + ]) + elif code_point < 0x4000000: + # 5-byte sequence (111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx) + return bytes([ + 0xF8 | (code_point >> 24), + 0x80 | ((code_point >> 18) & 0x3F), + 0x80 | ((code_point >> 12) & 0x3F), + 0x80 | ((code_point >> 6) & 0x3F), + 0x80 | (code_point & 0x3F) + ]) + elif code_point <= 0x7FFFFFFF: + # 6-byte sequence (1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx) + return bytes([ + 0xFC | (code_point >> 30), + 0x80 | ((code_point >> 24) & 0x3F), + 0x80 | ((code_point >> 18) & 0x3F), + 0x80 | ((code_point >> 12) & 0x3F), + 0x80 | ((code_point >> 6) & 0x3F), + 0x80 | (code_point & 0x3F) + ]) + +# This function assumes that the grammar is correctly specified and has range checks +def unescape_lua_string(s: str) -> bytes: + unescaped_bytes = [] + i = 0 + while i < len(s): + char = s[i] + if char == "\\": + i += 1 + escaped_char = s[i] + if escaped_char == "a": + unescaped_bytes.append(b"\a") + elif escaped_char == "b": + unescaped_bytes.append(b"\b") + elif escaped_char == "f": + unescaped_bytes.append(b"\f") + elif escaped_char == "n": + unescaped_bytes.append(b"\n") + elif escaped_char == "r": + unescaped_bytes.append(b"\r") + elif escaped_char == "t": + unescaped_bytes.append(b"\t") + elif escaped_char == "v": + unescaped_bytes.append(b"\v") + elif escaped_char == "\\": + unescaped_bytes.append(b"\\") + elif escaped_char == '"': + unescaped_bytes.append(b'"') + elif escaped_char == "'": + unescaped_bytes.append(b"'") + elif escaped_char == "z": + while i + 1 < len(s): + # Lua only ignores ASCII spaces after \z, not all Unicode spaces. + if not (s[i + 1].isspace() and s[i + 1].isascii()): + break + i += 1 + elif escaped_char == "x": + hex_code = int(s[i+1:i+3], 16) + unescaped_bytes.append(ucs_to_utf8(hex_code)) + i += 2 + elif escaped_char.isdigit(): + digits = [escaped_char] + if i + 1 < len(s) and s[i + 1].isdigit(): + digits.append(s[i + 1]) + i += 1 + if i + 1 < len(s) and s[i + 1].isdigit(): + digits.append(s[i + 1]) + i += 1 + num = int("".join(digits)) + unescaped_bytes.append(ucs_to_utf8(num)) + elif escaped_char == "u": + i += 1 + hex_chars = [] + while s[i + 1] != "}": + hex_chars.append(s[i + 1]) + i += 1 + hex_code = int("".join(hex_chars), 16) + unescaped_bytes.append(ucs_to_utf8(hex_code)) + i += 1 + else: + unescaped_bytes.append(char.encode("utf-8")) + i += 1 + + return b"".join(unescaped_bytes)