diff --git a/pyproject.toml b/pyproject.toml index a52491fd2..d56126b70 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,7 +92,7 @@ shell = """ branch = true omit = [ "tests/*", - "src/ply/*" + "src/**/*_standalone.py", ] [tool.pytest.ini_options] @@ -116,15 +116,18 @@ disable_error_code = [ "var-annotated", ] exclude = [ - 'src/ply/.*\.py$', - 'scratch/*', - '.venv/*', - 'venv/*', + 'scratch/.*', + '.venv/.*', + 'venv/.*', + 'src/.*_standalone\.py$', ] [[tool.mypy.overrides]] module = [ - "src.ply.*", + "src.zxbasm.asmparse_standalone", + "src.zxbasm.asmparse_zxnext_standalone", + "src.zxbc.zxbparser_standalone", + "src.zxbpp.zxbpp_standalone", ] follow_imports = "skip" @@ -134,7 +137,7 @@ target-version = "py314" exclude = [ ".venv/", "venv/", - "src/ply" # PLY, external 3rd party tool + "src/**/*standalone.py", ] [tool.ruff.lint] diff --git a/src/api/errmsg.py b/src/api/errmsg.py index 4a87a0cd2..97ccbca98 100644 --- a/src/api/errmsg.py +++ b/src/api/errmsg.py @@ -43,6 +43,9 @@ def info(msg: str) -> None: def error(lineno: int, msg: str, fname: str | None = None) -> None: """Generic syntax error routine""" + if getattr(global_, "syntax_error_occurred", False) and not getattr(global_, "reporting_syntax_error", False): + return + if fname is None: fname = global_.FILENAME @@ -60,6 +63,8 @@ def error(lineno: int, msg: str, fname: str | None = None) -> None: def warning(lineno: int, msg: str, fname: str | None = None) -> None: """Generic warning error routine""" + if getattr(global_, "syntax_error_occurred", False): + return global_.has_warnings += 1 if global_.has_warnings <= config.OPTIONS.expected_warnings: return diff --git a/src/api/global_.py b/src/api/global_.py index 3bf9bac85..c432a4ed8 100644 --- a/src/api/global_.py +++ b/src/api/global_.py @@ -59,6 +59,11 @@ class LoopInfo(NamedTuple): # ---------------------------------------------------------------------- has_errors = 0 # Number of errors has_warnings = 0 # Number of warnings +syntax_error_occurred = False # True if a syntax error occurred during parse +reporting_syntax_error = False # True if we are actively reporting a syntax error +tokens_yielded = 0 +tokens_rejected = 0 +shifted_at_last_error = 0 # ---------------------------------------------------------------------- # Default var type when not specified (implicit) an can't be guessed diff --git a/src/api/lex.py b/src/api/lex.py new file mode 100644 index 000000000..15b208e4f --- /dev/null +++ b/src/api/lex.py @@ -0,0 +1,245 @@ +# -------------------------------------------------------------------- +# SPDX-License-Identifier: AGPL-3.0-or-later +# © Copyright 2008-2024 José Manuel Rodríguez de la Rosa and contributors. +# See the file CONTRIBUTORS.md for copyright details. +# See https://www.gnu.org/licenses/agpl-3.0.html for details. +# -------------------------------------------------------------------- + +import re +import sys +from collections.abc import Callable +from typing import Any + + +class LexError(Exception): + pass + + +class LexToken: + def __init__(self) -> None: + self.type: str | None = None + self.value: Any = None + self.lineno: int = 1 + self.lexpos: int = 0 + self.lexer: Lexer | None = None + + def __repr__(self) -> str: + return f"LexToken({self.type},{self.value!r},{self.lineno},{self.lexpos})" + + +class Lexer: + def __init__(self, obj: Any) -> None: + self._object = obj + self.lexdata: str = "" + self.lexpos: int = 0 + self.lineno: int = 1 + self.statestack: list[str] = ["INITIAL"] + self.next_token: LexToken | None = None + + # Parse states + states = get_attr(obj, "states", ()) + state_names = {"INITIAL"} + for s in states: + state_names.add(s[0]) + + # Parse tokens + self.tokens = get_attr(obj, "tokens", ()) + + # Collect rules + functions: list[tuple[str, list[str], str, str, Callable[[LexToken], Any]]] = [] + strings: list[tuple[str, list[str], str, str]] = [] + self.error_handlers: dict[str, Callable[[LexToken], Any]] = {} + + # dir(obj) preserves definition order in modern Python, + # but we want to be safe and sort functions by co_firstlineno + for name in get_dir(obj): + if name.startswith("t_"): + val = get_attr(obj, name) + if name.endswith("_error"): + parts = name[2:-6].split("_") + target_states = [p for p in parts if p in state_names] + if not target_states: + target_states = ["INITIAL"] + for s in target_states: + self.error_handlers[s] = val + else: + parts = name[2:].split("_") + target_states = [] + i = 0 + # Consume state names from the left, leaving at least one part for the rule name + while i < len(parts) - 1 and parts[i] in state_names: + target_states.append(parts[i]) + i += 1 + + if not target_states: + target_states = ["INITIAL"] + rule_name = "_".join(parts) + else: + rule_name = "_".join(parts[i:]) + + if callable(val): + pattern = val.__doc__ + if pattern: + functions.append((name, target_states, rule_name, pattern, val)) + elif isinstance(val, str): + strings.append((name, target_states, rule_name, val)) + + # Sort functions by co_firstlineno to match definition order in file + def get_line_no(item: tuple[str, list[str], str, str, Callable[[LexToken], Any]]) -> int: + func = item[4] + try: + if hasattr(func, "__code__"): + return func.__code__.co_firstlineno + if hasattr(func, "__func__") and hasattr(func.__func__, "__code__"): + return func.__func__.__code__.co_firstlineno + except Exception: + pass + return 0 + + functions.sort(key=get_line_no) + + # Sort strings by pattern length descending + strings.sort(key=lambda x: len(x[3]), reverse=True) + + # Build rules per state + state_rules: dict[str, list[tuple[str, re.Pattern[str], Callable[[LexToken], Any] | None]]] = { + s: [] for s in state_names + } + + # Add functions first + for name, target_states, rule_name, pattern, func in functions: + try: + rx = re.compile(pattern) + for s in target_states: + state_rules[s].append((rule_name, rx, func)) + except Exception as e: + print(f"Error compiling pattern {pattern!r} for rule {name}: {e}", file=sys.stderr) + raise e + + # Add strings second + for name, target_states, rule_name, pattern in strings: + try: + rx = re.compile(pattern) + for s in target_states: + state_rules[s].append((rule_name, rx, None)) + except Exception as e: + print(f"Error compiling pattern {pattern!r} for rule {name}: {e}", file=sys.stderr) + raise e + + self.compiled_rules = state_rules + + def input(self, data: str) -> None: + self.lexdata = data + self.lexpos = 0 + self.lineno = 1 + self.statestack = ["INITIAL"] + self.next_token = None + + def begin(self, state: str) -> None: + if state not in self.compiled_rules: + raise LexError(f"Undefined state: {state}") + self.statestack[-1] = state + + def push_state(self, state: str) -> None: + if state not in self.compiled_rules: + raise LexError(f"Undefined state: {state}") + self.statestack.append(state) + + def pop_state(self) -> None: + if len(self.statestack) > 1: + self.statestack.pop() + else: + self.statestack = ["INITIAL"] + + def skip(self, n: int) -> None: + self.lexpos += n + + def clone(self) -> Lexer: + c = Lexer(self._object) + c.lexdata = self.lexdata + c.lexpos = self.lexpos + c.lineno = self.lineno + c.statestack = list(self.statestack) + c.next_token = self.next_token + return c + + def token(self) -> LexToken | None: + if self.next_token is not None: + t = self.next_token + self.next_token = None + return t + + while self.lexpos < len(self.lexdata): + state = self.statestack[-1] + rules = self.compiled_rules.get(state, []) + + matched = False + for rule_name, rx, val in rules: + m = rx.match(self.lexdata, self.lexpos) + if m: + matched = True + matched_text = m.group(0) + + t = LexToken() + t.type = rule_name + t.value = matched_text + t.lineno = self.lineno + t.lexpos = self.lexpos + t.lexer = self + + # Advance position BEFORE calling function + self.lexpos += len(matched_text) + + if val: + res = val(t) + if res is None: + # Ignored token + break + return res + # Convert to token type (which is rule_name) + return t + + if matched: + continue + + # No rule matched + err_handler = self.error_handlers.get(state) + if err_handler: + t = LexToken() + t.type = "error" + t.value = self.lexdata[self.lexpos :] + t.lineno = self.lineno + t.lexpos = self.lexpos + t.lexer = self + + old_pos = self.lexpos + res = err_handler(t) + if self.lexpos == old_pos: + self.lexpos += 1 + if res is not None: + return res + else: + raise LexError( + f"Lexical error: Illegal character {self.lexdata[self.lexpos]!r} at position {self.lexpos}" + ) + + return None + + +def get_attr(obj: Any, name: str, default: Any = None) -> Any: + if isinstance(obj, dict): + return obj.get(name, default) + return getattr(obj, name, default) + + +def get_dir(obj: Any) -> list[str]: + if isinstance(obj, dict): + return list(obj.keys()) + return dir(obj) + + +def lex(object: Any = None) -> Lexer: + if object is None: + frame = sys._getframe(1) + object = frame.f_globals + return Lexer(object) diff --git a/src/api/utils.py b/src/api/utils.py index ec44f24b1..2cdc07e5b 100644 --- a/src/api/utils.py +++ b/src/api/utils.py @@ -7,14 +7,13 @@ import errno import os -import shelve import signal from collections.abc import Callable, Iterable from contextlib import contextmanager from functools import wraps from typing import IO, Any, TypeVar -from src.api import constants, errmsg, global_ +from src.api import errmsg, global_ __all__ = ( "chdir", @@ -30,9 +29,6 @@ like reading files or path management""" -SHELVE_PATH = os.path.join(constants.ZXBASIC_ROOT, "parsetab", "tabs.dbm") -SHELVE = shelve.open(SHELVE_PATH, protocol=5, flag="c") - T = TypeVar("T") @@ -184,20 +180,6 @@ def eval_to_num(expr: str) -> int | float | None: return None -def load_object(key: str) -> Any: - return SHELVE[key] if key in SHELVE else None - - -def save_object(key: str, obj: Any) -> Any: - SHELVE[key] = obj - SHELVE.sync() - return obj - - -def get_or_create(key: str, fn: Callable[[], Any]) -> Any: - return load_object(key) or save_object(key, fn()) - - def timeout(seconds: Callable[[], int] | int = 10, error_message=os.strerror(errno.ETIME)): def decorator(func): def _handle_timeout(signum, frame): diff --git a/src/parsetab/__init__.py b/src/parsetab/__init__.py deleted file mode 100644 index 906667a8d..000000000 --- a/src/parsetab/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------- -# SPDX-License-Identifier: AGPL-3.0-or-later -# © Copyright 2008-2024 José Manuel Rodríguez de la Rosa and contributors. -# See the file CONTRIBUTORS.md for copyright details. -# See https://www.gnu.org/licenses/agpl-3.0.html for details. -# -------------------------------------------------------------------- diff --git a/src/parsetab/tabs.dbm.bak b/src/parsetab/tabs.dbm.bak deleted file mode 100644 index 286dd8adf..000000000 --- a/src/parsetab/tabs.dbm.bak +++ /dev/null @@ -1,4 +0,0 @@ -'zxbpp', (0, 71563) -'asmparse', (71680, 234798) -'zxnext_asmparse', (306688, 259879) -'zxbparser', (566784, 641214) diff --git a/src/parsetab/tabs.dbm.dat b/src/parsetab/tabs.dbm.dat deleted file mode 100644 index dfbdc2e07..000000000 Binary files a/src/parsetab/tabs.dbm.dat and /dev/null differ diff --git a/src/parsetab/tabs.dbm.dir b/src/parsetab/tabs.dbm.dir deleted file mode 100644 index 286dd8adf..000000000 --- a/src/parsetab/tabs.dbm.dir +++ /dev/null @@ -1,4 +0,0 @@ -'zxbpp', (0, 71563) -'asmparse', (71680, 234798) -'zxnext_asmparse', (306688, 259879) -'zxbparser', (566784, 641214) diff --git a/src/ply/__init__.py b/src/ply/__init__.py deleted file mode 100644 index 45f28c5b5..000000000 --- a/src/ply/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# PLY package -# Author: David Beazley (dave@dabeaz.com) -# https://github.com/dabeaz/ply - -__version__ = '2022.10.27' diff --git a/src/ply/lex.py b/src/ply/lex.py deleted file mode 100644 index 7037c09d3..000000000 --- a/src/ply/lex.py +++ /dev/null @@ -1,901 +0,0 @@ -# ----------------------------------------------------------------------------- -# ply: lex.py -# -# Copyright (C) 2001-2022 -# David M. Beazley (Dabeaz LLC) -# All rights reserved. -# -# Latest version: https://github.com/dabeaz/ply -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# * Neither the name of David Beazley or Dabeaz LLC may be used to -# endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# ----------------------------------------------------------------------------- - -import re -import sys -import types -import copy -import os -import inspect - -# This tuple contains acceptable string types -StringTypes = (str, bytes) - -# This regular expression is used to match valid token names -_is_identifier = re.compile(r'^[a-zA-Z0-9_]+$') - -# Exception thrown when invalid token encountered and no default error -# handler is defined. -class LexError(Exception): - def __init__(self, message, s): - self.args = (message,) - self.text = s - -# Token class. This class is used to represent the tokens produced. -class LexToken(object): - def __repr__(self): - return f'LexToken({self.type},{self.value!r},{self.lineno},{self.lexpos})' - -# This object is a stand-in for a logging object created by the -# logging module. - -class PlyLogger(object): - def __init__(self, f): - self.f = f - - def critical(self, msg, *args, **kwargs): - self.f.write((msg % args) + '\n') - - def warning(self, msg, *args, **kwargs): - self.f.write('WARNING: ' + (msg % args) + '\n') - - def error(self, msg, *args, **kwargs): - self.f.write('ERROR: ' + (msg % args) + '\n') - - info = critical - debug = critical - -# ----------------------------------------------------------------------------- -# === Lexing Engine === -# -# The following Lexer class implements the lexer runtime. There are only -# a few public methods and attributes: -# -# input() - Store a new string in the lexer -# token() - Get the next token -# clone() - Clone the lexer -# -# lineno - Current line number -# lexpos - Current position in the input string -# ----------------------------------------------------------------------------- - -class Lexer: - def __init__(self): - self.lexre = None # Master regular expression. This is a list of - # tuples (re, findex) where re is a compiled - # regular expression and findex is a list - # mapping regex group numbers to rules - self.lexretext = None # Current regular expression strings - self.lexstatere = {} # Dictionary mapping lexer states to master regexs - self.lexstateretext = {} # Dictionary mapping lexer states to regex strings - self.lexstaterenames = {} # Dictionary mapping lexer states to symbol names - self.lexstate = 'INITIAL' # Current lexer state - self.lexstatestack = [] # Stack of lexer states - self.lexstateinfo = None # State information - self.lexstateignore = {} # Dictionary of ignored characters for each state - self.lexstateerrorf = {} # Dictionary of error functions for each state - self.lexstateeoff = {} # Dictionary of eof functions for each state - self.lexreflags = 0 # Optional re compile flags - self.lexdata = None # Actual input data (as a string) - self.lexpos = 0 # Current position in input text - self.lexlen = 0 # Length of the input text - self.lexerrorf = None # Error rule (if any) - self.lexeoff = None # EOF rule (if any) - self.lextokens = None # List of valid tokens - self.lexignore = '' # Ignored characters - self.lexliterals = '' # Literal characters that can be passed through - self.lexmodule = None # Module - self.lineno = 1 # Current line number - - def clone(self, object=None): - c = copy.copy(self) - - # If the object parameter has been supplied, it means we are attaching the - # lexer to a new object. In this case, we have to rebind all methods in - # the lexstatere and lexstateerrorf tables. - - if object: - newtab = {} - for key, ritem in self.lexstatere.items(): - newre = [] - for cre, findex in ritem: - newfindex = [] - for f in findex: - if not f or not f[0]: - newfindex.append(f) - continue - newfindex.append((getattr(object, f[0].__name__), f[1])) - newre.append((cre, newfindex)) - newtab[key] = newre - c.lexstatere = newtab - c.lexstateerrorf = {} - for key, ef in self.lexstateerrorf.items(): - c.lexstateerrorf[key] = getattr(object, ef.__name__) - c.lexmodule = object - return c - - # ------------------------------------------------------------ - # input() - Push a new string into the lexer - # ------------------------------------------------------------ - def input(self, s): - self.lexdata = s - self.lexpos = 0 - self.lexlen = len(s) - - # ------------------------------------------------------------ - # begin() - Changes the lexing state - # ------------------------------------------------------------ - def begin(self, state): - if state not in self.lexstatere: - raise ValueError(f'Undefined state {state!r}') - self.lexre = self.lexstatere[state] - self.lexretext = self.lexstateretext[state] - self.lexignore = self.lexstateignore.get(state, '') - self.lexerrorf = self.lexstateerrorf.get(state, None) - self.lexeoff = self.lexstateeoff.get(state, None) - self.lexstate = state - - # ------------------------------------------------------------ - # push_state() - Changes the lexing state and saves old on stack - # ------------------------------------------------------------ - def push_state(self, state): - self.lexstatestack.append(self.lexstate) - self.begin(state) - - # ------------------------------------------------------------ - # pop_state() - Restores the previous state - # ------------------------------------------------------------ - def pop_state(self): - self.begin(self.lexstatestack.pop()) - - # ------------------------------------------------------------ - # current_state() - Returns the current lexing state - # ------------------------------------------------------------ - def current_state(self): - return self.lexstate - - # ------------------------------------------------------------ - # skip() - Skip ahead n characters - # ------------------------------------------------------------ - def skip(self, n): - self.lexpos += n - - # ------------------------------------------------------------ - # token() - Return the next token from the Lexer - # - # Note: This function has been carefully implemented to be as fast - # as possible. Don't make changes unless you really know what - # you are doing - # ------------------------------------------------------------ - def token(self): - # Make local copies of frequently referenced attributes - lexpos = self.lexpos - lexlen = self.lexlen - lexignore = self.lexignore - lexdata = self.lexdata - - while lexpos < lexlen: - # This code provides some short-circuit code for whitespace, tabs, and other ignored characters - if lexdata[lexpos] in lexignore: - lexpos += 1 - continue - - # Look for a regular expression match - for lexre, lexindexfunc in self.lexre: - m = lexre.match(lexdata, lexpos) - if not m: - continue - - # Create a token for return - tok = LexToken() - tok.value = m.group() - tok.lineno = self.lineno - tok.lexpos = lexpos - - i = m.lastindex - func, tok.type = lexindexfunc[i] - - if not func: - # If no token type was set, it's an ignored token - if tok.type: - self.lexpos = m.end() - return tok - else: - lexpos = m.end() - break - - lexpos = m.end() - - # If token is processed by a function, call it - - tok.lexer = self # Set additional attributes useful in token rules - self.lexmatch = m - self.lexpos = lexpos - newtok = func(tok) - del tok.lexer - del self.lexmatch - - # Every function must return a token, if nothing, we just move to next token - if not newtok: - lexpos = self.lexpos # This is here in case user has updated lexpos. - lexignore = self.lexignore # This is here in case there was a state change - break - return newtok - else: - # No match, see if in literals - if lexdata[lexpos] in self.lexliterals: - tok = LexToken() - tok.value = lexdata[lexpos] - tok.lineno = self.lineno - tok.type = tok.value - tok.lexpos = lexpos - self.lexpos = lexpos + 1 - return tok - - # No match. Call t_error() if defined. - if self.lexerrorf: - tok = LexToken() - tok.value = self.lexdata[lexpos:] - tok.lineno = self.lineno - tok.type = 'error' - tok.lexer = self - tok.lexpos = lexpos - self.lexpos = lexpos - newtok = self.lexerrorf(tok) - if lexpos == self.lexpos: - # Error method didn't change text position at all. This is an error. - raise LexError(f"Scanning error. Illegal character {lexdata[lexpos]!r}", - lexdata[lexpos:]) - lexpos = self.lexpos - if not newtok: - continue - return newtok - - self.lexpos = lexpos - raise LexError(f"Illegal character {lexdata[lexpos]!r} at index {lexpos}", - lexdata[lexpos:]) - - if self.lexeoff: - tok = LexToken() - tok.type = 'eof' - tok.value = '' - tok.lineno = self.lineno - tok.lexpos = lexpos - tok.lexer = self - self.lexpos = lexpos - newtok = self.lexeoff(tok) - return newtok - - self.lexpos = lexpos + 1 - if self.lexdata is None: - raise RuntimeError('No input string given with input()') - return None - - # Iterator interface - def __iter__(self): - return self - - def __next__(self): - t = self.token() - if t is None: - raise StopIteration - return t - -# ----------------------------------------------------------------------------- -# ==== Lex Builder === -# -# The functions and classes below are used to collect lexing information -# and build a Lexer object from it. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# _get_regex(func) -# -# Returns the regular expression assigned to a function either as a doc string -# or as a .regex attribute attached by the @TOKEN decorator. -# ----------------------------------------------------------------------------- -def _get_regex(func): - return getattr(func, 'regex', func.__doc__) - -# ----------------------------------------------------------------------------- -# get_caller_module_dict() -# -# This function returns a dictionary containing all of the symbols defined within -# a caller further down the call stack. This is used to get the environment -# associated with the yacc() call if none was provided. -# ----------------------------------------------------------------------------- -def get_caller_module_dict(levels): - f = sys._getframe(levels) - return { **f.f_globals, **f.f_locals } - -# ----------------------------------------------------------------------------- -# _form_master_re() -# -# This function takes a list of all of the regex components and attempts to -# form the master regular expression. Given limitations in the Python re -# module, it may be necessary to break the master regex into separate expressions. -# ----------------------------------------------------------------------------- -def _form_master_re(relist, reflags, ldict, toknames): - if not relist: - return [], [], [] - regex = '|'.join(relist) - try: - lexre = re.compile(regex, reflags) - - # Build the index to function map for the matching engine - lexindexfunc = [None] * (max(lexre.groupindex.values()) + 1) - lexindexnames = lexindexfunc[:] - - for f, i in lexre.groupindex.items(): - handle = ldict.get(f, None) - if type(handle) in (types.FunctionType, types.MethodType): - lexindexfunc[i] = (handle, toknames[f]) - lexindexnames[i] = f - elif handle is not None: - lexindexnames[i] = f - if f.find('ignore_') > 0: - lexindexfunc[i] = (None, None) - else: - lexindexfunc[i] = (None, toknames[f]) - - return [(lexre, lexindexfunc)], [regex], [lexindexnames] - except Exception: - m = (len(relist) // 2) + 1 - llist, lre, lnames = _form_master_re(relist[:m], reflags, ldict, toknames) - rlist, rre, rnames = _form_master_re(relist[m:], reflags, ldict, toknames) - return (llist+rlist), (lre+rre), (lnames+rnames) - -# ----------------------------------------------------------------------------- -# def _statetoken(s,names) -# -# Given a declaration name s of the form "t_" and a dictionary whose keys are -# state names, this function returns a tuple (states,tokenname) where states -# is a tuple of state names and tokenname is the name of the token. For example, -# calling this with s = "t_foo_bar_SPAM" might return (('foo','bar'),'SPAM') -# ----------------------------------------------------------------------------- -def _statetoken(s, names): - parts = s.split('_') - for i, part in enumerate(parts[1:], 1): - if part not in names and part != 'ANY': - break - - if i > 1: - states = tuple(parts[1:i]) - else: - states = ('INITIAL',) - - if 'ANY' in states: - states = tuple(names) - - tokenname = '_'.join(parts[i:]) - return (states, tokenname) - - -# ----------------------------------------------------------------------------- -# LexerReflect() -# -# This class represents information needed to build a lexer as extracted from a -# user's input file. -# ----------------------------------------------------------------------------- -class LexerReflect(object): - def __init__(self, ldict, log=None, reflags=0): - self.ldict = ldict - self.error_func = None - self.tokens = [] - self.reflags = reflags - self.stateinfo = {'INITIAL': 'inclusive'} - self.modules = set() - self.error = False - self.log = PlyLogger(sys.stderr) if log is None else log - - # Get all of the basic information - def get_all(self): - self.get_tokens() - self.get_literals() - self.get_states() - self.get_rules() - - # Validate all of the information - def validate_all(self): - self.validate_tokens() - self.validate_literals() - self.validate_rules() - return self.error - - # Get the tokens map - def get_tokens(self): - tokens = self.ldict.get('tokens', None) - if not tokens: - self.log.error('No token list is defined') - self.error = True - return - - if not isinstance(tokens, (list, tuple)): - self.log.error('tokens must be a list or tuple') - self.error = True - return - - if not tokens: - self.log.error('tokens is empty') - self.error = True - return - - self.tokens = tokens - - # Validate the tokens - def validate_tokens(self): - terminals = {} - for n in self.tokens: - if not _is_identifier.match(n): - self.log.error(f"Bad token name {n!r}") - self.error = True - if n in terminals: - self.log.warning(f"Token {n!r} multiply defined") - terminals[n] = 1 - - # Get the literals specifier - def get_literals(self): - self.literals = self.ldict.get('literals', '') - if not self.literals: - self.literals = '' - - # Validate literals - def validate_literals(self): - try: - for c in self.literals: - if not isinstance(c, StringTypes) or len(c) > 1: - self.log.error(f'Invalid literal {c!r}. Must be a single character') - self.error = True - - except TypeError: - self.log.error('Invalid literals specification. literals must be a sequence of characters') - self.error = True - - def get_states(self): - self.states = self.ldict.get('states', None) - # Build statemap - if self.states: - if not isinstance(self.states, (tuple, list)): - self.log.error('states must be defined as a tuple or list') - self.error = True - else: - for s in self.states: - if not isinstance(s, tuple) or len(s) != 2: - self.log.error("Invalid state specifier %r. Must be a tuple (statename,'exclusive|inclusive')", s) - self.error = True - continue - name, statetype = s - if not isinstance(name, StringTypes): - self.log.error('State name %r must be a string', name) - self.error = True - continue - if not (statetype == 'inclusive' or statetype == 'exclusive'): - self.log.error("State type for state %r must be 'inclusive' or 'exclusive'", name) - self.error = True - continue - if name in self.stateinfo: - self.log.error("State %r already defined", name) - self.error = True - continue - self.stateinfo[name] = statetype - - # Get all of the symbols with a t_ prefix and sort them into various - # categories (functions, strings, error functions, and ignore characters) - - def get_rules(self): - tsymbols = [f for f in self.ldict if f[:2] == 't_'] - - # Now build up a list of functions and a list of strings - self.toknames = {} # Mapping of symbols to token names - self.funcsym = {} # Symbols defined as functions - self.strsym = {} # Symbols defined as strings - self.ignore = {} # Ignore strings by state - self.errorf = {} # Error functions by state - self.eoff = {} # EOF functions by state - - for s in self.stateinfo: - self.funcsym[s] = [] - self.strsym[s] = [] - - if len(tsymbols) == 0: - self.log.error('No rules of the form t_rulename are defined') - self.error = True - return - - for f in tsymbols: - t = self.ldict[f] - states, tokname = _statetoken(f, self.stateinfo) - self.toknames[f] = tokname - - if hasattr(t, '__call__'): - if tokname == 'error': - for s in states: - self.errorf[s] = t - elif tokname == 'eof': - for s in states: - self.eoff[s] = t - elif tokname == 'ignore': - line = t.__code__.co_firstlineno - file = t.__code__.co_filename - self.log.error("%s:%d: Rule %r must be defined as a string", file, line, t.__name__) - self.error = True - else: - for s in states: - self.funcsym[s].append((f, t)) - elif isinstance(t, StringTypes): - if tokname == 'ignore': - for s in states: - self.ignore[s] = t - if '\\' in t: - self.log.warning("%s contains a literal backslash '\\'", f) - - elif tokname == 'error': - self.log.error("Rule %r must be defined as a function", f) - self.error = True - else: - for s in states: - self.strsym[s].append((f, t)) - else: - self.log.error('%s not defined as a function or string', f) - self.error = True - - # Sort the functions by line number - for f in self.funcsym.values(): - f.sort(key=lambda x: x[1].__code__.co_firstlineno) - - # Sort the strings by regular expression length - for s in self.strsym.values(): - s.sort(key=lambda x: len(x[1]), reverse=True) - - # Validate all of the t_rules collected - def validate_rules(self): - for state in self.stateinfo: - # Validate all rules defined by functions - - for fname, f in self.funcsym[state]: - line = f.__code__.co_firstlineno - file = f.__code__.co_filename - module = inspect.getmodule(f) - self.modules.add(module) - - tokname = self.toknames[fname] - if isinstance(f, types.MethodType): - reqargs = 2 - else: - reqargs = 1 - nargs = f.__code__.co_argcount - if nargs > reqargs: - self.log.error("%s:%d: Rule %r has too many arguments", file, line, f.__name__) - self.error = True - continue - - if nargs < reqargs: - self.log.error("%s:%d: Rule %r requires an argument", file, line, f.__name__) - self.error = True - continue - - if not _get_regex(f): - self.log.error("%s:%d: No regular expression defined for rule %r", file, line, f.__name__) - self.error = True - continue - - try: - c = re.compile('(?P<%s>%s)' % (fname, _get_regex(f)), self.reflags) - if c.match(''): - self.log.error("%s:%d: Regular expression for rule %r matches empty string", file, line, f.__name__) - self.error = True - except re.error as e: - self.log.error("%s:%d: Invalid regular expression for rule '%s'. %s", file, line, f.__name__, e) - if '#' in _get_regex(f): - self.log.error("%s:%d. Make sure '#' in rule %r is escaped with '\\#'", file, line, f.__name__) - self.error = True - - # Validate all rules defined by strings - for name, r in self.strsym[state]: - tokname = self.toknames[name] - if tokname == 'error': - self.log.error("Rule %r must be defined as a function", name) - self.error = True - continue - - if tokname not in self.tokens and tokname.find('ignore_') < 0: - self.log.error("Rule %r defined for an unspecified token %s", name, tokname) - self.error = True - continue - - try: - c = re.compile('(?P<%s>%s)' % (name, r), self.reflags) - if (c.match('')): - self.log.error("Regular expression for rule %r matches empty string", name) - self.error = True - except re.error as e: - self.log.error("Invalid regular expression for rule %r. %s", name, e) - if '#' in r: - self.log.error("Make sure '#' in rule %r is escaped with '\\#'", name) - self.error = True - - if not self.funcsym[state] and not self.strsym[state]: - self.log.error("No rules defined for state %r", state) - self.error = True - - # Validate the error function - efunc = self.errorf.get(state, None) - if efunc: - f = efunc - line = f.__code__.co_firstlineno - file = f.__code__.co_filename - module = inspect.getmodule(f) - self.modules.add(module) - - if isinstance(f, types.MethodType): - reqargs = 2 - else: - reqargs = 1 - nargs = f.__code__.co_argcount - if nargs > reqargs: - self.log.error("%s:%d: Rule %r has too many arguments", file, line, f.__name__) - self.error = True - - if nargs < reqargs: - self.log.error("%s:%d: Rule %r requires an argument", file, line, f.__name__) - self.error = True - - for module in self.modules: - self.validate_module(module) - - # ----------------------------------------------------------------------------- - # validate_module() - # - # This checks to see if there are duplicated t_rulename() functions or strings - # in the parser input file. This is done using a simple regular expression - # match on each line in the source code of the given module. - # ----------------------------------------------------------------------------- - - def validate_module(self, module): - try: - lines, linen = inspect.getsourcelines(module) - except IOError: - return - - fre = re.compile(r'\s*def\s+(t_[a-zA-Z_0-9]*)\(') - sre = re.compile(r'\s*(t_[a-zA-Z_0-9]*)\s*=') - - counthash = {} - linen += 1 - for line in lines: - m = fre.match(line) - if not m: - m = sre.match(line) - if m: - name = m.group(1) - prev = counthash.get(name) - if not prev: - counthash[name] = linen - else: - filename = inspect.getsourcefile(module) - self.log.error('%s:%d: Rule %s redefined. Previously defined on line %d', filename, linen, name, prev) - self.error = True - linen += 1 - -# ----------------------------------------------------------------------------- -# lex(module) -# -# Build all of the regular expression rules from definitions in the supplied module -# ----------------------------------------------------------------------------- -def lex(*, module=None, object=None, debug=False, - reflags=int(re.VERBOSE), debuglog=None, errorlog=None): - - global lexer - - ldict = None - stateinfo = {'INITIAL': 'inclusive'} - lexobj = Lexer() - global token, input - - if errorlog is None: - errorlog = PlyLogger(sys.stderr) - - if debug: - if debuglog is None: - debuglog = PlyLogger(sys.stderr) - - # Get the module dictionary used for the lexer - if object: - module = object - - # Get the module dictionary used for the parser - if module: - _items = [(k, getattr(module, k)) for k in dir(module)] - ldict = dict(_items) - # If no __file__ attribute is available, try to obtain it from the __module__ instead - if '__file__' not in ldict: - ldict['__file__'] = sys.modules[ldict['__module__']].__file__ - else: - ldict = get_caller_module_dict(2) - - # Collect parser information from the dictionary - linfo = LexerReflect(ldict, log=errorlog, reflags=reflags) - linfo.get_all() - if linfo.validate_all(): - raise SyntaxError("Can't build lexer") - - # Dump some basic debugging information - if debug: - debuglog.info('lex: tokens = %r', linfo.tokens) - debuglog.info('lex: literals = %r', linfo.literals) - debuglog.info('lex: states = %r', linfo.stateinfo) - - # Build a dictionary of valid token names - lexobj.lextokens = set() - for n in linfo.tokens: - lexobj.lextokens.add(n) - - # Get literals specification - if isinstance(linfo.literals, (list, tuple)): - lexobj.lexliterals = type(linfo.literals[0])().join(linfo.literals) - else: - lexobj.lexliterals = linfo.literals - - lexobj.lextokens_all = lexobj.lextokens | set(lexobj.lexliterals) - - # Get the stateinfo dictionary - stateinfo = linfo.stateinfo - - regexs = {} - # Build the master regular expressions - for state in stateinfo: - regex_list = [] - - # Add rules defined by functions first - for fname, f in linfo.funcsym[state]: - regex_list.append('(?P<%s>%s)' % (fname, _get_regex(f))) - if debug: - debuglog.info("lex: Adding rule %s -> '%s' (state '%s')", fname, _get_regex(f), state) - - # Now add all of the simple rules - for name, r in linfo.strsym[state]: - regex_list.append('(?P<%s>%s)' % (name, r)) - if debug: - debuglog.info("lex: Adding rule %s -> '%s' (state '%s')", name, r, state) - - regexs[state] = regex_list - - # Build the master regular expressions - - if debug: - debuglog.info('lex: ==== MASTER REGEXS FOLLOW ====') - - for state in regexs: - lexre, re_text, re_names = _form_master_re(regexs[state], reflags, ldict, linfo.toknames) - lexobj.lexstatere[state] = lexre - lexobj.lexstateretext[state] = re_text - lexobj.lexstaterenames[state] = re_names - if debug: - for i, text in enumerate(re_text): - debuglog.info("lex: state '%s' : regex[%d] = '%s'", state, i, text) - - # For inclusive states, we need to add the regular expressions from the INITIAL state - for state, stype in stateinfo.items(): - if state != 'INITIAL' and stype == 'inclusive': - lexobj.lexstatere[state].extend(lexobj.lexstatere['INITIAL']) - lexobj.lexstateretext[state].extend(lexobj.lexstateretext['INITIAL']) - lexobj.lexstaterenames[state].extend(lexobj.lexstaterenames['INITIAL']) - - lexobj.lexstateinfo = stateinfo - lexobj.lexre = lexobj.lexstatere['INITIAL'] - lexobj.lexretext = lexobj.lexstateretext['INITIAL'] - lexobj.lexreflags = reflags - - # Set up ignore variables - lexobj.lexstateignore = linfo.ignore - lexobj.lexignore = lexobj.lexstateignore.get('INITIAL', '') - - # Set up error functions - lexobj.lexstateerrorf = linfo.errorf - lexobj.lexerrorf = linfo.errorf.get('INITIAL', None) - if not lexobj.lexerrorf: - errorlog.warning('No t_error rule is defined') - - # Set up eof functions - lexobj.lexstateeoff = linfo.eoff - lexobj.lexeoff = linfo.eoff.get('INITIAL', None) - - # Check state information for ignore and error rules - for s, stype in stateinfo.items(): - if stype == 'exclusive': - if s not in linfo.errorf: - errorlog.warning("No error rule is defined for exclusive state %r", s) - if s not in linfo.ignore and lexobj.lexignore: - errorlog.warning("No ignore rule is defined for exclusive state %r", s) - elif stype == 'inclusive': - if s not in linfo.errorf: - linfo.errorf[s] = linfo.errorf.get('INITIAL', None) - if s not in linfo.ignore: - linfo.ignore[s] = linfo.ignore.get('INITIAL', '') - - # Create global versions of the token() and input() functions - token = lexobj.token - input = lexobj.input - lexer = lexobj - - return lexobj - -# ----------------------------------------------------------------------------- -# runmain() -# -# This runs the lexer as a main program -# ----------------------------------------------------------------------------- - -def runmain(lexer=None, data=None): - if not data: - try: - filename = sys.argv[1] - with open(filename) as f: - data = f.read() - except IndexError: - sys.stdout.write('Reading from standard input (type EOF to end):\n') - data = sys.stdin.read() - - if lexer: - _input = lexer.input - else: - _input = input - _input(data) - if lexer: - _token = lexer.token - else: - _token = token - - while True: - tok = _token() - if not tok: - break - sys.stdout.write(f'({tok.type},{tok.value!r},{tok.lineno},{tok.lexpos})\n') - -# ----------------------------------------------------------------------------- -# @TOKEN(regex) -# -# This decorator function can be used to set the regex expression on a function -# when its docstring might need to be set in an alternative way -# ----------------------------------------------------------------------------- - -def TOKEN(r): - def set_regex(f): - if hasattr(r, '__call__'): - f.regex = _get_regex(r) - else: - f.regex = r - return f - return set_regex diff --git a/src/ply/yacc.py b/src/ply/yacc.py deleted file mode 100644 index 652879624..000000000 --- a/src/ply/yacc.py +++ /dev/null @@ -1,2482 +0,0 @@ -# ----------------------------------------------------------------------------- -# ply: yacc.py -# -# Copyright (C) 2001-2022 -# David M. Beazley (Dabeaz LLC) -# All rights reserved. -# -# Latest version: https://github.com/dabeaz/ply -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright notice, -# this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# * Neither the name of David Beazley or Dabeaz LLC may be used to -# endorse or promote products derived from this software without -# specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# ----------------------------------------------------------------------------- -# -# This implements an LR parser that is constructed from grammar rules defined -# as Python functions. The grammar is specified by supplying the BNF inside -# Python documentation strings. The inspiration for this technique was borrowed -# from John Aycock's Spark parsing system. PLY might be viewed as cross between -# Spark and the GNU bison utility. -# -# The current implementation is only somewhat object-oriented. The -# LR parser itself is defined in terms of an object (which allows multiple -# parsers to co-exist). However, most of the variables used during table -# construction are defined in terms of global variables. Users shouldn't -# notice unless they are trying to define multiple parsers at the same -# time using threads (in which case they should have their head examined). -# -# This implementation supports both SLR and LALR(1) parsing. LALR(1) -# support was originally implemented by Elias Ioup (ezioup@alumni.uchicago.edu), -# using the algorithm found in Aho, Sethi, and Ullman "Compilers: Principles, -# Techniques, and Tools" (The Dragon Book). LALR(1) has since been replaced -# by the more efficient DeRemer and Pennello algorithm. -# -# :::::::: WARNING ::::::: -# -# Construction of LR parsing tables is fairly complicated and expensive. -# To make this module run fast, a *LOT* of work has been put into -# optimization---often at the expensive of readability and what might -# consider to be good Python "coding style." Modify the code at your -# own risk! -# ---------------------------------------------------------------------------- - -import re -import types -import sys -import inspect - -#----------------------------------------------------------------------------- -# === User configurable parameters === -# -# Change these to modify the default behavior of yacc (if you wish) -#----------------------------------------------------------------------------- - -yaccdebug = False # Debugging mode. If set, yacc generates a - # a 'parser.out' file in the current directory - -debug_file = 'parser.out' # Default name of the debugging file -error_count = 3 # Number of symbols that must be shifted to leave recovery mode -resultlimit = 40 # Size limit of results when running in debug mode. - -MAXINT = sys.maxsize - -# This object is a stand-in for a logging object created by the -# logging module. PLY will use this by default to create things -# such as the parser.out file. If a user wants more detailed -# information, they can create their own logging object and pass -# it into PLY. - -class PlyLogger(object): - def __init__(self, f): - self.f = f - - def debug(self, msg, *args, **kwargs): - self.f.write((msg % args) + '\n') - - info = debug - - def warning(self, msg, *args, **kwargs): - self.f.write('WARNING: ' + (msg % args) + '\n') - - def error(self, msg, *args, **kwargs): - self.f.write('ERROR: ' + (msg % args) + '\n') - - critical = debug - -# Null logger is used when no output is generated. Does nothing. -class NullLogger(object): - def __getattribute__(self, name): - return self - - def __call__(self, *args, **kwargs): - return self - -# Exception raised for yacc-related errors -class YaccError(Exception): - pass - -# Format the result message that the parser produces when running in debug mode. -def format_result(r): - repr_str = repr(r) - if '\n' in repr_str: - repr_str = repr(repr_str) - if len(repr_str) > resultlimit: - repr_str = repr_str[:resultlimit] + ' ...' - result = '<%s @ 0x%x> (%s)' % (type(r).__name__, id(r), repr_str) - return result - -# Format stack entries when the parser is running in debug mode -def format_stack_entry(r): - repr_str = repr(r) - if '\n' in repr_str: - repr_str = repr(repr_str) - if len(repr_str) < 16: - return repr_str - else: - return '<%s @ 0x%x>' % (type(r).__name__, id(r)) - -#----------------------------------------------------------------------------- -# === LR Parsing Engine === -# -# The following classes are used for the LR parser itself. These are not -# used during table construction and are independent of the actual LR -# table generation algorithm -#----------------------------------------------------------------------------- - -# This class is used to hold non-terminal grammar symbols during parsing. -# It normally has the following attributes set: -# .type = Grammar symbol type -# .value = Symbol value -# .lineno = Starting line number -# .endlineno = Ending line number (optional, set automatically) -# .lexpos = Starting lex position -# .endlexpos = Ending lex position (optional, set automatically) - -class YaccSymbol: - def __str__(self): - return self.type - - def __repr__(self): - return str(self) - -# This class is a wrapper around the objects actually passed to each -# grammar rule. Index lookup and assignment actually assign the -# .value attribute of the underlying YaccSymbol object. -# The lineno() method returns the line number of a given -# item (or 0 if not defined). The linespan() method returns -# a tuple of (startline,endline) representing the range of lines -# for a symbol. The lexspan() method returns a tuple (lexpos,endlexpos) -# representing the range of positional information for a symbol. - -class YaccProduction: - def __init__(self, s, stack=None): - self.slice = s - self.stack = stack - self.lexer = None - self.parser = None - - def __getitem__(self, n): - if isinstance(n, slice): - return [s.value for s in self.slice[n]] - elif n >= 0: - return self.slice[n].value - else: - return self.stack[n].value - - def __setitem__(self, n, v): - self.slice[n].value = v - - def __getslice__(self, i, j): - return [s.value for s in self.slice[i:j]] - - def __len__(self): - return len(self.slice) - - def lineno(self, n): - return getattr(self.slice[n], 'lineno', 0) - - def set_lineno(self, n, lineno): - self.slice[n].lineno = lineno - - def linespan(self, n): - startline = getattr(self.slice[n], 'lineno', 0) - endline = getattr(self.slice[n], 'endlineno', startline) - return startline, endline - - def lexpos(self, n): - return getattr(self.slice[n], 'lexpos', 0) - - def set_lexpos(self, n, lexpos): - self.slice[n].lexpos = lexpos - - def lexspan(self, n): - startpos = getattr(self.slice[n], 'lexpos', 0) - endpos = getattr(self.slice[n], 'endlexpos', startpos) - return startpos, endpos - - def error(self): - raise SyntaxError - -# ----------------------------------------------------------------------------- -# == LRParser == -# -# The LR Parsing engine. -# ----------------------------------------------------------------------------- - -class LRParser: - def __init__(self, lrtab, errorf): - self.productions = lrtab.lr_productions - self.action = lrtab.lr_action - self.goto = lrtab.lr_goto - self.errorfunc = errorf - self.set_defaulted_states() - self.errorok = True - - def errok(self): - self.errorok = True - - def restart(self): - del self.statestack[:] - del self.symstack[:] - sym = YaccSymbol() - sym.type = '$end' - self.symstack.append(sym) - self.statestack.append(0) - - # Defaulted state support. - # This method identifies parser states where there is only one possible reduction action. - # For such states, the parser can make a choose to make a rule reduction without consuming - # the next look-ahead token. This delayed invocation of the tokenizer can be useful in - # certain kinds of advanced parsing situations where the lexer and parser interact with - # each other or change states (i.e., manipulation of scope, lexer states, etc.). - # - # See: http://www.gnu.org/software/bison/manual/html_node/Default-Reductions.html#Default-Reductions - def set_defaulted_states(self): - self.defaulted_states = {} - for state, actions in self.action.items(): - rules = list(actions.values()) - if len(rules) == 1 and rules[0] < 0: - self.defaulted_states[state] = rules[0] - - def disable_defaulted_states(self): - self.defaulted_states = {} - - # parse(). - # - # This is the core parsing engine. To operate, it requires a lexer object. - # Two options are provided. The debug flag turns on debugging so that you can - # see the various rule reductions and parsing steps. tracking turns on position - # tracking. In this mode, symbols will record the starting/ending line number and - # character index. - - def parse(self, input=None, lexer=None, debug=False, tracking=False): - # If debugging has been specified as a flag, turn it into a logging object - if isinstance(debug, int) and debug: - debug = PlyLogger(sys.stderr) - - lookahead = None # Current lookahead symbol - lookaheadstack = [] # Stack of lookahead symbols - actions = self.action # Local reference to action table (to avoid lookup on self.) - goto = self.goto # Local reference to goto table (to avoid lookup on self.) - prod = self.productions # Local reference to production list (to avoid lookup on self.) - defaulted_states = self.defaulted_states # Local reference to defaulted states - pslice = YaccProduction(None) # Production object passed to grammar rules - errorcount = 0 # Used during error recovery - - if debug: - debug.info('PLY: PARSE DEBUG START') - - # If no lexer was given, we will try to use the lex module - if not lexer: - from . import lex - lexer = lex.lexer - - # Set up the lexer and parser objects on pslice - pslice.lexer = lexer - pslice.parser = self - - # If input was supplied, pass to lexer - if input is not None: - lexer.input(input) - - # Set the token function - get_token = self.token = lexer.token - - # Set up the state and symbol stacks - statestack = self.statestack = [] # Stack of parsing states - symstack = self.symstack = [] # Stack of grammar symbols - pslice.stack = symstack # Put in the production - errtoken = None # Err token - - # The start state is assumed to be (0,$end) - - statestack.append(0) - sym = YaccSymbol() - sym.type = '$end' - symstack.append(sym) - state = 0 - while True: - # Get the next symbol on the input. If a lookahead symbol - # is already set, we just use that. Otherwise, we'll pull - # the next token off of the lookaheadstack or from the lexer - - if debug: - debug.debug('State : %s', state) - - if state not in defaulted_states: - if not lookahead: - if not lookaheadstack: - lookahead = get_token() # Get the next token - else: - lookahead = lookaheadstack.pop() - if not lookahead: - lookahead = YaccSymbol() - lookahead.type = '$end' - - # Check the action table - ltype = lookahead.type - t = actions[state].get(ltype) - else: - t = defaulted_states[state] - if debug: - debug.debug('Defaulted state %s: Reduce using %d', state, -t) - - if debug: - debug.debug('Stack : %s', - ('%s . %s' % (' '.join([xx.type for xx in symstack][1:]), str(lookahead))).lstrip()) - - if t is not None: - if t > 0: - # shift a symbol on the stack - statestack.append(t) - state = t - - if debug: - debug.debug('Action : Shift and goto state %s', t) - - symstack.append(lookahead) - lookahead = None - - # Decrease error count on successful shift - if errorcount: - errorcount -= 1 - continue - - if t < 0: - # reduce a symbol on the stack, emit a production - p = prod[-t] - pname = p.name - plen = p.len - - # Get production function - sym = YaccSymbol() - sym.type = pname # Production name - sym.value = None - - if debug: - if plen: - debug.info('Action : Reduce rule [%s] with %s and goto state %d', p.str, - '['+','.join([format_stack_entry(_v.value) for _v in symstack[-plen:]])+']', - goto[statestack[-1-plen]][pname]) - else: - debug.info('Action : Reduce rule [%s] with %s and goto state %d', p.str, [], - goto[statestack[-1]][pname]) - - if plen: - targ = symstack[-plen-1:] - targ[0] = sym - - if tracking: - t1 = targ[1] - sym.lineno = t1.lineno - sym.lexpos = t1.lexpos - t1 = targ[-1] - sym.endlineno = getattr(t1, 'endlineno', t1.lineno) - sym.endlexpos = getattr(t1, 'endlexpos', t1.lexpos) - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # The code enclosed in this section is duplicated - # below as a performance optimization. Make sure - # changes get made in both locations. - - pslice.slice = targ - - try: - # Call the grammar rule with our special slice object - del symstack[-plen:] - self.state = state - p.callable(pslice) - del statestack[-plen:] - if debug: - debug.info('Result : %s', format_result(pslice[0])) - symstack.append(sym) - state = goto[statestack[-1]][pname] - statestack.append(state) - except SyntaxError: - # If an error was set. Enter error recovery state - lookaheadstack.append(lookahead) # Save the current lookahead token - symstack.extend(targ[1:-1]) # Put the production slice back on the stack - statestack.pop() # Pop back one state (before the reduce) - state = statestack[-1] - sym.type = 'error' - sym.value = 'error' - lookahead = sym - errorcount = error_count - self.errorok = False - - continue - - else: - - if tracking: - sym.lineno = lexer.lineno - sym.lexpos = lexer.lexpos - - targ = [sym] - - # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - # The code enclosed in this section is duplicated - # above as a performance optimization. Make sure - # changes get made in both locations. - - pslice.slice = targ - - try: - # Call the grammar rule with our special slice object - self.state = state - p.callable(pslice) - if debug: - debug.info('Result : %s', format_result(pslice[0])) - symstack.append(sym) - state = goto[statestack[-1]][pname] - statestack.append(state) - except SyntaxError: - # If an error was set. Enter error recovery state - lookaheadstack.append(lookahead) # Save the current lookahead token - statestack.pop() # Pop back one state (before the reduce) - state = statestack[-1] - sym.type = 'error' - sym.value = 'error' - lookahead = sym - errorcount = error_count - self.errorok = False - - continue - - if t == 0: - n = symstack[-1] - result = getattr(n, 'value', None) - - if debug: - debug.info('Done : Returning %s', format_result(result)) - debug.info('PLY: PARSE DEBUG END') - - return result - - if t is None: - - if debug: - debug.error('Error : %s', - ('%s . %s' % (' '.join([xx.type for xx in symstack][1:]), str(lookahead))).lstrip()) - - # We have some kind of parsing error here. To handle - # this, we are going to push the current token onto - # the tokenstack and replace it with an 'error' token. - # If there are any synchronization rules, they may - # catch it. - # - # In addition to pushing the error token, we call call - # the user defined p_error() function if this is the - # first syntax error. This function is only called if - # errorcount == 0. - if errorcount == 0 or self.errorok: - errorcount = error_count - self.errorok = False - errtoken = lookahead - if errtoken.type == '$end': - errtoken = None # End of file! - if self.errorfunc: - if errtoken and not hasattr(errtoken, 'lexer'): - errtoken.lexer = lexer - self.state = state - tok = self.errorfunc(errtoken) - if self.errorok: - # User must have done some kind of panic - # mode recovery on their own. The - # returned token is the next lookahead - lookahead = tok - errtoken = None - continue - else: - if errtoken: - if hasattr(errtoken, 'lineno'): - lineno = lookahead.lineno - else: - lineno = 0 - if lineno: - sys.stderr.write('yacc: Syntax error at line %d, token=%s\n' % (lineno, errtoken.type)) - else: - sys.stderr.write('yacc: Syntax error, token=%s' % errtoken.type) - else: - sys.stderr.write('yacc: Parse error in input. EOF\n') - return - - else: - errorcount = error_count - - # case 1: the statestack only has 1 entry on it. If we're in this state, the - # entire parse has been rolled back and we're completely hosed. The token is - # discarded and we just keep going. - - if len(statestack) <= 1 and lookahead.type != '$end': - lookahead = None - errtoken = None - state = 0 - # Nuke the pushback stack - del lookaheadstack[:] - continue - - # case 2: the statestack has a couple of entries on it, but we're - # at the end of the file. nuke the top entry and generate an error token - - # Start nuking entries on the stack - if lookahead.type == '$end': - # Whoa. We're really hosed here. Bail out - return - - if lookahead.type != 'error': - sym = symstack[-1] - if sym.type == 'error': - # Hmmm. Error is on top of stack, we'll just nuke input - # symbol and continue - if tracking: - sym.endlineno = getattr(lookahead, 'lineno', sym.lineno) - sym.endlexpos = getattr(lookahead, 'lexpos', sym.lexpos) - lookahead = None - continue - - # Create the error symbol for the first time and make it the new lookahead symbol - t = YaccSymbol() - t.type = 'error' - - if hasattr(lookahead, 'lineno'): - t.lineno = t.endlineno = lookahead.lineno - if hasattr(lookahead, 'lexpos'): - t.lexpos = t.endlexpos = lookahead.lexpos - t.value = lookahead - lookaheadstack.append(lookahead) - lookahead = t - else: - sym = symstack.pop() - if tracking: - lookahead.lineno = sym.lineno - lookahead.lexpos = sym.lexpos - statestack.pop() - state = statestack[-1] - - continue - - # If we'r here, something really bad happened - raise RuntimeError('yacc: internal parser error!!!\n') - -# ----------------------------------------------------------------------------- -# === Grammar Representation === -# -# The following functions, classes, and variables are used to represent and -# manipulate the rules that make up a grammar. -# ----------------------------------------------------------------------------- - -# regex matching identifiers -_is_identifier = re.compile(r'^[a-zA-Z0-9_-]+$') - -# ----------------------------------------------------------------------------- -# class Production: -# -# This class stores the raw information about a single production or grammar rule. -# A grammar rule refers to a specification such as this: -# -# expr : expr PLUS term -# -# Here are the basic attributes defined on all productions -# -# name - Name of the production. For example 'expr' -# prod - A list of symbols on the right side ['expr','PLUS','term'] -# prec - Production precedence level -# number - Production number. -# func - Function that executes on reduce -# file - File where production function is defined -# lineno - Line number where production function is defined -# -# The following attributes are defined or optional. -# -# len - Length of the production (number of symbols on right hand side) -# usyms - Set of unique symbols found in the production -# ----------------------------------------------------------------------------- - -class Production(object): - reduced = 0 - def __init__(self, number, name, prod, precedence=('right', 0), func=None, file='', line=0): - self.name = name - self.prod = tuple(prod) - self.number = number - self.func = func - self.callable = None - self.file = file - self.line = line - self.prec = precedence - - # Internal settings used during table construction - - self.len = len(self.prod) # Length of the production - - # Create a list of unique production symbols used in the production - self.usyms = [] - for s in self.prod: - if s not in self.usyms: - self.usyms.append(s) - - # List of all LR items for the production - self.lr_items = [] - self.lr_next = None - - # Create a string representation - if self.prod: - self.str = '%s -> %s' % (self.name, ' '.join(self.prod)) - else: - self.str = '%s -> ' % self.name - - def __str__(self): - return self.str - - def __repr__(self): - return 'Production(' + str(self) + ')' - - def __len__(self): - return len(self.prod) - - def __nonzero__(self): - return 1 - - def __getitem__(self, index): - return self.prod[index] - - # Return the nth lr_item from the production (or None if at the end) - def lr_item(self, n): - if n > len(self.prod): - return None - p = LRItem(self, n) - # Precompute the list of productions immediately following. - try: - p.lr_after = self.Prodnames[p.prod[n+1]] - except (IndexError, KeyError): - p.lr_after = [] - try: - p.lr_before = p.prod[n-1] - except IndexError: - p.lr_before = None - return p - - # Bind the production function name to a callable - def bind(self, pdict): - if self.func: - self.callable = pdict[self.func] - -# ----------------------------------------------------------------------------- -# class LRItem -# -# This class represents a specific stage of parsing a production rule. For -# example: -# -# expr : expr . PLUS term -# -# In the above, the "." represents the current location of the parse. Here -# basic attributes: -# -# name - Name of the production. For example 'expr' -# prod - A list of symbols on the right side ['expr','.', 'PLUS','term'] -# number - Production number. -# -# lr_next Next LR item. Example, if we are ' expr -> expr . PLUS term' -# then lr_next refers to 'expr -> expr PLUS . term' -# lr_index - LR item index (location of the ".") in the prod list. -# lookaheads - LALR lookahead symbols for this item -# len - Length of the production (number of symbols on right hand side) -# lr_after - List of all productions that immediately follow -# lr_before - Grammar symbol immediately before -# ----------------------------------------------------------------------------- - -class LRItem(object): - def __init__(self, p, n): - self.name = p.name - self.prod = list(p.prod) - self.number = p.number - self.lr_index = n - self.lookaheads = {} - self.prod.insert(n, '.') - self.prod = tuple(self.prod) - self.len = len(self.prod) - self.usyms = p.usyms - - def __str__(self): - if self.prod: - s = '%s -> %s' % (self.name, ' '.join(self.prod)) - else: - s = '%s -> ' % self.name - return s - - def __repr__(self): - return 'LRItem(' + str(self) + ')' - -# ----------------------------------------------------------------------------- -# rightmost_terminal() -# -# Return the rightmost terminal from a list of symbols. Used in add_production() -# ----------------------------------------------------------------------------- -def rightmost_terminal(symbols, terminals): - i = len(symbols) - 1 - while i >= 0: - if symbols[i] in terminals: - return symbols[i] - i -= 1 - return None - -# ----------------------------------------------------------------------------- -# === GRAMMAR CLASS === -# -# The following class represents the contents of the specified grammar along -# with various computed properties such as first sets, follow sets, LR items, etc. -# This data is used for critical parts of the table generation process later. -# ----------------------------------------------------------------------------- - -class GrammarError(YaccError): - pass - -class Grammar(object): - def __init__(self, terminals): - self.Productions = [None] # A list of all of the productions. The first - # entry is always reserved for the purpose of - # building an augmented grammar - - self.Prodnames = {} # A dictionary mapping the names of nonterminals to a list of all - # productions of that nonterminal. - - self.Prodmap = {} # A dictionary that is only used to detect duplicate - # productions. - - self.Terminals = {} # A dictionary mapping the names of terminal symbols to a - # list of the rules where they are used. - - for term in terminals: - self.Terminals[term] = [] - - self.Terminals['error'] = [] - - self.Nonterminals = {} # A dictionary mapping names of nonterminals to a list - # of rule numbers where they are used. - - self.First = {} # A dictionary of precomputed FIRST(x) symbols - - self.Follow = {} # A dictionary of precomputed FOLLOW(x) symbols - - self.Precedence = {} # Precedence rules for each terminal. Contains tuples of the - # form ('right',level) or ('nonassoc', level) or ('left',level) - - self.UsedPrecedence = set() # Precedence rules that were actually used by the grammer. - # This is only used to provide error checking and to generate - # a warning about unused precedence rules. - - self.Start = None # Starting symbol for the grammar - - - def __len__(self): - return len(self.Productions) - - def __getitem__(self, index): - return self.Productions[index] - - # ----------------------------------------------------------------------------- - # set_precedence() - # - # Sets the precedence for a given terminal. assoc is the associativity such as - # 'left','right', or 'nonassoc'. level is a numeric level. - # - # ----------------------------------------------------------------------------- - - def set_precedence(self, term, assoc, level): - assert self.Productions == [None], 'Must call set_precedence() before add_production()' - if term in self.Precedence: - raise GrammarError('Precedence already specified for terminal %r' % term) - if assoc not in ['left', 'right', 'nonassoc']: - raise GrammarError("Associativity must be one of 'left','right', or 'nonassoc'") - self.Precedence[term] = (assoc, level) - - # ----------------------------------------------------------------------------- - # add_production() - # - # Given an action function, this function assembles a production rule and - # computes its precedence level. - # - # The production rule is supplied as a list of symbols. For example, - # a rule such as 'expr : expr PLUS term' has a production name of 'expr' and - # symbols ['expr','PLUS','term']. - # - # Precedence is determined by the precedence of the right-most non-terminal - # or the precedence of a terminal specified by %prec. - # - # A variety of error checks are performed to make sure production symbols - # are valid and that %prec is used correctly. - # ----------------------------------------------------------------------------- - - def add_production(self, prodname, syms, func=None, file='', line=0): - - if prodname in self.Terminals: - raise GrammarError('%s:%d: Illegal rule name %r. Already defined as a token' % (file, line, prodname)) - if prodname == 'error': - raise GrammarError('%s:%d: Illegal rule name %r. error is a reserved word' % (file, line, prodname)) - if not _is_identifier.match(prodname): - raise GrammarError('%s:%d: Illegal rule name %r' % (file, line, prodname)) - - # Look for literal tokens - for n, s in enumerate(syms): - if s[0] in "'\"": - try: - c = eval(s) - if (len(c) > 1): - raise GrammarError('%s:%d: Literal token %s in rule %r may only be a single character' % - (file, line, s, prodname)) - if c not in self.Terminals: - self.Terminals[c] = [] - syms[n] = c - continue - except SyntaxError: - pass - if not _is_identifier.match(s) and s != '%prec': - raise GrammarError('%s:%d: Illegal name %r in rule %r' % (file, line, s, prodname)) - - # Determine the precedence level - if '%prec' in syms: - if syms[-1] == '%prec': - raise GrammarError('%s:%d: Syntax error. Nothing follows %%prec' % (file, line)) - if syms[-2] != '%prec': - raise GrammarError('%s:%d: Syntax error. %%prec can only appear at the end of a grammar rule' % - (file, line)) - precname = syms[-1] - prodprec = self.Precedence.get(precname) - if not prodprec: - raise GrammarError('%s:%d: Nothing known about the precedence of %r' % (file, line, precname)) - else: - self.UsedPrecedence.add(precname) - del syms[-2:] # Drop %prec from the rule - else: - # If no %prec, precedence is determined by the rightmost terminal symbol - precname = rightmost_terminal(syms, self.Terminals) - prodprec = self.Precedence.get(precname, ('right', 0)) - - # See if the rule is already in the rulemap - map = '%s -> %s' % (prodname, syms) - if map in self.Prodmap: - m = self.Prodmap[map] - raise GrammarError('%s:%d: Duplicate rule %s. ' % (file, line, m) + - 'Previous definition at %s:%d' % (m.file, m.line)) - - # From this point on, everything is valid. Create a new Production instance - pnumber = len(self.Productions) - if prodname not in self.Nonterminals: - self.Nonterminals[prodname] = [] - - # Add the production number to Terminals and Nonterminals - for t in syms: - if t in self.Terminals: - self.Terminals[t].append(pnumber) - else: - if t not in self.Nonterminals: - self.Nonterminals[t] = [] - self.Nonterminals[t].append(pnumber) - - # Create a production and add it to the list of productions - p = Production(pnumber, prodname, syms, prodprec, func, file, line) - self.Productions.append(p) - self.Prodmap[map] = p - - # Add to the global productions list - try: - self.Prodnames[prodname].append(p) - except KeyError: - self.Prodnames[prodname] = [p] - - # ----------------------------------------------------------------------------- - # set_start() - # - # Sets the starting symbol and creates the augmented grammar. Production - # rule 0 is S' -> start where start is the start symbol. - # ----------------------------------------------------------------------------- - - def set_start(self, start=None): - if not start: - start = self.Productions[1].name - if start not in self.Nonterminals: - raise GrammarError('start symbol %s undefined' % start) - self.Productions[0] = Production(0, "S'", [start]) - self.Nonterminals[start].append(0) - self.Start = start - - # ----------------------------------------------------------------------------- - # find_unreachable() - # - # Find all of the nonterminal symbols that can't be reached from the starting - # symbol. Returns a list of nonterminals that can't be reached. - # ----------------------------------------------------------------------------- - - def find_unreachable(self): - - # Mark all symbols that are reachable from a symbol s - def mark_reachable_from(s): - if s in reachable: - return - reachable.add(s) - for p in self.Prodnames.get(s, []): - for r in p.prod: - mark_reachable_from(r) - - reachable = set() - mark_reachable_from(self.Productions[0].prod[0]) - return [s for s in self.Nonterminals if s not in reachable] - - # ----------------------------------------------------------------------------- - # infinite_cycles() - # - # This function looks at the various parsing rules and tries to detect - # infinite recursion cycles (grammar rules where there is no possible way - # to derive a string of only terminals). - # ----------------------------------------------------------------------------- - - def infinite_cycles(self): - terminates = {} - - # Terminals: - for t in self.Terminals: - terminates[t] = True - - terminates['$end'] = True - - # Nonterminals: - - # Initialize to false: - for n in self.Nonterminals: - terminates[n] = False - - # Then propagate termination until no change: - while True: - some_change = False - for (n, pl) in self.Prodnames.items(): - # Nonterminal n terminates iff any of its productions terminates. - for p in pl: - # Production p terminates iff all of its rhs symbols terminate. - for s in p.prod: - if not terminates[s]: - # The symbol s does not terminate, - # so production p does not terminate. - p_terminates = False - break - else: - # didn't break from the loop, - # so every symbol s terminates - # so production p terminates. - p_terminates = True - - if p_terminates: - # symbol n terminates! - if not terminates[n]: - terminates[n] = True - some_change = True - # Don't need to consider any more productions for this n. - break - - if not some_change: - break - - infinite = [] - for (s, term) in terminates.items(): - if not term: - if s not in self.Prodnames and s not in self.Terminals and s != 'error': - # s is used-but-not-defined, and we've already warned of that, - # so it would be overkill to say that it's also non-terminating. - pass - else: - infinite.append(s) - - return infinite - - # ----------------------------------------------------------------------------- - # undefined_symbols() - # - # Find all symbols that were used the grammar, but not defined as tokens or - # grammar rules. Returns a list of tuples (sym, prod) where sym in the symbol - # and prod is the production where the symbol was used. - # ----------------------------------------------------------------------------- - def undefined_symbols(self): - result = [] - for p in self.Productions: - if not p: - continue - - for s in p.prod: - if s not in self.Prodnames and s not in self.Terminals and s != 'error': - result.append((s, p)) - return result - - # ----------------------------------------------------------------------------- - # unused_terminals() - # - # Find all terminals that were defined, but not used by the grammar. Returns - # a list of all symbols. - # ----------------------------------------------------------------------------- - def unused_terminals(self): - unused_tok = [] - for s, v in self.Terminals.items(): - if s != 'error' and not v: - unused_tok.append(s) - - return unused_tok - - # ------------------------------------------------------------------------------ - # unused_rules() - # - # Find all grammar rules that were defined, but not used (maybe not reachable) - # Returns a list of productions. - # ------------------------------------------------------------------------------ - - def unused_rules(self): - unused_prod = [] - for s, v in self.Nonterminals.items(): - if not v: - p = self.Prodnames[s][0] - unused_prod.append(p) - return unused_prod - - # ----------------------------------------------------------------------------- - # unused_precedence() - # - # Returns a list of tuples (term,precedence) corresponding to precedence - # rules that were never used by the grammar. term is the name of the terminal - # on which precedence was applied and precedence is a string such as 'left' or - # 'right' corresponding to the type of precedence. - # ----------------------------------------------------------------------------- - - def unused_precedence(self): - unused = [] - for termname in self.Precedence: - if not (termname in self.Terminals or termname in self.UsedPrecedence): - unused.append((termname, self.Precedence[termname][0])) - - return unused - - # ------------------------------------------------------------------------- - # _first() - # - # Compute the value of FIRST1(beta) where beta is a tuple of symbols. - # - # During execution of compute_first1, the result may be incomplete. - # Afterward (e.g., when called from compute_follow()), it will be complete. - # ------------------------------------------------------------------------- - def _first(self, beta): - - # We are computing First(x1,x2,x3,...,xn) - result = [] - for x in beta: - x_produces_empty = False - - # Add all the non- symbols of First[x] to the result. - for f in self.First[x]: - if f == '': - x_produces_empty = True - else: - if f not in result: - result.append(f) - - if x_produces_empty: - # We have to consider the next x in beta, - # i.e. stay in the loop. - pass - else: - # We don't have to consider any further symbols in beta. - break - else: - # There was no 'break' from the loop, - # so x_produces_empty was true for all x in beta, - # so beta produces empty as well. - result.append('') - - return result - - # ------------------------------------------------------------------------- - # compute_first() - # - # Compute the value of FIRST1(X) for all symbols - # ------------------------------------------------------------------------- - def compute_first(self): - if self.First: - return self.First - - # Terminals: - for t in self.Terminals: - self.First[t] = [t] - - self.First['$end'] = ['$end'] - - # Nonterminals: - - # Initialize to the empty set: - for n in self.Nonterminals: - self.First[n] = [] - - # Then propagate symbols until no change: - while True: - some_change = False - for n in self.Nonterminals: - for p in self.Prodnames[n]: - for f in self._first(p.prod): - if f not in self.First[n]: - self.First[n].append(f) - some_change = True - if not some_change: - break - - return self.First - - # --------------------------------------------------------------------- - # compute_follow() - # - # Computes all of the follow sets for every non-terminal symbol. The - # follow set is the set of all symbols that might follow a given - # non-terminal. See the Dragon book, 2nd Ed. p. 189. - # --------------------------------------------------------------------- - def compute_follow(self, start=None): - # If already computed, return the result - if self.Follow: - return self.Follow - - # If first sets not computed yet, do that first. - if not self.First: - self.compute_first() - - # Add '$end' to the follow list of the start symbol - for k in self.Nonterminals: - self.Follow[k] = [] - - if not start: - start = self.Productions[1].name - - self.Follow[start] = ['$end'] - - while True: - didadd = False - for p in self.Productions[1:]: - # Here is the production set - for i, B in enumerate(p.prod): - if B in self.Nonterminals: - # Okay. We got a non-terminal in a production - fst = self._first(p.prod[i+1:]) - hasempty = False - for f in fst: - if f != '' and f not in self.Follow[B]: - self.Follow[B].append(f) - didadd = True - if f == '': - hasempty = True - if hasempty or i == (len(p.prod)-1): - # Add elements of follow(a) to follow(b) - for f in self.Follow[p.name]: - if f not in self.Follow[B]: - self.Follow[B].append(f) - didadd = True - if not didadd: - break - return self.Follow - - - # ----------------------------------------------------------------------------- - # build_lritems() - # - # This function walks the list of productions and builds a complete set of the - # LR items. The LR items are stored in two ways: First, they are uniquely - # numbered and placed in the list _lritems. Second, a linked list of LR items - # is built for each production. For example: - # - # E -> E PLUS E - # - # Creates the list - # - # [E -> . E PLUS E, E -> E . PLUS E, E -> E PLUS . E, E -> E PLUS E . ] - # ----------------------------------------------------------------------------- - - def build_lritems(self): - for p in self.Productions: - lastlri = p - i = 0 - lr_items = [] - while True: - if i > len(p): - lri = None - else: - lri = LRItem(p, i) - # Precompute the list of productions immediately following - try: - lri.lr_after = self.Prodnames[lri.prod[i+1]] - except (IndexError, KeyError): - lri.lr_after = [] - try: - lri.lr_before = lri.prod[i-1] - except IndexError: - lri.lr_before = None - - lastlri.lr_next = lri - if not lri: - break - lr_items.append(lri) - lastlri = lri - i += 1 - p.lr_items = lr_items - -# ----------------------------------------------------------------------------- -# === LR Generator === -# -# The following classes and functions are used to generate LR parsing tables on -# a grammar. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# digraph() -# traverse() -# -# The following two functions are used to compute set valued functions -# of the form: -# -# F(x) = F'(x) U U{F(y) | x R y} -# -# This is used to compute the values of Read() sets as well as FOLLOW sets -# in LALR(1) generation. -# -# Inputs: X - An input set -# R - A relation -# FP - Set-valued function -# ------------------------------------------------------------------------------ - -def digraph(X, R, FP): - N = {} - for x in X: - N[x] = 0 - stack = [] - F = {} - for x in X: - if N[x] == 0: - traverse(x, N, stack, F, X, R, FP) - return F - -def traverse(x, N, stack, F, X, R, FP): - stack.append(x) - d = len(stack) - N[x] = d - F[x] = FP(x) # F(X) <- F'(x) - - rel = R(x) # Get y's related to x - for y in rel: - if N[y] == 0: - traverse(y, N, stack, F, X, R, FP) - N[x] = min(N[x], N[y]) - for a in F.get(y, []): - if a not in F[x]: - F[x].append(a) - if N[x] == d: - N[stack[-1]] = MAXINT - F[stack[-1]] = F[x] - element = stack.pop() - while element != x: - N[stack[-1]] = MAXINT - F[stack[-1]] = F[x] - element = stack.pop() - -class LALRError(YaccError): - pass - - -# ----------------------------------------------------------------------------- -# == LRTable == -# -# This class implements the LR table generation algorithm. There are no -# public methods. -# ----------------------------------------------------------------------------- - -class LRTable: - def __init__(self, grammar, log=None): - self.grammar = grammar - - # Set up the logger - if not log: - log = NullLogger() - self.log = log - - # Internal attributes - self.lr_action = {} # Action table - self.lr_goto = {} # Goto table - self.lr_productions = grammar.Productions # Copy of grammar Production array - self.lr_goto_cache = {} # Cache of computed gotos - self.lr0_cidhash = {} # Cache of closures - - self._add_count = 0 # Internal counter used to detect cycles - - # Diagnostic information filled in by the table generator - self.sr_conflict = 0 - self.rr_conflict = 0 - self.conflicts = [] # List of conflicts - - self.sr_conflicts = [] - self.rr_conflicts = [] - - # Build the tables - self.grammar.build_lritems() - self.grammar.compute_first() - self.grammar.compute_follow() - self.lr_parse_table() - - # Bind all production function names to callable objects in pdict - def bind_callables(self, pdict): - for p in self.lr_productions: - p.bind(pdict) - - # Compute the LR(0) closure operation on I, where I is a set of LR(0) items. - - def lr0_closure(self, I): - self._add_count += 1 - - # Add everything in I to J - J = I[:] - didadd = True - while didadd: - didadd = False - for j in J: - for x in j.lr_after: - if getattr(x, 'lr0_added', 0) == self._add_count: - continue - # Add B --> .G to J - J.append(x.lr_next) - x.lr0_added = self._add_count - didadd = True - - return J - - # Compute the LR(0) goto function goto(I,X) where I is a set - # of LR(0) items and X is a grammar symbol. This function is written - # in a way that guarantees uniqueness of the generated goto sets - # (i.e. the same goto set will never be returned as two different Python - # objects). With uniqueness, we can later do fast set comparisons using - # id(obj) instead of element-wise comparison. - - def lr0_goto(self, I, x): - # First we look for a previously cached entry - g = self.lr_goto_cache.get((id(I), x)) - if g: - return g - - # Now we generate the goto set in a way that guarantees uniqueness - # of the result - - s = self.lr_goto_cache.get(x) - if not s: - s = {} - self.lr_goto_cache[x] = s - - gs = [] - for p in I: - n = p.lr_next - if n and n.lr_before == x: - s1 = s.get(id(n)) - if not s1: - s1 = {} - s[id(n)] = s1 - gs.append(n) - s = s1 - g = s.get('$end') - if not g: - if gs: - g = self.lr0_closure(gs) - s['$end'] = g - else: - s['$end'] = gs - self.lr_goto_cache[(id(I), x)] = g - return g - - # Compute the LR(0) sets of item function - def lr0_items(self): - C = [self.lr0_closure([self.grammar.Productions[0].lr_next])] - i = 0 - for I in C: - self.lr0_cidhash[id(I)] = i - i += 1 - - # Loop over the items in C and each grammar symbols - i = 0 - while i < len(C): - I = C[i] - i += 1 - - # Collect all of the symbols that could possibly be in the goto(I,X) sets - asyms = {} - for ii in I: - for s in ii.usyms: - asyms[s] = None - - for x in asyms: - g = self.lr0_goto(I, x) - if not g or id(g) in self.lr0_cidhash: - continue - self.lr0_cidhash[id(g)] = len(C) - C.append(g) - - return C - - # ----------------------------------------------------------------------------- - # ==== LALR(1) Parsing ==== - # - # LALR(1) parsing is almost exactly the same as SLR except that instead of - # relying upon Follow() sets when performing reductions, a more selective - # lookahead set that incorporates the state of the LR(0) machine is utilized. - # Thus, we mainly just have to focus on calculating the lookahead sets. - # - # The method used here is due to DeRemer and Pennelo (1982). - # - # DeRemer, F. L., and T. J. Pennelo: "Efficient Computation of LALR(1) - # Lookahead Sets", ACM Transactions on Programming Languages and Systems, - # Vol. 4, No. 4, Oct. 1982, pp. 615-649 - # - # Further details can also be found in: - # - # J. Tremblay and P. Sorenson, "The Theory and Practice of Compiler Writing", - # McGraw-Hill Book Company, (1985). - # - # ----------------------------------------------------------------------------- - - # ----------------------------------------------------------------------------- - # compute_nullable_nonterminals() - # - # Creates a dictionary containing all of the non-terminals that might produce - # an empty production. - # ----------------------------------------------------------------------------- - - def compute_nullable_nonterminals(self): - nullable = set() - num_nullable = 0 - while True: - for p in self.grammar.Productions[1:]: - if p.len == 0: - nullable.add(p.name) - continue - for t in p.prod: - if t not in nullable: - break - else: - nullable.add(p.name) - if len(nullable) == num_nullable: - break - num_nullable = len(nullable) - return nullable - - # ----------------------------------------------------------------------------- - # find_nonterminal_trans(C) - # - # Given a set of LR(0) items, this functions finds all of the non-terminal - # transitions. These are transitions in which a dot appears immediately before - # a non-terminal. Returns a list of tuples of the form (state,N) where state - # is the state number and N is the nonterminal symbol. - # - # The input C is the set of LR(0) items. - # ----------------------------------------------------------------------------- - - def find_nonterminal_transitions(self, C): - trans = [] - for stateno, state in enumerate(C): - for p in state: - if p.lr_index < p.len - 1: - t = (stateno, p.prod[p.lr_index+1]) - if t[1] in self.grammar.Nonterminals: - if t not in trans: - trans.append(t) - return trans - - # ----------------------------------------------------------------------------- - # dr_relation() - # - # Computes the DR(p,A) relationships for non-terminal transitions. The input - # is a tuple (state,N) where state is a number and N is a nonterminal symbol. - # - # Returns a list of terminals. - # ----------------------------------------------------------------------------- - - def dr_relation(self, C, trans, nullable): - state, N = trans - terms = [] - - g = self.lr0_goto(C[state], N) - for p in g: - if p.lr_index < p.len - 1: - a = p.prod[p.lr_index+1] - if a in self.grammar.Terminals: - if a not in terms: - terms.append(a) - - # This extra bit is to handle the start state - if state == 0 and N == self.grammar.Productions[0].prod[0]: - terms.append('$end') - - return terms - - # ----------------------------------------------------------------------------- - # reads_relation() - # - # Computes the READS() relation (p,A) READS (t,C). - # ----------------------------------------------------------------------------- - - def reads_relation(self, C, trans, empty): - # Look for empty transitions - rel = [] - state, N = trans - - g = self.lr0_goto(C[state], N) - j = self.lr0_cidhash.get(id(g), -1) - for p in g: - if p.lr_index < p.len - 1: - a = p.prod[p.lr_index + 1] - if a in empty: - rel.append((j, a)) - - return rel - - # ----------------------------------------------------------------------------- - # compute_lookback_includes() - # - # Determines the lookback and includes relations - # - # LOOKBACK: - # - # This relation is determined by running the LR(0) state machine forward. - # For example, starting with a production "N : . A B C", we run it forward - # to obtain "N : A B C ." We then build a relationship between this final - # state and the starting state. These relationships are stored in a dictionary - # lookdict. - # - # INCLUDES: - # - # Computes the INCLUDE() relation (p,A) INCLUDES (p',B). - # - # This relation is used to determine non-terminal transitions that occur - # inside of other non-terminal transition states. (p,A) INCLUDES (p', B) - # if the following holds: - # - # B -> LAT, where T -> epsilon and p' -L-> p - # - # L is essentially a prefix (which may be empty), T is a suffix that must be - # able to derive an empty string. State p' must lead to state p with the string L. - # - # ----------------------------------------------------------------------------- - - def compute_lookback_includes(self, C, trans, nullable): - lookdict = {} # Dictionary of lookback relations - includedict = {} # Dictionary of include relations - - # Make a dictionary of non-terminal transitions - dtrans = {} - for t in trans: - dtrans[t] = 1 - - # Loop over all transitions and compute lookbacks and includes - for state, N in trans: - lookb = [] - includes = [] - for p in C[state]: - if p.name != N: - continue - - # Okay, we have a name match. We now follow the production all the way - # through the state machine until we get the . on the right hand side - - lr_index = p.lr_index - j = state - while lr_index < p.len - 1: - lr_index = lr_index + 1 - t = p.prod[lr_index] - - # Check to see if this symbol and state are a non-terminal transition - if (j, t) in dtrans: - # Yes. Okay, there is some chance that this is an includes relation - # the only way to know for certain is whether the rest of the - # production derives empty - - li = lr_index + 1 - while li < p.len: - if p.prod[li] in self.grammar.Terminals: - break # No forget it - if p.prod[li] not in nullable: - break - li = li + 1 - else: - # Appears to be a relation between (j,t) and (state,N) - includes.append((j, t)) - - g = self.lr0_goto(C[j], t) # Go to next set - j = self.lr0_cidhash.get(id(g), -1) # Go to next state - - # When we get here, j is the final state, now we have to locate the production - for r in C[j]: - if r.name != p.name: - continue - if r.len != p.len: - continue - i = 0 - # This look is comparing a production ". A B C" with "A B C ." - while i < r.lr_index: - if r.prod[i] != p.prod[i+1]: - break - i = i + 1 - else: - lookb.append((j, r)) - for i in includes: - if i not in includedict: - includedict[i] = [] - includedict[i].append((state, N)) - lookdict[(state, N)] = lookb - - return lookdict, includedict - - # ----------------------------------------------------------------------------- - # compute_read_sets() - # - # Given a set of LR(0) items, this function computes the read sets. - # - # Inputs: C = Set of LR(0) items - # ntrans = Set of nonterminal transitions - # nullable = Set of empty transitions - # - # Returns a set containing the read sets - # ----------------------------------------------------------------------------- - - def compute_read_sets(self, C, ntrans, nullable): - FP = lambda x: self.dr_relation(C, x, nullable) - R = lambda x: self.reads_relation(C, x, nullable) - F = digraph(ntrans, R, FP) - return F - - # ----------------------------------------------------------------------------- - # compute_follow_sets() - # - # Given a set of LR(0) items, a set of non-terminal transitions, a readset, - # and an include set, this function computes the follow sets - # - # Follow(p,A) = Read(p,A) U U {Follow(p',B) | (p,A) INCLUDES (p',B)} - # - # Inputs: - # ntrans = Set of nonterminal transitions - # readsets = Readset (previously computed) - # inclsets = Include sets (previously computed) - # - # Returns a set containing the follow sets - # ----------------------------------------------------------------------------- - - def compute_follow_sets(self, ntrans, readsets, inclsets): - FP = lambda x: readsets[x] - R = lambda x: inclsets.get(x, []) - F = digraph(ntrans, R, FP) - return F - - # ----------------------------------------------------------------------------- - # add_lookaheads() - # - # Attaches the lookahead symbols to grammar rules. - # - # Inputs: lookbacks - Set of lookback relations - # followset - Computed follow set - # - # This function directly attaches the lookaheads to productions contained - # in the lookbacks set - # ----------------------------------------------------------------------------- - - def add_lookaheads(self, lookbacks, followset): - for trans, lb in lookbacks.items(): - # Loop over productions in lookback - for state, p in lb: - if state not in p.lookaheads: - p.lookaheads[state] = [] - f = followset.get(trans, []) - for a in f: - if a not in p.lookaheads[state]: - p.lookaheads[state].append(a) - - # ----------------------------------------------------------------------------- - # add_lalr_lookaheads() - # - # This function does all of the work of adding lookahead information for use - # with LALR parsing - # ----------------------------------------------------------------------------- - - def add_lalr_lookaheads(self, C): - # Determine all of the nullable nonterminals - nullable = self.compute_nullable_nonterminals() - - # Find all non-terminal transitions - trans = self.find_nonterminal_transitions(C) - - # Compute read sets - readsets = self.compute_read_sets(C, trans, nullable) - - # Compute lookback/includes relations - lookd, included = self.compute_lookback_includes(C, trans, nullable) - - # Compute LALR FOLLOW sets - followsets = self.compute_follow_sets(trans, readsets, included) - - # Add all of the lookaheads - self.add_lookaheads(lookd, followsets) - - # ----------------------------------------------------------------------------- - # lr_parse_table() - # - # This function constructs the parse tables for SLR or LALR - # ----------------------------------------------------------------------------- - def lr_parse_table(self): - Productions = self.grammar.Productions - Precedence = self.grammar.Precedence - goto = self.lr_goto # Goto array - action = self.lr_action # Action array - log = self.log # Logger for output - - actionp = {} # Action production array (temporary) - - # Step 1: Construct C = { I0, I1, ... IN}, collection of LR(0) items - # This determines the number of states - - C = self.lr0_items() - self.add_lalr_lookaheads(C) - - # Build the parser table, state by state - st = 0 - for I in C: - # Loop over each production in I - actlist = [] # List of actions - st_action = {} - st_actionp = {} - st_goto = {} - log.info('') - log.info('state %d', st) - log.info('') - for p in I: - log.info(' (%d) %s', p.number, p) - log.info('') - - for p in I: - if p.len == p.lr_index + 1: - if p.name == "S'": - # Start symbol. Accept! - st_action['$end'] = 0 - st_actionp['$end'] = p - else: - # We are at the end of a production. Reduce! - laheads = p.lookaheads[st] - for a in laheads: - actlist.append((a, p, 'reduce using rule %d (%s)' % (p.number, p))) - r = st_action.get(a) - if r is not None: - # Whoa. Have a shift/reduce or reduce/reduce conflict - if r > 0: - # Need to decide on shift or reduce here - # By default we favor shifting. Need to add - # some precedence rules here. - - # Shift precedence comes from the token - sprec, slevel = Precedence.get(a, ('right', 0)) - - # Reduce precedence comes from rule being reduced (p) - rprec, rlevel = Productions[p.number].prec - - if (slevel < rlevel) or ((slevel == rlevel) and (rprec == 'left')): - # We really need to reduce here. - st_action[a] = -p.number - st_actionp[a] = p - if not slevel and not rlevel: - log.info(' ! shift/reduce conflict for %s resolved as reduce', a) - self.sr_conflicts.append((st, a, 'reduce')) - Productions[p.number].reduced += 1 - elif (slevel == rlevel) and (rprec == 'nonassoc'): - st_action[a] = None - else: - # Hmmm. Guess we'll keep the shift - if not rlevel: - log.info(' ! shift/reduce conflict for %s resolved as shift', a) - self.sr_conflicts.append((st, a, 'shift')) - elif r < 0: - # Reduce/reduce conflict. In this case, we favor the rule - # that was defined first in the grammar file - oldp = Productions[-r] - pp = Productions[p.number] - if oldp.line > pp.line: - st_action[a] = -p.number - st_actionp[a] = p - chosenp, rejectp = pp, oldp - Productions[p.number].reduced += 1 - Productions[oldp.number].reduced -= 1 - else: - chosenp, rejectp = oldp, pp - self.rr_conflicts.append((st, chosenp, rejectp)) - log.info(' ! reduce/reduce conflict for %s resolved using rule %d (%s)', - a, st_actionp[a].number, st_actionp[a]) - else: - raise LALRError('Unknown conflict in state %d' % st) - else: - st_action[a] = -p.number - st_actionp[a] = p - Productions[p.number].reduced += 1 - else: - i = p.lr_index - a = p.prod[i+1] # Get symbol right after the "." - if a in self.grammar.Terminals: - g = self.lr0_goto(I, a) - j = self.lr0_cidhash.get(id(g), -1) - if j >= 0: - # We are in a shift state - actlist.append((a, p, 'shift and go to state %d' % j)) - r = st_action.get(a) - if r is not None: - # Whoa have a shift/reduce or shift/shift conflict - if r > 0: - if r != j: - raise LALRError('Shift/shift conflict in state %d' % st) - elif r < 0: - # Do a precedence check. - # - if precedence of reduce rule is higher, we reduce. - # - if precedence of reduce is same and left assoc, we reduce. - # - otherwise we shift - - # Shift precedence comes from the token - sprec, slevel = Precedence.get(a, ('right', 0)) - - # Reduce precedence comes from the rule that could have been reduced - rprec, rlevel = Productions[st_actionp[a].number].prec - - if (slevel > rlevel) or ((slevel == rlevel) and (rprec == 'right')): - # We decide to shift here... highest precedence to shift - Productions[st_actionp[a].number].reduced -= 1 - st_action[a] = j - st_actionp[a] = p - if not rlevel: - log.info(' ! shift/reduce conflict for %s resolved as shift', a) - self.sr_conflicts.append((st, a, 'shift')) - elif (slevel == rlevel) and (rprec == 'nonassoc'): - st_action[a] = None - else: - # Hmmm. Guess we'll keep the reduce - if not slevel and not rlevel: - log.info(' ! shift/reduce conflict for %s resolved as reduce', a) - self.sr_conflicts.append((st, a, 'reduce')) - - else: - raise LALRError('Unknown conflict in state %d' % st) - else: - st_action[a] = j - st_actionp[a] = p - - # Print the actions associated with each terminal - _actprint = {} - for a, p, m in actlist: - if a in st_action: - if p is st_actionp[a]: - log.info(' %-15s %s', a, m) - _actprint[(a, m)] = 1 - log.info('') - # Print the actions that were not used. (debugging) - not_used = 0 - for a, p, m in actlist: - if a in st_action: - if p is not st_actionp[a]: - if not (a, m) in _actprint: - log.debug(' ! %-15s [ %s ]', a, m) - not_used = 1 - _actprint[(a, m)] = 1 - if not_used: - log.debug('') - - # Construct the goto table for this state - - nkeys = {} - for ii in I: - for s in ii.usyms: - if s in self.grammar.Nonterminals: - nkeys[s] = None - for n in nkeys: - g = self.lr0_goto(I, n) - j = self.lr0_cidhash.get(id(g), -1) - if j >= 0: - st_goto[n] = j - log.info(' %-30s shift and go to state %d', n, j) - - action[st] = st_action - actionp[st] = st_actionp - goto[st] = st_goto - st += 1 - -# ----------------------------------------------------------------------------- -# === INTROSPECTION === -# -# The following functions and classes are used to implement the PLY -# introspection features followed by the yacc() function itself. -# ----------------------------------------------------------------------------- - -# ----------------------------------------------------------------------------- -# get_caller_module_dict() -# -# This function returns a dictionary containing all of the symbols defined within -# a caller further down the call stack. This is used to get the environment -# associated with the yacc() call if none was provided. -# ----------------------------------------------------------------------------- - -def get_caller_module_dict(levels): - f = sys._getframe(levels) - ldict = f.f_globals.copy() - if f.f_globals != f.f_locals: - ldict.update(f.f_locals) - return ldict - -# ----------------------------------------------------------------------------- -# parse_grammar() -# -# This takes a raw grammar rule string and parses it into production data -# ----------------------------------------------------------------------------- -def parse_grammar(doc, file, line): - grammar = [] - # Split the doc string into lines - pstrings = doc.splitlines() - lastp = None - dline = line - for ps in pstrings: - dline += 1 - p = ps.split() - if not p: - continue - try: - if p[0] == '|': - # This is a continuation of a previous rule - if not lastp: - raise SyntaxError("%s:%d: Misplaced '|'" % (file, dline)) - prodname = lastp - syms = p[1:] - else: - prodname = p[0] - lastp = prodname - syms = p[2:] - assign = p[1] - if assign != ':' and assign != '::=': - raise SyntaxError("%s:%d: Syntax error. Expected ':'" % (file, dline)) - - grammar.append((file, dline, prodname, syms)) - except SyntaxError: - raise - except Exception: - raise SyntaxError('%s:%d: Syntax error in rule %r' % (file, dline, ps.strip())) - - return grammar - -# ----------------------------------------------------------------------------- -# ParserReflect() -# -# This class represents information extracted for building a parser including -# start symbol, error function, tokens, precedence list, action functions, -# etc. -# ----------------------------------------------------------------------------- -class ParserReflect(object): - def __init__(self, pdict, log=None): - self.pdict = pdict - self.start = None - self.error_func = None - self.tokens = None - self.modules = set() - self.grammar = [] - self.error = False - - if log is None: - self.log = PlyLogger(sys.stderr) - else: - self.log = log - - # Get all of the basic information - def get_all(self): - self.get_start() - self.get_error_func() - self.get_tokens() - self.get_precedence() - self.get_pfunctions() - - # Validate all of the information - def validate_all(self): - self.validate_start() - self.validate_error_func() - self.validate_tokens() - self.validate_precedence() - self.validate_pfunctions() - self.validate_modules() - return self.error - - # Compute a signature over the grammar - def signature(self): - parts = [] - try: - if self.start: - parts.append(self.start) - if self.prec: - parts.append(''.join([''.join(p) for p in self.prec])) - if self.tokens: - parts.append(' '.join(self.tokens)) - for f in self.pfuncs: - if f[3]: - parts.append(f[3]) - except (TypeError, ValueError): - pass - return ''.join(parts) - - # ----------------------------------------------------------------------------- - # validate_modules() - # - # This method checks to see if there are duplicated p_rulename() functions - # in the parser module file. Without this function, it is really easy for - # users to make mistakes by cutting and pasting code fragments (and it's a real - # bugger to try and figure out why the resulting parser doesn't work). Therefore, - # we just do a little regular expression pattern matching of def statements - # to try and detect duplicates. - # ----------------------------------------------------------------------------- - - def validate_modules(self): - # Match def p_funcname( - fre = re.compile(r'\s*def\s+(p_[a-zA-Z_0-9]*)\(') - - for module in self.modules: - try: - lines, linen = inspect.getsourcelines(module) - except IOError: - continue - - counthash = {} - for linen, line in enumerate(lines): - linen += 1 - m = fre.match(line) - if m: - name = m.group(1) - prev = counthash.get(name) - if not prev: - counthash[name] = linen - else: - filename = inspect.getsourcefile(module) - self.log.warning('%s:%d: Function %s redefined. Previously defined on line %d', - filename, linen, name, prev) - - # Get the start symbol - def get_start(self): - self.start = self.pdict.get('start') - - # Validate the start symbol - def validate_start(self): - if self.start is not None: - if not isinstance(self.start, str): - self.log.error("'start' must be a string") - - # Look for error handler - def get_error_func(self): - self.error_func = self.pdict.get('p_error') - - # Validate the error function - def validate_error_func(self): - if self.error_func: - if isinstance(self.error_func, types.FunctionType): - ismethod = 0 - elif isinstance(self.error_func, types.MethodType): - ismethod = 1 - else: - self.log.error("'p_error' defined, but is not a function or method") - self.error = True - return - - eline = self.error_func.__code__.co_firstlineno - efile = self.error_func.__code__.co_filename - module = inspect.getmodule(self.error_func) - self.modules.add(module) - - argcount = self.error_func.__code__.co_argcount - ismethod - if argcount != 1: - self.log.error('%s:%d: p_error() requires 1 argument', efile, eline) - self.error = True - - # Get the tokens map - def get_tokens(self): - tokens = self.pdict.get('tokens') - if not tokens: - self.log.error('No token list is defined') - self.error = True - return - - if not isinstance(tokens, (list, tuple)): - self.log.error('tokens must be a list or tuple') - self.error = True - return - - if not tokens: - self.log.error('tokens is empty') - self.error = True - return - - self.tokens = sorted(tokens) - - # Validate the tokens - def validate_tokens(self): - # Validate the tokens. - if 'error' in self.tokens: - self.log.error("Illegal token name 'error'. Is a reserved word") - self.error = True - return - - terminals = set() - for n in self.tokens: - if n in terminals: - self.log.warning('Token %r multiply defined', n) - terminals.add(n) - - # Get the precedence map (if any) - def get_precedence(self): - self.prec = self.pdict.get('precedence') - - # Validate and parse the precedence map - def validate_precedence(self): - preclist = [] - if self.prec: - if not isinstance(self.prec, (list, tuple)): - self.log.error('precedence must be a list or tuple') - self.error = True - return - for level, p in enumerate(self.prec): - if not isinstance(p, (list, tuple)): - self.log.error('Bad precedence table') - self.error = True - return - - if len(p) < 2: - self.log.error('Malformed precedence entry %s. Must be (assoc, term, ..., term)', p) - self.error = True - return - assoc = p[0] - if not isinstance(assoc, str): - self.log.error('precedence associativity must be a string') - self.error = True - return - for term in p[1:]: - if not isinstance(term, str): - self.log.error('precedence items must be strings') - self.error = True - return - preclist.append((term, assoc, level+1)) - self.preclist = preclist - - # Get all p_functions from the grammar - def get_pfunctions(self): - p_functions = [] - for name, item in self.pdict.items(): - if not name.startswith('p_') or name == 'p_error': - continue - if isinstance(item, (types.FunctionType, types.MethodType)): - line = getattr(item, 'co_firstlineno', item.__code__.co_firstlineno) - module = inspect.getmodule(item) - p_functions.append((line, module, name, item.__doc__)) - - # Sort all of the actions by line number; make sure to stringify - # modules to make them sortable, since `line` may not uniquely sort all - # p functions - p_functions.sort(key=lambda p_function: ( - p_function[0], - str(p_function[1]), - p_function[2], - p_function[3])) - self.pfuncs = p_functions - - # Validate all of the p_functions - def validate_pfunctions(self): - grammar = [] - # Check for non-empty symbols - if len(self.pfuncs) == 0: - self.log.error('no rules of the form p_rulename are defined') - self.error = True - return - - for line, module, name, doc in self.pfuncs: - file = inspect.getsourcefile(module) - func = self.pdict[name] - if isinstance(func, types.MethodType): - reqargs = 2 - else: - reqargs = 1 - if func.__code__.co_argcount > reqargs: - self.log.error('%s:%d: Rule %r has too many arguments', file, line, func.__name__) - self.error = True - elif func.__code__.co_argcount < reqargs: - self.log.error('%s:%d: Rule %r requires an argument', file, line, func.__name__) - self.error = True - elif not func.__doc__: - self.log.warning('%s:%d: No documentation string specified in function %r (ignored)', - file, line, func.__name__) - else: - try: - parsed_g = parse_grammar(doc, file, line) - for g in parsed_g: - grammar.append((name, g)) - except SyntaxError as e: - self.log.error(str(e)) - self.error = True - - # Looks like a valid grammar rule - # Mark the file in which defined. - self.modules.add(module) - - # Secondary validation step that looks for p_ definitions that are not functions - # or functions that look like they might be grammar rules. - - for n, v in self.pdict.items(): - if n.startswith('p_') and isinstance(v, (types.FunctionType, types.MethodType)): - continue - if n.startswith('t_'): - continue - if n.startswith('p_') and n != 'p_error': - self.log.warning('%r not defined as a function', n) - if ((isinstance(v, types.FunctionType) and v.__code__.co_argcount == 1) or - (isinstance(v, types.MethodType) and v.__func__.__code__.co_argcount == 2)): - if v.__doc__: - try: - doc = v.__doc__.split(' ') - if doc[1] == ':': - self.log.warning('%s:%d: Possible grammar rule %r defined without p_ prefix', - v.__code__.co_filename, v.__code__.co_firstlineno, n) - except IndexError: - pass - - self.grammar = grammar - -# ----------------------------------------------------------------------------- -# yacc(module) -# -# Build a parser -# ----------------------------------------------------------------------------- - -def yacc(*, debug=yaccdebug, module=None, start=None, - check_recursion=True, optimize=False, debugfile=debug_file, - debuglog=None, errorlog=None): - - # Reference to the parsing method of the last built parser - global parse - - if errorlog is None: - errorlog = PlyLogger(sys.stderr) - - # Get the module dictionary used for the parser - if module: - _items = [(k, getattr(module, k)) for k in dir(module)] - pdict = dict(_items) - # If no __file__ or __package__ attributes are available, try to obtain them - # from the __module__ instead - if '__file__' not in pdict: - pdict['__file__'] = sys.modules[pdict['__module__']].__file__ - if '__package__' not in pdict and '__module__' in pdict: - if hasattr(sys.modules[pdict['__module__']], '__package__'): - pdict['__package__'] = sys.modules[pdict['__module__']].__package__ - else: - pdict = get_caller_module_dict(2) - - # Set start symbol if it's specified directly using an argument - if start is not None: - pdict['start'] = start - - # Collect parser information from the dictionary - pinfo = ParserReflect(pdict, log=errorlog) - pinfo.get_all() - - if pinfo.error: - raise YaccError('Unable to build parser') - - if debuglog is None: - if debug: - try: - debuglog = PlyLogger(open(debugfile, 'w')) - except IOError as e: - errorlog.warning("Couldn't open %r. %s" % (debugfile, e)) - debuglog = NullLogger() - else: - debuglog = NullLogger() - - debuglog.info('Created by PLY (http://www.dabeaz.com/ply)') - - errors = False - - # Validate the parser information - if pinfo.validate_all(): - raise YaccError('Unable to build parser') - - if not pinfo.error_func: - errorlog.warning('no p_error() function is defined') - - # Create a grammar object - grammar = Grammar(pinfo.tokens) - - # Set precedence level for terminals - for term, assoc, level in pinfo.preclist: - try: - grammar.set_precedence(term, assoc, level) - except GrammarError as e: - errorlog.warning('%s', e) - - # Add productions to the grammar - for funcname, gram in pinfo.grammar: - file, line, prodname, syms = gram - try: - grammar.add_production(prodname, syms, funcname, file, line) - except GrammarError as e: - errorlog.error('%s', e) - errors = True - - # Set the grammar start symbols - try: - if start is None: - grammar.set_start(pinfo.start) - else: - grammar.set_start(start) - except GrammarError as e: - errorlog.error(str(e)) - errors = True - - if errors: - raise YaccError('Unable to build parser') - - # Verify the grammar structure - undefined_symbols = grammar.undefined_symbols() - for sym, prod in undefined_symbols: - errorlog.error('%s:%d: Symbol %r used, but not defined as a token or a rule', prod.file, prod.line, sym) - errors = True - - unused_terminals = grammar.unused_terminals() - if unused_terminals: - debuglog.info('') - debuglog.info('Unused terminals:') - debuglog.info('') - for term in unused_terminals: - errorlog.warning('Token %r defined, but not used', term) - debuglog.info(' %s', term) - - # Print out all productions to the debug log - if debug: - debuglog.info('') - debuglog.info('Grammar') - debuglog.info('') - for n, p in enumerate(grammar.Productions): - debuglog.info('Rule %-5d %s', n, p) - - # Find unused non-terminals - unused_rules = grammar.unused_rules() - for prod in unused_rules: - errorlog.warning('%s:%d: Rule %r defined, but not used', prod.file, prod.line, prod.name) - - if len(unused_terminals) == 1: - errorlog.warning('There is 1 unused token') - if len(unused_terminals) > 1: - errorlog.warning('There are %d unused tokens', len(unused_terminals)) - - if len(unused_rules) == 1: - errorlog.warning('There is 1 unused rule') - if len(unused_rules) > 1: - errorlog.warning('There are %d unused rules', len(unused_rules)) - - if debug: - debuglog.info('') - debuglog.info('Terminals, with rules where they appear') - debuglog.info('') - terms = list(grammar.Terminals) - terms.sort() - for term in terms: - debuglog.info('%-20s : %s', term, ' '.join([str(s) for s in grammar.Terminals[term]])) - - debuglog.info('') - debuglog.info('Nonterminals, with rules where they appear') - debuglog.info('') - nonterms = list(grammar.Nonterminals) - nonterms.sort() - for nonterm in nonterms: - debuglog.info('%-20s : %s', nonterm, ' '.join([str(s) for s in grammar.Nonterminals[nonterm]])) - debuglog.info('') - - if check_recursion: - unreachable = grammar.find_unreachable() - for u in unreachable: - errorlog.warning('Symbol %r is unreachable', u) - - infinite = grammar.infinite_cycles() - for inf in infinite: - errorlog.error('Infinite recursion detected for symbol %r', inf) - errors = True - - unused_prec = grammar.unused_precedence() - for term, assoc in unused_prec: - errorlog.error('Precedence rule %r defined for unknown symbol %r', assoc, term) - errors = True - - if errors: - raise YaccError('Unable to build parser') - - # Run the LRTable on the grammar - lr = LRTable(grammar, debuglog) - - if debug: - num_sr = len(lr.sr_conflicts) - - # Report shift/reduce and reduce/reduce conflicts - if num_sr == 1: - errorlog.warning('1 shift/reduce conflict') - elif num_sr > 1: - errorlog.warning('%d shift/reduce conflicts', num_sr) - - num_rr = len(lr.rr_conflicts) - if num_rr == 1: - errorlog.warning('1 reduce/reduce conflict') - elif num_rr > 1: - errorlog.warning('%d reduce/reduce conflicts', num_rr) - - # Write out conflicts to the output file - if debug and (lr.sr_conflicts or lr.rr_conflicts): - debuglog.warning('') - debuglog.warning('Conflicts:') - debuglog.warning('') - - for state, tok, resolution in lr.sr_conflicts: - debuglog.warning('shift/reduce conflict for %s in state %d resolved as %s', tok, state, resolution) - - already_reported = set() - for state, rule, rejected in lr.rr_conflicts: - if (state, id(rule), id(rejected)) in already_reported: - continue - debuglog.warning('reduce/reduce conflict in state %d resolved using rule (%s)', state, rule) - debuglog.warning('rejected rule (%s) in state %d', rejected, state) - errorlog.warning('reduce/reduce conflict in state %d resolved using rule (%s)', state, rule) - errorlog.warning('rejected rule (%s) in state %d', rejected, state) - already_reported.add((state, id(rule), id(rejected))) - - warned_never = [] - for state, rule, rejected in lr.rr_conflicts: - if not rejected.reduced and (rejected not in warned_never): - debuglog.warning('Rule (%s) is never reduced', rejected) - errorlog.warning('Rule (%s) is never reduced', rejected) - warned_never.append(rejected) - - # Build the parser - lr.bind_callables(pinfo.pdict) - parser = LRParser(lr, pinfo.error_func) - - parse = parser.parse - return parser diff --git a/src/symbols/type_.py b/src/symbols/type_.py index d463d102a..a443de414 100644 --- a/src/symbols/type_.py +++ b/src/symbols/type_.py @@ -173,7 +173,7 @@ class SymbolTYPEREF(Symbol): """ def __init__(self, type_: SymbolTYPE, lineno: int, filename: str = "", *, implicit: bool = False): - assert isinstance(type_, SymbolTYPE) + assert isinstance(type_, SymbolTYPE | SymbolTYPEREF) super().__init__(type_) self.implicit = implicit # Whether this annotation was implicit or not self.lineno = lineno # Line number where this annotation was defined diff --git a/src/zxbasm/asmlex.py b/src/zxbasm/asmlex.py index ec738a0a9..d3a782ef9 100755 --- a/src/zxbasm/asmlex.py +++ b/src/zxbasm/asmlex.py @@ -9,10 +9,9 @@ import sys -from src.api import global_ +from src.api import global_, lex from src.api.config import OPTIONS from src.api.errmsg import error -from src.ply import lex _tokens: tuple[str, ...] = ( "STRING", diff --git a/src/zxbasm/asmparse.py b/src/zxbasm/asmparse.py index 55f26c082..58a7ff267 100755 --- a/src/zxbasm/asmparse.py +++ b/src/zxbasm/asmparse.py @@ -1,13 +1,12 @@ -#!/usr/bin/env python - # -------------------------------------------------------------------- # SPDX-License-Identifier: AGPL-3.0-or-later -# © Copyright 2008-2024 José Manuel Rodríguez de la Rosa and contributors. +# © Copyright 2008-2026 José Manuel Rodríguez de la Rosa and contributors. # See the file CONTRIBUTORS.md for copyright details. # See https://www.gnu.org/licenses/agpl-3.0.html for details. # -------------------------------------------------------------------- import os +from typing import Any import src.api.utils from src import outfmt @@ -15,7 +14,6 @@ from src.api.config import OPTIONS from src.api.debug import __DEBUG__ from src.api.errmsg import error, warning -from src.ply import yacc from src.zxbasm import asmlex, basic from src.zxbasm import global_ as asm_gl from src.zxbasm.asm import Asm, Container @@ -25,6 +23,10 @@ from src.zxbasm.memory import Memory from src.zxbpp import zxbpp +from .asmparse_standalone import Lark_StandAlone as BaseLarkStandAlone +from .asmparse_standalone import Lexer, Token, Transformer, UnexpectedInput +from .asmparse_zxnext_standalone import Lark_StandAlone as ZXNextLarkStandAlone + LEXER = asmlex.Lexer() ORG = 0 # Origin of CODE @@ -34,14 +36,6 @@ REGS16 = {"BC", "DE", "HL", "SP", "IX", "IY"} # 16 Bits registers -precedence = ( - ("left", "RSHIFT", "LSHIFT", "BAND", "BOR", "BXOR"), - ("left", "PLUS", "MINUS"), - ("left", "MUL", "DIV", "MOD"), - ("right", "POW"), - ("right", "UMINUS"), -) - def init(): """Initializes this module""" @@ -62,933 +56,465 @@ def init(): asm_gl.NAMESPACE = asm_gl.GLOBAL_NAMESPACE -# -------- GRAMMAR RULES for the preprocessor --------- +class AsmToken(Token): + pass -def p_start(p): - """start : program - | program endline - """ +class AsmLarkLexerAdapter(Lexer): + def __init__(self, lexer_conf: Any) -> None: + pass + def lex(self, data: Any, parser_state: Any = None) -> Any: # type: ignore[override] + lexer = data + while True: + if lexer.next_token is not None: + tok_type = lexer.next_token + lexer.next_token = None + t = AsmToken(tok_type, "", line=lexer.lineno, column=1) + yield t + continue -def p_program_endline(p): - """endline : END NEWLINE - | endline NEWLINE - """ + tok = lexer.token() + if tok is None: + break + t = AsmToken(tok.type, tok.value, line=tok.lineno, column=lexer.find_column(tok)) + yield t -def p_program_endline2(p): - """endline : END expr NEWLINE - | END pexpr NEWLINE - """ - global AUTORUN_ADDR - AUTORUN_ADDR = p[2].eval() +class AsmTransformer(Transformer): + def start(self, items): + return items[0] -def p_program(p): - """program : line""" + def program(self, items): + return items[0] + def empty_program(self, items): + return None -def p_program_line(p): - """program : program line""" + def program_endline2(self, items): + global AUTORUN_ADDR + AUTORUN_ADDR = items[1].eval() + return items[0] + def def_label(self, items): + MEMORY.declare_label(items[0], items[0].line, items[2]) -def p_def_label(p): - """line : ID EQU expr NEWLINE - | ID EQU pexpr NEWLINE - """ - p[0] = None - MEMORY.declare_label(p[1], p.lineno(1), p[3]) + def line_asm(self, items): + return None + def preprocessor_line(self, items): + return None -def p_line_asm(p): - """line : asms NEWLINE - | asms CO NEWLINE - """ + def preproc_line_init(self, items): + global INITS + INITS.append(Container(items[0].strip('"'), items[0].line)) + def asms_empty(self, items): + return MEMORY.org -def p_asms_empty(p): - """asms :""" - p[0] = MEMORY.org + def asms_asm(self, items): + asm = items[0] + if isinstance(asm, Asm): + MEMORY.add_instruction(asm) + return MEMORY.org + def asms_asms_asm(self, items): + asm = items[2] + if isinstance(asm, Asm): + MEMORY.add_instruction(asm) + return items[0] -def p_asms_asm(p): - """asms : asm""" - p[0] = MEMORY.org - asm = p[1] - if isinstance(asm, Asm): - MEMORY.add_instruction(asm) + def asm_label(self, items): + MEMORY.declare_label(str(items[0]), items[0].line) + def asm_ld8(self, items): + if items[1] in ("H", "L") and items[3] in ("IXH", "IXL", "IYH", "IYL"): + error(items[0].line, "Unexpected token '%s'" % items[3]) + return None + return Asm(items[0].line, "LD %s,%s" % (items[1], items[3])) -def p_asms_asms_asm(p): - """asms : asms CO asm""" - p[0] = p[1] - asm = p[3] - if isinstance(asm, Asm): - MEMORY.add_instruction(asm) + def ld_a_instr(self, items): + return Asm(items[0].line, "LD " + "".join(str(x).replace("[", "(").replace("]", ")") for x in items[1:])) + def proc_scope(self, items): + MEMORY.enter_proc(items[0].line) -def p_asm_label(p): - """asm : ID - | INTEGER - """ - MEMORY.declare_label(str(p[1]), p.lineno(1)) - - -def p_asm_ld8(p): - """asm : LD reg8 COMMA reg8_hl - | LD reg8_hl COMMA reg8 - | LD reg8 COMMA reg8 - | LD SP COMMA HL - | LD SP COMMA reg16i - | LD A COMMA reg8 - | LD reg8 COMMA A - | LD reg8_hl COMMA A - | LD A COMMA reg8_hl - | LD A COMMA A - | LD A COMMA I - | LD I COMMA A - | LD A COMMA R - | LD R COMMA A - | LD A COMMA reg8i - | LD reg8i COMMA A - | LD reg8 COMMA reg8i - | LD reg8i COMMA regBCDE - | LD reg8i COMMA reg8i - """ - if p[2] in ("H", "L") and p[4] in ("IXH", "IXL", "IYH", "IYL"): - p[0] = None - error(p.lineno(0), "Unexpected token '%s'" % p[4]) - else: - p[0] = Asm(p.lineno(1), "LD %s,%s" % (p[2], p[4])) - - -def p_LDa(p): # Remaining LD A,... and LD...,A instructions - """asm : LD A COMMA LP BC RP - | LD A COMMA LB BC RB - | LD A COMMA LP DE RP - | LD A COMMA LB DE RB - | LD LP BC RP COMMA A - | LD LB BC RB COMMA A - | LD LP DE RP COMMA A - | LD LB DE RB COMMA A - """ - p[0] = Asm(p.lineno(1), "LD " + "".join(x.replace("[", "(").replace("]", ")") for x in p[2:])) - - -def p_PROC(p): - """asm : PROC""" - p[0] = None # Start of a PROC scope - MEMORY.enter_proc(p.lineno(1)) - - -def p_ENDP(p): - """asm : ENDP""" - p[0] = None # End of a PROC scope - MEMORY.exit_proc(p.lineno(1)) - + def endp_scope(self, items): + MEMORY.exit_proc(items[0].line) -def p_LOCAL(p): - """asm : LOCAL id_list""" - p[0] = None - for label, line in p[2]: - __DEBUG__("Setting label '%s' as local at line %i" % (label, line)) + def local_labels(self, items): + for label, line in items[1]: + MEMORY.set_label(label, line, local=True) - MEMORY.set_label(label, line, local=True) + def idlist(self, items): + return (Container(items[0], items[0].line),) + def idlist_id(self, items): + return items[0] + (Container(items[2], items[2].line),) -def p_idlist(p): - """id_list : ID""" - p[0] = (Container(p[1], p.lineno(1)),) + def defb_op(self, items): + return Asm(items[0].line, "DEFB", items[1]) + def defs_op(self, items): + num_list = items[1] + if len(num_list) > 2: + error(items[0].line, "too many arguments for DEFS") + if len(num_list) < 2: + num = Expr.makenode(Container(0, items[0].line)) + num_list = num_list + (num,) + return Asm(items[0].line, "DEFS", num_list) -def p_idlist_id(p): - """id_list : id_list COMMA ID""" - p[0] = p[1] + (Container(p[3], p.lineno(3)),) + def defw_op(self, items): + return Asm(items[0].line, "DEFW", items[1]) + def expr_list_from_string(self, items): + return tuple(Expr.makenode(Container(ord(x), items[0].line)) for x in items[0]) -def p_DEFB(p): # Define bytes - """asm : DEFB expr_list""" - p[0] = Asm(p.lineno(1), "DEFB", p[2]) + def expr_list_from_num(self, items): + return (items[0],) + def expr_list_plus_expr(self, items): + return items[0] + (items[2],) -def p_DEFS(p): # Define bytes - """asm : DEFS number_list""" - if len(p[2]) > 2: - error(p.lineno(1), "too many arguments for DEFS") + def expr_list_plus_string(self, items): + return items[0] + tuple(Expr.makenode(Container(ord(x), items[2].line)) for x in items[2]) - if len(p[2]) < 2: - num = Expr.makenode(Container(0, p.lineno(1))) # Defaults to 0 - p[2] = p[2] + (num,) + def number_list(self, items): + return (items[0],) - p[0] = Asm(p.lineno(1), "DEFS", p[2]) + def number_list_number(self, items): + return items[0] + (items[2],) + def asm_ldind_r8(self, items): + return Asm(items[0].line, "LD %s,%s" % (items[1][0], items[3]), items[1][1]) -def p_DEFW(p): # Define words - """asm : DEFW number_list""" - p[0] = Asm(p.lineno(1), "DEFW", p[2]) - - -def p_expr_list_from_string(p): - """expr_list : STRING""" - p[0] = tuple(Expr.makenode(Container(ord(x), p.lineno(1))) for x in p[1]) - - -def p_expr_list_from_num(p): - """expr_list : expr - | pexpr - """ - p[0] = (p[1],) + def asm_ldr8_ind(self, items): + return Asm(items[0].line, "LD %s,%s" % (items[1], items[3][0]), items[3][1]) + def reg8_hl(self, items): + return "(HL)" -def p_expr_list_plus_expr(p): - """expr_list : expr_list COMMA expr - | expr_list COMMA pexpr - """ - p[0] = p[1] + (p[3],) - - -def p_expr_list_plus_string(p): - """expr_list : expr_list COMMA STRING""" - p[0] = p[1] + tuple(Expr.makenode(Container(ord(x), p.lineno(3))) for x in p[3]) - - -def p_number_list(p): - """number_list : expr - | pexpr - """ - p[0] = (p[1],) - - -def p_number_list_number(p): - """number_list : number_list COMMA expr - | number_list COMMA pexpr - """ - p[0] = p[1] + (p[3],) - - -def p_asm_ldind_r8(p): - """asm : LD reg8_I COMMA reg8 - | LD reg8_I COMMA A - """ - p[0] = Asm(p.lineno(1), "LD %s,%s" % (p[2][0], p[4]), p[2][1]) - - -def p_asm_ldr8_ind(p): - """asm : LD reg8 COMMA reg8_I - | LD A COMMA reg8_I - """ - p[0] = Asm(p.lineno(1), "LD %s,%s" % (p[2], p[4][0]), p[4][1]) - - -def p_reg8_hl(p): - """reg8_hl : LP HL RP - | LB HL RB - """ - p[0] = "(HL)" - - -def p_ind8_I(p): - """reg8_I : LP IX expr RP - | LP IY expr RP - | LP IX PLUS pexpr RP - | LP IX MINUS pexpr RP - | LP IY PLUS pexpr RP - | LP IY MINUS pexpr RP - | LB IX expr RB - | LB IY expr RB - | LB IX PLUS pexpr RB - | LB IX MINUS pexpr RB - | LB IY PLUS pexpr RB - | LB IY MINUS pexpr RB - """ - if len(p) == 6: - expr = p[4] - sign = p[3] - else: - expr = p[3] - gen_ = expr.inorder() - first_expr = next(gen_, "") - if first_expr and first_expr.parent: - if len(first_expr.parent.children) == 2: - first_token = first_expr.symbol.item - else: - first_token = first_expr.parent.symbol.item + def ind8_i(self, items): + if len(items) == 5: + expr = items[3] + sign = items[2] else: - first_token = "" - if first_token not in ("-", "+"): - error(p.lineno(2), f"Unexpected token '{first_token}'. Expected '+' or '-'") - sign = "+" - - if sign == "-": - expr = Expr.makenode(Container(sign, p.lineno(2)), expr) - - p[0] = ("(%s+N)" % p[2], expr) - - -def p_ex_af_af(p): - """asm : EX AF COMMA AF APO""" - p[0] = Asm(p.lineno(1), "EX AF,AF'") - - -def p_ex_de_hl(p): - """asm : EX DE COMMA HL""" - p[0] = Asm(p.lineno(1), "EX DE,HL") - - -def p_org(p): - """asm : ORG expr - | ORG pexpr - """ - MEMORY.set_org(p[2].eval(), p.lineno(1)) - + expr = items[2] + gen_ = expr.inorder() + first_expr = next(gen_, "") + if first_expr and first_expr.parent: + if len(first_expr.parent.children) == 2: + first_token = first_expr.symbol.item + else: + first_token = first_expr.parent.symbol.item + else: + first_token = "" + if first_token not in ("-", "+"): + error(items[1].line, f"Unexpected token '{first_token}'. Expected '+' or '-'") + sign = "+" -def p_namespace(p): - """asm : NAMESPACE ID""" + if sign == "-": + expr = Expr.makenode(Container(sign, items[1].line), expr) - asm_gl.NAMESPACE = asm_gl.normalize_namespace(p[2]) - __DEBUG__("Setting namespace to " + (asm_gl.NAMESPACE or DOT), level=1) + return ("(%s+N)" % items[1], expr) + def ex_af_af(self, items): + return Asm(items[0].line, "EX AF,AF'") -def p_push_namespace(p): - """asm : PUSH NAMESPACE - | PUSH NAMESPACE ID - """ + def ex_de_hl(self, items): + return Asm(items[0].line, "EX DE,HL") - asm_gl.NAMESPACE_STACK.append(asm_gl.NAMESPACE) - asm_gl.NAMESPACE = asm_gl.normalize_namespace(p[3] if len(p) == 4 else asm_gl.NAMESPACE) + def org(self, items): + MEMORY.set_org(items[1].eval(), items[0].line) - if asm_gl.NAMESPACE != asm_gl.NAMESPACE_STACK[-1]: + def namespace(self, items): + asm_gl.NAMESPACE = asm_gl.normalize_namespace(items[1]) __DEBUG__("Setting namespace to " + (asm_gl.NAMESPACE or DOT), level=1) + def push_namespace(self, items): + asm_gl.NAMESPACE_STACK.append(asm_gl.NAMESPACE) + asm_gl.NAMESPACE = asm_gl.normalize_namespace(items[2] if len(items) == 3 else asm_gl.NAMESPACE) + if asm_gl.NAMESPACE != asm_gl.NAMESPACE_STACK[-1]: + __DEBUG__("Setting namespace to " + (asm_gl.NAMESPACE or DOT), level=1) -def p_pop_namespace(p): - """asm : POP NAMESPACE""" - - if not asm_gl.NAMESPACE_STACK: - error(p.lineno(2), f"Stack underflow. No more Namespaces to pop. Current namespace is {asm_gl.NAMESPACE}") - else: - asm_gl.NAMESPACE = asm_gl.NAMESPACE_STACK.pop() - - -def p_align(p): - """asm : ALIGN expr - | ALIGN pexpr - """ - align = p[2].eval() - if align < 2: - error(p.lineno(1), "ALIGN value must be greater than 1") - return - - MEMORY.set_org(MEMORY.org + (align - MEMORY.org % align) % align, p.lineno(1)) - - -def p_incbin(p): - """asm : INCBIN STRING - | INCBIN STRING COMMA expr - | INCBIN STRING COMMA expr COMMA expr - """ - - try: - fname = zxbpp.search_filename(p[2], p.lineno(2), local_first=True) - if not fname: - p[0] = None - return - - with src.api.utils.open_file(fname, "rb") as f: - filecontent = f.read() - - except IOError: - error(p.lineno(2), "cannot read file '%s'" % p[2]) - p[0] = None - return - - offset = 0 - length = None - - if len(p) > 4: - offset = p[4].eval() - - if len(p) > 6: - length = p[6].eval() - if length < 1: - error(p.lineno(5), "INCBIN length must be greater than 0") - - if offset < 0: - offset = len(filecontent) + offset - if offset < 0 or offset >= len(filecontent): - error(p.lineno(4), "INCBIN offset is out of range") - - if length is None: - length = len(filecontent) - offset - - if offset + length > len(filecontent): - excess = len(filecontent) - (offset + length) - warning(p.lineno(5), f"INCBIN length if beyond file length by {excess} bytes") - - filecontent = filecontent[offset : offset + length] - p[0] = Asm(p.lineno(1), "DEFB", filecontent) - - -def p_ex_sp_reg8(p): - """asm : EX LP SP RP COMMA reg16i - | EX LB SP RB COMMA reg16i - | EX LP SP RP COMMA HL - | EX LB SP RB COMMA HL - """ - p[0] = Asm(p.lineno(1), "EX (SP)," + p[6]) - - -def p_incdec(p): - """asm : INC inc_reg - | DEC inc_reg - """ - p[0] = Asm(p.lineno(1), "%s %s" % (p[1], p[2])) - - -def p_incdeci(p): - """asm : INC reg8_I - | DEC reg8_I - """ - p[0] = Asm(p.lineno(1), "%s %s" % (p[1], p[2][0]), p[2][1]) - - -def p_LD_reg_val(p): - """asm : LD reg8 COMMA expr - | LD reg8 COMMA pexpr - | LD reg16 COMMA expr - | LD reg8_hl COMMA expr - | LD A COMMA expr - | LD SP COMMA expr - | LD reg8i COMMA expr - """ - s = "LD %s,N" % p[2] - if p[2] in REGS16: - s += "N" - - p[0] = Asm(p.lineno(1), s, p[4]) - - -def p_LD_regI_val(p): - """asm : LD reg8_I COMMA expr""" - p[0] = Asm(p.lineno(1), "LD %s,N" % p[2][0], (p[2][1], p[4])) - - -def p_JP_hl(p): - """asm : JP reg8_hl - | JP LP reg16i RP - | JP LB reg16i RB - """ - s = "JP " - if p[2] == "(HL)": - s += p[2] - else: - s += "(%s)" % p[3] - - p[0] = Asm(p.lineno(1), s) - - -def p_SBCADD(p): - """asm : SBC A COMMA reg8 - | SBC A COMMA reg8i - | SBC A COMMA A - | SBC A COMMA reg8_hl - | SBC HL COMMA SP - | SBC HL COMMA BC - | SBC HL COMMA DE - | SBC HL COMMA HL - | ADD A COMMA reg8 - | ADD A COMMA reg8i - | ADD A COMMA A - | ADD A COMMA reg8_hl - | ADC A COMMA reg8 - | ADC A COMMA reg8i - | ADC A COMMA A - | ADC A COMMA reg8_hl - | ADD HL COMMA BC - | ADD HL COMMA DE - | ADD HL COMMA HL - | ADD HL COMMA SP - | ADC HL COMMA BC - | ADC HL COMMA DE - | ADC HL COMMA HL - | ADC HL COMMA SP - | ADD reg16i COMMA BC - | ADD reg16i COMMA DE - | ADD reg16i COMMA HL - | ADD reg16i COMMA SP - | ADD reg16i COMMA reg16i - """ - p[0] = Asm(p.lineno(1), "%s %s,%s" % (p[1], p[2], p[4])) - - -def p_arith_A_expr(p): - """asm : SBC A COMMA expr - | SBC A COMMA pexpr - | ADD A COMMA expr - | ADD A COMMA pexpr - | ADC A COMMA expr - | ADC A COMMA pexpr - """ - p[0] = Asm(p.lineno(1), "%s A,N" % p[1], p[4]) - - -def p_arith_A_regI(p): - """asm : SBC A COMMA reg8_I - | ADD A COMMA reg8_I - | ADC A COMMA reg8_I - """ - p[0] = Asm(p.lineno(1), "%s A,%s" % (p[1], p[4][0]), p[4][1]) - - -def p_bitwiseop_reg(p): - """asm : bitwiseop reg8 - | bitwiseop reg8i - | bitwiseop A - | bitwiseop reg8_hl - """ - p[0] = Asm(p[1][1], "%s %s" % (p[1][0], p[2])) - - -def p_bitwiseop_regI(p): - """asm : bitwiseop reg8_I""" - p[0] = Asm(p[1][1], "%s %s" % (p[1][0], p[2][0]), p[2][1]) - - -def p_bitwise_expr(p): - """asm : bitwiseop expr - | bitwiseop pexpr - """ - p[0] = Asm(p[1][1], "%s N" % p[1][0], p[2]) - - -def p_bitwise(p): - """bitwiseop : OR - | AND - | XOR - | SUB - | CP - """ - p[0] = (p[1], p.lineno(1)) - - -def p_PUSH_POP(p): - """asm : PUSH AF - | PUSH reg16 - | POP AF - | POP reg16 - """ - p[0] = Asm(p.lineno(1), "%s %s" % (p[1], p[2])) - - -def p_LD_addr_reg(p): # Load address,reg - """asm : LD pexpr COMMA A - | LD pexpr COMMA reg16 - | LD pexpr COMMA SP - | LD mem_indir COMMA A - | LD mem_indir COMMA reg16 - | LD mem_indir COMMA SP - """ - p[0] = Asm(p.lineno(1), "LD (NN),%s" % p[4], p[2]) - - -def p_LD_reg_addr(p): # Load address,reg - """asm : LD A COMMA pexpr - | LD reg16 COMMA pexpr - | LD SP COMMA pexpr - | LD A COMMA mem_indir - | LD reg16 COMMA mem_indir - | LD SP COMMA mem_indir - """ - p[0] = Asm(p.lineno(1), "LD %s,(NN)" % p[2], p[4]) - - -def p_ROTATE(p): - """asm : rotation reg8 - | rotation reg8_hl - | rotation A - """ - p[0] = Asm(p[1][1], "%s %s" % (p[1][0], p[2])) - - -def p_ROTATE_ix(p): - """asm : rotation reg8_I""" - p[0] = Asm(p[1][1], "%s %s" % (p[1][0], p[2][0]), p[2][1]) - - -def p_BIT(p): - """asm : bitop expr COMMA A - | bitop pexpr COMMA A - | bitop expr COMMA reg8 - | bitop pexpr COMMA reg8 - | bitop expr COMMA reg8_hl - | bitop pexpr COMMA reg8_hl - """ - bit = p[2].eval() - if bit < 0 or bit > 7: - error(p.lineno(3), "Invalid bit position %i. Must be in [0..7]" % bit) - p[0] = None - return - - p[0] = Asm(p.lineno(3), "%s %i,%s" % (p[1], bit, p[4])) - - -def p_BIT_ix(p): - """asm : bitop expr COMMA reg8_I - | bitop pexpr COMMA reg8_I - """ - bit = p[2].eval() - if bit < 0 or bit > 7: - error(p.lineno(3), "Invalid bit position %i. Must be in [0..7]" % bit) - p[0] = None - return - - p[0] = Asm(p.lineno(3), "%s %i,%s" % (p[1], bit, p[4][0]), p[4][1]) - - -def p_bitop(p): - """bitop : BIT - | RES - | SET - """ - p[0] = p[1] - - -def p_rotation(p): - """rotation : RR - | RL - | RRC - | RLC - | SLA - | SLL - | SRA - | SRL - """ - p[0] = (p[1], p.lineno(1)) - - -def p_reg_inc(p): # INC/DEC registers and (HL) - """inc_reg : SP - | reg8 - | reg16 - | reg8_hl - | A - | reg8i - """ - p[0] = p[1] + def pop_namespace(self, items): + if not asm_gl.NAMESPACE_STACK: + error(items[1].line, f"Stack underflow. No more Namespaces to pop. Current namespace is {asm_gl.NAMESPACE}") + else: + asm_gl.NAMESPACE = asm_gl.NAMESPACE_STACK.pop() + + def align(self, items): + align = items[1].eval() + if align < 2: + error(items[0].line, "ALIGN value must be greater than 1") + return None + MEMORY.set_org(MEMORY.org + (align - MEMORY.org % align) % align, items[0].line) + return None + + def incbin(self, items): + try: + fname = zxbpp.search_filename(items[1], items[1].line, local_first=True) + if not fname: + return None + with src.api.utils.open_file(fname, "rb") as f: + filecontent = f.read() + except IOError: + error(items[1].line, "cannot read file '%s'" % items[1]) + return None + + offset = 0 + length = None + + if len(items) > 3: + offset = items[3].eval() + + if len(items) > 5: + length = items[5].eval() + if length < 1: + error(items[0].line, "INCBIN length must be greater than 0") + + if offset < 0: + offset = len(filecontent) + offset + if offset < 0 or offset >= len(filecontent): + error(items[0].line, "INCBIN offset is out of range") + + if length is None: + length = len(filecontent) - offset + + if offset + length > len(filecontent): + excess = len(filecontent) - (offset + length) + warning(items[0].line, f"INCBIN length if beyond file length by {excess} bytes") + + filecontent = filecontent[offset : offset + length] + return Asm(items[0].line, "DEFB", filecontent) + + def ex_sp_reg8(self, items): + return Asm(items[0].line, "EX (SP)," + items[5]) + + def incdec(self, items): + return Asm(items[0].line, "%s %s" % (items[0], items[1])) + + def incdeci(self, items): + return Asm(items[0].line, "%s %s" % (items[0], items[1][0]), items[1][1]) + + def ld_reg_val(self, items): + s = "LD %s,N" % items[1] + if items[1] in REGS16: + s += "N" + return Asm(items[0].line, s, items[3]) + + def ld_reg_val_i(self, items): + return Asm(items[0].line, "LD %s,N" % items[1][0], (items[1][1], items[3])) + + def jp_hl(self, items): + s = "JP " + if items[1] == "(HL)": + s += items[1] + else: + s += "(%s)" % items[2] + return Asm(items[0].line, s) + def sbcadd(self, items): + return Asm(items[0].line, "%s %s,%s" % (items[0], items[1], items[3])) -def p_reg8(p): - """reg8 : H - | L - | regBCDE - """ - p[0] = p[1] + def arith_a_expr(self, items): + return Asm(items[0].line, "%s A,N" % items[0], items[3]) + def arith_a_reg_i(self, items): + return Asm(items[0].line, "%s A,%s" % (items[0], items[3][0]), items[3][1]) -def p_regBCDE(p): - """regBCDE : B - | C - | D - | E - """ - p[0] = p[1] + def bitwiseop_reg(self, items): + return Asm(items[0][1], "%s %s" % (items[0][0], items[1])) + def bitwiseop_reg_i(self, items): + return Asm(items[0][1], "%s %s" % (items[0][0], items[1][0]), items[1][1]) -def p_reg8i(p): - """reg8i : IXH - | IXL - | IYH - | IYL - """ - p[0] = p[1] + def bitwise_expr(self, items): + return Asm(items[0][1], "%s N" % items[0][0], items[1]) + def bitwise(self, items): + return (items[0], items[0].line) -def p_reg16(p): - """reg16 : BC - | DE - | HL - | reg16i - """ - p[0] = p[1] + def push_pop(self, items): + return Asm(items[0].line, "%s %s" % (items[0], items[1])) + def ld_addr_reg(self, items): + return Asm(items[0].line, "LD (NN),%s" % items[3], items[1]) -def p_reg16i(p): - """reg16i : IX - | IY - """ - p[0] = p[1] - - -def p_jp(p): - """asm : JP jp_flags COMMA expr - | JP jp_flags COMMA pexpr - | CALL jp_flags COMMA expr - | CALL jp_flags COMMA pexpr - """ - p[0] = Asm(p.lineno(1), "%s %s,NN" % (p[1], p[2]), p[4]) - + def ld_reg_addr(self, items): + return Asm(items[0].line, "LD %s,(NN)" % items[1], items[3]) -def p_ret(p): - """asm : RET jp_flags""" - p[0] = Asm(p.lineno(1), "RET %s" % p[2]) + def rotate(self, items): + return Asm(items[0][1], "%s %s" % (items[0][0], items[1])) + def rotate_ix(self, items): + return Asm(items[0][1], "%s %s" % (items[0][0], items[1][0]), items[1][1]) -def p_jpflags_other(p): - """jp_flags : P - | M - | PO - | PE - | jr_flags - """ - p[0] = p[1] + def bit(self, items): + bit = items[1].eval() + if bit < 0 or bit > 7: + error(items[2].line, "Invalid bit position %i. Must be in [0..7]" % bit) + return None + return Asm(items[2].line, "%s %i,%s" % (items[0], bit, items[3])) + def bit_ix(self, items): + bit = items[1].eval() + if bit < 0 or bit > 7: + error(items[2].line, "Invalid bit position %i. Must be in [0..7]" % bit) + return None + return Asm(items[2].line, "%s %i,%s" % (items[0], bit, items[3][0]), items[3][1]) -def p_jr(p): - """asm : JR jr_flags COMMA expr - | JR jr_flags COMMA pexpr - """ - p[4] = Expr.makenode(Container("-", p.lineno(3)), p[4], Expr.makenode(Container(MEMORY.org + 2, p.lineno(1)))) - p[0] = Asm(p.lineno(1), "JR %s,N" % p[2], p[4]) + def bitop(self, items): + return items[0] + def rotation(self, items): + return (items[0], items[0].line) -def p_jr_flags(p): - """jr_flags : Z - | C - | NZ - | NC - """ - p[0] = p[1] - - -def p_jrjp(p): - """asm : JP expr - | JR expr - | CALL expr - | DJNZ expr - | JP pexpr - | JR pexpr - | CALL pexpr - | DJNZ pexpr - """ - if p[1] in ("JR", "DJNZ"): - op = "N" - p[2] = Expr.makenode(Container("-", p.lineno(1)), p[2], Expr.makenode(Container(MEMORY.org + 2, p.lineno(1)))) - else: - op = "NN" + def reg_inc(self, items): + return items[0] - p[0] = Asm(p.lineno(1), p[1] + " " + op, p[2]) + def reg8(self, items): + return items[0] + def reg_bcde(self, items): + return items[0] -def p_rst(p): - """asm : RST expr""" - val = p[2].eval() + def reg8i(self, items): + return items[0] - if val not in (0, 8, 16, 24, 32, 40, 48, 56): - error(p.lineno(1), "Invalid RST number %i" % val) - p[0] = None - return + def reg16(self, items): + return items[0] - p[0] = Asm(p.lineno(1), "RST %XH" % val) + def reg16i(self, items): + return items[0] + def jp(self, items): + return Asm(items[0].line, "%s %s,NN" % (items[0], items[1]), items[3]) -def p_im(p): - """asm : IM expr""" - val = p[2].eval() - if val not in (0, 1, 2): - error(p.lineno(1), "Invalid IM number %i" % val) - p[0] = None - return + def ret(self, items): + return Asm(items[0].line, "RET %s" % items[1]) - p[0] = Asm(p.lineno(1), "IM %i" % val) + def jpflags_other(self, items): + return items[0] + def jr(self, items): + expr = Expr.makenode( + Container("-", items[2].line), items[3], Expr.makenode(Container(MEMORY.org + 2, items[0].line)) + ) + return Asm(items[0].line, "JR %s,N" % items[1], expr) -def p_in(p): - """asm : IN A COMMA LP C RP - | IN A COMMA LB C RB - | IN reg8 COMMA LP C RP - | IN reg8 COMMA LB C RB - """ - p[0] = Asm(p.lineno(1), "IN %s,(C)" % p[2]) + def jr_flags(self, items): + return items[0] + def jrjp(self, items): + if items[0] in ("JR", "DJNZ"): + op = "N" + expr = Expr.makenode( + Container("-", items[0].line), items[1], Expr.makenode(Container(MEMORY.org + 2, items[0].line)) + ) + else: + op = "NN" + expr = items[1] + return Asm(items[0].line, items[0] + " " + op, expr) -def p_out(p): - """asm : OUT LP C RP COMMA A - | OUT LB C RB COMMA A - | OUT LP C RP COMMA reg8 - | OUT LB C RB COMMA reg8 - """ - p[0] = Asm(p.lineno(1), "OUT (C),%s" % p[6]) + def rst(self, items): + val = items[1].eval() + if val not in (0, 8, 16, 24, 32, 40, 48, 56): + error(items[0].line, "Invalid RST number %i" % val) + return None + return Asm(items[0].line, "RST %XH" % val) + def im(self, items): + val = items[1].eval() + if val not in (0, 1, 2): + error(items[0].line, "Invalid IM number %i" % val) + return None + return Asm(items[0].line, "IM %i" % val) -def p_in_expr(p): - """asm : IN A COMMA mem_indir - | IN A COMMA pexpr - """ - p[0] = Asm(p.lineno(1), "IN A,(N)", p[4]) + def in_op(self, items): + return Asm(items[0].line, "IN %s,(C)" % items[1]) + def out_op(self, items): + return Asm(items[0].line, "OUT (C),%s" % items[5]) -def p_out_expr(p): - """asm : OUT mem_indir COMMA A - | OUT pexpr COMMA A - """ - p[0] = Asm(p.lineno(1), "OUT (N),A", p[2]) - - -def p_single(p): - """asm : NOP - | EXX - | CCF - | SCF - | LDIR - | LDI - | LDDR - | LDD - | CPIR - | CPI - | CPDR - | CPD - | DAA - | NEG - | CPL - | HALT - | EI - | DI - | OUTD - | OUTI - | OTDR - | OTIR - | IND - | INI - | INDR - | INIR - | RET - | RETI - | RETN - | RLA - | RLCA - | RRA - | RRCA - | RLD - | RRD - """ - p[0] = Asm(p.lineno(1), p[1]) # Single instruction - - -def p_expr_div_expr(p): - """expr : expr BAND expr - | expr BOR expr - | expr BXOR expr - | expr PLUS expr - | expr MINUS expr - | expr MUL expr - | expr DIV expr - | expr MOD expr - | expr POW expr - | expr LSHIFT expr - | expr RSHIFT expr - | pexpr BAND expr - | pexpr BOR expr - | pexpr BXOR expr - | pexpr PLUS expr - | pexpr MINUS expr - | pexpr MUL expr - | pexpr DIV expr - | pexpr MOD expr - | pexpr POW expr - | pexpr LSHIFT expr - | pexpr RSHIFT expr - | expr BAND pexpr - | expr BOR pexpr - | expr BXOR pexpr - | expr PLUS pexpr - | expr MINUS pexpr - | expr MUL pexpr - | expr DIV pexpr - | expr MOD pexpr - | expr POW pexpr - | expr LSHIFT pexpr - | expr RSHIFT pexpr - | pexpr BAND pexpr - | pexpr BOR pexpr - | pexpr BXOR pexpr - | pexpr PLUS pexpr - | pexpr MINUS pexpr - | pexpr MUL pexpr - | pexpr DIV pexpr - | pexpr MOD pexpr - | pexpr POW pexpr - | pexpr LSHIFT pexpr - | pexpr RSHIFT pexpr - """ - p[0] = Expr.makenode(Container(p[2], p.lineno(2)), p[1], p[3]) + def in_expr(self, items): + return Asm(items[0].line, "IN A,(N)", items[3]) + def out_expr(self, items): + return Asm(items[0].line, "OUT (N),A", items[1]) -def p_expr_lprp(p): - """pexpr : LP expr RP - | LP pexpr RP - """ - p[0] = p[2] + def single(self, items): + return Asm(items[0].line, items[0]) + def mul_d_e(self, items): + return Asm(items[0].line, "MUL D,E") -def p_mem_indir(p): - """mem_indir : LB expr RB""" - p[0] = p[2] + def simple_instruction(self, items): + return Asm(items[0].line, items[0]) + def add_reg16_a(self, items): + return Asm(items[0].line, f"ADD {items[1]},A") -def p_expr_uminus(p): - """expr : MINUS expr %prec UMINUS - | PLUS expr %prec UMINUS - | MINUS pexpr %prec UMINUS - | PLUS pexpr %prec UMINUS - """ - p[0] = Expr.makenode(Container(p[1], p.lineno(1)), p[2]) + def jp_c(self, items): + return Asm(items[0].line, "JP (C)") + def bxxxx_de_b(self, items): + return Asm(items[0].line, f"{items[0]} DE,B") -def p_expr_int(p): - """expr : INTEGER""" - p[0] = Expr.makenode(Container(int(p[1]), p.lineno(1))) + def add_reg_nn(self, items): + return Asm(items[0].line, f"ADD {items[1]},NN", items[3]) + def test_nn(self, items): + return Asm(items[0].line, "TEST N", items[1]) -def p_expr_label(p): - """expr : ID""" - p[0] = Expr.makenode(Container(MEMORY.get_label(p[1], p.lineno(1)), p.lineno(1))) + def nextreg_expr(self, items): + return Asm(items[0].line, "NEXTREG N,N", (items[1], items[3])) + def nextreg_a(self, items): + return Asm(items[0].line, "NEXTREG N,A", items[1]) -def p_expr_paren(p): - """expr : LPP expr RPP""" - p[0] = p[2] + def push_imm(self, items): + mknod = Expr.makenode + cont = lambda x: Container(x, items[0].line) + ff = mknod(cont(0xFF)) + n8 = mknod(cont(8)) + expr = mknod( + cont("|"), + mknod(cont("<<"), mknod(cont("&"), items[1], ff), n8), + mknod(cont("&"), mknod(cont(">>"), items[1], n8), ff), + ) + return Asm(items[0].line, "PUSH NN", expr) + def expr_div_expr(self, items): + return Expr.makenode(Container(items[1], items[1].line), items[0], items[2]) -def p_expr_addr(p): - """expr : ADDR""" - # The current instruction address - p[0] = Expr.makenode(Container(MEMORY.org, p.lineno(1))) + def expr_add_minus_expr(self, items): + return Expr.makenode(Container(items[1], items[1].line), items[0], items[2]) + def expr_lprp(self, items): + return items[1] -# Some preprocessor directives -def p_preprocessor_line(p): - """line : preproc_line""" - p[0] = None + def mem_indir(self, items): + return items[1] + def expr_uminus(self, items): + return Expr.makenode(Container(items[0], items[0].line), items[1]) -def p_preproc_line_init(p): - """preproc_line : _INIT STRING""" - INITS.append(Container(p[2].strip('"'), p.lineno(2))) + def expr_uplus(self, items): + return Expr.makenode(Container(items[0], items[0].line), items[1]) + def expr_int(self, items): + return Expr.makenode(Container(int(items[0]), items[0].line)) -# --- YYERROR + def expr_label(self, items): + return Expr.makenode(Container(MEMORY.get_label(items[0], items[0].line), items[0].line)) + def expr_paren(self, items): + return items[1] -def p_error(p): - if p is not None: - if p.type != "NEWLINE": - error(p.lineno, "Syntax error. Unexpected token '%s' [%s]" % (p.value, p.type)) - else: - error(p.lineno, "Syntax error. Unexpected end of line [NEWLINE]") - else: - OPTIONS.stderr.write("General syntax error at assembler (unexpected End of File?)") - gl.has_errors += 1 + def expr_addr(self, items): + return Expr.makenode(Container(MEMORY.org, items[0].line)) def assemble(input_): @@ -1005,7 +531,42 @@ def assemble(input_): else: parser_ = parser - parser_.parse(input_, lexer=LEXER, debug=OPTIONS.debug_level > 1) + logical_lines = [] + current_buffer = [] + raw_lines = input_.splitlines() + for line in raw_lines: + current_buffer.append(line) + if line.rstrip(" \t").endswith("\\"): + continue + else: + logical_lines.append("\n".join(current_buffer)) + current_buffer = [] + if current_buffer: + logical_lines.append("\n".join(current_buffer)) + + current_lineno = 1 + for line in logical_lines: + LEXER.input(line + "\n") + LEXER.lineno = current_lineno + try: + parser_.parse(LEXER) + current_lineno = LEXER.lineno + except UnexpectedInput as e: + from .asmparse_standalone import UnexpectedToken + + if isinstance(e, UnexpectedToken): + tok = e.token + if tok.type == "$END": + OPTIONS.stderr.write("General syntax error at assembler (unexpected End of File?)") + gl.has_errors += 1 + elif tok.type == "NEWLINE": + error(current_lineno, "Syntax error. Unexpected end of line [NEWLINE]") + else: + error(current_lineno, "Syntax error. Unexpected token '%s' [%s]" % (tok.value, tok.type)) + else: + error(current_lineno, f"Syntax error at line {current_lineno}, column {e.column}") + current_lineno += line.count("\n") + 1 + if len(MEMORY.scopes): error(MEMORY.scopes[-1], "Missing ENDP to close this scope") @@ -1095,11 +656,6 @@ def main(argv): generate_binary(OPTIONS.output_filename, OPTIONS.output_file_type) -# Z80 only ASM parser -parser = src.api.utils.get_or_create("asmparse", lambda: yacc.yacc(start="start", debug=True)) - -# needed for ply -from .zxnext import * # noqa +parser = BaseLarkStandAlone(lexer=AsmLarkLexerAdapter, transformer=AsmTransformer()) -# ZXNEXT extended Opcodes parser -zxnext_parser = src.api.utils.get_or_create("zxnext_asmparse", lambda: yacc.yacc(start="start", debug=True)) +zxnext_parser = ZXNextLarkStandAlone(lexer=AsmLarkLexerAdapter, transformer=AsmTransformer()) diff --git a/src/zxbasm/asmparse_standalone.py b/src/zxbasm/asmparse_standalone.py new file mode 100644 index 000000000..236367a20 --- /dev/null +++ b/src/zxbasm/asmparse_standalone.py @@ -0,0 +1,3574 @@ +# The file was automatically generated by Lark v1.3.1 +__version__ = "1.3.1" + +# +# +# Lark Stand-alone Generator Tool +# ---------------------------------- +# Generates a stand-alone LALR(1) parser +# +# Git: https://github.com/erezsh/lark +# Author: Erez Shinan (erezshin@gmail.com) +# +# +# >>> LICENSE +# +# This tool and its generated code use a separate license from Lark, +# and are subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. +# +# If you wish to purchase a commercial license for this tool and its +# generated code, you may contact me via email or otherwise. +# +# If MPL2 is incompatible with your free or open-source project, +# contact me and we'll work it out. +# +# + +from copy import deepcopy +from abc import ABC, abstractmethod +from types import ModuleType +from typing import ( + TypeVar, Generic, Type, Tuple, List, Dict, Iterator, Collection, Callable, Optional, FrozenSet, Any, + Union, Iterable, IO, TYPE_CHECKING, overload, Sequence, + Pattern as REPattern, ClassVar, Set, Mapping +) + + +class LarkError(Exception): + pass + + +class ConfigurationError(LarkError, ValueError): + pass + + +def assert_config(value, options: Collection, msg='Got %r, expected one of %s'): + if value not in options: + raise ConfigurationError(msg % (value, options)) + + +class GrammarError(LarkError): + pass + + +class ParseError(LarkError): + pass + + +class LexError(LarkError): + pass + +T = TypeVar('T') + +class UnexpectedInput(LarkError): + #-- + line: int + column: int + pos_in_stream = None + state: Any + _terminals_by_name = None + interactive_parser: 'InteractiveParser' + + def get_context(self, text: str, span: int=40) -> str: + #-- + pos = self.pos_in_stream or 0 + start = max(pos - span, 0) + end = pos + span + if not isinstance(text, bytes): + before = text[start:pos].rsplit('\n', 1)[-1] + after = text[pos:end].split('\n', 1)[0] + return before + after + '\n' + ' ' * len(before.expandtabs()) + '^\n' + else: + before = text[start:pos].rsplit(b'\n', 1)[-1] + after = text[pos:end].split(b'\n', 1)[0] + return (before + after + b'\n' + b' ' * len(before.expandtabs()) + b'^\n').decode("ascii", "backslashreplace") + + def match_examples(self, parse_fn: 'Callable[[str], Tree]', + examples: Union[Mapping[T, Iterable[str]], Iterable[Tuple[T, Iterable[str]]]], + token_type_match_fallback: bool=False, + use_accepts: bool=True + ) -> Optional[T]: + #-- + assert self.state is not None, "Not supported for this exception" + + if isinstance(examples, Mapping): + examples = examples.items() + + candidate = (None, False) + for i, (label, example) in enumerate(examples): + assert not isinstance(example, str), "Expecting a list" + + for j, malformed in enumerate(example): + try: + parse_fn(malformed) + except UnexpectedInput as ut: + if ut.state == self.state: + if ( + use_accepts + and isinstance(self, UnexpectedToken) + and isinstance(ut, UnexpectedToken) + and ut.accepts != self.accepts + ): + logger.debug("Different accepts with same state[%d]: %s != %s at example [%s][%s]" % + (self.state, self.accepts, ut.accepts, i, j)) + continue + if ( + isinstance(self, (UnexpectedToken, UnexpectedEOF)) + and isinstance(ut, (UnexpectedToken, UnexpectedEOF)) + ): + if ut.token == self.token: ## + + logger.debug("Exact Match at example [%s][%s]" % (i, j)) + return label + + if token_type_match_fallback: + ## + + if (ut.token.type == self.token.type) and not candidate[-1]: + logger.debug("Token Type Fallback at example [%s][%s]" % (i, j)) + candidate = label, True + + if candidate[0] is None: + logger.debug("Same State match at example [%s][%s]" % (i, j)) + candidate = label, False + + return candidate[0] + + def _format_expected(self, expected): + if self._terminals_by_name: + d = self._terminals_by_name + expected = [d[t_name].user_repr() if t_name in d else t_name for t_name in expected] + return "Expected one of: \n\t* %s\n" % '\n\t* '.join(expected) + + +class UnexpectedEOF(ParseError, UnexpectedInput): + #-- + expected: 'List[Token]' + + def __init__(self, expected, state=None, terminals_by_name=None): + super(UnexpectedEOF, self).__init__() + + self.expected = expected + self.state = state + from .lexer import Token + self.token = Token("", "") ## + + self.pos_in_stream = -1 + self.line = -1 + self.column = -1 + self._terminals_by_name = terminals_by_name + + + def __str__(self): + message = "Unexpected end-of-input. " + message += self._format_expected(self.expected) + return message + + +class UnexpectedCharacters(LexError, UnexpectedInput): + #-- + + allowed: Set[str] + considered_tokens: Set[Any] + + def __init__(self, seq, lex_pos, line, column, allowed=None, considered_tokens=None, state=None, token_history=None, + terminals_by_name=None, considered_rules=None): + super(UnexpectedCharacters, self).__init__() + + ## + + self.line = line + self.column = column + self.pos_in_stream = lex_pos + self.state = state + self._terminals_by_name = terminals_by_name + + self.allowed = allowed + self.considered_tokens = considered_tokens + self.considered_rules = considered_rules + self.token_history = token_history + + if isinstance(seq, bytes): + self.char = seq[lex_pos:lex_pos + 1].decode("ascii", "backslashreplace") + else: + self.char = seq[lex_pos] + self._context = self.get_context(seq) + + + def __str__(self): + message = "No terminal matches '%s' in the current parser context, at line %d col %d" % (self.char, self.line, self.column) + message += '\n\n' + self._context + if self.allowed: + message += self._format_expected(self.allowed) + if self.token_history: + message += '\nPrevious tokens: %s\n' % ', '.join(repr(t) for t in self.token_history) + return message + + +class UnexpectedToken(ParseError, UnexpectedInput): + #-- + + expected: Set[str] + considered_rules: Set[str] + + def __init__(self, token, expected, considered_rules=None, state=None, interactive_parser=None, terminals_by_name=None, token_history=None): + super(UnexpectedToken, self).__init__() + + ## + + self.line = getattr(token, 'line', '?') + self.column = getattr(token, 'column', '?') + self.pos_in_stream = getattr(token, 'start_pos', None) + self.state = state + + self.token = token + self.expected = expected ## + + self._accepts = NO_VALUE + self.considered_rules = considered_rules + self.interactive_parser = interactive_parser + self._terminals_by_name = terminals_by_name + self.token_history = token_history + + + @property + def accepts(self) -> Set[str]: + if self._accepts is NO_VALUE: + self._accepts = self.interactive_parser and self.interactive_parser.accepts() + return self._accepts + + def __str__(self): + message = ("Unexpected token %r at line %s, column %s.\n%s" + % (self.token, self.line, self.column, self._format_expected(self.accepts or self.expected))) + if self.token_history: + message += "Previous tokens: %r\n" % self.token_history + + return message + + + +class VisitError(LarkError): + #-- + + obj: 'Union[Tree, Token]' + orig_exc: Exception + + def __init__(self, rule, obj, orig_exc): + message = 'Error trying to process rule "%s":\n\n%s' % (rule, orig_exc) + super(VisitError, self).__init__(message) + + self.rule = rule + self.obj = obj + self.orig_exc = orig_exc + + +class MissingVariableError(LarkError): + pass + + +import sys, re +import logging +from dataclasses import dataclass +from typing import Generic, AnyStr + +logger: logging.Logger = logging.getLogger("lark") +logger.addHandler(logging.StreamHandler()) +## + +## + +logger.setLevel(logging.CRITICAL) + + +NO_VALUE = object() + +T = TypeVar("T") + + +def classify(seq: Iterable, key: Optional[Callable] = None, value: Optional[Callable] = None) -> Dict: + d: Dict[Any, Any] = {} + for item in seq: + k = key(item) if (key is not None) else item + v = value(item) if (value is not None) else item + try: + d[k].append(v) + except KeyError: + d[k] = [v] + return d + + +def _deserialize(data: Any, namespace: Dict[str, Any], memo: Dict) -> Any: + if isinstance(data, dict): + if '__type__' in data: ## + + class_ = namespace[data['__type__']] + return class_.deserialize(data, memo) + elif '@' in data: + return memo[data['@']] + return {key:_deserialize(value, namespace, memo) for key, value in data.items()} + elif isinstance(data, list): + return [_deserialize(value, namespace, memo) for value in data] + return data + + +_T = TypeVar("_T", bound="Serialize") + +class Serialize: + #-- + + def memo_serialize(self, types_to_memoize: List) -> Any: + memo = SerializeMemoizer(types_to_memoize) + return self.serialize(memo), memo.serialize() + + def serialize(self, memo = None) -> Dict[str, Any]: + if memo and memo.in_types(self): + return {'@': memo.memoized.get(self)} + + fields = getattr(self, '__serialize_fields__') + res = {f: _serialize(getattr(self, f), memo) for f in fields} + res['__type__'] = type(self).__name__ + if hasattr(self, '_serialize'): + self._serialize(res, memo) + return res + + @classmethod + def deserialize(cls: Type[_T], data: Dict[str, Any], memo: Dict[int, Any]) -> _T: + namespace = getattr(cls, '__serialize_namespace__', []) + namespace = {c.__name__:c for c in namespace} + + fields = getattr(cls, '__serialize_fields__') + + if '@' in data: + return memo[data['@']] + + inst = cls.__new__(cls) + for f in fields: + try: + setattr(inst, f, _deserialize(data[f], namespace, memo)) + except KeyError as e: + raise KeyError("Cannot find key for class", cls, e) + + if hasattr(inst, '_deserialize'): + inst._deserialize() + + return inst + + +class SerializeMemoizer(Serialize): + #-- + + __serialize_fields__ = 'memoized', + + def __init__(self, types_to_memoize: List) -> None: + self.types_to_memoize = tuple(types_to_memoize) + self.memoized = Enumerator() + + def in_types(self, value: Serialize) -> bool: + return isinstance(value, self.types_to_memoize) + + def serialize(self) -> Dict[int, Any]: ## + + return _serialize(self.memoized.reversed(), None) + + @classmethod + def deserialize(cls, data: Dict[int, Any], namespace: Dict[str, Any], memo: Dict[Any, Any]) -> Dict[int, Any]: ## + + return _deserialize(data, namespace, memo) + + +try: + import regex + _has_regex = True +except ImportError: + _has_regex = False + +if sys.version_info >= (3, 11): + import re._parser as sre_parse + import re._constants as sre_constants +else: + import sre_parse + import sre_constants + +categ_pattern = re.compile(r'\\p{[A-Za-z_]+}') + +def get_regexp_width(expr: str) -> Union[Tuple[int, int], List[int]]: + if _has_regex: + ## + + ## + + ## + + regexp_final = re.sub(categ_pattern, 'A', expr) + else: + if re.search(categ_pattern, expr): + raise ImportError('`regex` module must be installed in order to use Unicode categories.', expr) + regexp_final = expr + try: + ## + + return [int(x) for x in sre_parse.parse(regexp_final).getwidth()] + except sre_constants.error: + if not _has_regex: + raise ValueError(expr) + else: + ## + + ## + + c = regex.compile(regexp_final) + ## + + ## + + MAXWIDTH = getattr(sre_parse, "MAXWIDTH", sre_constants.MAXREPEAT) + if c.match('') is None: + ## + + return 1, int(MAXWIDTH) + else: + return 0, int(MAXWIDTH) + + +@dataclass(frozen=True) +class TextSlice(Generic[AnyStr]): + #-- + text: AnyStr + start: int + end: int + + def __post_init__(self): + if not isinstance(self.text, (str, bytes)): + raise TypeError("text must be str or bytes") + + if self.start < 0: + object.__setattr__(self, 'start', self.start + len(self.text)) + assert self.start >=0 + + if self.end is None: + object.__setattr__(self, 'end', len(self.text)) + elif self.end < 0: + object.__setattr__(self, 'end', self.end + len(self.text)) + assert self.end <= len(self.text) + + @classmethod + def cast_from(cls, text: 'TextOrSlice') -> 'TextSlice[AnyStr]': + if isinstance(text, TextSlice): + return text + + return cls(text, 0, len(text)) + + def is_complete_text(self): + return self.start == 0 and self.end == len(self.text) + + def __len__(self): + return self.end - self.start + + def count(self, substr: AnyStr): + return self.text.count(substr, self.start, self.end) + + def rindex(self, substr: AnyStr): + return self.text.rindex(substr, self.start, self.end) + + +TextOrSlice = Union[AnyStr, 'TextSlice[AnyStr]'] +LarkInput = Union[AnyStr, TextSlice[AnyStr], Any] + + + +class Meta: + + empty: bool + line: int + column: int + start_pos: int + end_line: int + end_column: int + end_pos: int + orig_expansion: 'List[TerminalDef]' + match_tree: bool + + def __init__(self): + self.empty = True + + +_Leaf_T = TypeVar("_Leaf_T") +Branch = Union[_Leaf_T, 'Tree[_Leaf_T]'] + + +class Tree(Generic[_Leaf_T]): + #-- + + data: str + children: 'List[Branch[_Leaf_T]]' + + def __init__(self, data: str, children: 'List[Branch[_Leaf_T]]', meta: Optional[Meta]=None) -> None: + self.data = data + self.children = children + self._meta = meta + + @property + def meta(self) -> Meta: + if self._meta is None: + self._meta = Meta() + return self._meta + + def __repr__(self): + return 'Tree(%r, %r)' % (self.data, self.children) + + __match_args__ = ("data", "children") + + def _pretty_label(self): + return self.data + + def _pretty(self, level, indent_str): + yield f'{indent_str*level}{self._pretty_label()}' + if len(self.children) == 1 and not isinstance(self.children[0], Tree): + yield f'\t{self.children[0]}\n' + else: + yield '\n' + for n in self.children: + if isinstance(n, Tree): + yield from n._pretty(level+1, indent_str) + else: + yield f'{indent_str*(level+1)}{n}\n' + + def pretty(self, indent_str: str=' ') -> str: + #-- + return ''.join(self._pretty(0, indent_str)) + + def __rich__(self, parent:Optional['rich.tree.Tree']=None) -> 'rich.tree.Tree': + #-- + return self._rich(parent) + + def _rich(self, parent): + if parent: + tree = parent.add(f'[bold]{self.data}[/bold]') + else: + import rich.tree + tree = rich.tree.Tree(self.data) + + for c in self.children: + if isinstance(c, Tree): + c._rich(tree) + else: + tree.add(f'[green]{c}[/green]') + + return tree + + def __eq__(self, other): + try: + return self.data == other.data and self.children == other.children + except AttributeError: + return False + + def __ne__(self, other): + return not (self == other) + + def __hash__(self) -> int: + return hash((self.data, tuple(self.children))) + + def iter_subtrees(self) -> 'Iterator[Tree[_Leaf_T]]': + #-- + queue = [self] + subtrees = dict() + for subtree in queue: + subtrees[id(subtree)] = subtree + queue += [c for c in reversed(subtree.children) + if isinstance(c, Tree) and id(c) not in subtrees] + + del queue + return reversed(list(subtrees.values())) + + def iter_subtrees_topdown(self): + #-- + stack = [self] + stack_append = stack.append + stack_pop = stack.pop + while stack: + node = stack_pop() + if not isinstance(node, Tree): + continue + yield node + for child in reversed(node.children): + stack_append(child) + + def find_pred(self, pred: 'Callable[[Tree[_Leaf_T]], bool]') -> 'Iterator[Tree[_Leaf_T]]': + #-- + return filter(pred, self.iter_subtrees()) + + def find_data(self, data: str) -> 'Iterator[Tree[_Leaf_T]]': + #-- + return self.find_pred(lambda t: t.data == data) + + +from functools import wraps, update_wrapper +from inspect import getmembers, getmro + +_Return_T = TypeVar('_Return_T') +_Return_V = TypeVar('_Return_V') +_Leaf_T = TypeVar('_Leaf_T') +_Leaf_U = TypeVar('_Leaf_U') +_R = TypeVar('_R') +_FUNC = Callable[..., _Return_T] +_DECORATED = Union[_FUNC, type] + +class _DiscardType: + #-- + + def __repr__(self): + return "lark.visitors.Discard" + +Discard = _DiscardType() + +## + + +class _Decoratable: + #-- + + @classmethod + def _apply_v_args(cls, visit_wrapper): + mro = getmro(cls) + assert mro[0] is cls + libmembers = {name for _cls in mro[1:] for name, _ in getmembers(_cls)} + for name, value in getmembers(cls): + + ## + + if name.startswith('_') or (name in libmembers and name not in cls.__dict__): + continue + if not callable(value): + continue + + ## + + if isinstance(cls.__dict__[name], _VArgsWrapper): + continue + + setattr(cls, name, _VArgsWrapper(cls.__dict__[name], visit_wrapper)) + return cls + + def __class_getitem__(cls, _): + return cls + + +class Transformer(_Decoratable, ABC, Generic[_Leaf_T, _Return_T]): + #-- + __visit_tokens__ = True ## + + + def __init__(self, visit_tokens: bool=True) -> None: + self.__visit_tokens__ = visit_tokens + + def _call_userfunc(self, tree, new_children=None): + ## + + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + try: + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + return f.visit_wrapper(f, tree.data, children, tree.meta) + else: + return f(children) + except GrammarError: + raise + except Exception as e: + raise VisitError(tree.data, tree, e) + + def _call_userfunc_token(self, token): + try: + f = getattr(self, token.type) + except AttributeError: + return self.__default_token__(token) + else: + try: + return f(token) + except GrammarError: + raise + except Exception as e: + raise VisitError(token.type, token, e) + + def _transform_children(self, children): + for c in children: + if isinstance(c, Tree): + res = self._transform_tree(c) + elif self.__visit_tokens__ and isinstance(c, Token): + res = self._call_userfunc_token(c) + else: + res = c + + if res is not Discard: + yield res + + def _transform_tree(self, tree): + children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree, children) + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + #-- + res = list(self._transform_children([tree])) + if not res: + return None ## + + assert len(res) == 1 + return res[0] + + def __mul__( + self: 'Transformer[_Leaf_T, Tree[_Leaf_U]]', + other: 'Union[Transformer[_Leaf_U, _Return_V], TransformerChain[_Leaf_U, _Return_V,]]' + ) -> 'TransformerChain[_Leaf_T, _Return_V]': + #-- + return TransformerChain(self, other) + + def __default__(self, data, children, meta): + #-- + return Tree(data, children, meta) + + def __default_token__(self, token): + #-- + return token + + +def merge_transformers(base_transformer=None, **transformers_to_merge): + #-- + if base_transformer is None: + base_transformer = Transformer() + for prefix, transformer in transformers_to_merge.items(): + for method_name in dir(transformer): + method = getattr(transformer, method_name) + if not callable(method): + continue + if method_name.startswith("_") or method_name == "transform": + continue + prefixed_method = prefix + "__" + method_name + if hasattr(base_transformer, prefixed_method): + raise AttributeError("Cannot merge: method '%s' appears more than once" % prefixed_method) + + setattr(base_transformer, prefixed_method, method) + + return base_transformer + + +class InlineTransformer(Transformer): ## + + def _call_userfunc(self, tree, new_children=None): + ## + + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + return f(*children) + + +class TransformerChain(Generic[_Leaf_T, _Return_T]): + + transformers: 'Tuple[Union[Transformer, TransformerChain], ...]' + + def __init__(self, *transformers: 'Union[Transformer, TransformerChain]') -> None: + self.transformers = transformers + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + for t in self.transformers: + tree = t.transform(tree) + return cast(_Return_T, tree) + + def __mul__( + self: 'TransformerChain[_Leaf_T, Tree[_Leaf_U]]', + other: 'Union[Transformer[_Leaf_U, _Return_V], TransformerChain[_Leaf_U, _Return_V]]' + ) -> 'TransformerChain[_Leaf_T, _Return_V]': + return TransformerChain(*self.transformers + (other,)) + + +class Transformer_InPlace(Transformer[_Leaf_T, _Return_T]): + #-- + def _transform_tree(self, tree): ## + + return self._call_userfunc(tree) + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + for subtree in tree.iter_subtrees(): + subtree.children = list(self._transform_children(subtree.children)) + + return self._transform_tree(tree) + + +class Transformer_NonRecursive(Transformer[_Leaf_T, _Return_T]): + #-- + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + ## + + rev_postfix = [] + q: List[Branch[_Leaf_T]] = [tree] + while q: + t = q.pop() + rev_postfix.append(t) + if isinstance(t, Tree): + q += t.children + + ## + + stack: List = [] + for x in reversed(rev_postfix): + if isinstance(x, Tree): + size = len(x.children) + if size: + args = stack[-size:] + del stack[-size:] + else: + args = [] + + res = self._call_userfunc(x, args) + if res is not Discard: + stack.append(res) + + elif self.__visit_tokens__ and isinstance(x, Token): + res = self._call_userfunc_token(x) + if res is not Discard: + stack.append(res) + else: + stack.append(x) + + result, = stack ## + + ## + + ## + + ## + + return cast(_Return_T, result) + + +class Transformer_InPlaceRecursive(Transformer[_Leaf_T, _Return_T]): + #-- + def _transform_tree(self, tree): + tree.children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree) + + +## + + +class VisitorBase: + def _call_userfunc(self, tree): + return getattr(self, tree.data, self.__default__)(tree) + + def __default__(self, tree): + #-- + return tree + + def __class_getitem__(cls, _): + return cls + + +class Visitor(VisitorBase, ABC, Generic[_Leaf_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for subtree in tree.iter_subtrees(): + self._call_userfunc(subtree) + return tree + + def visit_topdown(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for subtree in tree.iter_subtrees_topdown(): + self._call_userfunc(subtree) + return tree + + +class Visitor_Recursive(VisitorBase, Generic[_Leaf_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for child in tree.children: + if isinstance(child, Tree): + self.visit(child) + + self._call_userfunc(tree) + return tree + + def visit_topdown(self,tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + self._call_userfunc(tree) + + for child in tree.children: + if isinstance(child, Tree): + self.visit_topdown(child) + + return tree + + +class Interpreter(_Decoratable, ABC, Generic[_Leaf_T, _Return_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> _Return_T: + ## + + ## + + ## + + return self._visit_tree(tree) + + def _visit_tree(self, tree: Tree[_Leaf_T]): + f = getattr(self, tree.data) + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + return f.visit_wrapper(f, tree.data, tree.children, tree.meta) + else: + return f(tree) + + def visit_children(self, tree: Tree[_Leaf_T]) -> List: + return [self._visit_tree(child) if isinstance(child, Tree) else child + for child in tree.children] + + def __getattr__(self, name): + return self.__default__ + + def __default__(self, tree): + return self.visit_children(tree) + + +_InterMethod = Callable[[Type[Interpreter], _Return_T], _R] + +def visit_children_decor(func: _InterMethod) -> _InterMethod: + #-- + @wraps(func) + def inner(cls, tree): + values = cls.visit_children(tree) + return func(cls, values) + return inner + +## + + +def _apply_v_args(obj, visit_wrapper): + try: + _apply = obj._apply_v_args + except AttributeError: + return _VArgsWrapper(obj, visit_wrapper) + else: + return _apply(visit_wrapper) + + +class _VArgsWrapper: + #-- + base_func: Callable + + def __init__(self, func: Callable, visit_wrapper: Callable[[Callable, str, list, Any], Any]): + if isinstance(func, _VArgsWrapper): + func = func.base_func + self.base_func = func + self.visit_wrapper = visit_wrapper + update_wrapper(self, func) + + def __call__(self, *args, **kwargs): + return self.base_func(*args, **kwargs) + + def __get__(self, instance, owner=None): + try: + ## + + ## + + g = type(self.base_func).__get__ + except AttributeError: + return self + else: + return _VArgsWrapper(g(self.base_func, instance, owner), self.visit_wrapper) + + def __set_name__(self, owner, name): + try: + f = type(self.base_func).__set_name__ + except AttributeError: + return + else: + f(self.base_func, owner, name) + + +def _vargs_inline(f, _data, children, _meta): + return f(*children) +def _vargs_meta_inline(f, _data, children, meta): + return f(meta, *children) +def _vargs_meta(f, _data, children, meta): + return f(meta, children) +def _vargs_tree(f, data, children, meta): + return f(Tree(data, children, meta)) + + +def v_args(inline: bool = False, meta: bool = False, tree: bool = False, wrapper: Optional[Callable] = None) -> Callable[[_DECORATED], _DECORATED]: + #-- + if tree and (meta or inline): + raise ValueError("Visitor functions cannot combine 'tree' with 'meta' or 'inline'.") + + func = None + if meta: + if inline: + func = _vargs_meta_inline + else: + func = _vargs_meta + elif inline: + func = _vargs_inline + elif tree: + func = _vargs_tree + + if wrapper is not None: + if func is not None: + raise ValueError("Cannot use 'wrapper' along with 'tree', 'meta' or 'inline'.") + func = wrapper + + def _visitor_args_dec(obj): + return _apply_v_args(obj, func) + return _visitor_args_dec + + + +TOKEN_DEFAULT_PRIORITY = 0 + + +class Symbol(Serialize): + __slots__ = ('name',) + + name: str + is_term: ClassVar[bool] = NotImplemented + + def __init__(self, name: str) -> None: + self.name = name + + def __eq__(self, other): + if not isinstance(other, Symbol): + return NotImplemented + return self.is_term == other.is_term and self.name == other.name + + def __ne__(self, other): + return not (self == other) + + def __hash__(self): + return hash(self.name) + + def __repr__(self): + return '%s(%r)' % (type(self).__name__, self.name) + + fullrepr = property(__repr__) + + def renamed(self, f): + return type(self)(f(self.name)) + + +class Terminal(Symbol): + __serialize_fields__ = 'name', 'filter_out' + + is_term: ClassVar[bool] = True + + def __init__(self, name: str, filter_out: bool = False) -> None: + self.name = name + self.filter_out = filter_out + + @property + def fullrepr(self): + return '%s(%r, %r)' % (type(self).__name__, self.name, self.filter_out) + + def renamed(self, f): + return type(self)(f(self.name), self.filter_out) + + +class NonTerminal(Symbol): + __serialize_fields__ = 'name', + + is_term: ClassVar[bool] = False + + def serialize(self, memo=None) -> Dict[str, Any]: + ## + + ## + + return {'name': str(self.name), '__type__': 'NonTerminal'} + + +class RuleOptions(Serialize): + __serialize_fields__ = 'keep_all_tokens', 'expand1', 'priority', 'template_source', 'empty_indices' + + keep_all_tokens: bool + expand1: bool + priority: Optional[int] + template_source: Optional[str] + empty_indices: Tuple[bool, ...] + + def __init__(self, keep_all_tokens: bool=False, expand1: bool=False, priority: Optional[int]=None, template_source: Optional[str]=None, empty_indices: Tuple[bool, ...]=()) -> None: + self.keep_all_tokens = keep_all_tokens + self.expand1 = expand1 + self.priority = priority + self.template_source = template_source + self.empty_indices = empty_indices + + def __repr__(self): + return 'RuleOptions(%r, %r, %r, %r)' % ( + self.keep_all_tokens, + self.expand1, + self.priority, + self.template_source + ) + + +class Rule(Serialize): + #-- + __slots__ = ('origin', 'expansion', 'alias', 'options', 'order', '_hash') + + __serialize_fields__ = 'origin', 'expansion', 'order', 'alias', 'options' + __serialize_namespace__ = Terminal, NonTerminal, RuleOptions + + origin: NonTerminal + expansion: Sequence[Symbol] + order: int + alias: Optional[str] + options: RuleOptions + _hash: int + + def __init__(self, origin: NonTerminal, expansion: Sequence[Symbol], + order: int=0, alias: Optional[str]=None, options: Optional[RuleOptions]=None): + self.origin = origin + self.expansion = expansion + self.alias = alias + self.order = order + self.options = options or RuleOptions() + self._hash = hash((self.origin, tuple(self.expansion))) + + def _deserialize(self): + self._hash = hash((self.origin, tuple(self.expansion))) + + def __str__(self): + return '<%s : %s>' % (self.origin.name, ' '.join(x.name for x in self.expansion)) + + def __repr__(self): + return 'Rule(%r, %r, %r, %r)' % (self.origin, self.expansion, self.alias, self.options) + + def __hash__(self): + return self._hash + + def __eq__(self, other): + if not isinstance(other, Rule): + return False + return self.origin == other.origin and self.expansion == other.expansion + + + +from contextlib import suppress +from copy import copy + +try: ## + + has_interegular = bool(interegular) +except NameError: + has_interegular = False + +class Pattern(Serialize, ABC): + #-- + + value: str + flags: Collection[str] + raw: Optional[str] + type: ClassVar[str] + + def __init__(self, value: str, flags: Collection[str] = (), raw: Optional[str] = None) -> None: + self.value = value + self.flags = frozenset(flags) + self.raw = raw + + def __repr__(self): + return repr(self.to_regexp()) + + ## + + def __hash__(self): + return hash((type(self), self.value, self.flags)) + + def __eq__(self, other): + return type(self) == type(other) and self.value == other.value and self.flags == other.flags + + @abstractmethod + def to_regexp(self) -> str: + raise NotImplementedError() + + @property + @abstractmethod + def min_width(self) -> int: + raise NotImplementedError() + + @property + @abstractmethod + def max_width(self) -> int: + raise NotImplementedError() + + def _get_flags(self, value): + for f in self.flags: + value = ('(?%s:%s)' % (f, value)) + return value + + +class PatternStr(Pattern): + __serialize_fields__ = 'value', 'flags', 'raw' + + type: ClassVar[str] = "str" + + def to_regexp(self) -> str: + return self._get_flags(re.escape(self.value)) + + @property + def min_width(self) -> int: + return len(self.value) + + @property + def max_width(self) -> int: + return len(self.value) + + +class PatternRE(Pattern): + __serialize_fields__ = 'value', 'flags', 'raw', '_width' + + type: ClassVar[str] = "re" + + def to_regexp(self) -> str: + return self._get_flags(self.value) + + _width = None + def _get_width(self): + if self._width is None: + self._width = get_regexp_width(self.to_regexp()) + return self._width + + @property + def min_width(self) -> int: + return self._get_width()[0] + + @property + def max_width(self) -> int: + return self._get_width()[1] + + +class TerminalDef(Serialize): + #-- + __serialize_fields__ = 'name', 'pattern', 'priority' + __serialize_namespace__ = PatternStr, PatternRE + + name: str + pattern: Pattern + priority: int + + def __init__(self, name: str, pattern: Pattern, priority: int = TOKEN_DEFAULT_PRIORITY) -> None: + assert isinstance(pattern, Pattern), pattern + self.name = name + self.pattern = pattern + self.priority = priority + + def __repr__(self): + return '%s(%r, %r)' % (type(self).__name__, self.name, self.pattern) + + def user_repr(self) -> str: + if self.name.startswith('__'): ## + + return self.pattern.raw or self.name + else: + return self.name + +_T = TypeVar('_T', bound="Token") + +class Token(str): + #-- + __slots__ = ('type', 'start_pos', 'value', 'line', 'column', 'end_line', 'end_column', 'end_pos') + + __match_args__ = ('type', 'value') + + type: str + start_pos: Optional[int] + value: Any + line: Optional[int] + column: Optional[int] + end_line: Optional[int] + end_column: Optional[int] + end_pos: Optional[int] + + + @overload + def __new__( + cls, + type: str, + value: Any, + start_pos: Optional[int] = None, + line: Optional[int] = None, + column: Optional[int] = None, + end_line: Optional[int] = None, + end_column: Optional[int] = None, + end_pos: Optional[int] = None + ) -> 'Token': + ... + + @overload + def __new__( + cls, + type_: str, + value: Any, + start_pos: Optional[int] = None, + line: Optional[int] = None, + column: Optional[int] = None, + end_line: Optional[int] = None, + end_column: Optional[int] = None, + end_pos: Optional[int] = None + ) -> 'Token': ... + + def __new__(cls, *args, **kwargs): + if "type_" in kwargs: + warnings.warn("`type_` is deprecated use `type` instead", DeprecationWarning) + + if "type" in kwargs: + raise TypeError("Error: using both 'type' and the deprecated 'type_' as arguments.") + kwargs["type"] = kwargs.pop("type_") + + return cls._future_new(*args, **kwargs) + + + @classmethod + def _future_new(cls, type, value, start_pos=None, line=None, column=None, end_line=None, end_column=None, end_pos=None): + inst = super(Token, cls).__new__(cls, value) + + inst.type = type + inst.start_pos = start_pos + inst.value = value + inst.line = line + inst.column = column + inst.end_line = end_line + inst.end_column = end_column + inst.end_pos = end_pos + return inst + + @overload + def update(self, type: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + ... + + @overload + def update(self, type_: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + ... + + def update(self, *args, **kwargs): + if "type_" in kwargs: + warnings.warn("`type_` is deprecated use `type` instead", DeprecationWarning) + + if "type" in kwargs: + raise TypeError("Error: using both 'type' and the deprecated 'type_' as arguments.") + kwargs["type"] = kwargs.pop("type_") + + return self._future_update(*args, **kwargs) + + def _future_update(self, type: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + return Token.new_borrow_pos( + type if type is not None else self.type, + value if value is not None else self.value, + self + ) + + @classmethod + def new_borrow_pos(cls: Type[_T], type_: str, value: Any, borrow_t: 'Token') -> _T: + return cls(type_, value, borrow_t.start_pos, borrow_t.line, borrow_t.column, borrow_t.end_line, borrow_t.end_column, borrow_t.end_pos) + + def __reduce__(self): + return (self.__class__, (self.type, self.value, self.start_pos, self.line, self.column)) + + def __repr__(self): + return 'Token(%r, %r)' % (self.type, self.value) + + def __deepcopy__(self, memo): + return Token(self.type, self.value, self.start_pos, self.line, self.column) + + def __eq__(self, other): + if isinstance(other, Token) and self.type != other.type: + return False + + return str.__eq__(self, other) + + __hash__ = str.__hash__ + + +class LineCounter: + #-- + + __slots__ = 'char_pos', 'line', 'column', 'line_start_pos', 'newline_char' + + def __init__(self, newline_char): + self.newline_char = newline_char + self.char_pos = 0 + self.line = 1 + self.column = 1 + self.line_start_pos = 0 + + def __eq__(self, other): + if not isinstance(other, LineCounter): + return NotImplemented + + return self.char_pos == other.char_pos and self.newline_char == other.newline_char + + def feed(self, token: TextOrSlice, test_newline=True): + #-- + if test_newline: + newlines = token.count(self.newline_char) + if newlines: + self.line += newlines + self.line_start_pos = self.char_pos + token.rindex(self.newline_char) + 1 + + self.char_pos += len(token) + self.column = self.char_pos - self.line_start_pos + 1 + + +class UnlessCallback: + def __init__(self, scanner: 'Scanner'): + self.scanner = scanner + + def __call__(self, t: Token): + res = self.scanner.fullmatch(t.value) + if res is not None: + t.type = res + return t + + +class CallChain: + def __init__(self, callback1, callback2, cond): + self.callback1 = callback1 + self.callback2 = callback2 + self.cond = cond + + def __call__(self, t): + t2 = self.callback1(t) + return self.callback2(t) if self.cond(t2) else t2 + + +def _get_match(re_, regexp, s, flags): + m = re_.match(regexp, s, flags) + if m: + return m.group(0) + +def _create_unless(terminals, g_regex_flags, re_, use_bytes): + tokens_by_type = classify(terminals, lambda t: type(t.pattern)) + assert len(tokens_by_type) <= 2, tokens_by_type.keys() + embedded_strs = set() + callback = {} + for retok in tokens_by_type.get(PatternRE, []): + unless = [] + for strtok in tokens_by_type.get(PatternStr, []): + if strtok.priority != retok.priority: + continue + s = strtok.pattern.value + if s == _get_match(re_, retok.pattern.to_regexp(), s, g_regex_flags): + unless.append(strtok) + if strtok.pattern.flags <= retok.pattern.flags: + embedded_strs.add(strtok) + if unless: + callback[retok.name] = UnlessCallback(Scanner(unless, g_regex_flags, re_, use_bytes=use_bytes)) + + new_terminals = [t for t in terminals if t not in embedded_strs] + return new_terminals, callback + + +class Scanner: + def __init__(self, terminals, g_regex_flags, re_, use_bytes): + self.terminals = terminals + self.g_regex_flags = g_regex_flags + self.re_ = re_ + self.use_bytes = use_bytes + + self.allowed_types = {t.name for t in self.terminals} + + self._mres = self._build_mres(terminals, len(terminals)) + + def _build_mres(self, terminals, max_size): + ## + + ## + + ## + + mres = [] + while terminals: + pattern = u'|'.join(u'(?P<%s>%s)' % (t.name, t.pattern.to_regexp()) for t in terminals[:max_size]) + if self.use_bytes: + pattern = pattern.encode('latin-1') + try: + mre = self.re_.compile(pattern, self.g_regex_flags) + except AssertionError: ## + + return self._build_mres(terminals, max_size // 2) + + mres.append(mre) + terminals = terminals[max_size:] + return mres + + def match(self, text: TextSlice, pos): + for mre in self._mres: + m = mre.match(text.text, pos, text.end) + if m: + return m.group(0), m.lastgroup + + + def fullmatch(self, text: str) -> Optional[str]: + for mre in self._mres: + m = mre.fullmatch(text) + if m: + return m.lastgroup + return None + +def _regexp_has_newline(r: str): + #-- + return '\n' in r or '\\n' in r or '\\s' in r or '[^' in r or ('(?s' in r and '.' in r) + + +class LexerState: + #-- + + __slots__ = 'text', 'line_ctr', 'last_token' + + text: TextSlice + line_ctr: LineCounter + last_token: Optional[Token] + + def __init__(self, text: TextSlice, line_ctr: Optional[LineCounter] = None, last_token: Optional[Token]=None): + if isinstance(text, TextSlice): + if line_ctr is None: + line_ctr = LineCounter(b'\n' if isinstance(text.text, bytes) else '\n') + + if text.start > 0: + ## + + line_ctr.feed(TextSlice(text.text, 0, text.start)) + + if not (text.start <= line_ctr.char_pos <= text.end): + raise ValueError("LineCounter.char_pos is out of bounds") + + self.text = text + if line_ctr is None: + line_ctr = LineCounter(b'\n' if isinstance(text, bytes) or (hasattr(text, 'text') and isinstance(text.text, bytes)) else '\n') + self.line_ctr = line_ctr + self.last_token = last_token + + + def __eq__(self, other): + if not isinstance(other, LexerState): + return NotImplemented + + return self.text == other.text and self.line_ctr == other.line_ctr and self.last_token == other.last_token + + def __copy__(self): + return type(self)(self.text, copy(self.line_ctr), self.last_token) + + +class LexerThread: + #-- + + def __init__(self, lexer: 'Lexer', lexer_state: Optional[LexerState]): + self.lexer = lexer + self.state = lexer_state + + @classmethod + def from_text(cls, lexer: 'Lexer', text_or_slice: TextOrSlice) -> 'LexerThread': + text = TextSlice.cast_from(text_or_slice) + return cls(lexer, LexerState(text)) + + @classmethod + def from_custom_input(cls, lexer: 'Lexer', text: Any) -> 'LexerThread': + return cls(lexer, LexerState(text)) + + def lex(self, parser_state): + if self.state is None: + raise TypeError("Cannot lex: No text assigned to lexer state") + return self.lexer.lex(self.state, parser_state) + + def __copy__(self): + return type(self)(self.lexer, copy(self.state)) + + _Token = Token + + +_Callback = Callable[[Token], Token] + +class Lexer(ABC): + #-- + @abstractmethod + def lex(self, lexer_state: LexerState, parser_state: Any) -> Iterator[Token]: + return NotImplemented + + def make_lexer_state(self, text: str): + #-- + return LexerState(TextSlice.cast_from(text)) + + +def _check_regex_collisions(terminal_to_regexp: Dict[TerminalDef, str], comparator, strict_mode, max_collisions_to_show=8): + if not comparator: + comparator = interegular.Comparator.from_regexes(terminal_to_regexp) + + ## + + ## + + max_time = 2 if strict_mode else 0.2 + + ## + + if comparator.count_marked_pairs() >= max_collisions_to_show: + return + for group in classify(terminal_to_regexp, lambda t: t.priority).values(): + for a, b in comparator.check(group, skip_marked=True): + assert a.priority == b.priority + ## + + comparator.mark(a, b) + + ## + + message = f"Collision between Terminals {a.name} and {b.name}. " + try: + example = comparator.get_example_overlap(a, b, max_time).format_multiline() + except ValueError: + ## + + example = "No example could be found fast enough. However, the collision does still exists" + if strict_mode: + raise LexError(f"{message}\n{example}") + logger.warning("%s The lexer will choose between them arbitrarily.\n%s", message, example) + if comparator.count_marked_pairs() >= max_collisions_to_show: + logger.warning("Found 8 regex collisions, will not check for more.") + return + + +class AbstractBasicLexer(Lexer): + terminals_by_name: Dict[str, TerminalDef] + + @abstractmethod + def __init__(self, conf: 'LexerConf', comparator=None) -> None: + ... + + @abstractmethod + def next_token(self, lex_state: LexerState, parser_state: Any = None) -> Token: + ... + + def lex(self, state: LexerState, parser_state: Any) -> Iterator[Token]: + with suppress(EOFError): + while True: + yield self.next_token(state, parser_state) + + +class BasicLexer(AbstractBasicLexer): + terminals: Collection[TerminalDef] + ignore_types: FrozenSet[str] + newline_types: FrozenSet[str] + user_callbacks: Dict[str, _Callback] + callback: Dict[str, _Callback] + re: ModuleType + + def __init__(self, conf: 'LexerConf', comparator=None) -> None: + terminals = list(conf.terminals) + assert all(isinstance(t, TerminalDef) for t in terminals), terminals + + self.re = conf.re_module + + if not conf.skip_validation: + ## + + terminal_to_regexp = {} + for t in terminals: + regexp = t.pattern.to_regexp() + try: + self.re.compile(regexp, conf.g_regex_flags) + except self.re.error: + raise LexError("Cannot compile token %s: %s" % (t.name, t.pattern)) + + if t.pattern.min_width == 0: + raise LexError("Lexer does not allow zero-width terminals. (%s: %s)" % (t.name, t.pattern)) + if t.pattern.type == "re": + terminal_to_regexp[t] = regexp + + if not (set(conf.ignore) <= {t.name for t in terminals}): + raise LexError("Ignore terminals are not defined: %s" % (set(conf.ignore) - {t.name for t in terminals})) + + if has_interegular: + _check_regex_collisions(terminal_to_regexp, comparator, conf.strict) + elif conf.strict: + raise LexError("interegular must be installed for strict mode. Use `pip install 'lark[interegular]'`.") + + ## + + self.newline_types = frozenset(t.name for t in terminals if _regexp_has_newline(t.pattern.to_regexp())) + self.ignore_types = frozenset(conf.ignore) + + terminals.sort(key=lambda x: (-x.priority, -x.pattern.max_width, -len(x.pattern.value), x.name)) + self.terminals = terminals + self.user_callbacks = conf.callbacks + self.g_regex_flags = conf.g_regex_flags + self.use_bytes = conf.use_bytes + self.terminals_by_name = conf.terminals_by_name + + self._scanner: Optional[Scanner] = None + + def _build_scanner(self) -> Scanner: + terminals, self.callback = _create_unless(self.terminals, self.g_regex_flags, self.re, self.use_bytes) + assert all(self.callback.values()) + + for type_, f in self.user_callbacks.items(): + if type_ in self.callback: + ## + + self.callback[type_] = CallChain(self.callback[type_], f, lambda t: t.type == type_) + else: + self.callback[type_] = f + + return Scanner(terminals, self.g_regex_flags, self.re, self.use_bytes) + + @property + def scanner(self) -> Scanner: + if self._scanner is None: + self._scanner = self._build_scanner() + return self._scanner + + def match(self, text, pos): + return self.scanner.match(text, pos) + + def next_token(self, lex_state: LexerState, parser_state: Any = None) -> Token: + line_ctr = lex_state.line_ctr + while line_ctr.char_pos < lex_state.text.end: + res = self.match(lex_state.text, line_ctr.char_pos) + if not res: + allowed = self.scanner.allowed_types - self.ignore_types + if not allowed: + allowed = {""} + raise UnexpectedCharacters(lex_state.text.text, line_ctr.char_pos, line_ctr.line, line_ctr.column, + allowed=allowed, token_history=lex_state.last_token and [lex_state.last_token], + state=parser_state, terminals_by_name=self.terminals_by_name) + + value, type_ = res + + ignored = type_ in self.ignore_types + t = None + if not ignored or type_ in self.callback: + t = Token(type_, value, line_ctr.char_pos, line_ctr.line, line_ctr.column) + line_ctr.feed(value, type_ in self.newline_types) + if t is not None: + t.end_line = line_ctr.line + t.end_column = line_ctr.column + t.end_pos = line_ctr.char_pos + if t.type in self.callback: + t = self.callback[t.type](t) + if not ignored: + if not isinstance(t, Token): + raise LexError("Callbacks must return a token (returned %r)" % t) + lex_state.last_token = t + return t + + ## + + raise EOFError(self) + + +class ContextualLexer(Lexer): + lexers: Dict[int, AbstractBasicLexer] + root_lexer: AbstractBasicLexer + + BasicLexer: Type[AbstractBasicLexer] = BasicLexer + + def __init__(self, conf: 'LexerConf', states: Dict[int, Collection[str]], always_accept: Collection[str]=()) -> None: + terminals = list(conf.terminals) + terminals_by_name = conf.terminals_by_name + + trad_conf = copy(conf) + trad_conf.terminals = terminals + + if has_interegular and not conf.skip_validation: + comparator = interegular.Comparator.from_regexes({t: t.pattern.to_regexp() for t in terminals}) + else: + comparator = None + lexer_by_tokens: Dict[FrozenSet[str], AbstractBasicLexer] = {} + self.lexers = {} + for state, accepts in states.items(): + key = frozenset(accepts) + try: + lexer = lexer_by_tokens[key] + except KeyError: + accepts = set(accepts) | set(conf.ignore) | set(always_accept) + lexer_conf = copy(trad_conf) + lexer_conf.terminals = [terminals_by_name[n] for n in accepts if n in terminals_by_name] + lexer = self.BasicLexer(lexer_conf, comparator) + lexer_by_tokens[key] = lexer + + self.lexers[state] = lexer + + assert trad_conf.terminals is terminals + trad_conf.skip_validation = True ## + + self.root_lexer = self.BasicLexer(trad_conf, comparator) + + def lex(self, lexer_state: LexerState, parser_state: 'ParserState') -> Iterator[Token]: + try: + while True: + lexer = self.lexers[parser_state.position] + yield lexer.next_token(lexer_state, parser_state) + except EOFError: + pass + except UnexpectedCharacters as e: + ## + + ## + + try: + last_token = lexer_state.last_token ## + + token = self.root_lexer.next_token(lexer_state, parser_state) + raise UnexpectedToken(token, e.allowed, state=parser_state, token_history=[last_token], terminals_by_name=self.root_lexer.terminals_by_name) + except UnexpectedCharacters: + raise e ## + + + + +_ParserArgType: 'TypeAlias' = 'Literal["earley", "lalr", "cyk", "auto"]' +_LexerArgType: 'TypeAlias' = 'Union[Literal["auto", "basic", "contextual", "dynamic", "dynamic_complete"], Type[Lexer]]' +_LexerCallback = Callable[[Token], Token] +ParserCallbacks = Dict[str, Callable] + +class LexerConf(Serialize): + __serialize_fields__ = 'terminals', 'ignore', 'g_regex_flags', 'use_bytes', 'lexer_type' + __serialize_namespace__ = TerminalDef, + + terminals: Collection[TerminalDef] + re_module: ModuleType + ignore: Collection[str] + postlex: 'Optional[PostLex]' + callbacks: Dict[str, _LexerCallback] + g_regex_flags: int + skip_validation: bool + use_bytes: bool + lexer_type: Optional[_LexerArgType] + strict: bool + + def __init__(self, terminals: Collection[TerminalDef], re_module: ModuleType, ignore: Collection[str]=(), postlex: 'Optional[PostLex]'=None, + callbacks: Optional[Dict[str, _LexerCallback]]=None, g_regex_flags: int=0, skip_validation: bool=False, use_bytes: bool=False, strict: bool=False): + self.terminals = terminals + self.terminals_by_name = {t.name: t for t in self.terminals} + assert len(self.terminals) == len(self.terminals_by_name) + self.ignore = ignore + self.postlex = postlex + self.callbacks = callbacks or {} + self.g_regex_flags = g_regex_flags + self.re_module = re_module + self.skip_validation = skip_validation + self.use_bytes = use_bytes + self.strict = strict + self.lexer_type = None + + def _deserialize(self): + self.terminals_by_name = {t.name: t for t in self.terminals} + + def __deepcopy__(self, memo=None): + return type(self)( + deepcopy(self.terminals, memo), + self.re_module, + deepcopy(self.ignore, memo), + deepcopy(self.postlex, memo), + deepcopy(self.callbacks, memo), + deepcopy(self.g_regex_flags, memo), + deepcopy(self.skip_validation, memo), + deepcopy(self.use_bytes, memo), + ) + +class ParserConf(Serialize): + __serialize_fields__ = 'rules', 'start', 'parser_type' + + rules: List['Rule'] + callbacks: ParserCallbacks + start: List[str] + parser_type: _ParserArgType + + def __init__(self, rules: List['Rule'], callbacks: ParserCallbacks, start: List[str]): + assert isinstance(start, list) + self.rules = rules + self.callbacks = callbacks + self.start = start + + +from functools import partial, wraps +from itertools import product + + +class ExpandSingleChild: + def __init__(self, node_builder): + self.node_builder = node_builder + + def __call__(self, children): + if len(children) == 1: + return children[0] + else: + return self.node_builder(children) + + + +class PropagatePositions: + def __init__(self, node_builder, node_filter=None): + self.node_builder = node_builder + self.node_filter = node_filter + + def __call__(self, children): + res = self.node_builder(children) + + if isinstance(res, Tree): + ## + + ## + + ## + + ## + + + res_meta = res.meta + + first_meta = self._pp_get_meta(children) + if first_meta is not None: + if not hasattr(res_meta, 'line'): + ## + + res_meta.line = getattr(first_meta, 'container_line', first_meta.line) + res_meta.column = getattr(first_meta, 'container_column', first_meta.column) + res_meta.start_pos = getattr(first_meta, 'container_start_pos', first_meta.start_pos) + res_meta.empty = False + + res_meta.container_line = getattr(first_meta, 'container_line', first_meta.line) + res_meta.container_column = getattr(first_meta, 'container_column', first_meta.column) + res_meta.container_start_pos = getattr(first_meta, 'container_start_pos', first_meta.start_pos) + + last_meta = self._pp_get_meta(reversed(children)) + if last_meta is not None: + if not hasattr(res_meta, 'end_line'): + res_meta.end_line = getattr(last_meta, 'container_end_line', last_meta.end_line) + res_meta.end_column = getattr(last_meta, 'container_end_column', last_meta.end_column) + res_meta.end_pos = getattr(last_meta, 'container_end_pos', last_meta.end_pos) + res_meta.empty = False + + res_meta.container_end_line = getattr(last_meta, 'container_end_line', last_meta.end_line) + res_meta.container_end_column = getattr(last_meta, 'container_end_column', last_meta.end_column) + res_meta.container_end_pos = getattr(last_meta, 'container_end_pos', last_meta.end_pos) + + return res + + def _pp_get_meta(self, children): + for c in children: + if self.node_filter is not None and not self.node_filter(c): + continue + if isinstance(c, Tree): + if not c.meta.empty: + return c.meta + elif isinstance(c, Token): + return c + elif hasattr(c, '__lark_meta__'): + return c.__lark_meta__() + +def make_propagate_positions(option): + if callable(option): + return partial(PropagatePositions, node_filter=option) + elif option is True: + return PropagatePositions + elif option is False: + return None + + raise ConfigurationError('Invalid option for propagate_positions: %r' % option) + + +class ChildFilter: + def __init__(self, to_include, append_none, node_builder): + self.node_builder = node_builder + self.to_include = to_include + self.append_none = append_none + + def __call__(self, children): + filtered = [] + + for i, to_expand, add_none in self.to_include: + if add_none: + filtered += [None] * add_none + if to_expand: + filtered += children[i].children + else: + filtered.append(children[i]) + + if self.append_none: + filtered += [None] * self.append_none + + return self.node_builder(filtered) + + +class ChildFilterLALR(ChildFilter): + #-- + + def __call__(self, children): + filtered = [] + for i, to_expand, add_none in self.to_include: + if add_none: + filtered += [None] * add_none + if to_expand: + if filtered: + filtered += children[i].children + else: ## + + filtered = children[i].children + else: + filtered.append(children[i]) + + if self.append_none: + filtered += [None] * self.append_none + + return self.node_builder(filtered) + + +class ChildFilterLALR_NoPlaceholders(ChildFilter): + #-- + def __init__(self, to_include, node_builder): + self.node_builder = node_builder + self.to_include = to_include + + def __call__(self, children): + filtered = [] + for i, to_expand in self.to_include: + if to_expand: + if filtered: + filtered += children[i].children + else: ## + + filtered = children[i].children + else: + filtered.append(children[i]) + return self.node_builder(filtered) + + +def _should_expand(sym): + return not sym.is_term and sym.name.startswith('_') + + +def maybe_create_child_filter(expansion, keep_all_tokens, ambiguous, _empty_indices: List[bool]): + ## + + if _empty_indices: + assert _empty_indices.count(False) == len(expansion) + s = ''.join(str(int(b)) for b in _empty_indices) + empty_indices = [len(ones) for ones in s.split('0')] + assert len(empty_indices) == len(expansion)+1, (empty_indices, len(expansion)) + else: + empty_indices = [0] * (len(expansion)+1) + + to_include = [] + nones_to_add = 0 + for i, sym in enumerate(expansion): + nones_to_add += empty_indices[i] + if keep_all_tokens or not (sym.is_term and sym.filter_out): + to_include.append((i, _should_expand(sym), nones_to_add)) + nones_to_add = 0 + + nones_to_add += empty_indices[len(expansion)] + + if _empty_indices or len(to_include) < len(expansion) or any(to_expand for i, to_expand,_ in to_include): + if _empty_indices or ambiguous: + return partial(ChildFilter if ambiguous else ChildFilterLALR, to_include, nones_to_add) + else: + ## + + return partial(ChildFilterLALR_NoPlaceholders, [(i, x) for i,x,_ in to_include]) + + +class AmbiguousExpander: + #-- + def __init__(self, to_expand, tree_class, node_builder): + self.node_builder = node_builder + self.tree_class = tree_class + self.to_expand = to_expand + + def __call__(self, children): + def _is_ambig_tree(t): + return hasattr(t, 'data') and t.data == '_ambig' + + ## + + ## + + ## + + ## + + ambiguous = [] + for i, child in enumerate(children): + if _is_ambig_tree(child): + if i in self.to_expand: + ambiguous.append(i) + + child.expand_kids_by_data('_ambig') + + if not ambiguous: + return self.node_builder(children) + + expand = [child.children if i in ambiguous else (child,) for i, child in enumerate(children)] + return self.tree_class('_ambig', [self.node_builder(list(f)) for f in product(*expand)]) + + +def maybe_create_ambiguous_expander(tree_class, expansion, keep_all_tokens): + to_expand = [i for i, sym in enumerate(expansion) + if keep_all_tokens or ((not (sym.is_term and sym.filter_out)) and _should_expand(sym))] + if to_expand: + return partial(AmbiguousExpander, to_expand, tree_class) + + +class AmbiguousIntermediateExpander: + #-- + + def __init__(self, tree_class, node_builder): + self.node_builder = node_builder + self.tree_class = tree_class + + def __call__(self, children): + def _is_iambig_tree(child): + return hasattr(child, 'data') and child.data == '_iambig' + + def _collapse_iambig(children): + #-- + + ## + + ## + + if children and _is_iambig_tree(children[0]): + iambig_node = children[0] + result = [] + for grandchild in iambig_node.children: + collapsed = _collapse_iambig(grandchild.children) + if collapsed: + for child in collapsed: + child.children += children[1:] + result += collapsed + else: + new_tree = self.tree_class('_inter', grandchild.children + children[1:]) + result.append(new_tree) + return result + + collapsed = _collapse_iambig(children) + if collapsed: + processed_nodes = [self.node_builder(c.children) for c in collapsed] + return self.tree_class('_ambig', processed_nodes) + + return self.node_builder(children) + + + +def inplace_transformer(func): + @wraps(func) + def f(children): + ## + + tree = Tree(func.__name__, children) + return func(tree) + return f + + +def apply_visit_wrapper(func, name, wrapper): + if wrapper is _vargs_meta or wrapper is _vargs_meta_inline: + raise NotImplementedError("Meta args not supported for internal transformer; use YourTransformer().transform(parser.parse()) instead") + + @wraps(func) + def f(children): + return wrapper(func, name, children, None) + return f + + +class ParseTreeBuilder: + def __init__(self, rules, tree_class, propagate_positions=False, ambiguous=False, maybe_placeholders=False): + self.tree_class = tree_class + self.propagate_positions = propagate_positions + self.ambiguous = ambiguous + self.maybe_placeholders = maybe_placeholders + + self.rule_builders = list(self._init_builders(rules)) + + def _init_builders(self, rules): + propagate_positions = make_propagate_positions(self.propagate_positions) + + for rule in rules: + options = rule.options + keep_all_tokens = options.keep_all_tokens + expand_single_child = options.expand1 + + wrapper_chain = list(filter(None, [ + (expand_single_child and not rule.alias) and ExpandSingleChild, + maybe_create_child_filter(rule.expansion, keep_all_tokens, self.ambiguous, options.empty_indices if self.maybe_placeholders else None), + propagate_positions, + self.ambiguous and maybe_create_ambiguous_expander(self.tree_class, rule.expansion, keep_all_tokens), + self.ambiguous and partial(AmbiguousIntermediateExpander, self.tree_class) + ])) + + yield rule, wrapper_chain + + def create_callback(self, transformer=None): + callbacks = {} + + default_handler = getattr(transformer, '__default__', None) + if default_handler: + def default_callback(data, children): + return default_handler(data, children, None) + else: + default_callback = self.tree_class + + for rule, wrapper_chain in self.rule_builders: + + user_callback_name = rule.alias or rule.options.template_source or rule.origin.name + try: + f = getattr(transformer, user_callback_name) + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + f = apply_visit_wrapper(f, user_callback_name, wrapper) + elif isinstance(transformer, Transformer_InPlace): + f = inplace_transformer(f) + except AttributeError: + f = partial(default_callback, user_callback_name) + + for w in wrapper_chain: + f = w(f) + + if rule in callbacks: + raise GrammarError("Rule '%s' already exists" % (rule,)) + + callbacks[rule] = f + + return callbacks + + + +class Action: + def __init__(self, name): + self.name = name + def __str__(self): + return self.name + def __repr__(self): + return str(self) + +Shift = Action('Shift') +Reduce = Action('Reduce') + +StateT = TypeVar("StateT") + +class ParseTableBase(Generic[StateT]): + states: Dict[StateT, Dict[str, Tuple]] + start_states: Dict[str, StateT] + end_states: Dict[str, StateT] + + def __init__(self, states, start_states, end_states): + self.states = states + self.start_states = start_states + self.end_states = end_states + + def serialize(self, memo): + tokens = Enumerator() + + states = { + state: {tokens.get(token): ((1, arg.serialize(memo)) if action is Reduce else (0, arg)) + for token, (action, arg) in actions.items()} + for state, actions in self.states.items() + } + + return { + 'tokens': tokens.reversed(), + 'states': states, + 'start_states': self.start_states, + 'end_states': self.end_states, + } + + @classmethod + def deserialize(cls, data, memo): + tokens = data['tokens'] + states = { + state: {tokens[token]: ((Reduce, Rule.deserialize(arg, memo)) if action==1 else (Shift, arg)) + for token, (action, arg) in actions.items()} + for state, actions in data['states'].items() + } + return cls(states, data['start_states'], data['end_states']) + +class ParseTable(ParseTableBase['State']): + #-- + pass + + +class IntParseTable(ParseTableBase[int]): + #-- + + @classmethod + def from_ParseTable(cls, parse_table: ParseTable): + enum = list(parse_table.states) + state_to_idx: Dict['State', int] = {s:i for i,s in enumerate(enum)} + int_states = {} + + for s, la in parse_table.states.items(): + la = {k:(v[0], state_to_idx[v[1]]) if v[0] is Shift else v + for k,v in la.items()} + int_states[ state_to_idx[s] ] = la + + + start_states = {start:state_to_idx[s] for start, s in parse_table.start_states.items()} + end_states = {start:state_to_idx[s] for start, s in parse_table.end_states.items()} + return cls(int_states, start_states, end_states) + + + +class ParseConf(Generic[StateT]): + __slots__ = 'parse_table', 'callbacks', 'start', 'start_state', 'end_state', 'states' + + parse_table: ParseTableBase[StateT] + callbacks: ParserCallbacks + start: str + + start_state: StateT + end_state: StateT + states: Dict[StateT, Dict[str, tuple]] + + def __init__(self, parse_table: ParseTableBase[StateT], callbacks: ParserCallbacks, start: str): + self.parse_table = parse_table + + self.start_state = self.parse_table.start_states[start] + self.end_state = self.parse_table.end_states[start] + self.states = self.parse_table.states + + self.callbacks = callbacks + self.start = start + +class ParserState(Generic[StateT]): + __slots__ = 'parse_conf', 'lexer', 'state_stack', 'value_stack' + + parse_conf: ParseConf[StateT] + lexer: LexerThread + state_stack: List[StateT] + value_stack: list + + def __init__(self, parse_conf: ParseConf[StateT], lexer: LexerThread, state_stack=None, value_stack=None): + self.parse_conf = parse_conf + self.lexer = lexer + self.state_stack = state_stack or [self.parse_conf.start_state] + self.value_stack = value_stack or [] + + @property + def position(self) -> StateT: + return self.state_stack[-1] + + ## + + def __eq__(self, other) -> bool: + if not isinstance(other, ParserState): + return NotImplemented + return len(self.state_stack) == len(other.state_stack) and self.position == other.position + + def __copy__(self): + return self.copy() + + def copy(self, deepcopy_values=True) -> 'ParserState[StateT]': + return type(self)( + self.parse_conf, + self.lexer, ## + + copy(self.state_stack), + deepcopy(self.value_stack) if deepcopy_values else copy(self.value_stack), + ) + + def feed_token(self, token: Token, is_end=False) -> Any: + state_stack = self.state_stack + value_stack = self.value_stack + states = self.parse_conf.states + end_state = self.parse_conf.end_state + callbacks = self.parse_conf.callbacks + + while True: + state = state_stack[-1] + try: + action, arg = states[state][token.type] + except KeyError: + expected = {s for s in states[state].keys() if s.isupper()} + raise UnexpectedToken(token, expected, state=self, interactive_parser=None) + + assert arg != end_state + + if action is Shift: + ## + + assert not is_end + state_stack.append(arg) + value_stack.append(token if token.type not in callbacks else callbacks[token.type](token)) + return + else: + ## + + rule = arg + size = len(rule.expansion) + if size: + s = value_stack[-size:] + del state_stack[-size:] + del value_stack[-size:] + else: + s = [] + + value = callbacks[rule](s) if callbacks else s + + _action, new_state = states[state_stack[-1]][rule.origin.name] + assert _action is Shift + state_stack.append(new_state) + value_stack.append(value) + + if is_end and state_stack[-1] == end_state: + return value_stack[-1] + + +class LALR_Parser(Serialize): + def __init__(self, parser_conf: ParserConf, debug: bool=False, strict: bool=False): + analysis = LALR_Analyzer(parser_conf, debug=debug, strict=strict) + analysis.compute_lalr() + callbacks = parser_conf.callbacks + + self._parse_table = analysis.parse_table + self.parser_conf = parser_conf + self.parser = _Parser(analysis.parse_table, callbacks, debug) + + @classmethod + def deserialize(cls, data, memo, callbacks, debug=False): + inst = cls.__new__(cls) + inst._parse_table = IntParseTable.deserialize(data, memo) + inst.parser = _Parser(inst._parse_table, callbacks, debug) + return inst + + def serialize(self, memo: Any = None) -> Dict[str, Any]: + return self._parse_table.serialize(memo) + + def parse_interactive(self, lexer: LexerThread, start: str): + return self.parser.parse(lexer, start, start_interactive=True) + + def parse(self, lexer, start, on_error=None): + try: + return self.parser.parse(lexer, start) + except UnexpectedInput as e: + if on_error is None: + raise + + while True: + if isinstance(e, UnexpectedCharacters): + s = e.interactive_parser.lexer_thread.state + p = s.line_ctr.char_pos + + if not on_error(e): + raise e + + if isinstance(e, UnexpectedCharacters): + ## + + if p == s.line_ctr.char_pos: + s.line_ctr.feed(s.text.text[p:p+1]) + + try: + return e.interactive_parser.resume_parse() + except UnexpectedToken as e2: + if (isinstance(e, UnexpectedToken) + and e.token.type == e2.token.type == '$END' + and e.interactive_parser == e2.interactive_parser): + ## + + raise e2 + e = e2 + except UnexpectedCharacters as e2: + e = e2 + + +class _Parser: + parse_table: ParseTableBase + callbacks: ParserCallbacks + debug: bool + + def __init__(self, parse_table: ParseTableBase, callbacks: ParserCallbacks, debug: bool=False): + self.parse_table = parse_table + self.callbacks = callbacks + self.debug = debug + + def parse(self, lexer: LexerThread, start: str, value_stack=None, state_stack=None, start_interactive=False): + parse_conf = ParseConf(self.parse_table, self.callbacks, start) + parser_state = ParserState(parse_conf, lexer, state_stack, value_stack) + if start_interactive: + return InteractiveParser(self, parser_state, parser_state.lexer) + return self.parse_from_state(parser_state) + + + def parse_from_state(self, state: ParserState, last_token: Optional[Token]=None): + #-- + try: + token = last_token + for token in state.lexer.lex(state): + assert token is not None + state.feed_token(token) + + end_token = Token.new_borrow_pos('$END', '', token) if token else Token('$END', '', 0, 1, 1) + return state.feed_token(end_token, True) + except UnexpectedInput as e: + try: + e.interactive_parser = InteractiveParser(self, state, state.lexer) + except NameError: + pass + raise e + except Exception as e: + if self.debug: + print("") + print("STATE STACK DUMP") + print("----------------") + for i, s in enumerate(state.state_stack): + print('%d)' % i , s) + print("") + + raise + + +class InteractiveParser: + #-- + def __init__(self, parser, parser_state: ParserState, lexer_thread: LexerThread): + self.parser = parser + self.parser_state = parser_state + self.lexer_thread = lexer_thread + self.result = None + + @property + def lexer_state(self) -> LexerThread: + warnings.warn("lexer_state will be removed in subsequent releases. Use lexer_thread instead.", DeprecationWarning) + return self.lexer_thread + + def feed_token(self, token: Token): + #-- + return self.parser_state.feed_token(token, token.type == '$END') + + def iter_parse(self) -> Iterator[Token]: + #-- + for token in self.lexer_thread.lex(self.parser_state): + yield token + self.result = self.feed_token(token) + + def exhaust_lexer(self) -> List[Token]: + #-- + return list(self.iter_parse()) + + + def feed_eof(self, last_token=None): + #-- + eof = Token.new_borrow_pos('$END', '', last_token) if last_token is not None else self.lexer_thread._Token('$END', '', 0, 1, 1) + return self.feed_token(eof) + + + def __copy__(self): + #-- + return self.copy() + + def copy(self, deepcopy_values=True): + return type(self)( + self.parser, + self.parser_state.copy(deepcopy_values=deepcopy_values), + copy(self.lexer_thread), + ) + + def __eq__(self, other): + if not isinstance(other, InteractiveParser): + return False + + return self.parser_state == other.parser_state and self.lexer_thread == other.lexer_thread + + def as_immutable(self): + #-- + p = copy(self) + return ImmutableInteractiveParser(p.parser, p.parser_state, p.lexer_thread) + + def pretty(self): + #-- + out = ["Parser choices:"] + for k, v in self.choices().items(): + out.append('\t- %s -> %r' % (k, v)) + out.append('stack size: %s' % len(self.parser_state.state_stack)) + return '\n'.join(out) + + def choices(self): + #-- + return self.parser_state.parse_conf.parse_table.states[self.parser_state.position] + + def accepts(self): + #-- + accepts = set() + conf_no_callbacks = copy(self.parser_state.parse_conf) + ## + + ## + + conf_no_callbacks.callbacks = {} + for t in self.choices(): + if t.isupper(): ## + + new_cursor = self.copy(deepcopy_values=False) + new_cursor.parser_state.parse_conf = conf_no_callbacks + try: + new_cursor.feed_token(self.lexer_thread._Token(t, '')) + except UnexpectedToken: + pass + else: + accepts.add(t) + return accepts + + def resume_parse(self): + #-- + return self.parser.parse_from_state(self.parser_state, last_token=self.lexer_thread.state.last_token) + + + +class ImmutableInteractiveParser(InteractiveParser): + #-- + + result = None + + def __hash__(self): + return hash((self.parser_state, self.lexer_thread)) + + def feed_token(self, token): + c = copy(self) + c.result = InteractiveParser.feed_token(c, token) + return c + + def exhaust_lexer(self): + #-- + cursor = self.as_mutable() + cursor.exhaust_lexer() + return cursor.as_immutable() + + def as_mutable(self): + #-- + p = copy(self) + return InteractiveParser(p.parser, p.parser_state, p.lexer_thread) + + + +def _wrap_lexer(lexer_class): + future_interface = getattr(lexer_class, '__future_interface__', 0) + if future_interface == 2: + return lexer_class + elif future_interface == 1: + class CustomLexerWrapper1(Lexer): + def __init__(self, lexer_conf): + self.lexer = lexer_class(lexer_conf) + def lex(self, lexer_state, parser_state): + if isinstance(lexer_state.text, TextSlice) and not lexer_state.text.is_complete_text(): + raise TypeError("Interface=1 Custom Lexer don't support TextSlice") + lexer_state.text = lexer_state.text + return self.lexer.lex(lexer_state, parser_state) + return CustomLexerWrapper1 + elif future_interface == 0: + class CustomLexerWrapper0(Lexer): + def __init__(self, lexer_conf): + self.lexer = lexer_class(lexer_conf) + + def lex(self, lexer_state, parser_state): + if isinstance(lexer_state.text, TextSlice): + if not lexer_state.text.is_complete_text(): + raise TypeError("Interface=0 Custom Lexer don't support TextSlice") + return self.lexer.lex(lexer_state.text.text) + return self.lexer.lex(lexer_state.text) + return CustomLexerWrapper0 + else: + raise ValueError(f"Unknown __future_interface__ value {future_interface}, integer 0-2 expected") + + +def _deserialize_parsing_frontend(data, memo, lexer_conf, callbacks, options): + parser_conf = ParserConf.deserialize(data['parser_conf'], memo) + cls = (options and options._plugins.get('LALR_Parser')) or LALR_Parser + parser = cls.deserialize(data['parser'], memo, callbacks, options.debug) + parser_conf.callbacks = callbacks + return ParsingFrontend(lexer_conf, parser_conf, options, parser=parser) + + +_parser_creators: 'Dict[str, Callable[[LexerConf, Any, Any], Any]]' = {} + + +class ParsingFrontend(Serialize): + __serialize_fields__ = 'lexer_conf', 'parser_conf', 'parser' + + lexer_conf: LexerConf + parser_conf: ParserConf + options: Any + + def __init__(self, lexer_conf: LexerConf, parser_conf: ParserConf, options, parser=None): + self.parser_conf = parser_conf + self.lexer_conf = lexer_conf + self.options = options + + ## + + if parser: ## + + self.parser = parser + else: + create_parser = _parser_creators.get(parser_conf.parser_type) + assert create_parser is not None, "{} is not supported in standalone mode".format( + parser_conf.parser_type + ) + self.parser = create_parser(lexer_conf, parser_conf, options) + + ## + + lexer_type = options.lexer if (options and options.lexer) else lexer_conf.lexer_type + self.skip_lexer = False + if lexer_type in ('dynamic', 'dynamic_complete'): + assert lexer_conf.postlex is None + self.skip_lexer = True + return + + if isinstance(lexer_type, type): + assert issubclass(lexer_type, Lexer) or hasattr(lexer_type, 'lex') + self.lexer = _wrap_lexer(lexer_type)(lexer_conf) + elif isinstance(lexer_type, str): + create_lexer = { + 'basic': create_basic_lexer, + 'contextual': create_contextual_lexer, + }[lexer_type] + self.lexer = create_lexer(lexer_conf, self.parser, lexer_conf.postlex, options) + else: + raise TypeError("Bad value for lexer_type: {lexer_type}") + + if lexer_conf.postlex: + self.lexer = PostLexConnector(self.lexer, lexer_conf.postlex) + + def _verify_start(self, start=None): + if start is None: + start_decls = self.parser_conf.start + if len(start_decls) > 1: + raise ConfigurationError("Lark initialized with more than 1 possible start rule. Must specify which start rule to parse", start_decls) + start ,= start_decls + elif start not in self.parser_conf.start: + raise ConfigurationError("Unknown start rule %s. Must be one of %r" % (start, self.parser_conf.start)) + return start + + def _make_lexer_thread(self, text: Optional[LarkInput]) -> Union[LarkInput, LexerThread, None]: + cls = (self.options and self.options._plugins.get('LexerThread')) or LexerThread + if self.skip_lexer: + return text + if text is None: + return cls(self.lexer, None) + if isinstance(text, (str, bytes, TextSlice)): + return cls.from_text(self.lexer, text) + return cls.from_custom_input(self.lexer, text) + + def parse(self, text: Optional[LarkInput], start=None, on_error=None): + if self.lexer_conf.lexer_type in ("dynamic", "dynamic_complete"): + if isinstance(text, TextSlice) and not text.is_complete_text(): + raise TypeError(f"Lexer {self.lexer_conf.lexer_type} does not support text slices.") + + chosen_start = self._verify_start(start) + kw = {} if on_error is None else {'on_error': on_error} + stream = self._make_lexer_thread(text) + return self.parser.parse(stream, chosen_start, **kw) + + def parse_interactive(self, text: Optional[TextOrSlice]=None, start=None): + ## + + ## + + chosen_start = self._verify_start(start) + if self.parser_conf.parser_type != 'lalr': + raise ConfigurationError("parse_interactive() currently only works with parser='lalr' ") + stream = self._make_lexer_thread(text) + return self.parser.parse_interactive(stream, chosen_start) + + +def _validate_frontend_args(parser, lexer) -> None: + assert_config(parser, ('lalr', 'earley', 'cyk')) + if not isinstance(lexer, type): ## + + expected = { + 'lalr': ('basic', 'contextual'), + 'earley': ('basic', 'dynamic', 'dynamic_complete'), + 'cyk': ('basic', ), + }[parser] + assert_config(lexer, expected, 'Parser %r does not support lexer %%r, expected one of %%s' % parser) + + +def _get_lexer_callbacks(transformer, terminals): + result = {} + for terminal in terminals: + callback = getattr(transformer, terminal.name, None) + if callback is not None: + result[terminal.name] = callback + return result + +class PostLexConnector: + def __init__(self, lexer, postlexer): + self.lexer = lexer + self.postlexer = postlexer + + def lex(self, lexer_state, parser_state): + i = self.lexer.lex(lexer_state, parser_state) + return self.postlexer.process(i) + + + +def create_basic_lexer(lexer_conf, parser, postlex, options) -> BasicLexer: + cls = (options and options._plugins.get('BasicLexer')) or BasicLexer + return cls(lexer_conf) + +def create_contextual_lexer(lexer_conf: LexerConf, parser, postlex, options) -> ContextualLexer: + cls = (options and options._plugins.get('ContextualLexer')) or ContextualLexer + parse_table: ParseTableBase[int] = parser._parse_table + states: Dict[int, Collection[str]] = {idx:list(t.keys()) for idx, t in parse_table.states.items()} + always_accept: Collection[str] = postlex.always_accept if postlex else () + return cls(lexer_conf, states, always_accept=always_accept) + +def create_lalr_parser(lexer_conf: LexerConf, parser_conf: ParserConf, options=None) -> LALR_Parser: + debug = options.debug if options else False + strict = options.strict if options else False + cls = (options and options._plugins.get('LALR_Parser')) or LALR_Parser + return cls(parser_conf, debug=debug, strict=strict) + +_parser_creators['lalr'] = create_lalr_parser + + + + +class PostLex(ABC): + @abstractmethod + def process(self, stream: Iterator[Token]) -> Iterator[Token]: + return stream + + always_accept: Iterable[str] = () + +class LarkOptions(Serialize): + #-- + + start: List[str] + debug: bool + strict: bool + transformer: 'Optional[Transformer]' + propagate_positions: Union[bool, str] + maybe_placeholders: bool + cache: Union[bool, str] + cache_grammar: bool + regex: bool + g_regex_flags: int + keep_all_tokens: bool + tree_class: Optional[Callable[[str, List], Any]] + parser: _ParserArgType + lexer: _LexerArgType + ambiguity: 'Literal["auto", "resolve", "explicit", "forest"]' + postlex: Optional[PostLex] + priority: 'Optional[Literal["auto", "normal", "invert"]]' + lexer_callbacks: Dict[str, Callable[[Token], Token]] + use_bytes: bool + ordered_sets: bool + edit_terminals: Optional[Callable[[TerminalDef], TerminalDef]] + import_paths: 'List[Union[str, Callable[[Union[None, str, PackageResource], str], Tuple[str, str]]]]' + source_path: Optional[str] + + OPTIONS_DOC = r""" + **=== General Options ===** + + start + The start symbol. Either a string, or a list of strings for multiple possible starts (Default: "start") + debug + Display debug information and extra warnings. Use only when debugging (Default: ``False``) + When used with Earley, it generates a forest graph as "sppf.png", if 'dot' is installed. + strict + Throw an exception on any potential ambiguity, including shift/reduce conflicts, and regex collisions. + transformer + Applies the transformer to every parse tree (equivalent to applying it after the parse, but faster) + propagate_positions + Propagates positional attributes into the 'meta' attribute of all tree branches. + Sets attributes: (line, column, end_line, end_column, start_pos, end_pos, + container_line, container_column, container_end_line, container_end_column) + Accepts ``False``, ``True``, or a callable, which will filter which nodes to ignore when propagating. + maybe_placeholders + When ``True``, the ``[]`` operator returns ``None`` when not matched. + When ``False``, ``[]`` behaves like the ``?`` operator, and returns no value at all. + (default= ``True``) + cache + Cache the results of the Lark grammar analysis, for x2 to x3 faster loading. LALR only for now. + + - When ``False``, does nothing (default) + - When ``True``, caches to a temporary file in the local directory + - When given a string, caches to the path pointed by the string + cache_grammar + For use with ``cache`` option. When ``True``, the unanalyzed grammar is also included in the cache. + Useful for classes that require the ``Lark.grammar`` to be present (e.g. Reconstructor). + (default= ``False``) + regex + When True, uses the ``regex`` module instead of the stdlib ``re``. + g_regex_flags + Flags that are applied to all terminals (both regex and strings) + keep_all_tokens + Prevent the tree builder from automagically removing "punctuation" tokens (Default: ``False``) + tree_class + Lark will produce trees comprised of instances of this class instead of the default ``lark.Tree``. + + **=== Algorithm Options ===** + + parser + Decides which parser engine to use. Accepts "earley" or "lalr". (Default: "earley"). + (there is also a "cyk" option for legacy) + lexer + Decides whether or not to use a lexer stage + + - "auto" (default): Choose for me based on the parser + - "basic": Use a basic lexer + - "contextual": Stronger lexer (only works with parser="lalr") + - "dynamic": Flexible and powerful (only with parser="earley") + - "dynamic_complete": Same as dynamic, but tries *every* variation of tokenizing possible. + ambiguity + Decides how to handle ambiguity in the parse. Only relevant if parser="earley" + + - "resolve": The parser will automatically choose the simplest derivation + (it chooses consistently: greedy for tokens, non-greedy for rules) + - "explicit": The parser will return all derivations wrapped in "_ambig" tree nodes (i.e. a forest). + - "forest": The parser will return the root of the shared packed parse forest. + + **=== Misc. / Domain Specific Options ===** + + postlex + Lexer post-processing (Default: ``None``) Only works with the basic and contextual lexers. + priority + How priorities should be evaluated - "auto", ``None``, "normal", "invert" (Default: "auto") + lexer_callbacks + Dictionary of callbacks for the lexer. May alter tokens during lexing. Use with caution. + use_bytes + Accept an input of type ``bytes`` instead of ``str``. + ordered_sets + Should Earley use ordered-sets to achieve stable output (~10% slower than regular sets. Default: True) + edit_terminals + A callback for editing the terminals before parse. + import_paths + A List of either paths or loader functions to specify from where grammars are imported + source_path + Override the source of from where the grammar was loaded. Useful for relative imports and unconventional grammar loading + **=== End of Options ===** + """ + if __doc__: + __doc__ += OPTIONS_DOC + + + ## + + ## + + ## + + ## + + ## + + ## + + _defaults: Dict[str, Any] = { + 'debug': False, + 'strict': False, + 'keep_all_tokens': False, + 'tree_class': None, + 'cache': False, + 'cache_grammar': False, + 'postlex': None, + 'parser': 'earley', + 'lexer': 'auto', + 'transformer': None, + 'start': 'start', + 'priority': 'auto', + 'ambiguity': 'auto', + 'regex': False, + 'propagate_positions': False, + 'lexer_callbacks': {}, + 'maybe_placeholders': True, + 'edit_terminals': None, + 'g_regex_flags': 0, + 'use_bytes': False, + 'ordered_sets': True, + 'import_paths': [], + 'source_path': None, + '_plugins': {}, + } + + def __init__(self, options_dict: Dict[str, Any]) -> None: + o = dict(options_dict) + + options = {} + for name, default in self._defaults.items(): + if name in o: + value = o.pop(name) + if isinstance(default, bool) and name not in ('cache', 'use_bytes', 'propagate_positions'): + value = bool(value) + else: + value = default + + options[name] = value + + if isinstance(options['start'], str): + options['start'] = [options['start']] + + self.__dict__['options'] = options + + + assert_config(self.parser, ('earley', 'lalr', 'cyk', None)) + + if self.parser == 'earley' and self.transformer: + raise ConfigurationError('Cannot specify an embedded transformer when using the Earley algorithm. ' + 'Please use your transformer on the resulting parse tree, or use a different algorithm (i.e. LALR)') + + if self.cache_grammar and not self.cache: + raise ConfigurationError('cache_grammar cannot be set when cache is disabled') + + if o: + raise ConfigurationError("Unknown options: %s" % o.keys()) + + def __getattr__(self, name: str) -> Any: + try: + return self.__dict__['options'][name] + except KeyError as e: + raise AttributeError(e) + + def __setattr__(self, name: str, value: str) -> None: + assert_config(name, self.options.keys(), "%r isn't a valid option. Expected one of: %s") + self.options[name] = value + + def serialize(self, memo = None) -> Dict[str, Any]: + return self.options + + @classmethod + def deserialize(cls, data: Dict[str, Any], memo: Dict[int, Union[TerminalDef, Rule]]) -> "LarkOptions": + return cls(data) + + +## + +## + +_LOAD_ALLOWED_OPTIONS = {'lexer', 'postlex', 'transformer', 'lexer_callbacks', 'use_bytes', 'debug', 'g_regex_flags', 'regex', 'propagate_positions', 'tree_class', '_plugins'} + +_VALID_PRIORITY_OPTIONS = ('auto', 'normal', 'invert', None) +_VALID_AMBIGUITY_OPTIONS = ('auto', 'resolve', 'explicit', 'forest') + + +_T = TypeVar('_T', bound="Lark") + +class Lark(Serialize): + #-- + + source_path: str + source_grammar: str + grammar: 'Grammar' + options: LarkOptions + lexer: Lexer + parser: 'ParsingFrontend' + terminals: Collection[TerminalDef] + + __serialize_fields__ = ['parser', 'rules', 'options'] + + def __init__(self, grammar: 'Union[Grammar, str, IO[str]]', **options) -> None: + self.options = LarkOptions(options) + re_module: types.ModuleType + + ## + + if self.options.cache_grammar: + self.__serialize_fields__ = self.__serialize_fields__ + ['grammar'] + + ## + + use_regex = self.options.regex + if use_regex: + if _has_regex: + re_module = regex + else: + raise ImportError('`regex` module must be installed if calling `Lark(regex=True)`.') + else: + re_module = re + + ## + + if self.options.source_path is None: + try: + self.source_path = grammar.name ## + + except AttributeError: + self.source_path = '' + else: + self.source_path = self.options.source_path + + ## + + try: + read = grammar.read ## + + except AttributeError: + pass + else: + grammar = read() + + cache_fn = None + cache_sha256 = None + if isinstance(grammar, str): + self.source_grammar = grammar + if self.options.use_bytes: + if not grammar.isascii(): + raise ConfigurationError("Grammar must be ascii only, when use_bytes=True") + + if self.options.cache: + if self.options.parser != 'lalr': + raise ConfigurationError("cache only works with parser='lalr' for now") + + unhashable = ('transformer', 'postlex', 'lexer_callbacks', 'edit_terminals', '_plugins') + options_str = ''.join(k+str(v) for k, v in options.items() if k not in unhashable) + from . import __version__ + s = grammar + options_str + __version__ + str(sys.version_info[:2]) + cache_sha256 = sha256_digest(s) + + if isinstance(self.options.cache, str): + cache_fn = self.options.cache + else: + if self.options.cache is not True: + raise ConfigurationError("cache argument must be bool or str") + + try: + username = getpass.getuser() + except Exception: + ## + + ## + + ## + + username = "unknown" + + + cache_fn = tempfile.gettempdir() + "/.lark_%s_%s_%s_%s_%s.tmp" % ( + "cache_grammar" if self.options.cache_grammar else "cache", username, cache_sha256, *sys.version_info[:2]) + + old_options = self.options + try: + with FS.open(cache_fn, 'rb') as f: + logger.debug('Loading grammar from cache: %s', cache_fn) + ## + + for name in (set(options) - _LOAD_ALLOWED_OPTIONS): + del options[name] + file_sha256 = f.readline().rstrip(b'\n') + cached_used_files = pickle.load(f) + if file_sha256 == cache_sha256.encode('utf8') and verify_used_files(cached_used_files): + cached_parser_data = pickle.load(f) + self._load(cached_parser_data, **options) + return + except FileNotFoundError: + ## + + pass + except Exception: ## + + logger.exception("Failed to load Lark from cache: %r. We will try to carry on.", cache_fn) + + ## + + ## + + self.options = old_options + + + ## + + self.grammar, used_files = load_grammar(grammar, self.source_path, self.options.import_paths, self.options.keep_all_tokens) + else: + assert isinstance(grammar, Grammar) + self.grammar = grammar + + + if self.options.lexer == 'auto': + if self.options.parser == 'lalr': + self.options.lexer = 'contextual' + elif self.options.parser == 'earley': + if self.options.postlex is not None: + logger.info("postlex can't be used with the dynamic lexer, so we use 'basic' instead. " + "Consider using lalr with contextual instead of earley") + self.options.lexer = 'basic' + else: + self.options.lexer = 'dynamic' + elif self.options.parser == 'cyk': + self.options.lexer = 'basic' + else: + assert False, self.options.parser + lexer = self.options.lexer + if isinstance(lexer, type): + assert issubclass(lexer, Lexer) ## + + else: + assert_config(lexer, ('basic', 'contextual', 'dynamic', 'dynamic_complete')) + if self.options.postlex is not None and 'dynamic' in lexer: + raise ConfigurationError("Can't use postlex with a dynamic lexer. Use basic or contextual instead") + + if self.options.ambiguity == 'auto': + if self.options.parser == 'earley': + self.options.ambiguity = 'resolve' + else: + assert_config(self.options.parser, ('earley', 'cyk'), "%r doesn't support disambiguation. Use one of these parsers instead: %s") + + if self.options.priority == 'auto': + self.options.priority = 'normal' + + if self.options.priority not in _VALID_PRIORITY_OPTIONS: + raise ConfigurationError("invalid priority option: %r. Must be one of %r" % (self.options.priority, _VALID_PRIORITY_OPTIONS)) + if self.options.ambiguity not in _VALID_AMBIGUITY_OPTIONS: + raise ConfigurationError("invalid ambiguity option: %r. Must be one of %r" % (self.options.ambiguity, _VALID_AMBIGUITY_OPTIONS)) + + if self.options.parser is None: + terminals_to_keep = '*' ## + + elif self.options.postlex is not None: + terminals_to_keep = set(self.options.postlex.always_accept) + else: + terminals_to_keep = set() + + ## + + self.terminals, self.rules, self.ignore_tokens = self.grammar.compile(self.options.start, terminals_to_keep) + + if self.options.edit_terminals: + for t in self.terminals: + self.options.edit_terminals(t) + + self._terminals_dict = {t.name: t for t in self.terminals} + + ## + + if self.options.priority == 'invert': + for rule in self.rules: + if rule.options.priority is not None: + rule.options.priority = -rule.options.priority + for term in self.terminals: + term.priority = -term.priority + ## + + ## + + ## + + elif self.options.priority is None: + for rule in self.rules: + if rule.options.priority is not None: + rule.options.priority = None + for term in self.terminals: + term.priority = 0 + + ## + + self.lexer_conf = LexerConf( + self.terminals, re_module, self.ignore_tokens, self.options.postlex, + self.options.lexer_callbacks, self.options.g_regex_flags, use_bytes=self.options.use_bytes, strict=self.options.strict + ) + + if self.options.parser: + self.parser = self._build_parser() + elif lexer: + self.lexer = self._build_lexer() + + if cache_fn: + logger.debug('Saving grammar to cache: %s', cache_fn) + try: + with FS.open(cache_fn, 'wb') as f: + assert cache_sha256 is not None + f.write(cache_sha256.encode('utf8') + b'\n') + pickle.dump(used_files, f) + self.save(f, _LOAD_ALLOWED_OPTIONS) + except IOError as e: + logger.exception("Failed to save Lark to cache: %r.", cache_fn, e) + + if __doc__: + __doc__ += "\n\n" + LarkOptions.OPTIONS_DOC + + def _build_lexer(self, dont_ignore: bool=False) -> BasicLexer: + lexer_conf = self.lexer_conf + if dont_ignore: + from copy import copy + lexer_conf = copy(lexer_conf) + lexer_conf.ignore = () + return BasicLexer(lexer_conf) + + def _prepare_callbacks(self) -> None: + self._callbacks = {} + ## + + if self.options.ambiguity != 'forest': + self._parse_tree_builder = ParseTreeBuilder( + self.rules, + self.options.tree_class or Tree, + self.options.propagate_positions, + self.options.parser != 'lalr' and self.options.ambiguity == 'explicit', + self.options.maybe_placeholders + ) + self._callbacks = self._parse_tree_builder.create_callback(self.options.transformer) + self._callbacks.update(_get_lexer_callbacks(self.options.transformer, self.terminals)) + + def _build_parser(self) -> "ParsingFrontend": + self._prepare_callbacks() + _validate_frontend_args(self.options.parser, self.options.lexer) + parser_conf = ParserConf(self.rules, self._callbacks, self.options.start) + return _construct_parsing_frontend( + self.options.parser, + self.options.lexer, + self.lexer_conf, + parser_conf, + options=self.options + ) + + def save(self, f, exclude_options: Collection[str] = ()) -> None: + #-- + if self.options.parser != 'lalr': + raise NotImplementedError("Lark.save() is only implemented for the LALR(1) parser.") + data, m = self.memo_serialize([TerminalDef, Rule]) + if exclude_options: + data["options"] = {n: v for n, v in data["options"].items() if n not in exclude_options} + pickle.dump({'data': data, 'memo': m}, f, protocol=pickle.HIGHEST_PROTOCOL) + + @classmethod + def load(cls: Type[_T], f) -> _T: + #-- + inst = cls.__new__(cls) + return inst._load(f) + + def _deserialize_lexer_conf(self, data: Dict[str, Any], memo: Dict[int, Union[TerminalDef, Rule]], options: LarkOptions) -> LexerConf: + lexer_conf = LexerConf.deserialize(data['lexer_conf'], memo) + lexer_conf.callbacks = options.lexer_callbacks or {} + lexer_conf.re_module = regex if options.regex else re + lexer_conf.use_bytes = options.use_bytes + lexer_conf.g_regex_flags = options.g_regex_flags + lexer_conf.skip_validation = True + lexer_conf.postlex = options.postlex + return lexer_conf + + def _load(self: _T, f: Any, **kwargs) -> _T: + if isinstance(f, dict): + d = f + else: + d = pickle.load(f) + memo_json = d['memo'] + data = d['data'] + + assert memo_json + memo = SerializeMemoizer.deserialize(memo_json, {'Rule': Rule, 'TerminalDef': TerminalDef}, {}) + if 'grammar' in data: + self.grammar = Grammar.deserialize(data['grammar'], memo) + options = dict(data['options']) + if (set(kwargs) - _LOAD_ALLOWED_OPTIONS) & set(LarkOptions._defaults): + raise ConfigurationError("Some options are not allowed when loading a Parser: {}" + .format(set(kwargs) - _LOAD_ALLOWED_OPTIONS)) + options.update(kwargs) + self.options = LarkOptions.deserialize(options, memo) + self.rules = [Rule.deserialize(r, memo) for r in data['rules']] + self.source_path = '' + _validate_frontend_args(self.options.parser, self.options.lexer) + self.lexer_conf = self._deserialize_lexer_conf(data['parser'], memo, self.options) + self.terminals = self.lexer_conf.terminals + self._prepare_callbacks() + self._terminals_dict = {t.name: t for t in self.terminals} + self.parser = _deserialize_parsing_frontend( + data['parser'], + memo, + self.lexer_conf, + self._callbacks, + self.options, ## + + ) + return self + + @classmethod + def _load_from_dict(cls, data, memo, **kwargs): + inst = cls.__new__(cls) + return inst._load({'data': data, 'memo': memo}, **kwargs) + + @classmethod + def open(cls: Type[_T], grammar_filename: str, rel_to: Optional[str]=None, **options) -> _T: + #-- + if rel_to: + basepath = os.path.dirname(rel_to) + grammar_filename = os.path.join(basepath, grammar_filename) + with open(grammar_filename, encoding='utf8') as f: + return cls(f, **options) + + @classmethod + def open_from_package(cls: Type[_T], package: str, grammar_path: str, search_paths: 'Sequence[str]'=[""], **options) -> _T: + #-- + package_loader = FromPackageLoader(package, search_paths) + full_path, text = package_loader(None, grammar_path) + options.setdefault('source_path', full_path) + options.setdefault('import_paths', []) + options['import_paths'].append(package_loader) + return cls(text, **options) + + def __repr__(self): + return 'Lark(open(%r), parser=%r, lexer=%r, ...)' % (self.source_path, self.options.parser, self.options.lexer) + + + def lex(self, text: TextOrSlice, dont_ignore: bool=False) -> Iterator[Token]: + #-- + lexer: Lexer + if not hasattr(self, 'lexer') or dont_ignore: + lexer = self._build_lexer(dont_ignore) + else: + lexer = self.lexer + lexer_thread = LexerThread.from_text(lexer, text) + stream = lexer_thread.lex(None) + if self.options.postlex: + return self.options.postlex.process(stream) + return stream + + def get_terminal(self, name: str) -> TerminalDef: + #-- + return self._terminals_dict[name] + + def parse_interactive(self, text: Optional[LarkInput]=None, start: Optional[str]=None) -> 'InteractiveParser': + #-- + return self.parser.parse_interactive(text, start=start) + + def parse(self, text: LarkInput, start: Optional[str]=None, on_error: 'Optional[Callable[[UnexpectedInput], bool]]'=None) -> 'ParseTree': + #-- + if on_error is not None and self.options.parser != 'lalr': + raise NotImplementedError("The on_error option is only implemented for the LALR(1) parser.") + return self.parser.parse(text, start=start, on_error=on_error) + + + + +class DedentError(LarkError): + pass + +class Indenter(PostLex, ABC): + #-- + paren_level: int + indent_level: List[int] + + def __init__(self) -> None: + self.paren_level = 0 + self.indent_level = [0] + assert self.tab_len > 0 + + def handle_NL(self, token: Token) -> Iterator[Token]: + if self.paren_level > 0: + return + + yield token + + indent_str = token.rsplit('\n', 1)[1] ## + + indent = indent_str.count(' ') + indent_str.count('\t') * self.tab_len + + if indent > self.indent_level[-1]: + self.indent_level.append(indent) + yield Token.new_borrow_pos(self.INDENT_type, indent_str, token) + else: + while indent < self.indent_level[-1]: + self.indent_level.pop() + yield Token.new_borrow_pos(self.DEDENT_type, indent_str, token) + + if indent != self.indent_level[-1]: + raise DedentError('Unexpected dedent to column %s. Expected dedent to %s' % (indent, self.indent_level[-1])) + + def _process(self, stream): + token = None + for token in stream: + if token.type == self.NL_type: + yield from self.handle_NL(token) + else: + yield token + + if token.type in self.OPEN_PAREN_types: + self.paren_level += 1 + elif token.type in self.CLOSE_PAREN_types: + self.paren_level -= 1 + assert self.paren_level >= 0 + + while len(self.indent_level) > 1: + self.indent_level.pop() + yield Token.new_borrow_pos(self.DEDENT_type, '', token) if token else Token(self.DEDENT_type, '', 0, 0, 0, 0, 0, 0) + + assert self.indent_level == [0], self.indent_level + + def process(self, stream): + self.paren_level = 0 + self.indent_level = [0] + return self._process(stream) + + ## + + @property + def always_accept(self): + return (self.NL_type,) + + @property + @abstractmethod + def NL_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def OPEN_PAREN_types(self) -> List[str]: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def CLOSE_PAREN_types(self) -> List[str]: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def INDENT_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def DEDENT_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def tab_len(self) -> int: + #-- + raise NotImplementedError() + + +class PythonIndenter(Indenter): + #-- + + NL_type = '_NEWLINE' + OPEN_PAREN_types = ['LPAR', 'LSQB', 'LBRACE'] + CLOSE_PAREN_types = ['RPAR', 'RSQB', 'RBRACE'] + INDENT_type = '_INDENT' + DEDENT_type = '_DEDENT' + tab_len = 8 + + +import pickle, zlib, base64 +DATA = ( +{'parser': {'lexer_conf': {'terminals': [], 'ignore': [], 'g_regex_flags': 0, 'use_bytes': False, 'lexer_type': 'contextual', '__type__': 'LexerConf'}, 'parser_conf': {'rules': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}, {'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}, {'@': 107}, {'@': 108}, {'@': 109}, {'@': 110}, {'@': 111}, {'@': 112}, {'@': 113}, {'@': 114}, {'@': 115}, {'@': 116}, {'@': 117}, {'@': 118}, {'@': 119}, {'@': 120}, {'@': 121}, {'@': 122}, {'@': 123}, {'@': 124}, {'@': 125}, {'@': 126}, {'@': 127}, {'@': 128}, {'@': 129}, {'@': 130}, {'@': 131}, {'@': 132}, {'@': 133}, {'@': 134}, {'@': 135}, {'@': 136}, {'@': 137}, {'@': 138}, {'@': 139}, {'@': 140}, {'@': 141}, {'@': 142}, {'@': 143}, {'@': 144}, {'@': 145}, {'@': 146}, {'@': 147}, {'@': 148}, {'@': 149}, {'@': 150}, {'@': 151}, {'@': 152}, {'@': 153}, {'@': 154}, {'@': 155}, {'@': 156}, {'@': 157}, {'@': 158}, {'@': 159}, {'@': 160}, {'@': 161}, {'@': 162}, {'@': 163}, {'@': 164}, {'@': 165}, {'@': 166}, {'@': 167}, {'@': 168}, {'@': 169}, {'@': 170}, {'@': 171}, {'@': 172}, {'@': 173}, {'@': 174}, {'@': 175}, {'@': 176}, {'@': 177}, {'@': 178}, {'@': 179}, {'@': 180}, {'@': 181}, {'@': 182}, {'@': 183}, {'@': 184}, {'@': 185}, {'@': 186}, {'@': 187}, {'@': 188}, {'@': 189}, {'@': 190}, {'@': 191}, {'@': 192}, {'@': 193}, {'@': 194}, {'@': 195}, {'@': 196}, {'@': 197}, {'@': 198}, {'@': 199}, {'@': 200}, {'@': 201}, {'@': 202}, {'@': 203}, {'@': 204}, {'@': 205}, {'@': 206}, {'@': 207}, {'@': 208}, {'@': 209}, {'@': 210}, {'@': 211}, {'@': 212}, {'@': 213}, {'@': 214}, {'@': 215}, {'@': 216}, {'@': 217}, {'@': 218}, {'@': 219}, {'@': 220}, {'@': 221}, {'@': 222}, {'@': 223}, {'@': 224}, {'@': 225}, {'@': 226}, {'@': 227}, {'@': 228}, {'@': 229}, {'@': 230}, {'@': 231}, {'@': 232}, {'@': 233}, {'@': 234}, {'@': 235}, {'@': 236}, {'@': 237}, {'@': 238}, {'@': 239}, {'@': 240}, {'@': 241}, {'@': 242}, {'@': 243}, {'@': 244}, {'@': 245}, {'@': 246}, {'@': 247}, {'@': 248}, {'@': 249}, {'@': 250}, {'@': 251}, {'@': 252}, {'@': 253}, {'@': 254}, {'@': 255}, {'@': 256}, {'@': 257}, {'@': 258}, {'@': 259}, {'@': 260}, {'@': 261}, {'@': 262}, {'@': 263}, {'@': 264}, {'@': 265}, {'@': 266}, {'@': 267}, {'@': 268}, {'@': 269}, {'@': 270}, {'@': 271}, {'@': 272}, {'@': 273}, {'@': 274}, {'@': 275}, {'@': 276}, {'@': 277}, {'@': 278}, {'@': 279}, {'@': 280}, {'@': 281}, {'@': 282}, {'@': 283}, {'@': 284}, {'@': 285}, {'@': 286}, {'@': 287}, {'@': 288}, {'@': 289}, {'@': 290}, {'@': 291}, {'@': 292}, {'@': 293}, {'@': 294}, {'@': 295}, {'@': 296}, {'@': 297}, {'@': 298}, {'@': 299}, {'@': 300}, {'@': 301}, {'@': 302}, {'@': 303}, {'@': 304}, {'@': 305}, {'@': 306}, {'@': 307}, {'@': 308}, {'@': 309}, {'@': 310}, {'@': 311}, {'@': 312}, {'@': 313}, {'@': 314}, {'@': 315}, {'@': 316}, {'@': 317}, {'@': 318}, {'@': 319}, {'@': 320}, {'@': 321}, {'@': 322}, {'@': 323}, {'@': 324}, {'@': 325}, {'@': 326}, {'@': 327}, {'@': 328}, {'@': 329}, {'@': 330}, {'@': 331}, {'@': 332}, {'@': 333}, {'@': 334}, {'@': 335}, {'@': 336}, {'@': 337}, {'@': 338}], 'start': ['start'], 'parser_type': 'lalr', '__type__': 'ParserConf'}, 'parser': {'tokens': {0: 'A', 1: 'PLUS', 2: 'LPP', 3: 'ADDR', 4: 'ID', 5: 'expr_atom', 6: 'LP', 7: 'MINUS', 8: 'INTEGER', 9: 'pexpr', 10: 'expr_unary', 11: 'RP', 12: 'DIV', 13: 'MOD', 14: 'BOR', 15: 'BAND', 16: 'MUL', 17: 'RSHIFT', 18: 'BXOR', 19: 'POW', 20: 'LSHIFT', 21: 'reg16i', 22: 'HL', 23: 'IY', 24: 'IX', 25: 'NEWLINE', 26: 'CO', 27: 'COMMA', 28: 'expr_mul', 29: 'expr_add_operand', 30: 'expr_add', 31: 'expr_bitwise', 32: 'expr_bitwise_operand', 33: 'expr_mul_operand', 34: 'expr_unary_operand', 35: 'expr_pow', 36: 'expr', 37: 'RB', 38: 'LB', 39: 'IYH', 40: 'IXL', 41: 'reg8', 42: 'reg8_i', 43: 'reg8_hl', 44: 'IYL', 45: 'D', 46: 'L', 47: 'C', 48: 'H', 49: 'B', 50: 'E', 51: 'reg_bcde', 52: 'reg8i', 53: 'IXH', 54: '$END', 55: 'Z', 56: 'NC', 57: 'P', 58: 'PE', 59: 'M', 60: 'jp_flags', 61: 'NZ', 62: 'jr_flags', 63: 'PO', 64: 'STRING', 65: 'DE', 66: 'BC', 67: 'RPP', 68: 'expr_pow_operand', 69: 'reg16', 70: 'inc_reg', 71: 'SP', 72: 'NAMESPACE', 73: 'AF', 74: 'EQU', 75: 'number_list', 76: 'expr_list', 77: 'OUT', 78: 'asms', 79: 'LD', 80: 'JP', 81: 'SLA', 82: 'line', 83: 'IN', 84: 'bitop', 85: 'RST', 86: 'ADD', 87: 'RRCA', 88: 'NOP', 89: 'ADC', 90: 'SBC', 91: 'rotation', 92: 'RET', 93: 'PUSH', 94: 'RETN', 95: 'CPIR', 96: 'SUB', 97: 'LOCAL', 98: 'DAA', 99: 'SCF', 100: 'CP', 101: 'CPL', 102: 'SLL', 103: 'CALL', 104: 'bitwiseop', 105: 'OR', 106: 'endline', 107: 'CPDR', 108: 'DJNZ', 109: 'END', 110: 'CCF', 111: 'RRD', 112: 'IND', 113: 'INCBIN', 114: 'INDR', 115: 'CPI', 116: 'ALIGN', 117: 'ENDP', 118: 'EX', 119: 'OUTD', 120: 'POP', 121: 'RRC', 122: 'ORG', 123: 'LDD', 124: 'EXX', 125: 'JR', 126: 'HALT', 127: 'DEC', 128: 'preproc_line', 129: 'RLCA', 130: 'RETI', 131: 'INIR', 132: 'SRL', 133: 'RLD', 134: '_INIT', 135: 'INC', 136: 'LDI', 137: 'XOR', 138: 'NEG', 139: 'SRA', 140: 'OTDR', 141: 'OTIR', 142: 'INI', 143: 'DEFS', 144: 'DEFB', 145: 'PROC', 146: 'RL', 147: 'EI', 148: 'LDIR', 149: 'asm', 150: 'OUTI', 151: 'RR', 152: 'DI', 153: 'RLA', 154: 'BIT', 155: 'RLC', 156: 'DEFW', 157: 'CPD', 158: 'AND', 159: 'RRA', 160: 'RES', 161: 'IM', 162: 'SET', 163: 'LDDR', 164: 'id_list', 165: 'APO', 166: 'mem_indir', 167: 'R', 168: 'I', 169: 'program', 170: 'start'}, 'states': {0: {0: (0, 103)}, 1: {1: (0, 360), 2: (0, 252), 3: (0, 473), 4: (0, 486), 5: (0, 472), 6: (0, 355), 7: (0, 374), 8: (0, 332), 9: (0, 122), 10: (0, 362)}, 2: {11: (0, 92), 12: (1, {'@': 331}), 13: (1, {'@': 331}), 14: (1, {'@': 331}), 15: (1, {'@': 331}), 16: (1, {'@': 331}), 1: (1, {'@': 331}), 17: (1, {'@': 331}), 18: (1, {'@': 331}), 19: (1, {'@': 331}), 20: (1, {'@': 331}), 7: (1, {'@': 331})}, 3: {21: (0, 34), 0: (0, 320), 22: (0, 533), 23: (0, 416), 24: (0, 469)}, 4: {25: (0, 27), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 5: {25: (1, {'@': 86}), 26: (1, {'@': 86})}, 6: {11: (0, 94), 12: (1, {'@': 330}), 13: (1, {'@': 330}), 14: (1, {'@': 330}), 15: (1, {'@': 330}), 16: (1, {'@': 330}), 1: (1, {'@': 330}), 17: (1, {'@': 330}), 18: (1, {'@': 330}), 19: (1, {'@': 330}), 20: (1, {'@': 330}), 7: (1, {'@': 330})}, 7: {25: (1, {'@': 241}), 26: (1, {'@': 241}), 27: (1, {'@': 241})}, 8: {25: (1, {'@': 147}), 26: (1, {'@': 147}), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 9: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 445)}, 10: {11: (0, 100), 12: (1, {'@': 330}), 13: (1, {'@': 330}), 14: (1, {'@': 330}), 16: (1, {'@': 330}), 15: (1, {'@': 330}), 1: (1, {'@': 330}), 17: (1, {'@': 330}), 18: (1, {'@': 330}), 19: (1, {'@': 330}), 20: (1, {'@': 330}), 7: (1, {'@': 330})}, 11: {25: (1, {'@': 138}), 26: (1, {'@': 138})}, 12: {11: (0, 96), 12: (1, {'@': 331}), 13: (1, {'@': 331}), 14: (1, {'@': 331}), 16: (1, {'@': 331}), 15: (1, {'@': 331}), 1: (1, {'@': 331}), 17: (1, {'@': 331}), 18: (1, {'@': 331}), 19: (1, {'@': 331}), 20: (1, {'@': 331}), 7: (1, {'@': 331})}, 13: {25: (1, {'@': 150}), 26: (1, {'@': 150})}, 14: {37: (0, 77)}, 15: {25: (1, {'@': 24}), 26: (1, {'@': 24})}, 16: {25: (1, {'@': 25}), 26: (1, {'@': 25})}, 17: {37: (0, 81)}, 18: {25: (1, {'@': 84}), 26: (1, {'@': 84})}, 19: {25: (1, {'@': 54}), 26: (1, {'@': 54})}, 20: {11: (0, 85)}, 21: {25: (1, {'@': 220}), 26: (1, {'@': 220})}, 22: {25: (1, {'@': 55}), 26: (1, {'@': 55})}, 23: {0: (0, 229), 38: (0, 524), 39: (0, 430), 40: (0, 498), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 163), 29: (0, 490), 30: (0, 509), 36: (0, 247), 9: (0, 248), 4: (0, 486), 31: (0, 488), 32: (0, 412), 41: (0, 249), 42: (0, 251), 3: (0, 473), 43: (0, 253), 33: (0, 395), 44: (0, 361), 45: (0, 414), 7: (0, 374), 46: (0, 532), 47: (0, 520), 48: (0, 408), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 49: (0, 491), 2: (0, 252), 50: (0, 481), 51: (0, 369), 52: (0, 254), 53: (0, 462)}, 24: {1: (0, 360), 2: (0, 252), 3: (0, 473), 9: (0, 321), 4: (0, 486), 5: (0, 472), 6: (0, 355), 7: (0, 374), 8: (0, 332), 10: (0, 362)}, 25: {11: (0, 88)}, 26: {25: (1, {'@': 200}), 26: (1, {'@': 200})}, 27: {54: (1, {'@': 7}), 25: (1, {'@': 7})}, 28: {0: (0, 106)}, 29: {37: (0, 109)}, 30: {11: (0, 112)}, 31: {22: (0, 303)}, 32: {25: (1, {'@': 204}), 26: (1, {'@': 204})}, 33: {1: (0, 360), 2: (0, 252), 3: (0, 473), 9: (0, 338), 5: (0, 472), 7: (0, 374), 8: (0, 332), 6: (0, 355), 10: (0, 385), 4: (0, 486)}, 34: {27: (0, 359)}, 35: {21: (0, 142), 23: (0, 416), 22: (0, 128), 24: (0, 469)}, 36: {25: (1, {'@': 30}), 26: (1, {'@': 30})}, 37: {6: (1, {'@': 257}), 8: (1, {'@': 257}), 2: (1, {'@': 257}), 49: (1, {'@': 257}), 50: (1, {'@': 257}), 45: (1, {'@': 257}), 0: (1, {'@': 257}), 1: (1, {'@': 257}), 47: (1, {'@': 257}), 4: (1, {'@': 257}), 3: (1, {'@': 257}), 48: (1, {'@': 257}), 39: (1, {'@': 257}), 53: (1, {'@': 257}), 38: (1, {'@': 257}), 46: (1, {'@': 257}), 44: (1, {'@': 257}), 40: (1, {'@': 257}), 7: (1, {'@': 257})}, 38: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 309), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 36: (0, 310), 35: (0, 200), 2: (0, 252)}, 39: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 36: (0, 144), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 40: {36: (0, 312), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 41: {25: (1, {'@': 143}), 26: (1, {'@': 143})}, 42: {21: (0, 131), 23: (0, 416), 22: (0, 123), 24: (0, 469)}, 43: {25: (0, 276), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 44: {37: (0, 340)}, 45: {11: (0, 116)}, 46: {25: (0, 277)}, 47: {38: (0, 524), 36: (0, 260), 39: (0, 430), 40: (0, 498), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 163), 29: (0, 490), 30: (0, 509), 9: (0, 286), 0: (0, 290), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 44: (0, 361), 33: (0, 395), 45: (0, 414), 7: (0, 374), 46: (0, 532), 41: (0, 293), 47: (0, 520), 42: (0, 294), 48: (0, 408), 10: (0, 382), 34: (0, 456), 8: (0, 332), 52: (0, 298), 35: (0, 200), 49: (0, 491), 2: (0, 252), 50: (0, 481), 51: (0, 369), 53: (0, 462), 43: (0, 302)}, 48: {37: (0, 119)}, 49: {37: (0, 307)}, 50: {25: (1, {'@': 58}), 26: (1, {'@': 58})}, 51: {25: (1, {'@': 185}), 26: (1, {'@': 185})}, 52: {28: (0, 499), 55: (0, 424), 56: (0, 398), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 57: (0, 434), 47: (0, 390), 9: (0, 419), 58: (0, 528), 59: (0, 516), 4: (0, 486), 31: (0, 488), 60: (0, 425), 32: (0, 412), 3: (0, 473), 36: (0, 417), 33: (0, 395), 61: (0, 388), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 62: (0, 335), 35: (0, 200), 2: (0, 252), 63: (0, 190)}, 53: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 9: (0, 331), 29: (0, 490), 30: (0, 509), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 64: (0, 334), 36: (0, 336)}, 54: {1: (0, 360), 2: (0, 252), 3: (0, 473), 9: (0, 350), 5: (0, 472), 7: (0, 374), 8: (0, 332), 6: (0, 355), 10: (0, 385), 4: (0, 486)}, 55: {25: (1, {'@': 187}), 26: (1, {'@': 187})}, 56: {25: (1, {'@': 144}), 26: (1, {'@': 144})}, 57: {25: (1, {'@': 95}), 26: (1, {'@': 95})}, 58: {38: (0, 524), 41: (0, 431), 42: (0, 380), 0: (0, 169), 6: (0, 132), 45: (0, 414), 46: (0, 532), 47: (0, 520), 43: (0, 152), 48: (0, 408), 49: (0, 491), 50: (0, 481), 51: (0, 369)}, 59: {23: (0, 377), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 24: (0, 387), 9: (0, 454), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 65: (0, 20), 66: (0, 25), 10: (0, 382), 34: (0, 456), 8: (0, 332), 22: (0, 505), 35: (0, 200), 2: (0, 252), 36: (0, 392)}, 60: {25: (1, {'@': 251}), 26: (1, {'@': 251}), 27: (1, {'@': 251})}, 61: {25: (1, {'@': 190}), 26: (1, {'@': 190})}, 62: {25: (1, {'@': 186}), 26: (1, {'@': 186})}, 63: {25: (1, {'@': 252}), 26: (1, {'@': 252}), 27: (1, {'@': 252})}, 64: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 322), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 36: (0, 324), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 65: {25: (1, {'@': 148}), 26: (1, {'@': 148})}, 66: {27: (0, 316)}, 67: {25: (1, {'@': 249}), 26: (1, {'@': 249}), 27: (1, {'@': 249})}, 68: {27: (0, 389)}, 69: {37: (0, 280)}, 70: {54: (1, {'@': 6}), 25: (1, {'@': 6})}, 71: {25: (1, {'@': 250}), 26: (1, {'@': 250}), 27: (1, {'@': 250})}, 72: {13: (1, {'@': 334}), 14: (1, {'@': 334}), 37: (1, {'@': 334}), 19: (1, {'@': 334}), 12: (1, {'@': 334}), 15: (1, {'@': 334}), 16: (1, {'@': 334}), 1: (1, {'@': 334}), 17: (1, {'@': 334}), 18: (1, {'@': 334}), 20: (1, {'@': 334}), 7: (1, {'@': 334}), 25: (1, {'@': 334}), 26: (1, {'@': 334}), 27: (1, {'@': 334}), 11: (1, {'@': 334}), 67: (1, {'@': 334})}, 73: {25: (1, {'@': 45}), 26: (1, {'@': 45})}, 74: {25: (1, {'@': 47}), 26: (1, {'@': 47})}, 75: {22: (0, 233), 0: (0, 381)}, 76: {25: (1, {'@': 145}), 26: (1, {'@': 145}), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 77: {25: (1, {'@': 43}), 26: (1, {'@': 43})}, 78: {9: (0, 95), 1: (0, 360), 10: (0, 382), 2: (0, 252), 3: (0, 473), 6: (0, 355), 34: (0, 456), 7: (0, 374), 5: (0, 472), 8: (0, 332), 68: (0, 99), 4: (0, 486), 35: (0, 175)}, 79: {25: (1, {'@': 83}), 26: (1, {'@': 83})}, 80: {25: (1, {'@': 35}), 26: (1, {'@': 35})}, 81: {25: (1, {'@': 41}), 26: (1, {'@': 41})}, 82: {25: (1, {'@': 31}), 26: (1, {'@': 31})}, 83: {52: (0, 125), 40: (0, 498), 39: (0, 430), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 36: (0, 133), 44: (0, 361), 33: (0, 395), 45: (0, 414), 7: (0, 374), 47: (0, 520), 10: (0, 382), 34: (0, 456), 8: (0, 332), 0: (0, 135), 35: (0, 200), 49: (0, 491), 2: (0, 252), 50: (0, 481), 53: (0, 462), 51: (0, 137)}, 84: {25: (1, {'@': 26}), 26: (1, {'@': 26})}, 85: {25: (1, {'@': 42}), 26: (1, {'@': 42})}, 86: {25: (1, {'@': 29}), 26: (1, {'@': 29})}, 87: {25: (1, {'@': 33}), 26: (1, {'@': 33})}, 88: {25: (1, {'@': 40}), 26: (1, {'@': 40})}, 89: {25: (1, {'@': 57}), 26: (1, {'@': 57})}, 90: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 328), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 36: (0, 108), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 91: {25: (1, {'@': 226}), 26: (1, {'@': 226})}, 92: {25: (1, {'@': 245}), 26: (1, {'@': 245}), 27: (1, {'@': 245})}, 93: {25: (1, {'@': 136}), 26: (1, {'@': 136})}, 94: {25: (1, {'@': 246}), 26: (1, {'@': 246}), 27: (1, {'@': 246})}, 95: {19: (1, {'@': 309}), 13: (1, {'@': 311}), 14: (1, {'@': 311}), 11: (1, {'@': 311}), 37: (1, {'@': 311}), 27: (1, {'@': 311}), 12: (1, {'@': 311}), 67: (1, {'@': 311}), 25: (1, {'@': 311}), 15: (1, {'@': 311}), 16: (1, {'@': 311}), 1: (1, {'@': 311}), 17: (1, {'@': 311}), 18: (1, {'@': 311}), 20: (1, {'@': 311}), 7: (1, {'@': 311}), 26: (1, {'@': 311})}, 96: {25: (1, {'@': 243}), 26: (1, {'@': 243}), 27: (1, {'@': 243})}, 97: {48: (1, {'@': 262}), 50: (1, {'@': 262}), 38: (1, {'@': 262}), 45: (1, {'@': 262}), 46: (1, {'@': 262}), 0: (1, {'@': 262}), 6: (1, {'@': 262}), 47: (1, {'@': 262}), 49: (1, {'@': 262})}, 98: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 327), 4: (0, 486), 36: (0, 329), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 99: {12: (1, {'@': 322}), 13: (1, {'@': 322}), 14: (1, {'@': 322}), 15: (1, {'@': 322}), 16: (1, {'@': 322}), 1: (1, {'@': 322}), 17: (1, {'@': 322}), 18: (1, {'@': 322}), 37: (1, {'@': 322}), 20: (1, {'@': 322}), 7: (1, {'@': 322}), 25: (1, {'@': 322}), 26: (1, {'@': 322}), 27: (1, {'@': 322}), 11: (1, {'@': 322}), 67: (1, {'@': 322})}, 100: {25: (1, {'@': 244}), 26: (1, {'@': 244}), 27: (1, {'@': 244})}, 101: {25: (1, {'@': 17}), 26: (1, {'@': 17})}, 102: {1: (0, 360), 2: (0, 252), 3: (0, 473), 9: (0, 6), 5: (0, 472), 7: (0, 374), 8: (0, 332), 6: (0, 355), 10: (0, 385), 4: (0, 486)}, 103: {25: (1, {'@': 46}), 26: (1, {'@': 46})}, 104: {6: (1, {'@': 254}), 8: (1, {'@': 254}), 2: (1, {'@': 254}), 49: (1, {'@': 254}), 50: (1, {'@': 254}), 45: (1, {'@': 254}), 0: (1, {'@': 254}), 1: (1, {'@': 254}), 47: (1, {'@': 254}), 4: (1, {'@': 254}), 3: (1, {'@': 254}), 48: (1, {'@': 254}), 39: (1, {'@': 254}), 53: (1, {'@': 254}), 38: (1, {'@': 254}), 46: (1, {'@': 254}), 44: (1, {'@': 254}), 40: (1, {'@': 254}), 7: (1, {'@': 254})}, 105: {25: (1, {'@': 162}), 26: (1, {'@': 162})}, 106: {25: (1, {'@': 44}), 26: (1, {'@': 44})}, 107: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 400)}, 108: {27: (0, 269)}, 109: {25: (1, {'@': 183}), 26: (1, {'@': 183})}, 110: {12: (1, {'@': 337}), 13: (1, {'@': 337}), 14: (1, {'@': 337}), 15: (1, {'@': 337}), 16: (1, {'@': 337}), 1: (1, {'@': 337}), 17: (1, {'@': 337}), 18: (1, {'@': 337}), 37: (1, {'@': 337}), 19: (1, {'@': 337}), 20: (1, {'@': 337}), 7: (1, {'@': 337}), 25: (1, {'@': 337}), 26: (1, {'@': 337}), 27: (1, {'@': 337}), 11: (1, {'@': 337}), 67: (1, {'@': 337})}, 111: {25: (1, {'@': 224}), 26: (1, {'@': 224})}, 112: {25: (1, {'@': 182}), 26: (1, {'@': 182})}, 113: {25: (1, {'@': 208}), 26: (1, {'@': 208})}, 114: {25: (1, {'@': 89}), 26: (1, {'@': 89})}, 115: {25: (1, {'@': 114}), 26: (1, {'@': 114})}, 116: {25: (1, {'@': 180}), 26: (1, {'@': 180})}, 117: {25: (1, {'@': 221}), 26: (1, {'@': 221})}, 118: {11: (0, 352)}, 119: {25: (1, {'@': 181}), 26: (1, {'@': 181})}, 120: {1: (0, 360), 2: (0, 252), 3: (0, 473), 9: (0, 10), 5: (0, 472), 7: (0, 374), 8: (0, 332), 6: (0, 355), 10: (0, 385), 4: (0, 486)}, 121: {25: (1, {'@': 207}), 26: (1, {'@': 207})}, 122: {37: (0, 67), 12: (1, {'@': 331}), 13: (1, {'@': 331}), 14: (1, {'@': 331}), 15: (1, {'@': 331}), 16: (1, {'@': 331}), 1: (1, {'@': 331}), 17: (1, {'@': 331}), 18: (1, {'@': 331}), 19: (1, {'@': 331}), 20: (1, {'@': 331}), 7: (1, {'@': 331})}, 123: {25: (1, {'@': 74}), 26: (1, {'@': 74})}, 124: {25: (1, {'@': 214}), 26: (1, {'@': 214})}, 125: {25: (1, {'@': 39}), 26: (1, {'@': 39})}, 126: {48: (1, {'@': 264}), 50: (1, {'@': 264}), 38: (1, {'@': 264}), 45: (1, {'@': 264}), 46: (1, {'@': 264}), 0: (1, {'@': 264}), 6: (1, {'@': 264}), 47: (1, {'@': 264}), 49: (1, {'@': 264})}, 127: {25: (1, {'@': 158}), 26: (1, {'@': 158})}, 128: {25: (1, {'@': 73}), 26: (1, {'@': 73})}, 129: {25: (1, {'@': 216}), 26: (1, {'@': 216})}, 130: {11: (0, 7)}, 131: {25: (1, {'@': 72}), 26: (1, {'@': 72})}, 132: {23: (0, 377), 24: (0, 387), 22: (0, 505)}, 133: {25: (1, {'@': 85}), 26: (1, {'@': 85})}, 134: {25: (1, {'@': 48}), 26: (1, {'@': 48})}, 135: {25: (1, {'@': 36}), 26: (1, {'@': 36})}, 136: {25: (1, {'@': 192}), 26: (1, {'@': 192})}, 137: {25: (1, {'@': 38}), 26: (1, {'@': 38})}, 138: {48: (1, {'@': 261}), 50: (1, {'@': 261}), 38: (1, {'@': 261}), 45: (1, {'@': 261}), 46: (1, {'@': 261}), 0: (1, {'@': 261}), 6: (1, {'@': 261}), 47: (1, {'@': 261}), 49: (1, {'@': 261})}, 139: {1: (0, 437), 7: (0, 451), 37: (1, {'@': 316}), 20: (1, {'@': 316}), 14: (1, {'@': 316}), 15: (1, {'@': 316}), 17: (1, {'@': 316}), 18: (1, {'@': 316}), 25: (1, {'@': 316}), 26: (1, {'@': 316}), 27: (1, {'@': 316}), 11: (1, {'@': 316}), 67: (1, {'@': 316})}, 140: {25: (1, {'@': 201}), 26: (1, {'@': 201})}, 141: {25: (1, {'@': 27}), 26: (1, {'@': 27})}, 142: {25: (1, {'@': 71}), 26: (1, {'@': 71})}, 143: {25: (1, {'@': 23}), 26: (1, {'@': 23})}, 144: {25: (1, {'@': 70}), 26: (1, {'@': 70})}, 145: {38: (0, 524), 39: (0, 430), 40: (0, 498), 52: (0, 448), 43: (0, 463), 23: (0, 416), 6: (0, 132), 69: (0, 465), 44: (0, 361), 45: (0, 414), 42: (0, 483), 46: (0, 532), 47: (0, 520), 70: (0, 534), 48: (0, 408), 66: (0, 447), 24: (0, 469), 21: (0, 501), 0: (0, 530), 22: (0, 399), 41: (0, 502), 49: (0, 491), 50: (0, 481), 51: (0, 369), 53: (0, 462), 65: (0, 459), 71: (0, 474)}, 146: {25: (1, {'@': 56}), 26: (1, {'@': 56})}, 147: {25: (1, {'@': 79}), 26: (1, {'@': 79})}, 148: {1: (1, {'@': 258}), 6: (1, {'@': 258}), 4: (1, {'@': 258}), 8: (1, {'@': 258}), 2: (1, {'@': 258}), 7: (1, {'@': 258}), 3: (1, {'@': 258})}, 149: {22: (0, 399), 23: (0, 416), 69: (0, 41), 65: (0, 459), 66: (0, 447), 71: (0, 56), 0: (0, 450), 24: (0, 469), 21: (0, 501)}, 150: {25: (1, {'@': 37}), 26: (1, {'@': 37})}, 151: {25: (1, {'@': 21}), 26: (1, {'@': 21})}, 152: {25: (1, {'@': 152}), 26: (1, {'@': 152})}, 153: {25: (1, {'@': 141}), 26: (1, {'@': 141})}, 154: {16: (0, 78), 12: (0, 446), 13: (0, 386), 14: (1, {'@': 319}), 15: (1, {'@': 319}), 1: (1, {'@': 319}), 17: (1, {'@': 319}), 18: (1, {'@': 319}), 37: (1, {'@': 319}), 20: (1, {'@': 319}), 7: (1, {'@': 319}), 25: (1, {'@': 319}), 26: (1, {'@': 319}), 27: (1, {'@': 319}), 11: (1, {'@': 319}), 67: (1, {'@': 319})}, 155: {13: (1, {'@': 307}), 14: (1, {'@': 307}), 11: (1, {'@': 307}), 37: (1, {'@': 307}), 27: (1, {'@': 307}), 12: (1, {'@': 307}), 67: (1, {'@': 307}), 25: (1, {'@': 307}), 15: (1, {'@': 307}), 16: (1, {'@': 307}), 1: (1, {'@': 307}), 17: (1, {'@': 307}), 18: (1, {'@': 307}), 20: (1, {'@': 307}), 7: (1, {'@': 307}), 26: (1, {'@': 307}), 19: (1, {'@': 309})}, 156: {47: (0, 30)}, 157: {25: (1, {'@': 196}), 26: (1, {'@': 196})}, 158: {25: (1, {'@': 149}), 26: (1, {'@': 149})}, 159: {25: (1, {'@': 146}), 26: (1, {'@': 146}), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 160: {25: (1, {'@': 209}), 26: (1, {'@': 209})}, 161: {25: (1, {'@': 81}), 26: (1, {'@': 81})}, 162: {25: (1, {'@': 88}), 26: (1, {'@': 88})}, 163: {23: (0, 377), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 24: (0, 387), 9: (0, 454), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 22: (0, 505), 35: (0, 200), 2: (0, 252), 36: (0, 392)}, 164: {25: (1, {'@': 22}), 26: (1, {'@': 22})}, 165: {25: (1, {'@': 223}), 26: (1, {'@': 223})}, 166: {25: (1, {'@': 28}), 26: (1, {'@': 28})}, 167: {25: (1, {'@': 49}), 26: (1, {'@': 49})}, 168: {25: (1, {'@': 82}), 26: (1, {'@': 82})}, 169: {25: (1, {'@': 153}), 26: (1, {'@': 153})}, 170: {13: (1, {'@': 306}), 14: (1, {'@': 306}), 11: (1, {'@': 306}), 37: (1, {'@': 306}), 27: (1, {'@': 306}), 12: (1, {'@': 306}), 67: (1, {'@': 306}), 25: (1, {'@': 306}), 15: (1, {'@': 306}), 16: (1, {'@': 306}), 1: (1, {'@': 306}), 17: (1, {'@': 306}), 18: (1, {'@': 306}), 20: (1, {'@': 306}), 7: (1, {'@': 306}), 26: (1, {'@': 306})}, 171: {25: (1, {'@': 206}), 26: (1, {'@': 206})}, 172: {16: (0, 78), 12: (0, 446), 13: (0, 386), 14: (1, {'@': 320}), 15: (1, {'@': 320}), 1: (1, {'@': 320}), 17: (1, {'@': 320}), 18: (1, {'@': 320}), 37: (1, {'@': 320}), 20: (1, {'@': 320}), 7: (1, {'@': 320}), 25: (1, {'@': 320}), 26: (1, {'@': 320}), 27: (1, {'@': 320}), 11: (1, {'@': 320}), 67: (1, {'@': 320})}, 173: {}, 174: {47: (0, 29)}, 175: {13: (1, {'@': 310}), 14: (1, {'@': 310}), 11: (1, {'@': 310}), 37: (1, {'@': 310}), 27: (1, {'@': 310}), 12: (1, {'@': 310}), 67: (1, {'@': 310}), 25: (1, {'@': 310}), 15: (1, {'@': 310}), 16: (1, {'@': 310}), 1: (1, {'@': 310}), 17: (1, {'@': 310}), 18: (1, {'@': 310}), 20: (1, {'@': 310}), 7: (1, {'@': 310}), 26: (1, {'@': 310})}, 176: {25: (1, {'@': 211}), 26: (1, {'@': 211})}, 177: {14: (1, {'@': 305}), 11: (1, {'@': 305}), 37: (1, {'@': 305}), 27: (1, {'@': 305}), 67: (1, {'@': 305}), 25: (1, {'@': 305}), 15: (1, {'@': 305}), 1: (1, {'@': 305}), 17: (1, {'@': 305}), 18: (1, {'@': 305}), 20: (1, {'@': 305}), 7: (1, {'@': 305}), 26: (1, {'@': 305}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 178: {14: (1, {'@': 304}), 11: (1, {'@': 304}), 37: (1, {'@': 304}), 27: (1, {'@': 304}), 67: (1, {'@': 304}), 25: (1, {'@': 304}), 15: (1, {'@': 304}), 1: (1, {'@': 304}), 17: (1, {'@': 304}), 18: (1, {'@': 304}), 20: (1, {'@': 304}), 7: (1, {'@': 304}), 26: (1, {'@': 304})}, 179: {4: (0, 289), 25: (1, {'@': 63}), 26: (1, {'@': 63})}, 180: {25: (1, {'@': 156}), 26: (1, {'@': 156})}, 181: {25: (1, {'@': 164}), 26: (1, {'@': 164}), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 182: {25: (1, {'@': 163}), 26: (1, {'@': 163})}, 183: {22: (0, 399), 72: (0, 179), 23: (0, 416), 65: (0, 459), 66: (0, 447), 69: (0, 93), 73: (0, 210), 24: (0, 469), 21: (0, 501)}, 184: {25: (1, {'@': 199}), 26: (1, {'@': 199})}, 185: {1: (0, 437), 7: (0, 451), 37: (1, {'@': 315}), 20: (1, {'@': 315}), 14: (1, {'@': 315}), 15: (1, {'@': 315}), 17: (1, {'@': 315}), 18: (1, {'@': 315}), 25: (1, {'@': 315}), 26: (1, {'@': 315}), 27: (1, {'@': 315}), 11: (1, {'@': 315}), 67: (1, {'@': 315})}, 186: {1: (0, 437), 7: (0, 451), 37: (1, {'@': 317}), 20: (1, {'@': 317}), 14: (1, {'@': 317}), 15: (1, {'@': 317}), 17: (1, {'@': 317}), 18: (1, {'@': 317}), 25: (1, {'@': 317}), 26: (1, {'@': 317}), 27: (1, {'@': 317}), 11: (1, {'@': 317}), 67: (1, {'@': 317})}, 187: {22: (0, 399), 73: (0, 476), 23: (0, 416), 69: (0, 11), 65: (0, 459), 66: (0, 447), 72: (0, 458), 24: (0, 469), 21: (0, 501)}, 188: {1: (0, 437), 7: (0, 451), 37: (1, {'@': 313}), 20: (1, {'@': 313}), 14: (1, {'@': 313}), 15: (1, {'@': 313}), 17: (1, {'@': 313}), 18: (1, {'@': 313}), 25: (1, {'@': 313}), 26: (1, {'@': 313}), 27: (1, {'@': 313}), 11: (1, {'@': 313}), 67: (1, {'@': 313})}, 189: {1: (0, 437), 7: (0, 451), 37: (1, {'@': 314}), 20: (1, {'@': 314}), 14: (1, {'@': 314}), 15: (1, {'@': 314}), 17: (1, {'@': 314}), 18: (1, {'@': 314}), 25: (1, {'@': 314}), 26: (1, {'@': 314}), 27: (1, {'@': 314}), 11: (1, {'@': 314}), 67: (1, {'@': 314})}, 190: {27: (1, {'@': 294}), 25: (1, {'@': 294}), 26: (1, {'@': 294})}, 191: {48: (1, {'@': 263}), 50: (1, {'@': 263}), 38: (1, {'@': 263}), 45: (1, {'@': 263}), 46: (1, {'@': 263}), 0: (1, {'@': 263}), 6: (1, {'@': 263}), 47: (1, {'@': 263}), 49: (1, {'@': 263})}, 192: {12: (1, {'@': 323}), 13: (1, {'@': 323}), 14: (1, {'@': 323}), 15: (1, {'@': 323}), 16: (1, {'@': 323}), 1: (1, {'@': 323}), 17: (1, {'@': 323}), 18: (1, {'@': 323}), 37: (1, {'@': 323}), 20: (1, {'@': 323}), 7: (1, {'@': 323}), 25: (1, {'@': 323}), 26: (1, {'@': 323}), 27: (1, {'@': 323}), 11: (1, {'@': 323}), 67: (1, {'@': 323})}, 193: {12: (1, {'@': 324}), 13: (1, {'@': 324}), 14: (1, {'@': 324}), 15: (1, {'@': 324}), 16: (1, {'@': 324}), 1: (1, {'@': 324}), 17: (1, {'@': 324}), 18: (1, {'@': 324}), 37: (1, {'@': 324}), 20: (1, {'@': 324}), 7: (1, {'@': 324}), 25: (1, {'@': 324}), 26: (1, {'@': 324}), 27: (1, {'@': 324}), 11: (1, {'@': 324}), 67: (1, {'@': 324})}, 194: {12: (1, {'@': 326}), 13: (1, {'@': 326}), 14: (1, {'@': 326}), 15: (1, {'@': 326}), 16: (1, {'@': 326}), 1: (1, {'@': 326}), 17: (1, {'@': 326}), 18: (1, {'@': 326}), 37: (1, {'@': 326}), 20: (1, {'@': 326}), 7: (1, {'@': 326}), 25: (1, {'@': 326}), 26: (1, {'@': 326}), 27: (1, {'@': 326}), 11: (1, {'@': 326}), 67: (1, {'@': 326})}, 195: {25: (1, {'@': 160}), 26: (1, {'@': 160})}, 196: {25: (1, {'@': 197}), 26: (1, {'@': 197})}, 197: {25: (1, {'@': 189}), 26: (1, {'@': 189})}, 198: {27: (0, 363)}, 199: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 454), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 47: (0, 45), 36: (0, 392)}, 200: {12: (1, {'@': 325}), 13: (1, {'@': 325}), 14: (1, {'@': 325}), 15: (1, {'@': 325}), 16: (1, {'@': 325}), 1: (1, {'@': 325}), 17: (1, {'@': 325}), 18: (1, {'@': 325}), 37: (1, {'@': 325}), 20: (1, {'@': 325}), 7: (1, {'@': 325}), 25: (1, {'@': 325}), 26: (1, {'@': 325}), 27: (1, {'@': 325}), 11: (1, {'@': 325}), 67: (1, {'@': 325})}, 201: {74: (0, 300), 25: (1, {'@': 19}), 26: (1, {'@': 19})}, 202: {38: (0, 524), 39: (0, 430), 40: (0, 498), 52: (0, 448), 43: (0, 463), 23: (0, 416), 6: (0, 132), 69: (0, 465), 44: (0, 361), 45: (0, 414), 46: (0, 532), 47: (0, 520), 48: (0, 408), 66: (0, 447), 70: (0, 513), 24: (0, 469), 21: (0, 501), 0: (0, 530), 22: (0, 399), 41: (0, 502), 49: (0, 491), 50: (0, 481), 51: (0, 369), 53: (0, 462), 65: (0, 459), 71: (0, 474), 42: (0, 457)}, 203: {25: (1, {'@': 139}), 26: (1, {'@': 139})}, 204: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 460), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 36: (0, 449), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 205: {25: (1, {'@': 188}), 26: (1, {'@': 188})}, 206: {48: (1, {'@': 265}), 50: (1, {'@': 265}), 38: (1, {'@': 265}), 45: (1, {'@': 265}), 46: (1, {'@': 265}), 0: (1, {'@': 265}), 6: (1, {'@': 265}), 47: (1, {'@': 265}), 49: (1, {'@': 265})}, 207: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 47: (0, 48), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 445)}, 208: {28: (0, 499), 1: (0, 360), 9: (0, 468), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 36: (0, 378), 35: (0, 200), 2: (0, 252)}, 209: {25: (1, {'@': 155}), 26: (1, {'@': 155})}, 210: {25: (1, {'@': 135}), 26: (1, {'@': 135})}, 211: {25: (1, {'@': 161}), 26: (1, {'@': 161})}, 212: {25: (1, {'@': 198}), 26: (1, {'@': 198})}, 213: {25: (1, {'@': 167}), 26: (1, {'@': 167})}, 214: {25: (1, {'@': 157}), 26: (1, {'@': 157})}, 215: {48: (1, {'@': 266}), 50: (1, {'@': 266}), 38: (1, {'@': 266}), 45: (1, {'@': 266}), 46: (1, {'@': 266}), 0: (1, {'@': 266}), 6: (1, {'@': 266}), 47: (1, {'@': 266}), 49: (1, {'@': 266})}, 216: {25: (1, {'@': 159}), 26: (1, {'@': 159})}, 217: {1: (1, {'@': 260}), 6: (1, {'@': 260}), 4: (1, {'@': 260}), 8: (1, {'@': 260}), 2: (1, {'@': 260}), 7: (1, {'@': 260}), 3: (1, {'@': 260})}, 218: {25: (1, {'@': 115}), 26: (1, {'@': 115})}, 219: {25: (1, {'@': 20}), 26: (1, {'@': 20})}, 220: {25: (1, {'@': 116}), 26: (1, {'@': 116})}, 221: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 527), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 36: (0, 521), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 75: (0, 529), 35: (0, 200), 2: (0, 252)}, 222: {25: (0, 70)}, 223: {25: (1, {'@': 118}), 26: (1, {'@': 118})}, 224: {25: (1, {'@': 32}), 26: (1, {'@': 32})}, 225: {25: (1, {'@': 117}), 26: (1, {'@': 117})}, 226: {46: (0, 532), 41: (0, 281), 47: (0, 520), 49: (0, 491), 50: (0, 481), 51: (0, 369), 0: (0, 198), 48: (0, 408), 45: (0, 414)}, 227: {25: (1, {'@': 110}), 26: (1, {'@': 110})}, 228: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 64: (0, 487), 29: (0, 490), 30: (0, 509), 9: (0, 471), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 76: (0, 466), 7: (0, 374), 36: (0, 475), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 229: {25: (1, {'@': 100}), 26: (1, {'@': 100})}, 230: {25: (1, {'@': 111}), 26: (1, {'@': 111})}, 231: {54: (1, {'@': 5}), 25: (1, {'@': 5})}, 232: {25: (1, {'@': 106}), 26: (1, {'@': 106})}, 233: {27: (0, 503)}, 234: {25: (1, {'@': 108}), 26: (1, {'@': 108})}, 235: {62: (0, 470), 28: (0, 499), 55: (0, 424), 56: (0, 398), 9: (0, 535), 1: (0, 360), 6: (0, 355), 5: (0, 472), 29: (0, 490), 30: (0, 509), 47: (0, 390), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 36: (0, 494), 33: (0, 395), 61: (0, 388), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 236: {25: (1, {'@': 113}), 26: (1, {'@': 113})}, 237: {25: (1, {'@': 109}), 26: (1, {'@': 109})}, 238: {25: (1, {'@': 170}), 26: (1, {'@': 170})}, 239: {25: (1, {'@': 112}), 26: (1, {'@': 112})}, 240: {25: (1, {'@': 195}), 26: (1, {'@': 195})}, 241: {25: (1, {'@': 124}), 26: (1, {'@': 124}), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 242: {25: (1, {'@': 213}), 26: (1, {'@': 213})}, 243: {27: (0, 0)}, 244: {25: (1, {'@': 107}), 26: (1, {'@': 107})}, 245: {64: (0, 492)}, 246: {71: (0, 69)}, 247: {25: (1, {'@': 121}), 26: (1, {'@': 121})}, 248: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 122}), 26: (1, {'@': 122})}, 249: {25: (1, {'@': 98}), 26: (1, {'@': 98})}, 250: {25: (0, 231), 54: (1, {'@': 2})}, 251: {25: (1, {'@': 126}), 26: (1, {'@': 126})}, 252: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 36: (0, 366), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 253: {25: (1, {'@': 101}), 26: (1, {'@': 101})}, 254: {25: (1, {'@': 99}), 26: (1, {'@': 99})}, 255: {48: (1, {'@': 267}), 50: (1, {'@': 267}), 38: (1, {'@': 267}), 45: (1, {'@': 267}), 46: (1, {'@': 267}), 0: (1, {'@': 267}), 6: (1, {'@': 267}), 47: (1, {'@': 267}), 49: (1, {'@': 267})}, 256: {25: (1, {'@': 96}), 26: (1, {'@': 96})}, 257: {77: (0, 479), 78: (0, 423), 79: (0, 429), 80: (0, 296), 81: (0, 206), 82: (0, 497), 83: (0, 226), 84: (0, 90), 85: (0, 107), 86: (0, 3), 87: (0, 111), 88: (0, 136), 89: (0, 75), 90: (0, 259), 91: (0, 58), 92: (0, 326), 93: (0, 183), 94: (0, 21), 95: (0, 26), 96: (0, 265), 97: (0, 291), 98: (0, 32), 4: (0, 201), 99: (0, 240), 100: (0, 37), 101: (0, 171), 102: (0, 215), 103: (0, 52), 8: (0, 219), 104: (0, 295), 105: (0, 337), 106: (0, 515), 107: (0, 344), 108: (0, 208), 109: (0, 262), 110: (0, 275), 111: (0, 91), 112: (0, 124), 113: (0, 285), 114: (0, 129), 115: (0, 140), 116: (0, 299), 117: (0, 167), 118: (0, 315), 119: (0, 318), 120: (0, 187), 121: (0, 191), 122: (0, 204), 123: (0, 184), 124: (0, 314), 125: (0, 235), 126: (0, 121), 127: (0, 145), 128: (0, 347), 129: (0, 284), 130: (0, 325), 131: (0, 287), 72: (0, 305), 132: (0, 308), 133: (0, 292), 134: (0, 245), 135: (0, 202), 136: (0, 196), 137: (0, 266), 138: (0, 278), 139: (0, 255), 140: (0, 268), 141: (0, 242), 142: (0, 261), 143: (0, 221), 144: (0, 228), 145: (0, 134), 146: (0, 97), 147: (0, 113), 148: (0, 157), 149: (0, 101), 150: (0, 176), 151: (0, 138), 152: (0, 160), 153: (0, 117), 154: (0, 148), 155: (0, 126), 156: (0, 297), 157: (0, 341), 158: (0, 104), 159: (0, 165), 160: (0, 301), 161: (0, 282), 162: (0, 217), 163: (0, 212), 25: (1, {'@': 16}), 26: (1, {'@': 16}), 54: (1, {'@': 0})}, 258: {25: (1, {'@': 97}), 26: (1, {'@': 97})}, 259: {22: (0, 383), 0: (0, 364)}, 260: {25: (1, {'@': 119}), 26: (1, {'@': 119})}, 261: {25: (1, {'@': 215}), 26: (1, {'@': 215})}, 262: {36: (0, 222), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 4), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 25: (0, 480), 35: (0, 200), 2: (0, 252)}, 263: {25: (1, {'@': 94}), 26: (1, {'@': 94})}, 264: {25: (1, {'@': 104}), 26: (1, {'@': 104})}, 265: {6: (1, {'@': 256}), 8: (1, {'@': 256}), 2: (1, {'@': 256}), 49: (1, {'@': 256}), 50: (1, {'@': 256}), 45: (1, {'@': 256}), 0: (1, {'@': 256}), 1: (1, {'@': 256}), 47: (1, {'@': 256}), 4: (1, {'@': 256}), 3: (1, {'@': 256}), 48: (1, {'@': 256}), 39: (1, {'@': 256}), 53: (1, {'@': 256}), 38: (1, {'@': 256}), 46: (1, {'@': 256}), 44: (1, {'@': 256}), 40: (1, {'@': 256}), 7: (1, {'@': 256})}, 266: {6: (1, {'@': 255}), 8: (1, {'@': 255}), 2: (1, {'@': 255}), 49: (1, {'@': 255}), 50: (1, {'@': 255}), 45: (1, {'@': 255}), 0: (1, {'@': 255}), 1: (1, {'@': 255}), 47: (1, {'@': 255}), 4: (1, {'@': 255}), 3: (1, {'@': 255}), 48: (1, {'@': 255}), 39: (1, {'@': 255}), 53: (1, {'@': 255}), 38: (1, {'@': 255}), 46: (1, {'@': 255}), 44: (1, {'@': 255}), 40: (1, {'@': 255}), 7: (1, {'@': 255})}, 267: {25: (1, {'@': 102}), 26: (1, {'@': 102})}, 268: {25: (1, {'@': 212}), 26: (1, {'@': 212})}, 269: {38: (0, 524), 0: (0, 209), 42: (0, 211), 6: (0, 132), 45: (0, 414), 46: (0, 532), 47: (0, 520), 48: (0, 408), 49: (0, 491), 41: (0, 214), 51: (0, 369), 50: (0, 481), 43: (0, 216)}, 270: {25: (1, {'@': 127}), 26: (1, {'@': 127})}, 271: {25: (1, {'@': 103}), 26: (1, {'@': 103})}, 272: {25: (1, {'@': 105}), 26: (1, {'@': 105})}, 273: {25: (1, {'@': 123}), 26: (1, {'@': 123})}, 274: {38: (0, 524), 0: (0, 180), 6: (0, 132), 45: (0, 414), 46: (0, 532), 47: (0, 520), 48: (0, 408), 41: (0, 127), 49: (0, 491), 50: (0, 481), 43: (0, 195), 51: (0, 369), 42: (0, 105)}, 275: {25: (1, {'@': 194}), 26: (1, {'@': 194})}, 276: {143: (1, {'@': 11}), 159: (1, {'@': 11}), 152: (1, {'@': 11}), 157: (1, {'@': 11}), 139: (1, {'@': 11}), 83: (1, {'@': 11}), 94: (1, {'@': 11}), 97: (1, {'@': 11}), 124: (1, {'@': 11}), 118: (1, {'@': 11}), 130: (1, {'@': 11}), 133: (1, {'@': 11}), 25: (1, {'@': 11}), 137: (1, {'@': 11}), 96: (1, {'@': 11}), 95: (1, {'@': 11}), 89: (1, {'@': 11}), 113: (1, {'@': 11}), 4: (1, {'@': 11}), 154: (1, {'@': 11}), 127: (1, {'@': 11}), 102: (1, {'@': 11}), 86: (1, {'@': 11}), 141: (1, {'@': 11}), 148: (1, {'@': 11}), 126: (1, {'@': 11}), 144: (1, {'@': 11}), 79: (1, {'@': 11}), 101: (1, {'@': 11}), 142: (1, {'@': 11}), 162: (1, {'@': 11}), 117: (1, {'@': 11}), 98: (1, {'@': 11}), 105: (1, {'@': 11}), 112: (1, {'@': 11}), 146: (1, {'@': 11}), 123: (1, {'@': 11}), 147: (1, {'@': 11}), 138: (1, {'@': 11}), 151: (1, {'@': 11}), 8: (1, {'@': 11}), 81: (1, {'@': 11}), 129: (1, {'@': 11}), 120: (1, {'@': 11}), 116: (1, {'@': 11}), 131: (1, {'@': 11}), 119: (1, {'@': 11}), 99: (1, {'@': 11}), 135: (1, {'@': 11}), 93: (1, {'@': 11}), 122: (1, {'@': 11}), 90: (1, {'@': 11}), 111: (1, {'@': 11}), 108: (1, {'@': 11}), 54: (1, {'@': 11}), 156: (1, {'@': 11}), 160: (1, {'@': 11}), 92: (1, {'@': 11}), 158: (1, {'@': 11}), 150: (1, {'@': 11}), 153: (1, {'@': 11}), 145: (1, {'@': 11}), 109: (1, {'@': 11}), 114: (1, {'@': 11}), 110: (1, {'@': 11}), 72: (1, {'@': 11}), 132: (1, {'@': 11}), 161: (1, {'@': 11}), 140: (1, {'@': 11}), 125: (1, {'@': 11}), 136: (1, {'@': 11}), 134: (1, {'@': 11}), 115: (1, {'@': 11}), 87: (1, {'@': 11}), 85: (1, {'@': 11}), 121: (1, {'@': 11}), 155: (1, {'@': 11}), 77: (1, {'@': 11}), 88: (1, {'@': 11}), 103: (1, {'@': 11}), 100: (1, {'@': 11}), 163: (1, {'@': 11}), 80: (1, {'@': 11}), 107: (1, {'@': 11}), 26: (1, {'@': 11})}, 277: {143: (1, {'@': 10}), 159: (1, {'@': 10}), 152: (1, {'@': 10}), 157: (1, {'@': 10}), 139: (1, {'@': 10}), 83: (1, {'@': 10}), 94: (1, {'@': 10}), 97: (1, {'@': 10}), 124: (1, {'@': 10}), 118: (1, {'@': 10}), 130: (1, {'@': 10}), 133: (1, {'@': 10}), 25: (1, {'@': 10}), 137: (1, {'@': 10}), 96: (1, {'@': 10}), 95: (1, {'@': 10}), 89: (1, {'@': 10}), 113: (1, {'@': 10}), 4: (1, {'@': 10}), 154: (1, {'@': 10}), 127: (1, {'@': 10}), 102: (1, {'@': 10}), 86: (1, {'@': 10}), 141: (1, {'@': 10}), 148: (1, {'@': 10}), 126: (1, {'@': 10}), 144: (1, {'@': 10}), 79: (1, {'@': 10}), 101: (1, {'@': 10}), 142: (1, {'@': 10}), 162: (1, {'@': 10}), 117: (1, {'@': 10}), 98: (1, {'@': 10}), 105: (1, {'@': 10}), 112: (1, {'@': 10}), 146: (1, {'@': 10}), 123: (1, {'@': 10}), 147: (1, {'@': 10}), 138: (1, {'@': 10}), 151: (1, {'@': 10}), 8: (1, {'@': 10}), 81: (1, {'@': 10}), 129: (1, {'@': 10}), 120: (1, {'@': 10}), 116: (1, {'@': 10}), 131: (1, {'@': 10}), 119: (1, {'@': 10}), 99: (1, {'@': 10}), 135: (1, {'@': 10}), 93: (1, {'@': 10}), 122: (1, {'@': 10}), 90: (1, {'@': 10}), 111: (1, {'@': 10}), 108: (1, {'@': 10}), 54: (1, {'@': 10}), 156: (1, {'@': 10}), 160: (1, {'@': 10}), 92: (1, {'@': 10}), 158: (1, {'@': 10}), 150: (1, {'@': 10}), 153: (1, {'@': 10}), 145: (1, {'@': 10}), 109: (1, {'@': 10}), 114: (1, {'@': 10}), 110: (1, {'@': 10}), 72: (1, {'@': 10}), 132: (1, {'@': 10}), 161: (1, {'@': 10}), 140: (1, {'@': 10}), 125: (1, {'@': 10}), 136: (1, {'@': 10}), 134: (1, {'@': 10}), 115: (1, {'@': 10}), 87: (1, {'@': 10}), 85: (1, {'@': 10}), 121: (1, {'@': 10}), 155: (1, {'@': 10}), 77: (1, {'@': 10}), 88: (1, {'@': 10}), 103: (1, {'@': 10}), 100: (1, {'@': 10}), 163: (1, {'@': 10}), 80: (1, {'@': 10}), 107: (1, {'@': 10}), 26: (1, {'@': 10})}, 278: {25: (1, {'@': 205}), 26: (1, {'@': 205})}, 279: {25: (1, {'@': 140}), 26: (1, {'@': 140})}, 280: {27: (0, 42)}, 281: {27: (0, 354)}, 282: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 36: (0, 504), 35: (0, 200), 2: (0, 252)}, 283: {25: (1, {'@': 228}), 27: (1, {'@': 228}), 26: (1, {'@': 228})}, 284: {25: (1, {'@': 222}), 26: (1, {'@': 222})}, 285: {64: (0, 427)}, 286: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 120}), 26: (1, {'@': 120})}, 287: {25: (1, {'@': 217}), 26: (1, {'@': 217})}, 288: {143: (1, {'@': 8}), 152: (1, {'@': 8}), 157: (1, {'@': 8}), 83: (1, {'@': 8}), 97: (1, {'@': 8}), 124: (1, {'@': 8}), 130: (1, {'@': 8}), 133: (1, {'@': 8}), 25: (1, {'@': 8}), 137: (1, {'@': 8}), 96: (1, {'@': 8}), 89: (1, {'@': 8}), 4: (1, {'@': 8}), 154: (1, {'@': 8}), 127: (1, {'@': 8}), 102: (1, {'@': 8}), 126: (1, {'@': 8}), 144: (1, {'@': 8}), 101: (1, {'@': 8}), 162: (1, {'@': 8}), 117: (1, {'@': 8}), 98: (1, {'@': 8}), 105: (1, {'@': 8}), 112: (1, {'@': 8}), 123: (1, {'@': 8}), 147: (1, {'@': 8}), 8: (1, {'@': 8}), 81: (1, {'@': 8}), 120: (1, {'@': 8}), 116: (1, {'@': 8}), 135: (1, {'@': 8}), 93: (1, {'@': 8}), 122: (1, {'@': 8}), 90: (1, {'@': 8}), 111: (1, {'@': 8}), 54: (1, {'@': 8}), 150: (1, {'@': 8}), 109: (1, {'@': 8}), 114: (1, {'@': 8}), 110: (1, {'@': 8}), 72: (1, {'@': 8}), 161: (1, {'@': 8}), 140: (1, {'@': 8}), 134: (1, {'@': 8}), 87: (1, {'@': 8}), 155: (1, {'@': 8}), 107: (1, {'@': 8}), 26: (1, {'@': 8}), 159: (1, {'@': 8}), 139: (1, {'@': 8}), 94: (1, {'@': 8}), 118: (1, {'@': 8}), 95: (1, {'@': 8}), 113: (1, {'@': 8}), 86: (1, {'@': 8}), 141: (1, {'@': 8}), 148: (1, {'@': 8}), 79: (1, {'@': 8}), 142: (1, {'@': 8}), 146: (1, {'@': 8}), 138: (1, {'@': 8}), 151: (1, {'@': 8}), 129: (1, {'@': 8}), 131: (1, {'@': 8}), 119: (1, {'@': 8}), 99: (1, {'@': 8}), 108: (1, {'@': 8}), 156: (1, {'@': 8}), 160: (1, {'@': 8}), 92: (1, {'@': 8}), 158: (1, {'@': 8}), 153: (1, {'@': 8}), 145: (1, {'@': 8}), 132: (1, {'@': 8}), 125: (1, {'@': 8}), 136: (1, {'@': 8}), 115: (1, {'@': 8}), 85: (1, {'@': 8}), 121: (1, {'@': 8}), 77: (1, {'@': 8}), 88: (1, {'@': 8}), 103: (1, {'@': 8}), 100: (1, {'@': 8}), 163: (1, {'@': 8}), 80: (1, {'@': 8})}, 289: {25: (1, {'@': 64}), 26: (1, {'@': 64})}, 290: {25: (1, {'@': 92}), 26: (1, {'@': 92})}, 291: {4: (0, 333), 164: (0, 323)}, 292: {25: (1, {'@': 225}), 26: (1, {'@': 225})}, 293: {25: (1, {'@': 90}), 26: (1, {'@': 90})}, 294: {25: (1, {'@': 125}), 26: (1, {'@': 125})}, 295: {38: (0, 524), 39: (0, 430), 40: (0, 498), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 163), 29: (0, 490), 30: (0, 509), 0: (0, 467), 9: (0, 371), 4: (0, 486), 42: (0, 444), 31: (0, 488), 32: (0, 412), 3: (0, 473), 44: (0, 361), 33: (0, 395), 45: (0, 414), 43: (0, 396), 7: (0, 374), 36: (0, 420), 46: (0, 532), 47: (0, 520), 52: (0, 384), 48: (0, 408), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 49: (0, 491), 2: (0, 252), 50: (0, 481), 53: (0, 462), 51: (0, 369), 41: (0, 373)}, 296: {38: (0, 365), 28: (0, 499), 55: (0, 424), 56: (0, 398), 1: (0, 360), 5: (0, 472), 6: (0, 443), 29: (0, 490), 30: (0, 509), 60: (0, 526), 57: (0, 434), 47: (0, 390), 9: (0, 517), 58: (0, 528), 59: (0, 516), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 43: (0, 453), 33: (0, 395), 61: (0, 388), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 62: (0, 335), 35: (0, 200), 36: (0, 238), 2: (0, 252), 63: (0, 190)}, 297: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 527), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 75: (0, 464), 36: (0, 521), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 298: {25: (1, {'@': 91}), 26: (1, {'@': 91})}, 299: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 511), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 512)}, 300: {9: (0, 43), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 46)}, 301: {1: (1, {'@': 259}), 6: (1, {'@': 259}), 4: (1, {'@': 259}), 8: (1, {'@': 259}), 2: (1, {'@': 259}), 7: (1, {'@': 259}), 3: (1, {'@': 259})}, 302: {25: (1, {'@': 93}), 26: (1, {'@': 93})}, 303: {25: (1, {'@': 59}), 26: (1, {'@': 59})}, 304: {46: (0, 532), 47: (0, 520), 49: (0, 491), 50: (0, 481), 51: (0, 369), 48: (0, 408), 0: (0, 51), 45: (0, 414), 41: (0, 55)}, 305: {4: (0, 508)}, 306: {27: (0, 35)}, 307: {25: (1, {'@': 247}), 26: (1, {'@': 247}), 27: (1, {'@': 247})}, 308: {48: (1, {'@': 268}), 50: (1, {'@': 268}), 38: (1, {'@': 268}), 45: (1, {'@': 268}), 46: (1, {'@': 268}), 0: (1, {'@': 268}), 6: (1, {'@': 268}), 47: (1, {'@': 268}), 49: (1, {'@': 268})}, 309: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 166}), 26: (1, {'@': 166})}, 310: {25: (1, {'@': 165}), 26: (1, {'@': 165})}, 311: {165: (0, 50)}, 312: {27: (0, 39), 25: (1, {'@': 69}), 26: (1, {'@': 69})}, 313: {71: (0, 263), 22: (0, 258), 65: (0, 256), 66: (0, 57)}, 314: {25: (1, {'@': 193}), 26: (1, {'@': 193})}, 315: {6: (0, 401), 73: (0, 68), 38: (0, 246), 65: (0, 500)}, 316: {46: (0, 532), 47: (0, 520), 49: (0, 491), 50: (0, 481), 51: (0, 369), 48: (0, 408), 41: (0, 62), 0: (0, 353), 45: (0, 414)}, 317: {1: (0, 360), 2: (0, 252), 3: (0, 473), 4: (0, 486), 5: (0, 472), 6: (0, 355), 7: (0, 374), 8: (0, 332), 9: (0, 12), 10: (0, 362)}, 318: {25: (1, {'@': 210}), 26: (1, {'@': 210})}, 319: {0: (0, 74)}, 320: {27: (0, 23)}, 321: {37: (0, 60), 12: (1, {'@': 331}), 13: (1, {'@': 331}), 14: (1, {'@': 331}), 15: (1, {'@': 331}), 16: (1, {'@': 331}), 1: (1, {'@': 331}), 17: (1, {'@': 331}), 18: (1, {'@': 331}), 19: (1, {'@': 331}), 20: (1, {'@': 331}), 7: (1, {'@': 331})}, 322: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 169}), 26: (1, {'@': 169})}, 323: {27: (0, 489), 25: (1, {'@': 50}), 26: (1, {'@': 50})}, 324: {25: (1, {'@': 168}), 26: (1, {'@': 168})}, 325: {25: (1, {'@': 219}), 26: (1, {'@': 219})}, 326: {55: (0, 424), 56: (0, 398), 63: (0, 190), 57: (0, 434), 62: (0, 335), 47: (0, 390), 60: (0, 213), 61: (0, 388), 58: (0, 528), 59: (0, 516), 25: (1, {'@': 218}), 26: (1, {'@': 218})}, 327: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 238}), 27: (1, {'@': 238}), 26: (1, {'@': 238})}, 328: {27: (0, 274), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 329: {25: (1, {'@': 237}), 27: (1, {'@': 237}), 26: (1, {'@': 237})}, 330: {25: (1, {'@': 191}), 26: (1, {'@': 191})}, 331: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 233}), 27: (1, {'@': 233}), 26: (1, {'@': 233})}, 332: {12: (1, {'@': 335}), 13: (1, {'@': 335}), 14: (1, {'@': 335}), 15: (1, {'@': 335}), 16: (1, {'@': 335}), 1: (1, {'@': 335}), 17: (1, {'@': 335}), 18: (1, {'@': 335}), 37: (1, {'@': 335}), 19: (1, {'@': 335}), 20: (1, {'@': 335}), 7: (1, {'@': 335}), 25: (1, {'@': 335}), 26: (1, {'@': 335}), 27: (1, {'@': 335}), 11: (1, {'@': 335}), 67: (1, {'@': 335})}, 333: {25: (1, {'@': 227}), 27: (1, {'@': 227}), 26: (1, {'@': 227})}, 334: {25: (1, {'@': 234}), 27: (1, {'@': 234}), 26: (1, {'@': 234})}, 335: {27: (1, {'@': 296}), 25: (1, {'@': 296}), 26: (1, {'@': 296})}, 336: {25: (1, {'@': 232}), 27: (1, {'@': 232}), 26: (1, {'@': 232})}, 337: {6: (1, {'@': 253}), 8: (1, {'@': 253}), 2: (1, {'@': 253}), 49: (1, {'@': 253}), 50: (1, {'@': 253}), 45: (1, {'@': 253}), 0: (1, {'@': 253}), 1: (1, {'@': 253}), 47: (1, {'@': 253}), 4: (1, {'@': 253}), 3: (1, {'@': 253}), 48: (1, {'@': 253}), 39: (1, {'@': 253}), 53: (1, {'@': 253}), 38: (1, {'@': 253}), 46: (1, {'@': 253}), 44: (1, {'@': 253}), 40: (1, {'@': 253}), 7: (1, {'@': 253})}, 338: {37: (0, 63), 12: (1, {'@': 330}), 13: (1, {'@': 330}), 14: (1, {'@': 330}), 15: (1, {'@': 330}), 16: (1, {'@': 330}), 1: (1, {'@': 330}), 17: (1, {'@': 330}), 18: (1, {'@': 330}), 19: (1, {'@': 330}), 20: (1, {'@': 330}), 7: (1, {'@': 330})}, 339: {13: (1, {'@': 333}), 14: (1, {'@': 333}), 37: (1, {'@': 333}), 19: (1, {'@': 333}), 12: (1, {'@': 333}), 15: (1, {'@': 333}), 16: (1, {'@': 333}), 1: (1, {'@': 333}), 17: (1, {'@': 333}), 18: (1, {'@': 333}), 20: (1, {'@': 333}), 7: (1, {'@': 333}), 25: (1, {'@': 333}), 26: (1, {'@': 333}), 27: (1, {'@': 333}), 11: (1, {'@': 333}), 67: (1, {'@': 333})}, 340: {25: (1, {'@': 248}), 26: (1, {'@': 248}), 27: (1, {'@': 248})}, 341: {25: (1, {'@': 203}), 26: (1, {'@': 203})}, 342: {25: (1, {'@': 301}), 26: (1, {'@': 301}), 27: (1, {'@': 301})}, 343: {0: (0, 73)}, 344: {25: (1, {'@': 202}), 26: (1, {'@': 202})}, 345: {25: (1, {'@': 34}), 26: (1, {'@': 34})}, 346: {27: (0, 304)}, 347: {143: (1, {'@': 14}), 159: (1, {'@': 14}), 152: (1, {'@': 14}), 157: (1, {'@': 14}), 139: (1, {'@': 14}), 83: (1, {'@': 14}), 94: (1, {'@': 14}), 97: (1, {'@': 14}), 124: (1, {'@': 14}), 118: (1, {'@': 14}), 130: (1, {'@': 14}), 133: (1, {'@': 14}), 25: (1, {'@': 14}), 137: (1, {'@': 14}), 96: (1, {'@': 14}), 95: (1, {'@': 14}), 89: (1, {'@': 14}), 113: (1, {'@': 14}), 4: (1, {'@': 14}), 154: (1, {'@': 14}), 127: (1, {'@': 14}), 102: (1, {'@': 14}), 86: (1, {'@': 14}), 141: (1, {'@': 14}), 148: (1, {'@': 14}), 126: (1, {'@': 14}), 144: (1, {'@': 14}), 79: (1, {'@': 14}), 101: (1, {'@': 14}), 142: (1, {'@': 14}), 162: (1, {'@': 14}), 117: (1, {'@': 14}), 98: (1, {'@': 14}), 105: (1, {'@': 14}), 112: (1, {'@': 14}), 146: (1, {'@': 14}), 123: (1, {'@': 14}), 147: (1, {'@': 14}), 138: (1, {'@': 14}), 151: (1, {'@': 14}), 8: (1, {'@': 14}), 81: (1, {'@': 14}), 129: (1, {'@': 14}), 120: (1, {'@': 14}), 116: (1, {'@': 14}), 131: (1, {'@': 14}), 119: (1, {'@': 14}), 99: (1, {'@': 14}), 135: (1, {'@': 14}), 93: (1, {'@': 14}), 122: (1, {'@': 14}), 90: (1, {'@': 14}), 111: (1, {'@': 14}), 108: (1, {'@': 14}), 54: (1, {'@': 14}), 156: (1, {'@': 14}), 160: (1, {'@': 14}), 92: (1, {'@': 14}), 158: (1, {'@': 14}), 150: (1, {'@': 14}), 153: (1, {'@': 14}), 145: (1, {'@': 14}), 109: (1, {'@': 14}), 114: (1, {'@': 14}), 110: (1, {'@': 14}), 72: (1, {'@': 14}), 132: (1, {'@': 14}), 161: (1, {'@': 14}), 140: (1, {'@': 14}), 125: (1, {'@': 14}), 136: (1, {'@': 14}), 134: (1, {'@': 14}), 115: (1, {'@': 14}), 87: (1, {'@': 14}), 85: (1, {'@': 14}), 121: (1, {'@': 14}), 155: (1, {'@': 14}), 77: (1, {'@': 14}), 88: (1, {'@': 14}), 103: (1, {'@': 14}), 100: (1, {'@': 14}), 163: (1, {'@': 14}), 80: (1, {'@': 14}), 107: (1, {'@': 14}), 26: (1, {'@': 14})}, 348: {28: (0, 499), 1: (0, 360), 65: (0, 14), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 23: (0, 393), 3: (0, 473), 24: (0, 410), 66: (0, 17), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 22: (0, 394), 2: (0, 252), 36: (0, 445)}, 349: {9: (0, 2), 1: (0, 360), 2: (0, 252), 3: (0, 473), 4: (0, 486), 5: (0, 472), 6: (0, 355), 7: (0, 374), 8: (0, 332), 10: (0, 362)}, 350: {37: (0, 71), 12: (1, {'@': 330}), 13: (1, {'@': 330}), 14: (1, {'@': 330}), 15: (1, {'@': 330}), 16: (1, {'@': 330}), 1: (1, {'@': 330}), 17: (1, {'@': 330}), 18: (1, {'@': 330}), 19: (1, {'@': 330}), 20: (1, {'@': 330}), 7: (1, {'@': 330})}, 351: {25: (1, {'@': 80}), 26: (1, {'@': 80}), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 352: {25: (1, {'@': 242}), 26: (1, {'@': 242}), 27: (1, {'@': 242})}, 353: {25: (1, {'@': 184}), 26: (1, {'@': 184})}, 354: {38: (0, 174), 6: (0, 156)}, 355: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 454), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 392)}, 356: {11: (0, 368)}, 357: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 41: (0, 164), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 45: (0, 414), 0: (0, 166), 46: (0, 532), 7: (0, 374), 36: (0, 168), 47: (0, 520), 48: (0, 408), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 49: (0, 491), 2: (0, 252), 50: (0, 481), 51: (0, 369)}, 358: {11: (0, 306)}, 359: {66: (0, 115), 23: (0, 416), 65: (0, 218), 22: (0, 220), 21: (0, 223), 71: (0, 225), 24: (0, 469)}, 360: {1: (0, 360), 2: (0, 252), 3: (0, 473), 4: (0, 486), 5: (0, 472), 6: (0, 355), 7: (0, 374), 8: (0, 332), 9: (0, 418), 10: (0, 362)}, 361: {25: (1, {'@': 285}), 26: (1, {'@': 285}), 27: (1, {'@': 285})}, 362: {12: (1, {'@': 329}), 13: (1, {'@': 329}), 14: (1, {'@': 329}), 15: (1, {'@': 329}), 16: (1, {'@': 329}), 1: (1, {'@': 329}), 17: (1, {'@': 329}), 18: (1, {'@': 329}), 37: (1, {'@': 329}), 19: (1, {'@': 329}), 20: (1, {'@': 329}), 7: (1, {'@': 329}), 25: (1, {'@': 329}), 26: (1, {'@': 329}), 27: (1, {'@': 329}), 11: (1, {'@': 329}), 67: (1, {'@': 329})}, 363: {9: (0, 197), 6: (0, 199), 166: (0, 205), 38: (0, 207)}, 364: {27: (0, 47)}, 365: {21: (0, 484), 23: (0, 416), 22: (0, 394), 24: (0, 469)}, 366: {67: (0, 110)}, 367: {27: (0, 357)}, 368: {27: (0, 28)}, 369: {25: (1, {'@': 277}), 26: (1, {'@': 277}), 27: (1, {'@': 277})}, 370: {22: (0, 399), 0: (0, 203), 23: (0, 416), 69: (0, 279), 65: (0, 459), 66: (0, 447), 71: (0, 153), 24: (0, 469), 21: (0, 501)}, 371: {25: (1, {'@': 134}), 26: (1, {'@': 134}), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 372: {166: (0, 158), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 159), 38: (0, 9), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 161)}, 373: {25: (1, {'@': 128}), 26: (1, {'@': 128})}, 374: {1: (0, 360), 2: (0, 252), 3: (0, 473), 9: (0, 379), 5: (0, 472), 7: (0, 374), 8: (0, 332), 6: (0, 355), 10: (0, 385), 4: (0, 486)}, 375: {27: (0, 319)}, 376: {27: (0, 372)}, 377: {28: (0, 499), 1: (0, 349), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 102), 10: (0, 382), 34: (0, 456), 8: (0, 332), 36: (0, 118), 35: (0, 200), 2: (0, 252)}, 378: {25: (1, {'@': 173}), 26: (1, {'@': 173})}, 379: {12: (1, {'@': 330}), 13: (1, {'@': 330}), 14: (1, {'@': 330}), 15: (1, {'@': 330}), 16: (1, {'@': 330}), 1: (1, {'@': 330}), 17: (1, {'@': 330}), 18: (1, {'@': 330}), 37: (1, {'@': 330}), 19: (1, {'@': 330}), 20: (1, {'@': 330}), 7: (1, {'@': 330}), 25: (1, {'@': 330}), 26: (1, {'@': 330}), 27: (1, {'@': 330}), 11: (1, {'@': 330}), 67: (1, {'@': 330})}, 380: {25: (1, {'@': 154}), 26: (1, {'@': 154})}, 381: {27: (0, 436)}, 382: {19: (1, {'@': 308}), 12: (1, {'@': 327}), 13: (1, {'@': 327}), 14: (1, {'@': 327}), 15: (1, {'@': 327}), 16: (1, {'@': 327}), 1: (1, {'@': 327}), 17: (1, {'@': 327}), 18: (1, {'@': 327}), 37: (1, {'@': 327}), 20: (1, {'@': 327}), 7: (1, {'@': 327}), 25: (1, {'@': 327}), 26: (1, {'@': 327}), 27: (1, {'@': 327}), 11: (1, {'@': 327}), 67: (1, {'@': 327})}, 383: {27: (0, 313)}, 384: {25: (1, {'@': 129}), 26: (1, {'@': 129})}, 385: {12: (1, {'@': 328}), 13: (1, {'@': 328}), 14: (1, {'@': 328}), 15: (1, {'@': 328}), 16: (1, {'@': 328}), 1: (1, {'@': 328}), 17: (1, {'@': 328}), 18: (1, {'@': 328}), 37: (1, {'@': 328}), 19: (1, {'@': 328}), 20: (1, {'@': 328}), 7: (1, {'@': 328}), 25: (1, {'@': 328}), 26: (1, {'@': 328}), 27: (1, {'@': 328}), 11: (1, {'@': 328}), 67: (1, {'@': 328})}, 386: {9: (0, 95), 1: (0, 360), 10: (0, 382), 2: (0, 252), 3: (0, 473), 68: (0, 193), 6: (0, 355), 34: (0, 456), 7: (0, 374), 5: (0, 472), 8: (0, 332), 4: (0, 486), 35: (0, 175)}, 387: {28: (0, 499), 1: (0, 317), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 120), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 130)}, 388: {27: (1, {'@': 299}), 25: (1, {'@': 299}), 26: (1, {'@': 299})}, 389: {73: (0, 311)}, 390: {27: (1, {'@': 298}), 25: (1, {'@': 298}), 26: (1, {'@': 298})}, 391: {37: (0, 375)}, 392: {11: (0, 339)}, 393: {28: (0, 499), 1: (0, 24), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 33), 36: (0, 44), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 394: {37: (0, 405)}, 395: {16: (0, 78), 12: (0, 446), 13: (0, 386)}, 396: {25: (1, {'@': 131}), 26: (1, {'@': 131})}, 397: {27: (0, 343)}, 398: {27: (1, {'@': 300}), 25: (1, {'@': 300}), 26: (1, {'@': 300})}, 399: {25: (1, {'@': 288}), 26: (1, {'@': 288}), 27: (1, {'@': 288})}, 400: {25: (1, {'@': 178}), 26: (1, {'@': 178})}, 401: {71: (0, 358)}, 402: {25: (1, {'@': 19}), 26: (1, {'@': 19})}, 403: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 186), 30: (0, 178), 4: (0, 486), 3: (0, 473), 33: (0, 395), 7: (0, 374), 9: (0, 177), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 404: {29: (0, 188), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 30: (0, 178), 4: (0, 486), 3: (0, 473), 33: (0, 395), 7: (0, 374), 9: (0, 177), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 405: {25: (1, {'@': 240}), 26: (1, {'@': 240}), 27: (1, {'@': 240})}, 406: {27: (0, 455)}, 407: {37: (0, 397)}, 408: {25: (1, {'@': 275}), 26: (1, {'@': 275}), 27: (1, {'@': 275})}, 409: {143: (1, {'@': 13}), 159: (1, {'@': 13}), 152: (1, {'@': 13}), 157: (1, {'@': 13}), 139: (1, {'@': 13}), 83: (1, {'@': 13}), 94: (1, {'@': 13}), 97: (1, {'@': 13}), 124: (1, {'@': 13}), 118: (1, {'@': 13}), 130: (1, {'@': 13}), 133: (1, {'@': 13}), 25: (1, {'@': 13}), 137: (1, {'@': 13}), 96: (1, {'@': 13}), 95: (1, {'@': 13}), 89: (1, {'@': 13}), 113: (1, {'@': 13}), 4: (1, {'@': 13}), 154: (1, {'@': 13}), 127: (1, {'@': 13}), 102: (1, {'@': 13}), 86: (1, {'@': 13}), 141: (1, {'@': 13}), 148: (1, {'@': 13}), 126: (1, {'@': 13}), 144: (1, {'@': 13}), 79: (1, {'@': 13}), 101: (1, {'@': 13}), 142: (1, {'@': 13}), 162: (1, {'@': 13}), 117: (1, {'@': 13}), 98: (1, {'@': 13}), 105: (1, {'@': 13}), 112: (1, {'@': 13}), 146: (1, {'@': 13}), 123: (1, {'@': 13}), 147: (1, {'@': 13}), 138: (1, {'@': 13}), 151: (1, {'@': 13}), 8: (1, {'@': 13}), 81: (1, {'@': 13}), 129: (1, {'@': 13}), 120: (1, {'@': 13}), 116: (1, {'@': 13}), 131: (1, {'@': 13}), 119: (1, {'@': 13}), 99: (1, {'@': 13}), 135: (1, {'@': 13}), 93: (1, {'@': 13}), 122: (1, {'@': 13}), 90: (1, {'@': 13}), 111: (1, {'@': 13}), 108: (1, {'@': 13}), 54: (1, {'@': 13}), 156: (1, {'@': 13}), 160: (1, {'@': 13}), 92: (1, {'@': 13}), 158: (1, {'@': 13}), 150: (1, {'@': 13}), 153: (1, {'@': 13}), 145: (1, {'@': 13}), 109: (1, {'@': 13}), 114: (1, {'@': 13}), 110: (1, {'@': 13}), 72: (1, {'@': 13}), 132: (1, {'@': 13}), 161: (1, {'@': 13}), 140: (1, {'@': 13}), 125: (1, {'@': 13}), 136: (1, {'@': 13}), 134: (1, {'@': 13}), 115: (1, {'@': 13}), 87: (1, {'@': 13}), 85: (1, {'@': 13}), 121: (1, {'@': 13}), 155: (1, {'@': 13}), 77: (1, {'@': 13}), 88: (1, {'@': 13}), 103: (1, {'@': 13}), 100: (1, {'@': 13}), 163: (1, {'@': 13}), 80: (1, {'@': 13}), 107: (1, {'@': 13}), 26: (1, {'@': 13})}, 410: {1: (0, 1), 28: (0, 499), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 36: (0, 49), 7: (0, 54), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 411: {27: (0, 523)}, 412: {14: (0, 413), 15: (0, 426), 18: (0, 403), 17: (0, 404), 20: (0, 421)}, 413: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 139), 30: (0, 178), 4: (0, 486), 3: (0, 473), 33: (0, 395), 7: (0, 374), 9: (0, 177), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 414: {25: (1, {'@': 280}), 26: (1, {'@': 280}), 27: (1, {'@': 280})}, 415: {0: (0, 224)}, 416: {27: (1, {'@': 291}), 25: (1, {'@': 291}), 26: (1, {'@': 291}), 37: (1, {'@': 291}), 11: (1, {'@': 291})}, 417: {25: (1, {'@': 172}), 26: (1, {'@': 172})}, 418: {12: (1, {'@': 331}), 13: (1, {'@': 331}), 14: (1, {'@': 331}), 15: (1, {'@': 331}), 16: (1, {'@': 331}), 1: (1, {'@': 331}), 17: (1, {'@': 331}), 18: (1, {'@': 331}), 37: (1, {'@': 331}), 19: (1, {'@': 331}), 20: (1, {'@': 331}), 7: (1, {'@': 331}), 25: (1, {'@': 331}), 26: (1, {'@': 331}), 27: (1, {'@': 331}), 11: (1, {'@': 331}), 67: (1, {'@': 331})}, 419: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 176}), 26: (1, {'@': 176})}, 420: {25: (1, {'@': 133}), 26: (1, {'@': 133})}, 421: {29: (0, 189), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 30: (0, 178), 4: (0, 486), 3: (0, 473), 33: (0, 395), 7: (0, 374), 9: (0, 177), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 422: {27: (0, 477)}, 423: {26: (0, 518), 25: (0, 485)}, 424: {27: (1, {'@': 297}), 25: (1, {'@': 297}), 26: (1, {'@': 297})}, 425: {27: (0, 38)}, 426: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 185), 30: (0, 178), 4: (0, 486), 3: (0, 473), 33: (0, 395), 7: (0, 374), 9: (0, 177), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 427: {27: (0, 40), 25: (1, {'@': 68}), 26: (1, {'@': 68})}, 428: {25: (1, {'@': 18}), 26: (1, {'@': 18})}, 429: {71: (0, 422), 42: (0, 538), 38: (0, 537), 0: (0, 531), 6: (0, 495), 166: (0, 525), 47: (0, 520), 52: (0, 507), 21: (0, 501), 50: (0, 481), 53: (0, 462), 65: (0, 459), 41: (0, 441), 9: (0, 438), 39: (0, 430), 23: (0, 416), 45: (0, 414), 69: (0, 376), 167: (0, 406), 22: (0, 399), 51: (0, 369), 43: (0, 367), 44: (0, 361), 48: (0, 408), 66: (0, 447), 24: (0, 469), 49: (0, 491), 40: (0, 498), 46: (0, 532), 168: (0, 519)}, 430: {25: (1, {'@': 284}), 26: (1, {'@': 284}), 27: (1, {'@': 284})}, 431: {25: (1, {'@': 151}), 26: (1, {'@': 151})}, 432: {11: (0, 66)}, 433: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 47: (0, 452), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 445)}, 434: {27: (1, {'@': 292}), 25: (1, {'@': 292}), 26: (1, {'@': 292})}, 435: {38: (0, 524), 39: (0, 430), 40: (0, 498), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 163), 29: (0, 490), 30: (0, 509), 9: (0, 351), 4: (0, 486), 0: (0, 141), 31: (0, 488), 32: (0, 412), 41: (0, 143), 3: (0, 473), 44: (0, 361), 33: (0, 395), 45: (0, 414), 7: (0, 374), 46: (0, 532), 47: (0, 520), 42: (0, 146), 48: (0, 408), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 36: (0, 147), 52: (0, 150), 2: (0, 252), 49: (0, 491), 53: (0, 462), 51: (0, 369), 50: (0, 481), 43: (0, 151)}, 436: {38: (0, 524), 39: (0, 430), 40: (0, 498), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 163), 29: (0, 490), 30: (0, 509), 9: (0, 241), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 0: (0, 264), 44: (0, 361), 41: (0, 267), 33: (0, 395), 45: (0, 414), 7: (0, 374), 46: (0, 532), 47: (0, 520), 48: (0, 408), 10: (0, 382), 34: (0, 456), 8: (0, 332), 42: (0, 270), 35: (0, 200), 52: (0, 271), 43: (0, 272), 49: (0, 491), 2: (0, 252), 50: (0, 481), 51: (0, 369), 53: (0, 462), 36: (0, 273)}, 437: {33: (0, 154), 1: (0, 360), 5: (0, 472), 6: (0, 355), 4: (0, 486), 3: (0, 473), 7: (0, 374), 9: (0, 155), 10: (0, 382), 34: (0, 456), 8: (0, 332), 28: (0, 170), 35: (0, 200), 2: (0, 252)}, 438: {27: (0, 370)}, 439: {11: (0, 162)}, 440: {9: (0, 95), 1: (0, 360), 10: (0, 382), 2: (0, 252), 3: (0, 473), 6: (0, 355), 34: (0, 456), 7: (0, 374), 5: (0, 472), 8: (0, 332), 68: (0, 194), 4: (0, 486), 35: (0, 175)}, 441: {27: (0, 435)}, 442: {27: (0, 478)}, 443: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 454), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 23: (0, 416), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 22: (0, 505), 35: (0, 200), 24: (0, 469), 2: (0, 252), 36: (0, 392), 21: (0, 439)}, 444: {25: (1, {'@': 132}), 26: (1, {'@': 132})}, 445: {37: (0, 342)}, 446: {9: (0, 95), 1: (0, 360), 10: (0, 382), 2: (0, 252), 3: (0, 473), 6: (0, 355), 34: (0, 456), 7: (0, 374), 5: (0, 472), 8: (0, 332), 68: (0, 192), 4: (0, 486), 35: (0, 175)}, 447: {25: (1, {'@': 286}), 26: (1, {'@': 286}), 27: (1, {'@': 286})}, 448: {25: (1, {'@': 274}), 26: (1, {'@': 274})}, 449: {25: (1, {'@': 60}), 26: (1, {'@': 60})}, 450: {25: (1, {'@': 142}), 26: (1, {'@': 142})}, 451: {1: (0, 360), 5: (0, 472), 6: (0, 355), 4: (0, 486), 3: (0, 473), 33: (0, 172), 7: (0, 374), 9: (0, 155), 10: (0, 382), 34: (0, 456), 8: (0, 332), 28: (0, 170), 35: (0, 200), 2: (0, 252)}, 452: {37: (0, 346)}, 453: {25: (1, {'@': 87}), 26: (1, {'@': 87})}, 454: {11: (0, 72), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 455: {0: (0, 345)}, 456: {19: (0, 440)}, 457: {25: (1, {'@': 77}), 26: (1, {'@': 77})}, 458: {25: (1, {'@': 65}), 26: (1, {'@': 65})}, 459: {25: (1, {'@': 287}), 26: (1, {'@': 287}), 27: (1, {'@': 287})}, 460: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 61}), 26: (1, {'@': 61})}, 461: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 36: (0, 5), 33: (0, 395), 41: (0, 19), 45: (0, 414), 7: (0, 374), 46: (0, 532), 47: (0, 520), 48: (0, 408), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 0: (0, 22), 49: (0, 491), 2: (0, 252), 50: (0, 481), 51: (0, 369)}, 462: {25: (1, {'@': 282}), 26: (1, {'@': 282}), 27: (1, {'@': 282})}, 463: {25: (1, {'@': 272}), 26: (1, {'@': 272})}, 464: {27: (0, 98), 25: (1, {'@': 53}), 26: (1, {'@': 53})}, 465: {25: (1, {'@': 271}), 26: (1, {'@': 271})}, 466: {27: (0, 53), 25: (1, {'@': 51}), 26: (1, {'@': 51})}, 467: {25: (1, {'@': 130}), 26: (1, {'@': 130})}, 468: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 177}), 26: (1, {'@': 177})}, 469: {27: (1, {'@': 290}), 25: (1, {'@': 290}), 26: (1, {'@': 290}), 37: (1, {'@': 290}), 11: (1, {'@': 290})}, 470: {27: (0, 64)}, 471: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 25: (1, {'@': 231}), 27: (1, {'@': 231}), 26: (1, {'@': 231}), 19: (1, {'@': 309})}, 472: {12: (1, {'@': 332}), 13: (1, {'@': 332}), 14: (1, {'@': 332}), 15: (1, {'@': 332}), 16: (1, {'@': 332}), 1: (1, {'@': 332}), 17: (1, {'@': 332}), 18: (1, {'@': 332}), 37: (1, {'@': 332}), 19: (1, {'@': 332}), 20: (1, {'@': 332}), 7: (1, {'@': 332}), 25: (1, {'@': 332}), 26: (1, {'@': 332}), 27: (1, {'@': 332}), 11: (1, {'@': 332}), 67: (1, {'@': 332})}, 473: {12: (1, {'@': 338}), 13: (1, {'@': 338}), 14: (1, {'@': 338}), 15: (1, {'@': 338}), 16: (1, {'@': 338}), 1: (1, {'@': 338}), 17: (1, {'@': 338}), 18: (1, {'@': 338}), 37: (1, {'@': 338}), 19: (1, {'@': 338}), 20: (1, {'@': 338}), 7: (1, {'@': 338}), 25: (1, {'@': 338}), 26: (1, {'@': 338}), 27: (1, {'@': 338}), 11: (1, {'@': 338}), 67: (1, {'@': 338})}, 474: {25: (1, {'@': 269}), 26: (1, {'@': 269})}, 475: {25: (1, {'@': 230}), 27: (1, {'@': 230}), 26: (1, {'@': 230})}, 476: {25: (1, {'@': 137}), 26: (1, {'@': 137})}, 477: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 8), 38: (0, 9), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 23: (0, 416), 166: (0, 13), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 24: (0, 469), 35: (0, 200), 2: (0, 252), 22: (0, 15), 21: (0, 16), 36: (0, 18)}, 478: {0: (0, 61)}, 479: {166: (0, 442), 6: (0, 522), 9: (0, 411), 38: (0, 433)}, 480: {54: (1, {'@': 4}), 25: (1, {'@': 4})}, 481: {25: (1, {'@': 281}), 26: (1, {'@': 281}), 27: (1, {'@': 281})}, 482: {65: (0, 244), 71: (0, 237), 22: (0, 234), 66: (0, 232)}, 483: {25: (1, {'@': 78}), 26: (1, {'@': 78})}, 484: {37: (0, 114)}, 485: {143: (1, {'@': 12}), 159: (1, {'@': 12}), 152: (1, {'@': 12}), 157: (1, {'@': 12}), 139: (1, {'@': 12}), 83: (1, {'@': 12}), 94: (1, {'@': 12}), 97: (1, {'@': 12}), 124: (1, {'@': 12}), 118: (1, {'@': 12}), 130: (1, {'@': 12}), 133: (1, {'@': 12}), 25: (1, {'@': 12}), 137: (1, {'@': 12}), 96: (1, {'@': 12}), 95: (1, {'@': 12}), 89: (1, {'@': 12}), 113: (1, {'@': 12}), 4: (1, {'@': 12}), 154: (1, {'@': 12}), 127: (1, {'@': 12}), 102: (1, {'@': 12}), 86: (1, {'@': 12}), 141: (1, {'@': 12}), 148: (1, {'@': 12}), 126: (1, {'@': 12}), 144: (1, {'@': 12}), 79: (1, {'@': 12}), 101: (1, {'@': 12}), 142: (1, {'@': 12}), 162: (1, {'@': 12}), 117: (1, {'@': 12}), 98: (1, {'@': 12}), 105: (1, {'@': 12}), 112: (1, {'@': 12}), 146: (1, {'@': 12}), 123: (1, {'@': 12}), 147: (1, {'@': 12}), 138: (1, {'@': 12}), 151: (1, {'@': 12}), 8: (1, {'@': 12}), 81: (1, {'@': 12}), 129: (1, {'@': 12}), 120: (1, {'@': 12}), 116: (1, {'@': 12}), 131: (1, {'@': 12}), 119: (1, {'@': 12}), 99: (1, {'@': 12}), 135: (1, {'@': 12}), 93: (1, {'@': 12}), 122: (1, {'@': 12}), 90: (1, {'@': 12}), 111: (1, {'@': 12}), 108: (1, {'@': 12}), 54: (1, {'@': 12}), 156: (1, {'@': 12}), 160: (1, {'@': 12}), 92: (1, {'@': 12}), 158: (1, {'@': 12}), 150: (1, {'@': 12}), 153: (1, {'@': 12}), 145: (1, {'@': 12}), 109: (1, {'@': 12}), 114: (1, {'@': 12}), 110: (1, {'@': 12}), 72: (1, {'@': 12}), 132: (1, {'@': 12}), 161: (1, {'@': 12}), 140: (1, {'@': 12}), 125: (1, {'@': 12}), 136: (1, {'@': 12}), 134: (1, {'@': 12}), 115: (1, {'@': 12}), 87: (1, {'@': 12}), 85: (1, {'@': 12}), 121: (1, {'@': 12}), 155: (1, {'@': 12}), 77: (1, {'@': 12}), 88: (1, {'@': 12}), 103: (1, {'@': 12}), 100: (1, {'@': 12}), 163: (1, {'@': 12}), 80: (1, {'@': 12}), 107: (1, {'@': 12}), 26: (1, {'@': 12})}, 486: {12: (1, {'@': 336}), 13: (1, {'@': 336}), 14: (1, {'@': 336}), 15: (1, {'@': 336}), 16: (1, {'@': 336}), 1: (1, {'@': 336}), 17: (1, {'@': 336}), 18: (1, {'@': 336}), 37: (1, {'@': 336}), 19: (1, {'@': 336}), 20: (1, {'@': 336}), 7: (1, {'@': 336}), 25: (1, {'@': 336}), 26: (1, {'@': 336}), 27: (1, {'@': 336}), 11: (1, {'@': 336}), 67: (1, {'@': 336})}, 487: {25: (1, {'@': 229}), 27: (1, {'@': 229}), 26: (1, {'@': 229})}, 488: {14: (1, {'@': 302}), 15: (1, {'@': 302}), 17: (1, {'@': 302}), 18: (1, {'@': 302}), 20: (1, {'@': 302}), 37: (1, {'@': 312}), 25: (1, {'@': 312}), 26: (1, {'@': 312}), 27: (1, {'@': 312}), 11: (1, {'@': 312}), 67: (1, {'@': 312})}, 489: {4: (0, 283)}, 490: {1: (0, 437), 7: (0, 451)}, 491: {25: (1, {'@': 278}), 26: (1, {'@': 278}), 27: (1, {'@': 278})}, 492: {143: (1, {'@': 15}), 159: (1, {'@': 15}), 152: (1, {'@': 15}), 157: (1, {'@': 15}), 139: (1, {'@': 15}), 83: (1, {'@': 15}), 94: (1, {'@': 15}), 97: (1, {'@': 15}), 124: (1, {'@': 15}), 118: (1, {'@': 15}), 130: (1, {'@': 15}), 133: (1, {'@': 15}), 25: (1, {'@': 15}), 137: (1, {'@': 15}), 96: (1, {'@': 15}), 95: (1, {'@': 15}), 89: (1, {'@': 15}), 113: (1, {'@': 15}), 4: (1, {'@': 15}), 154: (1, {'@': 15}), 127: (1, {'@': 15}), 102: (1, {'@': 15}), 86: (1, {'@': 15}), 141: (1, {'@': 15}), 148: (1, {'@': 15}), 126: (1, {'@': 15}), 144: (1, {'@': 15}), 79: (1, {'@': 15}), 101: (1, {'@': 15}), 142: (1, {'@': 15}), 162: (1, {'@': 15}), 117: (1, {'@': 15}), 98: (1, {'@': 15}), 105: (1, {'@': 15}), 112: (1, {'@': 15}), 146: (1, {'@': 15}), 123: (1, {'@': 15}), 147: (1, {'@': 15}), 138: (1, {'@': 15}), 151: (1, {'@': 15}), 8: (1, {'@': 15}), 81: (1, {'@': 15}), 129: (1, {'@': 15}), 120: (1, {'@': 15}), 116: (1, {'@': 15}), 131: (1, {'@': 15}), 119: (1, {'@': 15}), 99: (1, {'@': 15}), 135: (1, {'@': 15}), 93: (1, {'@': 15}), 122: (1, {'@': 15}), 90: (1, {'@': 15}), 111: (1, {'@': 15}), 108: (1, {'@': 15}), 54: (1, {'@': 15}), 156: (1, {'@': 15}), 160: (1, {'@': 15}), 92: (1, {'@': 15}), 158: (1, {'@': 15}), 150: (1, {'@': 15}), 153: (1, {'@': 15}), 145: (1, {'@': 15}), 109: (1, {'@': 15}), 114: (1, {'@': 15}), 110: (1, {'@': 15}), 72: (1, {'@': 15}), 132: (1, {'@': 15}), 161: (1, {'@': 15}), 140: (1, {'@': 15}), 125: (1, {'@': 15}), 136: (1, {'@': 15}), 134: (1, {'@': 15}), 115: (1, {'@': 15}), 87: (1, {'@': 15}), 85: (1, {'@': 15}), 121: (1, {'@': 15}), 155: (1, {'@': 15}), 77: (1, {'@': 15}), 88: (1, {'@': 15}), 103: (1, {'@': 15}), 100: (1, {'@': 15}), 163: (1, {'@': 15}), 80: (1, {'@': 15}), 107: (1, {'@': 15}), 26: (1, {'@': 15})}, 493: {25: (1, {'@': 239}), 26: (1, {'@': 239}), 27: (1, {'@': 239})}, 494: {25: (1, {'@': 171}), 26: (1, {'@': 171})}, 495: {23: (0, 377), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 24: (0, 387), 9: (0, 454), 4: (0, 486), 65: (0, 506), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 22: (0, 505), 35: (0, 200), 2: (0, 252), 66: (0, 356), 36: (0, 392)}, 496: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 181), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 36: (0, 182), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252)}, 497: {143: (1, {'@': 9}), 152: (1, {'@': 9}), 157: (1, {'@': 9}), 83: (1, {'@': 9}), 97: (1, {'@': 9}), 124: (1, {'@': 9}), 130: (1, {'@': 9}), 133: (1, {'@': 9}), 25: (1, {'@': 9}), 137: (1, {'@': 9}), 96: (1, {'@': 9}), 89: (1, {'@': 9}), 4: (1, {'@': 9}), 154: (1, {'@': 9}), 127: (1, {'@': 9}), 102: (1, {'@': 9}), 126: (1, {'@': 9}), 144: (1, {'@': 9}), 101: (1, {'@': 9}), 162: (1, {'@': 9}), 117: (1, {'@': 9}), 98: (1, {'@': 9}), 105: (1, {'@': 9}), 112: (1, {'@': 9}), 123: (1, {'@': 9}), 147: (1, {'@': 9}), 8: (1, {'@': 9}), 81: (1, {'@': 9}), 120: (1, {'@': 9}), 116: (1, {'@': 9}), 135: (1, {'@': 9}), 93: (1, {'@': 9}), 122: (1, {'@': 9}), 90: (1, {'@': 9}), 111: (1, {'@': 9}), 54: (1, {'@': 9}), 150: (1, {'@': 9}), 109: (1, {'@': 9}), 114: (1, {'@': 9}), 110: (1, {'@': 9}), 72: (1, {'@': 9}), 161: (1, {'@': 9}), 140: (1, {'@': 9}), 134: (1, {'@': 9}), 87: (1, {'@': 9}), 155: (1, {'@': 9}), 107: (1, {'@': 9}), 26: (1, {'@': 9}), 159: (1, {'@': 9}), 139: (1, {'@': 9}), 94: (1, {'@': 9}), 118: (1, {'@': 9}), 95: (1, {'@': 9}), 113: (1, {'@': 9}), 86: (1, {'@': 9}), 141: (1, {'@': 9}), 148: (1, {'@': 9}), 79: (1, {'@': 9}), 142: (1, {'@': 9}), 146: (1, {'@': 9}), 138: (1, {'@': 9}), 151: (1, {'@': 9}), 129: (1, {'@': 9}), 131: (1, {'@': 9}), 119: (1, {'@': 9}), 99: (1, {'@': 9}), 108: (1, {'@': 9}), 156: (1, {'@': 9}), 160: (1, {'@': 9}), 92: (1, {'@': 9}), 158: (1, {'@': 9}), 153: (1, {'@': 9}), 145: (1, {'@': 9}), 132: (1, {'@': 9}), 125: (1, {'@': 9}), 136: (1, {'@': 9}), 115: (1, {'@': 9}), 85: (1, {'@': 9}), 121: (1, {'@': 9}), 77: (1, {'@': 9}), 88: (1, {'@': 9}), 103: (1, {'@': 9}), 100: (1, {'@': 9}), 163: (1, {'@': 9}), 80: (1, {'@': 9})}, 498: {25: (1, {'@': 283}), 26: (1, {'@': 283}), 27: (1, {'@': 283})}, 499: {14: (1, {'@': 321}), 15: (1, {'@': 321}), 1: (1, {'@': 321}), 17: (1, {'@': 321}), 18: (1, {'@': 321}), 37: (1, {'@': 321}), 20: (1, {'@': 321}), 7: (1, {'@': 321}), 12: (1, {'@': 306}), 13: (1, {'@': 306}), 16: (1, {'@': 306}), 25: (1, {'@': 321}), 26: (1, {'@': 321}), 27: (1, {'@': 321}), 11: (1, {'@': 321}), 67: (1, {'@': 321})}, 500: {27: (0, 31)}, 501: {25: (1, {'@': 289}), 26: (1, {'@': 289}), 27: (1, {'@': 289})}, 502: {25: (1, {'@': 270}), 26: (1, {'@': 270})}, 503: {71: (0, 236), 66: (0, 227), 65: (0, 230), 22: (0, 239)}, 504: {25: (1, {'@': 179}), 26: (1, {'@': 179})}, 505: {11: (0, 493)}, 506: {11: (0, 243)}, 507: {27: (0, 83)}, 508: {25: (1, {'@': 62}), 26: (1, {'@': 62})}, 509: {7: (1, {'@': 304}), 1: (1, {'@': 304}), 37: (1, {'@': 318}), 20: (1, {'@': 318}), 14: (1, {'@': 318}), 15: (1, {'@': 318}), 17: (1, {'@': 318}), 18: (1, {'@': 318}), 25: (1, {'@': 318}), 26: (1, {'@': 318}), 27: (1, {'@': 318}), 11: (1, {'@': 318}), 67: (1, {'@': 318})}, 510: {77: (0, 479), 78: (0, 423), 79: (0, 429), 80: (0, 296), 81: (0, 206), 83: (0, 226), 84: (0, 90), 85: (0, 107), 86: (0, 3), 87: (0, 111), 88: (0, 136), 89: (0, 75), 90: (0, 259), 91: (0, 58), 92: (0, 326), 93: (0, 183), 94: (0, 21), 95: (0, 26), 96: (0, 265), 97: (0, 291), 98: (0, 32), 4: (0, 201), 99: (0, 240), 100: (0, 37), 101: (0, 171), 102: (0, 215), 103: (0, 52), 8: (0, 219), 104: (0, 295), 105: (0, 337), 106: (0, 250), 107: (0, 344), 108: (0, 208), 169: (0, 257), 109: (0, 262), 110: (0, 275), 111: (0, 91), 112: (0, 124), 113: (0, 285), 82: (0, 288), 114: (0, 129), 115: (0, 140), 116: (0, 299), 117: (0, 167), 118: (0, 315), 119: (0, 318), 120: (0, 187), 121: (0, 191), 122: (0, 204), 123: (0, 184), 124: (0, 314), 125: (0, 235), 126: (0, 121), 127: (0, 145), 128: (0, 347), 129: (0, 284), 130: (0, 325), 131: (0, 287), 72: (0, 305), 132: (0, 308), 133: (0, 292), 134: (0, 245), 135: (0, 202), 136: (0, 196), 137: (0, 266), 138: (0, 278), 139: (0, 255), 140: (0, 268), 141: (0, 242), 142: (0, 261), 143: (0, 221), 144: (0, 228), 145: (0, 134), 146: (0, 97), 147: (0, 113), 170: (0, 173), 149: (0, 101), 148: (0, 157), 150: (0, 176), 151: (0, 138), 152: (0, 160), 153: (0, 117), 154: (0, 148), 155: (0, 126), 156: (0, 297), 157: (0, 341), 158: (0, 104), 159: (0, 165), 160: (0, 301), 161: (0, 282), 162: (0, 217), 163: (0, 212), 25: (1, {'@': 16}), 26: (1, {'@': 16}), 54: (1, {'@': 3})}, 511: {25: (1, {'@': 67}), 26: (1, {'@': 67}), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 512: {25: (1, {'@': 66}), 26: (1, {'@': 66})}, 513: {25: (1, {'@': 75}), 26: (1, {'@': 75})}, 514: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 515: {25: (0, 231), 54: (1, {'@': 1})}, 516: {27: (1, {'@': 293}), 25: (1, {'@': 293}), 26: (1, {'@': 293})}, 517: {25: (1, {'@': 174}), 26: (1, {'@': 174}), 7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309})}, 518: {77: (0, 479), 79: (0, 429), 80: (0, 296), 81: (0, 206), 83: (0, 226), 84: (0, 90), 85: (0, 107), 86: (0, 3), 87: (0, 111), 88: (0, 136), 89: (0, 75), 149: (0, 428), 90: (0, 259), 91: (0, 58), 92: (0, 326), 93: (0, 183), 94: (0, 21), 95: (0, 26), 96: (0, 265), 97: (0, 291), 98: (0, 32), 99: (0, 240), 100: (0, 37), 101: (0, 171), 102: (0, 215), 103: (0, 52), 8: (0, 219), 104: (0, 295), 105: (0, 337), 107: (0, 344), 108: (0, 208), 110: (0, 275), 111: (0, 91), 112: (0, 124), 113: (0, 285), 114: (0, 129), 115: (0, 140), 116: (0, 299), 117: (0, 167), 118: (0, 315), 119: (0, 318), 120: (0, 187), 121: (0, 191), 122: (0, 204), 123: (0, 184), 124: (0, 314), 125: (0, 235), 126: (0, 121), 127: (0, 145), 129: (0, 284), 130: (0, 325), 131: (0, 287), 72: (0, 305), 25: (0, 409), 132: (0, 308), 133: (0, 292), 135: (0, 202), 136: (0, 196), 137: (0, 266), 138: (0, 278), 139: (0, 255), 140: (0, 268), 141: (0, 242), 142: (0, 261), 143: (0, 221), 144: (0, 228), 145: (0, 134), 146: (0, 97), 147: (0, 113), 148: (0, 157), 150: (0, 176), 4: (0, 402), 151: (0, 138), 152: (0, 160), 153: (0, 117), 154: (0, 148), 155: (0, 126), 156: (0, 297), 157: (0, 341), 158: (0, 104), 159: (0, 165), 160: (0, 301), 161: (0, 282), 162: (0, 217), 163: (0, 212)}, 519: {27: (0, 415)}, 520: {25: (1, {'@': 279}), 26: (1, {'@': 279}), 27: (1, {'@': 279})}, 521: {25: (1, {'@': 235}), 27: (1, {'@': 235}), 26: (1, {'@': 235})}, 522: {28: (0, 499), 1: (0, 360), 47: (0, 432), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 454), 4: (0, 486), 31: (0, 488), 32: (0, 412), 3: (0, 473), 33: (0, 395), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 2: (0, 252), 36: (0, 392)}, 523: {0: (0, 330)}, 524: {24: (0, 410), 23: (0, 393), 22: (0, 394)}, 525: {27: (0, 149)}, 526: {27: (0, 496)}, 527: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 236}), 27: (1, {'@': 236}), 26: (1, {'@': 236})}, 528: {27: (1, {'@': 295}), 25: (1, {'@': 295}), 26: (1, {'@': 295})}, 529: {27: (0, 98), 25: (1, {'@': 52}), 26: (1, {'@': 52})}, 530: {25: (1, {'@': 273}), 26: (1, {'@': 273})}, 531: {27: (0, 536)}, 532: {25: (1, {'@': 276}), 26: (1, {'@': 276}), 27: (1, {'@': 276})}, 533: {27: (0, 482)}, 534: {25: (1, {'@': 76}), 26: (1, {'@': 76})}, 535: {7: (1, {'@': 305}), 1: (1, {'@': 305}), 14: (1, {'@': 303}), 15: (1, {'@': 303}), 17: (1, {'@': 303}), 18: (1, {'@': 303}), 20: (1, {'@': 303}), 12: (1, {'@': 307}), 13: (1, {'@': 307}), 16: (1, {'@': 307}), 19: (1, {'@': 309}), 25: (1, {'@': 175}), 26: (1, {'@': 175})}, 536: {38: (0, 348), 0: (0, 36), 39: (0, 430), 40: (0, 498), 166: (0, 65), 28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 59), 29: (0, 490), 30: (0, 509), 9: (0, 76), 4: (0, 486), 31: (0, 488), 32: (0, 412), 36: (0, 79), 3: (0, 473), 44: (0, 361), 33: (0, 395), 52: (0, 80), 45: (0, 414), 168: (0, 82), 7: (0, 374), 46: (0, 532), 47: (0, 520), 48: (0, 408), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 41: (0, 84), 49: (0, 491), 2: (0, 252), 50: (0, 481), 51: (0, 369), 53: (0, 462), 43: (0, 86), 167: (0, 87), 42: (0, 89)}, 537: {28: (0, 499), 1: (0, 360), 5: (0, 472), 6: (0, 355), 29: (0, 490), 30: (0, 509), 9: (0, 514), 4: (0, 486), 31: (0, 488), 32: (0, 412), 23: (0, 393), 3: (0, 473), 24: (0, 410), 66: (0, 407), 33: (0, 395), 65: (0, 391), 7: (0, 374), 10: (0, 382), 34: (0, 456), 8: (0, 332), 35: (0, 200), 22: (0, 394), 2: (0, 252), 36: (0, 445)}, 538: {27: (0, 461)}}, 'start_states': {'start': 510}, 'end_states': {'start': 173}}, '__type__': 'ParsingFrontend'}, 'rules': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}, {'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}, {'@': 107}, {'@': 108}, {'@': 109}, {'@': 110}, {'@': 111}, {'@': 112}, {'@': 113}, {'@': 114}, {'@': 115}, {'@': 116}, {'@': 117}, {'@': 118}, {'@': 119}, {'@': 120}, {'@': 121}, {'@': 122}, {'@': 123}, {'@': 124}, {'@': 125}, {'@': 126}, {'@': 127}, {'@': 128}, {'@': 129}, {'@': 130}, {'@': 131}, {'@': 132}, {'@': 133}, {'@': 134}, {'@': 135}, {'@': 136}, {'@': 137}, {'@': 138}, {'@': 139}, {'@': 140}, {'@': 141}, {'@': 142}, {'@': 143}, {'@': 144}, {'@': 145}, {'@': 146}, {'@': 147}, {'@': 148}, {'@': 149}, {'@': 150}, {'@': 151}, {'@': 152}, {'@': 153}, {'@': 154}, {'@': 155}, {'@': 156}, {'@': 157}, {'@': 158}, {'@': 159}, {'@': 160}, {'@': 161}, {'@': 162}, {'@': 163}, {'@': 164}, {'@': 165}, {'@': 166}, {'@': 167}, {'@': 168}, {'@': 169}, {'@': 170}, {'@': 171}, {'@': 172}, {'@': 173}, {'@': 174}, {'@': 175}, {'@': 176}, {'@': 177}, {'@': 178}, {'@': 179}, {'@': 180}, {'@': 181}, {'@': 182}, {'@': 183}, {'@': 184}, {'@': 185}, {'@': 186}, {'@': 187}, {'@': 188}, {'@': 189}, {'@': 190}, {'@': 191}, {'@': 192}, {'@': 193}, {'@': 194}, {'@': 195}, {'@': 196}, {'@': 197}, {'@': 198}, {'@': 199}, {'@': 200}, {'@': 201}, {'@': 202}, {'@': 203}, {'@': 204}, {'@': 205}, {'@': 206}, {'@': 207}, {'@': 208}, {'@': 209}, {'@': 210}, {'@': 211}, {'@': 212}, {'@': 213}, {'@': 214}, {'@': 215}, {'@': 216}, {'@': 217}, {'@': 218}, {'@': 219}, {'@': 220}, {'@': 221}, {'@': 222}, {'@': 223}, {'@': 224}, {'@': 225}, {'@': 226}, {'@': 227}, {'@': 228}, {'@': 229}, {'@': 230}, {'@': 231}, {'@': 232}, {'@': 233}, {'@': 234}, {'@': 235}, {'@': 236}, {'@': 237}, {'@': 238}, {'@': 239}, {'@': 240}, {'@': 241}, {'@': 242}, {'@': 243}, {'@': 244}, {'@': 245}, {'@': 246}, {'@': 247}, {'@': 248}, {'@': 249}, {'@': 250}, {'@': 251}, {'@': 252}, {'@': 253}, {'@': 254}, {'@': 255}, {'@': 256}, {'@': 257}, {'@': 258}, {'@': 259}, {'@': 260}, {'@': 261}, {'@': 262}, {'@': 263}, {'@': 264}, {'@': 265}, {'@': 266}, {'@': 267}, {'@': 268}, {'@': 269}, {'@': 270}, {'@': 271}, {'@': 272}, {'@': 273}, {'@': 274}, {'@': 275}, {'@': 276}, {'@': 277}, {'@': 278}, {'@': 279}, {'@': 280}, {'@': 281}, {'@': 282}, {'@': 283}, {'@': 284}, {'@': 285}, {'@': 286}, {'@': 287}, {'@': 288}, {'@': 289}, {'@': 290}, {'@': 291}, {'@': 292}, {'@': 293}, {'@': 294}, {'@': 295}, {'@': 296}, {'@': 297}, {'@': 298}, {'@': 299}, {'@': 300}, {'@': 301}, {'@': 302}, {'@': 303}, {'@': 304}, {'@': 305}, {'@': 306}, {'@': 307}, {'@': 308}, {'@': 309}, {'@': 310}, {'@': 311}, {'@': 312}, {'@': 313}, {'@': 314}, {'@': 315}, {'@': 316}, {'@': 317}, {'@': 318}, {'@': 319}, {'@': 320}, {'@': 321}, {'@': 322}, {'@': 323}, {'@': 324}, {'@': 325}, {'@': 326}, {'@': 327}, {'@': 328}, {'@': 329}, {'@': 330}, {'@': 331}, {'@': 332}, {'@': 333}, {'@': 334}, {'@': 335}, {'@': 336}, {'@': 337}, {'@': 338}], 'options': {'debug': False, 'strict': False, 'keep_all_tokens': False, 'tree_class': None, 'cache': False, 'cache_grammar': False, 'postlex': None, 'parser': 'lalr', 'lexer': 'contextual', 'transformer': None, 'start': ['start'], 'priority': 'normal', 'ambiguity': 'auto', 'regex': False, 'propagate_positions': False, 'lexer_callbacks': {}, 'maybe_placeholders': False, 'edit_terminals': None, 'g_regex_flags': 0, 'use_bytes': False, 'ordered_sets': True, 'import_paths': [], 'source_path': None, '_plugins': {}}, '__type__': 'Lark'} +) +MEMO = ( +{0: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 1: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'endline', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 2: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'endline', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 3: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 3, 'alias': 'empty_program', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 4: {'origin': {'name': 'endline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 5: {'origin': {'name': 'endline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'endline', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 6: {'origin': {'name': 'endline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'program_endline2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 7: {'origin': {'name': 'endline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'program_endline2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 8: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'line', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 9: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'line', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 10: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQU', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'def_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 11: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQU', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'def_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 12: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'asms', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'line_asm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 13: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'asms', '__type__': 'NonTerminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'line_asm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 14: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'preproc_line', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'preprocessor_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 15: {'origin': {'name': 'preproc_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': '_INIT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'preproc_line_init', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 16: {'origin': {'name': 'asms', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'asms_empty', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 17: {'origin': {'name': 'asms', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'asm', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'asms_asm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 18: {'origin': {'name': 'asms', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'asms', '__type__': 'NonTerminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'asm', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'asms_asms_asm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 19: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'asm_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 20: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'asm_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 21: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 22: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 23: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 24: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 25: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 6, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 26: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 7, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 27: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 8, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 28: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 9, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 29: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 10, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 30: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 11, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 31: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'I', 'filter_out': False, '__type__': 'Terminal'}], 'order': 12, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 32: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'I', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 13, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 33: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'R', 'filter_out': False, '__type__': 'Terminal'}], 'order': 14, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 34: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'R', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 15, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 35: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 16, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 36: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 17, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 37: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 18, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 38: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg_bcde', '__type__': 'NonTerminal'}], 'order': 19, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 39: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 20, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 40: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 21, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 41: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 22, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 42: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 23, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 43: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 24, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 44: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 25, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 45: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 26, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 46: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 27, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 47: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 28, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 48: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PROC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 29, 'alias': 'proc_scope', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 49: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ENDP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 30, 'alias': 'endp_scope', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 50: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LOCAL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'id_list', '__type__': 'NonTerminal'}], 'order': 31, 'alias': 'local_labels', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 51: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEFB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_list', '__type__': 'NonTerminal'}], 'order': 32, 'alias': 'defb_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 52: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEFS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'number_list', '__type__': 'NonTerminal'}], 'order': 33, 'alias': 'defs_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 53: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEFW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'number_list', '__type__': 'NonTerminal'}], 'order': 34, 'alias': 'defw_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 54: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 35, 'alias': 'asm_ldind_r8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 55: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 36, 'alias': 'asm_ldind_r8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 56: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 37, 'alias': 'asm_ldr8_ind', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 57: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 38, 'alias': 'asm_ldr8_ind', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 58: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'AF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'AF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'APO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 39, 'alias': 'ex_af_af', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 59: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 40, 'alias': 'ex_de_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 60: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ORG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 41, 'alias': 'org', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 61: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ORG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 42, 'alias': 'org', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 62: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NAMESPACE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 43, 'alias': 'namespace', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 63: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NAMESPACE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 44, 'alias': 'push_namespace', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 64: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NAMESPACE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 45, 'alias': 'push_namespace', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 65: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NAMESPACE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 46, 'alias': 'pop_namespace', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 66: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ALIGN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 47, 'alias': 'align', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 67: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ALIGN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 48, 'alias': 'align', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 68: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCBIN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 49, 'alias': 'incbin', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 69: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCBIN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 50, 'alias': 'incbin', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 70: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCBIN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 51, 'alias': 'incbin', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 71: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 52, 'alias': 'ex_sp_reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 72: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 53, 'alias': 'ex_sp_reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 73: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 54, 'alias': 'ex_sp_reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 74: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 55, 'alias': 'ex_sp_reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 75: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'inc_reg', '__type__': 'NonTerminal'}], 'order': 56, 'alias': 'incdec', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 76: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'inc_reg', '__type__': 'NonTerminal'}], 'order': 57, 'alias': 'incdec', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 77: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 58, 'alias': 'incdeci', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 78: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 59, 'alias': 'incdeci', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 79: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 60, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 80: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 61, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 81: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 62, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 82: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 63, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 83: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 64, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 84: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 65, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 85: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 66, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 86: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 67, 'alias': 'ld_reg_val_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 87: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 68, 'alias': 'jp_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 88: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 69, 'alias': 'jp_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 89: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 70, 'alias': 'jp_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 90: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 71, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 91: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 72, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 92: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 73, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 93: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 74, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 94: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 75, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 95: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 76, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 96: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 77, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 97: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 78, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 98: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 79, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 99: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 80, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 100: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 81, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 101: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 82, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 102: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 83, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 103: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 84, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 104: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 85, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 105: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 86, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 106: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 87, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 107: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 88, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 108: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 89, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 109: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 90, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 110: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 91, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 111: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 92, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 112: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 93, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 113: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 94, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 114: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 95, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 115: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 96, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 116: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 97, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 117: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 98, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 118: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 99, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 119: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 100, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 120: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 101, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 121: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 102, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 122: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 103, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 123: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 104, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 124: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 105, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 125: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 106, 'alias': 'arith_a_reg_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 126: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 107, 'alias': 'arith_a_reg_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 127: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 108, 'alias': 'arith_a_reg_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 128: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 109, 'alias': 'bitwiseop_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 129: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 110, 'alias': 'bitwiseop_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 130: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 111, 'alias': 'bitwiseop_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 131: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 112, 'alias': 'bitwiseop_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 132: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 113, 'alias': 'bitwiseop_reg_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 133: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 114, 'alias': 'bitwise_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 134: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 115, 'alias': 'bitwise_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 135: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'AF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 116, 'alias': 'push_pop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 136: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 117, 'alias': 'push_pop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 137: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'AF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 118, 'alias': 'push_pop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 138: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 119, 'alias': 'push_pop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 139: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 120, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 140: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 121, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 141: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 122, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 142: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 123, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 143: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 124, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 144: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 125, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 145: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 126, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 146: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 127, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 147: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 128, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 148: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}], 'order': 129, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 149: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}], 'order': 130, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 150: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}], 'order': 131, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 151: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'rotation', '__type__': 'NonTerminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 132, 'alias': 'rotate', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 152: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'rotation', '__type__': 'NonTerminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 133, 'alias': 'rotate', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 153: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'rotation', '__type__': 'NonTerminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 134, 'alias': 'rotate', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 154: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'rotation', '__type__': 'NonTerminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 135, 'alias': 'rotate_ix', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 155: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 136, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 156: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 137, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 157: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 138, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 158: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 139, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 159: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 140, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 160: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 141, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 161: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 142, 'alias': 'bit_ix', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 162: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 143, 'alias': 'bit_ix', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 163: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 144, 'alias': 'jp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 164: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 145, 'alias': 'jp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 165: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CALL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 146, 'alias': 'jp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 166: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CALL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 147, 'alias': 'jp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 167: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}], 'order': 148, 'alias': 'ret', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 168: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jr_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 149, 'alias': 'jr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 169: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jr_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 150, 'alias': 'jr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 170: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 151, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 171: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 152, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 172: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CALL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 153, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 173: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DJNZ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 154, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 174: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 155, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 175: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 156, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 176: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CALL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 157, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 177: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DJNZ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 158, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 178: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RST', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 159, 'alias': 'rst', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 179: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IM', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 160, 'alias': 'im', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 180: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 161, 'alias': 'in_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 181: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 162, 'alias': 'in_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 182: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 163, 'alias': 'in_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 183: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 164, 'alias': 'in_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 184: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 165, 'alias': 'out_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 185: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 166, 'alias': 'out_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 186: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 167, 'alias': 'out_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 187: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 168, 'alias': 'out_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 188: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}], 'order': 169, 'alias': 'in_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 189: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 170, 'alias': 'in_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 190: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 171, 'alias': 'out_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 191: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 172, 'alias': 'out_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 192: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 173, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 193: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EXX', 'filter_out': False, '__type__': 'Terminal'}], 'order': 174, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 194: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CCF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 175, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 195: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SCF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 176, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 196: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDIR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 177, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 197: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 178, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 198: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 179, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 199: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 180, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 200: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPIR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 181, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 201: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 182, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 202: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 183, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 203: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 184, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 204: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DAA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 185, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 205: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEG', 'filter_out': False, '__type__': 'Terminal'}], 'order': 186, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 206: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 187, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 207: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'HALT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 188, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 208: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 189, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 209: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 190, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 210: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUTD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 191, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 211: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUTI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 192, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 212: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OTDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 193, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 213: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OTIR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 194, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 214: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IND', 'filter_out': False, '__type__': 'Terminal'}], 'order': 195, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 215: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 196, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 216: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 197, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 217: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INIR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 198, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 218: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RET', 'filter_out': False, '__type__': 'Terminal'}], 'order': 199, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 219: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RETI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 200, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 220: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RETN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 201, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 221: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RLA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 202, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 222: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RLCA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 203, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 223: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RRA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 204, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 224: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RRCA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 205, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 225: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RLD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 206, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 226: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RRD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 207, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 227: {'origin': {'name': 'id_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'idlist', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 228: {'origin': {'name': 'id_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'id_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'idlist_id', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 229: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'expr_list_from_string', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 230: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_list_from_num', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 231: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_list_from_num', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 232: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'expr_list_plus_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 233: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'expr_list_plus_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 234: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'expr_list_plus_string', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 235: {'origin': {'name': 'number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'number_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 236: {'origin': {'name': 'number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'number_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 237: {'origin': {'name': 'number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'number_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'number_list_number', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 238: {'origin': {'name': 'number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'number_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'number_list_number', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 239: {'origin': {'name': 'reg8_hl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg8_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 240: {'origin': {'name': 'reg8_hl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg8_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 241: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 242: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 243: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 244: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 245: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 246: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 247: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 248: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 7, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 249: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 8, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 250: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 9, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 251: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 10, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 252: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 11, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 253: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 254: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'AND', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 255: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'XOR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 256: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SUB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 257: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 258: {'origin': {'name': 'bitop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BIT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'bitop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 259: {'origin': {'name': 'bitop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RES', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'bitop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 260: {'origin': {'name': 'bitop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SET', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'bitop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 261: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 262: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 263: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RRC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 264: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RLC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 265: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SLA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 266: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SLL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 267: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SRA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 268: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SRL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 7, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 269: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 270: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 271: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 272: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 273: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 274: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 275: {'origin': {'name': 'reg8', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'H', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 276: {'origin': {'name': 'reg8', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'L', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 277: {'origin': {'name': 'reg8', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg_bcde', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 278: {'origin': {'name': 'reg_bcde', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'B', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg_bcde', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 279: {'origin': {'name': 'reg_bcde', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'C', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg_bcde', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 280: {'origin': {'name': 'reg_bcde', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'D', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'reg_bcde', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 281: {'origin': {'name': 'reg_bcde', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'E', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'reg_bcde', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 282: {'origin': {'name': 'reg8i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IXH', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg8i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 283: {'origin': {'name': 'reg8i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IXL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg8i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 284: {'origin': {'name': 'reg8i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IYH', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'reg8i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 285: {'origin': {'name': 'reg8i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IYL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'reg8i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 286: {'origin': {'name': 'reg16', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg16', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 287: {'origin': {'name': 'reg16', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg16', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 288: {'origin': {'name': 'reg16', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'reg16', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 289: {'origin': {'name': 'reg16', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'reg16', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 290: {'origin': {'name': 'reg16i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg16i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 291: {'origin': {'name': 'reg16i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg16i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 292: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'P', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 293: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'M', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 294: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 295: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 296: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'jr_flags', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 297: {'origin': {'name': 'jr_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'Z', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'jr_flags', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 298: {'origin': {'name': 'jr_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'C', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'jr_flags', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 299: {'origin': {'name': 'jr_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NZ', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'jr_flags', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 300: {'origin': {'name': 'jr_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'jr_flags', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 301: {'origin': {'name': 'mem_indir', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'mem_indir', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 302: {'origin': {'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 303: {'origin': {'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 304: {'origin': {'name': 'expr_add_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 305: {'origin': {'name': 'expr_add_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 306: {'origin': {'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 307: {'origin': {'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 308: {'origin': {'name': 'expr_unary_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 309: {'origin': {'name': 'expr_unary_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 310: {'origin': {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_pow', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 311: {'origin': {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 312: {'origin': {'name': 'expr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 313: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'RSHIFT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 314: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'LSHIFT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 315: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'BAND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 316: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'BOR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 317: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'BXOR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 318: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 319: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add_operand', '__type__': 'NonTerminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_mul_operand', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 320: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add_operand', '__type__': 'NonTerminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_mul_operand', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 321: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 322: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, {'name': 'MUL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 323: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, {'name': 'DIV', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 324: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, {'name': 'MOD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 325: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_pow', '__type__': 'NonTerminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 326: {'origin': {'name': 'expr_pow', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_unary_operand', '__type__': 'NonTerminal'}, {'name': 'POW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 327: {'origin': {'name': 'expr_pow', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 328: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_uminus', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 329: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_uplus', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 330: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_uminus', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 331: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'expr_uplus', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 332: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_atom', '__type__': 'NonTerminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 333: {'origin': {'name': 'pexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'expr_lprp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 334: {'origin': {'name': 'pexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'expr_lprp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 335: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'expr_int', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 336: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'expr_label', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 337: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LPP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RPP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'expr_paren', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 338: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'expr_addr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}} +) +Shift = 0 +Reduce = 1 +def Lark_StandAlone(**kwargs): + return Lark._load_from_dict(DATA, MEMO, **kwargs) diff --git a/src/zxbasm/asmparse_zxnext_standalone.py b/src/zxbasm/asmparse_zxnext_standalone.py new file mode 100644 index 000000000..c3210de5b --- /dev/null +++ b/src/zxbasm/asmparse_zxnext_standalone.py @@ -0,0 +1,3574 @@ +# The file was automatically generated by Lark v1.3.1 +__version__ = "1.3.1" + +# +# +# Lark Stand-alone Generator Tool +# ---------------------------------- +# Generates a stand-alone LALR(1) parser +# +# Git: https://github.com/erezsh/lark +# Author: Erez Shinan (erezshin@gmail.com) +# +# +# >>> LICENSE +# +# This tool and its generated code use a separate license from Lark, +# and are subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. +# +# If you wish to purchase a commercial license for this tool and its +# generated code, you may contact me via email or otherwise. +# +# If MPL2 is incompatible with your free or open-source project, +# contact me and we'll work it out. +# +# + +from copy import deepcopy +from abc import ABC, abstractmethod +from types import ModuleType +from typing import ( + TypeVar, Generic, Type, Tuple, List, Dict, Iterator, Collection, Callable, Optional, FrozenSet, Any, + Union, Iterable, IO, TYPE_CHECKING, overload, Sequence, + Pattern as REPattern, ClassVar, Set, Mapping +) + + +class LarkError(Exception): + pass + + +class ConfigurationError(LarkError, ValueError): + pass + + +def assert_config(value, options: Collection, msg='Got %r, expected one of %s'): + if value not in options: + raise ConfigurationError(msg % (value, options)) + + +class GrammarError(LarkError): + pass + + +class ParseError(LarkError): + pass + + +class LexError(LarkError): + pass + +T = TypeVar('T') + +class UnexpectedInput(LarkError): + #-- + line: int + column: int + pos_in_stream = None + state: Any + _terminals_by_name = None + interactive_parser: 'InteractiveParser' + + def get_context(self, text: str, span: int=40) -> str: + #-- + pos = self.pos_in_stream or 0 + start = max(pos - span, 0) + end = pos + span + if not isinstance(text, bytes): + before = text[start:pos].rsplit('\n', 1)[-1] + after = text[pos:end].split('\n', 1)[0] + return before + after + '\n' + ' ' * len(before.expandtabs()) + '^\n' + else: + before = text[start:pos].rsplit(b'\n', 1)[-1] + after = text[pos:end].split(b'\n', 1)[0] + return (before + after + b'\n' + b' ' * len(before.expandtabs()) + b'^\n').decode("ascii", "backslashreplace") + + def match_examples(self, parse_fn: 'Callable[[str], Tree]', + examples: Union[Mapping[T, Iterable[str]], Iterable[Tuple[T, Iterable[str]]]], + token_type_match_fallback: bool=False, + use_accepts: bool=True + ) -> Optional[T]: + #-- + assert self.state is not None, "Not supported for this exception" + + if isinstance(examples, Mapping): + examples = examples.items() + + candidate = (None, False) + for i, (label, example) in enumerate(examples): + assert not isinstance(example, str), "Expecting a list" + + for j, malformed in enumerate(example): + try: + parse_fn(malformed) + except UnexpectedInput as ut: + if ut.state == self.state: + if ( + use_accepts + and isinstance(self, UnexpectedToken) + and isinstance(ut, UnexpectedToken) + and ut.accepts != self.accepts + ): + logger.debug("Different accepts with same state[%d]: %s != %s at example [%s][%s]" % + (self.state, self.accepts, ut.accepts, i, j)) + continue + if ( + isinstance(self, (UnexpectedToken, UnexpectedEOF)) + and isinstance(ut, (UnexpectedToken, UnexpectedEOF)) + ): + if ut.token == self.token: ## + + logger.debug("Exact Match at example [%s][%s]" % (i, j)) + return label + + if token_type_match_fallback: + ## + + if (ut.token.type == self.token.type) and not candidate[-1]: + logger.debug("Token Type Fallback at example [%s][%s]" % (i, j)) + candidate = label, True + + if candidate[0] is None: + logger.debug("Same State match at example [%s][%s]" % (i, j)) + candidate = label, False + + return candidate[0] + + def _format_expected(self, expected): + if self._terminals_by_name: + d = self._terminals_by_name + expected = [d[t_name].user_repr() if t_name in d else t_name for t_name in expected] + return "Expected one of: \n\t* %s\n" % '\n\t* '.join(expected) + + +class UnexpectedEOF(ParseError, UnexpectedInput): + #-- + expected: 'List[Token]' + + def __init__(self, expected, state=None, terminals_by_name=None): + super(UnexpectedEOF, self).__init__() + + self.expected = expected + self.state = state + from .lexer import Token + self.token = Token("", "") ## + + self.pos_in_stream = -1 + self.line = -1 + self.column = -1 + self._terminals_by_name = terminals_by_name + + + def __str__(self): + message = "Unexpected end-of-input. " + message += self._format_expected(self.expected) + return message + + +class UnexpectedCharacters(LexError, UnexpectedInput): + #-- + + allowed: Set[str] + considered_tokens: Set[Any] + + def __init__(self, seq, lex_pos, line, column, allowed=None, considered_tokens=None, state=None, token_history=None, + terminals_by_name=None, considered_rules=None): + super(UnexpectedCharacters, self).__init__() + + ## + + self.line = line + self.column = column + self.pos_in_stream = lex_pos + self.state = state + self._terminals_by_name = terminals_by_name + + self.allowed = allowed + self.considered_tokens = considered_tokens + self.considered_rules = considered_rules + self.token_history = token_history + + if isinstance(seq, bytes): + self.char = seq[lex_pos:lex_pos + 1].decode("ascii", "backslashreplace") + else: + self.char = seq[lex_pos] + self._context = self.get_context(seq) + + + def __str__(self): + message = "No terminal matches '%s' in the current parser context, at line %d col %d" % (self.char, self.line, self.column) + message += '\n\n' + self._context + if self.allowed: + message += self._format_expected(self.allowed) + if self.token_history: + message += '\nPrevious tokens: %s\n' % ', '.join(repr(t) for t in self.token_history) + return message + + +class UnexpectedToken(ParseError, UnexpectedInput): + #-- + + expected: Set[str] + considered_rules: Set[str] + + def __init__(self, token, expected, considered_rules=None, state=None, interactive_parser=None, terminals_by_name=None, token_history=None): + super(UnexpectedToken, self).__init__() + + ## + + self.line = getattr(token, 'line', '?') + self.column = getattr(token, 'column', '?') + self.pos_in_stream = getattr(token, 'start_pos', None) + self.state = state + + self.token = token + self.expected = expected ## + + self._accepts = NO_VALUE + self.considered_rules = considered_rules + self.interactive_parser = interactive_parser + self._terminals_by_name = terminals_by_name + self.token_history = token_history + + + @property + def accepts(self) -> Set[str]: + if self._accepts is NO_VALUE: + self._accepts = self.interactive_parser and self.interactive_parser.accepts() + return self._accepts + + def __str__(self): + message = ("Unexpected token %r at line %s, column %s.\n%s" + % (self.token, self.line, self.column, self._format_expected(self.accepts or self.expected))) + if self.token_history: + message += "Previous tokens: %r\n" % self.token_history + + return message + + + +class VisitError(LarkError): + #-- + + obj: 'Union[Tree, Token]' + orig_exc: Exception + + def __init__(self, rule, obj, orig_exc): + message = 'Error trying to process rule "%s":\n\n%s' % (rule, orig_exc) + super(VisitError, self).__init__(message) + + self.rule = rule + self.obj = obj + self.orig_exc = orig_exc + + +class MissingVariableError(LarkError): + pass + + +import sys, re +import logging +from dataclasses import dataclass +from typing import Generic, AnyStr + +logger: logging.Logger = logging.getLogger("lark") +logger.addHandler(logging.StreamHandler()) +## + +## + +logger.setLevel(logging.CRITICAL) + + +NO_VALUE = object() + +T = TypeVar("T") + + +def classify(seq: Iterable, key: Optional[Callable] = None, value: Optional[Callable] = None) -> Dict: + d: Dict[Any, Any] = {} + for item in seq: + k = key(item) if (key is not None) else item + v = value(item) if (value is not None) else item + try: + d[k].append(v) + except KeyError: + d[k] = [v] + return d + + +def _deserialize(data: Any, namespace: Dict[str, Any], memo: Dict) -> Any: + if isinstance(data, dict): + if '__type__' in data: ## + + class_ = namespace[data['__type__']] + return class_.deserialize(data, memo) + elif '@' in data: + return memo[data['@']] + return {key:_deserialize(value, namespace, memo) for key, value in data.items()} + elif isinstance(data, list): + return [_deserialize(value, namespace, memo) for value in data] + return data + + +_T = TypeVar("_T", bound="Serialize") + +class Serialize: + #-- + + def memo_serialize(self, types_to_memoize: List) -> Any: + memo = SerializeMemoizer(types_to_memoize) + return self.serialize(memo), memo.serialize() + + def serialize(self, memo = None) -> Dict[str, Any]: + if memo and memo.in_types(self): + return {'@': memo.memoized.get(self)} + + fields = getattr(self, '__serialize_fields__') + res = {f: _serialize(getattr(self, f), memo) for f in fields} + res['__type__'] = type(self).__name__ + if hasattr(self, '_serialize'): + self._serialize(res, memo) + return res + + @classmethod + def deserialize(cls: Type[_T], data: Dict[str, Any], memo: Dict[int, Any]) -> _T: + namespace = getattr(cls, '__serialize_namespace__', []) + namespace = {c.__name__:c for c in namespace} + + fields = getattr(cls, '__serialize_fields__') + + if '@' in data: + return memo[data['@']] + + inst = cls.__new__(cls) + for f in fields: + try: + setattr(inst, f, _deserialize(data[f], namespace, memo)) + except KeyError as e: + raise KeyError("Cannot find key for class", cls, e) + + if hasattr(inst, '_deserialize'): + inst._deserialize() + + return inst + + +class SerializeMemoizer(Serialize): + #-- + + __serialize_fields__ = 'memoized', + + def __init__(self, types_to_memoize: List) -> None: + self.types_to_memoize = tuple(types_to_memoize) + self.memoized = Enumerator() + + def in_types(self, value: Serialize) -> bool: + return isinstance(value, self.types_to_memoize) + + def serialize(self) -> Dict[int, Any]: ## + + return _serialize(self.memoized.reversed(), None) + + @classmethod + def deserialize(cls, data: Dict[int, Any], namespace: Dict[str, Any], memo: Dict[Any, Any]) -> Dict[int, Any]: ## + + return _deserialize(data, namespace, memo) + + +try: + import regex + _has_regex = True +except ImportError: + _has_regex = False + +if sys.version_info >= (3, 11): + import re._parser as sre_parse + import re._constants as sre_constants +else: + import sre_parse + import sre_constants + +categ_pattern = re.compile(r'\\p{[A-Za-z_]+}') + +def get_regexp_width(expr: str) -> Union[Tuple[int, int], List[int]]: + if _has_regex: + ## + + ## + + ## + + regexp_final = re.sub(categ_pattern, 'A', expr) + else: + if re.search(categ_pattern, expr): + raise ImportError('`regex` module must be installed in order to use Unicode categories.', expr) + regexp_final = expr + try: + ## + + return [int(x) for x in sre_parse.parse(regexp_final).getwidth()] + except sre_constants.error: + if not _has_regex: + raise ValueError(expr) + else: + ## + + ## + + c = regex.compile(regexp_final) + ## + + ## + + MAXWIDTH = getattr(sre_parse, "MAXWIDTH", sre_constants.MAXREPEAT) + if c.match('') is None: + ## + + return 1, int(MAXWIDTH) + else: + return 0, int(MAXWIDTH) + + +@dataclass(frozen=True) +class TextSlice(Generic[AnyStr]): + #-- + text: AnyStr + start: int + end: int + + def __post_init__(self): + if not isinstance(self.text, (str, bytes)): + raise TypeError("text must be str or bytes") + + if self.start < 0: + object.__setattr__(self, 'start', self.start + len(self.text)) + assert self.start >=0 + + if self.end is None: + object.__setattr__(self, 'end', len(self.text)) + elif self.end < 0: + object.__setattr__(self, 'end', self.end + len(self.text)) + assert self.end <= len(self.text) + + @classmethod + def cast_from(cls, text: 'TextOrSlice') -> 'TextSlice[AnyStr]': + if isinstance(text, TextSlice): + return text + + return cls(text, 0, len(text)) + + def is_complete_text(self): + return self.start == 0 and self.end == len(self.text) + + def __len__(self): + return self.end - self.start + + def count(self, substr: AnyStr): + return self.text.count(substr, self.start, self.end) + + def rindex(self, substr: AnyStr): + return self.text.rindex(substr, self.start, self.end) + + +TextOrSlice = Union[AnyStr, 'TextSlice[AnyStr]'] +LarkInput = Union[AnyStr, TextSlice[AnyStr], Any] + + + +class Meta: + + empty: bool + line: int + column: int + start_pos: int + end_line: int + end_column: int + end_pos: int + orig_expansion: 'List[TerminalDef]' + match_tree: bool + + def __init__(self): + self.empty = True + + +_Leaf_T = TypeVar("_Leaf_T") +Branch = Union[_Leaf_T, 'Tree[_Leaf_T]'] + + +class Tree(Generic[_Leaf_T]): + #-- + + data: str + children: 'List[Branch[_Leaf_T]]' + + def __init__(self, data: str, children: 'List[Branch[_Leaf_T]]', meta: Optional[Meta]=None) -> None: + self.data = data + self.children = children + self._meta = meta + + @property + def meta(self) -> Meta: + if self._meta is None: + self._meta = Meta() + return self._meta + + def __repr__(self): + return 'Tree(%r, %r)' % (self.data, self.children) + + __match_args__ = ("data", "children") + + def _pretty_label(self): + return self.data + + def _pretty(self, level, indent_str): + yield f'{indent_str*level}{self._pretty_label()}' + if len(self.children) == 1 and not isinstance(self.children[0], Tree): + yield f'\t{self.children[0]}\n' + else: + yield '\n' + for n in self.children: + if isinstance(n, Tree): + yield from n._pretty(level+1, indent_str) + else: + yield f'{indent_str*(level+1)}{n}\n' + + def pretty(self, indent_str: str=' ') -> str: + #-- + return ''.join(self._pretty(0, indent_str)) + + def __rich__(self, parent:Optional['rich.tree.Tree']=None) -> 'rich.tree.Tree': + #-- + return self._rich(parent) + + def _rich(self, parent): + if parent: + tree = parent.add(f'[bold]{self.data}[/bold]') + else: + import rich.tree + tree = rich.tree.Tree(self.data) + + for c in self.children: + if isinstance(c, Tree): + c._rich(tree) + else: + tree.add(f'[green]{c}[/green]') + + return tree + + def __eq__(self, other): + try: + return self.data == other.data and self.children == other.children + except AttributeError: + return False + + def __ne__(self, other): + return not (self == other) + + def __hash__(self) -> int: + return hash((self.data, tuple(self.children))) + + def iter_subtrees(self) -> 'Iterator[Tree[_Leaf_T]]': + #-- + queue = [self] + subtrees = dict() + for subtree in queue: + subtrees[id(subtree)] = subtree + queue += [c for c in reversed(subtree.children) + if isinstance(c, Tree) and id(c) not in subtrees] + + del queue + return reversed(list(subtrees.values())) + + def iter_subtrees_topdown(self): + #-- + stack = [self] + stack_append = stack.append + stack_pop = stack.pop + while stack: + node = stack_pop() + if not isinstance(node, Tree): + continue + yield node + for child in reversed(node.children): + stack_append(child) + + def find_pred(self, pred: 'Callable[[Tree[_Leaf_T]], bool]') -> 'Iterator[Tree[_Leaf_T]]': + #-- + return filter(pred, self.iter_subtrees()) + + def find_data(self, data: str) -> 'Iterator[Tree[_Leaf_T]]': + #-- + return self.find_pred(lambda t: t.data == data) + + +from functools import wraps, update_wrapper +from inspect import getmembers, getmro + +_Return_T = TypeVar('_Return_T') +_Return_V = TypeVar('_Return_V') +_Leaf_T = TypeVar('_Leaf_T') +_Leaf_U = TypeVar('_Leaf_U') +_R = TypeVar('_R') +_FUNC = Callable[..., _Return_T] +_DECORATED = Union[_FUNC, type] + +class _DiscardType: + #-- + + def __repr__(self): + return "lark.visitors.Discard" + +Discard = _DiscardType() + +## + + +class _Decoratable: + #-- + + @classmethod + def _apply_v_args(cls, visit_wrapper): + mro = getmro(cls) + assert mro[0] is cls + libmembers = {name for _cls in mro[1:] for name, _ in getmembers(_cls)} + for name, value in getmembers(cls): + + ## + + if name.startswith('_') or (name in libmembers and name not in cls.__dict__): + continue + if not callable(value): + continue + + ## + + if isinstance(cls.__dict__[name], _VArgsWrapper): + continue + + setattr(cls, name, _VArgsWrapper(cls.__dict__[name], visit_wrapper)) + return cls + + def __class_getitem__(cls, _): + return cls + + +class Transformer(_Decoratable, ABC, Generic[_Leaf_T, _Return_T]): + #-- + __visit_tokens__ = True ## + + + def __init__(self, visit_tokens: bool=True) -> None: + self.__visit_tokens__ = visit_tokens + + def _call_userfunc(self, tree, new_children=None): + ## + + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + try: + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + return f.visit_wrapper(f, tree.data, children, tree.meta) + else: + return f(children) + except GrammarError: + raise + except Exception as e: + raise VisitError(tree.data, tree, e) + + def _call_userfunc_token(self, token): + try: + f = getattr(self, token.type) + except AttributeError: + return self.__default_token__(token) + else: + try: + return f(token) + except GrammarError: + raise + except Exception as e: + raise VisitError(token.type, token, e) + + def _transform_children(self, children): + for c in children: + if isinstance(c, Tree): + res = self._transform_tree(c) + elif self.__visit_tokens__ and isinstance(c, Token): + res = self._call_userfunc_token(c) + else: + res = c + + if res is not Discard: + yield res + + def _transform_tree(self, tree): + children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree, children) + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + #-- + res = list(self._transform_children([tree])) + if not res: + return None ## + + assert len(res) == 1 + return res[0] + + def __mul__( + self: 'Transformer[_Leaf_T, Tree[_Leaf_U]]', + other: 'Union[Transformer[_Leaf_U, _Return_V], TransformerChain[_Leaf_U, _Return_V,]]' + ) -> 'TransformerChain[_Leaf_T, _Return_V]': + #-- + return TransformerChain(self, other) + + def __default__(self, data, children, meta): + #-- + return Tree(data, children, meta) + + def __default_token__(self, token): + #-- + return token + + +def merge_transformers(base_transformer=None, **transformers_to_merge): + #-- + if base_transformer is None: + base_transformer = Transformer() + for prefix, transformer in transformers_to_merge.items(): + for method_name in dir(transformer): + method = getattr(transformer, method_name) + if not callable(method): + continue + if method_name.startswith("_") or method_name == "transform": + continue + prefixed_method = prefix + "__" + method_name + if hasattr(base_transformer, prefixed_method): + raise AttributeError("Cannot merge: method '%s' appears more than once" % prefixed_method) + + setattr(base_transformer, prefixed_method, method) + + return base_transformer + + +class InlineTransformer(Transformer): ## + + def _call_userfunc(self, tree, new_children=None): + ## + + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + return f(*children) + + +class TransformerChain(Generic[_Leaf_T, _Return_T]): + + transformers: 'Tuple[Union[Transformer, TransformerChain], ...]' + + def __init__(self, *transformers: 'Union[Transformer, TransformerChain]') -> None: + self.transformers = transformers + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + for t in self.transformers: + tree = t.transform(tree) + return cast(_Return_T, tree) + + def __mul__( + self: 'TransformerChain[_Leaf_T, Tree[_Leaf_U]]', + other: 'Union[Transformer[_Leaf_U, _Return_V], TransformerChain[_Leaf_U, _Return_V]]' + ) -> 'TransformerChain[_Leaf_T, _Return_V]': + return TransformerChain(*self.transformers + (other,)) + + +class Transformer_InPlace(Transformer[_Leaf_T, _Return_T]): + #-- + def _transform_tree(self, tree): ## + + return self._call_userfunc(tree) + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + for subtree in tree.iter_subtrees(): + subtree.children = list(self._transform_children(subtree.children)) + + return self._transform_tree(tree) + + +class Transformer_NonRecursive(Transformer[_Leaf_T, _Return_T]): + #-- + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + ## + + rev_postfix = [] + q: List[Branch[_Leaf_T]] = [tree] + while q: + t = q.pop() + rev_postfix.append(t) + if isinstance(t, Tree): + q += t.children + + ## + + stack: List = [] + for x in reversed(rev_postfix): + if isinstance(x, Tree): + size = len(x.children) + if size: + args = stack[-size:] + del stack[-size:] + else: + args = [] + + res = self._call_userfunc(x, args) + if res is not Discard: + stack.append(res) + + elif self.__visit_tokens__ and isinstance(x, Token): + res = self._call_userfunc_token(x) + if res is not Discard: + stack.append(res) + else: + stack.append(x) + + result, = stack ## + + ## + + ## + + ## + + return cast(_Return_T, result) + + +class Transformer_InPlaceRecursive(Transformer[_Leaf_T, _Return_T]): + #-- + def _transform_tree(self, tree): + tree.children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree) + + +## + + +class VisitorBase: + def _call_userfunc(self, tree): + return getattr(self, tree.data, self.__default__)(tree) + + def __default__(self, tree): + #-- + return tree + + def __class_getitem__(cls, _): + return cls + + +class Visitor(VisitorBase, ABC, Generic[_Leaf_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for subtree in tree.iter_subtrees(): + self._call_userfunc(subtree) + return tree + + def visit_topdown(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for subtree in tree.iter_subtrees_topdown(): + self._call_userfunc(subtree) + return tree + + +class Visitor_Recursive(VisitorBase, Generic[_Leaf_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for child in tree.children: + if isinstance(child, Tree): + self.visit(child) + + self._call_userfunc(tree) + return tree + + def visit_topdown(self,tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + self._call_userfunc(tree) + + for child in tree.children: + if isinstance(child, Tree): + self.visit_topdown(child) + + return tree + + +class Interpreter(_Decoratable, ABC, Generic[_Leaf_T, _Return_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> _Return_T: + ## + + ## + + ## + + return self._visit_tree(tree) + + def _visit_tree(self, tree: Tree[_Leaf_T]): + f = getattr(self, tree.data) + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + return f.visit_wrapper(f, tree.data, tree.children, tree.meta) + else: + return f(tree) + + def visit_children(self, tree: Tree[_Leaf_T]) -> List: + return [self._visit_tree(child) if isinstance(child, Tree) else child + for child in tree.children] + + def __getattr__(self, name): + return self.__default__ + + def __default__(self, tree): + return self.visit_children(tree) + + +_InterMethod = Callable[[Type[Interpreter], _Return_T], _R] + +def visit_children_decor(func: _InterMethod) -> _InterMethod: + #-- + @wraps(func) + def inner(cls, tree): + values = cls.visit_children(tree) + return func(cls, values) + return inner + +## + + +def _apply_v_args(obj, visit_wrapper): + try: + _apply = obj._apply_v_args + except AttributeError: + return _VArgsWrapper(obj, visit_wrapper) + else: + return _apply(visit_wrapper) + + +class _VArgsWrapper: + #-- + base_func: Callable + + def __init__(self, func: Callable, visit_wrapper: Callable[[Callable, str, list, Any], Any]): + if isinstance(func, _VArgsWrapper): + func = func.base_func + self.base_func = func + self.visit_wrapper = visit_wrapper + update_wrapper(self, func) + + def __call__(self, *args, **kwargs): + return self.base_func(*args, **kwargs) + + def __get__(self, instance, owner=None): + try: + ## + + ## + + g = type(self.base_func).__get__ + except AttributeError: + return self + else: + return _VArgsWrapper(g(self.base_func, instance, owner), self.visit_wrapper) + + def __set_name__(self, owner, name): + try: + f = type(self.base_func).__set_name__ + except AttributeError: + return + else: + f(self.base_func, owner, name) + + +def _vargs_inline(f, _data, children, _meta): + return f(*children) +def _vargs_meta_inline(f, _data, children, meta): + return f(meta, *children) +def _vargs_meta(f, _data, children, meta): + return f(meta, children) +def _vargs_tree(f, data, children, meta): + return f(Tree(data, children, meta)) + + +def v_args(inline: bool = False, meta: bool = False, tree: bool = False, wrapper: Optional[Callable] = None) -> Callable[[_DECORATED], _DECORATED]: + #-- + if tree and (meta or inline): + raise ValueError("Visitor functions cannot combine 'tree' with 'meta' or 'inline'.") + + func = None + if meta: + if inline: + func = _vargs_meta_inline + else: + func = _vargs_meta + elif inline: + func = _vargs_inline + elif tree: + func = _vargs_tree + + if wrapper is not None: + if func is not None: + raise ValueError("Cannot use 'wrapper' along with 'tree', 'meta' or 'inline'.") + func = wrapper + + def _visitor_args_dec(obj): + return _apply_v_args(obj, func) + return _visitor_args_dec + + + +TOKEN_DEFAULT_PRIORITY = 0 + + +class Symbol(Serialize): + __slots__ = ('name',) + + name: str + is_term: ClassVar[bool] = NotImplemented + + def __init__(self, name: str) -> None: + self.name = name + + def __eq__(self, other): + if not isinstance(other, Symbol): + return NotImplemented + return self.is_term == other.is_term and self.name == other.name + + def __ne__(self, other): + return not (self == other) + + def __hash__(self): + return hash(self.name) + + def __repr__(self): + return '%s(%r)' % (type(self).__name__, self.name) + + fullrepr = property(__repr__) + + def renamed(self, f): + return type(self)(f(self.name)) + + +class Terminal(Symbol): + __serialize_fields__ = 'name', 'filter_out' + + is_term: ClassVar[bool] = True + + def __init__(self, name: str, filter_out: bool = False) -> None: + self.name = name + self.filter_out = filter_out + + @property + def fullrepr(self): + return '%s(%r, %r)' % (type(self).__name__, self.name, self.filter_out) + + def renamed(self, f): + return type(self)(f(self.name), self.filter_out) + + +class NonTerminal(Symbol): + __serialize_fields__ = 'name', + + is_term: ClassVar[bool] = False + + def serialize(self, memo=None) -> Dict[str, Any]: + ## + + ## + + return {'name': str(self.name), '__type__': 'NonTerminal'} + + +class RuleOptions(Serialize): + __serialize_fields__ = 'keep_all_tokens', 'expand1', 'priority', 'template_source', 'empty_indices' + + keep_all_tokens: bool + expand1: bool + priority: Optional[int] + template_source: Optional[str] + empty_indices: Tuple[bool, ...] + + def __init__(self, keep_all_tokens: bool=False, expand1: bool=False, priority: Optional[int]=None, template_source: Optional[str]=None, empty_indices: Tuple[bool, ...]=()) -> None: + self.keep_all_tokens = keep_all_tokens + self.expand1 = expand1 + self.priority = priority + self.template_source = template_source + self.empty_indices = empty_indices + + def __repr__(self): + return 'RuleOptions(%r, %r, %r, %r)' % ( + self.keep_all_tokens, + self.expand1, + self.priority, + self.template_source + ) + + +class Rule(Serialize): + #-- + __slots__ = ('origin', 'expansion', 'alias', 'options', 'order', '_hash') + + __serialize_fields__ = 'origin', 'expansion', 'order', 'alias', 'options' + __serialize_namespace__ = Terminal, NonTerminal, RuleOptions + + origin: NonTerminal + expansion: Sequence[Symbol] + order: int + alias: Optional[str] + options: RuleOptions + _hash: int + + def __init__(self, origin: NonTerminal, expansion: Sequence[Symbol], + order: int=0, alias: Optional[str]=None, options: Optional[RuleOptions]=None): + self.origin = origin + self.expansion = expansion + self.alias = alias + self.order = order + self.options = options or RuleOptions() + self._hash = hash((self.origin, tuple(self.expansion))) + + def _deserialize(self): + self._hash = hash((self.origin, tuple(self.expansion))) + + def __str__(self): + return '<%s : %s>' % (self.origin.name, ' '.join(x.name for x in self.expansion)) + + def __repr__(self): + return 'Rule(%r, %r, %r, %r)' % (self.origin, self.expansion, self.alias, self.options) + + def __hash__(self): + return self._hash + + def __eq__(self, other): + if not isinstance(other, Rule): + return False + return self.origin == other.origin and self.expansion == other.expansion + + + +from contextlib import suppress +from copy import copy + +try: ## + + has_interegular = bool(interegular) +except NameError: + has_interegular = False + +class Pattern(Serialize, ABC): + #-- + + value: str + flags: Collection[str] + raw: Optional[str] + type: ClassVar[str] + + def __init__(self, value: str, flags: Collection[str] = (), raw: Optional[str] = None) -> None: + self.value = value + self.flags = frozenset(flags) + self.raw = raw + + def __repr__(self): + return repr(self.to_regexp()) + + ## + + def __hash__(self): + return hash((type(self), self.value, self.flags)) + + def __eq__(self, other): + return type(self) == type(other) and self.value == other.value and self.flags == other.flags + + @abstractmethod + def to_regexp(self) -> str: + raise NotImplementedError() + + @property + @abstractmethod + def min_width(self) -> int: + raise NotImplementedError() + + @property + @abstractmethod + def max_width(self) -> int: + raise NotImplementedError() + + def _get_flags(self, value): + for f in self.flags: + value = ('(?%s:%s)' % (f, value)) + return value + + +class PatternStr(Pattern): + __serialize_fields__ = 'value', 'flags', 'raw' + + type: ClassVar[str] = "str" + + def to_regexp(self) -> str: + return self._get_flags(re.escape(self.value)) + + @property + def min_width(self) -> int: + return len(self.value) + + @property + def max_width(self) -> int: + return len(self.value) + + +class PatternRE(Pattern): + __serialize_fields__ = 'value', 'flags', 'raw', '_width' + + type: ClassVar[str] = "re" + + def to_regexp(self) -> str: + return self._get_flags(self.value) + + _width = None + def _get_width(self): + if self._width is None: + self._width = get_regexp_width(self.to_regexp()) + return self._width + + @property + def min_width(self) -> int: + return self._get_width()[0] + + @property + def max_width(self) -> int: + return self._get_width()[1] + + +class TerminalDef(Serialize): + #-- + __serialize_fields__ = 'name', 'pattern', 'priority' + __serialize_namespace__ = PatternStr, PatternRE + + name: str + pattern: Pattern + priority: int + + def __init__(self, name: str, pattern: Pattern, priority: int = TOKEN_DEFAULT_PRIORITY) -> None: + assert isinstance(pattern, Pattern), pattern + self.name = name + self.pattern = pattern + self.priority = priority + + def __repr__(self): + return '%s(%r, %r)' % (type(self).__name__, self.name, self.pattern) + + def user_repr(self) -> str: + if self.name.startswith('__'): ## + + return self.pattern.raw or self.name + else: + return self.name + +_T = TypeVar('_T', bound="Token") + +class Token(str): + #-- + __slots__ = ('type', 'start_pos', 'value', 'line', 'column', 'end_line', 'end_column', 'end_pos') + + __match_args__ = ('type', 'value') + + type: str + start_pos: Optional[int] + value: Any + line: Optional[int] + column: Optional[int] + end_line: Optional[int] + end_column: Optional[int] + end_pos: Optional[int] + + + @overload + def __new__( + cls, + type: str, + value: Any, + start_pos: Optional[int] = None, + line: Optional[int] = None, + column: Optional[int] = None, + end_line: Optional[int] = None, + end_column: Optional[int] = None, + end_pos: Optional[int] = None + ) -> 'Token': + ... + + @overload + def __new__( + cls, + type_: str, + value: Any, + start_pos: Optional[int] = None, + line: Optional[int] = None, + column: Optional[int] = None, + end_line: Optional[int] = None, + end_column: Optional[int] = None, + end_pos: Optional[int] = None + ) -> 'Token': ... + + def __new__(cls, *args, **kwargs): + if "type_" in kwargs: + warnings.warn("`type_` is deprecated use `type` instead", DeprecationWarning) + + if "type" in kwargs: + raise TypeError("Error: using both 'type' and the deprecated 'type_' as arguments.") + kwargs["type"] = kwargs.pop("type_") + + return cls._future_new(*args, **kwargs) + + + @classmethod + def _future_new(cls, type, value, start_pos=None, line=None, column=None, end_line=None, end_column=None, end_pos=None): + inst = super(Token, cls).__new__(cls, value) + + inst.type = type + inst.start_pos = start_pos + inst.value = value + inst.line = line + inst.column = column + inst.end_line = end_line + inst.end_column = end_column + inst.end_pos = end_pos + return inst + + @overload + def update(self, type: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + ... + + @overload + def update(self, type_: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + ... + + def update(self, *args, **kwargs): + if "type_" in kwargs: + warnings.warn("`type_` is deprecated use `type` instead", DeprecationWarning) + + if "type" in kwargs: + raise TypeError("Error: using both 'type' and the deprecated 'type_' as arguments.") + kwargs["type"] = kwargs.pop("type_") + + return self._future_update(*args, **kwargs) + + def _future_update(self, type: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + return Token.new_borrow_pos( + type if type is not None else self.type, + value if value is not None else self.value, + self + ) + + @classmethod + def new_borrow_pos(cls: Type[_T], type_: str, value: Any, borrow_t: 'Token') -> _T: + return cls(type_, value, borrow_t.start_pos, borrow_t.line, borrow_t.column, borrow_t.end_line, borrow_t.end_column, borrow_t.end_pos) + + def __reduce__(self): + return (self.__class__, (self.type, self.value, self.start_pos, self.line, self.column)) + + def __repr__(self): + return 'Token(%r, %r)' % (self.type, self.value) + + def __deepcopy__(self, memo): + return Token(self.type, self.value, self.start_pos, self.line, self.column) + + def __eq__(self, other): + if isinstance(other, Token) and self.type != other.type: + return False + + return str.__eq__(self, other) + + __hash__ = str.__hash__ + + +class LineCounter: + #-- + + __slots__ = 'char_pos', 'line', 'column', 'line_start_pos', 'newline_char' + + def __init__(self, newline_char): + self.newline_char = newline_char + self.char_pos = 0 + self.line = 1 + self.column = 1 + self.line_start_pos = 0 + + def __eq__(self, other): + if not isinstance(other, LineCounter): + return NotImplemented + + return self.char_pos == other.char_pos and self.newline_char == other.newline_char + + def feed(self, token: TextOrSlice, test_newline=True): + #-- + if test_newline: + newlines = token.count(self.newline_char) + if newlines: + self.line += newlines + self.line_start_pos = self.char_pos + token.rindex(self.newline_char) + 1 + + self.char_pos += len(token) + self.column = self.char_pos - self.line_start_pos + 1 + + +class UnlessCallback: + def __init__(self, scanner: 'Scanner'): + self.scanner = scanner + + def __call__(self, t: Token): + res = self.scanner.fullmatch(t.value) + if res is not None: + t.type = res + return t + + +class CallChain: + def __init__(self, callback1, callback2, cond): + self.callback1 = callback1 + self.callback2 = callback2 + self.cond = cond + + def __call__(self, t): + t2 = self.callback1(t) + return self.callback2(t) if self.cond(t2) else t2 + + +def _get_match(re_, regexp, s, flags): + m = re_.match(regexp, s, flags) + if m: + return m.group(0) + +def _create_unless(terminals, g_regex_flags, re_, use_bytes): + tokens_by_type = classify(terminals, lambda t: type(t.pattern)) + assert len(tokens_by_type) <= 2, tokens_by_type.keys() + embedded_strs = set() + callback = {} + for retok in tokens_by_type.get(PatternRE, []): + unless = [] + for strtok in tokens_by_type.get(PatternStr, []): + if strtok.priority != retok.priority: + continue + s = strtok.pattern.value + if s == _get_match(re_, retok.pattern.to_regexp(), s, g_regex_flags): + unless.append(strtok) + if strtok.pattern.flags <= retok.pattern.flags: + embedded_strs.add(strtok) + if unless: + callback[retok.name] = UnlessCallback(Scanner(unless, g_regex_flags, re_, use_bytes=use_bytes)) + + new_terminals = [t for t in terminals if t not in embedded_strs] + return new_terminals, callback + + +class Scanner: + def __init__(self, terminals, g_regex_flags, re_, use_bytes): + self.terminals = terminals + self.g_regex_flags = g_regex_flags + self.re_ = re_ + self.use_bytes = use_bytes + + self.allowed_types = {t.name for t in self.terminals} + + self._mres = self._build_mres(terminals, len(terminals)) + + def _build_mres(self, terminals, max_size): + ## + + ## + + ## + + mres = [] + while terminals: + pattern = u'|'.join(u'(?P<%s>%s)' % (t.name, t.pattern.to_regexp()) for t in terminals[:max_size]) + if self.use_bytes: + pattern = pattern.encode('latin-1') + try: + mre = self.re_.compile(pattern, self.g_regex_flags) + except AssertionError: ## + + return self._build_mres(terminals, max_size // 2) + + mres.append(mre) + terminals = terminals[max_size:] + return mres + + def match(self, text: TextSlice, pos): + for mre in self._mres: + m = mre.match(text.text, pos, text.end) + if m: + return m.group(0), m.lastgroup + + + def fullmatch(self, text: str) -> Optional[str]: + for mre in self._mres: + m = mre.fullmatch(text) + if m: + return m.lastgroup + return None + +def _regexp_has_newline(r: str): + #-- + return '\n' in r or '\\n' in r or '\\s' in r or '[^' in r or ('(?s' in r and '.' in r) + + +class LexerState: + #-- + + __slots__ = 'text', 'line_ctr', 'last_token' + + text: TextSlice + line_ctr: LineCounter + last_token: Optional[Token] + + def __init__(self, text: TextSlice, line_ctr: Optional[LineCounter] = None, last_token: Optional[Token]=None): + if isinstance(text, TextSlice): + if line_ctr is None: + line_ctr = LineCounter(b'\n' if isinstance(text.text, bytes) else '\n') + + if text.start > 0: + ## + + line_ctr.feed(TextSlice(text.text, 0, text.start)) + + if not (text.start <= line_ctr.char_pos <= text.end): + raise ValueError("LineCounter.char_pos is out of bounds") + + self.text = text + if line_ctr is None: + line_ctr = LineCounter(b'\n' if isinstance(text, bytes) or (hasattr(text, 'text') and isinstance(text.text, bytes)) else '\n') + self.line_ctr = line_ctr + self.last_token = last_token + + + def __eq__(self, other): + if not isinstance(other, LexerState): + return NotImplemented + + return self.text == other.text and self.line_ctr == other.line_ctr and self.last_token == other.last_token + + def __copy__(self): + return type(self)(self.text, copy(self.line_ctr), self.last_token) + + +class LexerThread: + #-- + + def __init__(self, lexer: 'Lexer', lexer_state: Optional[LexerState]): + self.lexer = lexer + self.state = lexer_state + + @classmethod + def from_text(cls, lexer: 'Lexer', text_or_slice: TextOrSlice) -> 'LexerThread': + text = TextSlice.cast_from(text_or_slice) + return cls(lexer, LexerState(text)) + + @classmethod + def from_custom_input(cls, lexer: 'Lexer', text: Any) -> 'LexerThread': + return cls(lexer, LexerState(text)) + + def lex(self, parser_state): + if self.state is None: + raise TypeError("Cannot lex: No text assigned to lexer state") + return self.lexer.lex(self.state, parser_state) + + def __copy__(self): + return type(self)(self.lexer, copy(self.state)) + + _Token = Token + + +_Callback = Callable[[Token], Token] + +class Lexer(ABC): + #-- + @abstractmethod + def lex(self, lexer_state: LexerState, parser_state: Any) -> Iterator[Token]: + return NotImplemented + + def make_lexer_state(self, text: str): + #-- + return LexerState(TextSlice.cast_from(text)) + + +def _check_regex_collisions(terminal_to_regexp: Dict[TerminalDef, str], comparator, strict_mode, max_collisions_to_show=8): + if not comparator: + comparator = interegular.Comparator.from_regexes(terminal_to_regexp) + + ## + + ## + + max_time = 2 if strict_mode else 0.2 + + ## + + if comparator.count_marked_pairs() >= max_collisions_to_show: + return + for group in classify(terminal_to_regexp, lambda t: t.priority).values(): + for a, b in comparator.check(group, skip_marked=True): + assert a.priority == b.priority + ## + + comparator.mark(a, b) + + ## + + message = f"Collision between Terminals {a.name} and {b.name}. " + try: + example = comparator.get_example_overlap(a, b, max_time).format_multiline() + except ValueError: + ## + + example = "No example could be found fast enough. However, the collision does still exists" + if strict_mode: + raise LexError(f"{message}\n{example}") + logger.warning("%s The lexer will choose between them arbitrarily.\n%s", message, example) + if comparator.count_marked_pairs() >= max_collisions_to_show: + logger.warning("Found 8 regex collisions, will not check for more.") + return + + +class AbstractBasicLexer(Lexer): + terminals_by_name: Dict[str, TerminalDef] + + @abstractmethod + def __init__(self, conf: 'LexerConf', comparator=None) -> None: + ... + + @abstractmethod + def next_token(self, lex_state: LexerState, parser_state: Any = None) -> Token: + ... + + def lex(self, state: LexerState, parser_state: Any) -> Iterator[Token]: + with suppress(EOFError): + while True: + yield self.next_token(state, parser_state) + + +class BasicLexer(AbstractBasicLexer): + terminals: Collection[TerminalDef] + ignore_types: FrozenSet[str] + newline_types: FrozenSet[str] + user_callbacks: Dict[str, _Callback] + callback: Dict[str, _Callback] + re: ModuleType + + def __init__(self, conf: 'LexerConf', comparator=None) -> None: + terminals = list(conf.terminals) + assert all(isinstance(t, TerminalDef) for t in terminals), terminals + + self.re = conf.re_module + + if not conf.skip_validation: + ## + + terminal_to_regexp = {} + for t in terminals: + regexp = t.pattern.to_regexp() + try: + self.re.compile(regexp, conf.g_regex_flags) + except self.re.error: + raise LexError("Cannot compile token %s: %s" % (t.name, t.pattern)) + + if t.pattern.min_width == 0: + raise LexError("Lexer does not allow zero-width terminals. (%s: %s)" % (t.name, t.pattern)) + if t.pattern.type == "re": + terminal_to_regexp[t] = regexp + + if not (set(conf.ignore) <= {t.name for t in terminals}): + raise LexError("Ignore terminals are not defined: %s" % (set(conf.ignore) - {t.name for t in terminals})) + + if has_interegular: + _check_regex_collisions(terminal_to_regexp, comparator, conf.strict) + elif conf.strict: + raise LexError("interegular must be installed for strict mode. Use `pip install 'lark[interegular]'`.") + + ## + + self.newline_types = frozenset(t.name for t in terminals if _regexp_has_newline(t.pattern.to_regexp())) + self.ignore_types = frozenset(conf.ignore) + + terminals.sort(key=lambda x: (-x.priority, -x.pattern.max_width, -len(x.pattern.value), x.name)) + self.terminals = terminals + self.user_callbacks = conf.callbacks + self.g_regex_flags = conf.g_regex_flags + self.use_bytes = conf.use_bytes + self.terminals_by_name = conf.terminals_by_name + + self._scanner: Optional[Scanner] = None + + def _build_scanner(self) -> Scanner: + terminals, self.callback = _create_unless(self.terminals, self.g_regex_flags, self.re, self.use_bytes) + assert all(self.callback.values()) + + for type_, f in self.user_callbacks.items(): + if type_ in self.callback: + ## + + self.callback[type_] = CallChain(self.callback[type_], f, lambda t: t.type == type_) + else: + self.callback[type_] = f + + return Scanner(terminals, self.g_regex_flags, self.re, self.use_bytes) + + @property + def scanner(self) -> Scanner: + if self._scanner is None: + self._scanner = self._build_scanner() + return self._scanner + + def match(self, text, pos): + return self.scanner.match(text, pos) + + def next_token(self, lex_state: LexerState, parser_state: Any = None) -> Token: + line_ctr = lex_state.line_ctr + while line_ctr.char_pos < lex_state.text.end: + res = self.match(lex_state.text, line_ctr.char_pos) + if not res: + allowed = self.scanner.allowed_types - self.ignore_types + if not allowed: + allowed = {""} + raise UnexpectedCharacters(lex_state.text.text, line_ctr.char_pos, line_ctr.line, line_ctr.column, + allowed=allowed, token_history=lex_state.last_token and [lex_state.last_token], + state=parser_state, terminals_by_name=self.terminals_by_name) + + value, type_ = res + + ignored = type_ in self.ignore_types + t = None + if not ignored or type_ in self.callback: + t = Token(type_, value, line_ctr.char_pos, line_ctr.line, line_ctr.column) + line_ctr.feed(value, type_ in self.newline_types) + if t is not None: + t.end_line = line_ctr.line + t.end_column = line_ctr.column + t.end_pos = line_ctr.char_pos + if t.type in self.callback: + t = self.callback[t.type](t) + if not ignored: + if not isinstance(t, Token): + raise LexError("Callbacks must return a token (returned %r)" % t) + lex_state.last_token = t + return t + + ## + + raise EOFError(self) + + +class ContextualLexer(Lexer): + lexers: Dict[int, AbstractBasicLexer] + root_lexer: AbstractBasicLexer + + BasicLexer: Type[AbstractBasicLexer] = BasicLexer + + def __init__(self, conf: 'LexerConf', states: Dict[int, Collection[str]], always_accept: Collection[str]=()) -> None: + terminals = list(conf.terminals) + terminals_by_name = conf.terminals_by_name + + trad_conf = copy(conf) + trad_conf.terminals = terminals + + if has_interegular and not conf.skip_validation: + comparator = interegular.Comparator.from_regexes({t: t.pattern.to_regexp() for t in terminals}) + else: + comparator = None + lexer_by_tokens: Dict[FrozenSet[str], AbstractBasicLexer] = {} + self.lexers = {} + for state, accepts in states.items(): + key = frozenset(accepts) + try: + lexer = lexer_by_tokens[key] + except KeyError: + accepts = set(accepts) | set(conf.ignore) | set(always_accept) + lexer_conf = copy(trad_conf) + lexer_conf.terminals = [terminals_by_name[n] for n in accepts if n in terminals_by_name] + lexer = self.BasicLexer(lexer_conf, comparator) + lexer_by_tokens[key] = lexer + + self.lexers[state] = lexer + + assert trad_conf.terminals is terminals + trad_conf.skip_validation = True ## + + self.root_lexer = self.BasicLexer(trad_conf, comparator) + + def lex(self, lexer_state: LexerState, parser_state: 'ParserState') -> Iterator[Token]: + try: + while True: + lexer = self.lexers[parser_state.position] + yield lexer.next_token(lexer_state, parser_state) + except EOFError: + pass + except UnexpectedCharacters as e: + ## + + ## + + try: + last_token = lexer_state.last_token ## + + token = self.root_lexer.next_token(lexer_state, parser_state) + raise UnexpectedToken(token, e.allowed, state=parser_state, token_history=[last_token], terminals_by_name=self.root_lexer.terminals_by_name) + except UnexpectedCharacters: + raise e ## + + + + +_ParserArgType: 'TypeAlias' = 'Literal["earley", "lalr", "cyk", "auto"]' +_LexerArgType: 'TypeAlias' = 'Union[Literal["auto", "basic", "contextual", "dynamic", "dynamic_complete"], Type[Lexer]]' +_LexerCallback = Callable[[Token], Token] +ParserCallbacks = Dict[str, Callable] + +class LexerConf(Serialize): + __serialize_fields__ = 'terminals', 'ignore', 'g_regex_flags', 'use_bytes', 'lexer_type' + __serialize_namespace__ = TerminalDef, + + terminals: Collection[TerminalDef] + re_module: ModuleType + ignore: Collection[str] + postlex: 'Optional[PostLex]' + callbacks: Dict[str, _LexerCallback] + g_regex_flags: int + skip_validation: bool + use_bytes: bool + lexer_type: Optional[_LexerArgType] + strict: bool + + def __init__(self, terminals: Collection[TerminalDef], re_module: ModuleType, ignore: Collection[str]=(), postlex: 'Optional[PostLex]'=None, + callbacks: Optional[Dict[str, _LexerCallback]]=None, g_regex_flags: int=0, skip_validation: bool=False, use_bytes: bool=False, strict: bool=False): + self.terminals = terminals + self.terminals_by_name = {t.name: t for t in self.terminals} + assert len(self.terminals) == len(self.terminals_by_name) + self.ignore = ignore + self.postlex = postlex + self.callbacks = callbacks or {} + self.g_regex_flags = g_regex_flags + self.re_module = re_module + self.skip_validation = skip_validation + self.use_bytes = use_bytes + self.strict = strict + self.lexer_type = None + + def _deserialize(self): + self.terminals_by_name = {t.name: t for t in self.terminals} + + def __deepcopy__(self, memo=None): + return type(self)( + deepcopy(self.terminals, memo), + self.re_module, + deepcopy(self.ignore, memo), + deepcopy(self.postlex, memo), + deepcopy(self.callbacks, memo), + deepcopy(self.g_regex_flags, memo), + deepcopy(self.skip_validation, memo), + deepcopy(self.use_bytes, memo), + ) + +class ParserConf(Serialize): + __serialize_fields__ = 'rules', 'start', 'parser_type' + + rules: List['Rule'] + callbacks: ParserCallbacks + start: List[str] + parser_type: _ParserArgType + + def __init__(self, rules: List['Rule'], callbacks: ParserCallbacks, start: List[str]): + assert isinstance(start, list) + self.rules = rules + self.callbacks = callbacks + self.start = start + + +from functools import partial, wraps +from itertools import product + + +class ExpandSingleChild: + def __init__(self, node_builder): + self.node_builder = node_builder + + def __call__(self, children): + if len(children) == 1: + return children[0] + else: + return self.node_builder(children) + + + +class PropagatePositions: + def __init__(self, node_builder, node_filter=None): + self.node_builder = node_builder + self.node_filter = node_filter + + def __call__(self, children): + res = self.node_builder(children) + + if isinstance(res, Tree): + ## + + ## + + ## + + ## + + + res_meta = res.meta + + first_meta = self._pp_get_meta(children) + if first_meta is not None: + if not hasattr(res_meta, 'line'): + ## + + res_meta.line = getattr(first_meta, 'container_line', first_meta.line) + res_meta.column = getattr(first_meta, 'container_column', first_meta.column) + res_meta.start_pos = getattr(first_meta, 'container_start_pos', first_meta.start_pos) + res_meta.empty = False + + res_meta.container_line = getattr(first_meta, 'container_line', first_meta.line) + res_meta.container_column = getattr(first_meta, 'container_column', first_meta.column) + res_meta.container_start_pos = getattr(first_meta, 'container_start_pos', first_meta.start_pos) + + last_meta = self._pp_get_meta(reversed(children)) + if last_meta is not None: + if not hasattr(res_meta, 'end_line'): + res_meta.end_line = getattr(last_meta, 'container_end_line', last_meta.end_line) + res_meta.end_column = getattr(last_meta, 'container_end_column', last_meta.end_column) + res_meta.end_pos = getattr(last_meta, 'container_end_pos', last_meta.end_pos) + res_meta.empty = False + + res_meta.container_end_line = getattr(last_meta, 'container_end_line', last_meta.end_line) + res_meta.container_end_column = getattr(last_meta, 'container_end_column', last_meta.end_column) + res_meta.container_end_pos = getattr(last_meta, 'container_end_pos', last_meta.end_pos) + + return res + + def _pp_get_meta(self, children): + for c in children: + if self.node_filter is not None and not self.node_filter(c): + continue + if isinstance(c, Tree): + if not c.meta.empty: + return c.meta + elif isinstance(c, Token): + return c + elif hasattr(c, '__lark_meta__'): + return c.__lark_meta__() + +def make_propagate_positions(option): + if callable(option): + return partial(PropagatePositions, node_filter=option) + elif option is True: + return PropagatePositions + elif option is False: + return None + + raise ConfigurationError('Invalid option for propagate_positions: %r' % option) + + +class ChildFilter: + def __init__(self, to_include, append_none, node_builder): + self.node_builder = node_builder + self.to_include = to_include + self.append_none = append_none + + def __call__(self, children): + filtered = [] + + for i, to_expand, add_none in self.to_include: + if add_none: + filtered += [None] * add_none + if to_expand: + filtered += children[i].children + else: + filtered.append(children[i]) + + if self.append_none: + filtered += [None] * self.append_none + + return self.node_builder(filtered) + + +class ChildFilterLALR(ChildFilter): + #-- + + def __call__(self, children): + filtered = [] + for i, to_expand, add_none in self.to_include: + if add_none: + filtered += [None] * add_none + if to_expand: + if filtered: + filtered += children[i].children + else: ## + + filtered = children[i].children + else: + filtered.append(children[i]) + + if self.append_none: + filtered += [None] * self.append_none + + return self.node_builder(filtered) + + +class ChildFilterLALR_NoPlaceholders(ChildFilter): + #-- + def __init__(self, to_include, node_builder): + self.node_builder = node_builder + self.to_include = to_include + + def __call__(self, children): + filtered = [] + for i, to_expand in self.to_include: + if to_expand: + if filtered: + filtered += children[i].children + else: ## + + filtered = children[i].children + else: + filtered.append(children[i]) + return self.node_builder(filtered) + + +def _should_expand(sym): + return not sym.is_term and sym.name.startswith('_') + + +def maybe_create_child_filter(expansion, keep_all_tokens, ambiguous, _empty_indices: List[bool]): + ## + + if _empty_indices: + assert _empty_indices.count(False) == len(expansion) + s = ''.join(str(int(b)) for b in _empty_indices) + empty_indices = [len(ones) for ones in s.split('0')] + assert len(empty_indices) == len(expansion)+1, (empty_indices, len(expansion)) + else: + empty_indices = [0] * (len(expansion)+1) + + to_include = [] + nones_to_add = 0 + for i, sym in enumerate(expansion): + nones_to_add += empty_indices[i] + if keep_all_tokens or not (sym.is_term and sym.filter_out): + to_include.append((i, _should_expand(sym), nones_to_add)) + nones_to_add = 0 + + nones_to_add += empty_indices[len(expansion)] + + if _empty_indices or len(to_include) < len(expansion) or any(to_expand for i, to_expand,_ in to_include): + if _empty_indices or ambiguous: + return partial(ChildFilter if ambiguous else ChildFilterLALR, to_include, nones_to_add) + else: + ## + + return partial(ChildFilterLALR_NoPlaceholders, [(i, x) for i,x,_ in to_include]) + + +class AmbiguousExpander: + #-- + def __init__(self, to_expand, tree_class, node_builder): + self.node_builder = node_builder + self.tree_class = tree_class + self.to_expand = to_expand + + def __call__(self, children): + def _is_ambig_tree(t): + return hasattr(t, 'data') and t.data == '_ambig' + + ## + + ## + + ## + + ## + + ambiguous = [] + for i, child in enumerate(children): + if _is_ambig_tree(child): + if i in self.to_expand: + ambiguous.append(i) + + child.expand_kids_by_data('_ambig') + + if not ambiguous: + return self.node_builder(children) + + expand = [child.children if i in ambiguous else (child,) for i, child in enumerate(children)] + return self.tree_class('_ambig', [self.node_builder(list(f)) for f in product(*expand)]) + + +def maybe_create_ambiguous_expander(tree_class, expansion, keep_all_tokens): + to_expand = [i for i, sym in enumerate(expansion) + if keep_all_tokens or ((not (sym.is_term and sym.filter_out)) and _should_expand(sym))] + if to_expand: + return partial(AmbiguousExpander, to_expand, tree_class) + + +class AmbiguousIntermediateExpander: + #-- + + def __init__(self, tree_class, node_builder): + self.node_builder = node_builder + self.tree_class = tree_class + + def __call__(self, children): + def _is_iambig_tree(child): + return hasattr(child, 'data') and child.data == '_iambig' + + def _collapse_iambig(children): + #-- + + ## + + ## + + if children and _is_iambig_tree(children[0]): + iambig_node = children[0] + result = [] + for grandchild in iambig_node.children: + collapsed = _collapse_iambig(grandchild.children) + if collapsed: + for child in collapsed: + child.children += children[1:] + result += collapsed + else: + new_tree = self.tree_class('_inter', grandchild.children + children[1:]) + result.append(new_tree) + return result + + collapsed = _collapse_iambig(children) + if collapsed: + processed_nodes = [self.node_builder(c.children) for c in collapsed] + return self.tree_class('_ambig', processed_nodes) + + return self.node_builder(children) + + + +def inplace_transformer(func): + @wraps(func) + def f(children): + ## + + tree = Tree(func.__name__, children) + return func(tree) + return f + + +def apply_visit_wrapper(func, name, wrapper): + if wrapper is _vargs_meta or wrapper is _vargs_meta_inline: + raise NotImplementedError("Meta args not supported for internal transformer; use YourTransformer().transform(parser.parse()) instead") + + @wraps(func) + def f(children): + return wrapper(func, name, children, None) + return f + + +class ParseTreeBuilder: + def __init__(self, rules, tree_class, propagate_positions=False, ambiguous=False, maybe_placeholders=False): + self.tree_class = tree_class + self.propagate_positions = propagate_positions + self.ambiguous = ambiguous + self.maybe_placeholders = maybe_placeholders + + self.rule_builders = list(self._init_builders(rules)) + + def _init_builders(self, rules): + propagate_positions = make_propagate_positions(self.propagate_positions) + + for rule in rules: + options = rule.options + keep_all_tokens = options.keep_all_tokens + expand_single_child = options.expand1 + + wrapper_chain = list(filter(None, [ + (expand_single_child and not rule.alias) and ExpandSingleChild, + maybe_create_child_filter(rule.expansion, keep_all_tokens, self.ambiguous, options.empty_indices if self.maybe_placeholders else None), + propagate_positions, + self.ambiguous and maybe_create_ambiguous_expander(self.tree_class, rule.expansion, keep_all_tokens), + self.ambiguous and partial(AmbiguousIntermediateExpander, self.tree_class) + ])) + + yield rule, wrapper_chain + + def create_callback(self, transformer=None): + callbacks = {} + + default_handler = getattr(transformer, '__default__', None) + if default_handler: + def default_callback(data, children): + return default_handler(data, children, None) + else: + default_callback = self.tree_class + + for rule, wrapper_chain in self.rule_builders: + + user_callback_name = rule.alias or rule.options.template_source or rule.origin.name + try: + f = getattr(transformer, user_callback_name) + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + f = apply_visit_wrapper(f, user_callback_name, wrapper) + elif isinstance(transformer, Transformer_InPlace): + f = inplace_transformer(f) + except AttributeError: + f = partial(default_callback, user_callback_name) + + for w in wrapper_chain: + f = w(f) + + if rule in callbacks: + raise GrammarError("Rule '%s' already exists" % (rule,)) + + callbacks[rule] = f + + return callbacks + + + +class Action: + def __init__(self, name): + self.name = name + def __str__(self): + return self.name + def __repr__(self): + return str(self) + +Shift = Action('Shift') +Reduce = Action('Reduce') + +StateT = TypeVar("StateT") + +class ParseTableBase(Generic[StateT]): + states: Dict[StateT, Dict[str, Tuple]] + start_states: Dict[str, StateT] + end_states: Dict[str, StateT] + + def __init__(self, states, start_states, end_states): + self.states = states + self.start_states = start_states + self.end_states = end_states + + def serialize(self, memo): + tokens = Enumerator() + + states = { + state: {tokens.get(token): ((1, arg.serialize(memo)) if action is Reduce else (0, arg)) + for token, (action, arg) in actions.items()} + for state, actions in self.states.items() + } + + return { + 'tokens': tokens.reversed(), + 'states': states, + 'start_states': self.start_states, + 'end_states': self.end_states, + } + + @classmethod + def deserialize(cls, data, memo): + tokens = data['tokens'] + states = { + state: {tokens[token]: ((Reduce, Rule.deserialize(arg, memo)) if action==1 else (Shift, arg)) + for token, (action, arg) in actions.items()} + for state, actions in data['states'].items() + } + return cls(states, data['start_states'], data['end_states']) + +class ParseTable(ParseTableBase['State']): + #-- + pass + + +class IntParseTable(ParseTableBase[int]): + #-- + + @classmethod + def from_ParseTable(cls, parse_table: ParseTable): + enum = list(parse_table.states) + state_to_idx: Dict['State', int] = {s:i for i,s in enumerate(enum)} + int_states = {} + + for s, la in parse_table.states.items(): + la = {k:(v[0], state_to_idx[v[1]]) if v[0] is Shift else v + for k,v in la.items()} + int_states[ state_to_idx[s] ] = la + + + start_states = {start:state_to_idx[s] for start, s in parse_table.start_states.items()} + end_states = {start:state_to_idx[s] for start, s in parse_table.end_states.items()} + return cls(int_states, start_states, end_states) + + + +class ParseConf(Generic[StateT]): + __slots__ = 'parse_table', 'callbacks', 'start', 'start_state', 'end_state', 'states' + + parse_table: ParseTableBase[StateT] + callbacks: ParserCallbacks + start: str + + start_state: StateT + end_state: StateT + states: Dict[StateT, Dict[str, tuple]] + + def __init__(self, parse_table: ParseTableBase[StateT], callbacks: ParserCallbacks, start: str): + self.parse_table = parse_table + + self.start_state = self.parse_table.start_states[start] + self.end_state = self.parse_table.end_states[start] + self.states = self.parse_table.states + + self.callbacks = callbacks + self.start = start + +class ParserState(Generic[StateT]): + __slots__ = 'parse_conf', 'lexer', 'state_stack', 'value_stack' + + parse_conf: ParseConf[StateT] + lexer: LexerThread + state_stack: List[StateT] + value_stack: list + + def __init__(self, parse_conf: ParseConf[StateT], lexer: LexerThread, state_stack=None, value_stack=None): + self.parse_conf = parse_conf + self.lexer = lexer + self.state_stack = state_stack or [self.parse_conf.start_state] + self.value_stack = value_stack or [] + + @property + def position(self) -> StateT: + return self.state_stack[-1] + + ## + + def __eq__(self, other) -> bool: + if not isinstance(other, ParserState): + return NotImplemented + return len(self.state_stack) == len(other.state_stack) and self.position == other.position + + def __copy__(self): + return self.copy() + + def copy(self, deepcopy_values=True) -> 'ParserState[StateT]': + return type(self)( + self.parse_conf, + self.lexer, ## + + copy(self.state_stack), + deepcopy(self.value_stack) if deepcopy_values else copy(self.value_stack), + ) + + def feed_token(self, token: Token, is_end=False) -> Any: + state_stack = self.state_stack + value_stack = self.value_stack + states = self.parse_conf.states + end_state = self.parse_conf.end_state + callbacks = self.parse_conf.callbacks + + while True: + state = state_stack[-1] + try: + action, arg = states[state][token.type] + except KeyError: + expected = {s for s in states[state].keys() if s.isupper()} + raise UnexpectedToken(token, expected, state=self, interactive_parser=None) + + assert arg != end_state + + if action is Shift: + ## + + assert not is_end + state_stack.append(arg) + value_stack.append(token if token.type not in callbacks else callbacks[token.type](token)) + return + else: + ## + + rule = arg + size = len(rule.expansion) + if size: + s = value_stack[-size:] + del state_stack[-size:] + del value_stack[-size:] + else: + s = [] + + value = callbacks[rule](s) if callbacks else s + + _action, new_state = states[state_stack[-1]][rule.origin.name] + assert _action is Shift + state_stack.append(new_state) + value_stack.append(value) + + if is_end and state_stack[-1] == end_state: + return value_stack[-1] + + +class LALR_Parser(Serialize): + def __init__(self, parser_conf: ParserConf, debug: bool=False, strict: bool=False): + analysis = LALR_Analyzer(parser_conf, debug=debug, strict=strict) + analysis.compute_lalr() + callbacks = parser_conf.callbacks + + self._parse_table = analysis.parse_table + self.parser_conf = parser_conf + self.parser = _Parser(analysis.parse_table, callbacks, debug) + + @classmethod + def deserialize(cls, data, memo, callbacks, debug=False): + inst = cls.__new__(cls) + inst._parse_table = IntParseTable.deserialize(data, memo) + inst.parser = _Parser(inst._parse_table, callbacks, debug) + return inst + + def serialize(self, memo: Any = None) -> Dict[str, Any]: + return self._parse_table.serialize(memo) + + def parse_interactive(self, lexer: LexerThread, start: str): + return self.parser.parse(lexer, start, start_interactive=True) + + def parse(self, lexer, start, on_error=None): + try: + return self.parser.parse(lexer, start) + except UnexpectedInput as e: + if on_error is None: + raise + + while True: + if isinstance(e, UnexpectedCharacters): + s = e.interactive_parser.lexer_thread.state + p = s.line_ctr.char_pos + + if not on_error(e): + raise e + + if isinstance(e, UnexpectedCharacters): + ## + + if p == s.line_ctr.char_pos: + s.line_ctr.feed(s.text.text[p:p+1]) + + try: + return e.interactive_parser.resume_parse() + except UnexpectedToken as e2: + if (isinstance(e, UnexpectedToken) + and e.token.type == e2.token.type == '$END' + and e.interactive_parser == e2.interactive_parser): + ## + + raise e2 + e = e2 + except UnexpectedCharacters as e2: + e = e2 + + +class _Parser: + parse_table: ParseTableBase + callbacks: ParserCallbacks + debug: bool + + def __init__(self, parse_table: ParseTableBase, callbacks: ParserCallbacks, debug: bool=False): + self.parse_table = parse_table + self.callbacks = callbacks + self.debug = debug + + def parse(self, lexer: LexerThread, start: str, value_stack=None, state_stack=None, start_interactive=False): + parse_conf = ParseConf(self.parse_table, self.callbacks, start) + parser_state = ParserState(parse_conf, lexer, state_stack, value_stack) + if start_interactive: + return InteractiveParser(self, parser_state, parser_state.lexer) + return self.parse_from_state(parser_state) + + + def parse_from_state(self, state: ParserState, last_token: Optional[Token]=None): + #-- + try: + token = last_token + for token in state.lexer.lex(state): + assert token is not None + state.feed_token(token) + + end_token = Token.new_borrow_pos('$END', '', token) if token else Token('$END', '', 0, 1, 1) + return state.feed_token(end_token, True) + except UnexpectedInput as e: + try: + e.interactive_parser = InteractiveParser(self, state, state.lexer) + except NameError: + pass + raise e + except Exception as e: + if self.debug: + print("") + print("STATE STACK DUMP") + print("----------------") + for i, s in enumerate(state.state_stack): + print('%d)' % i , s) + print("") + + raise + + +class InteractiveParser: + #-- + def __init__(self, parser, parser_state: ParserState, lexer_thread: LexerThread): + self.parser = parser + self.parser_state = parser_state + self.lexer_thread = lexer_thread + self.result = None + + @property + def lexer_state(self) -> LexerThread: + warnings.warn("lexer_state will be removed in subsequent releases. Use lexer_thread instead.", DeprecationWarning) + return self.lexer_thread + + def feed_token(self, token: Token): + #-- + return self.parser_state.feed_token(token, token.type == '$END') + + def iter_parse(self) -> Iterator[Token]: + #-- + for token in self.lexer_thread.lex(self.parser_state): + yield token + self.result = self.feed_token(token) + + def exhaust_lexer(self) -> List[Token]: + #-- + return list(self.iter_parse()) + + + def feed_eof(self, last_token=None): + #-- + eof = Token.new_borrow_pos('$END', '', last_token) if last_token is not None else self.lexer_thread._Token('$END', '', 0, 1, 1) + return self.feed_token(eof) + + + def __copy__(self): + #-- + return self.copy() + + def copy(self, deepcopy_values=True): + return type(self)( + self.parser, + self.parser_state.copy(deepcopy_values=deepcopy_values), + copy(self.lexer_thread), + ) + + def __eq__(self, other): + if not isinstance(other, InteractiveParser): + return False + + return self.parser_state == other.parser_state and self.lexer_thread == other.lexer_thread + + def as_immutable(self): + #-- + p = copy(self) + return ImmutableInteractiveParser(p.parser, p.parser_state, p.lexer_thread) + + def pretty(self): + #-- + out = ["Parser choices:"] + for k, v in self.choices().items(): + out.append('\t- %s -> %r' % (k, v)) + out.append('stack size: %s' % len(self.parser_state.state_stack)) + return '\n'.join(out) + + def choices(self): + #-- + return self.parser_state.parse_conf.parse_table.states[self.parser_state.position] + + def accepts(self): + #-- + accepts = set() + conf_no_callbacks = copy(self.parser_state.parse_conf) + ## + + ## + + conf_no_callbacks.callbacks = {} + for t in self.choices(): + if t.isupper(): ## + + new_cursor = self.copy(deepcopy_values=False) + new_cursor.parser_state.parse_conf = conf_no_callbacks + try: + new_cursor.feed_token(self.lexer_thread._Token(t, '')) + except UnexpectedToken: + pass + else: + accepts.add(t) + return accepts + + def resume_parse(self): + #-- + return self.parser.parse_from_state(self.parser_state, last_token=self.lexer_thread.state.last_token) + + + +class ImmutableInteractiveParser(InteractiveParser): + #-- + + result = None + + def __hash__(self): + return hash((self.parser_state, self.lexer_thread)) + + def feed_token(self, token): + c = copy(self) + c.result = InteractiveParser.feed_token(c, token) + return c + + def exhaust_lexer(self): + #-- + cursor = self.as_mutable() + cursor.exhaust_lexer() + return cursor.as_immutable() + + def as_mutable(self): + #-- + p = copy(self) + return InteractiveParser(p.parser, p.parser_state, p.lexer_thread) + + + +def _wrap_lexer(lexer_class): + future_interface = getattr(lexer_class, '__future_interface__', 0) + if future_interface == 2: + return lexer_class + elif future_interface == 1: + class CustomLexerWrapper1(Lexer): + def __init__(self, lexer_conf): + self.lexer = lexer_class(lexer_conf) + def lex(self, lexer_state, parser_state): + if isinstance(lexer_state.text, TextSlice) and not lexer_state.text.is_complete_text(): + raise TypeError("Interface=1 Custom Lexer don't support TextSlice") + lexer_state.text = lexer_state.text + return self.lexer.lex(lexer_state, parser_state) + return CustomLexerWrapper1 + elif future_interface == 0: + class CustomLexerWrapper0(Lexer): + def __init__(self, lexer_conf): + self.lexer = lexer_class(lexer_conf) + + def lex(self, lexer_state, parser_state): + if isinstance(lexer_state.text, TextSlice): + if not lexer_state.text.is_complete_text(): + raise TypeError("Interface=0 Custom Lexer don't support TextSlice") + return self.lexer.lex(lexer_state.text.text) + return self.lexer.lex(lexer_state.text) + return CustomLexerWrapper0 + else: + raise ValueError(f"Unknown __future_interface__ value {future_interface}, integer 0-2 expected") + + +def _deserialize_parsing_frontend(data, memo, lexer_conf, callbacks, options): + parser_conf = ParserConf.deserialize(data['parser_conf'], memo) + cls = (options and options._plugins.get('LALR_Parser')) or LALR_Parser + parser = cls.deserialize(data['parser'], memo, callbacks, options.debug) + parser_conf.callbacks = callbacks + return ParsingFrontend(lexer_conf, parser_conf, options, parser=parser) + + +_parser_creators: 'Dict[str, Callable[[LexerConf, Any, Any], Any]]' = {} + + +class ParsingFrontend(Serialize): + __serialize_fields__ = 'lexer_conf', 'parser_conf', 'parser' + + lexer_conf: LexerConf + parser_conf: ParserConf + options: Any + + def __init__(self, lexer_conf: LexerConf, parser_conf: ParserConf, options, parser=None): + self.parser_conf = parser_conf + self.lexer_conf = lexer_conf + self.options = options + + ## + + if parser: ## + + self.parser = parser + else: + create_parser = _parser_creators.get(parser_conf.parser_type) + assert create_parser is not None, "{} is not supported in standalone mode".format( + parser_conf.parser_type + ) + self.parser = create_parser(lexer_conf, parser_conf, options) + + ## + + lexer_type = options.lexer if (options and options.lexer) else lexer_conf.lexer_type + self.skip_lexer = False + if lexer_type in ('dynamic', 'dynamic_complete'): + assert lexer_conf.postlex is None + self.skip_lexer = True + return + + if isinstance(lexer_type, type): + assert issubclass(lexer_type, Lexer) or hasattr(lexer_type, 'lex') + self.lexer = _wrap_lexer(lexer_type)(lexer_conf) + elif isinstance(lexer_type, str): + create_lexer = { + 'basic': create_basic_lexer, + 'contextual': create_contextual_lexer, + }[lexer_type] + self.lexer = create_lexer(lexer_conf, self.parser, lexer_conf.postlex, options) + else: + raise TypeError("Bad value for lexer_type: {lexer_type}") + + if lexer_conf.postlex: + self.lexer = PostLexConnector(self.lexer, lexer_conf.postlex) + + def _verify_start(self, start=None): + if start is None: + start_decls = self.parser_conf.start + if len(start_decls) > 1: + raise ConfigurationError("Lark initialized with more than 1 possible start rule. Must specify which start rule to parse", start_decls) + start ,= start_decls + elif start not in self.parser_conf.start: + raise ConfigurationError("Unknown start rule %s. Must be one of %r" % (start, self.parser_conf.start)) + return start + + def _make_lexer_thread(self, text: Optional[LarkInput]) -> Union[LarkInput, LexerThread, None]: + cls = (self.options and self.options._plugins.get('LexerThread')) or LexerThread + if self.skip_lexer: + return text + if text is None: + return cls(self.lexer, None) + if isinstance(text, (str, bytes, TextSlice)): + return cls.from_text(self.lexer, text) + return cls.from_custom_input(self.lexer, text) + + def parse(self, text: Optional[LarkInput], start=None, on_error=None): + if self.lexer_conf.lexer_type in ("dynamic", "dynamic_complete"): + if isinstance(text, TextSlice) and not text.is_complete_text(): + raise TypeError(f"Lexer {self.lexer_conf.lexer_type} does not support text slices.") + + chosen_start = self._verify_start(start) + kw = {} if on_error is None else {'on_error': on_error} + stream = self._make_lexer_thread(text) + return self.parser.parse(stream, chosen_start, **kw) + + def parse_interactive(self, text: Optional[TextOrSlice]=None, start=None): + ## + + ## + + chosen_start = self._verify_start(start) + if self.parser_conf.parser_type != 'lalr': + raise ConfigurationError("parse_interactive() currently only works with parser='lalr' ") + stream = self._make_lexer_thread(text) + return self.parser.parse_interactive(stream, chosen_start) + + +def _validate_frontend_args(parser, lexer) -> None: + assert_config(parser, ('lalr', 'earley', 'cyk')) + if not isinstance(lexer, type): ## + + expected = { + 'lalr': ('basic', 'contextual'), + 'earley': ('basic', 'dynamic', 'dynamic_complete'), + 'cyk': ('basic', ), + }[parser] + assert_config(lexer, expected, 'Parser %r does not support lexer %%r, expected one of %%s' % parser) + + +def _get_lexer_callbacks(transformer, terminals): + result = {} + for terminal in terminals: + callback = getattr(transformer, terminal.name, None) + if callback is not None: + result[terminal.name] = callback + return result + +class PostLexConnector: + def __init__(self, lexer, postlexer): + self.lexer = lexer + self.postlexer = postlexer + + def lex(self, lexer_state, parser_state): + i = self.lexer.lex(lexer_state, parser_state) + return self.postlexer.process(i) + + + +def create_basic_lexer(lexer_conf, parser, postlex, options) -> BasicLexer: + cls = (options and options._plugins.get('BasicLexer')) or BasicLexer + return cls(lexer_conf) + +def create_contextual_lexer(lexer_conf: LexerConf, parser, postlex, options) -> ContextualLexer: + cls = (options and options._plugins.get('ContextualLexer')) or ContextualLexer + parse_table: ParseTableBase[int] = parser._parse_table + states: Dict[int, Collection[str]] = {idx:list(t.keys()) for idx, t in parse_table.states.items()} + always_accept: Collection[str] = postlex.always_accept if postlex else () + return cls(lexer_conf, states, always_accept=always_accept) + +def create_lalr_parser(lexer_conf: LexerConf, parser_conf: ParserConf, options=None) -> LALR_Parser: + debug = options.debug if options else False + strict = options.strict if options else False + cls = (options and options._plugins.get('LALR_Parser')) or LALR_Parser + return cls(parser_conf, debug=debug, strict=strict) + +_parser_creators['lalr'] = create_lalr_parser + + + + +class PostLex(ABC): + @abstractmethod + def process(self, stream: Iterator[Token]) -> Iterator[Token]: + return stream + + always_accept: Iterable[str] = () + +class LarkOptions(Serialize): + #-- + + start: List[str] + debug: bool + strict: bool + transformer: 'Optional[Transformer]' + propagate_positions: Union[bool, str] + maybe_placeholders: bool + cache: Union[bool, str] + cache_grammar: bool + regex: bool + g_regex_flags: int + keep_all_tokens: bool + tree_class: Optional[Callable[[str, List], Any]] + parser: _ParserArgType + lexer: _LexerArgType + ambiguity: 'Literal["auto", "resolve", "explicit", "forest"]' + postlex: Optional[PostLex] + priority: 'Optional[Literal["auto", "normal", "invert"]]' + lexer_callbacks: Dict[str, Callable[[Token], Token]] + use_bytes: bool + ordered_sets: bool + edit_terminals: Optional[Callable[[TerminalDef], TerminalDef]] + import_paths: 'List[Union[str, Callable[[Union[None, str, PackageResource], str], Tuple[str, str]]]]' + source_path: Optional[str] + + OPTIONS_DOC = r""" + **=== General Options ===** + + start + The start symbol. Either a string, or a list of strings for multiple possible starts (Default: "start") + debug + Display debug information and extra warnings. Use only when debugging (Default: ``False``) + When used with Earley, it generates a forest graph as "sppf.png", if 'dot' is installed. + strict + Throw an exception on any potential ambiguity, including shift/reduce conflicts, and regex collisions. + transformer + Applies the transformer to every parse tree (equivalent to applying it after the parse, but faster) + propagate_positions + Propagates positional attributes into the 'meta' attribute of all tree branches. + Sets attributes: (line, column, end_line, end_column, start_pos, end_pos, + container_line, container_column, container_end_line, container_end_column) + Accepts ``False``, ``True``, or a callable, which will filter which nodes to ignore when propagating. + maybe_placeholders + When ``True``, the ``[]`` operator returns ``None`` when not matched. + When ``False``, ``[]`` behaves like the ``?`` operator, and returns no value at all. + (default= ``True``) + cache + Cache the results of the Lark grammar analysis, for x2 to x3 faster loading. LALR only for now. + + - When ``False``, does nothing (default) + - When ``True``, caches to a temporary file in the local directory + - When given a string, caches to the path pointed by the string + cache_grammar + For use with ``cache`` option. When ``True``, the unanalyzed grammar is also included in the cache. + Useful for classes that require the ``Lark.grammar`` to be present (e.g. Reconstructor). + (default= ``False``) + regex + When True, uses the ``regex`` module instead of the stdlib ``re``. + g_regex_flags + Flags that are applied to all terminals (both regex and strings) + keep_all_tokens + Prevent the tree builder from automagically removing "punctuation" tokens (Default: ``False``) + tree_class + Lark will produce trees comprised of instances of this class instead of the default ``lark.Tree``. + + **=== Algorithm Options ===** + + parser + Decides which parser engine to use. Accepts "earley" or "lalr". (Default: "earley"). + (there is also a "cyk" option for legacy) + lexer + Decides whether or not to use a lexer stage + + - "auto" (default): Choose for me based on the parser + - "basic": Use a basic lexer + - "contextual": Stronger lexer (only works with parser="lalr") + - "dynamic": Flexible and powerful (only with parser="earley") + - "dynamic_complete": Same as dynamic, but tries *every* variation of tokenizing possible. + ambiguity + Decides how to handle ambiguity in the parse. Only relevant if parser="earley" + + - "resolve": The parser will automatically choose the simplest derivation + (it chooses consistently: greedy for tokens, non-greedy for rules) + - "explicit": The parser will return all derivations wrapped in "_ambig" tree nodes (i.e. a forest). + - "forest": The parser will return the root of the shared packed parse forest. + + **=== Misc. / Domain Specific Options ===** + + postlex + Lexer post-processing (Default: ``None``) Only works with the basic and contextual lexers. + priority + How priorities should be evaluated - "auto", ``None``, "normal", "invert" (Default: "auto") + lexer_callbacks + Dictionary of callbacks for the lexer. May alter tokens during lexing. Use with caution. + use_bytes + Accept an input of type ``bytes`` instead of ``str``. + ordered_sets + Should Earley use ordered-sets to achieve stable output (~10% slower than regular sets. Default: True) + edit_terminals + A callback for editing the terminals before parse. + import_paths + A List of either paths or loader functions to specify from where grammars are imported + source_path + Override the source of from where the grammar was loaded. Useful for relative imports and unconventional grammar loading + **=== End of Options ===** + """ + if __doc__: + __doc__ += OPTIONS_DOC + + + ## + + ## + + ## + + ## + + ## + + ## + + _defaults: Dict[str, Any] = { + 'debug': False, + 'strict': False, + 'keep_all_tokens': False, + 'tree_class': None, + 'cache': False, + 'cache_grammar': False, + 'postlex': None, + 'parser': 'earley', + 'lexer': 'auto', + 'transformer': None, + 'start': 'start', + 'priority': 'auto', + 'ambiguity': 'auto', + 'regex': False, + 'propagate_positions': False, + 'lexer_callbacks': {}, + 'maybe_placeholders': True, + 'edit_terminals': None, + 'g_regex_flags': 0, + 'use_bytes': False, + 'ordered_sets': True, + 'import_paths': [], + 'source_path': None, + '_plugins': {}, + } + + def __init__(self, options_dict: Dict[str, Any]) -> None: + o = dict(options_dict) + + options = {} + for name, default in self._defaults.items(): + if name in o: + value = o.pop(name) + if isinstance(default, bool) and name not in ('cache', 'use_bytes', 'propagate_positions'): + value = bool(value) + else: + value = default + + options[name] = value + + if isinstance(options['start'], str): + options['start'] = [options['start']] + + self.__dict__['options'] = options + + + assert_config(self.parser, ('earley', 'lalr', 'cyk', None)) + + if self.parser == 'earley' and self.transformer: + raise ConfigurationError('Cannot specify an embedded transformer when using the Earley algorithm. ' + 'Please use your transformer on the resulting parse tree, or use a different algorithm (i.e. LALR)') + + if self.cache_grammar and not self.cache: + raise ConfigurationError('cache_grammar cannot be set when cache is disabled') + + if o: + raise ConfigurationError("Unknown options: %s" % o.keys()) + + def __getattr__(self, name: str) -> Any: + try: + return self.__dict__['options'][name] + except KeyError as e: + raise AttributeError(e) + + def __setattr__(self, name: str, value: str) -> None: + assert_config(name, self.options.keys(), "%r isn't a valid option. Expected one of: %s") + self.options[name] = value + + def serialize(self, memo = None) -> Dict[str, Any]: + return self.options + + @classmethod + def deserialize(cls, data: Dict[str, Any], memo: Dict[int, Union[TerminalDef, Rule]]) -> "LarkOptions": + return cls(data) + + +## + +## + +_LOAD_ALLOWED_OPTIONS = {'lexer', 'postlex', 'transformer', 'lexer_callbacks', 'use_bytes', 'debug', 'g_regex_flags', 'regex', 'propagate_positions', 'tree_class', '_plugins'} + +_VALID_PRIORITY_OPTIONS = ('auto', 'normal', 'invert', None) +_VALID_AMBIGUITY_OPTIONS = ('auto', 'resolve', 'explicit', 'forest') + + +_T = TypeVar('_T', bound="Lark") + +class Lark(Serialize): + #-- + + source_path: str + source_grammar: str + grammar: 'Grammar' + options: LarkOptions + lexer: Lexer + parser: 'ParsingFrontend' + terminals: Collection[TerminalDef] + + __serialize_fields__ = ['parser', 'rules', 'options'] + + def __init__(self, grammar: 'Union[Grammar, str, IO[str]]', **options) -> None: + self.options = LarkOptions(options) + re_module: types.ModuleType + + ## + + if self.options.cache_grammar: + self.__serialize_fields__ = self.__serialize_fields__ + ['grammar'] + + ## + + use_regex = self.options.regex + if use_regex: + if _has_regex: + re_module = regex + else: + raise ImportError('`regex` module must be installed if calling `Lark(regex=True)`.') + else: + re_module = re + + ## + + if self.options.source_path is None: + try: + self.source_path = grammar.name ## + + except AttributeError: + self.source_path = '' + else: + self.source_path = self.options.source_path + + ## + + try: + read = grammar.read ## + + except AttributeError: + pass + else: + grammar = read() + + cache_fn = None + cache_sha256 = None + if isinstance(grammar, str): + self.source_grammar = grammar + if self.options.use_bytes: + if not grammar.isascii(): + raise ConfigurationError("Grammar must be ascii only, when use_bytes=True") + + if self.options.cache: + if self.options.parser != 'lalr': + raise ConfigurationError("cache only works with parser='lalr' for now") + + unhashable = ('transformer', 'postlex', 'lexer_callbacks', 'edit_terminals', '_plugins') + options_str = ''.join(k+str(v) for k, v in options.items() if k not in unhashable) + from . import __version__ + s = grammar + options_str + __version__ + str(sys.version_info[:2]) + cache_sha256 = sha256_digest(s) + + if isinstance(self.options.cache, str): + cache_fn = self.options.cache + else: + if self.options.cache is not True: + raise ConfigurationError("cache argument must be bool or str") + + try: + username = getpass.getuser() + except Exception: + ## + + ## + + ## + + username = "unknown" + + + cache_fn = tempfile.gettempdir() + "/.lark_%s_%s_%s_%s_%s.tmp" % ( + "cache_grammar" if self.options.cache_grammar else "cache", username, cache_sha256, *sys.version_info[:2]) + + old_options = self.options + try: + with FS.open(cache_fn, 'rb') as f: + logger.debug('Loading grammar from cache: %s', cache_fn) + ## + + for name in (set(options) - _LOAD_ALLOWED_OPTIONS): + del options[name] + file_sha256 = f.readline().rstrip(b'\n') + cached_used_files = pickle.load(f) + if file_sha256 == cache_sha256.encode('utf8') and verify_used_files(cached_used_files): + cached_parser_data = pickle.load(f) + self._load(cached_parser_data, **options) + return + except FileNotFoundError: + ## + + pass + except Exception: ## + + logger.exception("Failed to load Lark from cache: %r. We will try to carry on.", cache_fn) + + ## + + ## + + self.options = old_options + + + ## + + self.grammar, used_files = load_grammar(grammar, self.source_path, self.options.import_paths, self.options.keep_all_tokens) + else: + assert isinstance(grammar, Grammar) + self.grammar = grammar + + + if self.options.lexer == 'auto': + if self.options.parser == 'lalr': + self.options.lexer = 'contextual' + elif self.options.parser == 'earley': + if self.options.postlex is not None: + logger.info("postlex can't be used with the dynamic lexer, so we use 'basic' instead. " + "Consider using lalr with contextual instead of earley") + self.options.lexer = 'basic' + else: + self.options.lexer = 'dynamic' + elif self.options.parser == 'cyk': + self.options.lexer = 'basic' + else: + assert False, self.options.parser + lexer = self.options.lexer + if isinstance(lexer, type): + assert issubclass(lexer, Lexer) ## + + else: + assert_config(lexer, ('basic', 'contextual', 'dynamic', 'dynamic_complete')) + if self.options.postlex is not None and 'dynamic' in lexer: + raise ConfigurationError("Can't use postlex with a dynamic lexer. Use basic or contextual instead") + + if self.options.ambiguity == 'auto': + if self.options.parser == 'earley': + self.options.ambiguity = 'resolve' + else: + assert_config(self.options.parser, ('earley', 'cyk'), "%r doesn't support disambiguation. Use one of these parsers instead: %s") + + if self.options.priority == 'auto': + self.options.priority = 'normal' + + if self.options.priority not in _VALID_PRIORITY_OPTIONS: + raise ConfigurationError("invalid priority option: %r. Must be one of %r" % (self.options.priority, _VALID_PRIORITY_OPTIONS)) + if self.options.ambiguity not in _VALID_AMBIGUITY_OPTIONS: + raise ConfigurationError("invalid ambiguity option: %r. Must be one of %r" % (self.options.ambiguity, _VALID_AMBIGUITY_OPTIONS)) + + if self.options.parser is None: + terminals_to_keep = '*' ## + + elif self.options.postlex is not None: + terminals_to_keep = set(self.options.postlex.always_accept) + else: + terminals_to_keep = set() + + ## + + self.terminals, self.rules, self.ignore_tokens = self.grammar.compile(self.options.start, terminals_to_keep) + + if self.options.edit_terminals: + for t in self.terminals: + self.options.edit_terminals(t) + + self._terminals_dict = {t.name: t for t in self.terminals} + + ## + + if self.options.priority == 'invert': + for rule in self.rules: + if rule.options.priority is not None: + rule.options.priority = -rule.options.priority + for term in self.terminals: + term.priority = -term.priority + ## + + ## + + ## + + elif self.options.priority is None: + for rule in self.rules: + if rule.options.priority is not None: + rule.options.priority = None + for term in self.terminals: + term.priority = 0 + + ## + + self.lexer_conf = LexerConf( + self.terminals, re_module, self.ignore_tokens, self.options.postlex, + self.options.lexer_callbacks, self.options.g_regex_flags, use_bytes=self.options.use_bytes, strict=self.options.strict + ) + + if self.options.parser: + self.parser = self._build_parser() + elif lexer: + self.lexer = self._build_lexer() + + if cache_fn: + logger.debug('Saving grammar to cache: %s', cache_fn) + try: + with FS.open(cache_fn, 'wb') as f: + assert cache_sha256 is not None + f.write(cache_sha256.encode('utf8') + b'\n') + pickle.dump(used_files, f) + self.save(f, _LOAD_ALLOWED_OPTIONS) + except IOError as e: + logger.exception("Failed to save Lark to cache: %r.", cache_fn, e) + + if __doc__: + __doc__ += "\n\n" + LarkOptions.OPTIONS_DOC + + def _build_lexer(self, dont_ignore: bool=False) -> BasicLexer: + lexer_conf = self.lexer_conf + if dont_ignore: + from copy import copy + lexer_conf = copy(lexer_conf) + lexer_conf.ignore = () + return BasicLexer(lexer_conf) + + def _prepare_callbacks(self) -> None: + self._callbacks = {} + ## + + if self.options.ambiguity != 'forest': + self._parse_tree_builder = ParseTreeBuilder( + self.rules, + self.options.tree_class or Tree, + self.options.propagate_positions, + self.options.parser != 'lalr' and self.options.ambiguity == 'explicit', + self.options.maybe_placeholders + ) + self._callbacks = self._parse_tree_builder.create_callback(self.options.transformer) + self._callbacks.update(_get_lexer_callbacks(self.options.transformer, self.terminals)) + + def _build_parser(self) -> "ParsingFrontend": + self._prepare_callbacks() + _validate_frontend_args(self.options.parser, self.options.lexer) + parser_conf = ParserConf(self.rules, self._callbacks, self.options.start) + return _construct_parsing_frontend( + self.options.parser, + self.options.lexer, + self.lexer_conf, + parser_conf, + options=self.options + ) + + def save(self, f, exclude_options: Collection[str] = ()) -> None: + #-- + if self.options.parser != 'lalr': + raise NotImplementedError("Lark.save() is only implemented for the LALR(1) parser.") + data, m = self.memo_serialize([TerminalDef, Rule]) + if exclude_options: + data["options"] = {n: v for n, v in data["options"].items() if n not in exclude_options} + pickle.dump({'data': data, 'memo': m}, f, protocol=pickle.HIGHEST_PROTOCOL) + + @classmethod + def load(cls: Type[_T], f) -> _T: + #-- + inst = cls.__new__(cls) + return inst._load(f) + + def _deserialize_lexer_conf(self, data: Dict[str, Any], memo: Dict[int, Union[TerminalDef, Rule]], options: LarkOptions) -> LexerConf: + lexer_conf = LexerConf.deserialize(data['lexer_conf'], memo) + lexer_conf.callbacks = options.lexer_callbacks or {} + lexer_conf.re_module = regex if options.regex else re + lexer_conf.use_bytes = options.use_bytes + lexer_conf.g_regex_flags = options.g_regex_flags + lexer_conf.skip_validation = True + lexer_conf.postlex = options.postlex + return lexer_conf + + def _load(self: _T, f: Any, **kwargs) -> _T: + if isinstance(f, dict): + d = f + else: + d = pickle.load(f) + memo_json = d['memo'] + data = d['data'] + + assert memo_json + memo = SerializeMemoizer.deserialize(memo_json, {'Rule': Rule, 'TerminalDef': TerminalDef}, {}) + if 'grammar' in data: + self.grammar = Grammar.deserialize(data['grammar'], memo) + options = dict(data['options']) + if (set(kwargs) - _LOAD_ALLOWED_OPTIONS) & set(LarkOptions._defaults): + raise ConfigurationError("Some options are not allowed when loading a Parser: {}" + .format(set(kwargs) - _LOAD_ALLOWED_OPTIONS)) + options.update(kwargs) + self.options = LarkOptions.deserialize(options, memo) + self.rules = [Rule.deserialize(r, memo) for r in data['rules']] + self.source_path = '' + _validate_frontend_args(self.options.parser, self.options.lexer) + self.lexer_conf = self._deserialize_lexer_conf(data['parser'], memo, self.options) + self.terminals = self.lexer_conf.terminals + self._prepare_callbacks() + self._terminals_dict = {t.name: t for t in self.terminals} + self.parser = _deserialize_parsing_frontend( + data['parser'], + memo, + self.lexer_conf, + self._callbacks, + self.options, ## + + ) + return self + + @classmethod + def _load_from_dict(cls, data, memo, **kwargs): + inst = cls.__new__(cls) + return inst._load({'data': data, 'memo': memo}, **kwargs) + + @classmethod + def open(cls: Type[_T], grammar_filename: str, rel_to: Optional[str]=None, **options) -> _T: + #-- + if rel_to: + basepath = os.path.dirname(rel_to) + grammar_filename = os.path.join(basepath, grammar_filename) + with open(grammar_filename, encoding='utf8') as f: + return cls(f, **options) + + @classmethod + def open_from_package(cls: Type[_T], package: str, grammar_path: str, search_paths: 'Sequence[str]'=[""], **options) -> _T: + #-- + package_loader = FromPackageLoader(package, search_paths) + full_path, text = package_loader(None, grammar_path) + options.setdefault('source_path', full_path) + options.setdefault('import_paths', []) + options['import_paths'].append(package_loader) + return cls(text, **options) + + def __repr__(self): + return 'Lark(open(%r), parser=%r, lexer=%r, ...)' % (self.source_path, self.options.parser, self.options.lexer) + + + def lex(self, text: TextOrSlice, dont_ignore: bool=False) -> Iterator[Token]: + #-- + lexer: Lexer + if not hasattr(self, 'lexer') or dont_ignore: + lexer = self._build_lexer(dont_ignore) + else: + lexer = self.lexer + lexer_thread = LexerThread.from_text(lexer, text) + stream = lexer_thread.lex(None) + if self.options.postlex: + return self.options.postlex.process(stream) + return stream + + def get_terminal(self, name: str) -> TerminalDef: + #-- + return self._terminals_dict[name] + + def parse_interactive(self, text: Optional[LarkInput]=None, start: Optional[str]=None) -> 'InteractiveParser': + #-- + return self.parser.parse_interactive(text, start=start) + + def parse(self, text: LarkInput, start: Optional[str]=None, on_error: 'Optional[Callable[[UnexpectedInput], bool]]'=None) -> 'ParseTree': + #-- + if on_error is not None and self.options.parser != 'lalr': + raise NotImplementedError("The on_error option is only implemented for the LALR(1) parser.") + return self.parser.parse(text, start=start, on_error=on_error) + + + + +class DedentError(LarkError): + pass + +class Indenter(PostLex, ABC): + #-- + paren_level: int + indent_level: List[int] + + def __init__(self) -> None: + self.paren_level = 0 + self.indent_level = [0] + assert self.tab_len > 0 + + def handle_NL(self, token: Token) -> Iterator[Token]: + if self.paren_level > 0: + return + + yield token + + indent_str = token.rsplit('\n', 1)[1] ## + + indent = indent_str.count(' ') + indent_str.count('\t') * self.tab_len + + if indent > self.indent_level[-1]: + self.indent_level.append(indent) + yield Token.new_borrow_pos(self.INDENT_type, indent_str, token) + else: + while indent < self.indent_level[-1]: + self.indent_level.pop() + yield Token.new_borrow_pos(self.DEDENT_type, indent_str, token) + + if indent != self.indent_level[-1]: + raise DedentError('Unexpected dedent to column %s. Expected dedent to %s' % (indent, self.indent_level[-1])) + + def _process(self, stream): + token = None + for token in stream: + if token.type == self.NL_type: + yield from self.handle_NL(token) + else: + yield token + + if token.type in self.OPEN_PAREN_types: + self.paren_level += 1 + elif token.type in self.CLOSE_PAREN_types: + self.paren_level -= 1 + assert self.paren_level >= 0 + + while len(self.indent_level) > 1: + self.indent_level.pop() + yield Token.new_borrow_pos(self.DEDENT_type, '', token) if token else Token(self.DEDENT_type, '', 0, 0, 0, 0, 0, 0) + + assert self.indent_level == [0], self.indent_level + + def process(self, stream): + self.paren_level = 0 + self.indent_level = [0] + return self._process(stream) + + ## + + @property + def always_accept(self): + return (self.NL_type,) + + @property + @abstractmethod + def NL_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def OPEN_PAREN_types(self) -> List[str]: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def CLOSE_PAREN_types(self) -> List[str]: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def INDENT_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def DEDENT_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def tab_len(self) -> int: + #-- + raise NotImplementedError() + + +class PythonIndenter(Indenter): + #-- + + NL_type = '_NEWLINE' + OPEN_PAREN_types = ['LPAR', 'LSQB', 'LBRACE'] + CLOSE_PAREN_types = ['RPAR', 'RSQB', 'RBRACE'] + INDENT_type = '_INDENT' + DEDENT_type = '_DEDENT' + tab_len = 8 + + +import pickle, zlib, base64 +DATA = ( +{'parser': {'lexer_conf': {'terminals': [], 'ignore': [], 'g_regex_flags': 0, 'use_bytes': False, 'lexer_type': 'contextual', '__type__': 'LexerConf'}, 'parser_conf': {'rules': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}, {'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}, {'@': 107}, {'@': 108}, {'@': 109}, {'@': 110}, {'@': 111}, {'@': 112}, {'@': 113}, {'@': 114}, {'@': 115}, {'@': 116}, {'@': 117}, {'@': 118}, {'@': 119}, {'@': 120}, {'@': 121}, {'@': 122}, {'@': 123}, {'@': 124}, {'@': 125}, {'@': 126}, {'@': 127}, {'@': 128}, {'@': 129}, {'@': 130}, {'@': 131}, {'@': 132}, {'@': 133}, {'@': 134}, {'@': 135}, {'@': 136}, {'@': 137}, {'@': 138}, {'@': 139}, {'@': 140}, {'@': 141}, {'@': 142}, {'@': 143}, {'@': 144}, {'@': 145}, {'@': 146}, {'@': 147}, {'@': 148}, {'@': 149}, {'@': 150}, {'@': 151}, {'@': 152}, {'@': 153}, {'@': 154}, {'@': 155}, {'@': 156}, {'@': 157}, {'@': 158}, {'@': 159}, {'@': 160}, {'@': 161}, {'@': 162}, {'@': 163}, {'@': 164}, {'@': 165}, {'@': 166}, {'@': 167}, {'@': 168}, {'@': 169}, {'@': 170}, {'@': 171}, {'@': 172}, {'@': 173}, {'@': 174}, {'@': 175}, {'@': 176}, {'@': 177}, {'@': 178}, {'@': 179}, {'@': 180}, {'@': 181}, {'@': 182}, {'@': 183}, {'@': 184}, {'@': 185}, {'@': 186}, {'@': 187}, {'@': 188}, {'@': 189}, {'@': 190}, {'@': 191}, {'@': 192}, {'@': 193}, {'@': 194}, {'@': 195}, {'@': 196}, {'@': 197}, {'@': 198}, {'@': 199}, {'@': 200}, {'@': 201}, {'@': 202}, {'@': 203}, {'@': 204}, {'@': 205}, {'@': 206}, {'@': 207}, {'@': 208}, {'@': 209}, {'@': 210}, {'@': 211}, {'@': 212}, {'@': 213}, {'@': 214}, {'@': 215}, {'@': 216}, {'@': 217}, {'@': 218}, {'@': 219}, {'@': 220}, {'@': 221}, {'@': 222}, {'@': 223}, {'@': 224}, {'@': 225}, {'@': 226}, {'@': 227}, {'@': 228}, {'@': 229}, {'@': 230}, {'@': 231}, {'@': 232}, {'@': 233}, {'@': 234}, {'@': 235}, {'@': 236}, {'@': 237}, {'@': 238}, {'@': 239}, {'@': 240}, {'@': 241}, {'@': 242}, {'@': 243}, {'@': 244}, {'@': 245}, {'@': 246}, {'@': 247}, {'@': 248}, {'@': 249}, {'@': 250}, {'@': 251}, {'@': 252}, {'@': 253}, {'@': 254}, {'@': 255}, {'@': 256}, {'@': 257}, {'@': 258}, {'@': 259}, {'@': 260}, {'@': 261}, {'@': 262}, {'@': 263}, {'@': 264}, {'@': 265}, {'@': 266}, {'@': 267}, {'@': 268}, {'@': 269}, {'@': 270}, {'@': 271}, {'@': 272}, {'@': 273}, {'@': 274}, {'@': 275}, {'@': 276}, {'@': 277}, {'@': 278}, {'@': 279}, {'@': 280}, {'@': 281}, {'@': 282}, {'@': 283}, {'@': 284}, {'@': 285}, {'@': 286}, {'@': 287}, {'@': 288}, {'@': 289}, {'@': 290}, {'@': 291}, {'@': 292}, {'@': 293}, {'@': 294}, {'@': 295}, {'@': 296}, {'@': 297}, {'@': 298}, {'@': 299}, {'@': 300}, {'@': 301}, {'@': 302}, {'@': 303}, {'@': 304}, {'@': 305}, {'@': 306}, {'@': 307}, {'@': 308}, {'@': 309}, {'@': 310}, {'@': 311}, {'@': 312}, {'@': 313}, {'@': 314}, {'@': 315}, {'@': 316}, {'@': 317}, {'@': 318}, {'@': 319}, {'@': 320}, {'@': 321}, {'@': 322}, {'@': 323}, {'@': 324}, {'@': 325}, {'@': 326}, {'@': 327}, {'@': 328}, {'@': 329}, {'@': 330}, {'@': 331}, {'@': 332}, {'@': 333}, {'@': 334}, {'@': 335}, {'@': 336}, {'@': 337}, {'@': 338}, {'@': 339}, {'@': 340}, {'@': 341}, {'@': 342}, {'@': 343}, {'@': 344}, {'@': 345}, {'@': 346}, {'@': 347}, {'@': 348}, {'@': 349}, {'@': 350}, {'@': 351}, {'@': 352}, {'@': 353}, {'@': 354}, {'@': 355}, {'@': 356}, {'@': 357}, {'@': 358}, {'@': 359}, {'@': 360}, {'@': 361}, {'@': 362}, {'@': 363}, {'@': 364}, {'@': 365}, {'@': 366}, {'@': 367}, {'@': 368}, {'@': 369}, {'@': 370}, {'@': 371}, {'@': 372}, {'@': 373}, {'@': 374}, {'@': 375}, {'@': 376}, {'@': 377}], 'start': ['start'], 'parser_type': 'lalr', '__type__': 'ParserConf'}, 'parser': {'tokens': {0: 'reg8_i', 1: 'expr_bitwise_operand', 2: 'LB', 3: 'INTEGER', 4: 'R', 5: 'LP', 6: 'expr_unary_operand', 7: 'IXH', 8: 'expr_mul', 9: 'reg8i', 10: 'pexpr', 11: 'I', 12: 'expr_unary', 13: 'MINUS', 14: 'PLUS', 15: 'expr_atom', 16: 'reg8', 17: 'expr_add', 18: 'expr_pow', 19: 'IYL', 20: 'expr_add_operand', 21: 'LPP', 22: 'expr', 23: 'IXL', 24: 'L', 25: 'E', 26: 'B', 27: 'ID', 28: 'ADDR', 29: 'IYH', 30: 'mem_indir', 31: 'H', 32: 'A', 33: 'D', 34: 'expr_mul_operand', 35: 'expr_bitwise', 36: 'reg8_hl', 37: 'reg_bcde', 38: 'C', 39: 'DE', 40: 'CO', 41: 'NEWLINE', 42: 'COMMA', 43: 'jr_flags', 44: 'PE', 45: 'NZ', 46: 'M', 47: 'Z', 48: 'PO', 49: 'jp_flags', 50: 'NC', 51: 'P', 52: 'HL', 53: 'IY', 54: 'reg16', 55: 'inc_reg', 56: 'IX', 57: 'reg16i', 58: 'BC', 59: 'SP', 60: 'number_list', 61: 'STRING', 62: 'LD', 63: 'BIT', 64: 'HALT', 65: 'MUL', 66: 'SET', 67: 'RR', 68: 'ORG', 69: 'LOCAL', 70: 'SWAPNIB', 71: 'ENDP', 72: 'EX', 73: 'SRA', 74: 'RETI', 75: 'OTDR', 76: 'RL', 77: 'BSRA', 78: 'OR', 79: 'TEST', 80: 'DEFS', 81: 'ADC', 82: 'CALL', 83: 'DAA', 84: 'CPL', 85: 'INI', 86: 'LDWS', 87: 'INIR', 88: 'LDDR', 89: 'SCF', 90: 'NOP', 91: '$END', 92: 'LDDRX', 93: 'RRC', 94: 'ALIGN', 95: 'EXX', 96: 'CPDR', 97: 'POP', 98: 'RET', 99: 'BSLA', 100: 'JR', 101: 'SUB', 102: 'DEC', 103: 'DJNZ', 104: 'JP', 105: 'SETAE', 106: 'INC', 107: 'CP', 108: 'OTIR', 109: 'BSRL', 110: 'BSRF', 111: 'INDR', 112: 'XOR', 113: 'CPI', 114: 'IM', 115: 'AND', 116: 'IND', 117: 'SBC', 118: 'LDIR', 119: 'RRCA', 120: 'RRA', 121: 'NAMESPACE', 122: 'RLC', 123: 'NEXTREG', 124: 'LDI', 125: 'PIXELAD', 126: 'ADD', 127: 'END', 128: '_INIT', 129: 'CPIR', 130: 'PIXELDN', 131: 'SLA', 132: 'IN', 133: 'LDD', 134: 'RRD', 135: 'LDIRX', 136: 'RLA', 137: 'EI', 138: 'LDDX', 139: 'RST', 140: 'RLD', 141: 'DEFB', 142: 'RLCA', 143: 'MIRROR', 144: 'LDIX', 145: 'NEG', 146: 'OUTINB', 147: 'SLL', 148: 'BRLC', 149: 'CPD', 150: 'PROC', 151: 'OUTI', 152: 'LDPIRX', 153: 'CCF', 154: 'RES', 155: 'DEFW', 156: 'OUTD', 157: 'OUT', 158: 'RETN', 159: 'PUSH', 160: 'SRL', 161: 'INCBIN', 162: 'DI', 163: 'EQU', 164: 'rotation', 165: 'bitwiseop', 166: 'bitop', 167: 'asm', 168: 'BAND', 169: 'RSHIFT', 170: 'BOR', 171: 'BXOR', 172: 'LSHIFT', 173: 'POW', 174: 'MOD', 175: 'DIV', 176: 'RB', 177: 'AF', 178: 'RP', 179: 'expr_list', 180: 'RPP', 181: 'endline', 182: 'line', 183: 'asms', 184: 'preproc_line', 185: 'expr_pow_operand', 186: 'id_list', 187: 'APO', 188: 'program', 189: 'start'}, 'states': {0: {0: (0, 124), 1: (0, 111), 2: (0, 267), 3: (0, 587), 4: (0, 339), 5: (0, 350), 6: (0, 581), 7: (0, 317), 8: (0, 529), 9: (0, 375), 10: (0, 371), 11: (0, 377), 12: (0, 248), 13: (0, 535), 14: (0, 431), 15: (0, 226), 16: (0, 379), 17: (0, 211), 18: (0, 192), 19: (0, 365), 20: (0, 414), 21: (0, 186), 22: (0, 366), 23: (0, 352), 24: (0, 564), 25: (0, 485), 26: (0, 518), 27: (0, 417), 28: (0, 302), 29: (0, 311), 30: (0, 390), 31: (0, 565), 32: (0, 345), 33: (0, 602), 34: (0, 511), 35: (0, 347), 36: (0, 398), 37: (0, 402), 38: (0, 592)}, 1: {39: (0, 329)}, 2: {40: (1, {'@': 62}), 41: (1, {'@': 62})}, 3: {40: (1, {'@': 217}), 41: (1, {'@': 217})}, 4: {39: (0, 606)}, 5: {40: (1, {'@': 199}), 41: (1, {'@': 199})}, 6: {1: (0, 111), 3: (0, 587), 6: (0, 581), 22: (0, 539), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 519), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 7: {42: (0, 325)}, 8: {40: (1, {'@': 235}), 41: (1, {'@': 235})}, 9: {3: (1, {'@': 295}), 23: (1, {'@': 295}), 19: (1, {'@': 295}), 2: (1, {'@': 295}), 25: (1, {'@': 295}), 31: (1, {'@': 295}), 32: (1, {'@': 295}), 38: (1, {'@': 295}), 27: (1, {'@': 295}), 33: (1, {'@': 295}), 14: (1, {'@': 295}), 5: (1, {'@': 295}), 29: (1, {'@': 295}), 24: (1, {'@': 295}), 7: (1, {'@': 295}), 21: (1, {'@': 295}), 26: (1, {'@': 295}), 28: (1, {'@': 295}), 13: (1, {'@': 295})}, 10: {40: (1, {'@': 237}), 41: (1, {'@': 237})}, 11: {3: (1, {'@': 292}), 23: (1, {'@': 292}), 19: (1, {'@': 292}), 2: (1, {'@': 292}), 25: (1, {'@': 292}), 31: (1, {'@': 292}), 32: (1, {'@': 292}), 38: (1, {'@': 292}), 27: (1, {'@': 292}), 33: (1, {'@': 292}), 14: (1, {'@': 292}), 5: (1, {'@': 292}), 29: (1, {'@': 292}), 24: (1, {'@': 292}), 7: (1, {'@': 292}), 21: (1, {'@': 292}), 26: (1, {'@': 292}), 28: (1, {'@': 292}), 13: (1, {'@': 292})}, 12: {40: (1, {'@': 229}), 41: (1, {'@': 229})}, 13: {24: (1, {'@': 306}), 33: (1, {'@': 306}), 32: (1, {'@': 306}), 2: (1, {'@': 306}), 26: (1, {'@': 306}), 25: (1, {'@': 306}), 38: (1, {'@': 306}), 31: (1, {'@': 306}), 5: (1, {'@': 306})}, 14: {36: (0, 430), 2: (0, 443), 1: (0, 111), 3: (0, 587), 6: (0, 581), 43: (0, 318), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 22: (0, 474), 18: (0, 192), 20: (0, 414), 10: (0, 397), 5: (0, 538), 21: (0, 186), 44: (0, 129), 45: (0, 387), 46: (0, 132), 27: (0, 417), 38: (0, 123), 47: (0, 79), 28: (0, 302), 17: (0, 211), 34: (0, 511), 48: (0, 353), 49: (0, 534), 35: (0, 347), 50: (0, 542), 51: (0, 341)}, 15: {40: (1, {'@': 204}), 41: (1, {'@': 204})}, 16: {2: (0, 537), 5: (0, 590), 52: (0, 541), 7: (0, 317), 53: (0, 577), 19: (0, 365), 54: (0, 399), 38: (0, 592), 55: (0, 505), 9: (0, 451), 23: (0, 352), 24: (0, 564), 25: (0, 485), 26: (0, 518), 56: (0, 463), 36: (0, 300), 29: (0, 311), 32: (0, 238), 16: (0, 437), 0: (0, 400), 31: (0, 565), 39: (0, 470), 57: (0, 558), 58: (0, 524), 33: (0, 602), 37: (0, 402), 59: (0, 449)}, 17: {40: (1, {'@': 65}), 41: (1, {'@': 65})}, 18: {40: (1, {'@': 234}), 41: (1, {'@': 234})}, 19: {40: (1, {'@': 20}), 41: (1, {'@': 20})}, 20: {3: (1, {'@': 296}), 23: (1, {'@': 296}), 19: (1, {'@': 296}), 2: (1, {'@': 296}), 25: (1, {'@': 296}), 31: (1, {'@': 296}), 32: (1, {'@': 296}), 38: (1, {'@': 296}), 27: (1, {'@': 296}), 33: (1, {'@': 296}), 14: (1, {'@': 296}), 5: (1, {'@': 296}), 29: (1, {'@': 296}), 24: (1, {'@': 296}), 7: (1, {'@': 296}), 21: (1, {'@': 296}), 26: (1, {'@': 296}), 28: (1, {'@': 296}), 13: (1, {'@': 296})}, 21: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 60: (0, 204), 12: (0, 248), 14: (0, 431), 15: (0, 226), 22: (0, 493), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 464), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 22: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 22: (0, 471), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 507), 27: (0, 417), 28: (0, 302), 5: (0, 373), 41: (0, 597), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 23: {40: (1, {'@': 196}), 41: (1, {'@': 196})}, 24: {39: (0, 158)}, 25: {3: (1, {'@': 299}), 27: (1, {'@': 299}), 14: (1, {'@': 299}), 21: (1, {'@': 299}), 28: (1, {'@': 299}), 13: (1, {'@': 299}), 5: (1, {'@': 299})}, 26: {40: (1, {'@': 49}), 41: (1, {'@': 49})}, 27: {40: (1, {'@': 223}), 41: (1, {'@': 223})}, 28: {40: (1, {'@': 208}), 41: (1, {'@': 208})}, 29: {40: (1, {'@': 17}), 41: (1, {'@': 17})}, 30: {24: (1, {'@': 300}), 33: (1, {'@': 300}), 32: (1, {'@': 300}), 2: (1, {'@': 300}), 26: (1, {'@': 300}), 25: (1, {'@': 300}), 38: (1, {'@': 300}), 31: (1, {'@': 300}), 5: (1, {'@': 300})}, 31: {24: (1, {'@': 305}), 33: (1, {'@': 305}), 32: (1, {'@': 305}), 2: (1, {'@': 305}), 26: (1, {'@': 305}), 25: (1, {'@': 305}), 38: (1, {'@': 305}), 31: (1, {'@': 305}), 5: (1, {'@': 305})}, 32: {61: (0, 452)}, 33: {40: (1, {'@': 206}), 41: (1, {'@': 206})}, 34: {62: (1, {'@': 8}), 63: (1, {'@': 8}), 64: (1, {'@': 8}), 65: (1, {'@': 8}), 66: (1, {'@': 8}), 67: (1, {'@': 8}), 68: (1, {'@': 8}), 69: (1, {'@': 8}), 70: (1, {'@': 8}), 71: (1, {'@': 8}), 72: (1, {'@': 8}), 73: (1, {'@': 8}), 74: (1, {'@': 8}), 75: (1, {'@': 8}), 76: (1, {'@': 8}), 27: (1, {'@': 8}), 77: (1, {'@': 8}), 78: (1, {'@': 8}), 79: (1, {'@': 8}), 80: (1, {'@': 8}), 81: (1, {'@': 8}), 82: (1, {'@': 8}), 83: (1, {'@': 8}), 84: (1, {'@': 8}), 85: (1, {'@': 8}), 86: (1, {'@': 8}), 87: (1, {'@': 8}), 88: (1, {'@': 8}), 89: (1, {'@': 8}), 90: (1, {'@': 8}), 91: (1, {'@': 8}), 92: (1, {'@': 8}), 93: (1, {'@': 8}), 94: (1, {'@': 8}), 95: (1, {'@': 8}), 96: (1, {'@': 8}), 97: (1, {'@': 8}), 98: (1, {'@': 8}), 99: (1, {'@': 8}), 100: (1, {'@': 8}), 101: (1, {'@': 8}), 102: (1, {'@': 8}), 40: (1, {'@': 8}), 103: (1, {'@': 8}), 104: (1, {'@': 8}), 105: (1, {'@': 8}), 106: (1, {'@': 8}), 107: (1, {'@': 8}), 108: (1, {'@': 8}), 109: (1, {'@': 8}), 110: (1, {'@': 8}), 111: (1, {'@': 8}), 112: (1, {'@': 8}), 113: (1, {'@': 8}), 3: (1, {'@': 8}), 114: (1, {'@': 8}), 115: (1, {'@': 8}), 116: (1, {'@': 8}), 117: (1, {'@': 8}), 118: (1, {'@': 8}), 119: (1, {'@': 8}), 120: (1, {'@': 8}), 121: (1, {'@': 8}), 122: (1, {'@': 8}), 123: (1, {'@': 8}), 124: (1, {'@': 8}), 125: (1, {'@': 8}), 126: (1, {'@': 8}), 127: (1, {'@': 8}), 128: (1, {'@': 8}), 129: (1, {'@': 8}), 130: (1, {'@': 8}), 131: (1, {'@': 8}), 132: (1, {'@': 8}), 133: (1, {'@': 8}), 134: (1, {'@': 8}), 135: (1, {'@': 8}), 136: (1, {'@': 8}), 137: (1, {'@': 8}), 138: (1, {'@': 8}), 139: (1, {'@': 8}), 140: (1, {'@': 8}), 141: (1, {'@': 8}), 142: (1, {'@': 8}), 143: (1, {'@': 8}), 144: (1, {'@': 8}), 145: (1, {'@': 8}), 146: (1, {'@': 8}), 147: (1, {'@': 8}), 148: (1, {'@': 8}), 149: (1, {'@': 8}), 41: (1, {'@': 8}), 150: (1, {'@': 8}), 151: (1, {'@': 8}), 152: (1, {'@': 8}), 153: (1, {'@': 8}), 154: (1, {'@': 8}), 155: (1, {'@': 8}), 156: (1, {'@': 8}), 157: (1, {'@': 8}), 158: (1, {'@': 8}), 159: (1, {'@': 8}), 160: (1, {'@': 8}), 161: (1, {'@': 8}), 162: (1, {'@': 8})}, 35: {40: (1, {'@': 203}), 41: (1, {'@': 203})}, 36: {40: (1, {'@': 215}), 41: (1, {'@': 215})}, 37: {40: (1, {'@': 238}), 41: (1, {'@': 238})}, 38: {33: (0, 508)}, 39: {40: (1, {'@': 202}), 41: (1, {'@': 202})}, 40: {61: (0, 496)}, 41: {}, 42: {40: (1, {'@': 193}), 41: (1, {'@': 193})}, 43: {40: (1, {'@': 233}), 41: (1, {'@': 233})}, 44: {163: (0, 148), 40: (1, {'@': 19}), 41: (1, {'@': 19})}, 45: {40: (1, {'@': 216}), 41: (1, {'@': 216})}, 46: {40: (1, {'@': 220}), 41: (1, {'@': 220})}, 47: {40: (1, {'@': 228}), 41: (1, {'@': 228})}, 48: {3: (1, {'@': 294}), 23: (1, {'@': 294}), 19: (1, {'@': 294}), 2: (1, {'@': 294}), 25: (1, {'@': 294}), 31: (1, {'@': 294}), 32: (1, {'@': 294}), 38: (1, {'@': 294}), 27: (1, {'@': 294}), 33: (1, {'@': 294}), 14: (1, {'@': 294}), 5: (1, {'@': 294}), 29: (1, {'@': 294}), 24: (1, {'@': 294}), 7: (1, {'@': 294}), 21: (1, {'@': 294}), 26: (1, {'@': 294}), 28: (1, {'@': 294}), 13: (1, {'@': 294})}, 49: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 60: (0, 490), 12: (0, 248), 14: (0, 431), 15: (0, 226), 22: (0, 493), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 464), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 50: {40: (1, {'@': 210}), 41: (1, {'@': 210})}, 51: {40: (1, {'@': 64}), 41: (1, {'@': 64})}, 52: {39: (0, 7)}, 53: {40: (1, {'@': 209}), 41: (1, {'@': 209})}, 54: {40: (1, {'@': 219}), 41: (1, {'@': 219})}, 55: {40: (1, {'@': 224}), 41: (1, {'@': 224})}, 56: {62: (0, 556), 164: (0, 460), 121: (0, 499), 117: (0, 472), 100: (0, 78), 123: (0, 276), 74: (0, 54), 126: (0, 58), 165: (0, 469), 92: (0, 551), 166: (0, 548), 97: (0, 334), 154: (0, 309), 157: (0, 446), 160: (0, 514), 108: (0, 523), 139: (0, 461), 142: (0, 244), 143: (0, 386), 136: (0, 155), 79: (0, 284), 132: (0, 532), 135: (0, 448), 114: (0, 344), 93: (0, 185), 116: (0, 161), 81: (0, 107), 88: (0, 143), 159: (0, 322), 150: (0, 83), 89: (0, 252), 122: (0, 427), 69: (0, 441), 145: (0, 166), 129: (0, 210), 109: (0, 235), 82: (0, 259), 101: (0, 9), 77: (0, 1), 95: (0, 42), 104: (0, 14), 102: (0, 75), 113: (0, 97), 64: (0, 120), 131: (0, 86), 72: (0, 90), 151: (0, 94), 141: (0, 103), 103: (0, 115), 153: (0, 67), 147: (0, 31), 68: (0, 6), 138: (0, 57), 140: (0, 64), 105: (0, 62), 111: (0, 45), 94: (0, 61), 137: (0, 28), 85: (0, 36), 99: (0, 52), 107: (0, 20), 87: (0, 3), 86: (0, 12), 80: (0, 21), 167: (0, 408), 83: (0, 15), 110: (0, 4), 70: (0, 8), 133: (0, 5), 130: (0, 10), 73: (0, 13), 124: (0, 66), 148: (0, 24), 125: (0, 37), 156: (0, 50), 119: (0, 55), 98: (0, 65), 112: (0, 48), 158: (0, 46), 155: (0, 49), 162: (0, 53), 78: (0, 11), 106: (0, 16), 76: (0, 63), 146: (0, 18), 3: (0, 19), 118: (0, 23), 66: (0, 25), 71: (0, 26), 120: (0, 27), 67: (0, 30), 161: (0, 32), 84: (0, 33), 149: (0, 35), 27: (0, 237), 65: (0, 38), 41: (0, 240), 96: (0, 39), 144: (0, 47), 152: (0, 43), 63: (0, 175), 75: (0, 473), 134: (0, 285), 90: (0, 457), 115: (0, 411)}, 57: {40: (1, {'@': 231}), 41: (1, {'@': 231})}, 58: {52: (0, 80), 32: (0, 580), 39: (0, 98), 53: (0, 577), 57: (0, 294), 58: (0, 530), 56: (0, 463)}, 59: {40: (0, 56), 41: (0, 512)}, 60: {3: (1, {'@': 14}), 62: (1, {'@': 14}), 63: (1, {'@': 14}), 114: (1, {'@': 14}), 64: (1, {'@': 14}), 65: (1, {'@': 14}), 115: (1, {'@': 14}), 66: (1, {'@': 14}), 67: (1, {'@': 14}), 68: (1, {'@': 14}), 69: (1, {'@': 14}), 70: (1, {'@': 14}), 71: (1, {'@': 14}), 72: (1, {'@': 14}), 116: (1, {'@': 14}), 117: (1, {'@': 14}), 73: (1, {'@': 14}), 118: (1, {'@': 14}), 119: (1, {'@': 14}), 120: (1, {'@': 14}), 74: (1, {'@': 14}), 75: (1, {'@': 14}), 121: (1, {'@': 14}), 122: (1, {'@': 14}), 123: (1, {'@': 14}), 76: (1, {'@': 14}), 124: (1, {'@': 14}), 125: (1, {'@': 14}), 126: (1, {'@': 14}), 127: (1, {'@': 14}), 27: (1, {'@': 14}), 128: (1, {'@': 14}), 77: (1, {'@': 14}), 129: (1, {'@': 14}), 78: (1, {'@': 14}), 130: (1, {'@': 14}), 131: (1, {'@': 14}), 79: (1, {'@': 14}), 80: (1, {'@': 14}), 81: (1, {'@': 14}), 82: (1, {'@': 14}), 83: (1, {'@': 14}), 132: (1, {'@': 14}), 133: (1, {'@': 14}), 134: (1, {'@': 14}), 84: (1, {'@': 14}), 85: (1, {'@': 14}), 161: (1, {'@': 14}), 135: (1, {'@': 14}), 136: (1, {'@': 14}), 86: (1, {'@': 14}), 87: (1, {'@': 14}), 137: (1, {'@': 14}), 88: (1, {'@': 14}), 138: (1, {'@': 14}), 89: (1, {'@': 14}), 90: (1, {'@': 14}), 91: (1, {'@': 14}), 92: (1, {'@': 14}), 93: (1, {'@': 14}), 139: (1, {'@': 14}), 140: (1, {'@': 14}), 94: (1, {'@': 14}), 141: (1, {'@': 14}), 95: (1, {'@': 14}), 142: (1, {'@': 14}), 96: (1, {'@': 14}), 143: (1, {'@': 14}), 144: (1, {'@': 14}), 145: (1, {'@': 14}), 146: (1, {'@': 14}), 147: (1, {'@': 14}), 97: (1, {'@': 14}), 98: (1, {'@': 14}), 148: (1, {'@': 14}), 99: (1, {'@': 14}), 149: (1, {'@': 14}), 41: (1, {'@': 14}), 150: (1, {'@': 14}), 151: (1, {'@': 14}), 152: (1, {'@': 14}), 100: (1, {'@': 14}), 101: (1, {'@': 14}), 102: (1, {'@': 14}), 40: (1, {'@': 14}), 153: (1, {'@': 14}), 103: (1, {'@': 14}), 154: (1, {'@': 14}), 104: (1, {'@': 14}), 105: (1, {'@': 14}), 155: (1, {'@': 14}), 106: (1, {'@': 14}), 107: (1, {'@': 14}), 156: (1, {'@': 14}), 157: (1, {'@': 14}), 158: (1, {'@': 14}), 108: (1, {'@': 14}), 109: (1, {'@': 14}), 110: (1, {'@': 14}), 111: (1, {'@': 14}), 159: (1, {'@': 14}), 160: (1, {'@': 14}), 112: (1, {'@': 14}), 162: (1, {'@': 14}), 113: (1, {'@': 14})}, 61: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 361), 22: (0, 239), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 62: {40: (1, {'@': 239}), 41: (1, {'@': 239})}, 63: {24: (1, {'@': 301}), 33: (1, {'@': 301}), 32: (1, {'@': 301}), 2: (1, {'@': 301}), 26: (1, {'@': 301}), 25: (1, {'@': 301}), 38: (1, {'@': 301}), 31: (1, {'@': 301}), 5: (1, {'@': 301})}, 64: {40: (1, {'@': 225}), 41: (1, {'@': 225})}, 65: {51: (0, 341), 38: (0, 123), 45: (0, 387), 48: (0, 353), 47: (0, 79), 49: (0, 72), 44: (0, 129), 50: (0, 542), 43: (0, 318), 46: (0, 132), 40: (1, {'@': 218}), 41: (1, {'@': 218})}, 66: {40: (1, {'@': 197}), 41: (1, {'@': 197})}, 67: {40: (1, {'@': 194}), 41: (1, {'@': 194})}, 68: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 38: (0, 105), 28: (0, 302), 5: (0, 373), 22: (0, 269), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 69: {40: (1, {'@': 147}), 41: (1, {'@': 147}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346})}, 70: {176: (0, 563)}, 71: {42: (0, 0)}, 72: {40: (1, {'@': 167}), 41: (1, {'@': 167})}, 73: {53: (0, 577), 57: (0, 255), 56: (0, 463), 52: (0, 265)}, 74: {40: (1, {'@': 84}), 41: (1, {'@': 84})}, 75: {2: (0, 537), 5: (0, 590), 52: (0, 541), 7: (0, 317), 0: (0, 324), 53: (0, 577), 19: (0, 365), 54: (0, 399), 9: (0, 451), 23: (0, 352), 24: (0, 564), 25: (0, 485), 26: (0, 518), 56: (0, 463), 36: (0, 300), 29: (0, 311), 32: (0, 238), 16: (0, 437), 31: (0, 565), 39: (0, 470), 33: (0, 602), 57: (0, 558), 58: (0, 524), 55: (0, 76), 37: (0, 402), 38: (0, 592), 59: (0, 449)}, 76: {40: (1, {'@': 76}), 41: (1, {'@': 76})}, 77: {40: (1, {'@': 37}), 41: (1, {'@': 37})}, 78: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 22: (0, 554), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 45: (0, 387), 21: (0, 186), 10: (0, 147), 43: (0, 140), 38: (0, 123), 27: (0, 417), 47: (0, 79), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347), 50: (0, 542)}, 79: {42: (1, {'@': 336}), 40: (1, {'@': 336}), 41: (1, {'@': 336})}, 80: {42: (0, 444)}, 81: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 22: (0, 269), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 82: {40: (1, {'@': 21}), 41: (1, {'@': 21})}, 83: {40: (1, {'@': 48}), 41: (1, {'@': 48})}, 84: {41: (0, 491)}, 85: {40: (1, {'@': 79}), 41: (1, {'@': 79})}, 86: {24: (1, {'@': 304}), 33: (1, {'@': 304}), 32: (1, {'@': 304}), 2: (1, {'@': 304}), 26: (1, {'@': 304}), 25: (1, {'@': 304}), 38: (1, {'@': 304}), 31: (1, {'@': 304}), 5: (1, {'@': 304})}, 87: {42: (0, 582)}, 88: {40: (1, {'@': 56}), 41: (1, {'@': 56})}, 89: {53: (0, 577), 52: (0, 243), 56: (0, 463), 57: (0, 251)}, 90: {5: (0, 420), 39: (0, 555), 177: (0, 435), 2: (0, 515)}, 91: {40: (1, {'@': 150}), 41: (1, {'@': 150})}, 92: {40: (1, {'@': 27}), 41: (1, {'@': 27})}, 93: {176: (0, 219)}, 94: {40: (1, {'@': 211}), 41: (1, {'@': 211})}, 95: {40: (1, {'@': 22}), 41: (1, {'@': 22})}, 96: {178: (0, 231)}, 97: {40: (1, {'@': 201}), 41: (1, {'@': 201})}, 98: {42: (0, 557)}, 99: {41: (0, 487), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 100: {40: (1, {'@': 82}), 41: (1, {'@': 82})}, 101: {40: (1, {'@': 28}), 41: (1, {'@': 28})}, 102: {176: (0, 234)}, 103: {1: (0, 111), 3: (0, 587), 179: (0, 500), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 61: (0, 497), 10: (0, 525), 27: (0, 417), 28: (0, 302), 5: (0, 373), 22: (0, 574), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 104: {1: (0, 111), 9: (0, 167), 37: (0, 402), 3: (0, 587), 2: (0, 537), 32: (0, 170), 6: (0, 581), 5: (0, 263), 7: (0, 317), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 19: (0, 365), 21: (0, 186), 38: (0, 592), 23: (0, 352), 10: (0, 173), 24: (0, 564), 25: (0, 485), 0: (0, 178), 26: (0, 518), 16: (0, 180), 27: (0, 417), 28: (0, 302), 29: (0, 311), 22: (0, 182), 31: (0, 565), 34: (0, 511), 36: (0, 183), 33: (0, 602), 20: (0, 414), 35: (0, 347)}, 105: {176: (0, 337)}, 106: {40: (1, {'@': 55}), 41: (1, {'@': 55})}, 107: {32: (0, 307), 52: (0, 260)}, 108: {1: (0, 111), 3: (0, 587), 32: (0, 254), 6: (0, 581), 14: (0, 431), 8: (0, 529), 13: (0, 535), 12: (0, 248), 15: (0, 226), 17: (0, 211), 22: (0, 258), 18: (0, 192), 21: (0, 186), 10: (0, 262), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 109: {178: (0, 367)}, 110: {40: (1, {'@': 86}), 41: (1, {'@': 86})}, 111: {171: (0, 112), 168: (0, 568), 172: (0, 571), 169: (0, 162), 170: (0, 501)}, 112: {3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 18: (0, 192), 21: (0, 186), 20: (0, 150), 10: (0, 121), 27: (0, 417), 28: (0, 302), 17: (0, 116), 5: (0, 373), 34: (0, 511)}, 113: {40: (1, {'@': 54}), 41: (1, {'@': 54})}, 114: {40: (1, {'@': 282}), 41: (1, {'@': 282}), 42: (1, {'@': 282})}, 115: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 22: (0, 547), 10: (0, 593), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 116: {168: (1, {'@': 343}), 178: (1, {'@': 343}), 176: (1, {'@': 343}), 40: (1, {'@': 343}), 14: (1, {'@': 343}), 170: (1, {'@': 343}), 172: (1, {'@': 343}), 42: (1, {'@': 343}), 180: (1, {'@': 343}), 169: (1, {'@': 343}), 171: (1, {'@': 343}), 41: (1, {'@': 343}), 13: (1, {'@': 343})}, 117: {40: (1, {'@': 283}), 41: (1, {'@': 283}), 42: (1, {'@': 283})}, 118: {40: (1, {'@': 129}), 41: (1, {'@': 129})}, 119: {174: (1, {'@': 349}), 168: (1, {'@': 349}), 178: (1, {'@': 349}), 176: (1, {'@': 349}), 40: (1, {'@': 349}), 14: (1, {'@': 349}), 170: (1, {'@': 349}), 65: (1, {'@': 349}), 172: (1, {'@': 349}), 42: (1, {'@': 349}), 180: (1, {'@': 349}), 169: (1, {'@': 349}), 171: (1, {'@': 349}), 41: (1, {'@': 349}), 13: (1, {'@': 349}), 175: (1, {'@': 349})}, 120: {40: (1, {'@': 207}), 41: (1, {'@': 207})}, 121: {173: (1, {'@': 348}), 168: (1, {'@': 344}), 178: (1, {'@': 344}), 176: (1, {'@': 344}), 40: (1, {'@': 344}), 14: (1, {'@': 344}), 170: (1, {'@': 344}), 172: (1, {'@': 344}), 42: (1, {'@': 344}), 180: (1, {'@': 344}), 169: (1, {'@': 344}), 171: (1, {'@': 344}), 41: (1, {'@': 344}), 13: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346})}, 122: {40: (1, {'@': 285}), 41: (1, {'@': 285}), 42: (1, {'@': 285})}, 123: {42: (1, {'@': 337}), 40: (1, {'@': 337}), 41: (1, {'@': 337})}, 124: {40: (1, {'@': 57}), 41: (1, {'@': 57})}, 125: {40: (1, {'@': 38}), 41: (1, {'@': 38})}, 126: {91: (1, {'@': 6}), 41: (1, {'@': 6})}, 127: {40: (1, {'@': 36}), 41: (1, {'@': 36})}, 128: {40: (1, {'@': 284}), 41: (1, {'@': 284}), 42: (1, {'@': 284})}, 129: {42: (1, {'@': 334}), 40: (1, {'@': 334}), 41: (1, {'@': 334})}, 130: {52: (0, 476)}, 131: {40: (1, {'@': 85}), 41: (1, {'@': 85})}, 132: {42: (1, {'@': 332}), 40: (1, {'@': 332}), 41: (1, {'@': 332})}, 133: {40: (1, {'@': 39}), 41: (1, {'@': 39})}, 134: {40: (1, {'@': 44}), 41: (1, {'@': 44})}, 135: {26: (0, 513)}, 136: {40: (1, {'@': 81}), 41: (1, {'@': 81})}, 137: {39: (0, 215), 52: (0, 201), 58: (0, 217), 59: (0, 160), 53: (0, 577), 57: (0, 241), 56: (0, 463)}, 138: {40: (1, {'@': 146}), 41: (1, {'@': 146}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 139: {40: (1, {'@': 41}), 41: (1, {'@': 41})}, 140: {42: (0, 438)}, 141: {26: (0, 509)}, 142: {40: (1, {'@': 149}), 41: (1, {'@': 149})}, 143: {40: (1, {'@': 198}), 41: (1, {'@': 198})}, 144: {40: (1, {'@': 25}), 41: (1, {'@': 25})}, 145: {174: (1, {'@': 365}), 168: (1, {'@': 365}), 40: (1, {'@': 365}), 14: (1, {'@': 365}), 169: (1, {'@': 365}), 170: (1, {'@': 365}), 171: (1, {'@': 365}), 65: (1, {'@': 365}), 172: (1, {'@': 365}), 41: (1, {'@': 365}), 13: (1, {'@': 365}), 175: (1, {'@': 365}), 42: (1, {'@': 365}), 176: (1, {'@': 365}), 178: (1, {'@': 365}), 180: (1, {'@': 365})}, 146: {40: (1, {'@': 43}), 41: (1, {'@': 43})}, 147: {40: (1, {'@': 175}), 41: (1, {'@': 175}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 148: {1: (0, 111), 22: (0, 84), 3: (0, 587), 6: (0, 581), 10: (0, 99), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 149: {173: (1, {'@': 348}), 174: (1, {'@': 346}), 168: (1, {'@': 346}), 178: (1, {'@': 346}), 176: (1, {'@': 346}), 40: (1, {'@': 346}), 14: (1, {'@': 346}), 170: (1, {'@': 346}), 65: (1, {'@': 346}), 172: (1, {'@': 346}), 42: (1, {'@': 346}), 180: (1, {'@': 346}), 169: (1, {'@': 346}), 171: (1, {'@': 346}), 41: (1, {'@': 346}), 13: (1, {'@': 346}), 175: (1, {'@': 346})}, 150: {14: (0, 594), 13: (0, 389), 168: (1, {'@': 356}), 41: (1, {'@': 356}), 40: (1, {'@': 356}), 169: (1, {'@': 356}), 170: (1, {'@': 356}), 171: (1, {'@': 356}), 172: (1, {'@': 356}), 42: (1, {'@': 356}), 176: (1, {'@': 356}), 180: (1, {'@': 356}), 178: (1, {'@': 356})}, 151: {40: (1, {'@': 40}), 41: (1, {'@': 40})}, 152: {41: (0, 357), 91: (1, {'@': 1})}, 153: {174: (1, {'@': 372}), 168: (1, {'@': 372}), 40: (1, {'@': 372}), 14: (1, {'@': 372}), 173: (1, {'@': 372}), 169: (1, {'@': 372}), 170: (1, {'@': 372}), 171: (1, {'@': 372}), 65: (1, {'@': 372}), 172: (1, {'@': 372}), 41: (1, {'@': 372}), 13: (1, {'@': 372}), 175: (1, {'@': 372}), 42: (1, {'@': 372}), 178: (1, {'@': 372}), 176: (1, {'@': 372}), 180: (1, {'@': 372})}, 154: {174: (1, {'@': 363}), 168: (1, {'@': 363}), 40: (1, {'@': 363}), 14: (1, {'@': 363}), 169: (1, {'@': 363}), 170: (1, {'@': 363}), 171: (1, {'@': 363}), 65: (1, {'@': 363}), 172: (1, {'@': 363}), 41: (1, {'@': 363}), 13: (1, {'@': 363}), 175: (1, {'@': 363}), 42: (1, {'@': 363}), 176: (1, {'@': 363}), 178: (1, {'@': 363}), 180: (1, {'@': 363})}, 155: {40: (1, {'@': 221}), 41: (1, {'@': 221})}, 156: {174: (1, {'@': 376}), 168: (1, {'@': 376}), 40: (1, {'@': 376}), 14: (1, {'@': 376}), 173: (1, {'@': 376}), 169: (1, {'@': 376}), 170: (1, {'@': 376}), 171: (1, {'@': 376}), 65: (1, {'@': 376}), 172: (1, {'@': 376}), 41: (1, {'@': 376}), 13: (1, {'@': 376}), 175: (1, {'@': 376}), 42: (1, {'@': 376}), 176: (1, {'@': 376}), 178: (1, {'@': 376}), 180: (1, {'@': 376})}, 157: {40: (1, {'@': 42}), 41: (1, {'@': 42})}, 158: {42: (0, 141)}, 159: {40: (1, {'@': 95}), 41: (1, {'@': 95})}, 160: {40: (1, {'@': 117}), 41: (1, {'@': 117})}, 161: {40: (1, {'@': 214}), 41: (1, {'@': 214})}, 162: {3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 20: (0, 195), 18: (0, 192), 21: (0, 186), 10: (0, 121), 27: (0, 417), 28: (0, 302), 17: (0, 116), 5: (0, 373), 34: (0, 511)}, 163: {173: (1, {'@': 348}), 174: (1, {'@': 350}), 168: (1, {'@': 350}), 178: (1, {'@': 350}), 176: (1, {'@': 350}), 40: (1, {'@': 350}), 14: (1, {'@': 350}), 170: (1, {'@': 350}), 65: (1, {'@': 350}), 172: (1, {'@': 350}), 42: (1, {'@': 350}), 180: (1, {'@': 350}), 169: (1, {'@': 350}), 171: (1, {'@': 350}), 41: (1, {'@': 350}), 13: (1, {'@': 350}), 175: (1, {'@': 350})}, 164: {40: (1, {'@': 291}), 41: (1, {'@': 291}), 42: (1, {'@': 291})}, 165: {178: (0, 480)}, 166: {40: (1, {'@': 205}), 41: (1, {'@': 205})}, 167: {40: (1, {'@': 91}), 41: (1, {'@': 91})}, 168: {40: (1, {'@': 290}), 41: (1, {'@': 290}), 42: (1, {'@': 290})}, 169: {27: (0, 417), 3: (0, 587), 21: (0, 186), 12: (0, 486), 28: (0, 302), 15: (0, 226), 10: (0, 540), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 170: {40: (1, {'@': 92}), 41: (1, {'@': 92})}, 171: {42: (0, 233)}, 172: {40: (1, {'@': 143}), 41: (1, {'@': 143})}, 173: {40: (1, {'@': 120}), 41: (1, {'@': 120}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 174: {40: (1, {'@': 289}), 41: (1, {'@': 289}), 42: (1, {'@': 289})}, 175: {3: (1, {'@': 297}), 27: (1, {'@': 297}), 14: (1, {'@': 297}), 21: (1, {'@': 297}), 28: (1, {'@': 297}), 13: (1, {'@': 297}), 5: (1, {'@': 297})}, 176: {42: (0, 223)}, 177: {40: (1, {'@': 139}), 41: (1, {'@': 139})}, 178: {40: (1, {'@': 125}), 41: (1, {'@': 125})}, 179: {40: (1, {'@': 80}), 41: (1, {'@': 80}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346})}, 180: {40: (1, {'@': 90}), 41: (1, {'@': 90})}, 181: {40: (1, {'@': 288}), 41: (1, {'@': 288}), 42: (1, {'@': 288})}, 182: {40: (1, {'@': 119}), 41: (1, {'@': 119})}, 183: {40: (1, {'@': 93}), 41: (1, {'@': 93})}, 184: {40: (1, {'@': 45}), 41: (1, {'@': 45})}, 185: {24: (1, {'@': 302}), 33: (1, {'@': 302}), 32: (1, {'@': 302}), 2: (1, {'@': 302}), 26: (1, {'@': 302}), 25: (1, {'@': 302}), 38: (1, {'@': 302}), 31: (1, {'@': 302}), 5: (1, {'@': 302})}, 186: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347), 22: (0, 418)}, 187: {174: (1, {'@': 373}), 168: (1, {'@': 373}), 40: (1, {'@': 373}), 14: (1, {'@': 373}), 173: (1, {'@': 373}), 169: (1, {'@': 373}), 170: (1, {'@': 373}), 171: (1, {'@': 373}), 65: (1, {'@': 373}), 172: (1, {'@': 373}), 41: (1, {'@': 373}), 13: (1, {'@': 373}), 175: (1, {'@': 373}), 42: (1, {'@': 373}), 178: (1, {'@': 373}), 176: (1, {'@': 373}), 180: (1, {'@': 373})}, 188: {14: (0, 594), 13: (0, 389), 168: (1, {'@': 354}), 41: (1, {'@': 354}), 40: (1, {'@': 354}), 169: (1, {'@': 354}), 170: (1, {'@': 354}), 171: (1, {'@': 354}), 172: (1, {'@': 354}), 42: (1, {'@': 354}), 176: (1, {'@': 354}), 180: (1, {'@': 354}), 178: (1, {'@': 354})}, 189: {91: (1, {'@': 7}), 41: (1, {'@': 7})}, 190: {14: (0, 594), 13: (0, 389), 168: (1, {'@': 353}), 41: (1, {'@': 353}), 40: (1, {'@': 353}), 169: (1, {'@': 353}), 170: (1, {'@': 353}), 171: (1, {'@': 353}), 172: (1, {'@': 353}), 42: (1, {'@': 353}), 176: (1, {'@': 353}), 180: (1, {'@': 353}), 178: (1, {'@': 353})}, 191: {40: (1, {'@': 47}), 41: (1, {'@': 47})}, 192: {174: (1, {'@': 364}), 168: (1, {'@': 364}), 40: (1, {'@': 364}), 14: (1, {'@': 364}), 169: (1, {'@': 364}), 170: (1, {'@': 364}), 171: (1, {'@': 364}), 65: (1, {'@': 364}), 172: (1, {'@': 364}), 41: (1, {'@': 364}), 13: (1, {'@': 364}), 175: (1, {'@': 364}), 42: (1, {'@': 364}), 176: (1, {'@': 364}), 178: (1, {'@': 364}), 180: (1, {'@': 364})}, 193: {40: (1, {'@': 178}), 41: (1, {'@': 178})}, 194: {27: (0, 404)}, 195: {14: (0, 594), 13: (0, 389), 168: (1, {'@': 352}), 41: (1, {'@': 352}), 40: (1, {'@': 352}), 169: (1, {'@': 352}), 170: (1, {'@': 352}), 171: (1, {'@': 352}), 172: (1, {'@': 352}), 42: (1, {'@': 352}), 176: (1, {'@': 352}), 180: (1, {'@': 352}), 178: (1, {'@': 352})}, 196: {14: (0, 594), 13: (0, 389), 168: (1, {'@': 355}), 41: (1, {'@': 355}), 40: (1, {'@': 355}), 169: (1, {'@': 355}), 170: (1, {'@': 355}), 171: (1, {'@': 355}), 172: (1, {'@': 355}), 42: (1, {'@': 355}), 176: (1, {'@': 355}), 180: (1, {'@': 355}), 178: (1, {'@': 355})}, 197: {40: (1, {'@': 187}), 41: (1, {'@': 187})}, 198: {40: (1, {'@': 179}), 41: (1, {'@': 179})}, 199: {174: (0, 355), 65: (0, 426), 175: (0, 412), 168: (1, {'@': 358}), 40: (1, {'@': 358}), 14: (1, {'@': 358}), 169: (1, {'@': 358}), 170: (1, {'@': 358}), 171: (1, {'@': 358}), 172: (1, {'@': 358}), 41: (1, {'@': 358}), 13: (1, {'@': 358}), 42: (1, {'@': 358}), 176: (1, {'@': 358}), 178: (1, {'@': 358}), 180: (1, {'@': 358})}, 200: {40: (1, {'@': 340}), 41: (1, {'@': 340}), 42: (1, {'@': 340})}, 201: {40: (1, {'@': 116}), 41: (1, {'@': 116})}, 202: {40: (1, {'@': 185}), 41: (1, {'@': 185})}, 203: {40: (1, {'@': 131}), 41: (1, {'@': 131})}, 204: {42: (0, 288), 40: (1, {'@': 52}), 41: (1, {'@': 52})}, 205: {174: (1, {'@': 361}), 168: (1, {'@': 361}), 40: (1, {'@': 361}), 14: (1, {'@': 361}), 169: (1, {'@': 361}), 170: (1, {'@': 361}), 171: (1, {'@': 361}), 65: (1, {'@': 361}), 172: (1, {'@': 361}), 41: (1, {'@': 361}), 13: (1, {'@': 361}), 175: (1, {'@': 361}), 42: (1, {'@': 361}), 176: (1, {'@': 361}), 178: (1, {'@': 361}), 180: (1, {'@': 361})}, 206: {40: (1, {'@': 58}), 41: (1, {'@': 58})}, 207: {176: (0, 550)}, 208: {40: (1, {'@': 161}), 41: (1, {'@': 161})}, 209: {40: (1, {'@': 184}), 41: (1, {'@': 184})}, 210: {40: (1, {'@': 200}), 41: (1, {'@': 200})}, 211: {13: (1, {'@': 343}), 14: (1, {'@': 343}), 168: (1, {'@': 357}), 41: (1, {'@': 357}), 40: (1, {'@': 357}), 169: (1, {'@': 357}), 170: (1, {'@': 357}), 171: (1, {'@': 357}), 172: (1, {'@': 357}), 42: (1, {'@': 357}), 176: (1, {'@': 357}), 180: (1, {'@': 357}), 178: (1, {'@': 357})}, 212: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 22: (0, 531), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 213: {174: (1, {'@': 362}), 168: (1, {'@': 362}), 40: (1, {'@': 362}), 14: (1, {'@': 362}), 169: (1, {'@': 362}), 170: (1, {'@': 362}), 171: (1, {'@': 362}), 65: (1, {'@': 362}), 172: (1, {'@': 362}), 41: (1, {'@': 362}), 13: (1, {'@': 362}), 175: (1, {'@': 362}), 42: (1, {'@': 362}), 176: (1, {'@': 362}), 178: (1, {'@': 362}), 180: (1, {'@': 362})}, 214: {27: (0, 417), 3: (0, 587), 10: (0, 528), 21: (0, 186), 28: (0, 302), 15: (0, 226), 12: (0, 456), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 215: {40: (1, {'@': 115}), 41: (1, {'@': 115})}, 216: {40: (1, {'@': 186}), 41: (1, {'@': 186})}, 217: {40: (1, {'@': 114}), 41: (1, {'@': 114})}, 218: {40: (1, {'@': 168}), 41: (1, {'@': 168})}, 219: {40: (1, {'@': 181}), 41: (1, {'@': 181})}, 220: {42: (0, 562), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 221: {40: (1, {'@': 169}), 41: (1, {'@': 169}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 222: {42: (0, 595)}, 223: {2: (0, 382), 30: (0, 391), 5: (0, 392), 10: (0, 401)}, 224: {176: (0, 453)}, 225: {42: (0, 560)}, 226: {174: (1, {'@': 371}), 168: (1, {'@': 371}), 40: (1, {'@': 371}), 14: (1, {'@': 371}), 173: (1, {'@': 371}), 169: (1, {'@': 371}), 170: (1, {'@': 371}), 171: (1, {'@': 371}), 65: (1, {'@': 371}), 172: (1, {'@': 371}), 41: (1, {'@': 371}), 13: (1, {'@': 371}), 175: (1, {'@': 371}), 42: (1, {'@': 371}), 176: (1, {'@': 371}), 178: (1, {'@': 371}), 180: (1, {'@': 371})}, 227: {42: (0, 249)}, 228: {57: (0, 558), 58: (0, 524), 54: (0, 172), 52: (0, 541), 32: (0, 381), 53: (0, 577), 59: (0, 297), 56: (0, 463), 39: (0, 470)}, 229: {174: (1, {'@': 345}), 168: (1, {'@': 345}), 178: (1, {'@': 345}), 176: (1, {'@': 345}), 40: (1, {'@': 345}), 14: (1, {'@': 345}), 170: (1, {'@': 345}), 65: (1, {'@': 345}), 172: (1, {'@': 345}), 42: (1, {'@': 345}), 180: (1, {'@': 345}), 169: (1, {'@': 345}), 171: (1, {'@': 345}), 41: (1, {'@': 345}), 13: (1, {'@': 345}), 175: (1, {'@': 345})}, 230: {65: (0, 426), 174: (0, 355), 175: (0, 412), 168: (1, {'@': 359}), 40: (1, {'@': 359}), 14: (1, {'@': 359}), 169: (1, {'@': 359}), 170: (1, {'@': 359}), 171: (1, {'@': 359}), 172: (1, {'@': 359}), 41: (1, {'@': 359}), 13: (1, {'@': 359}), 42: (1, {'@': 359}), 176: (1, {'@': 359}), 178: (1, {'@': 359}), 180: (1, {'@': 359})}, 231: {40: (1, {'@': 180}), 41: (1, {'@': 180})}, 232: {40: (1, {'@': 182}), 41: (1, {'@': 182})}, 233: {10: (0, 459), 1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 22: (0, 462), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 234: {40: (1, {'@': 183}), 41: (1, {'@': 183})}, 235: {39: (0, 362)}, 236: {1: (0, 111), 2: (0, 81), 3: (0, 587), 6: (0, 581), 22: (0, 136), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 138), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 30: (0, 142), 20: (0, 414), 35: (0, 347)}, 237: {40: (1, {'@': 19}), 41: (1, {'@': 19})}, 238: {40: (1, {'@': 312}), 41: (1, {'@': 312})}, 239: {40: (1, {'@': 66}), 41: (1, {'@': 66})}, 240: {3: (1, {'@': 13}), 62: (1, {'@': 13}), 63: (1, {'@': 13}), 114: (1, {'@': 13}), 64: (1, {'@': 13}), 65: (1, {'@': 13}), 115: (1, {'@': 13}), 66: (1, {'@': 13}), 67: (1, {'@': 13}), 68: (1, {'@': 13}), 69: (1, {'@': 13}), 70: (1, {'@': 13}), 71: (1, {'@': 13}), 72: (1, {'@': 13}), 116: (1, {'@': 13}), 117: (1, {'@': 13}), 73: (1, {'@': 13}), 118: (1, {'@': 13}), 119: (1, {'@': 13}), 120: (1, {'@': 13}), 74: (1, {'@': 13}), 75: (1, {'@': 13}), 121: (1, {'@': 13}), 122: (1, {'@': 13}), 123: (1, {'@': 13}), 76: (1, {'@': 13}), 124: (1, {'@': 13}), 125: (1, {'@': 13}), 126: (1, {'@': 13}), 127: (1, {'@': 13}), 27: (1, {'@': 13}), 128: (1, {'@': 13}), 77: (1, {'@': 13}), 129: (1, {'@': 13}), 78: (1, {'@': 13}), 130: (1, {'@': 13}), 131: (1, {'@': 13}), 79: (1, {'@': 13}), 80: (1, {'@': 13}), 81: (1, {'@': 13}), 82: (1, {'@': 13}), 83: (1, {'@': 13}), 132: (1, {'@': 13}), 133: (1, {'@': 13}), 134: (1, {'@': 13}), 84: (1, {'@': 13}), 85: (1, {'@': 13}), 161: (1, {'@': 13}), 135: (1, {'@': 13}), 136: (1, {'@': 13}), 86: (1, {'@': 13}), 87: (1, {'@': 13}), 137: (1, {'@': 13}), 88: (1, {'@': 13}), 138: (1, {'@': 13}), 89: (1, {'@': 13}), 90: (1, {'@': 13}), 91: (1, {'@': 13}), 92: (1, {'@': 13}), 93: (1, {'@': 13}), 139: (1, {'@': 13}), 140: (1, {'@': 13}), 94: (1, {'@': 13}), 141: (1, {'@': 13}), 95: (1, {'@': 13}), 142: (1, {'@': 13}), 96: (1, {'@': 13}), 143: (1, {'@': 13}), 144: (1, {'@': 13}), 145: (1, {'@': 13}), 146: (1, {'@': 13}), 147: (1, {'@': 13}), 97: (1, {'@': 13}), 98: (1, {'@': 13}), 148: (1, {'@': 13}), 99: (1, {'@': 13}), 149: (1, {'@': 13}), 41: (1, {'@': 13}), 150: (1, {'@': 13}), 151: (1, {'@': 13}), 152: (1, {'@': 13}), 100: (1, {'@': 13}), 101: (1, {'@': 13}), 102: (1, {'@': 13}), 40: (1, {'@': 13}), 153: (1, {'@': 13}), 103: (1, {'@': 13}), 154: (1, {'@': 13}), 104: (1, {'@': 13}), 105: (1, {'@': 13}), 155: (1, {'@': 13}), 106: (1, {'@': 13}), 107: (1, {'@': 13}), 156: (1, {'@': 13}), 157: (1, {'@': 13}), 158: (1, {'@': 13}), 108: (1, {'@': 13}), 109: (1, {'@': 13}), 110: (1, {'@': 13}), 111: (1, {'@': 13}), 159: (1, {'@': 13}), 160: (1, {'@': 13}), 112: (1, {'@': 13}), 162: (1, {'@': 13}), 113: (1, {'@': 13})}, 241: {40: (1, {'@': 118}), 41: (1, {'@': 118})}, 242: {40: (1, {'@': 261}), 41: (1, {'@': 261}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 243: {40: (1, {'@': 73}), 41: (1, {'@': 73})}, 244: {40: (1, {'@': 222}), 41: (1, {'@': 222})}, 245: {40: (1, {'@': 153}), 41: (1, {'@': 153})}, 246: {40: (1, {'@': 97}), 41: (1, {'@': 97})}, 247: {40: (1, {'@': 263}), 41: (1, {'@': 263})}, 248: {173: (1, {'@': 347}), 174: (1, {'@': 366}), 168: (1, {'@': 366}), 40: (1, {'@': 366}), 14: (1, {'@': 366}), 169: (1, {'@': 366}), 170: (1, {'@': 366}), 171: (1, {'@': 366}), 65: (1, {'@': 366}), 172: (1, {'@': 366}), 41: (1, {'@': 366}), 13: (1, {'@': 366}), 175: (1, {'@': 366}), 42: (1, {'@': 366}), 176: (1, {'@': 366}), 178: (1, {'@': 366}), 180: (1, {'@': 366})}, 249: {5: (0, 323), 2: (0, 604)}, 250: {40: (1, {'@': 260}), 41: (1, {'@': 260})}, 251: {40: (1, {'@': 71}), 41: (1, {'@': 71})}, 252: {40: (1, {'@': 195}), 41: (1, {'@': 195})}, 253: {168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 254: {40: (1, {'@': 262}), 41: (1, {'@': 262})}, 255: {40: (1, {'@': 72}), 41: (1, {'@': 72})}, 256: {40: (1, {'@': 132}), 41: (1, {'@': 132})}, 257: {42: (0, 492)}, 258: {40: (1, {'@': 258}), 41: (1, {'@': 258})}, 259: {49: (0, 171), 1: (0, 111), 3: (0, 587), 6: (0, 581), 14: (0, 431), 43: (0, 318), 8: (0, 529), 13: (0, 535), 12: (0, 248), 15: (0, 226), 18: (0, 192), 45: (0, 387), 20: (0, 414), 21: (0, 186), 44: (0, 129), 10: (0, 282), 46: (0, 132), 38: (0, 123), 27: (0, 417), 47: (0, 79), 28: (0, 302), 17: (0, 211), 5: (0, 373), 34: (0, 511), 48: (0, 353), 35: (0, 347), 50: (0, 542), 51: (0, 341), 22: (0, 567)}, 260: {42: (0, 436)}, 261: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 22: (0, 495), 18: (0, 192), 21: (0, 186), 10: (0, 498), 61: (0, 504), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 262: {40: (1, {'@': 259}), 41: (1, {'@': 259}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 263: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 52: (0, 447), 17: (0, 211), 18: (0, 192), 21: (0, 186), 22: (0, 403), 10: (0, 432), 56: (0, 405), 27: (0, 417), 53: (0, 394), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 264: {40: (1, {'@': 253}), 41: (1, {'@': 253}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 265: {40: (1, {'@': 74}), 41: (1, {'@': 74})}, 266: {40: (1, {'@': 135}), 41: (1, {'@': 135})}, 267: {1: (0, 111), 3: (0, 587), 53: (0, 336), 6: (0, 581), 58: (0, 572), 8: (0, 529), 56: (0, 354), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 52: (0, 313), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 22: (0, 269), 34: (0, 511), 39: (0, 576), 20: (0, 414), 35: (0, 347)}, 268: {40: (1, {'@': 250}), 41: (1, {'@': 250})}, 269: {176: (0, 200)}, 270: {176: (0, 445)}, 271: {40: (1, {'@': 108}), 41: (1, {'@': 108})}, 272: {27: (0, 51), 40: (1, {'@': 63}), 41: (1, {'@': 63})}, 273: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 32: (0, 106), 18: (0, 192), 38: (0, 592), 20: (0, 414), 21: (0, 186), 22: (0, 110), 16: (0, 113), 10: (0, 253), 24: (0, 564), 25: (0, 485), 26: (0, 518), 27: (0, 417), 28: (0, 302), 17: (0, 211), 5: (0, 373), 31: (0, 565), 34: (0, 511), 33: (0, 602), 35: (0, 347), 37: (0, 402)}, 274: {40: (1, {'@': 141}), 41: (1, {'@': 141})}, 275: {40: (1, {'@': 107}), 41: (1, {'@': 107})}, 276: {1: (0, 111), 10: (0, 395), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 18: (0, 192), 20: (0, 414), 21: (0, 186), 27: (0, 417), 28: (0, 302), 17: (0, 211), 22: (0, 327), 5: (0, 373), 34: (0, 511), 35: (0, 347)}, 277: {176: (0, 585)}, 278: {27: (0, 417), 3: (0, 587), 21: (0, 186), 12: (0, 486), 28: (0, 302), 15: (0, 226), 10: (0, 536), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 279: {40: (1, {'@': 106}), 41: (1, {'@': 106})}, 280: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 10: (0, 343), 12: (0, 248), 14: (0, 431), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 27: (0, 417), 32: (0, 346), 28: (0, 302), 5: (0, 373), 34: (0, 511), 22: (0, 351), 20: (0, 414), 35: (0, 347)}, 281: {40: (1, {'@': 109}), 41: (1, {'@': 109})}, 282: {40: (1, {'@': 176}), 41: (1, {'@': 176}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346})}, 283: {40: (1, {'@': 240}), 41: (1, {'@': 240})}, 284: {1: (0, 111), 3: (0, 587), 6: (0, 581), 22: (0, 304), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 483), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 285: {40: (1, {'@': 226}), 41: (1, {'@': 226})}, 286: {27: (0, 417), 3: (0, 587), 10: (0, 545), 21: (0, 186), 12: (0, 486), 28: (0, 302), 15: (0, 226), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 287: {40: (1, {'@': 126}), 41: (1, {'@': 126})}, 288: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 520), 27: (0, 417), 22: (0, 521), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 289: {40: (1, {'@': 98}), 41: (1, {'@': 98})}, 290: {176: (0, 477)}, 291: {40: (1, {'@': 121}), 41: (1, {'@': 121})}, 292: {40: (1, {'@': 99}), 41: (1, {'@': 99})}, 293: {40: (1, {'@': 122}), 41: (1, {'@': 122}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346})}, 294: {42: (0, 137)}, 295: {40: (1, {'@': 70}), 41: (1, {'@': 70})}, 296: {40: (1, {'@': 137}), 41: (1, {'@': 137})}, 297: {40: (1, {'@': 144}), 41: (1, {'@': 144})}, 298: {40: (1, {'@': 101}), 41: (1, {'@': 101})}, 299: {42: (1, {'@': 266}), 41: (1, {'@': 266}), 40: (1, {'@': 266})}, 300: {40: (1, {'@': 311}), 41: (1, {'@': 311})}, 301: {40: (1, {'@': 100}), 41: (1, {'@': 100})}, 302: {174: (1, {'@': 377}), 168: (1, {'@': 377}), 40: (1, {'@': 377}), 14: (1, {'@': 377}), 173: (1, {'@': 377}), 169: (1, {'@': 377}), 170: (1, {'@': 377}), 171: (1, {'@': 377}), 65: (1, {'@': 377}), 172: (1, {'@': 377}), 41: (1, {'@': 377}), 13: (1, {'@': 377}), 175: (1, {'@': 377}), 42: (1, {'@': 377}), 176: (1, {'@': 377}), 178: (1, {'@': 377}), 180: (1, {'@': 377})}, 303: {40: (1, {'@': 96}), 41: (1, {'@': 96})}, 304: {40: (1, {'@': 256}), 41: (1, {'@': 256})}, 305: {1: (0, 111), 3: (0, 587), 2: (0, 537), 6: (0, 581), 5: (0, 263), 7: (0, 317), 0: (0, 287), 8: (0, 529), 13: (0, 535), 14: (0, 431), 16: (0, 289), 12: (0, 248), 15: (0, 226), 19: (0, 365), 18: (0, 192), 22: (0, 291), 20: (0, 414), 21: (0, 186), 38: (0, 592), 23: (0, 352), 9: (0, 292), 10: (0, 293), 24: (0, 564), 25: (0, 485), 26: (0, 518), 27: (0, 417), 29: (0, 311), 28: (0, 302), 17: (0, 211), 36: (0, 298), 31: (0, 565), 32: (0, 301), 34: (0, 511), 33: (0, 602), 35: (0, 347), 37: (0, 402)}, 306: {40: (1, {'@': 254}), 41: (1, {'@': 254}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 307: {42: (0, 575)}, 308: {57: (0, 558), 58: (0, 524), 32: (0, 177), 52: (0, 541), 59: (0, 274), 53: (0, 577), 54: (0, 413), 56: (0, 463), 39: (0, 470)}, 309: {3: (1, {'@': 298}), 27: (1, {'@': 298}), 14: (1, {'@': 298}), 21: (1, {'@': 298}), 28: (1, {'@': 298}), 13: (1, {'@': 298}), 5: (1, {'@': 298})}, 310: {40: (1, {'@': 241}), 41: (1, {'@': 241})}, 311: {40: (1, {'@': 323}), 41: (1, {'@': 323}), 42: (1, {'@': 323})}, 312: {178: (0, 516)}, 313: {176: (0, 415)}, 314: {62: (0, 556), 164: (0, 460), 121: (0, 499), 117: (0, 472), 100: (0, 78), 123: (0, 276), 74: (0, 54), 126: (0, 58), 165: (0, 469), 92: (0, 551), 166: (0, 548), 97: (0, 334), 154: (0, 309), 157: (0, 446), 160: (0, 514), 108: (0, 523), 139: (0, 461), 142: (0, 244), 143: (0, 386), 136: (0, 155), 79: (0, 284), 132: (0, 532), 135: (0, 448), 114: (0, 344), 181: (0, 152), 93: (0, 185), 116: (0, 161), 81: (0, 107), 88: (0, 143), 159: (0, 322), 150: (0, 83), 89: (0, 252), 122: (0, 427), 69: (0, 441), 145: (0, 166), 129: (0, 210), 182: (0, 607), 109: (0, 235), 82: (0, 259), 101: (0, 9), 77: (0, 1), 127: (0, 22), 95: (0, 42), 104: (0, 14), 102: (0, 75), 113: (0, 97), 64: (0, 120), 131: (0, 86), 72: (0, 90), 151: (0, 94), 141: (0, 103), 103: (0, 115), 153: (0, 67), 147: (0, 31), 68: (0, 6), 138: (0, 57), 140: (0, 64), 105: (0, 62), 27: (0, 44), 111: (0, 45), 183: (0, 59), 94: (0, 61), 137: (0, 28), 85: (0, 36), 99: (0, 52), 107: (0, 20), 167: (0, 29), 87: (0, 3), 86: (0, 12), 80: (0, 21), 83: (0, 15), 110: (0, 4), 70: (0, 8), 133: (0, 5), 130: (0, 10), 73: (0, 13), 124: (0, 66), 148: (0, 24), 125: (0, 37), 156: (0, 50), 119: (0, 55), 184: (0, 60), 98: (0, 65), 112: (0, 48), 158: (0, 46), 155: (0, 49), 162: (0, 53), 78: (0, 11), 106: (0, 16), 76: (0, 63), 146: (0, 18), 3: (0, 19), 128: (0, 40), 118: (0, 23), 66: (0, 25), 71: (0, 26), 120: (0, 27), 67: (0, 30), 161: (0, 32), 84: (0, 33), 149: (0, 35), 65: (0, 38), 96: (0, 39), 144: (0, 47), 152: (0, 43), 63: (0, 175), 75: (0, 473), 134: (0, 285), 90: (0, 457), 115: (0, 411), 40: (1, {'@': 16}), 41: (1, {'@': 16}), 91: (1, {'@': 0})}, 315: {27: (0, 417), 3: (0, 587), 21: (0, 186), 28: (0, 302), 15: (0, 226), 10: (0, 543), 12: (0, 456), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 316: {40: (1, {'@': 251}), 41: (1, {'@': 251})}, 317: {40: (1, {'@': 321}), 41: (1, {'@': 321}), 42: (1, {'@': 321})}, 318: {42: (1, {'@': 335}), 40: (1, {'@': 335}), 41: (1, {'@': 335})}, 319: {177: (0, 467)}, 320: {42: (0, 273)}, 321: {40: (1, {'@': 162}), 41: (1, {'@': 162})}, 322: {1: (0, 111), 3: (0, 587), 6: (0, 581), 52: (0, 541), 121: (0, 272), 8: (0, 529), 53: (0, 577), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 10: (0, 393), 18: (0, 192), 20: (0, 414), 21: (0, 186), 54: (0, 440), 22: (0, 368), 56: (0, 463), 177: (0, 266), 27: (0, 417), 28: (0, 302), 17: (0, 211), 5: (0, 373), 39: (0, 470), 57: (0, 558), 58: (0, 524), 34: (0, 511), 35: (0, 347)}, 323: {38: (0, 358)}, 324: {40: (1, {'@': 78}), 41: (1, {'@': 78})}, 325: {26: (0, 468)}, 326: {40: (1, {'@': 158}), 41: (1, {'@': 158})}, 327: {42: (0, 108)}, 328: {40: (1, {'@': 160}), 41: (1, {'@': 160})}, 329: {42: (0, 544)}, 330: {178: (0, 455)}, 331: {40: (1, {'@': 190}), 41: (1, {'@': 190})}, 332: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 52: (0, 447), 39: (0, 421), 17: (0, 211), 18: (0, 192), 21: (0, 186), 22: (0, 403), 10: (0, 432), 56: (0, 405), 27: (0, 417), 53: (0, 394), 28: (0, 302), 5: (0, 373), 34: (0, 511), 58: (0, 388), 20: (0, 414), 35: (0, 347)}, 333: {178: (0, 450)}, 334: {57: (0, 558), 58: (0, 524), 52: (0, 541), 121: (0, 17), 177: (0, 296), 54: (0, 374), 53: (0, 577), 56: (0, 463), 39: (0, 470)}, 335: {42: (0, 308)}, 336: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 22: (0, 207), 13: (0, 383), 14: (0, 517), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 337: {42: (0, 596)}, 338: {176: (0, 225)}, 339: {40: (1, {'@': 33}), 41: (1, {'@': 33})}, 340: {40: (1, {'@': 156}), 41: (1, {'@': 156})}, 341: {42: (1, {'@': 331}), 40: (1, {'@': 331}), 41: (1, {'@': 331})}, 342: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 10: (0, 481), 15: (0, 226), 17: (0, 211), 18: (0, 192), 22: (0, 482), 21: (0, 186), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 343: {40: (1, {'@': 255}), 41: (1, {'@': 255}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 344: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 22: (0, 198), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 345: {40: (1, {'@': 30}), 41: (1, {'@': 30})}, 346: {40: (1, {'@': 242}), 41: (1, {'@': 242})}, 347: {168: (1, {'@': 341}), 169: (1, {'@': 341}), 170: (1, {'@': 341}), 171: (1, {'@': 341}), 172: (1, {'@': 341}), 40: (1, {'@': 351}), 41: (1, {'@': 351}), 42: (1, {'@': 351}), 176: (1, {'@': 351}), 180: (1, {'@': 351}), 178: (1, {'@': 351})}, 348: {2: (0, 537), 5: (0, 590), 0: (0, 208), 16: (0, 356), 24: (0, 564), 25: (0, 485), 26: (0, 518), 36: (0, 360), 32: (0, 363), 31: (0, 565), 33: (0, 602), 37: (0, 402), 38: (0, 592)}, 349: {42: (0, 489)}, 350: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 52: (0, 447), 17: (0, 211), 18: (0, 192), 21: (0, 186), 22: (0, 403), 58: (0, 579), 10: (0, 432), 56: (0, 405), 39: (0, 583), 27: (0, 417), 53: (0, 394), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 351: {40: (1, {'@': 252}), 41: (1, {'@': 252})}, 352: {40: (1, {'@': 322}), 41: (1, {'@': 322}), 42: (1, {'@': 322})}, 353: {42: (1, {'@': 333}), 40: (1, {'@': 333}), 41: (1, {'@': 333})}, 354: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 286), 14: (0, 598), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 22: (0, 70), 20: (0, 414), 35: (0, 347)}, 355: {27: (0, 417), 3: (0, 587), 12: (0, 248), 6: (0, 581), 21: (0, 186), 28: (0, 302), 14: (0, 431), 15: (0, 226), 18: (0, 119), 5: (0, 373), 13: (0, 535), 185: (0, 154), 10: (0, 163)}, 356: {40: (1, {'@': 157}), 41: (1, {'@': 157})}, 357: {91: (1, {'@': 5}), 41: (1, {'@': 5})}, 358: {178: (0, 232)}, 359: {178: (0, 475)}, 360: {40: (1, {'@': 159}), 41: (1, {'@': 159})}, 361: {40: (1, {'@': 67}), 41: (1, {'@': 67}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 362: {42: (0, 589)}, 363: {40: (1, {'@': 155}), 41: (1, {'@': 155})}, 364: {42: (0, 385)}, 365: {40: (1, {'@': 324}), 41: (1, {'@': 324}), 42: (1, {'@': 324})}, 366: {40: (1, {'@': 83}), 41: (1, {'@': 83})}, 367: {42: (0, 591)}, 368: {40: (1, {'@': 264}), 41: (1, {'@': 264})}, 369: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 38: (0, 592), 10: (0, 253), 24: (0, 564), 25: (0, 485), 16: (0, 95), 26: (0, 518), 27: (0, 417), 28: (0, 302), 22: (0, 100), 5: (0, 373), 31: (0, 565), 34: (0, 511), 33: (0, 602), 32: (0, 101), 20: (0, 414), 35: (0, 347), 37: (0, 402)}, 370: {40: (1, {'@': 133}), 41: (1, {'@': 133})}, 371: {168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 40: (1, {'@': 145}), 41: (1, {'@': 145})}, 372: {40: (1, {'@': 191}), 41: (1, {'@': 191})}, 373: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 22: (0, 403), 10: (0, 432), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 374: {40: (1, {'@': 138}), 41: (1, {'@': 138})}, 375: {40: (1, {'@': 35}), 41: (1, {'@': 35})}, 376: {40: (1, {'@': 247}), 41: (1, {'@': 247})}, 377: {40: (1, {'@': 31}), 41: (1, {'@': 31})}, 378: {40: (1, {'@': 111}), 41: (1, {'@': 111})}, 379: {40: (1, {'@': 26}), 41: (1, {'@': 26})}, 380: {42: (0, 236)}, 381: {40: (1, {'@': 142}), 41: (1, {'@': 142})}, 382: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 22: (0, 269), 34: (0, 511), 20: (0, 414), 35: (0, 347), 38: (0, 93)}, 383: {27: (0, 417), 3: (0, 587), 21: (0, 186), 12: (0, 486), 10: (0, 566), 28: (0, 302), 15: (0, 226), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 384: {42: (0, 559)}, 385: {1: (0, 111), 3: (0, 587), 6: (0, 581), 7: (0, 317), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 19: (0, 365), 18: (0, 192), 38: (0, 592), 20: (0, 414), 21: (0, 186), 23: (0, 352), 10: (0, 253), 25: (0, 485), 26: (0, 518), 27: (0, 417), 29: (0, 311), 28: (0, 302), 37: (0, 125), 17: (0, 211), 5: (0, 373), 32: (0, 127), 22: (0, 131), 33: (0, 602), 34: (0, 511), 35: (0, 347), 9: (0, 133)}, 386: {40: (1, {'@': 236}), 41: (1, {'@': 236})}, 387: {42: (1, {'@': 338}), 40: (1, {'@': 338}), 41: (1, {'@': 338})}, 388: {178: (0, 349)}, 389: {3: (0, 587), 6: (0, 581), 13: (0, 535), 14: (0, 431), 15: (0, 226), 12: (0, 248), 34: (0, 230), 18: (0, 192), 21: (0, 186), 10: (0, 149), 27: (0, 417), 28: (0, 302), 5: (0, 373), 8: (0, 229)}, 390: {40: (1, {'@': 148}), 41: (1, {'@': 148})}, 391: {40: (1, {'@': 188}), 41: (1, {'@': 188})}, 392: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 22: (0, 403), 10: (0, 432), 38: (0, 96), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 393: {40: (1, {'@': 265}), 41: (1, {'@': 265}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346})}, 394: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 169), 14: (0, 315), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 22: (0, 359), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 395: {42: (0, 510), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346})}, 396: {40: (1, {'@': 34}), 41: (1, {'@': 34})}, 397: {168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 40: (1, {'@': 174}), 41: (1, {'@': 174})}, 398: {40: (1, {'@': 29}), 41: (1, {'@': 29})}, 399: {40: (1, {'@': 310}), 41: (1, {'@': 310})}, 400: {40: (1, {'@': 77}), 41: (1, {'@': 77})}, 401: {40: (1, {'@': 189}), 41: (1, {'@': 189})}, 402: {40: (1, {'@': 316}), 41: (1, {'@': 316}), 42: (1, {'@': 316})}, 403: {178: (0, 153)}, 404: {42: (1, {'@': 267}), 41: (1, {'@': 267}), 40: (1, {'@': 267})}, 405: {1: (0, 111), 3: (0, 587), 6: (0, 581), 14: (0, 214), 8: (0, 529), 13: (0, 278), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 22: (0, 312), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 406: {40: (1, {'@': 113}), 41: (1, {'@': 113})}, 407: {42: (0, 194), 40: (1, {'@': 50}), 41: (1, {'@': 50})}, 408: {40: (1, {'@': 18}), 41: (1, {'@': 18})}, 409: {40: (1, {'@': 23}), 41: (1, {'@': 23})}, 410: {40: (1, {'@': 112}), 41: (1, {'@': 112})}, 411: {3: (1, {'@': 293}), 23: (1, {'@': 293}), 19: (1, {'@': 293}), 2: (1, {'@': 293}), 25: (1, {'@': 293}), 31: (1, {'@': 293}), 32: (1, {'@': 293}), 38: (1, {'@': 293}), 27: (1, {'@': 293}), 33: (1, {'@': 293}), 14: (1, {'@': 293}), 5: (1, {'@': 293}), 29: (1, {'@': 293}), 24: (1, {'@': 293}), 7: (1, {'@': 293}), 21: (1, {'@': 293}), 26: (1, {'@': 293}), 28: (1, {'@': 293}), 13: (1, {'@': 293})}, 412: {27: (0, 417), 3: (0, 587), 12: (0, 248), 6: (0, 581), 21: (0, 186), 28: (0, 302), 14: (0, 431), 15: (0, 226), 185: (0, 213), 18: (0, 119), 5: (0, 373), 13: (0, 535), 10: (0, 163)}, 413: {40: (1, {'@': 140}), 41: (1, {'@': 140})}, 414: {14: (0, 594), 13: (0, 389)}, 415: {40: (1, {'@': 279}), 41: (1, {'@': 279}), 42: (1, {'@': 279})}, 416: {40: (1, {'@': 127}), 41: (1, {'@': 127})}, 417: {174: (1, {'@': 375}), 168: (1, {'@': 375}), 40: (1, {'@': 375}), 14: (1, {'@': 375}), 173: (1, {'@': 375}), 169: (1, {'@': 375}), 170: (1, {'@': 375}), 171: (1, {'@': 375}), 65: (1, {'@': 375}), 172: (1, {'@': 375}), 41: (1, {'@': 375}), 13: (1, {'@': 375}), 175: (1, {'@': 375}), 42: (1, {'@': 375}), 176: (1, {'@': 375}), 178: (1, {'@': 375}), 180: (1, {'@': 375})}, 418: {180: (0, 156)}, 419: {42: (0, 484)}, 420: {59: (0, 165)}, 421: {178: (0, 257)}, 422: {40: (1, {'@': 24}), 41: (1, {'@': 24})}, 423: {40: (1, {'@': 278}), 41: (1, {'@': 278}), 42: (1, {'@': 278})}, 424: {40: (1, {'@': 102}), 41: (1, {'@': 102})}, 425: {40: (1, {'@': 124}), 41: (1, {'@': 124}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346})}, 426: {27: (0, 417), 3: (0, 587), 12: (0, 248), 6: (0, 581), 21: (0, 186), 28: (0, 302), 185: (0, 205), 14: (0, 431), 15: (0, 226), 18: (0, 119), 5: (0, 373), 13: (0, 535), 10: (0, 163)}, 427: {24: (1, {'@': 303}), 33: (1, {'@': 303}), 32: (1, {'@': 303}), 2: (1, {'@': 303}), 26: (1, {'@': 303}), 25: (1, {'@': 303}), 38: (1, {'@': 303}), 31: (1, {'@': 303}), 5: (1, {'@': 303})}, 428: {40: (1, {'@': 134}), 41: (1, {'@': 134}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 429: {40: (1, {'@': 103}), 41: (1, {'@': 103})}, 430: {40: (1, {'@': 87}), 41: (1, {'@': 87})}, 431: {27: (0, 417), 3: (0, 587), 21: (0, 186), 28: (0, 302), 15: (0, 226), 12: (0, 456), 10: (0, 466), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 432: {178: (0, 187), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 433: {40: (1, {'@': 105}), 41: (1, {'@': 105})}, 434: {40: (1, {'@': 123}), 41: (1, {'@': 123})}, 435: {42: (0, 319)}, 436: {58: (0, 586), 59: (0, 406), 39: (0, 378), 52: (0, 410)}, 437: {40: (1, {'@': 309}), 41: (1, {'@': 309})}, 438: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 22: (0, 218), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 221), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 439: {40: (1, {'@': 104}), 41: (1, {'@': 104})}, 440: {40: (1, {'@': 136}), 41: (1, {'@': 136})}, 441: {27: (0, 299), 186: (0, 407)}, 442: {42: (0, 104)}, 443: {52: (0, 313), 57: (0, 224), 53: (0, 577), 38: (0, 270), 56: (0, 463)}, 444: {1: (0, 111), 3: (0, 587), 6: (0, 581), 10: (0, 264), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 22: (0, 268), 17: (0, 211), 52: (0, 271), 18: (0, 192), 21: (0, 186), 39: (0, 275), 58: (0, 279), 27: (0, 417), 28: (0, 302), 59: (0, 281), 32: (0, 283), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 445: {40: (1, {'@': 244}), 41: (1, {'@': 244})}, 446: {2: (0, 68), 5: (0, 546), 30: (0, 222), 10: (0, 384)}, 447: {178: (0, 423)}, 448: {40: (1, {'@': 230}), 41: (1, {'@': 230})}, 449: {40: (1, {'@': 308}), 41: (1, {'@': 308})}, 450: {40: (1, {'@': 88}), 41: (1, {'@': 88})}, 451: {40: (1, {'@': 313}), 41: (1, {'@': 313})}, 452: {42: (0, 212), 40: (1, {'@': 68}), 41: (1, {'@': 68})}, 453: {40: (1, {'@': 89}), 41: (1, {'@': 89})}, 454: {40: (1, {'@': 246}), 41: (1, {'@': 246})}, 455: {40: (1, {'@': 243}), 41: (1, {'@': 243})}, 456: {174: (1, {'@': 368}), 168: (1, {'@': 368}), 40: (1, {'@': 368}), 14: (1, {'@': 368}), 173: (1, {'@': 368}), 169: (1, {'@': 368}), 170: (1, {'@': 368}), 171: (1, {'@': 368}), 65: (1, {'@': 368}), 172: (1, {'@': 368}), 41: (1, {'@': 368}), 13: (1, {'@': 368}), 175: (1, {'@': 368}), 42: (1, {'@': 368}), 176: (1, {'@': 368}), 178: (1, {'@': 368}), 180: (1, {'@': 368})}, 457: {40: (1, {'@': 192}), 41: (1, {'@': 192})}, 458: {40: (1, {'@': 154}), 41: (1, {'@': 154})}, 459: {40: (1, {'@': 166}), 41: (1, {'@': 166}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 460: {2: (0, 537), 5: (0, 590), 32: (0, 245), 0: (0, 458), 24: (0, 564), 25: (0, 485), 36: (0, 533), 26: (0, 518), 31: (0, 565), 16: (0, 578), 33: (0, 602), 37: (0, 402), 38: (0, 592)}, 461: {1: (0, 111), 22: (0, 193), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 462: {40: (1, {'@': 165}), 41: (1, {'@': 165})}, 463: {40: (1, {'@': 329}), 41: (1, {'@': 329}), 42: (1, {'@': 329}), 176: (1, {'@': 329}), 178: (1, {'@': 329})}, 464: {168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 42: (1, {'@': 275}), 41: (1, {'@': 275}), 40: (1, {'@': 275}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 465: {42: (0, 348)}, 466: {174: (1, {'@': 370}), 168: (1, {'@': 370}), 40: (1, {'@': 370}), 14: (1, {'@': 370}), 173: (1, {'@': 370}), 169: (1, {'@': 370}), 170: (1, {'@': 370}), 171: (1, {'@': 370}), 65: (1, {'@': 370}), 172: (1, {'@': 370}), 41: (1, {'@': 370}), 13: (1, {'@': 370}), 175: (1, {'@': 370}), 42: (1, {'@': 370}), 176: (1, {'@': 370}), 178: (1, {'@': 370}), 180: (1, {'@': 370})}, 467: {187: (0, 206)}, 468: {40: (1, {'@': 245}), 41: (1, {'@': 245})}, 469: {1: (0, 111), 3: (0, 587), 2: (0, 537), 6: (0, 581), 5: (0, 263), 7: (0, 317), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 16: (0, 570), 18: (0, 192), 19: (0, 365), 36: (0, 203), 21: (0, 186), 38: (0, 592), 22: (0, 370), 23: (0, 352), 10: (0, 428), 24: (0, 564), 25: (0, 485), 26: (0, 518), 27: (0, 417), 28: (0, 302), 29: (0, 311), 31: (0, 565), 32: (0, 479), 34: (0, 511), 9: (0, 118), 33: (0, 602), 20: (0, 414), 35: (0, 347), 37: (0, 402), 0: (0, 256)}, 470: {40: (1, {'@': 326}), 41: (1, {'@': 326}), 42: (1, {'@': 326})}, 471: {41: (0, 126)}, 472: {52: (0, 553), 32: (0, 442)}, 473: {40: (1, {'@': 212}), 41: (1, {'@': 212})}, 474: {40: (1, {'@': 170}), 41: (1, {'@': 170})}, 475: {40: (1, {'@': 281}), 41: (1, {'@': 281}), 42: (1, {'@': 281})}, 476: {40: (1, {'@': 59}), 41: (1, {'@': 59})}, 477: {42: (0, 73)}, 478: {42: (0, 584)}, 479: {40: (1, {'@': 130}), 41: (1, {'@': 130})}, 480: {42: (0, 89)}, 481: {40: (1, {'@': 164}), 41: (1, {'@': 164}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 482: {40: (1, {'@': 163}), 41: (1, {'@': 163})}, 483: {40: (1, {'@': 257}), 41: (1, {'@': 257}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 484: {1: (0, 111), 2: (0, 81), 3: (0, 587), 57: (0, 144), 6: (0, 581), 8: (0, 529), 53: (0, 577), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 52: (0, 422), 18: (0, 192), 20: (0, 414), 21: (0, 186), 10: (0, 69), 56: (0, 463), 27: (0, 417), 30: (0, 91), 28: (0, 302), 17: (0, 211), 5: (0, 373), 34: (0, 511), 22: (0, 74), 35: (0, 347)}, 485: {40: (1, {'@': 320}), 41: (1, {'@': 320}), 42: (1, {'@': 320})}, 486: {174: (1, {'@': 367}), 168: (1, {'@': 367}), 40: (1, {'@': 367}), 14: (1, {'@': 367}), 173: (1, {'@': 367}), 169: (1, {'@': 367}), 170: (1, {'@': 367}), 171: (1, {'@': 367}), 65: (1, {'@': 367}), 172: (1, {'@': 367}), 41: (1, {'@': 367}), 13: (1, {'@': 367}), 175: (1, {'@': 367}), 42: (1, {'@': 367}), 176: (1, {'@': 367}), 178: (1, {'@': 367}), 180: (1, {'@': 367})}, 487: {3: (1, {'@': 11}), 62: (1, {'@': 11}), 63: (1, {'@': 11}), 114: (1, {'@': 11}), 64: (1, {'@': 11}), 65: (1, {'@': 11}), 115: (1, {'@': 11}), 66: (1, {'@': 11}), 67: (1, {'@': 11}), 68: (1, {'@': 11}), 69: (1, {'@': 11}), 70: (1, {'@': 11}), 71: (1, {'@': 11}), 72: (1, {'@': 11}), 116: (1, {'@': 11}), 117: (1, {'@': 11}), 73: (1, {'@': 11}), 118: (1, {'@': 11}), 119: (1, {'@': 11}), 120: (1, {'@': 11}), 74: (1, {'@': 11}), 75: (1, {'@': 11}), 121: (1, {'@': 11}), 122: (1, {'@': 11}), 123: (1, {'@': 11}), 76: (1, {'@': 11}), 124: (1, {'@': 11}), 125: (1, {'@': 11}), 126: (1, {'@': 11}), 127: (1, {'@': 11}), 27: (1, {'@': 11}), 128: (1, {'@': 11}), 77: (1, {'@': 11}), 129: (1, {'@': 11}), 78: (1, {'@': 11}), 130: (1, {'@': 11}), 131: (1, {'@': 11}), 79: (1, {'@': 11}), 80: (1, {'@': 11}), 81: (1, {'@': 11}), 82: (1, {'@': 11}), 83: (1, {'@': 11}), 132: (1, {'@': 11}), 133: (1, {'@': 11}), 134: (1, {'@': 11}), 84: (1, {'@': 11}), 85: (1, {'@': 11}), 161: (1, {'@': 11}), 135: (1, {'@': 11}), 136: (1, {'@': 11}), 86: (1, {'@': 11}), 87: (1, {'@': 11}), 137: (1, {'@': 11}), 88: (1, {'@': 11}), 138: (1, {'@': 11}), 89: (1, {'@': 11}), 90: (1, {'@': 11}), 91: (1, {'@': 11}), 92: (1, {'@': 11}), 93: (1, {'@': 11}), 139: (1, {'@': 11}), 140: (1, {'@': 11}), 94: (1, {'@': 11}), 141: (1, {'@': 11}), 95: (1, {'@': 11}), 142: (1, {'@': 11}), 96: (1, {'@': 11}), 143: (1, {'@': 11}), 144: (1, {'@': 11}), 145: (1, {'@': 11}), 146: (1, {'@': 11}), 147: (1, {'@': 11}), 97: (1, {'@': 11}), 98: (1, {'@': 11}), 148: (1, {'@': 11}), 99: (1, {'@': 11}), 149: (1, {'@': 11}), 41: (1, {'@': 11}), 150: (1, {'@': 11}), 151: (1, {'@': 11}), 152: (1, {'@': 11}), 100: (1, {'@': 11}), 101: (1, {'@': 11}), 102: (1, {'@': 11}), 40: (1, {'@': 11}), 153: (1, {'@': 11}), 103: (1, {'@': 11}), 154: (1, {'@': 11}), 104: (1, {'@': 11}), 105: (1, {'@': 11}), 155: (1, {'@': 11}), 106: (1, {'@': 11}), 107: (1, {'@': 11}), 156: (1, {'@': 11}), 157: (1, {'@': 11}), 158: (1, {'@': 11}), 108: (1, {'@': 11}), 109: (1, {'@': 11}), 110: (1, {'@': 11}), 111: (1, {'@': 11}), 159: (1, {'@': 11}), 160: (1, {'@': 11}), 112: (1, {'@': 11}), 162: (1, {'@': 11}), 113: (1, {'@': 11})}, 488: {174: (1, {'@': 369}), 168: (1, {'@': 369}), 40: (1, {'@': 369}), 14: (1, {'@': 369}), 173: (1, {'@': 369}), 169: (1, {'@': 369}), 170: (1, {'@': 369}), 171: (1, {'@': 369}), 65: (1, {'@': 369}), 172: (1, {'@': 369}), 41: (1, {'@': 369}), 13: (1, {'@': 369}), 175: (1, {'@': 369}), 42: (1, {'@': 369}), 176: (1, {'@': 369}), 178: (1, {'@': 369}), 180: (1, {'@': 369})}, 489: {32: (0, 134)}, 490: {42: (0, 288), 40: (1, {'@': 53}), 41: (1, {'@': 53})}, 491: {3: (1, {'@': 10}), 62: (1, {'@': 10}), 63: (1, {'@': 10}), 114: (1, {'@': 10}), 64: (1, {'@': 10}), 65: (1, {'@': 10}), 115: (1, {'@': 10}), 66: (1, {'@': 10}), 67: (1, {'@': 10}), 68: (1, {'@': 10}), 69: (1, {'@': 10}), 70: (1, {'@': 10}), 71: (1, {'@': 10}), 72: (1, {'@': 10}), 116: (1, {'@': 10}), 117: (1, {'@': 10}), 73: (1, {'@': 10}), 118: (1, {'@': 10}), 119: (1, {'@': 10}), 120: (1, {'@': 10}), 74: (1, {'@': 10}), 75: (1, {'@': 10}), 121: (1, {'@': 10}), 122: (1, {'@': 10}), 123: (1, {'@': 10}), 76: (1, {'@': 10}), 124: (1, {'@': 10}), 125: (1, {'@': 10}), 126: (1, {'@': 10}), 127: (1, {'@': 10}), 27: (1, {'@': 10}), 128: (1, {'@': 10}), 77: (1, {'@': 10}), 129: (1, {'@': 10}), 78: (1, {'@': 10}), 130: (1, {'@': 10}), 131: (1, {'@': 10}), 79: (1, {'@': 10}), 80: (1, {'@': 10}), 81: (1, {'@': 10}), 82: (1, {'@': 10}), 83: (1, {'@': 10}), 132: (1, {'@': 10}), 133: (1, {'@': 10}), 134: (1, {'@': 10}), 84: (1, {'@': 10}), 85: (1, {'@': 10}), 161: (1, {'@': 10}), 135: (1, {'@': 10}), 136: (1, {'@': 10}), 86: (1, {'@': 10}), 87: (1, {'@': 10}), 137: (1, {'@': 10}), 88: (1, {'@': 10}), 138: (1, {'@': 10}), 89: (1, {'@': 10}), 90: (1, {'@': 10}), 91: (1, {'@': 10}), 92: (1, {'@': 10}), 93: (1, {'@': 10}), 139: (1, {'@': 10}), 140: (1, {'@': 10}), 94: (1, {'@': 10}), 141: (1, {'@': 10}), 95: (1, {'@': 10}), 142: (1, {'@': 10}), 96: (1, {'@': 10}), 143: (1, {'@': 10}), 144: (1, {'@': 10}), 145: (1, {'@': 10}), 146: (1, {'@': 10}), 147: (1, {'@': 10}), 97: (1, {'@': 10}), 98: (1, {'@': 10}), 148: (1, {'@': 10}), 99: (1, {'@': 10}), 149: (1, {'@': 10}), 41: (1, {'@': 10}), 150: (1, {'@': 10}), 151: (1, {'@': 10}), 152: (1, {'@': 10}), 100: (1, {'@': 10}), 101: (1, {'@': 10}), 102: (1, {'@': 10}), 40: (1, {'@': 10}), 153: (1, {'@': 10}), 103: (1, {'@': 10}), 154: (1, {'@': 10}), 104: (1, {'@': 10}), 105: (1, {'@': 10}), 155: (1, {'@': 10}), 106: (1, {'@': 10}), 107: (1, {'@': 10}), 156: (1, {'@': 10}), 157: (1, {'@': 10}), 158: (1, {'@': 10}), 108: (1, {'@': 10}), 109: (1, {'@': 10}), 110: (1, {'@': 10}), 111: (1, {'@': 10}), 159: (1, {'@': 10}), 160: (1, {'@': 10}), 112: (1, {'@': 10}), 162: (1, {'@': 10}), 113: (1, {'@': 10})}, 492: {32: (0, 605)}, 493: {42: (1, {'@': 274}), 41: (1, {'@': 274}), 40: (1, {'@': 274})}, 494: {41: (0, 357), 91: (1, {'@': 2})}, 495: {42: (1, {'@': 271}), 41: (1, {'@': 271}), 40: (1, {'@': 271})}, 496: {3: (1, {'@': 15}), 62: (1, {'@': 15}), 63: (1, {'@': 15}), 114: (1, {'@': 15}), 64: (1, {'@': 15}), 65: (1, {'@': 15}), 115: (1, {'@': 15}), 66: (1, {'@': 15}), 67: (1, {'@': 15}), 68: (1, {'@': 15}), 69: (1, {'@': 15}), 70: (1, {'@': 15}), 71: (1, {'@': 15}), 72: (1, {'@': 15}), 116: (1, {'@': 15}), 117: (1, {'@': 15}), 73: (1, {'@': 15}), 118: (1, {'@': 15}), 119: (1, {'@': 15}), 120: (1, {'@': 15}), 74: (1, {'@': 15}), 75: (1, {'@': 15}), 121: (1, {'@': 15}), 122: (1, {'@': 15}), 123: (1, {'@': 15}), 76: (1, {'@': 15}), 124: (1, {'@': 15}), 125: (1, {'@': 15}), 126: (1, {'@': 15}), 127: (1, {'@': 15}), 27: (1, {'@': 15}), 128: (1, {'@': 15}), 77: (1, {'@': 15}), 129: (1, {'@': 15}), 78: (1, {'@': 15}), 130: (1, {'@': 15}), 131: (1, {'@': 15}), 79: (1, {'@': 15}), 80: (1, {'@': 15}), 81: (1, {'@': 15}), 82: (1, {'@': 15}), 83: (1, {'@': 15}), 132: (1, {'@': 15}), 133: (1, {'@': 15}), 134: (1, {'@': 15}), 84: (1, {'@': 15}), 85: (1, {'@': 15}), 161: (1, {'@': 15}), 135: (1, {'@': 15}), 136: (1, {'@': 15}), 86: (1, {'@': 15}), 87: (1, {'@': 15}), 137: (1, {'@': 15}), 88: (1, {'@': 15}), 138: (1, {'@': 15}), 89: (1, {'@': 15}), 90: (1, {'@': 15}), 91: (1, {'@': 15}), 92: (1, {'@': 15}), 93: (1, {'@': 15}), 139: (1, {'@': 15}), 140: (1, {'@': 15}), 94: (1, {'@': 15}), 141: (1, {'@': 15}), 95: (1, {'@': 15}), 142: (1, {'@': 15}), 96: (1, {'@': 15}), 143: (1, {'@': 15}), 144: (1, {'@': 15}), 145: (1, {'@': 15}), 146: (1, {'@': 15}), 147: (1, {'@': 15}), 97: (1, {'@': 15}), 98: (1, {'@': 15}), 148: (1, {'@': 15}), 99: (1, {'@': 15}), 149: (1, {'@': 15}), 41: (1, {'@': 15}), 150: (1, {'@': 15}), 151: (1, {'@': 15}), 152: (1, {'@': 15}), 100: (1, {'@': 15}), 101: (1, {'@': 15}), 102: (1, {'@': 15}), 40: (1, {'@': 15}), 153: (1, {'@': 15}), 103: (1, {'@': 15}), 154: (1, {'@': 15}), 104: (1, {'@': 15}), 105: (1, {'@': 15}), 155: (1, {'@': 15}), 106: (1, {'@': 15}), 107: (1, {'@': 15}), 156: (1, {'@': 15}), 157: (1, {'@': 15}), 158: (1, {'@': 15}), 108: (1, {'@': 15}), 109: (1, {'@': 15}), 110: (1, {'@': 15}), 111: (1, {'@': 15}), 159: (1, {'@': 15}), 160: (1, {'@': 15}), 112: (1, {'@': 15}), 162: (1, {'@': 15}), 113: (1, {'@': 15})}, 497: {42: (1, {'@': 268}), 41: (1, {'@': 268}), 40: (1, {'@': 268})}, 498: {42: (1, {'@': 272}), 41: (1, {'@': 272}), 40: (1, {'@': 272}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 499: {27: (0, 2)}, 500: {42: (0, 261), 40: (1, {'@': 51}), 41: (1, {'@': 51})}, 501: {3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 18: (0, 192), 21: (0, 186), 10: (0, 121), 27: (0, 417), 28: (0, 302), 17: (0, 116), 5: (0, 373), 20: (0, 196), 34: (0, 511)}, 502: {42: (0, 369)}, 503: {40: (1, {'@': 32}), 41: (1, {'@': 32})}, 504: {42: (1, {'@': 273}), 41: (1, {'@': 273}), 40: (1, {'@': 273})}, 505: {40: (1, {'@': 75}), 41: (1, {'@': 75})}, 506: {42: (0, 527)}, 507: {41: (0, 189), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 508: {42: (0, 552)}, 509: {40: (1, {'@': 249}), 41: (1, {'@': 249})}, 510: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 10: (0, 242), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 32: (0, 247), 22: (0, 250), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 511: {174: (0, 355), 65: (0, 426), 175: (0, 412)}, 512: {3: (1, {'@': 12}), 62: (1, {'@': 12}), 63: (1, {'@': 12}), 114: (1, {'@': 12}), 64: (1, {'@': 12}), 65: (1, {'@': 12}), 115: (1, {'@': 12}), 66: (1, {'@': 12}), 67: (1, {'@': 12}), 68: (1, {'@': 12}), 69: (1, {'@': 12}), 70: (1, {'@': 12}), 71: (1, {'@': 12}), 72: (1, {'@': 12}), 116: (1, {'@': 12}), 117: (1, {'@': 12}), 73: (1, {'@': 12}), 118: (1, {'@': 12}), 119: (1, {'@': 12}), 120: (1, {'@': 12}), 74: (1, {'@': 12}), 75: (1, {'@': 12}), 121: (1, {'@': 12}), 122: (1, {'@': 12}), 123: (1, {'@': 12}), 76: (1, {'@': 12}), 124: (1, {'@': 12}), 125: (1, {'@': 12}), 126: (1, {'@': 12}), 127: (1, {'@': 12}), 27: (1, {'@': 12}), 128: (1, {'@': 12}), 77: (1, {'@': 12}), 129: (1, {'@': 12}), 78: (1, {'@': 12}), 130: (1, {'@': 12}), 131: (1, {'@': 12}), 79: (1, {'@': 12}), 80: (1, {'@': 12}), 81: (1, {'@': 12}), 82: (1, {'@': 12}), 83: (1, {'@': 12}), 132: (1, {'@': 12}), 133: (1, {'@': 12}), 134: (1, {'@': 12}), 84: (1, {'@': 12}), 85: (1, {'@': 12}), 161: (1, {'@': 12}), 135: (1, {'@': 12}), 136: (1, {'@': 12}), 86: (1, {'@': 12}), 87: (1, {'@': 12}), 137: (1, {'@': 12}), 88: (1, {'@': 12}), 138: (1, {'@': 12}), 89: (1, {'@': 12}), 90: (1, {'@': 12}), 91: (1, {'@': 12}), 92: (1, {'@': 12}), 93: (1, {'@': 12}), 139: (1, {'@': 12}), 140: (1, {'@': 12}), 94: (1, {'@': 12}), 141: (1, {'@': 12}), 95: (1, {'@': 12}), 142: (1, {'@': 12}), 96: (1, {'@': 12}), 143: (1, {'@': 12}), 144: (1, {'@': 12}), 145: (1, {'@': 12}), 146: (1, {'@': 12}), 147: (1, {'@': 12}), 97: (1, {'@': 12}), 98: (1, {'@': 12}), 148: (1, {'@': 12}), 99: (1, {'@': 12}), 149: (1, {'@': 12}), 41: (1, {'@': 12}), 150: (1, {'@': 12}), 151: (1, {'@': 12}), 152: (1, {'@': 12}), 100: (1, {'@': 12}), 101: (1, {'@': 12}), 102: (1, {'@': 12}), 40: (1, {'@': 12}), 153: (1, {'@': 12}), 103: (1, {'@': 12}), 154: (1, {'@': 12}), 104: (1, {'@': 12}), 105: (1, {'@': 12}), 155: (1, {'@': 12}), 106: (1, {'@': 12}), 107: (1, {'@': 12}), 156: (1, {'@': 12}), 157: (1, {'@': 12}), 158: (1, {'@': 12}), 108: (1, {'@': 12}), 109: (1, {'@': 12}), 110: (1, {'@': 12}), 111: (1, {'@': 12}), 159: (1, {'@': 12}), 160: (1, {'@': 12}), 112: (1, {'@': 12}), 162: (1, {'@': 12}), 113: (1, {'@': 12})}, 513: {40: (1, {'@': 248}), 41: (1, {'@': 248})}, 514: {24: (1, {'@': 307}), 33: (1, {'@': 307}), 32: (1, {'@': 307}), 2: (1, {'@': 307}), 26: (1, {'@': 307}), 25: (1, {'@': 307}), 38: (1, {'@': 307}), 31: (1, {'@': 307}), 5: (1, {'@': 307})}, 515: {59: (0, 290)}, 516: {40: (1, {'@': 280}), 41: (1, {'@': 280}), 42: (1, {'@': 280})}, 517: {27: (0, 417), 3: (0, 587), 21: (0, 186), 28: (0, 302), 15: (0, 226), 12: (0, 456), 10: (0, 569), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 518: {40: (1, {'@': 317}), 41: (1, {'@': 317}), 42: (1, {'@': 317})}, 519: {168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344}), 40: (1, {'@': 61}), 41: (1, {'@': 61})}, 520: {42: (1, {'@': 277}), 41: (1, {'@': 277}), 40: (1, {'@': 277}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 521: {42: (1, {'@': 276}), 41: (1, {'@': 276}), 40: (1, {'@': 276})}, 522: {62: (0, 556), 164: (0, 460), 121: (0, 499), 117: (0, 472), 100: (0, 78), 123: (0, 276), 74: (0, 54), 126: (0, 58), 165: (0, 469), 92: (0, 551), 166: (0, 548), 97: (0, 334), 154: (0, 309), 157: (0, 446), 160: (0, 514), 108: (0, 523), 139: (0, 461), 142: (0, 244), 143: (0, 386), 136: (0, 155), 79: (0, 284), 181: (0, 494), 132: (0, 532), 135: (0, 448), 114: (0, 344), 93: (0, 185), 116: (0, 161), 81: (0, 107), 88: (0, 143), 159: (0, 322), 188: (0, 314), 150: (0, 83), 89: (0, 252), 122: (0, 427), 69: (0, 441), 145: (0, 166), 129: (0, 210), 109: (0, 235), 82: (0, 259), 101: (0, 9), 77: (0, 1), 127: (0, 22), 95: (0, 42), 104: (0, 14), 102: (0, 75), 113: (0, 97), 64: (0, 120), 131: (0, 86), 72: (0, 90), 151: (0, 94), 141: (0, 103), 103: (0, 115), 153: (0, 67), 147: (0, 31), 68: (0, 6), 138: (0, 57), 140: (0, 64), 105: (0, 62), 27: (0, 44), 183: (0, 59), 94: (0, 61), 111: (0, 45), 137: (0, 28), 85: (0, 36), 99: (0, 52), 107: (0, 20), 167: (0, 29), 87: (0, 3), 86: (0, 12), 80: (0, 21), 83: (0, 15), 110: (0, 4), 70: (0, 8), 133: (0, 5), 130: (0, 10), 73: (0, 13), 189: (0, 41), 124: (0, 66), 148: (0, 24), 125: (0, 37), 156: (0, 50), 119: (0, 55), 184: (0, 60), 98: (0, 65), 112: (0, 48), 158: (0, 46), 155: (0, 49), 162: (0, 53), 78: (0, 11), 106: (0, 16), 76: (0, 63), 146: (0, 18), 3: (0, 19), 128: (0, 40), 118: (0, 23), 66: (0, 25), 71: (0, 26), 120: (0, 27), 67: (0, 30), 161: (0, 32), 84: (0, 33), 182: (0, 34), 149: (0, 35), 65: (0, 38), 96: (0, 39), 144: (0, 47), 152: (0, 43), 63: (0, 175), 75: (0, 473), 134: (0, 285), 90: (0, 457), 115: (0, 411), 40: (1, {'@': 16}), 41: (1, {'@': 16}), 91: (1, {'@': 3})}, 523: {40: (1, {'@': 213}), 41: (1, {'@': 213})}, 524: {40: (1, {'@': 325}), 41: (1, {'@': 325}), 42: (1, {'@': 325})}, 525: {168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 42: (1, {'@': 270}), 41: (1, {'@': 270}), 40: (1, {'@': 270}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 526: {40: (1, {'@': 227}), 41: (1, {'@': 227})}, 527: {32: (0, 396)}, 528: {178: (0, 114), 174: (1, {'@': 370}), 168: (1, {'@': 370}), 14: (1, {'@': 370}), 173: (1, {'@': 370}), 169: (1, {'@': 370}), 170: (1, {'@': 370}), 171: (1, {'@': 370}), 65: (1, {'@': 370}), 172: (1, {'@': 370}), 13: (1, {'@': 370}), 175: (1, {'@': 370})}, 529: {168: (1, {'@': 360}), 40: (1, {'@': 360}), 14: (1, {'@': 360}), 169: (1, {'@': 360}), 170: (1, {'@': 360}), 171: (1, {'@': 360}), 172: (1, {'@': 360}), 41: (1, {'@': 360}), 13: (1, {'@': 360}), 174: (1, {'@': 345}), 65: (1, {'@': 345}), 175: (1, {'@': 345}), 42: (1, {'@': 360}), 176: (1, {'@': 360}), 178: (1, {'@': 360}), 180: (1, {'@': 360})}, 530: {42: (0, 280)}, 531: {42: (0, 600), 40: (1, {'@': 69}), 41: (1, {'@': 69})}, 532: {33: (0, 602), 32: (0, 176), 16: (0, 227), 31: (0, 565), 24: (0, 564), 37: (0, 402), 25: (0, 485), 38: (0, 592), 26: (0, 518)}, 533: {40: (1, {'@': 152}), 41: (1, {'@': 152})}, 534: {42: (0, 342)}, 535: {27: (0, 417), 3: (0, 587), 21: (0, 186), 12: (0, 486), 28: (0, 302), 15: (0, 226), 10: (0, 488), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 536: {178: (0, 117), 174: (1, {'@': 369}), 168: (1, {'@': 369}), 14: (1, {'@': 369}), 173: (1, {'@': 369}), 169: (1, {'@': 369}), 170: (1, {'@': 369}), 171: (1, {'@': 369}), 65: (1, {'@': 369}), 172: (1, {'@': 369}), 13: (1, {'@': 369}), 175: (1, {'@': 369})}, 537: {53: (0, 336), 56: (0, 354), 52: (0, 313)}, 538: {1: (0, 111), 38: (0, 330), 3: (0, 587), 6: (0, 581), 8: (0, 529), 57: (0, 333), 52: (0, 447), 53: (0, 577), 12: (0, 248), 13: (0, 535), 14: (0, 431), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 22: (0, 403), 10: (0, 432), 56: (0, 463), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 539: {40: (1, {'@': 60}), 41: (1, {'@': 60})}, 540: {178: (0, 122), 174: (1, {'@': 369}), 168: (1, {'@': 369}), 14: (1, {'@': 369}), 173: (1, {'@': 369}), 169: (1, {'@': 369}), 170: (1, {'@': 369}), 171: (1, {'@': 369}), 65: (1, {'@': 369}), 172: (1, {'@': 369}), 13: (1, {'@': 369}), 175: (1, {'@': 369})}, 541: {40: (1, {'@': 327}), 41: (1, {'@': 327}), 42: (1, {'@': 327})}, 542: {42: (1, {'@': 339}), 40: (1, {'@': 339}), 41: (1, {'@': 339})}, 543: {178: (0, 128), 174: (1, {'@': 370}), 168: (1, {'@': 370}), 14: (1, {'@': 370}), 173: (1, {'@': 370}), 169: (1, {'@': 370}), 170: (1, {'@': 370}), 171: (1, {'@': 370}), 65: (1, {'@': 370}), 172: (1, {'@': 370}), 13: (1, {'@': 370}), 175: (1, {'@': 370})}, 544: {26: (0, 454)}, 545: {176: (0, 174), 174: (1, {'@': 369}), 168: (1, {'@': 369}), 14: (1, {'@': 369}), 173: (1, {'@': 369}), 169: (1, {'@': 369}), 170: (1, {'@': 369}), 171: (1, {'@': 369}), 65: (1, {'@': 369}), 172: (1, {'@': 369}), 13: (1, {'@': 369}), 175: (1, {'@': 369})}, 546: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 38: (0, 109), 18: (0, 192), 20: (0, 414), 21: (0, 186), 22: (0, 403), 10: (0, 432), 27: (0, 417), 28: (0, 302), 17: (0, 211), 5: (0, 373), 34: (0, 511), 35: (0, 347)}, 547: {40: (1, {'@': 173}), 41: (1, {'@': 173})}, 548: {1: (0, 111), 3: (0, 587), 10: (0, 220), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 22: (0, 465), 17: (0, 211), 18: (0, 192), 21: (0, 186), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 549: {27: (0, 417), 3: (0, 587), 12: (0, 248), 6: (0, 581), 21: (0, 186), 28: (0, 302), 14: (0, 431), 15: (0, 226), 18: (0, 119), 185: (0, 145), 5: (0, 373), 13: (0, 535), 10: (0, 163)}, 550: {40: (1, {'@': 287}), 41: (1, {'@': 287}), 42: (1, {'@': 287})}, 551: {40: (1, {'@': 232}), 41: (1, {'@': 232})}, 552: {25: (0, 526)}, 553: {42: (0, 603)}, 554: {40: (1, {'@': 171}), 41: (1, {'@': 171})}, 555: {42: (0, 130)}, 556: {52: (0, 541), 59: (0, 419), 5: (0, 332), 11: (0, 87), 32: (0, 71), 2: (0, 601), 16: (0, 478), 24: (0, 564), 36: (0, 502), 29: (0, 311), 0: (0, 320), 7: (0, 317), 19: (0, 365), 10: (0, 335), 9: (0, 364), 23: (0, 352), 54: (0, 380), 56: (0, 463), 58: (0, 524), 26: (0, 518), 31: (0, 565), 30: (0, 573), 33: (0, 602), 57: (0, 558), 38: (0, 592), 53: (0, 577), 4: (0, 506), 25: (0, 485), 39: (0, 470), 37: (0, 402)}, 557: {1: (0, 111), 10: (0, 306), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 32: (0, 310), 18: (0, 192), 21: (0, 186), 22: (0, 316), 27: (0, 417), 28: (0, 302), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 558: {40: (1, {'@': 328}), 41: (1, {'@': 328}), 42: (1, {'@': 328})}, 559: {32: (0, 372)}, 560: {32: (0, 184)}, 561: {176: (0, 181), 174: (1, {'@': 370}), 168: (1, {'@': 370}), 14: (1, {'@': 370}), 173: (1, {'@': 370}), 169: (1, {'@': 370}), 170: (1, {'@': 370}), 171: (1, {'@': 370}), 65: (1, {'@': 370}), 172: (1, {'@': 370}), 13: (1, {'@': 370}), 175: (1, {'@': 370})}, 562: {2: (0, 537), 16: (0, 326), 5: (0, 590), 24: (0, 564), 0: (0, 321), 25: (0, 485), 26: (0, 518), 36: (0, 328), 31: (0, 565), 32: (0, 340), 33: (0, 602), 37: (0, 402), 38: (0, 592)}, 563: {40: (1, {'@': 286}), 41: (1, {'@': 286}), 42: (1, {'@': 286})}, 564: {40: (1, {'@': 315}), 41: (1, {'@': 315}), 42: (1, {'@': 315})}, 565: {40: (1, {'@': 314}), 41: (1, {'@': 314}), 42: (1, {'@': 314})}, 566: {176: (0, 164), 174: (1, {'@': 369}), 168: (1, {'@': 369}), 14: (1, {'@': 369}), 173: (1, {'@': 369}), 169: (1, {'@': 369}), 170: (1, {'@': 369}), 171: (1, {'@': 369}), 65: (1, {'@': 369}), 172: (1, {'@': 369}), 13: (1, {'@': 369}), 175: (1, {'@': 369})}, 567: {40: (1, {'@': 172}), 41: (1, {'@': 172})}, 568: {3: (0, 587), 6: (0, 581), 20: (0, 188), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 18: (0, 192), 21: (0, 186), 10: (0, 121), 27: (0, 417), 28: (0, 302), 17: (0, 116), 5: (0, 373), 34: (0, 511)}, 569: {176: (0, 168), 174: (1, {'@': 370}), 168: (1, {'@': 370}), 14: (1, {'@': 370}), 173: (1, {'@': 370}), 169: (1, {'@': 370}), 170: (1, {'@': 370}), 171: (1, {'@': 370}), 65: (1, {'@': 370}), 172: (1, {'@': 370}), 13: (1, {'@': 370}), 175: (1, {'@': 370})}, 570: {40: (1, {'@': 128}), 41: (1, {'@': 128})}, 571: {3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 18: (0, 192), 21: (0, 186), 10: (0, 121), 20: (0, 190), 27: (0, 417), 28: (0, 302), 17: (0, 116), 5: (0, 373), 34: (0, 511)}, 572: {176: (0, 139)}, 573: {42: (0, 228)}, 574: {42: (1, {'@': 269}), 41: (1, {'@': 269}), 40: (1, {'@': 269})}, 575: {1: (0, 111), 0: (0, 416), 2: (0, 537), 3: (0, 587), 16: (0, 424), 5: (0, 263), 6: (0, 581), 7: (0, 317), 14: (0, 431), 8: (0, 529), 13: (0, 535), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 19: (0, 365), 20: (0, 414), 21: (0, 186), 10: (0, 425), 38: (0, 592), 23: (0, 352), 9: (0, 429), 24: (0, 564), 25: (0, 485), 26: (0, 518), 27: (0, 417), 28: (0, 302), 29: (0, 311), 31: (0, 565), 34: (0, 511), 36: (0, 433), 33: (0, 602), 35: (0, 347), 22: (0, 434), 37: (0, 402), 32: (0, 439)}, 576: {176: (0, 146)}, 577: {40: (1, {'@': 330}), 41: (1, {'@': 330}), 42: (1, {'@': 330}), 176: (1, {'@': 330}), 178: (1, {'@': 330})}, 578: {40: (1, {'@': 151}), 41: (1, {'@': 151})}, 579: {178: (0, 151)}, 580: {42: (0, 305)}, 581: {173: (0, 549)}, 582: {32: (0, 503)}, 583: {178: (0, 157)}, 584: {1: (0, 111), 10: (0, 179), 2: (0, 537), 3: (0, 587), 5: (0, 263), 6: (0, 581), 7: (0, 317), 16: (0, 409), 9: (0, 77), 36: (0, 82), 8: (0, 529), 13: (0, 535), 12: (0, 248), 14: (0, 431), 15: (0, 226), 17: (0, 211), 19: (0, 365), 18: (0, 192), 38: (0, 592), 20: (0, 414), 21: (0, 186), 23: (0, 352), 24: (0, 564), 25: (0, 485), 22: (0, 85), 26: (0, 518), 27: (0, 417), 29: (0, 311), 28: (0, 302), 0: (0, 88), 32: (0, 92), 31: (0, 565), 34: (0, 511), 33: (0, 602), 35: (0, 347), 37: (0, 402)}, 585: {42: (0, 588)}, 586: {40: (1, {'@': 110}), 41: (1, {'@': 110})}, 587: {174: (1, {'@': 374}), 168: (1, {'@': 374}), 40: (1, {'@': 374}), 14: (1, {'@': 374}), 173: (1, {'@': 374}), 169: (1, {'@': 374}), 170: (1, {'@': 374}), 171: (1, {'@': 374}), 65: (1, {'@': 374}), 172: (1, {'@': 374}), 41: (1, {'@': 374}), 13: (1, {'@': 374}), 175: (1, {'@': 374}), 42: (1, {'@': 374}), 176: (1, {'@': 374}), 178: (1, {'@': 374}), 180: (1, {'@': 374})}, 588: {32: (0, 191)}, 589: {26: (0, 376)}, 590: {56: (0, 405), 53: (0, 394), 52: (0, 447)}, 591: {32: (0, 209), 33: (0, 602), 31: (0, 565), 24: (0, 564), 37: (0, 402), 25: (0, 485), 38: (0, 592), 26: (0, 518), 16: (0, 216)}, 592: {40: (1, {'@': 318}), 41: (1, {'@': 318}), 42: (1, {'@': 318})}, 593: {40: (1, {'@': 177}), 41: (1, {'@': 177}), 168: (1, {'@': 342}), 169: (1, {'@': 342}), 170: (1, {'@': 342}), 171: (1, {'@': 342}), 172: (1, {'@': 342}), 173: (1, {'@': 348}), 174: (1, {'@': 346}), 65: (1, {'@': 346}), 175: (1, {'@': 346}), 13: (1, {'@': 344}), 14: (1, {'@': 344})}, 594: {3: (0, 587), 6: (0, 581), 13: (0, 535), 14: (0, 431), 15: (0, 226), 12: (0, 248), 18: (0, 192), 34: (0, 199), 21: (0, 186), 10: (0, 149), 27: (0, 417), 28: (0, 302), 5: (0, 373), 8: (0, 229)}, 595: {32: (0, 331)}, 596: {33: (0, 602), 16: (0, 197), 31: (0, 565), 24: (0, 564), 37: (0, 402), 32: (0, 202), 25: (0, 485), 38: (0, 592), 26: (0, 518)}, 597: {91: (1, {'@': 4}), 41: (1, {'@': 4})}, 598: {10: (0, 561), 27: (0, 417), 3: (0, 587), 21: (0, 186), 28: (0, 302), 15: (0, 226), 12: (0, 456), 5: (0, 373), 13: (0, 535), 14: (0, 431)}, 599: {40: (1, {'@': 94}), 41: (1, {'@': 94})}, 600: {1: (0, 111), 3: (0, 587), 6: (0, 581), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 17: (0, 211), 18: (0, 192), 21: (0, 186), 10: (0, 253), 27: (0, 417), 28: (0, 302), 22: (0, 295), 5: (0, 373), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 601: {1: (0, 111), 3: (0, 587), 53: (0, 336), 6: (0, 581), 56: (0, 354), 8: (0, 529), 13: (0, 535), 14: (0, 431), 12: (0, 248), 15: (0, 226), 58: (0, 338), 17: (0, 211), 18: (0, 192), 21: (0, 186), 52: (0, 313), 10: (0, 253), 27: (0, 417), 28: (0, 302), 5: (0, 373), 22: (0, 269), 39: (0, 277), 34: (0, 511), 20: (0, 414), 35: (0, 347)}, 602: {40: (1, {'@': 319}), 41: (1, {'@': 319}), 42: (1, {'@': 319})}, 603: {52: (0, 246), 39: (0, 303), 58: (0, 159), 59: (0, 599)}, 604: {38: (0, 102)}, 605: {40: (1, {'@': 46}), 41: (1, {'@': 46})}, 606: {42: (0, 135)}, 607: {62: (1, {'@': 9}), 63: (1, {'@': 9}), 64: (1, {'@': 9}), 65: (1, {'@': 9}), 66: (1, {'@': 9}), 67: (1, {'@': 9}), 68: (1, {'@': 9}), 69: (1, {'@': 9}), 70: (1, {'@': 9}), 71: (1, {'@': 9}), 72: (1, {'@': 9}), 73: (1, {'@': 9}), 74: (1, {'@': 9}), 75: (1, {'@': 9}), 76: (1, {'@': 9}), 27: (1, {'@': 9}), 77: (1, {'@': 9}), 78: (1, {'@': 9}), 79: (1, {'@': 9}), 80: (1, {'@': 9}), 81: (1, {'@': 9}), 82: (1, {'@': 9}), 83: (1, {'@': 9}), 84: (1, {'@': 9}), 85: (1, {'@': 9}), 86: (1, {'@': 9}), 87: (1, {'@': 9}), 88: (1, {'@': 9}), 89: (1, {'@': 9}), 90: (1, {'@': 9}), 91: (1, {'@': 9}), 92: (1, {'@': 9}), 93: (1, {'@': 9}), 94: (1, {'@': 9}), 95: (1, {'@': 9}), 96: (1, {'@': 9}), 97: (1, {'@': 9}), 98: (1, {'@': 9}), 99: (1, {'@': 9}), 100: (1, {'@': 9}), 101: (1, {'@': 9}), 102: (1, {'@': 9}), 40: (1, {'@': 9}), 103: (1, {'@': 9}), 104: (1, {'@': 9}), 105: (1, {'@': 9}), 106: (1, {'@': 9}), 107: (1, {'@': 9}), 108: (1, {'@': 9}), 109: (1, {'@': 9}), 110: (1, {'@': 9}), 111: (1, {'@': 9}), 112: (1, {'@': 9}), 113: (1, {'@': 9}), 3: (1, {'@': 9}), 114: (1, {'@': 9}), 115: (1, {'@': 9}), 116: (1, {'@': 9}), 117: (1, {'@': 9}), 118: (1, {'@': 9}), 119: (1, {'@': 9}), 120: (1, {'@': 9}), 121: (1, {'@': 9}), 122: (1, {'@': 9}), 123: (1, {'@': 9}), 124: (1, {'@': 9}), 125: (1, {'@': 9}), 126: (1, {'@': 9}), 127: (1, {'@': 9}), 128: (1, {'@': 9}), 129: (1, {'@': 9}), 130: (1, {'@': 9}), 131: (1, {'@': 9}), 132: (1, {'@': 9}), 133: (1, {'@': 9}), 134: (1, {'@': 9}), 135: (1, {'@': 9}), 136: (1, {'@': 9}), 137: (1, {'@': 9}), 138: (1, {'@': 9}), 139: (1, {'@': 9}), 140: (1, {'@': 9}), 141: (1, {'@': 9}), 142: (1, {'@': 9}), 143: (1, {'@': 9}), 144: (1, {'@': 9}), 145: (1, {'@': 9}), 146: (1, {'@': 9}), 147: (1, {'@': 9}), 148: (1, {'@': 9}), 149: (1, {'@': 9}), 41: (1, {'@': 9}), 150: (1, {'@': 9}), 151: (1, {'@': 9}), 152: (1, {'@': 9}), 153: (1, {'@': 9}), 154: (1, {'@': 9}), 155: (1, {'@': 9}), 156: (1, {'@': 9}), 157: (1, {'@': 9}), 158: (1, {'@': 9}), 159: (1, {'@': 9}), 160: (1, {'@': 9}), 161: (1, {'@': 9}), 162: (1, {'@': 9})}}, 'start_states': {'start': 522}, 'end_states': {'start': 41}}, '__type__': 'ParsingFrontend'}, 'rules': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}, {'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}, {'@': 107}, {'@': 108}, {'@': 109}, {'@': 110}, {'@': 111}, {'@': 112}, {'@': 113}, {'@': 114}, {'@': 115}, {'@': 116}, {'@': 117}, {'@': 118}, {'@': 119}, {'@': 120}, {'@': 121}, {'@': 122}, {'@': 123}, {'@': 124}, {'@': 125}, {'@': 126}, {'@': 127}, {'@': 128}, {'@': 129}, {'@': 130}, {'@': 131}, {'@': 132}, {'@': 133}, {'@': 134}, {'@': 135}, {'@': 136}, {'@': 137}, {'@': 138}, {'@': 139}, {'@': 140}, {'@': 141}, {'@': 142}, {'@': 143}, {'@': 144}, {'@': 145}, {'@': 146}, {'@': 147}, {'@': 148}, {'@': 149}, {'@': 150}, {'@': 151}, {'@': 152}, {'@': 153}, {'@': 154}, {'@': 155}, {'@': 156}, {'@': 157}, {'@': 158}, {'@': 159}, {'@': 160}, {'@': 161}, {'@': 162}, {'@': 163}, {'@': 164}, {'@': 165}, {'@': 166}, {'@': 167}, {'@': 168}, {'@': 169}, {'@': 170}, {'@': 171}, {'@': 172}, {'@': 173}, {'@': 174}, {'@': 175}, {'@': 176}, {'@': 177}, {'@': 178}, {'@': 179}, {'@': 180}, {'@': 181}, {'@': 182}, {'@': 183}, {'@': 184}, {'@': 185}, {'@': 186}, {'@': 187}, {'@': 188}, {'@': 189}, {'@': 190}, {'@': 191}, {'@': 192}, {'@': 193}, {'@': 194}, {'@': 195}, {'@': 196}, {'@': 197}, {'@': 198}, {'@': 199}, {'@': 200}, {'@': 201}, {'@': 202}, {'@': 203}, {'@': 204}, {'@': 205}, {'@': 206}, {'@': 207}, {'@': 208}, {'@': 209}, {'@': 210}, {'@': 211}, {'@': 212}, {'@': 213}, {'@': 214}, {'@': 215}, {'@': 216}, {'@': 217}, {'@': 218}, {'@': 219}, {'@': 220}, {'@': 221}, {'@': 222}, {'@': 223}, {'@': 224}, {'@': 225}, {'@': 226}, {'@': 227}, {'@': 228}, {'@': 229}, {'@': 230}, {'@': 231}, {'@': 232}, {'@': 233}, {'@': 234}, {'@': 235}, {'@': 236}, {'@': 237}, {'@': 238}, {'@': 239}, {'@': 240}, {'@': 241}, {'@': 242}, {'@': 243}, {'@': 244}, {'@': 245}, {'@': 246}, {'@': 247}, {'@': 248}, {'@': 249}, {'@': 250}, {'@': 251}, {'@': 252}, {'@': 253}, {'@': 254}, {'@': 255}, {'@': 256}, {'@': 257}, {'@': 258}, {'@': 259}, {'@': 260}, {'@': 261}, {'@': 262}, {'@': 263}, {'@': 264}, {'@': 265}, {'@': 266}, {'@': 267}, {'@': 268}, {'@': 269}, {'@': 270}, {'@': 271}, {'@': 272}, {'@': 273}, {'@': 274}, {'@': 275}, {'@': 276}, {'@': 277}, {'@': 278}, {'@': 279}, {'@': 280}, {'@': 281}, {'@': 282}, {'@': 283}, {'@': 284}, {'@': 285}, {'@': 286}, {'@': 287}, {'@': 288}, {'@': 289}, {'@': 290}, {'@': 291}, {'@': 292}, {'@': 293}, {'@': 294}, {'@': 295}, {'@': 296}, {'@': 297}, {'@': 298}, {'@': 299}, {'@': 300}, {'@': 301}, {'@': 302}, {'@': 303}, {'@': 304}, {'@': 305}, {'@': 306}, {'@': 307}, {'@': 308}, {'@': 309}, {'@': 310}, {'@': 311}, {'@': 312}, {'@': 313}, {'@': 314}, {'@': 315}, {'@': 316}, {'@': 317}, {'@': 318}, {'@': 319}, {'@': 320}, {'@': 321}, {'@': 322}, {'@': 323}, {'@': 324}, {'@': 325}, {'@': 326}, {'@': 327}, {'@': 328}, {'@': 329}, {'@': 330}, {'@': 331}, {'@': 332}, {'@': 333}, {'@': 334}, {'@': 335}, {'@': 336}, {'@': 337}, {'@': 338}, {'@': 339}, {'@': 340}, {'@': 341}, {'@': 342}, {'@': 343}, {'@': 344}, {'@': 345}, {'@': 346}, {'@': 347}, {'@': 348}, {'@': 349}, {'@': 350}, {'@': 351}, {'@': 352}, {'@': 353}, {'@': 354}, {'@': 355}, {'@': 356}, {'@': 357}, {'@': 358}, {'@': 359}, {'@': 360}, {'@': 361}, {'@': 362}, {'@': 363}, {'@': 364}, {'@': 365}, {'@': 366}, {'@': 367}, {'@': 368}, {'@': 369}, {'@': 370}, {'@': 371}, {'@': 372}, {'@': 373}, {'@': 374}, {'@': 375}, {'@': 376}, {'@': 377}], 'options': {'debug': False, 'strict': False, 'keep_all_tokens': False, 'tree_class': None, 'cache': False, 'cache_grammar': False, 'postlex': None, 'parser': 'lalr', 'lexer': 'contextual', 'transformer': None, 'start': ['start'], 'priority': 'normal', 'ambiguity': 'auto', 'regex': False, 'propagate_positions': False, 'lexer_callbacks': {}, 'maybe_placeholders': False, 'edit_terminals': None, 'g_regex_flags': 0, 'use_bytes': False, 'ordered_sets': True, 'import_paths': [], 'source_path': None, '_plugins': {}}, '__type__': 'Lark'} +) +MEMO = ( +{0: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 1: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'endline', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 2: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'endline', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 3: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 3, 'alias': 'empty_program', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 4: {'origin': {'name': 'endline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 5: {'origin': {'name': 'endline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'endline', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 6: {'origin': {'name': 'endline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'program_endline2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 7: {'origin': {'name': 'endline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'program_endline2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 8: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'line', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 9: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'line', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 10: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQU', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'def_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 11: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQU', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'def_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 12: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'asms', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'line_asm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 13: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'asms', '__type__': 'NonTerminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'line_asm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 14: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'preproc_line', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'preprocessor_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 15: {'origin': {'name': 'preproc_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': '_INIT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'preproc_line_init', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 16: {'origin': {'name': 'asms', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'asms_empty', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 17: {'origin': {'name': 'asms', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'asm', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'asms_asm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 18: {'origin': {'name': 'asms', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'asms', '__type__': 'NonTerminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'asm', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'asms_asms_asm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 19: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'asm_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 20: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'asm_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 21: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 22: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 23: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 24: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 25: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 6, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 26: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 7, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 27: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 8, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 28: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 9, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 29: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 10, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 30: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 11, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 31: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'I', 'filter_out': False, '__type__': 'Terminal'}], 'order': 12, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 32: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'I', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 13, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 33: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'R', 'filter_out': False, '__type__': 'Terminal'}], 'order': 14, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 34: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'R', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 15, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 35: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 16, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 36: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 17, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 37: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 18, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 38: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg_bcde', '__type__': 'NonTerminal'}], 'order': 19, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 39: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 20, 'alias': 'asm_ld8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 40: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 21, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 41: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 22, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 42: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 23, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 43: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 24, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 44: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 25, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 45: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 26, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 46: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 27, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 47: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 28, 'alias': 'ld_a_instr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 48: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PROC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 29, 'alias': 'proc_scope', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 49: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ENDP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 30, 'alias': 'endp_scope', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 50: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LOCAL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'id_list', '__type__': 'NonTerminal'}], 'order': 31, 'alias': 'local_labels', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 51: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEFB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_list', '__type__': 'NonTerminal'}], 'order': 32, 'alias': 'defb_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 52: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEFS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'number_list', '__type__': 'NonTerminal'}], 'order': 33, 'alias': 'defs_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 53: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEFW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'number_list', '__type__': 'NonTerminal'}], 'order': 34, 'alias': 'defw_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 54: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 35, 'alias': 'asm_ldind_r8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 55: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 36, 'alias': 'asm_ldind_r8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 56: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 37, 'alias': 'asm_ldr8_ind', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 57: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 38, 'alias': 'asm_ldr8_ind', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 58: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'AF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'AF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'APO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 39, 'alias': 'ex_af_af', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 59: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 40, 'alias': 'ex_de_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 60: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ORG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 41, 'alias': 'org', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 61: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ORG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 42, 'alias': 'org', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 62: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NAMESPACE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 43, 'alias': 'namespace', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 63: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NAMESPACE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 44, 'alias': 'push_namespace', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 64: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NAMESPACE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 45, 'alias': 'push_namespace', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 65: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NAMESPACE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 46, 'alias': 'pop_namespace', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 66: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ALIGN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 47, 'alias': 'align', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 67: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ALIGN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 48, 'alias': 'align', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 68: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCBIN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 49, 'alias': 'incbin', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 69: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCBIN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 50, 'alias': 'incbin', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 70: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCBIN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 51, 'alias': 'incbin', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 71: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 52, 'alias': 'ex_sp_reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 72: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 53, 'alias': 'ex_sp_reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 73: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 54, 'alias': 'ex_sp_reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 74: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 55, 'alias': 'ex_sp_reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 75: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'inc_reg', '__type__': 'NonTerminal'}], 'order': 56, 'alias': 'incdec', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 76: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'inc_reg', '__type__': 'NonTerminal'}], 'order': 57, 'alias': 'incdec', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 77: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 58, 'alias': 'incdeci', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 78: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 59, 'alias': 'incdeci', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 79: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 60, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 80: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 61, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 81: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 62, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 82: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 63, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 83: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 64, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 84: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 65, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 85: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 66, 'alias': 'ld_reg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 86: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 67, 'alias': 'ld_reg_val_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 87: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 68, 'alias': 'jp_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 88: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 69, 'alias': 'jp_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 89: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 70, 'alias': 'jp_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 90: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 71, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 91: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 72, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 92: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 73, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 93: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 74, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 94: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 75, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 95: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 76, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 96: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 77, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 97: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 78, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 98: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 79, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 99: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 80, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 100: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 81, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 101: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 82, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 102: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 83, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 103: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 84, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 104: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 85, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 105: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 86, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 106: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 87, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 107: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 88, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 108: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 89, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 109: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 90, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 110: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 91, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 111: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 92, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 112: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 93, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 113: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 94, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 114: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 95, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 115: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 96, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 116: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 97, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 117: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 98, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 118: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 99, 'alias': 'sbcadd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 119: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 100, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 120: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 101, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 121: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 102, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 122: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 103, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 123: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 104, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 124: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 105, 'alias': 'arith_a_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 125: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SBC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 106, 'alias': 'arith_a_reg_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 126: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 107, 'alias': 'arith_a_reg_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 127: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 108, 'alias': 'arith_a_reg_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 128: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 109, 'alias': 'bitwiseop_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 129: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 110, 'alias': 'bitwiseop_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 130: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 111, 'alias': 'bitwiseop_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 131: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 112, 'alias': 'bitwiseop_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 132: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 113, 'alias': 'bitwiseop_reg_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 133: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 114, 'alias': 'bitwise_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 134: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitwiseop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 115, 'alias': 'bitwise_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 135: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'AF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 116, 'alias': 'push_pop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 136: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 117, 'alias': 'push_pop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 137: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'AF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 118, 'alias': 'push_pop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 138: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 119, 'alias': 'push_pop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 139: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 120, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 140: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 121, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 141: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 122, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 142: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 123, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 143: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 124, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 144: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 125, 'alias': 'ld_addr_reg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 145: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 126, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 146: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 127, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 147: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 128, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 148: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}], 'order': 129, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 149: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg16', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}], 'order': 130, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 150: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}], 'order': 131, 'alias': 'ld_reg_addr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 151: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'rotation', '__type__': 'NonTerminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 132, 'alias': 'rotate', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 152: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'rotation', '__type__': 'NonTerminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 133, 'alias': 'rotate', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 153: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'rotation', '__type__': 'NonTerminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 134, 'alias': 'rotate', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 154: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'rotation', '__type__': 'NonTerminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 135, 'alias': 'rotate_ix', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 155: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 136, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 156: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 137, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 157: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 138, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 158: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 139, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 159: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 140, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 160: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 141, 'alias': 'bit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 161: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 142, 'alias': 'bit_ix', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 162: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bitop', '__type__': 'NonTerminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8_i', '__type__': 'NonTerminal'}], 'order': 143, 'alias': 'bit_ix', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 163: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 144, 'alias': 'jp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 164: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 145, 'alias': 'jp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 165: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CALL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 146, 'alias': 'jp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 166: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CALL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 147, 'alias': 'jp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 167: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jp_flags', '__type__': 'NonTerminal'}], 'order': 148, 'alias': 'ret', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 168: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jr_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 149, 'alias': 'jr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 169: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'jr_flags', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 150, 'alias': 'jr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 170: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 151, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 171: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 152, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 172: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CALL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 153, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 173: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DJNZ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 154, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 174: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 155, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 175: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 156, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 176: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CALL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 157, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 177: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DJNZ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 158, 'alias': 'jrjp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 178: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RST', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 159, 'alias': 'rst', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 179: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IM', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 160, 'alias': 'im', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 180: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 161, 'alias': 'in_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 181: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 162, 'alias': 'in_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 182: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 163, 'alias': 'in_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 183: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 164, 'alias': 'in_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 184: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 165, 'alias': 'out_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 185: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 166, 'alias': 'out_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 186: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 167, 'alias': 'out_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 187: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 168, 'alias': 'out_op', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 188: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}], 'order': 169, 'alias': 'in_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 189: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 170, 'alias': 'in_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 190: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'mem_indir', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 171, 'alias': 'out_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 191: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 172, 'alias': 'out_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 192: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 173, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 193: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EXX', 'filter_out': False, '__type__': 'Terminal'}], 'order': 174, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 194: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CCF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 175, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 195: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SCF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 176, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 196: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDIR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 177, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 197: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 178, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 198: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 179, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 199: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 180, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 200: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPIR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 181, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 201: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 182, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 202: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 183, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 203: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 184, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 204: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DAA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 185, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 205: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEG', 'filter_out': False, '__type__': 'Terminal'}], 'order': 186, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 206: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CPL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 187, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 207: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'HALT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 188, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 208: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 189, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 209: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 190, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 210: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUTD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 191, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 211: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUTI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 192, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 212: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OTDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 193, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 213: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OTIR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 194, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 214: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IND', 'filter_out': False, '__type__': 'Terminal'}], 'order': 195, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 215: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 196, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 216: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 197, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 217: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INIR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 198, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 218: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RET', 'filter_out': False, '__type__': 'Terminal'}], 'order': 199, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 219: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RETI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 200, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 220: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RETN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 201, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 221: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RLA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 202, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 222: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RLCA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 203, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 223: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RRA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 204, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 224: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RRCA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 205, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 225: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RLD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 206, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 226: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RRD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 207, 'alias': 'single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 227: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'MUL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'D', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'E', 'filter_out': False, '__type__': 'Terminal'}], 'order': 208, 'alias': 'mul_d_e', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 228: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDIX', 'filter_out': False, '__type__': 'Terminal'}], 'order': 209, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 229: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDWS', 'filter_out': False, '__type__': 'Terminal'}], 'order': 210, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 230: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDIRX', 'filter_out': False, '__type__': 'Terminal'}], 'order': 211, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 231: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDDX', 'filter_out': False, '__type__': 'Terminal'}], 'order': 212, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 232: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDDRX', 'filter_out': False, '__type__': 'Terminal'}], 'order': 213, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 233: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LDPIRX', 'filter_out': False, '__type__': 'Terminal'}], 'order': 214, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 234: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUTINB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 215, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 235: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SWAPNIB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 216, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 236: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'MIRROR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 217, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 237: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PIXELDN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 218, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 238: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PIXELAD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 219, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 239: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SETAE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 220, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 240: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 221, 'alias': 'add_reg16_a', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 241: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 222, 'alias': 'add_reg16_a', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 242: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 223, 'alias': 'add_reg16_a', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 243: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 224, 'alias': 'jp_c', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 244: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'JP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'C', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 225, 'alias': 'jp_c', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 245: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BSLA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'B', 'filter_out': False, '__type__': 'Terminal'}], 'order': 226, 'alias': 'bxxxx_de_b', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 246: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BSRA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'B', 'filter_out': False, '__type__': 'Terminal'}], 'order': 227, 'alias': 'bxxxx_de_b', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 247: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BSRL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'B', 'filter_out': False, '__type__': 'Terminal'}], 'order': 228, 'alias': 'bxxxx_de_b', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 248: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BSRF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'B', 'filter_out': False, '__type__': 'Terminal'}], 'order': 229, 'alias': 'bxxxx_de_b', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 249: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BRLC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'B', 'filter_out': False, '__type__': 'Terminal'}], 'order': 230, 'alias': 'bxxxx_de_b', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 250: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 231, 'alias': 'add_reg_nn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 251: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 232, 'alias': 'add_reg_nn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 252: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 233, 'alias': 'add_reg_nn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 253: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 234, 'alias': 'add_reg_nn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 254: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 235, 'alias': 'add_reg_nn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 255: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 236, 'alias': 'add_reg_nn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 256: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'TEST', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 237, 'alias': 'test_nn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 257: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'TEST', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 238, 'alias': 'test_nn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 258: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEXTREG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 239, 'alias': 'nextreg_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 259: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEXTREG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 240, 'alias': 'nextreg_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 260: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEXTREG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 241, 'alias': 'nextreg_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 261: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEXTREG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 242, 'alias': 'nextreg_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 262: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEXTREG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 243, 'alias': 'nextreg_a', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 263: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEXTREG', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 244, 'alias': 'nextreg_a', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 264: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 245, 'alias': 'push_imm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 265: {'origin': {'name': 'asm', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 246, 'alias': 'push_imm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 266: {'origin': {'name': 'id_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'idlist', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 267: {'origin': {'name': 'id_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'id_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'idlist_id', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 268: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'expr_list_from_string', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 269: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_list_from_num', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 270: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_list_from_num', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 271: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'expr_list_plus_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 272: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'expr_list_plus_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 273: {'origin': {'name': 'expr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'expr_list_plus_string', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 274: {'origin': {'name': 'number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'number_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 275: {'origin': {'name': 'number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'number_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 276: {'origin': {'name': 'number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'number_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'number_list_number', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 277: {'origin': {'name': 'number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'number_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'number_list_number', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 278: {'origin': {'name': 'reg8_hl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg8_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 279: {'origin': {'name': 'reg8_hl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg8_hl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 280: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 281: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 282: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 283: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 284: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 285: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 286: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 287: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 7, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 288: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 8, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 289: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 9, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 290: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 10, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 291: {'origin': {'name': 'reg8_i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 11, 'alias': 'ind8_i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 292: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 293: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'AND', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 294: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'XOR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 295: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SUB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 296: {'origin': {'name': 'bitwiseop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'bitwise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 297: {'origin': {'name': 'bitop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BIT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'bitop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 298: {'origin': {'name': 'bitop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RES', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'bitop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 299: {'origin': {'name': 'bitop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SET', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'bitop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 300: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 301: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 302: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RRC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 303: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RLC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 304: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SLA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 305: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SLL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 306: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SRA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 307: {'origin': {'name': 'rotation', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SRL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 7, 'alias': 'rotation', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 308: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 309: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg8', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 310: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg16', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 311: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg8_hl', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 312: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'A', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 313: {'origin': {'name': 'inc_reg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg8i', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'reg_inc', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 314: {'origin': {'name': 'reg8', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'H', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 315: {'origin': {'name': 'reg8', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'L', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 316: {'origin': {'name': 'reg8', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg_bcde', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'reg8', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 317: {'origin': {'name': 'reg_bcde', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'B', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg_bcde', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 318: {'origin': {'name': 'reg_bcde', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'C', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg_bcde', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 319: {'origin': {'name': 'reg_bcde', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'D', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'reg_bcde', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 320: {'origin': {'name': 'reg_bcde', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'E', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'reg_bcde', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 321: {'origin': {'name': 'reg8i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IXH', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg8i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 322: {'origin': {'name': 'reg8i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IXL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg8i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 323: {'origin': {'name': 'reg8i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IYH', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'reg8i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 324: {'origin': {'name': 'reg8i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IYL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'reg8i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 325: {'origin': {'name': 'reg16', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg16', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 326: {'origin': {'name': 'reg16', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg16', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 327: {'origin': {'name': 'reg16', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'HL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'reg16', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 328: {'origin': {'name': 'reg16', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'reg16i', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'reg16', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 329: {'origin': {'name': 'reg16i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IX', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'reg16i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 330: {'origin': {'name': 'reg16i', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IY', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'reg16i', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 331: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'P', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 332: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'M', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 333: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 334: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 335: {'origin': {'name': 'jp_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'jr_flags', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'jpflags_other', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 336: {'origin': {'name': 'jr_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'Z', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'jr_flags', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 337: {'origin': {'name': 'jr_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'C', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'jr_flags', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 338: {'origin': {'name': 'jr_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NZ', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'jr_flags', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 339: {'origin': {'name': 'jr_flags', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'jr_flags', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 340: {'origin': {'name': 'mem_indir', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'mem_indir', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 341: {'origin': {'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 342: {'origin': {'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 343: {'origin': {'name': 'expr_add_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 344: {'origin': {'name': 'expr_add_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 345: {'origin': {'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 346: {'origin': {'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 347: {'origin': {'name': 'expr_unary_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 348: {'origin': {'name': 'expr_unary_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 349: {'origin': {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_pow', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 350: {'origin': {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 351: {'origin': {'name': 'expr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 352: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'RSHIFT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 353: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'LSHIFT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 354: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'BAND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 355: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'BOR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 356: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bitwise_operand', '__type__': 'NonTerminal'}, {'name': 'BXOR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add_operand', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 357: {'origin': {'name': 'expr_bitwise', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 358: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add_operand', '__type__': 'NonTerminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_mul_operand', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 359: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add_operand', '__type__': 'NonTerminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_mul_operand', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 360: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 361: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, {'name': 'MUL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 362: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, {'name': 'DIV', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 363: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul_operand', '__type__': 'NonTerminal'}, {'name': 'MOD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 364: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_pow', '__type__': 'NonTerminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 365: {'origin': {'name': 'expr_pow', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_unary_operand', '__type__': 'NonTerminal'}, {'name': 'POW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_pow_operand', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 366: {'origin': {'name': 'expr_pow', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 367: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_uminus', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 368: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_uplus', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 369: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_uminus', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 370: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'expr_uplus', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 371: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_atom', '__type__': 'NonTerminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 372: {'origin': {'name': 'pexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'expr_lprp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 373: {'origin': {'name': 'pexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'pexpr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'expr_lprp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 374: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'expr_int', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 375: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'expr_label', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 376: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LPP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RPP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'expr_paren', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 377: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADDR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'expr_addr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}} +) +Shift = 0 +Reduce = 1 +def Lark_StandAlone(**kwargs): + return Lark._load_from_dict(DATA, MEMO, **kwargs) diff --git a/src/zxbc/py.typed b/src/zxbc/py.typed deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/zxbc/zxblex.py b/src/zxbc/zxblex.py index 9d739029f..b92f960b4 100755 --- a/src/zxbc/zxblex.py +++ b/src/zxbc/zxblex.py @@ -11,9 +11,8 @@ import sys from src import api -from src.api import global_ +from src.api import global_, lex from src.api.errmsg import error -from src.ply import lex from src.zxbc.keywords import KEYWORDS as reserved ASM = "" # Set to asm block when commenting diff --git a/src/zxbc/zxbparser.py b/src/zxbc/zxbparser.py index c213eb5a1..a9cd319f7 100755 --- a/src/zxbc/zxbparser.py +++ b/src/zxbc/zxbparser.py @@ -6,14 +6,13 @@ # See the file CONTRIBUTORS.md for copyright details. # See https://www.gnu.org/licenses/agpl-3.0.html for details. # -------------------------------------------------------------------- - import math import sys from collections.abc import Callable from math import pi as PI # typings -from typing import NamedTuple, cast +from typing import Any, NamedTuple, cast import src.api.config import src.api.dataref @@ -50,7 +49,6 @@ from src.api.symboltable.symboltable import SymbolTable # Lexers and parsers, etc -from src.ply import yacc from src.symbols import sym from src.symbols.id_ import SymbolID from src.symbols.symbol_ import Symbol @@ -58,6 +56,8 @@ from src.zxbc import zxblex from src.zxbc.zxblex import tokens # noqa +from .zxbparser_standalone import Lark_StandAlone, Lexer, Token, Transformer, UnexpectedInput, v_args + # ---------------------------------------------------------------------- # Function level entry ID in which scope we are into. If the list # is empty, we are at global scope @@ -137,6 +137,11 @@ def init(): optemps = opcodestemps.OpcodesTemps() gl.INITS.clear() + gl.syntax_error_occurred = False + gl.tokens_yielded = 0 + gl.tokens_rejected = 0 + gl.shifted_at_last_error = 0 + gl.expr_linenos = {} del gl.FUNCTION_CALLS[:] del gl.FUNCTION_LEVEL[:] del gl.FUNCTIONS[:] @@ -199,7 +204,16 @@ def make_nop(): def make_number(value, lineno: int, type_=None): - """Wrapper: creates a constant number node.""" + if hasattr(value, "original_value"): + value = value.original_value + elif isinstance(value, str): + try: + if "." in value or "e" in value.lower(): + value = float(value) + else: + value = int(value, 0) + except ValueError: + value = float(value) return sym.NUMBER(value, type_=type_, lineno=lineno) @@ -537,3110 +551,2685 @@ def make_break(lineno: int, p): # ---------------------------------------------------------------------- -# Grammar rules -# ---------------------------------------------------------------------- - - -def p_start(p): - """start : program""" - global ast, data_ast - - make_label(gl.ZXBASIC_USER_DATA, 0) - make_label(gl.ZXBASIC_USER_DATA_LEN, 0) - if PRINT_IS_USED: - OPTIONS.__DEFINES["___PRINT_IS_USED___"] = 1 - if zxblex.IN_STATE: - p.type = "NEWLINE" - p_error(p) - sys.exit(1) +def get_lineno(item): + if hasattr(gl, "expr_linenos") and id(item) in gl.expr_linenos: + return gl.expr_linenos[id(item)] + if hasattr(item, "line"): + return item.line + if hasattr(item, "lineno"): + return item.lineno + if hasattr(item, "children") and item.children: + for child in item.children: + l = get_lineno(child) + if l: + return l + return zxblex.lexer.lineno if hasattr(zxblex, "lexer") else 0 - ast = p[0] = p[1] - __end = make_sentence(p.lexer.lineno, "END", make_number(0, lineno=p.lexer.lineno), sentinel=True) - if not is_null(ast): - if isinstance(ast, sym.BLOCK) and not is_ender(ast[-1]): - ast.append_child(__end) - else: - ast = __end +def meta_line(meta): + return getattr(meta, "line", None) or (zxblex.lexer.lineno if hasattr(zxblex, "lexer") else 0) or 0 - SYMBOL_TABLE.check_labels() - SYMBOL_TABLE.check_classes() - if gl.has_errors: - return - - __DEBUG__("Checking pending labels", 1) - if not src.api.check.check_pending_labels(ast): - return +class ZXBasicToken(Token): + def __eq__(self, other): + return str.__eq__(self, other) - __DEBUG__("Checking pending calls", 1) - if not src.api.check.check_pending_calls(): - return - - data_ast = make_sentence(p.lexer.lineno, "BLOCK") + def __hash__(self): + return str.__hash__(self) - # Appends variable declarations at the end. - for var in SYMBOL_TABLE.vars_: - data_ast.append_child(make_var_declaration(var)) - # Appends arrays declarations at the end. - for var in SYMBOL_TABLE.arrays: - data_ast.append_child(make_array_declaration(var)) +class ZXBasicLarkLexerAdapter(Lexer): + def __init__(self, lexer_conf: Any) -> None: + pass + def lex(self, data: Any, parser_state: Any = None) -> Any: + lexer = data + lookahead = [] -def p_program_program_line(p): - """program : program_line""" - p[0] = make_block(p[1], make_break(p.lineno(1), p[1])) - + def get_next(): + tok = lexer.token() + if tok is None: + return None + tok.lexer = lexer + col = zxblex.find_column(tok) if hasattr(zxblex, "find_column") else 1 + val = tok.value + if isinstance(val, float) and val.is_integer(): + val = str(int(val)) + elif isinstance(val, (int, float)): + val = str(val) + t = ZXBasicToken(tok.type, val, line=tok.lineno, column=col) + t.original_value = tok.value + return t + + while True: + if lookahead: + t = lookahead.pop(0) + else: + t = get_next() + if t is None: + break + + if hasattr(gl, "tokens_yielded"): + gl.tokens_yielded += 1 + + if t.type == "END": + next_t = get_next() + if next_t is not None: + if next_t.type in ("SUB", "FUNCTION", "IF", "WHILE"): + merged_type = "END_" + next_t.type + merged_value = t.value + " " + next_t.value + merged_t = ZXBasicToken(merged_type, merged_value, line=t.line, column=t.column) + merged_t.original_value = merged_value + yield merged_t + continue + else: + lookahead.append(next_t) + + yield t + + +@v_args(meta=True) +class ZXBasicTransformer(Transformer): + def start(self, meta, items): + p0 = None + global ast, data_ast + make_label(gl.ZXBASIC_USER_DATA, 0) + make_label(gl.ZXBASIC_USER_DATA_LEN, 0) + if PRINT_IS_USED: + getattr(OPTIONS, "__DEFINES")["___PRINT_IS_USED___"] = 1 + if zxblex.IN_STATE: + error(meta.line, "Unexpected end of line") + sys.exit(1) + ast = p0 = items[0] + __end = make_sentence(meta_line(meta), "END", make_number(0, lineno=meta_line(meta)), sentinel=True) + if not is_null(ast): + if isinstance(ast, sym.BLOCK) and (not is_ender(ast[-1])): + ast.append_child(__end) + else: + ast = __end + SYMBOL_TABLE.check_labels() + SYMBOL_TABLE.check_classes() + if gl.has_errors: + return p0 + __DEBUG__("Checking pending labels", 1) + if not src.api.check.check_pending_labels(ast): + return p0 + __DEBUG__("Checking pending calls", 1) + if not src.api.check.check_pending_calls(): + return p0 + data_ast = make_sentence(meta_line(meta), "BLOCK") + for var in SYMBOL_TABLE.vars_: + data_ast.append_child(make_var_declaration(var)) + for var in SYMBOL_TABLE.arrays: + data_ast.append_child(make_array_declaration(var)) + return p0 + + def program_program_line(self, meta, items): + p0 = None + p0 = make_block(items[0], make_break(get_lineno(items[0]), items[0])) + return p0 + + def program(self, meta, items): + p0 = None + p0 = make_block(items[0], items[1], make_break(get_lineno(items[1]), items[1])) + return p0 + + def program_line(self, meta, items): + p0 = None + p0 = make_nop() if len(items) + 1 == 2 else items[0] + return p0 + + def co_statements_co(self, meta, items): + p0 = None + p0 = items[0] if len(items) + 1 == 3 else make_nop() + return p0 + + def co_statements(self, meta, items): + p0 = None + p0 = make_block(items[0], items[1]) + return p0 + + def statements_co(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def statements_statement(self, meta, items): + p0 = None + if len(items) + 1 == 2: + p0 = make_block(items[0]) + else: + p0 = make_block(items[0], items[1]) + return p0 + + def var_decls(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def label(self, meta, items): + p0 = None + p0 = make_label(items[0], get_lineno(items[0])) + return p0 + + def program_line_label(self, meta, items): + p0 = None + lbl = items[0] + p0 = make_block(lbl, items[1]) if len(items) + 1 == 3 else lbl + return p0 + + def label_line_label_line_co(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def label_line_co(self, meta, items): + p0 = None + lbl = items[0] + p0 = make_block(lbl, items[1]) if len(items) + 1 == 3 else lbl + return p0 + + def program_line_co(self, meta, items): + p0 = None + p0 = items[0] if len(items) + 1 == 2 else make_block(items[0], items[1]) + return p0 + + def var_decl(self, meta, items): + p0 = None + for vardata in items[1]: + SYMBOL_TABLE.declare_variable(vardata[0], vardata[1], items[2]) + p0 = None + return p0 + + def var_decl_at(self, meta, items): + p0 = None + p0 = None + if items[1] is None or items[2] is None or items[4] is None: + return p0 + if len(items[1]) != 1: + error(get_lineno(items[0]), "Only one variable at a time can be declared this way") + return p0 + idlist = items[1][0] + entry = SYMBOL_TABLE.declare_variable(idlist[0], idlist[1], items[2]) + if entry is None: + return p0 + if items[4].token == "CONSTEXPR": + tmp = items[4].expr + entry.addr = tmp + elif not is_static(items[4]): + errmsg.syntax_error_address_must_be_constant(get_lineno(items[3])) + return p0 + else: + entry.addr = make_typecast(_TYPE(gl.PTR_TYPE), items[4], get_lineno(items[3])) + mark_entry_as_accessed(entry) + if entry.scope == SCOPE.local: + SYMBOL_TABLE.make_static(entry.name) + return p0 + + def var_decl_ini(self, meta, items): + p0 = None + keyword, idlist, typedef, expr = (items[0], items[1], items[2], items[4]) + if len(idlist) != 1: + error(get_lineno(items[0]), "Initialized variables must be declared one by one.") + return p0 + + if expr is None: + return p0 + + if is_static(expr) and isinstance(expr, sym.UNARY): + expr = make_constexpr(get_lineno(items[3]), expr) + + if typedef.implicit: + typedef = sym.TYPEREF(expr.type_, meta_line(meta), implicit=True) + value = make_typecast(typedef.type_, expr, get_lineno(items[3])) + defval = value if is_static(expr) and value.type_ != Type.string else None + + if keyword == "DIM": + SYMBOL_TABLE.declare_variable(idlist[0].name, idlist[0].lineno, typedef, default_value=defval) + else: + if defval is None: + if not is_static_str(value): + errmsg.syntax_error_not_constant(get_lineno(items[3])) + return p0 + defval = value + SYMBOL_TABLE.declare_const(idlist[0].name, idlist[0].lineno, typedef, default_value=defval) -def p_program(p): - """program : program program_line""" - p[0] = make_block(p[1], p[2], make_break(p.lineno(2), p[2])) + if defval is None: + p0 = make_sentence( + get_lineno(items[0]), "LET", SYMBOL_TABLE.access_var(idlist[0].name, get_lineno(items[0])), value + ) + return p0 + + def singleid(self, meta, items): + p0 = Id(name=items[0], lineno=get_lineno(items[0])) + return p0 + + def idlist_id(self, meta, items): + p0 = [items[0]] + return p0 + + def idlist_idlist_id(self, meta, items): + items[0].append(items[2]) + p0 = items[0] + return p0 + + def arr_decl(self, meta, items): + p0 = None + return p0 + + def arr_decl_attr(self, meta, items): + p0 = None + arr_decl, expr = (items[0], items[2]) + if arr_decl is None or expr is None: + p0 = None + return p0 + if expr.token == "CONSTEXPR": + expr = expr.expr + if expr.token == "UNARY" and expr.operator == "ADDRESS": + if expr.operand.token == "ARRAYACCESS": + if expr.operand.offset is None: + error(get_lineno(items[3]), "Address is not constant. Only constant subscripts are allowed") + return p0 + else: + if expr.operand.token not in ("ID", "VAR", "LABEL"): + error(get_lineno(items[2]), "Only addresses of identifiers are allowed") + return p0 + expr.operand.has_address = True + elif not is_static(expr): + errmsg.syntax_error_address_must_be_constant(get_lineno(items[2])) + return p0 + arr_entry = SYMBOL_TABLE.access_array(arr_decl[0], arr_decl[1]) + arr_entry.addr = make_typecast(_TYPE(gl.PTR_TYPE), expr, get_lineno(items[1])) + if arr_entry.scope == SCOPE.local: + SYMBOL_TABLE.make_static(arr_entry.name) + p0 = items[0] + return p0 + + def decl_arr(self, meta, items): + p0 = None + if len(items[1]) != 1: + error(get_lineno(items[0]), "Array declaration only allows one variable name at a time") + else: + id_, lineno = items[1][0] + SYMBOL_TABLE.declare_array(id_, lineno, items[5], items[3]) + p0 = items[1][0] + return p0 + + def arr_decl_initialized(self, meta, items): + + def check_bound(boundlist, remaining): + lineno = get_lineno(items[6]) + if not boundlist: + if not isinstance(remaining, list): + return True + error(lineno, "Unexpected extra vector dimensions. It should be %i" % len(remaining)) + return False + if not isinstance(remaining, list): + error(lineno, "Mismatched vector size. Missing %i extra dimension(s)" % len(boundlist)) + return False + if len(remaining) != boundlist[0].count: + error( + lineno, + "Mismatched vector size. Expected %i elements, got %i." % (boundlist[0].count, len(remaining)), + ) + return False + for row in remaining: + if not check_bound(boundlist[1:], row): + return False + return True + p0 = None -def p_program_line(p): - """program_line : preproc_line NEWLINE - | label_line NEWLINE - | statements NEWLINE - | statements_co NEWLINE - | co_statements NEWLINE - | co_statements_co NEWLINE - | NEWLINE - """ - p[0] = make_nop() if len(p) == 2 else p[1] + if items[3] is None or items[5] is None or items[7] is None: + return p0 + if not check_bound(items[3].children, items[7]): + return p0 -def p_co_statements_co(p): - """co_statements_co : co_statements CO - | co_statements_co CO - | CO - """ - p[0] = p[1] if len(p) == 3 else make_nop() + id_, lineno = items[1][0] + SYMBOL_TABLE.declare_array(id_, lineno, items[5], items[3], default_value=items[7]) + entry = SYMBOL_TABLE.get_entry(id_) + if entry is None: + return p0 + if items[5] == Type.string or entry.type_ == Type.string: + errmsg.syntax_error_cannot_initialize_array_of_type(get_lineno(items[0]), Type.string) + return p0 -def p_co_statements(p): - """co_statements : co_statements_co statement""" - p[0] = make_block(p[1], p[2]) + return p0 + def bound_list(self, meta, items): + p0 = make_bound_list(items[0]) + return p0 -def p_statements_co(p): - """statements_co : statements CO - | statements_co CO - """ - p[0] = p[1] + def bound_list_bound(self, meta, items): + p0 = make_bound_list(items[0], items[2]) + return p0 + def bound(self, meta, items): + p0 = make_bound(make_number(OPTIONS.array_base, lineno=get_lineno(items[0])), items[0], meta_line(meta)) + return p0 -def p_statements_statement(p): - """statements : statement - | statements_co statement - """ - if len(p) == 2: - p[0] = make_block(p[1]) - else: - p[0] = make_block(p[1], p[2]) + def bound_to_bound(self, meta, items): + p0 = make_bound(items[0], items[2], get_lineno(items[1])) + return p0 + def const_vector(self, meta, items): + p0 = items[1] + return p0 -def p_var_decls(p): - """statement : var_decl""" - p[0] = p[1] + def const_vector_elem_list(self, meta, items): + p0 = None + if items[0] is None: + return p0 + if not is_static(items[0]): + if isinstance(items[0], sym.UNARY): + tmp = make_constexpr(get_lineno(items[0]), items[0]) + else: + errmsg.syntax_error_not_constant(meta_line(meta)) + return p0 + else: + tmp = items[0] + + p0 = [tmp] + return p0 + + def const_vector_elem_list_list(self, meta, items): + p0 = None + if items[0] is None or items[2] is None: + return p0 + if not is_static(items[2]): + if isinstance(items[2], sym.UNARY): + tmp = make_constexpr(get_lineno(items[1]), items[2]) + else: + errmsg.syntax_error_not_constant(get_lineno(items[1])) + p0 = None + return p0 + else: + tmp = items[2] + if items[0] is not None: + items[0].append(tmp) + p0 = items[0] + return p0 + + def const_vector_list(self, meta, items): + p0 = [items[0]] + return p0 + + def const_vector_vector_list(self, meta, items): + if len(items[2]) != len(items[0][0]): + error(get_lineno(items[1]), "All rows must have the same number of elements") + p0 = None + return p0 + p0 = items[0] + [items[2]] + return p0 + + def staement_func_decl(self, meta, items): + p0 = items[0] + return p0 + + def statement_border(self, meta, items): + p0 = make_sentence(get_lineno(items[0]), "BORDER", make_typecast(Type.ubyte, items[1], get_lineno(items[0]))) + return p0 + + def statement_plot(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), + "PLOT", + make_typecast(Type.ubyte, items[1], get_lineno(items[2])), + make_typecast(Type.ubyte, items[3], get_lineno(items[2])), + ) + return p0 + + def statement_plot_attr(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), + "PLOT", + make_typecast(Type.ubyte, items[2], get_lineno(items[3])), + make_typecast(Type.ubyte, items[4], get_lineno(items[3])), + items[1], + ) + return p0 + + def statement_draw3(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), + "DRAW3", + make_typecast(Type.integer, items[1], get_lineno(items[2])), + make_typecast(Type.integer, items[3], get_lineno(items[4])), + make_typecast(Type.float_, items[5], get_lineno(items[4])), + ) + return p0 + + def statement_draw3_attr(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), + "DRAW3", + make_typecast(Type.integer, items[2], get_lineno(items[3])), + make_typecast(Type.integer, items[4], get_lineno(items[5])), + make_typecast(Type.float_, items[6], get_lineno(items[5])), + items[1], + ) + return p0 + + def statement_draw(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), + "DRAW", + make_typecast(Type.integer, items[1], get_lineno(items[2])), + make_typecast(Type.integer, items[3], get_lineno(items[2])), + ) + return p0 + + def statement_draw_attr(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), + "DRAW", + make_typecast(Type.integer, items[2], get_lineno(items[3])), + make_typecast(Type.integer, items[4], get_lineno(items[3])), + items[1], + ) + return p0 + + def statement_circle(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), + "CIRCLE", + make_typecast(Type.byte_, items[1], get_lineno(items[2])), + make_typecast(Type.byte_, items[3], get_lineno(items[4])), + make_typecast(Type.byte_, items[5], get_lineno(items[4])), + ) + return p0 + + def statement_circle_attr(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), + "CIRCLE", + make_typecast(Type.byte_, items[2], get_lineno(items[3])), + make_typecast(Type.byte_, items[4], get_lineno(items[5])), + make_typecast(Type.byte_, items[6], get_lineno(items[5])), + items[1], + ) + return p0 -def p_label(p): - """label : LABEL""" - p[0] = make_label(p[1], p.lineno(1)) + def statement_cls(self, meta, items): + p0 = make_sentence(get_lineno(items[0]), "CLS") + return p0 + def statement_asm(self, meta, items): + p0 = make_asm_sentence(items[0], get_lineno(items[0])) + return p0 -def p_program_line_label(p): - """label_line : label statements - | label co_statements - """ - lbl = p[1] - p[0] = make_block(lbl, p[2]) if len(p) == 3 else lbl + def statement_randomize(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), "RANDOMIZE", make_number(0, lineno=get_lineno(items[0]), type_=Type.ulong) + ) + return p0 + + def statement_randomize_expr(self, meta, items): + p0 = make_sentence(get_lineno(items[0]), "RANDOMIZE", make_typecast(Type.ulong, items[1], get_lineno(items[0]))) + return p0 + + def statement_beep(self, meta, items): + p0 = make_sentence( + get_lineno(items[0]), + "BEEP", + make_typecast(Type.float_, items[1], get_lineno(items[0])), + make_typecast(Type.float_, items[3], get_lineno(items[2])), + ) + return p0 + + def statement_call(self, meta, items): + if len(items) + 1 > 2 and items[1] is None: + p0 = None + elif len(items) + 1 == 2: + entry = SYMBOL_TABLE.get_entry(items[0]) + if entry is not None and entry.class_ in (CLASS.label, CLASS.unknown): + p0 = make_label(items[0], get_lineno(items[0])) + else: + p0 = make_sub_call(items[0], get_lineno(items[0]), make_arg_list(None)) + else: + p0 = make_sub_call(items[0], get_lineno(items[0]), items[1]) + return p0 -def p_label_line_label_line_co(p): - """label_line : label_line_co""" - p[0] = p[1] + def assignment(self, meta, items): + global LET_ASSIGNMENT + LET_ASSIGNMENT = False + p0 = None + q = items[0:] + i = 1 + if q[1] is None: + return p0 + if q[1].token == "VAR" and q[1].class_ == CLASS.unknown: + q[1] = SYMBOL_TABLE.access_var(q[1].name, get_lineno(items[i - 1])) -def p_label_line_co(p): - """label_line_co : label statements_co %prec CO - | label co_statements_co %prec CO - | label %prec CO - """ - lbl = p[1] - p[0] = make_block(lbl, p[2]) if len(p) == 3 else lbl + q1class_ = q[1].class_ if q[1].token == "VAR" else CLASS.unknown + variable = SYMBOL_TABLE.access_id( + q[0], get_lineno(items[i - 1]), default_type=q[1].type_, default_class=q1class_ + ) + if variable is None: + return p0 -def p_program_line_co(p): - """program_co : program %prec CO - | program label_line_co - | program co_statements_co %prec CO - | program statements_co %prec CO - """ - p[0] = p[1] if len(p) == 2 else make_block(p[1], p[2]) + if variable.class_ == CLASS.unknown: + variable = variable.to_var() + if variable.class_ not in (CLASS.var, CLASS.array): + errmsg.syntax_error_cannot_assign_not_a_var(get_lineno(items[i - 1]), variable.name) + return p0 -def p_var_decl(p): - """var_decl : DIM idlist typedef""" - for vardata in p[2]: - SYMBOL_TABLE.declare_variable(vardata[0], vardata[1], p[3]) + if variable.class_ == CLASS.var and q1class_ == CLASS.array: + error(get_lineno(items[i - 1]), "Cannot assign an array to an scalar variable") + return p0 - p[0] = None # Variable declarations are made at the end of parsing + expr = make_typecast(variable.type_, q[1], get_lineno(items[i - 1])) + p0 = make_sentence(get_lineno(items[0]), "LET", variable, expr) + return p0 + def lexpr(self, meta, items): + global LET_ASSIGNMENT + LET_ASSIGNMENT = True + if items[0] == "LET": + p0 = items[1] + i = 2 + else: + p0 = items[0] + i = 1 -def p_var_decl_at(p): - """var_decl : DIM idlist typedef AT expr""" - p[0] = None + SYMBOL_TABLE.access_id(items[i - 1], get_lineno(items[i - 1])) + return p0 - if p[2] is None or p[3] is None or p[5] is None: - return + def array_copy(self, meta, items): + p0 = None + if items[0] == "LET": + array_id1, array_id2 = (items[1], items[3]) + l1, l2 = (get_lineno(items[1]), get_lineno(items[3])) + else: + array_id1, array_id2 = (items[0], items[2]) + l1, l2 = (get_lineno(items[0]), get_lineno(items[2])) - if len(p[2]) != 1: - error(p.lineno(1), "Only one variable at a time can be declared this way") - return + larray = SYMBOL_TABLE.access_id(array_id1, l1) + rarray = SYMBOL_TABLE.access_id(array_id2, l2) - idlist = p[2][0] + if larray is None or rarray is None: + p0 = None + return p0 - entry = SYMBOL_TABLE.declare_variable(idlist[0], idlist[1], p[3]) - if entry is None: - return + if larray.type_ != rarray.type_: + error(l1, "Arrays must have the same element type") + return p0 - if p[5].token == "CONSTEXPR": - tmp = p[5].expr - entry.addr = tmp - elif not is_static(p[5]): - errmsg.syntax_error_address_must_be_constant(p.lineno(4)) - return - else: - entry.addr = make_typecast(_TYPE(gl.PTR_TYPE), p[5], p.lineno(4)) - mark_entry_as_accessed(entry) - if entry.scope == SCOPE.local: - SYMBOL_TABLE.make_static(entry.name) + if larray.ref.memsize != rarray.ref.memsize: + error(l1, "Arrays '%s' and '%s' must have the same size" % (array_id1, array_id2)) + return p0 + if larray.ref.count != rarray.ref.count: + warning(l1, "Arrays '%s' and '%s' don't have the same number of dimensions" % (larray.name, rarray.name)) + else: + for b1, b2 in zip(larray.ref.bounds, rarray.ref.bounds): + if b1.count != b2.count: + warning(l1, "Arrays '%s' and '%s' don't have the same dimensions" % (array_id1, array_id2)) + break + + mark_entry_as_accessed(larray) + mark_entry_as_accessed(rarray) + p0 = make_sentence(get_lineno(items[0]), "ARRAYCOPY", larray, rarray) + return p0 + + def arr_assignment(self, meta, items): + i = 2 if items[0].upper() == "LET" else 1 + id_ = items[i - 1] + arg_list = items[i + 1 - 1] + expr = items[i + 3 - 1] + p0 = None + if arg_list is None or expr is None: + return p0 + + entry = SYMBOL_TABLE.access_call(id_, get_lineno(items[i - 1])) + if entry is None: + return p0 -def p_var_decl_ini(p): - """var_decl : DIM idlist typedef EQ expr - | CONST idlist typedef EQ expr - """ - p[0] = None + if entry.type_ == Type.string: + variable = gl.SYMBOL_TABLE.access_array(id_, get_lineno(items[i - 1])) + if len(variable.ref.bounds) and len(variable.ref.bounds) + 1 == len(arg_list): + ss = arg_list.children.pop().value + p0 = make_array_substr_assign(get_lineno(items[i - 1]), id_, arg_list, (ss, ss), expr) + return p0 - keyword, idlist, typedef, expr = p[1], p[2], p[3], p[5] + arr = make_array_access(id_, get_lineno(items[i - 1]), arg_list) + if arr is None: + return p0 - if len(idlist) != 1: - error(p.lineno(1), "Initialized variables must be declared one by one.") - return + expr = make_typecast(arr.type_, expr, get_lineno(items[i - 1])) + if entry is None: + return p0 - if expr is None: - return + if entry.addr is not None: + mark_entry_as_accessed(entry) + p0 = make_sentence(get_lineno(items[0]), "LETARRAY", arr, expr) + return p0 - if is_static(expr) and isinstance(expr, sym.UNARY): - expr = make_constexpr(p.lineno(4), expr) # Delayed constant evaluation + def substr_assignment_no_let(self, meta, items): + p0 = None + entry = SYMBOL_TABLE.access_call(items[0], get_lineno(items[0])) + if entry is None: + return p0 - if typedef.implicit: - typedef = sym.TYPEREF(expr.type_, p.lexer.lineno, implicit=True) + if entry.class_ == CLASS.unknown: + errmsg.warning_uninitalized_string_var(get_lineno(items[0]), entry.name) + entry.to_var() - value = make_typecast(typedef.type_, expr, p.lineno(4)) - defval = value if is_static(expr) and value.type_ != Type.string else None + if items[5].type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[4]), items[5].type_) - if keyword == "DIM": - SYMBOL_TABLE.declare_variable(idlist[0].name, idlist[0].lineno, typedef, default_value=defval) - else: - # keyword == "CONST" - if defval is None: - if not is_static_str(value): - errmsg.syntax_error_not_constant(p.lineno(4)) - return - defval = value - - SYMBOL_TABLE.declare_const(idlist[0].name, idlist[0].lineno, typedef, default_value=defval) - - if defval is None: # Okay do a delayed initialization - p[0] = make_sentence( - p.lineno(1), - "LET", - SYMBOL_TABLE.access_var(idlist[0].name, p.lineno(1)), - value, + lineno = get_lineno(items[1]) + base = make_number(OPTIONS.string_base, lineno, _TYPE(gl.STR_INDEX_TYPE)) + substr = make_typecast(_TYPE(gl.STR_INDEX_TYPE), items[2], lineno) + p0 = make_sentence( + get_lineno(items[0]), + "LETSUBSTR", + entry, + make_binary(lineno, "MINUS", substr, base, func=lambda x, y: x - y), + make_binary(lineno, "MINUS", substr, base, func=lambda x, y: x - y), + items[5], ) + return p0 + def substr_assignment(self, meta, items): + p0 = None + if items[2] is None or items[4] is None: + return p0 -def p_singleid(p): - """singleid : ID - | ARRAY_ID - """ - p[0] = Id(name=p[1], lineno=p.lineno(1)) + entry = SYMBOL_TABLE.access_call(items[1], get_lineno(items[1])) + if entry is None: + return p0 + if entry.class_ == CLASS.unknown: + entry = entry.to_var() -def p_idlist_id(p): - """idlist : singleid""" - p[0] = [p[1]] + if entry.class_ != CLASS.var: + errmsg.syntax_error_cannot_assign_not_a_var(get_lineno(items[1]), items[1]) + return p0 + if entry.type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[1]), entry.type_) + return p0 -def p_idlist_idlist_id(p): - """idlist : idlist COMMA singleid""" - p[1].append(p[3]) - p[0] = p[1] + if items[4].type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[3]), items[4].type_) + return p0 + if len(items[2]) > 1: + error(get_lineno(items[1]), "Accessing string with too many indexes. Expected only one.") + return p0 -def p_arr_decl(p): - """var_decl : var_arr_decl - | var_arr_decl_addr - """ - p[0] = None + if len(items[2]) == 1: + substr = ( + make_typecast(_TYPE(gl.STR_INDEX_TYPE), items[2][0].value, get_lineno(items[1])), + make_typecast(_TYPE(gl.STR_INDEX_TYPE), items[2][0].value, get_lineno(items[1])), + ) + else: + substr = ( + make_typecast( + _TYPE(gl.STR_INDEX_TYPE), + make_number(gl.MIN_STRSLICE_IDX, lineno=get_lineno(items[1])), + get_lineno(items[1]), + ), + make_typecast( + _TYPE(gl.STR_INDEX_TYPE), + make_number(gl.MAX_STRSLICE_IDX, lineno=get_lineno(items[1])), + get_lineno(items[1]), + ), + ) + lineno = get_lineno(items[1]) + base = make_number(OPTIONS.string_base, lineno, _TYPE(gl.STR_INDEX_TYPE)) + p0 = make_sentence( + get_lineno(items[0]), + "LETSUBSTR", + entry, + make_binary(lineno, "MINUS", substr[0], base, func=lambda x, y: x - y), + make_binary(lineno, "MINUS", substr[1], base, func=lambda x, y: x - y), + items[4], + ) + return p0 + + def str_assign(self, meta, items): + p0 = None + if items[0].upper() != "LET": + q = items[0] + r = items[3] + s = items[1] + lineno = get_lineno(items[2]) + else: + q = items[1] + r = items[4] + s = items[2] + lineno = get_lineno(items[3]) + if q is None or s is None: + return p0 -def p_arr_decl_attr(p): - """var_arr_decl_addr : var_arr_decl AT expr""" - arr_decl, expr = p[1], p[3] - if arr_decl is None or expr is None: - p[0] = None - return + if r.type_ != Type.string: + errmsg.syntax_error_expected_string(lineno, r.type_) - if expr.token == "CONSTEXPR": - expr = expr.expr - if expr.token == "UNARY" and expr.operator == "ADDRESS": # Must be an ID - if expr.operand.token == "ARRAYACCESS": - if expr.operand.offset is None: - error( - p.lineno(4), - "Address is not constant. Only constant subscripts are allowed", - ) - return + entry = SYMBOL_TABLE.access_var(q, lineno, default_type=Type.string) + if entry is None: + return p0 + + p0 = make_sentence(get_lineno(items[0]), "LETSUBSTR", entry, s[0], s[1], r) + return p0 + + def goto(self, meta, items): + p0 = None + entry = check_and_make_label(items[1], get_lineno(items[1])) + if entry is not None: + p0 = make_sentence(get_lineno(items[0]), items[0].upper(), entry) + + return p0 + + def go(self, meta, items): + p0 = None + p0 = items[0] + if p0 == "GO": + p0 += items[1] + if p0 == "GOSUB" and FUNCTION_LEVEL: + error(get_lineno(items[0]), "GOSUB not allowed within SUB or FUNCTION") + return p0 + + def if_sentence(self, meta, items): + p0 = None + cond_ = items[0] + if len(items) + 1 == 6: + lbl = items[2] + stat_ = make_block(lbl, items[3]) + endif_ = items[4] + elif len(items) + 1 == 5: + stat_ = items[2] + endif_ = items[3] + else: + stat_ = make_nop() + endif_ = items[2] + p0 = make_sentence(get_lineno(items[1]), "IF", cond_, make_block(stat_, endif_)) + return p0 + + def endif(self, meta, items): + p0 = None + p0 = ( + make_nop() + if getattr(items[0], "type", None) in ("END", "ENDIF", "END_IF") or items[0] in ("END", "ENDIF", "END_IF") + else items[0] + ) + return p0 + + def statement_if(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def statement_if_then_endif(self, meta, items): + p0 = None + cond_ = items[0] + stat_ = items[1] + endif_ = items[2] + p0 = make_sentence(get_lineno(items[0]), "IF", cond_, make_block(stat_, endif_)) + return p0 + + def single_line_if(self, meta, items): + p0 = None + cond_ = items[0] + stat_ = items[1] + p0 = make_sentence(get_lineno(items[0]), "IF", cond_, stat_) + return p0 + + def if_elseif(self, meta, items): + p0 = None + cond_ = items[0] + stats_ = items[2] if len(items) + 1 == 5 else make_nop() + eliflist = items[3] if len(items) + 1 == 5 else items[2] + p0 = make_sentence(get_lineno(items[1]), "IF", cond_, stats_, eliflist) + return p0 + + def elseif_part(self, meta, items): + p0 = None + if items[0] == "ELSEIF": + label_ = make_nop() + cond_ = items[1] + else: + label_ = items[0] + cond_ = items[2] + p0 = (label_, cond_) + return p0 + + def elseif_list(self, meta, items): + p0 = None + label_, cond_ = items[0] + then_ = items[1] + else_ = items[2] + if isinstance(else_, list): + else_ = make_block(*else_) + else: + then_ = make_block(then_, else_) + else_ = None + p0 = make_block(label_, make_sentence(get_lineno(items[0]), "IF", cond_, then_, else_)) + return p0 + + def elseif_elseiflist(self, meta, items): + p0 = None + label_, cond_ = items[0] + then_ = items[1] + else_ = items[2] + p0 = make_block(label_, make_sentence(get_lineno(items[0]), "IF", cond_, then_, else_)) + return p0 + + def else_part_endif(self, meta, items): + p0 = None + if items[1] == "\n": + if len(items) + 1 == 4: + p0 = [make_nop(), items[2]] + elif len(items) + 1 == 6: + p0 = [items[2], items[3], items[4]] else: - if expr.operand.token not in ("ID", "VAR", "LABEL"): - error(p.lineno(3), "Only addresses of identifiers are allowed") - return - expr.operand.has_address = True - - elif not is_static(expr): - errmsg.syntax_error_address_must_be_constant(p.lineno(3)) - return - - arr_entry = SYMBOL_TABLE.access_array(arr_decl[0], arr_decl[1]) - arr_entry.addr = make_typecast(_TYPE(gl.PTR_TYPE), expr, p.lineno(2)) - if arr_entry.scope == SCOPE.local: - SYMBOL_TABLE.make_static(arr_entry.name) - - p[0] = p[1] - - -def p_decl_arr(p): - """var_arr_decl : DIM idlist LP bound_list RP typedef""" - if len(p[2]) != 1: - error(p.lineno(1), "Array declaration only allows one variable name at a time") - else: - id_, lineno = p[2][0] - SYMBOL_TABLE.declare_array(id_, lineno, p[6], p[4]) - - p[0] = p[2][0] - - -def p_arr_decl_initialized(p): - """var_decl : DIM idlist LP bound_list RP typedef RIGHTARROW const_vector - | DIM idlist LP bound_list RP typedef EQ const_vector - """ + p0 = [items[2], items[3]] + else: + p0 = [items[1], items[2]] + return p0 + + def else_part(self, meta, items): + p0 = None + p0 = [items[1], make_nop()] + return p0 + + def else_part_is_inline(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def else_part_label(self, meta, items): + p0 = None + lbl = items[0] + p0 = [make_block(lbl, items[2]), items[3]] + return p0 + + def if_then_part(self, meta, items): + p0 = None + expr = items[1] + if expr is None: + p0 = None + return p0 + if is_number(expr): + errmsg.warning_condition_is_always(get_lineno(items[0]), bool(expr.value)) + p0 = expr + return p0 + + def if_inline(self, meta, items): + p0 = None + items[0].append_child(make_block(items[1][0], items[1][1])) + p0 = items[0] + return p0 + + def if_else(self, meta, items): + p0 = None + cond_ = items[0] + then_ = items[2] + else_ = items[3][0] + endif = items[3][1] + p0 = make_sentence(get_lineno(items[1]), "IF", cond_, then_, make_block(else_, endif)) + return p0 + + def then(self, meta, items): + p0 = None + return p0 + + def for_sentence(self, meta, items): + p0 = None + p0 = items[0] + if is_null(p0): + return p0 + items[0].append_child(make_block(items[1], items[2])) + gl.LOOPS.pop() + return p0 + + def next(self, meta, items): + p0 = None + p0 = make_nop() if items[0] == "NEXT" else items[0] + return p0 + + def next1(self, meta, items): + p0 = None + if items[0] == "NEXT": + p1 = make_nop() + p3 = items[1] + else: + p1 = items[0] + p3 = items[2] + if p3 != gl.LOOPS[-1].var: + errmsg.syntax_error_wrong_for_var(get_lineno(items[1]), gl.LOOPS[-1].var, p3) + p0 = make_nop() + return p0 + p0 = p1 + return p0 + + def for_sentence_start(self, meta, items): + p0 = None + gl.LOOPS.append(LoopInfo(type=LoopType.FOR, lineno=get_lineno(items[0]), var=items[1])) + p0 = None + if items[3] is None or items[5] is None or items[6] is None: + return p0 + if is_number(items[3], items[5], items[6]): + if items[3].value != items[5].value and items[6].value == 0: + warning(get_lineno(items[4]), "STEP value is 0 and FOR might loop forever") + if items[3].value > items[5].value and items[6].value > 0: + warning(get_lineno(items[4]), "FOR start value is greater than end. This FOR loop is useless") + if items[3].value < items[5].value and items[6].value < 0: + warning(get_lineno(items[1]), "FOR start value is lower than end. This FOR loop is useless") + id_type = common_type(common_type(items[3].type_, items[5].type_), items[6].type_) + variable = SYMBOL_TABLE.access_var(items[1], get_lineno(items[1]), default_type=id_type) + if variable is None: + return p0 + mark_entry_as_accessed(variable) + expr1 = make_typecast(variable.type_, items[3], get_lineno(items[2])) + expr2 = make_typecast(variable.type_, items[5], get_lineno(items[4])) + expr3 = make_typecast(variable.type_, items[6], meta_line(meta)) + p0 = make_sentence(get_lineno(items[0]), "FOR", variable, expr1, expr2, expr3) + return p0 + + def step(self, meta, items): + p0 = None + p0 = make_number(1, lineno=meta_line(meta)) + return p0 + + def step_expr(self, meta, items): + p0 = None + p0 = items[1] + return p0 + + def end(self, meta, items): + p0 = None + q = make_number(0, lineno=get_lineno(items[0])) if len(items) + 1 == 2 else items[1] + p0 = make_sentence(get_lineno(items[0]), "END", q) + return p0 + + def error_raise(self, meta, items): + p0 = None + q = make_number(1, lineno=get_lineno(items[1])) + r = make_binary( + get_lineno(items[0]), + "MINUS", + make_typecast(Type.ubyte, items[1], get_lineno(items[0])), + q, + lambda x, y: x - y, + ) + p0 = make_sentence(get_lineno(items[0]), "ERROR", r) + return p0 + + def stop_raise(self, meta, items): + p0 = None + q = make_number(9, lineno=get_lineno(items[0])) if len(items) + 1 == 2 else items[1] + z = make_number(1, lineno=get_lineno(items[0])) + r = make_binary( + get_lineno(items[0]), "MINUS", make_typecast(Type.ubyte, q, get_lineno(items[0])), z, lambda x, y: x - y + ) + p0 = make_sentence(get_lineno(items[0]), "STOP", r) + return p0 - def check_bound(boundlist, remaining): - """Checks if constant vector bounds matches the array one""" - lineno = p.lineno(8) - if not boundlist: # Returns on empty list - if not isinstance(remaining, list): - return True # It's OK :-) + def loop(self, meta, items): + p0 = None + if items[0] == "LOOP": + p0 = None + else: + p0 = items[0] + return p0 - error( - lineno, - "Unexpected extra vector dimensions. It should be %i" % len(remaining), + def do_loop(self, meta, items): + p0 = None + if len(items) + 1 == 4: + q = make_block(items[1], items[2]) + else: + q = items[1] + if items[0] == "DO": + gl.LOOPS.append(LoopInfo(LoopType.DO, get_lineno(items[0]))) + if q is None: + warning(get_lineno(items[0]), "Infinite empty loop") + p0 = make_sentence(get_lineno(items[0]), "DO_LOOP", q) + gl.LOOPS.pop() + return p0 + + def do_loop_until(self, meta, items): + p0 = None + p0 = None + if len(items) + 1 == 6: + q = make_block(items[1], items[2]) + r = items[4] + else: + q = items[1] + r = items[3] + if items[0] == "DO": + gl.LOOPS.append(LoopInfo(LoopType.DO, get_lineno(items[0]))) + p0 = make_sentence(get_lineno(items[0]), "DO_UNTIL", r, q) + gl.LOOPS.pop() + if is_number(r): + errmsg.warning_condition_is_always(get_lineno(items[-2]), bool(r.value)) + if q is None: + errmsg.warning_empty_loop(get_lineno(items[-2])) + return p0 + + def data(self, meta, items): + p0 = None + label_ = make_label(gl.DATA_PTR_CURRENT, lineno=get_lineno(items[0])) + datas_ = [] + funcs = [] + if items[1] is None: + p0 = None + return p0 + if gl.FUNCTION_LEVEL: + errmsg.error(get_lineno(items[0]), "DATA not allowed within Functions nor Subs") + p0 = None + return p0 + for d in items[1].children: + value = d.value + if is_static(value): + datas_.append(d) + continue + new_lbl = f"__DATA__FUNCPTR__{len(gl.DATA_FUNCTIONS)}" + type_ = value.type_ + assert isinstance(type_, sym.TYPING) + if isinstance(type_, sym.TYPE): + type_ = sym.TYPEREF(value.type_, 0) + entry = make_func_declaration(new_lbl, get_lineno(items[0]), type_=type_, class_=CLASS.function) + if not entry: + continue + func = entry.entry + func.ref.convention = CONVENTION.fastcall + SYMBOL_TABLE.enter_scope(new_lbl) + func.ref.local_symbol_table = SYMBOL_TABLE.current_scope + func.ref.locals_size = SYMBOL_TABLE.leave_scope() + gl.DATA_FUNCTIONS.append(func) + sent = make_sentence(get_lineno(items[0]), "RETURN", func, value) + func.ref.body = make_block(sent) + datas_.append(entry) + funcs.append(entry) + gl.DATAS.append(src.api.dataref.DataRef(label_, datas_)) + id_ = src.api.utils.current_data_label() + gl.DATA_PTR_CURRENT = id_ + return p0 + + def restore(self, meta, items): + p0 = None + if len(items) + 1 == 2: + lbl = None + else: + lbl = check_and_make_label(items[1], get_lineno(items[0])) + p0 = make_sentence(get_lineno(items[0]), "RESTORE", lbl) + return p0 + + def read(self, meta, items): + p0 = None + gl.DATA_IS_USED = True + reads = [] + if items[1] is None: + return p0 + for arg in items[1]: + entry = arg.value + if entry is None: + p0 = None + return p0 + if entry.token == "VARARRAY": + errmsg.error(get_lineno(items[0]), "Cannot read '%s'. It's an array" % entry.name) + p0 = None + return p0 + if isinstance(entry, sym.ID): + if entry.class_ != CLASS.var: + errmsg.syntax_error_cannot_assign_not_a_var(get_lineno(items[1]), entry.name) + p0 = None + return p0 + mark_entry_as_accessed(entry) + if entry.type_ == Type.auto: + entry.type_ = _TYPE(gl.DEFAULT_TYPE) + errmsg.warning_implicit_type(get_lineno(items[1]), items[1], entry.type_.name) + reads.append(make_sentence(get_lineno(items[0]), "READ", entry)) + continue + if isinstance(entry, sym.ARRAYLOAD): + reads.append( + make_sentence( + get_lineno(items[0]), + "READ", + sym.ARRAYACCESS(entry.entry, entry.args, entry.lineno, gl.FILENAME), + ) + ) + continue + errmsg.error(get_lineno(items[0]), "Syntax error. Can only read a variable or an array element") + p0 = None + return p0 + p0 = make_block(*reads) + return p0 + + def do_loop_while(self, meta, items): + p0 = None + p0 = None + if len(items) + 1 == 6: + q = make_block(items[1], items[2]) + r = items[4] + else: + q = items[1] + r = items[3] + if items[0] == "DO": + gl.LOOPS.append(LoopInfo(LoopType.DO, get_lineno(items[0]))) + p0 = make_sentence(get_lineno(items[0]), "DO_WHILE", r, q) + gl.LOOPS.pop() + if is_number(r): + errmsg.warning_condition_is_always(get_lineno(items[-2]), bool(r.value)) + if q is None: + errmsg.warning_empty_loop(get_lineno(items[-2])) + return p0 + + def do_while_loop(self, meta, items): + p0 = None + r = items[0] + q = items[1] + if q == "LOOP": + q = None + p0 = make_sentence(get_lineno(items[0]), "WHILE_DO", r, q) + gl.LOOPS.pop() + if is_number(r): + errmsg.warning_condition_is_always(get_lineno(items[1]), bool(r.value)) + return p0 + + def do_until_loop(self, meta, items): + p0 = None + r = items[0] + q = items[1] + if q == "LOOP": + q = None + p0 = make_sentence(get_lineno(items[1]), "UNTIL_DO", r, q) + gl.LOOPS.pop() + if is_number(r): + errmsg.warning_condition_is_always(get_lineno(items[1]), bool(r.value)) + return p0 + + def do_while_start(self, meta, items): + p0 = None + p0 = items[2] + gl.LOOPS.append(LoopInfo(LoopType.DO, get_lineno(items[0]))) + return p0 + + def do_until_start(self, meta, items): + p0 = None + p0 = items[2] + gl.LOOPS.append(LoopInfo(LoopType.DO, get_lineno(items[0]))) + return p0 + + def do_start(self, meta, items): + p0 = None + gl.LOOPS.append(LoopInfo(LoopType.DO, get_lineno(items[0]))) + return p0 + + def label_end_while(self, meta, items): + p0 = None + if getattr(items[0], "type", None) in ("WEND", "END_WHILE") or items[0] in ("WEND", "END_WHILE"): + p0 = None + else: + p0 = items[0] + return p0 + + def while_sentence(self, meta, items): + p0 = None + gl.LOOPS.pop() + q = make_block(items[1], items[2]) + if is_number(items[0]): + errmsg.warning_condition_is_always(get_lineno(items[0]), bool(items[0].value)) + p0 = make_sentence(get_lineno(items[0]), "WHILE", items[0], q) + return p0 + + def while_start(self, meta, items): + p0 = None + p0 = items[1] + gl.LOOPS.append(LoopInfo(LoopType.WHILE, get_lineno(items[0]))) + if is_number(items[1]) and (not items[1].value): + errmsg.warning_condition_is_always(get_lineno(items[0])) + return p0 + + def exit(self, meta, items): + p0 = None + q = items[1] + p0 = make_sentence(get_lineno(items[0]), "EXIT_%s" % q) + for loop in gl.LOOPS: + if q == loop.type: + return p0 + error(get_lineno(items[0]), "Syntax Error: EXIT %s out of loop" % q) + return p0 + + def continue_(self, meta, items): + p0 = None + q = items[1] + p0 = make_sentence(get_lineno(items[0]), "CONTINUE_%s" % q) + for i in gl.LOOPS: + if q == i[0]: + return p0 + error(get_lineno(items[0]), "Syntax Error: CONTINUE %s out of loop" % q) + return p0 + + def print_sentence(self, meta, items): + p0 = None + global PRINT_IS_USED + p0 = items[1] + PRINT_IS_USED = True + return p0 + + def print_elem_expr(self, meta, items): + p0 = None + p0 = items[0] + if items[0] is not None and items[0].type_ == Type.boolean: + p0 = make_typecast(Type.ubyte, items[0], get_lineno(items[0])) + return p0 + + def print_list_expr(self, meta, items): + p0 = None + if items[0] in ("BOLD", "ITALIC"): + p0 = make_sentence( + get_lineno(items[0]), items[0] + "_TMP", make_typecast(Type.ubyte, items[1], get_lineno(items[0])) ) - return False - - if not isinstance(remaining, list): - error( - lineno, - "Mismatched vector size. Missing %i extra dimension(s)" % len(boundlist), + else: + p0 = items[0] + return p0 + + def attr_list(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def attr_list_list(self, meta, items): + p0 = None + p0 = make_block(items[0], items[1]) + return p0 + + def attr(self, meta, items): + p0 = None + p0 = make_sentence( + get_lineno(items[0]), items[0] + "_TMP", make_typecast(Type.ubyte, items[1], get_lineno(items[0])) + ) + return p0 + + def print_list_epsilon(self, meta, items): + p0 = None + p0 = None + return p0 + + def print_list_elem(self, meta, items): + p0 = None + p0 = make_sentence(meta_line(meta), "PRINT", items[0]) + p0.eol = True + return p0 + + def print_list(self, meta, items): + p0 = None + p0 = items[0] + p0.eol = items[2] is not None + if items[2] is not None: + p0.append_child(items[2]) + return p0 + + def print_list_comma(self, meta, items): + p0 = None + p0 = items[0] + p0.eol = items[2] is not None + p0.append_child(make_sentence(get_lineno(items[1]), "PRINT_COMMA")) + if items[2] is not None: + p0.append_child(items[2]) + return p0 + + def print_list_at(self, meta, items): + p0 = None + p0 = make_sentence( + get_lineno(items[0]), + "PRINT_AT", + make_typecast(Type.ubyte, items[1], get_lineno(items[0])), + make_typecast(Type.ubyte, items[3], get_lineno(items[2])), + ) + return p0 + + def print_list_tab(self, meta, items): + p0 = None + p0 = make_sentence(get_lineno(items[0]), "PRINT_TAB", make_typecast(Type.ubyte, items[1], get_lineno(items[0]))) + return p0 + + def on_goto(self, meta, items): + p0 = None + expr = make_typecast(Type.ubyte, items[1], get_lineno(items[0])) + p0 = make_sentence(get_lineno(items[0]), "ON_" + items[2], expr, *items[3]) + return p0 + + def label_list(self, meta, items): + p0 = None + entry = check_and_make_label(items[0], get_lineno(items[0])) + p0 = [entry] + return p0 + + def label_list_list(self, meta, items): + p0 = None + p0 = items[0] + entry = check_and_make_label(items[2], get_lineno(items[2])) + items[0].append(entry) + return p0 + + def return_(self, meta, items): + p0 = None + if not FUNCTION_LEVEL: + p0 = make_sentence(get_lineno(items[0]), "RETURN") + return p0 + if FUNCTION_LEVEL[-1].class_ != CLASS.sub: + error(get_lineno(items[0]), "Syntax Error: Function must RETURN a value.") + p0 = None + return p0 + p0 = make_sentence(get_lineno(items[0]), "RETURN", FUNCTION_LEVEL[-1]) + return p0 + + def return_expr(self, meta, items): + p0 = None + if not FUNCTION_LEVEL: + error(get_lineno(items[0]), "Syntax Error: Returning value out of FUNCTION") + p0 = None + return p0 + if FUNCTION_LEVEL[-1].class_ is CLASS.unknown: + p0 = None + return p0 + if FUNCTION_LEVEL[-1].class_ != CLASS.function: + error(get_lineno(items[0]), "Syntax Error: SUBs cannot return a value") + p0 = None + return p0 + if FUNCTION_LEVEL[-1].type_ is None: + p0 = None + return p0 + if is_numeric(items[1]) and FUNCTION_LEVEL[-1].type_.final == Type.string: + error(get_lineno(items[1]), "Type Error: Function must return a string, not a numeric value") + p0 = None + return p0 + if not is_numeric(items[1]) and FUNCTION_LEVEL[-1].type_.final != Type.string: + error(get_lineno(items[1]), "Type Error: Function must return a numeric value, not a string") + p0 = None + return p0 + p0 = make_sentence( + get_lineno(items[0]), + "RETURN", + FUNCTION_LEVEL[-1], + make_typecast(FUNCTION_LEVEL[-1].type_, items[1], get_lineno(items[0])), + ) + return p0 + + def pause(self, meta, items): + p0 = None + p0 = make_sentence(get_lineno(items[0]), "PAUSE", make_typecast(Type.uinteger, items[1], get_lineno(items[0]))) + return p0 + + def poke(self, meta, items): + p0 = None + i = 2 if isinstance(items[1], Symbol) or items[1] is None else 3 + if items[i - 1] is None or items[i + 2 - 1] is None: + p0 = None + return p0 + p0 = make_sentence( + get_lineno(items[0]), + "POKE", + make_typecast(Type.uinteger, items[i - 1], get_lineno(items[i + 1 - 1])), + make_typecast(Type.ubyte, items[i + 2 - 1], get_lineno(items[i + 1 - 1])), + ) + return p0 + + def poke2(self, meta, items): + p0 = None + i = 2 if isinstance(items[1], Symbol) or items[1] is None else 3 + if items[i + 1 - 1] is None or items[i + 3 - 1] is None: + p0 = None + return p0 + p0 = make_sentence( + get_lineno(items[0]), + "POKE", + make_typecast(Type.uinteger, items[i + 1 - 1], get_lineno(items[i + 2 - 1])), + make_typecast(items[i - 1], items[i + 3 - 1], get_lineno(items[i + 3 - 1])), + ) + return p0 + + def poke3(self, meta, items): + p0 = None + i = 2 if isinstance(items[1], Symbol) or items[1] is None else 3 + if items[i + 2 - 1] is None or items[i + 4 - 1] is None: + p0 = None + return p0 + p0 = make_sentence( + get_lineno(items[0]), + "POKE", + make_typecast(Type.uinteger, items[i + 2 - 1], get_lineno(items[i + 3 - 1])), + make_typecast(items[i - 1], items[i + 4 - 1], get_lineno(items[i + 5 - 1])), + ) + return p0 + + def out(self, meta, items): + p0 = None + p0 = make_sentence( + get_lineno(items[0]), + "OUT", + make_typecast(Type.uinteger, items[1], get_lineno(items[2])), + make_typecast(Type.ubyte, items[3], get_lineno(items[3])), + ) + return p0 + + def simple_instruction(self, meta, items): + p0 = None + p0 = make_sentence(get_lineno(items[0]), items[0], make_typecast(Type.ubyte, items[1], get_lineno(items[0]))) + return p0 + + def save_code(self, meta, items): + p0 = None + expr = items[1] + if expr.type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[0]), expr.type_) + if len(items) + 1 == 4: + if items[2].upper() not in ("SCREEN", "SCREEN$"): + error(get_lineno(items[2]), 'Unexpected "%s" ID. Expected "SCREEN$" instead' % items[2]) + return None + start = make_number(16384, lineno=get_lineno(items[0])) + length = make_number(6912, lineno=get_lineno(items[0])) + else: + start = make_typecast(Type.uinteger, items[3], get_lineno(items[3])) + length = make_typecast(Type.uinteger, items[5], get_lineno(items[5])) + p0 = make_sentence(get_lineno(items[0]), items[0], expr, start, length) + return p0 + + def save_data(self, meta, items): + p0 = None + if items[1].type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[0]), items[1].type_) + if len(items) + 1 != 4: + entry = SYMBOL_TABLE.access_id(items[3], get_lineno(items[3])) + if entry is None: + p0 = None + return p0 + mark_entry_as_accessed(entry) + access = entry + start = make_unary(get_lineno(items[3]), "ADDRESS", access, type_=Type.uinteger) + if entry.class_ == CLASS.array: + length = make_number(entry.memsize, lineno=get_lineno(items[3])) + else: + length = make_number(entry.type_.size, lineno=get_lineno(items[3])) + else: + access = SYMBOL_TABLE.access_label(gl.ZXBASIC_USER_DATA, get_lineno(items[2]), SYMBOL_TABLE.global_scope) + start = make_unary(get_lineno(items[2]), "ADDRESS", access, type_=Type.uinteger) + access = SYMBOL_TABLE.access_label( + gl.ZXBASIC_USER_DATA_LEN, get_lineno(items[2]), SYMBOL_TABLE.global_scope ) - return False + length = make_unary(get_lineno(items[2]), "ADDRESS", access, type_=Type.uinteger) + p0 = make_sentence(get_lineno(items[0]), items[0], items[1], start, length) + return p0 + + def load_or_verify(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def load_code(self, meta, items): + p0 = None + if items[1].type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[2]), items[1].type_) + if len(items) + 1 == 4: + if items[2].upper() not in ("SCREEN", "SCREEN$", "CODE"): + error(get_lineno(items[2]), 'Unexpected "%s" ID. Expected "SCREEN$" instead' % items[2]) + return None + if items[2].upper() == "CODE": + start = make_number(0, lineno=get_lineno(items[2])) + length = make_number(0, lineno=get_lineno(items[2])) + else: + start = make_number(16384, lineno=get_lineno(items[2])) + length = make_number(6912, lineno=get_lineno(items[2])) + else: + start = make_typecast(Type.uinteger, items[3], get_lineno(items[2])) + if len(items) + 1 == 5: + length = make_number(0, lineno=get_lineno(items[2])) + else: + length = make_typecast(Type.uinteger, items[5], get_lineno(items[4])) + p0 = make_sentence(get_lineno(items[2]), items[0], items[1], start, length) + return p0 + + def load_data(self, meta, items): + p0 = None + if items[1].type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[0]), items[1].type_) + if len(items) + 1 != 4: + entry = SYMBOL_TABLE.access_id(items[3], get_lineno(items[3])) + if entry is None: + p0 = None + return p0 + mark_entry_as_accessed(entry) + start = make_unary(get_lineno(items[3]), "ADDRESS", entry, type_=Type.uinteger) + if entry.class_ == CLASS.array: + length = make_number(entry.memsize, lineno=get_lineno(items[3])) + else: + length = make_number(entry.type_.size, lineno=get_lineno(items[3])) + else: + entry = SYMBOL_TABLE.access_label(gl.ZXBASIC_USER_DATA, get_lineno(items[2]), SYMBOL_TABLE.global_scope) + start = make_unary(get_lineno(items[2]), "ADDRESS", entry, type_=Type.uinteger) + entry = SYMBOL_TABLE.access_label(gl.ZXBASIC_USER_DATA_LEN, get_lineno(items[2]), SYMBOL_TABLE.global_scope) + length = make_unary(get_lineno(items[2]), "ADDRESS", entry, type_=Type.uinteger) + p0 = make_sentence(get_lineno(items[2]), items[0], items[1], start, length) + return p0 + + def numbertype(self, meta, items): + p0 = None + p0 = make_type(items[0].lower(), get_lineno(items[0])) + return p0 + + def expr_plus_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "PLUS", items[0], items[2], lambda x, y: x + y) + return p0 + + def expr_minus_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "MINUS", items[0], items[2], lambda x, y: x - y) + return p0 + + def expr_mul_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "MUL", items[0], items[2], lambda x, y: x * y) + return p0 + + def expr_div_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "DIV", items[0], items[2], lambda x, y: x / y) + return p0 + + def expr_mod_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "MOD", items[0], items[2], lambda x, y: x % y) + return p0 + + def expr_pow_expr(self, meta, items): + p0 = None + p0 = make_binary( + get_lineno(items[1]), + "POW", + make_typecast(Type.float_, items[0], get_lineno(items[1])), + make_typecast(Type.float_, items[2], meta_line(meta)), + lambda x, y: x**y, + ) + return p0 + + def expr_shl_expr(self, meta, items): + p0 = None + if items[0] is None or items[2] is None: + p0 = None + return p0 + if items[0].type_ in (Type.float_, Type.fixed): + items[0] = make_typecast(Type.ulong, items[0], get_lineno(items[1])) + p0 = make_binary( + get_lineno(items[1]), + "SHL", + items[0], + make_typecast(Type.ubyte, items[2], get_lineno(items[1])), + lambda x, y: x << y, + ) + return p0 + + def expr_shr_expr(self, meta, items): + p0 = None + if items[0] is None or items[2] is None: + p0 = None + return p0 + if items[0].type_ in (Type.float_, Type.fixed): + items[0] = make_typecast(Type.ulong, items[0], get_lineno(items[1])) + p0 = make_binary( + get_lineno(items[1]), + "SHR", + items[0], + make_typecast(Type.ubyte, items[2], get_lineno(items[1])), + lambda x, y: x >> y, + ) + return p0 + + def minus_expr(self, meta, items): + p0 = None + p0 = make_unary(get_lineno(items[0]), "MINUS", items[1], lambda x: -x) + return p0 + + def expr_eq_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "EQ", items[0], items[2], lambda x, y: x == y) + return p0 + + def expr_lt_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "LT", items[0], items[2], lambda x, y: x < y) + return p0 + + def expr_le_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "LE", items[0], items[2], lambda x, y: x <= y) + return p0 + + def expr_gt_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "GT", items[0], items[2], lambda x, y: x > y) + return p0 + + def expr_ge_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "GE", items[0], items[2], lambda x, y: x >= y) + return p0 + + def expr_ne_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "NE", items[0], items[2], lambda x, y: x != y) + return p0 + + def expr_or_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "OR", items[0], items[2], lambda x, y: x or y) + return p0 + + def expr_bor_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "BOR", items[0], items[2], lambda x, y: x | y) + return p0 + + def expr_xor_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "XOR", items[0], items[2], lambda x, y: x and (not y) or (not x and y)) + return p0 + + def expr_bxor_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "BXOR", items[0], items[2], lambda x, y: x ^ y) + return p0 + + def expr_and_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "AND", items[0], items[2], lambda x, y: x and y) + return p0 + + def expr_band_expr(self, meta, items): + p0 = None + p0 = make_binary(get_lineno(items[1]), "BAND", items[0], items[2], lambda x, y: x & y) + return p0 + + def not_expr(self, meta, items): + p0 = None + p0 = make_unary(get_lineno(items[0]), "NOT", items[1], lambda x: not x) + return p0 + + def bnot_expr(self, meta, items): + p0 = None + p0 = make_unary(get_lineno(items[0]), "BNOT", items[1], lambda x: ~x) + return p0 + + def lp_expr_rp(self, meta, items): + p0 = None + p0 = items[1] + return p0 + + def cast(self, meta, items): + p0 = None + p0 = make_typecast(items[2], items[4], get_lineno(items[5])) + return p0 + + def number_expr(self, meta, items): + p0 = None + p0 = make_number(items[0], lineno=get_lineno(items[0])) + return p0 + + def expr_pi(self, meta, items): + p0 = None + p0 = make_number(PI, lineno=get_lineno(items[0]), type_=Type.float_) + return p0 + + def expr_string(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def string_func_call(self, meta, items): + p0 = None + p0 = make_strslice(get_lineno(items[0]), items[0], items[1][0], items[1][1]) + return p0 + + def string_func_call_single(self, meta, items): + p0 = None + p0 = make_strslice(get_lineno(items[0]), items[0], items[2], items[2]) + return p0 + + def string_str(self, meta, items): + p0 = None + p0 = sym.STRING(items[0], get_lineno(items[0])) + return p0 + + def string_lprp(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def string_lp_expr_rp(self, meta, items): + p0 = None + p0 = make_strslice(get_lineno(items[1]), items[0], items[2], items[2]) + return p0 + + def expr_id_substr(self, meta, items): + p0 = None + entry = SYMBOL_TABLE.get_entry(items[0]) + if entry is not None and entry.type_ == Type.string and (entry.token == "CONST"): + p0 = make_strslice(get_lineno(items[0]), entry, items[1][0], items[1][1]) + return p0 + entry = SYMBOL_TABLE.access_var(items[0], get_lineno(items[0]), default_type=Type.string) + p0 = None + if entry is None: + return p0 + mark_entry_as_accessed(entry) + p0 = make_strslice(get_lineno(items[0]), entry, items[1][0], items[1][1]) + return p0 - if len(remaining) != boundlist[0].count: + def string_substr(self, meta, items): + p0 = None + p0 = make_strslice(get_lineno(items[0]), items[0], items[1][0], items[1][1]) + return p0 + + def string_expr_lp(self, meta, items): + p0 = None + if items[1].type_ != Type.string: error( - lineno, - "Mismatched vector size. Expected %i elements, got %i." % (boundlist[0].count, len(remaining)), + meta_line(meta), + "Expected a string type expression. Got %s type instead" % Type.to_string(items[1].type_), ) - return False # It's wrong. :-( - - for row in remaining: - if not check_bound(boundlist[1:], row): - return False - - return True - - p[0] = None - if p[4] is None or p[6] is None or p[8] is None: - return - - if not check_bound(p[4].children, p[8]): - return - - id_, lineno = p[2][0] - SYMBOL_TABLE.declare_array(id_, lineno, p[6], p[4], default_value=p[8]) - - entry = SYMBOL_TABLE.get_entry(id_) - if entry is None: - return - - if p[6] == Type.string or entry.type_ == Type.string: - errmsg.syntax_error_cannot_initialize_array_of_type(p.lineno(1), Type.string) - return - - -def p_bound_list(p): - """bound_list : bound""" - p[0] = make_bound_list(p[1]) - - -def p_bound_list_bound(p): - """bound_list : bound_list COMMA bound""" - p[0] = make_bound_list(p[1], p[3]) - - -def p_bound(p): - """bound : expr""" - p[0] = make_bound(make_number(OPTIONS.array_base, lineno=p.lineno(1)), p[1], p.lexer.lineno) - - -def p_bound_to_bound(p): - """bound : expr TO expr""" - p[0] = make_bound(p[1], p[3], p.lineno(2)) - - -def p_const_vector(p): - """const_vector : LBRACE const_vector_list RBRACE - | LBRACE const_number_list RBRACE - """ - p[0] = p[2] - - -def p_const_vector_elem_list(p): - """const_number_list : expr""" - if p[1] is None: - return - - if not is_static(p[1]): - if isinstance(p[1], sym.UNARY): - tmp = make_constexpr(p.lineno(1), p[1]) + p0 = None else: - errmsg.syntax_error_not_constant(p.lexer.lineno) - p[0] = None - return - else: - tmp = p[1] + p0 = make_strslice(meta_line(meta), items[1], items[3][0], items[3][1]) + return p0 + + def subind_str(self, meta, items): + p0 = None + p0 = ( + make_typecast(Type.uinteger, items[1], get_lineno(items[0])), + make_typecast(Type.uinteger, items[3], get_lineno(items[2])), + ) + return p0 - p[0] = [tmp] + def subind_strto(self, meta, items): + p0 = None + p0 = ( + make_typecast(Type.uinteger, make_number(0, lineno=get_lineno(items[1])), get_lineno(items[0])), + make_typecast(Type.uinteger, items[2], get_lineno(items[1])), + ) + return p0 + def subind_tostr(self, meta, items): + p0 = None + p0 = ( + make_typecast(Type.uinteger, items[1], get_lineno(items[0])), + make_typecast( + Type.uinteger, + make_number(gl.MAX_STRSLICE_IDX, lineno=get_lineno(items[3])), + lineno=get_lineno(items[3]), + ), + get_lineno(items[2]), + ) + return p0 -def p_const_vector_elem_list_list(p): - """const_number_list : const_number_list COMMA expr""" - if p[1] is None or p[3] is None: - return + def subind_to(self, meta, items): + p0 = None + p0 = ( + make_typecast(Type.uinteger, make_number(0, lineno=get_lineno(items[1])), get_lineno(items[0])), + make_typecast( + Type.uinteger, make_number(gl.MAX_STRSLICE_IDX, lineno=get_lineno(items[2])), get_lineno(items[1]) + ), + ) + return p0 - if not is_static(p[3]): - if isinstance(p[3], sym.UNARY): - tmp = make_constexpr(p.lineno(2), p[3]) + def id_expr(self, meta, items): + p0 = None + entry = SYMBOL_TABLE.access_id(items[0], get_lineno(items[0]), default_class=CLASS.var) + if entry is None: + p0 = None + return p0 + mark_entry_as_accessed(entry) + if entry.type_ == Type.auto: + entry.type_ = _TYPEREF(gl.DEFAULT_TYPE) + errmsg.warning_implicit_type(get_lineno(items[0]), items[0], entry.type_.name) + p0 = entry + if p0 is not None: + if not hasattr(gl, "expr_linenos"): + gl.expr_linenos = {} + gl.expr_linenos[id(p0)] = get_lineno(items[0]) + if entry.class_ == CLASS.array: + if not LET_ASSIGNMENT: + error(get_lineno(items[0]), "Variable '%s' is an array and cannot be used in this context" % items[0]) + p0 = None + elif entry.class_ == CLASS.function: + p0 = make_call(items[0], get_lineno(items[0]), make_arg_list(None)) + elif entry.class_ == CLASS.sub: + errmsg.syntax_error_is_a_sub_not_a_func(get_lineno(items[0]), items[0]) + p0 = None + return p0 + + def addr_of_id(self, meta, items): + p0 = None + id_: Id = items[1] + entry = SYMBOL_TABLE.access_id(id_.name, id_.lineno, ignore_explicit_flag=True) + if entry is None: + p0 = None + return p0 + entry.has_address = True + mark_entry_as_accessed(entry) + result = make_unary(get_lineno(items[0]), "ADDRESS", entry, type_=_TYPE(gl.PTR_TYPE)) + if is_dynamic(entry): + p0 = result else: - errmsg.syntax_error_not_constant(p.lineno(2)) - p[0] = None - return - else: - tmp = p[3] - - if p[1] is not None: - p[1].append(tmp) - p[0] = p[1] - - -def p_const_vector_list(p): - """const_vector_list : const_vector""" - p[0] = [p[1]] - - -def p_const_vector_vector_list(p): - """const_vector_list : const_vector_list COMMA const_vector""" - if len(p[3]) != len(p[1][0]): - error(p.lineno(2), "All rows must have the same number of elements") - p[0] = None - return - - p[0] = p[1] + [p[3]] - - -def p_staement_func_decl(p): - """statement : function_declaration""" - p[0] = p[1] - - -def p_statement_border(p): - """statement : BORDER expr""" - p[0] = make_sentence(p.lineno(1), "BORDER", make_typecast(Type.ubyte, p[2], p.lineno(1))) - - -def p_statement_plot(p): - """statement : PLOT expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "PLOT", - make_typecast(Type.ubyte, p[2], p.lineno(3)), - make_typecast(Type.ubyte, p[4], p.lineno(3)), - ) - - -def p_statement_plot_attr(p): - """statement : PLOT attr_list expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "PLOT", - make_typecast(Type.ubyte, p[3], p.lineno(4)), - make_typecast(Type.ubyte, p[5], p.lineno(4)), - p[2], - ) + p0 = make_constexpr(get_lineno(items[0]), result) + return p0 + + def expr_bexpr(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def expr_funccall(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def idcall_expr(self, meta, items): + p0 = None + if items[1] is None: + p0 = None + return p0 + p0 = make_call(items[0], get_lineno(items[0]), items[1]) + if p0 is None: + return p0 + if p0.token in ("STRSLICE", "ID", "STRING") or (p0.token == "CONST" and p0.type_ == Type.string): + entry = SYMBOL_TABLE.access_call(items[0], get_lineno(items[0])) + mark_entry_as_accessed(entry) + return p0 + convert_to_function(p0.entry, CLASS.function, get_lineno(items[0])) + mark_entry_as_accessed(p0.entry) + return p0 + + def array_eq_error(self, meta, items): + p0 = None + error(get_lineno(items[3]), f"Invalid assignment. Variable {items[1]}() is an array") + p0 = None + return p0 + + def arr_access_expr(self, meta, items): + p0 = None + p0 = make_call(items[0], get_lineno(items[0]), items[1]) + if p0 is None: + return p0 + entry = SYMBOL_TABLE.access_call(items[0], get_lineno(items[0])) + mark_entry_as_accessed(entry) + return p0 + + def let_arr_substr(self, meta, items): + p0 = None + i = 2 if items[0].upper() == "LET" else 1 + id_ = items[i - 1] + arg_list = items[i + 1 - 1] + substr = items[i + 2 - 1] + expr_ = items[i + 4 - 1] + p0 = make_array_substr_assign(get_lineno(items[i - 1]), id_, arg_list, substr, expr_) + return p0 + + def let_arr_substr_single(self, meta, items): + p0 = None + i = 2 if items[0].upper() == "LET" else 1 + id_ = items[i - 1] + arg_list = items[i + 1 - 1] + substr = (items[i + 3 - 1], items[i + 3 - 1]) + expr_ = items[i + 6 - 1] + p0 = make_array_substr_assign(get_lineno(items[i - 1]), id_, arg_list, substr, expr_) + return p0 + + def let_arr_substr_in_args(self, meta, items): + p0 = None + i = 2 if items[0].upper() == "LET" else 1 + id_ = items[i - 1] + arg_list = items[i + 2 - 1] + substr = (arg_list.children.pop().value, make_number(gl.MAX_STRSLICE_IDX, lineno=get_lineno(items[i + 3 - 1]))) + expr_ = items[i + 6 - 1] + p0 = make_array_substr_assign(get_lineno(items[i - 1]), id_, arg_list, substr, expr_) + return p0 + + def let_arr_substr_in_args2(self, meta, items): + p0 = None + i = 2 if items[0].upper() == "LET" else 1 + id_ = items[i - 1] + arg_list = items[i + 2 - 1] + top_ = items[i + 5 - 1] + substr = (make_number(0, lineno=get_lineno(items[i + 4 - 1])), top_) + expr_ = items[i + 8 - 1] + p0 = make_array_substr_assign(get_lineno(items[i - 1]), id_, arg_list, substr, expr_) + return p0 + + def let_arr_substr_in_args3(self, meta, items): + p0 = None + i = 2 if items[0].upper() == "LET" else 1 + id_ = items[i - 1] + arg_list = items[i + 2 - 1] + substr = ( + make_number(0, lineno=get_lineno(items[i + 4 - 1])), + make_number(gl.MAX_STRSLICE_IDX, lineno=get_lineno(items[i + 3 - 1])), + ) + expr_ = items[i + 7 - 1] + p0 = make_array_substr_assign(get_lineno(items[i - 1]), id_, arg_list, substr, expr_) + return p0 + + def let_arr_substr_in_args4(self, meta, items): + p0 = None + i = 2 if items[0].upper() == "LET" else 1 + id_ = items[i - 1] + arg_list = items[i + 2 - 1] + substr = (arg_list.children.pop().value, items[i + 4 - 1]) + expr_ = items[i + 7 - 1] + p0 = make_array_substr_assign(get_lineno(items[i - 1]), id_, arg_list, substr, expr_) + return p0 + + def addr_of_array_element(self, meta, items): + p0 = None + p0 = None + if items[2] is None: + return p0 + result = make_array_access(items[1], get_lineno(items[1]), items[2]) + if result is None: + return p0 + mark_entry_as_accessed(result.entry) + p0 = make_unary(get_lineno(items[0]), "ADDRESS", result, type_=_TYPE(gl.PTR_TYPE)) + return p0 + + def err_undefined_arr_access(self, meta, items): + p0 = None + error(get_lineno(items[1]), 'Undeclared array "%s"' % items[1]) + p0 = None + return p0 + + def bexpr_func(self, meta, items): + p0 = None + args = make_arg_list(make_argument(items[1], get_lineno(items[1]))) + p0 = make_call(items[0], get_lineno(items[0]), args) + if p0 is None: + return p0 + if p0.token in ("STRSLICE", "VAR", "STRING"): + entry = SYMBOL_TABLE.access_call(items[0], get_lineno(items[0])) + mark_entry_as_accessed(entry) + return p0 + convert_to_function(p0.entry, CLASS.function, get_lineno(items[0])) + mark_entry_as_accessed(p0.entry) + return p0 + + def arg_list(self, meta, items): + p0 = None + p0 = make_arg_list(None) + return p0 + + def arg_list_arg(self, meta, items): + p0 = None + p0 = items[1] + return p0 + + def arguments(self, meta, items): + p0 = None + if items[0] is None: + p0 = None + return p0 + p0 = make_arg_list(items[0]) + return p0 + + def arguments_argument(self, meta, items): + p0 = None + if items[0] is None or items[2] is None: + p0 = None + else: + p0 = make_arg_list(items[0], items[2]) + return p0 + + def argument(self, meta, items): + p0 = None + p0 = make_argument(items[0], meta_line(meta)) + return p0 + + def named_argument(self, meta, items): + p0 = None + p0 = make_argument(items[2], meta_line(meta), name=items[0]) + return p0 + + def argument_array(self, meta, items): + p0 = None + entry = SYMBOL_TABLE.access_array(items[0], get_lineno(items[0])) + if entry is None: + p0 = None + return p0 + mark_entry_as_accessed(entry) + p0 = make_argument(entry, meta_line(meta)) + return p0 + + def funcdecl(self, meta, items): + p0 = None + if items[0] is None: + p0 = None + return p0 + p0 = items[0] + p0.local_symbol_table = SYMBOL_TABLE.current_scope + p0.locals_size = SYMBOL_TABLE.leave_scope() + FUNCTION_LEVEL.pop() + p0.entry.ref.body = items[1] + p0.local_symbol_table.owner = p0 + p0.entry.ref.forwarded = False + return p0 + + def funcdeclforward(self, meta, items): + p0 = None + if items[1] is None: + if FUNCTION_LEVEL: + FUNCTION_LEVEL.pop() + return p0 + if items[1].entry.forwarded: + error(get_lineno(items[0]), "duplicated declaration for function '%s'" % items[1].name) + items[1].entry.ref.forwarded = True + SYMBOL_TABLE.leave_scope(show_warnings=False) + FUNCTION_LEVEL.pop() + return p0 + + def function_header(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def function_header_pre(self, meta, items): + p0 = None + if items[0] is None or items[1] is None: + p0 = None + return p0 + forwarded = items[0].entry.forwarded + p0 = items[0] + p0.append_child(items[1]) + p0.params_size = items[1].size + lineno = get_lineno(items[2]) + previoustype_ = p0.type_ + if not items[2].implicit or p0.entry.type_ is None or p0.entry.type_ == Type.unknown: + p0.type_ = items[2] + if items[2].implicit and p0.entry.class_ == CLASS.function: + errmsg.warning_implicit_type(items[2].lineno, p0.entry.name, p0.type_.name) + if forwarded and previoustype_ != p0.type_: + errmsg.syntax_error_func_type_mismatch(lineno, p0.entry) + p0 = None + return p0 + if forwarded: + p1 = p0.entry.ref.params + p2 = items[1].children + if len(p1) != len(p2): + errmsg.syntax_error_parameter_mismatch(lineno, p0.entry) + p0 = None + return p0 + for a, b in zip(p1, p2): + if a.name != b.name: + warning( + lineno, "Parameter '%s' in function '%s' has been renamed to '%s'" % (a.name, p0.name, b.name) + ) + if a.type_ != b.type_ or a.byref != b.byref: + errmsg.syntax_error_parameter_mismatch(lineno, p0.entry) + p0 = None + return p0 + p0.entry.ref.params = items[1] + if FUNCTION_LEVEL[-1].class_ == CLASS.sub and (not items[2].implicit): + error(lineno, "SUBs cannot have a return type definition") + p0 = None + return p0 + if FUNCTION_LEVEL[-1].class_ == CLASS.function: + src.api.check.check_type_is_explicit(p0.lineno, p0.entry.name, items[2]) + if p0.entry.convention == CONVENTION.fastcall and len(items[1]) > 1: + class_ = "SUB" if FUNCTION_LEVEL[-1].class_ == CLASS.sub else "FUNCTION" + errmsg.warning_fastcall_with_N_parameters(lineno, class_, p0.entry.name, len(items[1])) + return p0 + + def function_def(self, meta, items): + p0 = None + convention = items[1] + name = items[2] + class_ = CLASS.sub if items[0] == "SUB" else CLASS.function + p0 = make_func_declaration(name, get_lineno(items[2]), class_) + SYMBOL_TABLE.enter_scope(name) + entry = SYMBOL_TABLE.get_entry(name) + FUNCTION_LEVEL.append(entry) + if entry.class_ in (CLASS.function, CLASS.sub): + FUNCTION_LEVEL[-1].ref.convention = convention + return p0 + + def convention(self, meta, items): + p0 = None + p0 = CONVENTION.stdcall + return p0 + + def convention2(self, meta, items): + p0 = None + p0 = CONVENTION.fastcall + return p0 + + def param_decl_none(self, meta, items): + p0 = None + p0 = make_param_list(None) + return p0 + + def param_decl(self, meta, items): + p0 = None + p0 = items[1] + return p0 + + def param_decl_list(self, meta, items): + p0 = None + p0 = make_param_list(items[0]) + return p0 + + def param_decl_list2(self, meta, items): + p0 = None + if items[0] is not None and items[2] is not None: + if items[2].default_value is None and items[0][-1].default_value is not None: + errmsg.syntax_error_mandatory_param_after_optional(items[2].lineno, items[0][-1].name, items[2].name) + p0 = make_param_list(items[0], items[2]) + return p0 + + def param_byref_definition(self, meta, items): + p0 = None + p0 = items[1] + if p0 is not None: + p0.ref.byref = True + return p0 + + def param_byval_definition(self, meta, items): + p0 = None + param_def = items[1] + p0 = param_def + if p0 is not None: + if param_def.class_ == CLASS.array: + errmsg.syntax_error_cannot_pass_array_by_value(get_lineno(items[0]), param_def.name) + p0 = None + return p0 + param_def.ref.byref = False + return p0 + + def param_definition(self, meta, items): + p0 = None + param_def = items[0] + p0 = param_def + if p0 is not None: + if param_def.class_ == CLASS.array: + param_def.ref.byref = True + else: + param_def.ref.byref = OPTIONS.default_byref + return p0 + + def param_def_array(self, meta, items): + p0 = None + typeref = items[3] + if typeref is None: + p0 = None + return p0 + lineno = items[0].lineno + id_ = items[0].name + src.api.check.check_type_is_explicit(lineno, id_, typeref) + p0 = make_param_decl(id_, lineno, typeref, is_array=True) + return p0 + + def param_def_type(self, meta, items): + p0 = None + id_: Id = items[0] + typedef = items[1] + if typedef is not None: + src.api.check.check_type_is_explicit(id_.lineno, id_.name, typedef) + default_value = make_typecast(typedef, items[2], id_.lineno) + p0 = make_param_decl(id_.name, id_.lineno, typedef, is_array=False, default_value=default_value) + return p0 + + def param_def_default_arg_value(self, meta, items): + p0 = None + if len(items) + 1 == 1: + p0 = None + return p0 + p0 = items[1] + return p0 + return p0 + + def function_body(self, meta, items): + p0 = None + if not FUNCTION_LEVEL: + end_tok = items[-1] + error(get_lineno(end_tok), "Unexpected token '%s'. No Function or Sub has been defined." % end_tok) + p0 = None + return None + a = FUNCTION_LEVEL[-1].class_ + if a not in (CLASS.sub, CLASS.function): + p0 = None + return None + end_tok = items[-1] + b = end_tok.split()[-1].lower() + if a != b: + error(get_lineno(end_tok), "Unexpected token '%s'. Should be 'END %s'" % (end_tok.upper(), a.upper())) + p0 = None + else: + p0 = make_block() if len(items) == 1 else items[0] + return p0 + + def type_def_empty(self, meta, items): + p0 = None + p0 = make_type(_TYPE(gl.DEFAULT_TYPE).name, meta_line(meta), implicit=True) + return p0 + + def type_def(self, meta, items): + p0 = None + p0 = make_type(items[1], get_lineno(items[1]), implicit=False) + return p0 + + def type_def_id(self, meta, items): + p0 = None + errmsg.error(get_lineno(items[1]), "Syntax Error. Unexpected token '%s' " % items[1]) + p0 = make_type("float", get_lineno(items[1]), implicit=False) + return p0 + + def type(self, meta, items): + p0 = None + p0 = items[0].lower() + return p0 + + def preproc_line_init(self, meta, items): + p0 = None + INITS.add(items[1]) + return p0 + + def preproc_line_require(self, meta, items): + p0 = None + arch.target.backend.REQUIRES.add(items[1]) + return p0 + + def preproc_line_pragma_option(self, meta, items): + p0 = None + try: + setattr(OPTIONS, items[1], items[3]) + except src.api.options.UndefinedOptionError: + errmsg.warning_ignoring_unknown_pragma(get_lineno(items[1]), items[1]) + return p0 + def preproc_pragma_push(self, meta, items): + p0 = None + try: + OPTIONS[items[3]].push() + except src.api.options.UndefinedOptionError: + errmsg.warning_ignoring_unknown_pragma(get_lineno(items[3]), items[3]) + return p0 -def p_statement_draw3(p): - """statement : DRAW expr COMMA expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "DRAW3", - make_typecast(Type.integer, p[2], p.lineno(3)), - make_typecast(Type.integer, p[4], p.lineno(5)), - make_typecast(Type.float_, p[6], p.lineno(5)), - ) - - -def p_statement_draw3_attr(p): - """statement : DRAW attr_list expr COMMA expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "DRAW3", - make_typecast(Type.integer, p[3], p.lineno(4)), - make_typecast(Type.integer, p[5], p.lineno(6)), - make_typecast(Type.float_, p[7], p.lineno(6)), - p[2], - ) - - -def p_statement_draw(p): - """statement : DRAW expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "DRAW", - make_typecast(Type.integer, p[2], p.lineno(3)), - make_typecast(Type.integer, p[4], p.lineno(3)), - ) - - -def p_statement_draw_attr(p): - """statement : DRAW attr_list expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "DRAW", - make_typecast(Type.integer, p[3], p.lineno(4)), - make_typecast(Type.integer, p[5], p.lineno(4)), - p[2], - ) - - -def p_statement_circle(p): - """statement : CIRCLE expr COMMA expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "CIRCLE", - make_typecast(Type.byte_, p[2], p.lineno(3)), - make_typecast(Type.byte_, p[4], p.lineno(5)), - make_typecast(Type.byte_, p[6], p.lineno(5)), - ) - - -def p_statement_circle_attr(p): - """statement : CIRCLE attr_list expr COMMA expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "CIRCLE", - make_typecast(Type.byte_, p[3], p.lineno(4)), - make_typecast(Type.byte_, p[5], p.lineno(6)), - make_typecast(Type.byte_, p[7], p.lineno(6)), - p[2], - ) - - -def p_statement_cls(p): - """statement : CLS""" - p[0] = make_sentence(p.lineno(1), "CLS") - - -def p_statement_asm(p): - """statement : ASM""" - p[0] = make_asm_sentence(p[1], p.lineno(1)) - - -def p_statement_randomize(p): - """statement : RANDOMIZE""" - p[0] = make_sentence(p.lineno(1), "RANDOMIZE", make_number(0, lineno=p.lineno(1), type_=Type.ulong)) - - -def p_statement_randomize_expr(p): - """statement : RANDOMIZE expr""" - p[0] = make_sentence(p.lineno(1), "RANDOMIZE", make_typecast(Type.ulong, p[2], p.lineno(1))) - - -def p_statement_beep(p): - """statement : BEEP expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "BEEP", - make_typecast(Type.float_, p[2], p.lineno(1)), - make_typecast(Type.float_, p[4], p.lineno(3)), - ) - - -def p_statement_call(p): - """statement : ID arg_list - | ID arguments - | ID - """ - if len(p) > 2 and p[2] is None: - p[0] = None - elif len(p) == 2: - entry = SYMBOL_TABLE.get_entry(p[1]) - if entry is not None and entry.class_ in (CLASS.label, CLASS.unknown): - p[0] = make_label(p[1], p.lineno(1)) + def preproc_pragma_pop(self, meta, items): + p0 = None + try: + OPTIONS[items[3]].pop() + except src.api.options.UndefinedOptionError: + errmsg.warning_ignoring_unknown_pragma(get_lineno(items[3]), items[3]) + return p0 + + def expr_usr(self, meta, items): + p0 = None + if items[1].type_ == Type.string: + p0 = make_builtin(get_lineno(items[0]), "USR_STR", items[1], type_=Type.uinteger) else: - p[0] = make_sub_call(p[1], p.lineno(1), make_arg_list(None)) - else: - p[0] = make_sub_call(p[1], p.lineno(1), p[2]) + p0 = make_builtin( + get_lineno(items[0]), + "USR", + make_typecast(Type.uinteger, items[1], get_lineno(items[0])), + type_=Type.uinteger, + ) + return p0 + def expr_rnd(self, meta, items): + p0 = None + p0 = make_builtin(get_lineno(items[0]), "RND", None, type_=Type.float_) + return p0 -def p_assignment(p): - """statement : lexpr expr""" - global LET_ASSIGNMENT + def expr_peek(self, meta, items): + p0 = None + p0 = make_builtin( + get_lineno(items[0]), "PEEK", make_typecast(Type.uinteger, items[1], get_lineno(items[0])), type_=Type.ubyte + ) + return p0 + + def expr_peektype_(self, meta, items): + p0 = None + if items[2] is None or items[4] is None: + p0 = None + return p0 + p0 = make_builtin( + get_lineno(items[0]), + "PEEK", + make_typecast(Type.uinteger, items[4], get_lineno(items[3])), + type_=cast(sym.TYPEREF, items[2]).type_, + ) + return p0 - LET_ASSIGNMENT = False # Mark we're no longer using LET - p[0] = None - q = p[1:] - i = 1 + def expr_in(self, meta, items): + p0 = None + p0 = make_builtin( + get_lineno(items[0]), "IN", make_typecast(Type.uinteger, items[1], get_lineno(items[0])), type_=Type.ubyte + ) + return p0 - if q[1] is None: - return + def expr_lbound(self, meta, items): + p0 = None + entry = SYMBOL_TABLE.access_array(items[2], get_lineno(items[2])) + if entry is None: + p0 = None + return p0 + mark_entry_as_accessed(entry) + if entry.scope == SCOPE.parameter: + num = make_number(0, get_lineno(items[2]), Type.uinteger) + p0 = make_builtin(get_lineno(items[0]), items[0], [entry, num], type_=Type.uinteger) + else: + p0 = make_number(len(entry.bounds), get_lineno(items[2]), Type.uinteger) + return p0 + + def expr_lbound_expr(self, meta, items): + p0 = None + expr = items[4] + if expr is None: + p0 = None + return p0 + entry = SYMBOL_TABLE.access_array(items[2], get_lineno(items[2])) + if entry is None: + p0 = None + return p0 + mark_entry_as_accessed(entry) + num = make_typecast(Type.uinteger, expr, get_lineno(items[5])) + if num is None: + p0 = None + return p0 + if is_number(num) and entry.scope in (SCOPE.local, SCOPE.global_): + val = num.value + if val < 0 or val > len(entry.bounds): + error(get_lineno(items[5]), "Dimension out of range") + p0 = None + return p0 + if not val: + p0 = make_number(len(entry.bounds), get_lineno(items[2]), Type.uinteger) + elif items[0] == "LBOUND": + p0 = make_number(entry.bounds[val - 1].lower, get_lineno(items[2]), Type.uinteger) + else: + p0 = make_number(entry.bounds[val - 1].upper, get_lineno(items[2]), Type.uinteger) + return p0 + if items[0] == "LBOUND": + entry.ref.lbound_used = True + else: + entry.ref.ubound_used = True + p0 = make_builtin(get_lineno(items[0]), items[0], [entry, num], type_=Type.uinteger) + return p0 + + def len(self, meta, items): + p0 = None + arg = items[1] + if arg is None: + p0 = None + elif arg.token == "VAR" and arg.class_ == CLASS.array: + p0 = make_number(len(arg.bounds), lineno=get_lineno(items[0])) + elif arg.type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[0]), Type.to_string(arg.type_)) + p0 = None + elif is_string(arg): + p0 = make_number(len(arg.value), lineno=get_lineno(items[0])) + else: + p0 = make_builtin(get_lineno(items[0]), "LEN", arg, type_=Type.uinteger) + return p0 - if q[1].token == "VAR" and q[1].class_ == CLASS.unknown: - q[1] = SYMBOL_TABLE.access_var(q[1].name, p.lineno(i)) + def sizeof(self, meta, items): + p0 = None + if Type.to_type(items[2].lower()) is not None: + p0 = make_number(Type.size(Type.to_type(items[2].lower())), lineno=get_lineno(items[2])) + else: + entry = SYMBOL_TABLE.get_id_or_make_var(items[2], get_lineno(items[0])) + p0 = make_number(Type.size(entry.type_), lineno=get_lineno(items[2])) + return p0 + + def str(self, meta, items): + p0 = None + if is_number(items[1]): + p0 = sym.STRING(str(items[1].value), get_lineno(items[0])) + else: + p0 = make_builtin( + get_lineno(items[0]), + "STR", + make_typecast(Type.float_, items[1], get_lineno(items[0])), + type_=Type.string, + ) + return p0 + + def inkey(self, meta, items): + p0 = None + p0 = make_builtin(get_lineno(items[0]), "INKEY", None, type_=Type.string) + return p0 + + def chr_one(self, meta, items): + p0 = None + arg_list = make_arg_list(make_argument(items[1], get_lineno(items[0]))) + arg_list[0].value = make_typecast(Type.ubyte, arg_list[0].value, get_lineno(items[0])) + p0 = make_builtin(get_lineno(items[0]), "CHR", arg_list, type_=Type.string) + return p0 + + def chr(self, meta, items): + p0 = None + if len(items[1]) < 1: + error(get_lineno(items[0]), "CHR$ function need at less 1 parameter") + p0 = None + return p0 + for i in range(len(items[1])): + items[1][i].value = make_typecast(Type.ubyte, items[1][i].value, get_lineno(items[0])) + p0 = make_builtin(get_lineno(items[0]), "CHR", items[1], type_=Type.string) + return p0 + + def val(self, meta, items): + p0 = None + + def val(s): + try: + x = float(eval(s, {}, {})) + except: + x = 0 + warning(get_lineno(items[0]), f"Invalid string numeric constant '{s}' evaluated as 0") + return x + + if items[1].type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[0]), Type.to_string(items[1].type_)) + p0 = None + else: + p0 = make_builtin(get_lineno(items[0]), "VAL", items[1], val, type_=Type.float_) + return p0 + + def code(self, meta, items): + p0 = None + + def asc(x): + if len(x): + return ord(x[0]) + return 0 + + if items[1] is None: + p0 = None + return p0 + if items[1].type_ != Type.string: + errmsg.syntax_error_expected_string(get_lineno(items[0]), Type.to_string(items[1].type_)) + p0 = None + else: + p0 = make_builtin(get_lineno(items[0]), "CODE", items[1], asc, type_=Type.ubyte) + return p0 + + def sgn(self, meta, items): + p0 = None + sgn = lambda x: x < 0 and -1 or (x > 0 and 1) or 0 + if items[1].type_ == Type.string: + error(get_lineno(items[0]), "Expected a numeric expression, got TYPE.string instead") + p0 = None + else: + if is_unsigned(items[1]) and (not is_number(items[1])): + warning(get_lineno(items[0]), "Sign of unsigned value is always 0 or 1") + p0 = make_builtin(get_lineno(items[0]), "SGN", items[1], sgn, type_=Type.byte_) + return p0 + + def expr_trig(self, meta, items): + p0 = None + p0 = make_builtin( + get_lineno(items[0]), + items[0], + make_typecast(Type.float_, items[1], get_lineno(items[0])), + { + "SIN": math.sin, + "COS": math.cos, + "TAN": math.tan, + "ASN": math.asin, + "ACS": math.acos, + "ATN": math.atan, + "LN": lambda y: math.log(y, math.exp(1)), + "EXP": math.exp, + "SQR": math.sqrt, + }[items[0]], + type_=Type.float_, + ) + return p0 + + def math_fn(self, meta, items): + p0 = None + p0 = items[0] + return p0 + + def expr_int(self, meta, items): + p0 = None + p0 = make_typecast(Type.long_, items[1], get_lineno(items[0])) + return p0 + + def abs(self, meta, items): + p0 = None + if is_unsigned(items[1]): + p0 = items[1] + warning(get_lineno(items[0]), "Redundant operation ABS for unsigned value") + return p0 + p0 = make_builtin(get_lineno(items[0]), "ABS", items[1], lambda x: x if x >= 0 else -x) + return p0 + + +def handle_parse_error(e): + if not isinstance(e, UnexpectedInput): + raise e + gl.reporting_syntax_error = True + try: + return _handle_parse_error_inner(e) + finally: + gl.reporting_syntax_error = False - q1class_ = q[1].class_ if q[1].token == "VAR" else CLASS.unknown - variable = SYMBOL_TABLE.access_id(q[0], p.lineno(i), default_type=q[1].type_, default_class=q1class_) - if variable is None: - return # HINT: This only happens if variable was not declared with DIM and --strict flag is in use - if variable.class_ == CLASS.unknown: # The variable is implicit - variable = variable.to_var() +def _handle_parse_error_inner(e): + from src.api import errmsg + from src.api.errmsg import error - if variable.class_ not in (CLASS.var, CLASS.array): - errmsg.syntax_error_cannot_assign_not_a_var(p.lineno(i), variable.name) - return + from .zxbparser_standalone import UnexpectedEOF, UnexpectedToken - if variable.class_ == CLASS.var and q1class_ == CLASS.array: - error(p.lineno(i), "Cannot assign an array to an scalar variable") - return + is_eof = isinstance(e, UnexpectedEOF) or (isinstance(e, UnexpectedToken) and e.token.type == "$END") - expr = make_typecast(variable.type_, q[1], p.lineno(i)) - p[0] = make_sentence(p.lineno(1), "LET", variable, expr) + if not is_eof: + # UnexpectedToken, not EOF + tok = e.token + t_type = tok.type + t_val = tok.value + if t_type.startswith("END_") and "_" in t_type: + t_type = "END" + t_val = t_val.split()[0] + if t_type == "NEWLINE": + msg = "Unexpected end of line" + else: + msg = "Syntax Error. Unexpected token '%s' <%s>" % (t_val, t_type) + if hasattr(gl, "tokens_rejected"): + gl.tokens_rejected += 1 + yielded = getattr(gl, "tokens_yielded", 0) + rejected = getattr(gl, "tokens_rejected", 0) + shifted = yielded - rejected + shifted_at_last = getattr(gl, "shifted_at_last_error", 0) + if shifted - shifted_at_last < 3: + return True + gl.shifted_at_last_error = shifted + key = (getattr(gl, "FILENAME", ""), tok.line) + last_key = getattr(handle_parse_error, "last_key", None) + if key == last_key: + return True + handle_parse_error.last_key = key + gl.syntax_error_occurred = True + error(tok.line, msg) + return True + # EOF cases + if gl.LOOPS: # some loop(s) are not closed + loop_info = gl.LOOPS[-1] + if loop_info.type == LoopType.FOR: + errmsg.syntax_error_for_without_next(loop_info.lineno) + else: + errmsg.syntax_error_loop_not_closed(loop_info.lineno, loop_info.type.value) -def p_lexpr(p): - """lexpr : ID EQ - | LET ID EQ - """ - global LET_ASSIGNMENT - - LET_ASSIGNMENT = True # Mark we're about to start a LET sentence - - if p[1] == "LET": - p[0] = p[2] - i = 2 - else: - p[0] = p[1] - i = 1 - - SYMBOL_TABLE.access_id(p[i], p.lineno(i)) - - -def p_array_copy(p): - """statement : ARRAY_ID EQ ARRAY_ID - | LET ARRAY_ID EQ ARRAY_ID - """ - if p[1] == "LET": - array_id1, array_id2 = p[2], p[4] - l1, l2 = p.lineno(2), p.lineno(4) - else: - array_id1, array_id2 = p[1], p[3] - l1, l2 = p.lineno(1), p.lineno(3) - - larray = SYMBOL_TABLE.access_id(array_id1, l1) - rarray = SYMBOL_TABLE.access_id(array_id2, l2) - - if larray is None or rarray is None: - p[0] = None - return - - if larray.type_ != rarray.type_: - error(l1, "Arrays must have the same element type") - return - - if larray.ref.memsize != rarray.ref.memsize: - error(l1, "Arrays '%s' and '%s' must have the same size" % (array_id1, array_id2)) - return - - if larray.ref.count != rarray.ref.count: - warning( - l1, - "Arrays '%s' and '%s' don't have the same number of dimensions" % (larray.name, rarray.name), - ) - else: - for b1, b2 in zip(larray.ref.bounds, rarray.ref.bounds): - if b1.count != b2.count: - warning( - l1, - "Arrays '%s' and '%s' don't have the same dimensions" % (array_id1, array_id2), - ) - break - # Array copy - mark_entry_as_accessed(larray) - mark_entry_as_accessed(rarray) - p[0] = make_sentence(p.lineno(1), "ARRAYCOPY", larray, rarray) - - -def p_arr_assignment(p): - """statement : ARRAY_ID arg_list EQ expr - | LET ARRAY_ID arg_list EQ expr - """ - i = 2 if p[1].upper() == "LET" else 1 - id_ = p[i] - arg_list = p[i + 1] - expr = p[i + 3] - - p[0] = None - if arg_list is None or expr is None: - return # There were errors - - entry = SYMBOL_TABLE.access_call(id_, p.lineno(i)) - if entry is None: - return - - if entry.type_ == Type.string: - variable = gl.SYMBOL_TABLE.access_array(id_, p.lineno(i)) - # variable is an array. If it has 0 bounds means they are undefined (param byref) - if len(variable.ref.bounds) and len(variable.ref.bounds) + 1 == len(arg_list): - ss = arg_list.children.pop().value - p[0] = make_array_substr_assign(p.lineno(i), id_, arg_list, (ss, ss), expr) - return - - arr = make_array_access(id_, p.lineno(i), arg_list) - if arr is None: - return - - expr = make_typecast(arr.type_, expr, p.lineno(i)) - if entry is None: - return - - if entry.addr is not None: # has addr? - mark_entry_as_accessed(entry) - - p[0] = make_sentence(p.lineno(1), "LETARRAY", arr, expr) - - -def p_substr_assignment_no_let(p): - """statement : ID LP expr RP EQ expr""" - # This can be only a substr assignment like a$(i + 3) = ".", since arrays - # have ARRAY_ID already - entry = SYMBOL_TABLE.access_call(p[1], p.lineno(1)) - if entry is None: - return - - if entry.class_ == CLASS.unknown: - errmsg.warning_uninitalized_string_var(p.lineno(1), entry.name) - entry.to_var() - - if p[6].type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(5), p[6].type_) - - lineno = p.lineno(2) - base = make_number(OPTIONS.string_base, lineno, _TYPE(gl.STR_INDEX_TYPE)) - substr = make_typecast(_TYPE(gl.STR_INDEX_TYPE), p[3], lineno) - p[0] = make_sentence( - p.lineno(1), - "LETSUBSTR", - entry, - make_binary(lineno, "MINUS", substr, base, func=lambda x, y: x - y), - make_binary(lineno, "MINUS", substr, base, func=lambda x, y: x - y), - p[6], - ) - - -def p_substr_assignment(p): - """statement : LET ID arg_list EQ expr""" - if p[3] is None or p[5] is None: - return # There were errors - - p[0] = None - entry = SYMBOL_TABLE.access_call(p[2], p.lineno(2)) - if entry is None: - return - - if entry.class_ == CLASS.unknown: - entry = entry.to_var() - - if entry.class_ != CLASS.var: - errmsg.syntax_error_cannot_assign_not_a_var(p.lineno(2), p[2]) - return - - if entry.type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(2), entry.type_) - return - - if p[5].type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(4), p[5].type_) - return - - if len(p[3]) > 1: - error(p.lineno(2), "Accessing string with too many indexes. Expected only one.") - return - - if len(p[3]) == 1: - substr = ( - make_typecast(_TYPE(gl.STR_INDEX_TYPE), p[3][0].value, p.lineno(2)), - make_typecast(_TYPE(gl.STR_INDEX_TYPE), p[3][0].value, p.lineno(2)), - ) - else: - substr = ( - make_typecast( - _TYPE(gl.STR_INDEX_TYPE), - make_number(gl.MIN_STRSLICE_IDX, lineno=p.lineno(2)), - p.lineno(2), - ), - make_typecast( - _TYPE(gl.STR_INDEX_TYPE), - make_number(gl.MAX_STRSLICE_IDX, lineno=p.lineno(2)), - p.lineno(2), - ), - ) - - lineno = p.lineno(2) - base = make_number(OPTIONS.string_base, lineno, _TYPE(gl.STR_INDEX_TYPE)) - p[0] = make_sentence( - p.lineno(1), - "LETSUBSTR", - entry, - make_binary(lineno, "MINUS", substr[0], base, func=lambda x, y: x - y), - make_binary(lineno, "MINUS", substr[1], base, func=lambda x, y: x - y), - p[5], - ) - - -def p_str_assign(p): - """statement : ID substr EQ expr - | LET ID substr EQ expr - """ - if p[1].upper() != "LET": - q = p[1] - r = p[4] - s = p[2] - lineno = p.lineno(3) - else: - q = p[2] - r = p[5] - s = p[3] - lineno = p.lineno(4) - - if q is None or s is None: - p[0] = None - return - - if r.type_ != Type.string: - errmsg.syntax_error_expected_string(lineno, r.type_) - - entry = SYMBOL_TABLE.access_var(q, lineno, default_type=Type.string) - if entry is None: - p[0] = None - return - - p[0] = make_sentence(p.lineno(1), "LETSUBSTR", entry, s[0], s[1], r) - - -def p_goto(p): - """statement : goto NUMBER - | goto ID - """ - entry = check_and_make_label(p[2], p.lineno(2)) - if entry is not None: - p[0] = make_sentence(p.lineno(1), p[1].upper(), entry) - else: - p[0] = None - - -def p_go(p): - """goto : GO TO - | GO SUB - | GOTO - | GOSUB - """ - p[0] = p[1] - if p[0] == "GO": - p[0] += p[2] - - if p[0] == "GOSUB" and FUNCTION_LEVEL: # GOSUB not in global scope? - error(p.lineno(1), "GOSUB not allowed within SUB or FUNCTION") - - -# region [IF sentence] -def p_if_sentence(p): - """statement : if_then_part NEWLINE program_co endif - | if_then_part NEWLINE endif - | if_then_part NEWLINE statements_co endif - | if_then_part NEWLINE co_statements_co endif - | if_then_part NEWLINE label statements_co endif - """ - cond_ = p[1] - if len(p) == 6: - lbl = p[3] - stat_ = make_block(lbl, p[4]) - endif_ = p[5] - elif len(p) == 5: - stat_ = p[3] - endif_ = p[4] - else: - stat_ = make_nop() - endif_ = p[3] - - p[0] = make_sentence(p.lineno(2), "IF", cond_, make_block(stat_, endif_)) - - -def p_endif(p): - """endif : END IF - | label END IF - | ENDIF - | label ENDIF - """ - p[0] = make_nop() if p[1] in ("END", "ENDIF") else p[1] - - -def p_statement_if(p): - """statement : if_inline %prec RP""" - p[0] = p[1] - - -def p_statement_if_then_endif(p): - """statement : if_then_part statements_co endif - | if_then_part co_statements_co endif - """ - cond_ = p[1] - stat_ = p[2] - endif_ = p[3] - p[0] = make_sentence(p.lineno(1), "IF", cond_, make_block(stat_, endif_)) - - -def p_single_line_if(p): - """if_inline : if_then_part statements %prec ID - | if_then_part co_statements_co %prec NEWLINE - | if_then_part statements_co %prec NEWLINE - | if_then_part co_statements %prec ID - """ - cond_ = p[1] - stat_ = p[2] - p[0] = make_sentence(p.lineno(1), "IF", cond_, stat_) - - -def p_if_elseif(p): - """statement : if_then_part NEWLINE program_co elseiflist - | if_then_part NEWLINE elseiflist - """ - cond_ = p[1] - stats_ = p[3] if len(p) == 5 else make_nop() - eliflist = p[4] if len(p) == 5 else p[3] - p[0] = make_sentence(p.lineno(2), "IF", cond_, stats_, eliflist) - - -def p_elseif_part(p): - """elseif_expr : ELSEIF expr then - | label ELSEIF expr then - """ - if p[1] == "ELSEIF": - label_ = make_nop() # No label - cond_ = p[2] - else: - label_ = p[1] - cond_ = p[3] - - p[0] = label_, cond_ - - -def p_elseif_list(p): - """elseiflist : elseif_expr program_co endif - | elseif_expr program_co else_part - """ - label_, cond_ = p[1] - then_ = p[2] - else_ = p[3] - - if isinstance(else_, list): # it's an else part - else_ = make_block(*else_) - else: - then_ = make_block(then_, else_) - else_ = None - - p[0] = make_block(label_, make_sentence(p.lineno(1), "IF", cond_, then_, else_)) - - -def p_elseif_elseiflist(p): - """elseiflist : elseif_expr program_co elseiflist""" - label_, cond_ = p[1] - then_ = p[2] - else_ = p[3] - p[0] = make_block(label_, make_sentence(p.lineno(1), "IF", cond_, then_, else_)) - - -def p_else_part_endif(p): - """else_part_inline : ELSE NEWLINE program_co endif - | ELSE NEWLINE statements_co endif - | ELSE NEWLINE co_statements_co endif - | ELSE NEWLINE endif - | ELSE NEWLINE label statements_co endif - | ELSE NEWLINE label co_statements_co endif - | ELSE statements_co endif - | ELSE co_statements_co endif - """ - if p[2] == "\n": - if len(p) == 4: - p[0] = [make_nop(), p[3]] - elif len(p) == 6: - p[0] = [p[3], p[4], p[5]] - else: - p[0] = [p[3], p[4]] - else: - p[0] = [p[2], p[3]] - - -def p_else_part(p): - """else_part_inline : ELSE statements_co - | ELSE co_statements_co - | ELSE co_statements - | ELSE statements - """ - p[0] = [p[2], make_nop()] - - -def p_else_part_is_inline(p): - """else_part : else_part_inline""" - p[0] = p[1] - - -def p_else_part_label(p): - """else_part : label ELSE program_co endif - | label ELSE statements_co endif - | label ELSE co_statements_co endif - """ - lbl = p[1] - p[0] = [make_block(lbl, p[3]), p[4]] - - -def p_if_then_part(p): - """if_then_part : IF expr then""" - expr = p[2] - if expr is None: - p[0] = None - return - - if is_number(expr): - errmsg.warning_condition_is_always(p.lineno(1), bool(expr.value)) - - p[0] = expr - - -def p_if_inline(p): - """statement : if_inline else_part_inline""" - p[1].append_child(make_block(p[2][0], p[2][1])) - p[0] = p[1] - - -def p_if_else(p): - """statement : if_then_part NEWLINE program_co else_part""" - cond_ = p[1] - then_ = p[3] - else_ = p[4][0] - endif = p[4][1] - p[0] = make_sentence(p.lineno(2), "IF", cond_, then_, make_block(else_, endif)) - - -def p_then(p): - """then : - | THEN - """ - - -# endregion - - -# region [FOR sentence] -def p_for_sentence(p): - """statement : for_start program_co label_next - | for_start co_statements_co label_next - | for_start program label_next - """ - p[0] = p[1] - if is_null(p[0]): - return - p[1].append_child(make_block(p[2], p[3])) - gl.LOOPS.pop() - - -def p_next(p): - """label_next : label NEXT - | NEXT - """ - p[0] = make_nop() if p[1] == "NEXT" else p[1] - - -def p_next1(p): - """label_next : label NEXT ID - | NEXT ID - """ - if p[1] == "NEXT": - p1 = make_nop() - p3 = p[2] - else: - p1 = p[1] - p3 = p[3] - - if p3 != gl.LOOPS[-1].var: - errmsg.syntax_error_wrong_for_var(p.lineno(2), gl.LOOPS[-1].var, p3) - p[0] = make_nop() - return - - p[0] = p1 - - -def p_for_sentence_start(p): - """for_start : FOR ID EQ expr TO expr step""" - gl.LOOPS.append(LoopInfo(type=LoopType.FOR, lineno=p.lineno(1), var=p[2])) - p[0] = None - - if p[4] is None or p[6] is None or p[7] is None: - return - - if is_number(p[4], p[6], p[7]): - if p[4].value != p[6].value and p[7].value == 0: - warning(p.lineno(5), "STEP value is 0 and FOR might loop forever") - - if p[4].value > p[6].value and p[7].value > 0: - warning( - p.lineno(5), - "FOR start value is greater than end. This FOR loop is useless", - ) - - if p[4].value < p[6].value and p[7].value < 0: - warning( - p.lineno(2), - "FOR start value is lower than end. This FOR loop is useless", - ) - - id_type = common_type(common_type(p[4].type_, p[6].type_), p[7].type_) - variable = SYMBOL_TABLE.access_var(p[2], p.lineno(2), default_type=id_type) - if variable is None: - return - - mark_entry_as_accessed(variable) - expr1 = make_typecast(variable.type_, p[4], p.lineno(3)) - expr2 = make_typecast(variable.type_, p[6], p.lineno(5)) - expr3 = make_typecast(variable.type_, p[7], p.lexer.lineno) - - p[0] = make_sentence(p.lineno(1), "FOR", variable, expr1, expr2, expr3) - - -def p_step(p): - """step :""" - p[0] = make_number(1, lineno=p.lexer.lineno) - - -def p_step_expr(p): - """step : STEP expr""" - p[0] = p[2] - - -# endregion - - -def p_end(p): - """statement : END expr - | END - """ - q = make_number(0, lineno=p.lineno(1)) if len(p) == 2 else p[2] - p[0] = make_sentence(p.lineno(1), "END", q) - - -def p_error_raise(p): - """statement : ERROR expr""" - q = make_number(1, lineno=p.lineno(2)) - r = make_binary( - p.lineno(1), - "MINUS", - make_typecast(Type.ubyte, p[2], p.lineno(1)), - q, - lambda x, y: x - y, - ) - p[0] = make_sentence(p.lineno(1), "ERROR", r) - - -def p_stop_raise(p): - """statement : STOP expr - | STOP - """ - q = make_number(9, lineno=p.lineno(1)) if len(p) == 2 else p[2] - z = make_number(1, lineno=p.lineno(1)) - r = make_binary( - p.lineno(1), - "MINUS", - make_typecast(Type.ubyte, q, p.lineno(1)), - z, - lambda x, y: x - y, - ) - p[0] = make_sentence(p.lineno(1), "STOP", r) - - -def p_loop(p): - """label_loop : label LOOP - | LOOP - """ - if p[1] == "LOOP": - p[0] = None - else: - p[0] = p[1] - - -def p_do_loop(p): - """statement : do_start program_co label_loop - | do_start label_loop - | DO label_loop - """ - if len(p) == 4: - q = make_block(p[2], p[3]) - else: - q = p[2] - - if p[1] == "DO": - gl.LOOPS.append(LoopInfo(LoopType.DO, p.lineno(1))) - - if q is None: - warning(p.lineno(1), "Infinite empty loop") - - # An infinite loop and no warnings - p[0] = make_sentence(p.lineno(1), "DO_LOOP", q) - gl.LOOPS.pop() - - -def p_do_loop_until(p): - """statement : do_start program_co label_loop UNTIL expr - | do_start label_loop UNTIL expr - | DO label_loop UNTIL expr - """ - if len(p) == 6: - q = make_block(p[2], p[3]) - r = p[5] - else: - q = p[2] - r = p[4] - - if p[1] == "DO": - gl.LOOPS.append(LoopInfo(LoopType.DO, p.lineno(1))) - - p[0] = make_sentence(p.lineno(1), "DO_UNTIL", r, q) - - gl.LOOPS.pop() - if is_number(r): - errmsg.warning_condition_is_always(p.lineno(3), bool(r.value)) - if q is None: - errmsg.warning_empty_loop(p.lineno(3)) - - -def p_data(p): - """statement : DATA arguments""" - label_ = make_label(gl.DATA_PTR_CURRENT, lineno=p.lineno(1)) - datas_ = [] - funcs = [] - - if p[2] is None: - p[0] = None - return - - if gl.FUNCTION_LEVEL: - errmsg.error(p.lineno(1), "DATA not allowed within Functions nor Subs") - p[0] = None - return - - for d in p[2].children: - value = d.value - if is_static(value): - datas_.append(d) - continue - - new_lbl = f"__DATA__FUNCPTR__{len(gl.DATA_FUNCTIONS)}" - type_ = value.type_ - assert isinstance(type_, sym.TYPING) - if isinstance(type_, sym.TYPE): - type_ = sym.TYPEREF(value.type_, 0) - - entry = make_func_declaration(new_lbl, p.lineno(1), type_=type_, class_=CLASS.function) - if not entry: - continue - - func = entry.entry - func.ref.convention = CONVENTION.fastcall - SYMBOL_TABLE.enter_scope(new_lbl) - func.ref.local_symbol_table = SYMBOL_TABLE.current_scope - func.ref.locals_size = SYMBOL_TABLE.leave_scope() - - gl.DATA_FUNCTIONS.append(func) - sent = make_sentence(p.lineno(1), "RETURN", func, value) - func.ref.body = make_block(sent) - datas_.append(entry) - funcs.append(entry) - - gl.DATAS.append(src.api.dataref.DataRef(label_, datas_)) - id_ = src.api.utils.current_data_label() - gl.DATA_PTR_CURRENT = id_ - - -def p_restore(p): - """statement : RESTORE - | RESTORE ID - | RESTORE NUMBER - """ - if len(p) == 2: - lbl = None - else: - lbl = check_and_make_label(p[2], p.lineno(1)) - - p[0] = make_sentence(p.lineno(1), "RESTORE", lbl) - - -def p_read(p): - """statement : READ arguments""" - gl.DATA_IS_USED = True - reads = [] - - if p[2] is None: - return - - for arg in p[2]: - entry = arg.value - if entry is None: - p[0] = None - return - - if entry.token == "VARARRAY": - errmsg.error(p.lineno(1), "Cannot read '%s'. It's an array" % entry.name) - p[0] = None - return - - if isinstance(entry, sym.ID): - if entry.class_ != CLASS.var: - errmsg.syntax_error_cannot_assign_not_a_var(p.lineno(2), entry.name) - p[0] = None - return - - mark_entry_as_accessed(entry) - if entry.type_ == Type.auto: - entry.type_ = _TYPE(gl.DEFAULT_TYPE) - errmsg.warning_implicit_type(p.lineno(2), p[2], entry.type_.name) - - reads.append(make_sentence(p.lineno(1), "READ", entry)) - continue - - if isinstance(entry, sym.ARRAYLOAD): - reads.append( - make_sentence( - p.lineno(1), - "READ", - sym.ARRAYACCESS(entry.entry, entry.args, entry.lineno, gl.FILENAME), - ) - ) - continue - - errmsg.error(p.lineno(1), "Syntax error. Can only read a variable or an array element") - p[0] = None - return - - p[0] = make_block(*reads) - - -def p_do_loop_while(p): - """statement : do_start program_co label_loop WHILE expr - | do_start label_loop WHILE expr - | DO label_loop WHILE expr - """ - if len(p) == 6: - q = make_block(p[2], p[3]) - r = p[5] - else: - q = p[2] - r = p[4] - - if p[1] == "DO": - gl.LOOPS.append(LoopInfo(LoopType.DO, p.lineno(1))) - - p[0] = make_sentence(p.lineno(1), "DO_WHILE", r, q) - gl.LOOPS.pop() - - if is_number(r): - errmsg.warning_condition_is_always(p.lineno(3), bool(r.value)) - if q is None: - errmsg.warning_empty_loop(p.lineno(3)) - - -def p_do_while_loop(p): - """statement : do_while_start program_co LOOP - | do_while_start co_statements_co LOOP - | do_while_start LOOP - """ - r = p[1] - q = p[2] - if q == "LOOP": - q = None - - p[0] = make_sentence(p.lineno(1), "WHILE_DO", r, q) - gl.LOOPS.pop() - - if is_number(r): - errmsg.warning_condition_is_always(p.lineno(2), bool(r.value)) - - -def p_do_until_loop(p): - """statement : do_until_start program_co LOOP - | do_until_start co_statements_co LOOP - | do_until_start LOOP - """ - r = p[1] - q = p[2] - if q == "LOOP": - q = None - - p[0] = make_sentence(p.lineno(2), "UNTIL_DO", r, q) - gl.LOOPS.pop() - - if is_number(r): - errmsg.warning_condition_is_always(p.lineno(2), bool(r.value)) - - -def p_do_while_start(p): - """do_while_start : DO WHILE expr""" - p[0] = p[3] - gl.LOOPS.append(LoopInfo(LoopType.DO, p.lineno(1))) - - -def p_do_until_start(p): - """do_until_start : DO UNTIL expr""" - p[0] = p[3] - gl.LOOPS.append(LoopInfo(LoopType.DO, p.lineno(1))) - - -def p_do_start(p): - """do_start : DO CO - | DO NEWLINE - """ - gl.LOOPS.append(LoopInfo(LoopType.DO, p.lineno(1))) - - -def p_label_end_while(p): - """label_end_while : label WEND - | label END WHILE - | WEND - | END WHILE - """ - if p[1] in ("WEND", "END"): - p[0] = None - else: - p[0] = p[1] - - -def p_while_sentence(p): - """statement : while_start co_statements_co label_end_while - | while_start program_co label_end_while - """ - gl.LOOPS.pop() - q = make_block(p[2], p[3]) - - if is_number(p[1]): - errmsg.warning_condition_is_always(p.lineno(1), bool(p[1].value)) - - p[0] = make_sentence(p.lineno(1), "WHILE", p[1], q) - - -def p_while_start(p): - """while_start : WHILE expr""" - p[0] = p[2] - gl.LOOPS.append(LoopInfo(LoopType.WHILE, p.lineno(1))) - if is_number(p[2]) and not p[2].value: - errmsg.warning_condition_is_always(p.lineno(1)) - - -def p_exit(p): - """statement : EXIT WHILE - | EXIT DO - | EXIT FOR - """ - q = p[2] - p[0] = make_sentence(p.lineno(1), "EXIT_%s" % q) - - for loop in gl.LOOPS: - if q == loop.type: - return - - error(p.lineno(1), "Syntax Error: EXIT %s out of loop" % q) - - -def p_continue(p): - """statement : CONTINUE WHILE - | CONTINUE DO - | CONTINUE FOR - """ - q = p[2] - p[0] = make_sentence(p.lineno(1), "CONTINUE_%s" % q) - - for i in gl.LOOPS: - if q == i[0]: - return - - error(p.lineno(1), "Syntax Error: CONTINUE %s out of loop" % q) - - -def p_print_sentence(p): - """statement : PRINT print_list""" - global PRINT_IS_USED - - p[0] = p[2] - PRINT_IS_USED = True - - -def p_print_elem_expr(p): - """print_elem : expr""" - p[0] = p[1] - if p[1] is not None and p[1].type_ == Type.boolean: - p[0] = make_typecast(Type.ubyte, p[1], p.lineno(1)) - - -def p_print_list_expr(p): - """print_elem : print_at - | print_tab - | attr - | BOLD expr - | ITALIC expr - """ - if p[1] in ("BOLD", "ITALIC"): - p[0] = make_sentence(p.lineno(1), p[1] + "_TMP", make_typecast(Type.ubyte, p[2], p.lineno(1))) - else: - p[0] = p[1] - - -def p_attr_list(p): - """attr_list : attr SC""" - p[0] = p[1] - - -def p_attr_list_list(p): - """attr_list : attr_list attr SC""" - p[0] = make_block(p[1], p[2]) - - -def p_attr(p): - """attr : OVER expr - | INVERSE expr - | INK expr - | PAPER expr - | BRIGHT expr - | FLASH expr - """ - # ATTR_LIST are used by drawing commands: PLOT, DRAW, CIRCLE - # BOLD and ITALIC are ignored by them, so we put them out of the - # attr definition so something like DRAW BOLD 1; .... will raise - # a syntax error - p[0] = make_sentence(p.lineno(1), p[1] + "_TMP", make_typecast(Type.ubyte, p[2], p.lineno(1))) - - -def p_print_list_epsilon(p): - """print_elem :""" - p[0] = None - - -def p_print_list_elem(p): - """print_list : print_elem""" - p[0] = make_sentence(p.lexer.lineno, "PRINT", p[1]) - p[0].eol = True - - -def p_print_list(p): - """print_list : print_list SC print_elem""" - p[0] = p[1] - p[0].eol = p[3] is not None - - if p[3] is not None: - p[0].append_child(p[3]) - - -def p_print_list_comma(p): - """print_list : print_list COMMA print_elem""" - p[0] = p[1] - p[0].eol = p[3] is not None - p[0].append_child(make_sentence(p.lineno(2), "PRINT_COMMA")) - - if p[3] is not None: - p[0].append_child(p[3]) - - -def p_print_list_at(p): - """print_at : AT expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "PRINT_AT", - make_typecast(Type.ubyte, p[2], p.lineno(1)), - make_typecast(Type.ubyte, p[4], p.lineno(3)), - ) - - -def p_print_list_tab(p): - """print_tab : TAB expr""" - p[0] = make_sentence(p.lineno(1), "PRINT_TAB", make_typecast(Type.ubyte, p[2], p.lineno(1))) - - -def p_on_goto(p): - """statement : ON expr goto label_list""" - expr = make_typecast(Type.ubyte, p[2], p.lineno(1)) - p[0] = make_sentence(p.lineno(1), "ON_" + p[3], expr, *p[4]) - - -def p_label_list(p): - """label_list : ID - | NUMBER - """ - entry = check_and_make_label(p[1], p.lineno(1)) - p[0] = [entry] - - -def p_label_list_list(p): - """label_list : label_list COMMA ID - | label_list COMMA NUMBER - """ - p[0] = p[1] - entry = check_and_make_label(p[3], p.lineno(3)) - p[1].append(entry) - - -def p_return(p): - """statement : RETURN""" - if not FUNCTION_LEVEL: # At less one level, otherwise, this return is from a GOSUB - p[0] = make_sentence(p.lineno(1), "RETURN") - return - - if FUNCTION_LEVEL[-1].class_ != CLASS.sub: - error(p.lineno(1), "Syntax Error: Function must RETURN a value.") - p[0] = None - return - - p[0] = make_sentence(p.lineno(1), "RETURN", FUNCTION_LEVEL[-1]) - - -def p_return_expr(p): - """statement : RETURN expr""" - if not FUNCTION_LEVEL: # At less one level - error(p.lineno(1), "Syntax Error: Returning value out of FUNCTION") - p[0] = None - return - - if FUNCTION_LEVEL[-1].class_ is CLASS.unknown: # This function was not correctly declared. - p[0] = None - return - - if FUNCTION_LEVEL[-1].class_ != CLASS.function: - error(p.lineno(1), "Syntax Error: SUBs cannot return a value") - p[0] = None - return - - if FUNCTION_LEVEL[-1].type_ is None: # There was an error in the Function declaration - p[0] = None - return - - if is_numeric(p[2]) and FUNCTION_LEVEL[-1].type_.final == Type.string: - error( - p.lineno(2), - "Type Error: Function must return a string, not a numeric value", - ) - p[0] = None - return - - if not is_numeric(p[2]) and FUNCTION_LEVEL[-1].type_.final != Type.string: - error( - p.lineno(2), - "Type Error: Function must return a numeric value, not a string", - ) - p[0] = None - return - - p[0] = make_sentence( - p.lineno(1), - "RETURN", - FUNCTION_LEVEL[-1], - make_typecast(FUNCTION_LEVEL[-1].type_, p[2], p.lineno(1)), - ) - - -def p_pause(p): - """statement : PAUSE expr""" - p[0] = make_sentence(p.lineno(1), "PAUSE", make_typecast(Type.uinteger, p[2], p.lineno(1))) - - -def p_poke(p): - """statement : POKE expr COMMA expr - | POKE LP expr COMMA expr RP - """ - i = 2 if isinstance(p[2], Symbol) or p[2] is None else 3 - if p[i] is None or p[i + 2] is None: - p[0] = None - return - p[0] = make_sentence( - p.lineno(1), - "POKE", - make_typecast(Type.uinteger, p[i], p.lineno(i + 1)), - make_typecast(Type.ubyte, p[i + 2], p.lineno(i + 1)), - ) - - -def p_poke2(p): - """statement : POKE numbertype expr COMMA expr - | POKE LP numbertype expr COMMA expr RP - """ - i = 2 if isinstance(p[2], Symbol) or p[2] is None else 3 - if p[i + 1] is None or p[i + 3] is None: - p[0] = None - return - p[0] = make_sentence( - p.lineno(1), - "POKE", - make_typecast(Type.uinteger, p[i + 1], p.lineno(i + 2)), - make_typecast(p[i], p[i + 3], p.lineno(i + 3)), - ) - - -def p_poke3(p): - """statement : POKE numbertype COMMA expr COMMA expr - | POKE LP numbertype COMMA expr COMMA expr RP - """ - i = 2 if isinstance(p[2], Symbol) or p[2] is None else 3 - if p[i + 2] is None or p[i + 4] is None: - p[0] = None - return - p[0] = make_sentence( - p.lineno(1), - "POKE", - make_typecast(Type.uinteger, p[i + 2], p.lineno(i + 3)), - make_typecast(p[i], p[i + 4], p.lineno(i + 5)), - ) - - -def p_out(p): - """statement : OUT expr COMMA expr""" - p[0] = make_sentence( - p.lineno(1), - "OUT", - make_typecast(Type.uinteger, p[2], p.lineno(3)), - make_typecast(Type.ubyte, p[4], p.lineno(4)), - ) - - -def p_simple_instruction(p): - """statement : ITALIC expr - | BOLD expr - | INK expr - | PAPER expr - | BRIGHT expr - | FLASH expr - | OVER expr - | INVERSE expr - """ - p[0] = make_sentence(p.lineno(1), p[1], make_typecast(Type.ubyte, p[2], p.lineno(1))) - - -def p_save_code(p): - """statement : SAVE expr CODE expr COMMA expr - | SAVE expr ID - | SAVE expr ARRAY_ID - """ - expr = p[2] - if expr.type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(1), expr.type_) - - if len(p) == 4: - if p[3].upper() not in ("SCREEN", "SCREEN$"): - error(p.lineno(3), 'Unexpected "%s" ID. Expected "SCREEN$" instead' % p[3]) - return None - # ZX Spectrum screen start + length - # This should be stored in a architecture-dependant file - start = make_number(16384, lineno=p.lineno(1)) - length = make_number(6912, lineno=p.lineno(1)) - else: - start = make_typecast(Type.uinteger, p[4], p.lineno(4)) - length = make_typecast(Type.uinteger, p[6], p.lineno(6)) - - p[0] = make_sentence(p.lineno(1), p[1], expr, start, length) - - -def p_save_data(p): - """statement : SAVE expr DATA - | SAVE expr DATA ID - | SAVE expr DATA ID LP RP - """ - if p[2].type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(1), p[2].type_) - - if len(p) != 4: - entry = SYMBOL_TABLE.access_id(p[4], p.lineno(4)) - if entry is None: - p[0] = None - return - - mark_entry_as_accessed(entry) - access = entry - start = make_unary(p.lineno(4), "ADDRESS", access, type_=Type.uinteger) - - if entry.class_ == CLASS.array: - length = make_number(entry.memsize, lineno=p.lineno(4)) - else: - length = make_number(entry.type_.size, lineno=p.lineno(4)) - else: - access = SYMBOL_TABLE.access_label(gl.ZXBASIC_USER_DATA, p.lineno(3), SYMBOL_TABLE.global_scope) - start = make_unary(p.lineno(3), "ADDRESS", access, type_=Type.uinteger) - - access = SYMBOL_TABLE.access_label(gl.ZXBASIC_USER_DATA_LEN, p.lineno(3), SYMBOL_TABLE.global_scope) - length = make_unary(p.lineno(3), "ADDRESS", access, type_=Type.uinteger) - - p[0] = make_sentence(p.lineno(1), p[1], p[2], start, length) - - -def p_load_or_verify(p): - """load_or_verify : LOAD - | VERIFY - """ - p[0] = p[1] - - -def p_load_code(p): - """statement : load_or_verify expr ID - | load_or_verify expr CODE - | load_or_verify expr CODE expr - | load_or_verify expr CODE expr COMMA expr - """ - if p[2].type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(3), p[2].type_) - - if len(p) == 4: - if p[3].upper() not in ("SCREEN", "SCREEN$", "CODE"): - error(p.lineno(3), 'Unexpected "%s" ID. Expected "SCREEN$" instead' % p[3]) - return None - if p[3].upper() == "CODE": # LOAD "..." CODE - start = make_number(0, lineno=p.lineno(3)) - length = make_number(0, lineno=p.lineno(3)) - else: # SCREEN$ - start = make_number(16384, lineno=p.lineno(3)) - length = make_number(6912, lineno=p.lineno(3)) - else: - start = make_typecast(Type.uinteger, p[4], p.lineno(3)) - - if len(p) == 5: - length = make_number(0, lineno=p.lineno(3)) - else: - length = make_typecast(Type.uinteger, p[6], p.lineno(5)) - - p[0] = make_sentence(p.lineno(3), p[1], p[2], start, length) - - -def p_load_data(p): - """statement : load_or_verify expr DATA - | load_or_verify expr DATA ID - | load_or_verify expr DATA ID LP RP - """ - if p[2].type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(1), p[2].type_) - - if len(p) != 4: - entry = SYMBOL_TABLE.access_id(p[4], p.lineno(4)) - if entry is None: - p[0] = None - return - - mark_entry_as_accessed(entry) - start = make_unary(p.lineno(4), "ADDRESS", entry, type_=Type.uinteger) - - if entry.class_ == CLASS.array: - length = make_number(entry.memsize, lineno=p.lineno(4)) - else: - length = make_number(entry.type_.size, lineno=p.lineno(4)) - else: - entry = SYMBOL_TABLE.access_label(gl.ZXBASIC_USER_DATA, p.lineno(3), SYMBOL_TABLE.global_scope) - start = make_unary(p.lineno(3), "ADDRESS", entry, type_=Type.uinteger) - - entry = SYMBOL_TABLE.access_label(gl.ZXBASIC_USER_DATA_LEN, p.lineno(3), SYMBOL_TABLE.global_scope) - length = make_unary(p.lineno(3), "ADDRESS", entry, type_=Type.uinteger) - - p[0] = make_sentence(p.lineno(3), p[1], p[2], start, length) - - -def p_numbertype(p): - """numbertype : BYTE - | UBYTE - | INTEGER - | UINTEGER - | LONG - | ULONG - | FIXED - | FLOAT - """ - p[0] = make_type(p[1].lower(), p.lineno(1)) - - -def p_expr_plus_expr(p): - """expr : expr PLUS expr""" - p[0] = make_binary(p.lineno(2), "PLUS", p[1], p[3], lambda x, y: x + y) - - -def p_expr_minus_expr(p): - """expr : expr MINUS expr""" - p[0] = make_binary(p.lineno(2), "MINUS", p[1], p[3], lambda x, y: x - y) - - -def p_expr_mul_expr(p): - """expr : expr MUL expr""" - p[0] = make_binary(p.lineno(2), "MUL", p[1], p[3], lambda x, y: x * y) - - -def p_expr_div_expr(p): - """expr : expr DIV expr""" - p[0] = make_binary(p.lineno(2), "DIV", p[1], p[3], lambda x, y: x / y) - - -def p_expr_mod_expr(p): - """expr : expr MOD expr""" - p[0] = make_binary(p.lineno(2), "MOD", p[1], p[3], lambda x, y: x % y) - - -def p_expr_pow_expr(p): - """expr : expr POW expr""" - p[0] = make_binary( - p.lineno(2), - "POW", - make_typecast(Type.float_, p[1], p.lineno(2)), - make_typecast(Type.float_, p[3], p.lexer.lineno), - lambda x, y: x**y, - ) - - -def p_expr_shl_expr(p): - """expr : expr SHL expr""" - if p[1] is None or p[3] is None: - p[0] = None - return - - if p[1].type_ in (Type.float_, Type.fixed): - p[1] = make_typecast(Type.ulong, p[1], p.lineno(2)) - - p[0] = make_binary( - p.lineno(2), - "SHL", - p[1], - make_typecast(Type.ubyte, p[3], p.lineno(2)), - lambda x, y: x << y, - ) - - -def p_expr_shr_expr(p): - """expr : expr SHR expr""" - if p[1] is None or p[3] is None: - p[0] = None - return - - if p[1].type_ in (Type.float_, Type.fixed): - p[1] = make_typecast(Type.ulong, p[1], p.lineno(2)) - - p[0] = make_binary( - p.lineno(2), - "SHR", - p[1], - make_typecast(Type.ubyte, p[3], p.lineno(2)), - lambda x, y: x >> y, - ) - - -def p_minus_expr(p): - """expr : MINUS expr %prec UMINUS""" - p[0] = make_unary(p.lineno(1), "MINUS", p[2], lambda x: -x) - - -def p_expr_EQ_expr(p): - """expr : expr EQ expr""" - p[0] = make_binary(p.lineno(2), "EQ", p[1], p[3], lambda x, y: x == y) - - -def p_expr_LT_expr(p): - """expr : expr LT expr""" - p[0] = make_binary(p.lineno(2), "LT", p[1], p[3], lambda x, y: x < y) - - -def p_expr_LE_expr(p): - """expr : expr LE expr""" - p[0] = make_binary(p.lineno(2), "LE", p[1], p[3], lambda x, y: x <= y) - - -def p_expr_GT_expr(p): - """expr : expr GT expr""" - p[0] = make_binary(p.lineno(2), "GT", p[1], p[3], lambda x, y: x > y) - - -def p_expr_GE_expr(p): - """expr : expr GE expr""" - p[0] = make_binary(p.lineno(2), "GE", p[1], p[3], lambda x, y: x >= y) - - -def p_expr_NE_expr(p): - """expr : expr NE expr""" - p[0] = make_binary(p.lineno(2), "NE", p[1], p[3], lambda x, y: x != y) - - -def p_expr_OR_expr(p): - """expr : expr OR expr""" - p[0] = make_binary(p.lineno(2), "OR", p[1], p[3], lambda x, y: x or y) - - -def p_expr_BOR_expr(p): - """expr : expr BOR expr""" - p[0] = make_binary(p.lineno(2), "BOR", p[1], p[3], lambda x, y: x | y) - - -def p_expr_XOR_expr(p): - """expr : expr XOR expr""" - p[0] = make_binary(p.lineno(2), "XOR", p[1], p[3], lambda x, y: (x and not y) or (not x and y)) - - -def p_expr_BXOR_expr(p): - """expr : expr BXOR expr""" - p[0] = make_binary(p.lineno(2), "BXOR", p[1], p[3], lambda x, y: x ^ y) - - -def p_expr_AND_expr(p): - """expr : expr AND expr""" - p[0] = make_binary(p.lineno(2), "AND", p[1], p[3], lambda x, y: x and y) - - -def p_expr_BAND_expr(p): - """expr : expr BAND expr""" - p[0] = make_binary(p.lineno(2), "BAND", p[1], p[3], lambda x, y: x & y) - - -def p_NOT_expr(p): - """expr : NOT expr""" - p[0] = make_unary(p.lineno(1), "NOT", p[2], lambda x: not x) - - -def p_BNOT_expr(p): - """expr : BNOT expr""" - p[0] = make_unary(p.lineno(1), "BNOT", p[2], lambda x: ~x) - - -def p_lp_expr_rp(p): - """bexpr : LP expr RP %prec ID""" - p[0] = p[2] - - -def p_cast(p): - """expr : CAST LP numbertype COMMA expr RP""" - p[0] = make_typecast(p[3], p[5], p.lineno(6)) - - -def p_number_expr(p): - """bexpr : NUMBER""" - p[0] = make_number(p[1], lineno=p.lineno(1)) - - -def p_expr_PI(p): - """bexpr : PI""" - p[0] = make_number(PI, lineno=p.lineno(1), type_=Type.float_) - - -def p_expr_string(p): - """bexpr : string %prec ID""" - p[0] = p[1] - - -def p_string_func_call(p): - """string : func_call substr""" - p[0] = make_strslice(p.lineno(1), p[1], p[2][0], p[2][1]) - - -def p_string_func_call_single(p): - """string : func_call LP expr RP""" - p[0] = make_strslice(p.lineno(1), p[1], p[3], p[3]) - - -def p_string_str(p): - """string : STRC""" - p[0] = sym.STRING(p[1], p.lineno(1)) - - -def p_string_lprp(p): - """string : string LP RP""" - p[0] = p[1] - - -def p_string_lp_expr_rp(p): - """string : string LP expr RP""" - p[0] = make_strslice(p.lineno(2), p[1], p[3], p[3]) - - -def p_expr_id_substr(p): - """string : ID substr""" - entry = SYMBOL_TABLE.get_entry(p[1]) - if entry is not None and entry.type_ == Type.string and entry.token == "CONST": - p[0] = make_strslice(p.lineno(1), entry, p[2][0], p[2][1]) - return - - entry = SYMBOL_TABLE.access_var(p[1], p.lineno(1), default_type=Type.string) - p[0] = None - if entry is None: - return - - mark_entry_as_accessed(entry) - p[0] = make_strslice(p.lineno(1), entry, p[2][0], p[2][1]) - - -def p_string_substr(p): - """string : string substr""" - p[0] = make_strslice(p.lineno(1), p[1], p[2][0], p[2][1]) - - -def p_string_expr_lp(p): - """string : LP expr RP substr""" - if p[2].type_ != Type.string: - error( - p.lexer.lineno, - "Expected a string type expression. Got %s type instead" % Type.to_string(p[2].type_), - ) - p[0] = None - else: - p[0] = make_strslice(p.lexer.lineno, p[2], p[4][0], p[4][1]) - - -def p_subind_str(p): - """substr : LP expr TO expr RP""" - p[0] = ( - make_typecast(Type.uinteger, p[2], p.lineno(1)), - make_typecast(Type.uinteger, p[4], p.lineno(3)), - ) - - -def p_subind_strTO(p): - """substr : LP TO expr RP""" - p[0] = ( - make_typecast(Type.uinteger, make_number(0, lineno=p.lineno(2)), p.lineno(1)), - make_typecast(Type.uinteger, p[3], p.lineno(2)), - ) - - -def p_subind_TOstr(p): - """substr : LP expr TO RP""" - p[0] = ( - make_typecast(Type.uinteger, p[2], p.lineno(1)), - make_typecast( - Type.uinteger, - make_number(gl.MAX_STRSLICE_IDX, lineno=p.lineno(4)), - lineno=p.lineno(4), - ), - p.lineno(3), - ) - - -def p_subind_TO(p): - """substr : LP TO RP""" - p[0] = ( - make_typecast(Type.uinteger, make_number(0, lineno=p.lineno(2)), p.lineno(1)), - make_typecast( - Type.uinteger, - make_number(gl.MAX_STRSLICE_IDX, lineno=p.lineno(3)), - p.lineno(2), - ), - ) - - -def p_id_expr(p): - """bexpr : ID""" - entry = SYMBOL_TABLE.access_id(p[1], p.lineno(1), default_class=CLASS.var) - if entry is None: - p[0] = None - return - - mark_entry_as_accessed(entry) - if entry.type_ == Type.auto: - entry.type_ = _TYPEREF(gl.DEFAULT_TYPE) - errmsg.warning_implicit_type(p.lineno(1), p[1], entry.type_.name) - - p[0] = entry - - if entry.class_ == CLASS.array: # HINT: This should never happen now - if not LET_ASSIGNMENT: - error( - p.lineno(1), - "Variable '%s' is an array and cannot be used in this context" % p[1], - ) - p[0] = None - elif entry.class_ == CLASS.function: # Function call with 0 args - p[0] = make_call(p[1], p.lineno(1), make_arg_list(None)) - elif entry.class_ == CLASS.sub: # Forbidden for subs - errmsg.syntax_error_is_a_sub_not_a_func(p.lineno(1), p[1]) - p[0] = None - - -def p_addr_of_id(p): - """bexpr : ADDRESSOF singleid""" - id_: Id = p[2] - # Access id. For @ operator we ignore the explicit flag - entry = SYMBOL_TABLE.access_id(id_.name, id_.lineno, ignore_explicit_flag=True) - if entry is None: - p[0] = None - return - - entry.has_address = True - mark_entry_as_accessed(entry) - result = make_unary(p.lineno(1), "ADDRESS", entry, type_=_TYPE(gl.PTR_TYPE)) - - if is_dynamic(entry): - p[0] = result - else: - p[0] = make_constexpr(p.lineno(1), result) - - -def p_expr_bexpr(p): - """expr : bexpr""" - p[0] = p[1] - - -def p_expr_funccall(p): - """bexpr : func_call %prec ID""" - p[0] = p[1] - - -def p_idcall_expr(p): - """func_call : ID arg_list %prec UMINUS""" # This can be a function call or a string index - if p[2] is None: - p[0] = None - return - - p[0] = make_call(p[1], p.lineno(1), p[2]) - if p[0] is None: - return - - if p[0].token in ("STRSLICE", "ID", "STRING") or p[0].token == "CONST" and p[0].type_ == Type.string: - entry = SYMBOL_TABLE.access_call(p[1], p.lineno(1)) - mark_entry_as_accessed(entry) - return - - convert_to_function(p[0].entry, CLASS.function, p.lineno(1)) - mark_entry_as_accessed(p[0].entry) - - -def p_array_eq_error(p): - """statement : LET ARRAY_ID EQ expr""" - error(p.lineno(4), f"Invalid assignment. Variable {p[2]}() is an array") - p[0] = None - - -def p_arr_access_expr(p): - """func_call : ARRAY_ID arg_list""" # This is an array access - p[0] = make_call(p[1], p.lineno(1), p[2]) - if p[0] is None: - return - - entry = SYMBOL_TABLE.access_call(p[1], p.lineno(1)) - mark_entry_as_accessed(entry) - - -def p_let_arr_substr(p): - """statement : LET ARRAY_ID arg_list substr EQ expr - | ARRAY_ID arg_list substr EQ expr - """ - i = 2 if p[1].upper() == "LET" else 1 - - id_ = p[i] - arg_list = p[i + 1] - substr = p[i + 2] - expr_ = p[i + 4] - p[0] = make_array_substr_assign(p.lineno(i), id_, arg_list, substr, expr_) - - -def p_let_arr_substr_single(p): - """statement : LET ARRAY_ID arg_list LP expr RP EQ expr - | ARRAY_ID arg_list LP expr RP EQ expr - """ - i = 2 if p[1].upper() == "LET" else 1 - - id_ = p[i] - arg_list = p[i + 1] - substr = (p[i + 3], p[i + 3]) - expr_ = p[i + 6] - p[0] = make_array_substr_assign(p.lineno(i), id_, arg_list, substr, expr_) - - -def p_let_arr_substr_in_args(p): - """statement : LET ARRAY_ID LP arguments TO RP EQ expr - | ARRAY_ID LP arguments TO RP EQ expr - """ - i = 2 if p[1].upper() == "LET" else 1 - - id_ = p[i] - arg_list = p[i + 2] - substr = ( - arg_list.children.pop().value, - make_number(gl.MAX_STRSLICE_IDX, lineno=p.lineno(i + 3)), - ) - expr_ = p[i + 6] - p[0] = make_array_substr_assign(p.lineno(i), id_, arg_list, substr, expr_) - - -def p_let_arr_substr_in_args2(p): - """statement : LET ARRAY_ID LP arguments COMMA TO expr RP EQ expr - | ARRAY_ID LP arguments COMMA TO expr RP EQ expr - """ - i = 2 if p[1].upper() == "LET" else 1 - - id_ = p[i] - arg_list = p[i + 2] - top_ = p[i + 5] - substr = (make_number(0, lineno=p.lineno(i + 4)), top_) - expr_ = p[i + 8] - p[0] = make_array_substr_assign(p.lineno(i), id_, arg_list, substr, expr_) - - -def p_let_arr_substr_in_args3(p): - """statement : LET ARRAY_ID LP arguments COMMA TO RP EQ expr - | ARRAY_ID LP arguments COMMA TO RP EQ expr - """ - i = 2 if p[1].upper() == "LET" else 1 - - id_ = p[i] - arg_list = p[i + 2] - substr = ( - make_number(0, lineno=p.lineno(i + 4)), - make_number(gl.MAX_STRSLICE_IDX, lineno=p.lineno(i + 3)), - ) - expr_ = p[i + 7] - p[0] = make_array_substr_assign(p.lineno(i), id_, arg_list, substr, expr_) - - -def p_let_arr_substr_in_args4(p): - """statement : LET ARRAY_ID LP arguments TO expr RP EQ expr - | ARRAY_ID LP arguments TO expr RP EQ expr - """ - i = 2 if p[1].upper() == "LET" else 1 - - id_ = p[i] - arg_list = p[i + 2] - substr = (arg_list.children.pop().value, p[i + 4]) - expr_ = p[i + 7] - p[0] = make_array_substr_assign(p.lineno(i), id_, arg_list, substr, expr_) - - -def p_addr_of_array_element(p): - """bexpr : ADDRESSOF ARRAY_ID arg_list""" - p[0] = None - - if p[3] is None: - return - - result = make_array_access(p[2], p.lineno(2), p[3]) - if result is None: - return - - mark_entry_as_accessed(result.entry) - p[0] = make_unary(p.lineno(1), "ADDRESS", result, type_=_TYPE(gl.PTR_TYPE)) - - -def p_err_undefined_arr_access(p): - """bexpr : ADDRESSOF ID arg_list""" - error(p.lineno(2), 'Undeclared array "%s"' % p[2]) - p[0] = None - - -def p_bexpr_func(p): - """bexpr : ID bexpr""" - args = make_arg_list(make_argument(p[2], p.lineno(2))) - p[0] = make_call(p[1], p.lineno(1), args) - if p[0] is None: - return - - if p[0].token in ("STRSLICE", "VAR", "STRING"): - entry = SYMBOL_TABLE.access_call(p[1], p.lineno(1)) - mark_entry_as_accessed(entry) - return - - convert_to_function(p[0].entry, CLASS.function, p.lineno(1)) - mark_entry_as_accessed(p[0].entry) - - -def p_arg_list(p): - """arg_list : LP RP""" - p[0] = make_arg_list(None) - - -def p_arg_list_arg(p): - """arg_list : LP arguments RP""" - p[0] = p[2] - - -def p_arguments(p): - """arguments : argument""" - if p[1] is None: - p[0] = None - return - - p[0] = make_arg_list(p[1]) - - -def p_arguments_argument(p): - """arguments : arguments COMMA argument""" - if p[1] is None or p[3] is None: - p[0] = None - else: - p[0] = make_arg_list(p[1], p[3]) - - -def p_argument(p): - """argument : expr %prec ID""" - p[0] = make_argument(p[1], p.lineno(1)) - - -def p_named_argument(p): - """argument : ID WEQ expr %prec ID""" - p[0] = make_argument(p[3], p.lineno(1), name=p[1]) - - -def p_argument_array(p): - """argument : ARRAY_ID""" - entry = SYMBOL_TABLE.access_array(p[1], p.lineno(1)) - if entry is None: - p[0] = None - return - - mark_entry_as_accessed(entry) - p[0] = make_argument(entry, p.lineno(1)) - - -def p_funcdecl(p): - """function_declaration : function_header function_body""" - if p[1] is None: - p[0] = None - return - - p[0] = p[1] - p[0].local_symbol_table = SYMBOL_TABLE.current_scope - p[0].locals_size = SYMBOL_TABLE.leave_scope() - FUNCTION_LEVEL.pop() - p[0].entry.ref.body = p[2] - p[0].local_symbol_table.owner = p[0] - p[0].entry.ref.forwarded = False - - -def p_funcdeclforward(p): - """function_declaration : DECLARE function_header_pre""" - if p[2] is None: - if FUNCTION_LEVEL: - FUNCTION_LEVEL.pop() - return - - if p[2].entry.forwarded: - error(p.lineno(1), "duplicated declaration for function '%s'" % p[2].name) - - p[2].entry.ref.forwarded = True - SYMBOL_TABLE.leave_scope(show_warnings=False) - FUNCTION_LEVEL.pop() - - -def p_function_header(p): - """function_header : function_header_pre CO - | function_header_pre NEWLINE - """ - p[0] = p[1] - - -def p_function_header_error(p): - """function_header : function_def error CO - | function_def error NEWLINE - """ - p[0] = None - - -def p_function_header_pre(p): - """function_header_pre : function_def param_decl typedef""" - if p[1] is None or p[2] is None: - p[0] = None - return - - forwarded = p[1].entry.forwarded - - p[0] = p[1] - p[0].append_child(p[2]) - p[0].params_size = p[2].size - lineno = p.lineno(3) - - previoustype_ = p[0].type_ - if not p[3].implicit or p[0].entry.type_ is None or p[0].entry.type_ == Type.unknown: - p[0].type_ = p[3] - if p[3].implicit and p[0].entry.class_ == CLASS.function: - errmsg.warning_implicit_type(p[3].lineno, p[0].entry.name, p[0].type_.name) - - if forwarded and previoustype_ != p[0].type_: - errmsg.syntax_error_func_type_mismatch(lineno, p[0].entry) - p[0] = None - return - - if forwarded: # Was predeclared, check parameters match - p1 = p[0].entry.ref.params # Param list previously declared - p2 = p[2].children - - if len(p1) != len(p2): - errmsg.syntax_error_parameter_mismatch(lineno, p[0].entry) - p[0] = None - return - - for a, b in zip(p1, p2): - if a.name != b.name: - warning( - lineno, - "Parameter '%s' in function '%s' has been renamed to '%s'" % (a.name, p[0].name, b.name), - ) - - if a.type_ != b.type_ or a.byref != b.byref: - errmsg.syntax_error_parameter_mismatch(lineno, p[0].entry) - p[0] = None - return - - p[0].entry.ref.params = p[2] - - if FUNCTION_LEVEL[-1].class_ == CLASS.sub and not p[3].implicit: - error(lineno, "SUBs cannot have a return type definition") - p[0] = None - return - - if FUNCTION_LEVEL[-1].class_ == CLASS.function: - src.api.check.check_type_is_explicit(p[0].lineno, p[0].entry.name, p[3]) - - if p[0].entry.convention == CONVENTION.fastcall and len(p[2]) > 1: - class_ = "SUB" if FUNCTION_LEVEL[-1].class_ == CLASS.sub else "FUNCTION" - errmsg.warning_fastcall_with_N_parameters(lineno, class_, p[0].entry.name, len(p[2])) - - -def p_function_error(p): - """function_declaration : function_header program_co END error""" - p[0] = None - error( - p.lineno(3), - "Unexpected token 'END'. Expected 'END FUNCTION' or 'END SUB' instead.", - ) - - -def p_function_def(p): - """function_def : FUNCTION convention ID - | SUB convention ID - """ - convention = p[2] - name = p[3] - class_ = CLASS.sub if p[1] == "SUB" else CLASS.function # Must be 'function' or 'sub' - - p[0] = make_func_declaration(name, p.lineno(3), class_) - SYMBOL_TABLE.enter_scope(name) - entry = SYMBOL_TABLE.get_entry(name) - FUNCTION_LEVEL.append(entry) - - if entry.class_ in (CLASS.function, CLASS.sub): # Was correctly declared? - FUNCTION_LEVEL[-1].ref.convention = convention - - -def p_convention(p): - """convention : - | STDCALL - """ - p[0] = CONVENTION.stdcall - - -def p_convention2(p): - """convention : FASTCALL""" - p[0] = CONVENTION.fastcall - - -def p_param_decl_none(p): - """param_decl : - | LP RP - """ - p[0] = make_param_list(None) - - -def p_param_decl(p): - """param_decl : LP param_decl_list RP""" - p[0] = p[2] - - -def p_param_decl_errpr(p): - """param_decl : LP error RP""" - p[0] = None - - -def p_param_decl_list(p): - """param_decl_list : param_definition""" - p[0] = make_param_list(p[1]) - - -def p_param_decl_list2(p): - """param_decl_list : param_decl_list COMMA param_definition""" - if p[1] is not None and p[3] is not None: # No errors in parsing - if p[3].default_value is None and p[1][-1].default_value is not None: - errmsg.syntax_error_mandatory_param_after_optional(p[3].lineno, p[1][-1].name, p[3].name) - - p[0] = make_param_list(p[1], p[3]) - - -def p_param_byref_definition(p): - """param_definition : BYREF param_def""" - p[0] = p[2] - - if p[0] is not None: - p[0].ref.byref = True - - -def p_param_byval_definition(p): - """param_definition : BYVAL param_def""" - param_def = p[2] - p[0] = param_def - - if p[0] is not None: - if param_def.class_ == CLASS.array: - errmsg.syntax_error_cannot_pass_array_by_value(p.lineno(1), param_def.name) - p[0] = None - return - param_def.ref.byref = False - - -def p_param_definition(p): - """param_definition : param_def""" - param_def = p[1] - p[0] = param_def - if p[0] is not None: - if param_def.class_ == CLASS.array: - param_def.ref.byref = True - else: - param_def.ref.byref = OPTIONS.default_byref - - -def p_param_def_array(p): - """param_def : singleid LP RP typedef""" - typeref = p[4] - if typeref is None: - p[0] = None - return - - lineno = p[1].lineno - id_ = p[1].name - - src.api.check.check_type_is_explicit(lineno, id_, typeref) - p[0] = make_param_decl(id_, lineno, typeref, is_array=True) - - -def p_param_def_type(p): - """param_def : singleid typedef default_arg_value""" - id_: Id = p[1] - typedef = p[2] - if typedef is not None: - src.api.check.check_type_is_explicit(id_.lineno, id_.name, typedef) - - default_value = make_typecast(typedef, p[3], id_.lineno) - p[0] = make_param_decl( - id_.name, - id_.lineno, - typedef, - is_array=False, - default_value=default_value, - ) - - -def p_param_def_default_arg_value(p): - """default_arg_value : - | EQ expr - """ - if len(p) == 1: - p[0] = None - return - - p[0] = p[2] - return - - -def p_function_body(p): - """function_body : program_co END FUNCTION - | program_co END SUB - | statements_co END FUNCTION - | statements_co END SUB - | co_statements_co END FUNCTION - | co_statements_co END SUB - | END FUNCTION - | END SUB - """ - if not FUNCTION_LEVEL: - error( - p.lineno(3), - "Unexpected token 'END %s'. No Function or Sub has been defined." % p[2], - ) - p[0] = None - return - - a = FUNCTION_LEVEL[-1].class_ - if a not in ( - CLASS.sub, - CLASS.function, - ): # This function/sub was not correctly declared, so exit now - p[0] = None - return - - i = 2 if p[1] == "END" else 3 - b = p[i].lower() - - if a != b: - error( - p.lineno(i), - "Unexpected token 'END %s'. Should be 'END %s'" % (b.upper(), a.upper()), - ) - p[0] = None - else: - p[0] = make_block() if p[1] == "END" else p[1] - - -def p_type_def_empty(p): - """typedef :""" # Epsilon. Defaults to float - p[0] = make_type(_TYPE(gl.DEFAULT_TYPE).name, p.lexer.lineno, implicit=True) - - -def p_type_def(p): - """typedef : AS type""" # Epsilon. Defaults to float - p[0] = make_type(p[2], p.lineno(2), implicit=False) - - -def p_type(p): - """type : BYTE - | UBYTE - | INTEGER - | UINTEGER - | LONG - | ULONG - | FIXED - | FLOAT - | STRING - """ - p[0] = p[1].lower() - - -# region PREPROC - -# ---------------------------------------- -# PREPROCESSOR lines starting with: -# -# #pragma -# #init -# #require -# -# are processed here and not in the lexer -# ---------------------------------------- - - -def p_preproc_line_init(p): - """preproc_line : _INIT ID""" - INITS.add(p[2]) - - -def p_preproc_line_require(p): - """preproc_line : _REQUIRE STRING""" - arch.target.backend.REQUIRES.add(p[2]) - - -def p_preproc_line_pragma_option(p): - """preproc_line : _PRAGMA ID EQ ID - | _PRAGMA ID EQ STRING - | _PRAGMA ID EQ INTEGER - """ - try: - setattr(OPTIONS, p[2], p[4]) - except src.api.options.UndefinedOptionError: - errmsg.warning_ignoring_unknown_pragma(p.lineno(2), p[2]) - - -def p_preproc_pragma_push(p): - """preproc_line : _PRAGMA _PUSH LP ID RP""" - try: - OPTIONS[p[4]].push() - except src.api.options.UndefinedOptionError: - errmsg.warning_ignoring_unknown_pragma(p.lineno(4), p[4]) - - -def p_preproc_pragma_pop(p): - """preproc_line : _PRAGMA _POP LP ID RP""" - try: - OPTIONS[p[4]].pop() - except src.api.options.UndefinedOptionError: - errmsg.warning_ignoring_unknown_pragma(p.lineno(4), p[4]) - - -# region INTERNAL FUNCTIONS -# ------------------------------------------- -# INTERNAL BASIC Functions -# These will be implemented in the translator -# module as a CALL to an ASM function -# ------------------------------------------- - - -def p_expr_usr(p): - """bexpr : USR bexpr %prec UMINUS""" - if p[2].type_ == Type.string: - p[0] = make_builtin(p.lineno(1), "USR_STR", p[2], type_=Type.uinteger) - else: - p[0] = make_builtin( - p.lineno(1), - "USR", - make_typecast(Type.uinteger, p[2], p.lineno(1)), - type_=Type.uinteger, - ) - - -def p_expr_rnd(p): - """bexpr : RND %prec ID - | RND LP RP - """ - p[0] = make_builtin(p.lineno(1), "RND", None, type_=Type.float_) - - -def p_expr_peek(p): - """bexpr : PEEK bexpr %prec UMINUS""" - p[0] = make_builtin( - p.lineno(1), - "PEEK", - make_typecast(Type.uinteger, p[2], p.lineno(1)), - type_=Type.ubyte, - ) - - -def p_expr_peektype_(p): - """bexpr : PEEK LP numbertype COMMA expr RP""" - if p[3] is None or p[5] is None: - p[0] = None - return - - p[0] = make_builtin( - p.lineno(1), - "PEEK", - make_typecast(Type.uinteger, p[5], p.lineno(4)), - type_=cast(sym.TYPEREF, p[3]).type_, - ) - - -def p_expr_in(p): - """bexpr : IN bexpr %prec UMINUS""" - p[0] = make_builtin( - p.lineno(1), - "IN", - make_typecast(Type.uinteger, p[2], p.lineno(1)), - type_=Type.ubyte, - ) - - -def p_expr_lbound(p): - """bexpr : LBOUND LP ARRAY_ID RP - | UBOUND LP ARRAY_ID RP - """ - entry = SYMBOL_TABLE.access_array(p[3], p.lineno(3)) - if entry is None: - p[0] = None - return - - mark_entry_as_accessed(entry) - - if entry.scope == SCOPE.parameter: - num = make_number(0, p.lineno(3), Type.uinteger) - p[0] = make_builtin(p.lineno(1), p[1], [entry, num], type_=Type.uinteger) - else: - p[0] = make_number(len(entry.bounds), p.lineno(3), Type.uinteger) - - -def p_expr_lbound_expr(p): - """bexpr : LBOUND LP ARRAY_ID COMMA expr RP - | UBOUND LP ARRAY_ID COMMA expr RP - """ - expr = p[5] - if expr is None: - p[0] = None - return - - entry = SYMBOL_TABLE.access_array(p[3], p.lineno(3)) - if entry is None: - p[0] = None - return - - mark_entry_as_accessed(entry) - num = make_typecast(Type.uinteger, expr, p.lineno(6)) - if num is None: - p[0] = None - return - - if is_number(num) and entry.scope in ( - SCOPE.local, - SCOPE.global_, - ): # Try constant propagation - val = num.value - if val < 0 or val > len(entry.bounds): - error(p.lineno(6), "Dimension out of range") - p[0] = None - return - - if not val: # 0 => number of dims - p[0] = make_number(len(entry.bounds), p.lineno(3), Type.uinteger) - elif p[1] == "LBOUND": - p[0] = make_number(entry.bounds[val - 1].lower, p.lineno(3), Type.uinteger) - else: - p[0] = make_number(entry.bounds[val - 1].upper, p.lineno(3), Type.uinteger) - return - - if p[1] == "LBOUND": - entry.ref.lbound_used = True - else: - entry.ref.ubound_used = True - - p[0] = make_builtin(p.lineno(1), p[1], [entry, num], type_=Type.uinteger) - - -def p_len(p): - """bexpr : LEN bexpr %prec UMINUS""" - arg = p[2] - if arg is None: - p[0] = None - elif arg.token == "VAR" and arg.class_ == CLASS.array: - p[0] = make_number(len(arg.bounds), lineno=p.lineno(1)) # Do constant folding - elif arg.type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(1), Type.to_string(arg.type_)) - p[0] = None - elif is_string(arg): # Constant string? - p[0] = make_number(len(arg.value), lineno=p.lineno(1)) # Do constant folding - else: - p[0] = make_builtin(p.lineno(1), "LEN", arg, type_=Type.uinteger) - - -def p_sizeof(p): - """bexpr : SIZEOF LP type RP - | SIZEOF LP ID RP - | SIZEOF LP ARRAY_ID RP - """ - if Type.to_type(p[3].lower()) is not None: - p[0] = make_number(Type.size(Type.to_type(p[3].lower())), lineno=p.lineno(3)) - else: - entry = SYMBOL_TABLE.get_id_or_make_var(p[3], p.lineno(1)) - p[0] = make_number(Type.size(entry.type_), lineno=p.lineno(3)) - - -def p_str(p): - """string : STR expr %prec UMINUS""" - if is_number(p[2]): # A constant is converted to string directly - p[0] = sym.STRING(str(p[2].value), p.lineno(1)) - else: - p[0] = make_builtin( - p.lineno(1), - "STR", - make_typecast(Type.float_, p[2], p.lineno(1)), - type_=Type.string, - ) - - -def p_inkey(p): - """string : INKEY""" - p[0] = make_builtin(p.lineno(1), "INKEY", None, type_=Type.string) - - -def p_chr_one(p): - """string : CHR bexpr %prec UMINUS""" - arg_list = make_arg_list(make_argument(p[2], p.lineno(1))) - arg_list[0].value = make_typecast(Type.ubyte, arg_list[0].value, p.lineno(1)) - p[0] = make_builtin(p.lineno(1), "CHR", arg_list, type_=Type.string) - - -def p_chr(p): - """string : CHR arg_list""" - if len(p[2]) < 1: - error(p.lineno(1), "CHR$ function need at less 1 parameter") - p[0] = None - return - - for i in range(len(p[2])): # Convert every argument to 8bit unsigned - p[2][i].value = make_typecast(Type.ubyte, p[2][i].value, p.lineno(1)) - - p[0] = make_builtin(p.lineno(1), "CHR", p[2], type_=Type.string) - - -def p_val(p): - """bexpr : VAL bexpr %prec UMINUS""" - - def val(s): - try: - x = float(eval(s, {}, {})) - except: - x = 0 - warning(p.lineno(1), f"Invalid string numeric constant '{s}' evaluated as 0") - return x - - if p[2].type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(1), Type.to_string(p[2].type_)) - p[0] = None - else: - p[0] = make_builtin(p.lineno(1), "VAL", p[2], val, type_=Type.float_) - - -def p_code(p): - """bexpr : CODE bexpr %prec UMINUS""" - - def asc(x): - if len(x): - return ord(x[0]) - - return 0 - - if p[2] is None: - p[0] = None - return - - if p[2].type_ != Type.string: - errmsg.syntax_error_expected_string(p.lineno(1), Type.to_string(p[2].type_)) - p[0] = None - else: - p[0] = make_builtin(p.lineno(1), "CODE", p[2], asc, type_=Type.ubyte) - - -def p_sgn(p): - """bexpr : SGN bexpr %prec UMINUS""" - sgn = lambda x: x < 0 and -1 or x > 0 and 1 or 0 - - if p[2].type_ == Type.string: - error(p.lineno(1), "Expected a numeric expression, got TYPE.string instead") - p[0] = None - else: - if is_unsigned(p[2]) and not is_number(p[2]): - warning(p.lineno(1), "Sign of unsigned value is always 0 or 1") - - p[0] = make_builtin(p.lineno(1), "SGN", p[2], sgn, type_=Type.byte_) - - -# ---------------------------------------- -# Trigonometric and LN, EXP, SQR -# ---------------------------------------- -def p_expr_trig(p): - """bexpr : math_fn bexpr %prec UMINUS""" - p[0] = make_builtin( - p.lineno(1), - p[1], - make_typecast(Type.float_, p[2], p.lineno(1)), - { - "SIN": math.sin, - "COS": math.cos, - "TAN": math.tan, - "ASN": math.asin, - "ACS": math.acos, - "ATN": math.atan, - "LN": lambda y: math.log(y, math.exp(1)), # LN(x) - "EXP": math.exp, - "SQR": math.sqrt, - }[p[1]], - type_=Type.float_, - ) - - -def p_math_fn(p): - """math_fn : SIN - | COS - | TAN - | ASN - | ACS - | ATN - | LN - | EXP - | SQR - """ - p[0] = p[1] - - -# ---------------------------------------- -# Other important functions -# ---------------------------------------- -def p_expr_int(p): - """bexpr : INT bexpr %prec UMINUS""" - p[0] = make_typecast(Type.long_, p[2], p.lineno(1)) - - -def p_abs(p): - """bexpr : ABS bexpr %prec UMINUS""" - if is_unsigned(p[2]): - p[0] = p[2] - warning(p.lineno(1), "Redundant operation ABS for unsigned value") - return - - p[0] = make_builtin(p.lineno(1), "ABS", p[2], lambda x: x if x >= 0 else -x) - - -# endregion - - -# ---------------------------------------- -# The yyerror function -# ---------------------------------------- -def p_error(p): - if p is not None: - if p.type != "NEWLINE": - msg = "Syntax Error. Unexpected token '%s' <%s>" % (p.value, p.type) - else: - msg = "Unexpected end of line" - error(p.lineno, msg) - return - - # Try to give some hints - if gl.LOOPS: # some loop(s) are not closed - loop_info = gl.LOOPS[-1] - if loop_info.type == LoopType.FOR: - errmsg.syntax_error_for_without_next(loop_info.lineno) - else: - errmsg.syntax_error_loop_not_closed(loop_info.lineno, loop_info.type.value) - # If there were previous errors, stop here - # since this end of file is due to previous errors - if gl.has_errors: - return + if gl.has_errors: + return False msg = "Unexpected end of file" error(zxblex.lexer.lineno, msg) + return False + + +class LarkParserWrapper: + def __init__(self, lark_instance): + self.lark = lark_instance + + # Wrap LALR parser callbacks for inline execution during parsing + lalr_parser = lark_instance.parser.parser.parser + transformer = ZXBasicTransformer() + wrapped_callbacks = {} + for rule, callback in list(lalr_parser.callbacks.items()): + method_name = rule.alias if rule.alias is not None else rule.origin.name + if hasattr(transformer, method_name): + method = getattr(transformer, method_name) + + def make_wrapper(m=method): + def wrapper(children): + class MockMeta: + @property + def line(self): + for child in children: + lineno = get_lineno(child) + if lineno: + return lineno + return zxblex.lexer.lineno if hasattr(zxblex, "lexer") else 0 + + meta = MockMeta() + return m(meta, children) + + return wrapper + + wrapped_callbacks[rule] = make_wrapper() + else: + wrapped_callbacks[rule] = callback + lalr_parser.callbacks = wrapped_callbacks + + def parse(self, text, lexer=None, tracking=True, debug=False): + if hasattr(handle_parse_error, "last_key"): + handle_parse_error.last_key = None + if lexer is not None: + lexer.input(text) + try: + self.lark.parse(lexer, on_error=handle_parse_error) + except Exception as e: + if not isinstance(e, UnexpectedInput): + raise e + else: + try: + self.lark.parse(text, on_error=handle_parse_error) + except Exception as e: + if not isinstance(e, UnexpectedInput): + raise e -# ---------------------------------------- -# Initialization -# ---------------------------------------- -parser = src.api.utils.get_or_create("zxbparser", lambda: yacc.yacc(debug=True)) - -ast = None -data_ast = None # Global Variables AST -optemps = opcodestemps.OpcodesTemps() +# DO NOT pass transformer=ZXBasicTransformer() to Lark constructor when using meta args +lark_parser = Lark_StandAlone(lexer=ZXBasicLarkLexerAdapter, propagate_positions=True) +parser = LarkParserWrapper(lark_parser) diff --git a/src/zxbc/zxbparser_standalone.py b/src/zxbc/zxbparser_standalone.py new file mode 100644 index 000000000..e5c3924f5 --- /dev/null +++ b/src/zxbc/zxbparser_standalone.py @@ -0,0 +1,3574 @@ +# The file was automatically generated by Lark v1.3.1 +__version__ = "1.3.1" + +# +# +# Lark Stand-alone Generator Tool +# ---------------------------------- +# Generates a stand-alone LALR(1) parser +# +# Git: https://github.com/erezsh/lark +# Author: Erez Shinan (erezshin@gmail.com) +# +# +# >>> LICENSE +# +# This tool and its generated code use a separate license from Lark, +# and are subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. +# +# If you wish to purchase a commercial license for this tool and its +# generated code, you may contact me via email or otherwise. +# +# If MPL2 is incompatible with your free or open-source project, +# contact me and we'll work it out. +# +# + +from copy import deepcopy +from abc import ABC, abstractmethod +from types import ModuleType +from typing import ( + TypeVar, Generic, Type, Tuple, List, Dict, Iterator, Collection, Callable, Optional, FrozenSet, Any, + Union, Iterable, IO, TYPE_CHECKING, overload, Sequence, + Pattern as REPattern, ClassVar, Set, Mapping +) + + +class LarkError(Exception): + pass + + +class ConfigurationError(LarkError, ValueError): + pass + + +def assert_config(value, options: Collection, msg='Got %r, expected one of %s'): + if value not in options: + raise ConfigurationError(msg % (value, options)) + + +class GrammarError(LarkError): + pass + + +class ParseError(LarkError): + pass + + +class LexError(LarkError): + pass + +T = TypeVar('T') + +class UnexpectedInput(LarkError): + #-- + line: int + column: int + pos_in_stream = None + state: Any + _terminals_by_name = None + interactive_parser: 'InteractiveParser' + + def get_context(self, text: str, span: int=40) -> str: + #-- + pos = self.pos_in_stream or 0 + start = max(pos - span, 0) + end = pos + span + if not isinstance(text, bytes): + before = text[start:pos].rsplit('\n', 1)[-1] + after = text[pos:end].split('\n', 1)[0] + return before + after + '\n' + ' ' * len(before.expandtabs()) + '^\n' + else: + before = text[start:pos].rsplit(b'\n', 1)[-1] + after = text[pos:end].split(b'\n', 1)[0] + return (before + after + b'\n' + b' ' * len(before.expandtabs()) + b'^\n').decode("ascii", "backslashreplace") + + def match_examples(self, parse_fn: 'Callable[[str], Tree]', + examples: Union[Mapping[T, Iterable[str]], Iterable[Tuple[T, Iterable[str]]]], + token_type_match_fallback: bool=False, + use_accepts: bool=True + ) -> Optional[T]: + #-- + assert self.state is not None, "Not supported for this exception" + + if isinstance(examples, Mapping): + examples = examples.items() + + candidate = (None, False) + for i, (label, example) in enumerate(examples): + assert not isinstance(example, str), "Expecting a list" + + for j, malformed in enumerate(example): + try: + parse_fn(malformed) + except UnexpectedInput as ut: + if ut.state == self.state: + if ( + use_accepts + and isinstance(self, UnexpectedToken) + and isinstance(ut, UnexpectedToken) + and ut.accepts != self.accepts + ): + logger.debug("Different accepts with same state[%d]: %s != %s at example [%s][%s]" % + (self.state, self.accepts, ut.accepts, i, j)) + continue + if ( + isinstance(self, (UnexpectedToken, UnexpectedEOF)) + and isinstance(ut, (UnexpectedToken, UnexpectedEOF)) + ): + if ut.token == self.token: ## + + logger.debug("Exact Match at example [%s][%s]" % (i, j)) + return label + + if token_type_match_fallback: + ## + + if (ut.token.type == self.token.type) and not candidate[-1]: + logger.debug("Token Type Fallback at example [%s][%s]" % (i, j)) + candidate = label, True + + if candidate[0] is None: + logger.debug("Same State match at example [%s][%s]" % (i, j)) + candidate = label, False + + return candidate[0] + + def _format_expected(self, expected): + if self._terminals_by_name: + d = self._terminals_by_name + expected = [d[t_name].user_repr() if t_name in d else t_name for t_name in expected] + return "Expected one of: \n\t* %s\n" % '\n\t* '.join(expected) + + +class UnexpectedEOF(ParseError, UnexpectedInput): + #-- + expected: 'List[Token]' + + def __init__(self, expected, state=None, terminals_by_name=None): + super(UnexpectedEOF, self).__init__() + + self.expected = expected + self.state = state + from .lexer import Token + self.token = Token("", "") ## + + self.pos_in_stream = -1 + self.line = -1 + self.column = -1 + self._terminals_by_name = terminals_by_name + + + def __str__(self): + message = "Unexpected end-of-input. " + message += self._format_expected(self.expected) + return message + + +class UnexpectedCharacters(LexError, UnexpectedInput): + #-- + + allowed: Set[str] + considered_tokens: Set[Any] + + def __init__(self, seq, lex_pos, line, column, allowed=None, considered_tokens=None, state=None, token_history=None, + terminals_by_name=None, considered_rules=None): + super(UnexpectedCharacters, self).__init__() + + ## + + self.line = line + self.column = column + self.pos_in_stream = lex_pos + self.state = state + self._terminals_by_name = terminals_by_name + + self.allowed = allowed + self.considered_tokens = considered_tokens + self.considered_rules = considered_rules + self.token_history = token_history + + if isinstance(seq, bytes): + self.char = seq[lex_pos:lex_pos + 1].decode("ascii", "backslashreplace") + else: + self.char = seq[lex_pos] + self._context = self.get_context(seq) + + + def __str__(self): + message = "No terminal matches '%s' in the current parser context, at line %d col %d" % (self.char, self.line, self.column) + message += '\n\n' + self._context + if self.allowed: + message += self._format_expected(self.allowed) + if self.token_history: + message += '\nPrevious tokens: %s\n' % ', '.join(repr(t) for t in self.token_history) + return message + + +class UnexpectedToken(ParseError, UnexpectedInput): + #-- + + expected: Set[str] + considered_rules: Set[str] + + def __init__(self, token, expected, considered_rules=None, state=None, interactive_parser=None, terminals_by_name=None, token_history=None): + super(UnexpectedToken, self).__init__() + + ## + + self.line = getattr(token, 'line', '?') + self.column = getattr(token, 'column', '?') + self.pos_in_stream = getattr(token, 'start_pos', None) + self.state = state + + self.token = token + self.expected = expected ## + + self._accepts = NO_VALUE + self.considered_rules = considered_rules + self.interactive_parser = interactive_parser + self._terminals_by_name = terminals_by_name + self.token_history = token_history + + + @property + def accepts(self) -> Set[str]: + if self._accepts is NO_VALUE: + self._accepts = self.interactive_parser and self.interactive_parser.accepts() + return self._accepts + + def __str__(self): + message = ("Unexpected token %r at line %s, column %s.\n%s" + % (self.token, self.line, self.column, self._format_expected(self.accepts or self.expected))) + if self.token_history: + message += "Previous tokens: %r\n" % self.token_history + + return message + + + +class VisitError(LarkError): + #-- + + obj: 'Union[Tree, Token]' + orig_exc: Exception + + def __init__(self, rule, obj, orig_exc): + message = 'Error trying to process rule "%s":\n\n%s' % (rule, orig_exc) + super(VisitError, self).__init__(message) + + self.rule = rule + self.obj = obj + self.orig_exc = orig_exc + + +class MissingVariableError(LarkError): + pass + + +import sys, re +import logging +from dataclasses import dataclass +from typing import Generic, AnyStr + +logger: logging.Logger = logging.getLogger("lark") +logger.addHandler(logging.StreamHandler()) +## + +## + +logger.setLevel(logging.CRITICAL) + + +NO_VALUE = object() + +T = TypeVar("T") + + +def classify(seq: Iterable, key: Optional[Callable] = None, value: Optional[Callable] = None) -> Dict: + d: Dict[Any, Any] = {} + for item in seq: + k = key(item) if (key is not None) else item + v = value(item) if (value is not None) else item + try: + d[k].append(v) + except KeyError: + d[k] = [v] + return d + + +def _deserialize(data: Any, namespace: Dict[str, Any], memo: Dict) -> Any: + if isinstance(data, dict): + if '__type__' in data: ## + + class_ = namespace[data['__type__']] + return class_.deserialize(data, memo) + elif '@' in data: + return memo[data['@']] + return {key:_deserialize(value, namespace, memo) for key, value in data.items()} + elif isinstance(data, list): + return [_deserialize(value, namespace, memo) for value in data] + return data + + +_T = TypeVar("_T", bound="Serialize") + +class Serialize: + #-- + + def memo_serialize(self, types_to_memoize: List) -> Any: + memo = SerializeMemoizer(types_to_memoize) + return self.serialize(memo), memo.serialize() + + def serialize(self, memo = None) -> Dict[str, Any]: + if memo and memo.in_types(self): + return {'@': memo.memoized.get(self)} + + fields = getattr(self, '__serialize_fields__') + res = {f: _serialize(getattr(self, f), memo) for f in fields} + res['__type__'] = type(self).__name__ + if hasattr(self, '_serialize'): + self._serialize(res, memo) + return res + + @classmethod + def deserialize(cls: Type[_T], data: Dict[str, Any], memo: Dict[int, Any]) -> _T: + namespace = getattr(cls, '__serialize_namespace__', []) + namespace = {c.__name__:c for c in namespace} + + fields = getattr(cls, '__serialize_fields__') + + if '@' in data: + return memo[data['@']] + + inst = cls.__new__(cls) + for f in fields: + try: + setattr(inst, f, _deserialize(data[f], namespace, memo)) + except KeyError as e: + raise KeyError("Cannot find key for class", cls, e) + + if hasattr(inst, '_deserialize'): + inst._deserialize() + + return inst + + +class SerializeMemoizer(Serialize): + #-- + + __serialize_fields__ = 'memoized', + + def __init__(self, types_to_memoize: List) -> None: + self.types_to_memoize = tuple(types_to_memoize) + self.memoized = Enumerator() + + def in_types(self, value: Serialize) -> bool: + return isinstance(value, self.types_to_memoize) + + def serialize(self) -> Dict[int, Any]: ## + + return _serialize(self.memoized.reversed(), None) + + @classmethod + def deserialize(cls, data: Dict[int, Any], namespace: Dict[str, Any], memo: Dict[Any, Any]) -> Dict[int, Any]: ## + + return _deserialize(data, namespace, memo) + + +try: + import regex + _has_regex = True +except ImportError: + _has_regex = False + +if sys.version_info >= (3, 11): + import re._parser as sre_parse + import re._constants as sre_constants +else: + import sre_parse + import sre_constants + +categ_pattern = re.compile(r'\\p{[A-Za-z_]+}') + +def get_regexp_width(expr: str) -> Union[Tuple[int, int], List[int]]: + if _has_regex: + ## + + ## + + ## + + regexp_final = re.sub(categ_pattern, 'A', expr) + else: + if re.search(categ_pattern, expr): + raise ImportError('`regex` module must be installed in order to use Unicode categories.', expr) + regexp_final = expr + try: + ## + + return [int(x) for x in sre_parse.parse(regexp_final).getwidth()] + except sre_constants.error: + if not _has_regex: + raise ValueError(expr) + else: + ## + + ## + + c = regex.compile(regexp_final) + ## + + ## + + MAXWIDTH = getattr(sre_parse, "MAXWIDTH", sre_constants.MAXREPEAT) + if c.match('') is None: + ## + + return 1, int(MAXWIDTH) + else: + return 0, int(MAXWIDTH) + + +@dataclass(frozen=True) +class TextSlice(Generic[AnyStr]): + #-- + text: AnyStr + start: int + end: int + + def __post_init__(self): + if not isinstance(self.text, (str, bytes)): + raise TypeError("text must be str or bytes") + + if self.start < 0: + object.__setattr__(self, 'start', self.start + len(self.text)) + assert self.start >=0 + + if self.end is None: + object.__setattr__(self, 'end', len(self.text)) + elif self.end < 0: + object.__setattr__(self, 'end', self.end + len(self.text)) + assert self.end <= len(self.text) + + @classmethod + def cast_from(cls, text: 'TextOrSlice') -> 'TextSlice[AnyStr]': + if isinstance(text, TextSlice): + return text + + return cls(text, 0, len(text)) + + def is_complete_text(self): + return self.start == 0 and self.end == len(self.text) + + def __len__(self): + return self.end - self.start + + def count(self, substr: AnyStr): + return self.text.count(substr, self.start, self.end) + + def rindex(self, substr: AnyStr): + return self.text.rindex(substr, self.start, self.end) + + +TextOrSlice = Union[AnyStr, 'TextSlice[AnyStr]'] +LarkInput = Union[AnyStr, TextSlice[AnyStr], Any] + + + +class Meta: + + empty: bool + line: int + column: int + start_pos: int + end_line: int + end_column: int + end_pos: int + orig_expansion: 'List[TerminalDef]' + match_tree: bool + + def __init__(self): + self.empty = True + + +_Leaf_T = TypeVar("_Leaf_T") +Branch = Union[_Leaf_T, 'Tree[_Leaf_T]'] + + +class Tree(Generic[_Leaf_T]): + #-- + + data: str + children: 'List[Branch[_Leaf_T]]' + + def __init__(self, data: str, children: 'List[Branch[_Leaf_T]]', meta: Optional[Meta]=None) -> None: + self.data = data + self.children = children + self._meta = meta + + @property + def meta(self) -> Meta: + if self._meta is None: + self._meta = Meta() + return self._meta + + def __repr__(self): + return 'Tree(%r, %r)' % (self.data, self.children) + + __match_args__ = ("data", "children") + + def _pretty_label(self): + return self.data + + def _pretty(self, level, indent_str): + yield f'{indent_str*level}{self._pretty_label()}' + if len(self.children) == 1 and not isinstance(self.children[0], Tree): + yield f'\t{self.children[0]}\n' + else: + yield '\n' + for n in self.children: + if isinstance(n, Tree): + yield from n._pretty(level+1, indent_str) + else: + yield f'{indent_str*(level+1)}{n}\n' + + def pretty(self, indent_str: str=' ') -> str: + #-- + return ''.join(self._pretty(0, indent_str)) + + def __rich__(self, parent:Optional['rich.tree.Tree']=None) -> 'rich.tree.Tree': + #-- + return self._rich(parent) + + def _rich(self, parent): + if parent: + tree = parent.add(f'[bold]{self.data}[/bold]') + else: + import rich.tree + tree = rich.tree.Tree(self.data) + + for c in self.children: + if isinstance(c, Tree): + c._rich(tree) + else: + tree.add(f'[green]{c}[/green]') + + return tree + + def __eq__(self, other): + try: + return self.data == other.data and self.children == other.children + except AttributeError: + return False + + def __ne__(self, other): + return not (self == other) + + def __hash__(self) -> int: + return hash((self.data, tuple(self.children))) + + def iter_subtrees(self) -> 'Iterator[Tree[_Leaf_T]]': + #-- + queue = [self] + subtrees = dict() + for subtree in queue: + subtrees[id(subtree)] = subtree + queue += [c for c in reversed(subtree.children) + if isinstance(c, Tree) and id(c) not in subtrees] + + del queue + return reversed(list(subtrees.values())) + + def iter_subtrees_topdown(self): + #-- + stack = [self] + stack_append = stack.append + stack_pop = stack.pop + while stack: + node = stack_pop() + if not isinstance(node, Tree): + continue + yield node + for child in reversed(node.children): + stack_append(child) + + def find_pred(self, pred: 'Callable[[Tree[_Leaf_T]], bool]') -> 'Iterator[Tree[_Leaf_T]]': + #-- + return filter(pred, self.iter_subtrees()) + + def find_data(self, data: str) -> 'Iterator[Tree[_Leaf_T]]': + #-- + return self.find_pred(lambda t: t.data == data) + + +from functools import wraps, update_wrapper +from inspect import getmembers, getmro + +_Return_T = TypeVar('_Return_T') +_Return_V = TypeVar('_Return_V') +_Leaf_T = TypeVar('_Leaf_T') +_Leaf_U = TypeVar('_Leaf_U') +_R = TypeVar('_R') +_FUNC = Callable[..., _Return_T] +_DECORATED = Union[_FUNC, type] + +class _DiscardType: + #-- + + def __repr__(self): + return "lark.visitors.Discard" + +Discard = _DiscardType() + +## + + +class _Decoratable: + #-- + + @classmethod + def _apply_v_args(cls, visit_wrapper): + mro = getmro(cls) + assert mro[0] is cls + libmembers = {name for _cls in mro[1:] for name, _ in getmembers(_cls)} + for name, value in getmembers(cls): + + ## + + if name.startswith('_') or (name in libmembers and name not in cls.__dict__): + continue + if not callable(value): + continue + + ## + + if isinstance(cls.__dict__[name], _VArgsWrapper): + continue + + setattr(cls, name, _VArgsWrapper(cls.__dict__[name], visit_wrapper)) + return cls + + def __class_getitem__(cls, _): + return cls + + +class Transformer(_Decoratable, ABC, Generic[_Leaf_T, _Return_T]): + #-- + __visit_tokens__ = True ## + + + def __init__(self, visit_tokens: bool=True) -> None: + self.__visit_tokens__ = visit_tokens + + def _call_userfunc(self, tree, new_children=None): + ## + + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + try: + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + return f.visit_wrapper(f, tree.data, children, tree.meta) + else: + return f(children) + except GrammarError: + raise + except Exception as e: + raise VisitError(tree.data, tree, e) + + def _call_userfunc_token(self, token): + try: + f = getattr(self, token.type) + except AttributeError: + return self.__default_token__(token) + else: + try: + return f(token) + except GrammarError: + raise + except Exception as e: + raise VisitError(token.type, token, e) + + def _transform_children(self, children): + for c in children: + if isinstance(c, Tree): + res = self._transform_tree(c) + elif self.__visit_tokens__ and isinstance(c, Token): + res = self._call_userfunc_token(c) + else: + res = c + + if res is not Discard: + yield res + + def _transform_tree(self, tree): + children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree, children) + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + #-- + res = list(self._transform_children([tree])) + if not res: + return None ## + + assert len(res) == 1 + return res[0] + + def __mul__( + self: 'Transformer[_Leaf_T, Tree[_Leaf_U]]', + other: 'Union[Transformer[_Leaf_U, _Return_V], TransformerChain[_Leaf_U, _Return_V,]]' + ) -> 'TransformerChain[_Leaf_T, _Return_V]': + #-- + return TransformerChain(self, other) + + def __default__(self, data, children, meta): + #-- + return Tree(data, children, meta) + + def __default_token__(self, token): + #-- + return token + + +def merge_transformers(base_transformer=None, **transformers_to_merge): + #-- + if base_transformer is None: + base_transformer = Transformer() + for prefix, transformer in transformers_to_merge.items(): + for method_name in dir(transformer): + method = getattr(transformer, method_name) + if not callable(method): + continue + if method_name.startswith("_") or method_name == "transform": + continue + prefixed_method = prefix + "__" + method_name + if hasattr(base_transformer, prefixed_method): + raise AttributeError("Cannot merge: method '%s' appears more than once" % prefixed_method) + + setattr(base_transformer, prefixed_method, method) + + return base_transformer + + +class InlineTransformer(Transformer): ## + + def _call_userfunc(self, tree, new_children=None): + ## + + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + return f(*children) + + +class TransformerChain(Generic[_Leaf_T, _Return_T]): + + transformers: 'Tuple[Union[Transformer, TransformerChain], ...]' + + def __init__(self, *transformers: 'Union[Transformer, TransformerChain]') -> None: + self.transformers = transformers + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + for t in self.transformers: + tree = t.transform(tree) + return cast(_Return_T, tree) + + def __mul__( + self: 'TransformerChain[_Leaf_T, Tree[_Leaf_U]]', + other: 'Union[Transformer[_Leaf_U, _Return_V], TransformerChain[_Leaf_U, _Return_V]]' + ) -> 'TransformerChain[_Leaf_T, _Return_V]': + return TransformerChain(*self.transformers + (other,)) + + +class Transformer_InPlace(Transformer[_Leaf_T, _Return_T]): + #-- + def _transform_tree(self, tree): ## + + return self._call_userfunc(tree) + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + for subtree in tree.iter_subtrees(): + subtree.children = list(self._transform_children(subtree.children)) + + return self._transform_tree(tree) + + +class Transformer_NonRecursive(Transformer[_Leaf_T, _Return_T]): + #-- + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + ## + + rev_postfix = [] + q: List[Branch[_Leaf_T]] = [tree] + while q: + t = q.pop() + rev_postfix.append(t) + if isinstance(t, Tree): + q += t.children + + ## + + stack: List = [] + for x in reversed(rev_postfix): + if isinstance(x, Tree): + size = len(x.children) + if size: + args = stack[-size:] + del stack[-size:] + else: + args = [] + + res = self._call_userfunc(x, args) + if res is not Discard: + stack.append(res) + + elif self.__visit_tokens__ and isinstance(x, Token): + res = self._call_userfunc_token(x) + if res is not Discard: + stack.append(res) + else: + stack.append(x) + + result, = stack ## + + ## + + ## + + ## + + return cast(_Return_T, result) + + +class Transformer_InPlaceRecursive(Transformer[_Leaf_T, _Return_T]): + #-- + def _transform_tree(self, tree): + tree.children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree) + + +## + + +class VisitorBase: + def _call_userfunc(self, tree): + return getattr(self, tree.data, self.__default__)(tree) + + def __default__(self, tree): + #-- + return tree + + def __class_getitem__(cls, _): + return cls + + +class Visitor(VisitorBase, ABC, Generic[_Leaf_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for subtree in tree.iter_subtrees(): + self._call_userfunc(subtree) + return tree + + def visit_topdown(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for subtree in tree.iter_subtrees_topdown(): + self._call_userfunc(subtree) + return tree + + +class Visitor_Recursive(VisitorBase, Generic[_Leaf_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for child in tree.children: + if isinstance(child, Tree): + self.visit(child) + + self._call_userfunc(tree) + return tree + + def visit_topdown(self,tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + self._call_userfunc(tree) + + for child in tree.children: + if isinstance(child, Tree): + self.visit_topdown(child) + + return tree + + +class Interpreter(_Decoratable, ABC, Generic[_Leaf_T, _Return_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> _Return_T: + ## + + ## + + ## + + return self._visit_tree(tree) + + def _visit_tree(self, tree: Tree[_Leaf_T]): + f = getattr(self, tree.data) + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + return f.visit_wrapper(f, tree.data, tree.children, tree.meta) + else: + return f(tree) + + def visit_children(self, tree: Tree[_Leaf_T]) -> List: + return [self._visit_tree(child) if isinstance(child, Tree) else child + for child in tree.children] + + def __getattr__(self, name): + return self.__default__ + + def __default__(self, tree): + return self.visit_children(tree) + + +_InterMethod = Callable[[Type[Interpreter], _Return_T], _R] + +def visit_children_decor(func: _InterMethod) -> _InterMethod: + #-- + @wraps(func) + def inner(cls, tree): + values = cls.visit_children(tree) + return func(cls, values) + return inner + +## + + +def _apply_v_args(obj, visit_wrapper): + try: + _apply = obj._apply_v_args + except AttributeError: + return _VArgsWrapper(obj, visit_wrapper) + else: + return _apply(visit_wrapper) + + +class _VArgsWrapper: + #-- + base_func: Callable + + def __init__(self, func: Callable, visit_wrapper: Callable[[Callable, str, list, Any], Any]): + if isinstance(func, _VArgsWrapper): + func = func.base_func + self.base_func = func + self.visit_wrapper = visit_wrapper + update_wrapper(self, func) + + def __call__(self, *args, **kwargs): + return self.base_func(*args, **kwargs) + + def __get__(self, instance, owner=None): + try: + ## + + ## + + g = type(self.base_func).__get__ + except AttributeError: + return self + else: + return _VArgsWrapper(g(self.base_func, instance, owner), self.visit_wrapper) + + def __set_name__(self, owner, name): + try: + f = type(self.base_func).__set_name__ + except AttributeError: + return + else: + f(self.base_func, owner, name) + + +def _vargs_inline(f, _data, children, _meta): + return f(*children) +def _vargs_meta_inline(f, _data, children, meta): + return f(meta, *children) +def _vargs_meta(f, _data, children, meta): + return f(meta, children) +def _vargs_tree(f, data, children, meta): + return f(Tree(data, children, meta)) + + +def v_args(inline: bool = False, meta: bool = False, tree: bool = False, wrapper: Optional[Callable] = None) -> Callable[[_DECORATED], _DECORATED]: + #-- + if tree and (meta or inline): + raise ValueError("Visitor functions cannot combine 'tree' with 'meta' or 'inline'.") + + func = None + if meta: + if inline: + func = _vargs_meta_inline + else: + func = _vargs_meta + elif inline: + func = _vargs_inline + elif tree: + func = _vargs_tree + + if wrapper is not None: + if func is not None: + raise ValueError("Cannot use 'wrapper' along with 'tree', 'meta' or 'inline'.") + func = wrapper + + def _visitor_args_dec(obj): + return _apply_v_args(obj, func) + return _visitor_args_dec + + + +TOKEN_DEFAULT_PRIORITY = 0 + + +class Symbol(Serialize): + __slots__ = ('name',) + + name: str + is_term: ClassVar[bool] = NotImplemented + + def __init__(self, name: str) -> None: + self.name = name + + def __eq__(self, other): + if not isinstance(other, Symbol): + return NotImplemented + return self.is_term == other.is_term and self.name == other.name + + def __ne__(self, other): + return not (self == other) + + def __hash__(self): + return hash(self.name) + + def __repr__(self): + return '%s(%r)' % (type(self).__name__, self.name) + + fullrepr = property(__repr__) + + def renamed(self, f): + return type(self)(f(self.name)) + + +class Terminal(Symbol): + __serialize_fields__ = 'name', 'filter_out' + + is_term: ClassVar[bool] = True + + def __init__(self, name: str, filter_out: bool = False) -> None: + self.name = name + self.filter_out = filter_out + + @property + def fullrepr(self): + return '%s(%r, %r)' % (type(self).__name__, self.name, self.filter_out) + + def renamed(self, f): + return type(self)(f(self.name), self.filter_out) + + +class NonTerminal(Symbol): + __serialize_fields__ = 'name', + + is_term: ClassVar[bool] = False + + def serialize(self, memo=None) -> Dict[str, Any]: + ## + + ## + + return {'name': str(self.name), '__type__': 'NonTerminal'} + + +class RuleOptions(Serialize): + __serialize_fields__ = 'keep_all_tokens', 'expand1', 'priority', 'template_source', 'empty_indices' + + keep_all_tokens: bool + expand1: bool + priority: Optional[int] + template_source: Optional[str] + empty_indices: Tuple[bool, ...] + + def __init__(self, keep_all_tokens: bool=False, expand1: bool=False, priority: Optional[int]=None, template_source: Optional[str]=None, empty_indices: Tuple[bool, ...]=()) -> None: + self.keep_all_tokens = keep_all_tokens + self.expand1 = expand1 + self.priority = priority + self.template_source = template_source + self.empty_indices = empty_indices + + def __repr__(self): + return 'RuleOptions(%r, %r, %r, %r)' % ( + self.keep_all_tokens, + self.expand1, + self.priority, + self.template_source + ) + + +class Rule(Serialize): + #-- + __slots__ = ('origin', 'expansion', 'alias', 'options', 'order', '_hash') + + __serialize_fields__ = 'origin', 'expansion', 'order', 'alias', 'options' + __serialize_namespace__ = Terminal, NonTerminal, RuleOptions + + origin: NonTerminal + expansion: Sequence[Symbol] + order: int + alias: Optional[str] + options: RuleOptions + _hash: int + + def __init__(self, origin: NonTerminal, expansion: Sequence[Symbol], + order: int=0, alias: Optional[str]=None, options: Optional[RuleOptions]=None): + self.origin = origin + self.expansion = expansion + self.alias = alias + self.order = order + self.options = options or RuleOptions() + self._hash = hash((self.origin, tuple(self.expansion))) + + def _deserialize(self): + self._hash = hash((self.origin, tuple(self.expansion))) + + def __str__(self): + return '<%s : %s>' % (self.origin.name, ' '.join(x.name for x in self.expansion)) + + def __repr__(self): + return 'Rule(%r, %r, %r, %r)' % (self.origin, self.expansion, self.alias, self.options) + + def __hash__(self): + return self._hash + + def __eq__(self, other): + if not isinstance(other, Rule): + return False + return self.origin == other.origin and self.expansion == other.expansion + + + +from contextlib import suppress +from copy import copy + +try: ## + + has_interegular = bool(interegular) +except NameError: + has_interegular = False + +class Pattern(Serialize, ABC): + #-- + + value: str + flags: Collection[str] + raw: Optional[str] + type: ClassVar[str] + + def __init__(self, value: str, flags: Collection[str] = (), raw: Optional[str] = None) -> None: + self.value = value + self.flags = frozenset(flags) + self.raw = raw + + def __repr__(self): + return repr(self.to_regexp()) + + ## + + def __hash__(self): + return hash((type(self), self.value, self.flags)) + + def __eq__(self, other): + return type(self) == type(other) and self.value == other.value and self.flags == other.flags + + @abstractmethod + def to_regexp(self) -> str: + raise NotImplementedError() + + @property + @abstractmethod + def min_width(self) -> int: + raise NotImplementedError() + + @property + @abstractmethod + def max_width(self) -> int: + raise NotImplementedError() + + def _get_flags(self, value): + for f in self.flags: + value = ('(?%s:%s)' % (f, value)) + return value + + +class PatternStr(Pattern): + __serialize_fields__ = 'value', 'flags', 'raw' + + type: ClassVar[str] = "str" + + def to_regexp(self) -> str: + return self._get_flags(re.escape(self.value)) + + @property + def min_width(self) -> int: + return len(self.value) + + @property + def max_width(self) -> int: + return len(self.value) + + +class PatternRE(Pattern): + __serialize_fields__ = 'value', 'flags', 'raw', '_width' + + type: ClassVar[str] = "re" + + def to_regexp(self) -> str: + return self._get_flags(self.value) + + _width = None + def _get_width(self): + if self._width is None: + self._width = get_regexp_width(self.to_regexp()) + return self._width + + @property + def min_width(self) -> int: + return self._get_width()[0] + + @property + def max_width(self) -> int: + return self._get_width()[1] + + +class TerminalDef(Serialize): + #-- + __serialize_fields__ = 'name', 'pattern', 'priority' + __serialize_namespace__ = PatternStr, PatternRE + + name: str + pattern: Pattern + priority: int + + def __init__(self, name: str, pattern: Pattern, priority: int = TOKEN_DEFAULT_PRIORITY) -> None: + assert isinstance(pattern, Pattern), pattern + self.name = name + self.pattern = pattern + self.priority = priority + + def __repr__(self): + return '%s(%r, %r)' % (type(self).__name__, self.name, self.pattern) + + def user_repr(self) -> str: + if self.name.startswith('__'): ## + + return self.pattern.raw or self.name + else: + return self.name + +_T = TypeVar('_T', bound="Token") + +class Token(str): + #-- + __slots__ = ('type', 'start_pos', 'value', 'line', 'column', 'end_line', 'end_column', 'end_pos') + + __match_args__ = ('type', 'value') + + type: str + start_pos: Optional[int] + value: Any + line: Optional[int] + column: Optional[int] + end_line: Optional[int] + end_column: Optional[int] + end_pos: Optional[int] + + + @overload + def __new__( + cls, + type: str, + value: Any, + start_pos: Optional[int] = None, + line: Optional[int] = None, + column: Optional[int] = None, + end_line: Optional[int] = None, + end_column: Optional[int] = None, + end_pos: Optional[int] = None + ) -> 'Token': + ... + + @overload + def __new__( + cls, + type_: str, + value: Any, + start_pos: Optional[int] = None, + line: Optional[int] = None, + column: Optional[int] = None, + end_line: Optional[int] = None, + end_column: Optional[int] = None, + end_pos: Optional[int] = None + ) -> 'Token': ... + + def __new__(cls, *args, **kwargs): + if "type_" in kwargs: + warnings.warn("`type_` is deprecated use `type` instead", DeprecationWarning) + + if "type" in kwargs: + raise TypeError("Error: using both 'type' and the deprecated 'type_' as arguments.") + kwargs["type"] = kwargs.pop("type_") + + return cls._future_new(*args, **kwargs) + + + @classmethod + def _future_new(cls, type, value, start_pos=None, line=None, column=None, end_line=None, end_column=None, end_pos=None): + inst = super(Token, cls).__new__(cls, value) + + inst.type = type + inst.start_pos = start_pos + inst.value = value + inst.line = line + inst.column = column + inst.end_line = end_line + inst.end_column = end_column + inst.end_pos = end_pos + return inst + + @overload + def update(self, type: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + ... + + @overload + def update(self, type_: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + ... + + def update(self, *args, **kwargs): + if "type_" in kwargs: + warnings.warn("`type_` is deprecated use `type` instead", DeprecationWarning) + + if "type" in kwargs: + raise TypeError("Error: using both 'type' and the deprecated 'type_' as arguments.") + kwargs["type"] = kwargs.pop("type_") + + return self._future_update(*args, **kwargs) + + def _future_update(self, type: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + return Token.new_borrow_pos( + type if type is not None else self.type, + value if value is not None else self.value, + self + ) + + @classmethod + def new_borrow_pos(cls: Type[_T], type_: str, value: Any, borrow_t: 'Token') -> _T: + return cls(type_, value, borrow_t.start_pos, borrow_t.line, borrow_t.column, borrow_t.end_line, borrow_t.end_column, borrow_t.end_pos) + + def __reduce__(self): + return (self.__class__, (self.type, self.value, self.start_pos, self.line, self.column)) + + def __repr__(self): + return 'Token(%r, %r)' % (self.type, self.value) + + def __deepcopy__(self, memo): + return Token(self.type, self.value, self.start_pos, self.line, self.column) + + def __eq__(self, other): + if isinstance(other, Token) and self.type != other.type: + return False + + return str.__eq__(self, other) + + __hash__ = str.__hash__ + + +class LineCounter: + #-- + + __slots__ = 'char_pos', 'line', 'column', 'line_start_pos', 'newline_char' + + def __init__(self, newline_char): + self.newline_char = newline_char + self.char_pos = 0 + self.line = 1 + self.column = 1 + self.line_start_pos = 0 + + def __eq__(self, other): + if not isinstance(other, LineCounter): + return NotImplemented + + return self.char_pos == other.char_pos and self.newline_char == other.newline_char + + def feed(self, token: TextOrSlice, test_newline=True): + #-- + if test_newline: + newlines = token.count(self.newline_char) + if newlines: + self.line += newlines + self.line_start_pos = self.char_pos + token.rindex(self.newline_char) + 1 + + self.char_pos += len(token) + self.column = self.char_pos - self.line_start_pos + 1 + + +class UnlessCallback: + def __init__(self, scanner: 'Scanner'): + self.scanner = scanner + + def __call__(self, t: Token): + res = self.scanner.fullmatch(t.value) + if res is not None: + t.type = res + return t + + +class CallChain: + def __init__(self, callback1, callback2, cond): + self.callback1 = callback1 + self.callback2 = callback2 + self.cond = cond + + def __call__(self, t): + t2 = self.callback1(t) + return self.callback2(t) if self.cond(t2) else t2 + + +def _get_match(re_, regexp, s, flags): + m = re_.match(regexp, s, flags) + if m: + return m.group(0) + +def _create_unless(terminals, g_regex_flags, re_, use_bytes): + tokens_by_type = classify(terminals, lambda t: type(t.pattern)) + assert len(tokens_by_type) <= 2, tokens_by_type.keys() + embedded_strs = set() + callback = {} + for retok in tokens_by_type.get(PatternRE, []): + unless = [] + for strtok in tokens_by_type.get(PatternStr, []): + if strtok.priority != retok.priority: + continue + s = strtok.pattern.value + if s == _get_match(re_, retok.pattern.to_regexp(), s, g_regex_flags): + unless.append(strtok) + if strtok.pattern.flags <= retok.pattern.flags: + embedded_strs.add(strtok) + if unless: + callback[retok.name] = UnlessCallback(Scanner(unless, g_regex_flags, re_, use_bytes=use_bytes)) + + new_terminals = [t for t in terminals if t not in embedded_strs] + return new_terminals, callback + + +class Scanner: + def __init__(self, terminals, g_regex_flags, re_, use_bytes): + self.terminals = terminals + self.g_regex_flags = g_regex_flags + self.re_ = re_ + self.use_bytes = use_bytes + + self.allowed_types = {t.name for t in self.terminals} + + self._mres = self._build_mres(terminals, len(terminals)) + + def _build_mres(self, terminals, max_size): + ## + + ## + + ## + + mres = [] + while terminals: + pattern = u'|'.join(u'(?P<%s>%s)' % (t.name, t.pattern.to_regexp()) for t in terminals[:max_size]) + if self.use_bytes: + pattern = pattern.encode('latin-1') + try: + mre = self.re_.compile(pattern, self.g_regex_flags) + except AssertionError: ## + + return self._build_mres(terminals, max_size // 2) + + mres.append(mre) + terminals = terminals[max_size:] + return mres + + def match(self, text: TextSlice, pos): + for mre in self._mres: + m = mre.match(text.text, pos, text.end) + if m: + return m.group(0), m.lastgroup + + + def fullmatch(self, text: str) -> Optional[str]: + for mre in self._mres: + m = mre.fullmatch(text) + if m: + return m.lastgroup + return None + +def _regexp_has_newline(r: str): + #-- + return '\n' in r or '\\n' in r or '\\s' in r or '[^' in r or ('(?s' in r and '.' in r) + + +class LexerState: + #-- + + __slots__ = 'text', 'line_ctr', 'last_token' + + text: TextSlice + line_ctr: LineCounter + last_token: Optional[Token] + + def __init__(self, text: TextSlice, line_ctr: Optional[LineCounter] = None, last_token: Optional[Token]=None): + if isinstance(text, TextSlice): + if line_ctr is None: + line_ctr = LineCounter(b'\n' if isinstance(text.text, bytes) else '\n') + + if text.start > 0: + ## + + line_ctr.feed(TextSlice(text.text, 0, text.start)) + + if not (text.start <= line_ctr.char_pos <= text.end): + raise ValueError("LineCounter.char_pos is out of bounds") + + self.text = text + if line_ctr is None: + line_ctr = LineCounter(b'\n' if isinstance(text, bytes) or (hasattr(text, 'text') and isinstance(text.text, bytes)) else '\n') + self.line_ctr = line_ctr + self.last_token = last_token + + + def __eq__(self, other): + if not isinstance(other, LexerState): + return NotImplemented + + return self.text == other.text and self.line_ctr == other.line_ctr and self.last_token == other.last_token + + def __copy__(self): + return type(self)(self.text, copy(self.line_ctr), self.last_token) + + +class LexerThread: + #-- + + def __init__(self, lexer: 'Lexer', lexer_state: Optional[LexerState]): + self.lexer = lexer + self.state = lexer_state + + @classmethod + def from_text(cls, lexer: 'Lexer', text_or_slice: TextOrSlice) -> 'LexerThread': + text = TextSlice.cast_from(text_or_slice) + return cls(lexer, LexerState(text)) + + @classmethod + def from_custom_input(cls, lexer: 'Lexer', text: Any) -> 'LexerThread': + return cls(lexer, LexerState(text)) + + def lex(self, parser_state): + if self.state is None: + raise TypeError("Cannot lex: No text assigned to lexer state") + return self.lexer.lex(self.state, parser_state) + + def __copy__(self): + return type(self)(self.lexer, copy(self.state)) + + _Token = Token + + +_Callback = Callable[[Token], Token] + +class Lexer(ABC): + #-- + @abstractmethod + def lex(self, lexer_state: LexerState, parser_state: Any) -> Iterator[Token]: + return NotImplemented + + def make_lexer_state(self, text: str): + #-- + return LexerState(TextSlice.cast_from(text)) + + +def _check_regex_collisions(terminal_to_regexp: Dict[TerminalDef, str], comparator, strict_mode, max_collisions_to_show=8): + if not comparator: + comparator = interegular.Comparator.from_regexes(terminal_to_regexp) + + ## + + ## + + max_time = 2 if strict_mode else 0.2 + + ## + + if comparator.count_marked_pairs() >= max_collisions_to_show: + return + for group in classify(terminal_to_regexp, lambda t: t.priority).values(): + for a, b in comparator.check(group, skip_marked=True): + assert a.priority == b.priority + ## + + comparator.mark(a, b) + + ## + + message = f"Collision between Terminals {a.name} and {b.name}. " + try: + example = comparator.get_example_overlap(a, b, max_time).format_multiline() + except ValueError: + ## + + example = "No example could be found fast enough. However, the collision does still exists" + if strict_mode: + raise LexError(f"{message}\n{example}") + logger.warning("%s The lexer will choose between them arbitrarily.\n%s", message, example) + if comparator.count_marked_pairs() >= max_collisions_to_show: + logger.warning("Found 8 regex collisions, will not check for more.") + return + + +class AbstractBasicLexer(Lexer): + terminals_by_name: Dict[str, TerminalDef] + + @abstractmethod + def __init__(self, conf: 'LexerConf', comparator=None) -> None: + ... + + @abstractmethod + def next_token(self, lex_state: LexerState, parser_state: Any = None) -> Token: + ... + + def lex(self, state: LexerState, parser_state: Any) -> Iterator[Token]: + with suppress(EOFError): + while True: + yield self.next_token(state, parser_state) + + +class BasicLexer(AbstractBasicLexer): + terminals: Collection[TerminalDef] + ignore_types: FrozenSet[str] + newline_types: FrozenSet[str] + user_callbacks: Dict[str, _Callback] + callback: Dict[str, _Callback] + re: ModuleType + + def __init__(self, conf: 'LexerConf', comparator=None) -> None: + terminals = list(conf.terminals) + assert all(isinstance(t, TerminalDef) for t in terminals), terminals + + self.re = conf.re_module + + if not conf.skip_validation: + ## + + terminal_to_regexp = {} + for t in terminals: + regexp = t.pattern.to_regexp() + try: + self.re.compile(regexp, conf.g_regex_flags) + except self.re.error: + raise LexError("Cannot compile token %s: %s" % (t.name, t.pattern)) + + if t.pattern.min_width == 0: + raise LexError("Lexer does not allow zero-width terminals. (%s: %s)" % (t.name, t.pattern)) + if t.pattern.type == "re": + terminal_to_regexp[t] = regexp + + if not (set(conf.ignore) <= {t.name for t in terminals}): + raise LexError("Ignore terminals are not defined: %s" % (set(conf.ignore) - {t.name for t in terminals})) + + if has_interegular: + _check_regex_collisions(terminal_to_regexp, comparator, conf.strict) + elif conf.strict: + raise LexError("interegular must be installed for strict mode. Use `pip install 'lark[interegular]'`.") + + ## + + self.newline_types = frozenset(t.name for t in terminals if _regexp_has_newline(t.pattern.to_regexp())) + self.ignore_types = frozenset(conf.ignore) + + terminals.sort(key=lambda x: (-x.priority, -x.pattern.max_width, -len(x.pattern.value), x.name)) + self.terminals = terminals + self.user_callbacks = conf.callbacks + self.g_regex_flags = conf.g_regex_flags + self.use_bytes = conf.use_bytes + self.terminals_by_name = conf.terminals_by_name + + self._scanner: Optional[Scanner] = None + + def _build_scanner(self) -> Scanner: + terminals, self.callback = _create_unless(self.terminals, self.g_regex_flags, self.re, self.use_bytes) + assert all(self.callback.values()) + + for type_, f in self.user_callbacks.items(): + if type_ in self.callback: + ## + + self.callback[type_] = CallChain(self.callback[type_], f, lambda t: t.type == type_) + else: + self.callback[type_] = f + + return Scanner(terminals, self.g_regex_flags, self.re, self.use_bytes) + + @property + def scanner(self) -> Scanner: + if self._scanner is None: + self._scanner = self._build_scanner() + return self._scanner + + def match(self, text, pos): + return self.scanner.match(text, pos) + + def next_token(self, lex_state: LexerState, parser_state: Any = None) -> Token: + line_ctr = lex_state.line_ctr + while line_ctr.char_pos < lex_state.text.end: + res = self.match(lex_state.text, line_ctr.char_pos) + if not res: + allowed = self.scanner.allowed_types - self.ignore_types + if not allowed: + allowed = {""} + raise UnexpectedCharacters(lex_state.text.text, line_ctr.char_pos, line_ctr.line, line_ctr.column, + allowed=allowed, token_history=lex_state.last_token and [lex_state.last_token], + state=parser_state, terminals_by_name=self.terminals_by_name) + + value, type_ = res + + ignored = type_ in self.ignore_types + t = None + if not ignored or type_ in self.callback: + t = Token(type_, value, line_ctr.char_pos, line_ctr.line, line_ctr.column) + line_ctr.feed(value, type_ in self.newline_types) + if t is not None: + t.end_line = line_ctr.line + t.end_column = line_ctr.column + t.end_pos = line_ctr.char_pos + if t.type in self.callback: + t = self.callback[t.type](t) + if not ignored: + if not isinstance(t, Token): + raise LexError("Callbacks must return a token (returned %r)" % t) + lex_state.last_token = t + return t + + ## + + raise EOFError(self) + + +class ContextualLexer(Lexer): + lexers: Dict[int, AbstractBasicLexer] + root_lexer: AbstractBasicLexer + + BasicLexer: Type[AbstractBasicLexer] = BasicLexer + + def __init__(self, conf: 'LexerConf', states: Dict[int, Collection[str]], always_accept: Collection[str]=()) -> None: + terminals = list(conf.terminals) + terminals_by_name = conf.terminals_by_name + + trad_conf = copy(conf) + trad_conf.terminals = terminals + + if has_interegular and not conf.skip_validation: + comparator = interegular.Comparator.from_regexes({t: t.pattern.to_regexp() for t in terminals}) + else: + comparator = None + lexer_by_tokens: Dict[FrozenSet[str], AbstractBasicLexer] = {} + self.lexers = {} + for state, accepts in states.items(): + key = frozenset(accepts) + try: + lexer = lexer_by_tokens[key] + except KeyError: + accepts = set(accepts) | set(conf.ignore) | set(always_accept) + lexer_conf = copy(trad_conf) + lexer_conf.terminals = [terminals_by_name[n] for n in accepts if n in terminals_by_name] + lexer = self.BasicLexer(lexer_conf, comparator) + lexer_by_tokens[key] = lexer + + self.lexers[state] = lexer + + assert trad_conf.terminals is terminals + trad_conf.skip_validation = True ## + + self.root_lexer = self.BasicLexer(trad_conf, comparator) + + def lex(self, lexer_state: LexerState, parser_state: 'ParserState') -> Iterator[Token]: + try: + while True: + lexer = self.lexers[parser_state.position] + yield lexer.next_token(lexer_state, parser_state) + except EOFError: + pass + except UnexpectedCharacters as e: + ## + + ## + + try: + last_token = lexer_state.last_token ## + + token = self.root_lexer.next_token(lexer_state, parser_state) + raise UnexpectedToken(token, e.allowed, state=parser_state, token_history=[last_token], terminals_by_name=self.root_lexer.terminals_by_name) + except UnexpectedCharacters: + raise e ## + + + + +_ParserArgType: 'TypeAlias' = 'Literal["earley", "lalr", "cyk", "auto"]' +_LexerArgType: 'TypeAlias' = 'Union[Literal["auto", "basic", "contextual", "dynamic", "dynamic_complete"], Type[Lexer]]' +_LexerCallback = Callable[[Token], Token] +ParserCallbacks = Dict[str, Callable] + +class LexerConf(Serialize): + __serialize_fields__ = 'terminals', 'ignore', 'g_regex_flags', 'use_bytes', 'lexer_type' + __serialize_namespace__ = TerminalDef, + + terminals: Collection[TerminalDef] + re_module: ModuleType + ignore: Collection[str] + postlex: 'Optional[PostLex]' + callbacks: Dict[str, _LexerCallback] + g_regex_flags: int + skip_validation: bool + use_bytes: bool + lexer_type: Optional[_LexerArgType] + strict: bool + + def __init__(self, terminals: Collection[TerminalDef], re_module: ModuleType, ignore: Collection[str]=(), postlex: 'Optional[PostLex]'=None, + callbacks: Optional[Dict[str, _LexerCallback]]=None, g_regex_flags: int=0, skip_validation: bool=False, use_bytes: bool=False, strict: bool=False): + self.terminals = terminals + self.terminals_by_name = {t.name: t for t in self.terminals} + assert len(self.terminals) == len(self.terminals_by_name) + self.ignore = ignore + self.postlex = postlex + self.callbacks = callbacks or {} + self.g_regex_flags = g_regex_flags + self.re_module = re_module + self.skip_validation = skip_validation + self.use_bytes = use_bytes + self.strict = strict + self.lexer_type = None + + def _deserialize(self): + self.terminals_by_name = {t.name: t for t in self.terminals} + + def __deepcopy__(self, memo=None): + return type(self)( + deepcopy(self.terminals, memo), + self.re_module, + deepcopy(self.ignore, memo), + deepcopy(self.postlex, memo), + deepcopy(self.callbacks, memo), + deepcopy(self.g_regex_flags, memo), + deepcopy(self.skip_validation, memo), + deepcopy(self.use_bytes, memo), + ) + +class ParserConf(Serialize): + __serialize_fields__ = 'rules', 'start', 'parser_type' + + rules: List['Rule'] + callbacks: ParserCallbacks + start: List[str] + parser_type: _ParserArgType + + def __init__(self, rules: List['Rule'], callbacks: ParserCallbacks, start: List[str]): + assert isinstance(start, list) + self.rules = rules + self.callbacks = callbacks + self.start = start + + +from functools import partial, wraps +from itertools import product + + +class ExpandSingleChild: + def __init__(self, node_builder): + self.node_builder = node_builder + + def __call__(self, children): + if len(children) == 1: + return children[0] + else: + return self.node_builder(children) + + + +class PropagatePositions: + def __init__(self, node_builder, node_filter=None): + self.node_builder = node_builder + self.node_filter = node_filter + + def __call__(self, children): + res = self.node_builder(children) + + if isinstance(res, Tree): + ## + + ## + + ## + + ## + + + res_meta = res.meta + + first_meta = self._pp_get_meta(children) + if first_meta is not None: + if not hasattr(res_meta, 'line'): + ## + + res_meta.line = getattr(first_meta, 'container_line', first_meta.line) + res_meta.column = getattr(first_meta, 'container_column', first_meta.column) + res_meta.start_pos = getattr(first_meta, 'container_start_pos', first_meta.start_pos) + res_meta.empty = False + + res_meta.container_line = getattr(first_meta, 'container_line', first_meta.line) + res_meta.container_column = getattr(first_meta, 'container_column', first_meta.column) + res_meta.container_start_pos = getattr(first_meta, 'container_start_pos', first_meta.start_pos) + + last_meta = self._pp_get_meta(reversed(children)) + if last_meta is not None: + if not hasattr(res_meta, 'end_line'): + res_meta.end_line = getattr(last_meta, 'container_end_line', last_meta.end_line) + res_meta.end_column = getattr(last_meta, 'container_end_column', last_meta.end_column) + res_meta.end_pos = getattr(last_meta, 'container_end_pos', last_meta.end_pos) + res_meta.empty = False + + res_meta.container_end_line = getattr(last_meta, 'container_end_line', last_meta.end_line) + res_meta.container_end_column = getattr(last_meta, 'container_end_column', last_meta.end_column) + res_meta.container_end_pos = getattr(last_meta, 'container_end_pos', last_meta.end_pos) + + return res + + def _pp_get_meta(self, children): + for c in children: + if self.node_filter is not None and not self.node_filter(c): + continue + if isinstance(c, Tree): + if not c.meta.empty: + return c.meta + elif isinstance(c, Token): + return c + elif hasattr(c, '__lark_meta__'): + return c.__lark_meta__() + +def make_propagate_positions(option): + if callable(option): + return partial(PropagatePositions, node_filter=option) + elif option is True: + return PropagatePositions + elif option is False: + return None + + raise ConfigurationError('Invalid option for propagate_positions: %r' % option) + + +class ChildFilter: + def __init__(self, to_include, append_none, node_builder): + self.node_builder = node_builder + self.to_include = to_include + self.append_none = append_none + + def __call__(self, children): + filtered = [] + + for i, to_expand, add_none in self.to_include: + if add_none: + filtered += [None] * add_none + if to_expand: + filtered += children[i].children + else: + filtered.append(children[i]) + + if self.append_none: + filtered += [None] * self.append_none + + return self.node_builder(filtered) + + +class ChildFilterLALR(ChildFilter): + #-- + + def __call__(self, children): + filtered = [] + for i, to_expand, add_none in self.to_include: + if add_none: + filtered += [None] * add_none + if to_expand: + if filtered: + filtered += children[i].children + else: ## + + filtered = children[i].children + else: + filtered.append(children[i]) + + if self.append_none: + filtered += [None] * self.append_none + + return self.node_builder(filtered) + + +class ChildFilterLALR_NoPlaceholders(ChildFilter): + #-- + def __init__(self, to_include, node_builder): + self.node_builder = node_builder + self.to_include = to_include + + def __call__(self, children): + filtered = [] + for i, to_expand in self.to_include: + if to_expand: + if filtered: + filtered += children[i].children + else: ## + + filtered = children[i].children + else: + filtered.append(children[i]) + return self.node_builder(filtered) + + +def _should_expand(sym): + return not sym.is_term and sym.name.startswith('_') + + +def maybe_create_child_filter(expansion, keep_all_tokens, ambiguous, _empty_indices: List[bool]): + ## + + if _empty_indices: + assert _empty_indices.count(False) == len(expansion) + s = ''.join(str(int(b)) for b in _empty_indices) + empty_indices = [len(ones) for ones in s.split('0')] + assert len(empty_indices) == len(expansion)+1, (empty_indices, len(expansion)) + else: + empty_indices = [0] * (len(expansion)+1) + + to_include = [] + nones_to_add = 0 + for i, sym in enumerate(expansion): + nones_to_add += empty_indices[i] + if keep_all_tokens or not (sym.is_term and sym.filter_out): + to_include.append((i, _should_expand(sym), nones_to_add)) + nones_to_add = 0 + + nones_to_add += empty_indices[len(expansion)] + + if _empty_indices or len(to_include) < len(expansion) or any(to_expand for i, to_expand,_ in to_include): + if _empty_indices or ambiguous: + return partial(ChildFilter if ambiguous else ChildFilterLALR, to_include, nones_to_add) + else: + ## + + return partial(ChildFilterLALR_NoPlaceholders, [(i, x) for i,x,_ in to_include]) + + +class AmbiguousExpander: + #-- + def __init__(self, to_expand, tree_class, node_builder): + self.node_builder = node_builder + self.tree_class = tree_class + self.to_expand = to_expand + + def __call__(self, children): + def _is_ambig_tree(t): + return hasattr(t, 'data') and t.data == '_ambig' + + ## + + ## + + ## + + ## + + ambiguous = [] + for i, child in enumerate(children): + if _is_ambig_tree(child): + if i in self.to_expand: + ambiguous.append(i) + + child.expand_kids_by_data('_ambig') + + if not ambiguous: + return self.node_builder(children) + + expand = [child.children if i in ambiguous else (child,) for i, child in enumerate(children)] + return self.tree_class('_ambig', [self.node_builder(list(f)) for f in product(*expand)]) + + +def maybe_create_ambiguous_expander(tree_class, expansion, keep_all_tokens): + to_expand = [i for i, sym in enumerate(expansion) + if keep_all_tokens or ((not (sym.is_term and sym.filter_out)) and _should_expand(sym))] + if to_expand: + return partial(AmbiguousExpander, to_expand, tree_class) + + +class AmbiguousIntermediateExpander: + #-- + + def __init__(self, tree_class, node_builder): + self.node_builder = node_builder + self.tree_class = tree_class + + def __call__(self, children): + def _is_iambig_tree(child): + return hasattr(child, 'data') and child.data == '_iambig' + + def _collapse_iambig(children): + #-- + + ## + + ## + + if children and _is_iambig_tree(children[0]): + iambig_node = children[0] + result = [] + for grandchild in iambig_node.children: + collapsed = _collapse_iambig(grandchild.children) + if collapsed: + for child in collapsed: + child.children += children[1:] + result += collapsed + else: + new_tree = self.tree_class('_inter', grandchild.children + children[1:]) + result.append(new_tree) + return result + + collapsed = _collapse_iambig(children) + if collapsed: + processed_nodes = [self.node_builder(c.children) for c in collapsed] + return self.tree_class('_ambig', processed_nodes) + + return self.node_builder(children) + + + +def inplace_transformer(func): + @wraps(func) + def f(children): + ## + + tree = Tree(func.__name__, children) + return func(tree) + return f + + +def apply_visit_wrapper(func, name, wrapper): + if wrapper is _vargs_meta or wrapper is _vargs_meta_inline: + raise NotImplementedError("Meta args not supported for internal transformer; use YourTransformer().transform(parser.parse()) instead") + + @wraps(func) + def f(children): + return wrapper(func, name, children, None) + return f + + +class ParseTreeBuilder: + def __init__(self, rules, tree_class, propagate_positions=False, ambiguous=False, maybe_placeholders=False): + self.tree_class = tree_class + self.propagate_positions = propagate_positions + self.ambiguous = ambiguous + self.maybe_placeholders = maybe_placeholders + + self.rule_builders = list(self._init_builders(rules)) + + def _init_builders(self, rules): + propagate_positions = make_propagate_positions(self.propagate_positions) + + for rule in rules: + options = rule.options + keep_all_tokens = options.keep_all_tokens + expand_single_child = options.expand1 + + wrapper_chain = list(filter(None, [ + (expand_single_child and not rule.alias) and ExpandSingleChild, + maybe_create_child_filter(rule.expansion, keep_all_tokens, self.ambiguous, options.empty_indices if self.maybe_placeholders else None), + propagate_positions, + self.ambiguous and maybe_create_ambiguous_expander(self.tree_class, rule.expansion, keep_all_tokens), + self.ambiguous and partial(AmbiguousIntermediateExpander, self.tree_class) + ])) + + yield rule, wrapper_chain + + def create_callback(self, transformer=None): + callbacks = {} + + default_handler = getattr(transformer, '__default__', None) + if default_handler: + def default_callback(data, children): + return default_handler(data, children, None) + else: + default_callback = self.tree_class + + for rule, wrapper_chain in self.rule_builders: + + user_callback_name = rule.alias or rule.options.template_source or rule.origin.name + try: + f = getattr(transformer, user_callback_name) + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + f = apply_visit_wrapper(f, user_callback_name, wrapper) + elif isinstance(transformer, Transformer_InPlace): + f = inplace_transformer(f) + except AttributeError: + f = partial(default_callback, user_callback_name) + + for w in wrapper_chain: + f = w(f) + + if rule in callbacks: + raise GrammarError("Rule '%s' already exists" % (rule,)) + + callbacks[rule] = f + + return callbacks + + + +class Action: + def __init__(self, name): + self.name = name + def __str__(self): + return self.name + def __repr__(self): + return str(self) + +Shift = Action('Shift') +Reduce = Action('Reduce') + +StateT = TypeVar("StateT") + +class ParseTableBase(Generic[StateT]): + states: Dict[StateT, Dict[str, Tuple]] + start_states: Dict[str, StateT] + end_states: Dict[str, StateT] + + def __init__(self, states, start_states, end_states): + self.states = states + self.start_states = start_states + self.end_states = end_states + + def serialize(self, memo): + tokens = Enumerator() + + states = { + state: {tokens.get(token): ((1, arg.serialize(memo)) if action is Reduce else (0, arg)) + for token, (action, arg) in actions.items()} + for state, actions in self.states.items() + } + + return { + 'tokens': tokens.reversed(), + 'states': states, + 'start_states': self.start_states, + 'end_states': self.end_states, + } + + @classmethod + def deserialize(cls, data, memo): + tokens = data['tokens'] + states = { + state: {tokens[token]: ((Reduce, Rule.deserialize(arg, memo)) if action==1 else (Shift, arg)) + for token, (action, arg) in actions.items()} + for state, actions in data['states'].items() + } + return cls(states, data['start_states'], data['end_states']) + +class ParseTable(ParseTableBase['State']): + #-- + pass + + +class IntParseTable(ParseTableBase[int]): + #-- + + @classmethod + def from_ParseTable(cls, parse_table: ParseTable): + enum = list(parse_table.states) + state_to_idx: Dict['State', int] = {s:i for i,s in enumerate(enum)} + int_states = {} + + for s, la in parse_table.states.items(): + la = {k:(v[0], state_to_idx[v[1]]) if v[0] is Shift else v + for k,v in la.items()} + int_states[ state_to_idx[s] ] = la + + + start_states = {start:state_to_idx[s] for start, s in parse_table.start_states.items()} + end_states = {start:state_to_idx[s] for start, s in parse_table.end_states.items()} + return cls(int_states, start_states, end_states) + + + +class ParseConf(Generic[StateT]): + __slots__ = 'parse_table', 'callbacks', 'start', 'start_state', 'end_state', 'states' + + parse_table: ParseTableBase[StateT] + callbacks: ParserCallbacks + start: str + + start_state: StateT + end_state: StateT + states: Dict[StateT, Dict[str, tuple]] + + def __init__(self, parse_table: ParseTableBase[StateT], callbacks: ParserCallbacks, start: str): + self.parse_table = parse_table + + self.start_state = self.parse_table.start_states[start] + self.end_state = self.parse_table.end_states[start] + self.states = self.parse_table.states + + self.callbacks = callbacks + self.start = start + +class ParserState(Generic[StateT]): + __slots__ = 'parse_conf', 'lexer', 'state_stack', 'value_stack' + + parse_conf: ParseConf[StateT] + lexer: LexerThread + state_stack: List[StateT] + value_stack: list + + def __init__(self, parse_conf: ParseConf[StateT], lexer: LexerThread, state_stack=None, value_stack=None): + self.parse_conf = parse_conf + self.lexer = lexer + self.state_stack = state_stack or [self.parse_conf.start_state] + self.value_stack = value_stack or [] + + @property + def position(self) -> StateT: + return self.state_stack[-1] + + ## + + def __eq__(self, other) -> bool: + if not isinstance(other, ParserState): + return NotImplemented + return len(self.state_stack) == len(other.state_stack) and self.position == other.position + + def __copy__(self): + return self.copy() + + def copy(self, deepcopy_values=True) -> 'ParserState[StateT]': + return type(self)( + self.parse_conf, + self.lexer, ## + + copy(self.state_stack), + deepcopy(self.value_stack) if deepcopy_values else copy(self.value_stack), + ) + + def feed_token(self, token: Token, is_end=False) -> Any: + state_stack = self.state_stack + value_stack = self.value_stack + states = self.parse_conf.states + end_state = self.parse_conf.end_state + callbacks = self.parse_conf.callbacks + + while True: + state = state_stack[-1] + try: + action, arg = states[state][token.type] + except KeyError: + expected = {s for s in states[state].keys() if s.isupper()} + raise UnexpectedToken(token, expected, state=self, interactive_parser=None) + + assert arg != end_state + + if action is Shift: + ## + + assert not is_end + state_stack.append(arg) + value_stack.append(token if token.type not in callbacks else callbacks[token.type](token)) + return + else: + ## + + rule = arg + size = len(rule.expansion) + if size: + s = value_stack[-size:] + del state_stack[-size:] + del value_stack[-size:] + else: + s = [] + + value = callbacks[rule](s) if callbacks else s + + _action, new_state = states[state_stack[-1]][rule.origin.name] + assert _action is Shift + state_stack.append(new_state) + value_stack.append(value) + + if is_end and state_stack[-1] == end_state: + return value_stack[-1] + + +class LALR_Parser(Serialize): + def __init__(self, parser_conf: ParserConf, debug: bool=False, strict: bool=False): + analysis = LALR_Analyzer(parser_conf, debug=debug, strict=strict) + analysis.compute_lalr() + callbacks = parser_conf.callbacks + + self._parse_table = analysis.parse_table + self.parser_conf = parser_conf + self.parser = _Parser(analysis.parse_table, callbacks, debug) + + @classmethod + def deserialize(cls, data, memo, callbacks, debug=False): + inst = cls.__new__(cls) + inst._parse_table = IntParseTable.deserialize(data, memo) + inst.parser = _Parser(inst._parse_table, callbacks, debug) + return inst + + def serialize(self, memo: Any = None) -> Dict[str, Any]: + return self._parse_table.serialize(memo) + + def parse_interactive(self, lexer: LexerThread, start: str): + return self.parser.parse(lexer, start, start_interactive=True) + + def parse(self, lexer, start, on_error=None): + try: + return self.parser.parse(lexer, start) + except UnexpectedInput as e: + if on_error is None: + raise + + while True: + if isinstance(e, UnexpectedCharacters): + s = e.interactive_parser.lexer_thread.state + p = s.line_ctr.char_pos + + if not on_error(e): + raise e + + if isinstance(e, UnexpectedCharacters): + ## + + if p == s.line_ctr.char_pos: + s.line_ctr.feed(s.text.text[p:p+1]) + + try: + return e.interactive_parser.resume_parse() + except UnexpectedToken as e2: + if (isinstance(e, UnexpectedToken) + and e.token.type == e2.token.type == '$END' + and e.interactive_parser == e2.interactive_parser): + ## + + raise e2 + e = e2 + except UnexpectedCharacters as e2: + e = e2 + + +class _Parser: + parse_table: ParseTableBase + callbacks: ParserCallbacks + debug: bool + + def __init__(self, parse_table: ParseTableBase, callbacks: ParserCallbacks, debug: bool=False): + self.parse_table = parse_table + self.callbacks = callbacks + self.debug = debug + + def parse(self, lexer: LexerThread, start: str, value_stack=None, state_stack=None, start_interactive=False): + parse_conf = ParseConf(self.parse_table, self.callbacks, start) + parser_state = ParserState(parse_conf, lexer, state_stack, value_stack) + if start_interactive: + return InteractiveParser(self, parser_state, parser_state.lexer) + return self.parse_from_state(parser_state) + + + def parse_from_state(self, state: ParserState, last_token: Optional[Token]=None): + #-- + try: + token = last_token + for token in state.lexer.lex(state): + assert token is not None + state.feed_token(token) + + end_token = Token.new_borrow_pos('$END', '', token) if token else Token('$END', '', 0, 1, 1) + return state.feed_token(end_token, True) + except UnexpectedInput as e: + try: + e.interactive_parser = InteractiveParser(self, state, state.lexer) + except NameError: + pass + raise e + except Exception as e: + if self.debug: + print("") + print("STATE STACK DUMP") + print("----------------") + for i, s in enumerate(state.state_stack): + print('%d)' % i , s) + print("") + + raise + + +class InteractiveParser: + #-- + def __init__(self, parser, parser_state: ParserState, lexer_thread: LexerThread): + self.parser = parser + self.parser_state = parser_state + self.lexer_thread = lexer_thread + self.result = None + + @property + def lexer_state(self) -> LexerThread: + warnings.warn("lexer_state will be removed in subsequent releases. Use lexer_thread instead.", DeprecationWarning) + return self.lexer_thread + + def feed_token(self, token: Token): + #-- + return self.parser_state.feed_token(token, token.type == '$END') + + def iter_parse(self) -> Iterator[Token]: + #-- + for token in self.lexer_thread.lex(self.parser_state): + yield token + self.result = self.feed_token(token) + + def exhaust_lexer(self) -> List[Token]: + #-- + return list(self.iter_parse()) + + + def feed_eof(self, last_token=None): + #-- + eof = Token.new_borrow_pos('$END', '', last_token) if last_token is not None else self.lexer_thread._Token('$END', '', 0, 1, 1) + return self.feed_token(eof) + + + def __copy__(self): + #-- + return self.copy() + + def copy(self, deepcopy_values=True): + return type(self)( + self.parser, + self.parser_state.copy(deepcopy_values=deepcopy_values), + copy(self.lexer_thread), + ) + + def __eq__(self, other): + if not isinstance(other, InteractiveParser): + return False + + return self.parser_state == other.parser_state and self.lexer_thread == other.lexer_thread + + def as_immutable(self): + #-- + p = copy(self) + return ImmutableInteractiveParser(p.parser, p.parser_state, p.lexer_thread) + + def pretty(self): + #-- + out = ["Parser choices:"] + for k, v in self.choices().items(): + out.append('\t- %s -> %r' % (k, v)) + out.append('stack size: %s' % len(self.parser_state.state_stack)) + return '\n'.join(out) + + def choices(self): + #-- + return self.parser_state.parse_conf.parse_table.states[self.parser_state.position] + + def accepts(self): + #-- + accepts = set() + conf_no_callbacks = copy(self.parser_state.parse_conf) + ## + + ## + + conf_no_callbacks.callbacks = {} + for t in self.choices(): + if t.isupper(): ## + + new_cursor = self.copy(deepcopy_values=False) + new_cursor.parser_state.parse_conf = conf_no_callbacks + try: + new_cursor.feed_token(self.lexer_thread._Token(t, '')) + except UnexpectedToken: + pass + else: + accepts.add(t) + return accepts + + def resume_parse(self): + #-- + return self.parser.parse_from_state(self.parser_state, last_token=self.lexer_thread.state.last_token) + + + +class ImmutableInteractiveParser(InteractiveParser): + #-- + + result = None + + def __hash__(self): + return hash((self.parser_state, self.lexer_thread)) + + def feed_token(self, token): + c = copy(self) + c.result = InteractiveParser.feed_token(c, token) + return c + + def exhaust_lexer(self): + #-- + cursor = self.as_mutable() + cursor.exhaust_lexer() + return cursor.as_immutable() + + def as_mutable(self): + #-- + p = copy(self) + return InteractiveParser(p.parser, p.parser_state, p.lexer_thread) + + + +def _wrap_lexer(lexer_class): + future_interface = getattr(lexer_class, '__future_interface__', 0) + if future_interface == 2: + return lexer_class + elif future_interface == 1: + class CustomLexerWrapper1(Lexer): + def __init__(self, lexer_conf): + self.lexer = lexer_class(lexer_conf) + def lex(self, lexer_state, parser_state): + if isinstance(lexer_state.text, TextSlice) and not lexer_state.text.is_complete_text(): + raise TypeError("Interface=1 Custom Lexer don't support TextSlice") + lexer_state.text = lexer_state.text + return self.lexer.lex(lexer_state, parser_state) + return CustomLexerWrapper1 + elif future_interface == 0: + class CustomLexerWrapper0(Lexer): + def __init__(self, lexer_conf): + self.lexer = lexer_class(lexer_conf) + + def lex(self, lexer_state, parser_state): + if isinstance(lexer_state.text, TextSlice): + if not lexer_state.text.is_complete_text(): + raise TypeError("Interface=0 Custom Lexer don't support TextSlice") + return self.lexer.lex(lexer_state.text.text) + return self.lexer.lex(lexer_state.text) + return CustomLexerWrapper0 + else: + raise ValueError(f"Unknown __future_interface__ value {future_interface}, integer 0-2 expected") + + +def _deserialize_parsing_frontend(data, memo, lexer_conf, callbacks, options): + parser_conf = ParserConf.deserialize(data['parser_conf'], memo) + cls = (options and options._plugins.get('LALR_Parser')) or LALR_Parser + parser = cls.deserialize(data['parser'], memo, callbacks, options.debug) + parser_conf.callbacks = callbacks + return ParsingFrontend(lexer_conf, parser_conf, options, parser=parser) + + +_parser_creators: 'Dict[str, Callable[[LexerConf, Any, Any], Any]]' = {} + + +class ParsingFrontend(Serialize): + __serialize_fields__ = 'lexer_conf', 'parser_conf', 'parser' + + lexer_conf: LexerConf + parser_conf: ParserConf + options: Any + + def __init__(self, lexer_conf: LexerConf, parser_conf: ParserConf, options, parser=None): + self.parser_conf = parser_conf + self.lexer_conf = lexer_conf + self.options = options + + ## + + if parser: ## + + self.parser = parser + else: + create_parser = _parser_creators.get(parser_conf.parser_type) + assert create_parser is not None, "{} is not supported in standalone mode".format( + parser_conf.parser_type + ) + self.parser = create_parser(lexer_conf, parser_conf, options) + + ## + + lexer_type = options.lexer if (options and options.lexer) else lexer_conf.lexer_type + self.skip_lexer = False + if lexer_type in ('dynamic', 'dynamic_complete'): + assert lexer_conf.postlex is None + self.skip_lexer = True + return + + if isinstance(lexer_type, type): + assert issubclass(lexer_type, Lexer) or hasattr(lexer_type, 'lex') + self.lexer = _wrap_lexer(lexer_type)(lexer_conf) + elif isinstance(lexer_type, str): + create_lexer = { + 'basic': create_basic_lexer, + 'contextual': create_contextual_lexer, + }[lexer_type] + self.lexer = create_lexer(lexer_conf, self.parser, lexer_conf.postlex, options) + else: + raise TypeError("Bad value for lexer_type: {lexer_type}") + + if lexer_conf.postlex: + self.lexer = PostLexConnector(self.lexer, lexer_conf.postlex) + + def _verify_start(self, start=None): + if start is None: + start_decls = self.parser_conf.start + if len(start_decls) > 1: + raise ConfigurationError("Lark initialized with more than 1 possible start rule. Must specify which start rule to parse", start_decls) + start ,= start_decls + elif start not in self.parser_conf.start: + raise ConfigurationError("Unknown start rule %s. Must be one of %r" % (start, self.parser_conf.start)) + return start + + def _make_lexer_thread(self, text: Optional[LarkInput]) -> Union[LarkInput, LexerThread, None]: + cls = (self.options and self.options._plugins.get('LexerThread')) or LexerThread + if self.skip_lexer: + return text + if text is None: + return cls(self.lexer, None) + if isinstance(text, (str, bytes, TextSlice)): + return cls.from_text(self.lexer, text) + return cls.from_custom_input(self.lexer, text) + + def parse(self, text: Optional[LarkInput], start=None, on_error=None): + if self.lexer_conf.lexer_type in ("dynamic", "dynamic_complete"): + if isinstance(text, TextSlice) and not text.is_complete_text(): + raise TypeError(f"Lexer {self.lexer_conf.lexer_type} does not support text slices.") + + chosen_start = self._verify_start(start) + kw = {} if on_error is None else {'on_error': on_error} + stream = self._make_lexer_thread(text) + return self.parser.parse(stream, chosen_start, **kw) + + def parse_interactive(self, text: Optional[TextOrSlice]=None, start=None): + ## + + ## + + chosen_start = self._verify_start(start) + if self.parser_conf.parser_type != 'lalr': + raise ConfigurationError("parse_interactive() currently only works with parser='lalr' ") + stream = self._make_lexer_thread(text) + return self.parser.parse_interactive(stream, chosen_start) + + +def _validate_frontend_args(parser, lexer) -> None: + assert_config(parser, ('lalr', 'earley', 'cyk')) + if not isinstance(lexer, type): ## + + expected = { + 'lalr': ('basic', 'contextual'), + 'earley': ('basic', 'dynamic', 'dynamic_complete'), + 'cyk': ('basic', ), + }[parser] + assert_config(lexer, expected, 'Parser %r does not support lexer %%r, expected one of %%s' % parser) + + +def _get_lexer_callbacks(transformer, terminals): + result = {} + for terminal in terminals: + callback = getattr(transformer, terminal.name, None) + if callback is not None: + result[terminal.name] = callback + return result + +class PostLexConnector: + def __init__(self, lexer, postlexer): + self.lexer = lexer + self.postlexer = postlexer + + def lex(self, lexer_state, parser_state): + i = self.lexer.lex(lexer_state, parser_state) + return self.postlexer.process(i) + + + +def create_basic_lexer(lexer_conf, parser, postlex, options) -> BasicLexer: + cls = (options and options._plugins.get('BasicLexer')) or BasicLexer + return cls(lexer_conf) + +def create_contextual_lexer(lexer_conf: LexerConf, parser, postlex, options) -> ContextualLexer: + cls = (options and options._plugins.get('ContextualLexer')) or ContextualLexer + parse_table: ParseTableBase[int] = parser._parse_table + states: Dict[int, Collection[str]] = {idx:list(t.keys()) for idx, t in parse_table.states.items()} + always_accept: Collection[str] = postlex.always_accept if postlex else () + return cls(lexer_conf, states, always_accept=always_accept) + +def create_lalr_parser(lexer_conf: LexerConf, parser_conf: ParserConf, options=None) -> LALR_Parser: + debug = options.debug if options else False + strict = options.strict if options else False + cls = (options and options._plugins.get('LALR_Parser')) or LALR_Parser + return cls(parser_conf, debug=debug, strict=strict) + +_parser_creators['lalr'] = create_lalr_parser + + + + +class PostLex(ABC): + @abstractmethod + def process(self, stream: Iterator[Token]) -> Iterator[Token]: + return stream + + always_accept: Iterable[str] = () + +class LarkOptions(Serialize): + #-- + + start: List[str] + debug: bool + strict: bool + transformer: 'Optional[Transformer]' + propagate_positions: Union[bool, str] + maybe_placeholders: bool + cache: Union[bool, str] + cache_grammar: bool + regex: bool + g_regex_flags: int + keep_all_tokens: bool + tree_class: Optional[Callable[[str, List], Any]] + parser: _ParserArgType + lexer: _LexerArgType + ambiguity: 'Literal["auto", "resolve", "explicit", "forest"]' + postlex: Optional[PostLex] + priority: 'Optional[Literal["auto", "normal", "invert"]]' + lexer_callbacks: Dict[str, Callable[[Token], Token]] + use_bytes: bool + ordered_sets: bool + edit_terminals: Optional[Callable[[TerminalDef], TerminalDef]] + import_paths: 'List[Union[str, Callable[[Union[None, str, PackageResource], str], Tuple[str, str]]]]' + source_path: Optional[str] + + OPTIONS_DOC = r""" + **=== General Options ===** + + start + The start symbol. Either a string, or a list of strings for multiple possible starts (Default: "start") + debug + Display debug information and extra warnings. Use only when debugging (Default: ``False``) + When used with Earley, it generates a forest graph as "sppf.png", if 'dot' is installed. + strict + Throw an exception on any potential ambiguity, including shift/reduce conflicts, and regex collisions. + transformer + Applies the transformer to every parse tree (equivalent to applying it after the parse, but faster) + propagate_positions + Propagates positional attributes into the 'meta' attribute of all tree branches. + Sets attributes: (line, column, end_line, end_column, start_pos, end_pos, + container_line, container_column, container_end_line, container_end_column) + Accepts ``False``, ``True``, or a callable, which will filter which nodes to ignore when propagating. + maybe_placeholders + When ``True``, the ``[]`` operator returns ``None`` when not matched. + When ``False``, ``[]`` behaves like the ``?`` operator, and returns no value at all. + (default= ``True``) + cache + Cache the results of the Lark grammar analysis, for x2 to x3 faster loading. LALR only for now. + + - When ``False``, does nothing (default) + - When ``True``, caches to a temporary file in the local directory + - When given a string, caches to the path pointed by the string + cache_grammar + For use with ``cache`` option. When ``True``, the unanalyzed grammar is also included in the cache. + Useful for classes that require the ``Lark.grammar`` to be present (e.g. Reconstructor). + (default= ``False``) + regex + When True, uses the ``regex`` module instead of the stdlib ``re``. + g_regex_flags + Flags that are applied to all terminals (both regex and strings) + keep_all_tokens + Prevent the tree builder from automagically removing "punctuation" tokens (Default: ``False``) + tree_class + Lark will produce trees comprised of instances of this class instead of the default ``lark.Tree``. + + **=== Algorithm Options ===** + + parser + Decides which parser engine to use. Accepts "earley" or "lalr". (Default: "earley"). + (there is also a "cyk" option for legacy) + lexer + Decides whether or not to use a lexer stage + + - "auto" (default): Choose for me based on the parser + - "basic": Use a basic lexer + - "contextual": Stronger lexer (only works with parser="lalr") + - "dynamic": Flexible and powerful (only with parser="earley") + - "dynamic_complete": Same as dynamic, but tries *every* variation of tokenizing possible. + ambiguity + Decides how to handle ambiguity in the parse. Only relevant if parser="earley" + + - "resolve": The parser will automatically choose the simplest derivation + (it chooses consistently: greedy for tokens, non-greedy for rules) + - "explicit": The parser will return all derivations wrapped in "_ambig" tree nodes (i.e. a forest). + - "forest": The parser will return the root of the shared packed parse forest. + + **=== Misc. / Domain Specific Options ===** + + postlex + Lexer post-processing (Default: ``None``) Only works with the basic and contextual lexers. + priority + How priorities should be evaluated - "auto", ``None``, "normal", "invert" (Default: "auto") + lexer_callbacks + Dictionary of callbacks for the lexer. May alter tokens during lexing. Use with caution. + use_bytes + Accept an input of type ``bytes`` instead of ``str``. + ordered_sets + Should Earley use ordered-sets to achieve stable output (~10% slower than regular sets. Default: True) + edit_terminals + A callback for editing the terminals before parse. + import_paths + A List of either paths or loader functions to specify from where grammars are imported + source_path + Override the source of from where the grammar was loaded. Useful for relative imports and unconventional grammar loading + **=== End of Options ===** + """ + if __doc__: + __doc__ += OPTIONS_DOC + + + ## + + ## + + ## + + ## + + ## + + ## + + _defaults: Dict[str, Any] = { + 'debug': False, + 'strict': False, + 'keep_all_tokens': False, + 'tree_class': None, + 'cache': False, + 'cache_grammar': False, + 'postlex': None, + 'parser': 'earley', + 'lexer': 'auto', + 'transformer': None, + 'start': 'start', + 'priority': 'auto', + 'ambiguity': 'auto', + 'regex': False, + 'propagate_positions': False, + 'lexer_callbacks': {}, + 'maybe_placeholders': True, + 'edit_terminals': None, + 'g_regex_flags': 0, + 'use_bytes': False, + 'ordered_sets': True, + 'import_paths': [], + 'source_path': None, + '_plugins': {}, + } + + def __init__(self, options_dict: Dict[str, Any]) -> None: + o = dict(options_dict) + + options = {} + for name, default in self._defaults.items(): + if name in o: + value = o.pop(name) + if isinstance(default, bool) and name not in ('cache', 'use_bytes', 'propagate_positions'): + value = bool(value) + else: + value = default + + options[name] = value + + if isinstance(options['start'], str): + options['start'] = [options['start']] + + self.__dict__['options'] = options + + + assert_config(self.parser, ('earley', 'lalr', 'cyk', None)) + + if self.parser == 'earley' and self.transformer: + raise ConfigurationError('Cannot specify an embedded transformer when using the Earley algorithm. ' + 'Please use your transformer on the resulting parse tree, or use a different algorithm (i.e. LALR)') + + if self.cache_grammar and not self.cache: + raise ConfigurationError('cache_grammar cannot be set when cache is disabled') + + if o: + raise ConfigurationError("Unknown options: %s" % o.keys()) + + def __getattr__(self, name: str) -> Any: + try: + return self.__dict__['options'][name] + except KeyError as e: + raise AttributeError(e) + + def __setattr__(self, name: str, value: str) -> None: + assert_config(name, self.options.keys(), "%r isn't a valid option. Expected one of: %s") + self.options[name] = value + + def serialize(self, memo = None) -> Dict[str, Any]: + return self.options + + @classmethod + def deserialize(cls, data: Dict[str, Any], memo: Dict[int, Union[TerminalDef, Rule]]) -> "LarkOptions": + return cls(data) + + +## + +## + +_LOAD_ALLOWED_OPTIONS = {'lexer', 'postlex', 'transformer', 'lexer_callbacks', 'use_bytes', 'debug', 'g_regex_flags', 'regex', 'propagate_positions', 'tree_class', '_plugins'} + +_VALID_PRIORITY_OPTIONS = ('auto', 'normal', 'invert', None) +_VALID_AMBIGUITY_OPTIONS = ('auto', 'resolve', 'explicit', 'forest') + + +_T = TypeVar('_T', bound="Lark") + +class Lark(Serialize): + #-- + + source_path: str + source_grammar: str + grammar: 'Grammar' + options: LarkOptions + lexer: Lexer + parser: 'ParsingFrontend' + terminals: Collection[TerminalDef] + + __serialize_fields__ = ['parser', 'rules', 'options'] + + def __init__(self, grammar: 'Union[Grammar, str, IO[str]]', **options) -> None: + self.options = LarkOptions(options) + re_module: types.ModuleType + + ## + + if self.options.cache_grammar: + self.__serialize_fields__ = self.__serialize_fields__ + ['grammar'] + + ## + + use_regex = self.options.regex + if use_regex: + if _has_regex: + re_module = regex + else: + raise ImportError('`regex` module must be installed if calling `Lark(regex=True)`.') + else: + re_module = re + + ## + + if self.options.source_path is None: + try: + self.source_path = grammar.name ## + + except AttributeError: + self.source_path = '' + else: + self.source_path = self.options.source_path + + ## + + try: + read = grammar.read ## + + except AttributeError: + pass + else: + grammar = read() + + cache_fn = None + cache_sha256 = None + if isinstance(grammar, str): + self.source_grammar = grammar + if self.options.use_bytes: + if not grammar.isascii(): + raise ConfigurationError("Grammar must be ascii only, when use_bytes=True") + + if self.options.cache: + if self.options.parser != 'lalr': + raise ConfigurationError("cache only works with parser='lalr' for now") + + unhashable = ('transformer', 'postlex', 'lexer_callbacks', 'edit_terminals', '_plugins') + options_str = ''.join(k+str(v) for k, v in options.items() if k not in unhashable) + from . import __version__ + s = grammar + options_str + __version__ + str(sys.version_info[:2]) + cache_sha256 = sha256_digest(s) + + if isinstance(self.options.cache, str): + cache_fn = self.options.cache + else: + if self.options.cache is not True: + raise ConfigurationError("cache argument must be bool or str") + + try: + username = getpass.getuser() + except Exception: + ## + + ## + + ## + + username = "unknown" + + + cache_fn = tempfile.gettempdir() + "/.lark_%s_%s_%s_%s_%s.tmp" % ( + "cache_grammar" if self.options.cache_grammar else "cache", username, cache_sha256, *sys.version_info[:2]) + + old_options = self.options + try: + with FS.open(cache_fn, 'rb') as f: + logger.debug('Loading grammar from cache: %s', cache_fn) + ## + + for name in (set(options) - _LOAD_ALLOWED_OPTIONS): + del options[name] + file_sha256 = f.readline().rstrip(b'\n') + cached_used_files = pickle.load(f) + if file_sha256 == cache_sha256.encode('utf8') and verify_used_files(cached_used_files): + cached_parser_data = pickle.load(f) + self._load(cached_parser_data, **options) + return + except FileNotFoundError: + ## + + pass + except Exception: ## + + logger.exception("Failed to load Lark from cache: %r. We will try to carry on.", cache_fn) + + ## + + ## + + self.options = old_options + + + ## + + self.grammar, used_files = load_grammar(grammar, self.source_path, self.options.import_paths, self.options.keep_all_tokens) + else: + assert isinstance(grammar, Grammar) + self.grammar = grammar + + + if self.options.lexer == 'auto': + if self.options.parser == 'lalr': + self.options.lexer = 'contextual' + elif self.options.parser == 'earley': + if self.options.postlex is not None: + logger.info("postlex can't be used with the dynamic lexer, so we use 'basic' instead. " + "Consider using lalr with contextual instead of earley") + self.options.lexer = 'basic' + else: + self.options.lexer = 'dynamic' + elif self.options.parser == 'cyk': + self.options.lexer = 'basic' + else: + assert False, self.options.parser + lexer = self.options.lexer + if isinstance(lexer, type): + assert issubclass(lexer, Lexer) ## + + else: + assert_config(lexer, ('basic', 'contextual', 'dynamic', 'dynamic_complete')) + if self.options.postlex is not None and 'dynamic' in lexer: + raise ConfigurationError("Can't use postlex with a dynamic lexer. Use basic or contextual instead") + + if self.options.ambiguity == 'auto': + if self.options.parser == 'earley': + self.options.ambiguity = 'resolve' + else: + assert_config(self.options.parser, ('earley', 'cyk'), "%r doesn't support disambiguation. Use one of these parsers instead: %s") + + if self.options.priority == 'auto': + self.options.priority = 'normal' + + if self.options.priority not in _VALID_PRIORITY_OPTIONS: + raise ConfigurationError("invalid priority option: %r. Must be one of %r" % (self.options.priority, _VALID_PRIORITY_OPTIONS)) + if self.options.ambiguity not in _VALID_AMBIGUITY_OPTIONS: + raise ConfigurationError("invalid ambiguity option: %r. Must be one of %r" % (self.options.ambiguity, _VALID_AMBIGUITY_OPTIONS)) + + if self.options.parser is None: + terminals_to_keep = '*' ## + + elif self.options.postlex is not None: + terminals_to_keep = set(self.options.postlex.always_accept) + else: + terminals_to_keep = set() + + ## + + self.terminals, self.rules, self.ignore_tokens = self.grammar.compile(self.options.start, terminals_to_keep) + + if self.options.edit_terminals: + for t in self.terminals: + self.options.edit_terminals(t) + + self._terminals_dict = {t.name: t for t in self.terminals} + + ## + + if self.options.priority == 'invert': + for rule in self.rules: + if rule.options.priority is not None: + rule.options.priority = -rule.options.priority + for term in self.terminals: + term.priority = -term.priority + ## + + ## + + ## + + elif self.options.priority is None: + for rule in self.rules: + if rule.options.priority is not None: + rule.options.priority = None + for term in self.terminals: + term.priority = 0 + + ## + + self.lexer_conf = LexerConf( + self.terminals, re_module, self.ignore_tokens, self.options.postlex, + self.options.lexer_callbacks, self.options.g_regex_flags, use_bytes=self.options.use_bytes, strict=self.options.strict + ) + + if self.options.parser: + self.parser = self._build_parser() + elif lexer: + self.lexer = self._build_lexer() + + if cache_fn: + logger.debug('Saving grammar to cache: %s', cache_fn) + try: + with FS.open(cache_fn, 'wb') as f: + assert cache_sha256 is not None + f.write(cache_sha256.encode('utf8') + b'\n') + pickle.dump(used_files, f) + self.save(f, _LOAD_ALLOWED_OPTIONS) + except IOError as e: + logger.exception("Failed to save Lark to cache: %r.", cache_fn, e) + + if __doc__: + __doc__ += "\n\n" + LarkOptions.OPTIONS_DOC + + def _build_lexer(self, dont_ignore: bool=False) -> BasicLexer: + lexer_conf = self.lexer_conf + if dont_ignore: + from copy import copy + lexer_conf = copy(lexer_conf) + lexer_conf.ignore = () + return BasicLexer(lexer_conf) + + def _prepare_callbacks(self) -> None: + self._callbacks = {} + ## + + if self.options.ambiguity != 'forest': + self._parse_tree_builder = ParseTreeBuilder( + self.rules, + self.options.tree_class or Tree, + self.options.propagate_positions, + self.options.parser != 'lalr' and self.options.ambiguity == 'explicit', + self.options.maybe_placeholders + ) + self._callbacks = self._parse_tree_builder.create_callback(self.options.transformer) + self._callbacks.update(_get_lexer_callbacks(self.options.transformer, self.terminals)) + + def _build_parser(self) -> "ParsingFrontend": + self._prepare_callbacks() + _validate_frontend_args(self.options.parser, self.options.lexer) + parser_conf = ParserConf(self.rules, self._callbacks, self.options.start) + return _construct_parsing_frontend( + self.options.parser, + self.options.lexer, + self.lexer_conf, + parser_conf, + options=self.options + ) + + def save(self, f, exclude_options: Collection[str] = ()) -> None: + #-- + if self.options.parser != 'lalr': + raise NotImplementedError("Lark.save() is only implemented for the LALR(1) parser.") + data, m = self.memo_serialize([TerminalDef, Rule]) + if exclude_options: + data["options"] = {n: v for n, v in data["options"].items() if n not in exclude_options} + pickle.dump({'data': data, 'memo': m}, f, protocol=pickle.HIGHEST_PROTOCOL) + + @classmethod + def load(cls: Type[_T], f) -> _T: + #-- + inst = cls.__new__(cls) + return inst._load(f) + + def _deserialize_lexer_conf(self, data: Dict[str, Any], memo: Dict[int, Union[TerminalDef, Rule]], options: LarkOptions) -> LexerConf: + lexer_conf = LexerConf.deserialize(data['lexer_conf'], memo) + lexer_conf.callbacks = options.lexer_callbacks or {} + lexer_conf.re_module = regex if options.regex else re + lexer_conf.use_bytes = options.use_bytes + lexer_conf.g_regex_flags = options.g_regex_flags + lexer_conf.skip_validation = True + lexer_conf.postlex = options.postlex + return lexer_conf + + def _load(self: _T, f: Any, **kwargs) -> _T: + if isinstance(f, dict): + d = f + else: + d = pickle.load(f) + memo_json = d['memo'] + data = d['data'] + + assert memo_json + memo = SerializeMemoizer.deserialize(memo_json, {'Rule': Rule, 'TerminalDef': TerminalDef}, {}) + if 'grammar' in data: + self.grammar = Grammar.deserialize(data['grammar'], memo) + options = dict(data['options']) + if (set(kwargs) - _LOAD_ALLOWED_OPTIONS) & set(LarkOptions._defaults): + raise ConfigurationError("Some options are not allowed when loading a Parser: {}" + .format(set(kwargs) - _LOAD_ALLOWED_OPTIONS)) + options.update(kwargs) + self.options = LarkOptions.deserialize(options, memo) + self.rules = [Rule.deserialize(r, memo) for r in data['rules']] + self.source_path = '' + _validate_frontend_args(self.options.parser, self.options.lexer) + self.lexer_conf = self._deserialize_lexer_conf(data['parser'], memo, self.options) + self.terminals = self.lexer_conf.terminals + self._prepare_callbacks() + self._terminals_dict = {t.name: t for t in self.terminals} + self.parser = _deserialize_parsing_frontend( + data['parser'], + memo, + self.lexer_conf, + self._callbacks, + self.options, ## + + ) + return self + + @classmethod + def _load_from_dict(cls, data, memo, **kwargs): + inst = cls.__new__(cls) + return inst._load({'data': data, 'memo': memo}, **kwargs) + + @classmethod + def open(cls: Type[_T], grammar_filename: str, rel_to: Optional[str]=None, **options) -> _T: + #-- + if rel_to: + basepath = os.path.dirname(rel_to) + grammar_filename = os.path.join(basepath, grammar_filename) + with open(grammar_filename, encoding='utf8') as f: + return cls(f, **options) + + @classmethod + def open_from_package(cls: Type[_T], package: str, grammar_path: str, search_paths: 'Sequence[str]'=[""], **options) -> _T: + #-- + package_loader = FromPackageLoader(package, search_paths) + full_path, text = package_loader(None, grammar_path) + options.setdefault('source_path', full_path) + options.setdefault('import_paths', []) + options['import_paths'].append(package_loader) + return cls(text, **options) + + def __repr__(self): + return 'Lark(open(%r), parser=%r, lexer=%r, ...)' % (self.source_path, self.options.parser, self.options.lexer) + + + def lex(self, text: TextOrSlice, dont_ignore: bool=False) -> Iterator[Token]: + #-- + lexer: Lexer + if not hasattr(self, 'lexer') or dont_ignore: + lexer = self._build_lexer(dont_ignore) + else: + lexer = self.lexer + lexer_thread = LexerThread.from_text(lexer, text) + stream = lexer_thread.lex(None) + if self.options.postlex: + return self.options.postlex.process(stream) + return stream + + def get_terminal(self, name: str) -> TerminalDef: + #-- + return self._terminals_dict[name] + + def parse_interactive(self, text: Optional[LarkInput]=None, start: Optional[str]=None) -> 'InteractiveParser': + #-- + return self.parser.parse_interactive(text, start=start) + + def parse(self, text: LarkInput, start: Optional[str]=None, on_error: 'Optional[Callable[[UnexpectedInput], bool]]'=None) -> 'ParseTree': + #-- + if on_error is not None and self.options.parser != 'lalr': + raise NotImplementedError("The on_error option is only implemented for the LALR(1) parser.") + return self.parser.parse(text, start=start, on_error=on_error) + + + + +class DedentError(LarkError): + pass + +class Indenter(PostLex, ABC): + #-- + paren_level: int + indent_level: List[int] + + def __init__(self) -> None: + self.paren_level = 0 + self.indent_level = [0] + assert self.tab_len > 0 + + def handle_NL(self, token: Token) -> Iterator[Token]: + if self.paren_level > 0: + return + + yield token + + indent_str = token.rsplit('\n', 1)[1] ## + + indent = indent_str.count(' ') + indent_str.count('\t') * self.tab_len + + if indent > self.indent_level[-1]: + self.indent_level.append(indent) + yield Token.new_borrow_pos(self.INDENT_type, indent_str, token) + else: + while indent < self.indent_level[-1]: + self.indent_level.pop() + yield Token.new_borrow_pos(self.DEDENT_type, indent_str, token) + + if indent != self.indent_level[-1]: + raise DedentError('Unexpected dedent to column %s. Expected dedent to %s' % (indent, self.indent_level[-1])) + + def _process(self, stream): + token = None + for token in stream: + if token.type == self.NL_type: + yield from self.handle_NL(token) + else: + yield token + + if token.type in self.OPEN_PAREN_types: + self.paren_level += 1 + elif token.type in self.CLOSE_PAREN_types: + self.paren_level -= 1 + assert self.paren_level >= 0 + + while len(self.indent_level) > 1: + self.indent_level.pop() + yield Token.new_borrow_pos(self.DEDENT_type, '', token) if token else Token(self.DEDENT_type, '', 0, 0, 0, 0, 0, 0) + + assert self.indent_level == [0], self.indent_level + + def process(self, stream): + self.paren_level = 0 + self.indent_level = [0] + return self._process(stream) + + ## + + @property + def always_accept(self): + return (self.NL_type,) + + @property + @abstractmethod + def NL_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def OPEN_PAREN_types(self) -> List[str]: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def CLOSE_PAREN_types(self) -> List[str]: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def INDENT_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def DEDENT_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def tab_len(self) -> int: + #-- + raise NotImplementedError() + + +class PythonIndenter(Indenter): + #-- + + NL_type = '_NEWLINE' + OPEN_PAREN_types = ['LPAR', 'LSQB', 'LBRACE'] + CLOSE_PAREN_types = ['RPAR', 'RSQB', 'RBRACE'] + INDENT_type = '_INDENT' + DEDENT_type = '_DEDENT' + tab_len = 8 + + +import pickle, zlib, base64 +DATA = ( +{'parser': {'lexer_conf': {'terminals': [], 'ignore': [], 'g_regex_flags': 0, 'use_bytes': False, 'lexer_type': 'contextual', '__type__': 'LexerConf'}, 'parser_conf': {'rules': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}, {'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}, {'@': 107}, {'@': 108}, {'@': 109}, {'@': 110}, {'@': 111}, {'@': 112}, {'@': 113}, {'@': 114}, {'@': 115}, {'@': 116}, {'@': 117}, {'@': 118}, {'@': 119}, {'@': 120}, {'@': 121}, {'@': 122}, {'@': 123}, {'@': 124}, {'@': 125}, {'@': 126}, {'@': 127}, {'@': 128}, {'@': 129}, {'@': 130}, {'@': 131}, {'@': 132}, {'@': 133}, {'@': 134}, {'@': 135}, {'@': 136}, {'@': 137}, {'@': 138}, {'@': 139}, {'@': 140}, {'@': 141}, {'@': 142}, {'@': 143}, {'@': 144}, {'@': 145}, {'@': 146}, {'@': 147}, {'@': 148}, {'@': 149}, {'@': 150}, {'@': 151}, {'@': 152}, {'@': 153}, {'@': 154}, {'@': 155}, {'@': 156}, {'@': 157}, {'@': 158}, {'@': 159}, {'@': 160}, {'@': 161}, {'@': 162}, {'@': 163}, {'@': 164}, {'@': 165}, {'@': 166}, {'@': 167}, {'@': 168}, {'@': 169}, {'@': 170}, {'@': 171}, {'@': 172}, {'@': 173}, {'@': 174}, {'@': 175}, {'@': 176}, {'@': 177}, {'@': 178}, {'@': 179}, {'@': 180}, {'@': 181}, {'@': 182}, {'@': 183}, {'@': 184}, {'@': 185}, {'@': 186}, {'@': 187}, {'@': 188}, {'@': 189}, {'@': 190}, {'@': 191}, {'@': 192}, {'@': 193}, {'@': 194}, {'@': 195}, {'@': 196}, {'@': 197}, {'@': 198}, {'@': 199}, {'@': 200}, {'@': 201}, {'@': 202}, {'@': 203}, {'@': 204}, {'@': 205}, {'@': 206}, {'@': 207}, {'@': 208}, {'@': 209}, {'@': 210}, {'@': 211}, {'@': 212}, {'@': 213}, {'@': 214}, {'@': 215}, {'@': 216}, {'@': 217}, {'@': 218}, {'@': 219}, {'@': 220}, {'@': 221}, {'@': 222}, {'@': 223}, {'@': 224}, {'@': 225}, {'@': 226}, {'@': 227}, {'@': 228}, {'@': 229}, {'@': 230}, {'@': 231}, {'@': 232}, {'@': 233}, {'@': 234}, {'@': 235}, {'@': 236}, {'@': 237}, {'@': 238}, {'@': 239}, {'@': 240}, {'@': 241}, {'@': 242}, {'@': 243}, {'@': 244}, {'@': 245}, {'@': 246}, {'@': 247}, {'@': 248}, {'@': 249}, {'@': 250}, {'@': 251}, {'@': 252}, {'@': 253}, {'@': 254}, {'@': 255}, {'@': 256}, {'@': 257}, {'@': 258}, {'@': 259}, {'@': 260}, {'@': 261}, {'@': 262}, {'@': 263}, {'@': 264}, {'@': 265}, {'@': 266}, {'@': 267}, {'@': 268}, {'@': 269}, {'@': 270}, {'@': 271}, {'@': 272}, {'@': 273}, {'@': 274}, {'@': 275}, {'@': 276}, {'@': 277}, {'@': 278}, {'@': 279}, {'@': 280}, {'@': 281}, {'@': 282}, {'@': 283}, {'@': 284}, {'@': 285}, {'@': 286}, {'@': 287}, {'@': 288}, {'@': 289}, {'@': 290}, {'@': 291}, {'@': 292}, {'@': 293}, {'@': 294}, {'@': 295}, {'@': 296}, {'@': 297}, {'@': 298}, {'@': 299}, {'@': 300}, {'@': 301}, {'@': 302}, {'@': 303}, {'@': 304}, {'@': 305}, {'@': 306}, {'@': 307}, {'@': 308}, {'@': 309}, {'@': 310}, {'@': 311}, {'@': 312}, {'@': 313}, {'@': 314}, {'@': 315}, {'@': 316}, {'@': 317}, {'@': 318}, {'@': 319}, {'@': 320}, {'@': 321}, {'@': 322}, {'@': 323}, {'@': 324}, {'@': 325}, {'@': 326}, {'@': 327}, {'@': 328}, {'@': 329}, {'@': 330}, {'@': 331}, {'@': 332}, {'@': 333}, {'@': 334}, {'@': 335}, {'@': 336}, {'@': 337}, {'@': 338}, {'@': 339}, {'@': 340}, {'@': 341}, {'@': 342}, {'@': 343}, {'@': 344}, {'@': 345}, {'@': 346}, {'@': 347}, {'@': 348}, {'@': 349}, {'@': 350}, {'@': 351}, {'@': 352}, {'@': 353}, {'@': 354}, {'@': 355}, {'@': 356}, {'@': 357}, {'@': 358}, {'@': 359}, {'@': 360}, {'@': 361}, {'@': 362}, {'@': 363}, {'@': 364}, {'@': 365}, {'@': 366}, {'@': 367}, {'@': 368}, {'@': 369}, {'@': 370}, {'@': 371}, {'@': 372}, {'@': 373}, {'@': 374}, {'@': 375}, {'@': 376}, {'@': 377}, {'@': 378}, {'@': 379}, {'@': 380}, {'@': 381}, {'@': 382}, {'@': 383}, {'@': 384}, {'@': 385}, {'@': 386}, {'@': 387}, {'@': 388}, {'@': 389}, {'@': 390}, {'@': 391}, {'@': 392}, {'@': 393}, {'@': 394}, {'@': 395}, {'@': 396}, {'@': 397}, {'@': 398}, {'@': 399}, {'@': 400}, {'@': 401}, {'@': 402}, {'@': 403}, {'@': 404}, {'@': 405}, {'@': 406}, {'@': 407}, {'@': 408}, {'@': 409}, {'@': 410}, {'@': 411}, {'@': 412}, {'@': 413}, {'@': 414}, {'@': 415}, {'@': 416}, {'@': 417}], 'start': ['start'], 'parser_type': 'lalr', '__type__': 'ParserConf'}, 'parser': {'tokens': {0: 'param_def', 1: 'ARRAY_ID', 2: 'singleid', 3: 'ID', 4: 'EQ', 5: 'COMMA', 6: 'RBRACE', 7: 'AS', 8: 'typedef', 9: 'LP', 10: 'RP', 11: 'CO', 12: 'ELSE', 13: 'NEWLINE', 14: 'SIZEOF', 15: 'EXP', 16: 'PEEK', 17: 'INKEY', 18: 'IN', 19: 'LBOUND', 20: 'SQR', 21: 'STR', 22: 'LEN', 23: 'LN', 24: 'ATN', 25: 'USR', 26: 'ABS', 27: 'UBOUND', 28: 'VAL', 29: 'RND', 30: 'CHR', 31: 'ADDRESSOF', 32: 'CODE', 33: 'NUMBER', 34: 'TAN', 35: 'INT', 36: 'PI', 37: 'COS', 38: 'SIN', 39: 'SGN', 40: 'ASN', 41: 'STRC', 42: 'ACS', 43: 'SC', 44: 'END_WHILE', 45: 'WEND', 46: 'BNOT', 47: 'MINUS', 48: 'NOT', 49: 'CAST', 50: 'string', 51: 'math_fn', 52: 'func_call', 53: 'bexpr', 54: 'TO', 55: 'BXOR', 56: 'AND', 57: 'XOR', 58: 'LE', 59: 'NE', 60: 'SHL', 61: 'DIV', 62: 'LT', 63: 'OR', 64: 'GT', 65: 'BAND', 66: 'PLUS', 67: 'BOR', 68: 'SHR', 69: 'GE', 70: 'MUL', 71: 'MOD', 72: 'RESTORE', 73: 'THEN', 74: '_PRAGMA', 75: '_REQUIRE', 76: 'VERIFY', 77: 'DECLARE', 78: 'FUNCTION', 79: 'GOSUB', 80: 'END', 81: 'DATA', 82: 'OVER', 83: 'PRINT', 84: 'ON', 85: 'CONST', 86: 'POKE', 87: 'ITALIC', 88: 'GO', 89: 'CLS', 90: 'STEP', 91: 'CONTINUE', 92: 'DIM', 93: 'DRAW', 94: 'RETURN', 95: 'INVERSE', 96: 'GOTO', 97: 'CIRCLE', 98: 'EXIT', 99: 'BOLD', 100: 'FLASH', 101: 'INK', 102: 'PAUSE', 103: 'DO', 104: 'SAVE', 105: 'BEEP', 106: 'BORDER', 107: 'IF', 108: 'BRIGHT', 109: 'LET', 110: 'PAPER', 111: 'STOP', 112: 'LOAD', 113: '_INIT', 114: 'RANDOMIZE', 115: 'ASM', 116: 'FOR', 117: 'ERROR', 118: 'PLOT', 119: 'READ', 120: 'LABEL', 121: 'WHILE', 122: 'LOOP', 123: 'OUT', 124: 'SUB', 125: 'POW', 126: 'expr_bxor', 127: 'expr_xor', 128: 'expr_and', 129: 'expr_mul', 130: 'expr_mod', 131: 'expr', 132: 'expr_cmp', 133: 'expr_add', 134: 'expr_or', 135: 'expr_unary', 136: 'expr_pow', 137: 'expr_cast', 138: 'expr_bor', 139: 'expr_not', 140: 'param_decl_list', 141: 'param_definition', 142: 'BYVAL', 143: 'BYREF', 144: 'bound', 145: 'load_or_verify', 146: 'var_decl', 147: 'do_start', 148: 'if_then_part', 149: 'if_inline', 150: 'statement', 151: 'do_while_start', 152: 'lexpr', 153: 'while_start', 154: 'var_arr_decl_addr', 155: 'function_def', 156: 'function_header_pre', 157: 'do_until_start', 158: 'goto', 159: 'var_arr_decl', 160: 'function_header', 161: 'for_start', 162: 'function_declaration', 163: 'END_SUB', 164: 'END_IF', 165: 'ENDIF', 166: 'ELSEIF', 167: 'END_FUNCTION', 168: 'NEXT', 169: 'RIGHTARROW', 170: 'AT', 171: 'arg_list', 172: 'substr', 173: 'UNTIL', 174: 'label_loop', 175: 'label', 176: 'INTEGER', 177: 'numbertype', 178: 'FLOAT', 179: 'UINTEGER', 180: 'BYTE', 181: 'ULONG', 182: 'LONG', 183: 'UBYTE', 184: 'FIXED', 185: 'endif', 186: 'then', 187: 'else_part_inline', 188: 'elseif_expr', 189: 'elseiflist', 190: 'else_part', 191: 'statements_co', 192: 'co_statements_co', 193: 'co_statements', 194: 'statements', 195: '$END', 196: 'arguments', 197: 'argument', 198: 'default_arg_value', 199: 'preproc_line', 200: 'program_line', 201: 'label_line', 202: 'label_line_co', 203: 'step', 204: 'bound_list', 205: 'LBRACE', 206: 'const_vector', 207: 'start', 208: 'program', 209: 'STRING', 210: 'type', 211: 'const_vector_list', 212: 'const_number_list', 213: 'program_co', 214: 'FASTCALL', 215: 'STDCALL', 216: 'convention', 217: 'WEQ', 218: 'attr_list', 219: 'attr', 220: 'label_end_while', 221: 'label_list', 222: 'print_elem', 223: 'print_at', 224: 'TAB', 225: 'print_tab', 226: '_PUSH', 227: '_POP', 228: 'idlist', 229: 'label_next', 230: 'param_decl', 231: 'print_list', 232: 'function_body'}, 'states': {0: {0: (0, 236), 1: (0, 185), 2: (0, 4), 3: (0, 264)}, 1: {4: (0, 187)}, 2: {5: (1, {'@': 174}), 6: (1, {'@': 174})}, 3: {2: (0, 576), 1: (0, 132), 3: (0, 749)}, 4: {7: (0, 377), 8: (0, 207), 9: (0, 321), 5: (1, {'@': 352}), 10: (1, {'@': 352}), 4: (1, {'@': 352})}, 5: {11: (1, {'@': 217}), 12: (1, {'@': 217}), 13: (1, {'@': 217})}, 6: {14: (1, {'@': 373}), 15: (1, {'@': 373}), 16: (1, {'@': 373}), 17: (1, {'@': 373}), 18: (1, {'@': 373}), 19: (1, {'@': 373}), 20: (1, {'@': 373}), 21: (1, {'@': 373}), 22: (1, {'@': 373}), 23: (1, {'@': 373}), 24: (1, {'@': 373}), 25: (1, {'@': 373}), 1: (1, {'@': 373}), 26: (1, {'@': 373}), 27: (1, {'@': 373}), 28: (1, {'@': 373}), 29: (1, {'@': 373}), 30: (1, {'@': 373}), 3: (1, {'@': 373}), 31: (1, {'@': 373}), 9: (1, {'@': 373}), 32: (1, {'@': 373}), 33: (1, {'@': 373}), 34: (1, {'@': 373}), 35: (1, {'@': 373}), 36: (1, {'@': 373}), 37: (1, {'@': 373}), 38: (1, {'@': 373}), 39: (1, {'@': 373}), 40: (1, {'@': 373}), 41: (1, {'@': 373}), 42: (1, {'@': 373})}, 7: {5: (1, {'@': 233}), 11: (1, {'@': 233}), 12: (1, {'@': 233}), 43: (1, {'@': 233}), 13: (1, {'@': 233})}, 8: {44: (0, 245), 45: (0, 102)}, 9: {14: (1, {'@': 262}), 15: (1, {'@': 262}), 16: (1, {'@': 262}), 17: (1, {'@': 262}), 18: (1, {'@': 262}), 19: (1, {'@': 262}), 20: (1, {'@': 262}), 21: (1, {'@': 262}), 22: (1, {'@': 262}), 23: (1, {'@': 262}), 24: (1, {'@': 262}), 25: (1, {'@': 262}), 1: (1, {'@': 262}), 26: (1, {'@': 262}), 27: (1, {'@': 262}), 28: (1, {'@': 262}), 46: (1, {'@': 262}), 29: (1, {'@': 262}), 30: (1, {'@': 262}), 3: (1, {'@': 262}), 31: (1, {'@': 262}), 9: (1, {'@': 262}), 32: (1, {'@': 262}), 34: (1, {'@': 262}), 33: (1, {'@': 262}), 5: (1, {'@': 262}), 35: (1, {'@': 262}), 36: (1, {'@': 262}), 37: (1, {'@': 262}), 47: (1, {'@': 262}), 38: (1, {'@': 262}), 48: (1, {'@': 262}), 39: (1, {'@': 262}), 49: (1, {'@': 262}), 40: (1, {'@': 262}), 41: (1, {'@': 262}), 42: (1, {'@': 262})}, 10: {11: (1, {'@': 88}), 13: (1, {'@': 88}), 12: (1, {'@': 88})}, 11: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 53: (0, 709), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 12: {11: (1, {'@': 231}), 12: (1, {'@': 231}), 13: (1, {'@': 231})}, 13: {10: (0, 181), 54: (0, 88)}, 14: {55: (1, {'@': 409}), 56: (1, {'@': 409}), 57: (1, {'@': 409}), 58: (1, {'@': 409}), 59: (1, {'@': 409}), 60: (1, {'@': 409}), 61: (1, {'@': 409}), 47: (1, {'@': 409}), 62: (1, {'@': 409}), 63: (1, {'@': 409}), 64: (1, {'@': 409}), 65: (1, {'@': 409}), 66: (1, {'@': 409}), 67: (1, {'@': 409}), 68: (1, {'@': 409}), 54: (1, {'@': 409}), 69: (1, {'@': 409}), 70: (1, {'@': 409}), 4: (1, {'@': 409}), 71: (1, {'@': 409}), 12: (1, {'@': 409}), 13: (1, {'@': 409}), 11: (1, {'@': 409}), 72: (1, {'@': 409}), 73: (1, {'@': 409}), 74: (1, {'@': 409}), 75: (1, {'@': 409}), 76: (1, {'@': 409}), 77: (1, {'@': 409}), 78: (1, {'@': 409}), 79: (1, {'@': 409}), 80: (1, {'@': 409}), 81: (1, {'@': 409}), 10: (1, {'@': 409}), 82: (1, {'@': 409}), 83: (1, {'@': 409}), 84: (1, {'@': 409}), 85: (1, {'@': 409}), 86: (1, {'@': 409}), 87: (1, {'@': 409}), 88: (1, {'@': 409}), 89: (1, {'@': 409}), 90: (1, {'@': 409}), 91: (1, {'@': 409}), 92: (1, {'@': 409}), 93: (1, {'@': 409}), 94: (1, {'@': 409}), 95: (1, {'@': 409}), 96: (1, {'@': 409}), 97: (1, {'@': 409}), 98: (1, {'@': 409}), 99: (1, {'@': 409}), 100: (1, {'@': 409}), 101: (1, {'@': 409}), 102: (1, {'@': 409}), 43: (1, {'@': 409}), 103: (1, {'@': 409}), 104: (1, {'@': 409}), 105: (1, {'@': 409}), 106: (1, {'@': 409}), 107: (1, {'@': 409}), 108: (1, {'@': 409}), 109: (1, {'@': 409}), 1: (1, {'@': 409}), 110: (1, {'@': 409}), 111: (1, {'@': 409}), 112: (1, {'@': 409}), 113: (1, {'@': 409}), 114: (1, {'@': 409}), 3: (1, {'@': 409}), 32: (1, {'@': 409}), 115: (1, {'@': 409}), 5: (1, {'@': 409}), 116: (1, {'@': 409}), 117: (1, {'@': 409}), 118: (1, {'@': 409}), 119: (1, {'@': 409}), 120: (1, {'@': 409}), 121: (1, {'@': 409}), 6: (1, {'@': 409}), 122: (1, {'@': 409}), 123: (1, {'@': 409}), 124: (1, {'@': 409})}, 15: {72: (1, {'@': 269}), 56: (1, {'@': 269}), 78: (1, {'@': 269}), 80: (1, {'@': 269}), 81: (1, {'@': 269}), 68: (1, {'@': 269}), 84: (1, {'@': 269}), 69: (1, {'@': 269}), 86: (1, {'@': 269}), 71: (1, {'@': 269}), 87: (1, {'@': 269}), 89: (1, {'@': 269}), 12: (1, {'@': 269}), 93: (1, {'@': 269}), 60: (1, {'@': 269}), 63: (1, {'@': 269}), 62: (1, {'@': 269}), 97: (1, {'@': 269}), 99: (1, {'@': 269}), 100: (1, {'@': 269}), 102: (1, {'@': 269}), 43: (1, {'@': 269}), 103: (1, {'@': 269}), 105: (1, {'@': 269}), 107: (1, {'@': 269}), 108: (1, {'@': 269}), 112: (1, {'@': 269}), 70: (1, {'@': 269}), 64: (1, {'@': 269}), 67: (1, {'@': 269}), 3: (1, {'@': 269}), 9: (1, {'@': 269}), 115: (1, {'@': 269}), 116: (1, {'@': 269}), 5: (1, {'@': 269}), 125: (1, {'@': 269}), 59: (1, {'@': 269}), 120: (1, {'@': 269}), 65: (1, {'@': 269}), 6: (1, {'@': 269}), 54: (1, {'@': 269}), 123: (1, {'@': 269}), 73: (1, {'@': 269}), 74: (1, {'@': 269}), 75: (1, {'@': 269}), 76: (1, {'@': 269}), 77: (1, {'@': 269}), 79: (1, {'@': 269}), 61: (1, {'@': 269}), 82: (1, {'@': 269}), 10: (1, {'@': 269}), 66: (1, {'@': 269}), 83: (1, {'@': 269}), 85: (1, {'@': 269}), 11: (1, {'@': 269}), 88: (1, {'@': 269}), 90: (1, {'@': 269}), 91: (1, {'@': 269}), 92: (1, {'@': 269}), 94: (1, {'@': 269}), 47: (1, {'@': 269}), 95: (1, {'@': 269}), 96: (1, {'@': 269}), 4: (1, {'@': 269}), 55: (1, {'@': 269}), 98: (1, {'@': 269}), 101: (1, {'@': 269}), 13: (1, {'@': 269}), 104: (1, {'@': 269}), 106: (1, {'@': 269}), 58: (1, {'@': 269}), 109: (1, {'@': 269}), 1: (1, {'@': 269}), 110: (1, {'@': 269}), 111: (1, {'@': 269}), 113: (1, {'@': 269}), 114: (1, {'@': 269}), 32: (1, {'@': 269}), 57: (1, {'@': 269}), 117: (1, {'@': 269}), 118: (1, {'@': 269}), 119: (1, {'@': 269}), 121: (1, {'@': 269}), 122: (1, {'@': 269}), 124: (1, {'@': 269})}, 16: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 131: (0, 327), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 17: {11: (1, {'@': 41}), 13: (1, {'@': 41}), 12: (1, {'@': 41})}, 18: {11: (1, {'@': 45}), 13: (1, {'@': 45}), 12: (1, {'@': 45})}, 19: {1: (0, 185), 2: (0, 4), 10: (0, 387), 140: (0, 435), 141: (0, 425), 142: (0, 0), 0: (0, 355), 3: (0, 264), 143: (0, 374)}, 20: {72: (1, {'@': 284}), 56: (1, {'@': 284}), 78: (1, {'@': 284}), 80: (1, {'@': 284}), 81: (1, {'@': 284}), 68: (1, {'@': 284}), 84: (1, {'@': 284}), 69: (1, {'@': 284}), 86: (1, {'@': 284}), 71: (1, {'@': 284}), 87: (1, {'@': 284}), 89: (1, {'@': 284}), 12: (1, {'@': 284}), 93: (1, {'@': 284}), 60: (1, {'@': 284}), 63: (1, {'@': 284}), 62: (1, {'@': 284}), 97: (1, {'@': 284}), 99: (1, {'@': 284}), 100: (1, {'@': 284}), 102: (1, {'@': 284}), 43: (1, {'@': 284}), 103: (1, {'@': 284}), 105: (1, {'@': 284}), 107: (1, {'@': 284}), 108: (1, {'@': 284}), 112: (1, {'@': 284}), 70: (1, {'@': 284}), 64: (1, {'@': 284}), 67: (1, {'@': 284}), 3: (1, {'@': 284}), 9: (1, {'@': 284}), 115: (1, {'@': 284}), 116: (1, {'@': 284}), 5: (1, {'@': 284}), 125: (1, {'@': 284}), 59: (1, {'@': 284}), 120: (1, {'@': 284}), 65: (1, {'@': 284}), 6: (1, {'@': 284}), 54: (1, {'@': 284}), 123: (1, {'@': 284}), 73: (1, {'@': 284}), 74: (1, {'@': 284}), 75: (1, {'@': 284}), 76: (1, {'@': 284}), 77: (1, {'@': 284}), 79: (1, {'@': 284}), 61: (1, {'@': 284}), 82: (1, {'@': 284}), 10: (1, {'@': 284}), 66: (1, {'@': 284}), 83: (1, {'@': 284}), 85: (1, {'@': 284}), 11: (1, {'@': 284}), 88: (1, {'@': 284}), 90: (1, {'@': 284}), 91: (1, {'@': 284}), 92: (1, {'@': 284}), 94: (1, {'@': 284}), 47: (1, {'@': 284}), 95: (1, {'@': 284}), 96: (1, {'@': 284}), 4: (1, {'@': 284}), 55: (1, {'@': 284}), 98: (1, {'@': 284}), 101: (1, {'@': 284}), 13: (1, {'@': 284}), 104: (1, {'@': 284}), 106: (1, {'@': 284}), 58: (1, {'@': 284}), 109: (1, {'@': 284}), 1: (1, {'@': 284}), 110: (1, {'@': 284}), 111: (1, {'@': 284}), 113: (1, {'@': 284}), 114: (1, {'@': 284}), 32: (1, {'@': 284}), 57: (1, {'@': 284}), 117: (1, {'@': 284}), 118: (1, {'@': 284}), 119: (1, {'@': 284}), 121: (1, {'@': 284}), 122: (1, {'@': 284}), 124: (1, {'@': 284})}, 21: {11: (1, {'@': 43}), 13: (1, {'@': 43}), 12: (1, {'@': 43})}, 22: {11: (1, {'@': 57}), 13: (1, {'@': 57}), 12: (1, {'@': 57})}, 23: {7: (0, 377), 8: (0, 224), 5: (1, {'@': 352}), 10: (1, {'@': 352})}, 24: {14: (1, {'@': 178}), 15: (1, {'@': 178}), 16: (1, {'@': 178}), 17: (1, {'@': 178}), 18: (1, {'@': 178}), 19: (1, {'@': 178}), 20: (1, {'@': 178}), 21: (1, {'@': 178}), 22: (1, {'@': 178}), 23: (1, {'@': 178}), 24: (1, {'@': 178}), 25: (1, {'@': 178}), 1: (1, {'@': 178}), 26: (1, {'@': 178}), 27: (1, {'@': 178}), 28: (1, {'@': 178}), 46: (1, {'@': 178}), 29: (1, {'@': 178}), 30: (1, {'@': 178}), 3: (1, {'@': 178}), 31: (1, {'@': 178}), 9: (1, {'@': 178}), 32: (1, {'@': 178}), 34: (1, {'@': 178}), 33: (1, {'@': 178}), 35: (1, {'@': 178}), 36: (1, {'@': 178}), 37: (1, {'@': 178}), 47: (1, {'@': 178}), 38: (1, {'@': 178}), 48: (1, {'@': 178}), 39: (1, {'@': 178}), 49: (1, {'@': 178}), 40: (1, {'@': 178}), 41: (1, {'@': 178}), 42: (1, {'@': 178})}, 25: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 53: (0, 738), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 26: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 131: (0, 263), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 27: {72: (1, {'@': 300}), 56: (1, {'@': 300}), 78: (1, {'@': 300}), 80: (1, {'@': 300}), 81: (1, {'@': 300}), 68: (1, {'@': 300}), 84: (1, {'@': 300}), 69: (1, {'@': 300}), 86: (1, {'@': 300}), 71: (1, {'@': 300}), 87: (1, {'@': 300}), 89: (1, {'@': 300}), 12: (1, {'@': 300}), 93: (1, {'@': 300}), 60: (1, {'@': 300}), 63: (1, {'@': 300}), 62: (1, {'@': 300}), 97: (1, {'@': 300}), 99: (1, {'@': 300}), 100: (1, {'@': 300}), 102: (1, {'@': 300}), 43: (1, {'@': 300}), 103: (1, {'@': 300}), 105: (1, {'@': 300}), 107: (1, {'@': 300}), 108: (1, {'@': 300}), 112: (1, {'@': 300}), 70: (1, {'@': 300}), 64: (1, {'@': 300}), 67: (1, {'@': 300}), 3: (1, {'@': 300}), 9: (1, {'@': 300}), 115: (1, {'@': 300}), 116: (1, {'@': 300}), 5: (1, {'@': 300}), 125: (1, {'@': 300}), 59: (1, {'@': 300}), 120: (1, {'@': 300}), 65: (1, {'@': 300}), 6: (1, {'@': 300}), 54: (1, {'@': 300}), 123: (1, {'@': 300}), 73: (1, {'@': 300}), 74: (1, {'@': 300}), 75: (1, {'@': 300}), 76: (1, {'@': 300}), 77: (1, {'@': 300}), 79: (1, {'@': 300}), 61: (1, {'@': 300}), 82: (1, {'@': 300}), 10: (1, {'@': 300}), 66: (1, {'@': 300}), 83: (1, {'@': 300}), 85: (1, {'@': 300}), 11: (1, {'@': 300}), 88: (1, {'@': 300}), 90: (1, {'@': 300}), 91: (1, {'@': 300}), 92: (1, {'@': 300}), 94: (1, {'@': 300}), 47: (1, {'@': 300}), 95: (1, {'@': 300}), 96: (1, {'@': 300}), 4: (1, {'@': 300}), 55: (1, {'@': 300}), 98: (1, {'@': 300}), 101: (1, {'@': 300}), 13: (1, {'@': 300}), 104: (1, {'@': 300}), 106: (1, {'@': 300}), 58: (1, {'@': 300}), 109: (1, {'@': 300}), 1: (1, {'@': 300}), 110: (1, {'@': 300}), 111: (1, {'@': 300}), 113: (1, {'@': 300}), 114: (1, {'@': 300}), 32: (1, {'@': 300}), 57: (1, {'@': 300}), 117: (1, {'@': 300}), 118: (1, {'@': 300}), 119: (1, {'@': 300}), 121: (1, {'@': 300}), 122: (1, {'@': 300}), 124: (1, {'@': 300})}, 28: {13: (1, {'@': 370})}, 29: {9: (0, 270), 11: (1, {'@': 127}), 13: (1, {'@': 127}), 12: (1, {'@': 127})}, 30: {10: (0, 171)}, 31: {14: (1, {'@': 266}), 15: (1, {'@': 266}), 16: (1, {'@': 266}), 17: (1, {'@': 266}), 18: (1, {'@': 266}), 19: (1, {'@': 266}), 20: (1, {'@': 266}), 21: (1, {'@': 266}), 22: (1, {'@': 266}), 23: (1, {'@': 266}), 24: (1, {'@': 266}), 25: (1, {'@': 266}), 1: (1, {'@': 266}), 26: (1, {'@': 266}), 27: (1, {'@': 266}), 28: (1, {'@': 266}), 46: (1, {'@': 266}), 29: (1, {'@': 266}), 30: (1, {'@': 266}), 3: (1, {'@': 266}), 31: (1, {'@': 266}), 9: (1, {'@': 266}), 32: (1, {'@': 266}), 34: (1, {'@': 266}), 33: (1, {'@': 266}), 5: (1, {'@': 266}), 35: (1, {'@': 266}), 36: (1, {'@': 266}), 37: (1, {'@': 266}), 47: (1, {'@': 266}), 38: (1, {'@': 266}), 48: (1, {'@': 266}), 39: (1, {'@': 266}), 49: (1, {'@': 266}), 40: (1, {'@': 266}), 41: (1, {'@': 266}), 42: (1, {'@': 266})}, 32: {11: (1, {'@': 230}), 12: (1, {'@': 230}), 13: (1, {'@': 230})}, 33: {72: (1, {'@': 311}), 56: (1, {'@': 311}), 78: (1, {'@': 311}), 80: (1, {'@': 311}), 81: (1, {'@': 311}), 68: (1, {'@': 311}), 84: (1, {'@': 311}), 69: (1, {'@': 311}), 86: (1, {'@': 311}), 71: (1, {'@': 311}), 87: (1, {'@': 311}), 89: (1, {'@': 311}), 12: (1, {'@': 311}), 93: (1, {'@': 311}), 60: (1, {'@': 311}), 63: (1, {'@': 311}), 62: (1, {'@': 311}), 97: (1, {'@': 311}), 99: (1, {'@': 311}), 100: (1, {'@': 311}), 102: (1, {'@': 311}), 43: (1, {'@': 311}), 103: (1, {'@': 311}), 105: (1, {'@': 311}), 107: (1, {'@': 311}), 108: (1, {'@': 311}), 112: (1, {'@': 311}), 70: (1, {'@': 311}), 67: (1, {'@': 311}), 64: (1, {'@': 311}), 3: (1, {'@': 311}), 9: (1, {'@': 311}), 115: (1, {'@': 311}), 5: (1, {'@': 311}), 116: (1, {'@': 311}), 125: (1, {'@': 311}), 59: (1, {'@': 311}), 120: (1, {'@': 311}), 65: (1, {'@': 311}), 6: (1, {'@': 311}), 54: (1, {'@': 311}), 123: (1, {'@': 311}), 73: (1, {'@': 311}), 74: (1, {'@': 311}), 75: (1, {'@': 311}), 76: (1, {'@': 311}), 77: (1, {'@': 311}), 79: (1, {'@': 311}), 61: (1, {'@': 311}), 10: (1, {'@': 311}), 82: (1, {'@': 311}), 66: (1, {'@': 311}), 83: (1, {'@': 311}), 85: (1, {'@': 311}), 11: (1, {'@': 311}), 88: (1, {'@': 311}), 90: (1, {'@': 311}), 91: (1, {'@': 311}), 92: (1, {'@': 311}), 94: (1, {'@': 311}), 47: (1, {'@': 311}), 95: (1, {'@': 311}), 96: (1, {'@': 311}), 4: (1, {'@': 311}), 55: (1, {'@': 311}), 98: (1, {'@': 311}), 101: (1, {'@': 311}), 13: (1, {'@': 311}), 104: (1, {'@': 311}), 106: (1, {'@': 311}), 58: (1, {'@': 311}), 109: (1, {'@': 311}), 1: (1, {'@': 311}), 110: (1, {'@': 311}), 111: (1, {'@': 311}), 113: (1, {'@': 311}), 114: (1, {'@': 311}), 32: (1, {'@': 311}), 57: (1, {'@': 311}), 117: (1, {'@': 311}), 118: (1, {'@': 311}), 119: (1, {'@': 311}), 121: (1, {'@': 311}), 122: (1, {'@': 311}), 124: (1, {'@': 311})}, 34: {5: (0, 285)}, 35: {10: (0, 490)}, 36: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 139: (0, 158), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 37: {11: (1, {'@': 59}), 13: (1, {'@': 59}), 12: (1, {'@': 59})}, 38: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 131: (0, 281), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 39: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 131: (0, 280), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 40: {72: (1, {'@': 275}), 56: (1, {'@': 275}), 78: (1, {'@': 275}), 80: (1, {'@': 275}), 81: (1, {'@': 275}), 68: (1, {'@': 275}), 84: (1, {'@': 275}), 69: (1, {'@': 275}), 86: (1, {'@': 275}), 71: (1, {'@': 275}), 87: (1, {'@': 275}), 89: (1, {'@': 275}), 12: (1, {'@': 275}), 93: (1, {'@': 275}), 60: (1, {'@': 275}), 63: (1, {'@': 275}), 62: (1, {'@': 275}), 97: (1, {'@': 275}), 99: (1, {'@': 275}), 100: (1, {'@': 275}), 102: (1, {'@': 275}), 43: (1, {'@': 275}), 103: (1, {'@': 275}), 105: (1, {'@': 275}), 107: (1, {'@': 275}), 108: (1, {'@': 275}), 112: (1, {'@': 275}), 70: (1, {'@': 275}), 64: (1, {'@': 275}), 67: (1, {'@': 275}), 3: (1, {'@': 275}), 9: (1, {'@': 275}), 115: (1, {'@': 275}), 116: (1, {'@': 275}), 5: (1, {'@': 275}), 125: (1, {'@': 275}), 59: (1, {'@': 275}), 120: (1, {'@': 275}), 65: (1, {'@': 275}), 6: (1, {'@': 275}), 54: (1, {'@': 275}), 123: (1, {'@': 275}), 73: (1, {'@': 275}), 74: (1, {'@': 275}), 75: (1, {'@': 275}), 76: (1, {'@': 275}), 77: (1, {'@': 275}), 79: (1, {'@': 275}), 61: (1, {'@': 275}), 82: (1, {'@': 275}), 10: (1, {'@': 275}), 66: (1, {'@': 275}), 83: (1, {'@': 275}), 85: (1, {'@': 275}), 11: (1, {'@': 275}), 88: (1, {'@': 275}), 90: (1, {'@': 275}), 91: (1, {'@': 275}), 92: (1, {'@': 275}), 94: (1, {'@': 275}), 47: (1, {'@': 275}), 95: (1, {'@': 275}), 96: (1, {'@': 275}), 4: (1, {'@': 275}), 55: (1, {'@': 275}), 98: (1, {'@': 275}), 101: (1, {'@': 275}), 13: (1, {'@': 275}), 104: (1, {'@': 275}), 106: (1, {'@': 275}), 58: (1, {'@': 275}), 109: (1, {'@': 275}), 1: (1, {'@': 275}), 110: (1, {'@': 275}), 111: (1, {'@': 275}), 113: (1, {'@': 275}), 114: (1, {'@': 275}), 32: (1, {'@': 275}), 57: (1, {'@': 275}), 117: (1, {'@': 275}), 118: (1, {'@': 275}), 119: (1, {'@': 275}), 121: (1, {'@': 275}), 122: (1, {'@': 275}), 124: (1, {'@': 275})}, 41: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 10: (0, 165), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 131: (0, 84), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 42: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 53: (0, 768), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 43: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 131: (0, 378), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 44: {11: (1, {'@': 208}), 12: (1, {'@': 208}), 13: (1, {'@': 208})}, 45: {11: (1, {'@': 131}), 13: (1, {'@': 131}), 12: (1, {'@': 131})}, 46: {10: (0, 246)}, 47: {57: (0, 36), 56: (1, {'@': 383}), 54: (1, {'@': 383}), 63: (1, {'@': 383}), 11: (1, {'@': 383}), 12: (1, {'@': 383}), 13: (1, {'@': 383}), 72: (1, {'@': 383}), 74: (1, {'@': 383}), 98: (1, {'@': 383}), 75: (1, {'@': 383}), 99: (1, {'@': 383}), 100: (1, {'@': 383}), 76: (1, {'@': 383}), 101: (1, {'@': 383}), 102: (1, {'@': 383}), 103: (1, {'@': 383}), 77: (1, {'@': 383}), 78: (1, {'@': 383}), 104: (1, {'@': 383}), 105: (1, {'@': 383}), 106: (1, {'@': 383}), 107: (1, {'@': 383}), 79: (1, {'@': 383}), 108: (1, {'@': 383}), 80: (1, {'@': 383}), 81: (1, {'@': 383}), 82: (1, {'@': 383}), 109: (1, {'@': 383}), 83: (1, {'@': 383}), 1: (1, {'@': 383}), 110: (1, {'@': 383}), 111: (1, {'@': 383}), 84: (1, {'@': 383}), 112: (1, {'@': 383}), 85: (1, {'@': 383}), 86: (1, {'@': 383}), 113: (1, {'@': 383}), 114: (1, {'@': 383}), 87: (1, {'@': 383}), 3: (1, {'@': 383}), 88: (1, {'@': 383}), 89: (1, {'@': 383}), 115: (1, {'@': 383}), 90: (1, {'@': 383}), 116: (1, {'@': 383}), 117: (1, {'@': 383}), 118: (1, {'@': 383}), 91: (1, {'@': 383}), 119: (1, {'@': 383}), 92: (1, {'@': 383}), 93: (1, {'@': 383}), 94: (1, {'@': 383}), 120: (1, {'@': 383}), 95: (1, {'@': 383}), 96: (1, {'@': 383}), 121: (1, {'@': 383}), 123: (1, {'@': 383}), 97: (1, {'@': 383}), 124: (1, {'@': 383}), 5: (1, {'@': 383}), 10: (1, {'@': 383}), 43: (1, {'@': 383}), 73: (1, {'@': 383}), 6: (1, {'@': 383}), 32: (1, {'@': 383}), 122: (1, {'@': 383})}, 48: {5: (0, 153)}, 49: {5: (0, 353), 10: (0, 695), 54: (0, 229)}, 50: {14: (1, {'@': 371}), 15: (1, {'@': 371}), 16: (1, {'@': 371}), 17: (1, {'@': 371}), 18: (1, {'@': 371}), 19: (1, {'@': 371}), 20: (1, {'@': 371}), 21: (1, {'@': 371}), 22: (1, {'@': 371}), 23: (1, {'@': 371}), 24: (1, {'@': 371}), 25: (1, {'@': 371}), 1: (1, {'@': 371}), 26: (1, {'@': 371}), 27: (1, {'@': 371}), 28: (1, {'@': 371}), 29: (1, {'@': 371}), 30: (1, {'@': 371}), 3: (1, {'@': 371}), 31: (1, {'@': 371}), 9: (1, {'@': 371}), 32: (1, {'@': 371}), 33: (1, {'@': 371}), 34: (1, {'@': 371}), 35: (1, {'@': 371}), 36: (1, {'@': 371}), 37: (1, {'@': 371}), 38: (1, {'@': 371}), 39: (1, {'@': 371}), 40: (1, {'@': 371}), 41: (1, {'@': 371}), 42: (1, {'@': 371})}, 51: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 131: (0, 258), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 54: (0, 222), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 52: {11: (1, {'@': 103}), 13: (1, {'@': 103}), 12: (1, {'@': 103})}, 53: {33: (1, {'@': 180}), 3: (1, {'@': 180})}, 54: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 310), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 144: (0, 276), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 55: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 131: (0, 421), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 56: {3: (0, 765)}, 57: {11: (1, {'@': 165}), 13: (1, {'@': 165}), 12: (1, {'@': 165})}, 58: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 131: (0, 113), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 59: {4: (0, 737)}, 60: {4: (0, 427)}, 61: {11: (1, {'@': 154}), 13: (1, {'@': 154}), 12: (1, {'@': 154})}, 62: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 11: (0, 73), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 163: (1, {'@': 146}), 120: (1, {'@': 146}), 45: (1, {'@': 146}), 44: (1, {'@': 146}), 12: (1, {'@': 146}), 13: (1, {'@': 146}), 164: (1, {'@': 146}), 122: (1, {'@': 146}), 165: (1, {'@': 146}), 166: (1, {'@': 146}), 167: (1, {'@': 146}), 168: (1, {'@': 146})}, 63: {11: (1, {'@': 61}), 13: (1, {'@': 61}), 12: (1, {'@': 61})}, 64: {11: (1, {'@': 155}), 13: (1, {'@': 155}), 12: (1, {'@': 155})}, 65: {5: (0, 349)}, 66: {5: (1, {'@': 319}), 10: (1, {'@': 319}), 54: (1, {'@': 319}), 12: (1, {'@': 319}), 13: (1, {'@': 319}), 11: (1, {'@': 319})}, 67: {10: (1, {'@': 355}), 12: (1, {'@': 355}), 13: (1, {'@': 355}), 5: (1, {'@': 355}), 4: (1, {'@': 355}), 11: (1, {'@': 355}), 169: (1, {'@': 355}), 170: (1, {'@': 355})}, 68: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 171: (0, 398), 9: (0, 183), 172: (0, 533), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 53: (0, 643), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247), 72: (1, {'@': 271}), 56: (1, {'@': 271}), 78: (1, {'@': 271}), 80: (1, {'@': 271}), 81: (1, {'@': 271}), 68: (1, {'@': 271}), 84: (1, {'@': 271}), 69: (1, {'@': 271}), 86: (1, {'@': 271}), 71: (1, {'@': 271}), 87: (1, {'@': 271}), 89: (1, {'@': 271}), 12: (1, {'@': 271}), 93: (1, {'@': 271}), 60: (1, {'@': 271}), 63: (1, {'@': 271}), 62: (1, {'@': 271}), 97: (1, {'@': 271}), 99: (1, {'@': 271}), 100: (1, {'@': 271}), 102: (1, {'@': 271}), 43: (1, {'@': 271}), 103: (1, {'@': 271}), 105: (1, {'@': 271}), 107: (1, {'@': 271}), 108: (1, {'@': 271}), 112: (1, {'@': 271}), 70: (1, {'@': 271}), 64: (1, {'@': 271}), 67: (1, {'@': 271}), 115: (1, {'@': 271}), 116: (1, {'@': 271}), 5: (1, {'@': 271}), 125: (1, {'@': 271}), 59: (1, {'@': 271}), 120: (1, {'@': 271}), 65: (1, {'@': 271}), 6: (1, {'@': 271}), 54: (1, {'@': 271}), 123: (1, {'@': 271}), 73: (1, {'@': 271}), 74: (1, {'@': 271}), 75: (1, {'@': 271}), 76: (1, {'@': 271}), 77: (1, {'@': 271}), 79: (1, {'@': 271}), 61: (1, {'@': 271}), 82: (1, {'@': 271}), 10: (1, {'@': 271}), 66: (1, {'@': 271}), 83: (1, {'@': 271}), 85: (1, {'@': 271}), 11: (1, {'@': 271}), 88: (1, {'@': 271}), 90: (1, {'@': 271}), 91: (1, {'@': 271}), 92: (1, {'@': 271}), 94: (1, {'@': 271}), 47: (1, {'@': 271}), 95: (1, {'@': 271}), 96: (1, {'@': 271}), 4: (1, {'@': 271}), 55: (1, {'@': 271}), 98: (1, {'@': 271}), 101: (1, {'@': 271}), 13: (1, {'@': 271}), 104: (1, {'@': 271}), 106: (1, {'@': 271}), 58: (1, {'@': 271}), 109: (1, {'@': 271}), 110: (1, {'@': 271}), 111: (1, {'@': 271}), 113: (1, {'@': 271}), 114: (1, {'@': 271}), 57: (1, {'@': 271}), 117: (1, {'@': 271}), 118: (1, {'@': 271}), 119: (1, {'@': 271}), 121: (1, {'@': 271}), 122: (1, {'@': 271}), 124: (1, {'@': 271})}, 69: {10: (0, 383), 54: (0, 88)}, 70: {5: (0, 394), 10: (0, 133)}, 71: {11: (1, {'@': 46}), 13: (1, {'@': 46}), 12: (1, {'@': 46})}, 72: {5: (0, 170)}, 73: {72: (1, {'@': 15}), 168: (1, {'@': 15}), 98: (1, {'@': 15}), 99: (1, {'@': 15}), 100: (1, {'@': 15}), 101: (1, {'@': 15}), 102: (1, {'@': 15}), 76: (1, {'@': 15}), 13: (1, {'@': 15}), 103: (1, {'@': 15}), 105: (1, {'@': 15}), 104: (1, {'@': 15}), 78: (1, {'@': 15}), 77: (1, {'@': 15}), 106: (1, {'@': 15}), 107: (1, {'@': 15}), 79: (1, {'@': 15}), 108: (1, {'@': 15}), 80: (1, {'@': 15}), 81: (1, {'@': 15}), 82: (1, {'@': 15}), 109: (1, {'@': 15}), 83: (1, {'@': 15}), 1: (1, {'@': 15}), 110: (1, {'@': 15}), 111: (1, {'@': 15}), 84: (1, {'@': 15}), 112: (1, {'@': 15}), 85: (1, {'@': 15}), 11: (1, {'@': 15}), 86: (1, {'@': 15}), 114: (1, {'@': 15}), 87: (1, {'@': 15}), 3: (1, {'@': 15}), 88: (1, {'@': 15}), 89: (1, {'@': 15}), 115: (1, {'@': 15}), 116: (1, {'@': 15}), 117: (1, {'@': 15}), 118: (1, {'@': 15}), 91: (1, {'@': 15}), 119: (1, {'@': 15}), 92: (1, {'@': 15}), 93: (1, {'@': 15}), 94: (1, {'@': 15}), 120: (1, {'@': 15}), 95: (1, {'@': 15}), 96: (1, {'@': 15}), 121: (1, {'@': 15}), 123: (1, {'@': 15}), 97: (1, {'@': 15}), 124: (1, {'@': 15}), 166: (1, {'@': 15}), 44: (1, {'@': 15}), 163: (1, {'@': 15}), 45: (1, {'@': 15}), 12: (1, {'@': 15}), 164: (1, {'@': 15}), 122: (1, {'@': 15}), 165: (1, {'@': 15}), 167: (1, {'@': 15})}, 74: {47: (0, 607), 66: (0, 515), 55: (1, {'@': 400}), 62: (1, {'@': 400}), 56: (1, {'@': 400}), 65: (1, {'@': 400}), 68: (1, {'@': 400}), 57: (1, {'@': 400}), 54: (1, {'@': 400}), 69: (1, {'@': 400}), 67: (1, {'@': 400}), 4: (1, {'@': 400}), 58: (1, {'@': 400}), 59: (1, {'@': 400}), 60: (1, {'@': 400}), 64: (1, {'@': 400}), 63: (1, {'@': 400}), 12: (1, {'@': 400}), 13: (1, {'@': 400}), 11: (1, {'@': 400}), 72: (1, {'@': 400}), 73: (1, {'@': 400}), 74: (1, {'@': 400}), 75: (1, {'@': 400}), 76: (1, {'@': 400}), 77: (1, {'@': 400}), 78: (1, {'@': 400}), 79: (1, {'@': 400}), 80: (1, {'@': 400}), 81: (1, {'@': 400}), 10: (1, {'@': 400}), 82: (1, {'@': 400}), 83: (1, {'@': 400}), 84: (1, {'@': 400}), 85: (1, {'@': 400}), 86: (1, {'@': 400}), 87: (1, {'@': 400}), 88: (1, {'@': 400}), 89: (1, {'@': 400}), 90: (1, {'@': 400}), 91: (1, {'@': 400}), 92: (1, {'@': 400}), 93: (1, {'@': 400}), 94: (1, {'@': 400}), 95: (1, {'@': 400}), 96: (1, {'@': 400}), 97: (1, {'@': 400}), 98: (1, {'@': 400}), 99: (1, {'@': 400}), 100: (1, {'@': 400}), 101: (1, {'@': 400}), 102: (1, {'@': 400}), 43: (1, {'@': 400}), 103: (1, {'@': 400}), 104: (1, {'@': 400}), 105: (1, {'@': 400}), 106: (1, {'@': 400}), 107: (1, {'@': 400}), 108: (1, {'@': 400}), 109: (1, {'@': 400}), 1: (1, {'@': 400}), 110: (1, {'@': 400}), 111: (1, {'@': 400}), 112: (1, {'@': 400}), 113: (1, {'@': 400}), 114: (1, {'@': 400}), 3: (1, {'@': 400}), 32: (1, {'@': 400}), 115: (1, {'@': 400}), 5: (1, {'@': 400}), 116: (1, {'@': 400}), 117: (1, {'@': 400}), 118: (1, {'@': 400}), 119: (1, {'@': 400}), 120: (1, {'@': 400}), 121: (1, {'@': 400}), 6: (1, {'@': 400}), 122: (1, {'@': 400}), 123: (1, {'@': 400}), 124: (1, {'@': 400})}, 75: {72: (1, {'@': 14}), 168: (1, {'@': 14}), 98: (1, {'@': 14}), 99: (1, {'@': 14}), 100: (1, {'@': 14}), 101: (1, {'@': 14}), 102: (1, {'@': 14}), 76: (1, {'@': 14}), 13: (1, {'@': 14}), 103: (1, {'@': 14}), 105: (1, {'@': 14}), 104: (1, {'@': 14}), 78: (1, {'@': 14}), 77: (1, {'@': 14}), 106: (1, {'@': 14}), 107: (1, {'@': 14}), 79: (1, {'@': 14}), 108: (1, {'@': 14}), 80: (1, {'@': 14}), 81: (1, {'@': 14}), 82: (1, {'@': 14}), 109: (1, {'@': 14}), 83: (1, {'@': 14}), 1: (1, {'@': 14}), 110: (1, {'@': 14}), 111: (1, {'@': 14}), 84: (1, {'@': 14}), 112: (1, {'@': 14}), 85: (1, {'@': 14}), 11: (1, {'@': 14}), 86: (1, {'@': 14}), 114: (1, {'@': 14}), 87: (1, {'@': 14}), 3: (1, {'@': 14}), 88: (1, {'@': 14}), 89: (1, {'@': 14}), 115: (1, {'@': 14}), 116: (1, {'@': 14}), 117: (1, {'@': 14}), 118: (1, {'@': 14}), 91: (1, {'@': 14}), 119: (1, {'@': 14}), 92: (1, {'@': 14}), 93: (1, {'@': 14}), 94: (1, {'@': 14}), 120: (1, {'@': 14}), 95: (1, {'@': 14}), 96: (1, {'@': 14}), 121: (1, {'@': 14}), 123: (1, {'@': 14}), 97: (1, {'@': 14}), 124: (1, {'@': 14}), 166: (1, {'@': 14}), 44: (1, {'@': 14}), 163: (1, {'@': 14}), 45: (1, {'@': 14}), 12: (1, {'@': 14}), 164: (1, {'@': 14}), 122: (1, {'@': 14}), 165: (1, {'@': 14}), 167: (1, {'@': 14})}, 76: {10: (0, 340)}, 77: {5: (1, {'@': 336}), 10: (1, {'@': 336})}, 78: {47: (0, 607), 66: (0, 515), 55: (1, {'@': 398}), 62: (1, {'@': 398}), 56: (1, {'@': 398}), 65: (1, {'@': 398}), 68: (1, {'@': 398}), 57: (1, {'@': 398}), 54: (1, {'@': 398}), 69: (1, {'@': 398}), 67: (1, {'@': 398}), 4: (1, {'@': 398}), 58: (1, {'@': 398}), 59: (1, {'@': 398}), 60: (1, {'@': 398}), 64: (1, {'@': 398}), 63: (1, {'@': 398}), 12: (1, {'@': 398}), 13: (1, {'@': 398}), 11: (1, {'@': 398}), 72: (1, {'@': 398}), 73: (1, {'@': 398}), 74: (1, {'@': 398}), 75: (1, {'@': 398}), 76: (1, {'@': 398}), 77: (1, {'@': 398}), 78: (1, {'@': 398}), 79: (1, {'@': 398}), 80: (1, {'@': 398}), 81: (1, {'@': 398}), 10: (1, {'@': 398}), 82: (1, {'@': 398}), 83: (1, {'@': 398}), 84: (1, {'@': 398}), 85: (1, {'@': 398}), 86: (1, {'@': 398}), 87: (1, {'@': 398}), 88: (1, {'@': 398}), 89: (1, {'@': 398}), 90: (1, {'@': 398}), 91: (1, {'@': 398}), 92: (1, {'@': 398}), 93: (1, {'@': 398}), 94: (1, {'@': 398}), 95: (1, {'@': 398}), 96: (1, {'@': 398}), 97: (1, {'@': 398}), 98: (1, {'@': 398}), 99: (1, {'@': 398}), 100: (1, {'@': 398}), 101: (1, {'@': 398}), 102: (1, {'@': 398}), 43: (1, {'@': 398}), 103: (1, {'@': 398}), 104: (1, {'@': 398}), 105: (1, {'@': 398}), 106: (1, {'@': 398}), 107: (1, {'@': 398}), 108: (1, {'@': 398}), 109: (1, {'@': 398}), 1: (1, {'@': 398}), 110: (1, {'@': 398}), 111: (1, {'@': 398}), 112: (1, {'@': 398}), 113: (1, {'@': 398}), 114: (1, {'@': 398}), 3: (1, {'@': 398}), 32: (1, {'@': 398}), 115: (1, {'@': 398}), 5: (1, {'@': 398}), 116: (1, {'@': 398}), 117: (1, {'@': 398}), 118: (1, {'@': 398}), 119: (1, {'@': 398}), 120: (1, {'@': 398}), 121: (1, {'@': 398}), 6: (1, {'@': 398}), 122: (1, {'@': 398}), 123: (1, {'@': 398}), 124: (1, {'@': 398})}, 79: {11: (1, {'@': 129}), 13: (1, {'@': 129}), 12: (1, {'@': 129})}, 80: {173: (0, 439), 121: (0, 743), 11: (1, {'@': 69}), 13: (1, {'@': 69}), 12: (1, {'@': 69})}, 81: {11: (1, {'@': 17}), 13: (1, {'@': 17}), 12: (1, {'@': 17})}, 82: {4: (0, 365)}, 83: {5: (0, 259)}, 84: {10: (0, 610)}, 85: {174: (0, 192), 175: (0, 703), 122: (0, 714), 120: (0, 550)}, 86: {43: (0, 89)}, 87: {11: (1, {'@': 85}), 13: (1, {'@': 85}), 12: (1, {'@': 85})}, 88: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 131: (0, 30), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 10: (0, 33), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 89: {14: (1, {'@': 241}), 15: (1, {'@': 241}), 16: (1, {'@': 241}), 17: (1, {'@': 241}), 18: (1, {'@': 241}), 101: (1, {'@': 241}), 100: (1, {'@': 241}), 19: (1, {'@': 241}), 20: (1, {'@': 241}), 21: (1, {'@': 241}), 22: (1, {'@': 241}), 23: (1, {'@': 241}), 108: (1, {'@': 241}), 82: (1, {'@': 241}), 24: (1, {'@': 241}), 25: (1, {'@': 241}), 1: (1, {'@': 241}), 110: (1, {'@': 241}), 26: (1, {'@': 241}), 27: (1, {'@': 241}), 28: (1, {'@': 241}), 46: (1, {'@': 241}), 29: (1, {'@': 241}), 30: (1, {'@': 241}), 3: (1, {'@': 241}), 31: (1, {'@': 241}), 9: (1, {'@': 241}), 32: (1, {'@': 241}), 34: (1, {'@': 241}), 33: (1, {'@': 241}), 35: (1, {'@': 241}), 36: (1, {'@': 241}), 37: (1, {'@': 241}), 47: (1, {'@': 241}), 38: (1, {'@': 241}), 95: (1, {'@': 241}), 48: (1, {'@': 241}), 39: (1, {'@': 241}), 49: (1, {'@': 241}), 40: (1, {'@': 241}), 41: (1, {'@': 241}), 42: (1, {'@': 241})}, 90: {10: (0, 292)}, 91: {5: (1, {'@': 256}), 11: (1, {'@': 256}), 12: (1, {'@': 256}), 13: (1, {'@': 256})}, 92: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 93: (0, 630), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 163: (1, {'@': 147}), 120: (1, {'@': 147}), 45: (1, {'@': 147}), 44: (1, {'@': 147}), 12: (1, {'@': 147}), 13: (1, {'@': 147}), 164: (1, {'@': 147}), 122: (1, {'@': 147}), 165: (1, {'@': 147}), 166: (1, {'@': 147}), 167: (1, {'@': 147}), 168: (1, {'@': 147})}, 93: {31: (0, 3), 131: (0, 317), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 176: (0, 122), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 177: (0, 320), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 178: (0, 31), 179: (0, 9), 180: (0, 466), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 181: (0, 334), 20: (0, 247), 138: (0, 287), 182: (0, 248), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 183: (0, 443), 139: (0, 505), 22: (0, 11), 42: (0, 233), 184: (0, 313), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 94: {168: (0, 407)}, 95: {5: (1, {'@': 170}), 10: (1, {'@': 170})}, 96: {55: (0, 693), 60: (0, 562), 65: (0, 668), 68: (0, 513), 62: (1, {'@': 397}), 56: (1, {'@': 397}), 57: (1, {'@': 397}), 54: (1, {'@': 397}), 69: (1, {'@': 397}), 67: (1, {'@': 397}), 4: (1, {'@': 397}), 58: (1, {'@': 397}), 59: (1, {'@': 397}), 64: (1, {'@': 397}), 63: (1, {'@': 397}), 12: (1, {'@': 397}), 13: (1, {'@': 397}), 11: (1, {'@': 397}), 72: (1, {'@': 397}), 73: (1, {'@': 397}), 74: (1, {'@': 397}), 75: (1, {'@': 397}), 76: (1, {'@': 397}), 77: (1, {'@': 397}), 78: (1, {'@': 397}), 79: (1, {'@': 397}), 80: (1, {'@': 397}), 81: (1, {'@': 397}), 10: (1, {'@': 397}), 82: (1, {'@': 397}), 83: (1, {'@': 397}), 84: (1, {'@': 397}), 85: (1, {'@': 397}), 86: (1, {'@': 397}), 87: (1, {'@': 397}), 88: (1, {'@': 397}), 89: (1, {'@': 397}), 90: (1, {'@': 397}), 91: (1, {'@': 397}), 92: (1, {'@': 397}), 93: (1, {'@': 397}), 94: (1, {'@': 397}), 95: (1, {'@': 397}), 96: (1, {'@': 397}), 97: (1, {'@': 397}), 98: (1, {'@': 397}), 99: (1, {'@': 397}), 100: (1, {'@': 397}), 101: (1, {'@': 397}), 102: (1, {'@': 397}), 43: (1, {'@': 397}), 103: (1, {'@': 397}), 104: (1, {'@': 397}), 105: (1, {'@': 397}), 106: (1, {'@': 397}), 107: (1, {'@': 397}), 108: (1, {'@': 397}), 109: (1, {'@': 397}), 1: (1, {'@': 397}), 110: (1, {'@': 397}), 111: (1, {'@': 397}), 112: (1, {'@': 397}), 113: (1, {'@': 397}), 114: (1, {'@': 397}), 3: (1, {'@': 397}), 32: (1, {'@': 397}), 115: (1, {'@': 397}), 5: (1, {'@': 397}), 116: (1, {'@': 397}), 117: (1, {'@': 397}), 118: (1, {'@': 397}), 119: (1, {'@': 397}), 120: (1, {'@': 397}), 121: (1, {'@': 397}), 6: (1, {'@': 397}), 122: (1, {'@': 397}), 123: (1, {'@': 397}), 124: (1, {'@': 397})}, 97: {10: (1, {'@': 363}), 12: (1, {'@': 363}), 13: (1, {'@': 363}), 5: (1, {'@': 363}), 4: (1, {'@': 363}), 11: (1, {'@': 363}), 169: (1, {'@': 363}), 170: (1, {'@': 363})}, 98: {9: (0, 566), 171: (0, 642), 11: (1, {'@': 39}), 13: (1, {'@': 39}), 12: (1, {'@': 39})}, 99: {10: (0, 252)}, 100: {10: (0, 213)}, 101: {55: (1, {'@': 410}), 56: (1, {'@': 410}), 57: (1, {'@': 410}), 58: (1, {'@': 410}), 59: (1, {'@': 410}), 60: (1, {'@': 410}), 61: (1, {'@': 410}), 47: (1, {'@': 410}), 62: (1, {'@': 410}), 63: (1, {'@': 410}), 64: (1, {'@': 410}), 65: (1, {'@': 410}), 66: (1, {'@': 410}), 67: (1, {'@': 410}), 68: (1, {'@': 410}), 54: (1, {'@': 410}), 69: (1, {'@': 410}), 70: (1, {'@': 410}), 4: (1, {'@': 410}), 71: (1, {'@': 410}), 12: (1, {'@': 410}), 13: (1, {'@': 410}), 11: (1, {'@': 410}), 72: (1, {'@': 410}), 73: (1, {'@': 410}), 74: (1, {'@': 410}), 75: (1, {'@': 410}), 76: (1, {'@': 410}), 77: (1, {'@': 410}), 78: (1, {'@': 410}), 79: (1, {'@': 410}), 80: (1, {'@': 410}), 81: (1, {'@': 410}), 10: (1, {'@': 410}), 82: (1, {'@': 410}), 83: (1, {'@': 410}), 84: (1, {'@': 410}), 85: (1, {'@': 410}), 86: (1, {'@': 410}), 87: (1, {'@': 410}), 88: (1, {'@': 410}), 89: (1, {'@': 410}), 90: (1, {'@': 410}), 91: (1, {'@': 410}), 92: (1, {'@': 410}), 93: (1, {'@': 410}), 94: (1, {'@': 410}), 95: (1, {'@': 410}), 96: (1, {'@': 410}), 97: (1, {'@': 410}), 98: (1, {'@': 410}), 99: (1, {'@': 410}), 100: (1, {'@': 410}), 101: (1, {'@': 410}), 102: (1, {'@': 410}), 43: (1, {'@': 410}), 103: (1, {'@': 410}), 104: (1, {'@': 410}), 105: (1, {'@': 410}), 106: (1, {'@': 410}), 107: (1, {'@': 410}), 108: (1, {'@': 410}), 109: (1, {'@': 410}), 1: (1, {'@': 410}), 110: (1, {'@': 410}), 111: (1, {'@': 410}), 112: (1, {'@': 410}), 113: (1, {'@': 410}), 114: (1, {'@': 410}), 3: (1, {'@': 410}), 32: (1, {'@': 410}), 115: (1, {'@': 410}), 5: (1, {'@': 410}), 116: (1, {'@': 410}), 117: (1, {'@': 410}), 118: (1, {'@': 410}), 119: (1, {'@': 410}), 120: (1, {'@': 410}), 121: (1, {'@': 410}), 6: (1, {'@': 410}), 122: (1, {'@': 410}), 123: (1, {'@': 410}), 124: (1, {'@': 410})}, 102: {11: (1, {'@': 228}), 12: (1, {'@': 228}), 13: (1, {'@': 228})}, 103: {11: (1, {'@': 91}), 13: (1, {'@': 91}), 12: (1, {'@': 91})}, 104: {10: (1, {'@': 358}), 12: (1, {'@': 358}), 13: (1, {'@': 358}), 5: (1, {'@': 358}), 4: (1, {'@': 358}), 11: (1, {'@': 358}), 169: (1, {'@': 358}), 170: (1, {'@': 358})}, 105: {11: (1, {'@': 82}), 13: (1, {'@': 82}), 12: (1, {'@': 82})}, 106: {5: (0, 429)}, 107: {11: (1, {'@': 351}), 12: (1, {'@': 351}), 13: (1, {'@': 351})}, 108: {125: (0, 751), 55: (1, {'@': 414}), 56: (1, {'@': 414}), 57: (1, {'@': 414}), 58: (1, {'@': 414}), 59: (1, {'@': 414}), 60: (1, {'@': 414}), 61: (1, {'@': 414}), 47: (1, {'@': 414}), 62: (1, {'@': 414}), 63: (1, {'@': 414}), 65: (1, {'@': 414}), 66: (1, {'@': 414}), 70: (1, {'@': 414}), 68: (1, {'@': 414}), 54: (1, {'@': 414}), 4: (1, {'@': 414}), 69: (1, {'@': 414}), 67: (1, {'@': 414}), 64: (1, {'@': 414}), 71: (1, {'@': 414}), 12: (1, {'@': 414}), 13: (1, {'@': 414}), 11: (1, {'@': 414}), 72: (1, {'@': 414}), 73: (1, {'@': 414}), 74: (1, {'@': 414}), 75: (1, {'@': 414}), 76: (1, {'@': 414}), 77: (1, {'@': 414}), 78: (1, {'@': 414}), 79: (1, {'@': 414}), 80: (1, {'@': 414}), 81: (1, {'@': 414}), 10: (1, {'@': 414}), 82: (1, {'@': 414}), 83: (1, {'@': 414}), 84: (1, {'@': 414}), 85: (1, {'@': 414}), 86: (1, {'@': 414}), 87: (1, {'@': 414}), 88: (1, {'@': 414}), 89: (1, {'@': 414}), 90: (1, {'@': 414}), 91: (1, {'@': 414}), 92: (1, {'@': 414}), 93: (1, {'@': 414}), 94: (1, {'@': 414}), 95: (1, {'@': 414}), 96: (1, {'@': 414}), 97: (1, {'@': 414}), 98: (1, {'@': 414}), 99: (1, {'@': 414}), 100: (1, {'@': 414}), 101: (1, {'@': 414}), 102: (1, {'@': 414}), 43: (1, {'@': 414}), 103: (1, {'@': 414}), 104: (1, {'@': 414}), 105: (1, {'@': 414}), 106: (1, {'@': 414}), 107: (1, {'@': 414}), 108: (1, {'@': 414}), 109: (1, {'@': 414}), 1: (1, {'@': 414}), 110: (1, {'@': 414}), 111: (1, {'@': 414}), 112: (1, {'@': 414}), 113: (1, {'@': 414}), 114: (1, {'@': 414}), 3: (1, {'@': 414}), 32: (1, {'@': 414}), 115: (1, {'@': 414}), 5: (1, {'@': 414}), 116: (1, {'@': 414}), 117: (1, {'@': 414}), 118: (1, {'@': 414}), 119: (1, {'@': 414}), 120: (1, {'@': 414}), 121: (1, {'@': 414}), 6: (1, {'@': 414}), 122: (1, {'@': 414}), 123: (1, {'@': 414}), 124: (1, {'@': 414})}, 109: {11: (1, {'@': 42}), 13: (1, {'@': 42}), 12: (1, {'@': 42})}, 110: {11: (1, {'@': 95}), 13: (1, {'@': 95}), 12: (1, {'@': 95})}, 111: {10: (1, {'@': 361}), 12: (1, {'@': 361}), 13: (1, {'@': 361}), 5: (1, {'@': 361}), 4: (1, {'@': 361}), 11: (1, {'@': 361}), 169: (1, {'@': 361}), 170: (1, {'@': 361})}, 112: {11: (1, {'@': 86}), 13: (1, {'@': 86}), 12: (1, {'@': 86})}, 113: {5: (1, {'@': 343}), 10: (1, {'@': 343})}, 114: {10: (0, 347), 54: (0, 88), 5: (1, {'@': 319})}, 115: {5: (0, 358), 10: (0, 695), 54: (0, 423)}, 116: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 131: (0, 296), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 117: {5: (0, 26)}, 118: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 228), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 119: {185: (0, 139), 164: (0, 531), 175: (0, 619), 165: (0, 586), 120: (0, 550)}, 120: {11: (1, {'@': 128}), 13: (1, {'@': 128}), 12: (1, {'@': 128})}, 121: {55: (1, {'@': 415}), 56: (1, {'@': 415}), 57: (1, {'@': 415}), 125: (1, {'@': 415}), 58: (1, {'@': 415}), 59: (1, {'@': 415}), 60: (1, {'@': 415}), 61: (1, {'@': 415}), 47: (1, {'@': 415}), 62: (1, {'@': 415}), 63: (1, {'@': 415}), 65: (1, {'@': 415}), 66: (1, {'@': 415}), 70: (1, {'@': 415}), 68: (1, {'@': 415}), 54: (1, {'@': 415}), 4: (1, {'@': 415}), 69: (1, {'@': 415}), 67: (1, {'@': 415}), 64: (1, {'@': 415}), 71: (1, {'@': 415}), 12: (1, {'@': 415}), 13: (1, {'@': 415}), 11: (1, {'@': 415}), 72: (1, {'@': 415}), 73: (1, {'@': 415}), 74: (1, {'@': 415}), 75: (1, {'@': 415}), 76: (1, {'@': 415}), 77: (1, {'@': 415}), 78: (1, {'@': 415}), 79: (1, {'@': 415}), 80: (1, {'@': 415}), 81: (1, {'@': 415}), 10: (1, {'@': 415}), 82: (1, {'@': 415}), 83: (1, {'@': 415}), 84: (1, {'@': 415}), 85: (1, {'@': 415}), 86: (1, {'@': 415}), 87: (1, {'@': 415}), 88: (1, {'@': 415}), 89: (1, {'@': 415}), 90: (1, {'@': 415}), 91: (1, {'@': 415}), 92: (1, {'@': 415}), 93: (1, {'@': 415}), 94: (1, {'@': 415}), 95: (1, {'@': 415}), 96: (1, {'@': 415}), 97: (1, {'@': 415}), 98: (1, {'@': 415}), 99: (1, {'@': 415}), 100: (1, {'@': 415}), 101: (1, {'@': 415}), 102: (1, {'@': 415}), 43: (1, {'@': 415}), 103: (1, {'@': 415}), 104: (1, {'@': 415}), 105: (1, {'@': 415}), 106: (1, {'@': 415}), 107: (1, {'@': 415}), 108: (1, {'@': 415}), 109: (1, {'@': 415}), 1: (1, {'@': 415}), 110: (1, {'@': 415}), 111: (1, {'@': 415}), 112: (1, {'@': 415}), 113: (1, {'@': 415}), 114: (1, {'@': 415}), 3: (1, {'@': 415}), 32: (1, {'@': 415}), 115: (1, {'@': 415}), 5: (1, {'@': 415}), 116: (1, {'@': 415}), 117: (1, {'@': 415}), 118: (1, {'@': 415}), 119: (1, {'@': 415}), 120: (1, {'@': 415}), 121: (1, {'@': 415}), 6: (1, {'@': 415}), 122: (1, {'@': 415}), 123: (1, {'@': 415}), 124: (1, {'@': 415})}, 122: {14: (1, {'@': 261}), 15: (1, {'@': 261}), 16: (1, {'@': 261}), 17: (1, {'@': 261}), 18: (1, {'@': 261}), 19: (1, {'@': 261}), 20: (1, {'@': 261}), 21: (1, {'@': 261}), 22: (1, {'@': 261}), 23: (1, {'@': 261}), 24: (1, {'@': 261}), 25: (1, {'@': 261}), 1: (1, {'@': 261}), 26: (1, {'@': 261}), 27: (1, {'@': 261}), 28: (1, {'@': 261}), 46: (1, {'@': 261}), 29: (1, {'@': 261}), 30: (1, {'@': 261}), 3: (1, {'@': 261}), 31: (1, {'@': 261}), 9: (1, {'@': 261}), 32: (1, {'@': 261}), 34: (1, {'@': 261}), 33: (1, {'@': 261}), 5: (1, {'@': 261}), 35: (1, {'@': 261}), 36: (1, {'@': 261}), 37: (1, {'@': 261}), 47: (1, {'@': 261}), 38: (1, {'@': 261}), 48: (1, {'@': 261}), 39: (1, {'@': 261}), 49: (1, {'@': 261}), 40: (1, {'@': 261}), 41: (1, {'@': 261}), 42: (1, {'@': 261})}, 123: {10: (1, {'@': 362}), 12: (1, {'@': 362}), 13: (1, {'@': 362}), 5: (1, {'@': 362}), 4: (1, {'@': 362}), 11: (1, {'@': 362}), 169: (1, {'@': 362}), 170: (1, {'@': 362})}, 124: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 11: (0, 73), 93: (0, 630), 164: (0, 531), 98: (0, 544), 185: (0, 628), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 175: (0, 619), 94: (0, 584), 82: (0, 568), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 12: (1, {'@': 189}), 13: (1, {'@': 189})}, 125: {9: (0, 777), 172: (0, 530), 72: (1, {'@': 270}), 56: (1, {'@': 270}), 78: (1, {'@': 270}), 80: (1, {'@': 270}), 81: (1, {'@': 270}), 68: (1, {'@': 270}), 84: (1, {'@': 270}), 69: (1, {'@': 270}), 86: (1, {'@': 270}), 71: (1, {'@': 270}), 87: (1, {'@': 270}), 89: (1, {'@': 270}), 12: (1, {'@': 270}), 93: (1, {'@': 270}), 60: (1, {'@': 270}), 63: (1, {'@': 270}), 62: (1, {'@': 270}), 97: (1, {'@': 270}), 99: (1, {'@': 270}), 100: (1, {'@': 270}), 102: (1, {'@': 270}), 43: (1, {'@': 270}), 103: (1, {'@': 270}), 105: (1, {'@': 270}), 107: (1, {'@': 270}), 108: (1, {'@': 270}), 112: (1, {'@': 270}), 70: (1, {'@': 270}), 64: (1, {'@': 270}), 67: (1, {'@': 270}), 3: (1, {'@': 270}), 115: (1, {'@': 270}), 116: (1, {'@': 270}), 5: (1, {'@': 270}), 125: (1, {'@': 270}), 59: (1, {'@': 270}), 120: (1, {'@': 270}), 65: (1, {'@': 270}), 6: (1, {'@': 270}), 54: (1, {'@': 270}), 123: (1, {'@': 270}), 73: (1, {'@': 270}), 74: (1, {'@': 270}), 75: (1, {'@': 270}), 76: (1, {'@': 270}), 77: (1, {'@': 270}), 79: (1, {'@': 270}), 61: (1, {'@': 270}), 82: (1, {'@': 270}), 10: (1, {'@': 270}), 66: (1, {'@': 270}), 83: (1, {'@': 270}), 85: (1, {'@': 270}), 11: (1, {'@': 270}), 88: (1, {'@': 270}), 90: (1, {'@': 270}), 91: (1, {'@': 270}), 92: (1, {'@': 270}), 94: (1, {'@': 270}), 47: (1, {'@': 270}), 95: (1, {'@': 270}), 96: (1, {'@': 270}), 4: (1, {'@': 270}), 55: (1, {'@': 270}), 98: (1, {'@': 270}), 101: (1, {'@': 270}), 13: (1, {'@': 270}), 104: (1, {'@': 270}), 106: (1, {'@': 270}), 58: (1, {'@': 270}), 109: (1, {'@': 270}), 1: (1, {'@': 270}), 110: (1, {'@': 270}), 111: (1, {'@': 270}), 113: (1, {'@': 270}), 114: (1, {'@': 270}), 32: (1, {'@': 270}), 57: (1, {'@': 270}), 117: (1, {'@': 270}), 118: (1, {'@': 270}), 119: (1, {'@': 270}), 121: (1, {'@': 270}), 122: (1, {'@': 270}), 124: (1, {'@': 270})}, 126: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 131: (0, 57), 48: (0, 486)}, 127: {5: (0, 534), 11: (1, {'@': 26}), 13: (1, {'@': 26}), 12: (1, {'@': 26})}, 128: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 185: (0, 436), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 11: (0, 73), 93: (0, 630), 164: (0, 531), 98: (0, 544), 118: (0, 548), 157: (0, 552), 13: (0, 627), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 175: (0, 619), 94: (0, 584), 82: (0, 568), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 129: {5: (1, {'@': 255}), 11: (1, {'@': 255}), 12: (1, {'@': 255}), 13: (1, {'@': 255})}, 130: {4: (0, 541)}, 131: {14: (1, {'@': 177}), 15: (1, {'@': 177}), 16: (1, {'@': 177}), 17: (1, {'@': 177}), 18: (1, {'@': 177}), 19: (1, {'@': 177}), 20: (1, {'@': 177}), 21: (1, {'@': 177}), 22: (1, {'@': 177}), 23: (1, {'@': 177}), 24: (1, {'@': 177}), 25: (1, {'@': 177}), 1: (1, {'@': 177}), 26: (1, {'@': 177}), 27: (1, {'@': 177}), 28: (1, {'@': 177}), 46: (1, {'@': 177}), 29: (1, {'@': 177}), 30: (1, {'@': 177}), 3: (1, {'@': 177}), 31: (1, {'@': 177}), 9: (1, {'@': 177}), 32: (1, {'@': 177}), 34: (1, {'@': 177}), 33: (1, {'@': 177}), 35: (1, {'@': 177}), 36: (1, {'@': 177}), 37: (1, {'@': 177}), 47: (1, {'@': 177}), 38: (1, {'@': 177}), 48: (1, {'@': 177}), 39: (1, {'@': 177}), 49: (1, {'@': 177}), 40: (1, {'@': 177}), 41: (1, {'@': 177}), 42: (1, {'@': 177})}, 132: {9: (0, 566), 171: (0, 535), 72: (1, {'@': 162}), 56: (1, {'@': 162}), 78: (1, {'@': 162}), 80: (1, {'@': 162}), 81: (1, {'@': 162}), 68: (1, {'@': 162}), 84: (1, {'@': 162}), 69: (1, {'@': 162}), 86: (1, {'@': 162}), 71: (1, {'@': 162}), 87: (1, {'@': 162}), 89: (1, {'@': 162}), 12: (1, {'@': 162}), 93: (1, {'@': 162}), 60: (1, {'@': 162}), 63: (1, {'@': 162}), 62: (1, {'@': 162}), 97: (1, {'@': 162}), 99: (1, {'@': 162}), 100: (1, {'@': 162}), 102: (1, {'@': 162}), 43: (1, {'@': 162}), 103: (1, {'@': 162}), 105: (1, {'@': 162}), 107: (1, {'@': 162}), 108: (1, {'@': 162}), 112: (1, {'@': 162}), 70: (1, {'@': 162}), 64: (1, {'@': 162}), 67: (1, {'@': 162}), 3: (1, {'@': 162}), 115: (1, {'@': 162}), 116: (1, {'@': 162}), 5: (1, {'@': 162}), 125: (1, {'@': 162}), 59: (1, {'@': 162}), 120: (1, {'@': 162}), 65: (1, {'@': 162}), 6: (1, {'@': 162}), 54: (1, {'@': 162}), 123: (1, {'@': 162}), 73: (1, {'@': 162}), 74: (1, {'@': 162}), 75: (1, {'@': 162}), 76: (1, {'@': 162}), 77: (1, {'@': 162}), 79: (1, {'@': 162}), 61: (1, {'@': 162}), 82: (1, {'@': 162}), 10: (1, {'@': 162}), 66: (1, {'@': 162}), 83: (1, {'@': 162}), 85: (1, {'@': 162}), 11: (1, {'@': 162}), 88: (1, {'@': 162}), 90: (1, {'@': 162}), 91: (1, {'@': 162}), 92: (1, {'@': 162}), 94: (1, {'@': 162}), 47: (1, {'@': 162}), 95: (1, {'@': 162}), 96: (1, {'@': 162}), 4: (1, {'@': 162}), 55: (1, {'@': 162}), 98: (1, {'@': 162}), 101: (1, {'@': 162}), 13: (1, {'@': 162}), 104: (1, {'@': 162}), 106: (1, {'@': 162}), 58: (1, {'@': 162}), 109: (1, {'@': 162}), 1: (1, {'@': 162}), 110: (1, {'@': 162}), 111: (1, {'@': 162}), 113: (1, {'@': 162}), 114: (1, {'@': 162}), 32: (1, {'@': 162}), 57: (1, {'@': 162}), 117: (1, {'@': 162}), 118: (1, {'@': 162}), 119: (1, {'@': 162}), 121: (1, {'@': 162}), 122: (1, {'@': 162}), 124: (1, {'@': 162})}, 133: {72: (1, {'@': 283}), 56: (1, {'@': 283}), 78: (1, {'@': 283}), 80: (1, {'@': 283}), 81: (1, {'@': 283}), 68: (1, {'@': 283}), 84: (1, {'@': 283}), 69: (1, {'@': 283}), 86: (1, {'@': 283}), 71: (1, {'@': 283}), 87: (1, {'@': 283}), 89: (1, {'@': 283}), 12: (1, {'@': 283}), 93: (1, {'@': 283}), 60: (1, {'@': 283}), 63: (1, {'@': 283}), 62: (1, {'@': 283}), 97: (1, {'@': 283}), 99: (1, {'@': 283}), 100: (1, {'@': 283}), 102: (1, {'@': 283}), 43: (1, {'@': 283}), 103: (1, {'@': 283}), 105: (1, {'@': 283}), 107: (1, {'@': 283}), 108: (1, {'@': 283}), 112: (1, {'@': 283}), 70: (1, {'@': 283}), 64: (1, {'@': 283}), 67: (1, {'@': 283}), 3: (1, {'@': 283}), 9: (1, {'@': 283}), 115: (1, {'@': 283}), 116: (1, {'@': 283}), 5: (1, {'@': 283}), 125: (1, {'@': 283}), 59: (1, {'@': 283}), 120: (1, {'@': 283}), 65: (1, {'@': 283}), 6: (1, {'@': 283}), 54: (1, {'@': 283}), 123: (1, {'@': 283}), 73: (1, {'@': 283}), 74: (1, {'@': 283}), 75: (1, {'@': 283}), 76: (1, {'@': 283}), 77: (1, {'@': 283}), 79: (1, {'@': 283}), 61: (1, {'@': 283}), 82: (1, {'@': 283}), 10: (1, {'@': 283}), 66: (1, {'@': 283}), 83: (1, {'@': 283}), 85: (1, {'@': 283}), 11: (1, {'@': 283}), 88: (1, {'@': 283}), 90: (1, {'@': 283}), 91: (1, {'@': 283}), 92: (1, {'@': 283}), 94: (1, {'@': 283}), 47: (1, {'@': 283}), 95: (1, {'@': 283}), 96: (1, {'@': 283}), 4: (1, {'@': 283}), 55: (1, {'@': 283}), 98: (1, {'@': 283}), 101: (1, {'@': 283}), 13: (1, {'@': 283}), 104: (1, {'@': 283}), 106: (1, {'@': 283}), 58: (1, {'@': 283}), 109: (1, {'@': 283}), 1: (1, {'@': 283}), 110: (1, {'@': 283}), 111: (1, {'@': 283}), 113: (1, {'@': 283}), 114: (1, {'@': 283}), 32: (1, {'@': 283}), 57: (1, {'@': 283}), 117: (1, {'@': 283}), 118: (1, {'@': 283}), 119: (1, {'@': 283}), 121: (1, {'@': 283}), 122: (1, {'@': 283}), 124: (1, {'@': 283})}, 134: {11: (1, {'@': 22}), 13: (1, {'@': 22}), 12: (1, {'@': 22})}, 135: {5: (0, 55)}, 136: {5: (0, 605), 11: (1, {'@': 35}), 13: (1, {'@': 35}), 12: (1, {'@': 35})}, 137: {7: (1, {'@': 327}), 11: (1, {'@': 327}), 9: (1, {'@': 327}), 13: (1, {'@': 327}), 12: (1, {'@': 327})}, 138: {55: (0, 693), 60: (0, 562), 65: (0, 668), 68: (0, 513), 62: (1, {'@': 396}), 56: (1, {'@': 396}), 57: (1, {'@': 396}), 54: (1, {'@': 396}), 69: (1, {'@': 396}), 67: (1, {'@': 396}), 4: (1, {'@': 396}), 58: (1, {'@': 396}), 59: (1, {'@': 396}), 64: (1, {'@': 396}), 63: (1, {'@': 396}), 12: (1, {'@': 396}), 13: (1, {'@': 396}), 11: (1, {'@': 396}), 72: (1, {'@': 396}), 73: (1, {'@': 396}), 74: (1, {'@': 396}), 75: (1, {'@': 396}), 76: (1, {'@': 396}), 77: (1, {'@': 396}), 78: (1, {'@': 396}), 79: (1, {'@': 396}), 80: (1, {'@': 396}), 81: (1, {'@': 396}), 10: (1, {'@': 396}), 82: (1, {'@': 396}), 83: (1, {'@': 396}), 84: (1, {'@': 396}), 85: (1, {'@': 396}), 86: (1, {'@': 396}), 87: (1, {'@': 396}), 88: (1, {'@': 396}), 89: (1, {'@': 396}), 90: (1, {'@': 396}), 91: (1, {'@': 396}), 92: (1, {'@': 396}), 93: (1, {'@': 396}), 94: (1, {'@': 396}), 95: (1, {'@': 396}), 96: (1, {'@': 396}), 97: (1, {'@': 396}), 98: (1, {'@': 396}), 99: (1, {'@': 396}), 100: (1, {'@': 396}), 101: (1, {'@': 396}), 102: (1, {'@': 396}), 43: (1, {'@': 396}), 103: (1, {'@': 396}), 104: (1, {'@': 396}), 105: (1, {'@': 396}), 106: (1, {'@': 396}), 107: (1, {'@': 396}), 108: (1, {'@': 396}), 109: (1, {'@': 396}), 1: (1, {'@': 396}), 110: (1, {'@': 396}), 111: (1, {'@': 396}), 112: (1, {'@': 396}), 113: (1, {'@': 396}), 114: (1, {'@': 396}), 3: (1, {'@': 396}), 32: (1, {'@': 396}), 115: (1, {'@': 396}), 5: (1, {'@': 396}), 116: (1, {'@': 396}), 117: (1, {'@': 396}), 118: (1, {'@': 396}), 119: (1, {'@': 396}), 120: (1, {'@': 396}), 121: (1, {'@': 396}), 6: (1, {'@': 396}), 122: (1, {'@': 396}), 123: (1, {'@': 396}), 124: (1, {'@': 396})}, 139: {11: (1, {'@': 196}), 12: (1, {'@': 196}), 13: (1, {'@': 196})}, 140: {5: (0, 322), 11: (1, {'@': 124}), 13: (1, {'@': 124}), 12: (1, {'@': 124})}, 141: {55: (1, {'@': 417}), 56: (1, {'@': 417}), 57: (1, {'@': 417}), 125: (1, {'@': 417}), 58: (1, {'@': 417}), 59: (1, {'@': 417}), 60: (1, {'@': 417}), 61: (1, {'@': 417}), 47: (1, {'@': 417}), 62: (1, {'@': 417}), 63: (1, {'@': 417}), 65: (1, {'@': 417}), 66: (1, {'@': 417}), 70: (1, {'@': 417}), 68: (1, {'@': 417}), 54: (1, {'@': 417}), 4: (1, {'@': 417}), 69: (1, {'@': 417}), 67: (1, {'@': 417}), 64: (1, {'@': 417}), 71: (1, {'@': 417}), 12: (1, {'@': 417}), 13: (1, {'@': 417}), 11: (1, {'@': 417}), 72: (1, {'@': 417}), 73: (1, {'@': 417}), 74: (1, {'@': 417}), 75: (1, {'@': 417}), 76: (1, {'@': 417}), 77: (1, {'@': 417}), 78: (1, {'@': 417}), 79: (1, {'@': 417}), 80: (1, {'@': 417}), 81: (1, {'@': 417}), 10: (1, {'@': 417}), 82: (1, {'@': 417}), 83: (1, {'@': 417}), 84: (1, {'@': 417}), 85: (1, {'@': 417}), 86: (1, {'@': 417}), 87: (1, {'@': 417}), 88: (1, {'@': 417}), 89: (1, {'@': 417}), 90: (1, {'@': 417}), 91: (1, {'@': 417}), 92: (1, {'@': 417}), 93: (1, {'@': 417}), 94: (1, {'@': 417}), 95: (1, {'@': 417}), 96: (1, {'@': 417}), 97: (1, {'@': 417}), 98: (1, {'@': 417}), 99: (1, {'@': 417}), 100: (1, {'@': 417}), 101: (1, {'@': 417}), 102: (1, {'@': 417}), 43: (1, {'@': 417}), 103: (1, {'@': 417}), 104: (1, {'@': 417}), 105: (1, {'@': 417}), 106: (1, {'@': 417}), 107: (1, {'@': 417}), 108: (1, {'@': 417}), 109: (1, {'@': 417}), 1: (1, {'@': 417}), 110: (1, {'@': 417}), 111: (1, {'@': 417}), 112: (1, {'@': 417}), 113: (1, {'@': 417}), 114: (1, {'@': 417}), 3: (1, {'@': 417}), 32: (1, {'@': 417}), 115: (1, {'@': 417}), 5: (1, {'@': 417}), 116: (1, {'@': 417}), 117: (1, {'@': 417}), 118: (1, {'@': 417}), 119: (1, {'@': 417}), 120: (1, {'@': 417}), 121: (1, {'@': 417}), 6: (1, {'@': 417}), 122: (1, {'@': 417}), 123: (1, {'@': 417}), 124: (1, {'@': 417})}, 142: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 185: (0, 458), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 93: (0, 630), 164: (0, 531), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 175: (0, 619), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 143: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 131: (0, 148), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 5: (0, 39), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 144: {11: (1, {'@': 156}), 13: (1, {'@': 156}), 12: (1, {'@': 156})}, 145: {10: (0, 215)}, 146: {11: (1, {'@': 113}), 13: (1, {'@': 113}), 12: (1, {'@': 113})}, 147: {11: (1, {'@': 125}), 13: (1, {'@': 125}), 12: (1, {'@': 125})}, 148: {5: (0, 152)}, 149: {11: (1, {'@': 121}), 13: (1, {'@': 121}), 12: (1, {'@': 121})}, 150: {9: (0, 678)}, 151: {10: (0, 304)}, 152: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 131: (0, 52), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 153: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 131: (0, 388), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 154: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 131: (0, 613), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 155: {186: (0, 608), 73: (0, 679), 72: (1, {'@': 213}), 76: (1, {'@': 213}), 77: (1, {'@': 213}), 78: (1, {'@': 213}), 79: (1, {'@': 213}), 80: (1, {'@': 213}), 81: (1, {'@': 213}), 82: (1, {'@': 213}), 83: (1, {'@': 213}), 84: (1, {'@': 213}), 85: (1, {'@': 213}), 11: (1, {'@': 213}), 86: (1, {'@': 213}), 87: (1, {'@': 213}), 88: (1, {'@': 213}), 89: (1, {'@': 213}), 91: (1, {'@': 213}), 92: (1, {'@': 213}), 93: (1, {'@': 213}), 94: (1, {'@': 213}), 95: (1, {'@': 213}), 96: (1, {'@': 213}), 97: (1, {'@': 213}), 98: (1, {'@': 213}), 99: (1, {'@': 213}), 100: (1, {'@': 213}), 101: (1, {'@': 213}), 102: (1, {'@': 213}), 13: (1, {'@': 213}), 103: (1, {'@': 213}), 104: (1, {'@': 213}), 105: (1, {'@': 213}), 106: (1, {'@': 213}), 107: (1, {'@': 213}), 108: (1, {'@': 213}), 109: (1, {'@': 213}), 1: (1, {'@': 213}), 110: (1, {'@': 213}), 111: (1, {'@': 213}), 112: (1, {'@': 213}), 114: (1, {'@': 213}), 3: (1, {'@': 213}), 115: (1, {'@': 213}), 116: (1, {'@': 213}), 117: (1, {'@': 213}), 118: (1, {'@': 213}), 119: (1, {'@': 213}), 121: (1, {'@': 213}), 123: (1, {'@': 213}), 124: (1, {'@': 213})}, 156: {11: (1, {'@': 199}), 12: (1, {'@': 199}), 13: (1, {'@': 199})}, 157: {11: (1, {'@': 160}), 13: (1, {'@': 160}), 12: (1, {'@': 160})}, 158: {57: (1, {'@': 385}), 56: (1, {'@': 385}), 54: (1, {'@': 385}), 63: (1, {'@': 385}), 11: (1, {'@': 385}), 12: (1, {'@': 385}), 13: (1, {'@': 385}), 72: (1, {'@': 385}), 74: (1, {'@': 385}), 98: (1, {'@': 385}), 75: (1, {'@': 385}), 99: (1, {'@': 385}), 100: (1, {'@': 385}), 76: (1, {'@': 385}), 101: (1, {'@': 385}), 102: (1, {'@': 385}), 103: (1, {'@': 385}), 77: (1, {'@': 385}), 78: (1, {'@': 385}), 104: (1, {'@': 385}), 105: (1, {'@': 385}), 106: (1, {'@': 385}), 107: (1, {'@': 385}), 79: (1, {'@': 385}), 108: (1, {'@': 385}), 80: (1, {'@': 385}), 81: (1, {'@': 385}), 82: (1, {'@': 385}), 109: (1, {'@': 385}), 83: (1, {'@': 385}), 1: (1, {'@': 385}), 110: (1, {'@': 385}), 111: (1, {'@': 385}), 84: (1, {'@': 385}), 112: (1, {'@': 385}), 85: (1, {'@': 385}), 86: (1, {'@': 385}), 113: (1, {'@': 385}), 114: (1, {'@': 385}), 87: (1, {'@': 385}), 3: (1, {'@': 385}), 88: (1, {'@': 385}), 89: (1, {'@': 385}), 115: (1, {'@': 385}), 90: (1, {'@': 385}), 116: (1, {'@': 385}), 117: (1, {'@': 385}), 118: (1, {'@': 385}), 91: (1, {'@': 385}), 119: (1, {'@': 385}), 92: (1, {'@': 385}), 93: (1, {'@': 385}), 94: (1, {'@': 385}), 120: (1, {'@': 385}), 95: (1, {'@': 385}), 96: (1, {'@': 385}), 121: (1, {'@': 385}), 123: (1, {'@': 385}), 97: (1, {'@': 385}), 124: (1, {'@': 385}), 5: (1, {'@': 385}), 10: (1, {'@': 385}), 43: (1, {'@': 385}), 73: (1, {'@': 385}), 6: (1, {'@': 385}), 32: (1, {'@': 385}), 122: (1, {'@': 385})}, 159: {54: (0, 88)}, 160: {66: (0, 515), 47: (0, 607), 55: (1, {'@': 402}), 62: (1, {'@': 402}), 56: (1, {'@': 402}), 65: (1, {'@': 402}), 68: (1, {'@': 402}), 57: (1, {'@': 402}), 54: (1, {'@': 402}), 69: (1, {'@': 402}), 67: (1, {'@': 402}), 4: (1, {'@': 402}), 58: (1, {'@': 402}), 59: (1, {'@': 402}), 60: (1, {'@': 402}), 64: (1, {'@': 402}), 63: (1, {'@': 402}), 12: (1, {'@': 402}), 13: (1, {'@': 402}), 11: (1, {'@': 402}), 72: (1, {'@': 402}), 73: (1, {'@': 402}), 74: (1, {'@': 402}), 75: (1, {'@': 402}), 76: (1, {'@': 402}), 77: (1, {'@': 402}), 78: (1, {'@': 402}), 79: (1, {'@': 402}), 80: (1, {'@': 402}), 81: (1, {'@': 402}), 10: (1, {'@': 402}), 82: (1, {'@': 402}), 83: (1, {'@': 402}), 84: (1, {'@': 402}), 85: (1, {'@': 402}), 86: (1, {'@': 402}), 87: (1, {'@': 402}), 88: (1, {'@': 402}), 89: (1, {'@': 402}), 90: (1, {'@': 402}), 91: (1, {'@': 402}), 92: (1, {'@': 402}), 93: (1, {'@': 402}), 94: (1, {'@': 402}), 95: (1, {'@': 402}), 96: (1, {'@': 402}), 97: (1, {'@': 402}), 98: (1, {'@': 402}), 99: (1, {'@': 402}), 100: (1, {'@': 402}), 101: (1, {'@': 402}), 102: (1, {'@': 402}), 43: (1, {'@': 402}), 103: (1, {'@': 402}), 104: (1, {'@': 402}), 105: (1, {'@': 402}), 106: (1, {'@': 402}), 107: (1, {'@': 402}), 108: (1, {'@': 402}), 109: (1, {'@': 402}), 1: (1, {'@': 402}), 110: (1, {'@': 402}), 111: (1, {'@': 402}), 112: (1, {'@': 402}), 113: (1, {'@': 402}), 114: (1, {'@': 402}), 3: (1, {'@': 402}), 32: (1, {'@': 402}), 115: (1, {'@': 402}), 5: (1, {'@': 402}), 116: (1, {'@': 402}), 117: (1, {'@': 402}), 118: (1, {'@': 402}), 119: (1, {'@': 402}), 120: (1, {'@': 402}), 121: (1, {'@': 402}), 6: (1, {'@': 402}), 122: (1, {'@': 402}), 123: (1, {'@': 402}), 124: (1, {'@': 402})}, 161: {11: (1, {'@': 172}), 12: (1, {'@': 172}), 13: (1, {'@': 172}), 5: (1, {'@': 172}), 6: (1, {'@': 172})}, 162: {12: (0, 645), 187: (0, 44), 175: (0, 663), 120: (0, 550), 166: (0, 532), 188: (0, 592), 165: (0, 586), 185: (0, 771), 164: (0, 531), 189: (0, 463), 190: (0, 446)}, 163: {10: (0, 82)}, 164: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 191: (0, 62), 81: (0, 786), 11: (0, 632), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 168: (0, 407), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 116: (0, 774), 155: (0, 651), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 192: (0, 92), 193: (0, 480), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 194: (0, 361), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 120: (1, {'@': 148}), 13: (1, {'@': 148})}, 165: {4: (0, 284)}, 166: {33: (1, {'@': 179}), 3: (1, {'@': 179})}, 167: {9: (1, {'@': 164}), 12: (1, {'@': 164}), 13: (1, {'@': 164}), 5: (1, {'@': 164}), 7: (1, {'@': 164}), 4: (1, {'@': 164}), 11: (1, {'@': 164}), 170: (1, {'@': 164})}, 168: {11: (1, {'@': 130}), 13: (1, {'@': 130}), 12: (1, {'@': 130})}, 169: {71: (0, 725), 55: (1, {'@': 406}), 56: (1, {'@': 406}), 57: (1, {'@': 406}), 58: (1, {'@': 406}), 59: (1, {'@': 406}), 60: (1, {'@': 406}), 64: (1, {'@': 406}), 47: (1, {'@': 406}), 62: (1, {'@': 406}), 63: (1, {'@': 406}), 65: (1, {'@': 406}), 66: (1, {'@': 406}), 68: (1, {'@': 406}), 54: (1, {'@': 406}), 69: (1, {'@': 406}), 67: (1, {'@': 406}), 4: (1, {'@': 406}), 12: (1, {'@': 406}), 13: (1, {'@': 406}), 11: (1, {'@': 406}), 72: (1, {'@': 406}), 73: (1, {'@': 406}), 74: (1, {'@': 406}), 75: (1, {'@': 406}), 76: (1, {'@': 406}), 77: (1, {'@': 406}), 78: (1, {'@': 406}), 79: (1, {'@': 406}), 80: (1, {'@': 406}), 81: (1, {'@': 406}), 10: (1, {'@': 406}), 82: (1, {'@': 406}), 83: (1, {'@': 406}), 84: (1, {'@': 406}), 85: (1, {'@': 406}), 86: (1, {'@': 406}), 87: (1, {'@': 406}), 88: (1, {'@': 406}), 89: (1, {'@': 406}), 90: (1, {'@': 406}), 91: (1, {'@': 406}), 92: (1, {'@': 406}), 93: (1, {'@': 406}), 94: (1, {'@': 406}), 95: (1, {'@': 406}), 96: (1, {'@': 406}), 97: (1, {'@': 406}), 98: (1, {'@': 406}), 99: (1, {'@': 406}), 100: (1, {'@': 406}), 101: (1, {'@': 406}), 102: (1, {'@': 406}), 43: (1, {'@': 406}), 103: (1, {'@': 406}), 104: (1, {'@': 406}), 105: (1, {'@': 406}), 106: (1, {'@': 406}), 107: (1, {'@': 406}), 108: (1, {'@': 406}), 109: (1, {'@': 406}), 1: (1, {'@': 406}), 110: (1, {'@': 406}), 111: (1, {'@': 406}), 112: (1, {'@': 406}), 113: (1, {'@': 406}), 114: (1, {'@': 406}), 3: (1, {'@': 406}), 32: (1, {'@': 406}), 115: (1, {'@': 406}), 5: (1, {'@': 406}), 116: (1, {'@': 406}), 117: (1, {'@': 406}), 118: (1, {'@': 406}), 119: (1, {'@': 406}), 120: (1, {'@': 406}), 121: (1, {'@': 406}), 6: (1, {'@': 406}), 122: (1, {'@': 406}), 123: (1, {'@': 406}), 124: (1, {'@': 406})}, 170: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 90), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 171: {72: (1, {'@': 309}), 56: (1, {'@': 309}), 78: (1, {'@': 309}), 80: (1, {'@': 309}), 81: (1, {'@': 309}), 68: (1, {'@': 309}), 84: (1, {'@': 309}), 69: (1, {'@': 309}), 86: (1, {'@': 309}), 71: (1, {'@': 309}), 87: (1, {'@': 309}), 89: (1, {'@': 309}), 12: (1, {'@': 309}), 93: (1, {'@': 309}), 60: (1, {'@': 309}), 63: (1, {'@': 309}), 62: (1, {'@': 309}), 97: (1, {'@': 309}), 99: (1, {'@': 309}), 100: (1, {'@': 309}), 102: (1, {'@': 309}), 43: (1, {'@': 309}), 103: (1, {'@': 309}), 105: (1, {'@': 309}), 107: (1, {'@': 309}), 108: (1, {'@': 309}), 112: (1, {'@': 309}), 70: (1, {'@': 309}), 67: (1, {'@': 309}), 64: (1, {'@': 309}), 3: (1, {'@': 309}), 9: (1, {'@': 309}), 115: (1, {'@': 309}), 5: (1, {'@': 309}), 116: (1, {'@': 309}), 125: (1, {'@': 309}), 59: (1, {'@': 309}), 120: (1, {'@': 309}), 65: (1, {'@': 309}), 6: (1, {'@': 309}), 54: (1, {'@': 309}), 123: (1, {'@': 309}), 73: (1, {'@': 309}), 74: (1, {'@': 309}), 75: (1, {'@': 309}), 76: (1, {'@': 309}), 77: (1, {'@': 309}), 79: (1, {'@': 309}), 61: (1, {'@': 309}), 10: (1, {'@': 309}), 82: (1, {'@': 309}), 66: (1, {'@': 309}), 83: (1, {'@': 309}), 85: (1, {'@': 309}), 11: (1, {'@': 309}), 88: (1, {'@': 309}), 90: (1, {'@': 309}), 91: (1, {'@': 309}), 92: (1, {'@': 309}), 94: (1, {'@': 309}), 47: (1, {'@': 309}), 95: (1, {'@': 309}), 96: (1, {'@': 309}), 4: (1, {'@': 309}), 55: (1, {'@': 309}), 98: (1, {'@': 309}), 101: (1, {'@': 309}), 13: (1, {'@': 309}), 104: (1, {'@': 309}), 106: (1, {'@': 309}), 58: (1, {'@': 309}), 109: (1, {'@': 309}), 1: (1, {'@': 309}), 110: (1, {'@': 309}), 111: (1, {'@': 309}), 113: (1, {'@': 309}), 114: (1, {'@': 309}), 32: (1, {'@': 309}), 57: (1, {'@': 309}), 117: (1, {'@': 309}), 118: (1, {'@': 309}), 119: (1, {'@': 309}), 121: (1, {'@': 309}), 122: (1, {'@': 309}), 124: (1, {'@': 309})}, 172: {9: (0, 563), 172: (0, 59), 4: (0, 24), 171: (0, 60)}, 173: {3: (1, {'@': 331})}, 174: {5: (0, 413), 11: (1, {'@': 97}), 13: (1, {'@': 97}), 12: (1, {'@': 97})}, 175: {11: (1, {'@': 116}), 13: (1, {'@': 116}), 12: (1, {'@': 116})}, 176: {72: (1, {'@': 3}), 74: (1, {'@': 3}), 75: (1, {'@': 3}), 76: (1, {'@': 3}), 77: (1, {'@': 3}), 78: (1, {'@': 3}), 166: (1, {'@': 3}), 79: (1, {'@': 3}), 80: (1, {'@': 3}), 81: (1, {'@': 3}), 82: (1, {'@': 3}), 44: (1, {'@': 3}), 83: (1, {'@': 3}), 84: (1, {'@': 3}), 85: (1, {'@': 3}), 11: (1, {'@': 3}), 86: (1, {'@': 3}), 163: (1, {'@': 3}), 45: (1, {'@': 3}), 87: (1, {'@': 3}), 88: (1, {'@': 3}), 89: (1, {'@': 3}), 12: (1, {'@': 3}), 91: (1, {'@': 3}), 92: (1, {'@': 3}), 93: (1, {'@': 3}), 94: (1, {'@': 3}), 95: (1, {'@': 3}), 96: (1, {'@': 3}), 164: (1, {'@': 3}), 165: (1, {'@': 3}), 97: (1, {'@': 3}), 167: (1, {'@': 3}), 98: (1, {'@': 3}), 99: (1, {'@': 3}), 100: (1, {'@': 3}), 101: (1, {'@': 3}), 102: (1, {'@': 3}), 13: (1, {'@': 3}), 103: (1, {'@': 3}), 105: (1, {'@': 3}), 104: (1, {'@': 3}), 106: (1, {'@': 3}), 107: (1, {'@': 3}), 108: (1, {'@': 3}), 109: (1, {'@': 3}), 1: (1, {'@': 3}), 110: (1, {'@': 3}), 111: (1, {'@': 3}), 112: (1, {'@': 3}), 113: (1, {'@': 3}), 114: (1, {'@': 3}), 3: (1, {'@': 3}), 115: (1, {'@': 3}), 116: (1, {'@': 3}), 117: (1, {'@': 3}), 118: (1, {'@': 3}), 119: (1, {'@': 3}), 120: (1, {'@': 3}), 121: (1, {'@': 3}), 122: (1, {'@': 3}), 123: (1, {'@': 3}), 124: (1, {'@': 3}), 195: (1, {'@': 3}), 168: (1, {'@': 3})}, 177: {11: (0, 300), 12: (1, {'@': 190}), 13: (1, {'@': 190})}, 178: {10: (1, {'@': 359}), 12: (1, {'@': 359}), 13: (1, {'@': 359}), 5: (1, {'@': 359}), 4: (1, {'@': 359}), 11: (1, {'@': 359}), 169: (1, {'@': 359}), 170: (1, {'@': 359})}, 179: {4: (0, 221)}, 180: {10: (0, 695), 5: (0, 605)}, 181: {4: (0, 214)}, 182: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 131: (0, 386), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 183: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 196: (0, 180), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 197: (0, 708), 25: (0, 203), 1: (0, 614), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 10: (0, 209), 20: (0, 247), 138: (0, 287), 131: (0, 114), 54: (0, 222), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 184: {10: (0, 370)}, 185: {5: (1, {'@': 162}), 7: (1, {'@': 162}), 10: (1, {'@': 162}), 4: (1, {'@': 162}), 9: (1, {'@': 162}), 12: (1, {'@': 162}), 13: (1, {'@': 162}), 11: (1, {'@': 162}), 170: (1, {'@': 162})}, 186: {10: (0, 412), 54: (0, 88)}, 187: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486), 131: (0, 376)}, 188: {5: (1, {'@': 253}), 11: (1, {'@': 253}), 12: (1, {'@': 253}), 13: (1, {'@': 253})}, 189: {10: (1, {'@': 357}), 12: (1, {'@': 357}), 13: (1, {'@': 357}), 5: (1, {'@': 357}), 4: (1, {'@': 357}), 11: (1, {'@': 357}), 169: (1, {'@': 357}), 170: (1, {'@': 357})}, 190: {5: (1, {'@': 353}), 10: (1, {'@': 353}), 4: (1, {'@': 353}), 11: (1, {'@': 353}), 12: (1, {'@': 353}), 13: (1, {'@': 353}), 169: (1, {'@': 353}), 170: (1, {'@': 353})}, 191: {72: (1, {'@': 219}), 74: (1, {'@': 219}), 98: (1, {'@': 219}), 75: (1, {'@': 219}), 99: (1, {'@': 219}), 100: (1, {'@': 219}), 101: (1, {'@': 219}), 102: (1, {'@': 219}), 76: (1, {'@': 219}), 13: (1, {'@': 219}), 103: (1, {'@': 219}), 104: (1, {'@': 219}), 105: (1, {'@': 219}), 78: (1, {'@': 219}), 77: (1, {'@': 219}), 106: (1, {'@': 219}), 107: (1, {'@': 219}), 79: (1, {'@': 219}), 108: (1, {'@': 219}), 80: (1, {'@': 219}), 81: (1, {'@': 219}), 82: (1, {'@': 219}), 109: (1, {'@': 219}), 83: (1, {'@': 219}), 1: (1, {'@': 219}), 110: (1, {'@': 219}), 111: (1, {'@': 219}), 84: (1, {'@': 219}), 112: (1, {'@': 219}), 85: (1, {'@': 219}), 11: (1, {'@': 219}), 86: (1, {'@': 219}), 113: (1, {'@': 219}), 114: (1, {'@': 219}), 87: (1, {'@': 219}), 3: (1, {'@': 219}), 88: (1, {'@': 219}), 89: (1, {'@': 219}), 115: (1, {'@': 219}), 116: (1, {'@': 219}), 117: (1, {'@': 219}), 118: (1, {'@': 219}), 91: (1, {'@': 219}), 119: (1, {'@': 219}), 92: (1, {'@': 219}), 93: (1, {'@': 219}), 94: (1, {'@': 219}), 120: (1, {'@': 219}), 95: (1, {'@': 219}), 96: (1, {'@': 219}), 121: (1, {'@': 219}), 123: (1, {'@': 219}), 97: (1, {'@': 219}), 124: (1, {'@': 219})}, 192: {173: (0, 326), 121: (0, 335), 11: (1, {'@': 68}), 13: (1, {'@': 68}), 12: (1, {'@': 68})}, 193: {47: (0, 607), 66: (0, 515), 55: (1, {'@': 399}), 62: (1, {'@': 399}), 56: (1, {'@': 399}), 65: (1, {'@': 399}), 68: (1, {'@': 399}), 57: (1, {'@': 399}), 54: (1, {'@': 399}), 69: (1, {'@': 399}), 67: (1, {'@': 399}), 4: (1, {'@': 399}), 58: (1, {'@': 399}), 59: (1, {'@': 399}), 60: (1, {'@': 399}), 64: (1, {'@': 399}), 63: (1, {'@': 399}), 12: (1, {'@': 399}), 13: (1, {'@': 399}), 11: (1, {'@': 399}), 72: (1, {'@': 399}), 73: (1, {'@': 399}), 74: (1, {'@': 399}), 75: (1, {'@': 399}), 76: (1, {'@': 399}), 77: (1, {'@': 399}), 78: (1, {'@': 399}), 79: (1, {'@': 399}), 80: (1, {'@': 399}), 81: (1, {'@': 399}), 10: (1, {'@': 399}), 82: (1, {'@': 399}), 83: (1, {'@': 399}), 84: (1, {'@': 399}), 85: (1, {'@': 399}), 86: (1, {'@': 399}), 87: (1, {'@': 399}), 88: (1, {'@': 399}), 89: (1, {'@': 399}), 90: (1, {'@': 399}), 91: (1, {'@': 399}), 92: (1, {'@': 399}), 93: (1, {'@': 399}), 94: (1, {'@': 399}), 95: (1, {'@': 399}), 96: (1, {'@': 399}), 97: (1, {'@': 399}), 98: (1, {'@': 399}), 99: (1, {'@': 399}), 100: (1, {'@': 399}), 101: (1, {'@': 399}), 102: (1, {'@': 399}), 43: (1, {'@': 399}), 103: (1, {'@': 399}), 104: (1, {'@': 399}), 105: (1, {'@': 399}), 106: (1, {'@': 399}), 107: (1, {'@': 399}), 108: (1, {'@': 399}), 109: (1, {'@': 399}), 1: (1, {'@': 399}), 110: (1, {'@': 399}), 111: (1, {'@': 399}), 112: (1, {'@': 399}), 113: (1, {'@': 399}), 114: (1, {'@': 399}), 3: (1, {'@': 399}), 32: (1, {'@': 399}), 115: (1, {'@': 399}), 5: (1, {'@': 399}), 116: (1, {'@': 399}), 117: (1, {'@': 399}), 118: (1, {'@': 399}), 119: (1, {'@': 399}), 120: (1, {'@': 399}), 121: (1, {'@': 399}), 6: (1, {'@': 399}), 122: (1, {'@': 399}), 123: (1, {'@': 399}), 124: (1, {'@': 399})}, 194: {31: (0, 3), 25: (0, 203), 9: (0, 677), 22: (0, 11), 171: (0, 706), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 53: (0, 696), 29: (0, 474), 14: (0, 493), 15: (0, 205), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 195: {4: (0, 16)}, 196: {47: (0, 607), 66: (0, 515), 55: (1, {'@': 401}), 62: (1, {'@': 401}), 56: (1, {'@': 401}), 65: (1, {'@': 401}), 68: (1, {'@': 401}), 57: (1, {'@': 401}), 54: (1, {'@': 401}), 69: (1, {'@': 401}), 67: (1, {'@': 401}), 4: (1, {'@': 401}), 58: (1, {'@': 401}), 59: (1, {'@': 401}), 60: (1, {'@': 401}), 64: (1, {'@': 401}), 63: (1, {'@': 401}), 12: (1, {'@': 401}), 13: (1, {'@': 401}), 11: (1, {'@': 401}), 72: (1, {'@': 401}), 73: (1, {'@': 401}), 74: (1, {'@': 401}), 75: (1, {'@': 401}), 76: (1, {'@': 401}), 77: (1, {'@': 401}), 78: (1, {'@': 401}), 79: (1, {'@': 401}), 80: (1, {'@': 401}), 81: (1, {'@': 401}), 10: (1, {'@': 401}), 82: (1, {'@': 401}), 83: (1, {'@': 401}), 84: (1, {'@': 401}), 85: (1, {'@': 401}), 86: (1, {'@': 401}), 87: (1, {'@': 401}), 88: (1, {'@': 401}), 89: (1, {'@': 401}), 90: (1, {'@': 401}), 91: (1, {'@': 401}), 92: (1, {'@': 401}), 93: (1, {'@': 401}), 94: (1, {'@': 401}), 95: (1, {'@': 401}), 96: (1, {'@': 401}), 97: (1, {'@': 401}), 98: (1, {'@': 401}), 99: (1, {'@': 401}), 100: (1, {'@': 401}), 101: (1, {'@': 401}), 102: (1, {'@': 401}), 43: (1, {'@': 401}), 103: (1, {'@': 401}), 104: (1, {'@': 401}), 105: (1, {'@': 401}), 106: (1, {'@': 401}), 107: (1, {'@': 401}), 108: (1, {'@': 401}), 109: (1, {'@': 401}), 1: (1, {'@': 401}), 110: (1, {'@': 401}), 111: (1, {'@': 401}), 112: (1, {'@': 401}), 113: (1, {'@': 401}), 114: (1, {'@': 401}), 3: (1, {'@': 401}), 32: (1, {'@': 401}), 115: (1, {'@': 401}), 5: (1, {'@': 401}), 116: (1, {'@': 401}), 117: (1, {'@': 401}), 118: (1, {'@': 401}), 119: (1, {'@': 401}), 120: (1, {'@': 401}), 121: (1, {'@': 401}), 6: (1, {'@': 401}), 122: (1, {'@': 401}), 123: (1, {'@': 401}), 124: (1, {'@': 401})}, 197: {11: (1, {'@': 200}), 12: (1, {'@': 200}), 13: (1, {'@': 200})}, 198: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 122: (0, 406), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 93: (0, 630), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 199: {11: (1, {'@': 201}), 12: (1, {'@': 201}), 13: (1, {'@': 201})}, 200: {10: (1, {'@': 356}), 12: (1, {'@': 356}), 13: (1, {'@': 356}), 5: (1, {'@': 356}), 4: (1, {'@': 356}), 11: (1, {'@': 356}), 169: (1, {'@': 356}), 170: (1, {'@': 356})}, 201: {1: (0, 185), 2: (0, 4), 142: (0, 0), 0: (0, 355), 141: (0, 77), 3: (0, 264), 143: (0, 374)}, 202: {10: (0, 20), 5: (0, 380)}, 203: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 53: (0, 422), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 204: {10: (0, 328), 54: (0, 88), 5: (1, {'@': 319})}, 205: {14: (1, {'@': 378}), 15: (1, {'@': 378}), 16: (1, {'@': 378}), 17: (1, {'@': 378}), 18: (1, {'@': 378}), 19: (1, {'@': 378}), 20: (1, {'@': 378}), 21: (1, {'@': 378}), 22: (1, {'@': 378}), 23: (1, {'@': 378}), 24: (1, {'@': 378}), 25: (1, {'@': 378}), 1: (1, {'@': 378}), 26: (1, {'@': 378}), 27: (1, {'@': 378}), 28: (1, {'@': 378}), 29: (1, {'@': 378}), 30: (1, {'@': 378}), 3: (1, {'@': 378}), 31: (1, {'@': 378}), 9: (1, {'@': 378}), 32: (1, {'@': 378}), 33: (1, {'@': 378}), 34: (1, {'@': 378}), 35: (1, {'@': 378}), 36: (1, {'@': 378}), 37: (1, {'@': 378}), 38: (1, {'@': 378}), 39: (1, {'@': 378}), 40: (1, {'@': 378}), 41: (1, {'@': 378}), 42: (1, {'@': 378})}, 206: {72: (1, {'@': 5}), 74: (1, {'@': 5}), 75: (1, {'@': 5}), 76: (1, {'@': 5}), 77: (1, {'@': 5}), 78: (1, {'@': 5}), 166: (1, {'@': 5}), 79: (1, {'@': 5}), 80: (1, {'@': 5}), 81: (1, {'@': 5}), 82: (1, {'@': 5}), 44: (1, {'@': 5}), 83: (1, {'@': 5}), 84: (1, {'@': 5}), 85: (1, {'@': 5}), 11: (1, {'@': 5}), 86: (1, {'@': 5}), 163: (1, {'@': 5}), 45: (1, {'@': 5}), 87: (1, {'@': 5}), 88: (1, {'@': 5}), 89: (1, {'@': 5}), 12: (1, {'@': 5}), 91: (1, {'@': 5}), 92: (1, {'@': 5}), 93: (1, {'@': 5}), 94: (1, {'@': 5}), 95: (1, {'@': 5}), 96: (1, {'@': 5}), 164: (1, {'@': 5}), 165: (1, {'@': 5}), 97: (1, {'@': 5}), 167: (1, {'@': 5}), 98: (1, {'@': 5}), 99: (1, {'@': 5}), 100: (1, {'@': 5}), 101: (1, {'@': 5}), 102: (1, {'@': 5}), 13: (1, {'@': 5}), 103: (1, {'@': 5}), 105: (1, {'@': 5}), 104: (1, {'@': 5}), 106: (1, {'@': 5}), 107: (1, {'@': 5}), 108: (1, {'@': 5}), 109: (1, {'@': 5}), 1: (1, {'@': 5}), 110: (1, {'@': 5}), 111: (1, {'@': 5}), 112: (1, {'@': 5}), 113: (1, {'@': 5}), 114: (1, {'@': 5}), 3: (1, {'@': 5}), 115: (1, {'@': 5}), 116: (1, {'@': 5}), 117: (1, {'@': 5}), 118: (1, {'@': 5}), 119: (1, {'@': 5}), 120: (1, {'@': 5}), 121: (1, {'@': 5}), 122: (1, {'@': 5}), 123: (1, {'@': 5}), 124: (1, {'@': 5}), 195: (1, {'@': 5}), 168: (1, {'@': 5})}, 207: {198: (0, 441), 4: (0, 58), 5: (1, {'@': 342}), 10: (1, {'@': 342})}, 208: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 338), 139: (0, 505), 22: (0, 11), 42: (0, 233), 10: (0, 323), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 209: {72: (1, {'@': 315}), 56: (1, {'@': 315}), 78: (1, {'@': 315}), 80: (1, {'@': 315}), 81: (1, {'@': 315}), 68: (1, {'@': 315}), 84: (1, {'@': 315}), 69: (1, {'@': 315}), 86: (1, {'@': 315}), 71: (1, {'@': 315}), 87: (1, {'@': 315}), 89: (1, {'@': 315}), 12: (1, {'@': 315}), 93: (1, {'@': 315}), 60: (1, {'@': 315}), 63: (1, {'@': 315}), 62: (1, {'@': 315}), 97: (1, {'@': 315}), 99: (1, {'@': 315}), 100: (1, {'@': 315}), 102: (1, {'@': 315}), 43: (1, {'@': 315}), 103: (1, {'@': 315}), 105: (1, {'@': 315}), 107: (1, {'@': 315}), 108: (1, {'@': 315}), 112: (1, {'@': 315}), 67: (1, {'@': 315}), 70: (1, {'@': 315}), 64: (1, {'@': 315}), 3: (1, {'@': 315}), 9: (1, {'@': 315}), 115: (1, {'@': 315}), 5: (1, {'@': 315}), 116: (1, {'@': 315}), 125: (1, {'@': 315}), 59: (1, {'@': 315}), 120: (1, {'@': 315}), 65: (1, {'@': 315}), 6: (1, {'@': 315}), 54: (1, {'@': 315}), 123: (1, {'@': 315}), 73: (1, {'@': 315}), 74: (1, {'@': 315}), 75: (1, {'@': 315}), 76: (1, {'@': 315}), 77: (1, {'@': 315}), 79: (1, {'@': 315}), 61: (1, {'@': 315}), 10: (1, {'@': 315}), 82: (1, {'@': 315}), 66: (1, {'@': 315}), 83: (1, {'@': 315}), 85: (1, {'@': 315}), 11: (1, {'@': 315}), 88: (1, {'@': 315}), 90: (1, {'@': 315}), 91: (1, {'@': 315}), 92: (1, {'@': 315}), 94: (1, {'@': 315}), 47: (1, {'@': 315}), 95: (1, {'@': 315}), 96: (1, {'@': 315}), 4: (1, {'@': 315}), 55: (1, {'@': 315}), 98: (1, {'@': 315}), 101: (1, {'@': 315}), 13: (1, {'@': 315}), 104: (1, {'@': 315}), 106: (1, {'@': 315}), 58: (1, {'@': 315}), 109: (1, {'@': 315}), 1: (1, {'@': 315}), 110: (1, {'@': 315}), 111: (1, {'@': 315}), 113: (1, {'@': 315}), 114: (1, {'@': 315}), 32: (1, {'@': 315}), 57: (1, {'@': 315}), 117: (1, {'@': 315}), 118: (1, {'@': 315}), 119: (1, {'@': 315}), 121: (1, {'@': 315}), 122: (1, {'@': 315}), 124: (1, {'@': 315})}, 210: {54: (0, 88), 5: (1, {'@': 319}), 10: (1, {'@': 319})}, 211: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 191: (0, 62), 81: (0, 786), 11: (0, 632), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 116: (0, 774), 155: (0, 651), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 192: (0, 92), 193: (0, 480), 122: (0, 733), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 194: (0, 361), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 13: (1, {'@': 148})}, 212: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 136: (0, 403), 23: (0, 219), 29: (0, 474), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 135: (0, 101), 49: (0, 373), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 213: {72: (1, {'@': 286}), 56: (1, {'@': 286}), 78: (1, {'@': 286}), 80: (1, {'@': 286}), 81: (1, {'@': 286}), 68: (1, {'@': 286}), 84: (1, {'@': 286}), 69: (1, {'@': 286}), 86: (1, {'@': 286}), 71: (1, {'@': 286}), 87: (1, {'@': 286}), 89: (1, {'@': 286}), 12: (1, {'@': 286}), 93: (1, {'@': 286}), 60: (1, {'@': 286}), 63: (1, {'@': 286}), 62: (1, {'@': 286}), 97: (1, {'@': 286}), 99: (1, {'@': 286}), 100: (1, {'@': 286}), 102: (1, {'@': 286}), 43: (1, {'@': 286}), 103: (1, {'@': 286}), 105: (1, {'@': 286}), 107: (1, {'@': 286}), 108: (1, {'@': 286}), 112: (1, {'@': 286}), 70: (1, {'@': 286}), 64: (1, {'@': 286}), 67: (1, {'@': 286}), 3: (1, {'@': 286}), 9: (1, {'@': 286}), 115: (1, {'@': 286}), 116: (1, {'@': 286}), 5: (1, {'@': 286}), 125: (1, {'@': 286}), 59: (1, {'@': 286}), 120: (1, {'@': 286}), 65: (1, {'@': 286}), 6: (1, {'@': 286}), 54: (1, {'@': 286}), 123: (1, {'@': 286}), 73: (1, {'@': 286}), 74: (1, {'@': 286}), 75: (1, {'@': 286}), 76: (1, {'@': 286}), 77: (1, {'@': 286}), 79: (1, {'@': 286}), 61: (1, {'@': 286}), 82: (1, {'@': 286}), 10: (1, {'@': 286}), 66: (1, {'@': 286}), 83: (1, {'@': 286}), 85: (1, {'@': 286}), 11: (1, {'@': 286}), 88: (1, {'@': 286}), 90: (1, {'@': 286}), 91: (1, {'@': 286}), 92: (1, {'@': 286}), 94: (1, {'@': 286}), 47: (1, {'@': 286}), 95: (1, {'@': 286}), 96: (1, {'@': 286}), 4: (1, {'@': 286}), 55: (1, {'@': 286}), 98: (1, {'@': 286}), 101: (1, {'@': 286}), 13: (1, {'@': 286}), 104: (1, {'@': 286}), 106: (1, {'@': 286}), 58: (1, {'@': 286}), 109: (1, {'@': 286}), 1: (1, {'@': 286}), 110: (1, {'@': 286}), 111: (1, {'@': 286}), 113: (1, {'@': 286}), 114: (1, {'@': 286}), 32: (1, {'@': 286}), 57: (1, {'@': 286}), 117: (1, {'@': 286}), 118: (1, {'@': 286}), 119: (1, {'@': 286}), 121: (1, {'@': 286}), 122: (1, {'@': 286}), 124: (1, {'@': 286})}, 214: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 131: (0, 442), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 215: {72: (1, {'@': 281}), 56: (1, {'@': 281}), 78: (1, {'@': 281}), 80: (1, {'@': 281}), 81: (1, {'@': 281}), 68: (1, {'@': 281}), 84: (1, {'@': 281}), 69: (1, {'@': 281}), 86: (1, {'@': 281}), 71: (1, {'@': 281}), 87: (1, {'@': 281}), 89: (1, {'@': 281}), 12: (1, {'@': 281}), 93: (1, {'@': 281}), 60: (1, {'@': 281}), 63: (1, {'@': 281}), 62: (1, {'@': 281}), 97: (1, {'@': 281}), 99: (1, {'@': 281}), 100: (1, {'@': 281}), 102: (1, {'@': 281}), 43: (1, {'@': 281}), 103: (1, {'@': 281}), 105: (1, {'@': 281}), 107: (1, {'@': 281}), 108: (1, {'@': 281}), 112: (1, {'@': 281}), 70: (1, {'@': 281}), 64: (1, {'@': 281}), 67: (1, {'@': 281}), 3: (1, {'@': 281}), 9: (1, {'@': 281}), 115: (1, {'@': 281}), 116: (1, {'@': 281}), 5: (1, {'@': 281}), 125: (1, {'@': 281}), 59: (1, {'@': 281}), 120: (1, {'@': 281}), 65: (1, {'@': 281}), 6: (1, {'@': 281}), 54: (1, {'@': 281}), 123: (1, {'@': 281}), 73: (1, {'@': 281}), 74: (1, {'@': 281}), 75: (1, {'@': 281}), 76: (1, {'@': 281}), 77: (1, {'@': 281}), 79: (1, {'@': 281}), 61: (1, {'@': 281}), 82: (1, {'@': 281}), 10: (1, {'@': 281}), 66: (1, {'@': 281}), 83: (1, {'@': 281}), 85: (1, {'@': 281}), 11: (1, {'@': 281}), 88: (1, {'@': 281}), 90: (1, {'@': 281}), 91: (1, {'@': 281}), 92: (1, {'@': 281}), 94: (1, {'@': 281}), 47: (1, {'@': 281}), 95: (1, {'@': 281}), 96: (1, {'@': 281}), 4: (1, {'@': 281}), 55: (1, {'@': 281}), 98: (1, {'@': 281}), 101: (1, {'@': 281}), 13: (1, {'@': 281}), 104: (1, {'@': 281}), 106: (1, {'@': 281}), 58: (1, {'@': 281}), 109: (1, {'@': 281}), 1: (1, {'@': 281}), 110: (1, {'@': 281}), 111: (1, {'@': 281}), 113: (1, {'@': 281}), 114: (1, {'@': 281}), 32: (1, {'@': 281}), 57: (1, {'@': 281}), 117: (1, {'@': 281}), 118: (1, {'@': 281}), 119: (1, {'@': 281}), 121: (1, {'@': 281}), 122: (1, {'@': 281}), 124: (1, {'@': 281})}, 216: {5: (0, 605), 11: (1, {'@': 74}), 13: (1, {'@': 74}), 12: (1, {'@': 74})}, 217: {11: (1, {'@': 44}), 13: (1, {'@': 44}), 12: (1, {'@': 44})}, 218: {4: (0, 330), 169: (0, 371), 11: (1, {'@': 166}), 170: (1, {'@': 166}), 13: (1, {'@': 166}), 12: (1, {'@': 166})}, 219: {14: (1, {'@': 377}), 15: (1, {'@': 377}), 16: (1, {'@': 377}), 17: (1, {'@': 377}), 18: (1, {'@': 377}), 19: (1, {'@': 377}), 20: (1, {'@': 377}), 21: (1, {'@': 377}), 22: (1, {'@': 377}), 23: (1, {'@': 377}), 24: (1, {'@': 377}), 25: (1, {'@': 377}), 1: (1, {'@': 377}), 26: (1, {'@': 377}), 27: (1, {'@': 377}), 28: (1, {'@': 377}), 29: (1, {'@': 377}), 30: (1, {'@': 377}), 3: (1, {'@': 377}), 31: (1, {'@': 377}), 9: (1, {'@': 377}), 32: (1, {'@': 377}), 33: (1, {'@': 377}), 34: (1, {'@': 377}), 35: (1, {'@': 377}), 36: (1, {'@': 377}), 37: (1, {'@': 377}), 38: (1, {'@': 377}), 39: (1, {'@': 377}), 40: (1, {'@': 377}), 41: (1, {'@': 377}), 42: (1, {'@': 377})}, 220: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 131: (0, 61), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 221: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 131: (0, 438), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 222: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 10: (0, 232), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 131: (0, 235), 37: (0, 494), 48: (0, 486)}, 223: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 11: (0, 73), 93: (0, 630), 164: (0, 531), 185: (0, 344), 98: (0, 544), 118: (0, 548), 157: (0, 552), 13: (0, 627), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 175: (0, 619), 94: (0, 584), 82: (0, 568), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 224: {5: (1, {'@': 340}), 10: (1, {'@': 340})}, 225: {5: (1, {'@': 248}), 11: (1, {'@': 248}), 12: (1, {'@': 248}), 43: (1, {'@': 248}), 13: (1, {'@': 248})}, 226: {5: (1, {'@': 337}), 10: (1, {'@': 337})}, 227: {11: (1, {'@': 34}), 13: (1, {'@': 34}), 12: (1, {'@': 34})}, 228: {11: (1, {'@': 40}), 13: (1, {'@': 40}), 12: (1, {'@': 40})}, 229: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 10: (0, 1), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 131: (0, 35), 48: (0, 486)}, 230: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 95), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 231: {3: (0, 391), 11: (1, {'@': 216}), 12: (1, {'@': 216}), 13: (1, {'@': 216})}, 232: {72: (1, {'@': 312}), 56: (1, {'@': 312}), 78: (1, {'@': 312}), 80: (1, {'@': 312}), 81: (1, {'@': 312}), 68: (1, {'@': 312}), 84: (1, {'@': 312}), 69: (1, {'@': 312}), 86: (1, {'@': 312}), 71: (1, {'@': 312}), 87: (1, {'@': 312}), 89: (1, {'@': 312}), 12: (1, {'@': 312}), 93: (1, {'@': 312}), 60: (1, {'@': 312}), 63: (1, {'@': 312}), 62: (1, {'@': 312}), 97: (1, {'@': 312}), 99: (1, {'@': 312}), 100: (1, {'@': 312}), 102: (1, {'@': 312}), 43: (1, {'@': 312}), 103: (1, {'@': 312}), 105: (1, {'@': 312}), 107: (1, {'@': 312}), 108: (1, {'@': 312}), 112: (1, {'@': 312}), 70: (1, {'@': 312}), 67: (1, {'@': 312}), 64: (1, {'@': 312}), 3: (1, {'@': 312}), 9: (1, {'@': 312}), 115: (1, {'@': 312}), 5: (1, {'@': 312}), 116: (1, {'@': 312}), 125: (1, {'@': 312}), 59: (1, {'@': 312}), 120: (1, {'@': 312}), 65: (1, {'@': 312}), 6: (1, {'@': 312}), 54: (1, {'@': 312}), 123: (1, {'@': 312}), 73: (1, {'@': 312}), 74: (1, {'@': 312}), 75: (1, {'@': 312}), 76: (1, {'@': 312}), 77: (1, {'@': 312}), 79: (1, {'@': 312}), 61: (1, {'@': 312}), 10: (1, {'@': 312}), 82: (1, {'@': 312}), 66: (1, {'@': 312}), 83: (1, {'@': 312}), 85: (1, {'@': 312}), 11: (1, {'@': 312}), 88: (1, {'@': 312}), 90: (1, {'@': 312}), 91: (1, {'@': 312}), 92: (1, {'@': 312}), 94: (1, {'@': 312}), 47: (1, {'@': 312}), 95: (1, {'@': 312}), 96: (1, {'@': 312}), 4: (1, {'@': 312}), 55: (1, {'@': 312}), 98: (1, {'@': 312}), 101: (1, {'@': 312}), 13: (1, {'@': 312}), 104: (1, {'@': 312}), 106: (1, {'@': 312}), 58: (1, {'@': 312}), 109: (1, {'@': 312}), 1: (1, {'@': 312}), 110: (1, {'@': 312}), 111: (1, {'@': 312}), 113: (1, {'@': 312}), 114: (1, {'@': 312}), 32: (1, {'@': 312}), 57: (1, {'@': 312}), 117: (1, {'@': 312}), 118: (1, {'@': 312}), 119: (1, {'@': 312}), 121: (1, {'@': 312}), 122: (1, {'@': 312}), 124: (1, {'@': 312})}, 233: {14: (1, {'@': 375}), 15: (1, {'@': 375}), 16: (1, {'@': 375}), 17: (1, {'@': 375}), 18: (1, {'@': 375}), 19: (1, {'@': 375}), 20: (1, {'@': 375}), 21: (1, {'@': 375}), 22: (1, {'@': 375}), 23: (1, {'@': 375}), 24: (1, {'@': 375}), 25: (1, {'@': 375}), 1: (1, {'@': 375}), 26: (1, {'@': 375}), 27: (1, {'@': 375}), 28: (1, {'@': 375}), 29: (1, {'@': 375}), 30: (1, {'@': 375}), 3: (1, {'@': 375}), 31: (1, {'@': 375}), 9: (1, {'@': 375}), 32: (1, {'@': 375}), 33: (1, {'@': 375}), 34: (1, {'@': 375}), 35: (1, {'@': 375}), 36: (1, {'@': 375}), 37: (1, {'@': 375}), 38: (1, {'@': 375}), 39: (1, {'@': 375}), 40: (1, {'@': 375}), 41: (1, {'@': 375}), 42: (1, {'@': 375})}, 234: {11: (1, {'@': 37}), 13: (1, {'@': 37}), 12: (1, {'@': 37})}, 235: {10: (0, 461)}, 236: {5: (1, {'@': 338}), 10: (1, {'@': 338})}, 237: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 136: (0, 403), 23: (0, 219), 29: (0, 474), 137: (0, 121), 14: (0, 493), 15: (0, 205), 135: (0, 675), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 238: {11: (1, {'@': 62}), 13: (1, {'@': 62}), 12: (1, {'@': 62})}, 239: {4: (0, 465)}, 240: {61: (0, 212), 70: (0, 362), 55: (1, {'@': 407}), 56: (1, {'@': 407}), 57: (1, {'@': 407}), 58: (1, {'@': 407}), 59: (1, {'@': 407}), 60: (1, {'@': 407}), 47: (1, {'@': 407}), 62: (1, {'@': 407}), 63: (1, {'@': 407}), 65: (1, {'@': 407}), 66: (1, {'@': 407}), 68: (1, {'@': 407}), 54: (1, {'@': 407}), 4: (1, {'@': 407}), 69: (1, {'@': 407}), 67: (1, {'@': 407}), 64: (1, {'@': 407}), 71: (1, {'@': 407}), 12: (1, {'@': 407}), 13: (1, {'@': 407}), 11: (1, {'@': 407}), 72: (1, {'@': 407}), 73: (1, {'@': 407}), 74: (1, {'@': 407}), 75: (1, {'@': 407}), 76: (1, {'@': 407}), 77: (1, {'@': 407}), 78: (1, {'@': 407}), 79: (1, {'@': 407}), 80: (1, {'@': 407}), 81: (1, {'@': 407}), 10: (1, {'@': 407}), 82: (1, {'@': 407}), 83: (1, {'@': 407}), 84: (1, {'@': 407}), 85: (1, {'@': 407}), 86: (1, {'@': 407}), 87: (1, {'@': 407}), 88: (1, {'@': 407}), 89: (1, {'@': 407}), 90: (1, {'@': 407}), 91: (1, {'@': 407}), 92: (1, {'@': 407}), 93: (1, {'@': 407}), 94: (1, {'@': 407}), 95: (1, {'@': 407}), 96: (1, {'@': 407}), 97: (1, {'@': 407}), 98: (1, {'@': 407}), 99: (1, {'@': 407}), 100: (1, {'@': 407}), 101: (1, {'@': 407}), 102: (1, {'@': 407}), 43: (1, {'@': 407}), 103: (1, {'@': 407}), 104: (1, {'@': 407}), 105: (1, {'@': 407}), 106: (1, {'@': 407}), 107: (1, {'@': 407}), 108: (1, {'@': 407}), 109: (1, {'@': 407}), 1: (1, {'@': 407}), 110: (1, {'@': 407}), 111: (1, {'@': 407}), 112: (1, {'@': 407}), 113: (1, {'@': 407}), 114: (1, {'@': 407}), 3: (1, {'@': 407}), 32: (1, {'@': 407}), 115: (1, {'@': 407}), 5: (1, {'@': 407}), 116: (1, {'@': 407}), 117: (1, {'@': 407}), 118: (1, {'@': 407}), 119: (1, {'@': 407}), 120: (1, {'@': 407}), 121: (1, {'@': 407}), 6: (1, {'@': 407}), 122: (1, {'@': 407}), 123: (1, {'@': 407}), 124: (1, {'@': 407})}, 241: {164: (0, 531), 175: (0, 619), 165: (0, 586), 120: (0, 550), 185: (0, 336)}, 242: {9: (1, {'@': 163}), 12: (1, {'@': 163}), 13: (1, {'@': 163}), 5: (1, {'@': 163}), 7: (1, {'@': 163}), 4: (1, {'@': 163}), 11: (1, {'@': 163}), 170: (1, {'@': 163})}, 243: {31: (0, 3), 126: (0, 96), 50: (0, 125), 131: (0, 64), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 244: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 199: (0, 620), 148: (0, 769), 149: (0, 779), 13: (0, 707), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 83: (0, 720), 175: (0, 593), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 200: (0, 731), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 658), 114: (0, 759), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 192: (0, 577), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 625), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 165: (1, {'@': 149}), 164: (1, {'@': 149}), 122: (1, {'@': 149}), 12: (1, {'@': 149}), 166: (1, {'@': 149}), 45: (1, {'@': 149}), 44: (1, {'@': 149}), 163: (1, {'@': 149}), 167: (1, {'@': 149})}, 245: {11: (1, {'@': 229}), 12: (1, {'@': 229}), 13: (1, {'@': 229})}, 246: {11: (1, {'@': 102}), 13: (1, {'@': 102}), 12: (1, {'@': 102})}, 247: {14: (1, {'@': 379}), 15: (1, {'@': 379}), 16: (1, {'@': 379}), 17: (1, {'@': 379}), 18: (1, {'@': 379}), 19: (1, {'@': 379}), 20: (1, {'@': 379}), 21: (1, {'@': 379}), 22: (1, {'@': 379}), 23: (1, {'@': 379}), 24: (1, {'@': 379}), 25: (1, {'@': 379}), 1: (1, {'@': 379}), 26: (1, {'@': 379}), 27: (1, {'@': 379}), 28: (1, {'@': 379}), 29: (1, {'@': 379}), 30: (1, {'@': 379}), 3: (1, {'@': 379}), 31: (1, {'@': 379}), 9: (1, {'@': 379}), 32: (1, {'@': 379}), 33: (1, {'@': 379}), 34: (1, {'@': 379}), 35: (1, {'@': 379}), 36: (1, {'@': 379}), 37: (1, {'@': 379}), 38: (1, {'@': 379}), 39: (1, {'@': 379}), 40: (1, {'@': 379}), 41: (1, {'@': 379}), 42: (1, {'@': 379})}, 248: {14: (1, {'@': 263}), 15: (1, {'@': 263}), 16: (1, {'@': 263}), 17: (1, {'@': 263}), 18: (1, {'@': 263}), 19: (1, {'@': 263}), 20: (1, {'@': 263}), 21: (1, {'@': 263}), 22: (1, {'@': 263}), 23: (1, {'@': 263}), 24: (1, {'@': 263}), 25: (1, {'@': 263}), 1: (1, {'@': 263}), 26: (1, {'@': 263}), 27: (1, {'@': 263}), 28: (1, {'@': 263}), 46: (1, {'@': 263}), 29: (1, {'@': 263}), 30: (1, {'@': 263}), 3: (1, {'@': 263}), 31: (1, {'@': 263}), 9: (1, {'@': 263}), 32: (1, {'@': 263}), 34: (1, {'@': 263}), 33: (1, {'@': 263}), 5: (1, {'@': 263}), 35: (1, {'@': 263}), 36: (1, {'@': 263}), 37: (1, {'@': 263}), 47: (1, {'@': 263}), 38: (1, {'@': 263}), 48: (1, {'@': 263}), 39: (1, {'@': 263}), 49: (1, {'@': 263}), 40: (1, {'@': 263}), 41: (1, {'@': 263}), 42: (1, {'@': 263})}, 249: {170: (0, 220), 4: (0, 243), 11: (1, {'@': 153}), 13: (1, {'@': 153}), 12: (1, {'@': 153})}, 250: {3: (0, 137)}, 251: {71: (0, 725), 55: (1, {'@': 403}), 56: (1, {'@': 403}), 57: (1, {'@': 403}), 58: (1, {'@': 403}), 59: (1, {'@': 403}), 60: (1, {'@': 403}), 64: (1, {'@': 403}), 47: (1, {'@': 403}), 62: (1, {'@': 403}), 63: (1, {'@': 403}), 65: (1, {'@': 403}), 66: (1, {'@': 403}), 68: (1, {'@': 403}), 54: (1, {'@': 403}), 69: (1, {'@': 403}), 67: (1, {'@': 403}), 4: (1, {'@': 403}), 12: (1, {'@': 403}), 13: (1, {'@': 403}), 11: (1, {'@': 403}), 72: (1, {'@': 403}), 73: (1, {'@': 403}), 74: (1, {'@': 403}), 75: (1, {'@': 403}), 76: (1, {'@': 403}), 77: (1, {'@': 403}), 78: (1, {'@': 403}), 79: (1, {'@': 403}), 80: (1, {'@': 403}), 81: (1, {'@': 403}), 10: (1, {'@': 403}), 82: (1, {'@': 403}), 83: (1, {'@': 403}), 84: (1, {'@': 403}), 85: (1, {'@': 403}), 86: (1, {'@': 403}), 87: (1, {'@': 403}), 88: (1, {'@': 403}), 89: (1, {'@': 403}), 90: (1, {'@': 403}), 91: (1, {'@': 403}), 92: (1, {'@': 403}), 93: (1, {'@': 403}), 94: (1, {'@': 403}), 95: (1, {'@': 403}), 96: (1, {'@': 403}), 97: (1, {'@': 403}), 98: (1, {'@': 403}), 99: (1, {'@': 403}), 100: (1, {'@': 403}), 101: (1, {'@': 403}), 102: (1, {'@': 403}), 43: (1, {'@': 403}), 103: (1, {'@': 403}), 104: (1, {'@': 403}), 105: (1, {'@': 403}), 106: (1, {'@': 403}), 107: (1, {'@': 403}), 108: (1, {'@': 403}), 109: (1, {'@': 403}), 1: (1, {'@': 403}), 110: (1, {'@': 403}), 111: (1, {'@': 403}), 112: (1, {'@': 403}), 113: (1, {'@': 403}), 114: (1, {'@': 403}), 3: (1, {'@': 403}), 32: (1, {'@': 403}), 115: (1, {'@': 403}), 5: (1, {'@': 403}), 116: (1, {'@': 403}), 117: (1, {'@': 403}), 118: (1, {'@': 403}), 119: (1, {'@': 403}), 120: (1, {'@': 403}), 121: (1, {'@': 403}), 6: (1, {'@': 403}), 122: (1, {'@': 403}), 123: (1, {'@': 403}), 124: (1, {'@': 403})}, 252: {72: (1, {'@': 290}), 56: (1, {'@': 290}), 78: (1, {'@': 290}), 80: (1, {'@': 290}), 81: (1, {'@': 290}), 68: (1, {'@': 290}), 84: (1, {'@': 290}), 69: (1, {'@': 290}), 86: (1, {'@': 290}), 71: (1, {'@': 290}), 87: (1, {'@': 290}), 89: (1, {'@': 290}), 12: (1, {'@': 290}), 93: (1, {'@': 290}), 60: (1, {'@': 290}), 63: (1, {'@': 290}), 62: (1, {'@': 290}), 97: (1, {'@': 290}), 99: (1, {'@': 290}), 100: (1, {'@': 290}), 102: (1, {'@': 290}), 43: (1, {'@': 290}), 103: (1, {'@': 290}), 105: (1, {'@': 290}), 107: (1, {'@': 290}), 108: (1, {'@': 290}), 112: (1, {'@': 290}), 70: (1, {'@': 290}), 64: (1, {'@': 290}), 67: (1, {'@': 290}), 3: (1, {'@': 290}), 9: (1, {'@': 290}), 115: (1, {'@': 290}), 116: (1, {'@': 290}), 5: (1, {'@': 290}), 125: (1, {'@': 290}), 59: (1, {'@': 290}), 120: (1, {'@': 290}), 65: (1, {'@': 290}), 6: (1, {'@': 290}), 54: (1, {'@': 290}), 123: (1, {'@': 290}), 73: (1, {'@': 290}), 74: (1, {'@': 290}), 75: (1, {'@': 290}), 76: (1, {'@': 290}), 77: (1, {'@': 290}), 79: (1, {'@': 290}), 61: (1, {'@': 290}), 82: (1, {'@': 290}), 10: (1, {'@': 290}), 66: (1, {'@': 290}), 83: (1, {'@': 290}), 85: (1, {'@': 290}), 11: (1, {'@': 290}), 88: (1, {'@': 290}), 90: (1, {'@': 290}), 91: (1, {'@': 290}), 92: (1, {'@': 290}), 94: (1, {'@': 290}), 47: (1, {'@': 290}), 95: (1, {'@': 290}), 96: (1, {'@': 290}), 4: (1, {'@': 290}), 55: (1, {'@': 290}), 98: (1, {'@': 290}), 101: (1, {'@': 290}), 13: (1, {'@': 290}), 104: (1, {'@': 290}), 106: (1, {'@': 290}), 58: (1, {'@': 290}), 109: (1, {'@': 290}), 1: (1, {'@': 290}), 110: (1, {'@': 290}), 111: (1, {'@': 290}), 113: (1, {'@': 290}), 114: (1, {'@': 290}), 32: (1, {'@': 290}), 57: (1, {'@': 290}), 117: (1, {'@': 290}), 118: (1, {'@': 290}), 119: (1, {'@': 290}), 121: (1, {'@': 290}), 122: (1, {'@': 290}), 124: (1, {'@': 290})}, 253: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 93: (0, 630), 164: (0, 531), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 175: (0, 619), 94: (0, 584), 82: (0, 568), 159: (0, 595), 185: (0, 350), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 254: {4: (0, 722), 69: (0, 559), 58: (0, 739), 59: (0, 673), 62: (0, 756), 64: (0, 767), 57: (1, {'@': 388}), 56: (1, {'@': 388}), 54: (1, {'@': 388}), 63: (1, {'@': 388}), 11: (1, {'@': 388}), 12: (1, {'@': 388}), 13: (1, {'@': 388}), 72: (1, {'@': 388}), 73: (1, {'@': 388}), 74: (1, {'@': 388}), 75: (1, {'@': 388}), 76: (1, {'@': 388}), 77: (1, {'@': 388}), 78: (1, {'@': 388}), 79: (1, {'@': 388}), 80: (1, {'@': 388}), 81: (1, {'@': 388}), 10: (1, {'@': 388}), 82: (1, {'@': 388}), 83: (1, {'@': 388}), 84: (1, {'@': 388}), 85: (1, {'@': 388}), 86: (1, {'@': 388}), 87: (1, {'@': 388}), 88: (1, {'@': 388}), 89: (1, {'@': 388}), 90: (1, {'@': 388}), 91: (1, {'@': 388}), 92: (1, {'@': 388}), 93: (1, {'@': 388}), 94: (1, {'@': 388}), 95: (1, {'@': 388}), 96: (1, {'@': 388}), 97: (1, {'@': 388}), 98: (1, {'@': 388}), 99: (1, {'@': 388}), 100: (1, {'@': 388}), 101: (1, {'@': 388}), 102: (1, {'@': 388}), 43: (1, {'@': 388}), 103: (1, {'@': 388}), 104: (1, {'@': 388}), 105: (1, {'@': 388}), 106: (1, {'@': 388}), 107: (1, {'@': 388}), 108: (1, {'@': 388}), 109: (1, {'@': 388}), 1: (1, {'@': 388}), 110: (1, {'@': 388}), 111: (1, {'@': 388}), 112: (1, {'@': 388}), 113: (1, {'@': 388}), 114: (1, {'@': 388}), 3: (1, {'@': 388}), 32: (1, {'@': 388}), 115: (1, {'@': 388}), 5: (1, {'@': 388}), 116: (1, {'@': 388}), 117: (1, {'@': 388}), 118: (1, {'@': 388}), 119: (1, {'@': 388}), 120: (1, {'@': 388}), 121: (1, {'@': 388}), 6: (1, {'@': 388}), 122: (1, {'@': 388}), 123: (1, {'@': 388}), 124: (1, {'@': 388})}, 255: {71: (0, 725), 55: (1, {'@': 404}), 56: (1, {'@': 404}), 57: (1, {'@': 404}), 58: (1, {'@': 404}), 59: (1, {'@': 404}), 60: (1, {'@': 404}), 64: (1, {'@': 404}), 47: (1, {'@': 404}), 62: (1, {'@': 404}), 63: (1, {'@': 404}), 65: (1, {'@': 404}), 66: (1, {'@': 404}), 68: (1, {'@': 404}), 54: (1, {'@': 404}), 69: (1, {'@': 404}), 67: (1, {'@': 404}), 4: (1, {'@': 404}), 12: (1, {'@': 404}), 13: (1, {'@': 404}), 11: (1, {'@': 404}), 72: (1, {'@': 404}), 73: (1, {'@': 404}), 74: (1, {'@': 404}), 75: (1, {'@': 404}), 76: (1, {'@': 404}), 77: (1, {'@': 404}), 78: (1, {'@': 404}), 79: (1, {'@': 404}), 80: (1, {'@': 404}), 81: (1, {'@': 404}), 10: (1, {'@': 404}), 82: (1, {'@': 404}), 83: (1, {'@': 404}), 84: (1, {'@': 404}), 85: (1, {'@': 404}), 86: (1, {'@': 404}), 87: (1, {'@': 404}), 88: (1, {'@': 404}), 89: (1, {'@': 404}), 90: (1, {'@': 404}), 91: (1, {'@': 404}), 92: (1, {'@': 404}), 93: (1, {'@': 404}), 94: (1, {'@': 404}), 95: (1, {'@': 404}), 96: (1, {'@': 404}), 97: (1, {'@': 404}), 98: (1, {'@': 404}), 99: (1, {'@': 404}), 100: (1, {'@': 404}), 101: (1, {'@': 404}), 102: (1, {'@': 404}), 43: (1, {'@': 404}), 103: (1, {'@': 404}), 104: (1, {'@': 404}), 105: (1, {'@': 404}), 106: (1, {'@': 404}), 107: (1, {'@': 404}), 108: (1, {'@': 404}), 109: (1, {'@': 404}), 1: (1, {'@': 404}), 110: (1, {'@': 404}), 111: (1, {'@': 404}), 112: (1, {'@': 404}), 113: (1, {'@': 404}), 114: (1, {'@': 404}), 3: (1, {'@': 404}), 32: (1, {'@': 404}), 115: (1, {'@': 404}), 5: (1, {'@': 404}), 116: (1, {'@': 404}), 117: (1, {'@': 404}), 118: (1, {'@': 404}), 119: (1, {'@': 404}), 120: (1, {'@': 404}), 121: (1, {'@': 404}), 6: (1, {'@': 404}), 122: (1, {'@': 404}), 123: (1, {'@': 404}), 124: (1, {'@': 404})}, 256: {72: (1, {'@': 324}), 74: (1, {'@': 324}), 98: (1, {'@': 324}), 75: (1, {'@': 324}), 99: (1, {'@': 324}), 100: (1, {'@': 324}), 101: (1, {'@': 324}), 102: (1, {'@': 324}), 76: (1, {'@': 324}), 13: (1, {'@': 324}), 103: (1, {'@': 324}), 104: (1, {'@': 324}), 105: (1, {'@': 324}), 78: (1, {'@': 324}), 77: (1, {'@': 324}), 106: (1, {'@': 324}), 107: (1, {'@': 324}), 79: (1, {'@': 324}), 108: (1, {'@': 324}), 80: (1, {'@': 324}), 81: (1, {'@': 324}), 82: (1, {'@': 324}), 109: (1, {'@': 324}), 83: (1, {'@': 324}), 1: (1, {'@': 324}), 110: (1, {'@': 324}), 111: (1, {'@': 324}), 84: (1, {'@': 324}), 112: (1, {'@': 324}), 85: (1, {'@': 324}), 11: (1, {'@': 324}), 86: (1, {'@': 324}), 113: (1, {'@': 324}), 114: (1, {'@': 324}), 163: (1, {'@': 324}), 87: (1, {'@': 324}), 3: (1, {'@': 324}), 88: (1, {'@': 324}), 89: (1, {'@': 324}), 115: (1, {'@': 324}), 116: (1, {'@': 324}), 117: (1, {'@': 324}), 118: (1, {'@': 324}), 91: (1, {'@': 324}), 119: (1, {'@': 324}), 92: (1, {'@': 324}), 93: (1, {'@': 324}), 94: (1, {'@': 324}), 120: (1, {'@': 324}), 95: (1, {'@': 324}), 96: (1, {'@': 324}), 121: (1, {'@': 324}), 123: (1, {'@': 324}), 97: (1, {'@': 324}), 124: (1, {'@': 324}), 167: (1, {'@': 324})}, 257: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 54: (0, 222), 15: (0, 205), 32: (0, 504), 30: (0, 194), 131: (0, 186), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 258: {10: (0, 449), 54: (0, 88)}, 259: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 131: (0, 127), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 260: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 196: (0, 180), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 197: (0, 708), 25: (0, 203), 1: (0, 614), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 10: (0, 209), 20: (0, 247), 138: (0, 287), 131: (0, 204), 54: (0, 222), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 261: {11: (1, {'@': 50}), 13: (1, {'@': 50}), 12: (1, {'@': 50})}, 262: {67: (0, 676), 62: (1, {'@': 393}), 56: (1, {'@': 393}), 57: (1, {'@': 393}), 54: (1, {'@': 393}), 69: (1, {'@': 393}), 4: (1, {'@': 393}), 58: (1, {'@': 393}), 59: (1, {'@': 393}), 64: (1, {'@': 393}), 63: (1, {'@': 393}), 11: (1, {'@': 393}), 12: (1, {'@': 393}), 13: (1, {'@': 393}), 72: (1, {'@': 393}), 73: (1, {'@': 393}), 74: (1, {'@': 393}), 75: (1, {'@': 393}), 76: (1, {'@': 393}), 77: (1, {'@': 393}), 78: (1, {'@': 393}), 79: (1, {'@': 393}), 80: (1, {'@': 393}), 81: (1, {'@': 393}), 10: (1, {'@': 393}), 82: (1, {'@': 393}), 83: (1, {'@': 393}), 84: (1, {'@': 393}), 85: (1, {'@': 393}), 86: (1, {'@': 393}), 87: (1, {'@': 393}), 88: (1, {'@': 393}), 89: (1, {'@': 393}), 90: (1, {'@': 393}), 91: (1, {'@': 393}), 92: (1, {'@': 393}), 93: (1, {'@': 393}), 94: (1, {'@': 393}), 95: (1, {'@': 393}), 96: (1, {'@': 393}), 97: (1, {'@': 393}), 98: (1, {'@': 393}), 99: (1, {'@': 393}), 100: (1, {'@': 393}), 101: (1, {'@': 393}), 102: (1, {'@': 393}), 43: (1, {'@': 393}), 103: (1, {'@': 393}), 104: (1, {'@': 393}), 105: (1, {'@': 393}), 106: (1, {'@': 393}), 107: (1, {'@': 393}), 108: (1, {'@': 393}), 109: (1, {'@': 393}), 1: (1, {'@': 393}), 110: (1, {'@': 393}), 111: (1, {'@': 393}), 112: (1, {'@': 393}), 113: (1, {'@': 393}), 114: (1, {'@': 393}), 3: (1, {'@': 393}), 32: (1, {'@': 393}), 115: (1, {'@': 393}), 5: (1, {'@': 393}), 116: (1, {'@': 393}), 117: (1, {'@': 393}), 118: (1, {'@': 393}), 119: (1, {'@': 393}), 120: (1, {'@': 393}), 121: (1, {'@': 393}), 6: (1, {'@': 393}), 122: (1, {'@': 393}), 123: (1, {'@': 393}), 124: (1, {'@': 393})}, 263: {11: (1, {'@': 101}), 13: (1, {'@': 101}), 12: (1, {'@': 101})}, 264: {5: (1, {'@': 161}), 7: (1, {'@': 161}), 10: (1, {'@': 161}), 4: (1, {'@': 161}), 9: (1, {'@': 161}), 12: (1, {'@': 161}), 13: (1, {'@': 161}), 11: (1, {'@': 161}), 170: (1, {'@': 161})}, 265: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 131: (0, 629), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 266: {3: (1, {'@': 330})}, 267: {67: (0, 676), 62: (1, {'@': 394}), 56: (1, {'@': 394}), 57: (1, {'@': 394}), 54: (1, {'@': 394}), 69: (1, {'@': 394}), 4: (1, {'@': 394}), 58: (1, {'@': 394}), 59: (1, {'@': 394}), 64: (1, {'@': 394}), 63: (1, {'@': 394}), 11: (1, {'@': 394}), 12: (1, {'@': 394}), 13: (1, {'@': 394}), 72: (1, {'@': 394}), 73: (1, {'@': 394}), 74: (1, {'@': 394}), 75: (1, {'@': 394}), 76: (1, {'@': 394}), 77: (1, {'@': 394}), 78: (1, {'@': 394}), 79: (1, {'@': 394}), 80: (1, {'@': 394}), 81: (1, {'@': 394}), 10: (1, {'@': 394}), 82: (1, {'@': 394}), 83: (1, {'@': 394}), 84: (1, {'@': 394}), 85: (1, {'@': 394}), 86: (1, {'@': 394}), 87: (1, {'@': 394}), 88: (1, {'@': 394}), 89: (1, {'@': 394}), 90: (1, {'@': 394}), 91: (1, {'@': 394}), 92: (1, {'@': 394}), 93: (1, {'@': 394}), 94: (1, {'@': 394}), 95: (1, {'@': 394}), 96: (1, {'@': 394}), 97: (1, {'@': 394}), 98: (1, {'@': 394}), 99: (1, {'@': 394}), 100: (1, {'@': 394}), 101: (1, {'@': 394}), 102: (1, {'@': 394}), 43: (1, {'@': 394}), 103: (1, {'@': 394}), 104: (1, {'@': 394}), 105: (1, {'@': 394}), 106: (1, {'@': 394}), 107: (1, {'@': 394}), 108: (1, {'@': 394}), 109: (1, {'@': 394}), 1: (1, {'@': 394}), 110: (1, {'@': 394}), 111: (1, {'@': 394}), 112: (1, {'@': 394}), 113: (1, {'@': 394}), 114: (1, {'@': 394}), 3: (1, {'@': 394}), 32: (1, {'@': 394}), 115: (1, {'@': 394}), 5: (1, {'@': 394}), 116: (1, {'@': 394}), 117: (1, {'@': 394}), 118: (1, {'@': 394}), 119: (1, {'@': 394}), 120: (1, {'@': 394}), 121: (1, {'@': 394}), 6: (1, {'@': 394}), 122: (1, {'@': 394}), 123: (1, {'@': 394}), 124: (1, {'@': 394})}, 268: {10: (0, 368)}, 269: {11: (1, {'@': 84}), 13: (1, {'@': 84}), 12: (1, {'@': 84})}, 270: {10: (0, 120)}, 271: {11: (1, {'@': 105}), 13: (1, {'@': 105}), 12: (1, {'@': 105})}, 272: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 131: (0, 48), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 273: {72: (1, {'@': 299}), 56: (1, {'@': 299}), 78: (1, {'@': 299}), 80: (1, {'@': 299}), 81: (1, {'@': 299}), 68: (1, {'@': 299}), 84: (1, {'@': 299}), 69: (1, {'@': 299}), 86: (1, {'@': 299}), 71: (1, {'@': 299}), 87: (1, {'@': 299}), 89: (1, {'@': 299}), 12: (1, {'@': 299}), 93: (1, {'@': 299}), 60: (1, {'@': 299}), 63: (1, {'@': 299}), 62: (1, {'@': 299}), 97: (1, {'@': 299}), 99: (1, {'@': 299}), 100: (1, {'@': 299}), 102: (1, {'@': 299}), 43: (1, {'@': 299}), 103: (1, {'@': 299}), 105: (1, {'@': 299}), 107: (1, {'@': 299}), 108: (1, {'@': 299}), 112: (1, {'@': 299}), 70: (1, {'@': 299}), 64: (1, {'@': 299}), 67: (1, {'@': 299}), 3: (1, {'@': 299}), 9: (1, {'@': 299}), 115: (1, {'@': 299}), 116: (1, {'@': 299}), 5: (1, {'@': 299}), 125: (1, {'@': 299}), 59: (1, {'@': 299}), 120: (1, {'@': 299}), 65: (1, {'@': 299}), 6: (1, {'@': 299}), 54: (1, {'@': 299}), 123: (1, {'@': 299}), 73: (1, {'@': 299}), 74: (1, {'@': 299}), 75: (1, {'@': 299}), 76: (1, {'@': 299}), 77: (1, {'@': 299}), 79: (1, {'@': 299}), 61: (1, {'@': 299}), 82: (1, {'@': 299}), 10: (1, {'@': 299}), 66: (1, {'@': 299}), 83: (1, {'@': 299}), 85: (1, {'@': 299}), 11: (1, {'@': 299}), 88: (1, {'@': 299}), 90: (1, {'@': 299}), 91: (1, {'@': 299}), 92: (1, {'@': 299}), 94: (1, {'@': 299}), 47: (1, {'@': 299}), 95: (1, {'@': 299}), 96: (1, {'@': 299}), 4: (1, {'@': 299}), 55: (1, {'@': 299}), 98: (1, {'@': 299}), 101: (1, {'@': 299}), 13: (1, {'@': 299}), 104: (1, {'@': 299}), 106: (1, {'@': 299}), 58: (1, {'@': 299}), 109: (1, {'@': 299}), 1: (1, {'@': 299}), 110: (1, {'@': 299}), 111: (1, {'@': 299}), 113: (1, {'@': 299}), 114: (1, {'@': 299}), 32: (1, {'@': 299}), 57: (1, {'@': 299}), 117: (1, {'@': 299}), 118: (1, {'@': 299}), 119: (1, {'@': 299}), 121: (1, {'@': 299}), 122: (1, {'@': 299}), 124: (1, {'@': 299})}, 274: {72: (1, {'@': 191}), 74: (1, {'@': 191}), 98: (1, {'@': 191}), 75: (1, {'@': 191}), 99: (1, {'@': 191}), 100: (1, {'@': 191}), 101: (1, {'@': 191}), 102: (1, {'@': 191}), 76: (1, {'@': 191}), 13: (1, {'@': 191}), 103: (1, {'@': 191}), 104: (1, {'@': 191}), 105: (1, {'@': 191}), 78: (1, {'@': 191}), 77: (1, {'@': 191}), 106: (1, {'@': 191}), 107: (1, {'@': 191}), 79: (1, {'@': 191}), 108: (1, {'@': 191}), 80: (1, {'@': 191}), 81: (1, {'@': 191}), 82: (1, {'@': 191}), 109: (1, {'@': 191}), 83: (1, {'@': 191}), 1: (1, {'@': 191}), 110: (1, {'@': 191}), 111: (1, {'@': 191}), 84: (1, {'@': 191}), 112: (1, {'@': 191}), 85: (1, {'@': 191}), 11: (1, {'@': 191}), 86: (1, {'@': 191}), 113: (1, {'@': 191}), 114: (1, {'@': 191}), 87: (1, {'@': 191}), 3: (1, {'@': 191}), 88: (1, {'@': 191}), 89: (1, {'@': 191}), 115: (1, {'@': 191}), 116: (1, {'@': 191}), 117: (1, {'@': 191}), 118: (1, {'@': 191}), 91: (1, {'@': 191}), 119: (1, {'@': 191}), 92: (1, {'@': 191}), 93: (1, {'@': 191}), 94: (1, {'@': 191}), 120: (1, {'@': 191}), 95: (1, {'@': 191}), 96: (1, {'@': 191}), 121: (1, {'@': 191}), 123: (1, {'@': 191}), 97: (1, {'@': 191}), 124: (1, {'@': 191})}, 275: {5: (0, 789)}, 276: {5: (1, {'@': 168}), 10: (1, {'@': 168})}, 277: {67: (0, 676), 62: (1, {'@': 391}), 56: (1, {'@': 391}), 57: (1, {'@': 391}), 54: (1, {'@': 391}), 69: (1, {'@': 391}), 4: (1, {'@': 391}), 58: (1, {'@': 391}), 59: (1, {'@': 391}), 64: (1, {'@': 391}), 63: (1, {'@': 391}), 11: (1, {'@': 391}), 12: (1, {'@': 391}), 13: (1, {'@': 391}), 72: (1, {'@': 391}), 73: (1, {'@': 391}), 74: (1, {'@': 391}), 75: (1, {'@': 391}), 76: (1, {'@': 391}), 77: (1, {'@': 391}), 78: (1, {'@': 391}), 79: (1, {'@': 391}), 80: (1, {'@': 391}), 81: (1, {'@': 391}), 10: (1, {'@': 391}), 82: (1, {'@': 391}), 83: (1, {'@': 391}), 84: (1, {'@': 391}), 85: (1, {'@': 391}), 86: (1, {'@': 391}), 87: (1, {'@': 391}), 88: (1, {'@': 391}), 89: (1, {'@': 391}), 90: (1, {'@': 391}), 91: (1, {'@': 391}), 92: (1, {'@': 391}), 93: (1, {'@': 391}), 94: (1, {'@': 391}), 95: (1, {'@': 391}), 96: (1, {'@': 391}), 97: (1, {'@': 391}), 98: (1, {'@': 391}), 99: (1, {'@': 391}), 100: (1, {'@': 391}), 101: (1, {'@': 391}), 102: (1, {'@': 391}), 43: (1, {'@': 391}), 103: (1, {'@': 391}), 104: (1, {'@': 391}), 105: (1, {'@': 391}), 106: (1, {'@': 391}), 107: (1, {'@': 391}), 108: (1, {'@': 391}), 109: (1, {'@': 391}), 1: (1, {'@': 391}), 110: (1, {'@': 391}), 111: (1, {'@': 391}), 112: (1, {'@': 391}), 113: (1, {'@': 391}), 114: (1, {'@': 391}), 3: (1, {'@': 391}), 32: (1, {'@': 391}), 115: (1, {'@': 391}), 5: (1, {'@': 391}), 116: (1, {'@': 391}), 117: (1, {'@': 391}), 118: (1, {'@': 391}), 119: (1, {'@': 391}), 120: (1, {'@': 391}), 121: (1, {'@': 391}), 6: (1, {'@': 391}), 122: (1, {'@': 391}), 123: (1, {'@': 391}), 124: (1, {'@': 391})}, 278: {31: (0, 3), 131: (0, 635), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 279: {11: (1, {'@': 323}), 13: (1, {'@': 323}), 12: (1, {'@': 323})}, 280: {5: (0, 496)}, 281: {90: (0, 478), 203: (0, 191), 72: (1, {'@': 220}), 74: (1, {'@': 220}), 75: (1, {'@': 220}), 76: (1, {'@': 220}), 77: (1, {'@': 220}), 78: (1, {'@': 220}), 79: (1, {'@': 220}), 80: (1, {'@': 220}), 81: (1, {'@': 220}), 82: (1, {'@': 220}), 83: (1, {'@': 220}), 84: (1, {'@': 220}), 85: (1, {'@': 220}), 11: (1, {'@': 220}), 86: (1, {'@': 220}), 87: (1, {'@': 220}), 88: (1, {'@': 220}), 89: (1, {'@': 220}), 91: (1, {'@': 220}), 92: (1, {'@': 220}), 93: (1, {'@': 220}), 94: (1, {'@': 220}), 95: (1, {'@': 220}), 96: (1, {'@': 220}), 97: (1, {'@': 220}), 98: (1, {'@': 220}), 99: (1, {'@': 220}), 100: (1, {'@': 220}), 101: (1, {'@': 220}), 102: (1, {'@': 220}), 13: (1, {'@': 220}), 103: (1, {'@': 220}), 104: (1, {'@': 220}), 105: (1, {'@': 220}), 106: (1, {'@': 220}), 107: (1, {'@': 220}), 108: (1, {'@': 220}), 109: (1, {'@': 220}), 1: (1, {'@': 220}), 110: (1, {'@': 220}), 111: (1, {'@': 220}), 112: (1, {'@': 220}), 113: (1, {'@': 220}), 114: (1, {'@': 220}), 3: (1, {'@': 220}), 115: (1, {'@': 220}), 116: (1, {'@': 220}), 117: (1, {'@': 220}), 118: (1, {'@': 220}), 119: (1, {'@': 220}), 120: (1, {'@': 220}), 121: (1, {'@': 220}), 123: (1, {'@': 220}), 124: (1, {'@': 220})}, 282: {5: (1, {'@': 250}), 11: (1, {'@': 250}), 12: (1, {'@': 250}), 43: (1, {'@': 250}), 13: (1, {'@': 250})}, 283: {10: (0, 28)}, 284: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 131: (0, 444), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 285: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 131: (0, 135), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 286: {13: (1, {'@': 366})}, 287: {67: (0, 676), 62: (1, {'@': 395}), 56: (1, {'@': 395}), 57: (1, {'@': 395}), 54: (1, {'@': 395}), 69: (1, {'@': 395}), 4: (1, {'@': 395}), 58: (1, {'@': 395}), 59: (1, {'@': 395}), 64: (1, {'@': 395}), 63: (1, {'@': 395}), 11: (1, {'@': 395}), 12: (1, {'@': 395}), 13: (1, {'@': 395}), 72: (1, {'@': 395}), 73: (1, {'@': 395}), 74: (1, {'@': 395}), 75: (1, {'@': 395}), 76: (1, {'@': 395}), 77: (1, {'@': 395}), 78: (1, {'@': 395}), 79: (1, {'@': 395}), 80: (1, {'@': 395}), 81: (1, {'@': 395}), 10: (1, {'@': 395}), 82: (1, {'@': 395}), 83: (1, {'@': 395}), 84: (1, {'@': 395}), 85: (1, {'@': 395}), 86: (1, {'@': 395}), 87: (1, {'@': 395}), 88: (1, {'@': 395}), 89: (1, {'@': 395}), 90: (1, {'@': 395}), 91: (1, {'@': 395}), 92: (1, {'@': 395}), 93: (1, {'@': 395}), 94: (1, {'@': 395}), 95: (1, {'@': 395}), 96: (1, {'@': 395}), 97: (1, {'@': 395}), 98: (1, {'@': 395}), 99: (1, {'@': 395}), 100: (1, {'@': 395}), 101: (1, {'@': 395}), 102: (1, {'@': 395}), 43: (1, {'@': 395}), 103: (1, {'@': 395}), 104: (1, {'@': 395}), 105: (1, {'@': 395}), 106: (1, {'@': 395}), 107: (1, {'@': 395}), 108: (1, {'@': 395}), 109: (1, {'@': 395}), 1: (1, {'@': 395}), 110: (1, {'@': 395}), 111: (1, {'@': 395}), 112: (1, {'@': 395}), 113: (1, {'@': 395}), 114: (1, {'@': 395}), 3: (1, {'@': 395}), 32: (1, {'@': 395}), 115: (1, {'@': 395}), 5: (1, {'@': 395}), 116: (1, {'@': 395}), 117: (1, {'@': 395}), 118: (1, {'@': 395}), 119: (1, {'@': 395}), 120: (1, {'@': 395}), 121: (1, {'@': 395}), 6: (1, {'@': 395}), 122: (1, {'@': 395}), 123: (1, {'@': 395}), 124: (1, {'@': 395})}, 288: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 196: (0, 49), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 197: (0, 708), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 10: (0, 209), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 66), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 289: {67: (0, 676), 62: (1, {'@': 389}), 56: (1, {'@': 389}), 57: (1, {'@': 389}), 54: (1, {'@': 389}), 69: (1, {'@': 389}), 4: (1, {'@': 389}), 58: (1, {'@': 389}), 59: (1, {'@': 389}), 64: (1, {'@': 389}), 63: (1, {'@': 389}), 11: (1, {'@': 389}), 12: (1, {'@': 389}), 13: (1, {'@': 389}), 72: (1, {'@': 389}), 73: (1, {'@': 389}), 74: (1, {'@': 389}), 75: (1, {'@': 389}), 76: (1, {'@': 389}), 77: (1, {'@': 389}), 78: (1, {'@': 389}), 79: (1, {'@': 389}), 80: (1, {'@': 389}), 81: (1, {'@': 389}), 10: (1, {'@': 389}), 82: (1, {'@': 389}), 83: (1, {'@': 389}), 84: (1, {'@': 389}), 85: (1, {'@': 389}), 86: (1, {'@': 389}), 87: (1, {'@': 389}), 88: (1, {'@': 389}), 89: (1, {'@': 389}), 90: (1, {'@': 389}), 91: (1, {'@': 389}), 92: (1, {'@': 389}), 93: (1, {'@': 389}), 94: (1, {'@': 389}), 95: (1, {'@': 389}), 96: (1, {'@': 389}), 97: (1, {'@': 389}), 98: (1, {'@': 389}), 99: (1, {'@': 389}), 100: (1, {'@': 389}), 101: (1, {'@': 389}), 102: (1, {'@': 389}), 43: (1, {'@': 389}), 103: (1, {'@': 389}), 104: (1, {'@': 389}), 105: (1, {'@': 389}), 106: (1, {'@': 389}), 107: (1, {'@': 389}), 108: (1, {'@': 389}), 109: (1, {'@': 389}), 1: (1, {'@': 389}), 110: (1, {'@': 389}), 111: (1, {'@': 389}), 112: (1, {'@': 389}), 113: (1, {'@': 389}), 114: (1, {'@': 389}), 3: (1, {'@': 389}), 32: (1, {'@': 389}), 115: (1, {'@': 389}), 5: (1, {'@': 389}), 116: (1, {'@': 389}), 117: (1, {'@': 389}), 118: (1, {'@': 389}), 119: (1, {'@': 389}), 120: (1, {'@': 389}), 121: (1, {'@': 389}), 6: (1, {'@': 389}), 122: (1, {'@': 389}), 123: (1, {'@': 389}), 124: (1, {'@': 389})}, 290: {67: (0, 676), 62: (1, {'@': 392}), 56: (1, {'@': 392}), 57: (1, {'@': 392}), 54: (1, {'@': 392}), 69: (1, {'@': 392}), 4: (1, {'@': 392}), 58: (1, {'@': 392}), 59: (1, {'@': 392}), 64: (1, {'@': 392}), 63: (1, {'@': 392}), 11: (1, {'@': 392}), 12: (1, {'@': 392}), 13: (1, {'@': 392}), 72: (1, {'@': 392}), 73: (1, {'@': 392}), 74: (1, {'@': 392}), 75: (1, {'@': 392}), 76: (1, {'@': 392}), 77: (1, {'@': 392}), 78: (1, {'@': 392}), 79: (1, {'@': 392}), 80: (1, {'@': 392}), 81: (1, {'@': 392}), 10: (1, {'@': 392}), 82: (1, {'@': 392}), 83: (1, {'@': 392}), 84: (1, {'@': 392}), 85: (1, {'@': 392}), 86: (1, {'@': 392}), 87: (1, {'@': 392}), 88: (1, {'@': 392}), 89: (1, {'@': 392}), 90: (1, {'@': 392}), 91: (1, {'@': 392}), 92: (1, {'@': 392}), 93: (1, {'@': 392}), 94: (1, {'@': 392}), 95: (1, {'@': 392}), 96: (1, {'@': 392}), 97: (1, {'@': 392}), 98: (1, {'@': 392}), 99: (1, {'@': 392}), 100: (1, {'@': 392}), 101: (1, {'@': 392}), 102: (1, {'@': 392}), 43: (1, {'@': 392}), 103: (1, {'@': 392}), 104: (1, {'@': 392}), 105: (1, {'@': 392}), 106: (1, {'@': 392}), 107: (1, {'@': 392}), 108: (1, {'@': 392}), 109: (1, {'@': 392}), 1: (1, {'@': 392}), 110: (1, {'@': 392}), 111: (1, {'@': 392}), 112: (1, {'@': 392}), 113: (1, {'@': 392}), 114: (1, {'@': 392}), 3: (1, {'@': 392}), 32: (1, {'@': 392}), 115: (1, {'@': 392}), 5: (1, {'@': 392}), 116: (1, {'@': 392}), 117: (1, {'@': 392}), 118: (1, {'@': 392}), 119: (1, {'@': 392}), 120: (1, {'@': 392}), 121: (1, {'@': 392}), 6: (1, {'@': 392}), 122: (1, {'@': 392}), 123: (1, {'@': 392}), 124: (1, {'@': 392})}, 291: {13: (1, {'@': 367})}, 292: {55: (1, {'@': 416}), 56: (1, {'@': 416}), 57: (1, {'@': 416}), 125: (1, {'@': 416}), 58: (1, {'@': 416}), 59: (1, {'@': 416}), 60: (1, {'@': 416}), 61: (1, {'@': 416}), 47: (1, {'@': 416}), 62: (1, {'@': 416}), 63: (1, {'@': 416}), 65: (1, {'@': 416}), 66: (1, {'@': 416}), 70: (1, {'@': 416}), 68: (1, {'@': 416}), 54: (1, {'@': 416}), 4: (1, {'@': 416}), 69: (1, {'@': 416}), 67: (1, {'@': 416}), 64: (1, {'@': 416}), 71: (1, {'@': 416}), 12: (1, {'@': 416}), 13: (1, {'@': 416}), 11: (1, {'@': 416}), 72: (1, {'@': 416}), 73: (1, {'@': 416}), 74: (1, {'@': 416}), 75: (1, {'@': 416}), 76: (1, {'@': 416}), 77: (1, {'@': 416}), 78: (1, {'@': 416}), 79: (1, {'@': 416}), 80: (1, {'@': 416}), 81: (1, {'@': 416}), 10: (1, {'@': 416}), 82: (1, {'@': 416}), 83: (1, {'@': 416}), 84: (1, {'@': 416}), 85: (1, {'@': 416}), 86: (1, {'@': 416}), 87: (1, {'@': 416}), 88: (1, {'@': 416}), 89: (1, {'@': 416}), 90: (1, {'@': 416}), 91: (1, {'@': 416}), 92: (1, {'@': 416}), 93: (1, {'@': 416}), 94: (1, {'@': 416}), 95: (1, {'@': 416}), 96: (1, {'@': 416}), 97: (1, {'@': 416}), 98: (1, {'@': 416}), 99: (1, {'@': 416}), 100: (1, {'@': 416}), 101: (1, {'@': 416}), 102: (1, {'@': 416}), 43: (1, {'@': 416}), 103: (1, {'@': 416}), 104: (1, {'@': 416}), 105: (1, {'@': 416}), 106: (1, {'@': 416}), 107: (1, {'@': 416}), 108: (1, {'@': 416}), 109: (1, {'@': 416}), 1: (1, {'@': 416}), 110: (1, {'@': 416}), 111: (1, {'@': 416}), 112: (1, {'@': 416}), 113: (1, {'@': 416}), 114: (1, {'@': 416}), 3: (1, {'@': 416}), 32: (1, {'@': 416}), 115: (1, {'@': 416}), 5: (1, {'@': 416}), 116: (1, {'@': 416}), 117: (1, {'@': 416}), 118: (1, {'@': 416}), 119: (1, {'@': 416}), 120: (1, {'@': 416}), 121: (1, {'@': 416}), 6: (1, {'@': 416}), 122: (1, {'@': 416}), 123: (1, {'@': 416}), 124: (1, {'@': 416})}, 293: {67: (0, 676), 62: (1, {'@': 390}), 56: (1, {'@': 390}), 57: (1, {'@': 390}), 54: (1, {'@': 390}), 69: (1, {'@': 390}), 4: (1, {'@': 390}), 58: (1, {'@': 390}), 59: (1, {'@': 390}), 64: (1, {'@': 390}), 63: (1, {'@': 390}), 11: (1, {'@': 390}), 12: (1, {'@': 390}), 13: (1, {'@': 390}), 72: (1, {'@': 390}), 73: (1, {'@': 390}), 74: (1, {'@': 390}), 75: (1, {'@': 390}), 76: (1, {'@': 390}), 77: (1, {'@': 390}), 78: (1, {'@': 390}), 79: (1, {'@': 390}), 80: (1, {'@': 390}), 81: (1, {'@': 390}), 10: (1, {'@': 390}), 82: (1, {'@': 390}), 83: (1, {'@': 390}), 84: (1, {'@': 390}), 85: (1, {'@': 390}), 86: (1, {'@': 390}), 87: (1, {'@': 390}), 88: (1, {'@': 390}), 89: (1, {'@': 390}), 90: (1, {'@': 390}), 91: (1, {'@': 390}), 92: (1, {'@': 390}), 93: (1, {'@': 390}), 94: (1, {'@': 390}), 95: (1, {'@': 390}), 96: (1, {'@': 390}), 97: (1, {'@': 390}), 98: (1, {'@': 390}), 99: (1, {'@': 390}), 100: (1, {'@': 390}), 101: (1, {'@': 390}), 102: (1, {'@': 390}), 43: (1, {'@': 390}), 103: (1, {'@': 390}), 104: (1, {'@': 390}), 105: (1, {'@': 390}), 106: (1, {'@': 390}), 107: (1, {'@': 390}), 108: (1, {'@': 390}), 109: (1, {'@': 390}), 1: (1, {'@': 390}), 110: (1, {'@': 390}), 111: (1, {'@': 390}), 112: (1, {'@': 390}), 113: (1, {'@': 390}), 114: (1, {'@': 390}), 3: (1, {'@': 390}), 32: (1, {'@': 390}), 115: (1, {'@': 390}), 5: (1, {'@': 390}), 116: (1, {'@': 390}), 117: (1, {'@': 390}), 118: (1, {'@': 390}), 119: (1, {'@': 390}), 120: (1, {'@': 390}), 121: (1, {'@': 390}), 6: (1, {'@': 390}), 122: (1, {'@': 390}), 123: (1, {'@': 390}), 124: (1, {'@': 390})}, 294: {11: (1, {'@': 159}), 13: (1, {'@': 159}), 12: (1, {'@': 159})}, 295: {56: (0, 770), 54: (1, {'@': 381}), 63: (1, {'@': 381}), 11: (1, {'@': 381}), 12: (1, {'@': 381}), 13: (1, {'@': 381}), 72: (1, {'@': 381}), 74: (1, {'@': 381}), 98: (1, {'@': 381}), 75: (1, {'@': 381}), 99: (1, {'@': 381}), 100: (1, {'@': 381}), 76: (1, {'@': 381}), 101: (1, {'@': 381}), 102: (1, {'@': 381}), 103: (1, {'@': 381}), 77: (1, {'@': 381}), 78: (1, {'@': 381}), 104: (1, {'@': 381}), 105: (1, {'@': 381}), 106: (1, {'@': 381}), 107: (1, {'@': 381}), 79: (1, {'@': 381}), 108: (1, {'@': 381}), 80: (1, {'@': 381}), 81: (1, {'@': 381}), 82: (1, {'@': 381}), 109: (1, {'@': 381}), 83: (1, {'@': 381}), 1: (1, {'@': 381}), 110: (1, {'@': 381}), 111: (1, {'@': 381}), 84: (1, {'@': 381}), 112: (1, {'@': 381}), 85: (1, {'@': 381}), 86: (1, {'@': 381}), 113: (1, {'@': 381}), 114: (1, {'@': 381}), 87: (1, {'@': 381}), 3: (1, {'@': 381}), 88: (1, {'@': 381}), 89: (1, {'@': 381}), 115: (1, {'@': 381}), 90: (1, {'@': 381}), 116: (1, {'@': 381}), 117: (1, {'@': 381}), 118: (1, {'@': 381}), 91: (1, {'@': 381}), 119: (1, {'@': 381}), 92: (1, {'@': 381}), 93: (1, {'@': 381}), 94: (1, {'@': 381}), 120: (1, {'@': 381}), 95: (1, {'@': 381}), 96: (1, {'@': 381}), 121: (1, {'@': 381}), 123: (1, {'@': 381}), 97: (1, {'@': 381}), 124: (1, {'@': 381}), 5: (1, {'@': 381}), 10: (1, {'@': 381}), 43: (1, {'@': 381}), 73: (1, {'@': 381}), 6: (1, {'@': 381}), 122: (1, {'@': 381}), 32: (1, {'@': 381})}, 296: {11: (1, {'@': 23}), 13: (1, {'@': 23}), 12: (1, {'@': 23})}, 297: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 131: (0, 763), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 298: {10: (0, 623)}, 299: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 477), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 300: {72: (1, {'@': 10}), 168: (1, {'@': 10}), 98: (1, {'@': 10}), 99: (1, {'@': 10}), 100: (1, {'@': 10}), 101: (1, {'@': 10}), 102: (1, {'@': 10}), 76: (1, {'@': 10}), 13: (1, {'@': 10}), 103: (1, {'@': 10}), 105: (1, {'@': 10}), 104: (1, {'@': 10}), 78: (1, {'@': 10}), 77: (1, {'@': 10}), 106: (1, {'@': 10}), 107: (1, {'@': 10}), 79: (1, {'@': 10}), 108: (1, {'@': 10}), 80: (1, {'@': 10}), 81: (1, {'@': 10}), 82: (1, {'@': 10}), 109: (1, {'@': 10}), 83: (1, {'@': 10}), 1: (1, {'@': 10}), 110: (1, {'@': 10}), 111: (1, {'@': 10}), 84: (1, {'@': 10}), 112: (1, {'@': 10}), 85: (1, {'@': 10}), 11: (1, {'@': 10}), 86: (1, {'@': 10}), 114: (1, {'@': 10}), 87: (1, {'@': 10}), 3: (1, {'@': 10}), 88: (1, {'@': 10}), 89: (1, {'@': 10}), 115: (1, {'@': 10}), 116: (1, {'@': 10}), 117: (1, {'@': 10}), 118: (1, {'@': 10}), 91: (1, {'@': 10}), 119: (1, {'@': 10}), 92: (1, {'@': 10}), 93: (1, {'@': 10}), 94: (1, {'@': 10}), 120: (1, {'@': 10}), 95: (1, {'@': 10}), 96: (1, {'@': 10}), 121: (1, {'@': 10}), 123: (1, {'@': 10}), 97: (1, {'@': 10}), 124: (1, {'@': 10}), 166: (1, {'@': 10}), 44: (1, {'@': 10}), 163: (1, {'@': 10}), 45: (1, {'@': 10}), 12: (1, {'@': 10}), 164: (1, {'@': 10}), 122: (1, {'@': 10}), 165: (1, {'@': 10}), 167: (1, {'@': 10})}, 301: {11: (1, {'@': 81}), 13: (1, {'@': 81}), 12: (1, {'@': 81})}, 302: {13: (1, {'@': 368})}, 303: {5: (1, {'@': 167}), 10: (1, {'@': 167})}, 304: {72: (1, {'@': 285}), 56: (1, {'@': 285}), 78: (1, {'@': 285}), 80: (1, {'@': 285}), 81: (1, {'@': 285}), 68: (1, {'@': 285}), 84: (1, {'@': 285}), 69: (1, {'@': 285}), 86: (1, {'@': 285}), 71: (1, {'@': 285}), 87: (1, {'@': 285}), 89: (1, {'@': 285}), 12: (1, {'@': 285}), 93: (1, {'@': 285}), 60: (1, {'@': 285}), 63: (1, {'@': 285}), 62: (1, {'@': 285}), 97: (1, {'@': 285}), 99: (1, {'@': 285}), 100: (1, {'@': 285}), 102: (1, {'@': 285}), 43: (1, {'@': 285}), 103: (1, {'@': 285}), 105: (1, {'@': 285}), 107: (1, {'@': 285}), 108: (1, {'@': 285}), 112: (1, {'@': 285}), 70: (1, {'@': 285}), 64: (1, {'@': 285}), 67: (1, {'@': 285}), 3: (1, {'@': 285}), 9: (1, {'@': 285}), 115: (1, {'@': 285}), 116: (1, {'@': 285}), 5: (1, {'@': 285}), 125: (1, {'@': 285}), 59: (1, {'@': 285}), 120: (1, {'@': 285}), 65: (1, {'@': 285}), 6: (1, {'@': 285}), 54: (1, {'@': 285}), 123: (1, {'@': 285}), 73: (1, {'@': 285}), 74: (1, {'@': 285}), 75: (1, {'@': 285}), 76: (1, {'@': 285}), 77: (1, {'@': 285}), 79: (1, {'@': 285}), 61: (1, {'@': 285}), 82: (1, {'@': 285}), 10: (1, {'@': 285}), 66: (1, {'@': 285}), 83: (1, {'@': 285}), 85: (1, {'@': 285}), 11: (1, {'@': 285}), 88: (1, {'@': 285}), 90: (1, {'@': 285}), 91: (1, {'@': 285}), 92: (1, {'@': 285}), 94: (1, {'@': 285}), 47: (1, {'@': 285}), 95: (1, {'@': 285}), 96: (1, {'@': 285}), 4: (1, {'@': 285}), 55: (1, {'@': 285}), 98: (1, {'@': 285}), 101: (1, {'@': 285}), 13: (1, {'@': 285}), 104: (1, {'@': 285}), 106: (1, {'@': 285}), 58: (1, {'@': 285}), 109: (1, {'@': 285}), 1: (1, {'@': 285}), 110: (1, {'@': 285}), 111: (1, {'@': 285}), 113: (1, {'@': 285}), 114: (1, {'@': 285}), 32: (1, {'@': 285}), 57: (1, {'@': 285}), 117: (1, {'@': 285}), 118: (1, {'@': 285}), 119: (1, {'@': 285}), 121: (1, {'@': 285}), 122: (1, {'@': 285}), 124: (1, {'@': 285})}, 305: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 53: (0, 723), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 306: {9: (0, 704), 4: (0, 631), 171: (0, 501)}, 307: {5: (1, {'@': 354}), 10: (1, {'@': 354}), 4: (1, {'@': 354}), 11: (1, {'@': 354}), 12: (1, {'@': 354}), 13: (1, {'@': 354}), 169: (1, {'@': 354}), 170: (1, {'@': 354})}, 308: {10: (0, 509), 5: (0, 54)}, 309: {11: (1, {'@': 73}), 13: (1, {'@': 73}), 12: (1, {'@': 73})}, 310: {54: (0, 230), 5: (1, {'@': 169}), 10: (1, {'@': 169})}, 311: {11: (1, {'@': 27}), 13: (1, {'@': 27}), 12: (1, {'@': 27})}, 312: {11: (1, {'@': 350}), 12: (1, {'@': 350}), 13: (1, {'@': 350})}, 313: {14: (1, {'@': 265}), 15: (1, {'@': 265}), 16: (1, {'@': 265}), 17: (1, {'@': 265}), 18: (1, {'@': 265}), 19: (1, {'@': 265}), 20: (1, {'@': 265}), 21: (1, {'@': 265}), 22: (1, {'@': 265}), 23: (1, {'@': 265}), 24: (1, {'@': 265}), 25: (1, {'@': 265}), 1: (1, {'@': 265}), 26: (1, {'@': 265}), 27: (1, {'@': 265}), 28: (1, {'@': 265}), 46: (1, {'@': 265}), 29: (1, {'@': 265}), 30: (1, {'@': 265}), 3: (1, {'@': 265}), 31: (1, {'@': 265}), 9: (1, {'@': 265}), 32: (1, {'@': 265}), 34: (1, {'@': 265}), 33: (1, {'@': 265}), 5: (1, {'@': 265}), 35: (1, {'@': 265}), 36: (1, {'@': 265}), 37: (1, {'@': 265}), 47: (1, {'@': 265}), 38: (1, {'@': 265}), 48: (1, {'@': 265}), 39: (1, {'@': 265}), 49: (1, {'@': 265}), 40: (1, {'@': 265}), 41: (1, {'@': 265}), 42: (1, {'@': 265})}, 314: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 131: (0, 730), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 315: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 144: (0, 303), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 204: (0, 308), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 310), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 316: {7: (1, {'@': 334}), 11: (1, {'@': 334}), 12: (1, {'@': 334}), 13: (1, {'@': 334})}, 317: {10: (0, 347), 5: (0, 415)}, 318: {56: (0, 770), 54: (1, {'@': 382}), 63: (1, {'@': 382}), 11: (1, {'@': 382}), 12: (1, {'@': 382}), 13: (1, {'@': 382}), 72: (1, {'@': 382}), 74: (1, {'@': 382}), 98: (1, {'@': 382}), 75: (1, {'@': 382}), 99: (1, {'@': 382}), 100: (1, {'@': 382}), 76: (1, {'@': 382}), 101: (1, {'@': 382}), 102: (1, {'@': 382}), 103: (1, {'@': 382}), 77: (1, {'@': 382}), 78: (1, {'@': 382}), 104: (1, {'@': 382}), 105: (1, {'@': 382}), 106: (1, {'@': 382}), 107: (1, {'@': 382}), 79: (1, {'@': 382}), 108: (1, {'@': 382}), 80: (1, {'@': 382}), 81: (1, {'@': 382}), 82: (1, {'@': 382}), 109: (1, {'@': 382}), 83: (1, {'@': 382}), 1: (1, {'@': 382}), 110: (1, {'@': 382}), 111: (1, {'@': 382}), 84: (1, {'@': 382}), 112: (1, {'@': 382}), 85: (1, {'@': 382}), 86: (1, {'@': 382}), 113: (1, {'@': 382}), 114: (1, {'@': 382}), 87: (1, {'@': 382}), 3: (1, {'@': 382}), 88: (1, {'@': 382}), 89: (1, {'@': 382}), 115: (1, {'@': 382}), 90: (1, {'@': 382}), 116: (1, {'@': 382}), 117: (1, {'@': 382}), 118: (1, {'@': 382}), 91: (1, {'@': 382}), 119: (1, {'@': 382}), 92: (1, {'@': 382}), 93: (1, {'@': 382}), 94: (1, {'@': 382}), 120: (1, {'@': 382}), 95: (1, {'@': 382}), 96: (1, {'@': 382}), 121: (1, {'@': 382}), 123: (1, {'@': 382}), 97: (1, {'@': 382}), 124: (1, {'@': 382}), 5: (1, {'@': 382}), 10: (1, {'@': 382}), 43: (1, {'@': 382}), 73: (1, {'@': 382}), 6: (1, {'@': 382}), 122: (1, {'@': 382}), 32: (1, {'@': 382})}, 319: {5: (0, 343), 7: (0, 377), 8: (0, 539), 4: (1, {'@': 352})}, 320: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 5: (0, 272), 41: (0, 273), 21: (0, 305), 131: (0, 275), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 321: {10: (0, 23)}, 322: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 131: (0, 147), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 323: {4: (0, 299)}, 324: {9: (0, 566), 171: (0, 642)}, 325: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 93: (0, 630), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 167: (0, 648), 82: (0, 568), 94: (0, 584), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 163: (0, 662), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 326: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 131: (0, 467), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 327: {54: (0, 38)}, 328: {9: (0, 332), 4: (0, 430), 172: (0, 375), 55: (1, {'@': 267}), 56: (1, {'@': 267}), 12: (1, {'@': 267}), 13: (1, {'@': 267}), 57: (1, {'@': 267}), 5: (1, {'@': 267}), 125: (1, {'@': 267}), 58: (1, {'@': 267}), 59: (1, {'@': 267}), 60: (1, {'@': 267}), 61: (1, {'@': 267}), 47: (1, {'@': 267}), 63: (1, {'@': 267}), 62: (1, {'@': 267}), 64: (1, {'@': 267}), 65: (1, {'@': 267}), 66: (1, {'@': 267}), 70: (1, {'@': 267}), 68: (1, {'@': 267}), 69: (1, {'@': 267}), 67: (1, {'@': 267}), 11: (1, {'@': 267}), 71: (1, {'@': 267})}, 329: {10: (0, 149)}, 330: {205: (0, 410), 206: (0, 157)}, 331: {10: (0, 347), 5: (1, {'@': 319})}, 332: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 54: (0, 222), 15: (0, 205), 32: (0, 504), 30: (0, 194), 131: (0, 159), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 333: {72: (1, {'@': 192}), 74: (1, {'@': 192}), 98: (1, {'@': 192}), 75: (1, {'@': 192}), 99: (1, {'@': 192}), 100: (1, {'@': 192}), 101: (1, {'@': 192}), 102: (1, {'@': 192}), 76: (1, {'@': 192}), 13: (1, {'@': 192}), 103: (1, {'@': 192}), 104: (1, {'@': 192}), 105: (1, {'@': 192}), 78: (1, {'@': 192}), 77: (1, {'@': 192}), 106: (1, {'@': 192}), 107: (1, {'@': 192}), 79: (1, {'@': 192}), 108: (1, {'@': 192}), 80: (1, {'@': 192}), 81: (1, {'@': 192}), 82: (1, {'@': 192}), 109: (1, {'@': 192}), 83: (1, {'@': 192}), 1: (1, {'@': 192}), 110: (1, {'@': 192}), 111: (1, {'@': 192}), 84: (1, {'@': 192}), 112: (1, {'@': 192}), 85: (1, {'@': 192}), 11: (1, {'@': 192}), 86: (1, {'@': 192}), 113: (1, {'@': 192}), 114: (1, {'@': 192}), 87: (1, {'@': 192}), 3: (1, {'@': 192}), 88: (1, {'@': 192}), 89: (1, {'@': 192}), 115: (1, {'@': 192}), 116: (1, {'@': 192}), 117: (1, {'@': 192}), 118: (1, {'@': 192}), 91: (1, {'@': 192}), 119: (1, {'@': 192}), 92: (1, {'@': 192}), 93: (1, {'@': 192}), 94: (1, {'@': 192}), 120: (1, {'@': 192}), 95: (1, {'@': 192}), 96: (1, {'@': 192}), 121: (1, {'@': 192}), 123: (1, {'@': 192}), 97: (1, {'@': 192}), 124: (1, {'@': 192})}, 334: {14: (1, {'@': 264}), 15: (1, {'@': 264}), 16: (1, {'@': 264}), 17: (1, {'@': 264}), 18: (1, {'@': 264}), 19: (1, {'@': 264}), 20: (1, {'@': 264}), 21: (1, {'@': 264}), 22: (1, {'@': 264}), 23: (1, {'@': 264}), 24: (1, {'@': 264}), 25: (1, {'@': 264}), 1: (1, {'@': 264}), 26: (1, {'@': 264}), 27: (1, {'@': 264}), 28: (1, {'@': 264}), 46: (1, {'@': 264}), 29: (1, {'@': 264}), 30: (1, {'@': 264}), 3: (1, {'@': 264}), 31: (1, {'@': 264}), 9: (1, {'@': 264}), 32: (1, {'@': 264}), 34: (1, {'@': 264}), 33: (1, {'@': 264}), 5: (1, {'@': 264}), 35: (1, {'@': 264}), 36: (1, {'@': 264}), 37: (1, {'@': 264}), 47: (1, {'@': 264}), 38: (1, {'@': 264}), 48: (1, {'@': 264}), 39: (1, {'@': 264}), 49: (1, {'@': 264}), 40: (1, {'@': 264}), 41: (1, {'@': 264}), 42: (1, {'@': 264})}, 335: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 131: (0, 469), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 336: {11: (1, {'@': 209}), 12: (1, {'@': 209}), 13: (1, {'@': 209})}, 337: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 11: (0, 73), 93: (0, 630), 164: (0, 531), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 175: (0, 619), 94: (0, 584), 82: (0, 568), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 185: (0, 506), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 13: (1, {'@': 146})}, 338: {10: (0, 239)}, 339: {122: (0, 105)}, 340: {72: (1, {'@': 289}), 56: (1, {'@': 289}), 78: (1, {'@': 289}), 80: (1, {'@': 289}), 81: (1, {'@': 289}), 68: (1, {'@': 289}), 84: (1, {'@': 289}), 69: (1, {'@': 289}), 86: (1, {'@': 289}), 71: (1, {'@': 289}), 87: (1, {'@': 289}), 89: (1, {'@': 289}), 12: (1, {'@': 289}), 93: (1, {'@': 289}), 60: (1, {'@': 289}), 63: (1, {'@': 289}), 62: (1, {'@': 289}), 97: (1, {'@': 289}), 99: (1, {'@': 289}), 100: (1, {'@': 289}), 102: (1, {'@': 289}), 43: (1, {'@': 289}), 103: (1, {'@': 289}), 105: (1, {'@': 289}), 107: (1, {'@': 289}), 108: (1, {'@': 289}), 112: (1, {'@': 289}), 70: (1, {'@': 289}), 64: (1, {'@': 289}), 67: (1, {'@': 289}), 3: (1, {'@': 289}), 9: (1, {'@': 289}), 115: (1, {'@': 289}), 116: (1, {'@': 289}), 5: (1, {'@': 289}), 125: (1, {'@': 289}), 59: (1, {'@': 289}), 120: (1, {'@': 289}), 65: (1, {'@': 289}), 6: (1, {'@': 289}), 54: (1, {'@': 289}), 123: (1, {'@': 289}), 73: (1, {'@': 289}), 74: (1, {'@': 289}), 75: (1, {'@': 289}), 76: (1, {'@': 289}), 77: (1, {'@': 289}), 79: (1, {'@': 289}), 61: (1, {'@': 289}), 82: (1, {'@': 289}), 10: (1, {'@': 289}), 66: (1, {'@': 289}), 83: (1, {'@': 289}), 85: (1, {'@': 289}), 11: (1, {'@': 289}), 88: (1, {'@': 289}), 90: (1, {'@': 289}), 91: (1, {'@': 289}), 92: (1, {'@': 289}), 94: (1, {'@': 289}), 47: (1, {'@': 289}), 95: (1, {'@': 289}), 96: (1, {'@': 289}), 4: (1, {'@': 289}), 55: (1, {'@': 289}), 98: (1, {'@': 289}), 101: (1, {'@': 289}), 13: (1, {'@': 289}), 104: (1, {'@': 289}), 106: (1, {'@': 289}), 58: (1, {'@': 289}), 109: (1, {'@': 289}), 1: (1, {'@': 289}), 110: (1, {'@': 289}), 111: (1, {'@': 289}), 113: (1, {'@': 289}), 114: (1, {'@': 289}), 32: (1, {'@': 289}), 57: (1, {'@': 289}), 117: (1, {'@': 289}), 118: (1, {'@': 289}), 119: (1, {'@': 289}), 121: (1, {'@': 289}), 122: (1, {'@': 289}), 124: (1, {'@': 289})}, 341: {57: (0, 36), 56: (1, {'@': 384}), 54: (1, {'@': 384}), 63: (1, {'@': 384}), 11: (1, {'@': 384}), 12: (1, {'@': 384}), 13: (1, {'@': 384}), 72: (1, {'@': 384}), 74: (1, {'@': 384}), 98: (1, {'@': 384}), 75: (1, {'@': 384}), 99: (1, {'@': 384}), 100: (1, {'@': 384}), 76: (1, {'@': 384}), 101: (1, {'@': 384}), 102: (1, {'@': 384}), 103: (1, {'@': 384}), 77: (1, {'@': 384}), 78: (1, {'@': 384}), 104: (1, {'@': 384}), 105: (1, {'@': 384}), 106: (1, {'@': 384}), 107: (1, {'@': 384}), 79: (1, {'@': 384}), 108: (1, {'@': 384}), 80: (1, {'@': 384}), 81: (1, {'@': 384}), 82: (1, {'@': 384}), 109: (1, {'@': 384}), 83: (1, {'@': 384}), 1: (1, {'@': 384}), 110: (1, {'@': 384}), 111: (1, {'@': 384}), 84: (1, {'@': 384}), 112: (1, {'@': 384}), 85: (1, {'@': 384}), 86: (1, {'@': 384}), 113: (1, {'@': 384}), 114: (1, {'@': 384}), 87: (1, {'@': 384}), 3: (1, {'@': 384}), 88: (1, {'@': 384}), 89: (1, {'@': 384}), 115: (1, {'@': 384}), 90: (1, {'@': 384}), 116: (1, {'@': 384}), 117: (1, {'@': 384}), 118: (1, {'@': 384}), 91: (1, {'@': 384}), 119: (1, {'@': 384}), 92: (1, {'@': 384}), 93: (1, {'@': 384}), 94: (1, {'@': 384}), 120: (1, {'@': 384}), 95: (1, {'@': 384}), 96: (1, {'@': 384}), 121: (1, {'@': 384}), 123: (1, {'@': 384}), 97: (1, {'@': 384}), 124: (1, {'@': 384}), 5: (1, {'@': 384}), 10: (1, {'@': 384}), 43: (1, {'@': 384}), 73: (1, {'@': 384}), 6: (1, {'@': 384}), 32: (1, {'@': 384}), 122: (1, {'@': 384})}, 342: {5: (1, {'@': 254}), 11: (1, {'@': 254}), 12: (1, {'@': 254}), 13: (1, {'@': 254})}, 343: {1: (0, 185), 2: (0, 167), 3: (0, 264)}, 344: {11: (1, {'@': 210}), 12: (1, {'@': 210}), 13: (1, {'@': 210})}, 345: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 160: (0, 746), 81: (0, 786), 11: (0, 632), 175: (0, 593), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 92: (0, 604), 101: (0, 699), 100: (0, 685), 152: (0, 536), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 757), 114: (0, 759), 200: (0, 750), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 207: (0, 556), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 208: (0, 657), 99: (0, 644), 97: (0, 700), 192: (0, 686), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 161: (0, 729), 111: (0, 783), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 346: {9: (0, 578)}, 347: {9: (0, 332), 172: (0, 375), 72: (1, {'@': 267}), 56: (1, {'@': 267}), 78: (1, {'@': 267}), 80: (1, {'@': 267}), 81: (1, {'@': 267}), 68: (1, {'@': 267}), 84: (1, {'@': 267}), 69: (1, {'@': 267}), 86: (1, {'@': 267}), 71: (1, {'@': 267}), 87: (1, {'@': 267}), 89: (1, {'@': 267}), 12: (1, {'@': 267}), 93: (1, {'@': 267}), 60: (1, {'@': 267}), 63: (1, {'@': 267}), 62: (1, {'@': 267}), 97: (1, {'@': 267}), 99: (1, {'@': 267}), 100: (1, {'@': 267}), 102: (1, {'@': 267}), 43: (1, {'@': 267}), 103: (1, {'@': 267}), 105: (1, {'@': 267}), 107: (1, {'@': 267}), 108: (1, {'@': 267}), 112: (1, {'@': 267}), 70: (1, {'@': 267}), 64: (1, {'@': 267}), 67: (1, {'@': 267}), 3: (1, {'@': 267}), 115: (1, {'@': 267}), 116: (1, {'@': 267}), 5: (1, {'@': 267}), 125: (1, {'@': 267}), 59: (1, {'@': 267}), 120: (1, {'@': 267}), 65: (1, {'@': 267}), 6: (1, {'@': 267}), 54: (1, {'@': 267}), 123: (1, {'@': 267}), 73: (1, {'@': 267}), 74: (1, {'@': 267}), 75: (1, {'@': 267}), 76: (1, {'@': 267}), 77: (1, {'@': 267}), 79: (1, {'@': 267}), 61: (1, {'@': 267}), 82: (1, {'@': 267}), 10: (1, {'@': 267}), 66: (1, {'@': 267}), 83: (1, {'@': 267}), 85: (1, {'@': 267}), 11: (1, {'@': 267}), 88: (1, {'@': 267}), 90: (1, {'@': 267}), 91: (1, {'@': 267}), 92: (1, {'@': 267}), 94: (1, {'@': 267}), 47: (1, {'@': 267}), 95: (1, {'@': 267}), 96: (1, {'@': 267}), 4: (1, {'@': 267}), 55: (1, {'@': 267}), 98: (1, {'@': 267}), 101: (1, {'@': 267}), 13: (1, {'@': 267}), 104: (1, {'@': 267}), 106: (1, {'@': 267}), 58: (1, {'@': 267}), 109: (1, {'@': 267}), 1: (1, {'@': 267}), 110: (1, {'@': 267}), 111: (1, {'@': 267}), 113: (1, {'@': 267}), 114: (1, {'@': 267}), 32: (1, {'@': 267}), 57: (1, {'@': 267}), 117: (1, {'@': 267}), 118: (1, {'@': 267}), 119: (1, {'@': 267}), 121: (1, {'@': 267}), 122: (1, {'@': 267}), 124: (1, {'@': 267})}, 348: {11: (1, {'@': 186}), 12: (1, {'@': 186}), 13: (1, {'@': 186})}, 349: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 134), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 350: {11: (1, {'@': 211}), 12: (1, {'@': 211}), 13: (1, {'@': 211})}, 351: {167: (0, 527), 163: (0, 788)}, 352: {7: (0, 377), 8: (0, 582), 11: (1, {'@': 352}), 12: (1, {'@': 352}), 13: (1, {'@': 352})}, 353: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 54: (0, 41), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 66), 197: (0, 464), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 354: {9: (0, 257), 172: (0, 687), 72: (1, {'@': 273}), 56: (1, {'@': 273}), 78: (1, {'@': 273}), 80: (1, {'@': 273}), 81: (1, {'@': 273}), 68: (1, {'@': 273}), 84: (1, {'@': 273}), 69: (1, {'@': 273}), 86: (1, {'@': 273}), 71: (1, {'@': 273}), 87: (1, {'@': 273}), 89: (1, {'@': 273}), 12: (1, {'@': 273}), 93: (1, {'@': 273}), 60: (1, {'@': 273}), 63: (1, {'@': 273}), 62: (1, {'@': 273}), 97: (1, {'@': 273}), 99: (1, {'@': 273}), 100: (1, {'@': 273}), 102: (1, {'@': 273}), 43: (1, {'@': 273}), 103: (1, {'@': 273}), 105: (1, {'@': 273}), 107: (1, {'@': 273}), 108: (1, {'@': 273}), 112: (1, {'@': 273}), 70: (1, {'@': 273}), 64: (1, {'@': 273}), 67: (1, {'@': 273}), 3: (1, {'@': 273}), 115: (1, {'@': 273}), 116: (1, {'@': 273}), 5: (1, {'@': 273}), 125: (1, {'@': 273}), 59: (1, {'@': 273}), 120: (1, {'@': 273}), 65: (1, {'@': 273}), 6: (1, {'@': 273}), 54: (1, {'@': 273}), 123: (1, {'@': 273}), 73: (1, {'@': 273}), 74: (1, {'@': 273}), 75: (1, {'@': 273}), 76: (1, {'@': 273}), 77: (1, {'@': 273}), 79: (1, {'@': 273}), 61: (1, {'@': 273}), 82: (1, {'@': 273}), 10: (1, {'@': 273}), 66: (1, {'@': 273}), 83: (1, {'@': 273}), 85: (1, {'@': 273}), 11: (1, {'@': 273}), 88: (1, {'@': 273}), 90: (1, {'@': 273}), 91: (1, {'@': 273}), 92: (1, {'@': 273}), 94: (1, {'@': 273}), 47: (1, {'@': 273}), 95: (1, {'@': 273}), 96: (1, {'@': 273}), 4: (1, {'@': 273}), 55: (1, {'@': 273}), 98: (1, {'@': 273}), 101: (1, {'@': 273}), 13: (1, {'@': 273}), 104: (1, {'@': 273}), 106: (1, {'@': 273}), 58: (1, {'@': 273}), 109: (1, {'@': 273}), 1: (1, {'@': 273}), 110: (1, {'@': 273}), 111: (1, {'@': 273}), 113: (1, {'@': 273}), 114: (1, {'@': 273}), 32: (1, {'@': 273}), 57: (1, {'@': 273}), 117: (1, {'@': 273}), 118: (1, {'@': 273}), 119: (1, {'@': 273}), 121: (1, {'@': 273}), 122: (1, {'@': 273}), 124: (1, {'@': 273})}, 355: {5: (1, {'@': 339}), 10: (1, {'@': 339})}, 356: {72: (1, {'@': 268}), 56: (1, {'@': 268}), 78: (1, {'@': 268}), 80: (1, {'@': 268}), 81: (1, {'@': 268}), 68: (1, {'@': 268}), 84: (1, {'@': 268}), 69: (1, {'@': 268}), 86: (1, {'@': 268}), 71: (1, {'@': 268}), 87: (1, {'@': 268}), 89: (1, {'@': 268}), 12: (1, {'@': 268}), 93: (1, {'@': 268}), 60: (1, {'@': 268}), 63: (1, {'@': 268}), 62: (1, {'@': 268}), 97: (1, {'@': 268}), 99: (1, {'@': 268}), 100: (1, {'@': 268}), 102: (1, {'@': 268}), 43: (1, {'@': 268}), 103: (1, {'@': 268}), 105: (1, {'@': 268}), 107: (1, {'@': 268}), 108: (1, {'@': 268}), 112: (1, {'@': 268}), 70: (1, {'@': 268}), 64: (1, {'@': 268}), 67: (1, {'@': 268}), 3: (1, {'@': 268}), 9: (1, {'@': 268}), 115: (1, {'@': 268}), 116: (1, {'@': 268}), 5: (1, {'@': 268}), 125: (1, {'@': 268}), 59: (1, {'@': 268}), 120: (1, {'@': 268}), 65: (1, {'@': 268}), 6: (1, {'@': 268}), 54: (1, {'@': 268}), 123: (1, {'@': 268}), 73: (1, {'@': 268}), 74: (1, {'@': 268}), 75: (1, {'@': 268}), 76: (1, {'@': 268}), 77: (1, {'@': 268}), 79: (1, {'@': 268}), 61: (1, {'@': 268}), 82: (1, {'@': 268}), 10: (1, {'@': 268}), 66: (1, {'@': 268}), 83: (1, {'@': 268}), 85: (1, {'@': 268}), 11: (1, {'@': 268}), 88: (1, {'@': 268}), 90: (1, {'@': 268}), 91: (1, {'@': 268}), 92: (1, {'@': 268}), 94: (1, {'@': 268}), 47: (1, {'@': 268}), 95: (1, {'@': 268}), 96: (1, {'@': 268}), 4: (1, {'@': 268}), 55: (1, {'@': 268}), 98: (1, {'@': 268}), 101: (1, {'@': 268}), 13: (1, {'@': 268}), 104: (1, {'@': 268}), 106: (1, {'@': 268}), 58: (1, {'@': 268}), 109: (1, {'@': 268}), 1: (1, {'@': 268}), 110: (1, {'@': 268}), 111: (1, {'@': 268}), 113: (1, {'@': 268}), 114: (1, {'@': 268}), 32: (1, {'@': 268}), 57: (1, {'@': 268}), 117: (1, {'@': 268}), 118: (1, {'@': 268}), 119: (1, {'@': 268}), 121: (1, {'@': 268}), 122: (1, {'@': 268}), 124: (1, {'@': 268})}, 357: {5: (0, 416)}, 358: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 54: (0, 208), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 66), 197: (0, 464), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 359: {173: (0, 526), 121: (0, 528), 11: (1, {'@': 70}), 13: (1, {'@': 70}), 12: (1, {'@': 70})}, 360: {5: (0, 116), 11: (1, {'@': 25}), 13: (1, {'@': 25}), 12: (1, {'@': 25})}, 361: {11: (0, 75), 13: (1, {'@': 143})}, 362: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 136: (0, 403), 23: (0, 219), 29: (0, 474), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 135: (0, 14), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 363: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 131: (0, 476), 37: (0, 494), 48: (0, 486)}, 364: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 131: (0, 453), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 365: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 479), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 366: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 131: (0, 482), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 367: {11: (1, {'@': 21}), 13: (1, {'@': 21}), 12: (1, {'@': 21})}, 368: {11: (1, {'@': 104}), 13: (1, {'@': 104}), 12: (1, {'@': 104})}, 369: {72: (1, {'@': 306}), 56: (1, {'@': 306}), 78: (1, {'@': 306}), 80: (1, {'@': 306}), 81: (1, {'@': 306}), 68: (1, {'@': 306}), 84: (1, {'@': 306}), 69: (1, {'@': 306}), 86: (1, {'@': 306}), 71: (1, {'@': 306}), 87: (1, {'@': 306}), 89: (1, {'@': 306}), 12: (1, {'@': 306}), 93: (1, {'@': 306}), 60: (1, {'@': 306}), 63: (1, {'@': 306}), 62: (1, {'@': 306}), 97: (1, {'@': 306}), 99: (1, {'@': 306}), 100: (1, {'@': 306}), 102: (1, {'@': 306}), 43: (1, {'@': 306}), 103: (1, {'@': 306}), 105: (1, {'@': 306}), 107: (1, {'@': 306}), 108: (1, {'@': 306}), 112: (1, {'@': 306}), 70: (1, {'@': 306}), 64: (1, {'@': 306}), 67: (1, {'@': 306}), 3: (1, {'@': 306}), 9: (1, {'@': 306}), 115: (1, {'@': 306}), 116: (1, {'@': 306}), 5: (1, {'@': 306}), 125: (1, {'@': 306}), 59: (1, {'@': 306}), 120: (1, {'@': 306}), 65: (1, {'@': 306}), 6: (1, {'@': 306}), 54: (1, {'@': 306}), 123: (1, {'@': 306}), 73: (1, {'@': 306}), 74: (1, {'@': 306}), 75: (1, {'@': 306}), 76: (1, {'@': 306}), 77: (1, {'@': 306}), 79: (1, {'@': 306}), 61: (1, {'@': 306}), 82: (1, {'@': 306}), 10: (1, {'@': 306}), 66: (1, {'@': 306}), 83: (1, {'@': 306}), 85: (1, {'@': 306}), 11: (1, {'@': 306}), 88: (1, {'@': 306}), 90: (1, {'@': 306}), 91: (1, {'@': 306}), 92: (1, {'@': 306}), 94: (1, {'@': 306}), 47: (1, {'@': 306}), 95: (1, {'@': 306}), 96: (1, {'@': 306}), 4: (1, {'@': 306}), 55: (1, {'@': 306}), 98: (1, {'@': 306}), 101: (1, {'@': 306}), 13: (1, {'@': 306}), 104: (1, {'@': 306}), 106: (1, {'@': 306}), 58: (1, {'@': 306}), 109: (1, {'@': 306}), 1: (1, {'@': 306}), 110: (1, {'@': 306}), 111: (1, {'@': 306}), 113: (1, {'@': 306}), 114: (1, {'@': 306}), 32: (1, {'@': 306}), 57: (1, {'@': 306}), 117: (1, {'@': 306}), 118: (1, {'@': 306}), 119: (1, {'@': 306}), 121: (1, {'@': 306}), 122: (1, {'@': 306}), 124: (1, {'@': 306})}, 370: {72: (1, {'@': 288}), 56: (1, {'@': 288}), 78: (1, {'@': 288}), 80: (1, {'@': 288}), 81: (1, {'@': 288}), 68: (1, {'@': 288}), 84: (1, {'@': 288}), 69: (1, {'@': 288}), 86: (1, {'@': 288}), 71: (1, {'@': 288}), 87: (1, {'@': 288}), 89: (1, {'@': 288}), 12: (1, {'@': 288}), 93: (1, {'@': 288}), 60: (1, {'@': 288}), 63: (1, {'@': 288}), 62: (1, {'@': 288}), 97: (1, {'@': 288}), 99: (1, {'@': 288}), 100: (1, {'@': 288}), 102: (1, {'@': 288}), 43: (1, {'@': 288}), 103: (1, {'@': 288}), 105: (1, {'@': 288}), 107: (1, {'@': 288}), 108: (1, {'@': 288}), 112: (1, {'@': 288}), 70: (1, {'@': 288}), 64: (1, {'@': 288}), 67: (1, {'@': 288}), 3: (1, {'@': 288}), 9: (1, {'@': 288}), 115: (1, {'@': 288}), 116: (1, {'@': 288}), 5: (1, {'@': 288}), 125: (1, {'@': 288}), 59: (1, {'@': 288}), 120: (1, {'@': 288}), 65: (1, {'@': 288}), 6: (1, {'@': 288}), 54: (1, {'@': 288}), 123: (1, {'@': 288}), 73: (1, {'@': 288}), 74: (1, {'@': 288}), 75: (1, {'@': 288}), 76: (1, {'@': 288}), 77: (1, {'@': 288}), 79: (1, {'@': 288}), 61: (1, {'@': 288}), 82: (1, {'@': 288}), 10: (1, {'@': 288}), 66: (1, {'@': 288}), 83: (1, {'@': 288}), 85: (1, {'@': 288}), 11: (1, {'@': 288}), 88: (1, {'@': 288}), 90: (1, {'@': 288}), 91: (1, {'@': 288}), 92: (1, {'@': 288}), 94: (1, {'@': 288}), 47: (1, {'@': 288}), 95: (1, {'@': 288}), 96: (1, {'@': 288}), 4: (1, {'@': 288}), 55: (1, {'@': 288}), 98: (1, {'@': 288}), 101: (1, {'@': 288}), 13: (1, {'@': 288}), 104: (1, {'@': 288}), 106: (1, {'@': 288}), 58: (1, {'@': 288}), 109: (1, {'@': 288}), 1: (1, {'@': 288}), 110: (1, {'@': 288}), 111: (1, {'@': 288}), 113: (1, {'@': 288}), 114: (1, {'@': 288}), 32: (1, {'@': 288}), 57: (1, {'@': 288}), 117: (1, {'@': 288}), 118: (1, {'@': 288}), 119: (1, {'@': 288}), 121: (1, {'@': 288}), 122: (1, {'@': 288}), 124: (1, {'@': 288})}, 371: {205: (0, 410), 206: (0, 294)}, 372: {11: (1, {'@': 72}), 13: (1, {'@': 72}), 12: (1, {'@': 72})}, 373: {9: (0, 785)}, 374: {1: (0, 185), 2: (0, 4), 0: (0, 226), 3: (0, 264)}, 375: {72: (1, {'@': 304}), 56: (1, {'@': 304}), 78: (1, {'@': 304}), 80: (1, {'@': 304}), 81: (1, {'@': 304}), 68: (1, {'@': 304}), 84: (1, {'@': 304}), 69: (1, {'@': 304}), 86: (1, {'@': 304}), 71: (1, {'@': 304}), 87: (1, {'@': 304}), 89: (1, {'@': 304}), 12: (1, {'@': 304}), 93: (1, {'@': 304}), 60: (1, {'@': 304}), 63: (1, {'@': 304}), 62: (1, {'@': 304}), 97: (1, {'@': 304}), 99: (1, {'@': 304}), 100: (1, {'@': 304}), 102: (1, {'@': 304}), 43: (1, {'@': 304}), 103: (1, {'@': 304}), 105: (1, {'@': 304}), 107: (1, {'@': 304}), 108: (1, {'@': 304}), 112: (1, {'@': 304}), 70: (1, {'@': 304}), 64: (1, {'@': 304}), 67: (1, {'@': 304}), 3: (1, {'@': 304}), 9: (1, {'@': 304}), 115: (1, {'@': 304}), 116: (1, {'@': 304}), 5: (1, {'@': 304}), 125: (1, {'@': 304}), 59: (1, {'@': 304}), 120: (1, {'@': 304}), 65: (1, {'@': 304}), 6: (1, {'@': 304}), 54: (1, {'@': 304}), 123: (1, {'@': 304}), 73: (1, {'@': 304}), 74: (1, {'@': 304}), 75: (1, {'@': 304}), 76: (1, {'@': 304}), 77: (1, {'@': 304}), 79: (1, {'@': 304}), 61: (1, {'@': 304}), 82: (1, {'@': 304}), 10: (1, {'@': 304}), 66: (1, {'@': 304}), 83: (1, {'@': 304}), 85: (1, {'@': 304}), 11: (1, {'@': 304}), 88: (1, {'@': 304}), 90: (1, {'@': 304}), 91: (1, {'@': 304}), 92: (1, {'@': 304}), 94: (1, {'@': 304}), 47: (1, {'@': 304}), 95: (1, {'@': 304}), 96: (1, {'@': 304}), 4: (1, {'@': 304}), 55: (1, {'@': 304}), 98: (1, {'@': 304}), 101: (1, {'@': 304}), 13: (1, {'@': 304}), 104: (1, {'@': 304}), 106: (1, {'@': 304}), 58: (1, {'@': 304}), 109: (1, {'@': 304}), 1: (1, {'@': 304}), 110: (1, {'@': 304}), 111: (1, {'@': 304}), 113: (1, {'@': 304}), 114: (1, {'@': 304}), 32: (1, {'@': 304}), 57: (1, {'@': 304}), 117: (1, {'@': 304}), 118: (1, {'@': 304}), 119: (1, {'@': 304}), 121: (1, {'@': 304}), 122: (1, {'@': 304}), 124: (1, {'@': 304})}, 376: {11: (1, {'@': 135}), 13: (1, {'@': 135}), 12: (1, {'@': 135})}, 377: {181: (0, 540), 179: (0, 104), 209: (0, 97), 180: (0, 67), 183: (0, 200), 176: (0, 189), 182: (0, 178), 3: (0, 307), 178: (0, 123), 210: (0, 190), 184: (0, 111)}, 378: {5: (0, 500)}, 379: {11: (1, {'@': 80}), 13: (1, {'@': 80}), 12: (1, {'@': 80})}, 380: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 100), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 381: {11: (1, {'@': 322}), 13: (1, {'@': 322}), 12: (1, {'@': 322})}, 382: {11: (1, {'@': 33}), 13: (1, {'@': 33}), 12: (1, {'@': 33})}, 383: {72: (1, {'@': 301}), 56: (1, {'@': 301}), 78: (1, {'@': 301}), 80: (1, {'@': 301}), 81: (1, {'@': 301}), 68: (1, {'@': 301}), 84: (1, {'@': 301}), 69: (1, {'@': 301}), 86: (1, {'@': 301}), 71: (1, {'@': 301}), 87: (1, {'@': 301}), 89: (1, {'@': 301}), 12: (1, {'@': 301}), 93: (1, {'@': 301}), 60: (1, {'@': 301}), 63: (1, {'@': 301}), 62: (1, {'@': 301}), 97: (1, {'@': 301}), 99: (1, {'@': 301}), 100: (1, {'@': 301}), 102: (1, {'@': 301}), 43: (1, {'@': 301}), 103: (1, {'@': 301}), 105: (1, {'@': 301}), 107: (1, {'@': 301}), 108: (1, {'@': 301}), 112: (1, {'@': 301}), 70: (1, {'@': 301}), 64: (1, {'@': 301}), 67: (1, {'@': 301}), 3: (1, {'@': 301}), 9: (1, {'@': 301}), 115: (1, {'@': 301}), 116: (1, {'@': 301}), 5: (1, {'@': 301}), 125: (1, {'@': 301}), 59: (1, {'@': 301}), 120: (1, {'@': 301}), 65: (1, {'@': 301}), 6: (1, {'@': 301}), 54: (1, {'@': 301}), 123: (1, {'@': 301}), 73: (1, {'@': 301}), 74: (1, {'@': 301}), 75: (1, {'@': 301}), 76: (1, {'@': 301}), 77: (1, {'@': 301}), 79: (1, {'@': 301}), 61: (1, {'@': 301}), 82: (1, {'@': 301}), 10: (1, {'@': 301}), 66: (1, {'@': 301}), 83: (1, {'@': 301}), 85: (1, {'@': 301}), 11: (1, {'@': 301}), 88: (1, {'@': 301}), 90: (1, {'@': 301}), 91: (1, {'@': 301}), 92: (1, {'@': 301}), 94: (1, {'@': 301}), 47: (1, {'@': 301}), 95: (1, {'@': 301}), 96: (1, {'@': 301}), 4: (1, {'@': 301}), 55: (1, {'@': 301}), 98: (1, {'@': 301}), 101: (1, {'@': 301}), 13: (1, {'@': 301}), 104: (1, {'@': 301}), 106: (1, {'@': 301}), 58: (1, {'@': 301}), 109: (1, {'@': 301}), 1: (1, {'@': 301}), 110: (1, {'@': 301}), 111: (1, {'@': 301}), 113: (1, {'@': 301}), 114: (1, {'@': 301}), 32: (1, {'@': 301}), 57: (1, {'@': 301}), 117: (1, {'@': 301}), 118: (1, {'@': 301}), 119: (1, {'@': 301}), 121: (1, {'@': 301}), 122: (1, {'@': 301}), 124: (1, {'@': 301})}, 384: {11: (1, {'@': 38}), 13: (1, {'@': 38}), 12: (1, {'@': 38})}, 385: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 131: (0, 17), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 386: {11: (1, {'@': 133}), 13: (1, {'@': 133}), 12: (1, {'@': 133})}, 387: {7: (1, {'@': 333}), 11: (1, {'@': 333}), 12: (1, {'@': 333}), 13: (1, {'@': 333})}, 388: {10: (0, 396)}, 389: {5: (1, {'@': 235}), 11: (1, {'@': 235}), 12: (1, {'@': 235}), 43: (1, {'@': 235}), 13: (1, {'@': 235})}, 390: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 54: (0, 222), 15: (0, 205), 32: (0, 504), 30: (0, 194), 131: (0, 13), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 391: {11: (1, {'@': 218}), 12: (1, {'@': 218}), 13: (1, {'@': 218})}, 392: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 163: (0, 748), 11: (0, 73), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 167: (0, 594), 112: (0, 522), 13: (0, 627), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 393: {9: (0, 329), 11: (1, {'@': 120}), 13: (1, {'@': 120}), 12: (1, {'@': 120})}, 394: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 131: (0, 151), 37: (0, 494), 48: (0, 486)}, 395: {4: (0, 452)}, 396: {11: (1, {'@': 106}), 13: (1, {'@': 106}), 12: (1, {'@': 106})}, 397: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 53: (0, 621), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 398: {72: (1, {'@': 313}), 73: (1, {'@': 313}), 56: (1, {'@': 313}), 74: (1, {'@': 313}), 75: (1, {'@': 313}), 76: (1, {'@': 313}), 77: (1, {'@': 313}), 78: (1, {'@': 313}), 79: (1, {'@': 313}), 80: (1, {'@': 313}), 61: (1, {'@': 313}), 81: (1, {'@': 313}), 82: (1, {'@': 313}), 10: (1, {'@': 313}), 66: (1, {'@': 313}), 83: (1, {'@': 313}), 68: (1, {'@': 313}), 84: (1, {'@': 313}), 69: (1, {'@': 313}), 85: (1, {'@': 313}), 11: (1, {'@': 313}), 86: (1, {'@': 313}), 71: (1, {'@': 313}), 87: (1, {'@': 313}), 88: (1, {'@': 313}), 89: (1, {'@': 313}), 12: (1, {'@': 313}), 90: (1, {'@': 313}), 91: (1, {'@': 313}), 92: (1, {'@': 313}), 93: (1, {'@': 313}), 94: (1, {'@': 313}), 60: (1, {'@': 313}), 63: (1, {'@': 313}), 62: (1, {'@': 313}), 47: (1, {'@': 313}), 95: (1, {'@': 313}), 96: (1, {'@': 313}), 97: (1, {'@': 313}), 4: (1, {'@': 313}), 55: (1, {'@': 313}), 98: (1, {'@': 313}), 99: (1, {'@': 313}), 100: (1, {'@': 313}), 102: (1, {'@': 313}), 43: (1, {'@': 313}), 101: (1, {'@': 313}), 13: (1, {'@': 313}), 103: (1, {'@': 313}), 105: (1, {'@': 313}), 104: (1, {'@': 313}), 106: (1, {'@': 313}), 107: (1, {'@': 313}), 58: (1, {'@': 313}), 108: (1, {'@': 313}), 109: (1, {'@': 313}), 1: (1, {'@': 313}), 110: (1, {'@': 313}), 111: (1, {'@': 313}), 112: (1, {'@': 313}), 70: (1, {'@': 313}), 64: (1, {'@': 313}), 67: (1, {'@': 313}), 113: (1, {'@': 313}), 114: (1, {'@': 313}), 3: (1, {'@': 313}), 9: (1, {'@': 313}), 32: (1, {'@': 313}), 115: (1, {'@': 313}), 116: (1, {'@': 313}), 5: (1, {'@': 313}), 125: (1, {'@': 313}), 57: (1, {'@': 313}), 117: (1, {'@': 313}), 118: (1, {'@': 313}), 119: (1, {'@': 313}), 59: (1, {'@': 313}), 120: (1, {'@': 313}), 65: (1, {'@': 313}), 121: (1, {'@': 313}), 6: (1, {'@': 313}), 54: (1, {'@': 313}), 122: (1, {'@': 313}), 123: (1, {'@': 313}), 124: (1, {'@': 313})}, 399: {11: (1, {'@': 184}), 12: (1, {'@': 184}), 13: (1, {'@': 184})}, 400: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 131: (0, 144), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 401: {11: (1, {'@': 29}), 13: (1, {'@': 29}), 12: (1, {'@': 29})}, 402: {11: (1, {'@': 51}), 13: (1, {'@': 51}), 12: (1, {'@': 51})}, 403: {125: (0, 751), 55: (1, {'@': 413}), 56: (1, {'@': 413}), 57: (1, {'@': 413}), 58: (1, {'@': 413}), 59: (1, {'@': 413}), 60: (1, {'@': 413}), 61: (1, {'@': 413}), 47: (1, {'@': 413}), 62: (1, {'@': 413}), 63: (1, {'@': 413}), 64: (1, {'@': 413}), 65: (1, {'@': 413}), 66: (1, {'@': 413}), 67: (1, {'@': 413}), 68: (1, {'@': 413}), 54: (1, {'@': 413}), 69: (1, {'@': 413}), 70: (1, {'@': 413}), 4: (1, {'@': 413}), 71: (1, {'@': 413}), 12: (1, {'@': 413}), 13: (1, {'@': 413}), 11: (1, {'@': 413}), 72: (1, {'@': 413}), 73: (1, {'@': 413}), 74: (1, {'@': 413}), 75: (1, {'@': 413}), 76: (1, {'@': 413}), 77: (1, {'@': 413}), 78: (1, {'@': 413}), 79: (1, {'@': 413}), 80: (1, {'@': 413}), 81: (1, {'@': 413}), 10: (1, {'@': 413}), 82: (1, {'@': 413}), 83: (1, {'@': 413}), 84: (1, {'@': 413}), 85: (1, {'@': 413}), 86: (1, {'@': 413}), 87: (1, {'@': 413}), 88: (1, {'@': 413}), 89: (1, {'@': 413}), 90: (1, {'@': 413}), 91: (1, {'@': 413}), 92: (1, {'@': 413}), 93: (1, {'@': 413}), 94: (1, {'@': 413}), 95: (1, {'@': 413}), 96: (1, {'@': 413}), 97: (1, {'@': 413}), 98: (1, {'@': 413}), 99: (1, {'@': 413}), 100: (1, {'@': 413}), 101: (1, {'@': 413}), 102: (1, {'@': 413}), 43: (1, {'@': 413}), 103: (1, {'@': 413}), 104: (1, {'@': 413}), 105: (1, {'@': 413}), 106: (1, {'@': 413}), 107: (1, {'@': 413}), 108: (1, {'@': 413}), 109: (1, {'@': 413}), 1: (1, {'@': 413}), 110: (1, {'@': 413}), 111: (1, {'@': 413}), 112: (1, {'@': 413}), 113: (1, {'@': 413}), 114: (1, {'@': 413}), 3: (1, {'@': 413}), 32: (1, {'@': 413}), 115: (1, {'@': 413}), 5: (1, {'@': 413}), 116: (1, {'@': 413}), 117: (1, {'@': 413}), 118: (1, {'@': 413}), 119: (1, {'@': 413}), 120: (1, {'@': 413}), 121: (1, {'@': 413}), 6: (1, {'@': 413}), 122: (1, {'@': 413}), 123: (1, {'@': 413}), 124: (1, {'@': 413})}, 404: {11: (1, {'@': 92}), 13: (1, {'@': 92}), 12: (1, {'@': 92})}, 405: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 53: (0, 734), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 406: {11: (1, {'@': 83}), 13: (1, {'@': 83}), 12: (1, {'@': 83})}, 407: {3: (0, 5), 11: (1, {'@': 215}), 12: (1, {'@': 215}), 13: (1, {'@': 215})}, 408: {14: (1, {'@': 376}), 15: (1, {'@': 376}), 16: (1, {'@': 376}), 17: (1, {'@': 376}), 18: (1, {'@': 376}), 19: (1, {'@': 376}), 20: (1, {'@': 376}), 21: (1, {'@': 376}), 22: (1, {'@': 376}), 23: (1, {'@': 376}), 24: (1, {'@': 376}), 25: (1, {'@': 376}), 1: (1, {'@': 376}), 26: (1, {'@': 376}), 27: (1, {'@': 376}), 28: (1, {'@': 376}), 29: (1, {'@': 376}), 30: (1, {'@': 376}), 3: (1, {'@': 376}), 31: (1, {'@': 376}), 9: (1, {'@': 376}), 32: (1, {'@': 376}), 33: (1, {'@': 376}), 34: (1, {'@': 376}), 35: (1, {'@': 376}), 36: (1, {'@': 376}), 37: (1, {'@': 376}), 38: (1, {'@': 376}), 39: (1, {'@': 376}), 40: (1, {'@': 376}), 41: (1, {'@': 376}), 42: (1, {'@': 376})}, 409: {11: (1, {'@': 203}), 12: (1, {'@': 203}), 13: (1, {'@': 203})}, 410: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 211: (0, 488), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 212: (0, 491), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 205: (0, 410), 47: (0, 237), 20: (0, 247), 206: (0, 495), 138: (0, 287), 131: (0, 498), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 411: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 131: (0, 581), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 412: {72: (1, {'@': 298}), 56: (1, {'@': 298}), 78: (1, {'@': 298}), 80: (1, {'@': 298}), 81: (1, {'@': 298}), 68: (1, {'@': 298}), 84: (1, {'@': 298}), 69: (1, {'@': 298}), 86: (1, {'@': 298}), 71: (1, {'@': 298}), 87: (1, {'@': 298}), 89: (1, {'@': 298}), 12: (1, {'@': 298}), 93: (1, {'@': 298}), 60: (1, {'@': 298}), 63: (1, {'@': 298}), 62: (1, {'@': 298}), 97: (1, {'@': 298}), 99: (1, {'@': 298}), 100: (1, {'@': 298}), 102: (1, {'@': 298}), 43: (1, {'@': 298}), 103: (1, {'@': 298}), 105: (1, {'@': 298}), 107: (1, {'@': 298}), 108: (1, {'@': 298}), 112: (1, {'@': 298}), 70: (1, {'@': 298}), 64: (1, {'@': 298}), 67: (1, {'@': 298}), 3: (1, {'@': 298}), 9: (1, {'@': 298}), 115: (1, {'@': 298}), 116: (1, {'@': 298}), 5: (1, {'@': 298}), 125: (1, {'@': 298}), 59: (1, {'@': 298}), 120: (1, {'@': 298}), 65: (1, {'@': 298}), 6: (1, {'@': 298}), 54: (1, {'@': 298}), 123: (1, {'@': 298}), 73: (1, {'@': 298}), 74: (1, {'@': 298}), 75: (1, {'@': 298}), 76: (1, {'@': 298}), 77: (1, {'@': 298}), 79: (1, {'@': 298}), 61: (1, {'@': 298}), 82: (1, {'@': 298}), 10: (1, {'@': 298}), 66: (1, {'@': 298}), 83: (1, {'@': 298}), 85: (1, {'@': 298}), 11: (1, {'@': 298}), 88: (1, {'@': 298}), 90: (1, {'@': 298}), 91: (1, {'@': 298}), 92: (1, {'@': 298}), 94: (1, {'@': 298}), 47: (1, {'@': 298}), 95: (1, {'@': 298}), 96: (1, {'@': 298}), 4: (1, {'@': 298}), 55: (1, {'@': 298}), 98: (1, {'@': 298}), 101: (1, {'@': 298}), 13: (1, {'@': 298}), 104: (1, {'@': 298}), 106: (1, {'@': 298}), 58: (1, {'@': 298}), 109: (1, {'@': 298}), 1: (1, {'@': 298}), 110: (1, {'@': 298}), 111: (1, {'@': 298}), 113: (1, {'@': 298}), 114: (1, {'@': 298}), 32: (1, {'@': 298}), 57: (1, {'@': 298}), 117: (1, {'@': 298}), 118: (1, {'@': 298}), 119: (1, {'@': 298}), 121: (1, {'@': 298}), 122: (1, {'@': 298}), 124: (1, {'@': 298})}, 413: {3: (0, 129), 33: (0, 91)}, 414: {11: (0, 75), 12: (1, {'@': 187}), 13: (1, {'@': 187})}, 415: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 131: (0, 46), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 416: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 131: (0, 175), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 417: {5: (1, {'@': 320}), 10: (1, {'@': 320}), 54: (1, {'@': 320}), 12: (1, {'@': 320}), 13: (1, {'@': 320}), 11: (1, {'@': 320})}, 418: {11: (1, {'@': 24}), 13: (1, {'@': 24}), 12: (1, {'@': 24})}, 419: {32: (0, 520), 81: (0, 702), 3: (0, 728)}, 420: {11: (1, {'@': 107}), 13: (1, {'@': 107}), 12: (1, {'@': 107})}, 421: {11: (1, {'@': 28}), 13: (1, {'@': 28}), 12: (1, {'@': 28})}, 422: {72: (1, {'@': 277}), 56: (1, {'@': 277}), 78: (1, {'@': 277}), 80: (1, {'@': 277}), 81: (1, {'@': 277}), 68: (1, {'@': 277}), 84: (1, {'@': 277}), 69: (1, {'@': 277}), 86: (1, {'@': 277}), 71: (1, {'@': 277}), 87: (1, {'@': 277}), 89: (1, {'@': 277}), 12: (1, {'@': 277}), 93: (1, {'@': 277}), 60: (1, {'@': 277}), 63: (1, {'@': 277}), 62: (1, {'@': 277}), 97: (1, {'@': 277}), 99: (1, {'@': 277}), 100: (1, {'@': 277}), 102: (1, {'@': 277}), 43: (1, {'@': 277}), 103: (1, {'@': 277}), 105: (1, {'@': 277}), 107: (1, {'@': 277}), 108: (1, {'@': 277}), 112: (1, {'@': 277}), 70: (1, {'@': 277}), 64: (1, {'@': 277}), 67: (1, {'@': 277}), 3: (1, {'@': 277}), 9: (1, {'@': 277}), 115: (1, {'@': 277}), 116: (1, {'@': 277}), 5: (1, {'@': 277}), 125: (1, {'@': 277}), 59: (1, {'@': 277}), 120: (1, {'@': 277}), 65: (1, {'@': 277}), 6: (1, {'@': 277}), 54: (1, {'@': 277}), 123: (1, {'@': 277}), 73: (1, {'@': 277}), 74: (1, {'@': 277}), 75: (1, {'@': 277}), 76: (1, {'@': 277}), 77: (1, {'@': 277}), 79: (1, {'@': 277}), 61: (1, {'@': 277}), 82: (1, {'@': 277}), 10: (1, {'@': 277}), 66: (1, {'@': 277}), 83: (1, {'@': 277}), 85: (1, {'@': 277}), 11: (1, {'@': 277}), 88: (1, {'@': 277}), 90: (1, {'@': 277}), 91: (1, {'@': 277}), 92: (1, {'@': 277}), 94: (1, {'@': 277}), 47: (1, {'@': 277}), 95: (1, {'@': 277}), 96: (1, {'@': 277}), 4: (1, {'@': 277}), 55: (1, {'@': 277}), 98: (1, {'@': 277}), 101: (1, {'@': 277}), 13: (1, {'@': 277}), 104: (1, {'@': 277}), 106: (1, {'@': 277}), 58: (1, {'@': 277}), 109: (1, {'@': 277}), 1: (1, {'@': 277}), 110: (1, {'@': 277}), 111: (1, {'@': 277}), 113: (1, {'@': 277}), 114: (1, {'@': 277}), 32: (1, {'@': 277}), 57: (1, {'@': 277}), 117: (1, {'@': 277}), 118: (1, {'@': 277}), 119: (1, {'@': 277}), 121: (1, {'@': 277}), 122: (1, {'@': 277}), 124: (1, {'@': 277})}, 423: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 131: (0, 163), 38: (0, 50), 37: (0, 494), 48: (0, 486), 10: (0, 179)}, 424: {4: (0, 590)}, 425: {5: (1, {'@': 335}), 10: (1, {'@': 335})}, 426: {72: (1, {'@': 325}), 74: (1, {'@': 325}), 98: (1, {'@': 325}), 75: (1, {'@': 325}), 99: (1, {'@': 325}), 100: (1, {'@': 325}), 101: (1, {'@': 325}), 102: (1, {'@': 325}), 76: (1, {'@': 325}), 13: (1, {'@': 325}), 103: (1, {'@': 325}), 104: (1, {'@': 325}), 105: (1, {'@': 325}), 78: (1, {'@': 325}), 77: (1, {'@': 325}), 106: (1, {'@': 325}), 107: (1, {'@': 325}), 79: (1, {'@': 325}), 108: (1, {'@': 325}), 80: (1, {'@': 325}), 81: (1, {'@': 325}), 82: (1, {'@': 325}), 109: (1, {'@': 325}), 83: (1, {'@': 325}), 1: (1, {'@': 325}), 110: (1, {'@': 325}), 111: (1, {'@': 325}), 84: (1, {'@': 325}), 112: (1, {'@': 325}), 85: (1, {'@': 325}), 11: (1, {'@': 325}), 86: (1, {'@': 325}), 113: (1, {'@': 325}), 114: (1, {'@': 325}), 163: (1, {'@': 325}), 87: (1, {'@': 325}), 3: (1, {'@': 325}), 88: (1, {'@': 325}), 89: (1, {'@': 325}), 115: (1, {'@': 325}), 116: (1, {'@': 325}), 117: (1, {'@': 325}), 118: (1, {'@': 325}), 91: (1, {'@': 325}), 119: (1, {'@': 325}), 92: (1, {'@': 325}), 93: (1, {'@': 325}), 94: (1, {'@': 325}), 120: (1, {'@': 325}), 95: (1, {'@': 325}), 96: (1, {'@': 325}), 121: (1, {'@': 325}), 123: (1, {'@': 325}), 97: (1, {'@': 325}), 124: (1, {'@': 325}), 167: (1, {'@': 325})}, 427: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 131: (0, 21), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 428: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 53: (0, 744), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 429: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 131: (0, 145), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 430: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 109), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 431: {11: (1, {'@': 32}), 13: (1, {'@': 32}), 12: (1, {'@': 32})}, 432: {5: (1, {'@': 249}), 11: (1, {'@': 249}), 12: (1, {'@': 249}), 43: (1, {'@': 249}), 13: (1, {'@': 249})}, 433: {63: (0, 538), 54: (1, {'@': 380}), 11: (1, {'@': 380}), 12: (1, {'@': 380}), 13: (1, {'@': 380}), 72: (1, {'@': 380}), 74: (1, {'@': 380}), 75: (1, {'@': 380}), 76: (1, {'@': 380}), 77: (1, {'@': 380}), 78: (1, {'@': 380}), 79: (1, {'@': 380}), 80: (1, {'@': 380}), 81: (1, {'@': 380}), 82: (1, {'@': 380}), 83: (1, {'@': 380}), 84: (1, {'@': 380}), 85: (1, {'@': 380}), 86: (1, {'@': 380}), 87: (1, {'@': 380}), 88: (1, {'@': 380}), 89: (1, {'@': 380}), 90: (1, {'@': 380}), 91: (1, {'@': 380}), 92: (1, {'@': 380}), 93: (1, {'@': 380}), 94: (1, {'@': 380}), 95: (1, {'@': 380}), 96: (1, {'@': 380}), 97: (1, {'@': 380}), 98: (1, {'@': 380}), 99: (1, {'@': 380}), 100: (1, {'@': 380}), 101: (1, {'@': 380}), 102: (1, {'@': 380}), 103: (1, {'@': 380}), 104: (1, {'@': 380}), 105: (1, {'@': 380}), 106: (1, {'@': 380}), 107: (1, {'@': 380}), 108: (1, {'@': 380}), 109: (1, {'@': 380}), 1: (1, {'@': 380}), 110: (1, {'@': 380}), 111: (1, {'@': 380}), 112: (1, {'@': 380}), 113: (1, {'@': 380}), 114: (1, {'@': 380}), 3: (1, {'@': 380}), 115: (1, {'@': 380}), 116: (1, {'@': 380}), 117: (1, {'@': 380}), 118: (1, {'@': 380}), 119: (1, {'@': 380}), 120: (1, {'@': 380}), 121: (1, {'@': 380}), 123: (1, {'@': 380}), 124: (1, {'@': 380}), 5: (1, {'@': 380}), 10: (1, {'@': 380}), 43: (1, {'@': 380}), 73: (1, {'@': 380}), 6: (1, {'@': 380}), 122: (1, {'@': 380}), 32: (1, {'@': 380})}, 434: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 131: (0, 666), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 435: {5: (0, 201), 10: (0, 316)}, 436: {11: (1, {'@': 197}), 12: (1, {'@': 197}), 13: (1, {'@': 197})}, 437: {11: (1, {'@': 171}), 12: (1, {'@': 171}), 13: (1, {'@': 171}), 5: (1, {'@': 171}), 6: (1, {'@': 171})}, 438: {11: (1, {'@': 134}), 13: (1, {'@': 134}), 12: (1, {'@': 134})}, 439: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 131: (0, 372), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 440: {11: (1, {'@': 202}), 12: (1, {'@': 202}), 13: (1, {'@': 202})}, 441: {5: (1, {'@': 341}), 10: (1, {'@': 341})}, 442: {11: (1, {'@': 132}), 13: (1, {'@': 132}), 12: (1, {'@': 132})}, 443: {14: (1, {'@': 260}), 15: (1, {'@': 260}), 16: (1, {'@': 260}), 17: (1, {'@': 260}), 18: (1, {'@': 260}), 19: (1, {'@': 260}), 20: (1, {'@': 260}), 21: (1, {'@': 260}), 22: (1, {'@': 260}), 23: (1, {'@': 260}), 24: (1, {'@': 260}), 25: (1, {'@': 260}), 1: (1, {'@': 260}), 26: (1, {'@': 260}), 27: (1, {'@': 260}), 28: (1, {'@': 260}), 46: (1, {'@': 260}), 29: (1, {'@': 260}), 30: (1, {'@': 260}), 3: (1, {'@': 260}), 31: (1, {'@': 260}), 9: (1, {'@': 260}), 32: (1, {'@': 260}), 34: (1, {'@': 260}), 33: (1, {'@': 260}), 5: (1, {'@': 260}), 35: (1, {'@': 260}), 36: (1, {'@': 260}), 37: (1, {'@': 260}), 47: (1, {'@': 260}), 38: (1, {'@': 260}), 48: (1, {'@': 260}), 39: (1, {'@': 260}), 49: (1, {'@': 260}), 40: (1, {'@': 260}), 41: (1, {'@': 260}), 42: (1, {'@': 260})}, 444: {11: (1, {'@': 139}), 13: (1, {'@': 139}), 12: (1, {'@': 139})}, 445: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 133: (0, 664), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 446: {11: (1, {'@': 194}), 12: (1, {'@': 194}), 13: (1, {'@': 194})}, 447: {5: (1, {'@': 176}), 6: (1, {'@': 176})}, 448: {11: (1, {'@': 110}), 13: (1, {'@': 110}), 12: (1, {'@': 110})}, 449: {4: (0, 182)}, 450: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 131: (0, 726), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 451: {206: (0, 447), 205: (0, 410)}, 452: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 131: (0, 168), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 453: {11: (1, {'@': 141}), 13: (1, {'@': 141}), 12: (1, {'@': 141})}, 454: {5: (1, {'@': 236}), 11: (1, {'@': 236}), 12: (1, {'@': 236}), 43: (1, {'@': 236}), 13: (1, {'@': 236})}, 455: {11: (1, {'@': 136}), 13: (1, {'@': 136}), 12: (1, {'@': 136})}, 456: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 53: (0, 585), 20: (0, 247)}, 457: {186: (0, 274), 73: (0, 679), 72: (1, {'@': 213}), 74: (1, {'@': 213}), 75: (1, {'@': 213}), 76: (1, {'@': 213}), 77: (1, {'@': 213}), 78: (1, {'@': 213}), 79: (1, {'@': 213}), 80: (1, {'@': 213}), 81: (1, {'@': 213}), 82: (1, {'@': 213}), 83: (1, {'@': 213}), 84: (1, {'@': 213}), 85: (1, {'@': 213}), 11: (1, {'@': 213}), 86: (1, {'@': 213}), 87: (1, {'@': 213}), 88: (1, {'@': 213}), 89: (1, {'@': 213}), 91: (1, {'@': 213}), 92: (1, {'@': 213}), 93: (1, {'@': 213}), 94: (1, {'@': 213}), 95: (1, {'@': 213}), 96: (1, {'@': 213}), 97: (1, {'@': 213}), 98: (1, {'@': 213}), 99: (1, {'@': 213}), 100: (1, {'@': 213}), 101: (1, {'@': 213}), 102: (1, {'@': 213}), 13: (1, {'@': 213}), 103: (1, {'@': 213}), 104: (1, {'@': 213}), 105: (1, {'@': 213}), 106: (1, {'@': 213}), 107: (1, {'@': 213}), 108: (1, {'@': 213}), 109: (1, {'@': 213}), 1: (1, {'@': 213}), 110: (1, {'@': 213}), 111: (1, {'@': 213}), 112: (1, {'@': 213}), 113: (1, {'@': 213}), 114: (1, {'@': 213}), 3: (1, {'@': 213}), 115: (1, {'@': 213}), 116: (1, {'@': 213}), 117: (1, {'@': 213}), 118: (1, {'@': 213}), 119: (1, {'@': 213}), 120: (1, {'@': 213}), 121: (1, {'@': 213}), 123: (1, {'@': 213}), 124: (1, {'@': 213})}, 458: {11: (1, {'@': 198}), 12: (1, {'@': 198}), 13: (1, {'@': 198})}, 459: {14: (1, {'@': 258}), 15: (1, {'@': 258}), 16: (1, {'@': 258}), 17: (1, {'@': 258}), 18: (1, {'@': 258}), 19: (1, {'@': 258}), 20: (1, {'@': 258}), 21: (1, {'@': 258}), 22: (1, {'@': 258}), 23: (1, {'@': 258}), 24: (1, {'@': 258}), 25: (1, {'@': 258}), 1: (1, {'@': 258}), 26: (1, {'@': 258}), 27: (1, {'@': 258}), 28: (1, {'@': 258}), 46: (1, {'@': 258}), 29: (1, {'@': 258}), 30: (1, {'@': 258}), 3: (1, {'@': 258}), 31: (1, {'@': 258}), 9: (1, {'@': 258}), 32: (1, {'@': 258}), 34: (1, {'@': 258}), 33: (1, {'@': 258}), 35: (1, {'@': 258}), 36: (1, {'@': 258}), 37: (1, {'@': 258}), 47: (1, {'@': 258}), 38: (1, {'@': 258}), 48: (1, {'@': 258}), 39: (1, {'@': 258}), 49: (1, {'@': 258}), 40: (1, {'@': 258}), 41: (1, {'@': 258}), 42: (1, {'@': 258})}, 460: {11: (1, {'@': 94}), 13: (1, {'@': 94}), 12: (1, {'@': 94})}, 461: {72: (1, {'@': 310}), 56: (1, {'@': 310}), 78: (1, {'@': 310}), 80: (1, {'@': 310}), 81: (1, {'@': 310}), 68: (1, {'@': 310}), 84: (1, {'@': 310}), 69: (1, {'@': 310}), 86: (1, {'@': 310}), 71: (1, {'@': 310}), 87: (1, {'@': 310}), 89: (1, {'@': 310}), 12: (1, {'@': 310}), 93: (1, {'@': 310}), 60: (1, {'@': 310}), 63: (1, {'@': 310}), 62: (1, {'@': 310}), 97: (1, {'@': 310}), 99: (1, {'@': 310}), 100: (1, {'@': 310}), 102: (1, {'@': 310}), 43: (1, {'@': 310}), 103: (1, {'@': 310}), 105: (1, {'@': 310}), 107: (1, {'@': 310}), 108: (1, {'@': 310}), 112: (1, {'@': 310}), 70: (1, {'@': 310}), 67: (1, {'@': 310}), 64: (1, {'@': 310}), 3: (1, {'@': 310}), 9: (1, {'@': 310}), 115: (1, {'@': 310}), 5: (1, {'@': 310}), 116: (1, {'@': 310}), 125: (1, {'@': 310}), 59: (1, {'@': 310}), 120: (1, {'@': 310}), 65: (1, {'@': 310}), 6: (1, {'@': 310}), 54: (1, {'@': 310}), 123: (1, {'@': 310}), 73: (1, {'@': 310}), 74: (1, {'@': 310}), 75: (1, {'@': 310}), 76: (1, {'@': 310}), 77: (1, {'@': 310}), 79: (1, {'@': 310}), 61: (1, {'@': 310}), 10: (1, {'@': 310}), 82: (1, {'@': 310}), 66: (1, {'@': 310}), 83: (1, {'@': 310}), 85: (1, {'@': 310}), 11: (1, {'@': 310}), 88: (1, {'@': 310}), 90: (1, {'@': 310}), 91: (1, {'@': 310}), 92: (1, {'@': 310}), 94: (1, {'@': 310}), 47: (1, {'@': 310}), 95: (1, {'@': 310}), 96: (1, {'@': 310}), 4: (1, {'@': 310}), 55: (1, {'@': 310}), 98: (1, {'@': 310}), 101: (1, {'@': 310}), 13: (1, {'@': 310}), 104: (1, {'@': 310}), 106: (1, {'@': 310}), 58: (1, {'@': 310}), 109: (1, {'@': 310}), 1: (1, {'@': 310}), 110: (1, {'@': 310}), 111: (1, {'@': 310}), 113: (1, {'@': 310}), 114: (1, {'@': 310}), 32: (1, {'@': 310}), 57: (1, {'@': 310}), 117: (1, {'@': 310}), 118: (1, {'@': 310}), 119: (1, {'@': 310}), 121: (1, {'@': 310}), 122: (1, {'@': 310}), 124: (1, {'@': 310})}, 462: {9: (0, 640)}, 463: {11: (1, {'@': 195}), 12: (1, {'@': 195}), 13: (1, {'@': 195})}, 464: {5: (1, {'@': 318}), 10: (1, {'@': 318}), 54: (1, {'@': 318}), 11: (1, {'@': 318}), 12: (1, {'@': 318}), 13: (1, {'@': 318})}, 465: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 131: (0, 455), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 466: {14: (1, {'@': 259}), 15: (1, {'@': 259}), 16: (1, {'@': 259}), 17: (1, {'@': 259}), 18: (1, {'@': 259}), 19: (1, {'@': 259}), 20: (1, {'@': 259}), 21: (1, {'@': 259}), 22: (1, {'@': 259}), 23: (1, {'@': 259}), 24: (1, {'@': 259}), 25: (1, {'@': 259}), 1: (1, {'@': 259}), 26: (1, {'@': 259}), 27: (1, {'@': 259}), 28: (1, {'@': 259}), 46: (1, {'@': 259}), 29: (1, {'@': 259}), 30: (1, {'@': 259}), 3: (1, {'@': 259}), 31: (1, {'@': 259}), 9: (1, {'@': 259}), 32: (1, {'@': 259}), 34: (1, {'@': 259}), 33: (1, {'@': 259}), 5: (1, {'@': 259}), 35: (1, {'@': 259}), 36: (1, {'@': 259}), 37: (1, {'@': 259}), 47: (1, {'@': 259}), 38: (1, {'@': 259}), 48: (1, {'@': 259}), 39: (1, {'@': 259}), 49: (1, {'@': 259}), 40: (1, {'@': 259}), 41: (1, {'@': 259}), 42: (1, {'@': 259})}, 467: {11: (1, {'@': 71}), 13: (1, {'@': 71}), 12: (1, {'@': 71})}, 468: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 131: (0, 217), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 469: {11: (1, {'@': 79}), 13: (1, {'@': 79}), 12: (1, {'@': 79})}, 470: {11: (1, {'@': 19}), 13: (1, {'@': 19}), 12: (1, {'@': 19})}, 471: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 199: (0, 620), 191: (0, 223), 149: (0, 779), 148: (0, 769), 13: (0, 707), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 83: (0, 720), 175: (0, 593), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 213: (0, 241), 208: (0, 244), 86: (0, 656), 151: (0, 717), 72: (0, 555), 192: (0, 253), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 114: (0, 759), 116: (0, 774), 155: (0, 651), 200: (0, 750), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 472: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 93: (0, 630), 164: (0, 531), 98: (0, 544), 11: (0, 602), 118: (0, 548), 185: (0, 636), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 175: (0, 619), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 12: (1, {'@': 188}), 13: (1, {'@': 188})}, 473: {72: (1, {'@': 221}), 74: (1, {'@': 221}), 75: (1, {'@': 221}), 76: (1, {'@': 221}), 77: (1, {'@': 221}), 78: (1, {'@': 221}), 79: (1, {'@': 221}), 80: (1, {'@': 221}), 81: (1, {'@': 221}), 82: (1, {'@': 221}), 83: (1, {'@': 221}), 84: (1, {'@': 221}), 85: (1, {'@': 221}), 11: (1, {'@': 221}), 86: (1, {'@': 221}), 87: (1, {'@': 221}), 88: (1, {'@': 221}), 89: (1, {'@': 221}), 91: (1, {'@': 221}), 92: (1, {'@': 221}), 93: (1, {'@': 221}), 94: (1, {'@': 221}), 95: (1, {'@': 221}), 96: (1, {'@': 221}), 97: (1, {'@': 221}), 98: (1, {'@': 221}), 99: (1, {'@': 221}), 100: (1, {'@': 221}), 101: (1, {'@': 221}), 102: (1, {'@': 221}), 13: (1, {'@': 221}), 103: (1, {'@': 221}), 104: (1, {'@': 221}), 105: (1, {'@': 221}), 106: (1, {'@': 221}), 107: (1, {'@': 221}), 108: (1, {'@': 221}), 109: (1, {'@': 221}), 1: (1, {'@': 221}), 110: (1, {'@': 221}), 111: (1, {'@': 221}), 112: (1, {'@': 221}), 113: (1, {'@': 221}), 114: (1, {'@': 221}), 3: (1, {'@': 221}), 115: (1, {'@': 221}), 116: (1, {'@': 221}), 117: (1, {'@': 221}), 118: (1, {'@': 221}), 119: (1, {'@': 221}), 120: (1, {'@': 221}), 121: (1, {'@': 221}), 123: (1, {'@': 221}), 124: (1, {'@': 221})}, 474: {9: (0, 753), 72: (1, {'@': 278}), 56: (1, {'@': 278}), 78: (1, {'@': 278}), 80: (1, {'@': 278}), 81: (1, {'@': 278}), 68: (1, {'@': 278}), 84: (1, {'@': 278}), 69: (1, {'@': 278}), 86: (1, {'@': 278}), 71: (1, {'@': 278}), 87: (1, {'@': 278}), 89: (1, {'@': 278}), 12: (1, {'@': 278}), 93: (1, {'@': 278}), 60: (1, {'@': 278}), 63: (1, {'@': 278}), 62: (1, {'@': 278}), 97: (1, {'@': 278}), 99: (1, {'@': 278}), 100: (1, {'@': 278}), 102: (1, {'@': 278}), 43: (1, {'@': 278}), 103: (1, {'@': 278}), 105: (1, {'@': 278}), 107: (1, {'@': 278}), 108: (1, {'@': 278}), 112: (1, {'@': 278}), 70: (1, {'@': 278}), 64: (1, {'@': 278}), 67: (1, {'@': 278}), 3: (1, {'@': 278}), 115: (1, {'@': 278}), 116: (1, {'@': 278}), 5: (1, {'@': 278}), 125: (1, {'@': 278}), 59: (1, {'@': 278}), 120: (1, {'@': 278}), 65: (1, {'@': 278}), 6: (1, {'@': 278}), 54: (1, {'@': 278}), 123: (1, {'@': 278}), 73: (1, {'@': 278}), 74: (1, {'@': 278}), 75: (1, {'@': 278}), 76: (1, {'@': 278}), 77: (1, {'@': 278}), 79: (1, {'@': 278}), 61: (1, {'@': 278}), 82: (1, {'@': 278}), 10: (1, {'@': 278}), 66: (1, {'@': 278}), 83: (1, {'@': 278}), 85: (1, {'@': 278}), 11: (1, {'@': 278}), 88: (1, {'@': 278}), 90: (1, {'@': 278}), 91: (1, {'@': 278}), 92: (1, {'@': 278}), 94: (1, {'@': 278}), 47: (1, {'@': 278}), 95: (1, {'@': 278}), 96: (1, {'@': 278}), 4: (1, {'@': 278}), 55: (1, {'@': 278}), 98: (1, {'@': 278}), 101: (1, {'@': 278}), 13: (1, {'@': 278}), 104: (1, {'@': 278}), 106: (1, {'@': 278}), 58: (1, {'@': 278}), 109: (1, {'@': 278}), 1: (1, {'@': 278}), 110: (1, {'@': 278}), 111: (1, {'@': 278}), 113: (1, {'@': 278}), 114: (1, {'@': 278}), 32: (1, {'@': 278}), 57: (1, {'@': 278}), 117: (1, {'@': 278}), 118: (1, {'@': 278}), 119: (1, {'@': 278}), 121: (1, {'@': 278}), 122: (1, {'@': 278}), 124: (1, {'@': 278})}, 475: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 131: (0, 2), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 476: {73: (0, 679), 186: (0, 333), 72: (1, {'@': 213}), 74: (1, {'@': 213}), 75: (1, {'@': 213}), 76: (1, {'@': 213}), 77: (1, {'@': 213}), 78: (1, {'@': 213}), 79: (1, {'@': 213}), 80: (1, {'@': 213}), 81: (1, {'@': 213}), 82: (1, {'@': 213}), 83: (1, {'@': 213}), 84: (1, {'@': 213}), 85: (1, {'@': 213}), 11: (1, {'@': 213}), 86: (1, {'@': 213}), 87: (1, {'@': 213}), 88: (1, {'@': 213}), 89: (1, {'@': 213}), 91: (1, {'@': 213}), 92: (1, {'@': 213}), 93: (1, {'@': 213}), 94: (1, {'@': 213}), 95: (1, {'@': 213}), 96: (1, {'@': 213}), 97: (1, {'@': 213}), 98: (1, {'@': 213}), 99: (1, {'@': 213}), 100: (1, {'@': 213}), 101: (1, {'@': 213}), 102: (1, {'@': 213}), 13: (1, {'@': 213}), 103: (1, {'@': 213}), 104: (1, {'@': 213}), 105: (1, {'@': 213}), 106: (1, {'@': 213}), 107: (1, {'@': 213}), 108: (1, {'@': 213}), 109: (1, {'@': 213}), 1: (1, {'@': 213}), 110: (1, {'@': 213}), 111: (1, {'@': 213}), 112: (1, {'@': 213}), 113: (1, {'@': 213}), 114: (1, {'@': 213}), 3: (1, {'@': 213}), 115: (1, {'@': 213}), 116: (1, {'@': 213}), 117: (1, {'@': 213}), 118: (1, {'@': 213}), 119: (1, {'@': 213}), 120: (1, {'@': 213}), 121: (1, {'@': 213}), 123: (1, {'@': 213}), 124: (1, {'@': 213})}, 477: {11: (1, {'@': 138}), 13: (1, {'@': 138}), 12: (1, {'@': 138})}, 478: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 473), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 479: {11: (1, {'@': 140}), 13: (1, {'@': 140}), 12: (1, {'@': 140})}, 480: {11: (0, 300), 13: (1, {'@': 144})}, 481: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 131: (0, 711), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 482: {11: (1, {'@': 137}), 13: (1, {'@': 137}), 12: (1, {'@': 137})}, 483: {55: (1, {'@': 411}), 56: (1, {'@': 411}), 57: (1, {'@': 411}), 58: (1, {'@': 411}), 59: (1, {'@': 411}), 60: (1, {'@': 411}), 61: (1, {'@': 411}), 47: (1, {'@': 411}), 62: (1, {'@': 411}), 63: (1, {'@': 411}), 64: (1, {'@': 411}), 65: (1, {'@': 411}), 66: (1, {'@': 411}), 67: (1, {'@': 411}), 68: (1, {'@': 411}), 54: (1, {'@': 411}), 69: (1, {'@': 411}), 70: (1, {'@': 411}), 4: (1, {'@': 411}), 71: (1, {'@': 411}), 12: (1, {'@': 411}), 13: (1, {'@': 411}), 11: (1, {'@': 411}), 72: (1, {'@': 411}), 73: (1, {'@': 411}), 74: (1, {'@': 411}), 75: (1, {'@': 411}), 76: (1, {'@': 411}), 77: (1, {'@': 411}), 78: (1, {'@': 411}), 79: (1, {'@': 411}), 80: (1, {'@': 411}), 81: (1, {'@': 411}), 10: (1, {'@': 411}), 82: (1, {'@': 411}), 83: (1, {'@': 411}), 84: (1, {'@': 411}), 85: (1, {'@': 411}), 86: (1, {'@': 411}), 87: (1, {'@': 411}), 88: (1, {'@': 411}), 89: (1, {'@': 411}), 90: (1, {'@': 411}), 91: (1, {'@': 411}), 92: (1, {'@': 411}), 93: (1, {'@': 411}), 94: (1, {'@': 411}), 95: (1, {'@': 411}), 96: (1, {'@': 411}), 97: (1, {'@': 411}), 98: (1, {'@': 411}), 99: (1, {'@': 411}), 100: (1, {'@': 411}), 101: (1, {'@': 411}), 102: (1, {'@': 411}), 43: (1, {'@': 411}), 103: (1, {'@': 411}), 104: (1, {'@': 411}), 105: (1, {'@': 411}), 106: (1, {'@': 411}), 107: (1, {'@': 411}), 108: (1, {'@': 411}), 109: (1, {'@': 411}), 1: (1, {'@': 411}), 110: (1, {'@': 411}), 111: (1, {'@': 411}), 112: (1, {'@': 411}), 113: (1, {'@': 411}), 114: (1, {'@': 411}), 3: (1, {'@': 411}), 32: (1, {'@': 411}), 115: (1, {'@': 411}), 5: (1, {'@': 411}), 116: (1, {'@': 411}), 117: (1, {'@': 411}), 118: (1, {'@': 411}), 119: (1, {'@': 411}), 120: (1, {'@': 411}), 121: (1, {'@': 411}), 6: (1, {'@': 411}), 122: (1, {'@': 411}), 123: (1, {'@': 411}), 124: (1, {'@': 411})}, 484: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 11: (0, 73), 93: (0, 630), 164: (0, 531), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 175: (0, 619), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 185: (0, 197), 162: (0, 470), 121: (0, 434), 76: (0, 459), 13: (1, {'@': 146})}, 485: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 191: (0, 484), 81: (0, 786), 11: (0, 632), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 165: (0, 348), 92: (0, 604), 164: (0, 399), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 116: (0, 774), 155: (0, 651), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 192: (0, 492), 193: (0, 480), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 194: (0, 361), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 13: (1, {'@': 148})}, 486: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 139: (0, 560), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 487: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 131: (0, 761), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 488: {5: (0, 451), 6: (0, 437)}, 489: {11: (1, {'@': 47}), 13: (1, {'@': 47}), 12: (1, {'@': 47})}, 490: {4: (0, 364)}, 491: {6: (0, 161), 5: (0, 475)}, 492: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 93: (0, 630), 164: (0, 531), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 185: (0, 199), 175: (0, 619), 94: (0, 584), 82: (0, 568), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 13: (1, {'@': 147})}, 493: {9: (0, 612)}, 494: {14: (1, {'@': 372}), 15: (1, {'@': 372}), 16: (1, {'@': 372}), 17: (1, {'@': 372}), 18: (1, {'@': 372}), 19: (1, {'@': 372}), 20: (1, {'@': 372}), 21: (1, {'@': 372}), 22: (1, {'@': 372}), 23: (1, {'@': 372}), 24: (1, {'@': 372}), 25: (1, {'@': 372}), 1: (1, {'@': 372}), 26: (1, {'@': 372}), 27: (1, {'@': 372}), 28: (1, {'@': 372}), 29: (1, {'@': 372}), 30: (1, {'@': 372}), 3: (1, {'@': 372}), 31: (1, {'@': 372}), 9: (1, {'@': 372}), 32: (1, {'@': 372}), 33: (1, {'@': 372}), 34: (1, {'@': 372}), 35: (1, {'@': 372}), 36: (1, {'@': 372}), 37: (1, {'@': 372}), 38: (1, {'@': 372}), 39: (1, {'@': 372}), 40: (1, {'@': 372}), 41: (1, {'@': 372}), 42: (1, {'@': 372})}, 495: {5: (1, {'@': 175}), 6: (1, {'@': 175})}, 496: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 131: (0, 271), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 497: {61: (0, 212), 70: (0, 362), 55: (1, {'@': 408}), 56: (1, {'@': 408}), 57: (1, {'@': 408}), 58: (1, {'@': 408}), 59: (1, {'@': 408}), 60: (1, {'@': 408}), 47: (1, {'@': 408}), 62: (1, {'@': 408}), 63: (1, {'@': 408}), 65: (1, {'@': 408}), 66: (1, {'@': 408}), 68: (1, {'@': 408}), 54: (1, {'@': 408}), 4: (1, {'@': 408}), 69: (1, {'@': 408}), 67: (1, {'@': 408}), 64: (1, {'@': 408}), 71: (1, {'@': 408}), 12: (1, {'@': 408}), 13: (1, {'@': 408}), 11: (1, {'@': 408}), 72: (1, {'@': 408}), 73: (1, {'@': 408}), 74: (1, {'@': 408}), 75: (1, {'@': 408}), 76: (1, {'@': 408}), 77: (1, {'@': 408}), 78: (1, {'@': 408}), 79: (1, {'@': 408}), 80: (1, {'@': 408}), 81: (1, {'@': 408}), 10: (1, {'@': 408}), 82: (1, {'@': 408}), 83: (1, {'@': 408}), 84: (1, {'@': 408}), 85: (1, {'@': 408}), 86: (1, {'@': 408}), 87: (1, {'@': 408}), 88: (1, {'@': 408}), 89: (1, {'@': 408}), 90: (1, {'@': 408}), 91: (1, {'@': 408}), 92: (1, {'@': 408}), 93: (1, {'@': 408}), 94: (1, {'@': 408}), 95: (1, {'@': 408}), 96: (1, {'@': 408}), 97: (1, {'@': 408}), 98: (1, {'@': 408}), 99: (1, {'@': 408}), 100: (1, {'@': 408}), 101: (1, {'@': 408}), 102: (1, {'@': 408}), 43: (1, {'@': 408}), 103: (1, {'@': 408}), 104: (1, {'@': 408}), 105: (1, {'@': 408}), 106: (1, {'@': 408}), 107: (1, {'@': 408}), 108: (1, {'@': 408}), 109: (1, {'@': 408}), 1: (1, {'@': 408}), 110: (1, {'@': 408}), 111: (1, {'@': 408}), 112: (1, {'@': 408}), 113: (1, {'@': 408}), 114: (1, {'@': 408}), 3: (1, {'@': 408}), 32: (1, {'@': 408}), 115: (1, {'@': 408}), 5: (1, {'@': 408}), 116: (1, {'@': 408}), 117: (1, {'@': 408}), 118: (1, {'@': 408}), 119: (1, {'@': 408}), 120: (1, {'@': 408}), 121: (1, {'@': 408}), 6: (1, {'@': 408}), 122: (1, {'@': 408}), 123: (1, {'@': 408}), 124: (1, {'@': 408})}, 498: {5: (1, {'@': 173}), 6: (1, {'@': 173})}, 499: {72: (1, {'@': 4}), 74: (1, {'@': 4}), 75: (1, {'@': 4}), 76: (1, {'@': 4}), 77: (1, {'@': 4}), 78: (1, {'@': 4}), 166: (1, {'@': 4}), 79: (1, {'@': 4}), 80: (1, {'@': 4}), 81: (1, {'@': 4}), 82: (1, {'@': 4}), 44: (1, {'@': 4}), 83: (1, {'@': 4}), 84: (1, {'@': 4}), 85: (1, {'@': 4}), 11: (1, {'@': 4}), 86: (1, {'@': 4}), 163: (1, {'@': 4}), 45: (1, {'@': 4}), 87: (1, {'@': 4}), 88: (1, {'@': 4}), 89: (1, {'@': 4}), 12: (1, {'@': 4}), 91: (1, {'@': 4}), 92: (1, {'@': 4}), 93: (1, {'@': 4}), 94: (1, {'@': 4}), 95: (1, {'@': 4}), 96: (1, {'@': 4}), 164: (1, {'@': 4}), 165: (1, {'@': 4}), 97: (1, {'@': 4}), 167: (1, {'@': 4}), 98: (1, {'@': 4}), 99: (1, {'@': 4}), 100: (1, {'@': 4}), 101: (1, {'@': 4}), 102: (1, {'@': 4}), 13: (1, {'@': 4}), 103: (1, {'@': 4}), 105: (1, {'@': 4}), 104: (1, {'@': 4}), 106: (1, {'@': 4}), 107: (1, {'@': 4}), 108: (1, {'@': 4}), 109: (1, {'@': 4}), 1: (1, {'@': 4}), 110: (1, {'@': 4}), 111: (1, {'@': 4}), 112: (1, {'@': 4}), 113: (1, {'@': 4}), 114: (1, {'@': 4}), 3: (1, {'@': 4}), 115: (1, {'@': 4}), 116: (1, {'@': 4}), 117: (1, {'@': 4}), 118: (1, {'@': 4}), 119: (1, {'@': 4}), 120: (1, {'@': 4}), 121: (1, {'@': 4}), 122: (1, {'@': 4}), 123: (1, {'@': 4}), 124: (1, {'@': 4}), 195: (1, {'@': 4}), 168: (1, {'@': 4})}, 500: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 131: (0, 311), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 501: {9: (0, 390), 172: (0, 395), 4: (0, 385)}, 502: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 9: (0, 690), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 38: (0, 50), 53: (0, 603), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 503: {14: (1, {'@': 374}), 15: (1, {'@': 374}), 16: (1, {'@': 374}), 17: (1, {'@': 374}), 18: (1, {'@': 374}), 19: (1, {'@': 374}), 20: (1, {'@': 374}), 21: (1, {'@': 374}), 22: (1, {'@': 374}), 23: (1, {'@': 374}), 24: (1, {'@': 374}), 25: (1, {'@': 374}), 1: (1, {'@': 374}), 26: (1, {'@': 374}), 27: (1, {'@': 374}), 28: (1, {'@': 374}), 29: (1, {'@': 374}), 30: (1, {'@': 374}), 3: (1, {'@': 374}), 31: (1, {'@': 374}), 9: (1, {'@': 374}), 32: (1, {'@': 374}), 33: (1, {'@': 374}), 34: (1, {'@': 374}), 35: (1, {'@': 374}), 36: (1, {'@': 374}), 37: (1, {'@': 374}), 38: (1, {'@': 374}), 39: (1, {'@': 374}), 40: (1, {'@': 374}), 41: (1, {'@': 374}), 42: (1, {'@': 374})}, 504: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 53: (0, 665), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 505: {57: (1, {'@': 386}), 56: (1, {'@': 386}), 54: (1, {'@': 386}), 63: (1, {'@': 386}), 11: (1, {'@': 386}), 12: (1, {'@': 386}), 13: (1, {'@': 386}), 72: (1, {'@': 386}), 74: (1, {'@': 386}), 98: (1, {'@': 386}), 75: (1, {'@': 386}), 99: (1, {'@': 386}), 100: (1, {'@': 386}), 76: (1, {'@': 386}), 101: (1, {'@': 386}), 102: (1, {'@': 386}), 103: (1, {'@': 386}), 77: (1, {'@': 386}), 78: (1, {'@': 386}), 104: (1, {'@': 386}), 105: (1, {'@': 386}), 106: (1, {'@': 386}), 107: (1, {'@': 386}), 79: (1, {'@': 386}), 108: (1, {'@': 386}), 80: (1, {'@': 386}), 81: (1, {'@': 386}), 82: (1, {'@': 386}), 109: (1, {'@': 386}), 83: (1, {'@': 386}), 1: (1, {'@': 386}), 110: (1, {'@': 386}), 111: (1, {'@': 386}), 84: (1, {'@': 386}), 112: (1, {'@': 386}), 85: (1, {'@': 386}), 86: (1, {'@': 386}), 113: (1, {'@': 386}), 114: (1, {'@': 386}), 87: (1, {'@': 386}), 3: (1, {'@': 386}), 88: (1, {'@': 386}), 89: (1, {'@': 386}), 115: (1, {'@': 386}), 90: (1, {'@': 386}), 116: (1, {'@': 386}), 117: (1, {'@': 386}), 118: (1, {'@': 386}), 91: (1, {'@': 386}), 119: (1, {'@': 386}), 92: (1, {'@': 386}), 93: (1, {'@': 386}), 94: (1, {'@': 386}), 120: (1, {'@': 386}), 95: (1, {'@': 386}), 96: (1, {'@': 386}), 121: (1, {'@': 386}), 123: (1, {'@': 386}), 97: (1, {'@': 386}), 124: (1, {'@': 386}), 5: (1, {'@': 386}), 10: (1, {'@': 386}), 43: (1, {'@': 386}), 73: (1, {'@': 386}), 6: (1, {'@': 386}), 32: (1, {'@': 386}), 122: (1, {'@': 386})}, 506: {11: (1, {'@': 52}), 13: (1, {'@': 52}), 12: (1, {'@': 52})}, 507: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 420), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 508: {5: (1, {'@': 251}), 11: (1, {'@': 251}), 12: (1, {'@': 251}), 43: (1, {'@': 251}), 13: (1, {'@': 251})}, 509: {8: (0, 218), 7: (0, 377), 12: (1, {'@': 352}), 13: (1, {'@': 352}), 4: (1, {'@': 352}), 11: (1, {'@': 352}), 169: (1, {'@': 352}), 170: (1, {'@': 352})}, 510: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 131: (0, 417), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 511: {214: (0, 173), 215: (0, 266), 216: (0, 250), 3: (1, {'@': 329})}, 512: {11: (1, {'@': 56}), 13: (1, {'@': 56}), 12: (1, {'@': 56})}, 513: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 133: (0, 196), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 514: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 93: (0, 630), 164: (0, 531), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 175: (0, 619), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 185: (0, 409), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 12: (1, {'@': 205}), 13: (1, {'@': 205})}, 515: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 251), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 516: {11: (1, {'@': 93}), 13: (1, {'@': 93}), 12: (1, {'@': 93})}, 517: {72: (1, {'@': 225}), 74: (1, {'@': 225}), 98: (1, {'@': 225}), 75: (1, {'@': 225}), 99: (1, {'@': 225}), 100: (1, {'@': 225}), 101: (1, {'@': 225}), 102: (1, {'@': 225}), 76: (1, {'@': 225}), 13: (1, {'@': 225}), 103: (1, {'@': 225}), 104: (1, {'@': 225}), 105: (1, {'@': 225}), 78: (1, {'@': 225}), 77: (1, {'@': 225}), 106: (1, {'@': 225}), 107: (1, {'@': 225}), 79: (1, {'@': 225}), 108: (1, {'@': 225}), 80: (1, {'@': 225}), 81: (1, {'@': 225}), 82: (1, {'@': 225}), 109: (1, {'@': 225}), 83: (1, {'@': 225}), 1: (1, {'@': 225}), 110: (1, {'@': 225}), 111: (1, {'@': 225}), 84: (1, {'@': 225}), 112: (1, {'@': 225}), 85: (1, {'@': 225}), 11: (1, {'@': 225}), 86: (1, {'@': 225}), 113: (1, {'@': 225}), 114: (1, {'@': 225}), 87: (1, {'@': 225}), 3: (1, {'@': 225}), 88: (1, {'@': 225}), 89: (1, {'@': 225}), 115: (1, {'@': 225}), 116: (1, {'@': 225}), 117: (1, {'@': 225}), 118: (1, {'@': 225}), 91: (1, {'@': 225}), 119: (1, {'@': 225}), 92: (1, {'@': 225}), 93: (1, {'@': 225}), 94: (1, {'@': 225}), 120: (1, {'@': 225}), 95: (1, {'@': 225}), 96: (1, {'@': 225}), 121: (1, {'@': 225}), 122: (1, {'@': 225}), 123: (1, {'@': 225}), 97: (1, {'@': 225}), 124: (1, {'@': 225})}, 518: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 131: (0, 697), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 519: {5: (0, 691)}, 520: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 131: (0, 140), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486), 11: (1, {'@': 123}), 13: (1, {'@': 123}), 12: (1, {'@': 123})}, 521: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 171: (0, 398), 9: (0, 183), 172: (0, 533), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 217: (0, 510), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 14: (0, 493), 15: (0, 205), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 24: (0, 408), 40: (0, 503), 53: (0, 643), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247), 55: (1, {'@': 271}), 56: (1, {'@': 271}), 57: (1, {'@': 271}), 5: (1, {'@': 271}), 125: (1, {'@': 271}), 58: (1, {'@': 271}), 59: (1, {'@': 271}), 60: (1, {'@': 271}), 61: (1, {'@': 271}), 47: (1, {'@': 271}), 63: (1, {'@': 271}), 62: (1, {'@': 271}), 64: (1, {'@': 271}), 10: (1, {'@': 271}), 65: (1, {'@': 271}), 66: (1, {'@': 271}), 70: (1, {'@': 271}), 68: (1, {'@': 271}), 54: (1, {'@': 271}), 69: (1, {'@': 271}), 67: (1, {'@': 271}), 4: (1, {'@': 271}), 71: (1, {'@': 271}), 12: (1, {'@': 271}), 13: (1, {'@': 271}), 11: (1, {'@': 271})}, 522: {14: (1, {'@': 257}), 15: (1, {'@': 257}), 16: (1, {'@': 257}), 17: (1, {'@': 257}), 18: (1, {'@': 257}), 19: (1, {'@': 257}), 20: (1, {'@': 257}), 21: (1, {'@': 257}), 22: (1, {'@': 257}), 23: (1, {'@': 257}), 24: (1, {'@': 257}), 25: (1, {'@': 257}), 1: (1, {'@': 257}), 26: (1, {'@': 257}), 27: (1, {'@': 257}), 28: (1, {'@': 257}), 46: (1, {'@': 257}), 29: (1, {'@': 257}), 30: (1, {'@': 257}), 3: (1, {'@': 257}), 31: (1, {'@': 257}), 9: (1, {'@': 257}), 32: (1, {'@': 257}), 34: (1, {'@': 257}), 33: (1, {'@': 257}), 35: (1, {'@': 257}), 36: (1, {'@': 257}), 37: (1, {'@': 257}), 47: (1, {'@': 257}), 38: (1, {'@': 257}), 48: (1, {'@': 257}), 39: (1, {'@': 257}), 49: (1, {'@': 257}), 40: (1, {'@': 257}), 41: (1, {'@': 257}), 42: (1, {'@': 257})}, 523: {216: (0, 56), 214: (0, 173), 215: (0, 266), 3: (1, {'@': 329})}, 524: {11: (1, {'@': 87}), 13: (1, {'@': 87}), 12: (1, {'@': 87})}, 525: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 191: (0, 337), 81: (0, 786), 11: (0, 632), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 166: (0, 363), 165: (0, 348), 92: (0, 604), 164: (0, 399), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 116: (0, 774), 155: (0, 651), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 192: (0, 92), 193: (0, 480), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 194: (0, 361), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 13: (1, {'@': 148})}, 526: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 131: (0, 309), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 527: {11: (1, {'@': 344}), 12: (1, {'@': 344}), 13: (1, {'@': 344})}, 528: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 131: (0, 301), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 529: {72: (1, {'@': 279}), 56: (1, {'@': 279}), 78: (1, {'@': 279}), 80: (1, {'@': 279}), 81: (1, {'@': 279}), 68: (1, {'@': 279}), 84: (1, {'@': 279}), 69: (1, {'@': 279}), 86: (1, {'@': 279}), 71: (1, {'@': 279}), 87: (1, {'@': 279}), 89: (1, {'@': 279}), 12: (1, {'@': 279}), 93: (1, {'@': 279}), 60: (1, {'@': 279}), 63: (1, {'@': 279}), 62: (1, {'@': 279}), 97: (1, {'@': 279}), 99: (1, {'@': 279}), 100: (1, {'@': 279}), 102: (1, {'@': 279}), 43: (1, {'@': 279}), 103: (1, {'@': 279}), 105: (1, {'@': 279}), 107: (1, {'@': 279}), 108: (1, {'@': 279}), 112: (1, {'@': 279}), 70: (1, {'@': 279}), 64: (1, {'@': 279}), 67: (1, {'@': 279}), 3: (1, {'@': 279}), 9: (1, {'@': 279}), 115: (1, {'@': 279}), 116: (1, {'@': 279}), 5: (1, {'@': 279}), 125: (1, {'@': 279}), 59: (1, {'@': 279}), 120: (1, {'@': 279}), 65: (1, {'@': 279}), 6: (1, {'@': 279}), 54: (1, {'@': 279}), 123: (1, {'@': 279}), 73: (1, {'@': 279}), 74: (1, {'@': 279}), 75: (1, {'@': 279}), 76: (1, {'@': 279}), 77: (1, {'@': 279}), 79: (1, {'@': 279}), 61: (1, {'@': 279}), 82: (1, {'@': 279}), 10: (1, {'@': 279}), 66: (1, {'@': 279}), 83: (1, {'@': 279}), 85: (1, {'@': 279}), 11: (1, {'@': 279}), 88: (1, {'@': 279}), 90: (1, {'@': 279}), 91: (1, {'@': 279}), 92: (1, {'@': 279}), 94: (1, {'@': 279}), 47: (1, {'@': 279}), 95: (1, {'@': 279}), 96: (1, {'@': 279}), 4: (1, {'@': 279}), 55: (1, {'@': 279}), 98: (1, {'@': 279}), 101: (1, {'@': 279}), 13: (1, {'@': 279}), 104: (1, {'@': 279}), 106: (1, {'@': 279}), 58: (1, {'@': 279}), 109: (1, {'@': 279}), 1: (1, {'@': 279}), 110: (1, {'@': 279}), 111: (1, {'@': 279}), 113: (1, {'@': 279}), 114: (1, {'@': 279}), 32: (1, {'@': 279}), 57: (1, {'@': 279}), 117: (1, {'@': 279}), 118: (1, {'@': 279}), 119: (1, {'@': 279}), 121: (1, {'@': 279}), 122: (1, {'@': 279}), 124: (1, {'@': 279})}, 530: {72: (1, {'@': 303}), 56: (1, {'@': 303}), 78: (1, {'@': 303}), 80: (1, {'@': 303}), 81: (1, {'@': 303}), 68: (1, {'@': 303}), 84: (1, {'@': 303}), 69: (1, {'@': 303}), 86: (1, {'@': 303}), 71: (1, {'@': 303}), 87: (1, {'@': 303}), 89: (1, {'@': 303}), 12: (1, {'@': 303}), 93: (1, {'@': 303}), 60: (1, {'@': 303}), 63: (1, {'@': 303}), 62: (1, {'@': 303}), 97: (1, {'@': 303}), 99: (1, {'@': 303}), 100: (1, {'@': 303}), 102: (1, {'@': 303}), 43: (1, {'@': 303}), 103: (1, {'@': 303}), 105: (1, {'@': 303}), 107: (1, {'@': 303}), 108: (1, {'@': 303}), 112: (1, {'@': 303}), 70: (1, {'@': 303}), 64: (1, {'@': 303}), 67: (1, {'@': 303}), 3: (1, {'@': 303}), 9: (1, {'@': 303}), 115: (1, {'@': 303}), 116: (1, {'@': 303}), 5: (1, {'@': 303}), 125: (1, {'@': 303}), 59: (1, {'@': 303}), 120: (1, {'@': 303}), 65: (1, {'@': 303}), 6: (1, {'@': 303}), 54: (1, {'@': 303}), 123: (1, {'@': 303}), 73: (1, {'@': 303}), 74: (1, {'@': 303}), 75: (1, {'@': 303}), 76: (1, {'@': 303}), 77: (1, {'@': 303}), 79: (1, {'@': 303}), 61: (1, {'@': 303}), 82: (1, {'@': 303}), 10: (1, {'@': 303}), 66: (1, {'@': 303}), 83: (1, {'@': 303}), 85: (1, {'@': 303}), 11: (1, {'@': 303}), 88: (1, {'@': 303}), 90: (1, {'@': 303}), 91: (1, {'@': 303}), 92: (1, {'@': 303}), 94: (1, {'@': 303}), 47: (1, {'@': 303}), 95: (1, {'@': 303}), 96: (1, {'@': 303}), 4: (1, {'@': 303}), 55: (1, {'@': 303}), 98: (1, {'@': 303}), 101: (1, {'@': 303}), 13: (1, {'@': 303}), 104: (1, {'@': 303}), 106: (1, {'@': 303}), 58: (1, {'@': 303}), 109: (1, {'@': 303}), 1: (1, {'@': 303}), 110: (1, {'@': 303}), 111: (1, {'@': 303}), 113: (1, {'@': 303}), 114: (1, {'@': 303}), 32: (1, {'@': 303}), 57: (1, {'@': 303}), 117: (1, {'@': 303}), 118: (1, {'@': 303}), 119: (1, {'@': 303}), 121: (1, {'@': 303}), 122: (1, {'@': 303}), 124: (1, {'@': 303})}, 531: {11: (1, {'@': 183}), 12: (1, {'@': 183}), 13: (1, {'@': 183})}, 532: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 131: (0, 457), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 533: {72: (1, {'@': 302}), 56: (1, {'@': 302}), 78: (1, {'@': 302}), 80: (1, {'@': 302}), 81: (1, {'@': 302}), 68: (1, {'@': 302}), 84: (1, {'@': 302}), 69: (1, {'@': 302}), 86: (1, {'@': 302}), 71: (1, {'@': 302}), 87: (1, {'@': 302}), 89: (1, {'@': 302}), 12: (1, {'@': 302}), 93: (1, {'@': 302}), 60: (1, {'@': 302}), 63: (1, {'@': 302}), 62: (1, {'@': 302}), 97: (1, {'@': 302}), 99: (1, {'@': 302}), 100: (1, {'@': 302}), 102: (1, {'@': 302}), 43: (1, {'@': 302}), 103: (1, {'@': 302}), 105: (1, {'@': 302}), 107: (1, {'@': 302}), 108: (1, {'@': 302}), 112: (1, {'@': 302}), 70: (1, {'@': 302}), 64: (1, {'@': 302}), 67: (1, {'@': 302}), 3: (1, {'@': 302}), 9: (1, {'@': 302}), 115: (1, {'@': 302}), 116: (1, {'@': 302}), 5: (1, {'@': 302}), 125: (1, {'@': 302}), 59: (1, {'@': 302}), 120: (1, {'@': 302}), 65: (1, {'@': 302}), 6: (1, {'@': 302}), 54: (1, {'@': 302}), 123: (1, {'@': 302}), 73: (1, {'@': 302}), 74: (1, {'@': 302}), 75: (1, {'@': 302}), 76: (1, {'@': 302}), 77: (1, {'@': 302}), 79: (1, {'@': 302}), 61: (1, {'@': 302}), 82: (1, {'@': 302}), 10: (1, {'@': 302}), 66: (1, {'@': 302}), 83: (1, {'@': 302}), 85: (1, {'@': 302}), 11: (1, {'@': 302}), 88: (1, {'@': 302}), 90: (1, {'@': 302}), 91: (1, {'@': 302}), 92: (1, {'@': 302}), 94: (1, {'@': 302}), 47: (1, {'@': 302}), 95: (1, {'@': 302}), 96: (1, {'@': 302}), 4: (1, {'@': 302}), 55: (1, {'@': 302}), 98: (1, {'@': 302}), 101: (1, {'@': 302}), 13: (1, {'@': 302}), 104: (1, {'@': 302}), 106: (1, {'@': 302}), 58: (1, {'@': 302}), 109: (1, {'@': 302}), 1: (1, {'@': 302}), 110: (1, {'@': 302}), 111: (1, {'@': 302}), 113: (1, {'@': 302}), 114: (1, {'@': 302}), 32: (1, {'@': 302}), 57: (1, {'@': 302}), 117: (1, {'@': 302}), 118: (1, {'@': 302}), 119: (1, {'@': 302}), 121: (1, {'@': 302}), 122: (1, {'@': 302}), 124: (1, {'@': 302})}, 534: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 418), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 535: {72: (1, {'@': 274}), 56: (1, {'@': 274}), 78: (1, {'@': 274}), 80: (1, {'@': 274}), 81: (1, {'@': 274}), 68: (1, {'@': 274}), 84: (1, {'@': 274}), 69: (1, {'@': 274}), 86: (1, {'@': 274}), 71: (1, {'@': 274}), 87: (1, {'@': 274}), 89: (1, {'@': 274}), 12: (1, {'@': 274}), 93: (1, {'@': 274}), 60: (1, {'@': 274}), 63: (1, {'@': 274}), 62: (1, {'@': 274}), 97: (1, {'@': 274}), 99: (1, {'@': 274}), 100: (1, {'@': 274}), 102: (1, {'@': 274}), 43: (1, {'@': 274}), 103: (1, {'@': 274}), 105: (1, {'@': 274}), 107: (1, {'@': 274}), 108: (1, {'@': 274}), 112: (1, {'@': 274}), 70: (1, {'@': 274}), 64: (1, {'@': 274}), 67: (1, {'@': 274}), 3: (1, {'@': 274}), 9: (1, {'@': 274}), 115: (1, {'@': 274}), 116: (1, {'@': 274}), 5: (1, {'@': 274}), 125: (1, {'@': 274}), 59: (1, {'@': 274}), 120: (1, {'@': 274}), 65: (1, {'@': 274}), 6: (1, {'@': 274}), 54: (1, {'@': 274}), 123: (1, {'@': 274}), 73: (1, {'@': 274}), 74: (1, {'@': 274}), 75: (1, {'@': 274}), 76: (1, {'@': 274}), 77: (1, {'@': 274}), 79: (1, {'@': 274}), 61: (1, {'@': 274}), 82: (1, {'@': 274}), 10: (1, {'@': 274}), 66: (1, {'@': 274}), 83: (1, {'@': 274}), 85: (1, {'@': 274}), 11: (1, {'@': 274}), 88: (1, {'@': 274}), 90: (1, {'@': 274}), 91: (1, {'@': 274}), 92: (1, {'@': 274}), 94: (1, {'@': 274}), 47: (1, {'@': 274}), 95: (1, {'@': 274}), 96: (1, {'@': 274}), 4: (1, {'@': 274}), 55: (1, {'@': 274}), 98: (1, {'@': 274}), 101: (1, {'@': 274}), 13: (1, {'@': 274}), 104: (1, {'@': 274}), 106: (1, {'@': 274}), 58: (1, {'@': 274}), 109: (1, {'@': 274}), 1: (1, {'@': 274}), 110: (1, {'@': 274}), 111: (1, {'@': 274}), 113: (1, {'@': 274}), 114: (1, {'@': 274}), 32: (1, {'@': 274}), 57: (1, {'@': 274}), 117: (1, {'@': 274}), 118: (1, {'@': 274}), 119: (1, {'@': 274}), 121: (1, {'@': 274}), 122: (1, {'@': 274}), 124: (1, {'@': 274})}, 536: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 234), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 537: {11: (1, {'@': 58}), 13: (1, {'@': 58}), 12: (1, {'@': 58})}, 538: {31: (0, 3), 126: (0, 96), 50: (0, 125), 17: (0, 369), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 128: (0, 295), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 539: {4: (0, 400)}, 540: {10: (1, {'@': 360}), 12: (1, {'@': 360}), 13: (1, {'@': 360}), 5: (1, {'@': 360}), 4: (1, {'@': 360}), 11: (1, {'@': 360}), 169: (1, {'@': 360}), 170: (1, {'@': 360})}, 541: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 45), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 542: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 131: (0, 672), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 543: {11: (1, {'@': 60}), 13: (1, {'@': 60}), 12: (1, {'@': 60})}, 544: {121: (0, 764), 116: (0, 404), 103: (0, 103)}, 545: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 357), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 546: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 131: (0, 360), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 547: {11: (1, {'@': 49}), 13: (1, {'@': 49}), 12: (1, {'@': 49})}, 548: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 218: (0, 736), 19: (0, 150), 131: (0, 701), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 95: (0, 542), 20: (0, 247), 101: (0, 265), 138: (0, 287), 82: (0, 278), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 108: (0, 487), 139: (0, 505), 22: (0, 11), 42: (0, 233), 110: (0, 450), 41: (0, 273), 21: (0, 305), 219: (0, 653), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 100: (0, 314), 48: (0, 486)}, 549: {44: (0, 12), 45: (0, 32), 175: (0, 8), 220: (0, 572), 120: (0, 550)}, 550: {122: (1, {'@': 142}), 165: (1, {'@': 142}), 164: (1, {'@': 142}), 12: (1, {'@': 142}), 166: (1, {'@': 142}), 72: (1, {'@': 142}), 98: (1, {'@': 142}), 99: (1, {'@': 142}), 100: (1, {'@': 142}), 101: (1, {'@': 142}), 102: (1, {'@': 142}), 76: (1, {'@': 142}), 13: (1, {'@': 142}), 103: (1, {'@': 142}), 105: (1, {'@': 142}), 104: (1, {'@': 142}), 78: (1, {'@': 142}), 77: (1, {'@': 142}), 106: (1, {'@': 142}), 107: (1, {'@': 142}), 79: (1, {'@': 142}), 108: (1, {'@': 142}), 80: (1, {'@': 142}), 81: (1, {'@': 142}), 82: (1, {'@': 142}), 44: (1, {'@': 142}), 109: (1, {'@': 142}), 83: (1, {'@': 142}), 1: (1, {'@': 142}), 110: (1, {'@': 142}), 111: (1, {'@': 142}), 84: (1, {'@': 142}), 112: (1, {'@': 142}), 85: (1, {'@': 142}), 11: (1, {'@': 142}), 86: (1, {'@': 142}), 114: (1, {'@': 142}), 163: (1, {'@': 142}), 45: (1, {'@': 142}), 87: (1, {'@': 142}), 3: (1, {'@': 142}), 88: (1, {'@': 142}), 89: (1, {'@': 142}), 115: (1, {'@': 142}), 116: (1, {'@': 142}), 117: (1, {'@': 142}), 118: (1, {'@': 142}), 91: (1, {'@': 142}), 119: (1, {'@': 142}), 92: (1, {'@': 142}), 93: (1, {'@': 142}), 94: (1, {'@': 142}), 120: (1, {'@': 142}), 95: (1, {'@': 142}), 96: (1, {'@': 142}), 121: (1, {'@': 142}), 123: (1, {'@': 142}), 97: (1, {'@': 142}), 124: (1, {'@': 142}), 167: (1, {'@': 142}), 168: (1, {'@': 142})}, 551: {81: (0, 574), 1: (0, 649), 32: (0, 545), 3: (0, 684)}, 552: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 175: (0, 593), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 208: (0, 244), 86: (0, 656), 151: (0, 717), 72: (0, 555), 92: (0, 604), 213: (0, 622), 101: (0, 699), 122: (0, 524), 100: (0, 685), 152: (0, 536), 74: (0, 597), 192: (0, 553), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 757), 114: (0, 759), 200: (0, 750), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 553: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 93: (0, 630), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 122: (0, 112), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 554: {12: (0, 645), 187: (0, 44), 175: (0, 663), 120: (0, 550), 166: (0, 532), 188: (0, 592), 185: (0, 758), 165: (0, 586), 189: (0, 512), 164: (0, 531), 190: (0, 37)}, 555: {33: (0, 667), 3: (0, 609), 11: (1, {'@': 75}), 13: (1, {'@': 75}), 12: (1, {'@': 75})}, 556: {}, 557: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 185: (0, 261), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 11: (0, 73), 93: (0, 630), 164: (0, 531), 98: (0, 544), 118: (0, 548), 157: (0, 552), 13: (0, 627), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 175: (0, 619), 94: (0, 584), 82: (0, 568), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 558: {9: (0, 561)}, 559: {31: (0, 3), 25: (0, 203), 126: (0, 96), 22: (0, 11), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 19: (0, 150), 1: (0, 324), 35: (0, 397), 42: (0, 233), 138: (0, 267), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 133: (0, 160), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 560: {57: (1, {'@': 387}), 56: (1, {'@': 387}), 54: (1, {'@': 387}), 63: (1, {'@': 387}), 11: (1, {'@': 387}), 12: (1, {'@': 387}), 13: (1, {'@': 387}), 72: (1, {'@': 387}), 73: (1, {'@': 387}), 74: (1, {'@': 387}), 75: (1, {'@': 387}), 76: (1, {'@': 387}), 77: (1, {'@': 387}), 78: (1, {'@': 387}), 79: (1, {'@': 387}), 80: (1, {'@': 387}), 81: (1, {'@': 387}), 10: (1, {'@': 387}), 82: (1, {'@': 387}), 83: (1, {'@': 387}), 84: (1, {'@': 387}), 85: (1, {'@': 387}), 86: (1, {'@': 387}), 87: (1, {'@': 387}), 88: (1, {'@': 387}), 89: (1, {'@': 387}), 90: (1, {'@': 387}), 91: (1, {'@': 387}), 92: (1, {'@': 387}), 93: (1, {'@': 387}), 94: (1, {'@': 387}), 95: (1, {'@': 387}), 96: (1, {'@': 387}), 97: (1, {'@': 387}), 98: (1, {'@': 387}), 99: (1, {'@': 387}), 100: (1, {'@': 387}), 101: (1, {'@': 387}), 102: (1, {'@': 387}), 43: (1, {'@': 387}), 103: (1, {'@': 387}), 104: (1, {'@': 387}), 105: (1, {'@': 387}), 106: (1, {'@': 387}), 107: (1, {'@': 387}), 108: (1, {'@': 387}), 109: (1, {'@': 387}), 1: (1, {'@': 387}), 110: (1, {'@': 387}), 111: (1, {'@': 387}), 112: (1, {'@': 387}), 113: (1, {'@': 387}), 114: (1, {'@': 387}), 3: (1, {'@': 387}), 32: (1, {'@': 387}), 115: (1, {'@': 387}), 5: (1, {'@': 387}), 116: (1, {'@': 387}), 117: (1, {'@': 387}), 118: (1, {'@': 387}), 119: (1, {'@': 387}), 120: (1, {'@': 387}), 121: (1, {'@': 387}), 6: (1, {'@': 387}), 122: (1, {'@': 387}), 123: (1, {'@': 387}), 124: (1, {'@': 387})}, 561: {3: (0, 283)}, 562: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 133: (0, 74), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 563: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 196: (0, 180), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 197: (0, 708), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 10: (0, 209), 20: (0, 247), 138: (0, 287), 54: (0, 222), 15: (0, 205), 32: (0, 504), 30: (0, 194), 131: (0, 210), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 564: {33: (0, 71), 3: (0, 489)}, 565: {11: (0, 75), 12: (1, {'@': 207}), 13: (1, {'@': 207})}, 566: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 196: (0, 180), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 197: (0, 708), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 10: (0, 209), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 66), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 567: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 93: (0, 630), 164: (0, 531), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 175: (0, 619), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 185: (0, 402), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 568: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 131: (0, 727), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 569: {4: (0, 468)}, 570: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 165: (0, 586), 156: (0, 747), 11: (0, 73), 93: (0, 630), 164: (0, 531), 98: (0, 544), 118: (0, 548), 157: (0, 552), 185: (0, 440), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 175: (0, 619), 94: (0, 584), 82: (0, 568), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 12: (1, {'@': 204}), 13: (1, {'@': 204})}, 571: {221: (0, 174), 33: (0, 342), 3: (0, 188)}, 572: {11: (1, {'@': 89}), 13: (1, {'@': 89}), 12: (1, {'@': 89})}, 573: {9: (0, 288), 171: (0, 740), 4: (0, 760)}, 574: {3: (0, 393), 11: (1, {'@': 119}), 13: (1, {'@': 119}), 12: (1, {'@': 119})}, 575: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 222: (0, 432), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 223: (0, 659), 87: (0, 615), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 95: (0, 542), 224: (0, 481), 20: (0, 247), 101: (0, 265), 131: (0, 7), 138: (0, 287), 82: (0, 278), 15: (0, 205), 219: (0, 454), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 108: (0, 487), 139: (0, 505), 22: (0, 11), 42: (0, 233), 110: (0, 450), 41: (0, 273), 21: (0, 305), 225: (0, 389), 170: (0, 411), 99: (0, 297), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 100: (0, 314), 48: (0, 486), 5: (1, {'@': 239}), 11: (1, {'@': 239}), 12: (1, {'@': 239}), 43: (1, {'@': 239}), 13: (1, {'@': 239})}, 576: {72: (1, {'@': 272}), 56: (1, {'@': 272}), 78: (1, {'@': 272}), 80: (1, {'@': 272}), 81: (1, {'@': 272}), 68: (1, {'@': 272}), 84: (1, {'@': 272}), 69: (1, {'@': 272}), 86: (1, {'@': 272}), 71: (1, {'@': 272}), 87: (1, {'@': 272}), 89: (1, {'@': 272}), 12: (1, {'@': 272}), 93: (1, {'@': 272}), 60: (1, {'@': 272}), 63: (1, {'@': 272}), 62: (1, {'@': 272}), 97: (1, {'@': 272}), 99: (1, {'@': 272}), 100: (1, {'@': 272}), 102: (1, {'@': 272}), 43: (1, {'@': 272}), 103: (1, {'@': 272}), 105: (1, {'@': 272}), 107: (1, {'@': 272}), 108: (1, {'@': 272}), 112: (1, {'@': 272}), 70: (1, {'@': 272}), 64: (1, {'@': 272}), 67: (1, {'@': 272}), 3: (1, {'@': 272}), 9: (1, {'@': 272}), 115: (1, {'@': 272}), 116: (1, {'@': 272}), 5: (1, {'@': 272}), 125: (1, {'@': 272}), 59: (1, {'@': 272}), 120: (1, {'@': 272}), 65: (1, {'@': 272}), 6: (1, {'@': 272}), 54: (1, {'@': 272}), 123: (1, {'@': 272}), 73: (1, {'@': 272}), 74: (1, {'@': 272}), 75: (1, {'@': 272}), 76: (1, {'@': 272}), 77: (1, {'@': 272}), 79: (1, {'@': 272}), 61: (1, {'@': 272}), 82: (1, {'@': 272}), 10: (1, {'@': 272}), 66: (1, {'@': 272}), 83: (1, {'@': 272}), 85: (1, {'@': 272}), 11: (1, {'@': 272}), 88: (1, {'@': 272}), 90: (1, {'@': 272}), 91: (1, {'@': 272}), 92: (1, {'@': 272}), 94: (1, {'@': 272}), 47: (1, {'@': 272}), 95: (1, {'@': 272}), 96: (1, {'@': 272}), 4: (1, {'@': 272}), 55: (1, {'@': 272}), 98: (1, {'@': 272}), 101: (1, {'@': 272}), 13: (1, {'@': 272}), 104: (1, {'@': 272}), 106: (1, {'@': 272}), 58: (1, {'@': 272}), 109: (1, {'@': 272}), 1: (1, {'@': 272}), 110: (1, {'@': 272}), 111: (1, {'@': 272}), 113: (1, {'@': 272}), 114: (1, {'@': 272}), 32: (1, {'@': 272}), 57: (1, {'@': 272}), 117: (1, {'@': 272}), 118: (1, {'@': 272}), 119: (1, {'@': 272}), 121: (1, {'@': 272}), 122: (1, {'@': 272}), 124: (1, {'@': 272})}, 577: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 93: (0, 630), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 120: (1, {'@': 151}), 165: (1, {'@': 151}), 164: (1, {'@': 151}), 122: (1, {'@': 151}), 12: (1, {'@': 151}), 166: (1, {'@': 151}), 45: (1, {'@': 151}), 44: (1, {'@': 151}), 168: (1, {'@': 151}), 163: (1, {'@': 151}), 167: (1, {'@': 151})}, 578: {3: (0, 298)}, 579: {96: (0, 772), 88: (0, 650), 158: (0, 571), 79: (0, 589)}, 580: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 175: (0, 211), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 208: (0, 244), 86: (0, 656), 151: (0, 717), 213: (0, 85), 72: (0, 555), 92: (0, 604), 101: (0, 699), 174: (0, 80), 100: (0, 685), 152: (0, 536), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 757), 114: (0, 759), 200: (0, 750), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 192: (0, 686), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 122: (0, 714), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 581: {5: (0, 660)}, 582: {11: (1, {'@': 326}), 13: (1, {'@': 326}), 12: (1, {'@': 326})}, 583: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 131: (0, 773), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 584: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 131: (0, 713), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486), 11: (1, {'@': 98}), 13: (1, {'@': 98}), 12: (1, {'@': 98})}, 585: {72: (1, {'@': 294}), 56: (1, {'@': 294}), 78: (1, {'@': 294}), 80: (1, {'@': 294}), 81: (1, {'@': 294}), 68: (1, {'@': 294}), 84: (1, {'@': 294}), 69: (1, {'@': 294}), 86: (1, {'@': 294}), 71: (1, {'@': 294}), 87: (1, {'@': 294}), 89: (1, {'@': 294}), 12: (1, {'@': 294}), 93: (1, {'@': 294}), 60: (1, {'@': 294}), 63: (1, {'@': 294}), 62: (1, {'@': 294}), 97: (1, {'@': 294}), 99: (1, {'@': 294}), 100: (1, {'@': 294}), 102: (1, {'@': 294}), 43: (1, {'@': 294}), 103: (1, {'@': 294}), 105: (1, {'@': 294}), 107: (1, {'@': 294}), 108: (1, {'@': 294}), 112: (1, {'@': 294}), 70: (1, {'@': 294}), 64: (1, {'@': 294}), 67: (1, {'@': 294}), 3: (1, {'@': 294}), 9: (1, {'@': 294}), 115: (1, {'@': 294}), 116: (1, {'@': 294}), 5: (1, {'@': 294}), 125: (1, {'@': 294}), 59: (1, {'@': 294}), 120: (1, {'@': 294}), 65: (1, {'@': 294}), 6: (1, {'@': 294}), 54: (1, {'@': 294}), 123: (1, {'@': 294}), 73: (1, {'@': 294}), 74: (1, {'@': 294}), 75: (1, {'@': 294}), 76: (1, {'@': 294}), 77: (1, {'@': 294}), 79: (1, {'@': 294}), 61: (1, {'@': 294}), 82: (1, {'@': 294}), 10: (1, {'@': 294}), 66: (1, {'@': 294}), 83: (1, {'@': 294}), 85: (1, {'@': 294}), 11: (1, {'@': 294}), 88: (1, {'@': 294}), 90: (1, {'@': 294}), 91: (1, {'@': 294}), 92: (1, {'@': 294}), 94: (1, {'@': 294}), 47: (1, {'@': 294}), 95: (1, {'@': 294}), 96: (1, {'@': 294}), 4: (1, {'@': 294}), 55: (1, {'@': 294}), 98: (1, {'@': 294}), 101: (1, {'@': 294}), 13: (1, {'@': 294}), 104: (1, {'@': 294}), 106: (1, {'@': 294}), 58: (1, {'@': 294}), 109: (1, {'@': 294}), 1: (1, {'@': 294}), 110: (1, {'@': 294}), 111: (1, {'@': 294}), 113: (1, {'@': 294}), 114: (1, {'@': 294}), 32: (1, {'@': 294}), 57: (1, {'@': 294}), 117: (1, {'@': 294}), 118: (1, {'@': 294}), 119: (1, {'@': 294}), 121: (1, {'@': 294}), 122: (1, {'@': 294}), 124: (1, {'@': 294})}, 586: {11: (1, {'@': 185}), 12: (1, {'@': 185}), 13: (1, {'@': 185})}, 587: {5: (1, {'@': 238}), 11: (1, {'@': 238}), 12: (1, {'@': 238}), 43: (1, {'@': 238}), 13: (1, {'@': 238})}, 588: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 519), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 589: {33: (1, {'@': 182}), 3: (1, {'@': 182})}, 590: {176: (0, 302), 209: (0, 291), 3: (0, 286)}, 591: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 131: (0, 155), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 592: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 175: (0, 593), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 208: (0, 244), 86: (0, 656), 151: (0, 717), 72: (0, 555), 92: (0, 604), 101: (0, 699), 100: (0, 685), 152: (0, 536), 74: (0, 597), 213: (0, 162), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 757), 114: (0, 759), 200: (0, 750), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 192: (0, 686), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 593: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 191: (0, 62), 81: (0, 786), 11: (0, 632), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 116: (0, 774), 155: (0, 651), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 192: (0, 92), 193: (0, 480), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 194: (0, 361), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 163: (1, {'@': 148}), 120: (1, {'@': 148}), 45: (1, {'@': 148}), 44: (1, {'@': 148}), 12: (1, {'@': 148}), 13: (1, {'@': 148}), 164: (1, {'@': 148}), 122: (1, {'@': 148}), 165: (1, {'@': 148}), 166: (1, {'@': 148}), 167: (1, {'@': 148})}, 594: {11: (1, {'@': 346}), 12: (1, {'@': 346}), 13: (1, {'@': 346})}, 595: {170: (0, 126), 11: (1, {'@': 157}), 13: (1, {'@': 157}), 12: (1, {'@': 157})}, 596: {5: (0, 507)}, 597: {3: (0, 424), 226: (0, 346), 227: (0, 558)}, 598: {11: (1, {'@': 65}), 13: (1, {'@': 65}), 12: (1, {'@': 65})}, 599: {72: (1, {'@': 8}), 74: (1, {'@': 8}), 75: (1, {'@': 8}), 76: (1, {'@': 8}), 77: (1, {'@': 8}), 78: (1, {'@': 8}), 166: (1, {'@': 8}), 79: (1, {'@': 8}), 80: (1, {'@': 8}), 81: (1, {'@': 8}), 82: (1, {'@': 8}), 44: (1, {'@': 8}), 83: (1, {'@': 8}), 84: (1, {'@': 8}), 85: (1, {'@': 8}), 11: (1, {'@': 8}), 86: (1, {'@': 8}), 163: (1, {'@': 8}), 45: (1, {'@': 8}), 87: (1, {'@': 8}), 88: (1, {'@': 8}), 89: (1, {'@': 8}), 12: (1, {'@': 8}), 91: (1, {'@': 8}), 92: (1, {'@': 8}), 93: (1, {'@': 8}), 94: (1, {'@': 8}), 95: (1, {'@': 8}), 96: (1, {'@': 8}), 164: (1, {'@': 8}), 165: (1, {'@': 8}), 97: (1, {'@': 8}), 167: (1, {'@': 8}), 98: (1, {'@': 8}), 99: (1, {'@': 8}), 100: (1, {'@': 8}), 101: (1, {'@': 8}), 102: (1, {'@': 8}), 13: (1, {'@': 8}), 103: (1, {'@': 8}), 105: (1, {'@': 8}), 104: (1, {'@': 8}), 106: (1, {'@': 8}), 107: (1, {'@': 8}), 108: (1, {'@': 8}), 109: (1, {'@': 8}), 1: (1, {'@': 8}), 110: (1, {'@': 8}), 111: (1, {'@': 8}), 112: (1, {'@': 8}), 113: (1, {'@': 8}), 114: (1, {'@': 8}), 3: (1, {'@': 8}), 115: (1, {'@': 8}), 116: (1, {'@': 8}), 117: (1, {'@': 8}), 118: (1, {'@': 8}), 119: (1, {'@': 8}), 120: (1, {'@': 8}), 121: (1, {'@': 8}), 122: (1, {'@': 8}), 123: (1, {'@': 8}), 124: (1, {'@': 8}), 195: (1, {'@': 8}), 168: (1, {'@': 8})}, 600: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 131: (0, 367), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 601: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 131: (0, 694), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 602: {72: (1, {'@': 11}), 168: (1, {'@': 11}), 98: (1, {'@': 11}), 99: (1, {'@': 11}), 100: (1, {'@': 11}), 101: (1, {'@': 11}), 102: (1, {'@': 11}), 76: (1, {'@': 11}), 13: (1, {'@': 11}), 103: (1, {'@': 11}), 105: (1, {'@': 11}), 104: (1, {'@': 11}), 78: (1, {'@': 11}), 77: (1, {'@': 11}), 106: (1, {'@': 11}), 107: (1, {'@': 11}), 79: (1, {'@': 11}), 108: (1, {'@': 11}), 80: (1, {'@': 11}), 81: (1, {'@': 11}), 82: (1, {'@': 11}), 109: (1, {'@': 11}), 83: (1, {'@': 11}), 1: (1, {'@': 11}), 110: (1, {'@': 11}), 111: (1, {'@': 11}), 84: (1, {'@': 11}), 112: (1, {'@': 11}), 85: (1, {'@': 11}), 11: (1, {'@': 11}), 86: (1, {'@': 11}), 114: (1, {'@': 11}), 87: (1, {'@': 11}), 3: (1, {'@': 11}), 88: (1, {'@': 11}), 89: (1, {'@': 11}), 115: (1, {'@': 11}), 116: (1, {'@': 11}), 117: (1, {'@': 11}), 118: (1, {'@': 11}), 91: (1, {'@': 11}), 119: (1, {'@': 11}), 92: (1, {'@': 11}), 93: (1, {'@': 11}), 94: (1, {'@': 11}), 120: (1, {'@': 11}), 95: (1, {'@': 11}), 96: (1, {'@': 11}), 121: (1, {'@': 11}), 123: (1, {'@': 11}), 97: (1, {'@': 11}), 124: (1, {'@': 11}), 166: (1, {'@': 11}), 44: (1, {'@': 11}), 163: (1, {'@': 11}), 45: (1, {'@': 11}), 12: (1, {'@': 11}), 164: (1, {'@': 11}), 122: (1, {'@': 11}), 165: (1, {'@': 11}), 167: (1, {'@': 11})}, 603: {72: (1, {'@': 280}), 56: (1, {'@': 280}), 78: (1, {'@': 280}), 80: (1, {'@': 280}), 81: (1, {'@': 280}), 68: (1, {'@': 280}), 84: (1, {'@': 280}), 69: (1, {'@': 280}), 86: (1, {'@': 280}), 71: (1, {'@': 280}), 87: (1, {'@': 280}), 89: (1, {'@': 280}), 12: (1, {'@': 280}), 93: (1, {'@': 280}), 60: (1, {'@': 280}), 63: (1, {'@': 280}), 62: (1, {'@': 280}), 97: (1, {'@': 280}), 99: (1, {'@': 280}), 100: (1, {'@': 280}), 102: (1, {'@': 280}), 43: (1, {'@': 280}), 103: (1, {'@': 280}), 105: (1, {'@': 280}), 107: (1, {'@': 280}), 108: (1, {'@': 280}), 112: (1, {'@': 280}), 70: (1, {'@': 280}), 64: (1, {'@': 280}), 67: (1, {'@': 280}), 3: (1, {'@': 280}), 9: (1, {'@': 280}), 115: (1, {'@': 280}), 116: (1, {'@': 280}), 5: (1, {'@': 280}), 125: (1, {'@': 280}), 59: (1, {'@': 280}), 120: (1, {'@': 280}), 65: (1, {'@': 280}), 6: (1, {'@': 280}), 54: (1, {'@': 280}), 123: (1, {'@': 280}), 73: (1, {'@': 280}), 74: (1, {'@': 280}), 75: (1, {'@': 280}), 76: (1, {'@': 280}), 77: (1, {'@': 280}), 79: (1, {'@': 280}), 61: (1, {'@': 280}), 82: (1, {'@': 280}), 10: (1, {'@': 280}), 66: (1, {'@': 280}), 83: (1, {'@': 280}), 85: (1, {'@': 280}), 11: (1, {'@': 280}), 88: (1, {'@': 280}), 90: (1, {'@': 280}), 91: (1, {'@': 280}), 92: (1, {'@': 280}), 94: (1, {'@': 280}), 47: (1, {'@': 280}), 95: (1, {'@': 280}), 96: (1, {'@': 280}), 4: (1, {'@': 280}), 55: (1, {'@': 280}), 98: (1, {'@': 280}), 101: (1, {'@': 280}), 13: (1, {'@': 280}), 104: (1, {'@': 280}), 106: (1, {'@': 280}), 58: (1, {'@': 280}), 109: (1, {'@': 280}), 1: (1, {'@': 280}), 110: (1, {'@': 280}), 111: (1, {'@': 280}), 113: (1, {'@': 280}), 114: (1, {'@': 280}), 32: (1, {'@': 280}), 57: (1, {'@': 280}), 117: (1, {'@': 280}), 118: (1, {'@': 280}), 119: (1, {'@': 280}), 121: (1, {'@': 280}), 122: (1, {'@': 280}), 124: (1, {'@': 280})}, 604: {228: (0, 698), 1: (0, 185), 2: (0, 242), 3: (0, 264)}, 605: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 66), 197: (0, 464), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 606: {11: (1, {'@': 20}), 13: (1, {'@': 20}), 12: (1, {'@': 20})}, 607: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 130: (0, 255), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 608: {72: (1, {'@': 212}), 98: (1, {'@': 212}), 99: (1, {'@': 212}), 100: (1, {'@': 212}), 101: (1, {'@': 212}), 102: (1, {'@': 212}), 76: (1, {'@': 212}), 13: (1, {'@': 212}), 103: (1, {'@': 212}), 104: (1, {'@': 212}), 105: (1, {'@': 212}), 78: (1, {'@': 212}), 77: (1, {'@': 212}), 106: (1, {'@': 212}), 107: (1, {'@': 212}), 79: (1, {'@': 212}), 108: (1, {'@': 212}), 80: (1, {'@': 212}), 81: (1, {'@': 212}), 82: (1, {'@': 212}), 109: (1, {'@': 212}), 83: (1, {'@': 212}), 1: (1, {'@': 212}), 110: (1, {'@': 212}), 111: (1, {'@': 212}), 84: (1, {'@': 212}), 112: (1, {'@': 212}), 85: (1, {'@': 212}), 11: (1, {'@': 212}), 86: (1, {'@': 212}), 114: (1, {'@': 212}), 87: (1, {'@': 212}), 3: (1, {'@': 212}), 88: (1, {'@': 212}), 89: (1, {'@': 212}), 115: (1, {'@': 212}), 116: (1, {'@': 212}), 117: (1, {'@': 212}), 118: (1, {'@': 212}), 91: (1, {'@': 212}), 119: (1, {'@': 212}), 92: (1, {'@': 212}), 93: (1, {'@': 212}), 94: (1, {'@': 212}), 95: (1, {'@': 212}), 96: (1, {'@': 212}), 121: (1, {'@': 212}), 123: (1, {'@': 212}), 97: (1, {'@': 212}), 124: (1, {'@': 212})}, 609: {11: (1, {'@': 76}), 13: (1, {'@': 76}), 12: (1, {'@': 76})}, 610: {4: (0, 366)}, 611: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 175: (0, 485), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 208: (0, 244), 86: (0, 656), 155: (0, 651), 151: (0, 717), 72: (0, 555), 92: (0, 604), 101: (0, 699), 100: (0, 685), 152: (0, 536), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 213: (0, 119), 191: (0, 128), 200: (0, 750), 114: (0, 759), 165: (0, 586), 75: (0, 654), 116: (0, 774), 156: (0, 747), 93: (0, 630), 164: (0, 531), 98: (0, 544), 118: (0, 548), 157: (0, 552), 192: (0, 142), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 94: (0, 584), 82: (0, 568), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 185: (0, 156), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 612: {181: (0, 540), 179: (0, 104), 209: (0, 97), 180: (0, 67), 3: (0, 76), 1: (0, 99), 183: (0, 200), 176: (0, 189), 182: (0, 178), 178: (0, 123), 210: (0, 184), 184: (0, 111)}, 613: {10: (0, 347)}, 614: {9: (0, 566), 171: (0, 642), 5: (1, {'@': 321}), 10: (1, {'@': 321}), 54: (1, {'@': 321}), 12: (1, {'@': 321}), 13: (1, {'@': 321}), 11: (1, {'@': 321})}, 615: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 131: (0, 587), 37: (0, 494), 48: (0, 486)}, 616: {13: (1, {'@': 365})}, 617: {5: (0, 43)}, 618: {13: (0, 499)}, 619: {164: (0, 399), 165: (0, 348)}, 620: {13: (0, 176)}, 621: {72: (1, {'@': 295}), 56: (1, {'@': 295}), 78: (1, {'@': 295}), 80: (1, {'@': 295}), 81: (1, {'@': 295}), 68: (1, {'@': 295}), 84: (1, {'@': 295}), 69: (1, {'@': 295}), 86: (1, {'@': 295}), 71: (1, {'@': 295}), 87: (1, {'@': 295}), 89: (1, {'@': 295}), 12: (1, {'@': 295}), 93: (1, {'@': 295}), 60: (1, {'@': 295}), 63: (1, {'@': 295}), 62: (1, {'@': 295}), 97: (1, {'@': 295}), 99: (1, {'@': 295}), 100: (1, {'@': 295}), 102: (1, {'@': 295}), 43: (1, {'@': 295}), 103: (1, {'@': 295}), 105: (1, {'@': 295}), 107: (1, {'@': 295}), 108: (1, {'@': 295}), 112: (1, {'@': 295}), 70: (1, {'@': 295}), 64: (1, {'@': 295}), 67: (1, {'@': 295}), 3: (1, {'@': 295}), 9: (1, {'@': 295}), 115: (1, {'@': 295}), 116: (1, {'@': 295}), 5: (1, {'@': 295}), 125: (1, {'@': 295}), 59: (1, {'@': 295}), 120: (1, {'@': 295}), 65: (1, {'@': 295}), 6: (1, {'@': 295}), 54: (1, {'@': 295}), 123: (1, {'@': 295}), 73: (1, {'@': 295}), 74: (1, {'@': 295}), 75: (1, {'@': 295}), 76: (1, {'@': 295}), 77: (1, {'@': 295}), 79: (1, {'@': 295}), 61: (1, {'@': 295}), 82: (1, {'@': 295}), 10: (1, {'@': 295}), 66: (1, {'@': 295}), 83: (1, {'@': 295}), 85: (1, {'@': 295}), 11: (1, {'@': 295}), 88: (1, {'@': 295}), 90: (1, {'@': 295}), 91: (1, {'@': 295}), 92: (1, {'@': 295}), 94: (1, {'@': 295}), 47: (1, {'@': 295}), 95: (1, {'@': 295}), 96: (1, {'@': 295}), 4: (1, {'@': 295}), 55: (1, {'@': 295}), 98: (1, {'@': 295}), 101: (1, {'@': 295}), 13: (1, {'@': 295}), 104: (1, {'@': 295}), 106: (1, {'@': 295}), 58: (1, {'@': 295}), 109: (1, {'@': 295}), 1: (1, {'@': 295}), 110: (1, {'@': 295}), 111: (1, {'@': 295}), 113: (1, {'@': 295}), 114: (1, {'@': 295}), 32: (1, {'@': 295}), 57: (1, {'@': 295}), 117: (1, {'@': 295}), 118: (1, {'@': 295}), 119: (1, {'@': 295}), 121: (1, {'@': 295}), 122: (1, {'@': 295}), 124: (1, {'@': 295})}, 622: {122: (0, 87)}, 623: {13: (1, {'@': 369})}, 624: {11: (0, 300), 13: (0, 647)}, 625: {13: (1, {'@': 145}), 120: (1, {'@': 150}), 165: (1, {'@': 150}), 164: (1, {'@': 150}), 122: (1, {'@': 150}), 12: (1, {'@': 150}), 166: (1, {'@': 150}), 45: (1, {'@': 150}), 44: (1, {'@': 150}), 168: (1, {'@': 150}), 163: (1, {'@': 150}), 167: (1, {'@': 150})}, 626: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 131: (0, 598), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 627: {72: (1, {'@': 6}), 74: (1, {'@': 6}), 75: (1, {'@': 6}), 76: (1, {'@': 6}), 77: (1, {'@': 6}), 78: (1, {'@': 6}), 166: (1, {'@': 6}), 79: (1, {'@': 6}), 80: (1, {'@': 6}), 81: (1, {'@': 6}), 82: (1, {'@': 6}), 44: (1, {'@': 6}), 83: (1, {'@': 6}), 84: (1, {'@': 6}), 85: (1, {'@': 6}), 11: (1, {'@': 6}), 86: (1, {'@': 6}), 163: (1, {'@': 6}), 45: (1, {'@': 6}), 87: (1, {'@': 6}), 88: (1, {'@': 6}), 89: (1, {'@': 6}), 12: (1, {'@': 6}), 91: (1, {'@': 6}), 92: (1, {'@': 6}), 93: (1, {'@': 6}), 94: (1, {'@': 6}), 95: (1, {'@': 6}), 96: (1, {'@': 6}), 164: (1, {'@': 6}), 165: (1, {'@': 6}), 97: (1, {'@': 6}), 167: (1, {'@': 6}), 98: (1, {'@': 6}), 99: (1, {'@': 6}), 100: (1, {'@': 6}), 101: (1, {'@': 6}), 102: (1, {'@': 6}), 13: (1, {'@': 6}), 103: (1, {'@': 6}), 105: (1, {'@': 6}), 104: (1, {'@': 6}), 106: (1, {'@': 6}), 107: (1, {'@': 6}), 108: (1, {'@': 6}), 109: (1, {'@': 6}), 1: (1, {'@': 6}), 110: (1, {'@': 6}), 111: (1, {'@': 6}), 112: (1, {'@': 6}), 113: (1, {'@': 6}), 114: (1, {'@': 6}), 3: (1, {'@': 6}), 115: (1, {'@': 6}), 116: (1, {'@': 6}), 117: (1, {'@': 6}), 118: (1, {'@': 6}), 119: (1, {'@': 6}), 120: (1, {'@': 6}), 121: (1, {'@': 6}), 122: (1, {'@': 6}), 123: (1, {'@': 6}), 124: (1, {'@': 6}), 195: (1, {'@': 6}), 168: (1, {'@': 6})}, 628: {11: (1, {'@': 54}), 13: (1, {'@': 54}), 12: (1, {'@': 54})}, 629: {43: (1, {'@': 244}), 5: (1, {'@': 244}), 11: (1, {'@': 244}), 12: (1, {'@': 244}), 13: (1, {'@': 244})}, 630: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 218: (0, 787), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 131: (0, 641), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 95: (0, 542), 20: (0, 247), 101: (0, 265), 138: (0, 287), 82: (0, 278), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 108: (0, 487), 139: (0, 505), 22: (0, 11), 42: (0, 233), 110: (0, 450), 41: (0, 273), 21: (0, 305), 219: (0, 653), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 100: (0, 314), 48: (0, 486)}, 631: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 1: (0, 98), 25: (0, 203), 134: (0, 433), 35: (0, 397), 131: (0, 79), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 632: {72: (1, {'@': 12}), 168: (1, {'@': 12}), 98: (1, {'@': 12}), 99: (1, {'@': 12}), 100: (1, {'@': 12}), 101: (1, {'@': 12}), 102: (1, {'@': 12}), 76: (1, {'@': 12}), 13: (1, {'@': 12}), 103: (1, {'@': 12}), 105: (1, {'@': 12}), 104: (1, {'@': 12}), 78: (1, {'@': 12}), 77: (1, {'@': 12}), 106: (1, {'@': 12}), 107: (1, {'@': 12}), 79: (1, {'@': 12}), 108: (1, {'@': 12}), 80: (1, {'@': 12}), 81: (1, {'@': 12}), 82: (1, {'@': 12}), 109: (1, {'@': 12}), 83: (1, {'@': 12}), 1: (1, {'@': 12}), 110: (1, {'@': 12}), 111: (1, {'@': 12}), 84: (1, {'@': 12}), 112: (1, {'@': 12}), 85: (1, {'@': 12}), 11: (1, {'@': 12}), 86: (1, {'@': 12}), 114: (1, {'@': 12}), 87: (1, {'@': 12}), 3: (1, {'@': 12}), 88: (1, {'@': 12}), 89: (1, {'@': 12}), 115: (1, {'@': 12}), 116: (1, {'@': 12}), 117: (1, {'@': 12}), 118: (1, {'@': 12}), 91: (1, {'@': 12}), 119: (1, {'@': 12}), 92: (1, {'@': 12}), 93: (1, {'@': 12}), 94: (1, {'@': 12}), 120: (1, {'@': 12}), 95: (1, {'@': 12}), 96: (1, {'@': 12}), 121: (1, {'@': 12}), 123: (1, {'@': 12}), 97: (1, {'@': 12}), 124: (1, {'@': 12}), 166: (1, {'@': 12}), 44: (1, {'@': 12}), 163: (1, {'@': 12}), 45: (1, {'@': 12}), 12: (1, {'@': 12}), 164: (1, {'@': 12}), 122: (1, {'@': 12}), 165: (1, {'@': 12}), 167: (1, {'@': 12})}, 633: {5: (0, 718), 43: (0, 575), 11: (1, {'@': 96}), 13: (1, {'@': 96}), 12: (1, {'@': 96})}, 634: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 199: (0, 620), 148: (0, 769), 149: (0, 779), 13: (0, 707), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 83: (0, 720), 175: (0, 164), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 200: (0, 731), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 658), 114: (0, 759), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 192: (0, 577), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 625), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 168: (0, 231), 229: (0, 238), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 635: {43: (1, {'@': 242}), 5: (1, {'@': 242}), 11: (1, {'@': 242}), 12: (1, {'@': 242}), 13: (1, {'@': 242})}, 636: {11: (1, {'@': 55}), 13: (1, {'@': 55}), 12: (1, {'@': 55})}, 637: {13: (1, {'@': 145})}, 638: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 131: (0, 754), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 639: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 131: (0, 661), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486), 11: (1, {'@': 64}), 13: (1, {'@': 64}), 12: (1, {'@': 64})}, 640: {1: (0, 202)}, 641: {5: (0, 546)}, 642: {72: (1, {'@': 314}), 73: (1, {'@': 314}), 56: (1, {'@': 314}), 74: (1, {'@': 314}), 75: (1, {'@': 314}), 76: (1, {'@': 314}), 77: (1, {'@': 314}), 78: (1, {'@': 314}), 79: (1, {'@': 314}), 80: (1, {'@': 314}), 61: (1, {'@': 314}), 81: (1, {'@': 314}), 82: (1, {'@': 314}), 10: (1, {'@': 314}), 66: (1, {'@': 314}), 83: (1, {'@': 314}), 68: (1, {'@': 314}), 84: (1, {'@': 314}), 69: (1, {'@': 314}), 85: (1, {'@': 314}), 11: (1, {'@': 314}), 86: (1, {'@': 314}), 71: (1, {'@': 314}), 87: (1, {'@': 314}), 88: (1, {'@': 314}), 89: (1, {'@': 314}), 12: (1, {'@': 314}), 90: (1, {'@': 314}), 91: (1, {'@': 314}), 92: (1, {'@': 314}), 93: (1, {'@': 314}), 94: (1, {'@': 314}), 60: (1, {'@': 314}), 63: (1, {'@': 314}), 62: (1, {'@': 314}), 47: (1, {'@': 314}), 95: (1, {'@': 314}), 96: (1, {'@': 314}), 97: (1, {'@': 314}), 4: (1, {'@': 314}), 55: (1, {'@': 314}), 98: (1, {'@': 314}), 99: (1, {'@': 314}), 100: (1, {'@': 314}), 102: (1, {'@': 314}), 43: (1, {'@': 314}), 101: (1, {'@': 314}), 13: (1, {'@': 314}), 103: (1, {'@': 314}), 105: (1, {'@': 314}), 104: (1, {'@': 314}), 106: (1, {'@': 314}), 107: (1, {'@': 314}), 58: (1, {'@': 314}), 108: (1, {'@': 314}), 109: (1, {'@': 314}), 1: (1, {'@': 314}), 110: (1, {'@': 314}), 111: (1, {'@': 314}), 112: (1, {'@': 314}), 70: (1, {'@': 314}), 64: (1, {'@': 314}), 67: (1, {'@': 314}), 113: (1, {'@': 314}), 114: (1, {'@': 314}), 3: (1, {'@': 314}), 9: (1, {'@': 314}), 32: (1, {'@': 314}), 115: (1, {'@': 314}), 116: (1, {'@': 314}), 5: (1, {'@': 314}), 125: (1, {'@': 314}), 57: (1, {'@': 314}), 117: (1, {'@': 314}), 118: (1, {'@': 314}), 119: (1, {'@': 314}), 59: (1, {'@': 314}), 120: (1, {'@': 314}), 65: (1, {'@': 314}), 121: (1, {'@': 314}), 6: (1, {'@': 314}), 54: (1, {'@': 314}), 122: (1, {'@': 314}), 123: (1, {'@': 314}), 124: (1, {'@': 314})}, 643: {72: (1, {'@': 276}), 56: (1, {'@': 276}), 78: (1, {'@': 276}), 80: (1, {'@': 276}), 81: (1, {'@': 276}), 68: (1, {'@': 276}), 84: (1, {'@': 276}), 69: (1, {'@': 276}), 86: (1, {'@': 276}), 71: (1, {'@': 276}), 87: (1, {'@': 276}), 89: (1, {'@': 276}), 12: (1, {'@': 276}), 93: (1, {'@': 276}), 60: (1, {'@': 276}), 63: (1, {'@': 276}), 62: (1, {'@': 276}), 97: (1, {'@': 276}), 99: (1, {'@': 276}), 100: (1, {'@': 276}), 102: (1, {'@': 276}), 43: (1, {'@': 276}), 103: (1, {'@': 276}), 105: (1, {'@': 276}), 107: (1, {'@': 276}), 108: (1, {'@': 276}), 112: (1, {'@': 276}), 70: (1, {'@': 276}), 64: (1, {'@': 276}), 67: (1, {'@': 276}), 3: (1, {'@': 276}), 9: (1, {'@': 276}), 115: (1, {'@': 276}), 116: (1, {'@': 276}), 5: (1, {'@': 276}), 125: (1, {'@': 276}), 59: (1, {'@': 276}), 120: (1, {'@': 276}), 65: (1, {'@': 276}), 6: (1, {'@': 276}), 54: (1, {'@': 276}), 123: (1, {'@': 276}), 73: (1, {'@': 276}), 74: (1, {'@': 276}), 75: (1, {'@': 276}), 76: (1, {'@': 276}), 77: (1, {'@': 276}), 79: (1, {'@': 276}), 61: (1, {'@': 276}), 82: (1, {'@': 276}), 10: (1, {'@': 276}), 66: (1, {'@': 276}), 83: (1, {'@': 276}), 85: (1, {'@': 276}), 11: (1, {'@': 276}), 88: (1, {'@': 276}), 90: (1, {'@': 276}), 91: (1, {'@': 276}), 92: (1, {'@': 276}), 94: (1, {'@': 276}), 47: (1, {'@': 276}), 95: (1, {'@': 276}), 96: (1, {'@': 276}), 4: (1, {'@': 276}), 55: (1, {'@': 276}), 98: (1, {'@': 276}), 101: (1, {'@': 276}), 13: (1, {'@': 276}), 104: (1, {'@': 276}), 106: (1, {'@': 276}), 58: (1, {'@': 276}), 109: (1, {'@': 276}), 1: (1, {'@': 276}), 110: (1, {'@': 276}), 111: (1, {'@': 276}), 113: (1, {'@': 276}), 114: (1, {'@': 276}), 32: (1, {'@': 276}), 57: (1, {'@': 276}), 117: (1, {'@': 276}), 118: (1, {'@': 276}), 119: (1, {'@': 276}), 121: (1, {'@': 276}), 122: (1, {'@': 276}), 124: (1, {'@': 276})}, 644: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 131: (0, 681), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 645: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 193: (0, 775), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 83: (0, 720), 95: (0, 638), 192: (0, 514), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 13: (0, 611), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 191: (0, 570), 114: (0, 759), 116: (0, 774), 155: (0, 651), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 565), 106: (0, 762), 108: (0, 518), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 646: {11: (1, {'@': 111}), 13: (1, {'@': 111}), 12: (1, {'@': 111})}, 647: {72: (1, {'@': 7}), 74: (1, {'@': 7}), 75: (1, {'@': 7}), 76: (1, {'@': 7}), 77: (1, {'@': 7}), 78: (1, {'@': 7}), 166: (1, {'@': 7}), 79: (1, {'@': 7}), 80: (1, {'@': 7}), 81: (1, {'@': 7}), 82: (1, {'@': 7}), 44: (1, {'@': 7}), 83: (1, {'@': 7}), 84: (1, {'@': 7}), 85: (1, {'@': 7}), 11: (1, {'@': 7}), 86: (1, {'@': 7}), 163: (1, {'@': 7}), 45: (1, {'@': 7}), 87: (1, {'@': 7}), 88: (1, {'@': 7}), 89: (1, {'@': 7}), 12: (1, {'@': 7}), 91: (1, {'@': 7}), 92: (1, {'@': 7}), 93: (1, {'@': 7}), 94: (1, {'@': 7}), 95: (1, {'@': 7}), 96: (1, {'@': 7}), 164: (1, {'@': 7}), 165: (1, {'@': 7}), 97: (1, {'@': 7}), 167: (1, {'@': 7}), 98: (1, {'@': 7}), 99: (1, {'@': 7}), 100: (1, {'@': 7}), 101: (1, {'@': 7}), 102: (1, {'@': 7}), 13: (1, {'@': 7}), 103: (1, {'@': 7}), 105: (1, {'@': 7}), 104: (1, {'@': 7}), 106: (1, {'@': 7}), 107: (1, {'@': 7}), 108: (1, {'@': 7}), 109: (1, {'@': 7}), 1: (1, {'@': 7}), 110: (1, {'@': 7}), 111: (1, {'@': 7}), 112: (1, {'@': 7}), 113: (1, {'@': 7}), 114: (1, {'@': 7}), 3: (1, {'@': 7}), 115: (1, {'@': 7}), 116: (1, {'@': 7}), 117: (1, {'@': 7}), 118: (1, {'@': 7}), 119: (1, {'@': 7}), 120: (1, {'@': 7}), 121: (1, {'@': 7}), 122: (1, {'@': 7}), 123: (1, {'@': 7}), 124: (1, {'@': 7}), 195: (1, {'@': 7}), 168: (1, {'@': 7})}, 648: {11: (1, {'@': 348}), 12: (1, {'@': 348}), 13: (1, {'@': 348})}, 649: {11: (1, {'@': 118}), 13: (1, {'@': 118}), 12: (1, {'@': 118})}, 650: {54: (0, 166), 124: (0, 53)}, 651: {9: (0, 19), 230: (0, 352), 7: (1, {'@': 332}), 11: (1, {'@': 332}), 12: (1, {'@': 332}), 13: (1, {'@': 332})}, 652: {1: (0, 306), 3: (0, 172)}, 653: {43: (0, 745)}, 654: {209: (0, 616)}, 655: {72: (1, {'@': 226}), 74: (1, {'@': 226}), 98: (1, {'@': 226}), 75: (1, {'@': 226}), 99: (1, {'@': 226}), 100: (1, {'@': 226}), 101: (1, {'@': 226}), 102: (1, {'@': 226}), 76: (1, {'@': 226}), 13: (1, {'@': 226}), 103: (1, {'@': 226}), 104: (1, {'@': 226}), 105: (1, {'@': 226}), 78: (1, {'@': 226}), 77: (1, {'@': 226}), 106: (1, {'@': 226}), 107: (1, {'@': 226}), 79: (1, {'@': 226}), 108: (1, {'@': 226}), 80: (1, {'@': 226}), 81: (1, {'@': 226}), 82: (1, {'@': 226}), 109: (1, {'@': 226}), 83: (1, {'@': 226}), 1: (1, {'@': 226}), 110: (1, {'@': 226}), 111: (1, {'@': 226}), 84: (1, {'@': 226}), 112: (1, {'@': 226}), 85: (1, {'@': 226}), 11: (1, {'@': 226}), 86: (1, {'@': 226}), 113: (1, {'@': 226}), 114: (1, {'@': 226}), 87: (1, {'@': 226}), 3: (1, {'@': 226}), 88: (1, {'@': 226}), 89: (1, {'@': 226}), 115: (1, {'@': 226}), 116: (1, {'@': 226}), 117: (1, {'@': 226}), 118: (1, {'@': 226}), 91: (1, {'@': 226}), 119: (1, {'@': 226}), 92: (1, {'@': 226}), 93: (1, {'@': 226}), 94: (1, {'@': 226}), 120: (1, {'@': 226}), 95: (1, {'@': 226}), 96: (1, {'@': 226}), 121: (1, {'@': 226}), 122: (1, {'@': 226}), 123: (1, {'@': 226}), 97: (1, {'@': 226}), 124: (1, {'@': 226})}, 656: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 131: (0, 117), 176: (0, 122), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 93), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 178: (0, 31), 179: (0, 9), 180: (0, 466), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 181: (0, 334), 20: (0, 247), 138: (0, 287), 182: (0, 248), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 183: (0, 443), 139: (0, 505), 22: (0, 11), 42: (0, 233), 184: (0, 313), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 177: (0, 143), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 657: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 175: (0, 593), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 92: (0, 604), 200: (0, 731), 101: (0, 699), 100: (0, 685), 152: (0, 536), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 757), 114: (0, 759), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 192: (0, 686), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 195: (1, {'@': 0})}, 658: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 11: (0, 73), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 13: (0, 627), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459), 120: (1, {'@': 152}), 165: (1, {'@': 152}), 164: (1, {'@': 152}), 122: (1, {'@': 152}), 12: (1, {'@': 152}), 166: (1, {'@': 152}), 45: (1, {'@': 152}), 44: (1, {'@': 152}), 168: (1, {'@': 152}), 163: (1, {'@': 152}), 167: (1, {'@': 152})}, 659: {5: (1, {'@': 234}), 11: (1, {'@': 234}), 12: (1, {'@': 234}), 43: (1, {'@': 234}), 13: (1, {'@': 234})}, 660: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 508), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 661: {11: (1, {'@': 63}), 13: (1, {'@': 63}), 12: (1, {'@': 63})}, 662: {11: (1, {'@': 349}), 12: (1, {'@': 349}), 13: (1, {'@': 349})}, 663: {164: (0, 399), 166: (0, 363), 12: (0, 471), 165: (0, 348)}, 664: {47: (0, 607), 66: (0, 515), 55: (1, {'@': 405}), 56: (1, {'@': 405}), 57: (1, {'@': 405}), 58: (1, {'@': 405}), 59: (1, {'@': 405}), 60: (1, {'@': 405}), 64: (1, {'@': 405}), 62: (1, {'@': 405}), 63: (1, {'@': 405}), 65: (1, {'@': 405}), 68: (1, {'@': 405}), 54: (1, {'@': 405}), 69: (1, {'@': 405}), 67: (1, {'@': 405}), 4: (1, {'@': 405}), 12: (1, {'@': 405}), 13: (1, {'@': 405}), 11: (1, {'@': 405}), 72: (1, {'@': 405}), 73: (1, {'@': 405}), 74: (1, {'@': 405}), 75: (1, {'@': 405}), 76: (1, {'@': 405}), 77: (1, {'@': 405}), 78: (1, {'@': 405}), 79: (1, {'@': 405}), 80: (1, {'@': 405}), 81: (1, {'@': 405}), 10: (1, {'@': 405}), 82: (1, {'@': 405}), 83: (1, {'@': 405}), 84: (1, {'@': 405}), 85: (1, {'@': 405}), 86: (1, {'@': 405}), 87: (1, {'@': 405}), 88: (1, {'@': 405}), 89: (1, {'@': 405}), 90: (1, {'@': 405}), 91: (1, {'@': 405}), 92: (1, {'@': 405}), 93: (1, {'@': 405}), 94: (1, {'@': 405}), 95: (1, {'@': 405}), 96: (1, {'@': 405}), 97: (1, {'@': 405}), 98: (1, {'@': 405}), 99: (1, {'@': 405}), 100: (1, {'@': 405}), 101: (1, {'@': 405}), 102: (1, {'@': 405}), 43: (1, {'@': 405}), 103: (1, {'@': 405}), 104: (1, {'@': 405}), 105: (1, {'@': 405}), 106: (1, {'@': 405}), 107: (1, {'@': 405}), 108: (1, {'@': 405}), 109: (1, {'@': 405}), 1: (1, {'@': 405}), 110: (1, {'@': 405}), 111: (1, {'@': 405}), 112: (1, {'@': 405}), 113: (1, {'@': 405}), 114: (1, {'@': 405}), 3: (1, {'@': 405}), 32: (1, {'@': 405}), 115: (1, {'@': 405}), 5: (1, {'@': 405}), 116: (1, {'@': 405}), 117: (1, {'@': 405}), 118: (1, {'@': 405}), 119: (1, {'@': 405}), 120: (1, {'@': 405}), 121: (1, {'@': 405}), 6: (1, {'@': 405}), 122: (1, {'@': 405}), 123: (1, {'@': 405}), 124: (1, {'@': 405})}, 665: {72: (1, {'@': 292}), 56: (1, {'@': 292}), 78: (1, {'@': 292}), 80: (1, {'@': 292}), 81: (1, {'@': 292}), 68: (1, {'@': 292}), 84: (1, {'@': 292}), 69: (1, {'@': 292}), 86: (1, {'@': 292}), 71: (1, {'@': 292}), 87: (1, {'@': 292}), 89: (1, {'@': 292}), 12: (1, {'@': 292}), 93: (1, {'@': 292}), 60: (1, {'@': 292}), 63: (1, {'@': 292}), 62: (1, {'@': 292}), 97: (1, {'@': 292}), 99: (1, {'@': 292}), 100: (1, {'@': 292}), 102: (1, {'@': 292}), 43: (1, {'@': 292}), 103: (1, {'@': 292}), 105: (1, {'@': 292}), 107: (1, {'@': 292}), 108: (1, {'@': 292}), 112: (1, {'@': 292}), 70: (1, {'@': 292}), 64: (1, {'@': 292}), 67: (1, {'@': 292}), 3: (1, {'@': 292}), 9: (1, {'@': 292}), 115: (1, {'@': 292}), 116: (1, {'@': 292}), 5: (1, {'@': 292}), 125: (1, {'@': 292}), 59: (1, {'@': 292}), 120: (1, {'@': 292}), 65: (1, {'@': 292}), 6: (1, {'@': 292}), 54: (1, {'@': 292}), 123: (1, {'@': 292}), 73: (1, {'@': 292}), 74: (1, {'@': 292}), 75: (1, {'@': 292}), 76: (1, {'@': 292}), 77: (1, {'@': 292}), 79: (1, {'@': 292}), 61: (1, {'@': 292}), 82: (1, {'@': 292}), 10: (1, {'@': 292}), 66: (1, {'@': 292}), 83: (1, {'@': 292}), 85: (1, {'@': 292}), 11: (1, {'@': 292}), 88: (1, {'@': 292}), 90: (1, {'@': 292}), 91: (1, {'@': 292}), 92: (1, {'@': 292}), 94: (1, {'@': 292}), 47: (1, {'@': 292}), 95: (1, {'@': 292}), 96: (1, {'@': 292}), 4: (1, {'@': 292}), 55: (1, {'@': 292}), 98: (1, {'@': 292}), 101: (1, {'@': 292}), 13: (1, {'@': 292}), 104: (1, {'@': 292}), 106: (1, {'@': 292}), 58: (1, {'@': 292}), 109: (1, {'@': 292}), 1: (1, {'@': 292}), 110: (1, {'@': 292}), 111: (1, {'@': 292}), 113: (1, {'@': 292}), 114: (1, {'@': 292}), 32: (1, {'@': 292}), 57: (1, {'@': 292}), 117: (1, {'@': 292}), 118: (1, {'@': 292}), 119: (1, {'@': 292}), 121: (1, {'@': 292}), 122: (1, {'@': 292}), 124: (1, {'@': 292})}, 666: {72: (1, {'@': 232}), 74: (1, {'@': 232}), 98: (1, {'@': 232}), 75: (1, {'@': 232}), 99: (1, {'@': 232}), 100: (1, {'@': 232}), 101: (1, {'@': 232}), 102: (1, {'@': 232}), 76: (1, {'@': 232}), 13: (1, {'@': 232}), 103: (1, {'@': 232}), 104: (1, {'@': 232}), 105: (1, {'@': 232}), 78: (1, {'@': 232}), 77: (1, {'@': 232}), 106: (1, {'@': 232}), 107: (1, {'@': 232}), 79: (1, {'@': 232}), 108: (1, {'@': 232}), 80: (1, {'@': 232}), 81: (1, {'@': 232}), 82: (1, {'@': 232}), 109: (1, {'@': 232}), 83: (1, {'@': 232}), 1: (1, {'@': 232}), 110: (1, {'@': 232}), 111: (1, {'@': 232}), 84: (1, {'@': 232}), 112: (1, {'@': 232}), 85: (1, {'@': 232}), 11: (1, {'@': 232}), 86: (1, {'@': 232}), 113: (1, {'@': 232}), 114: (1, {'@': 232}), 87: (1, {'@': 232}), 3: (1, {'@': 232}), 88: (1, {'@': 232}), 89: (1, {'@': 232}), 115: (1, {'@': 232}), 116: (1, {'@': 232}), 117: (1, {'@': 232}), 118: (1, {'@': 232}), 91: (1, {'@': 232}), 119: (1, {'@': 232}), 92: (1, {'@': 232}), 93: (1, {'@': 232}), 94: (1, {'@': 232}), 120: (1, {'@': 232}), 95: (1, {'@': 232}), 96: (1, {'@': 232}), 121: (1, {'@': 232}), 123: (1, {'@': 232}), 97: (1, {'@': 232}), 124: (1, {'@': 232})}, 667: {11: (1, {'@': 77}), 13: (1, {'@': 77}), 12: (1, {'@': 77})}, 668: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 133: (0, 78), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 669: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 213: (0, 554), 84: (0, 742), 104: (0, 735), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 175: (0, 525), 188: (0, 592), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 208: (0, 244), 86: (0, 656), 151: (0, 717), 72: (0, 555), 92: (0, 604), 101: (0, 699), 100: (0, 685), 152: (0, 536), 192: (0, 567), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 557), 114: (0, 759), 185: (0, 547), 200: (0, 750), 116: (0, 774), 75: (0, 654), 156: (0, 747), 155: (0, 651), 165: (0, 586), 93: (0, 630), 164: (0, 531), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 166: (0, 532), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 189: (0, 22), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 670: {155: (0, 651), 78: (0, 511), 156: (0, 279), 124: (0, 523)}, 671: {13: (1, {'@': 364})}, 672: {43: (1, {'@': 243}), 5: (1, {'@': 243}), 11: (1, {'@': 243}), 12: (1, {'@': 243}), 13: (1, {'@': 243})}, 673: {31: (0, 3), 25: (0, 203), 126: (0, 96), 22: (0, 11), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 19: (0, 150), 1: (0, 324), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 138: (0, 293), 133: (0, 160), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 674: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 196: (0, 782), 197: (0, 708), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 66), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 675: {55: (1, {'@': 412}), 56: (1, {'@': 412}), 57: (1, {'@': 412}), 58: (1, {'@': 412}), 59: (1, {'@': 412}), 60: (1, {'@': 412}), 61: (1, {'@': 412}), 47: (1, {'@': 412}), 62: (1, {'@': 412}), 63: (1, {'@': 412}), 64: (1, {'@': 412}), 65: (1, {'@': 412}), 66: (1, {'@': 412}), 67: (1, {'@': 412}), 68: (1, {'@': 412}), 54: (1, {'@': 412}), 69: (1, {'@': 412}), 70: (1, {'@': 412}), 4: (1, {'@': 412}), 71: (1, {'@': 412}), 12: (1, {'@': 412}), 13: (1, {'@': 412}), 11: (1, {'@': 412}), 72: (1, {'@': 412}), 73: (1, {'@': 412}), 74: (1, {'@': 412}), 75: (1, {'@': 412}), 76: (1, {'@': 412}), 77: (1, {'@': 412}), 78: (1, {'@': 412}), 79: (1, {'@': 412}), 80: (1, {'@': 412}), 81: (1, {'@': 412}), 10: (1, {'@': 412}), 82: (1, {'@': 412}), 83: (1, {'@': 412}), 84: (1, {'@': 412}), 85: (1, {'@': 412}), 86: (1, {'@': 412}), 87: (1, {'@': 412}), 88: (1, {'@': 412}), 89: (1, {'@': 412}), 90: (1, {'@': 412}), 91: (1, {'@': 412}), 92: (1, {'@': 412}), 93: (1, {'@': 412}), 94: (1, {'@': 412}), 95: (1, {'@': 412}), 96: (1, {'@': 412}), 97: (1, {'@': 412}), 98: (1, {'@': 412}), 99: (1, {'@': 412}), 100: (1, {'@': 412}), 101: (1, {'@': 412}), 102: (1, {'@': 412}), 43: (1, {'@': 412}), 103: (1, {'@': 412}), 104: (1, {'@': 412}), 105: (1, {'@': 412}), 106: (1, {'@': 412}), 107: (1, {'@': 412}), 108: (1, {'@': 412}), 109: (1, {'@': 412}), 1: (1, {'@': 412}), 110: (1, {'@': 412}), 111: (1, {'@': 412}), 112: (1, {'@': 412}), 113: (1, {'@': 412}), 114: (1, {'@': 412}), 3: (1, {'@': 412}), 32: (1, {'@': 412}), 115: (1, {'@': 412}), 5: (1, {'@': 412}), 116: (1, {'@': 412}), 117: (1, {'@': 412}), 118: (1, {'@': 412}), 119: (1, {'@': 412}), 120: (1, {'@': 412}), 121: (1, {'@': 412}), 6: (1, {'@': 412}), 122: (1, {'@': 412}), 123: (1, {'@': 412}), 124: (1, {'@': 412})}, 676: {31: (0, 3), 25: (0, 203), 126: (0, 138), 22: (0, 11), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 19: (0, 150), 1: (0, 324), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 133: (0, 160), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 677: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 196: (0, 180), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 197: (0, 708), 25: (0, 203), 1: (0, 614), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 10: (0, 209), 20: (0, 247), 138: (0, 287), 131: (0, 331), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 678: {1: (0, 70)}, 679: {72: (1, {'@': 214}), 76: (1, {'@': 214}), 77: (1, {'@': 214}), 78: (1, {'@': 214}), 79: (1, {'@': 214}), 80: (1, {'@': 214}), 81: (1, {'@': 214}), 82: (1, {'@': 214}), 83: (1, {'@': 214}), 84: (1, {'@': 214}), 85: (1, {'@': 214}), 11: (1, {'@': 214}), 86: (1, {'@': 214}), 87: (1, {'@': 214}), 88: (1, {'@': 214}), 89: (1, {'@': 214}), 91: (1, {'@': 214}), 92: (1, {'@': 214}), 93: (1, {'@': 214}), 94: (1, {'@': 214}), 95: (1, {'@': 214}), 96: (1, {'@': 214}), 97: (1, {'@': 214}), 98: (1, {'@': 214}), 99: (1, {'@': 214}), 100: (1, {'@': 214}), 101: (1, {'@': 214}), 102: (1, {'@': 214}), 13: (1, {'@': 214}), 103: (1, {'@': 214}), 104: (1, {'@': 214}), 105: (1, {'@': 214}), 106: (1, {'@': 214}), 107: (1, {'@': 214}), 108: (1, {'@': 214}), 109: (1, {'@': 214}), 1: (1, {'@': 214}), 110: (1, {'@': 214}), 111: (1, {'@': 214}), 112: (1, {'@': 214}), 114: (1, {'@': 214}), 3: (1, {'@': 214}), 115: (1, {'@': 214}), 116: (1, {'@': 214}), 117: (1, {'@': 214}), 118: (1, {'@': 214}), 119: (1, {'@': 214}), 121: (1, {'@': 214}), 123: (1, {'@': 214}), 124: (1, {'@': 214}), 74: (1, {'@': 214}), 75: (1, {'@': 214}), 113: (1, {'@': 214}), 120: (1, {'@': 214})}, 680: {1: (0, 185), 228: (0, 319), 2: (0, 242), 3: (0, 264)}, 681: {11: (1, {'@': 109}), 13: (1, {'@': 109}), 12: (1, {'@': 109})}, 682: {72: (1, {'@': 227}), 74: (1, {'@': 227}), 98: (1, {'@': 227}), 75: (1, {'@': 227}), 99: (1, {'@': 227}), 100: (1, {'@': 227}), 101: (1, {'@': 227}), 102: (1, {'@': 227}), 76: (1, {'@': 227}), 13: (1, {'@': 227}), 103: (1, {'@': 227}), 104: (1, {'@': 227}), 105: (1, {'@': 227}), 78: (1, {'@': 227}), 77: (1, {'@': 227}), 106: (1, {'@': 227}), 107: (1, {'@': 227}), 79: (1, {'@': 227}), 108: (1, {'@': 227}), 80: (1, {'@': 227}), 81: (1, {'@': 227}), 82: (1, {'@': 227}), 109: (1, {'@': 227}), 83: (1, {'@': 227}), 1: (1, {'@': 227}), 110: (1, {'@': 227}), 111: (1, {'@': 227}), 84: (1, {'@': 227}), 112: (1, {'@': 227}), 85: (1, {'@': 227}), 11: (1, {'@': 227}), 86: (1, {'@': 227}), 113: (1, {'@': 227}), 114: (1, {'@': 227}), 87: (1, {'@': 227}), 3: (1, {'@': 227}), 88: (1, {'@': 227}), 89: (1, {'@': 227}), 115: (1, {'@': 227}), 116: (1, {'@': 227}), 117: (1, {'@': 227}), 118: (1, {'@': 227}), 91: (1, {'@': 227}), 119: (1, {'@': 227}), 92: (1, {'@': 227}), 93: (1, {'@': 227}), 94: (1, {'@': 227}), 120: (1, {'@': 227}), 95: (1, {'@': 227}), 96: (1, {'@': 227}), 121: (1, {'@': 227}), 122: (1, {'@': 227}), 123: (1, {'@': 227}), 97: (1, {'@': 227}), 124: (1, {'@': 227})}, 683: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 175: (0, 94), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 93: (0, 630), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 168: (0, 231), 229: (0, 63), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 684: {11: (1, {'@': 117}), 13: (1, {'@': 117}), 12: (1, {'@': 117})}, 685: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 131: (0, 146), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 686: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 93: (0, 630), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 687: {72: (1, {'@': 297}), 56: (1, {'@': 297}), 78: (1, {'@': 297}), 80: (1, {'@': 297}), 81: (1, {'@': 297}), 68: (1, {'@': 297}), 84: (1, {'@': 297}), 69: (1, {'@': 297}), 86: (1, {'@': 297}), 71: (1, {'@': 297}), 87: (1, {'@': 297}), 89: (1, {'@': 297}), 12: (1, {'@': 297}), 93: (1, {'@': 297}), 60: (1, {'@': 297}), 63: (1, {'@': 297}), 62: (1, {'@': 297}), 97: (1, {'@': 297}), 99: (1, {'@': 297}), 100: (1, {'@': 297}), 102: (1, {'@': 297}), 43: (1, {'@': 297}), 103: (1, {'@': 297}), 105: (1, {'@': 297}), 107: (1, {'@': 297}), 108: (1, {'@': 297}), 112: (1, {'@': 297}), 70: (1, {'@': 297}), 64: (1, {'@': 297}), 67: (1, {'@': 297}), 3: (1, {'@': 297}), 9: (1, {'@': 297}), 115: (1, {'@': 297}), 116: (1, {'@': 297}), 5: (1, {'@': 297}), 125: (1, {'@': 297}), 59: (1, {'@': 297}), 120: (1, {'@': 297}), 65: (1, {'@': 297}), 6: (1, {'@': 297}), 54: (1, {'@': 297}), 123: (1, {'@': 297}), 73: (1, {'@': 297}), 74: (1, {'@': 297}), 75: (1, {'@': 297}), 76: (1, {'@': 297}), 77: (1, {'@': 297}), 79: (1, {'@': 297}), 61: (1, {'@': 297}), 82: (1, {'@': 297}), 10: (1, {'@': 297}), 66: (1, {'@': 297}), 83: (1, {'@': 297}), 85: (1, {'@': 297}), 11: (1, {'@': 297}), 88: (1, {'@': 297}), 90: (1, {'@': 297}), 91: (1, {'@': 297}), 92: (1, {'@': 297}), 94: (1, {'@': 297}), 47: (1, {'@': 297}), 95: (1, {'@': 297}), 96: (1, {'@': 297}), 4: (1, {'@': 297}), 55: (1, {'@': 297}), 98: (1, {'@': 297}), 101: (1, {'@': 297}), 13: (1, {'@': 297}), 104: (1, {'@': 297}), 106: (1, {'@': 297}), 58: (1, {'@': 297}), 109: (1, {'@': 297}), 1: (1, {'@': 297}), 110: (1, {'@': 297}), 111: (1, {'@': 297}), 113: (1, {'@': 297}), 114: (1, {'@': 297}), 32: (1, {'@': 297}), 57: (1, {'@': 297}), 117: (1, {'@': 297}), 118: (1, {'@': 297}), 119: (1, {'@': 297}), 121: (1, {'@': 297}), 122: (1, {'@': 297}), 124: (1, {'@': 297})}, 688: {172: (0, 569), 31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 9: (0, 260), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 196: (0, 136), 197: (0, 708), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 171: (0, 227), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 4: (0, 131), 42: (0, 233), 131: (0, 66), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486), 11: (1, {'@': 36}), 13: (1, {'@': 36}), 12: (1, {'@': 36})}, 689: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 95: (0, 542), 20: (0, 247), 101: (0, 265), 219: (0, 86), 138: (0, 287), 82: (0, 278), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 108: (0, 487), 139: (0, 505), 22: (0, 11), 42: (0, 233), 110: (0, 450), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 100: (0, 314), 131: (0, 34), 48: (0, 486)}, 690: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 176: (0, 122), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 178: (0, 31), 179: (0, 9), 180: (0, 466), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 181: (0, 334), 20: (0, 247), 138: (0, 287), 131: (0, 613), 182: (0, 248), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 183: (0, 443), 139: (0, 505), 22: (0, 11), 42: (0, 233), 184: (0, 313), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486), 177: (0, 106)}, 691: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 382), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 692: {11: (1, {'@': 18}), 13: (1, {'@': 18}), 12: (1, {'@': 18})}, 693: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 133: (0, 193), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 694: {11: (1, {'@': 100}), 13: (1, {'@': 100}), 12: (1, {'@': 100})}, 695: {72: (1, {'@': 316}), 56: (1, {'@': 316}), 78: (1, {'@': 316}), 80: (1, {'@': 316}), 81: (1, {'@': 316}), 68: (1, {'@': 316}), 84: (1, {'@': 316}), 69: (1, {'@': 316}), 86: (1, {'@': 316}), 71: (1, {'@': 316}), 87: (1, {'@': 316}), 89: (1, {'@': 316}), 12: (1, {'@': 316}), 93: (1, {'@': 316}), 60: (1, {'@': 316}), 63: (1, {'@': 316}), 62: (1, {'@': 316}), 97: (1, {'@': 316}), 99: (1, {'@': 316}), 100: (1, {'@': 316}), 102: (1, {'@': 316}), 43: (1, {'@': 316}), 103: (1, {'@': 316}), 105: (1, {'@': 316}), 107: (1, {'@': 316}), 108: (1, {'@': 316}), 112: (1, {'@': 316}), 67: (1, {'@': 316}), 70: (1, {'@': 316}), 64: (1, {'@': 316}), 3: (1, {'@': 316}), 9: (1, {'@': 316}), 115: (1, {'@': 316}), 5: (1, {'@': 316}), 116: (1, {'@': 316}), 125: (1, {'@': 316}), 59: (1, {'@': 316}), 120: (1, {'@': 316}), 65: (1, {'@': 316}), 6: (1, {'@': 316}), 54: (1, {'@': 316}), 123: (1, {'@': 316}), 73: (1, {'@': 316}), 74: (1, {'@': 316}), 75: (1, {'@': 316}), 76: (1, {'@': 316}), 77: (1, {'@': 316}), 79: (1, {'@': 316}), 61: (1, {'@': 316}), 10: (1, {'@': 316}), 82: (1, {'@': 316}), 66: (1, {'@': 316}), 83: (1, {'@': 316}), 85: (1, {'@': 316}), 11: (1, {'@': 316}), 88: (1, {'@': 316}), 90: (1, {'@': 316}), 91: (1, {'@': 316}), 92: (1, {'@': 316}), 94: (1, {'@': 316}), 47: (1, {'@': 316}), 95: (1, {'@': 316}), 96: (1, {'@': 316}), 4: (1, {'@': 316}), 55: (1, {'@': 316}), 98: (1, {'@': 316}), 101: (1, {'@': 316}), 13: (1, {'@': 316}), 104: (1, {'@': 316}), 106: (1, {'@': 316}), 58: (1, {'@': 316}), 109: (1, {'@': 316}), 1: (1, {'@': 316}), 110: (1, {'@': 316}), 111: (1, {'@': 316}), 113: (1, {'@': 316}), 114: (1, {'@': 316}), 32: (1, {'@': 316}), 57: (1, {'@': 316}), 117: (1, {'@': 316}), 118: (1, {'@': 316}), 119: (1, {'@': 316}), 121: (1, {'@': 316}), 122: (1, {'@': 316}), 124: (1, {'@': 316})}, 696: {72: (1, {'@': 307}), 56: (1, {'@': 307}), 78: (1, {'@': 307}), 80: (1, {'@': 307}), 81: (1, {'@': 307}), 68: (1, {'@': 307}), 84: (1, {'@': 307}), 69: (1, {'@': 307}), 86: (1, {'@': 307}), 71: (1, {'@': 307}), 87: (1, {'@': 307}), 89: (1, {'@': 307}), 12: (1, {'@': 307}), 93: (1, {'@': 307}), 60: (1, {'@': 307}), 63: (1, {'@': 307}), 62: (1, {'@': 307}), 97: (1, {'@': 307}), 99: (1, {'@': 307}), 100: (1, {'@': 307}), 102: (1, {'@': 307}), 43: (1, {'@': 307}), 103: (1, {'@': 307}), 105: (1, {'@': 307}), 107: (1, {'@': 307}), 108: (1, {'@': 307}), 112: (1, {'@': 307}), 70: (1, {'@': 307}), 64: (1, {'@': 307}), 67: (1, {'@': 307}), 3: (1, {'@': 307}), 9: (1, {'@': 307}), 115: (1, {'@': 307}), 116: (1, {'@': 307}), 5: (1, {'@': 307}), 125: (1, {'@': 307}), 59: (1, {'@': 307}), 120: (1, {'@': 307}), 65: (1, {'@': 307}), 6: (1, {'@': 307}), 54: (1, {'@': 307}), 123: (1, {'@': 307}), 73: (1, {'@': 307}), 74: (1, {'@': 307}), 75: (1, {'@': 307}), 76: (1, {'@': 307}), 77: (1, {'@': 307}), 79: (1, {'@': 307}), 61: (1, {'@': 307}), 82: (1, {'@': 307}), 10: (1, {'@': 307}), 66: (1, {'@': 307}), 83: (1, {'@': 307}), 85: (1, {'@': 307}), 11: (1, {'@': 307}), 88: (1, {'@': 307}), 90: (1, {'@': 307}), 91: (1, {'@': 307}), 92: (1, {'@': 307}), 94: (1, {'@': 307}), 47: (1, {'@': 307}), 95: (1, {'@': 307}), 96: (1, {'@': 307}), 4: (1, {'@': 307}), 55: (1, {'@': 307}), 98: (1, {'@': 307}), 101: (1, {'@': 307}), 13: (1, {'@': 307}), 104: (1, {'@': 307}), 106: (1, {'@': 307}), 58: (1, {'@': 307}), 109: (1, {'@': 307}), 1: (1, {'@': 307}), 110: (1, {'@': 307}), 111: (1, {'@': 307}), 113: (1, {'@': 307}), 114: (1, {'@': 307}), 32: (1, {'@': 307}), 57: (1, {'@': 307}), 117: (1, {'@': 307}), 118: (1, {'@': 307}), 119: (1, {'@': 307}), 121: (1, {'@': 307}), 122: (1, {'@': 307}), 124: (1, {'@': 307})}, 697: {11: (1, {'@': 112}), 13: (1, {'@': 112}), 12: (1, {'@': 112})}, 698: {5: (0, 343), 8: (0, 249), 7: (0, 377), 9: (0, 315), 4: (1, {'@': 352}), 11: (1, {'@': 352}), 12: (1, {'@': 352}), 170: (1, {'@': 352}), 13: (1, {'@': 352})}, 699: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 131: (0, 448), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 700: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 218: (0, 689), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 131: (0, 617), 95: (0, 542), 20: (0, 247), 101: (0, 265), 138: (0, 287), 82: (0, 278), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 108: (0, 487), 139: (0, 505), 22: (0, 11), 42: (0, 233), 110: (0, 450), 41: (0, 273), 21: (0, 305), 219: (0, 653), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 100: (0, 314), 48: (0, 486)}, 701: {5: (0, 600)}, 702: {3: (0, 29), 11: (1, {'@': 126}), 13: (1, {'@': 126}), 12: (1, {'@': 126})}, 703: {122: (0, 733)}, 704: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 196: (0, 115), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 197: (0, 708), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 10: (0, 209), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 66), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 705: {11: (1, {'@': 13}), 13: (1, {'@': 13}), 12: (1, {'@': 13})}, 706: {72: (1, {'@': 308}), 56: (1, {'@': 308}), 78: (1, {'@': 308}), 80: (1, {'@': 308}), 81: (1, {'@': 308}), 68: (1, {'@': 308}), 84: (1, {'@': 308}), 69: (1, {'@': 308}), 86: (1, {'@': 308}), 71: (1, {'@': 308}), 87: (1, {'@': 308}), 89: (1, {'@': 308}), 12: (1, {'@': 308}), 93: (1, {'@': 308}), 60: (1, {'@': 308}), 63: (1, {'@': 308}), 62: (1, {'@': 308}), 97: (1, {'@': 308}), 99: (1, {'@': 308}), 100: (1, {'@': 308}), 102: (1, {'@': 308}), 43: (1, {'@': 308}), 103: (1, {'@': 308}), 105: (1, {'@': 308}), 107: (1, {'@': 308}), 108: (1, {'@': 308}), 112: (1, {'@': 308}), 70: (1, {'@': 308}), 64: (1, {'@': 308}), 67: (1, {'@': 308}), 3: (1, {'@': 308}), 9: (1, {'@': 308}), 115: (1, {'@': 308}), 116: (1, {'@': 308}), 5: (1, {'@': 308}), 125: (1, {'@': 308}), 59: (1, {'@': 308}), 120: (1, {'@': 308}), 65: (1, {'@': 308}), 6: (1, {'@': 308}), 54: (1, {'@': 308}), 123: (1, {'@': 308}), 73: (1, {'@': 308}), 74: (1, {'@': 308}), 75: (1, {'@': 308}), 76: (1, {'@': 308}), 77: (1, {'@': 308}), 79: (1, {'@': 308}), 61: (1, {'@': 308}), 82: (1, {'@': 308}), 10: (1, {'@': 308}), 66: (1, {'@': 308}), 83: (1, {'@': 308}), 85: (1, {'@': 308}), 11: (1, {'@': 308}), 88: (1, {'@': 308}), 90: (1, {'@': 308}), 91: (1, {'@': 308}), 92: (1, {'@': 308}), 94: (1, {'@': 308}), 47: (1, {'@': 308}), 95: (1, {'@': 308}), 96: (1, {'@': 308}), 4: (1, {'@': 308}), 55: (1, {'@': 308}), 98: (1, {'@': 308}), 101: (1, {'@': 308}), 13: (1, {'@': 308}), 104: (1, {'@': 308}), 106: (1, {'@': 308}), 58: (1, {'@': 308}), 109: (1, {'@': 308}), 1: (1, {'@': 308}), 110: (1, {'@': 308}), 111: (1, {'@': 308}), 113: (1, {'@': 308}), 114: (1, {'@': 308}), 32: (1, {'@': 308}), 57: (1, {'@': 308}), 117: (1, {'@': 308}), 118: (1, {'@': 308}), 119: (1, {'@': 308}), 121: (1, {'@': 308}), 122: (1, {'@': 308}), 124: (1, {'@': 308})}, 707: {72: (1, {'@': 9}), 74: (1, {'@': 9}), 75: (1, {'@': 9}), 76: (1, {'@': 9}), 77: (1, {'@': 9}), 78: (1, {'@': 9}), 166: (1, {'@': 9}), 79: (1, {'@': 9}), 80: (1, {'@': 9}), 81: (1, {'@': 9}), 82: (1, {'@': 9}), 44: (1, {'@': 9}), 83: (1, {'@': 9}), 84: (1, {'@': 9}), 85: (1, {'@': 9}), 11: (1, {'@': 9}), 86: (1, {'@': 9}), 163: (1, {'@': 9}), 45: (1, {'@': 9}), 87: (1, {'@': 9}), 88: (1, {'@': 9}), 89: (1, {'@': 9}), 12: (1, {'@': 9}), 91: (1, {'@': 9}), 92: (1, {'@': 9}), 93: (1, {'@': 9}), 94: (1, {'@': 9}), 95: (1, {'@': 9}), 96: (1, {'@': 9}), 164: (1, {'@': 9}), 165: (1, {'@': 9}), 97: (1, {'@': 9}), 167: (1, {'@': 9}), 98: (1, {'@': 9}), 99: (1, {'@': 9}), 100: (1, {'@': 9}), 101: (1, {'@': 9}), 102: (1, {'@': 9}), 13: (1, {'@': 9}), 103: (1, {'@': 9}), 105: (1, {'@': 9}), 104: (1, {'@': 9}), 106: (1, {'@': 9}), 107: (1, {'@': 9}), 108: (1, {'@': 9}), 109: (1, {'@': 9}), 1: (1, {'@': 9}), 110: (1, {'@': 9}), 111: (1, {'@': 9}), 112: (1, {'@': 9}), 113: (1, {'@': 9}), 114: (1, {'@': 9}), 3: (1, {'@': 9}), 115: (1, {'@': 9}), 116: (1, {'@': 9}), 117: (1, {'@': 9}), 118: (1, {'@': 9}), 119: (1, {'@': 9}), 120: (1, {'@': 9}), 121: (1, {'@': 9}), 122: (1, {'@': 9}), 123: (1, {'@': 9}), 124: (1, {'@': 9}), 195: (1, {'@': 9}), 168: (1, {'@': 9})}, 708: {5: (1, {'@': 317}), 10: (1, {'@': 317}), 54: (1, {'@': 317}), 11: (1, {'@': 317}), 12: (1, {'@': 317}), 13: (1, {'@': 317})}, 709: {72: (1, {'@': 287}), 56: (1, {'@': 287}), 78: (1, {'@': 287}), 80: (1, {'@': 287}), 81: (1, {'@': 287}), 68: (1, {'@': 287}), 84: (1, {'@': 287}), 69: (1, {'@': 287}), 86: (1, {'@': 287}), 71: (1, {'@': 287}), 87: (1, {'@': 287}), 89: (1, {'@': 287}), 12: (1, {'@': 287}), 93: (1, {'@': 287}), 60: (1, {'@': 287}), 63: (1, {'@': 287}), 62: (1, {'@': 287}), 97: (1, {'@': 287}), 99: (1, {'@': 287}), 100: (1, {'@': 287}), 102: (1, {'@': 287}), 43: (1, {'@': 287}), 103: (1, {'@': 287}), 105: (1, {'@': 287}), 107: (1, {'@': 287}), 108: (1, {'@': 287}), 112: (1, {'@': 287}), 70: (1, {'@': 287}), 64: (1, {'@': 287}), 67: (1, {'@': 287}), 3: (1, {'@': 287}), 9: (1, {'@': 287}), 115: (1, {'@': 287}), 116: (1, {'@': 287}), 5: (1, {'@': 287}), 125: (1, {'@': 287}), 59: (1, {'@': 287}), 120: (1, {'@': 287}), 65: (1, {'@': 287}), 6: (1, {'@': 287}), 54: (1, {'@': 287}), 123: (1, {'@': 287}), 73: (1, {'@': 287}), 74: (1, {'@': 287}), 75: (1, {'@': 287}), 76: (1, {'@': 287}), 77: (1, {'@': 287}), 79: (1, {'@': 287}), 61: (1, {'@': 287}), 82: (1, {'@': 287}), 10: (1, {'@': 287}), 66: (1, {'@': 287}), 83: (1, {'@': 287}), 85: (1, {'@': 287}), 11: (1, {'@': 287}), 88: (1, {'@': 287}), 90: (1, {'@': 287}), 91: (1, {'@': 287}), 92: (1, {'@': 287}), 94: (1, {'@': 287}), 47: (1, {'@': 287}), 95: (1, {'@': 287}), 96: (1, {'@': 287}), 4: (1, {'@': 287}), 55: (1, {'@': 287}), 98: (1, {'@': 287}), 101: (1, {'@': 287}), 13: (1, {'@': 287}), 104: (1, {'@': 287}), 106: (1, {'@': 287}), 58: (1, {'@': 287}), 109: (1, {'@': 287}), 1: (1, {'@': 287}), 110: (1, {'@': 287}), 111: (1, {'@': 287}), 113: (1, {'@': 287}), 114: (1, {'@': 287}), 32: (1, {'@': 287}), 57: (1, {'@': 287}), 117: (1, {'@': 287}), 118: (1, {'@': 287}), 119: (1, {'@': 287}), 121: (1, {'@': 287}), 122: (1, {'@': 287}), 124: (1, {'@': 287})}, 710: {11: (1, {'@': 30}), 13: (1, {'@': 30}), 12: (1, {'@': 30})}, 711: {5: (1, {'@': 252}), 11: (1, {'@': 252}), 12: (1, {'@': 252}), 43: (1, {'@': 252}), 13: (1, {'@': 252})}, 712: {3: (0, 671)}, 713: {11: (1, {'@': 99}), 13: (1, {'@': 99}), 12: (1, {'@': 99})}, 714: {173: (1, {'@': 223}), 11: (1, {'@': 223}), 12: (1, {'@': 223}), 13: (1, {'@': 223}), 121: (1, {'@': 223})}, 715: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 192: (0, 781), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 175: (0, 593), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 208: (0, 244), 86: (0, 656), 151: (0, 717), 72: (0, 555), 92: (0, 604), 101: (0, 699), 100: (0, 685), 152: (0, 536), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 213: (0, 549), 193: (0, 624), 191: (0, 757), 114: (0, 759), 200: (0, 750), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 716: {103: (0, 460), 116: (0, 110), 121: (0, 516)}, 717: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 175: (0, 593), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 208: (0, 244), 86: (0, 656), 213: (0, 339), 151: (0, 717), 72: (0, 555), 92: (0, 604), 101: (0, 699), 100: (0, 685), 152: (0, 536), 122: (0, 269), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 757), 114: (0, 759), 200: (0, 750), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 192: (0, 198), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 718: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 223: (0, 659), 87: (0, 615), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 222: (0, 282), 95: (0, 542), 224: (0, 481), 20: (0, 247), 101: (0, 265), 131: (0, 7), 138: (0, 287), 82: (0, 278), 15: (0, 205), 219: (0, 454), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 108: (0, 487), 139: (0, 505), 22: (0, 11), 42: (0, 233), 110: (0, 450), 41: (0, 273), 21: (0, 305), 225: (0, 389), 170: (0, 411), 99: (0, 297), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 100: (0, 314), 48: (0, 486), 5: (1, {'@': 239}), 11: (1, {'@': 239}), 12: (1, {'@': 239}), 43: (1, {'@': 239}), 13: (1, {'@': 239})}, 719: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 131: (0, 766), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 720: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 231: (0, 633), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 223: (0, 659), 87: (0, 615), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 95: (0, 542), 224: (0, 481), 222: (0, 225), 20: (0, 247), 101: (0, 265), 131: (0, 7), 138: (0, 287), 82: (0, 278), 15: (0, 205), 219: (0, 454), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 108: (0, 487), 139: (0, 505), 22: (0, 11), 42: (0, 233), 110: (0, 450), 41: (0, 273), 21: (0, 305), 225: (0, 389), 170: (0, 411), 99: (0, 297), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 100: (0, 314), 48: (0, 486), 5: (1, {'@': 239}), 11: (1, {'@': 239}), 12: (1, {'@': 239}), 43: (1, {'@': 239}), 13: (1, {'@': 239})}, 721: {13: (0, 206), 11: (0, 75)}, 722: {31: (0, 3), 25: (0, 203), 126: (0, 96), 22: (0, 11), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 19: (0, 150), 1: (0, 324), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 138: (0, 289), 133: (0, 160), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 723: {72: (1, {'@': 305}), 56: (1, {'@': 305}), 78: (1, {'@': 305}), 80: (1, {'@': 305}), 81: (1, {'@': 305}), 68: (1, {'@': 305}), 84: (1, {'@': 305}), 69: (1, {'@': 305}), 86: (1, {'@': 305}), 71: (1, {'@': 305}), 87: (1, {'@': 305}), 89: (1, {'@': 305}), 12: (1, {'@': 305}), 93: (1, {'@': 305}), 60: (1, {'@': 305}), 63: (1, {'@': 305}), 62: (1, {'@': 305}), 97: (1, {'@': 305}), 99: (1, {'@': 305}), 100: (1, {'@': 305}), 102: (1, {'@': 305}), 43: (1, {'@': 305}), 103: (1, {'@': 305}), 105: (1, {'@': 305}), 107: (1, {'@': 305}), 108: (1, {'@': 305}), 112: (1, {'@': 305}), 70: (1, {'@': 305}), 64: (1, {'@': 305}), 67: (1, {'@': 305}), 3: (1, {'@': 305}), 9: (1, {'@': 305}), 115: (1, {'@': 305}), 116: (1, {'@': 305}), 5: (1, {'@': 305}), 125: (1, {'@': 305}), 59: (1, {'@': 305}), 120: (1, {'@': 305}), 65: (1, {'@': 305}), 6: (1, {'@': 305}), 54: (1, {'@': 305}), 123: (1, {'@': 305}), 73: (1, {'@': 305}), 74: (1, {'@': 305}), 75: (1, {'@': 305}), 76: (1, {'@': 305}), 77: (1, {'@': 305}), 79: (1, {'@': 305}), 61: (1, {'@': 305}), 82: (1, {'@': 305}), 10: (1, {'@': 305}), 66: (1, {'@': 305}), 83: (1, {'@': 305}), 85: (1, {'@': 305}), 11: (1, {'@': 305}), 88: (1, {'@': 305}), 90: (1, {'@': 305}), 91: (1, {'@': 305}), 92: (1, {'@': 305}), 94: (1, {'@': 305}), 47: (1, {'@': 305}), 95: (1, {'@': 305}), 96: (1, {'@': 305}), 4: (1, {'@': 305}), 55: (1, {'@': 305}), 98: (1, {'@': 305}), 101: (1, {'@': 305}), 13: (1, {'@': 305}), 104: (1, {'@': 305}), 106: (1, {'@': 305}), 58: (1, {'@': 305}), 109: (1, {'@': 305}), 1: (1, {'@': 305}), 110: (1, {'@': 305}), 111: (1, {'@': 305}), 113: (1, {'@': 305}), 114: (1, {'@': 305}), 32: (1, {'@': 305}), 57: (1, {'@': 305}), 117: (1, {'@': 305}), 118: (1, {'@': 305}), 119: (1, {'@': 305}), 121: (1, {'@': 305}), 122: (1, {'@': 305}), 124: (1, {'@': 305})}, 724: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 131: (0, 646), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 725: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 240), 136: (0, 403), 23: (0, 219), 29: (0, 474), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 726: {43: (1, {'@': 245}), 5: (1, {'@': 245}), 11: (1, {'@': 245}), 12: (1, {'@': 245}), 13: (1, {'@': 245})}, 727: {11: (1, {'@': 114}), 13: (1, {'@': 114}), 12: (1, {'@': 114})}, 728: {11: (1, {'@': 122}), 13: (1, {'@': 122}), 12: (1, {'@': 122})}, 729: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 11: (0, 632), 175: (0, 593), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 208: (0, 634), 86: (0, 656), 151: (0, 717), 72: (0, 555), 92: (0, 604), 101: (0, 699), 100: (0, 685), 192: (0, 683), 152: (0, 536), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 757), 114: (0, 759), 200: (0, 750), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 213: (0, 784), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 730: {43: (1, {'@': 247}), 5: (1, {'@': 247}), 11: (1, {'@': 247}), 12: (1, {'@': 247}), 13: (1, {'@': 247})}, 731: {72: (1, {'@': 2}), 74: (1, {'@': 2}), 98: (1, {'@': 2}), 75: (1, {'@': 2}), 99: (1, {'@': 2}), 100: (1, {'@': 2}), 101: (1, {'@': 2}), 102: (1, {'@': 2}), 76: (1, {'@': 2}), 13: (1, {'@': 2}), 103: (1, {'@': 2}), 104: (1, {'@': 2}), 105: (1, {'@': 2}), 78: (1, {'@': 2}), 77: (1, {'@': 2}), 106: (1, {'@': 2}), 107: (1, {'@': 2}), 79: (1, {'@': 2}), 108: (1, {'@': 2}), 80: (1, {'@': 2}), 81: (1, {'@': 2}), 82: (1, {'@': 2}), 109: (1, {'@': 2}), 83: (1, {'@': 2}), 1: (1, {'@': 2}), 110: (1, {'@': 2}), 111: (1, {'@': 2}), 84: (1, {'@': 2}), 112: (1, {'@': 2}), 85: (1, {'@': 2}), 11: (1, {'@': 2}), 86: (1, {'@': 2}), 113: (1, {'@': 2}), 114: (1, {'@': 2}), 87: (1, {'@': 2}), 3: (1, {'@': 2}), 88: (1, {'@': 2}), 195: (1, {'@': 2}), 89: (1, {'@': 2}), 115: (1, {'@': 2}), 116: (1, {'@': 2}), 117: (1, {'@': 2}), 118: (1, {'@': 2}), 91: (1, {'@': 2}), 119: (1, {'@': 2}), 92: (1, {'@': 2}), 93: (1, {'@': 2}), 94: (1, {'@': 2}), 120: (1, {'@': 2}), 95: (1, {'@': 2}), 96: (1, {'@': 2}), 121: (1, {'@': 2}), 123: (1, {'@': 2}), 97: (1, {'@': 2}), 124: (1, {'@': 2}), 164: (1, {'@': 2}), 165: (1, {'@': 2}), 122: (1, {'@': 2}), 166: (1, {'@': 2}), 12: (1, {'@': 2}), 44: (1, {'@': 2}), 45: (1, {'@': 2}), 168: (1, {'@': 2}), 163: (1, {'@': 2}), 167: (1, {'@': 2})}, 732: {11: (1, {'@': 66}), 13: (1, {'@': 66}), 12: (1, {'@': 66})}, 733: {173: (1, {'@': 222}), 11: (1, {'@': 222}), 12: (1, {'@': 222}), 13: (1, {'@': 222}), 121: (1, {'@': 222})}, 734: {72: (1, {'@': 296}), 56: (1, {'@': 296}), 78: (1, {'@': 296}), 80: (1, {'@': 296}), 81: (1, {'@': 296}), 68: (1, {'@': 296}), 84: (1, {'@': 296}), 69: (1, {'@': 296}), 86: (1, {'@': 296}), 71: (1, {'@': 296}), 87: (1, {'@': 296}), 89: (1, {'@': 296}), 12: (1, {'@': 296}), 93: (1, {'@': 296}), 60: (1, {'@': 296}), 63: (1, {'@': 296}), 62: (1, {'@': 296}), 97: (1, {'@': 296}), 99: (1, {'@': 296}), 100: (1, {'@': 296}), 102: (1, {'@': 296}), 43: (1, {'@': 296}), 103: (1, {'@': 296}), 105: (1, {'@': 296}), 107: (1, {'@': 296}), 108: (1, {'@': 296}), 112: (1, {'@': 296}), 70: (1, {'@': 296}), 64: (1, {'@': 296}), 67: (1, {'@': 296}), 3: (1, {'@': 296}), 9: (1, {'@': 296}), 115: (1, {'@': 296}), 116: (1, {'@': 296}), 5: (1, {'@': 296}), 125: (1, {'@': 296}), 59: (1, {'@': 296}), 120: (1, {'@': 296}), 65: (1, {'@': 296}), 6: (1, {'@': 296}), 54: (1, {'@': 296}), 123: (1, {'@': 296}), 73: (1, {'@': 296}), 74: (1, {'@': 296}), 75: (1, {'@': 296}), 76: (1, {'@': 296}), 77: (1, {'@': 296}), 79: (1, {'@': 296}), 61: (1, {'@': 296}), 82: (1, {'@': 296}), 10: (1, {'@': 296}), 66: (1, {'@': 296}), 83: (1, {'@': 296}), 85: (1, {'@': 296}), 11: (1, {'@': 296}), 88: (1, {'@': 296}), 90: (1, {'@': 296}), 91: (1, {'@': 296}), 92: (1, {'@': 296}), 94: (1, {'@': 296}), 47: (1, {'@': 296}), 95: (1, {'@': 296}), 96: (1, {'@': 296}), 4: (1, {'@': 296}), 55: (1, {'@': 296}), 98: (1, {'@': 296}), 101: (1, {'@': 296}), 13: (1, {'@': 296}), 104: (1, {'@': 296}), 106: (1, {'@': 296}), 58: (1, {'@': 296}), 109: (1, {'@': 296}), 1: (1, {'@': 296}), 110: (1, {'@': 296}), 111: (1, {'@': 296}), 113: (1, {'@': 296}), 114: (1, {'@': 296}), 32: (1, {'@': 296}), 57: (1, {'@': 296}), 117: (1, {'@': 296}), 118: (1, {'@': 296}), 119: (1, {'@': 296}), 121: (1, {'@': 296}), 122: (1, {'@': 296}), 124: (1, {'@': 296})}, 735: {131: (0, 551), 31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 736: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 95: (0, 542), 20: (0, 247), 101: (0, 265), 219: (0, 86), 138: (0, 287), 131: (0, 65), 82: (0, 278), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 108: (0, 487), 139: (0, 505), 22: (0, 11), 42: (0, 233), 110: (0, 450), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 100: (0, 314), 48: (0, 486)}, 737: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 131: (0, 18), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 738: {72: (1, {'@': 293}), 56: (1, {'@': 293}), 78: (1, {'@': 293}), 80: (1, {'@': 293}), 81: (1, {'@': 293}), 68: (1, {'@': 293}), 84: (1, {'@': 293}), 69: (1, {'@': 293}), 86: (1, {'@': 293}), 71: (1, {'@': 293}), 87: (1, {'@': 293}), 89: (1, {'@': 293}), 12: (1, {'@': 293}), 93: (1, {'@': 293}), 60: (1, {'@': 293}), 63: (1, {'@': 293}), 62: (1, {'@': 293}), 97: (1, {'@': 293}), 99: (1, {'@': 293}), 100: (1, {'@': 293}), 102: (1, {'@': 293}), 43: (1, {'@': 293}), 103: (1, {'@': 293}), 105: (1, {'@': 293}), 107: (1, {'@': 293}), 108: (1, {'@': 293}), 112: (1, {'@': 293}), 70: (1, {'@': 293}), 64: (1, {'@': 293}), 67: (1, {'@': 293}), 3: (1, {'@': 293}), 9: (1, {'@': 293}), 115: (1, {'@': 293}), 116: (1, {'@': 293}), 5: (1, {'@': 293}), 125: (1, {'@': 293}), 59: (1, {'@': 293}), 120: (1, {'@': 293}), 65: (1, {'@': 293}), 6: (1, {'@': 293}), 54: (1, {'@': 293}), 123: (1, {'@': 293}), 73: (1, {'@': 293}), 74: (1, {'@': 293}), 75: (1, {'@': 293}), 76: (1, {'@': 293}), 77: (1, {'@': 293}), 79: (1, {'@': 293}), 61: (1, {'@': 293}), 82: (1, {'@': 293}), 10: (1, {'@': 293}), 66: (1, {'@': 293}), 83: (1, {'@': 293}), 85: (1, {'@': 293}), 11: (1, {'@': 293}), 88: (1, {'@': 293}), 90: (1, {'@': 293}), 91: (1, {'@': 293}), 92: (1, {'@': 293}), 94: (1, {'@': 293}), 47: (1, {'@': 293}), 95: (1, {'@': 293}), 96: (1, {'@': 293}), 4: (1, {'@': 293}), 55: (1, {'@': 293}), 98: (1, {'@': 293}), 101: (1, {'@': 293}), 13: (1, {'@': 293}), 104: (1, {'@': 293}), 106: (1, {'@': 293}), 58: (1, {'@': 293}), 109: (1, {'@': 293}), 1: (1, {'@': 293}), 110: (1, {'@': 293}), 111: (1, {'@': 293}), 113: (1, {'@': 293}), 114: (1, {'@': 293}), 32: (1, {'@': 293}), 57: (1, {'@': 293}), 117: (1, {'@': 293}), 118: (1, {'@': 293}), 119: (1, {'@': 293}), 121: (1, {'@': 293}), 122: (1, {'@': 293}), 124: (1, {'@': 293})}, 739: {31: (0, 3), 25: (0, 203), 126: (0, 96), 22: (0, 11), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 19: (0, 150), 1: (0, 324), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 133: (0, 160), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 138: (0, 290), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 740: {9: (0, 51), 4: (0, 118), 172: (0, 130)}, 741: {11: (1, {'@': 16}), 13: (1, {'@': 16}), 12: (1, {'@': 16})}, 742: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 131: (0, 579), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 743: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 131: (0, 379), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 744: {72: (1, {'@': 282}), 56: (1, {'@': 282}), 78: (1, {'@': 282}), 80: (1, {'@': 282}), 81: (1, {'@': 282}), 68: (1, {'@': 282}), 84: (1, {'@': 282}), 69: (1, {'@': 282}), 86: (1, {'@': 282}), 71: (1, {'@': 282}), 87: (1, {'@': 282}), 89: (1, {'@': 282}), 12: (1, {'@': 282}), 93: (1, {'@': 282}), 60: (1, {'@': 282}), 63: (1, {'@': 282}), 62: (1, {'@': 282}), 97: (1, {'@': 282}), 99: (1, {'@': 282}), 100: (1, {'@': 282}), 102: (1, {'@': 282}), 43: (1, {'@': 282}), 103: (1, {'@': 282}), 105: (1, {'@': 282}), 107: (1, {'@': 282}), 108: (1, {'@': 282}), 112: (1, {'@': 282}), 70: (1, {'@': 282}), 64: (1, {'@': 282}), 67: (1, {'@': 282}), 3: (1, {'@': 282}), 9: (1, {'@': 282}), 115: (1, {'@': 282}), 116: (1, {'@': 282}), 5: (1, {'@': 282}), 125: (1, {'@': 282}), 59: (1, {'@': 282}), 120: (1, {'@': 282}), 65: (1, {'@': 282}), 6: (1, {'@': 282}), 54: (1, {'@': 282}), 123: (1, {'@': 282}), 73: (1, {'@': 282}), 74: (1, {'@': 282}), 75: (1, {'@': 282}), 76: (1, {'@': 282}), 77: (1, {'@': 282}), 79: (1, {'@': 282}), 61: (1, {'@': 282}), 82: (1, {'@': 282}), 10: (1, {'@': 282}), 66: (1, {'@': 282}), 83: (1, {'@': 282}), 85: (1, {'@': 282}), 11: (1, {'@': 282}), 88: (1, {'@': 282}), 90: (1, {'@': 282}), 91: (1, {'@': 282}), 92: (1, {'@': 282}), 94: (1, {'@': 282}), 47: (1, {'@': 282}), 95: (1, {'@': 282}), 96: (1, {'@': 282}), 4: (1, {'@': 282}), 55: (1, {'@': 282}), 98: (1, {'@': 282}), 101: (1, {'@': 282}), 13: (1, {'@': 282}), 104: (1, {'@': 282}), 106: (1, {'@': 282}), 58: (1, {'@': 282}), 109: (1, {'@': 282}), 1: (1, {'@': 282}), 110: (1, {'@': 282}), 111: (1, {'@': 282}), 113: (1, {'@': 282}), 114: (1, {'@': 282}), 32: (1, {'@': 282}), 57: (1, {'@': 282}), 117: (1, {'@': 282}), 118: (1, {'@': 282}), 119: (1, {'@': 282}), 121: (1, {'@': 282}), 122: (1, {'@': 282}), 124: (1, {'@': 282})}, 745: {14: (1, {'@': 240}), 15: (1, {'@': 240}), 16: (1, {'@': 240}), 17: (1, {'@': 240}), 18: (1, {'@': 240}), 101: (1, {'@': 240}), 100: (1, {'@': 240}), 19: (1, {'@': 240}), 20: (1, {'@': 240}), 21: (1, {'@': 240}), 22: (1, {'@': 240}), 23: (1, {'@': 240}), 108: (1, {'@': 240}), 82: (1, {'@': 240}), 24: (1, {'@': 240}), 25: (1, {'@': 240}), 1: (1, {'@': 240}), 110: (1, {'@': 240}), 26: (1, {'@': 240}), 27: (1, {'@': 240}), 28: (1, {'@': 240}), 46: (1, {'@': 240}), 29: (1, {'@': 240}), 30: (1, {'@': 240}), 3: (1, {'@': 240}), 31: (1, {'@': 240}), 9: (1, {'@': 240}), 32: (1, {'@': 240}), 34: (1, {'@': 240}), 33: (1, {'@': 240}), 35: (1, {'@': 240}), 36: (1, {'@': 240}), 37: (1, {'@': 240}), 47: (1, {'@': 240}), 38: (1, {'@': 240}), 95: (1, {'@': 240}), 48: (1, {'@': 240}), 39: (1, {'@': 240}), 49: (1, {'@': 240}), 40: (1, {'@': 240}), 41: (1, {'@': 240}), 42: (1, {'@': 240})}, 746: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 167: (0, 312), 147: (0, 580), 13: (0, 707), 199: (0, 620), 105: (0, 588), 149: (0, 779), 148: (0, 769), 123: (0, 776), 110: (0, 724), 192: (0, 325), 91: (0, 716), 81: (0, 786), 11: (0, 632), 83: (0, 720), 175: (0, 593), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 208: (0, 244), 86: (0, 656), 151: (0, 717), 72: (0, 555), 92: (0, 604), 101: (0, 699), 232: (0, 381), 100: (0, 685), 213: (0, 351), 152: (0, 536), 74: (0, 597), 113: (0, 712), 153: (0, 715), 154: (0, 780), 107: (0, 591), 193: (0, 624), 191: (0, 392), 114: (0, 759), 200: (0, 750), 116: (0, 774), 155: (0, 651), 75: (0, 654), 156: (0, 747), 93: (0, 630), 98: (0, 544), 118: (0, 548), 163: (0, 107), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 201: (0, 618), 117: (0, 626), 202: (0, 637), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 194: (0, 721), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 150: (0, 741), 111: (0, 783), 161: (0, 729), 160: (0, 746), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 747: {11: (0, 256), 13: (0, 426)}, 748: {11: (1, {'@': 347}), 12: (1, {'@': 347}), 13: (1, {'@': 347})}, 749: {9: (0, 566), 171: (0, 40), 72: (1, {'@': 161}), 56: (1, {'@': 161}), 78: (1, {'@': 161}), 80: (1, {'@': 161}), 81: (1, {'@': 161}), 68: (1, {'@': 161}), 84: (1, {'@': 161}), 69: (1, {'@': 161}), 86: (1, {'@': 161}), 71: (1, {'@': 161}), 87: (1, {'@': 161}), 89: (1, {'@': 161}), 12: (1, {'@': 161}), 93: (1, {'@': 161}), 60: (1, {'@': 161}), 63: (1, {'@': 161}), 62: (1, {'@': 161}), 97: (1, {'@': 161}), 99: (1, {'@': 161}), 100: (1, {'@': 161}), 102: (1, {'@': 161}), 43: (1, {'@': 161}), 103: (1, {'@': 161}), 105: (1, {'@': 161}), 107: (1, {'@': 161}), 108: (1, {'@': 161}), 112: (1, {'@': 161}), 70: (1, {'@': 161}), 64: (1, {'@': 161}), 67: (1, {'@': 161}), 3: (1, {'@': 161}), 115: (1, {'@': 161}), 116: (1, {'@': 161}), 5: (1, {'@': 161}), 125: (1, {'@': 161}), 59: (1, {'@': 161}), 120: (1, {'@': 161}), 65: (1, {'@': 161}), 6: (1, {'@': 161}), 54: (1, {'@': 161}), 123: (1, {'@': 161}), 73: (1, {'@': 161}), 74: (1, {'@': 161}), 75: (1, {'@': 161}), 76: (1, {'@': 161}), 77: (1, {'@': 161}), 79: (1, {'@': 161}), 61: (1, {'@': 161}), 82: (1, {'@': 161}), 10: (1, {'@': 161}), 66: (1, {'@': 161}), 83: (1, {'@': 161}), 85: (1, {'@': 161}), 11: (1, {'@': 161}), 88: (1, {'@': 161}), 90: (1, {'@': 161}), 91: (1, {'@': 161}), 92: (1, {'@': 161}), 94: (1, {'@': 161}), 47: (1, {'@': 161}), 95: (1, {'@': 161}), 96: (1, {'@': 161}), 4: (1, {'@': 161}), 55: (1, {'@': 161}), 98: (1, {'@': 161}), 101: (1, {'@': 161}), 13: (1, {'@': 161}), 104: (1, {'@': 161}), 106: (1, {'@': 161}), 58: (1, {'@': 161}), 109: (1, {'@': 161}), 1: (1, {'@': 161}), 110: (1, {'@': 161}), 111: (1, {'@': 161}), 113: (1, {'@': 161}), 114: (1, {'@': 161}), 32: (1, {'@': 161}), 57: (1, {'@': 161}), 117: (1, {'@': 161}), 118: (1, {'@': 161}), 119: (1, {'@': 161}), 121: (1, {'@': 161}), 122: (1, {'@': 161}), 124: (1, {'@': 161})}, 750: {72: (1, {'@': 1}), 74: (1, {'@': 1}), 98: (1, {'@': 1}), 75: (1, {'@': 1}), 99: (1, {'@': 1}), 100: (1, {'@': 1}), 101: (1, {'@': 1}), 102: (1, {'@': 1}), 76: (1, {'@': 1}), 13: (1, {'@': 1}), 103: (1, {'@': 1}), 104: (1, {'@': 1}), 105: (1, {'@': 1}), 78: (1, {'@': 1}), 77: (1, {'@': 1}), 106: (1, {'@': 1}), 107: (1, {'@': 1}), 79: (1, {'@': 1}), 108: (1, {'@': 1}), 80: (1, {'@': 1}), 81: (1, {'@': 1}), 82: (1, {'@': 1}), 109: (1, {'@': 1}), 83: (1, {'@': 1}), 1: (1, {'@': 1}), 110: (1, {'@': 1}), 111: (1, {'@': 1}), 84: (1, {'@': 1}), 112: (1, {'@': 1}), 85: (1, {'@': 1}), 11: (1, {'@': 1}), 86: (1, {'@': 1}), 113: (1, {'@': 1}), 114: (1, {'@': 1}), 87: (1, {'@': 1}), 3: (1, {'@': 1}), 88: (1, {'@': 1}), 195: (1, {'@': 1}), 89: (1, {'@': 1}), 115: (1, {'@': 1}), 116: (1, {'@': 1}), 117: (1, {'@': 1}), 118: (1, {'@': 1}), 91: (1, {'@': 1}), 119: (1, {'@': 1}), 92: (1, {'@': 1}), 93: (1, {'@': 1}), 94: (1, {'@': 1}), 120: (1, {'@': 1}), 95: (1, {'@': 1}), 96: (1, {'@': 1}), 121: (1, {'@': 1}), 123: (1, {'@': 1}), 97: (1, {'@': 1}), 124: (1, {'@': 1}), 164: (1, {'@': 1}), 165: (1, {'@': 1}), 122: (1, {'@': 1}), 166: (1, {'@': 1}), 12: (1, {'@': 1}), 44: (1, {'@': 1}), 45: (1, {'@': 1}), 168: (1, {'@': 1}), 163: (1, {'@': 1}), 167: (1, {'@': 1})}, 751: {31: (0, 3), 25: (0, 203), 50: (0, 125), 22: (0, 11), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 1: (0, 324), 19: (0, 150), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 33: (0, 356), 23: (0, 219), 29: (0, 474), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 41: (0, 273), 21: (0, 305), 27: (0, 462), 28: (0, 42), 49: (0, 373), 136: (0, 108), 24: (0, 408), 40: (0, 503), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 752: {174: (0, 359), 11: (0, 655), 175: (0, 703), 13: (0, 682), 173: (0, 778), 122: (0, 714), 121: (0, 583), 120: (0, 550)}, 753: {10: (0, 529)}, 754: {11: (1, {'@': 115}), 13: (1, {'@': 115}), 12: (1, {'@': 115})}, 755: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 131: (0, 419), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 756: {31: (0, 3), 25: (0, 203), 126: (0, 96), 22: (0, 11), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 19: (0, 150), 1: (0, 324), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 133: (0, 160), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 138: (0, 277), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 757: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 150: (0, 81), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 11: (0, 73), 93: (0, 630), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 13: (0, 627), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 758: {11: (1, {'@': 48}), 13: (1, {'@': 48}), 12: (1, {'@': 48})}, 759: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 431), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486), 11: (1, {'@': 31}), 13: (1, {'@': 31}), 12: (1, {'@': 31})}, 760: {1: (0, 384)}, 761: {43: (1, {'@': 246}), 5: (1, {'@': 246}), 11: (1, {'@': 246}), 12: (1, {'@': 246}), 13: (1, {'@': 246})}, 762: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 131: (0, 606), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 763: {5: (1, {'@': 237}), 11: (1, {'@': 237}), 12: (1, {'@': 237}), 43: (1, {'@': 237}), 13: (1, {'@': 237})}, 764: {11: (1, {'@': 90}), 13: (1, {'@': 90}), 12: (1, {'@': 90})}, 765: {7: (1, {'@': 328}), 11: (1, {'@': 328}), 9: (1, {'@': 328}), 13: (1, {'@': 328}), 12: (1, {'@': 328})}, 766: {11: (1, {'@': 108}), 13: (1, {'@': 108}), 12: (1, {'@': 108})}, 767: {31: (0, 3), 25: (0, 203), 126: (0, 96), 22: (0, 11), 50: (0, 125), 3: (0, 68), 16: (0, 502), 17: (0, 369), 39: (0, 25), 19: (0, 150), 1: (0, 324), 35: (0, 397), 42: (0, 233), 51: (0, 456), 52: (0, 354), 135: (0, 483), 33: (0, 356), 129: (0, 497), 136: (0, 403), 23: (0, 219), 29: (0, 474), 130: (0, 169), 137: (0, 121), 14: (0, 493), 15: (0, 205), 9: (0, 154), 32: (0, 504), 30: (0, 194), 138: (0, 262), 133: (0, 160), 41: (0, 273), 27: (0, 462), 28: (0, 42), 21: (0, 305), 49: (0, 373), 46: (0, 445), 24: (0, 408), 40: (0, 503), 47: (0, 237), 53: (0, 141), 26: (0, 405), 38: (0, 50), 18: (0, 428), 37: (0, 494), 36: (0, 15), 34: (0, 6), 20: (0, 247)}, 768: {72: (1, {'@': 291}), 56: (1, {'@': 291}), 78: (1, {'@': 291}), 80: (1, {'@': 291}), 81: (1, {'@': 291}), 68: (1, {'@': 291}), 84: (1, {'@': 291}), 69: (1, {'@': 291}), 86: (1, {'@': 291}), 71: (1, {'@': 291}), 87: (1, {'@': 291}), 89: (1, {'@': 291}), 12: (1, {'@': 291}), 93: (1, {'@': 291}), 60: (1, {'@': 291}), 63: (1, {'@': 291}), 62: (1, {'@': 291}), 97: (1, {'@': 291}), 99: (1, {'@': 291}), 100: (1, {'@': 291}), 102: (1, {'@': 291}), 43: (1, {'@': 291}), 103: (1, {'@': 291}), 105: (1, {'@': 291}), 107: (1, {'@': 291}), 108: (1, {'@': 291}), 112: (1, {'@': 291}), 70: (1, {'@': 291}), 64: (1, {'@': 291}), 67: (1, {'@': 291}), 3: (1, {'@': 291}), 9: (1, {'@': 291}), 115: (1, {'@': 291}), 116: (1, {'@': 291}), 5: (1, {'@': 291}), 125: (1, {'@': 291}), 59: (1, {'@': 291}), 120: (1, {'@': 291}), 65: (1, {'@': 291}), 6: (1, {'@': 291}), 54: (1, {'@': 291}), 123: (1, {'@': 291}), 73: (1, {'@': 291}), 74: (1, {'@': 291}), 75: (1, {'@': 291}), 76: (1, {'@': 291}), 77: (1, {'@': 291}), 79: (1, {'@': 291}), 61: (1, {'@': 291}), 82: (1, {'@': 291}), 10: (1, {'@': 291}), 66: (1, {'@': 291}), 83: (1, {'@': 291}), 85: (1, {'@': 291}), 11: (1, {'@': 291}), 88: (1, {'@': 291}), 90: (1, {'@': 291}), 91: (1, {'@': 291}), 92: (1, {'@': 291}), 94: (1, {'@': 291}), 47: (1, {'@': 291}), 95: (1, {'@': 291}), 96: (1, {'@': 291}), 4: (1, {'@': 291}), 55: (1, {'@': 291}), 98: (1, {'@': 291}), 101: (1, {'@': 291}), 13: (1, {'@': 291}), 104: (1, {'@': 291}), 106: (1, {'@': 291}), 58: (1, {'@': 291}), 109: (1, {'@': 291}), 1: (1, {'@': 291}), 110: (1, {'@': 291}), 111: (1, {'@': 291}), 113: (1, {'@': 291}), 114: (1, {'@': 291}), 32: (1, {'@': 291}), 57: (1, {'@': 291}), 117: (1, {'@': 291}), 118: (1, {'@': 291}), 119: (1, {'@': 291}), 121: (1, {'@': 291}), 122: (1, {'@': 291}), 124: (1, {'@': 291})}, 769: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 13: (0, 669), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 191: (0, 124), 81: (0, 786), 11: (0, 632), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 116: (0, 774), 155: (0, 651), 156: (0, 747), 93: (0, 630), 193: (0, 177), 98: (0, 544), 118: (0, 548), 157: (0, 552), 112: (0, 522), 78: (0, 511), 77: (0, 670), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 102: (0, 601), 194: (0, 414), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 192: (0, 472), 119: (0, 674), 150: (0, 741), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 770: {31: (0, 3), 126: (0, 96), 50: (0, 125), 17: (0, 369), 3: (0, 68), 127: (0, 47), 16: (0, 502), 39: (0, 25), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 771: {11: (1, {'@': 193}), 12: (1, {'@': 193}), 13: (1, {'@': 193})}, 772: {33: (1, {'@': 181}), 3: (1, {'@': 181})}, 773: {72: (1, {'@': 224}), 74: (1, {'@': 224}), 98: (1, {'@': 224}), 75: (1, {'@': 224}), 99: (1, {'@': 224}), 100: (1, {'@': 224}), 101: (1, {'@': 224}), 102: (1, {'@': 224}), 76: (1, {'@': 224}), 13: (1, {'@': 224}), 103: (1, {'@': 224}), 104: (1, {'@': 224}), 105: (1, {'@': 224}), 78: (1, {'@': 224}), 77: (1, {'@': 224}), 106: (1, {'@': 224}), 107: (1, {'@': 224}), 79: (1, {'@': 224}), 108: (1, {'@': 224}), 80: (1, {'@': 224}), 81: (1, {'@': 224}), 82: (1, {'@': 224}), 109: (1, {'@': 224}), 83: (1, {'@': 224}), 1: (1, {'@': 224}), 110: (1, {'@': 224}), 111: (1, {'@': 224}), 84: (1, {'@': 224}), 112: (1, {'@': 224}), 85: (1, {'@': 224}), 11: (1, {'@': 224}), 86: (1, {'@': 224}), 113: (1, {'@': 224}), 114: (1, {'@': 224}), 87: (1, {'@': 224}), 3: (1, {'@': 224}), 88: (1, {'@': 224}), 89: (1, {'@': 224}), 115: (1, {'@': 224}), 116: (1, {'@': 224}), 117: (1, {'@': 224}), 118: (1, {'@': 224}), 91: (1, {'@': 224}), 119: (1, {'@': 224}), 92: (1, {'@': 224}), 93: (1, {'@': 224}), 94: (1, {'@': 224}), 120: (1, {'@': 224}), 95: (1, {'@': 224}), 96: (1, {'@': 224}), 121: (1, {'@': 224}), 122: (1, {'@': 224}), 123: (1, {'@': 224}), 97: (1, {'@': 224}), 124: (1, {'@': 224})}, 774: {3: (0, 195)}, 775: {11: (0, 300), 12: (1, {'@': 206}), 13: (1, {'@': 206})}, 776: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 131: (0, 596), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 777: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 10: (0, 27), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 54: (0, 222), 131: (0, 69), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 778: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 131: (0, 517), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 779: {12: (0, 645), 187: (0, 537), 11: (1, {'@': 53}), 13: (1, {'@': 53})}, 780: {11: (1, {'@': 158}), 13: (1, {'@': 158}), 12: (1, {'@': 158})}, 781: {145: (0, 755), 96: (0, 772), 103: (0, 752), 146: (0, 692), 84: (0, 742), 104: (0, 735), 147: (0, 580), 105: (0, 588), 148: (0, 769), 149: (0, 779), 123: (0, 776), 110: (0, 724), 91: (0, 716), 81: (0, 786), 83: (0, 720), 95: (0, 638), 109: (0, 652), 3: (0, 688), 124: (0, 523), 1: (0, 573), 86: (0, 656), 151: (0, 717), 72: (0, 555), 101: (0, 699), 175: (0, 8), 100: (0, 685), 152: (0, 536), 92: (0, 604), 153: (0, 715), 154: (0, 780), 107: (0, 591), 114: (0, 759), 155: (0, 651), 116: (0, 774), 156: (0, 747), 93: (0, 630), 220: (0, 10), 13: (0, 599), 98: (0, 544), 11: (0, 602), 118: (0, 548), 157: (0, 552), 112: (0, 522), 44: (0, 12), 78: (0, 511), 77: (0, 670), 45: (0, 32), 158: (0, 564), 82: (0, 568), 94: (0, 584), 159: (0, 595), 150: (0, 705), 102: (0, 601), 79: (0, 589), 117: (0, 626), 80: (0, 639), 88: (0, 650), 99: (0, 644), 97: (0, 700), 106: (0, 762), 108: (0, 518), 120: (0, 550), 119: (0, 674), 160: (0, 746), 111: (0, 783), 161: (0, 729), 87: (0, 719), 115: (0, 710), 85: (0, 680), 89: (0, 401), 162: (0, 470), 121: (0, 434), 76: (0, 459)}, 782: {5: (0, 605), 11: (1, {'@': 78}), 13: (1, {'@': 78}), 12: (1, {'@': 78})}, 783: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 131: (0, 732), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486), 11: (1, {'@': 67}), 13: (1, {'@': 67}), 12: (1, {'@': 67})}, 784: {175: (0, 94), 229: (0, 543), 168: (0, 231), 120: (0, 550)}, 785: {179: (0, 9), 180: (0, 466), 177: (0, 72), 176: (0, 122), 182: (0, 248), 181: (0, 334), 178: (0, 31), 183: (0, 443), 184: (0, 313)}, 786: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 521), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 197: (0, 708), 1: (0, 614), 25: (0, 203), 134: (0, 433), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 196: (0, 216), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 131: (0, 66), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486)}, 787: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 131: (0, 83), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 95: (0, 542), 20: (0, 247), 101: (0, 265), 219: (0, 86), 138: (0, 287), 82: (0, 278), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 108: (0, 487), 139: (0, 505), 22: (0, 11), 42: (0, 233), 110: (0, 450), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 100: (0, 314), 48: (0, 486)}, 788: {11: (1, {'@': 345}), 12: (1, {'@': 345}), 13: (1, {'@': 345})}, 789: {31: (0, 3), 126: (0, 96), 50: (0, 125), 3: (0, 68), 127: (0, 341), 16: (0, 502), 39: (0, 25), 17: (0, 369), 128: (0, 318), 51: (0, 456), 129: (0, 497), 23: (0, 219), 14: (0, 493), 130: (0, 169), 19: (0, 150), 132: (0, 254), 9: (0, 154), 133: (0, 160), 18: (0, 428), 36: (0, 15), 34: (0, 6), 25: (0, 203), 134: (0, 433), 1: (0, 324), 35: (0, 397), 135: (0, 483), 136: (0, 403), 33: (0, 356), 29: (0, 474), 137: (0, 121), 27: (0, 462), 28: (0, 42), 49: (0, 373), 24: (0, 408), 47: (0, 237), 20: (0, 247), 138: (0, 287), 15: (0, 205), 32: (0, 504), 30: (0, 194), 52: (0, 354), 46: (0, 445), 40: (0, 503), 139: (0, 505), 22: (0, 11), 42: (0, 233), 41: (0, 273), 21: (0, 305), 53: (0, 141), 26: (0, 405), 38: (0, 50), 37: (0, 494), 48: (0, 486), 131: (0, 268)}}, 'start_states': {'start': 345}, 'end_states': {'start': 556}}, '__type__': 'ParsingFrontend'}, 'rules': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}, {'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}, {'@': 107}, {'@': 108}, {'@': 109}, {'@': 110}, {'@': 111}, {'@': 112}, {'@': 113}, {'@': 114}, {'@': 115}, {'@': 116}, {'@': 117}, {'@': 118}, {'@': 119}, {'@': 120}, {'@': 121}, {'@': 122}, {'@': 123}, {'@': 124}, {'@': 125}, {'@': 126}, {'@': 127}, {'@': 128}, {'@': 129}, {'@': 130}, {'@': 131}, {'@': 132}, {'@': 133}, {'@': 134}, {'@': 135}, {'@': 136}, {'@': 137}, {'@': 138}, {'@': 139}, {'@': 140}, {'@': 141}, {'@': 142}, {'@': 143}, {'@': 144}, {'@': 145}, {'@': 146}, {'@': 147}, {'@': 148}, {'@': 149}, {'@': 150}, {'@': 151}, {'@': 152}, {'@': 153}, {'@': 154}, {'@': 155}, {'@': 156}, {'@': 157}, {'@': 158}, {'@': 159}, {'@': 160}, {'@': 161}, {'@': 162}, {'@': 163}, {'@': 164}, {'@': 165}, {'@': 166}, {'@': 167}, {'@': 168}, {'@': 169}, {'@': 170}, {'@': 171}, {'@': 172}, {'@': 173}, {'@': 174}, {'@': 175}, {'@': 176}, {'@': 177}, {'@': 178}, {'@': 179}, {'@': 180}, {'@': 181}, {'@': 182}, {'@': 183}, {'@': 184}, {'@': 185}, {'@': 186}, {'@': 187}, {'@': 188}, {'@': 189}, {'@': 190}, {'@': 191}, {'@': 192}, {'@': 193}, {'@': 194}, {'@': 195}, {'@': 196}, {'@': 197}, {'@': 198}, {'@': 199}, {'@': 200}, {'@': 201}, {'@': 202}, {'@': 203}, {'@': 204}, {'@': 205}, {'@': 206}, {'@': 207}, {'@': 208}, {'@': 209}, {'@': 210}, {'@': 211}, {'@': 212}, {'@': 213}, {'@': 214}, {'@': 215}, {'@': 216}, {'@': 217}, {'@': 218}, {'@': 219}, {'@': 220}, {'@': 221}, {'@': 222}, {'@': 223}, {'@': 224}, {'@': 225}, {'@': 226}, {'@': 227}, {'@': 228}, {'@': 229}, {'@': 230}, {'@': 231}, {'@': 232}, {'@': 233}, {'@': 234}, {'@': 235}, {'@': 236}, {'@': 237}, {'@': 238}, {'@': 239}, {'@': 240}, {'@': 241}, {'@': 242}, {'@': 243}, {'@': 244}, {'@': 245}, {'@': 246}, {'@': 247}, {'@': 248}, {'@': 249}, {'@': 250}, {'@': 251}, {'@': 252}, {'@': 253}, {'@': 254}, {'@': 255}, {'@': 256}, {'@': 257}, {'@': 258}, {'@': 259}, {'@': 260}, {'@': 261}, {'@': 262}, {'@': 263}, {'@': 264}, {'@': 265}, {'@': 266}, {'@': 267}, {'@': 268}, {'@': 269}, {'@': 270}, {'@': 271}, {'@': 272}, {'@': 273}, {'@': 274}, {'@': 275}, {'@': 276}, {'@': 277}, {'@': 278}, {'@': 279}, {'@': 280}, {'@': 281}, {'@': 282}, {'@': 283}, {'@': 284}, {'@': 285}, {'@': 286}, {'@': 287}, {'@': 288}, {'@': 289}, {'@': 290}, {'@': 291}, {'@': 292}, {'@': 293}, {'@': 294}, {'@': 295}, {'@': 296}, {'@': 297}, {'@': 298}, {'@': 299}, {'@': 300}, {'@': 301}, {'@': 302}, {'@': 303}, {'@': 304}, {'@': 305}, {'@': 306}, {'@': 307}, {'@': 308}, {'@': 309}, {'@': 310}, {'@': 311}, {'@': 312}, {'@': 313}, {'@': 314}, {'@': 315}, {'@': 316}, {'@': 317}, {'@': 318}, {'@': 319}, {'@': 320}, {'@': 321}, {'@': 322}, {'@': 323}, {'@': 324}, {'@': 325}, {'@': 326}, {'@': 327}, {'@': 328}, {'@': 329}, {'@': 330}, {'@': 331}, {'@': 332}, {'@': 333}, {'@': 334}, {'@': 335}, {'@': 336}, {'@': 337}, {'@': 338}, {'@': 339}, {'@': 340}, {'@': 341}, {'@': 342}, {'@': 343}, {'@': 344}, {'@': 345}, {'@': 346}, {'@': 347}, {'@': 348}, {'@': 349}, {'@': 350}, {'@': 351}, {'@': 352}, {'@': 353}, {'@': 354}, {'@': 355}, {'@': 356}, {'@': 357}, {'@': 358}, {'@': 359}, {'@': 360}, {'@': 361}, {'@': 362}, {'@': 363}, {'@': 364}, {'@': 365}, {'@': 366}, {'@': 367}, {'@': 368}, {'@': 369}, {'@': 370}, {'@': 371}, {'@': 372}, {'@': 373}, {'@': 374}, {'@': 375}, {'@': 376}, {'@': 377}, {'@': 378}, {'@': 379}, {'@': 380}, {'@': 381}, {'@': 382}, {'@': 383}, {'@': 384}, {'@': 385}, {'@': 386}, {'@': 387}, {'@': 388}, {'@': 389}, {'@': 390}, {'@': 391}, {'@': 392}, {'@': 393}, {'@': 394}, {'@': 395}, {'@': 396}, {'@': 397}, {'@': 398}, {'@': 399}, {'@': 400}, {'@': 401}, {'@': 402}, {'@': 403}, {'@': 404}, {'@': 405}, {'@': 406}, {'@': 407}, {'@': 408}, {'@': 409}, {'@': 410}, {'@': 411}, {'@': 412}, {'@': 413}, {'@': 414}, {'@': 415}, {'@': 416}, {'@': 417}], 'options': {'debug': False, 'strict': False, 'keep_all_tokens': False, 'tree_class': None, 'cache': False, 'cache_grammar': False, 'postlex': None, 'parser': 'lalr', 'lexer': 'contextual', 'transformer': None, 'start': ['start'], 'priority': 'normal', 'ambiguity': 'auto', 'regex': False, 'propagate_positions': False, 'lexer_callbacks': {}, 'maybe_placeholders': False, 'edit_terminals': None, 'g_regex_flags': 0, 'use_bytes': False, 'ordered_sets': True, 'import_paths': [], 'source_path': None, '_plugins': {}}, '__type__': 'Lark'} +) +MEMO = ( +{0: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'start', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 1: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program_line', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'program_program_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 2: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'program_line', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'program', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 3: {'origin': {'name': 'program_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'preproc_line', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'program_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 4: {'origin': {'name': 'program_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label_line', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'program_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 5: {'origin': {'name': 'program_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'statements', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'program_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 6: {'origin': {'name': 'program_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'program_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 7: {'origin': {'name': 'program_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'co_statements', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'program_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 8: {'origin': {'name': 'program_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'program_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 9: {'origin': {'name': 'program_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'program_line', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 10: {'origin': {'name': 'co_statements_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'co_statements', '__type__': 'NonTerminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'co_statements_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': 2, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 11: {'origin': {'name': 'co_statements_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'co_statements_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': 2, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 12: {'origin': {'name': 'co_statements_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'co_statements_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': 2, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 13: {'origin': {'name': 'co_statements', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'statement', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'co_statements', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 14: {'origin': {'name': 'statements_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'statements', '__type__': 'NonTerminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'statements_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': 2, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 15: {'origin': {'name': 'statements_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'statements_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': 2, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 16: {'origin': {'name': 'statements', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'statement', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'statements_statement', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 17: {'origin': {'name': 'statements', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'statement', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'statements_statement', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 18: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'var_decl', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'var_decls', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 19: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'function_declaration', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'staement_func_decl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 20: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BORDER', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'statement_border', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 21: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PLOT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'statement_plot', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 22: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PLOT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'attr_list', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'statement_plot_attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 23: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DRAW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'statement_draw3', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 24: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DRAW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'attr_list', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 6, 'alias': 'statement_draw3_attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 25: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DRAW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 7, 'alias': 'statement_draw', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 26: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DRAW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'attr_list', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 8, 'alias': 'statement_draw_attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 27: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CIRCLE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 9, 'alias': 'statement_circle', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 28: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CIRCLE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'attr_list', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 10, 'alias': 'statement_circle_attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 29: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CLS', 'filter_out': False, '__type__': 'Terminal'}], 'order': 11, 'alias': 'statement_cls', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 30: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ASM', 'filter_out': False, '__type__': 'Terminal'}], 'order': 12, 'alias': 'statement_asm', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 31: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RANDOMIZE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 13, 'alias': 'statement_randomize', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 32: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RANDOMIZE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 14, 'alias': 'statement_randomize_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 33: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BEEP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 15, 'alias': 'statement_beep', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 34: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}], 'order': 16, 'alias': 'statement_call', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 35: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}], 'order': 17, 'alias': 'statement_call', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 36: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 18, 'alias': 'statement_call', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 37: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'lexpr', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 19, 'alias': 'assignment', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 38: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 20, 'alias': 'array_copy', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 39: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 21, 'alias': 'array_copy', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 40: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 22, 'alias': 'arr_assignment', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 41: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 23, 'alias': 'arr_assignment', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 42: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 24, 'alias': 'substr_assignment_no_let', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 43: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 25, 'alias': 'substr_assignment', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 44: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'substr', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 26, 'alias': 'str_assign', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 45: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'substr', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 27, 'alias': 'str_assign', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 46: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'goto', '__type__': 'NonTerminal'}, {'name': 'NUMBER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 28, 'alias': 'goto', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 47: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'goto', '__type__': 'NonTerminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 29, 'alias': 'goto', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 48: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 30, 'alias': 'if_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 49: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 31, 'alias': 'if_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 50: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 32, 'alias': 'if_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 51: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 33, 'alias': 'if_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 52: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'label', '__type__': 'NonTerminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 34, 'alias': 'if_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 53: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_inline', '__type__': 'NonTerminal'}], 'order': 35, 'alias': 'statement_if', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 54: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 36, 'alias': 'statement_if_then_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 55: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 37, 'alias': 'statement_if_then_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 56: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'elseiflist', '__type__': 'NonTerminal'}], 'order': 38, 'alias': 'if_elseif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 57: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'elseiflist', '__type__': 'NonTerminal'}], 'order': 39, 'alias': 'if_elseif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 58: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_inline', '__type__': 'NonTerminal'}, {'name': 'else_part_inline', '__type__': 'NonTerminal'}], 'order': 40, 'alias': 'if_inline', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 59: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'else_part', '__type__': 'NonTerminal'}], 'order': 41, 'alias': 'if_else', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 60: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'for_start', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'label_next', '__type__': 'NonTerminal'}], 'order': 42, 'alias': 'for_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 61: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'for_start', '__type__': 'NonTerminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'label_next', '__type__': 'NonTerminal'}], 'order': 43, 'alias': 'for_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 62: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'for_start', '__type__': 'NonTerminal'}, {'name': 'program', '__type__': 'NonTerminal'}, {'name': 'label_next', '__type__': 'NonTerminal'}], 'order': 44, 'alias': 'for_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 63: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 45, 'alias': 'end', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 64: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END', 'filter_out': False, '__type__': 'Terminal'}], 'order': 46, 'alias': 'end', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 65: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ERROR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 47, 'alias': 'error_raise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 66: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STOP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 48, 'alias': 'stop_raise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 67: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 49, 'alias': 'stop_raise', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 68: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_start', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'label_loop', '__type__': 'NonTerminal'}], 'order': 50, 'alias': 'do_loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 69: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_start', '__type__': 'NonTerminal'}, {'name': 'label_loop', '__type__': 'NonTerminal'}], 'order': 51, 'alias': 'do_loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 70: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'label_loop', '__type__': 'NonTerminal'}], 'order': 52, 'alias': 'do_loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 71: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_start', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'label_loop', '__type__': 'NonTerminal'}, {'name': 'UNTIL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 53, 'alias': 'do_loop_until', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 72: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_start', '__type__': 'NonTerminal'}, {'name': 'label_loop', '__type__': 'NonTerminal'}, {'name': 'UNTIL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 54, 'alias': 'do_loop_until', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 73: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'label_loop', '__type__': 'NonTerminal'}, {'name': 'UNTIL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 55, 'alias': 'do_loop_until', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 74: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DATA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}], 'order': 56, 'alias': 'data', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 75: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RESTORE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 57, 'alias': 'restore', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 76: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RESTORE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 58, 'alias': 'restore', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 77: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RESTORE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NUMBER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 59, 'alias': 'restore', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 78: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'READ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}], 'order': 60, 'alias': 'read', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 79: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_start', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'label_loop', '__type__': 'NonTerminal'}, {'name': 'WHILE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 61, 'alias': 'do_loop_while', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 80: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_start', '__type__': 'NonTerminal'}, {'name': 'label_loop', '__type__': 'NonTerminal'}, {'name': 'WHILE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 62, 'alias': 'do_loop_while', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 81: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'label_loop', '__type__': 'NonTerminal'}, {'name': 'WHILE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 63, 'alias': 'do_loop_while', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 82: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_while_start', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'LOOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 64, 'alias': 'do_while_loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 83: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_while_start', '__type__': 'NonTerminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'LOOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 65, 'alias': 'do_while_loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 84: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_while_start', '__type__': 'NonTerminal'}, {'name': 'LOOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 66, 'alias': 'do_while_loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 85: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_until_start', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'LOOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 67, 'alias': 'do_until_loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 86: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_until_start', '__type__': 'NonTerminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'LOOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 68, 'alias': 'do_until_loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 87: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'do_until_start', '__type__': 'NonTerminal'}, {'name': 'LOOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 69, 'alias': 'do_until_loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 88: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'while_start', '__type__': 'NonTerminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'label_end_while', '__type__': 'NonTerminal'}], 'order': 70, 'alias': 'while_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 89: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'while_start', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'label_end_while', '__type__': 'NonTerminal'}], 'order': 71, 'alias': 'while_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 90: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EXIT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'WHILE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 72, 'alias': 'exit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 91: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EXIT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 73, 'alias': 'exit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 92: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EXIT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'FOR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 74, 'alias': 'exit', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 93: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CONTINUE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'WHILE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 75, 'alias': 'continue_', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 94: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CONTINUE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'DO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 76, 'alias': 'continue_', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 95: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CONTINUE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'FOR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 77, 'alias': 'continue_', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 96: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRINT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'print_list', '__type__': 'NonTerminal'}], 'order': 78, 'alias': 'print_sentence', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 97: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ON', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'goto', '__type__': 'NonTerminal'}, {'name': 'label_list', '__type__': 'NonTerminal'}], 'order': 79, 'alias': 'on_goto', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 98: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RETURN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 80, 'alias': 'return_', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 99: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RETURN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 81, 'alias': 'return_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 100: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PAUSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 82, 'alias': 'pause', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 101: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POKE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 83, 'alias': 'poke', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 102: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POKE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 84, 'alias': 'poke', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 103: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POKE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'numbertype', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 85, 'alias': 'poke2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 104: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POKE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'numbertype', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 86, 'alias': 'poke2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 105: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POKE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'numbertype', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 87, 'alias': 'poke3', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 106: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'POKE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'numbertype', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 88, 'alias': 'poke3', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 107: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OUT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 89, 'alias': 'out', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 108: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ITALIC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 90, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 109: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BOLD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 91, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 110: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INK', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 92, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 111: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PAPER', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 93, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 112: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BRIGHT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 94, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 113: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FLASH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 95, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 114: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OVER', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 96, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 115: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INVERSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 97, 'alias': 'simple_instruction', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 116: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SAVE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'CODE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 98, 'alias': 'save_code', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 117: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SAVE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 99, 'alias': 'save_code', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 118: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SAVE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 100, 'alias': 'save_code', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 119: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SAVE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'DATA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 101, 'alias': 'save_data', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 120: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SAVE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'DATA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 102, 'alias': 'save_data', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 121: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SAVE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'DATA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 103, 'alias': 'save_data', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 122: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'load_or_verify', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 104, 'alias': 'load_code', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 123: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'load_or_verify', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'CODE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 105, 'alias': 'load_code', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 124: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'load_or_verify', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'CODE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 106, 'alias': 'load_code', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 125: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'load_or_verify', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'CODE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 107, 'alias': 'load_code', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 126: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'load_or_verify', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'DATA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 108, 'alias': 'load_data', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 127: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'load_or_verify', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'DATA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 109, 'alias': 'load_data', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 128: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'load_or_verify', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'DATA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 110, 'alias': 'load_data', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 129: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 111, 'alias': 'array_eq_error', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 130: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}, {'name': 'substr', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 112, 'alias': 'let_arr_substr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 131: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}, {'name': 'substr', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 113, 'alias': 'let_arr_substr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 132: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 114, 'alias': 'let_arr_substr_single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 133: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 115, 'alias': 'let_arr_substr_single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 134: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 116, 'alias': 'let_arr_substr_in_args', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 135: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 117, 'alias': 'let_arr_substr_in_args', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 136: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 118, 'alias': 'let_arr_substr_in_args2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 137: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 119, 'alias': 'let_arr_substr_in_args2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 138: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 120, 'alias': 'let_arr_substr_in_args3', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 139: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 121, 'alias': 'let_arr_substr_in_args3', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 140: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 122, 'alias': 'let_arr_substr_in_args4', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 141: {'origin': {'name': 'statement', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 123, 'alias': 'let_arr_substr_in_args4', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 142: {'origin': {'name': 'label', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LABEL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 143: {'origin': {'name': 'label_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'statements', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'program_line_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 144: {'origin': {'name': 'label_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'co_statements', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'program_line_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 145: {'origin': {'name': 'label_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label_line_co', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'label_line_label_line_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 146: {'origin': {'name': 'label_line_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'label_line_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 147: {'origin': {'name': 'label_line_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'label_line_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 148: {'origin': {'name': 'label_line_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'label_line_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 149: {'origin': {'name': 'program_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'program_line_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': 2, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 150: {'origin': {'name': 'program_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'label_line_co', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'program_line_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': 2, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 151: {'origin': {'name': 'program_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'program_line_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': 2, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 152: {'origin': {'name': 'program_co', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'program_line_co', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': 2, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 153: {'origin': {'name': 'var_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DIM', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'idlist', '__type__': 'NonTerminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'var_decl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 154: {'origin': {'name': 'var_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DIM', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'idlist', '__type__': 'NonTerminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}, {'name': 'AT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'var_decl_at', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 155: {'origin': {'name': 'var_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DIM', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'idlist', '__type__': 'NonTerminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'var_decl_ini', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 156: {'origin': {'name': 'var_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CONST', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'idlist', '__type__': 'NonTerminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'var_decl_ini', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 157: {'origin': {'name': 'var_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'var_arr_decl', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'arr_decl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 158: {'origin': {'name': 'var_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'var_arr_decl_addr', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'arr_decl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 159: {'origin': {'name': 'var_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DIM', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'idlist', '__type__': 'NonTerminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bound_list', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}, {'name': 'RIGHTARROW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'const_vector', '__type__': 'NonTerminal'}], 'order': 6, 'alias': 'arr_decl_initialized', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 160: {'origin': {'name': 'var_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DIM', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'idlist', '__type__': 'NonTerminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bound_list', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'const_vector', '__type__': 'NonTerminal'}], 'order': 7, 'alias': 'arr_decl_initialized', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 161: {'origin': {'name': 'singleid', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'singleid', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 162: {'origin': {'name': 'singleid', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'singleid', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 163: {'origin': {'name': 'idlist', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'singleid', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'idlist_id', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 164: {'origin': {'name': 'idlist', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'idlist', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'singleid', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'idlist_idlist_id', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 165: {'origin': {'name': 'var_arr_decl_addr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'var_arr_decl', '__type__': 'NonTerminal'}, {'name': 'AT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'arr_decl_attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 166: {'origin': {'name': 'var_arr_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DIM', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'idlist', '__type__': 'NonTerminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bound_list', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'decl_arr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 167: {'origin': {'name': 'bound_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bound', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'bound_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 168: {'origin': {'name': 'bound_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bound_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bound', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'bound_list_bound', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 169: {'origin': {'name': 'bound', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'bound', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 170: {'origin': {'name': 'bound', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'bound_to_bound', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 171: {'origin': {'name': 'const_vector', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LBRACE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'const_vector_list', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'const_vector', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 172: {'origin': {'name': 'const_vector', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LBRACE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'const_number_list', '__type__': 'NonTerminal'}, {'name': 'RBRACE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'const_vector', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 173: {'origin': {'name': 'const_number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'const_vector_elem_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 174: {'origin': {'name': 'const_number_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'const_number_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'const_vector_elem_list_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 175: {'origin': {'name': 'const_vector_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'const_vector', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'const_vector_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 176: {'origin': {'name': 'const_vector_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'const_vector_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'const_vector', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'const_vector_vector_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 177: {'origin': {'name': 'lexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'lexpr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 178: {'origin': {'name': 'lexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LET', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'lexpr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 179: {'origin': {'name': 'goto', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'GO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'go', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 180: {'origin': {'name': 'goto', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'GO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'SUB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'go', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 181: {'origin': {'name': 'goto', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'GOTO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'go', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 182: {'origin': {'name': 'goto', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'GOSUB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'go', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 183: {'origin': {'name': 'endif', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END_IF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 184: {'origin': {'name': 'endif', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'END_IF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 185: {'origin': {'name': 'endif', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ENDIF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 186: {'origin': {'name': 'endif', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'ENDIF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 187: {'origin': {'name': 'if_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'statements', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'single_line_if', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 188: {'origin': {'name': 'if_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'single_line_if', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 189: {'origin': {'name': 'if_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'single_line_if', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 190: {'origin': {'name': 'if_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_then_part', '__type__': 'NonTerminal'}, {'name': 'co_statements', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'single_line_if', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 191: {'origin': {'name': 'elseif_expr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSEIF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'then', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'elseif_part', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 192: {'origin': {'name': 'elseif_expr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'ELSEIF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'then', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'elseif_part', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 193: {'origin': {'name': 'elseiflist', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'elseif_expr', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'elseif_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 194: {'origin': {'name': 'elseiflist', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'elseif_expr', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'else_part', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'elseif_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 195: {'origin': {'name': 'elseiflist', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'elseif_expr', '__type__': 'NonTerminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'elseiflist', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'elseif_elseiflist', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 196: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'else_part_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 197: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'else_part_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 198: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'else_part_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 199: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'else_part_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 200: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'label', '__type__': 'NonTerminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'else_part_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 201: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'label', '__type__': 'NonTerminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'else_part_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 202: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 6, 'alias': 'else_part_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 203: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 7, 'alias': 'else_part_endif', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 204: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}], 'order': 8, 'alias': 'else_part', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 205: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}], 'order': 9, 'alias': 'else_part', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 206: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'co_statements', '__type__': 'NonTerminal'}], 'order': 10, 'alias': 'else_part', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 207: {'origin': {'name': 'else_part_inline', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'statements', '__type__': 'NonTerminal'}], 'order': 11, 'alias': 'else_part', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 208: {'origin': {'name': 'else_part', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'else_part_inline', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'else_part_is_inline', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 209: {'origin': {'name': 'else_part', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'else_part_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 210: {'origin': {'name': 'else_part', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'else_part_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 211: {'origin': {'name': 'else_part', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'endif', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'else_part_label', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 212: {'origin': {'name': 'if_then_part', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'then', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'if_then_part', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 213: {'origin': {'name': 'then', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'then', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 214: {'origin': {'name': 'then', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'THEN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'then', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 215: {'origin': {'name': 'label_next', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'NEXT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'next', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 216: {'origin': {'name': 'label_next', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEXT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'next', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 217: {'origin': {'name': 'label_next', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'NEXT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'next1', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 218: {'origin': {'name': 'label_next', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NEXT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'next1', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 219: {'origin': {'name': 'for_start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FOR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'step', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'for_sentence_start', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 220: {'origin': {'name': 'step', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'step', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 221: {'origin': {'name': 'step', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STEP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'step_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 222: {'origin': {'name': 'label_loop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'LOOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 223: {'origin': {'name': 'label_loop', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LOOP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'loop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 224: {'origin': {'name': 'do_while_start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'WHILE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'do_while_start', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 225: {'origin': {'name': 'do_until_start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'UNTIL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'do_until_start', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 226: {'origin': {'name': 'do_start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'do_start', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 227: {'origin': {'name': 'do_start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'do_start', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 228: {'origin': {'name': 'label_end_while', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'WEND', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'label_end_while', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 229: {'origin': {'name': 'label_end_while', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label', '__type__': 'NonTerminal'}, {'name': 'END_WHILE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'label_end_while', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 230: {'origin': {'name': 'label_end_while', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'WEND', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'label_end_while', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 231: {'origin': {'name': 'label_end_while', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END_WHILE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'label_end_while', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 232: {'origin': {'name': 'while_start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'WHILE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'while_start', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 233: {'origin': {'name': 'print_elem', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'print_elem_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 234: {'origin': {'name': 'print_elem', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'print_at', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'print_list_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 235: {'origin': {'name': 'print_elem', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'print_tab', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'print_list_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 236: {'origin': {'name': 'print_elem', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'attr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'print_list_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 237: {'origin': {'name': 'print_elem', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BOLD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'print_list_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 238: {'origin': {'name': 'print_elem', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ITALIC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'print_list_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 239: {'origin': {'name': 'print_elem', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 6, 'alias': 'print_list_epsilon', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 240: {'origin': {'name': 'attr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'attr', '__type__': 'NonTerminal'}, {'name': 'SC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'attr_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 241: {'origin': {'name': 'attr_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'attr_list', '__type__': 'NonTerminal'}, {'name': 'attr', '__type__': 'NonTerminal'}, {'name': 'SC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'attr_list_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 242: {'origin': {'name': 'attr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'OVER', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 243: {'origin': {'name': 'attr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INVERSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 244: {'origin': {'name': 'attr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INK', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 245: {'origin': {'name': 'attr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PAPER', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 246: {'origin': {'name': 'attr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BRIGHT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 247: {'origin': {'name': 'attr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FLASH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'attr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 248: {'origin': {'name': 'print_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'print_elem', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'print_list_elem', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 249: {'origin': {'name': 'print_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'print_list', '__type__': 'NonTerminal'}, {'name': 'SC', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'print_elem', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'print_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 250: {'origin': {'name': 'print_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'print_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'print_elem', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'print_list_comma', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 251: {'origin': {'name': 'print_at', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'AT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'print_list_at', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 252: {'origin': {'name': 'print_tab', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'TAB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'print_list_tab', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 253: {'origin': {'name': 'label_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'label_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 254: {'origin': {'name': 'label_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NUMBER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'label_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 255: {'origin': {'name': 'label_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'label_list_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 256: {'origin': {'name': 'label_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'label_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NUMBER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'label_list_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 257: {'origin': {'name': 'load_or_verify', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LOAD', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'load_or_verify', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 258: {'origin': {'name': 'load_or_verify', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'VERIFY', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'load_or_verify', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 259: {'origin': {'name': 'numbertype', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BYTE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'numbertype', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 260: {'origin': {'name': 'numbertype', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'UBYTE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'numbertype', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 261: {'origin': {'name': 'numbertype', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'numbertype', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 262: {'origin': {'name': 'numbertype', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'UINTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'numbertype', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 263: {'origin': {'name': 'numbertype', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LONG', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'numbertype', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 264: {'origin': {'name': 'numbertype', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ULONG', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'numbertype', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 265: {'origin': {'name': 'numbertype', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FIXED', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'numbertype', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 266: {'origin': {'name': 'numbertype', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FLOAT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 7, 'alias': 'numbertype', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 267: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'lp_expr_rp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 268: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NUMBER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'number_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 269: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PI', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'expr_pi', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 270: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'string', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'expr_string', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 271: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'id_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 272: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADDRESSOF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'singleid', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'addr_of_id', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 273: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'func_call', '__type__': 'NonTerminal'}], 'order': 6, 'alias': 'expr_funccall', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 274: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADDRESSOF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}], 'order': 7, 'alias': 'addr_of_array_element', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 275: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ADDRESSOF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}], 'order': 8, 'alias': 'err_undefined_arr_access', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 276: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 9, 'alias': 'bexpr_func', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 277: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'USR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 10, 'alias': 'expr_usr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 278: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RND', 'filter_out': False, '__type__': 'Terminal'}], 'order': 11, 'alias': 'expr_rnd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 279: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 12, 'alias': 'expr_rnd', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 280: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PEEK', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 13, 'alias': 'expr_peek', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 281: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PEEK', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'numbertype', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 14, 'alias': 'expr_peektype_', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 282: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 15, 'alias': 'expr_in', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 283: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LBOUND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 16, 'alias': 'expr_lbound', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 284: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'UBOUND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 17, 'alias': 'expr_lbound', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 285: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LBOUND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 18, 'alias': 'expr_lbound_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 286: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'UBOUND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 19, 'alias': 'expr_lbound_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 287: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LEN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 20, 'alias': 'len', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 288: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SIZEOF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'type', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 21, 'alias': 'sizeof', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 289: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SIZEOF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 22, 'alias': 'sizeof', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 290: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SIZEOF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 23, 'alias': 'sizeof', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 291: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'VAL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 24, 'alias': 'val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 292: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CODE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 25, 'alias': 'code', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 293: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SGN', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 26, 'alias': 'sgn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 294: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'math_fn', '__type__': 'NonTerminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 27, 'alias': 'expr_trig', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 295: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 28, 'alias': 'expr_int', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 296: {'origin': {'name': 'bexpr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ABS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 29, 'alias': 'abs', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 297: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'func_call', '__type__': 'NonTerminal'}, {'name': 'substr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'string_func_call', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 298: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'func_call', '__type__': 'NonTerminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'string_func_call_single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 299: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STRC', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'string_str', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 300: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'string', '__type__': 'NonTerminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'string_lprp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 301: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'string', '__type__': 'NonTerminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'string_lp_expr_rp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 302: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'substr', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'expr_id_substr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 303: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'string', '__type__': 'NonTerminal'}, {'name': 'substr', '__type__': 'NonTerminal'}], 'order': 6, 'alias': 'string_substr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 304: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'substr', '__type__': 'NonTerminal'}], 'order': 7, 'alias': 'string_expr_lp', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 305: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 8, 'alias': 'str', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 306: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INKEY', 'filter_out': False, '__type__': 'Terminal'}], 'order': 9, 'alias': 'inkey', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 307: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CHR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 10, 'alias': 'chr_one', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 308: {'origin': {'name': 'string', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CHR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}], 'order': 11, 'alias': 'chr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 309: {'origin': {'name': 'substr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'subind_str', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 310: {'origin': {'name': 'substr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'subind_strto', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 311: {'origin': {'name': 'substr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'subind_tostr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 312: {'origin': {'name': 'substr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'TO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'subind_to', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 313: {'origin': {'name': 'func_call', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'idcall_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 314: {'origin': {'name': 'func_call', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg_list', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'arr_access_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 315: {'origin': {'name': 'arg_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'arg_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 316: {'origin': {'name': 'arg_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'arg_list_arg', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 317: {'origin': {'name': 'arguments', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'argument', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'arguments', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 318: {'origin': {'name': 'arguments', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'arguments', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'argument', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'arguments_argument', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 319: {'origin': {'name': 'argument', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'argument', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 320: {'origin': {'name': 'argument', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'WEQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'named_argument', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 321: {'origin': {'name': 'argument', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ARRAY_ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'argument_array', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 322: {'origin': {'name': 'function_declaration', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'function_header', '__type__': 'NonTerminal'}, {'name': 'function_body', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'funcdecl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 323: {'origin': {'name': 'function_declaration', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DECLARE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'function_header_pre', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'funcdeclforward', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 324: {'origin': {'name': 'function_header', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'function_header_pre', '__type__': 'NonTerminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'function_header', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 325: {'origin': {'name': 'function_header', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'function_header_pre', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'function_header', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 326: {'origin': {'name': 'function_header_pre', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'function_def', '__type__': 'NonTerminal'}, {'name': 'param_decl', '__type__': 'NonTerminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'function_header_pre', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 327: {'origin': {'name': 'function_def', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FUNCTION', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'convention', '__type__': 'NonTerminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'function_def', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 328: {'origin': {'name': 'function_def', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SUB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'convention', '__type__': 'NonTerminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'function_def', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 329: {'origin': {'name': 'convention', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'convention', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 330: {'origin': {'name': 'convention', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STDCALL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'convention', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 331: {'origin': {'name': 'convention', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FASTCALL', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'convention2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 332: {'origin': {'name': 'param_decl', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'param_decl_none', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 333: {'origin': {'name': 'param_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'param_decl_none', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 334: {'origin': {'name': 'param_decl', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'param_decl_list', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'param_decl', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 335: {'origin': {'name': 'param_decl_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'param_definition', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'param_decl_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 336: {'origin': {'name': 'param_decl_list', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'param_decl_list', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'param_definition', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'param_decl_list2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 337: {'origin': {'name': 'param_definition', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BYREF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'param_def', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'param_byref_definition', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 338: {'origin': {'name': 'param_definition', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BYVAL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'param_def', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'param_byval_definition', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 339: {'origin': {'name': 'param_definition', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'param_def', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'param_definition', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 340: {'origin': {'name': 'param_def', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'singleid', '__type__': 'NonTerminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'param_def_array', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 341: {'origin': {'name': 'param_def', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'singleid', '__type__': 'NonTerminal'}, {'name': 'typedef', '__type__': 'NonTerminal'}, {'name': 'default_arg_value', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'param_def_type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 342: {'origin': {'name': 'default_arg_value', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'param_def_default_arg_value', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 343: {'origin': {'name': 'default_arg_value', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'param_def_default_arg_value', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 344: {'origin': {'name': 'function_body', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'END_FUNCTION', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'function_body', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 345: {'origin': {'name': 'function_body', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program_co', '__type__': 'NonTerminal'}, {'name': 'END_SUB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'function_body', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 346: {'origin': {'name': 'function_body', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'END_FUNCTION', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'function_body', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 347: {'origin': {'name': 'function_body', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'statements_co', '__type__': 'NonTerminal'}, {'name': 'END_SUB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'function_body', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 348: {'origin': {'name': 'function_body', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'END_FUNCTION', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'function_body', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 349: {'origin': {'name': 'function_body', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'co_statements_co', '__type__': 'NonTerminal'}, {'name': 'END_SUB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'function_body', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 350: {'origin': {'name': 'function_body', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END_FUNCTION', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'function_body', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 351: {'origin': {'name': 'function_body', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'END_SUB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 7, 'alias': 'function_body', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 352: {'origin': {'name': 'typedef', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'type_def_empty', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 353: {'origin': {'name': 'typedef', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'AS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'type', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'type_def', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 354: {'origin': {'name': 'typedef', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'AS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'type_def_id', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 355: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BYTE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 356: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'UBYTE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 357: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 358: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'UINTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 359: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LONG', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 360: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ULONG', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 361: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FIXED', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 362: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'FLOAT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 7, 'alias': 'type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 363: {'origin': {'name': 'type', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 8, 'alias': 'type', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 364: {'origin': {'name': 'preproc_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': '_INIT', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'preproc_line_init', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 365: {'origin': {'name': 'preproc_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': '_REQUIRE', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'preproc_line_require', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 366: {'origin': {'name': 'preproc_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': '_PRAGMA', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'preproc_line_pragma_option', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 367: {'origin': {'name': 'preproc_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': '_PRAGMA', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'preproc_line_pragma_option', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 368: {'origin': {'name': 'preproc_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': '_PRAGMA', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'preproc_line_pragma_option', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 369: {'origin': {'name': 'preproc_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': '_PRAGMA', 'filter_out': True, '__type__': 'Terminal'}, {'name': '_PUSH', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'preproc_pragma_push', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 370: {'origin': {'name': 'preproc_line', '__type__': 'NonTerminal'}, 'expansion': [{'name': '_PRAGMA', 'filter_out': True, '__type__': 'Terminal'}, {'name': '_POP', 'filter_out': True, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'preproc_pragma_pop', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 371: {'origin': {'name': 'math_fn', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SIN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'math_fn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 372: {'origin': {'name': 'math_fn', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'COS', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'math_fn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 373: {'origin': {'name': 'math_fn', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'TAN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'math_fn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 374: {'origin': {'name': 'math_fn', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ASN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'math_fn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 375: {'origin': {'name': 'math_fn', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ACS', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'math_fn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 376: {'origin': {'name': 'math_fn', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ATN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'math_fn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 377: {'origin': {'name': 'math_fn', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'math_fn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 378: {'origin': {'name': 'math_fn', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'EXP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 7, 'alias': 'math_fn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 379: {'origin': {'name': 'math_fn', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SQR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 8, 'alias': 'math_fn', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 380: {'origin': {'name': 'expr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_or', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 381: {'origin': {'name': 'expr_or', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_or', '__type__': 'NonTerminal'}, {'name': 'OR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_and', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_or_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 382: {'origin': {'name': 'expr_or', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_and', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 383: {'origin': {'name': 'expr_and', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_and', '__type__': 'NonTerminal'}, {'name': 'AND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_xor', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_and_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 384: {'origin': {'name': 'expr_and', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_xor', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 385: {'origin': {'name': 'expr_xor', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_xor', '__type__': 'NonTerminal'}, {'name': 'XOR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_not', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_xor_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 386: {'origin': {'name': 'expr_xor', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_not', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 387: {'origin': {'name': 'expr_not', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NOT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_not', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'not_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 388: {'origin': {'name': 'expr_not', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 389: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_bor', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_eq_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 390: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'NE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_bor', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_ne_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 391: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'LT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_bor', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_lt_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 392: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'LE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_bor', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'expr_le_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 393: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'GT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_bor', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'expr_gt_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 394: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'GE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_bor', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'expr_ge_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 395: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bor', '__type__': 'NonTerminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 396: {'origin': {'name': 'expr_bor', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bor', '__type__': 'NonTerminal'}, {'name': 'BOR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_bxor', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_bor_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 397: {'origin': {'name': 'expr_bor', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bxor', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 398: {'origin': {'name': 'expr_bxor', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bxor', '__type__': 'NonTerminal'}, {'name': 'BAND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_band_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 399: {'origin': {'name': 'expr_bxor', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bxor', '__type__': 'NonTerminal'}, {'name': 'BXOR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_bxor_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 400: {'origin': {'name': 'expr_bxor', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bxor', '__type__': 'NonTerminal'}, {'name': 'SHL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'expr_shl_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 401: {'origin': {'name': 'expr_bxor', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_bxor', '__type__': 'NonTerminal'}, {'name': 'SHR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'expr_shr_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 402: {'origin': {'name': 'expr_bxor', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 403: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add', '__type__': 'NonTerminal'}, {'name': 'PLUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_mod', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_plus_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 404: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_add', '__type__': 'NonTerminal'}, {'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_mod', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_minus_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 405: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'BNOT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_add', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'bnot_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 406: {'origin': {'name': 'expr_add', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mod', '__type__': 'NonTerminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 407: {'origin': {'name': 'expr_mod', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mod', '__type__': 'NonTerminal'}, {'name': 'MOD', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_mul', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_mod_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 408: {'origin': {'name': 'expr_mod', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 409: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul', '__type__': 'NonTerminal'}, {'name': 'MUL', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_mul_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 410: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_mul', '__type__': 'NonTerminal'}, {'name': 'DIV', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'expr_div_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 411: {'origin': {'name': 'expr_mul', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 412: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'MINUS', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_unary', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'minus_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 413: {'origin': {'name': 'expr_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_pow', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 414: {'origin': {'name': 'expr_pow', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_pow', '__type__': 'NonTerminal'}, {'name': 'POW', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_pow', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_pow_expr', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 415: {'origin': {'name': 'expr_pow', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cast', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 416: {'origin': {'name': 'expr_cast', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CAST', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'numbertype', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'cast', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 417: {'origin': {'name': 'expr_cast', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'bexpr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}} +) +Shift = 0 +Reduce = 1 +def Lark_StandAlone(**kwargs): + return Lark._load_from_dict(DATA, MEMO, **kwargs) diff --git a/src/zxbpp/base_pplex.py b/src/zxbpp/base_pplex.py index 40f2ab5f4..cf5c79959 100644 --- a/src/zxbpp/base_pplex.py +++ b/src/zxbpp/base_pplex.py @@ -11,8 +11,7 @@ from dataclasses import dataclass from enum import StrEnum, unique -from src.api import utils -from src.ply import lex +from src.api import lex, utils from src.zxbpp.prepro import output from src.zxbpp.prepro.builtinmacro import BuiltinMacro from src.zxbpp.prepro.definestable import DefinesTable diff --git a/src/zxbpp/zxbasmpplex.py b/src/zxbpp/zxbasmpplex.py index 71e927820..2aceac0bd 100755 --- a/src/zxbpp/zxbasmpplex.py +++ b/src/zxbpp/zxbasmpplex.py @@ -9,7 +9,7 @@ import sys -from src.ply import lex +from src.api import lex from src.zxbpp.base_pplex import BaseLexer, ReservedDirectives from src.zxbpp.prepro.definestable import DefinesTable diff --git a/src/zxbpp/zxbpp.py b/src/zxbpp/zxbpp.py index 9339e4d8c..7d9010058 100755 --- a/src/zxbpp/zxbpp.py +++ b/src/zxbpp/zxbpp.py @@ -16,7 +16,6 @@ from typing import Any, Final, NamedTuple from src.api import config, global_, utils -from src.ply import yacc from src.zxbpp import zxbasmpplex, zxbpplex from src.zxbpp.base_pplex import STDIN from src.zxbpp.prepro import ID, Arg, ArgList, DefinesTable, MacroCall, output @@ -26,6 +25,8 @@ from src.zxbpp.prepro.output import error, warning from src.zxbpp.zxbpplex import tokens # noqa +from .zxbpp_standalone import Lark_StandAlone, Lexer, Token, Transformer, UnexpectedInput + @unique class PreprocMode(StrEnum): @@ -87,15 +88,6 @@ class IncludedFileInfo: # IFDEFS array IFDEFS: list[IfDef] = [] # Push (Line, state here) -precedence = ( - ("nonassoc", "DUMMY"), - ("left", "OR"), - ("left", "AND"), - ("left", "EQ", "NE", "LT", "LE", "GT", "GE"), - ("right", "LLP"), - ("left", "PASTE", "STRINGIZING"), -) - def remove_spaces(x: str) -> str: if not x: @@ -303,622 +295,471 @@ def to_int(expr: str | int) -> int: return expr -# -------- GRAMMAR RULES for the preprocessor --------- -def p_start(p): - """start : program""" - global OUTPUT +class PPToken(Token): + pass - OUTPUT += "".join(p[1]) +class LarkLexerAdapter(Lexer): + def __init__(self, lexer_conf: Any) -> None: + pass -def p_program(p): - """program : include_file - | line - | init - | undef - | ifdef - | require - | pragma - | errormsg - | warningmsg - """ - p[0] = p[1] + def lex(self, data: Any, parser_state: Any = None) -> Any: # type: ignore[override] + lexer = data + while True: + if lexer.next_token is not None: + tok_type = "ENDFILE" if lexer.next_token == "_ENDFILE_" else lexer.next_token + lexer.next_token = None + t = PPToken(tok_type, "", line=lexer.lineno, column=1) + t.fname = lexer.current_file + yield t + continue + tok = lexer.token() + if tok is None: + break -def p_program_tokenstring(p): - """program : defs NEWLINE""" - tmp = expand_macros(p[1], p.lineno(2)) - if tmp is None: - p[0] = [] - return + tok_type = "ENDFILE" if tok.type == "_ENDFILE_" else tok.type + t = PPToken( + tok_type, tok.value, line=tok.lineno, column=lexer.find_column(tok) if tok.type != "_ENDFILE_" else 1 + ) + t.fname = tok.fname + yield t - p[0] = [tmp] +class ZxbppTransformer(Transformer): + def start(self, items): + global OUTPUT + OUTPUT += "".join(items[0]) + return items[0] -def p_program_tokenstring_2(p): - """program : define NEWLINE""" - p[0] = p[1] + [p[2]] + def program(self, items): + return items[0] + def program_tokenstring(self, items): + tmp = expand_macros(items[0], items[1].line) + if tmp is None: + return [] + return [tmp] -def p_program_char(p): - """program : program include_file - | program line - | program init - | program undef - | program ifdef - | program require - | program pragma - | program errormsg - | program warningmsg - """ - p[0] = p[1] + p[2] + def program_tokenstring_2(self, items): + return items[0] + [items[1]] + def program_char(self, items): + return items[0] + items[1] -def p_program_newline(p): - """program : program defs NEWLINE""" - tmp = expand_macros(p[2], p.lineno(3)) - if tmp is None: - p[0] = [] - return + def program_newline(self, items): + tmp = expand_macros(items[1], items[2].line) + if tmp is None: + return [] + res = list(items[0]) + res.append(tmp) + return res - p[0] = p[1] - p[0].append(tmp) + def program_newline_2(self, items): + return items[0] + [f'#line {items[2].line + 1} "{items[2].fname}"\n'] + def token(self, items): + return items[0] -def p_program_newline_2(p): - """program : program define NEWLINE""" - p[0] = p[1] + [f'#line {p.lineno(3) + 1} "{output.CURRENT_FILE[-1]}"\n'] + def include_file(self, items): + p0 = [items[0] + items[1]] + items[2] + [items[3]] + output.CURRENT_FILE.pop() + global CURRENT_DIR + CURRENT_DIR = os.path.dirname(output.CURRENT_FILE[-1]) + return p0 + def include_file_empty(self, items): + return [items[1]] -def p_token(p): - """token : STRING - | TOKEN - | CONTINUE - | SEPARATOR - | NUMBER - """ - p[0] = p[1] + def include_once_empty(self, items): + return [items[1]] + def include_once_ok(self, items): + p0 = [items[0] + items[1]] + items[2] + [items[3]] + output.CURRENT_FILE.pop() + global CURRENT_DIR + CURRENT_DIR = os.path.dirname(output.CURRENT_FILE[-1]) + return p0 + + def include_fname(self, items): + modifier = items[1] + if modifier is None: + return [] + filename = items[2] + if ENABLED: + arch = modifier.get("arch", "") + return include_file(filename, items[2].line, local_first=False, arch=arch) + LEXER.next_token = "_ENDFILE_" + return [] + + def include_macro(self, items): + modifier = items[1] + if modifier is None: + return [] + expr = items[2] + global_first = RE_GLOBAL_FIRST_FILENAME.match(expr) + local_first = RE_LOCAL_FIRST_FILENAME.match(expr) + if global_first is None and local_first is None: + error(items[0].line, f"invalid filename {expr}") + return [] + if ENABLED: + arch = modifier.get("arch", "") + return include_file(expr[1:-1], items[0].line, local_first=local_first is not None, arch=arch) + LEXER.next_token = "_ENDFILE_" + return [] + + def include_once_str(self, items): + modifier = items[2] + if modifier is None: + return [] + string = items[3] + p0 = [] + if ENABLED: + arch = modifier.get("arch", "") + p0 = include_once(string[1:-1], items[3].line, local_first=True, arch=arch) + if not p0: + LEXER.next_token = "_ENDFILE_" + return p0 + + def include_once_fname(self, items): + modifier = items[2] + if modifier is None: + return [] + filename = items[3] + p0 = [] + if ENABLED: + arch = modifier.get("arch", "") + p0 = include_once(filename, items[3].line, local_first=False, arch=arch) + if not p0: + LEXER.next_token = "_ENDFILE_" + return p0 + + def include_modifier_empty(self, items): + return {} + + def include_modifier_arch(self, items): + modifier = items[1] + value = items[3] + if modifier == "arch": + return {"arch": value} + error(items[0].line, f"unknown modifier {modifier}") + return None -def p_include_file(p): - """include_file : include NEWLINE program _ENDFILE_""" - global CURRENT_DIR - p[0] = [p[1] + p[2]] + p[3] + [p[4]] - output.CURRENT_FILE.pop() # Remove top of the stack - CURRENT_DIR = os.path.dirname(output.CURRENT_FILE[-1]) - + def line(self, items): + if ENABLED: + return ["#%s %s%s" % (items[0], items[1], items[2])] + return [] + + def line_file(self, items): + if ENABLED: + return ['#%s %s "%s"%s' % (items[0], items[1], items[2], items[3])] + return [] + + def require(self, items): + return ["#%s %s\n" % (items[0], utils.sanitize_filename(items[1]))] + + def init_id(self, items): + return ['#%s "%s"\n' % (items[0], items[1])] + + def init_str(self, items): + return ["#%s %s\n" % (items[0], items[1])] + + def undef(self, items): + if ENABLED: + ID_TABLE.undef(items[1]) + return [] + + def errormsg(self, items): + if ENABLED: + error(items[0].line, items[1]) + return [] + + def warningmsg(self, items): + if ENABLED: + warning(items[0].line, items[1]) + return [] + + def define(self, items): + id_ = items[1] + params = items[2] + defs = items[3] + if ENABLED: + if defs: + if isinstance(defs[0], str) and defs[0] in " \t": + defs[0] = defs[0].lstrip(" \t") + else: + output.warning_missing_whitespace_after_macro(items[0].line, LEXER.current_file) + ID_TABLE.define( + id_, + args=params, + value=defs, + lineno=items[1].line, + fname=items[1].fname, + ) + return [] -def p_include_file_empty(p): - """include_file : include NEWLINE _ENDFILE_""" # This happens when an IFDEF is FALSE - p[0] = [p[2]] + def params_epsilon(self, items): + return None + def params_empty(self, items): + return [ID("", value="", args=None, lineno=items[0].line, fname=items[0].fname)] -def p_include_once_empty(p): - """include_file : include_once NEWLINE _ENDFILE_""" - p[0] = [p[2]] # Include once already included. Nothing done. + def params_paramlist(self, items): + params = items[1] + if params is None: + return None + for i in params: + if not isinstance(i, ID): + error(items[2].line, '"%s" might not appear in a macro parameter list' % str(i)) + return None + names = [x.name for x in params] + for i in range(len(names)): + if names[i] in names[i + 1 :]: + error(items[2].line, 'Duplicated name parameter "%s"' % (names[i])) + return None + return params + + def paramlist_single(self, items): + return [ID(items[0], value="", args=None, lineno=items[0].line, fname=items[0].fname)] + + def paramlist_paramlist(self, items): + return items[0] + [ID(items[2], value="", args=None, lineno=items[2].line, fname=items[2].fname)] + + def pragma_id(self, items): + return ["#%s %s" % (items[0], items[1])] + + def pragma_id_expr(self, items): + return ["#%s %s %s %s" % (items[0], items[1], items[2], items[3])] + + def pragma_id_string(self, items): + return ["#%s %s %s %s" % (items[0], items[1], items[2], items[3][1:-1])] + + def pragma_push(self, items): + return ["#%s %s%s%s%s" % (items[0], items[1], items[2], items[3], items[4])] + + def pragma_once(self, items): + abs_filename = utils.get_absolute_filename_path(output.CURRENT_FILE[-1]) + if abs_filename not in INCLUDED: + INCLUDED[abs_filename] = IncludedFileInfo(once=False, parents=[]) + INCLUDED[abs_filename].once = True + return [] + + def ifdef(self, items): + global ENABLED + p0 = [] + if ENABLED: + p0 = [items[1]] + items[2] + p0 += ['#line %i "%s"' % (items[3].line + 1, items[3].fname)] + ENABLED = IFDEFS.pop().enabled + return p0 + + def ifdef_else(self, items): + global ENABLED + ENABLED = IFDEFS.pop().enabled + p0 = [] + if ENABLED: + p0 = items[0] + items[1] + p0 += ['#line %i "%s"' % (items[2].line + 1, items[2].fname)] + return p0 + + def ifdefelsea(self, items): + global ENABLED + p0 = [] + if IFDEFS[-1].enabled: + if items[0]: + p0 = [items[1]] + items[2] + ENABLED = not items[0] + return p0 + + def ifdefelseb(self, items): + if ENABLED: + p0 = ['#line %i "%s"%s' % (items[0].line + 1, items[0].fname, items[1])] + p0 += items[2] + else: + p0 = [] + return p0 + def ifdef_header(self, items): + global ENABLED + IFDEFS.append(IfDef(ENABLED, items[1].line)) + if ENABLED: + ENABLED = ID_TABLE.defined(items[1]) + return ENABLED -def p_include_once_ok(p): - """include_file : include_once NEWLINE program _ENDFILE_""" - global CURRENT_DIR - p[0] = [p[1] + p[2]] + p[3] + [p[4]] - output.CURRENT_FILE.pop() # Remove top of the stack - CURRENT_DIR = os.path.dirname(output.CURRENT_FILE[-1]) + def ifndef_header(self, items): + global ENABLED + IFDEFS.append(IfDef(ENABLED, items[1].line)) + if ENABLED: + ENABLED = not ID_TABLE.defined(items[1]) + return ENABLED + def if_expr_header(self, items): + global ENABLED + IFDEFS.append(IfDef(ENABLED, items[1].line if hasattr(items[1], "line") else items[0].line)) + if ENABLED: + val = items[1] + ENABLED = bool(int(val)) if (isinstance(val, str) and val.isdigit()) else ID_TABLE.defined(val) + return ENABLED -def p_include_fname(p): - """include : INCLUDE include_modifier FILENAME""" - modifier = p[2] - if modifier is None: - p[0] = [] - return + def expr_macrocall(self, items): + return str(items[0]()).strip() - filename = p[3] - if ENABLED: - arch = modifier.get("arch", "") - p[0] = include_file(filename, p.lineno(3), local_first=False, arch=arch) - else: - p[0] = [] - p.lexer.next_token = "_ENDFILE_" - - -def p_include_macro(p): - """include : INCLUDE include_modifier expr""" - modifier = p[2] - if modifier is None: - p[0] = [] - return - - expr = p[3] - global_fist = RE_GLOBAL_FIRST_FILENAME.match(expr) - local_first = RE_LOCAL_FIRST_FILENAME.match(expr) - if global_fist is None and local_first is None: - error(p.lineno(1), f"invalid filename {expr}") - p[0] = [] - return - - if ENABLED: - arch = modifier.get("arch", "") - p[0] = include_file(expr[1:-1], p.lineno(3), local_first=local_first is not None, arch=arch) - else: - p[0] = [] - p.lexer.next_token = "_ENDFILE_" + def expr_val(self, items): + return items[0] + def expr_str(self, items): + return items[0] -def p_include_once(p): - """include_once : INCLUDE ONCE include_modifier STRING""" - modifier = p[3] - if modifier is None: - p[0] = [] - return + def expr_par(self, items): + return items[1] - string = p[4] - if ENABLED: - arch = modifier.get("arch", "") - p[0] = include_once(string[1:-1], p.lineno(4), local_first=True, arch=arch) - else: - p[0] = [] + def expreq(self, items): + return "1" if items[0] == items[2] else "0" - if not p[0]: - p.lexer.next_token = "_ENDFILE_" + def exprne(self, items): + return "1" if items[0] != items[2] else "0" + def exprlt(self, items): + return "1" if to_int(items[0]) < to_int(items[2]) else "0" -def p_include_once_fname(p): - """include_once : INCLUDE ONCE include_modifier FILENAME""" - p[0] = [] - modifier = p[3] - if modifier is None: - return + def exprle(self, items): + return "1" if to_int(items[0]) <= to_int(items[2]) else "0" - filename = p[4] - if ENABLED: - arch = modifier.get("arch", "") - p[0] = include_once(filename, p.lineno(4), local_first=False, arch=arch) - else: - p[0] = [] + def exprgt(self, items): + return "1" if to_int(items[0]) > to_int(items[2]) else "0" - if not p[0]: - p.lexer.next_token = "_ENDFILE_" + def exprge(self, items): + return "1" if to_int(items[0]) >= to_int(items[2]) else "0" + def exprand(self, items): + return "1" if to_bool(items[0]) and to_bool(items[2]) else "0" -def p_include_modifier(p): - """include_modifier : - | LB ID CO ID RB - """ - if len(p) == 1: - p[0] = {} - return + def expror(self, items): + return "1" if to_bool(items[0]) or to_bool(items[2]) else "0" - modifier = p[2] - value = p[4] + def defs_list_eps(self, items): + return [] - if modifier == "arch": - p[0] = {"arch": value} - else: - p[0] = None - error(p.lineno(1), f"unknown modifier {modifier}") + def defs_list(self, items): + return items[0] + [items[1]] - return + def def_item_val(self, items): + return items[0] + def def_macrocall(self, items): + return items[0] -def p_line(p): - """line : LINE INTEGER NEWLINE""" - if ENABLED: - p[0] = ["#%s %s%s" % (p[1], p[2], p[3])] - else: - p[0] = [] + def macrocall_id(self, items): + return MacroCall(items[0].fname, items[0].line, ID_TABLE, items[0], None) + def macrocall_args(self, items): + return MacroCall(items[0].fname, items[1].end_lineno, ID_TABLE, items[0], items[1]) -def p_line_file(p): - """line : LINE INTEGER STRING NEWLINE""" - if ENABLED: - p[0] = ['#%s %s "%s"%s' % (p[1], p[2], p[3], p[4])] - else: - p[0] = [] + def macrocall_paste(self, items): + return Concatenation(items[0].fname, items[0].lineno, ID_TABLE, items[0], items[2]) + def macrocall_stringizing(self, items): + return Stringizing(items[1].fname, items[1].lineno, ID_TABLE, items[1]) -def p_require_file(p): - """require : REQUIRE STRING NEWLINE""" - p[0] = ["#%s %s\n" % (p[1], utils.sanitize_filename(p[2]))] + def args(self, items): + arglist = items[1] + arglist.start_lineno = items[0].line + arglist.end_lineno = items[2].line + return arglist + def arglist_single(self, items): + al = ArgList(ID_TABLE) + al.addNewArg(items[0]) + return al -def p_init(p): - """init : INIT ID NEWLINE""" - p[0] = ['#%s "%s"\n' % (p[1], p[2])] + def arglist(self, items): + items[0].addNewArg(items[2]) + return items[0] + def arg_eps(self, items): + return Arg() -def p_init_str(p): - """init : INIT STRING NEWLINE""" - p[0] = ["#%s %s\n" % (p[1], p[2])] + def arg_val(self, items): + return items[0] + def argstring_token_single(self, items): + return Arg(items[0]) -def p_undef(p): - """undef : UNDEF ID""" - if ENABLED: - ID_TABLE.undef(p[2]) + def argstring_macrocall_single(self, items): + return Arg(items[0]) - p[0] = [] + def argstring_argslist(self, items): + return Arg(items[1]) + def argstring_token(self, items): + items[0].addToken(items[1]) + return items[0] -def p_errormsg(p): - """errormsg : ERROR TEXT""" - if ENABLED: - error(p.lineno(1), p[2]) - p[0] = [] + def argstring_macrocall(self, items): + items[0].addToken(items[1]) + return items[0] + def argstring_argstring(self, items): + items[0].addToken(items[2]) + return items[0] -def p_warningmsg(p): - """warningmsg : WARNING TEXT""" - if ENABLED: - warning(p.lineno(1), p[2]) - p[0] = [] +lark_parser = Lark_StandAlone(lexer=LarkLexerAdapter, transformer=ZxbppTransformer()) -def p_define(p): - """define : DEFINE ID params defs""" - id_ = p[2] - params = p[3] - defs = p[4] - if ENABLED: - if defs: - if isinstance(defs[0], str) and defs[0] in " \t": # remove leading whitespaces - defs[0] = defs[0].lstrip(" \t") +def parse_with_lark(): + try: + lark_parser.parse(LEXER) + except UnexpectedInput as e: + from .zxbpp_standalone import UnexpectedToken + + if isinstance(e, UnexpectedToken): + tok = e.token + if tok.type == "$END": + if global_.has_errors == 0: + error( + tok.line, + "Syntax error. Unexpected end of file", + output.CURRENT_FILE[-1], + ) + global_.has_errors += 1 + return + + if tok.type == "ENDFILE": + error( + tok.line, + "Syntax error. Unexpected end of file", + output.CURRENT_FILE[-1], + ) + elif tok.type == "NEWLINE": + error( + tok.line, + "Syntax error. Unexpected end of line", + output.CURRENT_FILE[-1], + ) else: - output.warning_missing_whitespace_after_macro(p.lineno(1), p.lexer.current_file) - - ID_TABLE.define( - id_, - args=params, - value=defs, - lineno=p.lineno(2), - fname=output.CURRENT_FILE[-1], - ) - p[0] = [] - - -def p_define_params_epsilon(p): - """params :""" - p[0] = None - - -def p_define_params_empty(p): - """params : LP RP""" - # Defines the 'epsilon' parameter - p[0] = [ID("", value="", args=None, lineno=p.lineno(1), fname=output.CURRENT_FILE[-1])] - - -def p_define_params_paramlist(p): - """params : LP paramlist RP""" - for i in p[2]: - if not isinstance(i, ID): - error(p.lineno(3), '"%s" might not appear in a macro parameter list' % str(i)) - p[0] = None - return - - names = [x.name for x in p[2]] - for i in range(len(names)): - if names[i] in names[i + 1 :]: - error(p.lineno(3), 'Duplicated name parameter "%s"' % (names[i])) - p[0] = None - return - - p[0] = p[2] - - -def p_paramlist_single(p): - """paramlist : ID""" - p[0] = [ID(p[1], value="", args=None, lineno=p.lineno(1), fname=output.CURRENT_FILE[-1])] - - -def p_paramlist_paramlist(p): - """paramlist : paramlist COMMA ID""" - p[0] = p[1] + [ID(p[3], value="", args=None, lineno=p.lineno(1), fname=output.CURRENT_FILE[-1])] - - -def p_pragma_id(p): - """pragma : PRAGMA ID""" - p[0] = ["#%s %s" % (p[1], p[2])] - - -def p_pragma_id_expr(p): - """pragma : PRAGMA ID EQ ID - | PRAGMA ID EQ INTEGER - """ - p[0] = ["#%s %s %s %s" % (p[1], p[2], p[3], p[4])] - - -def p_pragma_id_string(p): - """pragma : PRAGMA ID EQ STRING""" - p[0] = ["#%s %s %s %s" % (p[1], p[2], p[3], p[4][1:-1])] - - -def p_pragma_push(p): - """pragma : PRAGMA PUSH LP ID RP - | PRAGMA POP LP ID RP - """ - p[0] = ["#%s %s%s%s%s" % (p[1], p[2], p[3], p[4], p[5])] - - -def p_pragma_once(p): - """pragma : PRAGMA ONCE""" - abs_filename = utils.get_absolute_filename_path(output.CURRENT_FILE[-1]) - if abs_filename not in INCLUDED: - INCLUDED[abs_filename] = IncludedFileInfo(once=False, parents=[]) - - INCLUDED[abs_filename].once = True - p[0] = [] - - -def p_ifdef(p): - """ifdef : if_header NEWLINE program ENDIF""" - global ENABLED - - if ENABLED: - p[0] = [p[2]] + p[3] - else: - p[0] = [] - - p[0] += ['#line %i "%s"' % (p.lineno(4) + 1, output.CURRENT_FILE[-1])] - ENABLED = IFDEFS.pop().enabled - - -def p_ifdef_else(p): - """ifdef : ifdefelsea ifdefelseb ENDIF""" - global ENABLED - - ENABLED = IFDEFS.pop().enabled - if ENABLED: - p[0] = p[1] + p[2] - else: - p[0] = [] - - p[0] += ['#line %i "%s"' % (p.lineno(3) + 1, output.CURRENT_FILE[-1])] - - -def p_ifdef_else_a(p): - """ifdefelsea : if_header NEWLINE program""" - global ENABLED - - p[0] = [] - if IFDEFS[-1].enabled: - if p[1]: - p[0] = [p[2]] + p[3] - ENABLED = not p[1] - - -def p_ifdef_else_b(p): - """ifdefelseb : ELSE NEWLINE program""" - global ENABLED - - if ENABLED: - p[0] = ['#line %i "%s"%s' % (p.lineno(1) + 1, output.CURRENT_FILE[-1], p[2])] - p[0] += p[3] - else: - p[0] = [] - - -def p_if_header(p): - """if_header : IFDEF ID""" - global ENABLED - - IFDEFS.append(IfDef(ENABLED, p.lineno(2))) - if ENABLED: - ENABLED = ID_TABLE.defined(p[2]) - - p[0] = ENABLED - - -def p_ifn_header(p): - """if_header : IFNDEF ID""" - global ENABLED - - IFDEFS.append(IfDef(ENABLED, p.lineno(2))) - if ENABLED: - ENABLED = not ID_TABLE.defined(p[2]) - - p[0] = ENABLED - - -def p_if_expr_header(p): - """if_header : IF expr""" - global ENABLED - - IFDEFS.append(IfDef(ENABLED, p.lineno(2))) - if ENABLED: - ENABLED = bool(int(p[2])) if p[2].isdigit() else ID_TABLE.defined(p[2]) - - p[0] = ENABLED - - -def p_expr(p): - """expr : macrocall""" - p[0] = str(p[1]()).strip() - - -def p_expr_val(p): - """expr : NUMBER""" - p[0] = p[1] - - -def p_expr_str(p): - """expr : STRING""" - p[0] = p[1] - - -def p_exprand(p): - """expr : expr AND expr""" - p[0] = "1" if to_bool(p[1]) and to_bool(p[3]) else "0" - - -def p_expror(p): - """expr : expr OR expr""" - p[0] = "1" if to_bool(p[1]) or to_bool(p[3]) else "0" - - -def p_exprne(p): - """expr : expr NE expr""" - p[0] = "1" if p[1] != p[3] else "0" - - -def p_expreq(p): - """expr : expr EQ expr""" - p[0] = "1" if p[1] == p[3] else "0" - - -def p_exprlt(p): - """expr : expr LT expr""" - p[0] = "1" if to_int(p[1]) < to_int(p[3]) else "0" - - -def p_exprle(p): - """expr : expr LE expr""" - p[0] = "1" if to_int(p[1]) <= to_int(p[3]) else "0" - - -def p_exprgt(p): - """expr : expr GT expr""" - p[0] = "1" if to_int(p[1]) > to_int(p[3]) else "0" - - -def p_exprge(p): - """expr : expr GE expr""" - p[0] = "1" if to_int(p[1]) >= to_int(p[3]) else "0" - - -def p_expr_par(p): - """expr : LLP expr RRP""" - p[0] = p[2] - - -def p_defs_list_eps(p): - """defs :""" - p[0] = [] - - -def p_defs_list(p): - """defs : defs def""" - p[0] = p[1] - p[0].append(p[2]) - - -def p_def(p): - """def : token - | COMMA - | RRP - | LLP - """ - p[0] = p[1] - - -def p_def_macrocall(p): - """def : macrocall %prec DUMMY""" - p[0] = p[1] - - -def p_macrocall(p): - """macrocall : ID""" - p[0] = MacroCall(p.lexer.current_file, p.lineno(1), ID_TABLE, p[1], None) - - -def p_macrocall_args(p): - """macrocall : macrocall args""" - p[0] = MacroCall(p.lexer.current_file, p[2].end_lineno, ID_TABLE, p[1], p[2]) - - -def p_macrocall_paste(p): - """macrocall : macrocall PASTE macrocall""" - p[0] = Concatenation(p.lexer.current_file, p[1].lineno, ID_TABLE, p[1], p[3]) - - -def p_macrocall_stringizing(p): - """macrocall : STRINGIZING macrocall""" - p[0] = Stringizing(p.lexer.current_file, p[2].lineno, ID_TABLE, p[2]) - - -def p_args(p): - """args : LLP arglist RRP""" - p[0] = p[2] - p[0].start_lineno = p.slice[1].lineno - p[0].end_lineno = p.slice[3].lineno - - -def p_arglist(p): - """arglist : arglist COMMA arg""" - p[1].addNewArg(p[3]) - p[0] = p[1] - - -def p_arglist_arg(p): - """arglist : arg""" - p[0] = ArgList(ID_TABLE) - p[0].addNewArg(p[1]) - - -def p_arg_eps(p): - """arg :""" - p[0] = Arg() - - -def p_arg_argstring(p): - """arg : argstring""" - p[0] = p[1] - - -def p_argstring(p): - """argstring : token - | macrocall %prec DUMMY - """ - p[0] = Arg(p[1]) - - -def p_argstring_argslist(p): - """argstring : LLP arglist RRP""" - p[0] = Arg(p[2]) - - -def p_argstring_token(p): - """argstring : argstring token - | argstring macrocall %prec DUMMY - """ - p[0] = p[1] - p[0].addToken(p[2]) - - -def p_argstring_argstring(p): - """argstring : argstring LLP arglist RRP""" - p[0] = p[1] - p[0].addToken(p[3]) - - -# --- YYERROR - - -def p_error(p): - if p is not None: - if p.type == "NEWLINE": - error( - p.lineno, - "Syntax error. Unexpected end of line", - output.CURRENT_FILE[-1], - ) - elif p.type == "_ENDFILE_": - error( - p.lineno, - "Syntax error. Unexpected end of file", - output.CURRENT_FILE[-1], - ) + value = tok.value + value = "".join(["|%s|" % hex(ord(x)) if x < " " else x for x in value]) + error( + tok.line, + "Syntax error. Unexpected token '%s' [%s]" % (value, tok.type), + output.CURRENT_FILE[-1], + ) + + # Skip remaining tokens on the same line if error wasn't on newline/endfile + if tok.type not in ("NEWLINE", "ENDFILE"): + while True: + t = LEXER.token() + if t is None or t.type in ("NEWLINE", "_ENDFILE_"): + break else: - value = p.value - value = "".join(["|%s|" % hex(ord(x)) if x < " " else x for x in value]) error( - p.lineno, - "Syntax error. Unexpected token '%s' [%s]" % (value, p.type), + e.line, + "Syntax error. Unexpected input", output.CURRENT_FILE[-1], ) - else: - config.OPTIONS.stderr.write("General syntax error at preprocessor (unexpected End of File?)") - global_.has_errors += 1 + global_.has_errors += 1 + parse_with_lark() def filter_(input_, filename="", state="INITIAL"): @@ -932,7 +773,7 @@ def filter_(input_, filename="", state="INITIAL"): CURRENT_DIR = os.path.dirname(output.CURRENT_FILE[-1]) LEXER.input(input_, filename) LEXER.lex.begin(state) - parser.parse(lexer=LEXER, debug=config.OPTIONS.debug_zxbpp) + parse_with_lark() output.CURRENT_FILE.pop() CURRENT_DIR = prev_dir @@ -960,7 +801,7 @@ def main(argv): if OUTPUT and OUTPUT[-1] != "\n": OUTPUT += "\n" - parser.parse(lexer=LEXER, debug=config.OPTIONS.debug_zxbpp) + parse_with_lark() output.CURRENT_FILE.pop() CURRENT_DIR = os.path.dirname(output.CURRENT_FILE[-1]) @@ -970,13 +811,13 @@ def main(argv): if OUTPUT and OUTPUT[-1] != "\n": OUTPUT += "\n" - parser.parse(lexer=LEXER, debug=config.OPTIONS.debug_zxbpp) + parse_with_lark() output.CURRENT_FILE.pop() global_.FILENAME = prev_file return global_.has_errors -parser = utils.get_or_create("zxbpp", lambda: yacc.yacc(debug=True)) +parser = lark_parser parser.defaulted_states = {} diff --git a/src/zxbpp/zxbpp_standalone.py b/src/zxbpp/zxbpp_standalone.py new file mode 100644 index 000000000..3ccdb4966 --- /dev/null +++ b/src/zxbpp/zxbpp_standalone.py @@ -0,0 +1,3574 @@ +# The file was automatically generated by Lark v1.3.1 +__version__ = "1.3.1" + +# +# +# Lark Stand-alone Generator Tool +# ---------------------------------- +# Generates a stand-alone LALR(1) parser +# +# Git: https://github.com/erezsh/lark +# Author: Erez Shinan (erezshin@gmail.com) +# +# +# >>> LICENSE +# +# This tool and its generated code use a separate license from Lark, +# and are subject to the terms of the Mozilla Public License, v. 2.0. +# If a copy of the MPL was not distributed with this +# file, You can obtain one at https://mozilla.org/MPL/2.0/. +# +# If you wish to purchase a commercial license for this tool and its +# generated code, you may contact me via email or otherwise. +# +# If MPL2 is incompatible with your free or open-source project, +# contact me and we'll work it out. +# +# + +from copy import deepcopy +from abc import ABC, abstractmethod +from types import ModuleType +from typing import ( + TypeVar, Generic, Type, Tuple, List, Dict, Iterator, Collection, Callable, Optional, FrozenSet, Any, + Union, Iterable, IO, TYPE_CHECKING, overload, Sequence, + Pattern as REPattern, ClassVar, Set, Mapping +) + + +class LarkError(Exception): + pass + + +class ConfigurationError(LarkError, ValueError): + pass + + +def assert_config(value, options: Collection, msg='Got %r, expected one of %s'): + if value not in options: + raise ConfigurationError(msg % (value, options)) + + +class GrammarError(LarkError): + pass + + +class ParseError(LarkError): + pass + + +class LexError(LarkError): + pass + +T = TypeVar('T') + +class UnexpectedInput(LarkError): + #-- + line: int + column: int + pos_in_stream = None + state: Any + _terminals_by_name = None + interactive_parser: 'InteractiveParser' + + def get_context(self, text: str, span: int=40) -> str: + #-- + pos = self.pos_in_stream or 0 + start = max(pos - span, 0) + end = pos + span + if not isinstance(text, bytes): + before = text[start:pos].rsplit('\n', 1)[-1] + after = text[pos:end].split('\n', 1)[0] + return before + after + '\n' + ' ' * len(before.expandtabs()) + '^\n' + else: + before = text[start:pos].rsplit(b'\n', 1)[-1] + after = text[pos:end].split(b'\n', 1)[0] + return (before + after + b'\n' + b' ' * len(before.expandtabs()) + b'^\n').decode("ascii", "backslashreplace") + + def match_examples(self, parse_fn: 'Callable[[str], Tree]', + examples: Union[Mapping[T, Iterable[str]], Iterable[Tuple[T, Iterable[str]]]], + token_type_match_fallback: bool=False, + use_accepts: bool=True + ) -> Optional[T]: + #-- + assert self.state is not None, "Not supported for this exception" + + if isinstance(examples, Mapping): + examples = examples.items() + + candidate = (None, False) + for i, (label, example) in enumerate(examples): + assert not isinstance(example, str), "Expecting a list" + + for j, malformed in enumerate(example): + try: + parse_fn(malformed) + except UnexpectedInput as ut: + if ut.state == self.state: + if ( + use_accepts + and isinstance(self, UnexpectedToken) + and isinstance(ut, UnexpectedToken) + and ut.accepts != self.accepts + ): + logger.debug("Different accepts with same state[%d]: %s != %s at example [%s][%s]" % + (self.state, self.accepts, ut.accepts, i, j)) + continue + if ( + isinstance(self, (UnexpectedToken, UnexpectedEOF)) + and isinstance(ut, (UnexpectedToken, UnexpectedEOF)) + ): + if ut.token == self.token: ## + + logger.debug("Exact Match at example [%s][%s]" % (i, j)) + return label + + if token_type_match_fallback: + ## + + if (ut.token.type == self.token.type) and not candidate[-1]: + logger.debug("Token Type Fallback at example [%s][%s]" % (i, j)) + candidate = label, True + + if candidate[0] is None: + logger.debug("Same State match at example [%s][%s]" % (i, j)) + candidate = label, False + + return candidate[0] + + def _format_expected(self, expected): + if self._terminals_by_name: + d = self._terminals_by_name + expected = [d[t_name].user_repr() if t_name in d else t_name for t_name in expected] + return "Expected one of: \n\t* %s\n" % '\n\t* '.join(expected) + + +class UnexpectedEOF(ParseError, UnexpectedInput): + #-- + expected: 'List[Token]' + + def __init__(self, expected, state=None, terminals_by_name=None): + super(UnexpectedEOF, self).__init__() + + self.expected = expected + self.state = state + from .lexer import Token + self.token = Token("", "") ## + + self.pos_in_stream = -1 + self.line = -1 + self.column = -1 + self._terminals_by_name = terminals_by_name + + + def __str__(self): + message = "Unexpected end-of-input. " + message += self._format_expected(self.expected) + return message + + +class UnexpectedCharacters(LexError, UnexpectedInput): + #-- + + allowed: Set[str] + considered_tokens: Set[Any] + + def __init__(self, seq, lex_pos, line, column, allowed=None, considered_tokens=None, state=None, token_history=None, + terminals_by_name=None, considered_rules=None): + super(UnexpectedCharacters, self).__init__() + + ## + + self.line = line + self.column = column + self.pos_in_stream = lex_pos + self.state = state + self._terminals_by_name = terminals_by_name + + self.allowed = allowed + self.considered_tokens = considered_tokens + self.considered_rules = considered_rules + self.token_history = token_history + + if isinstance(seq, bytes): + self.char = seq[lex_pos:lex_pos + 1].decode("ascii", "backslashreplace") + else: + self.char = seq[lex_pos] + self._context = self.get_context(seq) + + + def __str__(self): + message = "No terminal matches '%s' in the current parser context, at line %d col %d" % (self.char, self.line, self.column) + message += '\n\n' + self._context + if self.allowed: + message += self._format_expected(self.allowed) + if self.token_history: + message += '\nPrevious tokens: %s\n' % ', '.join(repr(t) for t in self.token_history) + return message + + +class UnexpectedToken(ParseError, UnexpectedInput): + #-- + + expected: Set[str] + considered_rules: Set[str] + + def __init__(self, token, expected, considered_rules=None, state=None, interactive_parser=None, terminals_by_name=None, token_history=None): + super(UnexpectedToken, self).__init__() + + ## + + self.line = getattr(token, 'line', '?') + self.column = getattr(token, 'column', '?') + self.pos_in_stream = getattr(token, 'start_pos', None) + self.state = state + + self.token = token + self.expected = expected ## + + self._accepts = NO_VALUE + self.considered_rules = considered_rules + self.interactive_parser = interactive_parser + self._terminals_by_name = terminals_by_name + self.token_history = token_history + + + @property + def accepts(self) -> Set[str]: + if self._accepts is NO_VALUE: + self._accepts = self.interactive_parser and self.interactive_parser.accepts() + return self._accepts + + def __str__(self): + message = ("Unexpected token %r at line %s, column %s.\n%s" + % (self.token, self.line, self.column, self._format_expected(self.accepts or self.expected))) + if self.token_history: + message += "Previous tokens: %r\n" % self.token_history + + return message + + + +class VisitError(LarkError): + #-- + + obj: 'Union[Tree, Token]' + orig_exc: Exception + + def __init__(self, rule, obj, orig_exc): + message = 'Error trying to process rule "%s":\n\n%s' % (rule, orig_exc) + super(VisitError, self).__init__(message) + + self.rule = rule + self.obj = obj + self.orig_exc = orig_exc + + +class MissingVariableError(LarkError): + pass + + +import sys, re +import logging +from dataclasses import dataclass +from typing import Generic, AnyStr + +logger: logging.Logger = logging.getLogger("lark") +logger.addHandler(logging.StreamHandler()) +## + +## + +logger.setLevel(logging.CRITICAL) + + +NO_VALUE = object() + +T = TypeVar("T") + + +def classify(seq: Iterable, key: Optional[Callable] = None, value: Optional[Callable] = None) -> Dict: + d: Dict[Any, Any] = {} + for item in seq: + k = key(item) if (key is not None) else item + v = value(item) if (value is not None) else item + try: + d[k].append(v) + except KeyError: + d[k] = [v] + return d + + +def _deserialize(data: Any, namespace: Dict[str, Any], memo: Dict) -> Any: + if isinstance(data, dict): + if '__type__' in data: ## + + class_ = namespace[data['__type__']] + return class_.deserialize(data, memo) + elif '@' in data: + return memo[data['@']] + return {key:_deserialize(value, namespace, memo) for key, value in data.items()} + elif isinstance(data, list): + return [_deserialize(value, namespace, memo) for value in data] + return data + + +_T = TypeVar("_T", bound="Serialize") + +class Serialize: + #-- + + def memo_serialize(self, types_to_memoize: List) -> Any: + memo = SerializeMemoizer(types_to_memoize) + return self.serialize(memo), memo.serialize() + + def serialize(self, memo = None) -> Dict[str, Any]: + if memo and memo.in_types(self): + return {'@': memo.memoized.get(self)} + + fields = getattr(self, '__serialize_fields__') + res = {f: _serialize(getattr(self, f), memo) for f in fields} + res['__type__'] = type(self).__name__ + if hasattr(self, '_serialize'): + self._serialize(res, memo) + return res + + @classmethod + def deserialize(cls: Type[_T], data: Dict[str, Any], memo: Dict[int, Any]) -> _T: + namespace = getattr(cls, '__serialize_namespace__', []) + namespace = {c.__name__:c for c in namespace} + + fields = getattr(cls, '__serialize_fields__') + + if '@' in data: + return memo[data['@']] + + inst = cls.__new__(cls) + for f in fields: + try: + setattr(inst, f, _deserialize(data[f], namespace, memo)) + except KeyError as e: + raise KeyError("Cannot find key for class", cls, e) + + if hasattr(inst, '_deserialize'): + inst._deserialize() + + return inst + + +class SerializeMemoizer(Serialize): + #-- + + __serialize_fields__ = 'memoized', + + def __init__(self, types_to_memoize: List) -> None: + self.types_to_memoize = tuple(types_to_memoize) + self.memoized = Enumerator() + + def in_types(self, value: Serialize) -> bool: + return isinstance(value, self.types_to_memoize) + + def serialize(self) -> Dict[int, Any]: ## + + return _serialize(self.memoized.reversed(), None) + + @classmethod + def deserialize(cls, data: Dict[int, Any], namespace: Dict[str, Any], memo: Dict[Any, Any]) -> Dict[int, Any]: ## + + return _deserialize(data, namespace, memo) + + +try: + import regex + _has_regex = True +except ImportError: + _has_regex = False + +if sys.version_info >= (3, 11): + import re._parser as sre_parse + import re._constants as sre_constants +else: + import sre_parse + import sre_constants + +categ_pattern = re.compile(r'\\p{[A-Za-z_]+}') + +def get_regexp_width(expr: str) -> Union[Tuple[int, int], List[int]]: + if _has_regex: + ## + + ## + + ## + + regexp_final = re.sub(categ_pattern, 'A', expr) + else: + if re.search(categ_pattern, expr): + raise ImportError('`regex` module must be installed in order to use Unicode categories.', expr) + regexp_final = expr + try: + ## + + return [int(x) for x in sre_parse.parse(regexp_final).getwidth()] + except sre_constants.error: + if not _has_regex: + raise ValueError(expr) + else: + ## + + ## + + c = regex.compile(regexp_final) + ## + + ## + + MAXWIDTH = getattr(sre_parse, "MAXWIDTH", sre_constants.MAXREPEAT) + if c.match('') is None: + ## + + return 1, int(MAXWIDTH) + else: + return 0, int(MAXWIDTH) + + +@dataclass(frozen=True) +class TextSlice(Generic[AnyStr]): + #-- + text: AnyStr + start: int + end: int + + def __post_init__(self): + if not isinstance(self.text, (str, bytes)): + raise TypeError("text must be str or bytes") + + if self.start < 0: + object.__setattr__(self, 'start', self.start + len(self.text)) + assert self.start >=0 + + if self.end is None: + object.__setattr__(self, 'end', len(self.text)) + elif self.end < 0: + object.__setattr__(self, 'end', self.end + len(self.text)) + assert self.end <= len(self.text) + + @classmethod + def cast_from(cls, text: 'TextOrSlice') -> 'TextSlice[AnyStr]': + if isinstance(text, TextSlice): + return text + + return cls(text, 0, len(text)) + + def is_complete_text(self): + return self.start == 0 and self.end == len(self.text) + + def __len__(self): + return self.end - self.start + + def count(self, substr: AnyStr): + return self.text.count(substr, self.start, self.end) + + def rindex(self, substr: AnyStr): + return self.text.rindex(substr, self.start, self.end) + + +TextOrSlice = Union[AnyStr, 'TextSlice[AnyStr]'] +LarkInput = Union[AnyStr, TextSlice[AnyStr], Any] + + + +class Meta: + + empty: bool + line: int + column: int + start_pos: int + end_line: int + end_column: int + end_pos: int + orig_expansion: 'List[TerminalDef]' + match_tree: bool + + def __init__(self): + self.empty = True + + +_Leaf_T = TypeVar("_Leaf_T") +Branch = Union[_Leaf_T, 'Tree[_Leaf_T]'] + + +class Tree(Generic[_Leaf_T]): + #-- + + data: str + children: 'List[Branch[_Leaf_T]]' + + def __init__(self, data: str, children: 'List[Branch[_Leaf_T]]', meta: Optional[Meta]=None) -> None: + self.data = data + self.children = children + self._meta = meta + + @property + def meta(self) -> Meta: + if self._meta is None: + self._meta = Meta() + return self._meta + + def __repr__(self): + return 'Tree(%r, %r)' % (self.data, self.children) + + __match_args__ = ("data", "children") + + def _pretty_label(self): + return self.data + + def _pretty(self, level, indent_str): + yield f'{indent_str*level}{self._pretty_label()}' + if len(self.children) == 1 and not isinstance(self.children[0], Tree): + yield f'\t{self.children[0]}\n' + else: + yield '\n' + for n in self.children: + if isinstance(n, Tree): + yield from n._pretty(level+1, indent_str) + else: + yield f'{indent_str*(level+1)}{n}\n' + + def pretty(self, indent_str: str=' ') -> str: + #-- + return ''.join(self._pretty(0, indent_str)) + + def __rich__(self, parent:Optional['rich.tree.Tree']=None) -> 'rich.tree.Tree': + #-- + return self._rich(parent) + + def _rich(self, parent): + if parent: + tree = parent.add(f'[bold]{self.data}[/bold]') + else: + import rich.tree + tree = rich.tree.Tree(self.data) + + for c in self.children: + if isinstance(c, Tree): + c._rich(tree) + else: + tree.add(f'[green]{c}[/green]') + + return tree + + def __eq__(self, other): + try: + return self.data == other.data and self.children == other.children + except AttributeError: + return False + + def __ne__(self, other): + return not (self == other) + + def __hash__(self) -> int: + return hash((self.data, tuple(self.children))) + + def iter_subtrees(self) -> 'Iterator[Tree[_Leaf_T]]': + #-- + queue = [self] + subtrees = dict() + for subtree in queue: + subtrees[id(subtree)] = subtree + queue += [c for c in reversed(subtree.children) + if isinstance(c, Tree) and id(c) not in subtrees] + + del queue + return reversed(list(subtrees.values())) + + def iter_subtrees_topdown(self): + #-- + stack = [self] + stack_append = stack.append + stack_pop = stack.pop + while stack: + node = stack_pop() + if not isinstance(node, Tree): + continue + yield node + for child in reversed(node.children): + stack_append(child) + + def find_pred(self, pred: 'Callable[[Tree[_Leaf_T]], bool]') -> 'Iterator[Tree[_Leaf_T]]': + #-- + return filter(pred, self.iter_subtrees()) + + def find_data(self, data: str) -> 'Iterator[Tree[_Leaf_T]]': + #-- + return self.find_pred(lambda t: t.data == data) + + +from functools import wraps, update_wrapper +from inspect import getmembers, getmro + +_Return_T = TypeVar('_Return_T') +_Return_V = TypeVar('_Return_V') +_Leaf_T = TypeVar('_Leaf_T') +_Leaf_U = TypeVar('_Leaf_U') +_R = TypeVar('_R') +_FUNC = Callable[..., _Return_T] +_DECORATED = Union[_FUNC, type] + +class _DiscardType: + #-- + + def __repr__(self): + return "lark.visitors.Discard" + +Discard = _DiscardType() + +## + + +class _Decoratable: + #-- + + @classmethod + def _apply_v_args(cls, visit_wrapper): + mro = getmro(cls) + assert mro[0] is cls + libmembers = {name for _cls in mro[1:] for name, _ in getmembers(_cls)} + for name, value in getmembers(cls): + + ## + + if name.startswith('_') or (name in libmembers and name not in cls.__dict__): + continue + if not callable(value): + continue + + ## + + if isinstance(cls.__dict__[name], _VArgsWrapper): + continue + + setattr(cls, name, _VArgsWrapper(cls.__dict__[name], visit_wrapper)) + return cls + + def __class_getitem__(cls, _): + return cls + + +class Transformer(_Decoratable, ABC, Generic[_Leaf_T, _Return_T]): + #-- + __visit_tokens__ = True ## + + + def __init__(self, visit_tokens: bool=True) -> None: + self.__visit_tokens__ = visit_tokens + + def _call_userfunc(self, tree, new_children=None): + ## + + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + try: + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + return f.visit_wrapper(f, tree.data, children, tree.meta) + else: + return f(children) + except GrammarError: + raise + except Exception as e: + raise VisitError(tree.data, tree, e) + + def _call_userfunc_token(self, token): + try: + f = getattr(self, token.type) + except AttributeError: + return self.__default_token__(token) + else: + try: + return f(token) + except GrammarError: + raise + except Exception as e: + raise VisitError(token.type, token, e) + + def _transform_children(self, children): + for c in children: + if isinstance(c, Tree): + res = self._transform_tree(c) + elif self.__visit_tokens__ and isinstance(c, Token): + res = self._call_userfunc_token(c) + else: + res = c + + if res is not Discard: + yield res + + def _transform_tree(self, tree): + children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree, children) + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + #-- + res = list(self._transform_children([tree])) + if not res: + return None ## + + assert len(res) == 1 + return res[0] + + def __mul__( + self: 'Transformer[_Leaf_T, Tree[_Leaf_U]]', + other: 'Union[Transformer[_Leaf_U, _Return_V], TransformerChain[_Leaf_U, _Return_V,]]' + ) -> 'TransformerChain[_Leaf_T, _Return_V]': + #-- + return TransformerChain(self, other) + + def __default__(self, data, children, meta): + #-- + return Tree(data, children, meta) + + def __default_token__(self, token): + #-- + return token + + +def merge_transformers(base_transformer=None, **transformers_to_merge): + #-- + if base_transformer is None: + base_transformer = Transformer() + for prefix, transformer in transformers_to_merge.items(): + for method_name in dir(transformer): + method = getattr(transformer, method_name) + if not callable(method): + continue + if method_name.startswith("_") or method_name == "transform": + continue + prefixed_method = prefix + "__" + method_name + if hasattr(base_transformer, prefixed_method): + raise AttributeError("Cannot merge: method '%s' appears more than once" % prefixed_method) + + setattr(base_transformer, prefixed_method, method) + + return base_transformer + + +class InlineTransformer(Transformer): ## + + def _call_userfunc(self, tree, new_children=None): + ## + + children = new_children if new_children is not None else tree.children + try: + f = getattr(self, tree.data) + except AttributeError: + return self.__default__(tree.data, children, tree.meta) + else: + return f(*children) + + +class TransformerChain(Generic[_Leaf_T, _Return_T]): + + transformers: 'Tuple[Union[Transformer, TransformerChain], ...]' + + def __init__(self, *transformers: 'Union[Transformer, TransformerChain]') -> None: + self.transformers = transformers + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + for t in self.transformers: + tree = t.transform(tree) + return cast(_Return_T, tree) + + def __mul__( + self: 'TransformerChain[_Leaf_T, Tree[_Leaf_U]]', + other: 'Union[Transformer[_Leaf_U, _Return_V], TransformerChain[_Leaf_U, _Return_V]]' + ) -> 'TransformerChain[_Leaf_T, _Return_V]': + return TransformerChain(*self.transformers + (other,)) + + +class Transformer_InPlace(Transformer[_Leaf_T, _Return_T]): + #-- + def _transform_tree(self, tree): ## + + return self._call_userfunc(tree) + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + for subtree in tree.iter_subtrees(): + subtree.children = list(self._transform_children(subtree.children)) + + return self._transform_tree(tree) + + +class Transformer_NonRecursive(Transformer[_Leaf_T, _Return_T]): + #-- + + def transform(self, tree: Tree[_Leaf_T]) -> _Return_T: + ## + + rev_postfix = [] + q: List[Branch[_Leaf_T]] = [tree] + while q: + t = q.pop() + rev_postfix.append(t) + if isinstance(t, Tree): + q += t.children + + ## + + stack: List = [] + for x in reversed(rev_postfix): + if isinstance(x, Tree): + size = len(x.children) + if size: + args = stack[-size:] + del stack[-size:] + else: + args = [] + + res = self._call_userfunc(x, args) + if res is not Discard: + stack.append(res) + + elif self.__visit_tokens__ and isinstance(x, Token): + res = self._call_userfunc_token(x) + if res is not Discard: + stack.append(res) + else: + stack.append(x) + + result, = stack ## + + ## + + ## + + ## + + return cast(_Return_T, result) + + +class Transformer_InPlaceRecursive(Transformer[_Leaf_T, _Return_T]): + #-- + def _transform_tree(self, tree): + tree.children = list(self._transform_children(tree.children)) + return self._call_userfunc(tree) + + +## + + +class VisitorBase: + def _call_userfunc(self, tree): + return getattr(self, tree.data, self.__default__)(tree) + + def __default__(self, tree): + #-- + return tree + + def __class_getitem__(cls, _): + return cls + + +class Visitor(VisitorBase, ABC, Generic[_Leaf_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for subtree in tree.iter_subtrees(): + self._call_userfunc(subtree) + return tree + + def visit_topdown(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for subtree in tree.iter_subtrees_topdown(): + self._call_userfunc(subtree) + return tree + + +class Visitor_Recursive(VisitorBase, Generic[_Leaf_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + for child in tree.children: + if isinstance(child, Tree): + self.visit(child) + + self._call_userfunc(tree) + return tree + + def visit_topdown(self,tree: Tree[_Leaf_T]) -> Tree[_Leaf_T]: + #-- + self._call_userfunc(tree) + + for child in tree.children: + if isinstance(child, Tree): + self.visit_topdown(child) + + return tree + + +class Interpreter(_Decoratable, ABC, Generic[_Leaf_T, _Return_T]): + #-- + + def visit(self, tree: Tree[_Leaf_T]) -> _Return_T: + ## + + ## + + ## + + return self._visit_tree(tree) + + def _visit_tree(self, tree: Tree[_Leaf_T]): + f = getattr(self, tree.data) + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + return f.visit_wrapper(f, tree.data, tree.children, tree.meta) + else: + return f(tree) + + def visit_children(self, tree: Tree[_Leaf_T]) -> List: + return [self._visit_tree(child) if isinstance(child, Tree) else child + for child in tree.children] + + def __getattr__(self, name): + return self.__default__ + + def __default__(self, tree): + return self.visit_children(tree) + + +_InterMethod = Callable[[Type[Interpreter], _Return_T], _R] + +def visit_children_decor(func: _InterMethod) -> _InterMethod: + #-- + @wraps(func) + def inner(cls, tree): + values = cls.visit_children(tree) + return func(cls, values) + return inner + +## + + +def _apply_v_args(obj, visit_wrapper): + try: + _apply = obj._apply_v_args + except AttributeError: + return _VArgsWrapper(obj, visit_wrapper) + else: + return _apply(visit_wrapper) + + +class _VArgsWrapper: + #-- + base_func: Callable + + def __init__(self, func: Callable, visit_wrapper: Callable[[Callable, str, list, Any], Any]): + if isinstance(func, _VArgsWrapper): + func = func.base_func + self.base_func = func + self.visit_wrapper = visit_wrapper + update_wrapper(self, func) + + def __call__(self, *args, **kwargs): + return self.base_func(*args, **kwargs) + + def __get__(self, instance, owner=None): + try: + ## + + ## + + g = type(self.base_func).__get__ + except AttributeError: + return self + else: + return _VArgsWrapper(g(self.base_func, instance, owner), self.visit_wrapper) + + def __set_name__(self, owner, name): + try: + f = type(self.base_func).__set_name__ + except AttributeError: + return + else: + f(self.base_func, owner, name) + + +def _vargs_inline(f, _data, children, _meta): + return f(*children) +def _vargs_meta_inline(f, _data, children, meta): + return f(meta, *children) +def _vargs_meta(f, _data, children, meta): + return f(meta, children) +def _vargs_tree(f, data, children, meta): + return f(Tree(data, children, meta)) + + +def v_args(inline: bool = False, meta: bool = False, tree: bool = False, wrapper: Optional[Callable] = None) -> Callable[[_DECORATED], _DECORATED]: + #-- + if tree and (meta or inline): + raise ValueError("Visitor functions cannot combine 'tree' with 'meta' or 'inline'.") + + func = None + if meta: + if inline: + func = _vargs_meta_inline + else: + func = _vargs_meta + elif inline: + func = _vargs_inline + elif tree: + func = _vargs_tree + + if wrapper is not None: + if func is not None: + raise ValueError("Cannot use 'wrapper' along with 'tree', 'meta' or 'inline'.") + func = wrapper + + def _visitor_args_dec(obj): + return _apply_v_args(obj, func) + return _visitor_args_dec + + + +TOKEN_DEFAULT_PRIORITY = 0 + + +class Symbol(Serialize): + __slots__ = ('name',) + + name: str + is_term: ClassVar[bool] = NotImplemented + + def __init__(self, name: str) -> None: + self.name = name + + def __eq__(self, other): + if not isinstance(other, Symbol): + return NotImplemented + return self.is_term == other.is_term and self.name == other.name + + def __ne__(self, other): + return not (self == other) + + def __hash__(self): + return hash(self.name) + + def __repr__(self): + return '%s(%r)' % (type(self).__name__, self.name) + + fullrepr = property(__repr__) + + def renamed(self, f): + return type(self)(f(self.name)) + + +class Terminal(Symbol): + __serialize_fields__ = 'name', 'filter_out' + + is_term: ClassVar[bool] = True + + def __init__(self, name: str, filter_out: bool = False) -> None: + self.name = name + self.filter_out = filter_out + + @property + def fullrepr(self): + return '%s(%r, %r)' % (type(self).__name__, self.name, self.filter_out) + + def renamed(self, f): + return type(self)(f(self.name), self.filter_out) + + +class NonTerminal(Symbol): + __serialize_fields__ = 'name', + + is_term: ClassVar[bool] = False + + def serialize(self, memo=None) -> Dict[str, Any]: + ## + + ## + + return {'name': str(self.name), '__type__': 'NonTerminal'} + + +class RuleOptions(Serialize): + __serialize_fields__ = 'keep_all_tokens', 'expand1', 'priority', 'template_source', 'empty_indices' + + keep_all_tokens: bool + expand1: bool + priority: Optional[int] + template_source: Optional[str] + empty_indices: Tuple[bool, ...] + + def __init__(self, keep_all_tokens: bool=False, expand1: bool=False, priority: Optional[int]=None, template_source: Optional[str]=None, empty_indices: Tuple[bool, ...]=()) -> None: + self.keep_all_tokens = keep_all_tokens + self.expand1 = expand1 + self.priority = priority + self.template_source = template_source + self.empty_indices = empty_indices + + def __repr__(self): + return 'RuleOptions(%r, %r, %r, %r)' % ( + self.keep_all_tokens, + self.expand1, + self.priority, + self.template_source + ) + + +class Rule(Serialize): + #-- + __slots__ = ('origin', 'expansion', 'alias', 'options', 'order', '_hash') + + __serialize_fields__ = 'origin', 'expansion', 'order', 'alias', 'options' + __serialize_namespace__ = Terminal, NonTerminal, RuleOptions + + origin: NonTerminal + expansion: Sequence[Symbol] + order: int + alias: Optional[str] + options: RuleOptions + _hash: int + + def __init__(self, origin: NonTerminal, expansion: Sequence[Symbol], + order: int=0, alias: Optional[str]=None, options: Optional[RuleOptions]=None): + self.origin = origin + self.expansion = expansion + self.alias = alias + self.order = order + self.options = options or RuleOptions() + self._hash = hash((self.origin, tuple(self.expansion))) + + def _deserialize(self): + self._hash = hash((self.origin, tuple(self.expansion))) + + def __str__(self): + return '<%s : %s>' % (self.origin.name, ' '.join(x.name for x in self.expansion)) + + def __repr__(self): + return 'Rule(%r, %r, %r, %r)' % (self.origin, self.expansion, self.alias, self.options) + + def __hash__(self): + return self._hash + + def __eq__(self, other): + if not isinstance(other, Rule): + return False + return self.origin == other.origin and self.expansion == other.expansion + + + +from contextlib import suppress +from copy import copy + +try: ## + + has_interegular = bool(interegular) +except NameError: + has_interegular = False + +class Pattern(Serialize, ABC): + #-- + + value: str + flags: Collection[str] + raw: Optional[str] + type: ClassVar[str] + + def __init__(self, value: str, flags: Collection[str] = (), raw: Optional[str] = None) -> None: + self.value = value + self.flags = frozenset(flags) + self.raw = raw + + def __repr__(self): + return repr(self.to_regexp()) + + ## + + def __hash__(self): + return hash((type(self), self.value, self.flags)) + + def __eq__(self, other): + return type(self) == type(other) and self.value == other.value and self.flags == other.flags + + @abstractmethod + def to_regexp(self) -> str: + raise NotImplementedError() + + @property + @abstractmethod + def min_width(self) -> int: + raise NotImplementedError() + + @property + @abstractmethod + def max_width(self) -> int: + raise NotImplementedError() + + def _get_flags(self, value): + for f in self.flags: + value = ('(?%s:%s)' % (f, value)) + return value + + +class PatternStr(Pattern): + __serialize_fields__ = 'value', 'flags', 'raw' + + type: ClassVar[str] = "str" + + def to_regexp(self) -> str: + return self._get_flags(re.escape(self.value)) + + @property + def min_width(self) -> int: + return len(self.value) + + @property + def max_width(self) -> int: + return len(self.value) + + +class PatternRE(Pattern): + __serialize_fields__ = 'value', 'flags', 'raw', '_width' + + type: ClassVar[str] = "re" + + def to_regexp(self) -> str: + return self._get_flags(self.value) + + _width = None + def _get_width(self): + if self._width is None: + self._width = get_regexp_width(self.to_regexp()) + return self._width + + @property + def min_width(self) -> int: + return self._get_width()[0] + + @property + def max_width(self) -> int: + return self._get_width()[1] + + +class TerminalDef(Serialize): + #-- + __serialize_fields__ = 'name', 'pattern', 'priority' + __serialize_namespace__ = PatternStr, PatternRE + + name: str + pattern: Pattern + priority: int + + def __init__(self, name: str, pattern: Pattern, priority: int = TOKEN_DEFAULT_PRIORITY) -> None: + assert isinstance(pattern, Pattern), pattern + self.name = name + self.pattern = pattern + self.priority = priority + + def __repr__(self): + return '%s(%r, %r)' % (type(self).__name__, self.name, self.pattern) + + def user_repr(self) -> str: + if self.name.startswith('__'): ## + + return self.pattern.raw or self.name + else: + return self.name + +_T = TypeVar('_T', bound="Token") + +class Token(str): + #-- + __slots__ = ('type', 'start_pos', 'value', 'line', 'column', 'end_line', 'end_column', 'end_pos') + + __match_args__ = ('type', 'value') + + type: str + start_pos: Optional[int] + value: Any + line: Optional[int] + column: Optional[int] + end_line: Optional[int] + end_column: Optional[int] + end_pos: Optional[int] + + + @overload + def __new__( + cls, + type: str, + value: Any, + start_pos: Optional[int] = None, + line: Optional[int] = None, + column: Optional[int] = None, + end_line: Optional[int] = None, + end_column: Optional[int] = None, + end_pos: Optional[int] = None + ) -> 'Token': + ... + + @overload + def __new__( + cls, + type_: str, + value: Any, + start_pos: Optional[int] = None, + line: Optional[int] = None, + column: Optional[int] = None, + end_line: Optional[int] = None, + end_column: Optional[int] = None, + end_pos: Optional[int] = None + ) -> 'Token': ... + + def __new__(cls, *args, **kwargs): + if "type_" in kwargs: + warnings.warn("`type_` is deprecated use `type` instead", DeprecationWarning) + + if "type" in kwargs: + raise TypeError("Error: using both 'type' and the deprecated 'type_' as arguments.") + kwargs["type"] = kwargs.pop("type_") + + return cls._future_new(*args, **kwargs) + + + @classmethod + def _future_new(cls, type, value, start_pos=None, line=None, column=None, end_line=None, end_column=None, end_pos=None): + inst = super(Token, cls).__new__(cls, value) + + inst.type = type + inst.start_pos = start_pos + inst.value = value + inst.line = line + inst.column = column + inst.end_line = end_line + inst.end_column = end_column + inst.end_pos = end_pos + return inst + + @overload + def update(self, type: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + ... + + @overload + def update(self, type_: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + ... + + def update(self, *args, **kwargs): + if "type_" in kwargs: + warnings.warn("`type_` is deprecated use `type` instead", DeprecationWarning) + + if "type" in kwargs: + raise TypeError("Error: using both 'type' and the deprecated 'type_' as arguments.") + kwargs["type"] = kwargs.pop("type_") + + return self._future_update(*args, **kwargs) + + def _future_update(self, type: Optional[str] = None, value: Optional[Any] = None) -> 'Token': + return Token.new_borrow_pos( + type if type is not None else self.type, + value if value is not None else self.value, + self + ) + + @classmethod + def new_borrow_pos(cls: Type[_T], type_: str, value: Any, borrow_t: 'Token') -> _T: + return cls(type_, value, borrow_t.start_pos, borrow_t.line, borrow_t.column, borrow_t.end_line, borrow_t.end_column, borrow_t.end_pos) + + def __reduce__(self): + return (self.__class__, (self.type, self.value, self.start_pos, self.line, self.column)) + + def __repr__(self): + return 'Token(%r, %r)' % (self.type, self.value) + + def __deepcopy__(self, memo): + return Token(self.type, self.value, self.start_pos, self.line, self.column) + + def __eq__(self, other): + if isinstance(other, Token) and self.type != other.type: + return False + + return str.__eq__(self, other) + + __hash__ = str.__hash__ + + +class LineCounter: + #-- + + __slots__ = 'char_pos', 'line', 'column', 'line_start_pos', 'newline_char' + + def __init__(self, newline_char): + self.newline_char = newline_char + self.char_pos = 0 + self.line = 1 + self.column = 1 + self.line_start_pos = 0 + + def __eq__(self, other): + if not isinstance(other, LineCounter): + return NotImplemented + + return self.char_pos == other.char_pos and self.newline_char == other.newline_char + + def feed(self, token: TextOrSlice, test_newline=True): + #-- + if test_newline: + newlines = token.count(self.newline_char) + if newlines: + self.line += newlines + self.line_start_pos = self.char_pos + token.rindex(self.newline_char) + 1 + + self.char_pos += len(token) + self.column = self.char_pos - self.line_start_pos + 1 + + +class UnlessCallback: + def __init__(self, scanner: 'Scanner'): + self.scanner = scanner + + def __call__(self, t: Token): + res = self.scanner.fullmatch(t.value) + if res is not None: + t.type = res + return t + + +class CallChain: + def __init__(self, callback1, callback2, cond): + self.callback1 = callback1 + self.callback2 = callback2 + self.cond = cond + + def __call__(self, t): + t2 = self.callback1(t) + return self.callback2(t) if self.cond(t2) else t2 + + +def _get_match(re_, regexp, s, flags): + m = re_.match(regexp, s, flags) + if m: + return m.group(0) + +def _create_unless(terminals, g_regex_flags, re_, use_bytes): + tokens_by_type = classify(terminals, lambda t: type(t.pattern)) + assert len(tokens_by_type) <= 2, tokens_by_type.keys() + embedded_strs = set() + callback = {} + for retok in tokens_by_type.get(PatternRE, []): + unless = [] + for strtok in tokens_by_type.get(PatternStr, []): + if strtok.priority != retok.priority: + continue + s = strtok.pattern.value + if s == _get_match(re_, retok.pattern.to_regexp(), s, g_regex_flags): + unless.append(strtok) + if strtok.pattern.flags <= retok.pattern.flags: + embedded_strs.add(strtok) + if unless: + callback[retok.name] = UnlessCallback(Scanner(unless, g_regex_flags, re_, use_bytes=use_bytes)) + + new_terminals = [t for t in terminals if t not in embedded_strs] + return new_terminals, callback + + +class Scanner: + def __init__(self, terminals, g_regex_flags, re_, use_bytes): + self.terminals = terminals + self.g_regex_flags = g_regex_flags + self.re_ = re_ + self.use_bytes = use_bytes + + self.allowed_types = {t.name for t in self.terminals} + + self._mres = self._build_mres(terminals, len(terminals)) + + def _build_mres(self, terminals, max_size): + ## + + ## + + ## + + mres = [] + while terminals: + pattern = u'|'.join(u'(?P<%s>%s)' % (t.name, t.pattern.to_regexp()) for t in terminals[:max_size]) + if self.use_bytes: + pattern = pattern.encode('latin-1') + try: + mre = self.re_.compile(pattern, self.g_regex_flags) + except AssertionError: ## + + return self._build_mres(terminals, max_size // 2) + + mres.append(mre) + terminals = terminals[max_size:] + return mres + + def match(self, text: TextSlice, pos): + for mre in self._mres: + m = mre.match(text.text, pos, text.end) + if m: + return m.group(0), m.lastgroup + + + def fullmatch(self, text: str) -> Optional[str]: + for mre in self._mres: + m = mre.fullmatch(text) + if m: + return m.lastgroup + return None + +def _regexp_has_newline(r: str): + #-- + return '\n' in r or '\\n' in r or '\\s' in r or '[^' in r or ('(?s' in r and '.' in r) + + +class LexerState: + #-- + + __slots__ = 'text', 'line_ctr', 'last_token' + + text: TextSlice + line_ctr: LineCounter + last_token: Optional[Token] + + def __init__(self, text: TextSlice, line_ctr: Optional[LineCounter] = None, last_token: Optional[Token]=None): + if isinstance(text, TextSlice): + if line_ctr is None: + line_ctr = LineCounter(b'\n' if isinstance(text.text, bytes) else '\n') + + if text.start > 0: + ## + + line_ctr.feed(TextSlice(text.text, 0, text.start)) + + if not (text.start <= line_ctr.char_pos <= text.end): + raise ValueError("LineCounter.char_pos is out of bounds") + + self.text = text + if line_ctr is None: + line_ctr = LineCounter(b'\n' if isinstance(text, bytes) or (hasattr(text, 'text') and isinstance(text.text, bytes)) else '\n') + self.line_ctr = line_ctr + self.last_token = last_token + + + def __eq__(self, other): + if not isinstance(other, LexerState): + return NotImplemented + + return self.text == other.text and self.line_ctr == other.line_ctr and self.last_token == other.last_token + + def __copy__(self): + return type(self)(self.text, copy(self.line_ctr), self.last_token) + + +class LexerThread: + #-- + + def __init__(self, lexer: 'Lexer', lexer_state: Optional[LexerState]): + self.lexer = lexer + self.state = lexer_state + + @classmethod + def from_text(cls, lexer: 'Lexer', text_or_slice: TextOrSlice) -> 'LexerThread': + text = TextSlice.cast_from(text_or_slice) + return cls(lexer, LexerState(text)) + + @classmethod + def from_custom_input(cls, lexer: 'Lexer', text: Any) -> 'LexerThread': + return cls(lexer, LexerState(text)) + + def lex(self, parser_state): + if self.state is None: + raise TypeError("Cannot lex: No text assigned to lexer state") + return self.lexer.lex(self.state, parser_state) + + def __copy__(self): + return type(self)(self.lexer, copy(self.state)) + + _Token = Token + + +_Callback = Callable[[Token], Token] + +class Lexer(ABC): + #-- + @abstractmethod + def lex(self, lexer_state: LexerState, parser_state: Any) -> Iterator[Token]: + return NotImplemented + + def make_lexer_state(self, text: str): + #-- + return LexerState(TextSlice.cast_from(text)) + + +def _check_regex_collisions(terminal_to_regexp: Dict[TerminalDef, str], comparator, strict_mode, max_collisions_to_show=8): + if not comparator: + comparator = interegular.Comparator.from_regexes(terminal_to_regexp) + + ## + + ## + + max_time = 2 if strict_mode else 0.2 + + ## + + if comparator.count_marked_pairs() >= max_collisions_to_show: + return + for group in classify(terminal_to_regexp, lambda t: t.priority).values(): + for a, b in comparator.check(group, skip_marked=True): + assert a.priority == b.priority + ## + + comparator.mark(a, b) + + ## + + message = f"Collision between Terminals {a.name} and {b.name}. " + try: + example = comparator.get_example_overlap(a, b, max_time).format_multiline() + except ValueError: + ## + + example = "No example could be found fast enough. However, the collision does still exists" + if strict_mode: + raise LexError(f"{message}\n{example}") + logger.warning("%s The lexer will choose between them arbitrarily.\n%s", message, example) + if comparator.count_marked_pairs() >= max_collisions_to_show: + logger.warning("Found 8 regex collisions, will not check for more.") + return + + +class AbstractBasicLexer(Lexer): + terminals_by_name: Dict[str, TerminalDef] + + @abstractmethod + def __init__(self, conf: 'LexerConf', comparator=None) -> None: + ... + + @abstractmethod + def next_token(self, lex_state: LexerState, parser_state: Any = None) -> Token: + ... + + def lex(self, state: LexerState, parser_state: Any) -> Iterator[Token]: + with suppress(EOFError): + while True: + yield self.next_token(state, parser_state) + + +class BasicLexer(AbstractBasicLexer): + terminals: Collection[TerminalDef] + ignore_types: FrozenSet[str] + newline_types: FrozenSet[str] + user_callbacks: Dict[str, _Callback] + callback: Dict[str, _Callback] + re: ModuleType + + def __init__(self, conf: 'LexerConf', comparator=None) -> None: + terminals = list(conf.terminals) + assert all(isinstance(t, TerminalDef) for t in terminals), terminals + + self.re = conf.re_module + + if not conf.skip_validation: + ## + + terminal_to_regexp = {} + for t in terminals: + regexp = t.pattern.to_regexp() + try: + self.re.compile(regexp, conf.g_regex_flags) + except self.re.error: + raise LexError("Cannot compile token %s: %s" % (t.name, t.pattern)) + + if t.pattern.min_width == 0: + raise LexError("Lexer does not allow zero-width terminals. (%s: %s)" % (t.name, t.pattern)) + if t.pattern.type == "re": + terminal_to_regexp[t] = regexp + + if not (set(conf.ignore) <= {t.name for t in terminals}): + raise LexError("Ignore terminals are not defined: %s" % (set(conf.ignore) - {t.name for t in terminals})) + + if has_interegular: + _check_regex_collisions(terminal_to_regexp, comparator, conf.strict) + elif conf.strict: + raise LexError("interegular must be installed for strict mode. Use `pip install 'lark[interegular]'`.") + + ## + + self.newline_types = frozenset(t.name for t in terminals if _regexp_has_newline(t.pattern.to_regexp())) + self.ignore_types = frozenset(conf.ignore) + + terminals.sort(key=lambda x: (-x.priority, -x.pattern.max_width, -len(x.pattern.value), x.name)) + self.terminals = terminals + self.user_callbacks = conf.callbacks + self.g_regex_flags = conf.g_regex_flags + self.use_bytes = conf.use_bytes + self.terminals_by_name = conf.terminals_by_name + + self._scanner: Optional[Scanner] = None + + def _build_scanner(self) -> Scanner: + terminals, self.callback = _create_unless(self.terminals, self.g_regex_flags, self.re, self.use_bytes) + assert all(self.callback.values()) + + for type_, f in self.user_callbacks.items(): + if type_ in self.callback: + ## + + self.callback[type_] = CallChain(self.callback[type_], f, lambda t: t.type == type_) + else: + self.callback[type_] = f + + return Scanner(terminals, self.g_regex_flags, self.re, self.use_bytes) + + @property + def scanner(self) -> Scanner: + if self._scanner is None: + self._scanner = self._build_scanner() + return self._scanner + + def match(self, text, pos): + return self.scanner.match(text, pos) + + def next_token(self, lex_state: LexerState, parser_state: Any = None) -> Token: + line_ctr = lex_state.line_ctr + while line_ctr.char_pos < lex_state.text.end: + res = self.match(lex_state.text, line_ctr.char_pos) + if not res: + allowed = self.scanner.allowed_types - self.ignore_types + if not allowed: + allowed = {""} + raise UnexpectedCharacters(lex_state.text.text, line_ctr.char_pos, line_ctr.line, line_ctr.column, + allowed=allowed, token_history=lex_state.last_token and [lex_state.last_token], + state=parser_state, terminals_by_name=self.terminals_by_name) + + value, type_ = res + + ignored = type_ in self.ignore_types + t = None + if not ignored or type_ in self.callback: + t = Token(type_, value, line_ctr.char_pos, line_ctr.line, line_ctr.column) + line_ctr.feed(value, type_ in self.newline_types) + if t is not None: + t.end_line = line_ctr.line + t.end_column = line_ctr.column + t.end_pos = line_ctr.char_pos + if t.type in self.callback: + t = self.callback[t.type](t) + if not ignored: + if not isinstance(t, Token): + raise LexError("Callbacks must return a token (returned %r)" % t) + lex_state.last_token = t + return t + + ## + + raise EOFError(self) + + +class ContextualLexer(Lexer): + lexers: Dict[int, AbstractBasicLexer] + root_lexer: AbstractBasicLexer + + BasicLexer: Type[AbstractBasicLexer] = BasicLexer + + def __init__(self, conf: 'LexerConf', states: Dict[int, Collection[str]], always_accept: Collection[str]=()) -> None: + terminals = list(conf.terminals) + terminals_by_name = conf.terminals_by_name + + trad_conf = copy(conf) + trad_conf.terminals = terminals + + if has_interegular and not conf.skip_validation: + comparator = interegular.Comparator.from_regexes({t: t.pattern.to_regexp() for t in terminals}) + else: + comparator = None + lexer_by_tokens: Dict[FrozenSet[str], AbstractBasicLexer] = {} + self.lexers = {} + for state, accepts in states.items(): + key = frozenset(accepts) + try: + lexer = lexer_by_tokens[key] + except KeyError: + accepts = set(accepts) | set(conf.ignore) | set(always_accept) + lexer_conf = copy(trad_conf) + lexer_conf.terminals = [terminals_by_name[n] for n in accepts if n in terminals_by_name] + lexer = self.BasicLexer(lexer_conf, comparator) + lexer_by_tokens[key] = lexer + + self.lexers[state] = lexer + + assert trad_conf.terminals is terminals + trad_conf.skip_validation = True ## + + self.root_lexer = self.BasicLexer(trad_conf, comparator) + + def lex(self, lexer_state: LexerState, parser_state: 'ParserState') -> Iterator[Token]: + try: + while True: + lexer = self.lexers[parser_state.position] + yield lexer.next_token(lexer_state, parser_state) + except EOFError: + pass + except UnexpectedCharacters as e: + ## + + ## + + try: + last_token = lexer_state.last_token ## + + token = self.root_lexer.next_token(lexer_state, parser_state) + raise UnexpectedToken(token, e.allowed, state=parser_state, token_history=[last_token], terminals_by_name=self.root_lexer.terminals_by_name) + except UnexpectedCharacters: + raise e ## + + + + +_ParserArgType: 'TypeAlias' = 'Literal["earley", "lalr", "cyk", "auto"]' +_LexerArgType: 'TypeAlias' = 'Union[Literal["auto", "basic", "contextual", "dynamic", "dynamic_complete"], Type[Lexer]]' +_LexerCallback = Callable[[Token], Token] +ParserCallbacks = Dict[str, Callable] + +class LexerConf(Serialize): + __serialize_fields__ = 'terminals', 'ignore', 'g_regex_flags', 'use_bytes', 'lexer_type' + __serialize_namespace__ = TerminalDef, + + terminals: Collection[TerminalDef] + re_module: ModuleType + ignore: Collection[str] + postlex: 'Optional[PostLex]' + callbacks: Dict[str, _LexerCallback] + g_regex_flags: int + skip_validation: bool + use_bytes: bool + lexer_type: Optional[_LexerArgType] + strict: bool + + def __init__(self, terminals: Collection[TerminalDef], re_module: ModuleType, ignore: Collection[str]=(), postlex: 'Optional[PostLex]'=None, + callbacks: Optional[Dict[str, _LexerCallback]]=None, g_regex_flags: int=0, skip_validation: bool=False, use_bytes: bool=False, strict: bool=False): + self.terminals = terminals + self.terminals_by_name = {t.name: t for t in self.terminals} + assert len(self.terminals) == len(self.terminals_by_name) + self.ignore = ignore + self.postlex = postlex + self.callbacks = callbacks or {} + self.g_regex_flags = g_regex_flags + self.re_module = re_module + self.skip_validation = skip_validation + self.use_bytes = use_bytes + self.strict = strict + self.lexer_type = None + + def _deserialize(self): + self.terminals_by_name = {t.name: t for t in self.terminals} + + def __deepcopy__(self, memo=None): + return type(self)( + deepcopy(self.terminals, memo), + self.re_module, + deepcopy(self.ignore, memo), + deepcopy(self.postlex, memo), + deepcopy(self.callbacks, memo), + deepcopy(self.g_regex_flags, memo), + deepcopy(self.skip_validation, memo), + deepcopy(self.use_bytes, memo), + ) + +class ParserConf(Serialize): + __serialize_fields__ = 'rules', 'start', 'parser_type' + + rules: List['Rule'] + callbacks: ParserCallbacks + start: List[str] + parser_type: _ParserArgType + + def __init__(self, rules: List['Rule'], callbacks: ParserCallbacks, start: List[str]): + assert isinstance(start, list) + self.rules = rules + self.callbacks = callbacks + self.start = start + + +from functools import partial, wraps +from itertools import product + + +class ExpandSingleChild: + def __init__(self, node_builder): + self.node_builder = node_builder + + def __call__(self, children): + if len(children) == 1: + return children[0] + else: + return self.node_builder(children) + + + +class PropagatePositions: + def __init__(self, node_builder, node_filter=None): + self.node_builder = node_builder + self.node_filter = node_filter + + def __call__(self, children): + res = self.node_builder(children) + + if isinstance(res, Tree): + ## + + ## + + ## + + ## + + + res_meta = res.meta + + first_meta = self._pp_get_meta(children) + if first_meta is not None: + if not hasattr(res_meta, 'line'): + ## + + res_meta.line = getattr(first_meta, 'container_line', first_meta.line) + res_meta.column = getattr(first_meta, 'container_column', first_meta.column) + res_meta.start_pos = getattr(first_meta, 'container_start_pos', first_meta.start_pos) + res_meta.empty = False + + res_meta.container_line = getattr(first_meta, 'container_line', first_meta.line) + res_meta.container_column = getattr(first_meta, 'container_column', first_meta.column) + res_meta.container_start_pos = getattr(first_meta, 'container_start_pos', first_meta.start_pos) + + last_meta = self._pp_get_meta(reversed(children)) + if last_meta is not None: + if not hasattr(res_meta, 'end_line'): + res_meta.end_line = getattr(last_meta, 'container_end_line', last_meta.end_line) + res_meta.end_column = getattr(last_meta, 'container_end_column', last_meta.end_column) + res_meta.end_pos = getattr(last_meta, 'container_end_pos', last_meta.end_pos) + res_meta.empty = False + + res_meta.container_end_line = getattr(last_meta, 'container_end_line', last_meta.end_line) + res_meta.container_end_column = getattr(last_meta, 'container_end_column', last_meta.end_column) + res_meta.container_end_pos = getattr(last_meta, 'container_end_pos', last_meta.end_pos) + + return res + + def _pp_get_meta(self, children): + for c in children: + if self.node_filter is not None and not self.node_filter(c): + continue + if isinstance(c, Tree): + if not c.meta.empty: + return c.meta + elif isinstance(c, Token): + return c + elif hasattr(c, '__lark_meta__'): + return c.__lark_meta__() + +def make_propagate_positions(option): + if callable(option): + return partial(PropagatePositions, node_filter=option) + elif option is True: + return PropagatePositions + elif option is False: + return None + + raise ConfigurationError('Invalid option for propagate_positions: %r' % option) + + +class ChildFilter: + def __init__(self, to_include, append_none, node_builder): + self.node_builder = node_builder + self.to_include = to_include + self.append_none = append_none + + def __call__(self, children): + filtered = [] + + for i, to_expand, add_none in self.to_include: + if add_none: + filtered += [None] * add_none + if to_expand: + filtered += children[i].children + else: + filtered.append(children[i]) + + if self.append_none: + filtered += [None] * self.append_none + + return self.node_builder(filtered) + + +class ChildFilterLALR(ChildFilter): + #-- + + def __call__(self, children): + filtered = [] + for i, to_expand, add_none in self.to_include: + if add_none: + filtered += [None] * add_none + if to_expand: + if filtered: + filtered += children[i].children + else: ## + + filtered = children[i].children + else: + filtered.append(children[i]) + + if self.append_none: + filtered += [None] * self.append_none + + return self.node_builder(filtered) + + +class ChildFilterLALR_NoPlaceholders(ChildFilter): + #-- + def __init__(self, to_include, node_builder): + self.node_builder = node_builder + self.to_include = to_include + + def __call__(self, children): + filtered = [] + for i, to_expand in self.to_include: + if to_expand: + if filtered: + filtered += children[i].children + else: ## + + filtered = children[i].children + else: + filtered.append(children[i]) + return self.node_builder(filtered) + + +def _should_expand(sym): + return not sym.is_term and sym.name.startswith('_') + + +def maybe_create_child_filter(expansion, keep_all_tokens, ambiguous, _empty_indices: List[bool]): + ## + + if _empty_indices: + assert _empty_indices.count(False) == len(expansion) + s = ''.join(str(int(b)) for b in _empty_indices) + empty_indices = [len(ones) for ones in s.split('0')] + assert len(empty_indices) == len(expansion)+1, (empty_indices, len(expansion)) + else: + empty_indices = [0] * (len(expansion)+1) + + to_include = [] + nones_to_add = 0 + for i, sym in enumerate(expansion): + nones_to_add += empty_indices[i] + if keep_all_tokens or not (sym.is_term and sym.filter_out): + to_include.append((i, _should_expand(sym), nones_to_add)) + nones_to_add = 0 + + nones_to_add += empty_indices[len(expansion)] + + if _empty_indices or len(to_include) < len(expansion) or any(to_expand for i, to_expand,_ in to_include): + if _empty_indices or ambiguous: + return partial(ChildFilter if ambiguous else ChildFilterLALR, to_include, nones_to_add) + else: + ## + + return partial(ChildFilterLALR_NoPlaceholders, [(i, x) for i,x,_ in to_include]) + + +class AmbiguousExpander: + #-- + def __init__(self, to_expand, tree_class, node_builder): + self.node_builder = node_builder + self.tree_class = tree_class + self.to_expand = to_expand + + def __call__(self, children): + def _is_ambig_tree(t): + return hasattr(t, 'data') and t.data == '_ambig' + + ## + + ## + + ## + + ## + + ambiguous = [] + for i, child in enumerate(children): + if _is_ambig_tree(child): + if i in self.to_expand: + ambiguous.append(i) + + child.expand_kids_by_data('_ambig') + + if not ambiguous: + return self.node_builder(children) + + expand = [child.children if i in ambiguous else (child,) for i, child in enumerate(children)] + return self.tree_class('_ambig', [self.node_builder(list(f)) for f in product(*expand)]) + + +def maybe_create_ambiguous_expander(tree_class, expansion, keep_all_tokens): + to_expand = [i for i, sym in enumerate(expansion) + if keep_all_tokens or ((not (sym.is_term and sym.filter_out)) and _should_expand(sym))] + if to_expand: + return partial(AmbiguousExpander, to_expand, tree_class) + + +class AmbiguousIntermediateExpander: + #-- + + def __init__(self, tree_class, node_builder): + self.node_builder = node_builder + self.tree_class = tree_class + + def __call__(self, children): + def _is_iambig_tree(child): + return hasattr(child, 'data') and child.data == '_iambig' + + def _collapse_iambig(children): + #-- + + ## + + ## + + if children and _is_iambig_tree(children[0]): + iambig_node = children[0] + result = [] + for grandchild in iambig_node.children: + collapsed = _collapse_iambig(grandchild.children) + if collapsed: + for child in collapsed: + child.children += children[1:] + result += collapsed + else: + new_tree = self.tree_class('_inter', grandchild.children + children[1:]) + result.append(new_tree) + return result + + collapsed = _collapse_iambig(children) + if collapsed: + processed_nodes = [self.node_builder(c.children) for c in collapsed] + return self.tree_class('_ambig', processed_nodes) + + return self.node_builder(children) + + + +def inplace_transformer(func): + @wraps(func) + def f(children): + ## + + tree = Tree(func.__name__, children) + return func(tree) + return f + + +def apply_visit_wrapper(func, name, wrapper): + if wrapper is _vargs_meta or wrapper is _vargs_meta_inline: + raise NotImplementedError("Meta args not supported for internal transformer; use YourTransformer().transform(parser.parse()) instead") + + @wraps(func) + def f(children): + return wrapper(func, name, children, None) + return f + + +class ParseTreeBuilder: + def __init__(self, rules, tree_class, propagate_positions=False, ambiguous=False, maybe_placeholders=False): + self.tree_class = tree_class + self.propagate_positions = propagate_positions + self.ambiguous = ambiguous + self.maybe_placeholders = maybe_placeholders + + self.rule_builders = list(self._init_builders(rules)) + + def _init_builders(self, rules): + propagate_positions = make_propagate_positions(self.propagate_positions) + + for rule in rules: + options = rule.options + keep_all_tokens = options.keep_all_tokens + expand_single_child = options.expand1 + + wrapper_chain = list(filter(None, [ + (expand_single_child and not rule.alias) and ExpandSingleChild, + maybe_create_child_filter(rule.expansion, keep_all_tokens, self.ambiguous, options.empty_indices if self.maybe_placeholders else None), + propagate_positions, + self.ambiguous and maybe_create_ambiguous_expander(self.tree_class, rule.expansion, keep_all_tokens), + self.ambiguous and partial(AmbiguousIntermediateExpander, self.tree_class) + ])) + + yield rule, wrapper_chain + + def create_callback(self, transformer=None): + callbacks = {} + + default_handler = getattr(transformer, '__default__', None) + if default_handler: + def default_callback(data, children): + return default_handler(data, children, None) + else: + default_callback = self.tree_class + + for rule, wrapper_chain in self.rule_builders: + + user_callback_name = rule.alias or rule.options.template_source or rule.origin.name + try: + f = getattr(transformer, user_callback_name) + wrapper = getattr(f, 'visit_wrapper', None) + if wrapper is not None: + f = apply_visit_wrapper(f, user_callback_name, wrapper) + elif isinstance(transformer, Transformer_InPlace): + f = inplace_transformer(f) + except AttributeError: + f = partial(default_callback, user_callback_name) + + for w in wrapper_chain: + f = w(f) + + if rule in callbacks: + raise GrammarError("Rule '%s' already exists" % (rule,)) + + callbacks[rule] = f + + return callbacks + + + +class Action: + def __init__(self, name): + self.name = name + def __str__(self): + return self.name + def __repr__(self): + return str(self) + +Shift = Action('Shift') +Reduce = Action('Reduce') + +StateT = TypeVar("StateT") + +class ParseTableBase(Generic[StateT]): + states: Dict[StateT, Dict[str, Tuple]] + start_states: Dict[str, StateT] + end_states: Dict[str, StateT] + + def __init__(self, states, start_states, end_states): + self.states = states + self.start_states = start_states + self.end_states = end_states + + def serialize(self, memo): + tokens = Enumerator() + + states = { + state: {tokens.get(token): ((1, arg.serialize(memo)) if action is Reduce else (0, arg)) + for token, (action, arg) in actions.items()} + for state, actions in self.states.items() + } + + return { + 'tokens': tokens.reversed(), + 'states': states, + 'start_states': self.start_states, + 'end_states': self.end_states, + } + + @classmethod + def deserialize(cls, data, memo): + tokens = data['tokens'] + states = { + state: {tokens[token]: ((Reduce, Rule.deserialize(arg, memo)) if action==1 else (Shift, arg)) + for token, (action, arg) in actions.items()} + for state, actions in data['states'].items() + } + return cls(states, data['start_states'], data['end_states']) + +class ParseTable(ParseTableBase['State']): + #-- + pass + + +class IntParseTable(ParseTableBase[int]): + #-- + + @classmethod + def from_ParseTable(cls, parse_table: ParseTable): + enum = list(parse_table.states) + state_to_idx: Dict['State', int] = {s:i for i,s in enumerate(enum)} + int_states = {} + + for s, la in parse_table.states.items(): + la = {k:(v[0], state_to_idx[v[1]]) if v[0] is Shift else v + for k,v in la.items()} + int_states[ state_to_idx[s] ] = la + + + start_states = {start:state_to_idx[s] for start, s in parse_table.start_states.items()} + end_states = {start:state_to_idx[s] for start, s in parse_table.end_states.items()} + return cls(int_states, start_states, end_states) + + + +class ParseConf(Generic[StateT]): + __slots__ = 'parse_table', 'callbacks', 'start', 'start_state', 'end_state', 'states' + + parse_table: ParseTableBase[StateT] + callbacks: ParserCallbacks + start: str + + start_state: StateT + end_state: StateT + states: Dict[StateT, Dict[str, tuple]] + + def __init__(self, parse_table: ParseTableBase[StateT], callbacks: ParserCallbacks, start: str): + self.parse_table = parse_table + + self.start_state = self.parse_table.start_states[start] + self.end_state = self.parse_table.end_states[start] + self.states = self.parse_table.states + + self.callbacks = callbacks + self.start = start + +class ParserState(Generic[StateT]): + __slots__ = 'parse_conf', 'lexer', 'state_stack', 'value_stack' + + parse_conf: ParseConf[StateT] + lexer: LexerThread + state_stack: List[StateT] + value_stack: list + + def __init__(self, parse_conf: ParseConf[StateT], lexer: LexerThread, state_stack=None, value_stack=None): + self.parse_conf = parse_conf + self.lexer = lexer + self.state_stack = state_stack or [self.parse_conf.start_state] + self.value_stack = value_stack or [] + + @property + def position(self) -> StateT: + return self.state_stack[-1] + + ## + + def __eq__(self, other) -> bool: + if not isinstance(other, ParserState): + return NotImplemented + return len(self.state_stack) == len(other.state_stack) and self.position == other.position + + def __copy__(self): + return self.copy() + + def copy(self, deepcopy_values=True) -> 'ParserState[StateT]': + return type(self)( + self.parse_conf, + self.lexer, ## + + copy(self.state_stack), + deepcopy(self.value_stack) if deepcopy_values else copy(self.value_stack), + ) + + def feed_token(self, token: Token, is_end=False) -> Any: + state_stack = self.state_stack + value_stack = self.value_stack + states = self.parse_conf.states + end_state = self.parse_conf.end_state + callbacks = self.parse_conf.callbacks + + while True: + state = state_stack[-1] + try: + action, arg = states[state][token.type] + except KeyError: + expected = {s for s in states[state].keys() if s.isupper()} + raise UnexpectedToken(token, expected, state=self, interactive_parser=None) + + assert arg != end_state + + if action is Shift: + ## + + assert not is_end + state_stack.append(arg) + value_stack.append(token if token.type not in callbacks else callbacks[token.type](token)) + return + else: + ## + + rule = arg + size = len(rule.expansion) + if size: + s = value_stack[-size:] + del state_stack[-size:] + del value_stack[-size:] + else: + s = [] + + value = callbacks[rule](s) if callbacks else s + + _action, new_state = states[state_stack[-1]][rule.origin.name] + assert _action is Shift + state_stack.append(new_state) + value_stack.append(value) + + if is_end and state_stack[-1] == end_state: + return value_stack[-1] + + +class LALR_Parser(Serialize): + def __init__(self, parser_conf: ParserConf, debug: bool=False, strict: bool=False): + analysis = LALR_Analyzer(parser_conf, debug=debug, strict=strict) + analysis.compute_lalr() + callbacks = parser_conf.callbacks + + self._parse_table = analysis.parse_table + self.parser_conf = parser_conf + self.parser = _Parser(analysis.parse_table, callbacks, debug) + + @classmethod + def deserialize(cls, data, memo, callbacks, debug=False): + inst = cls.__new__(cls) + inst._parse_table = IntParseTable.deserialize(data, memo) + inst.parser = _Parser(inst._parse_table, callbacks, debug) + return inst + + def serialize(self, memo: Any = None) -> Dict[str, Any]: + return self._parse_table.serialize(memo) + + def parse_interactive(self, lexer: LexerThread, start: str): + return self.parser.parse(lexer, start, start_interactive=True) + + def parse(self, lexer, start, on_error=None): + try: + return self.parser.parse(lexer, start) + except UnexpectedInput as e: + if on_error is None: + raise + + while True: + if isinstance(e, UnexpectedCharacters): + s = e.interactive_parser.lexer_thread.state + p = s.line_ctr.char_pos + + if not on_error(e): + raise e + + if isinstance(e, UnexpectedCharacters): + ## + + if p == s.line_ctr.char_pos: + s.line_ctr.feed(s.text.text[p:p+1]) + + try: + return e.interactive_parser.resume_parse() + except UnexpectedToken as e2: + if (isinstance(e, UnexpectedToken) + and e.token.type == e2.token.type == '$END' + and e.interactive_parser == e2.interactive_parser): + ## + + raise e2 + e = e2 + except UnexpectedCharacters as e2: + e = e2 + + +class _Parser: + parse_table: ParseTableBase + callbacks: ParserCallbacks + debug: bool + + def __init__(self, parse_table: ParseTableBase, callbacks: ParserCallbacks, debug: bool=False): + self.parse_table = parse_table + self.callbacks = callbacks + self.debug = debug + + def parse(self, lexer: LexerThread, start: str, value_stack=None, state_stack=None, start_interactive=False): + parse_conf = ParseConf(self.parse_table, self.callbacks, start) + parser_state = ParserState(parse_conf, lexer, state_stack, value_stack) + if start_interactive: + return InteractiveParser(self, parser_state, parser_state.lexer) + return self.parse_from_state(parser_state) + + + def parse_from_state(self, state: ParserState, last_token: Optional[Token]=None): + #-- + try: + token = last_token + for token in state.lexer.lex(state): + assert token is not None + state.feed_token(token) + + end_token = Token.new_borrow_pos('$END', '', token) if token else Token('$END', '', 0, 1, 1) + return state.feed_token(end_token, True) + except UnexpectedInput as e: + try: + e.interactive_parser = InteractiveParser(self, state, state.lexer) + except NameError: + pass + raise e + except Exception as e: + if self.debug: + print("") + print("STATE STACK DUMP") + print("----------------") + for i, s in enumerate(state.state_stack): + print('%d)' % i , s) + print("") + + raise + + +class InteractiveParser: + #-- + def __init__(self, parser, parser_state: ParserState, lexer_thread: LexerThread): + self.parser = parser + self.parser_state = parser_state + self.lexer_thread = lexer_thread + self.result = None + + @property + def lexer_state(self) -> LexerThread: + warnings.warn("lexer_state will be removed in subsequent releases. Use lexer_thread instead.", DeprecationWarning) + return self.lexer_thread + + def feed_token(self, token: Token): + #-- + return self.parser_state.feed_token(token, token.type == '$END') + + def iter_parse(self) -> Iterator[Token]: + #-- + for token in self.lexer_thread.lex(self.parser_state): + yield token + self.result = self.feed_token(token) + + def exhaust_lexer(self) -> List[Token]: + #-- + return list(self.iter_parse()) + + + def feed_eof(self, last_token=None): + #-- + eof = Token.new_borrow_pos('$END', '', last_token) if last_token is not None else self.lexer_thread._Token('$END', '', 0, 1, 1) + return self.feed_token(eof) + + + def __copy__(self): + #-- + return self.copy() + + def copy(self, deepcopy_values=True): + return type(self)( + self.parser, + self.parser_state.copy(deepcopy_values=deepcopy_values), + copy(self.lexer_thread), + ) + + def __eq__(self, other): + if not isinstance(other, InteractiveParser): + return False + + return self.parser_state == other.parser_state and self.lexer_thread == other.lexer_thread + + def as_immutable(self): + #-- + p = copy(self) + return ImmutableInteractiveParser(p.parser, p.parser_state, p.lexer_thread) + + def pretty(self): + #-- + out = ["Parser choices:"] + for k, v in self.choices().items(): + out.append('\t- %s -> %r' % (k, v)) + out.append('stack size: %s' % len(self.parser_state.state_stack)) + return '\n'.join(out) + + def choices(self): + #-- + return self.parser_state.parse_conf.parse_table.states[self.parser_state.position] + + def accepts(self): + #-- + accepts = set() + conf_no_callbacks = copy(self.parser_state.parse_conf) + ## + + ## + + conf_no_callbacks.callbacks = {} + for t in self.choices(): + if t.isupper(): ## + + new_cursor = self.copy(deepcopy_values=False) + new_cursor.parser_state.parse_conf = conf_no_callbacks + try: + new_cursor.feed_token(self.lexer_thread._Token(t, '')) + except UnexpectedToken: + pass + else: + accepts.add(t) + return accepts + + def resume_parse(self): + #-- + return self.parser.parse_from_state(self.parser_state, last_token=self.lexer_thread.state.last_token) + + + +class ImmutableInteractiveParser(InteractiveParser): + #-- + + result = None + + def __hash__(self): + return hash((self.parser_state, self.lexer_thread)) + + def feed_token(self, token): + c = copy(self) + c.result = InteractiveParser.feed_token(c, token) + return c + + def exhaust_lexer(self): + #-- + cursor = self.as_mutable() + cursor.exhaust_lexer() + return cursor.as_immutable() + + def as_mutable(self): + #-- + p = copy(self) + return InteractiveParser(p.parser, p.parser_state, p.lexer_thread) + + + +def _wrap_lexer(lexer_class): + future_interface = getattr(lexer_class, '__future_interface__', 0) + if future_interface == 2: + return lexer_class + elif future_interface == 1: + class CustomLexerWrapper1(Lexer): + def __init__(self, lexer_conf): + self.lexer = lexer_class(lexer_conf) + def lex(self, lexer_state, parser_state): + if isinstance(lexer_state.text, TextSlice) and not lexer_state.text.is_complete_text(): + raise TypeError("Interface=1 Custom Lexer don't support TextSlice") + lexer_state.text = lexer_state.text + return self.lexer.lex(lexer_state, parser_state) + return CustomLexerWrapper1 + elif future_interface == 0: + class CustomLexerWrapper0(Lexer): + def __init__(self, lexer_conf): + self.lexer = lexer_class(lexer_conf) + + def lex(self, lexer_state, parser_state): + if isinstance(lexer_state.text, TextSlice): + if not lexer_state.text.is_complete_text(): + raise TypeError("Interface=0 Custom Lexer don't support TextSlice") + return self.lexer.lex(lexer_state.text.text) + return self.lexer.lex(lexer_state.text) + return CustomLexerWrapper0 + else: + raise ValueError(f"Unknown __future_interface__ value {future_interface}, integer 0-2 expected") + + +def _deserialize_parsing_frontend(data, memo, lexer_conf, callbacks, options): + parser_conf = ParserConf.deserialize(data['parser_conf'], memo) + cls = (options and options._plugins.get('LALR_Parser')) or LALR_Parser + parser = cls.deserialize(data['parser'], memo, callbacks, options.debug) + parser_conf.callbacks = callbacks + return ParsingFrontend(lexer_conf, parser_conf, options, parser=parser) + + +_parser_creators: 'Dict[str, Callable[[LexerConf, Any, Any], Any]]' = {} + + +class ParsingFrontend(Serialize): + __serialize_fields__ = 'lexer_conf', 'parser_conf', 'parser' + + lexer_conf: LexerConf + parser_conf: ParserConf + options: Any + + def __init__(self, lexer_conf: LexerConf, parser_conf: ParserConf, options, parser=None): + self.parser_conf = parser_conf + self.lexer_conf = lexer_conf + self.options = options + + ## + + if parser: ## + + self.parser = parser + else: + create_parser = _parser_creators.get(parser_conf.parser_type) + assert create_parser is not None, "{} is not supported in standalone mode".format( + parser_conf.parser_type + ) + self.parser = create_parser(lexer_conf, parser_conf, options) + + ## + + lexer_type = options.lexer if (options and options.lexer) else lexer_conf.lexer_type + self.skip_lexer = False + if lexer_type in ('dynamic', 'dynamic_complete'): + assert lexer_conf.postlex is None + self.skip_lexer = True + return + + if isinstance(lexer_type, type): + assert issubclass(lexer_type, Lexer) or hasattr(lexer_type, 'lex') + self.lexer = _wrap_lexer(lexer_type)(lexer_conf) + elif isinstance(lexer_type, str): + create_lexer = { + 'basic': create_basic_lexer, + 'contextual': create_contextual_lexer, + }[lexer_type] + self.lexer = create_lexer(lexer_conf, self.parser, lexer_conf.postlex, options) + else: + raise TypeError("Bad value for lexer_type: {lexer_type}") + + if lexer_conf.postlex: + self.lexer = PostLexConnector(self.lexer, lexer_conf.postlex) + + def _verify_start(self, start=None): + if start is None: + start_decls = self.parser_conf.start + if len(start_decls) > 1: + raise ConfigurationError("Lark initialized with more than 1 possible start rule. Must specify which start rule to parse", start_decls) + start ,= start_decls + elif start not in self.parser_conf.start: + raise ConfigurationError("Unknown start rule %s. Must be one of %r" % (start, self.parser_conf.start)) + return start + + def _make_lexer_thread(self, text: Optional[LarkInput]) -> Union[LarkInput, LexerThread, None]: + cls = (self.options and self.options._plugins.get('LexerThread')) or LexerThread + if self.skip_lexer: + return text + if text is None: + return cls(self.lexer, None) + if isinstance(text, (str, bytes, TextSlice)): + return cls.from_text(self.lexer, text) + return cls.from_custom_input(self.lexer, text) + + def parse(self, text: Optional[LarkInput], start=None, on_error=None): + if self.lexer_conf.lexer_type in ("dynamic", "dynamic_complete"): + if isinstance(text, TextSlice) and not text.is_complete_text(): + raise TypeError(f"Lexer {self.lexer_conf.lexer_type} does not support text slices.") + + chosen_start = self._verify_start(start) + kw = {} if on_error is None else {'on_error': on_error} + stream = self._make_lexer_thread(text) + return self.parser.parse(stream, chosen_start, **kw) + + def parse_interactive(self, text: Optional[TextOrSlice]=None, start=None): + ## + + ## + + chosen_start = self._verify_start(start) + if self.parser_conf.parser_type != 'lalr': + raise ConfigurationError("parse_interactive() currently only works with parser='lalr' ") + stream = self._make_lexer_thread(text) + return self.parser.parse_interactive(stream, chosen_start) + + +def _validate_frontend_args(parser, lexer) -> None: + assert_config(parser, ('lalr', 'earley', 'cyk')) + if not isinstance(lexer, type): ## + + expected = { + 'lalr': ('basic', 'contextual'), + 'earley': ('basic', 'dynamic', 'dynamic_complete'), + 'cyk': ('basic', ), + }[parser] + assert_config(lexer, expected, 'Parser %r does not support lexer %%r, expected one of %%s' % parser) + + +def _get_lexer_callbacks(transformer, terminals): + result = {} + for terminal in terminals: + callback = getattr(transformer, terminal.name, None) + if callback is not None: + result[terminal.name] = callback + return result + +class PostLexConnector: + def __init__(self, lexer, postlexer): + self.lexer = lexer + self.postlexer = postlexer + + def lex(self, lexer_state, parser_state): + i = self.lexer.lex(lexer_state, parser_state) + return self.postlexer.process(i) + + + +def create_basic_lexer(lexer_conf, parser, postlex, options) -> BasicLexer: + cls = (options and options._plugins.get('BasicLexer')) or BasicLexer + return cls(lexer_conf) + +def create_contextual_lexer(lexer_conf: LexerConf, parser, postlex, options) -> ContextualLexer: + cls = (options and options._plugins.get('ContextualLexer')) or ContextualLexer + parse_table: ParseTableBase[int] = parser._parse_table + states: Dict[int, Collection[str]] = {idx:list(t.keys()) for idx, t in parse_table.states.items()} + always_accept: Collection[str] = postlex.always_accept if postlex else () + return cls(lexer_conf, states, always_accept=always_accept) + +def create_lalr_parser(lexer_conf: LexerConf, parser_conf: ParserConf, options=None) -> LALR_Parser: + debug = options.debug if options else False + strict = options.strict if options else False + cls = (options and options._plugins.get('LALR_Parser')) or LALR_Parser + return cls(parser_conf, debug=debug, strict=strict) + +_parser_creators['lalr'] = create_lalr_parser + + + + +class PostLex(ABC): + @abstractmethod + def process(self, stream: Iterator[Token]) -> Iterator[Token]: + return stream + + always_accept: Iterable[str] = () + +class LarkOptions(Serialize): + #-- + + start: List[str] + debug: bool + strict: bool + transformer: 'Optional[Transformer]' + propagate_positions: Union[bool, str] + maybe_placeholders: bool + cache: Union[bool, str] + cache_grammar: bool + regex: bool + g_regex_flags: int + keep_all_tokens: bool + tree_class: Optional[Callable[[str, List], Any]] + parser: _ParserArgType + lexer: _LexerArgType + ambiguity: 'Literal["auto", "resolve", "explicit", "forest"]' + postlex: Optional[PostLex] + priority: 'Optional[Literal["auto", "normal", "invert"]]' + lexer_callbacks: Dict[str, Callable[[Token], Token]] + use_bytes: bool + ordered_sets: bool + edit_terminals: Optional[Callable[[TerminalDef], TerminalDef]] + import_paths: 'List[Union[str, Callable[[Union[None, str, PackageResource], str], Tuple[str, str]]]]' + source_path: Optional[str] + + OPTIONS_DOC = r""" + **=== General Options ===** + + start + The start symbol. Either a string, or a list of strings for multiple possible starts (Default: "start") + debug + Display debug information and extra warnings. Use only when debugging (Default: ``False``) + When used with Earley, it generates a forest graph as "sppf.png", if 'dot' is installed. + strict + Throw an exception on any potential ambiguity, including shift/reduce conflicts, and regex collisions. + transformer + Applies the transformer to every parse tree (equivalent to applying it after the parse, but faster) + propagate_positions + Propagates positional attributes into the 'meta' attribute of all tree branches. + Sets attributes: (line, column, end_line, end_column, start_pos, end_pos, + container_line, container_column, container_end_line, container_end_column) + Accepts ``False``, ``True``, or a callable, which will filter which nodes to ignore when propagating. + maybe_placeholders + When ``True``, the ``[]`` operator returns ``None`` when not matched. + When ``False``, ``[]`` behaves like the ``?`` operator, and returns no value at all. + (default= ``True``) + cache + Cache the results of the Lark grammar analysis, for x2 to x3 faster loading. LALR only for now. + + - When ``False``, does nothing (default) + - When ``True``, caches to a temporary file in the local directory + - When given a string, caches to the path pointed by the string + cache_grammar + For use with ``cache`` option. When ``True``, the unanalyzed grammar is also included in the cache. + Useful for classes that require the ``Lark.grammar`` to be present (e.g. Reconstructor). + (default= ``False``) + regex + When True, uses the ``regex`` module instead of the stdlib ``re``. + g_regex_flags + Flags that are applied to all terminals (both regex and strings) + keep_all_tokens + Prevent the tree builder from automagically removing "punctuation" tokens (Default: ``False``) + tree_class + Lark will produce trees comprised of instances of this class instead of the default ``lark.Tree``. + + **=== Algorithm Options ===** + + parser + Decides which parser engine to use. Accepts "earley" or "lalr". (Default: "earley"). + (there is also a "cyk" option for legacy) + lexer + Decides whether or not to use a lexer stage + + - "auto" (default): Choose for me based on the parser + - "basic": Use a basic lexer + - "contextual": Stronger lexer (only works with parser="lalr") + - "dynamic": Flexible and powerful (only with parser="earley") + - "dynamic_complete": Same as dynamic, but tries *every* variation of tokenizing possible. + ambiguity + Decides how to handle ambiguity in the parse. Only relevant if parser="earley" + + - "resolve": The parser will automatically choose the simplest derivation + (it chooses consistently: greedy for tokens, non-greedy for rules) + - "explicit": The parser will return all derivations wrapped in "_ambig" tree nodes (i.e. a forest). + - "forest": The parser will return the root of the shared packed parse forest. + + **=== Misc. / Domain Specific Options ===** + + postlex + Lexer post-processing (Default: ``None``) Only works with the basic and contextual lexers. + priority + How priorities should be evaluated - "auto", ``None``, "normal", "invert" (Default: "auto") + lexer_callbacks + Dictionary of callbacks for the lexer. May alter tokens during lexing. Use with caution. + use_bytes + Accept an input of type ``bytes`` instead of ``str``. + ordered_sets + Should Earley use ordered-sets to achieve stable output (~10% slower than regular sets. Default: True) + edit_terminals + A callback for editing the terminals before parse. + import_paths + A List of either paths or loader functions to specify from where grammars are imported + source_path + Override the source of from where the grammar was loaded. Useful for relative imports and unconventional grammar loading + **=== End of Options ===** + """ + if __doc__: + __doc__ += OPTIONS_DOC + + + ## + + ## + + ## + + ## + + ## + + ## + + _defaults: Dict[str, Any] = { + 'debug': False, + 'strict': False, + 'keep_all_tokens': False, + 'tree_class': None, + 'cache': False, + 'cache_grammar': False, + 'postlex': None, + 'parser': 'earley', + 'lexer': 'auto', + 'transformer': None, + 'start': 'start', + 'priority': 'auto', + 'ambiguity': 'auto', + 'regex': False, + 'propagate_positions': False, + 'lexer_callbacks': {}, + 'maybe_placeholders': True, + 'edit_terminals': None, + 'g_regex_flags': 0, + 'use_bytes': False, + 'ordered_sets': True, + 'import_paths': [], + 'source_path': None, + '_plugins': {}, + } + + def __init__(self, options_dict: Dict[str, Any]) -> None: + o = dict(options_dict) + + options = {} + for name, default in self._defaults.items(): + if name in o: + value = o.pop(name) + if isinstance(default, bool) and name not in ('cache', 'use_bytes', 'propagate_positions'): + value = bool(value) + else: + value = default + + options[name] = value + + if isinstance(options['start'], str): + options['start'] = [options['start']] + + self.__dict__['options'] = options + + + assert_config(self.parser, ('earley', 'lalr', 'cyk', None)) + + if self.parser == 'earley' and self.transformer: + raise ConfigurationError('Cannot specify an embedded transformer when using the Earley algorithm. ' + 'Please use your transformer on the resulting parse tree, or use a different algorithm (i.e. LALR)') + + if self.cache_grammar and not self.cache: + raise ConfigurationError('cache_grammar cannot be set when cache is disabled') + + if o: + raise ConfigurationError("Unknown options: %s" % o.keys()) + + def __getattr__(self, name: str) -> Any: + try: + return self.__dict__['options'][name] + except KeyError as e: + raise AttributeError(e) + + def __setattr__(self, name: str, value: str) -> None: + assert_config(name, self.options.keys(), "%r isn't a valid option. Expected one of: %s") + self.options[name] = value + + def serialize(self, memo = None) -> Dict[str, Any]: + return self.options + + @classmethod + def deserialize(cls, data: Dict[str, Any], memo: Dict[int, Union[TerminalDef, Rule]]) -> "LarkOptions": + return cls(data) + + +## + +## + +_LOAD_ALLOWED_OPTIONS = {'lexer', 'postlex', 'transformer', 'lexer_callbacks', 'use_bytes', 'debug', 'g_regex_flags', 'regex', 'propagate_positions', 'tree_class', '_plugins'} + +_VALID_PRIORITY_OPTIONS = ('auto', 'normal', 'invert', None) +_VALID_AMBIGUITY_OPTIONS = ('auto', 'resolve', 'explicit', 'forest') + + +_T = TypeVar('_T', bound="Lark") + +class Lark(Serialize): + #-- + + source_path: str + source_grammar: str + grammar: 'Grammar' + options: LarkOptions + lexer: Lexer + parser: 'ParsingFrontend' + terminals: Collection[TerminalDef] + + __serialize_fields__ = ['parser', 'rules', 'options'] + + def __init__(self, grammar: 'Union[Grammar, str, IO[str]]', **options) -> None: + self.options = LarkOptions(options) + re_module: types.ModuleType + + ## + + if self.options.cache_grammar: + self.__serialize_fields__ = self.__serialize_fields__ + ['grammar'] + + ## + + use_regex = self.options.regex + if use_regex: + if _has_regex: + re_module = regex + else: + raise ImportError('`regex` module must be installed if calling `Lark(regex=True)`.') + else: + re_module = re + + ## + + if self.options.source_path is None: + try: + self.source_path = grammar.name ## + + except AttributeError: + self.source_path = '' + else: + self.source_path = self.options.source_path + + ## + + try: + read = grammar.read ## + + except AttributeError: + pass + else: + grammar = read() + + cache_fn = None + cache_sha256 = None + if isinstance(grammar, str): + self.source_grammar = grammar + if self.options.use_bytes: + if not grammar.isascii(): + raise ConfigurationError("Grammar must be ascii only, when use_bytes=True") + + if self.options.cache: + if self.options.parser != 'lalr': + raise ConfigurationError("cache only works with parser='lalr' for now") + + unhashable = ('transformer', 'postlex', 'lexer_callbacks', 'edit_terminals', '_plugins') + options_str = ''.join(k+str(v) for k, v in options.items() if k not in unhashable) + from . import __version__ + s = grammar + options_str + __version__ + str(sys.version_info[:2]) + cache_sha256 = sha256_digest(s) + + if isinstance(self.options.cache, str): + cache_fn = self.options.cache + else: + if self.options.cache is not True: + raise ConfigurationError("cache argument must be bool or str") + + try: + username = getpass.getuser() + except Exception: + ## + + ## + + ## + + username = "unknown" + + + cache_fn = tempfile.gettempdir() + "/.lark_%s_%s_%s_%s_%s.tmp" % ( + "cache_grammar" if self.options.cache_grammar else "cache", username, cache_sha256, *sys.version_info[:2]) + + old_options = self.options + try: + with FS.open(cache_fn, 'rb') as f: + logger.debug('Loading grammar from cache: %s', cache_fn) + ## + + for name in (set(options) - _LOAD_ALLOWED_OPTIONS): + del options[name] + file_sha256 = f.readline().rstrip(b'\n') + cached_used_files = pickle.load(f) + if file_sha256 == cache_sha256.encode('utf8') and verify_used_files(cached_used_files): + cached_parser_data = pickle.load(f) + self._load(cached_parser_data, **options) + return + except FileNotFoundError: + ## + + pass + except Exception: ## + + logger.exception("Failed to load Lark from cache: %r. We will try to carry on.", cache_fn) + + ## + + ## + + self.options = old_options + + + ## + + self.grammar, used_files = load_grammar(grammar, self.source_path, self.options.import_paths, self.options.keep_all_tokens) + else: + assert isinstance(grammar, Grammar) + self.grammar = grammar + + + if self.options.lexer == 'auto': + if self.options.parser == 'lalr': + self.options.lexer = 'contextual' + elif self.options.parser == 'earley': + if self.options.postlex is not None: + logger.info("postlex can't be used with the dynamic lexer, so we use 'basic' instead. " + "Consider using lalr with contextual instead of earley") + self.options.lexer = 'basic' + else: + self.options.lexer = 'dynamic' + elif self.options.parser == 'cyk': + self.options.lexer = 'basic' + else: + assert False, self.options.parser + lexer = self.options.lexer + if isinstance(lexer, type): + assert issubclass(lexer, Lexer) ## + + else: + assert_config(lexer, ('basic', 'contextual', 'dynamic', 'dynamic_complete')) + if self.options.postlex is not None and 'dynamic' in lexer: + raise ConfigurationError("Can't use postlex with a dynamic lexer. Use basic or contextual instead") + + if self.options.ambiguity == 'auto': + if self.options.parser == 'earley': + self.options.ambiguity = 'resolve' + else: + assert_config(self.options.parser, ('earley', 'cyk'), "%r doesn't support disambiguation. Use one of these parsers instead: %s") + + if self.options.priority == 'auto': + self.options.priority = 'normal' + + if self.options.priority not in _VALID_PRIORITY_OPTIONS: + raise ConfigurationError("invalid priority option: %r. Must be one of %r" % (self.options.priority, _VALID_PRIORITY_OPTIONS)) + if self.options.ambiguity not in _VALID_AMBIGUITY_OPTIONS: + raise ConfigurationError("invalid ambiguity option: %r. Must be one of %r" % (self.options.ambiguity, _VALID_AMBIGUITY_OPTIONS)) + + if self.options.parser is None: + terminals_to_keep = '*' ## + + elif self.options.postlex is not None: + terminals_to_keep = set(self.options.postlex.always_accept) + else: + terminals_to_keep = set() + + ## + + self.terminals, self.rules, self.ignore_tokens = self.grammar.compile(self.options.start, terminals_to_keep) + + if self.options.edit_terminals: + for t in self.terminals: + self.options.edit_terminals(t) + + self._terminals_dict = {t.name: t for t in self.terminals} + + ## + + if self.options.priority == 'invert': + for rule in self.rules: + if rule.options.priority is not None: + rule.options.priority = -rule.options.priority + for term in self.terminals: + term.priority = -term.priority + ## + + ## + + ## + + elif self.options.priority is None: + for rule in self.rules: + if rule.options.priority is not None: + rule.options.priority = None + for term in self.terminals: + term.priority = 0 + + ## + + self.lexer_conf = LexerConf( + self.terminals, re_module, self.ignore_tokens, self.options.postlex, + self.options.lexer_callbacks, self.options.g_regex_flags, use_bytes=self.options.use_bytes, strict=self.options.strict + ) + + if self.options.parser: + self.parser = self._build_parser() + elif lexer: + self.lexer = self._build_lexer() + + if cache_fn: + logger.debug('Saving grammar to cache: %s', cache_fn) + try: + with FS.open(cache_fn, 'wb') as f: + assert cache_sha256 is not None + f.write(cache_sha256.encode('utf8') + b'\n') + pickle.dump(used_files, f) + self.save(f, _LOAD_ALLOWED_OPTIONS) + except IOError as e: + logger.exception("Failed to save Lark to cache: %r.", cache_fn, e) + + if __doc__: + __doc__ += "\n\n" + LarkOptions.OPTIONS_DOC + + def _build_lexer(self, dont_ignore: bool=False) -> BasicLexer: + lexer_conf = self.lexer_conf + if dont_ignore: + from copy import copy + lexer_conf = copy(lexer_conf) + lexer_conf.ignore = () + return BasicLexer(lexer_conf) + + def _prepare_callbacks(self) -> None: + self._callbacks = {} + ## + + if self.options.ambiguity != 'forest': + self._parse_tree_builder = ParseTreeBuilder( + self.rules, + self.options.tree_class or Tree, + self.options.propagate_positions, + self.options.parser != 'lalr' and self.options.ambiguity == 'explicit', + self.options.maybe_placeholders + ) + self._callbacks = self._parse_tree_builder.create_callback(self.options.transformer) + self._callbacks.update(_get_lexer_callbacks(self.options.transformer, self.terminals)) + + def _build_parser(self) -> "ParsingFrontend": + self._prepare_callbacks() + _validate_frontend_args(self.options.parser, self.options.lexer) + parser_conf = ParserConf(self.rules, self._callbacks, self.options.start) + return _construct_parsing_frontend( + self.options.parser, + self.options.lexer, + self.lexer_conf, + parser_conf, + options=self.options + ) + + def save(self, f, exclude_options: Collection[str] = ()) -> None: + #-- + if self.options.parser != 'lalr': + raise NotImplementedError("Lark.save() is only implemented for the LALR(1) parser.") + data, m = self.memo_serialize([TerminalDef, Rule]) + if exclude_options: + data["options"] = {n: v for n, v in data["options"].items() if n not in exclude_options} + pickle.dump({'data': data, 'memo': m}, f, protocol=pickle.HIGHEST_PROTOCOL) + + @classmethod + def load(cls: Type[_T], f) -> _T: + #-- + inst = cls.__new__(cls) + return inst._load(f) + + def _deserialize_lexer_conf(self, data: Dict[str, Any], memo: Dict[int, Union[TerminalDef, Rule]], options: LarkOptions) -> LexerConf: + lexer_conf = LexerConf.deserialize(data['lexer_conf'], memo) + lexer_conf.callbacks = options.lexer_callbacks or {} + lexer_conf.re_module = regex if options.regex else re + lexer_conf.use_bytes = options.use_bytes + lexer_conf.g_regex_flags = options.g_regex_flags + lexer_conf.skip_validation = True + lexer_conf.postlex = options.postlex + return lexer_conf + + def _load(self: _T, f: Any, **kwargs) -> _T: + if isinstance(f, dict): + d = f + else: + d = pickle.load(f) + memo_json = d['memo'] + data = d['data'] + + assert memo_json + memo = SerializeMemoizer.deserialize(memo_json, {'Rule': Rule, 'TerminalDef': TerminalDef}, {}) + if 'grammar' in data: + self.grammar = Grammar.deserialize(data['grammar'], memo) + options = dict(data['options']) + if (set(kwargs) - _LOAD_ALLOWED_OPTIONS) & set(LarkOptions._defaults): + raise ConfigurationError("Some options are not allowed when loading a Parser: {}" + .format(set(kwargs) - _LOAD_ALLOWED_OPTIONS)) + options.update(kwargs) + self.options = LarkOptions.deserialize(options, memo) + self.rules = [Rule.deserialize(r, memo) for r in data['rules']] + self.source_path = '' + _validate_frontend_args(self.options.parser, self.options.lexer) + self.lexer_conf = self._deserialize_lexer_conf(data['parser'], memo, self.options) + self.terminals = self.lexer_conf.terminals + self._prepare_callbacks() + self._terminals_dict = {t.name: t for t in self.terminals} + self.parser = _deserialize_parsing_frontend( + data['parser'], + memo, + self.lexer_conf, + self._callbacks, + self.options, ## + + ) + return self + + @classmethod + def _load_from_dict(cls, data, memo, **kwargs): + inst = cls.__new__(cls) + return inst._load({'data': data, 'memo': memo}, **kwargs) + + @classmethod + def open(cls: Type[_T], grammar_filename: str, rel_to: Optional[str]=None, **options) -> _T: + #-- + if rel_to: + basepath = os.path.dirname(rel_to) + grammar_filename = os.path.join(basepath, grammar_filename) + with open(grammar_filename, encoding='utf8') as f: + return cls(f, **options) + + @classmethod + def open_from_package(cls: Type[_T], package: str, grammar_path: str, search_paths: 'Sequence[str]'=[""], **options) -> _T: + #-- + package_loader = FromPackageLoader(package, search_paths) + full_path, text = package_loader(None, grammar_path) + options.setdefault('source_path', full_path) + options.setdefault('import_paths', []) + options['import_paths'].append(package_loader) + return cls(text, **options) + + def __repr__(self): + return 'Lark(open(%r), parser=%r, lexer=%r, ...)' % (self.source_path, self.options.parser, self.options.lexer) + + + def lex(self, text: TextOrSlice, dont_ignore: bool=False) -> Iterator[Token]: + #-- + lexer: Lexer + if not hasattr(self, 'lexer') or dont_ignore: + lexer = self._build_lexer(dont_ignore) + else: + lexer = self.lexer + lexer_thread = LexerThread.from_text(lexer, text) + stream = lexer_thread.lex(None) + if self.options.postlex: + return self.options.postlex.process(stream) + return stream + + def get_terminal(self, name: str) -> TerminalDef: + #-- + return self._terminals_dict[name] + + def parse_interactive(self, text: Optional[LarkInput]=None, start: Optional[str]=None) -> 'InteractiveParser': + #-- + return self.parser.parse_interactive(text, start=start) + + def parse(self, text: LarkInput, start: Optional[str]=None, on_error: 'Optional[Callable[[UnexpectedInput], bool]]'=None) -> 'ParseTree': + #-- + if on_error is not None and self.options.parser != 'lalr': + raise NotImplementedError("The on_error option is only implemented for the LALR(1) parser.") + return self.parser.parse(text, start=start, on_error=on_error) + + + + +class DedentError(LarkError): + pass + +class Indenter(PostLex, ABC): + #-- + paren_level: int + indent_level: List[int] + + def __init__(self) -> None: + self.paren_level = 0 + self.indent_level = [0] + assert self.tab_len > 0 + + def handle_NL(self, token: Token) -> Iterator[Token]: + if self.paren_level > 0: + return + + yield token + + indent_str = token.rsplit('\n', 1)[1] ## + + indent = indent_str.count(' ') + indent_str.count('\t') * self.tab_len + + if indent > self.indent_level[-1]: + self.indent_level.append(indent) + yield Token.new_borrow_pos(self.INDENT_type, indent_str, token) + else: + while indent < self.indent_level[-1]: + self.indent_level.pop() + yield Token.new_borrow_pos(self.DEDENT_type, indent_str, token) + + if indent != self.indent_level[-1]: + raise DedentError('Unexpected dedent to column %s. Expected dedent to %s' % (indent, self.indent_level[-1])) + + def _process(self, stream): + token = None + for token in stream: + if token.type == self.NL_type: + yield from self.handle_NL(token) + else: + yield token + + if token.type in self.OPEN_PAREN_types: + self.paren_level += 1 + elif token.type in self.CLOSE_PAREN_types: + self.paren_level -= 1 + assert self.paren_level >= 0 + + while len(self.indent_level) > 1: + self.indent_level.pop() + yield Token.new_borrow_pos(self.DEDENT_type, '', token) if token else Token(self.DEDENT_type, '', 0, 0, 0, 0, 0, 0) + + assert self.indent_level == [0], self.indent_level + + def process(self, stream): + self.paren_level = 0 + self.indent_level = [0] + return self._process(stream) + + ## + + @property + def always_accept(self): + return (self.NL_type,) + + @property + @abstractmethod + def NL_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def OPEN_PAREN_types(self) -> List[str]: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def CLOSE_PAREN_types(self) -> List[str]: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def INDENT_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def DEDENT_type(self) -> str: + #-- + raise NotImplementedError() + + @property + @abstractmethod + def tab_len(self) -> int: + #-- + raise NotImplementedError() + + +class PythonIndenter(Indenter): + #-- + + NL_type = '_NEWLINE' + OPEN_PAREN_types = ['LPAR', 'LSQB', 'LBRACE'] + CLOSE_PAREN_types = ['RPAR', 'RSQB', 'RBRACE'] + INDENT_type = '_INDENT' + DEDENT_type = '_DEDENT' + tab_len = 8 + + +import pickle, zlib, base64 +DATA = ( +{'parser': {'lexer_conf': {'terminals': [], 'ignore': [], 'g_regex_flags': 0, 'use_bytes': False, 'lexer_type': 'contextual', '__type__': 'LexerConf'}, 'parser_conf': {'rules': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}, {'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}], 'start': ['start'], 'parser_type': 'lalr', '__type__': 'ParserConf'}, 'parser': {'tokens': {0: 'NUMBER', 1: 'TOKEN', 2: 'LLP', 3: 'ID', 4: 'COMMA', 5: 'RRP', 6: 'STRING', 7: 'NEWLINE', 8: 'STRINGIZING', 9: 'CONTINUE', 10: 'SEPARATOR', 11: 'args', 12: 'LT', 13: 'OR', 14: 'GE', 15: 'EQ', 16: 'AND', 17: 'GT', 18: 'LE', 19: 'NE', 20: 'ENDIF', 21: 'IFDEF', 22: 'ELSE', 23: 'WARNING', 24: 'PRAGMA', 25: 'INIT', 26: 'LINE', 27: 'ERROR', 28: 'IF', 29: 'DEFINE', 30: 'REQUIRE', 31: 'UNDEF', 32: 'INCLUDE', 33: 'IFNDEF', 34: 'ENDFILE', 35: '$END', 36: 'errormsg', 37: 'if_header', 38: 'defs', 39: 'define', 40: 'require', 41: 'include_file', 42: 'ifdef', 43: 'include', 44: 'pragma', 45: 'init', 46: 'line', 47: 'warningmsg', 48: 'include_once', 49: 'undef', 50: 'ifdefelsea', 51: 'PASTE', 52: 'CO', 53: 'macrocall', 54: 'macrocall_paste', 55: 'macrocall_call', 56: 'macrocall_unary', 57: 'token', 58: 'TEXT', 59: 'RP', 60: 'def_item', 61: 'expr_atom', 62: 'include_modifier', 63: 'LB', 64: 'ONCE', 65: 'FILENAME', 66: 'PUSH', 67: 'POP', 68: 'program', 69: 'LP', 70: 'expr_or', 71: 'expr_cmp', 72: 'expr_and', 73: 'expr', 74: 'argstring', 75: 'arg', 76: 'INTEGER', 77: 'arglist', 78: 'ifdefelseb', 79: 'start', 80: 'RB', 81: 'params', 82: 'paramlist'}, 'states': {0: {0: (1, {'@': 85}), 1: (1, {'@': 85}), 2: (1, {'@': 85}), 3: (1, {'@': 85}), 4: (1, {'@': 85}), 5: (1, {'@': 85}), 6: (1, {'@': 85}), 7: (1, {'@': 85}), 8: (1, {'@': 85}), 9: (1, {'@': 85}), 10: (1, {'@': 85})}, 1: {0: (1, {'@': 25}), 1: (1, {'@': 25}), 2: (1, {'@': 25}), 3: (1, {'@': 25}), 4: (1, {'@': 25}), 6: (1, {'@': 25}), 5: (1, {'@': 25}), 8: (1, {'@': 25}), 9: (1, {'@': 25}), 10: (1, {'@': 25}), 7: (1, {'@': 25})}, 2: {11: (0, 54), 2: (0, 107), 0: (1, {'@': 89}), 1: (1, {'@': 89}), 3: (1, {'@': 89}), 4: (1, {'@': 89}), 6: (1, {'@': 89}), 5: (1, {'@': 89}), 8: (1, {'@': 89}), 9: (1, {'@': 89}), 10: (1, {'@': 89}), 7: (1, {'@': 89}), 12: (1, {'@': 89}), 13: (1, {'@': 89}), 14: (1, {'@': 89}), 15: (1, {'@': 89}), 16: (1, {'@': 89}), 17: (1, {'@': 89}), 18: (1, {'@': 89}), 19: (1, {'@': 89})}, 3: {20: (1, {'@': 6}), 21: (1, {'@': 6}), 0: (1, {'@': 6}), 22: (1, {'@': 6}), 23: (1, {'@': 6}), 1: (1, {'@': 6}), 2: (1, {'@': 6}), 3: (1, {'@': 6}), 24: (1, {'@': 6}), 25: (1, {'@': 6}), 4: (1, {'@': 6}), 5: (1, {'@': 6}), 6: (1, {'@': 6}), 26: (1, {'@': 6}), 7: (1, {'@': 6}), 27: (1, {'@': 6}), 28: (1, {'@': 6}), 29: (1, {'@': 6}), 30: (1, {'@': 6}), 8: (1, {'@': 6}), 31: (1, {'@': 6}), 9: (1, {'@': 6}), 32: (1, {'@': 6}), 33: (1, {'@': 6}), 10: (1, {'@': 6}), 34: (1, {'@': 6}), 35: (1, {'@': 6})}, 4: {0: (1, {'@': 87}), 1: (1, {'@': 87}), 2: (1, {'@': 87}), 3: (1, {'@': 87}), 4: (1, {'@': 87}), 5: (1, {'@': 87}), 6: (1, {'@': 87}), 7: (1, {'@': 87}), 8: (1, {'@': 87}), 9: (1, {'@': 87}), 10: (1, {'@': 87})}, 5: {21: (0, 173), 36: (0, 157), 37: (0, 6), 31: (0, 170), 23: (0, 15), 38: (0, 135), 24: (0, 43), 32: (0, 38), 39: (0, 97), 40: (0, 99), 41: (0, 94), 42: (0, 109), 43: (0, 60), 44: (0, 112), 20: (0, 18), 25: (0, 93), 26: (0, 96), 45: (0, 114), 27: (0, 123), 46: (0, 103), 47: (0, 119), 48: (0, 105), 49: (0, 128), 29: (0, 106), 50: (0, 127), 33: (0, 155), 28: (0, 81), 30: (0, 12), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82}), 22: (1, {'@': 61})}, 6: {7: (0, 49)}, 7: {12: (1, {'@': 73}), 13: (1, {'@': 73}), 14: (1, {'@': 73}), 15: (1, {'@': 73}), 7: (1, {'@': 73}), 16: (1, {'@': 73}), 17: (1, {'@': 73}), 18: (1, {'@': 73}), 19: (1, {'@': 73}), 5: (1, {'@': 73})}, 8: {21: (0, 173), 36: (0, 157), 37: (0, 6), 31: (0, 170), 23: (0, 15), 38: (0, 135), 24: (0, 43), 39: (0, 97), 40: (0, 99), 32: (0, 38), 41: (0, 94), 42: (0, 109), 43: (0, 60), 44: (0, 112), 25: (0, 93), 26: (0, 96), 45: (0, 114), 27: (0, 123), 46: (0, 103), 47: (0, 119), 48: (0, 105), 49: (0, 128), 29: (0, 106), 50: (0, 127), 33: (0, 155), 28: (0, 81), 30: (0, 12), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82}), 35: (1, {'@': 0})}, 9: {0: (1, {'@': 95}), 4: (1, {'@': 95}), 6: (1, {'@': 95}), 5: (1, {'@': 95}), 3: (1, {'@': 95}), 10: (1, {'@': 95}), 8: (1, {'@': 95}), 1: (1, {'@': 95}), 2: (1, {'@': 95}), 9: (1, {'@': 95}), 51: (1, {'@': 95}), 7: (1, {'@': 95}), 12: (1, {'@': 95}), 13: (1, {'@': 95}), 14: (1, {'@': 95}), 15: (1, {'@': 95}), 16: (1, {'@': 95}), 17: (1, {'@': 95}), 18: (1, {'@': 95}), 19: (1, {'@': 95})}, 10: {20: (1, {'@': 40}), 21: (1, {'@': 40}), 0: (1, {'@': 40}), 22: (1, {'@': 40}), 23: (1, {'@': 40}), 1: (1, {'@': 40}), 2: (1, {'@': 40}), 3: (1, {'@': 40}), 24: (1, {'@': 40}), 25: (1, {'@': 40}), 4: (1, {'@': 40}), 5: (1, {'@': 40}), 6: (1, {'@': 40}), 26: (1, {'@': 40}), 7: (1, {'@': 40}), 27: (1, {'@': 40}), 28: (1, {'@': 40}), 29: (1, {'@': 40}), 30: (1, {'@': 40}), 8: (1, {'@': 40}), 31: (1, {'@': 40}), 9: (1, {'@': 40}), 32: (1, {'@': 40}), 33: (1, {'@': 40}), 10: (1, {'@': 40}), 35: (1, {'@': 40}), 34: (1, {'@': 40})}, 11: {0: (1, {'@': 106}), 6: (1, {'@': 106}), 4: (1, {'@': 106}), 5: (1, {'@': 106}), 10: (1, {'@': 106}), 8: (1, {'@': 106}), 1: (1, {'@': 106}), 2: (1, {'@': 106}), 9: (1, {'@': 106}), 3: (1, {'@': 106})}, 12: {6: (0, 90)}, 13: {52: (0, 17)}, 14: {53: (0, 29), 54: (0, 33), 8: (0, 151), 55: (0, 2), 3: (0, 9), 2: (0, 141), 9: (0, 1), 0: (0, 41), 6: (0, 28), 10: (0, 160), 1: (0, 159), 56: (0, 31), 57: (0, 158), 4: (1, {'@': 100}), 5: (1, {'@': 100})}, 15: {58: (0, 125)}, 16: {20: (1, {'@': 54}), 21: (1, {'@': 54}), 0: (1, {'@': 54}), 22: (1, {'@': 54}), 23: (1, {'@': 54}), 1: (1, {'@': 54}), 2: (1, {'@': 54}), 3: (1, {'@': 54}), 24: (1, {'@': 54}), 25: (1, {'@': 54}), 4: (1, {'@': 54}), 5: (1, {'@': 54}), 6: (1, {'@': 54}), 26: (1, {'@': 54}), 7: (1, {'@': 54}), 27: (1, {'@': 54}), 28: (1, {'@': 54}), 29: (1, {'@': 54}), 30: (1, {'@': 54}), 8: (1, {'@': 54}), 31: (1, {'@': 54}), 9: (1, {'@': 54}), 32: (1, {'@': 54}), 33: (1, {'@': 54}), 10: (1, {'@': 54}), 35: (1, {'@': 54}), 34: (1, {'@': 54})}, 17: {3: (0, 138)}, 18: {20: (1, {'@': 59}), 21: (1, {'@': 59}), 0: (1, {'@': 59}), 22: (1, {'@': 59}), 23: (1, {'@': 59}), 1: (1, {'@': 59}), 2: (1, {'@': 59}), 3: (1, {'@': 59}), 24: (1, {'@': 59}), 25: (1, {'@': 59}), 4: (1, {'@': 59}), 5: (1, {'@': 59}), 6: (1, {'@': 59}), 26: (1, {'@': 59}), 7: (1, {'@': 59}), 27: (1, {'@': 59}), 28: (1, {'@': 59}), 29: (1, {'@': 59}), 30: (1, {'@': 59}), 8: (1, {'@': 59}), 31: (1, {'@': 59}), 9: (1, {'@': 59}), 32: (1, {'@': 59}), 33: (1, {'@': 59}), 10: (1, {'@': 59}), 35: (1, {'@': 59}), 34: (1, {'@': 59})}, 19: {59: (0, 167)}, 20: {7: (0, 142), 8: (0, 151), 4: (0, 0), 9: (0, 1), 55: (0, 2), 10: (0, 160), 1: (0, 159), 5: (0, 148), 2: (0, 4), 3: (0, 9), 54: (0, 33), 6: (0, 28), 60: (0, 35), 56: (0, 31), 57: (0, 27), 0: (0, 41), 53: (0, 47)}, 21: {0: (0, 108), 54: (0, 33), 8: (0, 151), 55: (0, 2), 3: (0, 9), 53: (0, 116), 61: (0, 82), 6: (0, 124), 2: (0, 129), 56: (0, 31)}, 22: {38: (0, 144), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82})}, 23: {12: (1, {'@': 71}), 13: (1, {'@': 71}), 14: (1, {'@': 71}), 15: (1, {'@': 71}), 7: (1, {'@': 71}), 16: (1, {'@': 71}), 17: (1, {'@': 71}), 18: (1, {'@': 71}), 19: (1, {'@': 71}), 5: (1, {'@': 71})}, 24: {20: (1, {'@': 41}), 21: (1, {'@': 41}), 0: (1, {'@': 41}), 22: (1, {'@': 41}), 23: (1, {'@': 41}), 1: (1, {'@': 41}), 2: (1, {'@': 41}), 3: (1, {'@': 41}), 24: (1, {'@': 41}), 25: (1, {'@': 41}), 4: (1, {'@': 41}), 5: (1, {'@': 41}), 6: (1, {'@': 41}), 26: (1, {'@': 41}), 7: (1, {'@': 41}), 27: (1, {'@': 41}), 28: (1, {'@': 41}), 29: (1, {'@': 41}), 30: (1, {'@': 41}), 8: (1, {'@': 41}), 31: (1, {'@': 41}), 9: (1, {'@': 41}), 32: (1, {'@': 41}), 33: (1, {'@': 41}), 10: (1, {'@': 41}), 35: (1, {'@': 41}), 34: (1, {'@': 41})}, 25: {0: (0, 108), 54: (0, 33), 8: (0, 151), 55: (0, 2), 3: (0, 9), 53: (0, 116), 61: (0, 45), 6: (0, 124), 2: (0, 129), 56: (0, 31)}, 26: {14: (1, {'@': 81}), 16: (1, {'@': 81}), 18: (1, {'@': 81}), 12: (1, {'@': 81}), 13: (1, {'@': 81}), 5: (1, {'@': 81}), 15: (1, {'@': 81}), 7: (1, {'@': 81}), 17: (1, {'@': 81}), 19: (1, {'@': 81})}, 27: {0: (1, {'@': 84}), 1: (1, {'@': 84}), 2: (1, {'@': 84}), 3: (1, {'@': 84}), 4: (1, {'@': 84}), 5: (1, {'@': 84}), 6: (1, {'@': 84}), 7: (1, {'@': 84}), 8: (1, {'@': 84}), 9: (1, {'@': 84}), 10: (1, {'@': 84})}, 28: {0: (1, {'@': 23}), 1: (1, {'@': 23}), 2: (1, {'@': 23}), 3: (1, {'@': 23}), 4: (1, {'@': 23}), 6: (1, {'@': 23}), 5: (1, {'@': 23}), 8: (1, {'@': 23}), 9: (1, {'@': 23}), 10: (1, {'@': 23}), 7: (1, {'@': 23})}, 29: {0: (1, {'@': 105}), 6: (1, {'@': 105}), 4: (1, {'@': 105}), 5: (1, {'@': 105}), 10: (1, {'@': 105}), 8: (1, {'@': 105}), 1: (1, {'@': 105}), 2: (1, {'@': 105}), 9: (1, {'@': 105}), 3: (1, {'@': 105})}, 30: {4: (1, {'@': 49}), 5: (1, {'@': 49}), 3: (1, {'@': 49}), 6: (1, {'@': 49}), 0: (1, {'@': 49}), 7: (1, {'@': 49}), 8: (1, {'@': 49}), 1: (1, {'@': 49}), 2: (1, {'@': 49}), 9: (1, {'@': 49}), 10: (1, {'@': 49})}, 31: {0: (1, {'@': 93}), 4: (1, {'@': 93}), 6: (1, {'@': 93}), 5: (1, {'@': 93}), 3: (1, {'@': 93}), 10: (1, {'@': 93}), 8: (1, {'@': 93}), 1: (1, {'@': 93}), 2: (1, {'@': 93}), 9: (1, {'@': 93}), 51: (1, {'@': 93}), 7: (1, {'@': 93}), 12: (1, {'@': 93}), 13: (1, {'@': 93}), 14: (1, {'@': 93}), 15: (1, {'@': 93}), 16: (1, {'@': 93}), 17: (1, {'@': 93}), 18: (1, {'@': 93}), 19: (1, {'@': 93})}, 32: {0: (0, 108), 54: (0, 33), 8: (0, 151), 55: (0, 2), 3: (0, 9), 53: (0, 116), 61: (0, 7), 6: (0, 124), 2: (0, 129), 56: (0, 31)}, 33: {51: (0, 59), 0: (1, {'@': 91}), 4: (1, {'@': 91}), 6: (1, {'@': 91}), 5: (1, {'@': 91}), 10: (1, {'@': 91}), 8: (1, {'@': 91}), 1: (1, {'@': 91}), 2: (1, {'@': 91}), 9: (1, {'@': 91}), 3: (1, {'@': 91}), 7: (1, {'@': 91}), 12: (1, {'@': 91}), 13: (1, {'@': 91}), 14: (1, {'@': 91}), 15: (1, {'@': 91}), 16: (1, {'@': 91}), 17: (1, {'@': 91}), 18: (1, {'@': 91}), 19: (1, {'@': 91})}, 34: {20: (1, {'@': 56}), 21: (1, {'@': 56}), 0: (1, {'@': 56}), 22: (1, {'@': 56}), 23: (1, {'@': 56}), 1: (1, {'@': 56}), 2: (1, {'@': 56}), 3: (1, {'@': 56}), 24: (1, {'@': 56}), 25: (1, {'@': 56}), 4: (1, {'@': 56}), 5: (1, {'@': 56}), 6: (1, {'@': 56}), 26: (1, {'@': 56}), 7: (1, {'@': 56}), 27: (1, {'@': 56}), 28: (1, {'@': 56}), 29: (1, {'@': 56}), 30: (1, {'@': 56}), 8: (1, {'@': 56}), 31: (1, {'@': 56}), 9: (1, {'@': 56}), 32: (1, {'@': 56}), 33: (1, {'@': 56}), 10: (1, {'@': 56}), 35: (1, {'@': 56}), 34: (1, {'@': 56})}, 35: {4: (1, {'@': 83}), 5: (1, {'@': 83}), 3: (1, {'@': 83}), 6: (1, {'@': 83}), 0: (1, {'@': 83}), 7: (1, {'@': 83}), 8: (1, {'@': 83}), 1: (1, {'@': 83}), 2: (1, {'@': 83}), 9: (1, {'@': 83}), 10: (1, {'@': 83})}, 36: {0: (0, 108), 54: (0, 33), 8: (0, 151), 55: (0, 2), 3: (0, 9), 53: (0, 116), 6: (0, 124), 2: (0, 129), 61: (0, 46), 56: (0, 31)}, 37: {4: (0, 70), 5: (0, 11)}, 38: {62: (0, 53), 63: (0, 64), 64: (0, 66), 0: (1, {'@': 36}), 6: (1, {'@': 36}), 65: (1, {'@': 36}), 8: (1, {'@': 36}), 2: (1, {'@': 36}), 3: (1, {'@': 36})}, 39: {6: (0, 104), 65: (0, 86)}, 40: {4: (0, 70), 5: (0, 57)}, 41: {0: (1, {'@': 27}), 1: (1, {'@': 27}), 2: (1, {'@': 27}), 3: (1, {'@': 27}), 4: (1, {'@': 27}), 6: (1, {'@': 27}), 5: (1, {'@': 27}), 8: (1, {'@': 27}), 9: (1, {'@': 27}), 10: (1, {'@': 27}), 7: (1, {'@': 27})}, 42: {20: (1, {'@': 29}), 21: (1, {'@': 29}), 0: (1, {'@': 29}), 22: (1, {'@': 29}), 23: (1, {'@': 29}), 1: (1, {'@': 29}), 2: (1, {'@': 29}), 3: (1, {'@': 29}), 24: (1, {'@': 29}), 25: (1, {'@': 29}), 4: (1, {'@': 29}), 5: (1, {'@': 29}), 6: (1, {'@': 29}), 26: (1, {'@': 29}), 7: (1, {'@': 29}), 27: (1, {'@': 29}), 28: (1, {'@': 29}), 29: (1, {'@': 29}), 30: (1, {'@': 29}), 8: (1, {'@': 29}), 31: (1, {'@': 29}), 9: (1, {'@': 29}), 32: (1, {'@': 29}), 33: (1, {'@': 29}), 10: (1, {'@': 29}), 35: (1, {'@': 29}), 34: (1, {'@': 29})}, 43: {3: (0, 48), 66: (0, 51), 67: (0, 74), 64: (0, 76)}, 44: {0: (1, {'@': 92}), 4: (1, {'@': 92}), 6: (1, {'@': 92}), 5: (1, {'@': 92}), 3: (1, {'@': 92}), 10: (1, {'@': 92}), 8: (1, {'@': 92}), 1: (1, {'@': 92}), 2: (1, {'@': 92}), 9: (1, {'@': 92}), 51: (1, {'@': 92}), 7: (1, {'@': 92}), 12: (1, {'@': 92}), 13: (1, {'@': 92}), 14: (1, {'@': 92}), 15: (1, {'@': 92}), 16: (1, {'@': 92}), 17: (1, {'@': 92}), 18: (1, {'@': 92}), 19: (1, {'@': 92})}, 45: {12: (1, {'@': 72}), 13: (1, {'@': 72}), 14: (1, {'@': 72}), 15: (1, {'@': 72}), 7: (1, {'@': 72}), 16: (1, {'@': 72}), 17: (1, {'@': 72}), 18: (1, {'@': 72}), 19: (1, {'@': 72}), 5: (1, {'@': 72})}, 46: {12: (1, {'@': 76}), 13: (1, {'@': 76}), 14: (1, {'@': 76}), 15: (1, {'@': 76}), 7: (1, {'@': 76}), 16: (1, {'@': 76}), 17: (1, {'@': 76}), 18: (1, {'@': 76}), 19: (1, {'@': 76}), 5: (1, {'@': 76})}, 47: {0: (1, {'@': 88}), 1: (1, {'@': 88}), 2: (1, {'@': 88}), 3: (1, {'@': 88}), 4: (1, {'@': 88}), 5: (1, {'@': 88}), 6: (1, {'@': 88}), 7: (1, {'@': 88}), 8: (1, {'@': 88}), 9: (1, {'@': 88}), 10: (1, {'@': 88})}, 48: {15: (0, 102), 20: (1, {'@': 52}), 21: (1, {'@': 52}), 0: (1, {'@': 52}), 22: (1, {'@': 52}), 23: (1, {'@': 52}), 1: (1, {'@': 52}), 2: (1, {'@': 52}), 3: (1, {'@': 52}), 24: (1, {'@': 52}), 25: (1, {'@': 52}), 4: (1, {'@': 52}), 5: (1, {'@': 52}), 6: (1, {'@': 52}), 26: (1, {'@': 52}), 7: (1, {'@': 52}), 27: (1, {'@': 52}), 28: (1, {'@': 52}), 29: (1, {'@': 52}), 30: (1, {'@': 52}), 8: (1, {'@': 52}), 31: (1, {'@': 52}), 9: (1, {'@': 52}), 32: (1, {'@': 52}), 33: (1, {'@': 52}), 10: (1, {'@': 52}), 35: (1, {'@': 52}), 34: (1, {'@': 52})}, 49: {68: (0, 5), 31: (0, 170), 21: (0, 173), 37: (0, 6), 40: (0, 3), 30: (0, 12), 23: (0, 15), 38: (0, 20), 24: (0, 43), 32: (0, 38), 45: (0, 55), 42: (0, 58), 43: (0, 60), 28: (0, 81), 39: (0, 80), 44: (0, 101), 25: (0, 93), 26: (0, 96), 49: (0, 84), 46: (0, 121), 27: (0, 123), 48: (0, 105), 29: (0, 106), 36: (0, 117), 47: (0, 118), 50: (0, 127), 33: (0, 155), 41: (0, 145), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82})}, 50: {59: (1, {'@': 50}), 4: (1, {'@': 50})}, 51: {69: (0, 79)}, 52: {4: (1, {'@': 97}), 5: (1, {'@': 97})}, 53: {70: (0, 113), 71: (0, 83), 65: (0, 162), 8: (0, 151), 55: (0, 2), 72: (0, 115), 73: (0, 120), 3: (0, 9), 53: (0, 116), 54: (0, 33), 6: (0, 124), 2: (0, 129), 56: (0, 31), 0: (0, 108), 61: (0, 130)}, 54: {0: (1, {'@': 90}), 4: (1, {'@': 90}), 6: (1, {'@': 90}), 5: (1, {'@': 90}), 10: (1, {'@': 90}), 8: (1, {'@': 90}), 1: (1, {'@': 90}), 2: (1, {'@': 90}), 9: (1, {'@': 90}), 3: (1, {'@': 90}), 7: (1, {'@': 90}), 12: (1, {'@': 90}), 13: (1, {'@': 90}), 14: (1, {'@': 90}), 15: (1, {'@': 90}), 16: (1, {'@': 90}), 17: (1, {'@': 90}), 18: (1, {'@': 90}), 19: (1, {'@': 90})}, 55: {20: (1, {'@': 3}), 21: (1, {'@': 3}), 0: (1, {'@': 3}), 22: (1, {'@': 3}), 23: (1, {'@': 3}), 1: (1, {'@': 3}), 2: (1, {'@': 3}), 3: (1, {'@': 3}), 24: (1, {'@': 3}), 25: (1, {'@': 3}), 4: (1, {'@': 3}), 5: (1, {'@': 3}), 6: (1, {'@': 3}), 26: (1, {'@': 3}), 7: (1, {'@': 3}), 27: (1, {'@': 3}), 28: (1, {'@': 3}), 29: (1, {'@': 3}), 30: (1, {'@': 3}), 8: (1, {'@': 3}), 31: (1, {'@': 3}), 9: (1, {'@': 3}), 32: (1, {'@': 3}), 33: (1, {'@': 3}), 10: (1, {'@': 3}), 34: (1, {'@': 3}), 35: (1, {'@': 3})}, 56: {3: (0, 19)}, 57: {0: (1, {'@': 103}), 6: (1, {'@': 103}), 4: (1, {'@': 103}), 5: (1, {'@': 103}), 10: (1, {'@': 103}), 8: (1, {'@': 103}), 1: (1, {'@': 103}), 2: (1, {'@': 103}), 9: (1, {'@': 103}), 3: (1, {'@': 103})}, 58: {20: (1, {'@': 5}), 21: (1, {'@': 5}), 0: (1, {'@': 5}), 22: (1, {'@': 5}), 23: (1, {'@': 5}), 1: (1, {'@': 5}), 2: (1, {'@': 5}), 3: (1, {'@': 5}), 24: (1, {'@': 5}), 25: (1, {'@': 5}), 4: (1, {'@': 5}), 5: (1, {'@': 5}), 6: (1, {'@': 5}), 26: (1, {'@': 5}), 7: (1, {'@': 5}), 27: (1, {'@': 5}), 28: (1, {'@': 5}), 29: (1, {'@': 5}), 30: (1, {'@': 5}), 8: (1, {'@': 5}), 31: (1, {'@': 5}), 9: (1, {'@': 5}), 32: (1, {'@': 5}), 33: (1, {'@': 5}), 10: (1, {'@': 5}), 34: (1, {'@': 5}), 35: (1, {'@': 5})}, 59: {56: (0, 44), 8: (0, 151), 3: (0, 9)}, 60: {7: (0, 133)}, 61: {21: (0, 173), 36: (0, 157), 37: (0, 6), 31: (0, 170), 23: (0, 15), 38: (0, 135), 24: (0, 43), 32: (0, 38), 39: (0, 97), 40: (0, 99), 41: (0, 94), 42: (0, 109), 43: (0, 60), 44: (0, 112), 25: (0, 93), 26: (0, 96), 45: (0, 114), 27: (0, 123), 46: (0, 103), 47: (0, 119), 48: (0, 105), 49: (0, 128), 34: (0, 168), 29: (0, 106), 50: (0, 127), 33: (0, 155), 28: (0, 81), 30: (0, 12), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82})}, 62: {59: (1, {'@': 51}), 4: (1, {'@': 51})}, 63: {3: (0, 62)}, 64: {3: (0, 13)}, 65: {59: (0, 34)}, 66: {62: (0, 39), 63: (0, 64), 65: (1, {'@': 36}), 6: (1, {'@': 36})}, 67: {5: (0, 26)}, 68: {20: (1, {'@': 55}), 21: (1, {'@': 55}), 0: (1, {'@': 55}), 22: (1, {'@': 55}), 23: (1, {'@': 55}), 1: (1, {'@': 55}), 2: (1, {'@': 55}), 3: (1, {'@': 55}), 24: (1, {'@': 55}), 25: (1, {'@': 55}), 4: (1, {'@': 55}), 5: (1, {'@': 55}), 6: (1, {'@': 55}), 26: (1, {'@': 55}), 7: (1, {'@': 55}), 27: (1, {'@': 55}), 28: (1, {'@': 55}), 29: (1, {'@': 55}), 30: (1, {'@': 55}), 8: (1, {'@': 55}), 31: (1, {'@': 55}), 9: (1, {'@': 55}), 32: (1, {'@': 55}), 33: (1, {'@': 55}), 10: (1, {'@': 55}), 35: (1, {'@': 55}), 34: (1, {'@': 55})}, 69: {20: (1, {'@': 60}), 21: (1, {'@': 60}), 0: (1, {'@': 60}), 22: (1, {'@': 60}), 23: (1, {'@': 60}), 1: (1, {'@': 60}), 2: (1, {'@': 60}), 3: (1, {'@': 60}), 24: (1, {'@': 60}), 25: (1, {'@': 60}), 4: (1, {'@': 60}), 5: (1, {'@': 60}), 6: (1, {'@': 60}), 26: (1, {'@': 60}), 7: (1, {'@': 60}), 27: (1, {'@': 60}), 28: (1, {'@': 60}), 29: (1, {'@': 60}), 30: (1, {'@': 60}), 8: (1, {'@': 60}), 31: (1, {'@': 60}), 9: (1, {'@': 60}), 32: (1, {'@': 60}), 33: (1, {'@': 60}), 10: (1, {'@': 60}), 35: (1, {'@': 60}), 34: (1, {'@': 60})}, 70: {74: (0, 14), 8: (0, 151), 53: (0, 154), 9: (0, 1), 55: (0, 2), 75: (0, 52), 10: (0, 160), 2: (0, 143), 1: (0, 159), 57: (0, 95), 3: (0, 9), 54: (0, 33), 6: (0, 28), 56: (0, 31), 0: (0, 41), 4: (1, {'@': 99}), 5: (1, {'@': 99})}, 71: {20: (1, {'@': 42}), 21: (1, {'@': 42}), 0: (1, {'@': 42}), 22: (1, {'@': 42}), 23: (1, {'@': 42}), 1: (1, {'@': 42}), 2: (1, {'@': 42}), 3: (1, {'@': 42}), 24: (1, {'@': 42}), 25: (1, {'@': 42}), 4: (1, {'@': 42}), 5: (1, {'@': 42}), 6: (1, {'@': 42}), 26: (1, {'@': 42}), 7: (1, {'@': 42}), 27: (1, {'@': 42}), 28: (1, {'@': 42}), 29: (1, {'@': 42}), 30: (1, {'@': 42}), 8: (1, {'@': 42}), 31: (1, {'@': 42}), 9: (1, {'@': 42}), 32: (1, {'@': 42}), 33: (1, {'@': 42}), 10: (1, {'@': 42}), 35: (1, {'@': 42}), 34: (1, {'@': 42})}, 72: {0: (1, {'@': 96}), 14: (1, {'@': 96}), 16: (1, {'@': 96}), 1: (1, {'@': 96}), 18: (1, {'@': 96}), 2: (1, {'@': 96}), 3: (1, {'@': 96}), 12: (1, {'@': 96}), 13: (1, {'@': 96}), 5: (1, {'@': 96}), 4: (1, {'@': 96}), 15: (1, {'@': 96}), 6: (1, {'@': 96}), 7: (1, {'@': 96}), 8: (1, {'@': 96}), 17: (1, {'@': 96}), 19: (1, {'@': 96}), 9: (1, {'@': 96}), 10: (1, {'@': 96})}, 73: {12: (1, {'@': 75}), 13: (1, {'@': 75}), 14: (1, {'@': 75}), 15: (1, {'@': 75}), 7: (1, {'@': 75}), 16: (1, {'@': 75}), 17: (1, {'@': 75}), 18: (1, {'@': 75}), 19: (1, {'@': 75}), 5: (1, {'@': 75})}, 74: {69: (0, 56)}, 75: {16: (0, 174), 13: (1, {'@': 67}), 7: (1, {'@': 67}), 5: (1, {'@': 67})}, 76: {20: (1, {'@': 58}), 21: (1, {'@': 58}), 0: (1, {'@': 58}), 22: (1, {'@': 58}), 23: (1, {'@': 58}), 1: (1, {'@': 58}), 2: (1, {'@': 58}), 3: (1, {'@': 58}), 24: (1, {'@': 58}), 25: (1, {'@': 58}), 4: (1, {'@': 58}), 5: (1, {'@': 58}), 6: (1, {'@': 58}), 26: (1, {'@': 58}), 7: (1, {'@': 58}), 27: (1, {'@': 58}), 28: (1, {'@': 58}), 29: (1, {'@': 58}), 30: (1, {'@': 58}), 8: (1, {'@': 58}), 31: (1, {'@': 58}), 9: (1, {'@': 58}), 32: (1, {'@': 58}), 33: (1, {'@': 58}), 10: (1, {'@': 58}), 35: (1, {'@': 58}), 34: (1, {'@': 58})}, 77: {0: (1, {'@': 94}), 4: (1, {'@': 94}), 6: (1, {'@': 94}), 5: (1, {'@': 94}), 3: (1, {'@': 94}), 10: (1, {'@': 94}), 8: (1, {'@': 94}), 1: (1, {'@': 94}), 2: (1, {'@': 94}), 9: (1, {'@': 94}), 51: (1, {'@': 94}), 7: (1, {'@': 94}), 12: (1, {'@': 94}), 13: (1, {'@': 94}), 14: (1, {'@': 94}), 15: (1, {'@': 94}), 16: (1, {'@': 94}), 17: (1, {'@': 94}), 18: (1, {'@': 94}), 19: (1, {'@': 94})}, 78: {20: (1, {'@': 39}), 21: (1, {'@': 39}), 0: (1, {'@': 39}), 22: (1, {'@': 39}), 23: (1, {'@': 39}), 1: (1, {'@': 39}), 2: (1, {'@': 39}), 3: (1, {'@': 39}), 24: (1, {'@': 39}), 25: (1, {'@': 39}), 4: (1, {'@': 39}), 5: (1, {'@': 39}), 6: (1, {'@': 39}), 26: (1, {'@': 39}), 7: (1, {'@': 39}), 27: (1, {'@': 39}), 28: (1, {'@': 39}), 29: (1, {'@': 39}), 30: (1, {'@': 39}), 8: (1, {'@': 39}), 31: (1, {'@': 39}), 9: (1, {'@': 39}), 32: (1, {'@': 39}), 33: (1, {'@': 39}), 10: (1, {'@': 39}), 35: (1, {'@': 39}), 34: (1, {'@': 39})}, 79: {3: (0, 65)}, 80: {7: (0, 100)}, 81: {70: (0, 113), 71: (0, 83), 8: (0, 151), 55: (0, 2), 72: (0, 115), 3: (0, 9), 53: (0, 116), 54: (0, 33), 73: (0, 111), 6: (0, 124), 2: (0, 129), 56: (0, 31), 0: (0, 108), 61: (0, 130)}, 82: {12: (1, {'@': 74}), 13: (1, {'@': 74}), 14: (1, {'@': 74}), 15: (1, {'@': 74}), 7: (1, {'@': 74}), 16: (1, {'@': 74}), 17: (1, {'@': 74}), 18: (1, {'@': 74}), 19: (1, {'@': 74}), 5: (1, {'@': 74})}, 83: {15: (0, 161), 17: (0, 152), 14: (0, 36), 12: (0, 32), 19: (0, 25), 18: (0, 21), 16: (1, {'@': 70}), 13: (1, {'@': 70}), 7: (1, {'@': 70}), 5: (1, {'@': 70})}, 84: {20: (1, {'@': 4}), 21: (1, {'@': 4}), 0: (1, {'@': 4}), 22: (1, {'@': 4}), 23: (1, {'@': 4}), 1: (1, {'@': 4}), 2: (1, {'@': 4}), 3: (1, {'@': 4}), 24: (1, {'@': 4}), 25: (1, {'@': 4}), 4: (1, {'@': 4}), 5: (1, {'@': 4}), 6: (1, {'@': 4}), 26: (1, {'@': 4}), 7: (1, {'@': 4}), 27: (1, {'@': 4}), 28: (1, {'@': 4}), 29: (1, {'@': 4}), 30: (1, {'@': 4}), 8: (1, {'@': 4}), 31: (1, {'@': 4}), 9: (1, {'@': 4}), 32: (1, {'@': 4}), 33: (1, {'@': 4}), 10: (1, {'@': 4}), 34: (1, {'@': 4}), 35: (1, {'@': 4})}, 85: {7: (0, 71)}, 86: {7: (1, {'@': 35})}, 87: {7: (0, 24)}, 88: {7: (1, {'@': 63})}, 89: {7: (0, 78)}, 90: {7: (0, 10)}, 91: {20: (1, {'@': 38}), 21: (1, {'@': 38}), 0: (1, {'@': 38}), 22: (1, {'@': 38}), 23: (1, {'@': 38}), 1: (1, {'@': 38}), 2: (1, {'@': 38}), 3: (1, {'@': 38}), 24: (1, {'@': 38}), 25: (1, {'@': 38}), 4: (1, {'@': 38}), 5: (1, {'@': 38}), 6: (1, {'@': 38}), 26: (1, {'@': 38}), 7: (1, {'@': 38}), 27: (1, {'@': 38}), 28: (1, {'@': 38}), 29: (1, {'@': 38}), 30: (1, {'@': 38}), 8: (1, {'@': 38}), 31: (1, {'@': 38}), 9: (1, {'@': 38}), 32: (1, {'@': 38}), 33: (1, {'@': 38}), 10: (1, {'@': 38}), 35: (1, {'@': 38}), 34: (1, {'@': 38})}, 92: {20: (1, {'@': 28}), 21: (1, {'@': 28}), 0: (1, {'@': 28}), 22: (1, {'@': 28}), 23: (1, {'@': 28}), 1: (1, {'@': 28}), 2: (1, {'@': 28}), 3: (1, {'@': 28}), 24: (1, {'@': 28}), 25: (1, {'@': 28}), 4: (1, {'@': 28}), 5: (1, {'@': 28}), 6: (1, {'@': 28}), 26: (1, {'@': 28}), 7: (1, {'@': 28}), 27: (1, {'@': 28}), 28: (1, {'@': 28}), 29: (1, {'@': 28}), 30: (1, {'@': 28}), 8: (1, {'@': 28}), 31: (1, {'@': 28}), 9: (1, {'@': 28}), 32: (1, {'@': 28}), 33: (1, {'@': 28}), 10: (1, {'@': 28}), 35: (1, {'@': 28}), 34: (1, {'@': 28})}, 93: {6: (0, 85), 3: (0, 87)}, 94: {20: (1, {'@': 12}), 21: (1, {'@': 12}), 0: (1, {'@': 12}), 22: (1, {'@': 12}), 23: (1, {'@': 12}), 1: (1, {'@': 12}), 2: (1, {'@': 12}), 3: (1, {'@': 12}), 24: (1, {'@': 12}), 25: (1, {'@': 12}), 4: (1, {'@': 12}), 5: (1, {'@': 12}), 6: (1, {'@': 12}), 26: (1, {'@': 12}), 7: (1, {'@': 12}), 27: (1, {'@': 12}), 28: (1, {'@': 12}), 29: (1, {'@': 12}), 30: (1, {'@': 12}), 8: (1, {'@': 12}), 31: (1, {'@': 12}), 9: (1, {'@': 12}), 32: (1, {'@': 12}), 33: (1, {'@': 12}), 10: (1, {'@': 12}), 34: (1, {'@': 12}), 35: (1, {'@': 12})}, 95: {0: (1, {'@': 101}), 6: (1, {'@': 101}), 4: (1, {'@': 101}), 5: (1, {'@': 101}), 10: (1, {'@': 101}), 8: (1, {'@': 101}), 1: (1, {'@': 101}), 2: (1, {'@': 101}), 9: (1, {'@': 101}), 3: (1, {'@': 101})}, 96: {76: (0, 126)}, 97: {7: (0, 146)}, 98: {15: (0, 161), 17: (0, 152), 14: (0, 36), 12: (0, 32), 19: (0, 25), 18: (0, 21), 16: (1, {'@': 69}), 13: (1, {'@': 69}), 7: (1, {'@': 69}), 5: (1, {'@': 69})}, 99: {20: (1, {'@': 17}), 21: (1, {'@': 17}), 0: (1, {'@': 17}), 22: (1, {'@': 17}), 23: (1, {'@': 17}), 1: (1, {'@': 17}), 2: (1, {'@': 17}), 3: (1, {'@': 17}), 24: (1, {'@': 17}), 25: (1, {'@': 17}), 4: (1, {'@': 17}), 5: (1, {'@': 17}), 6: (1, {'@': 17}), 26: (1, {'@': 17}), 7: (1, {'@': 17}), 27: (1, {'@': 17}), 28: (1, {'@': 17}), 29: (1, {'@': 17}), 30: (1, {'@': 17}), 8: (1, {'@': 17}), 31: (1, {'@': 17}), 9: (1, {'@': 17}), 32: (1, {'@': 17}), 33: (1, {'@': 17}), 10: (1, {'@': 17}), 34: (1, {'@': 17}), 35: (1, {'@': 17})}, 100: {20: (1, {'@': 11}), 21: (1, {'@': 11}), 0: (1, {'@': 11}), 22: (1, {'@': 11}), 23: (1, {'@': 11}), 1: (1, {'@': 11}), 2: (1, {'@': 11}), 3: (1, {'@': 11}), 24: (1, {'@': 11}), 25: (1, {'@': 11}), 4: (1, {'@': 11}), 5: (1, {'@': 11}), 6: (1, {'@': 11}), 26: (1, {'@': 11}), 7: (1, {'@': 11}), 27: (1, {'@': 11}), 28: (1, {'@': 11}), 29: (1, {'@': 11}), 30: (1, {'@': 11}), 8: (1, {'@': 11}), 31: (1, {'@': 11}), 9: (1, {'@': 11}), 32: (1, {'@': 11}), 33: (1, {'@': 11}), 10: (1, {'@': 11}), 34: (1, {'@': 11}), 35: (1, {'@': 11})}, 101: {20: (1, {'@': 7}), 21: (1, {'@': 7}), 0: (1, {'@': 7}), 22: (1, {'@': 7}), 23: (1, {'@': 7}), 1: (1, {'@': 7}), 2: (1, {'@': 7}), 3: (1, {'@': 7}), 24: (1, {'@': 7}), 25: (1, {'@': 7}), 4: (1, {'@': 7}), 5: (1, {'@': 7}), 6: (1, {'@': 7}), 26: (1, {'@': 7}), 7: (1, {'@': 7}), 27: (1, {'@': 7}), 28: (1, {'@': 7}), 29: (1, {'@': 7}), 30: (1, {'@': 7}), 8: (1, {'@': 7}), 31: (1, {'@': 7}), 9: (1, {'@': 7}), 32: (1, {'@': 7}), 33: (1, {'@': 7}), 10: (1, {'@': 7}), 34: (1, {'@': 7}), 35: (1, {'@': 7})}, 102: {6: (0, 68), 3: (0, 156), 76: (0, 16)}, 103: {20: (1, {'@': 13}), 21: (1, {'@': 13}), 0: (1, {'@': 13}), 22: (1, {'@': 13}), 23: (1, {'@': 13}), 1: (1, {'@': 13}), 2: (1, {'@': 13}), 3: (1, {'@': 13}), 24: (1, {'@': 13}), 25: (1, {'@': 13}), 4: (1, {'@': 13}), 5: (1, {'@': 13}), 6: (1, {'@': 13}), 26: (1, {'@': 13}), 7: (1, {'@': 13}), 27: (1, {'@': 13}), 28: (1, {'@': 13}), 29: (1, {'@': 13}), 30: (1, {'@': 13}), 8: (1, {'@': 13}), 31: (1, {'@': 13}), 9: (1, {'@': 13}), 32: (1, {'@': 13}), 33: (1, {'@': 13}), 10: (1, {'@': 13}), 34: (1, {'@': 13}), 35: (1, {'@': 13})}, 104: {7: (1, {'@': 34})}, 105: {7: (0, 149)}, 106: {3: (0, 147)}, 107: {74: (0, 14), 77: (0, 140), 75: (0, 137), 8: (0, 151), 53: (0, 154), 9: (0, 1), 55: (0, 2), 10: (0, 160), 2: (0, 143), 1: (0, 159), 57: (0, 95), 0: (0, 41), 54: (0, 33), 3: (0, 9), 6: (0, 28), 56: (0, 31), 4: (1, {'@': 99}), 5: (1, {'@': 99})}, 108: {14: (1, {'@': 79}), 16: (1, {'@': 79}), 18: (1, {'@': 79}), 12: (1, {'@': 79}), 13: (1, {'@': 79}), 5: (1, {'@': 79}), 15: (1, {'@': 79}), 7: (1, {'@': 79}), 17: (1, {'@': 79}), 19: (1, {'@': 79})}, 109: {20: (1, {'@': 16}), 21: (1, {'@': 16}), 0: (1, {'@': 16}), 22: (1, {'@': 16}), 23: (1, {'@': 16}), 1: (1, {'@': 16}), 2: (1, {'@': 16}), 3: (1, {'@': 16}), 24: (1, {'@': 16}), 25: (1, {'@': 16}), 4: (1, {'@': 16}), 5: (1, {'@': 16}), 6: (1, {'@': 16}), 26: (1, {'@': 16}), 7: (1, {'@': 16}), 27: (1, {'@': 16}), 28: (1, {'@': 16}), 29: (1, {'@': 16}), 30: (1, {'@': 16}), 8: (1, {'@': 16}), 31: (1, {'@': 16}), 9: (1, {'@': 16}), 32: (1, {'@': 16}), 33: (1, {'@': 16}), 10: (1, {'@': 16}), 34: (1, {'@': 16}), 35: (1, {'@': 16})}, 110: {20: (1, {'@': 43}), 21: (1, {'@': 43}), 0: (1, {'@': 43}), 22: (1, {'@': 43}), 23: (1, {'@': 43}), 1: (1, {'@': 43}), 2: (1, {'@': 43}), 3: (1, {'@': 43}), 24: (1, {'@': 43}), 25: (1, {'@': 43}), 4: (1, {'@': 43}), 5: (1, {'@': 43}), 6: (1, {'@': 43}), 26: (1, {'@': 43}), 7: (1, {'@': 43}), 27: (1, {'@': 43}), 28: (1, {'@': 43}), 29: (1, {'@': 43}), 30: (1, {'@': 43}), 8: (1, {'@': 43}), 31: (1, {'@': 43}), 9: (1, {'@': 43}), 32: (1, {'@': 43}), 33: (1, {'@': 43}), 10: (1, {'@': 43}), 35: (1, {'@': 43}), 34: (1, {'@': 43})}, 111: {7: (1, {'@': 65})}, 112: {20: (1, {'@': 18}), 21: (1, {'@': 18}), 0: (1, {'@': 18}), 22: (1, {'@': 18}), 23: (1, {'@': 18}), 1: (1, {'@': 18}), 2: (1, {'@': 18}), 3: (1, {'@': 18}), 24: (1, {'@': 18}), 25: (1, {'@': 18}), 4: (1, {'@': 18}), 5: (1, {'@': 18}), 6: (1, {'@': 18}), 26: (1, {'@': 18}), 7: (1, {'@': 18}), 27: (1, {'@': 18}), 28: (1, {'@': 18}), 29: (1, {'@': 18}), 30: (1, {'@': 18}), 8: (1, {'@': 18}), 31: (1, {'@': 18}), 9: (1, {'@': 18}), 32: (1, {'@': 18}), 33: (1, {'@': 18}), 10: (1, {'@': 18}), 34: (1, {'@': 18}), 35: (1, {'@': 18})}, 113: {13: (0, 136), 7: (1, {'@': 66}), 5: (1, {'@': 66})}, 114: {20: (1, {'@': 14}), 21: (1, {'@': 14}), 0: (1, {'@': 14}), 22: (1, {'@': 14}), 23: (1, {'@': 14}), 1: (1, {'@': 14}), 2: (1, {'@': 14}), 3: (1, {'@': 14}), 24: (1, {'@': 14}), 25: (1, {'@': 14}), 4: (1, {'@': 14}), 5: (1, {'@': 14}), 6: (1, {'@': 14}), 26: (1, {'@': 14}), 7: (1, {'@': 14}), 27: (1, {'@': 14}), 28: (1, {'@': 14}), 29: (1, {'@': 14}), 30: (1, {'@': 14}), 8: (1, {'@': 14}), 31: (1, {'@': 14}), 9: (1, {'@': 14}), 32: (1, {'@': 14}), 33: (1, {'@': 14}), 10: (1, {'@': 14}), 34: (1, {'@': 14}), 35: (1, {'@': 14})}, 115: {16: (0, 174), 13: (1, {'@': 68}), 7: (1, {'@': 68}), 5: (1, {'@': 68})}, 116: {14: (1, {'@': 78}), 16: (1, {'@': 78}), 18: (1, {'@': 78}), 12: (1, {'@': 78}), 13: (1, {'@': 78}), 5: (1, {'@': 78}), 15: (1, {'@': 78}), 7: (1, {'@': 78}), 17: (1, {'@': 78}), 19: (1, {'@': 78})}, 117: {20: (1, {'@': 8}), 21: (1, {'@': 8}), 0: (1, {'@': 8}), 22: (1, {'@': 8}), 23: (1, {'@': 8}), 1: (1, {'@': 8}), 2: (1, {'@': 8}), 3: (1, {'@': 8}), 24: (1, {'@': 8}), 25: (1, {'@': 8}), 4: (1, {'@': 8}), 5: (1, {'@': 8}), 6: (1, {'@': 8}), 26: (1, {'@': 8}), 7: (1, {'@': 8}), 27: (1, {'@': 8}), 28: (1, {'@': 8}), 29: (1, {'@': 8}), 30: (1, {'@': 8}), 8: (1, {'@': 8}), 31: (1, {'@': 8}), 9: (1, {'@': 8}), 32: (1, {'@': 8}), 33: (1, {'@': 8}), 10: (1, {'@': 8}), 34: (1, {'@': 8}), 35: (1, {'@': 8})}, 118: {20: (1, {'@': 9}), 21: (1, {'@': 9}), 0: (1, {'@': 9}), 22: (1, {'@': 9}), 23: (1, {'@': 9}), 1: (1, {'@': 9}), 2: (1, {'@': 9}), 3: (1, {'@': 9}), 24: (1, {'@': 9}), 25: (1, {'@': 9}), 4: (1, {'@': 9}), 5: (1, {'@': 9}), 6: (1, {'@': 9}), 26: (1, {'@': 9}), 7: (1, {'@': 9}), 27: (1, {'@': 9}), 28: (1, {'@': 9}), 29: (1, {'@': 9}), 30: (1, {'@': 9}), 8: (1, {'@': 9}), 31: (1, {'@': 9}), 9: (1, {'@': 9}), 32: (1, {'@': 9}), 33: (1, {'@': 9}), 10: (1, {'@': 9}), 34: (1, {'@': 9}), 35: (1, {'@': 9})}, 119: {20: (1, {'@': 20}), 21: (1, {'@': 20}), 0: (1, {'@': 20}), 22: (1, {'@': 20}), 23: (1, {'@': 20}), 1: (1, {'@': 20}), 2: (1, {'@': 20}), 3: (1, {'@': 20}), 24: (1, {'@': 20}), 25: (1, {'@': 20}), 4: (1, {'@': 20}), 5: (1, {'@': 20}), 6: (1, {'@': 20}), 26: (1, {'@': 20}), 7: (1, {'@': 20}), 27: (1, {'@': 20}), 28: (1, {'@': 20}), 29: (1, {'@': 20}), 30: (1, {'@': 20}), 8: (1, {'@': 20}), 31: (1, {'@': 20}), 9: (1, {'@': 20}), 32: (1, {'@': 20}), 33: (1, {'@': 20}), 10: (1, {'@': 20}), 34: (1, {'@': 20}), 35: (1, {'@': 20})}, 120: {7: (1, {'@': 33})}, 121: {20: (1, {'@': 2}), 21: (1, {'@': 2}), 0: (1, {'@': 2}), 22: (1, {'@': 2}), 23: (1, {'@': 2}), 1: (1, {'@': 2}), 2: (1, {'@': 2}), 3: (1, {'@': 2}), 24: (1, {'@': 2}), 25: (1, {'@': 2}), 4: (1, {'@': 2}), 5: (1, {'@': 2}), 6: (1, {'@': 2}), 26: (1, {'@': 2}), 7: (1, {'@': 2}), 27: (1, {'@': 2}), 28: (1, {'@': 2}), 29: (1, {'@': 2}), 30: (1, {'@': 2}), 8: (1, {'@': 2}), 31: (1, {'@': 2}), 9: (1, {'@': 2}), 32: (1, {'@': 2}), 33: (1, {'@': 2}), 10: (1, {'@': 2}), 34: (1, {'@': 2}), 35: (1, {'@': 2})}, 122: {21: (0, 173), 36: (0, 157), 37: (0, 6), 31: (0, 170), 23: (0, 15), 38: (0, 135), 24: (0, 43), 32: (0, 38), 39: (0, 97), 40: (0, 99), 41: (0, 94), 42: (0, 109), 43: (0, 60), 44: (0, 112), 25: (0, 93), 26: (0, 96), 45: (0, 114), 27: (0, 123), 46: (0, 103), 47: (0, 119), 48: (0, 105), 49: (0, 128), 34: (0, 92), 29: (0, 106), 50: (0, 127), 33: (0, 155), 28: (0, 81), 30: (0, 12), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82})}, 123: {58: (0, 132)}, 124: {14: (1, {'@': 80}), 16: (1, {'@': 80}), 18: (1, {'@': 80}), 12: (1, {'@': 80}), 13: (1, {'@': 80}), 5: (1, {'@': 80}), 15: (1, {'@': 80}), 7: (1, {'@': 80}), 17: (1, {'@': 80}), 19: (1, {'@': 80})}, 125: {20: (1, {'@': 45}), 21: (1, {'@': 45}), 0: (1, {'@': 45}), 22: (1, {'@': 45}), 23: (1, {'@': 45}), 1: (1, {'@': 45}), 2: (1, {'@': 45}), 3: (1, {'@': 45}), 24: (1, {'@': 45}), 25: (1, {'@': 45}), 4: (1, {'@': 45}), 5: (1, {'@': 45}), 6: (1, {'@': 45}), 26: (1, {'@': 45}), 7: (1, {'@': 45}), 27: (1, {'@': 45}), 28: (1, {'@': 45}), 29: (1, {'@': 45}), 30: (1, {'@': 45}), 8: (1, {'@': 45}), 31: (1, {'@': 45}), 9: (1, {'@': 45}), 32: (1, {'@': 45}), 33: (1, {'@': 45}), 10: (1, {'@': 45}), 35: (1, {'@': 45}), 34: (1, {'@': 45})}, 126: {6: (0, 89), 7: (0, 91)}, 127: {22: (0, 163), 78: (0, 171)}, 128: {20: (1, {'@': 15}), 21: (1, {'@': 15}), 0: (1, {'@': 15}), 22: (1, {'@': 15}), 23: (1, {'@': 15}), 1: (1, {'@': 15}), 2: (1, {'@': 15}), 3: (1, {'@': 15}), 24: (1, {'@': 15}), 25: (1, {'@': 15}), 4: (1, {'@': 15}), 5: (1, {'@': 15}), 6: (1, {'@': 15}), 26: (1, {'@': 15}), 7: (1, {'@': 15}), 27: (1, {'@': 15}), 28: (1, {'@': 15}), 29: (1, {'@': 15}), 30: (1, {'@': 15}), 8: (1, {'@': 15}), 31: (1, {'@': 15}), 9: (1, {'@': 15}), 32: (1, {'@': 15}), 33: (1, {'@': 15}), 10: (1, {'@': 15}), 34: (1, {'@': 15}), 35: (1, {'@': 15})}, 129: {70: (0, 113), 71: (0, 83), 8: (0, 151), 73: (0, 67), 55: (0, 2), 72: (0, 115), 3: (0, 9), 53: (0, 116), 54: (0, 33), 6: (0, 124), 2: (0, 129), 56: (0, 31), 0: (0, 108), 61: (0, 130)}, 130: {12: (1, {'@': 77}), 13: (1, {'@': 77}), 14: (1, {'@': 77}), 15: (1, {'@': 77}), 7: (1, {'@': 77}), 16: (1, {'@': 77}), 17: (1, {'@': 77}), 18: (1, {'@': 77}), 19: (1, {'@': 77}), 5: (1, {'@': 77})}, 131: {20: (1, {'@': 30}), 21: (1, {'@': 30}), 0: (1, {'@': 30}), 22: (1, {'@': 30}), 23: (1, {'@': 30}), 1: (1, {'@': 30}), 2: (1, {'@': 30}), 3: (1, {'@': 30}), 24: (1, {'@': 30}), 25: (1, {'@': 30}), 4: (1, {'@': 30}), 5: (1, {'@': 30}), 6: (1, {'@': 30}), 26: (1, {'@': 30}), 7: (1, {'@': 30}), 27: (1, {'@': 30}), 28: (1, {'@': 30}), 29: (1, {'@': 30}), 30: (1, {'@': 30}), 8: (1, {'@': 30}), 31: (1, {'@': 30}), 9: (1, {'@': 30}), 32: (1, {'@': 30}), 33: (1, {'@': 30}), 10: (1, {'@': 30}), 35: (1, {'@': 30}), 34: (1, {'@': 30})}, 132: {20: (1, {'@': 44}), 21: (1, {'@': 44}), 0: (1, {'@': 44}), 22: (1, {'@': 44}), 23: (1, {'@': 44}), 1: (1, {'@': 44}), 2: (1, {'@': 44}), 3: (1, {'@': 44}), 24: (1, {'@': 44}), 25: (1, {'@': 44}), 4: (1, {'@': 44}), 5: (1, {'@': 44}), 6: (1, {'@': 44}), 26: (1, {'@': 44}), 7: (1, {'@': 44}), 27: (1, {'@': 44}), 28: (1, {'@': 44}), 29: (1, {'@': 44}), 30: (1, {'@': 44}), 8: (1, {'@': 44}), 31: (1, {'@': 44}), 9: (1, {'@': 44}), 32: (1, {'@': 44}), 33: (1, {'@': 44}), 10: (1, {'@': 44}), 35: (1, {'@': 44}), 34: (1, {'@': 44})}, 133: {68: (0, 122), 31: (0, 170), 21: (0, 173), 37: (0, 6), 40: (0, 3), 30: (0, 12), 23: (0, 15), 38: (0, 20), 24: (0, 43), 32: (0, 38), 45: (0, 55), 42: (0, 58), 43: (0, 60), 28: (0, 81), 39: (0, 80), 44: (0, 101), 25: (0, 93), 26: (0, 96), 49: (0, 84), 46: (0, 121), 27: (0, 123), 48: (0, 105), 29: (0, 106), 34: (0, 42), 36: (0, 117), 47: (0, 118), 50: (0, 127), 33: (0, 155), 41: (0, 145), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82})}, 134: {68: (0, 8), 31: (0, 170), 21: (0, 173), 37: (0, 6), 40: (0, 3), 30: (0, 12), 23: (0, 15), 38: (0, 20), 24: (0, 43), 32: (0, 38), 45: (0, 55), 42: (0, 58), 43: (0, 60), 28: (0, 81), 39: (0, 80), 44: (0, 101), 25: (0, 93), 26: (0, 96), 49: (0, 84), 46: (0, 121), 27: (0, 123), 48: (0, 105), 29: (0, 106), 36: (0, 117), 47: (0, 118), 50: (0, 127), 33: (0, 155), 41: (0, 145), 79: (0, 165), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82})}, 135: {8: (0, 151), 7: (0, 150), 4: (0, 0), 9: (0, 1), 55: (0, 2), 10: (0, 160), 1: (0, 159), 5: (0, 148), 2: (0, 4), 3: (0, 9), 54: (0, 33), 6: (0, 28), 60: (0, 35), 56: (0, 31), 57: (0, 27), 0: (0, 41), 53: (0, 47)}, 136: {71: (0, 83), 8: (0, 151), 55: (0, 2), 72: (0, 75), 3: (0, 9), 53: (0, 116), 54: (0, 33), 6: (0, 124), 2: (0, 129), 56: (0, 31), 0: (0, 108), 61: (0, 130)}, 137: {4: (1, {'@': 98}), 5: (1, {'@': 98})}, 138: {80: (0, 166)}, 139: {68: (0, 164), 31: (0, 170), 21: (0, 173), 37: (0, 6), 40: (0, 3), 30: (0, 12), 23: (0, 15), 38: (0, 20), 24: (0, 43), 32: (0, 38), 45: (0, 55), 42: (0, 58), 43: (0, 60), 28: (0, 81), 39: (0, 80), 44: (0, 101), 25: (0, 93), 26: (0, 96), 49: (0, 84), 46: (0, 121), 27: (0, 123), 48: (0, 105), 29: (0, 106), 36: (0, 117), 47: (0, 118), 50: (0, 127), 33: (0, 155), 41: (0, 145), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82})}, 140: {4: (0, 70), 5: (0, 72)}, 141: {74: (0, 14), 77: (0, 37), 75: (0, 137), 8: (0, 151), 53: (0, 154), 9: (0, 1), 55: (0, 2), 10: (0, 160), 2: (0, 143), 1: (0, 159), 57: (0, 95), 0: (0, 41), 54: (0, 33), 3: (0, 9), 6: (0, 28), 56: (0, 31), 4: (1, {'@': 99}), 5: (1, {'@': 99})}, 142: {20: (1, {'@': 10}), 21: (1, {'@': 10}), 0: (1, {'@': 10}), 22: (1, {'@': 10}), 23: (1, {'@': 10}), 1: (1, {'@': 10}), 2: (1, {'@': 10}), 3: (1, {'@': 10}), 24: (1, {'@': 10}), 25: (1, {'@': 10}), 4: (1, {'@': 10}), 5: (1, {'@': 10}), 6: (1, {'@': 10}), 26: (1, {'@': 10}), 7: (1, {'@': 10}), 27: (1, {'@': 10}), 28: (1, {'@': 10}), 29: (1, {'@': 10}), 30: (1, {'@': 10}), 8: (1, {'@': 10}), 31: (1, {'@': 10}), 9: (1, {'@': 10}), 32: (1, {'@': 10}), 33: (1, {'@': 10}), 10: (1, {'@': 10}), 34: (1, {'@': 10}), 35: (1, {'@': 10})}, 143: {74: (0, 14), 77: (0, 40), 75: (0, 137), 8: (0, 151), 53: (0, 154), 9: (0, 1), 55: (0, 2), 10: (0, 160), 2: (0, 143), 1: (0, 159), 57: (0, 95), 0: (0, 41), 54: (0, 33), 3: (0, 9), 6: (0, 28), 56: (0, 31), 4: (1, {'@': 99}), 5: (1, {'@': 99})}, 144: {8: (0, 151), 4: (0, 0), 9: (0, 1), 55: (0, 2), 10: (0, 160), 1: (0, 159), 5: (0, 148), 2: (0, 4), 3: (0, 9), 54: (0, 33), 6: (0, 28), 60: (0, 35), 56: (0, 31), 57: (0, 27), 0: (0, 41), 53: (0, 47), 7: (1, {'@': 46})}, 145: {20: (1, {'@': 1}), 21: (1, {'@': 1}), 0: (1, {'@': 1}), 22: (1, {'@': 1}), 23: (1, {'@': 1}), 1: (1, {'@': 1}), 2: (1, {'@': 1}), 3: (1, {'@': 1}), 24: (1, {'@': 1}), 25: (1, {'@': 1}), 4: (1, {'@': 1}), 5: (1, {'@': 1}), 6: (1, {'@': 1}), 26: (1, {'@': 1}), 7: (1, {'@': 1}), 27: (1, {'@': 1}), 28: (1, {'@': 1}), 29: (1, {'@': 1}), 30: (1, {'@': 1}), 8: (1, {'@': 1}), 31: (1, {'@': 1}), 9: (1, {'@': 1}), 32: (1, {'@': 1}), 33: (1, {'@': 1}), 10: (1, {'@': 1}), 34: (1, {'@': 1}), 35: (1, {'@': 1})}, 146: {20: (1, {'@': 22}), 21: (1, {'@': 22}), 0: (1, {'@': 22}), 22: (1, {'@': 22}), 23: (1, {'@': 22}), 1: (1, {'@': 22}), 2: (1, {'@': 22}), 3: (1, {'@': 22}), 24: (1, {'@': 22}), 25: (1, {'@': 22}), 4: (1, {'@': 22}), 5: (1, {'@': 22}), 6: (1, {'@': 22}), 26: (1, {'@': 22}), 7: (1, {'@': 22}), 27: (1, {'@': 22}), 28: (1, {'@': 22}), 29: (1, {'@': 22}), 30: (1, {'@': 22}), 8: (1, {'@': 22}), 31: (1, {'@': 22}), 9: (1, {'@': 22}), 32: (1, {'@': 22}), 33: (1, {'@': 22}), 10: (1, {'@': 22}), 34: (1, {'@': 22}), 35: (1, {'@': 22})}, 147: {69: (0, 153), 81: (0, 22), 4: (1, {'@': 47}), 5: (1, {'@': 47}), 3: (1, {'@': 47}), 6: (1, {'@': 47}), 0: (1, {'@': 47}), 7: (1, {'@': 47}), 8: (1, {'@': 47}), 1: (1, {'@': 47}), 2: (1, {'@': 47}), 9: (1, {'@': 47}), 10: (1, {'@': 47})}, 148: {0: (1, {'@': 86}), 1: (1, {'@': 86}), 2: (1, {'@': 86}), 3: (1, {'@': 86}), 4: (1, {'@': 86}), 5: (1, {'@': 86}), 6: (1, {'@': 86}), 7: (1, {'@': 86}), 8: (1, {'@': 86}), 9: (1, {'@': 86}), 10: (1, {'@': 86})}, 149: {68: (0, 61), 31: (0, 170), 21: (0, 173), 37: (0, 6), 40: (0, 3), 30: (0, 12), 23: (0, 15), 38: (0, 20), 24: (0, 43), 32: (0, 38), 45: (0, 55), 42: (0, 58), 43: (0, 60), 28: (0, 81), 39: (0, 80), 44: (0, 101), 25: (0, 93), 26: (0, 96), 49: (0, 84), 46: (0, 121), 27: (0, 123), 48: (0, 105), 29: (0, 106), 36: (0, 117), 47: (0, 118), 50: (0, 127), 33: (0, 155), 41: (0, 145), 34: (0, 131), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82})}, 150: {20: (1, {'@': 21}), 21: (1, {'@': 21}), 0: (1, {'@': 21}), 22: (1, {'@': 21}), 23: (1, {'@': 21}), 1: (1, {'@': 21}), 2: (1, {'@': 21}), 3: (1, {'@': 21}), 24: (1, {'@': 21}), 25: (1, {'@': 21}), 4: (1, {'@': 21}), 5: (1, {'@': 21}), 6: (1, {'@': 21}), 26: (1, {'@': 21}), 7: (1, {'@': 21}), 27: (1, {'@': 21}), 28: (1, {'@': 21}), 29: (1, {'@': 21}), 30: (1, {'@': 21}), 8: (1, {'@': 21}), 31: (1, {'@': 21}), 9: (1, {'@': 21}), 32: (1, {'@': 21}), 33: (1, {'@': 21}), 10: (1, {'@': 21}), 34: (1, {'@': 21}), 35: (1, {'@': 21})}, 151: {8: (0, 151), 3: (0, 9), 56: (0, 77)}, 152: {0: (0, 108), 54: (0, 33), 8: (0, 151), 55: (0, 2), 3: (0, 9), 53: (0, 116), 6: (0, 124), 2: (0, 129), 61: (0, 73), 56: (0, 31)}, 153: {82: (0, 169), 3: (0, 50), 59: (0, 172)}, 154: {0: (1, {'@': 102}), 6: (1, {'@': 102}), 4: (1, {'@': 102}), 5: (1, {'@': 102}), 10: (1, {'@': 102}), 8: (1, {'@': 102}), 1: (1, {'@': 102}), 2: (1, {'@': 102}), 9: (1, {'@': 102}), 3: (1, {'@': 102})}, 155: {3: (0, 175)}, 156: {20: (1, {'@': 53}), 21: (1, {'@': 53}), 0: (1, {'@': 53}), 22: (1, {'@': 53}), 23: (1, {'@': 53}), 1: (1, {'@': 53}), 2: (1, {'@': 53}), 3: (1, {'@': 53}), 24: (1, {'@': 53}), 25: (1, {'@': 53}), 4: (1, {'@': 53}), 5: (1, {'@': 53}), 6: (1, {'@': 53}), 26: (1, {'@': 53}), 7: (1, {'@': 53}), 27: (1, {'@': 53}), 28: (1, {'@': 53}), 29: (1, {'@': 53}), 30: (1, {'@': 53}), 8: (1, {'@': 53}), 31: (1, {'@': 53}), 9: (1, {'@': 53}), 32: (1, {'@': 53}), 33: (1, {'@': 53}), 10: (1, {'@': 53}), 35: (1, {'@': 53}), 34: (1, {'@': 53})}, 157: {20: (1, {'@': 19}), 21: (1, {'@': 19}), 0: (1, {'@': 19}), 22: (1, {'@': 19}), 23: (1, {'@': 19}), 1: (1, {'@': 19}), 2: (1, {'@': 19}), 3: (1, {'@': 19}), 24: (1, {'@': 19}), 25: (1, {'@': 19}), 4: (1, {'@': 19}), 5: (1, {'@': 19}), 6: (1, {'@': 19}), 26: (1, {'@': 19}), 7: (1, {'@': 19}), 27: (1, {'@': 19}), 28: (1, {'@': 19}), 29: (1, {'@': 19}), 30: (1, {'@': 19}), 8: (1, {'@': 19}), 31: (1, {'@': 19}), 9: (1, {'@': 19}), 32: (1, {'@': 19}), 33: (1, {'@': 19}), 10: (1, {'@': 19}), 34: (1, {'@': 19}), 35: (1, {'@': 19})}, 158: {0: (1, {'@': 104}), 6: (1, {'@': 104}), 4: (1, {'@': 104}), 5: (1, {'@': 104}), 10: (1, {'@': 104}), 8: (1, {'@': 104}), 1: (1, {'@': 104}), 2: (1, {'@': 104}), 9: (1, {'@': 104}), 3: (1, {'@': 104})}, 159: {0: (1, {'@': 24}), 1: (1, {'@': 24}), 2: (1, {'@': 24}), 3: (1, {'@': 24}), 4: (1, {'@': 24}), 6: (1, {'@': 24}), 5: (1, {'@': 24}), 8: (1, {'@': 24}), 9: (1, {'@': 24}), 10: (1, {'@': 24}), 7: (1, {'@': 24})}, 160: {0: (1, {'@': 26}), 1: (1, {'@': 26}), 2: (1, {'@': 26}), 3: (1, {'@': 26}), 4: (1, {'@': 26}), 6: (1, {'@': 26}), 5: (1, {'@': 26}), 8: (1, {'@': 26}), 9: (1, {'@': 26}), 10: (1, {'@': 26}), 7: (1, {'@': 26})}, 161: {0: (0, 108), 54: (0, 33), 8: (0, 151), 55: (0, 2), 3: (0, 9), 53: (0, 116), 61: (0, 23), 6: (0, 124), 2: (0, 129), 56: (0, 31)}, 162: {7: (1, {'@': 32})}, 163: {7: (0, 139)}, 164: {21: (0, 173), 36: (0, 157), 37: (0, 6), 31: (0, 170), 23: (0, 15), 38: (0, 135), 24: (0, 43), 32: (0, 38), 39: (0, 97), 40: (0, 99), 41: (0, 94), 42: (0, 109), 43: (0, 60), 44: (0, 112), 25: (0, 93), 26: (0, 96), 45: (0, 114), 27: (0, 123), 46: (0, 103), 47: (0, 119), 48: (0, 105), 49: (0, 128), 29: (0, 106), 50: (0, 127), 33: (0, 155), 28: (0, 81), 30: (0, 12), 20: (1, {'@': 62}), 4: (1, {'@': 82}), 5: (1, {'@': 82}), 3: (1, {'@': 82}), 6: (1, {'@': 82}), 0: (1, {'@': 82}), 7: (1, {'@': 82}), 8: (1, {'@': 82}), 1: (1, {'@': 82}), 2: (1, {'@': 82}), 9: (1, {'@': 82}), 10: (1, {'@': 82})}, 165: {}, 166: {0: (1, {'@': 37}), 6: (1, {'@': 37}), 65: (1, {'@': 37}), 8: (1, {'@': 37}), 2: (1, {'@': 37}), 3: (1, {'@': 37})}, 167: {20: (1, {'@': 57}), 21: (1, {'@': 57}), 0: (1, {'@': 57}), 22: (1, {'@': 57}), 23: (1, {'@': 57}), 1: (1, {'@': 57}), 2: (1, {'@': 57}), 3: (1, {'@': 57}), 24: (1, {'@': 57}), 25: (1, {'@': 57}), 4: (1, {'@': 57}), 5: (1, {'@': 57}), 6: (1, {'@': 57}), 26: (1, {'@': 57}), 7: (1, {'@': 57}), 27: (1, {'@': 57}), 28: (1, {'@': 57}), 29: (1, {'@': 57}), 30: (1, {'@': 57}), 8: (1, {'@': 57}), 31: (1, {'@': 57}), 9: (1, {'@': 57}), 32: (1, {'@': 57}), 33: (1, {'@': 57}), 10: (1, {'@': 57}), 35: (1, {'@': 57}), 34: (1, {'@': 57})}, 168: {20: (1, {'@': 31}), 21: (1, {'@': 31}), 0: (1, {'@': 31}), 22: (1, {'@': 31}), 23: (1, {'@': 31}), 1: (1, {'@': 31}), 2: (1, {'@': 31}), 3: (1, {'@': 31}), 24: (1, {'@': 31}), 25: (1, {'@': 31}), 4: (1, {'@': 31}), 5: (1, {'@': 31}), 6: (1, {'@': 31}), 26: (1, {'@': 31}), 7: (1, {'@': 31}), 27: (1, {'@': 31}), 28: (1, {'@': 31}), 29: (1, {'@': 31}), 30: (1, {'@': 31}), 8: (1, {'@': 31}), 31: (1, {'@': 31}), 9: (1, {'@': 31}), 32: (1, {'@': 31}), 33: (1, {'@': 31}), 10: (1, {'@': 31}), 35: (1, {'@': 31}), 34: (1, {'@': 31})}, 169: {4: (0, 63), 59: (0, 30)}, 170: {3: (0, 110)}, 171: {20: (0, 69)}, 172: {4: (1, {'@': 48}), 5: (1, {'@': 48}), 3: (1, {'@': 48}), 6: (1, {'@': 48}), 0: (1, {'@': 48}), 7: (1, {'@': 48}), 8: (1, {'@': 48}), 1: (1, {'@': 48}), 2: (1, {'@': 48}), 9: (1, {'@': 48}), 10: (1, {'@': 48})}, 173: {3: (0, 88)}, 174: {71: (0, 98), 8: (0, 151), 55: (0, 2), 3: (0, 9), 53: (0, 116), 54: (0, 33), 6: (0, 124), 2: (0, 129), 56: (0, 31), 0: (0, 108), 61: (0, 130)}, 175: {7: (1, {'@': 64})}}, 'start_states': {'start': 134}, 'end_states': {'start': 165}}, '__type__': 'ParsingFrontend'}, 'rules': [{'@': 0}, {'@': 1}, {'@': 2}, {'@': 3}, {'@': 4}, {'@': 5}, {'@': 6}, {'@': 7}, {'@': 8}, {'@': 9}, {'@': 10}, {'@': 11}, {'@': 12}, {'@': 13}, {'@': 14}, {'@': 15}, {'@': 16}, {'@': 17}, {'@': 18}, {'@': 19}, {'@': 20}, {'@': 21}, {'@': 22}, {'@': 23}, {'@': 24}, {'@': 25}, {'@': 26}, {'@': 27}, {'@': 28}, {'@': 29}, {'@': 30}, {'@': 31}, {'@': 32}, {'@': 33}, {'@': 34}, {'@': 35}, {'@': 36}, {'@': 37}, {'@': 38}, {'@': 39}, {'@': 40}, {'@': 41}, {'@': 42}, {'@': 43}, {'@': 44}, {'@': 45}, {'@': 46}, {'@': 47}, {'@': 48}, {'@': 49}, {'@': 50}, {'@': 51}, {'@': 52}, {'@': 53}, {'@': 54}, {'@': 55}, {'@': 56}, {'@': 57}, {'@': 58}, {'@': 59}, {'@': 60}, {'@': 61}, {'@': 62}, {'@': 63}, {'@': 64}, {'@': 65}, {'@': 66}, {'@': 67}, {'@': 68}, {'@': 69}, {'@': 70}, {'@': 71}, {'@': 72}, {'@': 73}, {'@': 74}, {'@': 75}, {'@': 76}, {'@': 77}, {'@': 78}, {'@': 79}, {'@': 80}, {'@': 81}, {'@': 82}, {'@': 83}, {'@': 84}, {'@': 85}, {'@': 86}, {'@': 87}, {'@': 88}, {'@': 89}, {'@': 90}, {'@': 91}, {'@': 92}, {'@': 93}, {'@': 94}, {'@': 95}, {'@': 96}, {'@': 97}, {'@': 98}, {'@': 99}, {'@': 100}, {'@': 101}, {'@': 102}, {'@': 103}, {'@': 104}, {'@': 105}, {'@': 106}], 'options': {'debug': False, 'strict': False, 'keep_all_tokens': False, 'tree_class': None, 'cache': False, 'cache_grammar': False, 'postlex': None, 'parser': 'lalr', 'lexer': 'contextual', 'transformer': None, 'start': ['start'], 'priority': 'normal', 'ambiguity': 'auto', 'regex': False, 'propagate_positions': False, 'lexer_callbacks': {}, 'maybe_placeholders': False, 'edit_terminals': None, 'g_regex_flags': 0, 'use_bytes': False, 'ordered_sets': True, 'import_paths': [], 'source_path': None, '_plugins': {}}, '__type__': 'Lark'} +) +MEMO = ( +{0: {'origin': {'name': 'start', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 1: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'include_file', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 2: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'line', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 3: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'init', '__type__': 'NonTerminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 4: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'undef', '__type__': 'NonTerminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 5: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ifdef', '__type__': 'NonTerminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 6: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'require', '__type__': 'NonTerminal'}], 'order': 5, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 7: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'pragma', '__type__': 'NonTerminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 8: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'errormsg', '__type__': 'NonTerminal'}], 'order': 7, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 9: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'warningmsg', '__type__': 'NonTerminal'}], 'order': 8, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 10: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'defs', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 9, 'alias': 'program_tokenstring', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 11: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'define', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 10, 'alias': 'program_tokenstring_2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 12: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'include_file', '__type__': 'NonTerminal'}], 'order': 11, 'alias': 'program_char', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 13: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'line', '__type__': 'NonTerminal'}], 'order': 12, 'alias': 'program_char', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 14: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'init', '__type__': 'NonTerminal'}], 'order': 13, 'alias': 'program_char', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 15: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'undef', '__type__': 'NonTerminal'}], 'order': 14, 'alias': 'program_char', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 16: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'ifdef', '__type__': 'NonTerminal'}], 'order': 15, 'alias': 'program_char', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 17: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'require', '__type__': 'NonTerminal'}], 'order': 16, 'alias': 'program_char', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 18: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'pragma', '__type__': 'NonTerminal'}], 'order': 17, 'alias': 'program_char', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 19: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'errormsg', '__type__': 'NonTerminal'}], 'order': 18, 'alias': 'program_char', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 20: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'warningmsg', '__type__': 'NonTerminal'}], 'order': 19, 'alias': 'program_char', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 21: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'defs', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 20, 'alias': 'program_newline', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 22: {'origin': {'name': 'program', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'program', '__type__': 'NonTerminal'}, {'name': 'define', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 21, 'alias': 'program_newline_2', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 23: {'origin': {'name': 'token', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 24: {'origin': {'name': 'token', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'TOKEN', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 25: {'origin': {'name': 'token', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'CONTINUE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 26: {'origin': {'name': 'token', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'SEPARATOR', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 27: {'origin': {'name': 'token', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NUMBER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 28: {'origin': {'name': 'include_file', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'include', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program', '__type__': 'NonTerminal'}, {'name': 'ENDFILE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 29: {'origin': {'name': 'include_file', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'include', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ENDFILE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'include_file_empty', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 30: {'origin': {'name': 'include_file', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'include_once', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ENDFILE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'include_once_empty', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 31: {'origin': {'name': 'include_file', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'include_once', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program', '__type__': 'NonTerminal'}, {'name': 'ENDFILE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'include_once_ok', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 32: {'origin': {'name': 'include', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCLUDE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'include_modifier', '__type__': 'NonTerminal'}, {'name': 'FILENAME', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'include_fname', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 33: {'origin': {'name': 'include', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCLUDE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'include_modifier', '__type__': 'NonTerminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'include_macro', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 34: {'origin': {'name': 'include_once', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCLUDE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ONCE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'include_modifier', '__type__': 'NonTerminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'include_once_str', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 35: {'origin': {'name': 'include_once', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INCLUDE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ONCE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'include_modifier', '__type__': 'NonTerminal'}, {'name': 'FILENAME', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'include_once_fname', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 36: {'origin': {'name': 'include_modifier', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'include_modifier_empty', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 37: {'origin': {'name': 'include_modifier', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LB', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'CO', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RB', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'include_modifier_arch', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 38: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 39: {'origin': {'name': 'line', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'line_file', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 40: {'origin': {'name': 'require', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'REQUIRE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 41: {'origin': {'name': 'init', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INIT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'init_id', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 42: {'origin': {'name': 'init', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'INIT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'init_str', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 43: {'origin': {'name': 'undef', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'UNDEF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 44: {'origin': {'name': 'errormsg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ERROR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'TEXT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 45: {'origin': {'name': 'warningmsg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'WARNING', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'TEXT', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 46: {'origin': {'name': 'define', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'DEFINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'params', '__type__': 'NonTerminal'}, {'name': 'defs', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 47: {'origin': {'name': 'params', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'params_epsilon', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 48: {'origin': {'name': 'params', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'params_empty', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 49: {'origin': {'name': 'params', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'paramlist', '__type__': 'NonTerminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'params_paramlist', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 50: {'origin': {'name': 'paramlist', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'paramlist_single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 51: {'origin': {'name': 'paramlist', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'paramlist', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'paramlist_paramlist', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 52: {'origin': {'name': 'pragma', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRAGMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'pragma_id', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 53: {'origin': {'name': 'pragma', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRAGMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'pragma_id_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 54: {'origin': {'name': 'pragma', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRAGMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'INTEGER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'pragma_id_expr', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 55: {'origin': {'name': 'pragma', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRAGMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'pragma_id_string', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 56: {'origin': {'name': 'pragma', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRAGMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'PUSH', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 4, 'alias': 'pragma_push', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 57: {'origin': {'name': 'pragma', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRAGMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'POP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'LP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'RP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'pragma_push', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 58: {'origin': {'name': 'pragma', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'PRAGMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ONCE', 'filter_out': False, '__type__': 'Terminal'}], 'order': 6, 'alias': 'pragma_once', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 59: {'origin': {'name': 'ifdef', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_header', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program', '__type__': 'NonTerminal'}, {'name': 'ENDIF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 60: {'origin': {'name': 'ifdef', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ifdefelsea', '__type__': 'NonTerminal'}, {'name': 'ifdefelseb', '__type__': 'NonTerminal'}, {'name': 'ENDIF', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'ifdef_else', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 61: {'origin': {'name': 'ifdefelsea', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'if_header', '__type__': 'NonTerminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 62: {'origin': {'name': 'ifdefelseb', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ELSE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'NEWLINE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'program', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 63: {'origin': {'name': 'if_header', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IFDEF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': 'ifdef_header', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 64: {'origin': {'name': 'if_header', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IFNDEF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'ifndef_header', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 65: {'origin': {'name': 'if_header', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'IF', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'if_expr_header', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 66: {'origin': {'name': 'expr', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_or', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 67: {'origin': {'name': 'expr_or', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_or', '__type__': 'NonTerminal'}, {'name': 'OR', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_and', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expror', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 68: {'origin': {'name': 'expr_or', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_and', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 69: {'origin': {'name': 'expr_and', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_and', '__type__': 'NonTerminal'}, {'name': 'AND', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_cmp', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'exprand', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 70: {'origin': {'name': 'expr_and', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 71: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'EQ', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_atom', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expreq', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 72: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'NE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_atom', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'exprne', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 73: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'LT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_atom', '__type__': 'NonTerminal'}], 'order': 2, 'alias': 'exprlt', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 74: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'LE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_atom', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'exprle', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 75: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'GT', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_atom', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'exprgt', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 76: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_cmp', '__type__': 'NonTerminal'}, {'name': 'GE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr_atom', '__type__': 'NonTerminal'}], 'order': 5, 'alias': 'exprge', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 77: {'origin': {'name': 'expr_cmp', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'expr_atom', '__type__': 'NonTerminal'}], 'order': 6, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 78: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'macrocall', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'expr_macrocall', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 79: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'NUMBER', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'expr_val', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 80: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STRING', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'expr_str', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 81: {'origin': {'name': 'expr_atom', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LLP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'expr', '__type__': 'NonTerminal'}, {'name': 'RRP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'expr_par', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 82: {'origin': {'name': 'defs', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'defs_list_eps', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 83: {'origin': {'name': 'defs', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'defs', '__type__': 'NonTerminal'}, {'name': 'def_item', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'defs_list', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 84: {'origin': {'name': 'def_item', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'token', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'def_item_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 85: {'origin': {'name': 'def_item', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'def_item_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 86: {'origin': {'name': 'def_item', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'RRP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'def_item_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 87: {'origin': {'name': 'def_item', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LLP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 3, 'alias': 'def_item_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 88: {'origin': {'name': 'def_item', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'macrocall', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'def_macrocall', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 89: {'origin': {'name': 'macrocall', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'macrocall_call', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 90: {'origin': {'name': 'macrocall_call', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'macrocall_call', '__type__': 'NonTerminal'}, {'name': 'args', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'macrocall_args', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 91: {'origin': {'name': 'macrocall_call', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'macrocall_paste', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 92: {'origin': {'name': 'macrocall_paste', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'macrocall_paste', '__type__': 'NonTerminal'}, {'name': 'PASTE', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'macrocall_unary', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'macrocall_paste', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 93: {'origin': {'name': 'macrocall_paste', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'macrocall_unary', '__type__': 'NonTerminal'}], 'order': 1, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 94: {'origin': {'name': 'macrocall_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'STRINGIZING', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'macrocall_unary', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'macrocall_stringizing', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 95: {'origin': {'name': 'macrocall_unary', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'ID', 'filter_out': False, '__type__': 'Terminal'}], 'order': 1, 'alias': 'macrocall_id', 'options': {'keep_all_tokens': False, 'expand1': True, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 96: {'origin': {'name': 'args', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LLP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arglist', '__type__': 'NonTerminal'}, {'name': 'RRP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 97: {'origin': {'name': 'arglist', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'arglist', '__type__': 'NonTerminal'}, {'name': 'COMMA', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arg', '__type__': 'NonTerminal'}], 'order': 0, 'alias': None, 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 98: {'origin': {'name': 'arglist', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'arg', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'arglist_single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 99: {'origin': {'name': 'arg', '__type__': 'NonTerminal'}, 'expansion': [], 'order': 0, 'alias': 'arg_eps', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 100: {'origin': {'name': 'arg', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'argstring', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'arg_val', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 101: {'origin': {'name': 'argstring', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'token', '__type__': 'NonTerminal'}], 'order': 0, 'alias': 'argstring_token_single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 102: {'origin': {'name': 'argstring', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'macrocall', '__type__': 'NonTerminal'}], 'order': 1, 'alias': 'argstring_macrocall_single', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 103: {'origin': {'name': 'argstring', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'LLP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arglist', '__type__': 'NonTerminal'}, {'name': 'RRP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 2, 'alias': 'argstring_argslist', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 104: {'origin': {'name': 'argstring', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'argstring', '__type__': 'NonTerminal'}, {'name': 'token', '__type__': 'NonTerminal'}], 'order': 3, 'alias': 'argstring_token', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 105: {'origin': {'name': 'argstring', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'argstring', '__type__': 'NonTerminal'}, {'name': 'macrocall', '__type__': 'NonTerminal'}], 'order': 4, 'alias': 'argstring_macrocall', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}, 106: {'origin': {'name': 'argstring', '__type__': 'NonTerminal'}, 'expansion': [{'name': 'argstring', '__type__': 'NonTerminal'}, {'name': 'LLP', 'filter_out': False, '__type__': 'Terminal'}, {'name': 'arglist', '__type__': 'NonTerminal'}, {'name': 'RRP', 'filter_out': False, '__type__': 'Terminal'}], 'order': 5, 'alias': 'argstring_argstring', 'options': {'keep_all_tokens': False, 'expand1': False, 'priority': None, 'template_source': None, 'empty_indices': (), '__type__': 'RuleOptions'}, '__type__': 'Rule'}} +) +Shift = 0 +Reduce = 1 +def Lark_StandAlone(**kwargs): + return Lark._load_from_dict(DATA, MEMO, **kwargs) diff --git a/src/zxbpp/zxbpplex.py b/src/zxbpp/zxbpplex.py index d8ab506c7..a3e34d5c6 100755 --- a/src/zxbpp/zxbpplex.py +++ b/src/zxbpp/zxbpplex.py @@ -10,8 +10,7 @@ import re import sys -from src.api import global_ -from src.ply import lex +from src.api import global_, lex from src.zxbpp.base_pplex import BaseLexer, ReservedDirectives from src.zxbpp.prepro.definestable import DefinesTable diff --git a/tests/functional/cmdline/test_cmdline.txt b/tests/functional/cmdline/test_cmdline.txt index 3fcf536b1..14241bd61 100644 --- a/tests/functional/cmdline/test_cmdline.txt +++ b/tests/functional/cmdline/test_cmdline.txt @@ -26,11 +26,20 @@ zxbc.py: error: Option --asm and --mmap cannot be used together >>> process_file('asm/no_zxnext.asm') no_zxnext.asm:8: error: Syntax error. Unexpected token 'D' [D] no_zxnext.asm:9: error: Syntax error. Unexpected token 'A' [A] +no_zxnext.asm:10: error: Syntax error. Unexpected token 'DE' [DE] +no_zxnext.asm:11: error: Syntax error. Unexpected token 'BC' [BC] no_zxnext.asm:12: error: Syntax error. Unexpected token '513' [INTEGER] +no_zxnext.asm:13: error: Syntax error. Unexpected token 'DE' [DE] no_zxnext.asm:14: error: Syntax error. Unexpected token 'BC' [BC] no_zxnext.asm:17: error: Syntax error. Unexpected token '17185' [INTEGER] +no_zxnext.asm:18: error: Syntax error. Unexpected token '55' [INTEGER] no_zxnext.asm:19: error: Syntax error. Unexpected token '51' [INTEGER] no_zxnext.asm:23: error: Syntax error. Unexpected token '119' [INTEGER] +no_zxnext.asm:24: error: Syntax error. Unexpected token 'DE' [DE] +no_zxnext.asm:25: error: Syntax error. Unexpected token 'DE' [DE] +no_zxnext.asm:26: error: Syntax error. Unexpected token 'DE' [DE] +no_zxnext.asm:27: error: Syntax error. Unexpected token 'DE' [DE] +no_zxnext.asm:28: error: Syntax error. Unexpected token 'DE' [DE] no_zxnext.asm:29: error: Syntax error. Unexpected token 'C' [C] >>> process_file('asm/no_zxnext.asm', ['-q', '-S', '-O --zxnext']) diff --git a/tests/functional/cmdline/test_errmsg.txt b/tests/functional/cmdline/test_errmsg.txt index 04c984727..e3ac87e8c 100644 --- a/tests/functional/cmdline/test_errmsg.txt +++ b/tests/functional/cmdline/test_errmsg.txt @@ -53,7 +53,7 @@ ifempty0.bas:3: warning: Useless empty IF ignored >>> process_file('arch/zx48k/llb.bas') llb.bas:3: error: Undeclared function "f$" >>> process_file('arch/zx48k/substr_expr_err.bas') -substr_expr_err.bas:3: error: Expected a string type expression. Got byte type instead +substr_expr_err.bas:2: error: Expected a string type expression. Got byte type instead >>> process_file('arch/zx48k/dup_func_decl.bas') dup_func_decl.bas:5: error: duplicated declaration for function 'f' >>> process_file('arch/zx48k/def_func_inline.bas') diff --git a/tests/zxbc/__init__.py b/tests/zxbc/__init__.py deleted file mode 100644 index 906667a8d..000000000 --- a/tests/zxbc/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# -------------------------------------------------------------------- -# SPDX-License-Identifier: AGPL-3.0-or-later -# © Copyright 2008-2024 José Manuel Rodríguez de la Rosa and contributors. -# See the file CONTRIBUTORS.md for copyright details. -# See https://www.gnu.org/licenses/agpl-3.0.html for details. -# -------------------------------------------------------------------- diff --git a/tests/zxbc/test_build_parsetab.py b/tests/zxbc/test_build_parsetab.py deleted file mode 100644 index c6745d7ec..000000000 --- a/tests/zxbc/test_build_parsetab.py +++ /dev/null @@ -1,26 +0,0 @@ -# -------------------------------------------------------------------- -# SPDX-License-Identifier: AGPL-3.0-or-later -# © Copyright 2008-2024 José Manuel Rodríguez de la Rosa and contributors. -# See the file CONTRIBUTORS.md for copyright details. -# See https://www.gnu.org/licenses/agpl-3.0.html for details. -# -------------------------------------------------------------------- - -from unittest import mock - -from src.ply.yacc import LRParser - - -class TestBuildParsetab: - @mock.patch("src.api.utils.load_object", return_value=None) - @mock.patch("src.api.utils.save_object", lambda key, obj: obj) - def test_build_parsetab(self, mock_load_object): - from src.zxbc import zxbparser - - parser = zxbparser.parser - assert isinstance(parser, LRParser), "Could not generate an rparser" - - def test_loads_parsetab(self): - from src.zxbc import zxbparser - - parser = zxbparser.parser - assert isinstance(parser, LRParser), "Could not load an rparser"