From 65cae417161b272ad2bcd1da6635e079ae479f85 Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Mon, 14 Oct 2024 22:25:24 +0200 Subject: [PATCH 01/14] Major update preparing 1.0 release --- examples/filtering.ipynb | 2 +- examples/visualization.ipynb | 41 +- glyles/glycans/factory/factory.py | 3 + glyles/glycans/factory/factory_o.py | 6 +- glyles/glycans/mono/enum_c.py | 18 +- glyles/glycans/mono/monomer.py | 14 +- glyles/glycans/mono/reactor.py | 7 +- glyles/glycans/mono/reactor_basic.py | 3 + glyles/glycans/poly/glycan.py | 61 +- glyles/glycans/poly/merger.py | 75 +- glyles/glycans/poly/walker.py | 66 +- glyles/glycans/utils.py | 10 +- glyles/grammar/Glycan.g4 | 140 +- glyles/grammar/Glycan.interp | 81 +- glyles/grammar/Glycan.tokens | 71 +- glyles/grammar/GlycanLexer.interp | 105 +- glyles/grammar/GlycanLexer.py | 716 +++++------ glyles/grammar/GlycanLexer.tokens | 71 +- glyles/grammar/GlycanListener.py | 103 +- glyles/grammar/GlycanParser.py | 1764 ++++++++++++++++++++------ glyles/grammar/__init__.py | 0 tests/data/snfg.png | Bin 8427 -> 0 bytes tests/data/viz_snfg.png | Bin 8427 -> 0 bytes tests/test_cli.py | 3 + tests/test_convert.py | 50 +- tests/test_derivatives.py | 2 + 26 files changed, 2357 insertions(+), 1055 deletions(-) delete mode 100644 glyles/grammar/__init__.py delete mode 100644 tests/data/snfg.png delete mode 100644 tests/data/viz_snfg.png diff --git a/examples/filtering.ipynb b/examples/filtering.ipynb index 00a2c91..21a0e15 100644 --- a/examples/filtering.ipynb +++ b/examples/filtering.ipynb @@ -467,4 +467,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +} diff --git a/examples/visualization.ipynb b/examples/visualization.ipynb index 26bb625..4d5e79b 100644 --- a/examples/visualization.ipynb +++ b/examples/visualization.ipynb @@ -77,45 +77,6 @@ "Image(glycan.save_dot(\"files/viz_2.dot\", horizontal=True).create_png())" ] }, - { - "cell_type": "markdown", - "source": [ - "## SNFG Visualization\n", - "\n", - "GlyLES can also be used to visualize glycans using the symbols from the SNFG standard.\n", - "\n", - "To better fit the visualization to your needs, there are some parameter, you can tune to adapt the visualization to your needs. This includes width and height of the whole image, border-size of the symbols, and line width of the edges between the symbols." - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%% md\n" - } - } - }, - { - "cell_type": "code", - "execution_count": 3, - "outputs": [ - { - "data": { - "text/plain": "", - "image/png": "iVBORw0KGgoAAAANSUhEUgAABdwAAAHCCAIAAAB6xJzLAAAeHklEQVR4nO3d3ZaiShKAUZx13v+VnQssGv8QkcyIzNz7YlafHguxqkH4KsDL9XqdAAAAAKjrf9ErAAAAADAiUQYAAAAggCgDAAAAEECUAQAAAAggygAAAAAEEGUAAAAAAogyAAAAAAFEGQAAAIAAogwAAABAAFEGAAAAIIAoAwAAABBAlAEAAAAIIMoAAAAABBBlAAAAAAKIMgAAAAABRBkAAACAAKIMAAAAQABRBgAAACCAKAMAAAAQQJQBAAAACCDKAAAAAAQQZQAAAAACiDIAAAAAAUQZAAAAgAD/Ra8AAAAADORyuUSvwmvX6zV6FYZjUgYAAAAggEkZAAAAqC3VVErW2Z3+mZQBAAAACCDKAAAAAAQQZQAAAAACiDIAAAAAAUQZAAAAgACiDAAAAEAAUQYAAAAggCgDAAAAEECUAQAAAAggygAAAAAEEGUAAAAAAogyAAAAAAFEGQAAAIAAogwAAABAAFEGAAAAIIAoAwAAABBAlAEAAAAI8F/0CgAAAEBXLpfL/Ifr9Rq7JiRnUgYAAABOMxeZOccsdQZeMikDAAAApzEdw36iDAAAAJzJ5Uvs5PIlAAAAONP1enX5EnuIMgAAAHCay+WixbCTKAMAAACnWc/IuHyJbe4pAwAAAGfSYtjJpAwAAABAAJMyAAAAUJBbzPCOKAMAAACnkWDYT5QBAACAg3YmmPVdZlQbFqIMAAAA7HIgwcAGUQYAAABekGAoTZQBAAAACYYAogwAAADDkWDIQJQBAACgcxIMOYky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4f2yDACEzKAKTmeJou5bmhzGz7tjIPfwAAOItJGYCkhBg60PQ/46ZXHmb+GQMkZ1IGAAAAIIBJGYBEXB8BsWyDAEBNJmUAAAAAAogyAAAAAAFcvgSQiDsyMoi0VwnZBhlE2m0QYDQmZQAAAAACiDIAAAAAAUQZAKC2+SqhPNdPzGvi2iUAoDJRBgAAACCAKAMAAAAQQJQBAAAACCDKAAAB8txWxg1lAIAoogwAAABAAFEGAIiRYVjGmAwAEEiUAQAAAAggygAAYWKHZYzJAACxRBkAIF79LpPhHsMAwOBEGQAgUuygijEZACCQKAMABKt/EZMLlwCADEQZACBezS6jyAAASYgyAEAKdbqMIgMA5CHKAABZLF2mRJpZFqvIAABJiDIAQCJLMTm3yyxLU2QAgDxEGQAgl3WX+T3NrBeiyAAAqfwXvQIAAI/+rmO6TP/uAvP1QtZBR44BABISZQCApJ7TzN/fv/2S58kaOQYASEuUAUZW5dN3gd+s08xs5zVNcgx84n0QIJgoAwA0YF1YLu+rjBADADTk4tgFAAAAoD6fvgQAAAAQQJQBAAAACCDKAAAAAAQQZQAAAAACiDIAAAAAAXwkNsB3ls/i9el1AADAL0zKAHxhLjJzjlnqzGUlcuUAAICmmJQBOGIZk3mZaQAAAD4SZQC+tg4x7/4GAABgm8uXAL62nou5Xq8PUzMAAAB7iDIAPzEjAwAAHHNxIgHwlYdPX1pPx9ijAgAA+4kyAAAAAAFcvgQAAAAQQJQBAAAACCDKAAAAAAQQZQAAAAACiDIAAAAAAUQZAAAAgACiDAAAAEAAUQYAAAAggCgDAAAAEECUAQAAAAjwf1DDU1LMf0mEAAAAAElFTkSuQmCC\n" - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "display(glycan.create_snfg_img(\"files/viz_snfg.png\", width=300, height=100))" - ], - "metadata": { - "collapsed": false, - "pycharm": { - "name": "#%%\n" - } - } - }, { "cell_type": "markdown", "source": [ @@ -182,4 +143,4 @@ }, "nbformat": 4, "nbformat_minor": 1 -} \ No newline at end of file +} diff --git a/glyles/glycans/factory/factory.py b/glyles/glycans/factory/factory.py index 193eea7..67fc757 100644 --- a/glyles/glycans/factory/factory.py +++ b/glyles/glycans/factory/factory.py @@ -5,6 +5,9 @@ from glyles.glycans.utils import Config, Enantiomer, Lactole from glyles.grammar.GlycanLexer import GlycanLexer +if not hasattr(GlycanLexer, "MOD"): + GlycanLexer.MOD = GlycanLexer.QMARK + 1 + class MonomerFactory: """ diff --git a/glyles/glycans/factory/factory_o.py b/glyles/glycans/factory/factory_o.py index 533b2e0..31b4ed9 100644 --- a/glyles/glycans/factory/factory_o.py +++ b/glyles/glycans/factory/factory_o.py @@ -204,7 +204,7 @@ def check_for_acid(start, structure, adjacency, a_type): Returns: bool flag indicating if the carbon atom has an acid group """ - oxys = [int(x) for x in np.where((adjacency[start] != 0) & (a_type == 8))[0]] + oxys = [int(x) for x in np.where(np.array(adjacency[start] != 0) & (a_type == 8))[0]] if len(oxys) != 2: return False if (structure.GetBondBetweenAtoms(int(start), oxys[0]).GetBondType() == BondType.SINGLE and @@ -216,7 +216,7 @@ def check_for_acid(start, structure, adjacency, a_type): def check_for_co_double(carbon, structure, adjacency, a_type): - oxys = [int(x) for x in np.where((adjacency[carbon] != 0) & (a_type == 8))[0]] + oxys = [int(x) for x in np.where(np.array(adjacency[carbon] != 0) & (a_type == 8))[0]] return sum(structure.GetBondBetweenAtoms(int(carbon), o).GetBondType() == BondType.DOUBLE for o in oxys) == 1 @@ -232,4 +232,4 @@ def check_for_aldehyd(start, adjacency, a_type): Returns: bool flag indicating if the carbon atom has an aldehyd group """ - return len(np.where((adjacency[start] == 1) & (a_type == 8))[0]) != 0 + return len(np.where(np.array(adjacency[start] == 1) & (a_type == 8))[0]) != 0 diff --git a/glyles/glycans/mono/enum_c.py b/glyles/glycans/mono/enum_c.py index 9725700..6131a17 100644 --- a/glyles/glycans/mono/enum_c.py +++ b/glyles/glycans/mono/enum_c.py @@ -25,7 +25,7 @@ def enumerate_carbon(monomer): # then iterate over all those carbons and enumerate them beginning at C1 for c_id in range(1, next_c_id): c_index = int(np.where(monomer.x[:, 1] == c_id)[0]) - candidates = np.where((monomer.adjacency[c_index, :] != 0) & (monomer.x[:, 1] == 0))[0] + candidates = np.where(np.array(monomer.adjacency[c_index, :] != 0) & (monomer.x[:, 1] == 0))[0] if candidates.size != 0: for candidate in list(candidates): if sum(monomer.adjacency[candidate, :]) > 1: @@ -51,7 +51,7 @@ def enumerate_side_chain(monomer, parent, atom, next_c_id): next_c_id += 1 # identify children - candidates = np.where((monomer.adjacency[atom, :] != 0) & (monomer.x[:, 1] == 0))[0].tolist() + candidates = np.where(np.array(monomer.adjacency[atom, :] != 0) & (monomer.x[:, 1] == 0))[0].tolist() if parent in candidates: candidates.remove(parent) @@ -85,7 +85,7 @@ def enumerate_c_atoms(monomer, c_atoms, ringo): stack = stack[:-1] c_tree.add_node(c_id, p_id) - children = np.where((monomer.adjacency[c_id, :] == 1) & (monomer.x[:, 0] == 6) & (monomer.x[:, 3] == 1))[0] + children = np.where(np.array(monomer.adjacency[c_id, :] == 1) & (monomer.x[:, 0] == 6) & (monomer.x[:, 3] == 1))[0] for c in children: if int(c) not in c_tree.nodes: stack.append((c_id, int(c))) @@ -105,9 +105,9 @@ def enumerate_c_atoms(monomer, c_atoms, ringo): (monomer.x[:, 3] == 1)).squeeze().size > 0, \ np.argwhere((monomer.adjacency[end, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1) & (monomer.x[:, 3] == 1)).squeeze().size > 0""" - start_o_conn = np.argwhere((monomer.adjacency[start, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & + start_o_conn = np.argwhere(np.array(monomer.adjacency[start, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1)).squeeze().size > 0 - end_o_conn = np.argwhere((monomer.adjacency[end, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & + end_o_conn = np.argwhere(np.array(monomer.adjacency[end, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1)).squeeze().size > 0 # decide on c1 @@ -168,18 +168,18 @@ def equidistant(monomer, start, end): Bool indicating that the start id is the C1 atom """ # determine first carbon atom in the ring - c_start_candidates = np.where((monomer.adjacency[start, :] == 1) & + c_start_candidates = np.where(np.array(monomer.adjacency[start, :] == 1) & (monomer.x[:, 0] == 6) & (monomer.x[:, 2] & 0b1))[0] - c_end_candidates = np.where((monomer.adjacency[end, :] == 1) & (monomer.x[:, 0] == 6) & (monomer.x[:, 2] & 0b1))[0] + c_end_candidates = np.where(np.array(monomer.adjacency[end, :] == 1) & (monomer.x[:, 0] == 6) & (monomer.x[:, 2] & 0b1))[0] if c_start_candidates.size == 1 and c_end_candidates.size == 1: start_ring_c = int(c_start_candidates) end_ring_c = int(c_end_candidates) # check if those ring carbons have an attached oxygen - start_ring_c_o_candidates = np.where((monomer.adjacency[start_ring_c, :] == 1) & + start_ring_c_o_candidates = np.where(np.array(monomer.adjacency[start_ring_c, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1))[0] - end_ring_c_o_candidates = np.where((monomer.adjacency[end_ring_c, :] == 1) & + end_ring_c_o_candidates = np.where(np.array(monomer.adjacency[end_ring_c, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1))[0] if start_ring_c_o_candidates.size == 1 and end_ring_c_o_candidates.size == 1: diff --git a/glyles/glycans/mono/monomer.py b/glyles/glycans/mono/monomer.py index 890ce43..0025a39 100644 --- a/glyles/glycans/mono/monomer.py +++ b/glyles/glycans/mono/monomer.py @@ -8,6 +8,9 @@ from glyles.glycans.utils import Config, find_isomorphism_nx from glyles.grammar.GlycanLexer import GlycanLexer +if not hasattr(GlycanLexer, "MOD"): + GlycanLexer.MOD = GlycanLexer.QMARK + 1 + class Monomer: @@ -281,9 +284,6 @@ def mark(self, position, o_atom, n_atom): position (int): id of the carbon atom whose oxygen atom will from the binding o_atom (Tuple[int, str, str]): atom to replace the binding oxygen with n_atom (Tuple[int, str, str]): atom to replace the binding nitrogen with - - Returns: - Nothing """ idx = self.find_oxygen(position) idx = self.__check_root_id(idx) @@ -329,21 +329,21 @@ def __check_root_id(self, root_id): (self.x[root_id, 0] == 7 and sum(self.adjacency[:, root_id]) <= 2): return int(root_id) - neighbors = list(np.where((self.adjacency[:, root_id] != 0) & (self.x[:, 2] != 1))[0]) + neighbors = list(np.where(np.array(self.adjacency[:, root_id] != 0) & (self.x[:, 2] != 1))[0]) candidate = None seen = set() while len(neighbors) != 0: n = neighbors.pop(0) if self.x[n, 0] not in {7, 8}: - neighbors += [k for k in np.where((self.adjacency[:, n] != 0) & (self.x[:, 2] != 1))[0] if + neighbors += [k for k in np.where(np.array(self.adjacency[:, n] != 0) & (self.x[:, 2] != 1))[0] if k not in seen] else: if self.x[n, 0] == 8 and sum(self.adjacency[:, n]) == 1: return int(n) if self.x[n, 0] == 7 and sum(self.adjacency[:, n]) <= 2 and candidate is None: candidate = n - neighbors += [k for k in np.where((self.adjacency[:, n] != 0) & (self.x[:, 2] != 1))[0] if + neighbors += [k for k in np.where(np.array(self.adjacency[:, n] != 0) & (self.x[:, 2] != 1))[0] if k not in seen] seen.add(n) @@ -447,7 +447,7 @@ def find_oxygen(self, binding_c_id=-1, position=None): multiple = False for check in [8, 7]: # then find the candidates. There should be exactly one element in the resulting array - candidates = np.argwhere((self.adjacency[position, :] == 1) & + candidates = np.argwhere(np.array(self.adjacency[position, :] == 1) & (self.x[:, 0] == check) & (self.x[:, 2] != 1)).squeeze() if candidates.size == 1: return int(candidates) diff --git a/glyles/glycans/mono/reactor.py b/glyles/glycans/mono/reactor.py index 8883f70..94bd1ec 100644 --- a/glyles/glycans/mono/reactor.py +++ b/glyles/glycans/mono/reactor.py @@ -11,6 +11,9 @@ from glyles.glycans.utils import Enantiomer, ketoses2, opposite_chirality from glyles.grammar.GlycanLexer import GlycanLexer +if not hasattr(GlycanLexer, "MOD"): + GlycanLexer.MOD = GlycanLexer.QMARK + 1 + O, C = 0, 1 # map of all functional groups from IUPAC name to SMILES string @@ -295,12 +298,12 @@ def react(self, names, types): c_id = int(np.where(self.monomer.x[:, 1] == c_id)[0]) # if the selected carbon has a tail raging away from the monomer, iterate all the way down - children = np.where((self.monomer.adjacency[c_id, :] == 1) & (self.monomer.x[:, 0] == 6) & + children = np.where(np.array(self.monomer.adjacency[c_id, :] == 1) & (self.monomer.x[:, 0] == 6) & (1 - self.monomer.x[:, 2] & 0b1))[0].tolist() while len(children) != 0: c_id = int(children[0]) children = np.where( - (self.monomer.adjacency[c_id, :] == 1) & (self.monomer.x[:, 0] == 6) & + np.array(self.monomer.adjacency[c_id, :] == 1) & (self.monomer.x[:, 0] == 6) & (1 - self.monomer.x[:, 2] & 0b1) & (self.monomer.x[:, 1] > self.monomer.x[c_id, 1]) )[0].tolist() diff --git a/glyles/glycans/mono/reactor_basic.py b/glyles/glycans/mono/reactor_basic.py index 185ea4b..5c104e0 100644 --- a/glyles/glycans/mono/reactor_basic.py +++ b/glyles/glycans/mono/reactor_basic.py @@ -9,6 +9,9 @@ from glyles.glycans.utils import find_longest_c_chain, opposite_chirality from glyles.grammar.GlycanLexer import GlycanLexer +if not hasattr(GlycanLexer, "MOD"): + GlycanLexer.MOD = GlycanLexer.QMARK + 1 + def get_indices(names, types): sac_index = types.index(GlycanLexer.SAC) diff --git a/glyles/glycans/poly/glycan.py b/glyles/glycans/poly/glycan.py index 285917b..1f4f074 100644 --- a/glyles/glycans/poly/glycan.py +++ b/glyles/glycans/poly/glycan.py @@ -4,6 +4,7 @@ import networkx as nx from PIL import ImageDraw, Image +from glyles.grammar.GlycanParser import GlycanParser from networkx.algorithms.isomorphism import DiGraphMatcher import pydot from antlr4 import InputStream, CommonTokenStream @@ -17,9 +18,11 @@ from glyles.glycans.poly.merger import Merger from glyles.glycans.poly.viz import Tree from glyles.glycans.poly.walker import TreeWalker -from glyles.glycans.utils import ParseError, find_isomorphism_nx +from glyles.glycans.utils import ParseError from glyles.grammar.GlycanLexer import GlycanLexer -from glyles.grammar.GlycanParser import GlycanParser + +if not hasattr(GlycanLexer, "MOD"): + GlycanLexer.MOD = GlycanLexer.QMARK + 1 def compare_smiles( @@ -360,63 +363,16 @@ def save_dot(self, output, horizontal=False): graph.write(output) return graph - def create_snfg_img(self, filepath, **kwargs): - """ - Create an image representation for a glycan using the SNFG symbols. The final image will not have a fixed size, - but it's size adapts to the shape of the glycan. The width will be (max_depth + 1) * kwargs['width'] and the - height will depend on the branching structure of the glycan. - - Args: - filepath (str): path where to store the image - **kwargs: - - width (int): scaling factor for the width in the image generation - - height (int): scaling factor for the width in the image generation - - stroke (int): stroke size to be used when drawing the lines of the SNFG symbols - - line (int): width of a line that connected two monomer-representing symbols. - - Returns: - PIL image representation using the SNFG symbols - """ - # set up the parameters for visualizing - params = { - "width": 100, - "height": 100, - "stroke": 2, - "line": 3, - } - params.update(**kwargs) - params["box"] = min(params["width"], params["height"]) - - # generate the visualization tree representation of the glycan - tree = Tree(self).assign_coords() - width, height = tree.get_bounds()[2:] - - # create and draw the image - img = Image.new( - mode="RGB", - size=(int((width + 1) * params["width"]), int((height + 1) * params["height"])), - color=(255, 255, 255) - ) - draw_img = ImageDraw.Draw(img) - tree.draw_edges(draw_img, **params) - tree.draw_nodes(draw_img, self, **params) - - # save the image and return is for further operations - img.save(filepath) - return img - def __parse(self): """ Adapter on the Lexer and Parser generated by ANTLR based on glyles/grammar/Glycan.g4. - - Returns: - Nothing """ try: # parse the remaining structure description following the grammar, also add the dummy characters if not isinstance(self.iupac, str): raise ParseError("Only string input can be parsed: " + str(self.iupac)) - stream = InputStream(data='{' + self.iupac + '}') + + stream = InputStream(data='#' + self.iupac + '#') lexer = GlycanLexer(stream) token = CommonTokenStream(lexer) parser = GlycanParser(token) @@ -438,7 +394,7 @@ def __parse(self): self.parse_tree, self.tree_full = TreeWalker(self.factory, self.tree_only).parse(self.grammar_tree) # if the glycan should be parsed immediately, do so - if not self.tree_only and self.tree_full == self.full: + if not self.tree_only and self.tree_full and self.full: self.glycan_smiles = Merger(self.factory).merge(self.parse_tree, self.root_orientation, start=self.start) # catch any exception at glycan level to not destroy the whole pipeline because of one mis-formed glycan @@ -451,3 +407,4 @@ def __parse(self): logging.error(f"An unexpected exception occurred with \"{self.iupac}\". This glycan cannot be parsed. " f"Error message: {msg}") self.glycan_smiles = "" + raise e diff --git a/glyles/glycans/poly/merger.py b/glyles/glycans/poly/merger.py index 8ab283c..eb6205c 100644 --- a/glyles/glycans/poly/merger.py +++ b/glyles/glycans/poly/merger.py @@ -1,11 +1,56 @@ import copy import re +from collections import defaultdict +import networkx as nx import numpy as np +from rdkit import Chem from glyles.glycans.utils import sanitize_smiles +def masked2nx(smiles: str, mask: list[int]) -> nx.Graph: + mol = Chem.MolFromSmiles(smiles) + tmp1, i, read_atom, read_atom_index = defaultdict(list), 0, "", -1 + for i in range(len(smiles)): + # check for uppercase, i.e., atoms + if smiles[i].isupper() or "c": + # save if it's an element, ie starts with uppercase or is a aromatic c + if read_atom != "" and (read_atom[0].isupper() or read_atom == "c"): + tmp1[read_atom] += [mask[read_atom_index]] + # read current atom + read_atom = smiles[i] + read_atom_index = i + # extent current element + elif smiles[i].isalpha(): + read_atom += smiles[i] + if read_atom != "" and (read_atom[0].isupper() or read_atom == "c"): + tmp1[read_atom] += [mask[read_atom_index]] + + atom_counter = defaultdict(int) + G = nx.Graph() + for atom in mol.GetAtoms(): + elem = atom.GetSymbol() + G.add_node( + atom.GetIdx(), + atomic_num=elem, + formal_charge=atom.GetFormalCharge(), + chiral_tag=atom.GetChiralTag(), + is_aromatic=atom.GetIsAromatic(), + mono_id=tmp1[elem][atom_counter[elem]], + ) + atom_counter[elem] += 1 + for bond in mol.GetBonds(): + start = bond.GetBeginAtomIdx() + G.add_edge( + start, + bond.GetEndAtomIdx(), + bond_type=bond.GetBondType(), + mono_id=G.nodes[start]["mono_id"], + ) + return G + + class Merger: """ Merge the tree of monomers into a SMILES representation of the complete molecule. @@ -20,7 +65,7 @@ def __init__(self, factory): """ self.factory = factory - def merge(self, t, root_orientation="n", start=100): + def merge(self, t, root_orientation="n", start=100, smiles_only: bool = True) -> str | tuple[str, nx.Graph]: """ Merge the provided tree of monomers enriched with the glycans in the nodes and information on the bindings between two monomer-nodes in the edges. The input graph is not changed during this process, as the methods @@ -38,16 +83,19 @@ def merge(self, t, root_orientation="n", start=100): t = copy.deepcopy(t) # first mark the atoms that will be replaced in a binding of two monomers - self.__mark(t, 0, f"({root_orientation}1-?)") + self.mark(t, 0, f"({root_orientation}1-?)") # return the string that can be computed from connecting the monomers as marked above if np.where(t.nodes[0]["type"].get_features()[:, 1] == start)[0].size != 0: position = int(np.argwhere(t.nodes[0]["type"].get_features()[:, 1] == start).squeeze()) else: position = int(np.argwhere(t.nodes[0]["type"].get_features()[:, 1] == 1).squeeze()) - return self.__merge(t, 0, position, 0) + smiles, mask = self.merge_int(t, 0, position, 0) + if smiles_only: + return smiles + return smiles, masked2nx(smiles, mask) - def __mark(self, t, node, p_edge): + def mark(self, t, node, p_edge): """ Recursively mark in every node of the molecule which atoms are being replaced by bound monomers. @@ -77,9 +125,9 @@ def __mark(self, t, node, p_edge): binding = re.findall(r'\d+', t.get_edge_data(node, child)["type"])[1] t.nodes[node]["type"].mark(int(binding), *atom) - self.__mark(t, child, t.get_edge_data(node, child)["type"]) + self.mark(t, child, t.get_edge_data(node, child)["type"]) - def __merge(self, t, node, start, ring_index): + def merge_int(self, t, node, start, ring_index): """ Recursively merge every node of the molecule with its children and get the SMILES representation of the subtree. @@ -96,10 +144,11 @@ def __merge(self, t, node, start, ring_index): # get my children and compute my SMILES string children = [x[1] for x in t.edges(node)] me = t.nodes[node]["type"].to_smiles(ring_index, root_id=start) + mask = [node for _ in range(len(me))] # check for validity of the tree, ie if it's a leaf if len(children) == 0: # leaf - return me + return me, mask # iterate over the children and the atoms used to mark binding atoms for child, (o_atom, n_atom) in zip(children, t.nodes[node]["type"].get_dummy_atoms()): @@ -110,12 +159,14 @@ def __merge(self, t, node, start, ring_index): raise ValueError("No child start found.") # get the SMILES of this child and plug it in the current own SMILES - child_smiles = self.__merge(t, child, child_start, ring_index + 1) + child_smiles, child_mask = self.merge_int(t, child, child_start, ring_index + 1) if o_atom[1] in me: + m = list(re.finditer(o_atom[2], me))[0] me = re.sub(o_atom[2], child_smiles, me) + mask = mask[:m.start()] + child_mask + mask[m.end():] elif n_atom[1] in me: + m = list(re.finditer(n_atom[2], me))[0] me = re.sub(n_atom[2], "N(" + child_smiles[1:] + ")", me) - me = sanitize_smiles(me) - # me = me.replace("((", "(").replace("))", ")") - # me = me.replace(atom, child_smiles) - return me + mask = mask[:m.start()] + [node, node] + child_mask[1:] + [node] + mask[m.end():] + me, mask = sanitize_smiles(me, mask) + return me, mask diff --git a/glyles/glycans/poly/walker.py b/glyles/glycans/poly/walker.py index 62e138f..8703e6c 100644 --- a/glyles/glycans/poly/walker.py +++ b/glyles/glycans/poly/walker.py @@ -2,8 +2,12 @@ from antlr4 import ErrorNode, TerminalNode from glyles.glycans.utils import UnreachableError, ketoses2 +from glyles.grammar.GlycanLexer import GlycanLexer from glyles.grammar.GlycanParser import GlycanParser +if not hasattr(GlycanLexer, "MOD"): + GlycanLexer.MOD = GlycanLexer.QMARK + 1 + class TreeWalker: def __init__(self, factory, tree_only): @@ -21,6 +25,14 @@ def __init__(self, factory, tree_only): self.full = True def parse(self, t): + for c in filter(lambda x: not isinstance(x, (TerminalNode, ErrorNode)), t.getChildren()): + if isinstance(c, GlycanParser.BranchContext): + self.__walk(c, self.node_id) + elif isinstance(c, GlycanParser.BeginContext): + self.__parse(c) + return self.g, self.full and len(list(nx.connected_components(self.g.to_undirected()))) == 1 + + def __parse(self, t): """ Parse a parsed tree (AST) from ANTLR into this networkx graph. @@ -33,7 +45,8 @@ def parse(self, t): # parse the initial monomer and the orientation of the root monomer # and remove the first and last char, i.e. '{' and '}' - children = list(t.getChildren())[1:-1] + # if isinstance(t, ) + children = list(t.getChildren()) if len(children) == 1: # glycan self.__add_node(children[0]) elif len(children) == 2: # branch glycan @@ -46,7 +59,6 @@ def parse(self, t): self.__walk(children[0], node_id) else: raise RuntimeError("This branch of the if-statement should be unreachable!") - return self.g, self.full def __walk(self, t, parent): """ @@ -70,14 +82,14 @@ def __walk(self, t, parent): if len(children) == 2: # {glycan con} # terminal element, add the node with the connection node_id = self.__add_node(children[0]) - self.__add_edge(parent, node_id, children[1]) + self.full &= self.__add_edge(parent, node_id, children[1]) return node_id elif len(children) == 3 and isinstance(children[2], GlycanParser.BranchContext): # {glycan con branch} # chain without branching, the parent is the parent of the parsing of the back part parent = self.__walk(children[2], parent) node_id = self.__add_node(children[0]) - self.__add_edge(parent, node_id, children[1]) + self.full &= self.__add_edge(parent, node_id, children[1]) return node_id elif len(children) == 3 and isinstance(children[1], GlycanParser.BranchContext): # {'[' branch ']'} @@ -90,7 +102,7 @@ def __walk(self, t, parent): node_id = self.__walk(children[5], parent) self.__walk(children[3], node_id) node_id2 = self.__add_node(children[0]) - self.__add_edge(node_id, node_id2, children[1]) + self.full &= self.__add_edge(node_id, node_id2, children[1]) return node_id2 elif len(children) == 9: # {glycan con '[' branch ']' '[' branch ']' branch} @@ -99,7 +111,7 @@ def __walk(self, t, parent): self.__walk(children[3], node_id) self.__walk(children[6], node_id) node_id2 = self.__add_node(children[0]) - self.__add_edge(node_id, node_id2, children[1]) + self.full &= self.__add_edge(node_id, node_id2, children[1]) return node_id2 elif len(children) == 12: # {glycan con '[' branch ']' '[' branch ']' '[' branch ']' branch} @@ -109,13 +121,22 @@ def __walk(self, t, parent): self.__walk(children[6], node_id) self.__walk(children[9], node_id) node_id2 = self.__add_node(children[0]) - self.__add_edge(node_id, node_id2, children[1]) + self.full &= self.__add_edge(node_id, node_id2, children[1]) return node_id2 # there should be no case missing, but who knows... raise UnreachableError("Invalid branching in glycan tree") - def __add_edge(self, parent, child, con): + def context2str(self, node): + output = "" + for c in node.getChildren(): + if isinstance(c, TerminalNode): + output += str(c) + else: + output += self.context2str(c) + return output + + def __add_edge(self, parent, child, con) -> bool: """ Add an edge between the provided ids of the parent and the children in the glycan tree. @@ -127,7 +148,11 @@ def __add_edge(self, parent, child, con): Returns: Nothing """ - con = str(con) + # for floating elements as they add a new connected component + if parent == child: + return True + + con = self.context2str(con) if "(" not in con and ")" not in con: if "-" not in con: bond = ("2-" if (self.g.nodes[child]["type"].get_lactole, @@ -135,6 +160,20 @@ def __add_edge(self, parent, child, con): con = con[0] + bond + con[1:] con = "(" + con + ")" self.g.add_edge(parent, child, type=con) + return "?" not in con + + def build_recipe(self, node): + recipe = [] + for c in node.getChildren(): + if isinstance(c, TerminalNode): + recipe.append((str(c), GlycanLexer.SAC if isinstance(node, GlycanParser.SaciContext) else c.symbol.type)) + else: + tmp = self.build_recipe(c) + if isinstance(c, GlycanParser.ModiContext): + recipe.append(("".join([x[0] for x in tmp]), GlycanLexer.MOD)) + else: + recipe += tmp + return recipe def __add_node(self, node, config=""): """ @@ -152,13 +191,8 @@ def __add_node(self, node, config=""): self.node_id += 1 # add the node to the network and store the enum of the glycan as attribute - recipe = [] - for child in node.children: - if isinstance(child, GlycanParser.DerivContext): - for c in child.children: - recipe.append((str(c), c.symbol.type)) - else: - recipe.append((str(child), child.symbol.type)) + recipe = self.build_recipe(node) + # print(recipe) monomer, full = self.factory.create(recipe, config, tree_only=self.tree_only) self.g.add_node( node_id, diff --git a/glyles/glycans/utils.py b/glyles/glycans/utils.py index 5056029..c58d565 100644 --- a/glyles/glycans/utils.py +++ b/glyles/glycans/utils.py @@ -94,7 +94,7 @@ class ParseError(ValueError): } -def sanitize_smiles(smiles): +def sanitize_smiles(smiles, mask=None): """ Sanitize the smiles string by removing unnecessary brackets. @@ -151,13 +151,19 @@ def get_index_backward(s, i): match = smiles.index("((") index = get_index_forward(smiles, match + 1) smiles = smiles[:match + 1] + smiles[match + 2:index] + smiles[index + 1:] + if mask is not None: + mask = mask[:match + 1] + mask[match + 2:index] + mask[index + 1:] # check for two closing brackets, the first can be removed together with its partner while "))" in smiles: match = smiles.index("))") index = get_index_backward(smiles, match) smiles = smiles[:index] + smiles[index + 1:match + 1] + smiles[match + 2:] + if mask is not None: + mask = mask[:index] + mask[index + 1:match + 1] + mask[match + 2:] + if mask is not None: + return smiles, mask return smiles @@ -409,7 +415,7 @@ def find_longest_c_chain(c_atoms, adjacency, a_type): stack = stack[:-1] c_tree.add_node(c_id, p_id) - children = np.argwhere((adjacency[c_id, :] == 1) & (a_type == 6)) + children = np.argwhere(np.array(adjacency[c_id, :] == 1) & (a_type == 6)) for c in children: if int(c) not in c_tree.nodes: stack.append((c_id, int(c))) diff --git a/glyles/grammar/Glycan.g4 b/glyles/grammar/Glycan.g4 index 45c0a53..21c6a98 100644 --- a/glyles/grammar/Glycan.g4 +++ b/glyles/grammar/Glycan.g4 @@ -1,70 +1,128 @@ grammar Glycan; start: - '{' branch glycan ' ' TYPE '}' - | '{' branch glycan '}' - | '{' glycan ' ' TYPE '}' - | '{' glycan '}'; + '#' (LBRACK branch RBRACK)* begin '#'; +begin: + branch glycan ' ' TYPE + | branch glycan + | glycan ' ' TYPE + | glycan; branch: - glycan CON - | glycan CON branch - | '[' branch ']' - | glycan CON '[' branch ']' branch - | glycan CON '[' branch ']' '[' branch ']' branch - | glycan CON '[' branch ']' '[' branch ']' '[' branch ']' branch; + glycan con + | glycan con branch + | LBRACE branch RBRACE + | glycan con LBRACE branch RBRACE branch + | glycan con LBRACE branch RBRACE LBRACE branch RBRACE branch + | glycan con LBRACE branch RBRACE LBRACE branch RBRACE LBRACE branch RBRACE branch; glycan: deriv RING TYPE | deriv TYPE | deriv RING | deriv; deriv: - SAC+ RING TYPE MOD* | SAC+ TYPE MOD* | SAC+ RING MOD* | SAC+ MOD* - | MOD+ SAC+ RING TYPE MOD* | MOD+ SAC+ TYPE MOD* | MOD+ SAC+ RING MOD* | MOD+ SAC+ MOD*; + saci+ RING TYPE modi* | saci+ TYPE modi* | saci+ RING modi* | saci+ modi* + | modi+ saci+ RING TYPE modi* | modi+ saci+ TYPE modi* | modi+ saci+ RING modi* | modi+ saci+ modi*; +saci: COUNT | SAC; +con: + LPAR typi NUM DASH qnum RPAR + | LPAR NUM DASH qnum RPAR + | typi NUM DASH qnum + | typi NUM; +add: + EQ LBRACK ct? NUM (COLON ct? NUM)* RBRACK + | C LBRACK NUM (COLON NUM)* RBRACK; +fgi: + COUNT | bridge | FG; +carb: + (AI | A | I)? CARBON NUM add*; +modi: + (NUM COLON)? NUM DASH ANHYDRO DASH + | NUM DASH bridge DASH fgi DASH + | DASH? NUM? bridge* fgi + | NUM ((COLON NUM)? D | E | carb) + | HEAD + | HEADD DASH + | DASH END; // |bridge deleted +qnum: + QMARK | NUM; +typi: + TYPE | QMARK; +bridge: + CARBON | NITROGEN | OXYGEN | PHOSPHOR; +ct: + C | T; SAC: - COUNT | 'Glc' | 'Man' | 'Gal' | 'Gul' | 'Alt' | 'All' | 'Tal' | 'Ido' | 'Qui' | 'Rha' | 'Fuc' | 'Oli' | 'Tyv' + 'Glc' | 'Man' | 'Gal' | 'Gul' | 'Alt' | 'All' | 'Tal' | 'Ido' | 'Qui' | 'Rha' | 'Fuc' | 'Oli' | 'Tyv' | 'Abe' | 'Par' | 'Dig' | 'Col' | 'Ara' | 'Lyx' | 'Xyl' | 'Rib' | 'Kdn' | 'Neu' | 'Sia' | 'Pse' | 'Leg' | 'Aci' | 'Bac' | 'Kdo' | 'Dha' | 'Mur' | 'Api' | 'Fru' | 'Tag' | 'Sor' | 'Psi' | 'Ery' | 'Thre' | 'Rul' | 'Xul' | 'Unk' | 'Ace' | 'Aco' | 'Asc' | 'Fus' | 'Ins' | 'Ko' | 'Pau' | 'Per'| 'Sed' | 'Sug' | 'Vio' | 'Xlu' | 'Yer' | 'Erwiniose'; -MOD: - NUM ',' NUM '-Anhydro-' | NUM '-Anhydro-' - | NUM '-' BRIDGE '-' FG '-' - | NUM CARB - | NUM BRIDGE* FG - | (NUM | BRIDGE* | '-') FG - | NUM ('d' | 'e') | NUM ',' NUM 'd' - | '-ulosaric' | '-ulosonic' | '-uronic' | '-onic' | '-aric' | '-ol' - | '0d' | 'D-' | 'L-'; +CARBON: + 'C'; +NITROGEN: + 'N'; +OXYGEN: + 'O'; +PHOSPHOR: + 'P'; FG: - COUNT | 'Ceroplastic' | 'Lacceroic' | '3oxoMyr' | 'Psyllic' | 'Geddic' | 'Allyl' | 'Phthi' + 'Ceroplastic' | 'Lacceroic' | '3oxoMyr' | 'Psyllic' | 'Geddic' | 'Allyl' | 'Phthi' | 'aLnn' | 'gLnn' | 'eSte' | 'Coum' | 'HSer' | 'Prop' | 'Ach' | 'Aep' | 'Ala' | 'Ang' | 'Asp' | 'Beh' | 'But' | 'Cct' | 'Cer' | 'Cet' | 'Cho' | 'Cin' | 'Crt' | 'Cys' | 'Dce' | 'Dco' | 'Dec' | 'Dhp' | 'Dod' | 'Etg' | 'EtN' | 'Etn' | 'Fer' | 'Gro' | 'Glu' | 'Gly' | 'Hpo' | 'Hse' | 'Hxo' | 'Lac' | 'Lau' | 'Leu' | 'Lin' | 'Lys' | 'Mal' | 'Mar' | 'Mel' | 'Mon' | 'Myr' | 'Ner' | 'Nno' | 'Non' | 'Oco' | 'Ole' | 'Orn' | 'Pam' | 'Pro' | 'Pyr' | 'Ser' | 'Sin' | 'Ste' | 'tBu' | 'Thr' | 'Tig' | 'Und' | 'Vac' | 'Udo' | 'Ulo' | 'ulo' - | 'Ac' | 'Am' | 'Bn' | 'Br' | 'Bu' | 'Bz' | 'Cl' | 'Cm' | 'DD' | 'DL' | 'DL-' | 'Et' | 'Fo' | 'Gc' | 'Hp' | 'Hx' + | 'Ac' | 'Am' | 'Bn' | 'Br' | 'Bu' | 'Bz' | 'Cl' | 'Cm' | 'DD' | 'DL' | 'Et' | 'Fo' | 'Gc' | 'Hp' | 'Hx' | 'LD' | 'LL' | 'Me' | 'Nn' | 'Oc' | 'Pe' | 'Ph' | 'Pr' | 'Pp' | 'Tf' | 'Tr' | 'Ts' | 'Vl' | 'en' - | 'A' | 'N' | 'F' | 'I' | 'S' | 'P'; -BRIDGE: - 'C' | 'N' | 'O' | 'P'; -CARB: - ('ai' | 'a' | 'i')? 'C' NUM ADD*; -ADD: - '=' '{' CT? NUM (',' CT? NUM)* '}' | 'c' '{' NUM (',' NUM)* '}'; + | 'A' | 'F' | 'I' | 'S'; +ANHYDRO: + 'Anhydro'; +HEAD: + '0d'; +HEADD: + 'D' | 'L'; +END: + 'ulosaric' | 'ulosonic' | 'uronic' | 'onic' | 'aric' | 'ol'; COUNT: 'Hep' | 'Hex' | 'Oct' | 'Pen' | 'Suc'; -CON: - '(' TYPE NUM '-' NUM ')' - | '(' NUM '-' NUM ')' - | TYPE NUM '-' NUM - | TYPE NUM; TYPE: 'a' | 'b'; -CT: - 'c' | 't'; RING: 'p' | 'f'; NUM: - ('1'..'9') DIGIT*; -DIGIT: - ('0'..'9'); + ('1'..'9') ('0'..'9')*; +COLON: + ','; +DASH: + '-'; +LPAR: + '('; +RPAR: + ')'; +LBRACE: + '['; +RBRACE: + ']'; +LBRACK: + '{'; +RBRACK: + '}'; +A: + 'a'; +AI: + 'ai'; +C: + 'c'; +D: + 'd'; +E: + 'e'; +T: + 't'; +EQ: + '='; +I: + 'i'; +QMARK: + '?'; + // antlr -Dlanguage=Python3 Glycan.g4 diff --git a/glyles/grammar/Glycan.interp b/glyles/grammar/Glycan.interp index 4e16bba..0a3821b 100644 --- a/glyles/grammar/Glycan.interp +++ b/glyles/grammar/Glycan.interp @@ -1,51 +1,92 @@ token literal names: null -'{' +'#' ' ' -'}' -'[' -']' -null -null -null -null -null null +'C' +'N' +'O' +'P' null +'Anhydro' +'0d' null null null null null null +',' +'-' +'(' +')' +'[' +']' +'{' +'}' +'a' +'ai' +'c' +'d' +'e' +'t' +'=' +'i' +'?' token symbolic names: null null null -null -null -null SAC -MOD +CARBON +NITROGEN +OXYGEN +PHOSPHOR FG -BRIDGE -CARB -ADD +ANHYDRO +HEAD +HEADD +END COUNT -CON TYPE -CT RING NUM -DIGIT +COLON +DASH +LPAR +RPAR +LBRACE +RBRACE +LBRACK +RBRACK +A +AI +C +D +E +T +EQ +I +QMARK rule names: start +begin branch glycan deriv +saci +con +add +fgi +carb +modi +qnum +typi +bridge +ct atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 20, 209, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 33, 10, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 76, 10, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 89, 10, 4, 3, 5, 6, 5, 92, 10, 5, 13, 5, 14, 5, 93, 3, 5, 3, 5, 3, 5, 7, 5, 99, 10, 5, 12, 5, 14, 5, 102, 11, 5, 3, 5, 6, 5, 105, 10, 5, 13, 5, 14, 5, 106, 3, 5, 3, 5, 7, 5, 111, 10, 5, 12, 5, 14, 5, 114, 11, 5, 3, 5, 6, 5, 117, 10, 5, 13, 5, 14, 5, 118, 3, 5, 3, 5, 7, 5, 123, 10, 5, 12, 5, 14, 5, 126, 11, 5, 3, 5, 6, 5, 129, 10, 5, 13, 5, 14, 5, 130, 3, 5, 7, 5, 134, 10, 5, 12, 5, 14, 5, 137, 11, 5, 3, 5, 6, 5, 140, 10, 5, 13, 5, 14, 5, 141, 3, 5, 6, 5, 145, 10, 5, 13, 5, 14, 5, 146, 3, 5, 3, 5, 3, 5, 7, 5, 152, 10, 5, 12, 5, 14, 5, 155, 11, 5, 3, 5, 6, 5, 158, 10, 5, 13, 5, 14, 5, 159, 3, 5, 6, 5, 163, 10, 5, 13, 5, 14, 5, 164, 3, 5, 3, 5, 7, 5, 169, 10, 5, 12, 5, 14, 5, 172, 11, 5, 3, 5, 6, 5, 175, 10, 5, 13, 5, 14, 5, 176, 3, 5, 6, 5, 180, 10, 5, 13, 5, 14, 5, 181, 3, 5, 3, 5, 7, 5, 186, 10, 5, 12, 5, 14, 5, 189, 11, 5, 3, 5, 6, 5, 192, 10, 5, 13, 5, 14, 5, 193, 3, 5, 6, 5, 197, 10, 5, 13, 5, 14, 5, 198, 3, 5, 7, 5, 202, 10, 5, 12, 5, 14, 5, 205, 11, 5, 5, 5, 207, 10, 5, 3, 5, 2, 2, 6, 2, 4, 6, 8, 2, 2, 2, 242, 2, 32, 3, 2, 2, 2, 4, 75, 3, 2, 2, 2, 6, 88, 3, 2, 2, 2, 8, 206, 3, 2, 2, 2, 10, 11, 7, 3, 2, 2, 11, 12, 5, 4, 3, 2, 12, 13, 5, 6, 4, 2, 13, 14, 7, 4, 2, 2, 14, 15, 7, 16, 2, 2, 15, 16, 7, 5, 2, 2, 16, 33, 3, 2, 2, 2, 17, 18, 7, 3, 2, 2, 18, 19, 5, 4, 3, 2, 19, 20, 5, 6, 4, 2, 20, 21, 7, 5, 2, 2, 21, 33, 3, 2, 2, 2, 22, 23, 7, 3, 2, 2, 23, 24, 5, 6, 4, 2, 24, 25, 7, 4, 2, 2, 25, 26, 7, 16, 2, 2, 26, 27, 7, 5, 2, 2, 27, 33, 3, 2, 2, 2, 28, 29, 7, 3, 2, 2, 29, 30, 5, 6, 4, 2, 30, 31, 7, 5, 2, 2, 31, 33, 3, 2, 2, 2, 32, 10, 3, 2, 2, 2, 32, 17, 3, 2, 2, 2, 32, 22, 3, 2, 2, 2, 32, 28, 3, 2, 2, 2, 33, 3, 3, 2, 2, 2, 34, 35, 5, 6, 4, 2, 35, 36, 7, 15, 2, 2, 36, 76, 3, 2, 2, 2, 37, 38, 5, 6, 4, 2, 38, 39, 7, 15, 2, 2, 39, 40, 5, 4, 3, 2, 40, 76, 3, 2, 2, 2, 41, 42, 7, 6, 2, 2, 42, 43, 5, 4, 3, 2, 43, 44, 7, 7, 2, 2, 44, 76, 3, 2, 2, 2, 45, 46, 5, 6, 4, 2, 46, 47, 7, 15, 2, 2, 47, 48, 7, 6, 2, 2, 48, 49, 5, 4, 3, 2, 49, 50, 7, 7, 2, 2, 50, 51, 5, 4, 3, 2, 51, 76, 3, 2, 2, 2, 52, 53, 5, 6, 4, 2, 53, 54, 7, 15, 2, 2, 54, 55, 7, 6, 2, 2, 55, 56, 5, 4, 3, 2, 56, 57, 7, 7, 2, 2, 57, 58, 7, 6, 2, 2, 58, 59, 5, 4, 3, 2, 59, 60, 7, 7, 2, 2, 60, 61, 5, 4, 3, 2, 61, 76, 3, 2, 2, 2, 62, 63, 5, 6, 4, 2, 63, 64, 7, 15, 2, 2, 64, 65, 7, 6, 2, 2, 65, 66, 5, 4, 3, 2, 66, 67, 7, 7, 2, 2, 67, 68, 7, 6, 2, 2, 68, 69, 5, 4, 3, 2, 69, 70, 7, 7, 2, 2, 70, 71, 7, 6, 2, 2, 71, 72, 5, 4, 3, 2, 72, 73, 7, 7, 2, 2, 73, 74, 5, 4, 3, 2, 74, 76, 3, 2, 2, 2, 75, 34, 3, 2, 2, 2, 75, 37, 3, 2, 2, 2, 75, 41, 3, 2, 2, 2, 75, 45, 3, 2, 2, 2, 75, 52, 3, 2, 2, 2, 75, 62, 3, 2, 2, 2, 76, 5, 3, 2, 2, 2, 77, 78, 5, 8, 5, 2, 78, 79, 7, 18, 2, 2, 79, 80, 7, 16, 2, 2, 80, 89, 3, 2, 2, 2, 81, 82, 5, 8, 5, 2, 82, 83, 7, 16, 2, 2, 83, 89, 3, 2, 2, 2, 84, 85, 5, 8, 5, 2, 85, 86, 7, 18, 2, 2, 86, 89, 3, 2, 2, 2, 87, 89, 5, 8, 5, 2, 88, 77, 3, 2, 2, 2, 88, 81, 3, 2, 2, 2, 88, 84, 3, 2, 2, 2, 88, 87, 3, 2, 2, 2, 89, 7, 3, 2, 2, 2, 90, 92, 7, 8, 2, 2, 91, 90, 3, 2, 2, 2, 92, 93, 3, 2, 2, 2, 93, 91, 3, 2, 2, 2, 93, 94, 3, 2, 2, 2, 94, 95, 3, 2, 2, 2, 95, 96, 7, 18, 2, 2, 96, 100, 7, 16, 2, 2, 97, 99, 7, 9, 2, 2, 98, 97, 3, 2, 2, 2, 99, 102, 3, 2, 2, 2, 100, 98, 3, 2, 2, 2, 100, 101, 3, 2, 2, 2, 101, 207, 3, 2, 2, 2, 102, 100, 3, 2, 2, 2, 103, 105, 7, 8, 2, 2, 104, 103, 3, 2, 2, 2, 105, 106, 3, 2, 2, 2, 106, 104, 3, 2, 2, 2, 106, 107, 3, 2, 2, 2, 107, 108, 3, 2, 2, 2, 108, 112, 7, 16, 2, 2, 109, 111, 7, 9, 2, 2, 110, 109, 3, 2, 2, 2, 111, 114, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 112, 113, 3, 2, 2, 2, 113, 207, 3, 2, 2, 2, 114, 112, 3, 2, 2, 2, 115, 117, 7, 8, 2, 2, 116, 115, 3, 2, 2, 2, 117, 118, 3, 2, 2, 2, 118, 116, 3, 2, 2, 2, 118, 119, 3, 2, 2, 2, 119, 120, 3, 2, 2, 2, 120, 124, 7, 18, 2, 2, 121, 123, 7, 9, 2, 2, 122, 121, 3, 2, 2, 2, 123, 126, 3, 2, 2, 2, 124, 122, 3, 2, 2, 2, 124, 125, 3, 2, 2, 2, 125, 207, 3, 2, 2, 2, 126, 124, 3, 2, 2, 2, 127, 129, 7, 8, 2, 2, 128, 127, 3, 2, 2, 2, 129, 130, 3, 2, 2, 2, 130, 128, 3, 2, 2, 2, 130, 131, 3, 2, 2, 2, 131, 135, 3, 2, 2, 2, 132, 134, 7, 9, 2, 2, 133, 132, 3, 2, 2, 2, 134, 137, 3, 2, 2, 2, 135, 133, 3, 2, 2, 2, 135, 136, 3, 2, 2, 2, 136, 207, 3, 2, 2, 2, 137, 135, 3, 2, 2, 2, 138, 140, 7, 9, 2, 2, 139, 138, 3, 2, 2, 2, 140, 141, 3, 2, 2, 2, 141, 139, 3, 2, 2, 2, 141, 142, 3, 2, 2, 2, 142, 144, 3, 2, 2, 2, 143, 145, 7, 8, 2, 2, 144, 143, 3, 2, 2, 2, 145, 146, 3, 2, 2, 2, 146, 144, 3, 2, 2, 2, 146, 147, 3, 2, 2, 2, 147, 148, 3, 2, 2, 2, 148, 149, 7, 18, 2, 2, 149, 153, 7, 16, 2, 2, 150, 152, 7, 9, 2, 2, 151, 150, 3, 2, 2, 2, 152, 155, 3, 2, 2, 2, 153, 151, 3, 2, 2, 2, 153, 154, 3, 2, 2, 2, 154, 207, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 156, 158, 7, 9, 2, 2, 157, 156, 3, 2, 2, 2, 158, 159, 3, 2, 2, 2, 159, 157, 3, 2, 2, 2, 159, 160, 3, 2, 2, 2, 160, 162, 3, 2, 2, 2, 161, 163, 7, 8, 2, 2, 162, 161, 3, 2, 2, 2, 163, 164, 3, 2, 2, 2, 164, 162, 3, 2, 2, 2, 164, 165, 3, 2, 2, 2, 165, 166, 3, 2, 2, 2, 166, 170, 7, 16, 2, 2, 167, 169, 7, 9, 2, 2, 168, 167, 3, 2, 2, 2, 169, 172, 3, 2, 2, 2, 170, 168, 3, 2, 2, 2, 170, 171, 3, 2, 2, 2, 171, 207, 3, 2, 2, 2, 172, 170, 3, 2, 2, 2, 173, 175, 7, 9, 2, 2, 174, 173, 3, 2, 2, 2, 175, 176, 3, 2, 2, 2, 176, 174, 3, 2, 2, 2, 176, 177, 3, 2, 2, 2, 177, 179, 3, 2, 2, 2, 178, 180, 7, 8, 2, 2, 179, 178, 3, 2, 2, 2, 180, 181, 3, 2, 2, 2, 181, 179, 3, 2, 2, 2, 181, 182, 3, 2, 2, 2, 182, 183, 3, 2, 2, 2, 183, 187, 7, 18, 2, 2, 184, 186, 7, 9, 2, 2, 185, 184, 3, 2, 2, 2, 186, 189, 3, 2, 2, 2, 187, 185, 3, 2, 2, 2, 187, 188, 3, 2, 2, 2, 188, 207, 3, 2, 2, 2, 189, 187, 3, 2, 2, 2, 190, 192, 7, 9, 2, 2, 191, 190, 3, 2, 2, 2, 192, 193, 3, 2, 2, 2, 193, 191, 3, 2, 2, 2, 193, 194, 3, 2, 2, 2, 194, 196, 3, 2, 2, 2, 195, 197, 7, 8, 2, 2, 196, 195, 3, 2, 2, 2, 197, 198, 3, 2, 2, 2, 198, 196, 3, 2, 2, 2, 198, 199, 3, 2, 2, 2, 199, 203, 3, 2, 2, 2, 200, 202, 7, 9, 2, 2, 201, 200, 3, 2, 2, 2, 202, 205, 3, 2, 2, 2, 203, 201, 3, 2, 2, 2, 203, 204, 3, 2, 2, 2, 204, 207, 3, 2, 2, 2, 205, 203, 3, 2, 2, 2, 206, 91, 3, 2, 2, 2, 206, 104, 3, 2, 2, 2, 206, 116, 3, 2, 2, 2, 206, 128, 3, 2, 2, 2, 206, 139, 3, 2, 2, 2, 206, 157, 3, 2, 2, 2, 206, 174, 3, 2, 2, 2, 206, 191, 3, 2, 2, 2, 207, 9, 3, 2, 2, 2, 26, 32, 75, 88, 93, 100, 106, 112, 118, 124, 130, 135, 141, 146, 153, 159, 164, 170, 176, 181, 187, 193, 198, 203, 206] \ No newline at end of file +[4, 1, 33, 357, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 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, 4, 182, 8, 4, 11, 4, 12, 4, 183, 1, 4, 4, 4, 187, 8, 4, 11, 4, 12, 4, 188, 1, 4, 1, 4, 5, 4, 193, 8, 4, 10, 4, 12, 4, 196, 9, 4, 1, 4, 4, 4, 199, 8, 4, 11, 4, 12, 4, 200, 1, 4, 4, 4, 204, 8, 4, 11, 4, 12, 4, 205, 1, 4, 1, 4, 5, 4, 210, 8, 4, 10, 4, 12, 4, 213, 9, 4, 1, 4, 4, 4, 216, 8, 4, 11, 4, 12, 4, 217, 1, 4, 4, 4, 221, 8, 4, 11, 4, 12, 4, 222, 1, 4, 5, 4, 226, 8, 4, 10, 4, 12, 4, 229, 9, 4, 3, 4, 231, 8, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 256, 8, 6, 1, 7, 1, 7, 1, 7, 3, 7, 261, 8, 7, 1, 7, 1, 7, 1, 7, 3, 7, 266, 8, 7, 1, 7, 5, 7, 269, 8, 7, 10, 7, 12, 7, 272, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 280, 8, 7, 10, 7, 12, 7, 283, 9, 7, 1, 7, 3, 7, 286, 8, 7, 1, 8, 1, 8, 1, 8, 3, 8, 291, 8, 8, 1, 9, 3, 9, 294, 8, 9, 1, 9, 1, 9, 1, 9, 5, 9, 299, 8, 9, 10, 9, 12, 9, 302, 9, 9, 1, 10, 1, 10, 3, 10, 306, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 320, 8, 10, 1, 10, 3, 10, 323, 8, 10, 1, 10, 5, 10, 326, 8, 10, 10, 10, 12, 10, 329, 9, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 335, 8, 10, 1, 10, 1, 10, 1, 10, 3, 10, 340, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 347, 8, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 0, 0, 15, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 0, 6, 2, 0, 3, 3, 13, 13, 2, 0, 25, 26, 32, 32, 2, 0, 16, 16, 33, 33, 2, 0, 14, 14, 33, 33, 1, 0, 4, 7, 2, 0, 27, 27, 30, 30, 405, 0, 30, 1, 0, 0, 0, 2, 56, 1, 0, 0, 0, 4, 99, 1, 0, 0, 0, 6, 112, 1, 0, 0, 0, 8, 230, 1, 0, 0, 0, 10, 232, 1, 0, 0, 0, 12, 255, 1, 0, 0, 0, 14, 285, 1, 0, 0, 0, 16, 290, 1, 0, 0, 0, 18, 293, 1, 0, 0, 0, 20, 346, 1, 0, 0, 0, 22, 348, 1, 0, 0, 0, 24, 350, 1, 0, 0, 0, 26, 352, 1, 0, 0, 0, 28, 354, 1, 0, 0, 0, 30, 37, 5, 1, 0, 0, 31, 32, 5, 23, 0, 0, 32, 33, 3, 4, 2, 0, 33, 34, 5, 24, 0, 0, 34, 36, 1, 0, 0, 0, 35, 31, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 40, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 41, 3, 2, 1, 0, 41, 42, 5, 1, 0, 0, 42, 1, 1, 0, 0, 0, 43, 44, 3, 4, 2, 0, 44, 45, 3, 6, 3, 0, 45, 46, 5, 2, 0, 0, 46, 47, 5, 14, 0, 0, 47, 57, 1, 0, 0, 0, 48, 49, 3, 4, 2, 0, 49, 50, 3, 6, 3, 0, 50, 57, 1, 0, 0, 0, 51, 52, 3, 6, 3, 0, 52, 53, 5, 2, 0, 0, 53, 54, 5, 14, 0, 0, 54, 57, 1, 0, 0, 0, 55, 57, 3, 6, 3, 0, 56, 43, 1, 0, 0, 0, 56, 48, 1, 0, 0, 0, 56, 51, 1, 0, 0, 0, 56, 55, 1, 0, 0, 0, 57, 3, 1, 0, 0, 0, 58, 59, 3, 6, 3, 0, 59, 60, 3, 12, 6, 0, 60, 100, 1, 0, 0, 0, 61, 62, 3, 6, 3, 0, 62, 63, 3, 12, 6, 0, 63, 64, 3, 4, 2, 0, 64, 100, 1, 0, 0, 0, 65, 66, 5, 21, 0, 0, 66, 67, 3, 4, 2, 0, 67, 68, 5, 22, 0, 0, 68, 100, 1, 0, 0, 0, 69, 70, 3, 6, 3, 0, 70, 71, 3, 12, 6, 0, 71, 72, 5, 21, 0, 0, 72, 73, 3, 4, 2, 0, 73, 74, 5, 22, 0, 0, 74, 75, 3, 4, 2, 0, 75, 100, 1, 0, 0, 0, 76, 77, 3, 6, 3, 0, 77, 78, 3, 12, 6, 0, 78, 79, 5, 21, 0, 0, 79, 80, 3, 4, 2, 0, 80, 81, 5, 22, 0, 0, 81, 82, 5, 21, 0, 0, 82, 83, 3, 4, 2, 0, 83, 84, 5, 22, 0, 0, 84, 85, 3, 4, 2, 0, 85, 100, 1, 0, 0, 0, 86, 87, 3, 6, 3, 0, 87, 88, 3, 12, 6, 0, 88, 89, 5, 21, 0, 0, 89, 90, 3, 4, 2, 0, 90, 91, 5, 22, 0, 0, 91, 92, 5, 21, 0, 0, 92, 93, 3, 4, 2, 0, 93, 94, 5, 22, 0, 0, 94, 95, 5, 21, 0, 0, 95, 96, 3, 4, 2, 0, 96, 97, 5, 22, 0, 0, 97, 98, 3, 4, 2, 0, 98, 100, 1, 0, 0, 0, 99, 58, 1, 0, 0, 0, 99, 61, 1, 0, 0, 0, 99, 65, 1, 0, 0, 0, 99, 69, 1, 0, 0, 0, 99, 76, 1, 0, 0, 0, 99, 86, 1, 0, 0, 0, 100, 5, 1, 0, 0, 0, 101, 102, 3, 8, 4, 0, 102, 103, 5, 15, 0, 0, 103, 104, 5, 14, 0, 0, 104, 113, 1, 0, 0, 0, 105, 106, 3, 8, 4, 0, 106, 107, 5, 14, 0, 0, 107, 113, 1, 0, 0, 0, 108, 109, 3, 8, 4, 0, 109, 110, 5, 15, 0, 0, 110, 113, 1, 0, 0, 0, 111, 113, 3, 8, 4, 0, 112, 101, 1, 0, 0, 0, 112, 105, 1, 0, 0, 0, 112, 108, 1, 0, 0, 0, 112, 111, 1, 0, 0, 0, 113, 7, 1, 0, 0, 0, 114, 116, 3, 10, 5, 0, 115, 114, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, 115, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 5, 15, 0, 0, 120, 124, 5, 14, 0, 0, 121, 123, 3, 20, 10, 0, 122, 121, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 231, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 129, 3, 10, 5, 0, 128, 127, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 136, 5, 14, 0, 0, 133, 135, 3, 20, 10, 0, 134, 133, 1, 0, 0, 0, 135, 138, 1, 0, 0, 0, 136, 134, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 231, 1, 0, 0, 0, 138, 136, 1, 0, 0, 0, 139, 141, 3, 10, 5, 0, 140, 139, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 148, 5, 15, 0, 0, 145, 147, 3, 20, 10, 0, 146, 145, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 231, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 153, 3, 10, 5, 0, 152, 151, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 152, 1, 0, 0, 0, 154, 155, 1, 0, 0, 0, 155, 159, 1, 0, 0, 0, 156, 158, 3, 20, 10, 0, 157, 156, 1, 0, 0, 0, 158, 161, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 231, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 162, 164, 3, 20, 10, 0, 163, 162, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 163, 1, 0, 0, 0, 165, 166, 1, 0, 0, 0, 166, 168, 1, 0, 0, 0, 167, 169, 3, 10, 5, 0, 168, 167, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 173, 5, 15, 0, 0, 173, 177, 5, 14, 0, 0, 174, 176, 3, 20, 10, 0, 175, 174, 1, 0, 0, 0, 176, 179, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 231, 1, 0, 0, 0, 179, 177, 1, 0, 0, 0, 180, 182, 3, 20, 10, 0, 181, 180, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 186, 1, 0, 0, 0, 185, 187, 3, 10, 5, 0, 186, 185, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 186, 1, 0, 0, 0, 188, 189, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 194, 5, 14, 0, 0, 191, 193, 3, 20, 10, 0, 192, 191, 1, 0, 0, 0, 193, 196, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195, 231, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 197, 199, 3, 20, 10, 0, 198, 197, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 203, 1, 0, 0, 0, 202, 204, 3, 10, 5, 0, 203, 202, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 203, 1, 0, 0, 0, 205, 206, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 211, 5, 15, 0, 0, 208, 210, 3, 20, 10, 0, 209, 208, 1, 0, 0, 0, 210, 213, 1, 0, 0, 0, 211, 209, 1, 0, 0, 0, 211, 212, 1, 0, 0, 0, 212, 231, 1, 0, 0, 0, 213, 211, 1, 0, 0, 0, 214, 216, 3, 20, 10, 0, 215, 214, 1, 0, 0, 0, 216, 217, 1, 0, 0, 0, 217, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 220, 1, 0, 0, 0, 219, 221, 3, 10, 5, 0, 220, 219, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 220, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223, 227, 1, 0, 0, 0, 224, 226, 3, 20, 10, 0, 225, 224, 1, 0, 0, 0, 226, 229, 1, 0, 0, 0, 227, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 231, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 230, 115, 1, 0, 0, 0, 230, 128, 1, 0, 0, 0, 230, 140, 1, 0, 0, 0, 230, 152, 1, 0, 0, 0, 230, 163, 1, 0, 0, 0, 230, 181, 1, 0, 0, 0, 230, 198, 1, 0, 0, 0, 230, 215, 1, 0, 0, 0, 231, 9, 1, 0, 0, 0, 232, 233, 7, 0, 0, 0, 233, 11, 1, 0, 0, 0, 234, 235, 5, 19, 0, 0, 235, 236, 3, 24, 12, 0, 236, 237, 5, 16, 0, 0, 237, 238, 5, 18, 0, 0, 238, 239, 3, 22, 11, 0, 239, 240, 5, 20, 0, 0, 240, 256, 1, 0, 0, 0, 241, 242, 5, 19, 0, 0, 242, 243, 5, 16, 0, 0, 243, 244, 5, 18, 0, 0, 244, 245, 3, 22, 11, 0, 245, 246, 5, 20, 0, 0, 246, 256, 1, 0, 0, 0, 247, 248, 3, 24, 12, 0, 248, 249, 5, 16, 0, 0, 249, 250, 5, 18, 0, 0, 250, 251, 3, 22, 11, 0, 251, 256, 1, 0, 0, 0, 252, 253, 3, 24, 12, 0, 253, 254, 5, 16, 0, 0, 254, 256, 1, 0, 0, 0, 255, 234, 1, 0, 0, 0, 255, 241, 1, 0, 0, 0, 255, 247, 1, 0, 0, 0, 255, 252, 1, 0, 0, 0, 256, 13, 1, 0, 0, 0, 257, 258, 5, 31, 0, 0, 258, 260, 5, 23, 0, 0, 259, 261, 3, 28, 14, 0, 260, 259, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 270, 5, 16, 0, 0, 263, 265, 5, 17, 0, 0, 264, 266, 3, 28, 14, 0, 265, 264, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 269, 5, 16, 0, 0, 268, 263, 1, 0, 0, 0, 269, 272, 1, 0, 0, 0, 270, 268, 1, 0, 0, 0, 270, 271, 1, 0, 0, 0, 271, 273, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 273, 286, 5, 24, 0, 0, 274, 275, 5, 27, 0, 0, 275, 276, 5, 23, 0, 0, 276, 281, 5, 16, 0, 0, 277, 278, 5, 17, 0, 0, 278, 280, 5, 16, 0, 0, 279, 277, 1, 0, 0, 0, 280, 283, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 284, 1, 0, 0, 0, 283, 281, 1, 0, 0, 0, 284, 286, 5, 24, 0, 0, 285, 257, 1, 0, 0, 0, 285, 274, 1, 0, 0, 0, 286, 15, 1, 0, 0, 0, 287, 291, 5, 13, 0, 0, 288, 291, 3, 26, 13, 0, 289, 291, 5, 8, 0, 0, 290, 287, 1, 0, 0, 0, 290, 288, 1, 0, 0, 0, 290, 289, 1, 0, 0, 0, 291, 17, 1, 0, 0, 0, 292, 294, 7, 1, 0, 0, 293, 292, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 296, 5, 4, 0, 0, 296, 300, 5, 16, 0, 0, 297, 299, 3, 14, 7, 0, 298, 297, 1, 0, 0, 0, 299, 302, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 19, 1, 0, 0, 0, 302, 300, 1, 0, 0, 0, 303, 304, 5, 16, 0, 0, 304, 306, 5, 17, 0, 0, 305, 303, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 308, 5, 16, 0, 0, 308, 309, 5, 18, 0, 0, 309, 310, 5, 9, 0, 0, 310, 347, 5, 18, 0, 0, 311, 312, 5, 16, 0, 0, 312, 313, 5, 18, 0, 0, 313, 314, 3, 26, 13, 0, 314, 315, 5, 18, 0, 0, 315, 316, 3, 16, 8, 0, 316, 317, 5, 18, 0, 0, 317, 347, 1, 0, 0, 0, 318, 320, 5, 18, 0, 0, 319, 318, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 322, 1, 0, 0, 0, 321, 323, 5, 16, 0, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 327, 1, 0, 0, 0, 324, 326, 3, 26, 13, 0, 325, 324, 1, 0, 0, 0, 326, 329, 1, 0, 0, 0, 327, 325, 1, 0, 0, 0, 327, 328, 1, 0, 0, 0, 328, 330, 1, 0, 0, 0, 329, 327, 1, 0, 0, 0, 330, 347, 3, 16, 8, 0, 331, 339, 5, 16, 0, 0, 332, 333, 5, 17, 0, 0, 333, 335, 5, 16, 0, 0, 334, 332, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 340, 5, 28, 0, 0, 337, 340, 5, 29, 0, 0, 338, 340, 3, 18, 9, 0, 339, 334, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 339, 338, 1, 0, 0, 0, 340, 347, 1, 0, 0, 0, 341, 347, 5, 10, 0, 0, 342, 343, 5, 11, 0, 0, 343, 347, 5, 18, 0, 0, 344, 345, 5, 18, 0, 0, 345, 347, 5, 12, 0, 0, 346, 305, 1, 0, 0, 0, 346, 311, 1, 0, 0, 0, 346, 319, 1, 0, 0, 0, 346, 331, 1, 0, 0, 0, 346, 341, 1, 0, 0, 0, 346, 342, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 347, 21, 1, 0, 0, 0, 348, 349, 7, 2, 0, 0, 349, 23, 1, 0, 0, 0, 350, 351, 7, 3, 0, 0, 351, 25, 1, 0, 0, 0, 352, 353, 7, 4, 0, 0, 353, 27, 1, 0, 0, 0, 354, 355, 7, 5, 0, 0, 355, 29, 1, 0, 0, 0, 41, 37, 56, 99, 112, 117, 124, 130, 136, 142, 148, 154, 159, 165, 170, 177, 183, 188, 194, 200, 205, 211, 217, 222, 227, 230, 255, 260, 265, 270, 281, 285, 290, 293, 300, 305, 319, 322, 327, 334, 339, 346] \ No newline at end of file diff --git a/glyles/grammar/Glycan.tokens b/glyles/grammar/Glycan.tokens index 8db9cf9..3942e49 100644 --- a/glyles/grammar/Glycan.tokens +++ b/glyles/grammar/Glycan.tokens @@ -1,23 +1,58 @@ T__0=1 T__1=2 -T__2=3 -T__3=4 -T__4=5 -SAC=6 -MOD=7 +SAC=3 +CARBON=4 +NITROGEN=5 +OXYGEN=6 +PHOSPHOR=7 FG=8 -BRIDGE=9 -CARB=10 -ADD=11 -COUNT=12 -CON=13 +ANHYDRO=9 +HEAD=10 +HEADD=11 +END=12 +COUNT=13 TYPE=14 -CT=15 -RING=16 -NUM=17 -DIGIT=18 -'{'=1 +RING=15 +NUM=16 +COLON=17 +DASH=18 +LPAR=19 +RPAR=20 +LBRACE=21 +RBRACE=22 +LBRACK=23 +RBRACK=24 +A=25 +AI=26 +C=27 +D=28 +E=29 +T=30 +EQ=31 +I=32 +QMARK=33 +'#'=1 ' '=2 -'}'=3 -'['=4 -']'=5 +'C'=4 +'N'=5 +'O'=6 +'P'=7 +'Anhydro'=9 +'0d'=10 +','=17 +'-'=18 +'('=19 +')'=20 +'['=21 +']'=22 +'{'=23 +'}'=24 +'a'=25 +'ai'=26 +'c'=27 +'d'=28 +'e'=29 +'t'=30 +'='=31 +'i'=32 +'?'=33 diff --git a/glyles/grammar/GlycanLexer.interp b/glyles/grammar/GlycanLexer.interp index f1c571c..5e6d5fb 100644 --- a/glyles/grammar/GlycanLexer.interp +++ b/glyles/grammar/GlycanLexer.interp @@ -1,64 +1,109 @@ token literal names: null -'{' +'#' ' ' -'}' -'[' -']' -null -null -null -null -null null +'C' +'N' +'O' +'P' null +'Anhydro' +'0d' null null null null null null +',' +'-' +'(' +')' +'[' +']' +'{' +'}' +'a' +'ai' +'c' +'d' +'e' +'t' +'=' +'i' +'?' token symbolic names: null null null -null -null -null SAC -MOD +CARBON +NITROGEN +OXYGEN +PHOSPHOR FG -BRIDGE -CARB -ADD +ANHYDRO +HEAD +HEADD +END COUNT -CON TYPE -CT RING NUM -DIGIT +COLON +DASH +LPAR +RPAR +LBRACE +RBRACE +LBRACK +RBRACK +A +AI +C +D +E +T +EQ +I +QMARK rule names: T__0 T__1 -T__2 -T__3 -T__4 SAC -MOD +CARBON +NITROGEN +OXYGEN +PHOSPHOR FG -BRIDGE -CARB -ADD +ANHYDRO +HEAD +HEADD +END COUNT -CON TYPE -CT RING NUM -DIGIT +COLON +DASH +LPAR +RPAR +LBRACE +RBRACE +LBRACK +RBRACK +A +AI +C +D +E +T +EQ +I +QMARK channel names: DEFAULT_TOKEN_CHANNEL @@ -68,4 +113,4 @@ mode names: DEFAULT_MODE atn: -[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 20, 749, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8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 3, 12, 5, 12, 693, 10, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 5, 13, 710, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 733, 10, 14, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 7, 18, 743, 10, 18, 12, 18, 14, 18, 746, 11, 18, 3, 19, 3, 19, 2, 2, 20, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 3, 2, 7, 8, 2, 67, 67, 72, 72, 75, 75, 80, 80, 82, 82, 85, 85, 4, 2, 69, 69, 80, 82, 4, 2, 99, 99, 107, 107, 4, 2, 101, 101, 118, 118, 4, 2, 104, 104, 114, 114, 2, 942, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 3, 39, 3, 2, 2, 2, 5, 41, 3, 2, 2, 2, 7, 43, 3, 2, 2, 2, 9, 45, 3, 2, 2, 2, 11, 47, 3, 2, 2, 2, 13, 221, 3, 2, 2, 2, 15, 329, 3, 2, 2, 2, 17, 645, 3, 2, 2, 2, 19, 647, 3, 2, 2, 2, 21, 652, 3, 2, 2, 2, 23, 692, 3, 2, 2, 2, 25, 709, 3, 2, 2, 2, 27, 732, 3, 2, 2, 2, 29, 734, 3, 2, 2, 2, 31, 736, 3, 2, 2, 2, 33, 738, 3, 2, 2, 2, 35, 740, 3, 2, 2, 2, 37, 747, 3, 2, 2, 2, 39, 40, 7, 125, 2, 2, 40, 4, 3, 2, 2, 2, 41, 42, 7, 34, 2, 2, 42, 6, 3, 2, 2, 2, 43, 44, 7, 127, 2, 2, 44, 8, 3, 2, 2, 2, 45, 46, 7, 93, 2, 2, 46, 10, 3, 2, 2, 2, 47, 48, 7, 95, 2, 2, 48, 12, 3, 2, 2, 2, 49, 222, 5, 25, 13, 2, 50, 51, 7, 73, 2, 2, 51, 52, 7, 110, 2, 2, 52, 222, 7, 101, 2, 2, 53, 54, 7, 79, 2, 2, 54, 55, 7, 99, 2, 2, 55, 222, 7, 112, 2, 2, 56, 57, 7, 73, 2, 2, 57, 58, 7, 99, 2, 2, 58, 222, 7, 110, 2, 2, 59, 60, 7, 73, 2, 2, 60, 61, 7, 119, 2, 2, 61, 222, 7, 110, 2, 2, 62, 63, 7, 67, 2, 2, 63, 64, 7, 110, 2, 2, 64, 222, 7, 118, 2, 2, 65, 66, 7, 67, 2, 2, 66, 67, 7, 110, 2, 2, 67, 222, 7, 110, 2, 2, 68, 69, 7, 86, 2, 2, 69, 70, 7, 99, 2, 2, 70, 222, 7, 110, 2, 2, 71, 72, 7, 75, 2, 2, 72, 73, 7, 102, 2, 2, 73, 222, 7, 113, 2, 2, 74, 75, 7, 83, 2, 2, 75, 76, 7, 119, 2, 2, 76, 222, 7, 107, 2, 2, 77, 78, 7, 84, 2, 2, 78, 79, 7, 106, 2, 2, 79, 222, 7, 99, 2, 2, 80, 81, 7, 72, 2, 2, 81, 82, 7, 119, 2, 2, 82, 222, 7, 101, 2, 2, 83, 84, 7, 81, 2, 2, 84, 85, 7, 110, 2, 2, 85, 222, 7, 107, 2, 2, 86, 87, 7, 86, 2, 2, 87, 88, 7, 123, 2, 2, 88, 222, 7, 120, 2, 2, 89, 90, 7, 67, 2, 2, 90, 91, 7, 100, 2, 2, 91, 222, 7, 103, 2, 2, 92, 93, 7, 82, 2, 2, 93, 94, 7, 99, 2, 2, 94, 222, 7, 116, 2, 2, 95, 96, 7, 70, 2, 2, 96, 97, 7, 107, 2, 2, 97, 222, 7, 105, 2, 2, 98, 99, 7, 69, 2, 2, 99, 100, 7, 113, 2, 2, 100, 222, 7, 110, 2, 2, 101, 102, 7, 67, 2, 2, 102, 103, 7, 116, 2, 2, 103, 222, 7, 99, 2, 2, 104, 105, 7, 78, 2, 2, 105, 106, 7, 123, 2, 2, 106, 222, 7, 122, 2, 2, 107, 108, 7, 90, 2, 2, 108, 109, 7, 123, 2, 2, 109, 222, 7, 110, 2, 2, 110, 111, 7, 84, 2, 2, 111, 112, 7, 107, 2, 2, 112, 222, 7, 100, 2, 2, 113, 114, 7, 77, 2, 2, 114, 115, 7, 102, 2, 2, 115, 222, 7, 112, 2, 2, 116, 117, 7, 80, 2, 2, 117, 118, 7, 103, 2, 2, 118, 222, 7, 119, 2, 2, 119, 120, 7, 85, 2, 2, 120, 121, 7, 107, 2, 2, 121, 222, 7, 99, 2, 2, 122, 123, 7, 82, 2, 2, 123, 124, 7, 117, 2, 2, 124, 222, 7, 103, 2, 2, 125, 126, 7, 78, 2, 2, 126, 127, 7, 103, 2, 2, 127, 222, 7, 105, 2, 2, 128, 129, 7, 67, 2, 2, 129, 130, 7, 101, 2, 2, 130, 222, 7, 107, 2, 2, 131, 132, 7, 68, 2, 2, 132, 133, 7, 99, 2, 2, 133, 222, 7, 101, 2, 2, 134, 135, 7, 77, 2, 2, 135, 136, 7, 102, 2, 2, 136, 222, 7, 113, 2, 2, 137, 138, 7, 70, 2, 2, 138, 139, 7, 106, 2, 2, 139, 222, 7, 99, 2, 2, 140, 141, 7, 79, 2, 2, 141, 142, 7, 119, 2, 2, 142, 222, 7, 116, 2, 2, 143, 144, 7, 67, 2, 2, 144, 145, 7, 114, 2, 2, 145, 222, 7, 107, 2, 2, 146, 147, 7, 72, 2, 2, 147, 148, 7, 116, 2, 2, 148, 222, 7, 119, 2, 2, 149, 150, 7, 86, 2, 2, 150, 151, 7, 99, 2, 2, 151, 222, 7, 105, 2, 2, 152, 153, 7, 85, 2, 2, 153, 154, 7, 113, 2, 2, 154, 222, 7, 116, 2, 2, 155, 156, 7, 82, 2, 2, 156, 157, 7, 117, 2, 2, 157, 222, 7, 107, 2, 2, 158, 159, 7, 71, 2, 2, 159, 160, 7, 116, 2, 2, 160, 222, 7, 123, 2, 2, 161, 162, 7, 86, 2, 2, 162, 163, 7, 106, 2, 2, 163, 164, 7, 116, 2, 2, 164, 222, 7, 103, 2, 2, 165, 166, 7, 84, 2, 2, 166, 167, 7, 119, 2, 2, 167, 222, 7, 110, 2, 2, 168, 169, 7, 90, 2, 2, 169, 170, 7, 119, 2, 2, 170, 222, 7, 110, 2, 2, 171, 172, 7, 87, 2, 2, 172, 173, 7, 112, 2, 2, 173, 222, 7, 109, 2, 2, 174, 175, 7, 67, 2, 2, 175, 176, 7, 101, 2, 2, 176, 222, 7, 103, 2, 2, 177, 178, 7, 67, 2, 2, 178, 179, 7, 101, 2, 2, 179, 222, 7, 113, 2, 2, 180, 181, 7, 67, 2, 2, 181, 182, 7, 117, 2, 2, 182, 222, 7, 101, 2, 2, 183, 184, 7, 72, 2, 2, 184, 185, 7, 119, 2, 2, 185, 222, 7, 117, 2, 2, 186, 187, 7, 75, 2, 2, 187, 188, 7, 112, 2, 2, 188, 222, 7, 117, 2, 2, 189, 190, 7, 77, 2, 2, 190, 222, 7, 113, 2, 2, 191, 192, 7, 82, 2, 2, 192, 193, 7, 99, 2, 2, 193, 222, 7, 119, 2, 2, 194, 195, 7, 82, 2, 2, 195, 196, 7, 103, 2, 2, 196, 222, 7, 116, 2, 2, 197, 198, 7, 85, 2, 2, 198, 199, 7, 103, 2, 2, 199, 222, 7, 102, 2, 2, 200, 201, 7, 85, 2, 2, 201, 202, 7, 119, 2, 2, 202, 222, 7, 105, 2, 2, 203, 204, 7, 88, 2, 2, 204, 205, 7, 107, 2, 2, 205, 222, 7, 113, 2, 2, 206, 207, 7, 90, 2, 2, 207, 208, 7, 110, 2, 2, 208, 222, 7, 119, 2, 2, 209, 210, 7, 91, 2, 2, 210, 211, 7, 103, 2, 2, 211, 222, 7, 116, 2, 2, 212, 213, 7, 71, 2, 2, 213, 214, 7, 116, 2, 2, 214, 215, 7, 121, 2, 2, 215, 216, 7, 107, 2, 2, 216, 217, 7, 112, 2, 2, 217, 218, 7, 107, 2, 2, 218, 219, 7, 113, 2, 2, 219, 220, 7, 117, 2, 2, 220, 222, 7, 103, 2, 2, 221, 49, 3, 2, 2, 2, 221, 50, 3, 2, 2, 2, 221, 53, 3, 2, 2, 2, 221, 56, 3, 2, 2, 2, 221, 59, 3, 2, 2, 2, 221, 62, 3, 2, 2, 2, 221, 65, 3, 2, 2, 2, 221, 68, 3, 2, 2, 2, 221, 71, 3, 2, 2, 2, 221, 74, 3, 2, 2, 2, 221, 77, 3, 2, 2, 2, 221, 80, 3, 2, 2, 2, 221, 83, 3, 2, 2, 2, 221, 86, 3, 2, 2, 2, 221, 89, 3, 2, 2, 2, 221, 92, 3, 2, 2, 2, 221, 95, 3, 2, 2, 2, 221, 98, 3, 2, 2, 2, 221, 101, 3, 2, 2, 2, 221, 104, 3, 2, 2, 2, 221, 107, 3, 2, 2, 2, 221, 110, 3, 2, 2, 2, 221, 113, 3, 2, 2, 2, 221, 116, 3, 2, 2, 2, 221, 119, 3, 2, 2, 2, 221, 122, 3, 2, 2, 2, 221, 125, 3, 2, 2, 2, 221, 128, 3, 2, 2, 2, 221, 131, 3, 2, 2, 2, 221, 134, 3, 2, 2, 2, 221, 137, 3, 2, 2, 2, 221, 140, 3, 2, 2, 2, 221, 143, 3, 2, 2, 2, 221, 146, 3, 2, 2, 2, 221, 149, 3, 2, 2, 2, 221, 152, 3, 2, 2, 2, 221, 155, 3, 2, 2, 2, 221, 158, 3, 2, 2, 2, 221, 161, 3, 2, 2, 2, 221, 165, 3, 2, 2, 2, 221, 168, 3, 2, 2, 2, 221, 171, 3, 2, 2, 2, 221, 174, 3, 2, 2, 2, 221, 177, 3, 2, 2, 2, 221, 180, 3, 2, 2, 2, 221, 183, 3, 2, 2, 2, 221, 186, 3, 2, 2, 2, 221, 189, 3, 2, 2, 2, 221, 191, 3, 2, 2, 2, 221, 194, 3, 2, 2, 2, 221, 197, 3, 2, 2, 2, 221, 200, 3, 2, 2, 2, 221, 203, 3, 2, 2, 2, 221, 206, 3, 2, 2, 2, 221, 209, 3, 2, 2, 2, 221, 212, 3, 2, 2, 2, 222, 14, 3, 2, 2, 2, 223, 224, 5, 35, 18, 2, 224, 225, 7, 46, 2, 2, 225, 226, 5, 35, 18, 2, 226, 227, 7, 47, 2, 2, 227, 228, 7, 67, 2, 2, 228, 229, 7, 112, 2, 2, 229, 230, 7, 106, 2, 2, 230, 231, 7, 123, 2, 2, 231, 232, 7, 102, 2, 2, 232, 233, 7, 116, 2, 2, 233, 234, 7, 113, 2, 2, 234, 235, 7, 47, 2, 2, 235, 330, 3, 2, 2, 2, 236, 237, 5, 35, 18, 2, 237, 238, 7, 47, 2, 2, 238, 239, 7, 67, 2, 2, 239, 240, 7, 112, 2, 2, 240, 241, 7, 106, 2, 2, 241, 242, 7, 123, 2, 2, 242, 243, 7, 102, 2, 2, 243, 244, 7, 116, 2, 2, 244, 245, 7, 113, 2, 2, 245, 246, 7, 47, 2, 2, 246, 330, 3, 2, 2, 2, 247, 248, 5, 35, 18, 2, 248, 249, 7, 47, 2, 2, 249, 250, 5, 19, 10, 2, 250, 251, 7, 47, 2, 2, 251, 252, 5, 17, 9, 2, 252, 253, 7, 47, 2, 2, 253, 330, 3, 2, 2, 2, 254, 255, 5, 35, 18, 2, 255, 256, 5, 21, 11, 2, 256, 330, 3, 2, 2, 2, 257, 261, 5, 35, 18, 2, 258, 260, 5, 19, 10, 2, 259, 258, 3, 2, 2, 2, 260, 263, 3, 2, 2, 2, 261, 259, 3, 2, 2, 2, 261, 262, 3, 2, 2, 2, 262, 264, 3, 2, 2, 2, 263, 261, 3, 2, 2, 2, 264, 265, 5, 17, 9, 2, 265, 330, 3, 2, 2, 2, 266, 275, 5, 35, 18, 2, 267, 269, 5, 19, 10, 2, 268, 267, 3, 2, 2, 2, 269, 272, 3, 2, 2, 2, 270, 268, 3, 2, 2, 2, 270, 271, 3, 2, 2, 2, 271, 275, 3, 2, 2, 2, 272, 270, 3, 2, 2, 2, 273, 275, 7, 47, 2, 2, 274, 266, 3, 2, 2, 2, 274, 270, 3, 2, 2, 2, 274, 273, 3, 2, 2, 2, 275, 276, 3, 2, 2, 2, 276, 330, 5, 17, 9, 2, 277, 278, 5, 35, 18, 2, 278, 279, 4, 102, 103, 2, 279, 330, 3, 2, 2, 2, 280, 281, 5, 35, 18, 2, 281, 282, 7, 46, 2, 2, 282, 283, 5, 35, 18, 2, 283, 284, 7, 102, 2, 2, 284, 330, 3, 2, 2, 2, 285, 286, 7, 47, 2, 2, 286, 287, 7, 119, 2, 2, 287, 288, 7, 110, 2, 2, 288, 289, 7, 113, 2, 2, 289, 290, 7, 117, 2, 2, 290, 291, 7, 99, 2, 2, 291, 292, 7, 116, 2, 2, 292, 293, 7, 107, 2, 2, 293, 330, 7, 101, 2, 2, 294, 295, 7, 47, 2, 2, 295, 296, 7, 119, 2, 2, 296, 297, 7, 110, 2, 2, 297, 298, 7, 113, 2, 2, 298, 299, 7, 117, 2, 2, 299, 300, 7, 113, 2, 2, 300, 301, 7, 112, 2, 2, 301, 302, 7, 107, 2, 2, 302, 330, 7, 101, 2, 2, 303, 304, 7, 47, 2, 2, 304, 305, 7, 119, 2, 2, 305, 306, 7, 116, 2, 2, 306, 307, 7, 113, 2, 2, 307, 308, 7, 112, 2, 2, 308, 309, 7, 107, 2, 2, 309, 330, 7, 101, 2, 2, 310, 311, 7, 47, 2, 2, 311, 312, 7, 113, 2, 2, 312, 313, 7, 112, 2, 2, 313, 314, 7, 107, 2, 2, 314, 330, 7, 101, 2, 2, 315, 316, 7, 47, 2, 2, 316, 317, 7, 99, 2, 2, 317, 318, 7, 116, 2, 2, 318, 319, 7, 107, 2, 2, 319, 330, 7, 101, 2, 2, 320, 321, 7, 47, 2, 2, 321, 322, 7, 113, 2, 2, 322, 330, 7, 110, 2, 2, 323, 324, 7, 50, 2, 2, 324, 330, 7, 102, 2, 2, 325, 326, 7, 70, 2, 2, 326, 330, 7, 47, 2, 2, 327, 328, 7, 78, 2, 2, 328, 330, 7, 47, 2, 2, 329, 223, 3, 2, 2, 2, 329, 236, 3, 2, 2, 2, 329, 247, 3, 2, 2, 2, 329, 254, 3, 2, 2, 2, 329, 257, 3, 2, 2, 2, 329, 274, 3, 2, 2, 2, 329, 277, 3, 2, 2, 2, 329, 280, 3, 2, 2, 2, 329, 285, 3, 2, 2, 2, 329, 294, 3, 2, 2, 2, 329, 303, 3, 2, 2, 2, 329, 310, 3, 2, 2, 2, 329, 315, 3, 2, 2, 2, 329, 320, 3, 2, 2, 2, 329, 323, 3, 2, 2, 2, 329, 325, 3, 2, 2, 2, 329, 327, 3, 2, 2, 2, 330, 16, 3, 2, 2, 2, 331, 646, 5, 25, 13, 2, 332, 333, 7, 69, 2, 2, 333, 334, 7, 103, 2, 2, 334, 335, 7, 116, 2, 2, 335, 336, 7, 113, 2, 2, 336, 337, 7, 114, 2, 2, 337, 338, 7, 110, 2, 2, 338, 339, 7, 99, 2, 2, 339, 340, 7, 117, 2, 2, 340, 341, 7, 118, 2, 2, 341, 342, 7, 107, 2, 2, 342, 646, 7, 101, 2, 2, 343, 344, 7, 78, 2, 2, 344, 345, 7, 99, 2, 2, 345, 346, 7, 101, 2, 2, 346, 347, 7, 101, 2, 2, 347, 348, 7, 103, 2, 2, 348, 349, 7, 116, 2, 2, 349, 350, 7, 113, 2, 2, 350, 351, 7, 107, 2, 2, 351, 646, 7, 101, 2, 2, 352, 353, 7, 53, 2, 2, 353, 354, 7, 113, 2, 2, 354, 355, 7, 122, 2, 2, 355, 356, 7, 113, 2, 2, 356, 357, 7, 79, 2, 2, 357, 358, 7, 123, 2, 2, 358, 646, 7, 116, 2, 2, 359, 360, 7, 82, 2, 2, 360, 361, 7, 117, 2, 2, 361, 362, 7, 123, 2, 2, 362, 363, 7, 110, 2, 2, 363, 364, 7, 110, 2, 2, 364, 365, 7, 107, 2, 2, 365, 646, 7, 101, 2, 2, 366, 367, 7, 73, 2, 2, 367, 368, 7, 103, 2, 2, 368, 369, 7, 102, 2, 2, 369, 370, 7, 102, 2, 2, 370, 371, 7, 107, 2, 2, 371, 646, 7, 101, 2, 2, 372, 373, 7, 67, 2, 2, 373, 374, 7, 110, 2, 2, 374, 375, 7, 110, 2, 2, 375, 376, 7, 123, 2, 2, 376, 646, 7, 110, 2, 2, 377, 378, 7, 82, 2, 2, 378, 379, 7, 106, 2, 2, 379, 380, 7, 118, 2, 2, 380, 381, 7, 106, 2, 2, 381, 646, 7, 107, 2, 2, 382, 383, 7, 99, 2, 2, 383, 384, 7, 78, 2, 2, 384, 385, 7, 112, 2, 2, 385, 646, 7, 112, 2, 2, 386, 387, 7, 105, 2, 2, 387, 388, 7, 78, 2, 2, 388, 389, 7, 112, 2, 2, 389, 646, 7, 112, 2, 2, 390, 391, 7, 103, 2, 2, 391, 392, 7, 85, 2, 2, 392, 393, 7, 118, 2, 2, 393, 646, 7, 103, 2, 2, 394, 395, 7, 69, 2, 2, 395, 396, 7, 113, 2, 2, 396, 397, 7, 119, 2, 2, 397, 646, 7, 111, 2, 2, 398, 399, 7, 74, 2, 2, 399, 400, 7, 85, 2, 2, 400, 401, 7, 103, 2, 2, 401, 646, 7, 116, 2, 2, 402, 403, 7, 82, 2, 2, 403, 404, 7, 116, 2, 2, 404, 405, 7, 113, 2, 2, 405, 646, 7, 114, 2, 2, 406, 407, 7, 67, 2, 2, 407, 408, 7, 101, 2, 2, 408, 646, 7, 106, 2, 2, 409, 410, 7, 67, 2, 2, 410, 411, 7, 103, 2, 2, 411, 646, 7, 114, 2, 2, 412, 413, 7, 67, 2, 2, 413, 414, 7, 110, 2, 2, 414, 646, 7, 99, 2, 2, 415, 416, 7, 67, 2, 2, 416, 417, 7, 112, 2, 2, 417, 646, 7, 105, 2, 2, 418, 419, 7, 67, 2, 2, 419, 420, 7, 117, 2, 2, 420, 646, 7, 114, 2, 2, 421, 422, 7, 68, 2, 2, 422, 423, 7, 103, 2, 2, 423, 646, 7, 106, 2, 2, 424, 425, 7, 68, 2, 2, 425, 426, 7, 119, 2, 2, 426, 646, 7, 118, 2, 2, 427, 428, 7, 69, 2, 2, 428, 429, 7, 101, 2, 2, 429, 646, 7, 118, 2, 2, 430, 431, 7, 69, 2, 2, 431, 432, 7, 103, 2, 2, 432, 646, 7, 116, 2, 2, 433, 434, 7, 69, 2, 2, 434, 435, 7, 103, 2, 2, 435, 646, 7, 118, 2, 2, 436, 437, 7, 69, 2, 2, 437, 438, 7, 106, 2, 2, 438, 646, 7, 113, 2, 2, 439, 440, 7, 69, 2, 2, 440, 441, 7, 107, 2, 2, 441, 646, 7, 112, 2, 2, 442, 443, 7, 69, 2, 2, 443, 444, 7, 116, 2, 2, 444, 646, 7, 118, 2, 2, 445, 446, 7, 69, 2, 2, 446, 447, 7, 123, 2, 2, 447, 646, 7, 117, 2, 2, 448, 449, 7, 70, 2, 2, 449, 450, 7, 101, 2, 2, 450, 646, 7, 103, 2, 2, 451, 452, 7, 70, 2, 2, 452, 453, 7, 101, 2, 2, 453, 646, 7, 113, 2, 2, 454, 455, 7, 70, 2, 2, 455, 456, 7, 103, 2, 2, 456, 646, 7, 101, 2, 2, 457, 458, 7, 70, 2, 2, 458, 459, 7, 106, 2, 2, 459, 646, 7, 114, 2, 2, 460, 461, 7, 70, 2, 2, 461, 462, 7, 113, 2, 2, 462, 646, 7, 102, 2, 2, 463, 464, 7, 71, 2, 2, 464, 465, 7, 118, 2, 2, 465, 646, 7, 105, 2, 2, 466, 467, 7, 71, 2, 2, 467, 468, 7, 118, 2, 2, 468, 646, 7, 80, 2, 2, 469, 470, 7, 71, 2, 2, 470, 471, 7, 118, 2, 2, 471, 646, 7, 112, 2, 2, 472, 473, 7, 72, 2, 2, 473, 474, 7, 103, 2, 2, 474, 646, 7, 116, 2, 2, 475, 476, 7, 73, 2, 2, 476, 477, 7, 116, 2, 2, 477, 646, 7, 113, 2, 2, 478, 479, 7, 73, 2, 2, 479, 480, 7, 110, 2, 2, 480, 646, 7, 119, 2, 2, 481, 482, 7, 73, 2, 2, 482, 483, 7, 110, 2, 2, 483, 646, 7, 123, 2, 2, 484, 485, 7, 74, 2, 2, 485, 486, 7, 114, 2, 2, 486, 646, 7, 113, 2, 2, 487, 488, 7, 74, 2, 2, 488, 489, 7, 117, 2, 2, 489, 646, 7, 103, 2, 2, 490, 491, 7, 74, 2, 2, 491, 492, 7, 122, 2, 2, 492, 646, 7, 113, 2, 2, 493, 494, 7, 78, 2, 2, 494, 495, 7, 99, 2, 2, 495, 646, 7, 101, 2, 2, 496, 497, 7, 78, 2, 2, 497, 498, 7, 99, 2, 2, 498, 646, 7, 119, 2, 2, 499, 500, 7, 78, 2, 2, 500, 501, 7, 103, 2, 2, 501, 646, 7, 119, 2, 2, 502, 503, 7, 78, 2, 2, 503, 504, 7, 107, 2, 2, 504, 646, 7, 112, 2, 2, 505, 506, 7, 78, 2, 2, 506, 507, 7, 123, 2, 2, 507, 646, 7, 117, 2, 2, 508, 509, 7, 79, 2, 2, 509, 510, 7, 99, 2, 2, 510, 646, 7, 110, 2, 2, 511, 512, 7, 79, 2, 2, 512, 513, 7, 99, 2, 2, 513, 646, 7, 116, 2, 2, 514, 515, 7, 79, 2, 2, 515, 516, 7, 103, 2, 2, 516, 646, 7, 110, 2, 2, 517, 518, 7, 79, 2, 2, 518, 519, 7, 113, 2, 2, 519, 646, 7, 112, 2, 2, 520, 521, 7, 79, 2, 2, 521, 522, 7, 123, 2, 2, 522, 646, 7, 116, 2, 2, 523, 524, 7, 80, 2, 2, 524, 525, 7, 103, 2, 2, 525, 646, 7, 116, 2, 2, 526, 527, 7, 80, 2, 2, 527, 528, 7, 112, 2, 2, 528, 646, 7, 113, 2, 2, 529, 530, 7, 80, 2, 2, 530, 531, 7, 113, 2, 2, 531, 646, 7, 112, 2, 2, 532, 533, 7, 81, 2, 2, 533, 534, 7, 101, 2, 2, 534, 646, 7, 113, 2, 2, 535, 536, 7, 81, 2, 2, 536, 537, 7, 110, 2, 2, 537, 646, 7, 103, 2, 2, 538, 539, 7, 81, 2, 2, 539, 540, 7, 116, 2, 2, 540, 646, 7, 112, 2, 2, 541, 542, 7, 82, 2, 2, 542, 543, 7, 99, 2, 2, 543, 646, 7, 111, 2, 2, 544, 545, 7, 82, 2, 2, 545, 546, 7, 116, 2, 2, 546, 646, 7, 113, 2, 2, 547, 548, 7, 82, 2, 2, 548, 549, 7, 123, 2, 2, 549, 646, 7, 116, 2, 2, 550, 551, 7, 85, 2, 2, 551, 552, 7, 103, 2, 2, 552, 646, 7, 116, 2, 2, 553, 554, 7, 85, 2, 2, 554, 555, 7, 107, 2, 2, 555, 646, 7, 112, 2, 2, 556, 557, 7, 85, 2, 2, 557, 558, 7, 118, 2, 2, 558, 646, 7, 103, 2, 2, 559, 560, 7, 118, 2, 2, 560, 561, 7, 68, 2, 2, 561, 646, 7, 119, 2, 2, 562, 563, 7, 86, 2, 2, 563, 564, 7, 106, 2, 2, 564, 646, 7, 116, 2, 2, 565, 566, 7, 86, 2, 2, 566, 567, 7, 107, 2, 2, 567, 646, 7, 105, 2, 2, 568, 569, 7, 87, 2, 2, 569, 570, 7, 112, 2, 2, 570, 646, 7, 102, 2, 2, 571, 572, 7, 88, 2, 2, 572, 573, 7, 99, 2, 2, 573, 646, 7, 101, 2, 2, 574, 575, 7, 87, 2, 2, 575, 576, 7, 102, 2, 2, 576, 646, 7, 113, 2, 2, 577, 578, 7, 87, 2, 2, 578, 579, 7, 110, 2, 2, 579, 646, 7, 113, 2, 2, 580, 581, 7, 119, 2, 2, 581, 582, 7, 110, 2, 2, 582, 646, 7, 113, 2, 2, 583, 584, 7, 67, 2, 2, 584, 646, 7, 101, 2, 2, 585, 586, 7, 67, 2, 2, 586, 646, 7, 111, 2, 2, 587, 588, 7, 68, 2, 2, 588, 646, 7, 112, 2, 2, 589, 590, 7, 68, 2, 2, 590, 646, 7, 116, 2, 2, 591, 592, 7, 68, 2, 2, 592, 646, 7, 119, 2, 2, 593, 594, 7, 68, 2, 2, 594, 646, 7, 124, 2, 2, 595, 596, 7, 69, 2, 2, 596, 646, 7, 110, 2, 2, 597, 598, 7, 69, 2, 2, 598, 646, 7, 111, 2, 2, 599, 600, 7, 70, 2, 2, 600, 646, 7, 70, 2, 2, 601, 602, 7, 70, 2, 2, 602, 646, 7, 78, 2, 2, 603, 604, 7, 70, 2, 2, 604, 605, 7, 78, 2, 2, 605, 646, 7, 47, 2, 2, 606, 607, 7, 71, 2, 2, 607, 646, 7, 118, 2, 2, 608, 609, 7, 72, 2, 2, 609, 646, 7, 113, 2, 2, 610, 611, 7, 73, 2, 2, 611, 646, 7, 101, 2, 2, 612, 613, 7, 74, 2, 2, 613, 646, 7, 114, 2, 2, 614, 615, 7, 74, 2, 2, 615, 646, 7, 122, 2, 2, 616, 617, 7, 78, 2, 2, 617, 646, 7, 70, 2, 2, 618, 619, 7, 78, 2, 2, 619, 646, 7, 78, 2, 2, 620, 621, 7, 79, 2, 2, 621, 646, 7, 103, 2, 2, 622, 623, 7, 80, 2, 2, 623, 646, 7, 112, 2, 2, 624, 625, 7, 81, 2, 2, 625, 646, 7, 101, 2, 2, 626, 627, 7, 82, 2, 2, 627, 646, 7, 103, 2, 2, 628, 629, 7, 82, 2, 2, 629, 646, 7, 106, 2, 2, 630, 631, 7, 82, 2, 2, 631, 646, 7, 116, 2, 2, 632, 633, 7, 82, 2, 2, 633, 646, 7, 114, 2, 2, 634, 635, 7, 86, 2, 2, 635, 646, 7, 104, 2, 2, 636, 637, 7, 86, 2, 2, 637, 646, 7, 116, 2, 2, 638, 639, 7, 86, 2, 2, 639, 646, 7, 117, 2, 2, 640, 641, 7, 88, 2, 2, 641, 646, 7, 110, 2, 2, 642, 643, 7, 103, 2, 2, 643, 646, 7, 112, 2, 2, 644, 646, 9, 2, 2, 2, 645, 331, 3, 2, 2, 2, 645, 332, 3, 2, 2, 2, 645, 343, 3, 2, 2, 2, 645, 352, 3, 2, 2, 2, 645, 359, 3, 2, 2, 2, 645, 366, 3, 2, 2, 2, 645, 372, 3, 2, 2, 2, 645, 377, 3, 2, 2, 2, 645, 382, 3, 2, 2, 2, 645, 386, 3, 2, 2, 2, 645, 390, 3, 2, 2, 2, 645, 394, 3, 2, 2, 2, 645, 398, 3, 2, 2, 2, 645, 402, 3, 2, 2, 2, 645, 406, 3, 2, 2, 2, 645, 409, 3, 2, 2, 2, 645, 412, 3, 2, 2, 2, 645, 415, 3, 2, 2, 2, 645, 418, 3, 2, 2, 2, 645, 421, 3, 2, 2, 2, 645, 424, 3, 2, 2, 2, 645, 427, 3, 2, 2, 2, 645, 430, 3, 2, 2, 2, 645, 433, 3, 2, 2, 2, 645, 436, 3, 2, 2, 2, 645, 439, 3, 2, 2, 2, 645, 442, 3, 2, 2, 2, 645, 445, 3, 2, 2, 2, 645, 448, 3, 2, 2, 2, 645, 451, 3, 2, 2, 2, 645, 454, 3, 2, 2, 2, 645, 457, 3, 2, 2, 2, 645, 460, 3, 2, 2, 2, 645, 463, 3, 2, 2, 2, 645, 466, 3, 2, 2, 2, 645, 469, 3, 2, 2, 2, 645, 472, 3, 2, 2, 2, 645, 475, 3, 2, 2, 2, 645, 478, 3, 2, 2, 2, 645, 481, 3, 2, 2, 2, 645, 484, 3, 2, 2, 2, 645, 487, 3, 2, 2, 2, 645, 490, 3, 2, 2, 2, 645, 493, 3, 2, 2, 2, 645, 496, 3, 2, 2, 2, 645, 499, 3, 2, 2, 2, 645, 502, 3, 2, 2, 2, 645, 505, 3, 2, 2, 2, 645, 508, 3, 2, 2, 2, 645, 511, 3, 2, 2, 2, 645, 514, 3, 2, 2, 2, 645, 517, 3, 2, 2, 2, 645, 520, 3, 2, 2, 2, 645, 523, 3, 2, 2, 2, 645, 526, 3, 2, 2, 2, 645, 529, 3, 2, 2, 2, 645, 532, 3, 2, 2, 2, 645, 535, 3, 2, 2, 2, 645, 538, 3, 2, 2, 2, 645, 541, 3, 2, 2, 2, 645, 544, 3, 2, 2, 2, 645, 547, 3, 2, 2, 2, 645, 550, 3, 2, 2, 2, 645, 553, 3, 2, 2, 2, 645, 556, 3, 2, 2, 2, 645, 559, 3, 2, 2, 2, 645, 562, 3, 2, 2, 2, 645, 565, 3, 2, 2, 2, 645, 568, 3, 2, 2, 2, 645, 571, 3, 2, 2, 2, 645, 574, 3, 2, 2, 2, 645, 577, 3, 2, 2, 2, 645, 580, 3, 2, 2, 2, 645, 583, 3, 2, 2, 2, 645, 585, 3, 2, 2, 2, 645, 587, 3, 2, 2, 2, 645, 589, 3, 2, 2, 2, 645, 591, 3, 2, 2, 2, 645, 593, 3, 2, 2, 2, 645, 595, 3, 2, 2, 2, 645, 597, 3, 2, 2, 2, 645, 599, 3, 2, 2, 2, 645, 601, 3, 2, 2, 2, 645, 603, 3, 2, 2, 2, 645, 606, 3, 2, 2, 2, 645, 608, 3, 2, 2, 2, 645, 610, 3, 2, 2, 2, 645, 612, 3, 2, 2, 2, 645, 614, 3, 2, 2, 2, 645, 616, 3, 2, 2, 2, 645, 618, 3, 2, 2, 2, 645, 620, 3, 2, 2, 2, 645, 622, 3, 2, 2, 2, 645, 624, 3, 2, 2, 2, 645, 626, 3, 2, 2, 2, 645, 628, 3, 2, 2, 2, 645, 630, 3, 2, 2, 2, 645, 632, 3, 2, 2, 2, 645, 634, 3, 2, 2, 2, 645, 636, 3, 2, 2, 2, 645, 638, 3, 2, 2, 2, 645, 640, 3, 2, 2, 2, 645, 642, 3, 2, 2, 2, 645, 644, 3, 2, 2, 2, 646, 18, 3, 2, 2, 2, 647, 648, 9, 3, 2, 2, 648, 20, 3, 2, 2, 2, 649, 650, 7, 99, 2, 2, 650, 653, 7, 107, 2, 2, 651, 653, 9, 4, 2, 2, 652, 649, 3, 2, 2, 2, 652, 651, 3, 2, 2, 2, 652, 653, 3, 2, 2, 2, 653, 654, 3, 2, 2, 2, 654, 655, 7, 69, 2, 2, 655, 659, 5, 35, 18, 2, 656, 658, 5, 23, 12, 2, 657, 656, 3, 2, 2, 2, 658, 661, 3, 2, 2, 2, 659, 657, 3, 2, 2, 2, 659, 660, 3, 2, 2, 2, 660, 22, 3, 2, 2, 2, 661, 659, 3, 2, 2, 2, 662, 663, 7, 63, 2, 2, 663, 665, 7, 125, 2, 2, 664, 666, 5, 31, 16, 2, 665, 664, 3, 2, 2, 2, 665, 666, 3, 2, 2, 2, 666, 667, 3, 2, 2, 2, 667, 675, 5, 35, 18, 2, 668, 670, 7, 46, 2, 2, 669, 671, 5, 31, 16, 2, 670, 669, 3, 2, 2, 2, 670, 671, 3, 2, 2, 2, 671, 672, 3, 2, 2, 2, 672, 674, 5, 35, 18, 2, 673, 668, 3, 2, 2, 2, 674, 677, 3, 2, 2, 2, 675, 673, 3, 2, 2, 2, 675, 676, 3, 2, 2, 2, 676, 678, 3, 2, 2, 2, 677, 675, 3, 2, 2, 2, 678, 679, 7, 127, 2, 2, 679, 693, 3, 2, 2, 2, 680, 681, 7, 101, 2, 2, 681, 682, 7, 125, 2, 2, 682, 687, 5, 35, 18, 2, 683, 684, 7, 46, 2, 2, 684, 686, 5, 35, 18, 2, 685, 683, 3, 2, 2, 2, 686, 689, 3, 2, 2, 2, 687, 685, 3, 2, 2, 2, 687, 688, 3, 2, 2, 2, 688, 690, 3, 2, 2, 2, 689, 687, 3, 2, 2, 2, 690, 691, 7, 127, 2, 2, 691, 693, 3, 2, 2, 2, 692, 662, 3, 2, 2, 2, 692, 680, 3, 2, 2, 2, 693, 24, 3, 2, 2, 2, 694, 695, 7, 74, 2, 2, 695, 696, 7, 103, 2, 2, 696, 710, 7, 114, 2, 2, 697, 698, 7, 74, 2, 2, 698, 699, 7, 103, 2, 2, 699, 710, 7, 122, 2, 2, 700, 701, 7, 81, 2, 2, 701, 702, 7, 101, 2, 2, 702, 710, 7, 118, 2, 2, 703, 704, 7, 82, 2, 2, 704, 705, 7, 103, 2, 2, 705, 710, 7, 112, 2, 2, 706, 707, 7, 85, 2, 2, 707, 708, 7, 119, 2, 2, 708, 710, 7, 101, 2, 2, 709, 694, 3, 2, 2, 2, 709, 697, 3, 2, 2, 2, 709, 700, 3, 2, 2, 2, 709, 703, 3, 2, 2, 2, 709, 706, 3, 2, 2, 2, 710, 26, 3, 2, 2, 2, 711, 712, 7, 42, 2, 2, 712, 713, 5, 29, 15, 2, 713, 714, 5, 35, 18, 2, 714, 715, 7, 47, 2, 2, 715, 716, 5, 35, 18, 2, 716, 717, 7, 43, 2, 2, 717, 733, 3, 2, 2, 2, 718, 719, 7, 42, 2, 2, 719, 720, 5, 35, 18, 2, 720, 721, 7, 47, 2, 2, 721, 722, 5, 35, 18, 2, 722, 723, 7, 43, 2, 2, 723, 733, 3, 2, 2, 2, 724, 725, 5, 29, 15, 2, 725, 726, 5, 35, 18, 2, 726, 727, 7, 47, 2, 2, 727, 728, 5, 35, 18, 2, 728, 733, 3, 2, 2, 2, 729, 730, 5, 29, 15, 2, 730, 731, 5, 35, 18, 2, 731, 733, 3, 2, 2, 2, 732, 711, 3, 2, 2, 2, 732, 718, 3, 2, 2, 2, 732, 724, 3, 2, 2, 2, 732, 729, 3, 2, 2, 2, 733, 28, 3, 2, 2, 2, 734, 735, 4, 99, 100, 2, 735, 30, 3, 2, 2, 2, 736, 737, 9, 5, 2, 2, 737, 32, 3, 2, 2, 2, 738, 739, 9, 6, 2, 2, 739, 34, 3, 2, 2, 2, 740, 744, 4, 51, 59, 2, 741, 743, 5, 37, 19, 2, 742, 741, 3, 2, 2, 2, 743, 746, 3, 2, 2, 2, 744, 742, 3, 2, 2, 2, 744, 745, 3, 2, 2, 2, 745, 36, 3, 2, 2, 2, 746, 744, 3, 2, 2, 2, 747, 748, 4, 50, 59, 2, 748, 38, 3, 2, 2, 2, 19, 2, 221, 261, 270, 274, 329, 645, 652, 659, 665, 670, 675, 687, 692, 709, 732, 744, 2] \ No newline at end of file +[4, 0, 33, 674, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1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, 19, 1, 20, 1, 20, 1, 21, 1, 21, 1, 22, 1, 22, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 0, 0, 33, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 1, 0, 3, 4, 0, 65, 65, 70, 70, 73, 73, 83, 83, 2, 0, 68, 68, 76, 76, 2, 0, 102, 102, 112, 112, 838, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 1, 67, 1, 0, 0, 0, 3, 69, 1, 0, 0, 0, 5, 242, 1, 0, 0, 0, 7, 244, 1, 0, 0, 0, 9, 246, 1, 0, 0, 0, 11, 248, 1, 0, 0, 0, 13, 250, 1, 0, 0, 0, 15, 562, 1, 0, 0, 0, 17, 564, 1, 0, 0, 0, 19, 572, 1, 0, 0, 0, 21, 575, 1, 0, 0, 0, 23, 609, 1, 0, 0, 0, 25, 626, 1, 0, 0, 0, 27, 628, 1, 0, 0, 0, 29, 630, 1, 0, 0, 0, 31, 632, 1, 0, 0, 0, 33, 639, 1, 0, 0, 0, 35, 641, 1, 0, 0, 0, 37, 643, 1, 0, 0, 0, 39, 645, 1, 0, 0, 0, 41, 647, 1, 0, 0, 0, 43, 649, 1, 0, 0, 0, 45, 651, 1, 0, 0, 0, 47, 653, 1, 0, 0, 0, 49, 655, 1, 0, 0, 0, 51, 657, 1, 0, 0, 0, 53, 660, 1, 0, 0, 0, 55, 662, 1, 0, 0, 0, 57, 664, 1, 0, 0, 0, 59, 666, 1, 0, 0, 0, 61, 668, 1, 0, 0, 0, 63, 670, 1, 0, 0, 0, 65, 672, 1, 0, 0, 0, 67, 68, 5, 35, 0, 0, 68, 2, 1, 0, 0, 0, 69, 70, 5, 32, 0, 0, 70, 4, 1, 0, 0, 0, 71, 72, 5, 71, 0, 0, 72, 73, 5, 108, 0, 0, 73, 243, 5, 99, 0, 0, 74, 75, 5, 77, 0, 0, 75, 76, 5, 97, 0, 0, 76, 243, 5, 110, 0, 0, 77, 78, 5, 71, 0, 0, 78, 79, 5, 97, 0, 0, 79, 243, 5, 108, 0, 0, 80, 81, 5, 71, 0, 0, 81, 82, 5, 117, 0, 0, 82, 243, 5, 108, 0, 0, 83, 84, 5, 65, 0, 0, 84, 85, 5, 108, 0, 0, 85, 243, 5, 116, 0, 0, 86, 87, 5, 65, 0, 0, 87, 88, 5, 108, 0, 0, 88, 243, 5, 108, 0, 0, 89, 90, 5, 84, 0, 0, 90, 91, 5, 97, 0, 0, 91, 243, 5, 108, 0, 0, 92, 93, 5, 73, 0, 0, 93, 94, 5, 100, 0, 0, 94, 243, 5, 111, 0, 0, 95, 96, 5, 81, 0, 0, 96, 97, 5, 117, 0, 0, 97, 243, 5, 105, 0, 0, 98, 99, 5, 82, 0, 0, 99, 100, 5, 104, 0, 0, 100, 243, 5, 97, 0, 0, 101, 102, 5, 70, 0, 0, 102, 103, 5, 117, 0, 0, 103, 243, 5, 99, 0, 0, 104, 105, 5, 79, 0, 0, 105, 106, 5, 108, 0, 0, 106, 243, 5, 105, 0, 0, 107, 108, 5, 84, 0, 0, 108, 109, 5, 121, 0, 0, 109, 243, 5, 118, 0, 0, 110, 111, 5, 65, 0, 0, 111, 112, 5, 98, 0, 0, 112, 243, 5, 101, 0, 0, 113, 114, 5, 80, 0, 0, 114, 115, 5, 97, 0, 0, 115, 243, 5, 114, 0, 0, 116, 117, 5, 68, 0, 0, 117, 118, 5, 105, 0, 0, 118, 243, 5, 103, 0, 0, 119, 120, 5, 67, 0, 0, 120, 121, 5, 111, 0, 0, 121, 243, 5, 108, 0, 0, 122, 123, 5, 65, 0, 0, 123, 124, 5, 114, 0, 0, 124, 243, 5, 97, 0, 0, 125, 126, 5, 76, 0, 0, 126, 127, 5, 121, 0, 0, 127, 243, 5, 120, 0, 0, 128, 129, 5, 88, 0, 0, 129, 130, 5, 121, 0, 0, 130, 243, 5, 108, 0, 0, 131, 132, 5, 82, 0, 0, 132, 133, 5, 105, 0, 0, 133, 243, 5, 98, 0, 0, 134, 135, 5, 75, 0, 0, 135, 136, 5, 100, 0, 0, 136, 243, 5, 110, 0, 0, 137, 138, 5, 78, 0, 0, 138, 139, 5, 101, 0, 0, 139, 243, 5, 117, 0, 0, 140, 141, 5, 83, 0, 0, 141, 142, 5, 105, 0, 0, 142, 243, 5, 97, 0, 0, 143, 144, 5, 80, 0, 0, 144, 145, 5, 115, 0, 0, 145, 243, 5, 101, 0, 0, 146, 147, 5, 76, 0, 0, 147, 148, 5, 101, 0, 0, 148, 243, 5, 103, 0, 0, 149, 150, 5, 65, 0, 0, 150, 151, 5, 99, 0, 0, 151, 243, 5, 105, 0, 0, 152, 153, 5, 66, 0, 0, 153, 154, 5, 97, 0, 0, 154, 243, 5, 99, 0, 0, 155, 156, 5, 75, 0, 0, 156, 157, 5, 100, 0, 0, 157, 243, 5, 111, 0, 0, 158, 159, 5, 68, 0, 0, 159, 160, 5, 104, 0, 0, 160, 243, 5, 97, 0, 0, 161, 162, 5, 77, 0, 0, 162, 163, 5, 117, 0, 0, 163, 243, 5, 114, 0, 0, 164, 165, 5, 65, 0, 0, 165, 166, 5, 112, 0, 0, 166, 243, 5, 105, 0, 0, 167, 168, 5, 70, 0, 0, 168, 169, 5, 114, 0, 0, 169, 243, 5, 117, 0, 0, 170, 171, 5, 84, 0, 0, 171, 172, 5, 97, 0, 0, 172, 243, 5, 103, 0, 0, 173, 174, 5, 83, 0, 0, 174, 175, 5, 111, 0, 0, 175, 243, 5, 114, 0, 0, 176, 177, 5, 80, 0, 0, 177, 178, 5, 115, 0, 0, 178, 243, 5, 105, 0, 0, 179, 180, 5, 69, 0, 0, 180, 181, 5, 114, 0, 0, 181, 243, 5, 121, 0, 0, 182, 183, 5, 84, 0, 0, 183, 184, 5, 104, 0, 0, 184, 185, 5, 114, 0, 0, 185, 243, 5, 101, 0, 0, 186, 187, 5, 82, 0, 0, 187, 188, 5, 117, 0, 0, 188, 243, 5, 108, 0, 0, 189, 190, 5, 88, 0, 0, 190, 191, 5, 117, 0, 0, 191, 243, 5, 108, 0, 0, 192, 193, 5, 85, 0, 0, 193, 194, 5, 110, 0, 0, 194, 243, 5, 107, 0, 0, 195, 196, 5, 65, 0, 0, 196, 197, 5, 99, 0, 0, 197, 243, 5, 101, 0, 0, 198, 199, 5, 65, 0, 0, 199, 200, 5, 99, 0, 0, 200, 243, 5, 111, 0, 0, 201, 202, 5, 65, 0, 0, 202, 203, 5, 115, 0, 0, 203, 243, 5, 99, 0, 0, 204, 205, 5, 70, 0, 0, 205, 206, 5, 117, 0, 0, 206, 243, 5, 115, 0, 0, 207, 208, 5, 73, 0, 0, 208, 209, 5, 110, 0, 0, 209, 243, 5, 115, 0, 0, 210, 211, 5, 75, 0, 0, 211, 243, 5, 111, 0, 0, 212, 213, 5, 80, 0, 0, 213, 214, 5, 97, 0, 0, 214, 243, 5, 117, 0, 0, 215, 216, 5, 80, 0, 0, 216, 217, 5, 101, 0, 0, 217, 243, 5, 114, 0, 0, 218, 219, 5, 83, 0, 0, 219, 220, 5, 101, 0, 0, 220, 243, 5, 100, 0, 0, 221, 222, 5, 83, 0, 0, 222, 223, 5, 117, 0, 0, 223, 243, 5, 103, 0, 0, 224, 225, 5, 86, 0, 0, 225, 226, 5, 105, 0, 0, 226, 243, 5, 111, 0, 0, 227, 228, 5, 88, 0, 0, 228, 229, 5, 108, 0, 0, 229, 243, 5, 117, 0, 0, 230, 231, 5, 89, 0, 0, 231, 232, 5, 101, 0, 0, 232, 243, 5, 114, 0, 0, 233, 234, 5, 69, 0, 0, 234, 235, 5, 114, 0, 0, 235, 236, 5, 119, 0, 0, 236, 237, 5, 105, 0, 0, 237, 238, 5, 110, 0, 0, 238, 239, 5, 105, 0, 0, 239, 240, 5, 111, 0, 0, 240, 241, 5, 115, 0, 0, 241, 243, 5, 101, 0, 0, 242, 71, 1, 0, 0, 0, 242, 74, 1, 0, 0, 0, 242, 77, 1, 0, 0, 0, 242, 80, 1, 0, 0, 0, 242, 83, 1, 0, 0, 0, 242, 86, 1, 0, 0, 0, 242, 89, 1, 0, 0, 0, 242, 92, 1, 0, 0, 0, 242, 95, 1, 0, 0, 0, 242, 98, 1, 0, 0, 0, 242, 101, 1, 0, 0, 0, 242, 104, 1, 0, 0, 0, 242, 107, 1, 0, 0, 0, 242, 110, 1, 0, 0, 0, 242, 113, 1, 0, 0, 0, 242, 116, 1, 0, 0, 0, 242, 119, 1, 0, 0, 0, 242, 122, 1, 0, 0, 0, 242, 125, 1, 0, 0, 0, 242, 128, 1, 0, 0, 0, 242, 131, 1, 0, 0, 0, 242, 134, 1, 0, 0, 0, 242, 137, 1, 0, 0, 0, 242, 140, 1, 0, 0, 0, 242, 143, 1, 0, 0, 0, 242, 146, 1, 0, 0, 0, 242, 149, 1, 0, 0, 0, 242, 152, 1, 0, 0, 0, 242, 155, 1, 0, 0, 0, 242, 158, 1, 0, 0, 0, 242, 161, 1, 0, 0, 0, 242, 164, 1, 0, 0, 0, 242, 167, 1, 0, 0, 0, 242, 170, 1, 0, 0, 0, 242, 173, 1, 0, 0, 0, 242, 176, 1, 0, 0, 0, 242, 179, 1, 0, 0, 0, 242, 182, 1, 0, 0, 0, 242, 186, 1, 0, 0, 0, 242, 189, 1, 0, 0, 0, 242, 192, 1, 0, 0, 0, 242, 195, 1, 0, 0, 0, 242, 198, 1, 0, 0, 0, 242, 201, 1, 0, 0, 0, 242, 204, 1, 0, 0, 0, 242, 207, 1, 0, 0, 0, 242, 210, 1, 0, 0, 0, 242, 212, 1, 0, 0, 0, 242, 215, 1, 0, 0, 0, 242, 218, 1, 0, 0, 0, 242, 221, 1, 0, 0, 0, 242, 224, 1, 0, 0, 0, 242, 227, 1, 0, 0, 0, 242, 230, 1, 0, 0, 0, 242, 233, 1, 0, 0, 0, 243, 6, 1, 0, 0, 0, 244, 245, 5, 67, 0, 0, 245, 8, 1, 0, 0, 0, 246, 247, 5, 78, 0, 0, 247, 10, 1, 0, 0, 0, 248, 249, 5, 79, 0, 0, 249, 12, 1, 0, 0, 0, 250, 251, 5, 80, 0, 0, 251, 14, 1, 0, 0, 0, 252, 253, 5, 67, 0, 0, 253, 254, 5, 101, 0, 0, 254, 255, 5, 114, 0, 0, 255, 256, 5, 111, 0, 0, 256, 257, 5, 112, 0, 0, 257, 258, 5, 108, 0, 0, 258, 259, 5, 97, 0, 0, 259, 260, 5, 115, 0, 0, 260, 261, 5, 116, 0, 0, 261, 262, 5, 105, 0, 0, 262, 563, 5, 99, 0, 0, 263, 264, 5, 76, 0, 0, 264, 265, 5, 97, 0, 0, 265, 266, 5, 99, 0, 0, 266, 267, 5, 99, 0, 0, 267, 268, 5, 101, 0, 0, 268, 269, 5, 114, 0, 0, 269, 270, 5, 111, 0, 0, 270, 271, 5, 105, 0, 0, 271, 563, 5, 99, 0, 0, 272, 273, 5, 51, 0, 0, 273, 274, 5, 111, 0, 0, 274, 275, 5, 120, 0, 0, 275, 276, 5, 111, 0, 0, 276, 277, 5, 77, 0, 0, 277, 278, 5, 121, 0, 0, 278, 563, 5, 114, 0, 0, 279, 280, 5, 80, 0, 0, 280, 281, 5, 115, 0, 0, 281, 282, 5, 121, 0, 0, 282, 283, 5, 108, 0, 0, 283, 284, 5, 108, 0, 0, 284, 285, 5, 105, 0, 0, 285, 563, 5, 99, 0, 0, 286, 287, 5, 71, 0, 0, 287, 288, 5, 101, 0, 0, 288, 289, 5, 100, 0, 0, 289, 290, 5, 100, 0, 0, 290, 291, 5, 105, 0, 0, 291, 563, 5, 99, 0, 0, 292, 293, 5, 65, 0, 0, 293, 294, 5, 108, 0, 0, 294, 295, 5, 108, 0, 0, 295, 296, 5, 121, 0, 0, 296, 563, 5, 108, 0, 0, 297, 298, 5, 80, 0, 0, 298, 299, 5, 104, 0, 0, 299, 300, 5, 116, 0, 0, 300, 301, 5, 104, 0, 0, 301, 563, 5, 105, 0, 0, 302, 303, 5, 97, 0, 0, 303, 304, 5, 76, 0, 0, 304, 305, 5, 110, 0, 0, 305, 563, 5, 110, 0, 0, 306, 307, 5, 103, 0, 0, 307, 308, 5, 76, 0, 0, 308, 309, 5, 110, 0, 0, 309, 563, 5, 110, 0, 0, 310, 311, 5, 101, 0, 0, 311, 312, 5, 83, 0, 0, 312, 313, 5, 116, 0, 0, 313, 563, 5, 101, 0, 0, 314, 315, 5, 67, 0, 0, 315, 316, 5, 111, 0, 0, 316, 317, 5, 117, 0, 0, 317, 563, 5, 109, 0, 0, 318, 319, 5, 72, 0, 0, 319, 320, 5, 83, 0, 0, 320, 321, 5, 101, 0, 0, 321, 563, 5, 114, 0, 0, 322, 323, 5, 80, 0, 0, 323, 324, 5, 114, 0, 0, 324, 325, 5, 111, 0, 0, 325, 563, 5, 112, 0, 0, 326, 327, 5, 65, 0, 0, 327, 328, 5, 99, 0, 0, 328, 563, 5, 104, 0, 0, 329, 330, 5, 65, 0, 0, 330, 331, 5, 101, 0, 0, 331, 563, 5, 112, 0, 0, 332, 333, 5, 65, 0, 0, 333, 334, 5, 108, 0, 0, 334, 563, 5, 97, 0, 0, 335, 336, 5, 65, 0, 0, 336, 337, 5, 110, 0, 0, 337, 563, 5, 103, 0, 0, 338, 339, 5, 65, 0, 0, 339, 340, 5, 115, 0, 0, 340, 563, 5, 112, 0, 0, 341, 342, 5, 66, 0, 0, 342, 343, 5, 101, 0, 0, 343, 563, 5, 104, 0, 0, 344, 345, 5, 66, 0, 0, 345, 346, 5, 117, 0, 0, 346, 563, 5, 116, 0, 0, 347, 348, 5, 67, 0, 0, 348, 349, 5, 99, 0, 0, 349, 563, 5, 116, 0, 0, 350, 351, 5, 67, 0, 0, 351, 352, 5, 101, 0, 0, 352, 563, 5, 114, 0, 0, 353, 354, 5, 67, 0, 0, 354, 355, 5, 101, 0, 0, 355, 563, 5, 116, 0, 0, 356, 357, 5, 67, 0, 0, 357, 358, 5, 104, 0, 0, 358, 563, 5, 111, 0, 0, 359, 360, 5, 67, 0, 0, 360, 361, 5, 105, 0, 0, 361, 563, 5, 110, 0, 0, 362, 363, 5, 67, 0, 0, 363, 364, 5, 114, 0, 0, 364, 563, 5, 116, 0, 0, 365, 366, 5, 67, 0, 0, 366, 367, 5, 121, 0, 0, 367, 563, 5, 115, 0, 0, 368, 369, 5, 68, 0, 0, 369, 370, 5, 99, 0, 0, 370, 563, 5, 101, 0, 0, 371, 372, 5, 68, 0, 0, 372, 373, 5, 99, 0, 0, 373, 563, 5, 111, 0, 0, 374, 375, 5, 68, 0, 0, 375, 376, 5, 101, 0, 0, 376, 563, 5, 99, 0, 0, 377, 378, 5, 68, 0, 0, 378, 379, 5, 104, 0, 0, 379, 563, 5, 112, 0, 0, 380, 381, 5, 68, 0, 0, 381, 382, 5, 111, 0, 0, 382, 563, 5, 100, 0, 0, 383, 384, 5, 69, 0, 0, 384, 385, 5, 116, 0, 0, 385, 563, 5, 103, 0, 0, 386, 387, 5, 69, 0, 0, 387, 388, 5, 116, 0, 0, 388, 563, 5, 78, 0, 0, 389, 390, 5, 69, 0, 0, 390, 391, 5, 116, 0, 0, 391, 563, 5, 110, 0, 0, 392, 393, 5, 70, 0, 0, 393, 394, 5, 101, 0, 0, 394, 563, 5, 114, 0, 0, 395, 396, 5, 71, 0, 0, 396, 397, 5, 114, 0, 0, 397, 563, 5, 111, 0, 0, 398, 399, 5, 71, 0, 0, 399, 400, 5, 108, 0, 0, 400, 563, 5, 117, 0, 0, 401, 402, 5, 71, 0, 0, 402, 403, 5, 108, 0, 0, 403, 563, 5, 121, 0, 0, 404, 405, 5, 72, 0, 0, 405, 406, 5, 112, 0, 0, 406, 563, 5, 111, 0, 0, 407, 408, 5, 72, 0, 0, 408, 409, 5, 115, 0, 0, 409, 563, 5, 101, 0, 0, 410, 411, 5, 72, 0, 0, 411, 412, 5, 120, 0, 0, 412, 563, 5, 111, 0, 0, 413, 414, 5, 76, 0, 0, 414, 415, 5, 97, 0, 0, 415, 563, 5, 99, 0, 0, 416, 417, 5, 76, 0, 0, 417, 418, 5, 97, 0, 0, 418, 563, 5, 117, 0, 0, 419, 420, 5, 76, 0, 0, 420, 421, 5, 101, 0, 0, 421, 563, 5, 117, 0, 0, 422, 423, 5, 76, 0, 0, 423, 424, 5, 105, 0, 0, 424, 563, 5, 110, 0, 0, 425, 426, 5, 76, 0, 0, 426, 427, 5, 121, 0, 0, 427, 563, 5, 115, 0, 0, 428, 429, 5, 77, 0, 0, 429, 430, 5, 97, 0, 0, 430, 563, 5, 108, 0, 0, 431, 432, 5, 77, 0, 0, 432, 433, 5, 97, 0, 0, 433, 563, 5, 114, 0, 0, 434, 435, 5, 77, 0, 0, 435, 436, 5, 101, 0, 0, 436, 563, 5, 108, 0, 0, 437, 438, 5, 77, 0, 0, 438, 439, 5, 111, 0, 0, 439, 563, 5, 110, 0, 0, 440, 441, 5, 77, 0, 0, 441, 442, 5, 121, 0, 0, 442, 563, 5, 114, 0, 0, 443, 444, 5, 78, 0, 0, 444, 445, 5, 101, 0, 0, 445, 563, 5, 114, 0, 0, 446, 447, 5, 78, 0, 0, 447, 448, 5, 110, 0, 0, 448, 563, 5, 111, 0, 0, 449, 450, 5, 78, 0, 0, 450, 451, 5, 111, 0, 0, 451, 563, 5, 110, 0, 0, 452, 453, 5, 79, 0, 0, 453, 454, 5, 99, 0, 0, 454, 563, 5, 111, 0, 0, 455, 456, 5, 79, 0, 0, 456, 457, 5, 108, 0, 0, 457, 563, 5, 101, 0, 0, 458, 459, 5, 79, 0, 0, 459, 460, 5, 114, 0, 0, 460, 563, 5, 110, 0, 0, 461, 462, 5, 80, 0, 0, 462, 463, 5, 97, 0, 0, 463, 563, 5, 109, 0, 0, 464, 465, 5, 80, 0, 0, 465, 466, 5, 114, 0, 0, 466, 563, 5, 111, 0, 0, 467, 468, 5, 80, 0, 0, 468, 469, 5, 121, 0, 0, 469, 563, 5, 114, 0, 0, 470, 471, 5, 83, 0, 0, 471, 472, 5, 101, 0, 0, 472, 563, 5, 114, 0, 0, 473, 474, 5, 83, 0, 0, 474, 475, 5, 105, 0, 0, 475, 563, 5, 110, 0, 0, 476, 477, 5, 83, 0, 0, 477, 478, 5, 116, 0, 0, 478, 563, 5, 101, 0, 0, 479, 480, 5, 116, 0, 0, 480, 481, 5, 66, 0, 0, 481, 563, 5, 117, 0, 0, 482, 483, 5, 84, 0, 0, 483, 484, 5, 104, 0, 0, 484, 563, 5, 114, 0, 0, 485, 486, 5, 84, 0, 0, 486, 487, 5, 105, 0, 0, 487, 563, 5, 103, 0, 0, 488, 489, 5, 85, 0, 0, 489, 490, 5, 110, 0, 0, 490, 563, 5, 100, 0, 0, 491, 492, 5, 86, 0, 0, 492, 493, 5, 97, 0, 0, 493, 563, 5, 99, 0, 0, 494, 495, 5, 85, 0, 0, 495, 496, 5, 100, 0, 0, 496, 563, 5, 111, 0, 0, 497, 498, 5, 85, 0, 0, 498, 499, 5, 108, 0, 0, 499, 563, 5, 111, 0, 0, 500, 501, 5, 117, 0, 0, 501, 502, 5, 108, 0, 0, 502, 563, 5, 111, 0, 0, 503, 504, 5, 65, 0, 0, 504, 563, 5, 99, 0, 0, 505, 506, 5, 65, 0, 0, 506, 563, 5, 109, 0, 0, 507, 508, 5, 66, 0, 0, 508, 563, 5, 110, 0, 0, 509, 510, 5, 66, 0, 0, 510, 563, 5, 114, 0, 0, 511, 512, 5, 66, 0, 0, 512, 563, 5, 117, 0, 0, 513, 514, 5, 66, 0, 0, 514, 563, 5, 122, 0, 0, 515, 516, 5, 67, 0, 0, 516, 563, 5, 108, 0, 0, 517, 518, 5, 67, 0, 0, 518, 563, 5, 109, 0, 0, 519, 520, 5, 68, 0, 0, 520, 563, 5, 68, 0, 0, 521, 522, 5, 68, 0, 0, 522, 563, 5, 76, 0, 0, 523, 524, 5, 69, 0, 0, 524, 563, 5, 116, 0, 0, 525, 526, 5, 70, 0, 0, 526, 563, 5, 111, 0, 0, 527, 528, 5, 71, 0, 0, 528, 563, 5, 99, 0, 0, 529, 530, 5, 72, 0, 0, 530, 563, 5, 112, 0, 0, 531, 532, 5, 72, 0, 0, 532, 563, 5, 120, 0, 0, 533, 534, 5, 76, 0, 0, 534, 563, 5, 68, 0, 0, 535, 536, 5, 76, 0, 0, 536, 563, 5, 76, 0, 0, 537, 538, 5, 77, 0, 0, 538, 563, 5, 101, 0, 0, 539, 540, 5, 78, 0, 0, 540, 563, 5, 110, 0, 0, 541, 542, 5, 79, 0, 0, 542, 563, 5, 99, 0, 0, 543, 544, 5, 80, 0, 0, 544, 563, 5, 101, 0, 0, 545, 546, 5, 80, 0, 0, 546, 563, 5, 104, 0, 0, 547, 548, 5, 80, 0, 0, 548, 563, 5, 114, 0, 0, 549, 550, 5, 80, 0, 0, 550, 563, 5, 112, 0, 0, 551, 552, 5, 84, 0, 0, 552, 563, 5, 102, 0, 0, 553, 554, 5, 84, 0, 0, 554, 563, 5, 114, 0, 0, 555, 556, 5, 84, 0, 0, 556, 563, 5, 115, 0, 0, 557, 558, 5, 86, 0, 0, 558, 563, 5, 108, 0, 0, 559, 560, 5, 101, 0, 0, 560, 563, 5, 110, 0, 0, 561, 563, 7, 0, 0, 0, 562, 252, 1, 0, 0, 0, 562, 263, 1, 0, 0, 0, 562, 272, 1, 0, 0, 0, 562, 279, 1, 0, 0, 0, 562, 286, 1, 0, 0, 0, 562, 292, 1, 0, 0, 0, 562, 297, 1, 0, 0, 0, 562, 302, 1, 0, 0, 0, 562, 306, 1, 0, 0, 0, 562, 310, 1, 0, 0, 0, 562, 314, 1, 0, 0, 0, 562, 318, 1, 0, 0, 0, 562, 322, 1, 0, 0, 0, 562, 326, 1, 0, 0, 0, 562, 329, 1, 0, 0, 0, 562, 332, 1, 0, 0, 0, 562, 335, 1, 0, 0, 0, 562, 338, 1, 0, 0, 0, 562, 341, 1, 0, 0, 0, 562, 344, 1, 0, 0, 0, 562, 347, 1, 0, 0, 0, 562, 350, 1, 0, 0, 0, 562, 353, 1, 0, 0, 0, 562, 356, 1, 0, 0, 0, 562, 359, 1, 0, 0, 0, 562, 362, 1, 0, 0, 0, 562, 365, 1, 0, 0, 0, 562, 368, 1, 0, 0, 0, 562, 371, 1, 0, 0, 0, 562, 374, 1, 0, 0, 0, 562, 377, 1, 0, 0, 0, 562, 380, 1, 0, 0, 0, 562, 383, 1, 0, 0, 0, 562, 386, 1, 0, 0, 0, 562, 389, 1, 0, 0, 0, 562, 392, 1, 0, 0, 0, 562, 395, 1, 0, 0, 0, 562, 398, 1, 0, 0, 0, 562, 401, 1, 0, 0, 0, 562, 404, 1, 0, 0, 0, 562, 407, 1, 0, 0, 0, 562, 410, 1, 0, 0, 0, 562, 413, 1, 0, 0, 0, 562, 416, 1, 0, 0, 0, 562, 419, 1, 0, 0, 0, 562, 422, 1, 0, 0, 0, 562, 425, 1, 0, 0, 0, 562, 428, 1, 0, 0, 0, 562, 431, 1, 0, 0, 0, 562, 434, 1, 0, 0, 0, 562, 437, 1, 0, 0, 0, 562, 440, 1, 0, 0, 0, 562, 443, 1, 0, 0, 0, 562, 446, 1, 0, 0, 0, 562, 449, 1, 0, 0, 0, 562, 452, 1, 0, 0, 0, 562, 455, 1, 0, 0, 0, 562, 458, 1, 0, 0, 0, 562, 461, 1, 0, 0, 0, 562, 464, 1, 0, 0, 0, 562, 467, 1, 0, 0, 0, 562, 470, 1, 0, 0, 0, 562, 473, 1, 0, 0, 0, 562, 476, 1, 0, 0, 0, 562, 479, 1, 0, 0, 0, 562, 482, 1, 0, 0, 0, 562, 485, 1, 0, 0, 0, 562, 488, 1, 0, 0, 0, 562, 491, 1, 0, 0, 0, 562, 494, 1, 0, 0, 0, 562, 497, 1, 0, 0, 0, 562, 500, 1, 0, 0, 0, 562, 503, 1, 0, 0, 0, 562, 505, 1, 0, 0, 0, 562, 507, 1, 0, 0, 0, 562, 509, 1, 0, 0, 0, 562, 511, 1, 0, 0, 0, 562, 513, 1, 0, 0, 0, 562, 515, 1, 0, 0, 0, 562, 517, 1, 0, 0, 0, 562, 519, 1, 0, 0, 0, 562, 521, 1, 0, 0, 0, 562, 523, 1, 0, 0, 0, 562, 525, 1, 0, 0, 0, 562, 527, 1, 0, 0, 0, 562, 529, 1, 0, 0, 0, 562, 531, 1, 0, 0, 0, 562, 533, 1, 0, 0, 0, 562, 535, 1, 0, 0, 0, 562, 537, 1, 0, 0, 0, 562, 539, 1, 0, 0, 0, 562, 541, 1, 0, 0, 0, 562, 543, 1, 0, 0, 0, 562, 545, 1, 0, 0, 0, 562, 547, 1, 0, 0, 0, 562, 549, 1, 0, 0, 0, 562, 551, 1, 0, 0, 0, 562, 553, 1, 0, 0, 0, 562, 555, 1, 0, 0, 0, 562, 557, 1, 0, 0, 0, 562, 559, 1, 0, 0, 0, 562, 561, 1, 0, 0, 0, 563, 16, 1, 0, 0, 0, 564, 565, 5, 65, 0, 0, 565, 566, 5, 110, 0, 0, 566, 567, 5, 104, 0, 0, 567, 568, 5, 121, 0, 0, 568, 569, 5, 100, 0, 0, 569, 570, 5, 114, 0, 0, 570, 571, 5, 111, 0, 0, 571, 18, 1, 0, 0, 0, 572, 573, 5, 48, 0, 0, 573, 574, 5, 100, 0, 0, 574, 20, 1, 0, 0, 0, 575, 576, 7, 1, 0, 0, 576, 22, 1, 0, 0, 0, 577, 578, 5, 117, 0, 0, 578, 579, 5, 108, 0, 0, 579, 580, 5, 111, 0, 0, 580, 581, 5, 115, 0, 0, 581, 582, 5, 97, 0, 0, 582, 583, 5, 114, 0, 0, 583, 584, 5, 105, 0, 0, 584, 610, 5, 99, 0, 0, 585, 586, 5, 117, 0, 0, 586, 587, 5, 108, 0, 0, 587, 588, 5, 111, 0, 0, 588, 589, 5, 115, 0, 0, 589, 590, 5, 111, 0, 0, 590, 591, 5, 110, 0, 0, 591, 592, 5, 105, 0, 0, 592, 610, 5, 99, 0, 0, 593, 594, 5, 117, 0, 0, 594, 595, 5, 114, 0, 0, 595, 596, 5, 111, 0, 0, 596, 597, 5, 110, 0, 0, 597, 598, 5, 105, 0, 0, 598, 610, 5, 99, 0, 0, 599, 600, 5, 111, 0, 0, 600, 601, 5, 110, 0, 0, 601, 602, 5, 105, 0, 0, 602, 610, 5, 99, 0, 0, 603, 604, 5, 97, 0, 0, 604, 605, 5, 114, 0, 0, 605, 606, 5, 105, 0, 0, 606, 610, 5, 99, 0, 0, 607, 608, 5, 111, 0, 0, 608, 610, 5, 108, 0, 0, 609, 577, 1, 0, 0, 0, 609, 585, 1, 0, 0, 0, 609, 593, 1, 0, 0, 0, 609, 599, 1, 0, 0, 0, 609, 603, 1, 0, 0, 0, 609, 607, 1, 0, 0, 0, 610, 24, 1, 0, 0, 0, 611, 612, 5, 72, 0, 0, 612, 613, 5, 101, 0, 0, 613, 627, 5, 112, 0, 0, 614, 615, 5, 72, 0, 0, 615, 616, 5, 101, 0, 0, 616, 627, 5, 120, 0, 0, 617, 618, 5, 79, 0, 0, 618, 619, 5, 99, 0, 0, 619, 627, 5, 116, 0, 0, 620, 621, 5, 80, 0, 0, 621, 622, 5, 101, 0, 0, 622, 627, 5, 110, 0, 0, 623, 624, 5, 83, 0, 0, 624, 625, 5, 117, 0, 0, 625, 627, 5, 99, 0, 0, 626, 611, 1, 0, 0, 0, 626, 614, 1, 0, 0, 0, 626, 617, 1, 0, 0, 0, 626, 620, 1, 0, 0, 0, 626, 623, 1, 0, 0, 0, 627, 26, 1, 0, 0, 0, 628, 629, 2, 97, 98, 0, 629, 28, 1, 0, 0, 0, 630, 631, 7, 2, 0, 0, 631, 30, 1, 0, 0, 0, 632, 636, 2, 49, 57, 0, 633, 635, 2, 48, 57, 0, 634, 633, 1, 0, 0, 0, 635, 638, 1, 0, 0, 0, 636, 634, 1, 0, 0, 0, 636, 637, 1, 0, 0, 0, 637, 32, 1, 0, 0, 0, 638, 636, 1, 0, 0, 0, 639, 640, 5, 44, 0, 0, 640, 34, 1, 0, 0, 0, 641, 642, 5, 45, 0, 0, 642, 36, 1, 0, 0, 0, 643, 644, 5, 40, 0, 0, 644, 38, 1, 0, 0, 0, 645, 646, 5, 41, 0, 0, 646, 40, 1, 0, 0, 0, 647, 648, 5, 91, 0, 0, 648, 42, 1, 0, 0, 0, 649, 650, 5, 93, 0, 0, 650, 44, 1, 0, 0, 0, 651, 652, 5, 123, 0, 0, 652, 46, 1, 0, 0, 0, 653, 654, 5, 125, 0, 0, 654, 48, 1, 0, 0, 0, 655, 656, 5, 97, 0, 0, 656, 50, 1, 0, 0, 0, 657, 658, 5, 97, 0, 0, 658, 659, 5, 105, 0, 0, 659, 52, 1, 0, 0, 0, 660, 661, 5, 99, 0, 0, 661, 54, 1, 0, 0, 0, 662, 663, 5, 100, 0, 0, 663, 56, 1, 0, 0, 0, 664, 665, 5, 101, 0, 0, 665, 58, 1, 0, 0, 0, 666, 667, 5, 116, 0, 0, 667, 60, 1, 0, 0, 0, 668, 669, 5, 61, 0, 0, 669, 62, 1, 0, 0, 0, 670, 671, 5, 105, 0, 0, 671, 64, 1, 0, 0, 0, 672, 673, 5, 63, 0, 0, 673, 66, 1, 0, 0, 0, 6, 0, 242, 562, 609, 626, 636, 0] \ No newline at end of file diff --git a/glyles/grammar/GlycanLexer.py b/glyles/grammar/GlycanLexer.py index 87d2031..bce9d2c 100644 --- a/glyles/grammar/GlycanLexer.py +++ b/glyles/grammar/GlycanLexer.py @@ -1,388 +1,283 @@ -# Generated from Glycan.g4 by ANTLR 4.9 +# Generated from Glycan.g4 by ANTLR 4.13.2 from antlr4 import * from io import StringIO -from typing.io import TextIO import sys - +if sys.version_info[1] > 5: + from typing import TextIO +else: + from typing.io import TextIO def serializedATN(): - with StringIO() as buf: - buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\24") - buf.write("\u02ed\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") - buf.write("\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r") - buf.write("\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23") - buf.write("\t\23\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3\7\3\7") - buf.write("\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3") - buf.write("\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7") - buf.write("\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3") - buf.write("\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7") - buf.write("\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3") - buf.write("\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7") - buf.write("\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3") - buf.write("\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7") - buf.write("\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3") - buf.write("\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7") - buf.write("\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3") - buf.write("\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7") - buf.write("\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u00de\n\7\3\b\3\b") - buf.write("\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3") - buf.write("\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b") - buf.write("\3\b\3\b\3\b\3\b\3\b\3\b\3\b\7\b\u0104\n\b\f\b\16\b\u0107") - buf.write("\13\b\3\b\3\b\3\b\3\b\7\b\u010d\n\b\f\b\16\b\u0110\13") - buf.write("\b\3\b\5\b\u0113\n\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3") - buf.write("\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b") - buf.write("\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3") - buf.write("\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b") - buf.write("\3\b\3\b\3\b\3\b\5\b\u014a\n\b\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3") - buf.write("\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t") - buf.write("\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\5\t\u0286") - buf.write("\n\t\3\n\3\n\3\13\3\13\3\13\5\13\u028d\n\13\3\13\3\13") - buf.write("\3\13\7\13\u0292\n\13\f\13\16\13\u0295\13\13\3\f\3\f\3") - buf.write("\f\5\f\u029a\n\f\3\f\3\f\3\f\5\f\u029f\n\f\3\f\7\f\u02a2") - buf.write("\n\f\f\f\16\f\u02a5\13\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\7") - buf.write("\f\u02ae\n\f\f\f\16\f\u02b1\13\f\3\f\3\f\5\f\u02b5\n\f") - buf.write("\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3") - buf.write("\r\3\r\5\r\u02c6\n\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16") - buf.write("\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16") - buf.write("\3\16\3\16\3\16\5\16\u02dd\n\16\3\17\3\17\3\20\3\20\3") - buf.write("\21\3\21\3\22\3\22\7\22\u02e7\n\22\f\22\16\22\u02ea\13") - buf.write("\22\3\23\3\23\2\2\24\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21") - buf.write("\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24") - buf.write("\3\2\7\b\2CCHHKKPPRRUU\4\2EEPR\4\2cckk\4\2eevv\4\2hhr") - buf.write("r\2\u03ae\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2") - buf.write("\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2") - buf.write("\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2") - buf.write("\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#") - buf.write("\3\2\2\2\2%\3\2\2\2\3\'\3\2\2\2\5)\3\2\2\2\7+\3\2\2\2") - buf.write("\t-\3\2\2\2\13/\3\2\2\2\r\u00dd\3\2\2\2\17\u0149\3\2\2") - buf.write("\2\21\u0285\3\2\2\2\23\u0287\3\2\2\2\25\u028c\3\2\2\2") - buf.write("\27\u02b4\3\2\2\2\31\u02c5\3\2\2\2\33\u02dc\3\2\2\2\35") - buf.write("\u02de\3\2\2\2\37\u02e0\3\2\2\2!\u02e2\3\2\2\2#\u02e4") - buf.write("\3\2\2\2%\u02eb\3\2\2\2\'(\7}\2\2(\4\3\2\2\2)*\7\"\2\2") - buf.write("*\6\3\2\2\2+,\7\177\2\2,\b\3\2\2\2-.\7]\2\2.\n\3\2\2\2") - buf.write("/\60\7_\2\2\60\f\3\2\2\2\61\u00de\5\31\r\2\62\63\7I\2") - buf.write("\2\63\64\7n\2\2\64\u00de\7e\2\2\65\66\7O\2\2\66\67\7c") - buf.write("\2\2\67\u00de\7p\2\289\7I\2\29:\7c\2\2:\u00de\7n\2\2;") - buf.write("<\7I\2\2<=\7w\2\2=\u00de\7n\2\2>?\7C\2\2?@\7n\2\2@\u00de") - buf.write("\7v\2\2AB\7C\2\2BC\7n\2\2C\u00de\7n\2\2DE\7V\2\2EF\7c") - buf.write("\2\2F\u00de\7n\2\2GH\7K\2\2HI\7f\2\2I\u00de\7q\2\2JK\7") - buf.write("S\2\2KL\7w\2\2L\u00de\7k\2\2MN\7T\2\2NO\7j\2\2O\u00de") - buf.write("\7c\2\2PQ\7H\2\2QR\7w\2\2R\u00de\7e\2\2ST\7Q\2\2TU\7n") - buf.write("\2\2U\u00de\7k\2\2VW\7V\2\2WX\7{\2\2X\u00de\7x\2\2YZ\7") - buf.write("C\2\2Z[\7d\2\2[\u00de\7g\2\2\\]\7R\2\2]^\7c\2\2^\u00de") - buf.write("\7t\2\2_`\7F\2\2`a\7k\2\2a\u00de\7i\2\2bc\7E\2\2cd\7q") - buf.write("\2\2d\u00de\7n\2\2ef\7C\2\2fg\7t\2\2g\u00de\7c\2\2hi\7") - buf.write("N\2\2ij\7{\2\2j\u00de\7z\2\2kl\7Z\2\2lm\7{\2\2m\u00de") - buf.write("\7n\2\2no\7T\2\2op\7k\2\2p\u00de\7d\2\2qr\7M\2\2rs\7f") - buf.write("\2\2s\u00de\7p\2\2tu\7P\2\2uv\7g\2\2v\u00de\7w\2\2wx\7") - buf.write("U\2\2xy\7k\2\2y\u00de\7c\2\2z{\7R\2\2{|\7u\2\2|\u00de") - buf.write("\7g\2\2}~\7N\2\2~\177\7g\2\2\177\u00de\7i\2\2\u0080\u0081") - buf.write("\7C\2\2\u0081\u0082\7e\2\2\u0082\u00de\7k\2\2\u0083\u0084") - buf.write("\7D\2\2\u0084\u0085\7c\2\2\u0085\u00de\7e\2\2\u0086\u0087") - buf.write("\7M\2\2\u0087\u0088\7f\2\2\u0088\u00de\7q\2\2\u0089\u008a") - buf.write("\7F\2\2\u008a\u008b\7j\2\2\u008b\u00de\7c\2\2\u008c\u008d") - buf.write("\7O\2\2\u008d\u008e\7w\2\2\u008e\u00de\7t\2\2\u008f\u0090") - buf.write("\7C\2\2\u0090\u0091\7r\2\2\u0091\u00de\7k\2\2\u0092\u0093") - buf.write("\7H\2\2\u0093\u0094\7t\2\2\u0094\u00de\7w\2\2\u0095\u0096") - buf.write("\7V\2\2\u0096\u0097\7c\2\2\u0097\u00de\7i\2\2\u0098\u0099") - buf.write("\7U\2\2\u0099\u009a\7q\2\2\u009a\u00de\7t\2\2\u009b\u009c") - buf.write("\7R\2\2\u009c\u009d\7u\2\2\u009d\u00de\7k\2\2\u009e\u009f") - buf.write("\7G\2\2\u009f\u00a0\7t\2\2\u00a0\u00de\7{\2\2\u00a1\u00a2") - buf.write("\7V\2\2\u00a2\u00a3\7j\2\2\u00a3\u00a4\7t\2\2\u00a4\u00de") - buf.write("\7g\2\2\u00a5\u00a6\7T\2\2\u00a6\u00a7\7w\2\2\u00a7\u00de") - buf.write("\7n\2\2\u00a8\u00a9\7Z\2\2\u00a9\u00aa\7w\2\2\u00aa\u00de") - buf.write("\7n\2\2\u00ab\u00ac\7W\2\2\u00ac\u00ad\7p\2\2\u00ad\u00de") - buf.write("\7m\2\2\u00ae\u00af\7C\2\2\u00af\u00b0\7e\2\2\u00b0\u00de") - buf.write("\7g\2\2\u00b1\u00b2\7C\2\2\u00b2\u00b3\7e\2\2\u00b3\u00de") - buf.write("\7q\2\2\u00b4\u00b5\7C\2\2\u00b5\u00b6\7u\2\2\u00b6\u00de") - buf.write("\7e\2\2\u00b7\u00b8\7H\2\2\u00b8\u00b9\7w\2\2\u00b9\u00de") - buf.write("\7u\2\2\u00ba\u00bb\7K\2\2\u00bb\u00bc\7p\2\2\u00bc\u00de") - buf.write("\7u\2\2\u00bd\u00be\7M\2\2\u00be\u00de\7q\2\2\u00bf\u00c0") - buf.write("\7R\2\2\u00c0\u00c1\7c\2\2\u00c1\u00de\7w\2\2\u00c2\u00c3") - buf.write("\7R\2\2\u00c3\u00c4\7g\2\2\u00c4\u00de\7t\2\2\u00c5\u00c6") - buf.write("\7U\2\2\u00c6\u00c7\7g\2\2\u00c7\u00de\7f\2\2\u00c8\u00c9") - buf.write("\7U\2\2\u00c9\u00ca\7w\2\2\u00ca\u00de\7i\2\2\u00cb\u00cc") - buf.write("\7X\2\2\u00cc\u00cd\7k\2\2\u00cd\u00de\7q\2\2\u00ce\u00cf") - buf.write("\7Z\2\2\u00cf\u00d0\7n\2\2\u00d0\u00de\7w\2\2\u00d1\u00d2") - buf.write("\7[\2\2\u00d2\u00d3\7g\2\2\u00d3\u00de\7t\2\2\u00d4\u00d5") - buf.write("\7G\2\2\u00d5\u00d6\7t\2\2\u00d6\u00d7\7y\2\2\u00d7\u00d8") - buf.write("\7k\2\2\u00d8\u00d9\7p\2\2\u00d9\u00da\7k\2\2\u00da\u00db") - buf.write("\7q\2\2\u00db\u00dc\7u\2\2\u00dc\u00de\7g\2\2\u00dd\61") - buf.write("\3\2\2\2\u00dd\62\3\2\2\2\u00dd\65\3\2\2\2\u00dd8\3\2") - buf.write("\2\2\u00dd;\3\2\2\2\u00dd>\3\2\2\2\u00ddA\3\2\2\2\u00dd") - buf.write("D\3\2\2\2\u00ddG\3\2\2\2\u00ddJ\3\2\2\2\u00ddM\3\2\2\2") - buf.write("\u00ddP\3\2\2\2\u00ddS\3\2\2\2\u00ddV\3\2\2\2\u00ddY\3") - buf.write("\2\2\2\u00dd\\\3\2\2\2\u00dd_\3\2\2\2\u00ddb\3\2\2\2\u00dd") - buf.write("e\3\2\2\2\u00ddh\3\2\2\2\u00ddk\3\2\2\2\u00ddn\3\2\2\2") - buf.write("\u00ddq\3\2\2\2\u00ddt\3\2\2\2\u00ddw\3\2\2\2\u00ddz\3") - buf.write("\2\2\2\u00dd}\3\2\2\2\u00dd\u0080\3\2\2\2\u00dd\u0083") - buf.write("\3\2\2\2\u00dd\u0086\3\2\2\2\u00dd\u0089\3\2\2\2\u00dd") - buf.write("\u008c\3\2\2\2\u00dd\u008f\3\2\2\2\u00dd\u0092\3\2\2\2") - buf.write("\u00dd\u0095\3\2\2\2\u00dd\u0098\3\2\2\2\u00dd\u009b\3") - buf.write("\2\2\2\u00dd\u009e\3\2\2\2\u00dd\u00a1\3\2\2\2\u00dd\u00a5") - buf.write("\3\2\2\2\u00dd\u00a8\3\2\2\2\u00dd\u00ab\3\2\2\2\u00dd") - buf.write("\u00ae\3\2\2\2\u00dd\u00b1\3\2\2\2\u00dd\u00b4\3\2\2\2") - buf.write("\u00dd\u00b7\3\2\2\2\u00dd\u00ba\3\2\2\2\u00dd\u00bd\3") - buf.write("\2\2\2\u00dd\u00bf\3\2\2\2\u00dd\u00c2\3\2\2\2\u00dd\u00c5") - buf.write("\3\2\2\2\u00dd\u00c8\3\2\2\2\u00dd\u00cb\3\2\2\2\u00dd") - buf.write("\u00ce\3\2\2\2\u00dd\u00d1\3\2\2\2\u00dd\u00d4\3\2\2\2") - buf.write("\u00de\16\3\2\2\2\u00df\u00e0\5#\22\2\u00e0\u00e1\7.\2") - buf.write("\2\u00e1\u00e2\5#\22\2\u00e2\u00e3\7/\2\2\u00e3\u00e4") - buf.write("\7C\2\2\u00e4\u00e5\7p\2\2\u00e5\u00e6\7j\2\2\u00e6\u00e7") - buf.write("\7{\2\2\u00e7\u00e8\7f\2\2\u00e8\u00e9\7t\2\2\u00e9\u00ea") - buf.write("\7q\2\2\u00ea\u00eb\7/\2\2\u00eb\u014a\3\2\2\2\u00ec\u00ed") - buf.write("\5#\22\2\u00ed\u00ee\7/\2\2\u00ee\u00ef\7C\2\2\u00ef\u00f0") - buf.write("\7p\2\2\u00f0\u00f1\7j\2\2\u00f1\u00f2\7{\2\2\u00f2\u00f3") - buf.write("\7f\2\2\u00f3\u00f4\7t\2\2\u00f4\u00f5\7q\2\2\u00f5\u00f6") - buf.write("\7/\2\2\u00f6\u014a\3\2\2\2\u00f7\u00f8\5#\22\2\u00f8") - buf.write("\u00f9\7/\2\2\u00f9\u00fa\5\23\n\2\u00fa\u00fb\7/\2\2") - buf.write("\u00fb\u00fc\5\21\t\2\u00fc\u00fd\7/\2\2\u00fd\u014a\3") - buf.write("\2\2\2\u00fe\u00ff\5#\22\2\u00ff\u0100\5\25\13\2\u0100") - buf.write("\u014a\3\2\2\2\u0101\u0105\5#\22\2\u0102\u0104\5\23\n") - buf.write("\2\u0103\u0102\3\2\2\2\u0104\u0107\3\2\2\2\u0105\u0103") - buf.write("\3\2\2\2\u0105\u0106\3\2\2\2\u0106\u0108\3\2\2\2\u0107") - buf.write("\u0105\3\2\2\2\u0108\u0109\5\21\t\2\u0109\u014a\3\2\2") - buf.write("\2\u010a\u0113\5#\22\2\u010b\u010d\5\23\n\2\u010c\u010b") - buf.write("\3\2\2\2\u010d\u0110\3\2\2\2\u010e\u010c\3\2\2\2\u010e") - buf.write("\u010f\3\2\2\2\u010f\u0113\3\2\2\2\u0110\u010e\3\2\2\2") - buf.write("\u0111\u0113\7/\2\2\u0112\u010a\3\2\2\2\u0112\u010e\3") - buf.write("\2\2\2\u0112\u0111\3\2\2\2\u0113\u0114\3\2\2\2\u0114\u014a") - buf.write("\5\21\t\2\u0115\u0116\5#\22\2\u0116\u0117\4fg\2\u0117") - buf.write("\u014a\3\2\2\2\u0118\u0119\5#\22\2\u0119\u011a\7.\2\2") - buf.write("\u011a\u011b\5#\22\2\u011b\u011c\7f\2\2\u011c\u014a\3") - buf.write("\2\2\2\u011d\u011e\7/\2\2\u011e\u011f\7w\2\2\u011f\u0120") - buf.write("\7n\2\2\u0120\u0121\7q\2\2\u0121\u0122\7u\2\2\u0122\u0123") - buf.write("\7c\2\2\u0123\u0124\7t\2\2\u0124\u0125\7k\2\2\u0125\u014a") - buf.write("\7e\2\2\u0126\u0127\7/\2\2\u0127\u0128\7w\2\2\u0128\u0129") - buf.write("\7n\2\2\u0129\u012a\7q\2\2\u012a\u012b\7u\2\2\u012b\u012c") - buf.write("\7q\2\2\u012c\u012d\7p\2\2\u012d\u012e\7k\2\2\u012e\u014a") - buf.write("\7e\2\2\u012f\u0130\7/\2\2\u0130\u0131\7w\2\2\u0131\u0132") - buf.write("\7t\2\2\u0132\u0133\7q\2\2\u0133\u0134\7p\2\2\u0134\u0135") - buf.write("\7k\2\2\u0135\u014a\7e\2\2\u0136\u0137\7/\2\2\u0137\u0138") - buf.write("\7q\2\2\u0138\u0139\7p\2\2\u0139\u013a\7k\2\2\u013a\u014a") - buf.write("\7e\2\2\u013b\u013c\7/\2\2\u013c\u013d\7c\2\2\u013d\u013e") - buf.write("\7t\2\2\u013e\u013f\7k\2\2\u013f\u014a\7e\2\2\u0140\u0141") - buf.write("\7/\2\2\u0141\u0142\7q\2\2\u0142\u014a\7n\2\2\u0143\u0144") - buf.write("\7\62\2\2\u0144\u014a\7f\2\2\u0145\u0146\7F\2\2\u0146") - buf.write("\u014a\7/\2\2\u0147\u0148\7N\2\2\u0148\u014a\7/\2\2\u0149") - buf.write("\u00df\3\2\2\2\u0149\u00ec\3\2\2\2\u0149\u00f7\3\2\2\2") - buf.write("\u0149\u00fe\3\2\2\2\u0149\u0101\3\2\2\2\u0149\u0112\3") - buf.write("\2\2\2\u0149\u0115\3\2\2\2\u0149\u0118\3\2\2\2\u0149\u011d") - buf.write("\3\2\2\2\u0149\u0126\3\2\2\2\u0149\u012f\3\2\2\2\u0149") - buf.write("\u0136\3\2\2\2\u0149\u013b\3\2\2\2\u0149\u0140\3\2\2\2") - buf.write("\u0149\u0143\3\2\2\2\u0149\u0145\3\2\2\2\u0149\u0147\3") - buf.write("\2\2\2\u014a\20\3\2\2\2\u014b\u0286\5\31\r\2\u014c\u014d") - buf.write("\7E\2\2\u014d\u014e\7g\2\2\u014e\u014f\7t\2\2\u014f\u0150") - buf.write("\7q\2\2\u0150\u0151\7r\2\2\u0151\u0152\7n\2\2\u0152\u0153") - buf.write("\7c\2\2\u0153\u0154\7u\2\2\u0154\u0155\7v\2\2\u0155\u0156") - buf.write("\7k\2\2\u0156\u0286\7e\2\2\u0157\u0158\7N\2\2\u0158\u0159") - buf.write("\7c\2\2\u0159\u015a\7e\2\2\u015a\u015b\7e\2\2\u015b\u015c") - buf.write("\7g\2\2\u015c\u015d\7t\2\2\u015d\u015e\7q\2\2\u015e\u015f") - buf.write("\7k\2\2\u015f\u0286\7e\2\2\u0160\u0161\7\65\2\2\u0161") - buf.write("\u0162\7q\2\2\u0162\u0163\7z\2\2\u0163\u0164\7q\2\2\u0164") - buf.write("\u0165\7O\2\2\u0165\u0166\7{\2\2\u0166\u0286\7t\2\2\u0167") - buf.write("\u0168\7R\2\2\u0168\u0169\7u\2\2\u0169\u016a\7{\2\2\u016a") - buf.write("\u016b\7n\2\2\u016b\u016c\7n\2\2\u016c\u016d\7k\2\2\u016d") - buf.write("\u0286\7e\2\2\u016e\u016f\7I\2\2\u016f\u0170\7g\2\2\u0170") - buf.write("\u0171\7f\2\2\u0171\u0172\7f\2\2\u0172\u0173\7k\2\2\u0173") - buf.write("\u0286\7e\2\2\u0174\u0175\7C\2\2\u0175\u0176\7n\2\2\u0176") - buf.write("\u0177\7n\2\2\u0177\u0178\7{\2\2\u0178\u0286\7n\2\2\u0179") - buf.write("\u017a\7R\2\2\u017a\u017b\7j\2\2\u017b\u017c\7v\2\2\u017c") - buf.write("\u017d\7j\2\2\u017d\u0286\7k\2\2\u017e\u017f\7c\2\2\u017f") - buf.write("\u0180\7N\2\2\u0180\u0181\7p\2\2\u0181\u0286\7p\2\2\u0182") - buf.write("\u0183\7i\2\2\u0183\u0184\7N\2\2\u0184\u0185\7p\2\2\u0185") - buf.write("\u0286\7p\2\2\u0186\u0187\7g\2\2\u0187\u0188\7U\2\2\u0188") - buf.write("\u0189\7v\2\2\u0189\u0286\7g\2\2\u018a\u018b\7E\2\2\u018b") - buf.write("\u018c\7q\2\2\u018c\u018d\7w\2\2\u018d\u0286\7o\2\2\u018e") - buf.write("\u018f\7J\2\2\u018f\u0190\7U\2\2\u0190\u0191\7g\2\2\u0191") - buf.write("\u0286\7t\2\2\u0192\u0193\7R\2\2\u0193\u0194\7t\2\2\u0194") - buf.write("\u0195\7q\2\2\u0195\u0286\7r\2\2\u0196\u0197\7C\2\2\u0197") - buf.write("\u0198\7e\2\2\u0198\u0286\7j\2\2\u0199\u019a\7C\2\2\u019a") - buf.write("\u019b\7g\2\2\u019b\u0286\7r\2\2\u019c\u019d\7C\2\2\u019d") - buf.write("\u019e\7n\2\2\u019e\u0286\7c\2\2\u019f\u01a0\7C\2\2\u01a0") - buf.write("\u01a1\7p\2\2\u01a1\u0286\7i\2\2\u01a2\u01a3\7C\2\2\u01a3") - buf.write("\u01a4\7u\2\2\u01a4\u0286\7r\2\2\u01a5\u01a6\7D\2\2\u01a6") - buf.write("\u01a7\7g\2\2\u01a7\u0286\7j\2\2\u01a8\u01a9\7D\2\2\u01a9") - buf.write("\u01aa\7w\2\2\u01aa\u0286\7v\2\2\u01ab\u01ac\7E\2\2\u01ac") - buf.write("\u01ad\7e\2\2\u01ad\u0286\7v\2\2\u01ae\u01af\7E\2\2\u01af") - buf.write("\u01b0\7g\2\2\u01b0\u0286\7t\2\2\u01b1\u01b2\7E\2\2\u01b2") - buf.write("\u01b3\7g\2\2\u01b3\u0286\7v\2\2\u01b4\u01b5\7E\2\2\u01b5") - buf.write("\u01b6\7j\2\2\u01b6\u0286\7q\2\2\u01b7\u01b8\7E\2\2\u01b8") - buf.write("\u01b9\7k\2\2\u01b9\u0286\7p\2\2\u01ba\u01bb\7E\2\2\u01bb") - buf.write("\u01bc\7t\2\2\u01bc\u0286\7v\2\2\u01bd\u01be\7E\2\2\u01be") - buf.write("\u01bf\7{\2\2\u01bf\u0286\7u\2\2\u01c0\u01c1\7F\2\2\u01c1") - buf.write("\u01c2\7e\2\2\u01c2\u0286\7g\2\2\u01c3\u01c4\7F\2\2\u01c4") - buf.write("\u01c5\7e\2\2\u01c5\u0286\7q\2\2\u01c6\u01c7\7F\2\2\u01c7") - buf.write("\u01c8\7g\2\2\u01c8\u0286\7e\2\2\u01c9\u01ca\7F\2\2\u01ca") - buf.write("\u01cb\7j\2\2\u01cb\u0286\7r\2\2\u01cc\u01cd\7F\2\2\u01cd") - buf.write("\u01ce\7q\2\2\u01ce\u0286\7f\2\2\u01cf\u01d0\7G\2\2\u01d0") - buf.write("\u01d1\7v\2\2\u01d1\u0286\7i\2\2\u01d2\u01d3\7G\2\2\u01d3") - buf.write("\u01d4\7v\2\2\u01d4\u0286\7P\2\2\u01d5\u01d6\7G\2\2\u01d6") - buf.write("\u01d7\7v\2\2\u01d7\u0286\7p\2\2\u01d8\u01d9\7H\2\2\u01d9") - buf.write("\u01da\7g\2\2\u01da\u0286\7t\2\2\u01db\u01dc\7I\2\2\u01dc") - buf.write("\u01dd\7t\2\2\u01dd\u0286\7q\2\2\u01de\u01df\7I\2\2\u01df") - buf.write("\u01e0\7n\2\2\u01e0\u0286\7w\2\2\u01e1\u01e2\7I\2\2\u01e2") - buf.write("\u01e3\7n\2\2\u01e3\u0286\7{\2\2\u01e4\u01e5\7J\2\2\u01e5") - buf.write("\u01e6\7r\2\2\u01e6\u0286\7q\2\2\u01e7\u01e8\7J\2\2\u01e8") - buf.write("\u01e9\7u\2\2\u01e9\u0286\7g\2\2\u01ea\u01eb\7J\2\2\u01eb") - buf.write("\u01ec\7z\2\2\u01ec\u0286\7q\2\2\u01ed\u01ee\7N\2\2\u01ee") - buf.write("\u01ef\7c\2\2\u01ef\u0286\7e\2\2\u01f0\u01f1\7N\2\2\u01f1") - buf.write("\u01f2\7c\2\2\u01f2\u0286\7w\2\2\u01f3\u01f4\7N\2\2\u01f4") - buf.write("\u01f5\7g\2\2\u01f5\u0286\7w\2\2\u01f6\u01f7\7N\2\2\u01f7") - buf.write("\u01f8\7k\2\2\u01f8\u0286\7p\2\2\u01f9\u01fa\7N\2\2\u01fa") - buf.write("\u01fb\7{\2\2\u01fb\u0286\7u\2\2\u01fc\u01fd\7O\2\2\u01fd") - buf.write("\u01fe\7c\2\2\u01fe\u0286\7n\2\2\u01ff\u0200\7O\2\2\u0200") - buf.write("\u0201\7c\2\2\u0201\u0286\7t\2\2\u0202\u0203\7O\2\2\u0203") - buf.write("\u0204\7g\2\2\u0204\u0286\7n\2\2\u0205\u0206\7O\2\2\u0206") - buf.write("\u0207\7q\2\2\u0207\u0286\7p\2\2\u0208\u0209\7O\2\2\u0209") - buf.write("\u020a\7{\2\2\u020a\u0286\7t\2\2\u020b\u020c\7P\2\2\u020c") - buf.write("\u020d\7g\2\2\u020d\u0286\7t\2\2\u020e\u020f\7P\2\2\u020f") - buf.write("\u0210\7p\2\2\u0210\u0286\7q\2\2\u0211\u0212\7P\2\2\u0212") - buf.write("\u0213\7q\2\2\u0213\u0286\7p\2\2\u0214\u0215\7Q\2\2\u0215") - buf.write("\u0216\7e\2\2\u0216\u0286\7q\2\2\u0217\u0218\7Q\2\2\u0218") - buf.write("\u0219\7n\2\2\u0219\u0286\7g\2\2\u021a\u021b\7Q\2\2\u021b") - buf.write("\u021c\7t\2\2\u021c\u0286\7p\2\2\u021d\u021e\7R\2\2\u021e") - buf.write("\u021f\7c\2\2\u021f\u0286\7o\2\2\u0220\u0221\7R\2\2\u0221") - buf.write("\u0222\7t\2\2\u0222\u0286\7q\2\2\u0223\u0224\7R\2\2\u0224") - buf.write("\u0225\7{\2\2\u0225\u0286\7t\2\2\u0226\u0227\7U\2\2\u0227") - buf.write("\u0228\7g\2\2\u0228\u0286\7t\2\2\u0229\u022a\7U\2\2\u022a") - buf.write("\u022b\7k\2\2\u022b\u0286\7p\2\2\u022c\u022d\7U\2\2\u022d") - buf.write("\u022e\7v\2\2\u022e\u0286\7g\2\2\u022f\u0230\7v\2\2\u0230") - buf.write("\u0231\7D\2\2\u0231\u0286\7w\2\2\u0232\u0233\7V\2\2\u0233") - buf.write("\u0234\7j\2\2\u0234\u0286\7t\2\2\u0235\u0236\7V\2\2\u0236") - buf.write("\u0237\7k\2\2\u0237\u0286\7i\2\2\u0238\u0239\7W\2\2\u0239") - buf.write("\u023a\7p\2\2\u023a\u0286\7f\2\2\u023b\u023c\7X\2\2\u023c") - buf.write("\u023d\7c\2\2\u023d\u0286\7e\2\2\u023e\u023f\7W\2\2\u023f") - buf.write("\u0240\7f\2\2\u0240\u0286\7q\2\2\u0241\u0242\7W\2\2\u0242") - buf.write("\u0243\7n\2\2\u0243\u0286\7q\2\2\u0244\u0245\7w\2\2\u0245") - buf.write("\u0246\7n\2\2\u0246\u0286\7q\2\2\u0247\u0248\7C\2\2\u0248") - buf.write("\u0286\7e\2\2\u0249\u024a\7C\2\2\u024a\u0286\7o\2\2\u024b") - buf.write("\u024c\7D\2\2\u024c\u0286\7p\2\2\u024d\u024e\7D\2\2\u024e") - buf.write("\u0286\7t\2\2\u024f\u0250\7D\2\2\u0250\u0286\7w\2\2\u0251") - buf.write("\u0252\7D\2\2\u0252\u0286\7|\2\2\u0253\u0254\7E\2\2\u0254") - buf.write("\u0286\7n\2\2\u0255\u0256\7E\2\2\u0256\u0286\7o\2\2\u0257") - buf.write("\u0258\7F\2\2\u0258\u0286\7F\2\2\u0259\u025a\7F\2\2\u025a") - buf.write("\u0286\7N\2\2\u025b\u025c\7F\2\2\u025c\u025d\7N\2\2\u025d") - buf.write("\u0286\7/\2\2\u025e\u025f\7G\2\2\u025f\u0286\7v\2\2\u0260") - buf.write("\u0261\7H\2\2\u0261\u0286\7q\2\2\u0262\u0263\7I\2\2\u0263") - buf.write("\u0286\7e\2\2\u0264\u0265\7J\2\2\u0265\u0286\7r\2\2\u0266") - buf.write("\u0267\7J\2\2\u0267\u0286\7z\2\2\u0268\u0269\7N\2\2\u0269") - buf.write("\u0286\7F\2\2\u026a\u026b\7N\2\2\u026b\u0286\7N\2\2\u026c") - buf.write("\u026d\7O\2\2\u026d\u0286\7g\2\2\u026e\u026f\7P\2\2\u026f") - buf.write("\u0286\7p\2\2\u0270\u0271\7Q\2\2\u0271\u0286\7e\2\2\u0272") - buf.write("\u0273\7R\2\2\u0273\u0286\7g\2\2\u0274\u0275\7R\2\2\u0275") - buf.write("\u0286\7j\2\2\u0276\u0277\7R\2\2\u0277\u0286\7t\2\2\u0278") - buf.write("\u0279\7R\2\2\u0279\u0286\7r\2\2\u027a\u027b\7V\2\2\u027b") - buf.write("\u0286\7h\2\2\u027c\u027d\7V\2\2\u027d\u0286\7t\2\2\u027e") - buf.write("\u027f\7V\2\2\u027f\u0286\7u\2\2\u0280\u0281\7X\2\2\u0281") - buf.write("\u0286\7n\2\2\u0282\u0283\7g\2\2\u0283\u0286\7p\2\2\u0284") - buf.write("\u0286\t\2\2\2\u0285\u014b\3\2\2\2\u0285\u014c\3\2\2\2") - buf.write("\u0285\u0157\3\2\2\2\u0285\u0160\3\2\2\2\u0285\u0167\3") - buf.write("\2\2\2\u0285\u016e\3\2\2\2\u0285\u0174\3\2\2\2\u0285\u0179") - buf.write("\3\2\2\2\u0285\u017e\3\2\2\2\u0285\u0182\3\2\2\2\u0285") - buf.write("\u0186\3\2\2\2\u0285\u018a\3\2\2\2\u0285\u018e\3\2\2\2") - buf.write("\u0285\u0192\3\2\2\2\u0285\u0196\3\2\2\2\u0285\u0199\3") - buf.write("\2\2\2\u0285\u019c\3\2\2\2\u0285\u019f\3\2\2\2\u0285\u01a2") - buf.write("\3\2\2\2\u0285\u01a5\3\2\2\2\u0285\u01a8\3\2\2\2\u0285") - buf.write("\u01ab\3\2\2\2\u0285\u01ae\3\2\2\2\u0285\u01b1\3\2\2\2") - buf.write("\u0285\u01b4\3\2\2\2\u0285\u01b7\3\2\2\2\u0285\u01ba\3") - buf.write("\2\2\2\u0285\u01bd\3\2\2\2\u0285\u01c0\3\2\2\2\u0285\u01c3") - buf.write("\3\2\2\2\u0285\u01c6\3\2\2\2\u0285\u01c9\3\2\2\2\u0285") - buf.write("\u01cc\3\2\2\2\u0285\u01cf\3\2\2\2\u0285\u01d2\3\2\2\2") - buf.write("\u0285\u01d5\3\2\2\2\u0285\u01d8\3\2\2\2\u0285\u01db\3") - buf.write("\2\2\2\u0285\u01de\3\2\2\2\u0285\u01e1\3\2\2\2\u0285\u01e4") - buf.write("\3\2\2\2\u0285\u01e7\3\2\2\2\u0285\u01ea\3\2\2\2\u0285") - buf.write("\u01ed\3\2\2\2\u0285\u01f0\3\2\2\2\u0285\u01f3\3\2\2\2") - buf.write("\u0285\u01f6\3\2\2\2\u0285\u01f9\3\2\2\2\u0285\u01fc\3") - buf.write("\2\2\2\u0285\u01ff\3\2\2\2\u0285\u0202\3\2\2\2\u0285\u0205") - buf.write("\3\2\2\2\u0285\u0208\3\2\2\2\u0285\u020b\3\2\2\2\u0285") - buf.write("\u020e\3\2\2\2\u0285\u0211\3\2\2\2\u0285\u0214\3\2\2\2") - buf.write("\u0285\u0217\3\2\2\2\u0285\u021a\3\2\2\2\u0285\u021d\3") - buf.write("\2\2\2\u0285\u0220\3\2\2\2\u0285\u0223\3\2\2\2\u0285\u0226") - buf.write("\3\2\2\2\u0285\u0229\3\2\2\2\u0285\u022c\3\2\2\2\u0285") - buf.write("\u022f\3\2\2\2\u0285\u0232\3\2\2\2\u0285\u0235\3\2\2\2") - buf.write("\u0285\u0238\3\2\2\2\u0285\u023b\3\2\2\2\u0285\u023e\3") - buf.write("\2\2\2\u0285\u0241\3\2\2\2\u0285\u0244\3\2\2\2\u0285\u0247") - buf.write("\3\2\2\2\u0285\u0249\3\2\2\2\u0285\u024b\3\2\2\2\u0285") - buf.write("\u024d\3\2\2\2\u0285\u024f\3\2\2\2\u0285\u0251\3\2\2\2") - buf.write("\u0285\u0253\3\2\2\2\u0285\u0255\3\2\2\2\u0285\u0257\3") - buf.write("\2\2\2\u0285\u0259\3\2\2\2\u0285\u025b\3\2\2\2\u0285\u025e") - buf.write("\3\2\2\2\u0285\u0260\3\2\2\2\u0285\u0262\3\2\2\2\u0285") - buf.write("\u0264\3\2\2\2\u0285\u0266\3\2\2\2\u0285\u0268\3\2\2\2") - buf.write("\u0285\u026a\3\2\2\2\u0285\u026c\3\2\2\2\u0285\u026e\3") - buf.write("\2\2\2\u0285\u0270\3\2\2\2\u0285\u0272\3\2\2\2\u0285\u0274") - buf.write("\3\2\2\2\u0285\u0276\3\2\2\2\u0285\u0278\3\2\2\2\u0285") - buf.write("\u027a\3\2\2\2\u0285\u027c\3\2\2\2\u0285\u027e\3\2\2\2") - buf.write("\u0285\u0280\3\2\2\2\u0285\u0282\3\2\2\2\u0285\u0284\3") - buf.write("\2\2\2\u0286\22\3\2\2\2\u0287\u0288\t\3\2\2\u0288\24\3") - buf.write("\2\2\2\u0289\u028a\7c\2\2\u028a\u028d\7k\2\2\u028b\u028d") - buf.write("\t\4\2\2\u028c\u0289\3\2\2\2\u028c\u028b\3\2\2\2\u028c") - buf.write("\u028d\3\2\2\2\u028d\u028e\3\2\2\2\u028e\u028f\7E\2\2") - buf.write("\u028f\u0293\5#\22\2\u0290\u0292\5\27\f\2\u0291\u0290") - buf.write("\3\2\2\2\u0292\u0295\3\2\2\2\u0293\u0291\3\2\2\2\u0293") - buf.write("\u0294\3\2\2\2\u0294\26\3\2\2\2\u0295\u0293\3\2\2\2\u0296") - buf.write("\u0297\7?\2\2\u0297\u0299\7}\2\2\u0298\u029a\5\37\20\2") - buf.write("\u0299\u0298\3\2\2\2\u0299\u029a\3\2\2\2\u029a\u029b\3") - buf.write("\2\2\2\u029b\u02a3\5#\22\2\u029c\u029e\7.\2\2\u029d\u029f") - buf.write("\5\37\20\2\u029e\u029d\3\2\2\2\u029e\u029f\3\2\2\2\u029f") - buf.write("\u02a0\3\2\2\2\u02a0\u02a2\5#\22\2\u02a1\u029c\3\2\2\2") - buf.write("\u02a2\u02a5\3\2\2\2\u02a3\u02a1\3\2\2\2\u02a3\u02a4\3") - buf.write("\2\2\2\u02a4\u02a6\3\2\2\2\u02a5\u02a3\3\2\2\2\u02a6\u02a7") - buf.write("\7\177\2\2\u02a7\u02b5\3\2\2\2\u02a8\u02a9\7e\2\2\u02a9") - buf.write("\u02aa\7}\2\2\u02aa\u02af\5#\22\2\u02ab\u02ac\7.\2\2\u02ac") - buf.write("\u02ae\5#\22\2\u02ad\u02ab\3\2\2\2\u02ae\u02b1\3\2\2\2") - buf.write("\u02af\u02ad\3\2\2\2\u02af\u02b0\3\2\2\2\u02b0\u02b2\3") - buf.write("\2\2\2\u02b1\u02af\3\2\2\2\u02b2\u02b3\7\177\2\2\u02b3") - buf.write("\u02b5\3\2\2\2\u02b4\u0296\3\2\2\2\u02b4\u02a8\3\2\2\2") - buf.write("\u02b5\30\3\2\2\2\u02b6\u02b7\7J\2\2\u02b7\u02b8\7g\2") - buf.write("\2\u02b8\u02c6\7r\2\2\u02b9\u02ba\7J\2\2\u02ba\u02bb\7") - buf.write("g\2\2\u02bb\u02c6\7z\2\2\u02bc\u02bd\7Q\2\2\u02bd\u02be") - buf.write("\7e\2\2\u02be\u02c6\7v\2\2\u02bf\u02c0\7R\2\2\u02c0\u02c1") - buf.write("\7g\2\2\u02c1\u02c6\7p\2\2\u02c2\u02c3\7U\2\2\u02c3\u02c4") - buf.write("\7w\2\2\u02c4\u02c6\7e\2\2\u02c5\u02b6\3\2\2\2\u02c5\u02b9") - buf.write("\3\2\2\2\u02c5\u02bc\3\2\2\2\u02c5\u02bf\3\2\2\2\u02c5") - buf.write("\u02c2\3\2\2\2\u02c6\32\3\2\2\2\u02c7\u02c8\7*\2\2\u02c8") - buf.write("\u02c9\5\35\17\2\u02c9\u02ca\5#\22\2\u02ca\u02cb\7/\2") - buf.write("\2\u02cb\u02cc\5#\22\2\u02cc\u02cd\7+\2\2\u02cd\u02dd") - buf.write("\3\2\2\2\u02ce\u02cf\7*\2\2\u02cf\u02d0\5#\22\2\u02d0") - buf.write("\u02d1\7/\2\2\u02d1\u02d2\5#\22\2\u02d2\u02d3\7+\2\2\u02d3") - buf.write("\u02dd\3\2\2\2\u02d4\u02d5\5\35\17\2\u02d5\u02d6\5#\22") - buf.write("\2\u02d6\u02d7\7/\2\2\u02d7\u02d8\5#\22\2\u02d8\u02dd") - buf.write("\3\2\2\2\u02d9\u02da\5\35\17\2\u02da\u02db\5#\22\2\u02db") - buf.write("\u02dd\3\2\2\2\u02dc\u02c7\3\2\2\2\u02dc\u02ce\3\2\2\2") - buf.write("\u02dc\u02d4\3\2\2\2\u02dc\u02d9\3\2\2\2\u02dd\34\3\2") - buf.write("\2\2\u02de\u02df\4cd\2\u02df\36\3\2\2\2\u02e0\u02e1\t") - buf.write("\5\2\2\u02e1 \3\2\2\2\u02e2\u02e3\t\6\2\2\u02e3\"\3\2") - buf.write("\2\2\u02e4\u02e8\4\63;\2\u02e5\u02e7\5%\23\2\u02e6\u02e5") - buf.write("\3\2\2\2\u02e7\u02ea\3\2\2\2\u02e8\u02e6\3\2\2\2\u02e8") - buf.write("\u02e9\3\2\2\2\u02e9$\3\2\2\2\u02ea\u02e8\3\2\2\2\u02eb") - buf.write("\u02ec\4\62;\2\u02ec&\3\2\2\2\23\2\u00dd\u0105\u010e\u0112") - buf.write("\u0149\u0285\u028c\u0293\u0299\u029e\u02a3\u02af\u02b4") - buf.write("\u02c5\u02dc\u02e8\2") - return buf.getvalue() - + return [ + 4,0,33,674,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5, + 2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2, + 13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7, + 19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2, + 26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7, + 32,1,0,1,0,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2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,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1, + 7,3,7,563,8,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,10,1, + 10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1, + 11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1,11,1, + 11,1,11,1,11,1,11,1,11,1,11,1,11,3,11,610,8,11,1,12,1,12,1,12,1, + 12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,1,12,3,12,627, + 8,12,1,13,1,13,1,14,1,14,1,15,1,15,5,15,635,8,15,10,15,12,15,638, + 9,15,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,21,1,21, + 1,22,1,22,1,23,1,23,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,27,1,27, + 1,28,1,28,1,29,1,29,1,30,1,30,1,31,1,31,1,32,1,32,0,0,33,1,1,3,2, + 5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29, + 15,31,16,33,17,35,18,37,19,39,20,41,21,43,22,45,23,47,24,49,25,51, + 26,53,27,55,28,57,29,59,30,61,31,63,32,65,33,1,0,3,4,0,65,65,70, + 70,73,73,83,83,2,0,68,68,76,76,2,0,102,102,112,112,838,0,1,1,0,0, + 0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0, + 13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0, + 23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0, + 33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0, + 43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0, + 53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0, + 63,1,0,0,0,0,65,1,0,0,0,1,67,1,0,0,0,3,69,1,0,0,0,5,242,1,0,0,0, + 7,244,1,0,0,0,9,246,1,0,0,0,11,248,1,0,0,0,13,250,1,0,0,0,15,562, + 1,0,0,0,17,564,1,0,0,0,19,572,1,0,0,0,21,575,1,0,0,0,23,609,1,0, + 0,0,25,626,1,0,0,0,27,628,1,0,0,0,29,630,1,0,0,0,31,632,1,0,0,0, + 33,639,1,0,0,0,35,641,1,0,0,0,37,643,1,0,0,0,39,645,1,0,0,0,41,647, + 1,0,0,0,43,649,1,0,0,0,45,651,1,0,0,0,47,653,1,0,0,0,49,655,1,0, + 0,0,51,657,1,0,0,0,53,660,1,0,0,0,55,662,1,0,0,0,57,664,1,0,0,0, + 59,666,1,0,0,0,61,668,1,0,0,0,63,670,1,0,0,0,65,672,1,0,0,0,67,68, + 5,35,0,0,68,2,1,0,0,0,69,70,5,32,0,0,70,4,1,0,0,0,71,72,5,71,0,0, + 72,73,5,108,0,0,73,243,5,99,0,0,74,75,5,77,0,0,75,76,5,97,0,0,76, + 243,5,110,0,0,77,78,5,71,0,0,78,79,5,97,0,0,79,243,5,108,0,0,80, + 81,5,71,0,0,81,82,5,117,0,0,82,243,5,108,0,0,83,84,5,65,0,0,84,85, + 5,108,0,0,85,243,5,116,0,0,86,87,5,65,0,0,87,88,5,108,0,0,88,243, + 5,108,0,0,89,90,5,84,0,0,90,91,5,97,0,0,91,243,5,108,0,0,92,93,5, + 73,0,0,93,94,5,100,0,0,94,243,5,111,0,0,95,96,5,81,0,0,96,97,5,117, + 0,0,97,243,5,105,0,0,98,99,5,82,0,0,99,100,5,104,0,0,100,243,5,97, + 0,0,101,102,5,70,0,0,102,103,5,117,0,0,103,243,5,99,0,0,104,105, + 5,79,0,0,105,106,5,108,0,0,106,243,5,105,0,0,107,108,5,84,0,0,108, + 109,5,121,0,0,109,243,5,118,0,0,110,111,5,65,0,0,111,112,5,98,0, + 0,112,243,5,101,0,0,113,114,5,80,0,0,114,115,5,97,0,0,115,243,5, + 114,0,0,116,117,5,68,0,0,117,118,5,105,0,0,118,243,5,103,0,0,119, + 120,5,67,0,0,120,121,5,111,0,0,121,243,5,108,0,0,122,123,5,65,0, + 0,123,124,5,114,0,0,124,243,5,97,0,0,125,126,5,76,0,0,126,127,5, + 121,0,0,127,243,5,120,0,0,128,129,5,88,0,0,129,130,5,121,0,0,130, + 243,5,108,0,0,131,132,5,82,0,0,132,133,5,105,0,0,133,243,5,98,0, + 0,134,135,5,75,0,0,135,136,5,100,0,0,136,243,5,110,0,0,137,138,5, + 78,0,0,138,139,5,101,0,0,139,243,5,117,0,0,140,141,5,83,0,0,141, + 142,5,105,0,0,142,243,5,97,0,0,143,144,5,80,0,0,144,145,5,115,0, + 0,145,243,5,101,0,0,146,147,5,76,0,0,147,148,5,101,0,0,148,243,5, + 103,0,0,149,150,5,65,0,0,150,151,5,99,0,0,151,243,5,105,0,0,152, + 153,5,66,0,0,153,154,5,97,0,0,154,243,5,99,0,0,155,156,5,75,0,0, + 156,157,5,100,0,0,157,243,5,111,0,0,158,159,5,68,0,0,159,160,5,104, + 0,0,160,243,5,97,0,0,161,162,5,77,0,0,162,163,5,117,0,0,163,243, + 5,114,0,0,164,165,5,65,0,0,165,166,5,112,0,0,166,243,5,105,0,0,167, + 168,5,70,0,0,168,169,5,114,0,0,169,243,5,117,0,0,170,171,5,84,0, + 0,171,172,5,97,0,0,172,243,5,103,0,0,173,174,5,83,0,0,174,175,5, + 111,0,0,175,243,5,114,0,0,176,177,5,80,0,0,177,178,5,115,0,0,178, + 243,5,105,0,0,179,180,5,69,0,0,180,181,5,114,0,0,181,243,5,121,0, + 0,182,183,5,84,0,0,183,184,5,104,0,0,184,185,5,114,0,0,185,243,5, + 101,0,0,186,187,5,82,0,0,187,188,5,117,0,0,188,243,5,108,0,0,189, + 190,5,88,0,0,190,191,5,117,0,0,191,243,5,108,0,0,192,193,5,85,0, + 0,193,194,5,110,0,0,194,243,5,107,0,0,195,196,5,65,0,0,196,197,5, + 99,0,0,197,243,5,101,0,0,198,199,5,65,0,0,199,200,5,99,0,0,200,243, + 5,111,0,0,201,202,5,65,0,0,202,203,5,115,0,0,203,243,5,99,0,0,204, + 205,5,70,0,0,205,206,5,117,0,0,206,243,5,115,0,0,207,208,5,73,0, + 0,208,209,5,110,0,0,209,243,5,115,0,0,210,211,5,75,0,0,211,243,5, + 111,0,0,212,213,5,80,0,0,213,214,5,97,0,0,214,243,5,117,0,0,215, + 216,5,80,0,0,216,217,5,101,0,0,217,243,5,114,0,0,218,219,5,83,0, + 0,219,220,5,101,0,0,220,243,5,100,0,0,221,222,5,83,0,0,222,223,5, + 117,0,0,223,243,5,103,0,0,224,225,5,86,0,0,225,226,5,105,0,0,226, + 243,5,111,0,0,227,228,5,88,0,0,228,229,5,108,0,0,229,243,5,117,0, + 0,230,231,5,89,0,0,231,232,5,101,0,0,232,243,5,114,0,0,233,234,5, + 69,0,0,234,235,5,114,0,0,235,236,5,119,0,0,236,237,5,105,0,0,237, + 238,5,110,0,0,238,239,5,105,0,0,239,240,5,111,0,0,240,241,5,115, + 0,0,241,243,5,101,0,0,242,71,1,0,0,0,242,74,1,0,0,0,242,77,1,0,0, + 0,242,80,1,0,0,0,242,83,1,0,0,0,242,86,1,0,0,0,242,89,1,0,0,0,242, + 92,1,0,0,0,242,95,1,0,0,0,242,98,1,0,0,0,242,101,1,0,0,0,242,104, + 1,0,0,0,242,107,1,0,0,0,242,110,1,0,0,0,242,113,1,0,0,0,242,116, + 1,0,0,0,242,119,1,0,0,0,242,122,1,0,0,0,242,125,1,0,0,0,242,128, + 1,0,0,0,242,131,1,0,0,0,242,134,1,0,0,0,242,137,1,0,0,0,242,140, + 1,0,0,0,242,143,1,0,0,0,242,146,1,0,0,0,242,149,1,0,0,0,242,152, + 1,0,0,0,242,155,1,0,0,0,242,158,1,0,0,0,242,161,1,0,0,0,242,164, + 1,0,0,0,242,167,1,0,0,0,242,170,1,0,0,0,242,173,1,0,0,0,242,176, + 1,0,0,0,242,179,1,0,0,0,242,182,1,0,0,0,242,186,1,0,0,0,242,189, + 1,0,0,0,242,192,1,0,0,0,242,195,1,0,0,0,242,198,1,0,0,0,242,201, + 1,0,0,0,242,204,1,0,0,0,242,207,1,0,0,0,242,210,1,0,0,0,242,212, + 1,0,0,0,242,215,1,0,0,0,242,218,1,0,0,0,242,221,1,0,0,0,242,224, + 1,0,0,0,242,227,1,0,0,0,242,230,1,0,0,0,242,233,1,0,0,0,243,6,1, + 0,0,0,244,245,5,67,0,0,245,8,1,0,0,0,246,247,5,78,0,0,247,10,1,0, + 0,0,248,249,5,79,0,0,249,12,1,0,0,0,250,251,5,80,0,0,251,14,1,0, + 0,0,252,253,5,67,0,0,253,254,5,101,0,0,254,255,5,114,0,0,255,256, + 5,111,0,0,256,257,5,112,0,0,257,258,5,108,0,0,258,259,5,97,0,0,259, + 260,5,115,0,0,260,261,5,116,0,0,261,262,5,105,0,0,262,563,5,99,0, + 0,263,264,5,76,0,0,264,265,5,97,0,0,265,266,5,99,0,0,266,267,5,99, + 0,0,267,268,5,101,0,0,268,269,5,114,0,0,269,270,5,111,0,0,270,271, + 5,105,0,0,271,563,5,99,0,0,272,273,5,51,0,0,273,274,5,111,0,0,274, + 275,5,120,0,0,275,276,5,111,0,0,276,277,5,77,0,0,277,278,5,121,0, + 0,278,563,5,114,0,0,279,280,5,80,0,0,280,281,5,115,0,0,281,282,5, + 121,0,0,282,283,5,108,0,0,283,284,5,108,0,0,284,285,5,105,0,0,285, + 563,5,99,0,0,286,287,5,71,0,0,287,288,5,101,0,0,288,289,5,100,0, + 0,289,290,5,100,0,0,290,291,5,105,0,0,291,563,5,99,0,0,292,293,5, + 65,0,0,293,294,5,108,0,0,294,295,5,108,0,0,295,296,5,121,0,0,296, + 563,5,108,0,0,297,298,5,80,0,0,298,299,5,104,0,0,299,300,5,116,0, + 0,300,301,5,104,0,0,301,563,5,105,0,0,302,303,5,97,0,0,303,304,5, + 76,0,0,304,305,5,110,0,0,305,563,5,110,0,0,306,307,5,103,0,0,307, + 308,5,76,0,0,308,309,5,110,0,0,309,563,5,110,0,0,310,311,5,101,0, + 0,311,312,5,83,0,0,312,313,5,116,0,0,313,563,5,101,0,0,314,315,5, + 67,0,0,315,316,5,111,0,0,316,317,5,117,0,0,317,563,5,109,0,0,318, + 319,5,72,0,0,319,320,5,83,0,0,320,321,5,101,0,0,321,563,5,114,0, + 0,322,323,5,80,0,0,323,324,5,114,0,0,324,325,5,111,0,0,325,563,5, + 112,0,0,326,327,5,65,0,0,327,328,5,99,0,0,328,563,5,104,0,0,329, + 330,5,65,0,0,330,331,5,101,0,0,331,563,5,112,0,0,332,333,5,65,0, + 0,333,334,5,108,0,0,334,563,5,97,0,0,335,336,5,65,0,0,336,337,5, + 110,0,0,337,563,5,103,0,0,338,339,5,65,0,0,339,340,5,115,0,0,340, + 563,5,112,0,0,341,342,5,66,0,0,342,343,5,101,0,0,343,563,5,104,0, + 0,344,345,5,66,0,0,345,346,5,117,0,0,346,563,5,116,0,0,347,348,5, + 67,0,0,348,349,5,99,0,0,349,563,5,116,0,0,350,351,5,67,0,0,351,352, + 5,101,0,0,352,563,5,114,0,0,353,354,5,67,0,0,354,355,5,101,0,0,355, + 563,5,116,0,0,356,357,5,67,0,0,357,358,5,104,0,0,358,563,5,111,0, + 0,359,360,5,67,0,0,360,361,5,105,0,0,361,563,5,110,0,0,362,363,5, + 67,0,0,363,364,5,114,0,0,364,563,5,116,0,0,365,366,5,67,0,0,366, + 367,5,121,0,0,367,563,5,115,0,0,368,369,5,68,0,0,369,370,5,99,0, + 0,370,563,5,101,0,0,371,372,5,68,0,0,372,373,5,99,0,0,373,563,5, + 111,0,0,374,375,5,68,0,0,375,376,5,101,0,0,376,563,5,99,0,0,377, + 378,5,68,0,0,378,379,5,104,0,0,379,563,5,112,0,0,380,381,5,68,0, + 0,381,382,5,111,0,0,382,563,5,100,0,0,383,384,5,69,0,0,384,385,5, + 116,0,0,385,563,5,103,0,0,386,387,5,69,0,0,387,388,5,116,0,0,388, + 563,5,78,0,0,389,390,5,69,0,0,390,391,5,116,0,0,391,563,5,110,0, + 0,392,393,5,70,0,0,393,394,5,101,0,0,394,563,5,114,0,0,395,396,5, + 71,0,0,396,397,5,114,0,0,397,563,5,111,0,0,398,399,5,71,0,0,399, + 400,5,108,0,0,400,563,5,117,0,0,401,402,5,71,0,0,402,403,5,108,0, + 0,403,563,5,121,0,0,404,405,5,72,0,0,405,406,5,112,0,0,406,563,5, + 111,0,0,407,408,5,72,0,0,408,409,5,115,0,0,409,563,5,101,0,0,410, + 411,5,72,0,0,411,412,5,120,0,0,412,563,5,111,0,0,413,414,5,76,0, + 0,414,415,5,97,0,0,415,563,5,99,0,0,416,417,5,76,0,0,417,418,5,97, + 0,0,418,563,5,117,0,0,419,420,5,76,0,0,420,421,5,101,0,0,421,563, + 5,117,0,0,422,423,5,76,0,0,423,424,5,105,0,0,424,563,5,110,0,0,425, + 426,5,76,0,0,426,427,5,121,0,0,427,563,5,115,0,0,428,429,5,77,0, + 0,429,430,5,97,0,0,430,563,5,108,0,0,431,432,5,77,0,0,432,433,5, + 97,0,0,433,563,5,114,0,0,434,435,5,77,0,0,435,436,5,101,0,0,436, + 563,5,108,0,0,437,438,5,77,0,0,438,439,5,111,0,0,439,563,5,110,0, + 0,440,441,5,77,0,0,441,442,5,121,0,0,442,563,5,114,0,0,443,444,5, + 78,0,0,444,445,5,101,0,0,445,563,5,114,0,0,446,447,5,78,0,0,447, + 448,5,110,0,0,448,563,5,111,0,0,449,450,5,78,0,0,450,451,5,111,0, + 0,451,563,5,110,0,0,452,453,5,79,0,0,453,454,5,99,0,0,454,563,5, + 111,0,0,455,456,5,79,0,0,456,457,5,108,0,0,457,563,5,101,0,0,458, + 459,5,79,0,0,459,460,5,114,0,0,460,563,5,110,0,0,461,462,5,80,0, + 0,462,463,5,97,0,0,463,563,5,109,0,0,464,465,5,80,0,0,465,466,5, + 114,0,0,466,563,5,111,0,0,467,468,5,80,0,0,468,469,5,121,0,0,469, + 563,5,114,0,0,470,471,5,83,0,0,471,472,5,101,0,0,472,563,5,114,0, + 0,473,474,5,83,0,0,474,475,5,105,0,0,475,563,5,110,0,0,476,477,5, + 83,0,0,477,478,5,116,0,0,478,563,5,101,0,0,479,480,5,116,0,0,480, + 481,5,66,0,0,481,563,5,117,0,0,482,483,5,84,0,0,483,484,5,104,0, + 0,484,563,5,114,0,0,485,486,5,84,0,0,486,487,5,105,0,0,487,563,5, + 103,0,0,488,489,5,85,0,0,489,490,5,110,0,0,490,563,5,100,0,0,491, + 492,5,86,0,0,492,493,5,97,0,0,493,563,5,99,0,0,494,495,5,85,0,0, + 495,496,5,100,0,0,496,563,5,111,0,0,497,498,5,85,0,0,498,499,5,108, + 0,0,499,563,5,111,0,0,500,501,5,117,0,0,501,502,5,108,0,0,502,563, + 5,111,0,0,503,504,5,65,0,0,504,563,5,99,0,0,505,506,5,65,0,0,506, + 563,5,109,0,0,507,508,5,66,0,0,508,563,5,110,0,0,509,510,5,66,0, + 0,510,563,5,114,0,0,511,512,5,66,0,0,512,563,5,117,0,0,513,514,5, + 66,0,0,514,563,5,122,0,0,515,516,5,67,0,0,516,563,5,108,0,0,517, + 518,5,67,0,0,518,563,5,109,0,0,519,520,5,68,0,0,520,563,5,68,0,0, + 521,522,5,68,0,0,522,563,5,76,0,0,523,524,5,69,0,0,524,563,5,116, + 0,0,525,526,5,70,0,0,526,563,5,111,0,0,527,528,5,71,0,0,528,563, + 5,99,0,0,529,530,5,72,0,0,530,563,5,112,0,0,531,532,5,72,0,0,532, + 563,5,120,0,0,533,534,5,76,0,0,534,563,5,68,0,0,535,536,5,76,0,0, + 536,563,5,76,0,0,537,538,5,77,0,0,538,563,5,101,0,0,539,540,5,78, + 0,0,540,563,5,110,0,0,541,542,5,79,0,0,542,563,5,99,0,0,543,544, + 5,80,0,0,544,563,5,101,0,0,545,546,5,80,0,0,546,563,5,104,0,0,547, + 548,5,80,0,0,548,563,5,114,0,0,549,550,5,80,0,0,550,563,5,112,0, + 0,551,552,5,84,0,0,552,563,5,102,0,0,553,554,5,84,0,0,554,563,5, + 114,0,0,555,556,5,84,0,0,556,563,5,115,0,0,557,558,5,86,0,0,558, + 563,5,108,0,0,559,560,5,101,0,0,560,563,5,110,0,0,561,563,7,0,0, + 0,562,252,1,0,0,0,562,263,1,0,0,0,562,272,1,0,0,0,562,279,1,0,0, + 0,562,286,1,0,0,0,562,292,1,0,0,0,562,297,1,0,0,0,562,302,1,0,0, + 0,562,306,1,0,0,0,562,310,1,0,0,0,562,314,1,0,0,0,562,318,1,0,0, + 0,562,322,1,0,0,0,562,326,1,0,0,0,562,329,1,0,0,0,562,332,1,0,0, + 0,562,335,1,0,0,0,562,338,1,0,0,0,562,341,1,0,0,0,562,344,1,0,0, + 0,562,347,1,0,0,0,562,350,1,0,0,0,562,353,1,0,0,0,562,356,1,0,0, + 0,562,359,1,0,0,0,562,362,1,0,0,0,562,365,1,0,0,0,562,368,1,0,0, + 0,562,371,1,0,0,0,562,374,1,0,0,0,562,377,1,0,0,0,562,380,1,0,0, + 0,562,383,1,0,0,0,562,386,1,0,0,0,562,389,1,0,0,0,562,392,1,0,0, + 0,562,395,1,0,0,0,562,398,1,0,0,0,562,401,1,0,0,0,562,404,1,0,0, + 0,562,407,1,0,0,0,562,410,1,0,0,0,562,413,1,0,0,0,562,416,1,0,0, + 0,562,419,1,0,0,0,562,422,1,0,0,0,562,425,1,0,0,0,562,428,1,0,0, + 0,562,431,1,0,0,0,562,434,1,0,0,0,562,437,1,0,0,0,562,440,1,0,0, + 0,562,443,1,0,0,0,562,446,1,0,0,0,562,449,1,0,0,0,562,452,1,0,0, + 0,562,455,1,0,0,0,562,458,1,0,0,0,562,461,1,0,0,0,562,464,1,0,0, + 0,562,467,1,0,0,0,562,470,1,0,0,0,562,473,1,0,0,0,562,476,1,0,0, + 0,562,479,1,0,0,0,562,482,1,0,0,0,562,485,1,0,0,0,562,488,1,0,0, + 0,562,491,1,0,0,0,562,494,1,0,0,0,562,497,1,0,0,0,562,500,1,0,0, + 0,562,503,1,0,0,0,562,505,1,0,0,0,562,507,1,0,0,0,562,509,1,0,0, + 0,562,511,1,0,0,0,562,513,1,0,0,0,562,515,1,0,0,0,562,517,1,0,0, + 0,562,519,1,0,0,0,562,521,1,0,0,0,562,523,1,0,0,0,562,525,1,0,0, + 0,562,527,1,0,0,0,562,529,1,0,0,0,562,531,1,0,0,0,562,533,1,0,0, + 0,562,535,1,0,0,0,562,537,1,0,0,0,562,539,1,0,0,0,562,541,1,0,0, + 0,562,543,1,0,0,0,562,545,1,0,0,0,562,547,1,0,0,0,562,549,1,0,0, + 0,562,551,1,0,0,0,562,553,1,0,0,0,562,555,1,0,0,0,562,557,1,0,0, + 0,562,559,1,0,0,0,562,561,1,0,0,0,563,16,1,0,0,0,564,565,5,65,0, + 0,565,566,5,110,0,0,566,567,5,104,0,0,567,568,5,121,0,0,568,569, + 5,100,0,0,569,570,5,114,0,0,570,571,5,111,0,0,571,18,1,0,0,0,572, + 573,5,48,0,0,573,574,5,100,0,0,574,20,1,0,0,0,575,576,7,1,0,0,576, + 22,1,0,0,0,577,578,5,117,0,0,578,579,5,108,0,0,579,580,5,111,0,0, + 580,581,5,115,0,0,581,582,5,97,0,0,582,583,5,114,0,0,583,584,5,105, + 0,0,584,610,5,99,0,0,585,586,5,117,0,0,586,587,5,108,0,0,587,588, + 5,111,0,0,588,589,5,115,0,0,589,590,5,111,0,0,590,591,5,110,0,0, + 591,592,5,105,0,0,592,610,5,99,0,0,593,594,5,117,0,0,594,595,5,114, + 0,0,595,596,5,111,0,0,596,597,5,110,0,0,597,598,5,105,0,0,598,610, + 5,99,0,0,599,600,5,111,0,0,600,601,5,110,0,0,601,602,5,105,0,0,602, + 610,5,99,0,0,603,604,5,97,0,0,604,605,5,114,0,0,605,606,5,105,0, + 0,606,610,5,99,0,0,607,608,5,111,0,0,608,610,5,108,0,0,609,577,1, + 0,0,0,609,585,1,0,0,0,609,593,1,0,0,0,609,599,1,0,0,0,609,603,1, + 0,0,0,609,607,1,0,0,0,610,24,1,0,0,0,611,612,5,72,0,0,612,613,5, + 101,0,0,613,627,5,112,0,0,614,615,5,72,0,0,615,616,5,101,0,0,616, + 627,5,120,0,0,617,618,5,79,0,0,618,619,5,99,0,0,619,627,5,116,0, + 0,620,621,5,80,0,0,621,622,5,101,0,0,622,627,5,110,0,0,623,624,5, + 83,0,0,624,625,5,117,0,0,625,627,5,99,0,0,626,611,1,0,0,0,626,614, + 1,0,0,0,626,617,1,0,0,0,626,620,1,0,0,0,626,623,1,0,0,0,627,26,1, + 0,0,0,628,629,2,97,98,0,629,28,1,0,0,0,630,631,7,2,0,0,631,30,1, + 0,0,0,632,636,2,49,57,0,633,635,2,48,57,0,634,633,1,0,0,0,635,638, + 1,0,0,0,636,634,1,0,0,0,636,637,1,0,0,0,637,32,1,0,0,0,638,636,1, + 0,0,0,639,640,5,44,0,0,640,34,1,0,0,0,641,642,5,45,0,0,642,36,1, + 0,0,0,643,644,5,40,0,0,644,38,1,0,0,0,645,646,5,41,0,0,646,40,1, + 0,0,0,647,648,5,91,0,0,648,42,1,0,0,0,649,650,5,93,0,0,650,44,1, + 0,0,0,651,652,5,123,0,0,652,46,1,0,0,0,653,654,5,125,0,0,654,48, + 1,0,0,0,655,656,5,97,0,0,656,50,1,0,0,0,657,658,5,97,0,0,658,659, + 5,105,0,0,659,52,1,0,0,0,660,661,5,99,0,0,661,54,1,0,0,0,662,663, + 5,100,0,0,663,56,1,0,0,0,664,665,5,101,0,0,665,58,1,0,0,0,666,667, + 5,116,0,0,667,60,1,0,0,0,668,669,5,61,0,0,669,62,1,0,0,0,670,671, + 5,105,0,0,671,64,1,0,0,0,672,673,5,63,0,0,673,66,1,0,0,0,6,0,242, + 562,609,626,636,0 + ] class GlycanLexer(Lexer): @@ -392,43 +287,64 @@ class GlycanLexer(Lexer): T__0 = 1 T__1 = 2 - T__2 = 3 - T__3 = 4 - T__4 = 5 - SAC = 6 - MOD = 7 + SAC = 3 + CARBON = 4 + NITROGEN = 5 + OXYGEN = 6 + PHOSPHOR = 7 FG = 8 - BRIDGE = 9 - CARB = 10 - ADD = 11 - COUNT = 12 - CON = 13 + ANHYDRO = 9 + HEAD = 10 + HEADD = 11 + END = 12 + COUNT = 13 TYPE = 14 - CT = 15 - RING = 16 - NUM = 17 - DIGIT = 18 + RING = 15 + NUM = 16 + COLON = 17 + DASH = 18 + LPAR = 19 + RPAR = 20 + LBRACE = 21 + RBRACE = 22 + LBRACK = 23 + RBRACK = 24 + A = 25 + AI = 26 + C = 27 + D = 28 + E = 29 + T = 30 + EQ = 31 + I = 32 + QMARK = 33 channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] modeNames = [ "DEFAULT_MODE" ] literalNames = [ "", - "'{'", "' '", "'}'", "'['", "']'" ] + "'#'", "' '", "'C'", "'N'", "'O'", "'P'", "'Anhydro'", "'0d'", + "','", "'-'", "'('", "')'", "'['", "']'", "'{'", "'}'", "'a'", + "'ai'", "'c'", "'d'", "'e'", "'t'", "'='", "'i'", "'?'" ] symbolicNames = [ "", - "SAC", "MOD", "FG", "BRIDGE", "CARB", "ADD", "COUNT", "CON", - "TYPE", "CT", "RING", "NUM", "DIGIT" ] + "SAC", "CARBON", "NITROGEN", "OXYGEN", "PHOSPHOR", "FG", "ANHYDRO", + "HEAD", "HEADD", "END", "COUNT", "TYPE", "RING", "NUM", "COLON", + "DASH", "LPAR", "RPAR", "LBRACE", "RBRACE", "LBRACK", "RBRACK", + "A", "AI", "C", "D", "E", "T", "EQ", "I", "QMARK" ] - ruleNames = [ "T__0", "T__1", "T__2", "T__3", "T__4", "SAC", "MOD", - "FG", "BRIDGE", "CARB", "ADD", "COUNT", "CON", "TYPE", - "CT", "RING", "NUM", "DIGIT" ] + ruleNames = [ "T__0", "T__1", "SAC", "CARBON", "NITROGEN", "OXYGEN", + "PHOSPHOR", "FG", "ANHYDRO", "HEAD", "HEADD", "END", "COUNT", + "TYPE", "RING", "NUM", "COLON", "DASH", "LPAR", "RPAR", + "LBRACE", "RBRACE", "LBRACK", "RBRACK", "A", "AI", "C", + "D", "E", "T", "EQ", "I", "QMARK" ] grammarFileName = "Glycan.g4" def __init__(self, input=None, output:TextIO = sys.stdout): super().__init__(input, output) - self.checkVersion("4.9") + self.checkVersion("4.13.2") self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) self._actions = None self._predicates = None diff --git a/glyles/grammar/GlycanLexer.tokens b/glyles/grammar/GlycanLexer.tokens index 8db9cf9..3942e49 100644 --- a/glyles/grammar/GlycanLexer.tokens +++ b/glyles/grammar/GlycanLexer.tokens @@ -1,23 +1,58 @@ T__0=1 T__1=2 -T__2=3 -T__3=4 -T__4=5 -SAC=6 -MOD=7 +SAC=3 +CARBON=4 +NITROGEN=5 +OXYGEN=6 +PHOSPHOR=7 FG=8 -BRIDGE=9 -CARB=10 -ADD=11 -COUNT=12 -CON=13 +ANHYDRO=9 +HEAD=10 +HEADD=11 +END=12 +COUNT=13 TYPE=14 -CT=15 -RING=16 -NUM=17 -DIGIT=18 -'{'=1 +RING=15 +NUM=16 +COLON=17 +DASH=18 +LPAR=19 +RPAR=20 +LBRACE=21 +RBRACE=22 +LBRACK=23 +RBRACK=24 +A=25 +AI=26 +C=27 +D=28 +E=29 +T=30 +EQ=31 +I=32 +QMARK=33 +'#'=1 ' '=2 -'}'=3 -'['=4 -']'=5 +'C'=4 +'N'=5 +'O'=6 +'P'=7 +'Anhydro'=9 +'0d'=10 +','=17 +'-'=18 +'('=19 +')'=20 +'['=21 +']'=22 +'{'=23 +'}'=24 +'a'=25 +'ai'=26 +'c'=27 +'d'=28 +'e'=29 +'t'=30 +'='=31 +'i'=32 +'?'=33 diff --git a/glyles/grammar/GlycanListener.py b/glyles/grammar/GlycanListener.py index 6ded9a2..fa60470 100644 --- a/glyles/grammar/GlycanListener.py +++ b/glyles/grammar/GlycanListener.py @@ -1,6 +1,6 @@ -# Generated from Glycan.g4 by ANTLR 4.9 +# Generated from Glycan.g4 by ANTLR 4.13.2 from antlr4 import * -if __name__ is not None and "." in __name__: +if "." in __name__: from .GlycanParser import GlycanParser else: from GlycanParser import GlycanParser @@ -17,6 +17,15 @@ def exitStart(self, ctx:GlycanParser.StartContext): pass + # Enter a parse tree produced by GlycanParser#begin. + def enterBegin(self, ctx:GlycanParser.BeginContext): + pass + + # Exit a parse tree produced by GlycanParser#begin. + def exitBegin(self, ctx:GlycanParser.BeginContext): + pass + + # Enter a parse tree produced by GlycanParser#branch. def enterBranch(self, ctx:GlycanParser.BranchContext): pass @@ -44,5 +53,95 @@ def exitDeriv(self, ctx:GlycanParser.DerivContext): pass + # Enter a parse tree produced by GlycanParser#saci. + def enterSaci(self, ctx:GlycanParser.SaciContext): + pass + + # Exit a parse tree produced by GlycanParser#saci. + def exitSaci(self, ctx:GlycanParser.SaciContext): + pass + + + # Enter a parse tree produced by GlycanParser#con. + def enterCon(self, ctx:GlycanParser.ConContext): + pass + + # Exit a parse tree produced by GlycanParser#con. + def exitCon(self, ctx:GlycanParser.ConContext): + pass + + + # Enter a parse tree produced by GlycanParser#add. + def enterAdd(self, ctx:GlycanParser.AddContext): + pass + + # Exit a parse tree produced by GlycanParser#add. + def exitAdd(self, ctx:GlycanParser.AddContext): + pass + + + # Enter a parse tree produced by GlycanParser#fgi. + def enterFgi(self, ctx:GlycanParser.FgiContext): + pass + + # Exit a parse tree produced by GlycanParser#fgi. + def exitFgi(self, ctx:GlycanParser.FgiContext): + pass + + + # Enter a parse tree produced by GlycanParser#carb. + def enterCarb(self, ctx:GlycanParser.CarbContext): + pass + + # Exit a parse tree produced by GlycanParser#carb. + def exitCarb(self, ctx:GlycanParser.CarbContext): + pass + + + # Enter a parse tree produced by GlycanParser#modi. + def enterModi(self, ctx:GlycanParser.ModiContext): + pass + + # Exit a parse tree produced by GlycanParser#modi. + def exitModi(self, ctx:GlycanParser.ModiContext): + pass + + + # Enter a parse tree produced by GlycanParser#qnum. + def enterQnum(self, ctx:GlycanParser.QnumContext): + pass + + # Exit a parse tree produced by GlycanParser#qnum. + def exitQnum(self, ctx:GlycanParser.QnumContext): + pass + + + # Enter a parse tree produced by GlycanParser#typi. + def enterTypi(self, ctx:GlycanParser.TypiContext): + pass + + # Exit a parse tree produced by GlycanParser#typi. + def exitTypi(self, ctx:GlycanParser.TypiContext): + pass + + + # Enter a parse tree produced by GlycanParser#bridge. + def enterBridge(self, ctx:GlycanParser.BridgeContext): + pass + + # Exit a parse tree produced by GlycanParser#bridge. + def exitBridge(self, ctx:GlycanParser.BridgeContext): + pass + + + # Enter a parse tree produced by GlycanParser#ct. + def enterCt(self, ctx:GlycanParser.CtContext): + pass + + # Exit a parse tree produced by GlycanParser#ct. + def exitCt(self, ctx:GlycanParser.CtContext): + pass + + del GlycanParser \ No newline at end of file diff --git a/glyles/grammar/GlycanParser.py b/glyles/grammar/GlycanParser.py index cda4c3f..62d1de4 100644 --- a/glyles/grammar/GlycanParser.py +++ b/glyles/grammar/GlycanParser.py @@ -1,4 +1,4 @@ -# Generated from Glycan.g4 by ANTLR 4.9 +# Generated from Glycan.g4 by ANTLR 4.13.2 # encoding: utf-8 from antlr4 import * from io import StringIO @@ -8,100 +8,141 @@ else: from typing.io import TextIO - def serializedATN(): - with StringIO() as buf: - buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\24") - buf.write("\u00d1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\3\2\3\2\3\2\3\2") - buf.write("\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3") - buf.write("\2\3\2\3\2\3\2\3\2\5\2!\n\2\3\3\3\3\3\3\3\3\3\3\3\3\3") - buf.write("\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3") - buf.write("\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3") - buf.write("\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\5\3L\n\3\3\4\3\4\3\4\3") - buf.write("\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4\5\4Y\n\4\3\5\6\5\\\n\5") - buf.write("\r\5\16\5]\3\5\3\5\3\5\7\5c\n\5\f\5\16\5f\13\5\3\5\6\5") - buf.write("i\n\5\r\5\16\5j\3\5\3\5\7\5o\n\5\f\5\16\5r\13\5\3\5\6") - buf.write("\5u\n\5\r\5\16\5v\3\5\3\5\7\5{\n\5\f\5\16\5~\13\5\3\5") - buf.write("\6\5\u0081\n\5\r\5\16\5\u0082\3\5\7\5\u0086\n\5\f\5\16") - buf.write("\5\u0089\13\5\3\5\6\5\u008c\n\5\r\5\16\5\u008d\3\5\6\5") - buf.write("\u0091\n\5\r\5\16\5\u0092\3\5\3\5\3\5\7\5\u0098\n\5\f") - buf.write("\5\16\5\u009b\13\5\3\5\6\5\u009e\n\5\r\5\16\5\u009f\3") - buf.write("\5\6\5\u00a3\n\5\r\5\16\5\u00a4\3\5\3\5\7\5\u00a9\n\5") - buf.write("\f\5\16\5\u00ac\13\5\3\5\6\5\u00af\n\5\r\5\16\5\u00b0") - buf.write("\3\5\6\5\u00b4\n\5\r\5\16\5\u00b5\3\5\3\5\7\5\u00ba\n") - buf.write("\5\f\5\16\5\u00bd\13\5\3\5\6\5\u00c0\n\5\r\5\16\5\u00c1") - buf.write("\3\5\6\5\u00c5\n\5\r\5\16\5\u00c6\3\5\7\5\u00ca\n\5\f") - buf.write("\5\16\5\u00cd\13\5\5\5\u00cf\n\5\3\5\2\2\6\2\4\6\b\2\2") - buf.write("\2\u00f2\2 \3\2\2\2\4K\3\2\2\2\6X\3\2\2\2\b\u00ce\3\2") - buf.write("\2\2\n\13\7\3\2\2\13\f\5\4\3\2\f\r\5\6\4\2\r\16\7\4\2") - buf.write("\2\16\17\7\20\2\2\17\20\7\5\2\2\20!\3\2\2\2\21\22\7\3") - buf.write("\2\2\22\23\5\4\3\2\23\24\5\6\4\2\24\25\7\5\2\2\25!\3\2") - buf.write("\2\2\26\27\7\3\2\2\27\30\5\6\4\2\30\31\7\4\2\2\31\32\7") - buf.write("\20\2\2\32\33\7\5\2\2\33!\3\2\2\2\34\35\7\3\2\2\35\36") - buf.write("\5\6\4\2\36\37\7\5\2\2\37!\3\2\2\2 \n\3\2\2\2 \21\3\2") - buf.write("\2\2 \26\3\2\2\2 \34\3\2\2\2!\3\3\2\2\2\"#\5\6\4\2#$\7") - buf.write("\17\2\2$L\3\2\2\2%&\5\6\4\2&\'\7\17\2\2\'(\5\4\3\2(L\3") - buf.write("\2\2\2)*\7\6\2\2*+\5\4\3\2+,\7\7\2\2,L\3\2\2\2-.\5\6\4") - buf.write("\2./\7\17\2\2/\60\7\6\2\2\60\61\5\4\3\2\61\62\7\7\2\2") - buf.write("\62\63\5\4\3\2\63L\3\2\2\2\64\65\5\6\4\2\65\66\7\17\2") - buf.write("\2\66\67\7\6\2\2\678\5\4\3\289\7\7\2\29:\7\6\2\2:;\5\4") - buf.write("\3\2;<\7\7\2\2<=\5\4\3\2=L\3\2\2\2>?\5\6\4\2?@\7\17\2") - buf.write("\2@A\7\6\2\2AB\5\4\3\2BC\7\7\2\2CD\7\6\2\2DE\5\4\3\2E") - buf.write("F\7\7\2\2FG\7\6\2\2GH\5\4\3\2HI\7\7\2\2IJ\5\4\3\2JL\3") - buf.write("\2\2\2K\"\3\2\2\2K%\3\2\2\2K)\3\2\2\2K-\3\2\2\2K\64\3") - buf.write("\2\2\2K>\3\2\2\2L\5\3\2\2\2MN\5\b\5\2NO\7\22\2\2OP\7\20") - buf.write("\2\2PY\3\2\2\2QR\5\b\5\2RS\7\20\2\2SY\3\2\2\2TU\5\b\5") - buf.write("\2UV\7\22\2\2VY\3\2\2\2WY\5\b\5\2XM\3\2\2\2XQ\3\2\2\2") - buf.write("XT\3\2\2\2XW\3\2\2\2Y\7\3\2\2\2Z\\\7\b\2\2[Z\3\2\2\2\\") - buf.write("]\3\2\2\2][\3\2\2\2]^\3\2\2\2^_\3\2\2\2_`\7\22\2\2`d\7") - buf.write("\20\2\2ac\7\t\2\2ba\3\2\2\2cf\3\2\2\2db\3\2\2\2de\3\2") - buf.write("\2\2e\u00cf\3\2\2\2fd\3\2\2\2gi\7\b\2\2hg\3\2\2\2ij\3") - buf.write("\2\2\2jh\3\2\2\2jk\3\2\2\2kl\3\2\2\2lp\7\20\2\2mo\7\t") - buf.write("\2\2nm\3\2\2\2or\3\2\2\2pn\3\2\2\2pq\3\2\2\2q\u00cf\3") - buf.write("\2\2\2rp\3\2\2\2su\7\b\2\2ts\3\2\2\2uv\3\2\2\2vt\3\2\2") - buf.write("\2vw\3\2\2\2wx\3\2\2\2x|\7\22\2\2y{\7\t\2\2zy\3\2\2\2") - buf.write("{~\3\2\2\2|z\3\2\2\2|}\3\2\2\2}\u00cf\3\2\2\2~|\3\2\2") - buf.write("\2\177\u0081\7\b\2\2\u0080\177\3\2\2\2\u0081\u0082\3\2") - buf.write("\2\2\u0082\u0080\3\2\2\2\u0082\u0083\3\2\2\2\u0083\u0087") - buf.write("\3\2\2\2\u0084\u0086\7\t\2\2\u0085\u0084\3\2\2\2\u0086") - buf.write("\u0089\3\2\2\2\u0087\u0085\3\2\2\2\u0087\u0088\3\2\2\2") - buf.write("\u0088\u00cf\3\2\2\2\u0089\u0087\3\2\2\2\u008a\u008c\7") - buf.write("\t\2\2\u008b\u008a\3\2\2\2\u008c\u008d\3\2\2\2\u008d\u008b") - buf.write("\3\2\2\2\u008d\u008e\3\2\2\2\u008e\u0090\3\2\2\2\u008f") - buf.write("\u0091\7\b\2\2\u0090\u008f\3\2\2\2\u0091\u0092\3\2\2\2") - buf.write("\u0092\u0090\3\2\2\2\u0092\u0093\3\2\2\2\u0093\u0094\3") - buf.write("\2\2\2\u0094\u0095\7\22\2\2\u0095\u0099\7\20\2\2\u0096") - buf.write("\u0098\7\t\2\2\u0097\u0096\3\2\2\2\u0098\u009b\3\2\2\2") - buf.write("\u0099\u0097\3\2\2\2\u0099\u009a\3\2\2\2\u009a\u00cf\3") - buf.write("\2\2\2\u009b\u0099\3\2\2\2\u009c\u009e\7\t\2\2\u009d\u009c") - buf.write("\3\2\2\2\u009e\u009f\3\2\2\2\u009f\u009d\3\2\2\2\u009f") - buf.write("\u00a0\3\2\2\2\u00a0\u00a2\3\2\2\2\u00a1\u00a3\7\b\2\2") - buf.write("\u00a2\u00a1\3\2\2\2\u00a3\u00a4\3\2\2\2\u00a4\u00a2\3") - buf.write("\2\2\2\u00a4\u00a5\3\2\2\2\u00a5\u00a6\3\2\2\2\u00a6\u00aa") - buf.write("\7\20\2\2\u00a7\u00a9\7\t\2\2\u00a8\u00a7\3\2\2\2\u00a9") - buf.write("\u00ac\3\2\2\2\u00aa\u00a8\3\2\2\2\u00aa\u00ab\3\2\2\2") - buf.write("\u00ab\u00cf\3\2\2\2\u00ac\u00aa\3\2\2\2\u00ad\u00af\7") - buf.write("\t\2\2\u00ae\u00ad\3\2\2\2\u00af\u00b0\3\2\2\2\u00b0\u00ae") - buf.write("\3\2\2\2\u00b0\u00b1\3\2\2\2\u00b1\u00b3\3\2\2\2\u00b2") - buf.write("\u00b4\7\b\2\2\u00b3\u00b2\3\2\2\2\u00b4\u00b5\3\2\2\2") - buf.write("\u00b5\u00b3\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6\u00b7\3") - buf.write("\2\2\2\u00b7\u00bb\7\22\2\2\u00b8\u00ba\7\t\2\2\u00b9") - buf.write("\u00b8\3\2\2\2\u00ba\u00bd\3\2\2\2\u00bb\u00b9\3\2\2\2") - buf.write("\u00bb\u00bc\3\2\2\2\u00bc\u00cf\3\2\2\2\u00bd\u00bb\3") - buf.write("\2\2\2\u00be\u00c0\7\t\2\2\u00bf\u00be\3\2\2\2\u00c0\u00c1") - buf.write("\3\2\2\2\u00c1\u00bf\3\2\2\2\u00c1\u00c2\3\2\2\2\u00c2") - buf.write("\u00c4\3\2\2\2\u00c3\u00c5\7\b\2\2\u00c4\u00c3\3\2\2\2") - buf.write("\u00c5\u00c6\3\2\2\2\u00c6\u00c4\3\2\2\2\u00c6\u00c7\3") - buf.write("\2\2\2\u00c7\u00cb\3\2\2\2\u00c8\u00ca\7\t\2\2\u00c9\u00c8") - buf.write("\3\2\2\2\u00ca\u00cd\3\2\2\2\u00cb\u00c9\3\2\2\2\u00cb") - buf.write("\u00cc\3\2\2\2\u00cc\u00cf\3\2\2\2\u00cd\u00cb\3\2\2\2") - buf.write("\u00ce[\3\2\2\2\u00ceh\3\2\2\2\u00cet\3\2\2\2\u00ce\u0080") - buf.write("\3\2\2\2\u00ce\u008b\3\2\2\2\u00ce\u009d\3\2\2\2\u00ce") - buf.write("\u00ae\3\2\2\2\u00ce\u00bf\3\2\2\2\u00cf\t\3\2\2\2\32") - buf.write(" KX]djpv|\u0082\u0087\u008d\u0092\u0099\u009f\u00a4\u00aa") - buf.write("\u00b0\u00b5\u00bb\u00c1\u00c6\u00cb\u00ce") - return buf.getvalue() - + return [ + 4,1,33,357,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13, + 2,14,7,14,1,0,1,0,1,0,1,0,1,0,5,0,36,8,0,10,0,12,0,39,9,0,1,0,1, + 0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,57, + 8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, + 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, + 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,100,8,2,1,3,1,3,1,3, + 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,113,8,3,1,4,4,4,116,8,4,11,4, + 12,4,117,1,4,1,4,1,4,5,4,123,8,4,10,4,12,4,126,9,4,1,4,4,4,129,8, + 4,11,4,12,4,130,1,4,1,4,5,4,135,8,4,10,4,12,4,138,9,4,1,4,4,4,141, + 8,4,11,4,12,4,142,1,4,1,4,5,4,147,8,4,10,4,12,4,150,9,4,1,4,4,4, + 153,8,4,11,4,12,4,154,1,4,5,4,158,8,4,10,4,12,4,161,9,4,1,4,4,4, + 164,8,4,11,4,12,4,165,1,4,4,4,169,8,4,11,4,12,4,170,1,4,1,4,1,4, + 5,4,176,8,4,10,4,12,4,179,9,4,1,4,4,4,182,8,4,11,4,12,4,183,1,4, + 4,4,187,8,4,11,4,12,4,188,1,4,1,4,5,4,193,8,4,10,4,12,4,196,9,4, + 1,4,4,4,199,8,4,11,4,12,4,200,1,4,4,4,204,8,4,11,4,12,4,205,1,4, + 1,4,5,4,210,8,4,10,4,12,4,213,9,4,1,4,4,4,216,8,4,11,4,12,4,217, + 1,4,4,4,221,8,4,11,4,12,4,222,1,4,5,4,226,8,4,10,4,12,4,229,9,4, + 3,4,231,8,4,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6, + 1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,3,6,256,8,6,1,7,1,7,1,7, + 3,7,261,8,7,1,7,1,7,1,7,3,7,266,8,7,1,7,5,7,269,8,7,10,7,12,7,272, + 9,7,1,7,1,7,1,7,1,7,1,7,1,7,5,7,280,8,7,10,7,12,7,283,9,7,1,7,3, + 7,286,8,7,1,8,1,8,1,8,3,8,291,8,8,1,9,3,9,294,8,9,1,9,1,9,1,9,5, + 9,299,8,9,10,9,12,9,302,9,9,1,10,1,10,3,10,306,8,10,1,10,1,10,1, + 10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,320,8,10,1, + 10,3,10,323,8,10,1,10,5,10,326,8,10,10,10,12,10,329,9,10,1,10,1, + 10,1,10,1,10,3,10,335,8,10,1,10,1,10,1,10,3,10,340,8,10,1,10,1,10, + 1,10,1,10,1,10,3,10,347,8,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14, + 1,14,1,14,0,0,15,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,0,6,2,0, + 3,3,13,13,2,0,25,26,32,32,2,0,16,16,33,33,2,0,14,14,33,33,1,0,4, + 7,2,0,27,27,30,30,405,0,30,1,0,0,0,2,56,1,0,0,0,4,99,1,0,0,0,6,112, + 1,0,0,0,8,230,1,0,0,0,10,232,1,0,0,0,12,255,1,0,0,0,14,285,1,0,0, + 0,16,290,1,0,0,0,18,293,1,0,0,0,20,346,1,0,0,0,22,348,1,0,0,0,24, + 350,1,0,0,0,26,352,1,0,0,0,28,354,1,0,0,0,30,37,5,1,0,0,31,32,5, + 23,0,0,32,33,3,4,2,0,33,34,5,24,0,0,34,36,1,0,0,0,35,31,1,0,0,0, + 36,39,1,0,0,0,37,35,1,0,0,0,37,38,1,0,0,0,38,40,1,0,0,0,39,37,1, + 0,0,0,40,41,3,2,1,0,41,42,5,1,0,0,42,1,1,0,0,0,43,44,3,4,2,0,44, + 45,3,6,3,0,45,46,5,2,0,0,46,47,5,14,0,0,47,57,1,0,0,0,48,49,3,4, + 2,0,49,50,3,6,3,0,50,57,1,0,0,0,51,52,3,6,3,0,52,53,5,2,0,0,53,54, + 5,14,0,0,54,57,1,0,0,0,55,57,3,6,3,0,56,43,1,0,0,0,56,48,1,0,0,0, + 56,51,1,0,0,0,56,55,1,0,0,0,57,3,1,0,0,0,58,59,3,6,3,0,59,60,3,12, + 6,0,60,100,1,0,0,0,61,62,3,6,3,0,62,63,3,12,6,0,63,64,3,4,2,0,64, + 100,1,0,0,0,65,66,5,21,0,0,66,67,3,4,2,0,67,68,5,22,0,0,68,100,1, + 0,0,0,69,70,3,6,3,0,70,71,3,12,6,0,71,72,5,21,0,0,72,73,3,4,2,0, + 73,74,5,22,0,0,74,75,3,4,2,0,75,100,1,0,0,0,76,77,3,6,3,0,77,78, + 3,12,6,0,78,79,5,21,0,0,79,80,3,4,2,0,80,81,5,22,0,0,81,82,5,21, + 0,0,82,83,3,4,2,0,83,84,5,22,0,0,84,85,3,4,2,0,85,100,1,0,0,0,86, + 87,3,6,3,0,87,88,3,12,6,0,88,89,5,21,0,0,89,90,3,4,2,0,90,91,5,22, + 0,0,91,92,5,21,0,0,92,93,3,4,2,0,93,94,5,22,0,0,94,95,5,21,0,0,95, + 96,3,4,2,0,96,97,5,22,0,0,97,98,3,4,2,0,98,100,1,0,0,0,99,58,1,0, + 0,0,99,61,1,0,0,0,99,65,1,0,0,0,99,69,1,0,0,0,99,76,1,0,0,0,99,86, + 1,0,0,0,100,5,1,0,0,0,101,102,3,8,4,0,102,103,5,15,0,0,103,104,5, + 14,0,0,104,113,1,0,0,0,105,106,3,8,4,0,106,107,5,14,0,0,107,113, + 1,0,0,0,108,109,3,8,4,0,109,110,5,15,0,0,110,113,1,0,0,0,111,113, + 3,8,4,0,112,101,1,0,0,0,112,105,1,0,0,0,112,108,1,0,0,0,112,111, + 1,0,0,0,113,7,1,0,0,0,114,116,3,10,5,0,115,114,1,0,0,0,116,117,1, + 0,0,0,117,115,1,0,0,0,117,118,1,0,0,0,118,119,1,0,0,0,119,120,5, + 15,0,0,120,124,5,14,0,0,121,123,3,20,10,0,122,121,1,0,0,0,123,126, + 1,0,0,0,124,122,1,0,0,0,124,125,1,0,0,0,125,231,1,0,0,0,126,124, + 1,0,0,0,127,129,3,10,5,0,128,127,1,0,0,0,129,130,1,0,0,0,130,128, + 1,0,0,0,130,131,1,0,0,0,131,132,1,0,0,0,132,136,5,14,0,0,133,135, + 3,20,10,0,134,133,1,0,0,0,135,138,1,0,0,0,136,134,1,0,0,0,136,137, + 1,0,0,0,137,231,1,0,0,0,138,136,1,0,0,0,139,141,3,10,5,0,140,139, + 1,0,0,0,141,142,1,0,0,0,142,140,1,0,0,0,142,143,1,0,0,0,143,144, + 1,0,0,0,144,148,5,15,0,0,145,147,3,20,10,0,146,145,1,0,0,0,147,150, + 1,0,0,0,148,146,1,0,0,0,148,149,1,0,0,0,149,231,1,0,0,0,150,148, + 1,0,0,0,151,153,3,10,5,0,152,151,1,0,0,0,153,154,1,0,0,0,154,152, + 1,0,0,0,154,155,1,0,0,0,155,159,1,0,0,0,156,158,3,20,10,0,157,156, + 1,0,0,0,158,161,1,0,0,0,159,157,1,0,0,0,159,160,1,0,0,0,160,231, + 1,0,0,0,161,159,1,0,0,0,162,164,3,20,10,0,163,162,1,0,0,0,164,165, + 1,0,0,0,165,163,1,0,0,0,165,166,1,0,0,0,166,168,1,0,0,0,167,169, + 3,10,5,0,168,167,1,0,0,0,169,170,1,0,0,0,170,168,1,0,0,0,170,171, + 1,0,0,0,171,172,1,0,0,0,172,173,5,15,0,0,173,177,5,14,0,0,174,176, + 3,20,10,0,175,174,1,0,0,0,176,179,1,0,0,0,177,175,1,0,0,0,177,178, + 1,0,0,0,178,231,1,0,0,0,179,177,1,0,0,0,180,182,3,20,10,0,181,180, + 1,0,0,0,182,183,1,0,0,0,183,181,1,0,0,0,183,184,1,0,0,0,184,186, + 1,0,0,0,185,187,3,10,5,0,186,185,1,0,0,0,187,188,1,0,0,0,188,186, + 1,0,0,0,188,189,1,0,0,0,189,190,1,0,0,0,190,194,5,14,0,0,191,193, + 3,20,10,0,192,191,1,0,0,0,193,196,1,0,0,0,194,192,1,0,0,0,194,195, + 1,0,0,0,195,231,1,0,0,0,196,194,1,0,0,0,197,199,3,20,10,0,198,197, + 1,0,0,0,199,200,1,0,0,0,200,198,1,0,0,0,200,201,1,0,0,0,201,203, + 1,0,0,0,202,204,3,10,5,0,203,202,1,0,0,0,204,205,1,0,0,0,205,203, + 1,0,0,0,205,206,1,0,0,0,206,207,1,0,0,0,207,211,5,15,0,0,208,210, + 3,20,10,0,209,208,1,0,0,0,210,213,1,0,0,0,211,209,1,0,0,0,211,212, + 1,0,0,0,212,231,1,0,0,0,213,211,1,0,0,0,214,216,3,20,10,0,215,214, + 1,0,0,0,216,217,1,0,0,0,217,215,1,0,0,0,217,218,1,0,0,0,218,220, + 1,0,0,0,219,221,3,10,5,0,220,219,1,0,0,0,221,222,1,0,0,0,222,220, + 1,0,0,0,222,223,1,0,0,0,223,227,1,0,0,0,224,226,3,20,10,0,225,224, + 1,0,0,0,226,229,1,0,0,0,227,225,1,0,0,0,227,228,1,0,0,0,228,231, + 1,0,0,0,229,227,1,0,0,0,230,115,1,0,0,0,230,128,1,0,0,0,230,140, + 1,0,0,0,230,152,1,0,0,0,230,163,1,0,0,0,230,181,1,0,0,0,230,198, + 1,0,0,0,230,215,1,0,0,0,231,9,1,0,0,0,232,233,7,0,0,0,233,11,1,0, + 0,0,234,235,5,19,0,0,235,236,3,24,12,0,236,237,5,16,0,0,237,238, + 5,18,0,0,238,239,3,22,11,0,239,240,5,20,0,0,240,256,1,0,0,0,241, + 242,5,19,0,0,242,243,5,16,0,0,243,244,5,18,0,0,244,245,3,22,11,0, + 245,246,5,20,0,0,246,256,1,0,0,0,247,248,3,24,12,0,248,249,5,16, + 0,0,249,250,5,18,0,0,250,251,3,22,11,0,251,256,1,0,0,0,252,253,3, + 24,12,0,253,254,5,16,0,0,254,256,1,0,0,0,255,234,1,0,0,0,255,241, + 1,0,0,0,255,247,1,0,0,0,255,252,1,0,0,0,256,13,1,0,0,0,257,258,5, + 31,0,0,258,260,5,23,0,0,259,261,3,28,14,0,260,259,1,0,0,0,260,261, + 1,0,0,0,261,262,1,0,0,0,262,270,5,16,0,0,263,265,5,17,0,0,264,266, + 3,28,14,0,265,264,1,0,0,0,265,266,1,0,0,0,266,267,1,0,0,0,267,269, + 5,16,0,0,268,263,1,0,0,0,269,272,1,0,0,0,270,268,1,0,0,0,270,271, + 1,0,0,0,271,273,1,0,0,0,272,270,1,0,0,0,273,286,5,24,0,0,274,275, + 5,27,0,0,275,276,5,23,0,0,276,281,5,16,0,0,277,278,5,17,0,0,278, + 280,5,16,0,0,279,277,1,0,0,0,280,283,1,0,0,0,281,279,1,0,0,0,281, + 282,1,0,0,0,282,284,1,0,0,0,283,281,1,0,0,0,284,286,5,24,0,0,285, + 257,1,0,0,0,285,274,1,0,0,0,286,15,1,0,0,0,287,291,5,13,0,0,288, + 291,3,26,13,0,289,291,5,8,0,0,290,287,1,0,0,0,290,288,1,0,0,0,290, + 289,1,0,0,0,291,17,1,0,0,0,292,294,7,1,0,0,293,292,1,0,0,0,293,294, + 1,0,0,0,294,295,1,0,0,0,295,296,5,4,0,0,296,300,5,16,0,0,297,299, + 3,14,7,0,298,297,1,0,0,0,299,302,1,0,0,0,300,298,1,0,0,0,300,301, + 1,0,0,0,301,19,1,0,0,0,302,300,1,0,0,0,303,304,5,16,0,0,304,306, + 5,17,0,0,305,303,1,0,0,0,305,306,1,0,0,0,306,307,1,0,0,0,307,308, + 5,16,0,0,308,309,5,18,0,0,309,310,5,9,0,0,310,347,5,18,0,0,311,312, + 5,16,0,0,312,313,5,18,0,0,313,314,3,26,13,0,314,315,5,18,0,0,315, + 316,3,16,8,0,316,317,5,18,0,0,317,347,1,0,0,0,318,320,5,18,0,0,319, + 318,1,0,0,0,319,320,1,0,0,0,320,322,1,0,0,0,321,323,5,16,0,0,322, + 321,1,0,0,0,322,323,1,0,0,0,323,327,1,0,0,0,324,326,3,26,13,0,325, + 324,1,0,0,0,326,329,1,0,0,0,327,325,1,0,0,0,327,328,1,0,0,0,328, + 330,1,0,0,0,329,327,1,0,0,0,330,347,3,16,8,0,331,339,5,16,0,0,332, + 333,5,17,0,0,333,335,5,16,0,0,334,332,1,0,0,0,334,335,1,0,0,0,335, + 336,1,0,0,0,336,340,5,28,0,0,337,340,5,29,0,0,338,340,3,18,9,0,339, + 334,1,0,0,0,339,337,1,0,0,0,339,338,1,0,0,0,340,347,1,0,0,0,341, + 347,5,10,0,0,342,343,5,11,0,0,343,347,5,18,0,0,344,345,5,18,0,0, + 345,347,5,12,0,0,346,305,1,0,0,0,346,311,1,0,0,0,346,319,1,0,0,0, + 346,331,1,0,0,0,346,341,1,0,0,0,346,342,1,0,0,0,346,344,1,0,0,0, + 347,21,1,0,0,0,348,349,7,2,0,0,349,23,1,0,0,0,350,351,7,3,0,0,351, + 25,1,0,0,0,352,353,7,4,0,0,353,27,1,0,0,0,354,355,7,5,0,0,355,29, + 1,0,0,0,41,37,56,99,112,117,124,130,136,142,148,154,159,165,170, + 177,183,188,194,200,205,211,217,222,227,230,255,260,265,270,281, + 285,290,293,300,305,319,322,327,334,339,346 + ] class GlycanParser ( Parser ): @@ -113,43 +154,78 @@ class GlycanParser ( Parser ): sharedContextCache = PredictionContextCache() - literalNames = [ "", "'{'", "' '", "'}'", "'['", "']'" ] + literalNames = [ "", "'#'", "' '", "", "'C'", "'N'", + "'O'", "'P'", "", "'Anhydro'", "'0d'", "", + "", "", "", "", + "", "','", "'-'", "'('", "')'", "'['", "']'", + "'{'", "'}'", "'a'", "'ai'", "'c'", "'d'", "'e'", "'t'", + "'='", "'i'", "'?'" ] - symbolicNames = [ "", "", "", "", - "", "", "SAC", "MOD", "FG", "BRIDGE", - "CARB", "ADD", "COUNT", "CON", "TYPE", "CT", "RING", - "NUM", "DIGIT" ] + symbolicNames = [ "", "", "", "SAC", "CARBON", + "NITROGEN", "OXYGEN", "PHOSPHOR", "FG", "ANHYDRO", + "HEAD", "HEADD", "END", "COUNT", "TYPE", "RING", "NUM", + "COLON", "DASH", "LPAR", "RPAR", "LBRACE", "RBRACE", + "LBRACK", "RBRACK", "A", "AI", "C", "D", "E", "T", + "EQ", "I", "QMARK" ] RULE_start = 0 - RULE_branch = 1 - RULE_glycan = 2 - RULE_deriv = 3 - - ruleNames = [ "start", "branch", "glycan", "deriv" ] + RULE_begin = 1 + RULE_branch = 2 + RULE_glycan = 3 + RULE_deriv = 4 + RULE_saci = 5 + RULE_con = 6 + RULE_add = 7 + RULE_fgi = 8 + RULE_carb = 9 + RULE_modi = 10 + RULE_qnum = 11 + RULE_typi = 12 + RULE_bridge = 13 + RULE_ct = 14 + + ruleNames = [ "start", "begin", "branch", "glycan", "deriv", "saci", + "con", "add", "fgi", "carb", "modi", "qnum", "typi", + "bridge", "ct" ] EOF = Token.EOF T__0=1 T__1=2 - T__2=3 - T__3=4 - T__4=5 - SAC=6 - MOD=7 + SAC=3 + CARBON=4 + NITROGEN=5 + OXYGEN=6 + PHOSPHOR=7 FG=8 - BRIDGE=9 - CARB=10 - ADD=11 - COUNT=12 - CON=13 + ANHYDRO=9 + HEAD=10 + HEADD=11 + END=12 + COUNT=13 TYPE=14 - CT=15 - RING=16 - NUM=17 - DIGIT=18 + RING=15 + NUM=16 + COLON=17 + DASH=18 + LPAR=19 + RPAR=20 + LBRACE=21 + RBRACE=22 + LBRACK=23 + RBRACK=24 + A=25 + AI=26 + C=27 + D=28 + E=29 + T=30 + EQ=31 + I=32 + QMARK=33 def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) - self.checkVersion("4.9") + self.checkVersion("4.13.2") self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._predicates = None @@ -157,21 +233,34 @@ def __init__(self, input:TokenStream, output:TextIO = sys.stdout): class StartContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser - def branch(self): - return self.getTypedRuleContext(GlycanParser.BranchContext,0) + def begin(self): + return self.getTypedRuleContext(GlycanParser.BeginContext,0) - def glycan(self): - return self.getTypedRuleContext(GlycanParser.GlycanContext,0) + def LBRACK(self, i:int=None): + if i is None: + return self.getTokens(GlycanParser.LBRACK) + else: + return self.getToken(GlycanParser.LBRACK, i) + def branch(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(GlycanParser.BranchContext) + else: + return self.getTypedRuleContext(GlycanParser.BranchContext,i) - def TYPE(self): - return self.getToken(GlycanParser.TYPE, 0) + + def RBRACK(self, i:int=None): + if i is None: + return self.getTokens(GlycanParser.RBRACK) + else: + return self.getToken(GlycanParser.RBRACK, i) def getRuleIndex(self): return GlycanParser.RULE_start @@ -191,60 +280,112 @@ def start(self): localctx = GlycanParser.StartContext(self, self._ctx, self.state) self.enterRule(localctx, 0, self.RULE_start) + self._la = 0 # Token type try: + self.enterOuterAlt(localctx, 1) self.state = 30 + self.match(GlycanParser.T__0) + self.state = 37 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==23: + self.state = 31 + self.match(GlycanParser.LBRACK) + self.state = 32 + self.branch() + self.state = 33 + self.match(GlycanParser.RBRACK) + self.state = 39 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 40 + self.begin() + self.state = 41 + self.match(GlycanParser.T__0) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BeginContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def branch(self): + return self.getTypedRuleContext(GlycanParser.BranchContext,0) + + + def glycan(self): + return self.getTypedRuleContext(GlycanParser.GlycanContext,0) + + + def TYPE(self): + return self.getToken(GlycanParser.TYPE, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_begin + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBegin" ): + listener.enterBegin(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBegin" ): + listener.exitBegin(self) + + + + + def begin(self): + + localctx = GlycanParser.BeginContext(self, self._ctx, self.state) + self.enterRule(localctx, 2, self.RULE_begin) + try: + self.state = 56 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,0,self._ctx) + la_ = self._interp.adaptivePredict(self._input,1,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 8 - self.match(GlycanParser.T__0) - self.state = 9 + self.state = 43 self.branch() - self.state = 10 + self.state = 44 self.glycan() - self.state = 11 + self.state = 45 self.match(GlycanParser.T__1) - self.state = 12 + self.state = 46 self.match(GlycanParser.TYPE) - self.state = 13 - self.match(GlycanParser.T__2) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 15 - self.match(GlycanParser.T__0) - self.state = 16 + self.state = 48 self.branch() - self.state = 17 + self.state = 49 self.glycan() - self.state = 18 - self.match(GlycanParser.T__2) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 20 - self.match(GlycanParser.T__0) - self.state = 21 + self.state = 51 self.glycan() - self.state = 22 + self.state = 52 self.match(GlycanParser.T__1) - self.state = 23 + self.state = 53 self.match(GlycanParser.TYPE) - self.state = 24 - self.match(GlycanParser.T__2) pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 26 - self.match(GlycanParser.T__0) - self.state = 27 + self.state = 55 self.glycan() - self.state = 28 - self.match(GlycanParser.T__2) pass @@ -258,6 +399,7 @@ def start(self): class BranchContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -267,8 +409,9 @@ def glycan(self): return self.getTypedRuleContext(GlycanParser.GlycanContext,0) - def CON(self): - return self.getToken(GlycanParser.CON, 0) + def con(self): + return self.getTypedRuleContext(GlycanParser.ConContext,0) + def branch(self, i:int=None): if i is None: @@ -277,6 +420,18 @@ def branch(self, i:int=None): return self.getTypedRuleContext(GlycanParser.BranchContext,i) + def LBRACE(self, i:int=None): + if i is None: + return self.getTokens(GlycanParser.LBRACE) + else: + return self.getToken(GlycanParser.LBRACE, i) + + def RBRACE(self, i:int=None): + if i is None: + return self.getTokens(GlycanParser.RBRACE) + else: + return self.getToken(GlycanParser.RBRACE, i) + def getRuleIndex(self): return GlycanParser.RULE_branch @@ -294,102 +449,102 @@ def exitRule(self, listener:ParseTreeListener): def branch(self): localctx = GlycanParser.BranchContext(self, self._ctx, self.state) - self.enterRule(localctx, 2, self.RULE_branch) + self.enterRule(localctx, 4, self.RULE_branch) try: - self.state = 73 + self.state = 99 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,1,self._ctx) + la_ = self._interp.adaptivePredict(self._input,2,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 32 + self.state = 58 self.glycan() - self.state = 33 - self.match(GlycanParser.CON) + self.state = 59 + self.con() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 35 + self.state = 61 self.glycan() - self.state = 36 - self.match(GlycanParser.CON) - self.state = 37 + self.state = 62 + self.con() + self.state = 63 self.branch() pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 39 - self.match(GlycanParser.T__3) - self.state = 40 + self.state = 65 + self.match(GlycanParser.LBRACE) + self.state = 66 self.branch() - self.state = 41 - self.match(GlycanParser.T__4) + self.state = 67 + self.match(GlycanParser.RBRACE) pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 43 + self.state = 69 self.glycan() - self.state = 44 - self.match(GlycanParser.CON) - self.state = 45 - self.match(GlycanParser.T__3) - self.state = 46 + self.state = 70 + self.con() + self.state = 71 + self.match(GlycanParser.LBRACE) + self.state = 72 self.branch() - self.state = 47 - self.match(GlycanParser.T__4) - self.state = 48 + self.state = 73 + self.match(GlycanParser.RBRACE) + self.state = 74 self.branch() pass elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 50 + self.state = 76 self.glycan() - self.state = 51 - self.match(GlycanParser.CON) - self.state = 52 - self.match(GlycanParser.T__3) - self.state = 53 + self.state = 77 + self.con() + self.state = 78 + self.match(GlycanParser.LBRACE) + self.state = 79 self.branch() - self.state = 54 - self.match(GlycanParser.T__4) - self.state = 55 - self.match(GlycanParser.T__3) - self.state = 56 + self.state = 80 + self.match(GlycanParser.RBRACE) + self.state = 81 + self.match(GlycanParser.LBRACE) + self.state = 82 self.branch() - self.state = 57 - self.match(GlycanParser.T__4) - self.state = 58 + self.state = 83 + self.match(GlycanParser.RBRACE) + self.state = 84 self.branch() pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 60 + self.state = 86 self.glycan() - self.state = 61 - self.match(GlycanParser.CON) - self.state = 62 - self.match(GlycanParser.T__3) - self.state = 63 + self.state = 87 + self.con() + self.state = 88 + self.match(GlycanParser.LBRACE) + self.state = 89 self.branch() - self.state = 64 - self.match(GlycanParser.T__4) - self.state = 65 - self.match(GlycanParser.T__3) - self.state = 66 + self.state = 90 + self.match(GlycanParser.RBRACE) + self.state = 91 + self.match(GlycanParser.LBRACE) + self.state = 92 self.branch() - self.state = 67 - self.match(GlycanParser.T__4) - self.state = 68 - self.match(GlycanParser.T__3) - self.state = 69 + self.state = 93 + self.match(GlycanParser.RBRACE) + self.state = 94 + self.match(GlycanParser.LBRACE) + self.state = 95 self.branch() - self.state = 70 - self.match(GlycanParser.T__4) - self.state = 71 + self.state = 96 + self.match(GlycanParser.RBRACE) + self.state = 97 self.branch() pass @@ -404,6 +559,7 @@ def branch(self): class GlycanContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -436,40 +592,40 @@ def exitRule(self, listener:ParseTreeListener): def glycan(self): localctx = GlycanParser.GlycanContext(self, self._ctx, self.state) - self.enterRule(localctx, 4, self.RULE_glycan) + self.enterRule(localctx, 6, self.RULE_glycan) try: - self.state = 86 + self.state = 112 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,2,self._ctx) + la_ = self._interp.adaptivePredict(self._input,3,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 75 + self.state = 101 self.deriv() - self.state = 76 + self.state = 102 self.match(GlycanParser.RING) - self.state = 77 + self.state = 103 self.match(GlycanParser.TYPE) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 79 + self.state = 105 self.deriv() - self.state = 80 + self.state = 106 self.match(GlycanParser.TYPE) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 82 + self.state = 108 self.deriv() - self.state = 83 + self.state = 109 self.match(GlycanParser.RING) pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 85 + self.state = 111 self.deriv() pass @@ -484,6 +640,7 @@ def glycan(self): class DerivContext(ParserRuleContext): + __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) @@ -495,17 +652,19 @@ def RING(self): def TYPE(self): return self.getToken(GlycanParser.TYPE, 0) - def SAC(self, i:int=None): + def saci(self, i:int=None): if i is None: - return self.getTokens(GlycanParser.SAC) + return self.getTypedRuleContexts(GlycanParser.SaciContext) else: - return self.getToken(GlycanParser.SAC, i) + return self.getTypedRuleContext(GlycanParser.SaciContext,i) + - def MOD(self, i:int=None): + def modi(self, i:int=None): if i is None: - return self.getTokens(GlycanParser.MOD) + return self.getTypedRuleContexts(GlycanParser.ModiContext) else: - return self.getToken(GlycanParser.MOD, i) + return self.getTypedRuleContext(GlycanParser.ModiContext,i) + def getRuleIndex(self): return GlycanParser.RULE_deriv @@ -524,37 +683,37 @@ def exitRule(self, listener:ParseTreeListener): def deriv(self): localctx = GlycanParser.DerivContext(self, self._ctx, self.state) - self.enterRule(localctx, 6, self.RULE_deriv) + self.enterRule(localctx, 8, self.RULE_deriv) self._la = 0 # Token type try: - self.state = 204 + self.state = 230 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,23,self._ctx) + la_ = self._interp.adaptivePredict(self._input,24,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 89 + self.state = 115 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 88 - self.match(GlycanParser.SAC) - self.state = 91 + self.state = 114 + self.saci() + self.state = 117 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==GlycanParser.SAC): + if not (_la==3 or _la==13): break - self.state = 93 + self.state = 119 self.match(GlycanParser.RING) - self.state = 94 + self.state = 120 self.match(GlycanParser.TYPE) - self.state = 98 + self.state = 124 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==GlycanParser.MOD: - self.state = 95 - self.match(GlycanParser.MOD) - self.state = 100 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 121 + self.modi() + self.state = 126 self._errHandler.sync(self) _la = self._input.LA(1) @@ -562,27 +721,27 @@ def deriv(self): elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 102 + self.state = 128 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 101 - self.match(GlycanParser.SAC) - self.state = 104 + self.state = 127 + self.saci() + self.state = 130 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==GlycanParser.SAC): + if not (_la==3 or _la==13): break - self.state = 106 + self.state = 132 self.match(GlycanParser.TYPE) - self.state = 110 + self.state = 136 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==GlycanParser.MOD: - self.state = 107 - self.match(GlycanParser.MOD) - self.state = 112 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 133 + self.modi() + self.state = 138 self._errHandler.sync(self) _la = self._input.LA(1) @@ -590,27 +749,27 @@ def deriv(self): elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 114 + self.state = 140 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 113 - self.match(GlycanParser.SAC) - self.state = 116 + self.state = 139 + self.saci() + self.state = 142 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==GlycanParser.SAC): + if not (_la==3 or _la==13): break - self.state = 118 + self.state = 144 self.match(GlycanParser.RING) - self.state = 122 + self.state = 148 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==GlycanParser.MOD: - self.state = 119 - self.match(GlycanParser.MOD) - self.state = 124 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 145 + self.modi() + self.state = 150 self._errHandler.sync(self) _la = self._input.LA(1) @@ -618,25 +777,27 @@ def deriv(self): elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 126 + self.state = 152 self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 125 - self.match(GlycanParser.SAC) - self.state = 128 + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 151 + self.saci() + + else: + raise NoViableAltException(self) + self.state = 154 self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==GlycanParser.SAC): - break + _alt = self._interp.adaptivePredict(self._input,10,self._ctx) - self.state = 133 + self.state = 159 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==GlycanParser.MOD: - self.state = 130 - self.match(GlycanParser.MOD) - self.state = 135 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 156 + self.modi() + self.state = 161 self._errHandler.sync(self) _la = self._input.LA(1) @@ -644,41 +805,43 @@ def deriv(self): elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 137 + self.state = 163 self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 136 - self.match(GlycanParser.MOD) - self.state = 139 + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 162 + self.modi() + + else: + raise NoViableAltException(self) + self.state = 165 self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==GlycanParser.MOD): - break + _alt = self._interp.adaptivePredict(self._input,12,self._ctx) - self.state = 142 + self.state = 168 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 141 - self.match(GlycanParser.SAC) - self.state = 144 + self.state = 167 + self.saci() + self.state = 170 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==GlycanParser.SAC): + if not (_la==3 or _la==13): break - self.state = 146 + self.state = 172 self.match(GlycanParser.RING) - self.state = 147 + self.state = 173 self.match(GlycanParser.TYPE) - self.state = 151 + self.state = 177 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==GlycanParser.MOD: - self.state = 148 - self.match(GlycanParser.MOD) - self.state = 153 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 174 + self.modi() + self.state = 179 self._errHandler.sync(self) _la = self._input.LA(1) @@ -686,39 +849,41 @@ def deriv(self): elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 155 + self.state = 181 self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 154 - self.match(GlycanParser.MOD) - self.state = 157 + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 180 + self.modi() + + else: + raise NoViableAltException(self) + self.state = 183 self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==GlycanParser.MOD): - break + _alt = self._interp.adaptivePredict(self._input,15,self._ctx) - self.state = 160 + self.state = 186 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 159 - self.match(GlycanParser.SAC) - self.state = 162 + self.state = 185 + self.saci() + self.state = 188 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==GlycanParser.SAC): + if not (_la==3 or _la==13): break - self.state = 164 + self.state = 190 self.match(GlycanParser.TYPE) - self.state = 168 + self.state = 194 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==GlycanParser.MOD: - self.state = 165 - self.match(GlycanParser.MOD) - self.state = 170 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 191 + self.modi() + self.state = 196 self._errHandler.sync(self) _la = self._input.LA(1) @@ -726,39 +891,41 @@ def deriv(self): elif la_ == 7: self.enterOuterAlt(localctx, 7) - self.state = 172 + self.state = 198 self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 171 - self.match(GlycanParser.MOD) - self.state = 174 + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 197 + self.modi() + + else: + raise NoViableAltException(self) + self.state = 200 self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==GlycanParser.MOD): - break + _alt = self._interp.adaptivePredict(self._input,18,self._ctx) - self.state = 177 + self.state = 203 self._errHandler.sync(self) _la = self._input.LA(1) while True: - self.state = 176 - self.match(GlycanParser.SAC) - self.state = 179 + self.state = 202 + self.saci() + self.state = 205 self._errHandler.sync(self) _la = self._input.LA(1) - if not (_la==GlycanParser.SAC): + if not (_la==3 or _la==13): break - self.state = 181 + self.state = 207 self.match(GlycanParser.RING) - self.state = 185 + self.state = 211 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==GlycanParser.MOD: - self.state = 182 - self.match(GlycanParser.MOD) - self.state = 187 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 208 + self.modi() + self.state = 213 self._errHandler.sync(self) _la = self._input.LA(1) @@ -766,37 +933,41 @@ def deriv(self): elif la_ == 8: self.enterOuterAlt(localctx, 8) - self.state = 189 + self.state = 215 self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 188 - self.match(GlycanParser.MOD) - self.state = 191 + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 214 + self.modi() + + else: + raise NoViableAltException(self) + self.state = 217 self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==GlycanParser.MOD): - break + _alt = self._interp.adaptivePredict(self._input,21,self._ctx) - self.state = 194 + self.state = 220 self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 193 - self.match(GlycanParser.SAC) - self.state = 196 + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 219 + self.saci() + + else: + raise NoViableAltException(self) + self.state = 222 self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==GlycanParser.SAC): - break + _alt = self._interp.adaptivePredict(self._input,22,self._ctx) - self.state = 201 + self.state = 227 self._errHandler.sync(self) _la = self._input.LA(1) - while _la==GlycanParser.MOD: - self.state = 198 - self.match(GlycanParser.MOD) - self.state = 203 + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 224 + self.modi() + self.state = 229 self._errHandler.sync(self) _la = self._input.LA(1) @@ -812,6 +983,873 @@ def deriv(self): return localctx + class SaciContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def COUNT(self): + return self.getToken(GlycanParser.COUNT, 0) + + def SAC(self): + return self.getToken(GlycanParser.SAC, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_saci + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSaci" ): + listener.enterSaci(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSaci" ): + listener.exitSaci(self) + + + + + def saci(self): + + localctx = GlycanParser.SaciContext(self, self._ctx, self.state) + self.enterRule(localctx, 10, self.RULE_saci) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 232 + _la = self._input.LA(1) + if not(_la==3 or _la==13): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ConContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LPAR(self): + return self.getToken(GlycanParser.LPAR, 0) + + def typi(self): + return self.getTypedRuleContext(GlycanParser.TypiContext,0) + + + def NUM(self): + return self.getToken(GlycanParser.NUM, 0) + + def DASH(self): + return self.getToken(GlycanParser.DASH, 0) + + def qnum(self): + return self.getTypedRuleContext(GlycanParser.QnumContext,0) + + + def RPAR(self): + return self.getToken(GlycanParser.RPAR, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_con + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCon" ): + listener.enterCon(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCon" ): + listener.exitCon(self) + + + + + def con(self): + + localctx = GlycanParser.ConContext(self, self._ctx, self.state) + self.enterRule(localctx, 12, self.RULE_con) + try: + self.state = 255 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,25,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 234 + self.match(GlycanParser.LPAR) + self.state = 235 + self.typi() + self.state = 236 + self.match(GlycanParser.NUM) + self.state = 237 + self.match(GlycanParser.DASH) + self.state = 238 + self.qnum() + self.state = 239 + self.match(GlycanParser.RPAR) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 241 + self.match(GlycanParser.LPAR) + self.state = 242 + self.match(GlycanParser.NUM) + self.state = 243 + self.match(GlycanParser.DASH) + self.state = 244 + self.qnum() + self.state = 245 + self.match(GlycanParser.RPAR) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 247 + self.typi() + self.state = 248 + self.match(GlycanParser.NUM) + self.state = 249 + self.match(GlycanParser.DASH) + self.state = 250 + self.qnum() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 252 + self.typi() + self.state = 253 + self.match(GlycanParser.NUM) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AddContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def EQ(self): + return self.getToken(GlycanParser.EQ, 0) + + def LBRACK(self): + return self.getToken(GlycanParser.LBRACK, 0) + + def NUM(self, i:int=None): + if i is None: + return self.getTokens(GlycanParser.NUM) + else: + return self.getToken(GlycanParser.NUM, i) + + def RBRACK(self): + return self.getToken(GlycanParser.RBRACK, 0) + + def ct(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(GlycanParser.CtContext) + else: + return self.getTypedRuleContext(GlycanParser.CtContext,i) + + + def COLON(self, i:int=None): + if i is None: + return self.getTokens(GlycanParser.COLON) + else: + return self.getToken(GlycanParser.COLON, i) + + def C(self): + return self.getToken(GlycanParser.C, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_add + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAdd" ): + listener.enterAdd(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAdd" ): + listener.exitAdd(self) + + + + + def add(self): + + localctx = GlycanParser.AddContext(self, self._ctx, self.state) + self.enterRule(localctx, 14, self.RULE_add) + self._la = 0 # Token type + try: + self.state = 285 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [31]: + self.enterOuterAlt(localctx, 1) + self.state = 257 + self.match(GlycanParser.EQ) + self.state = 258 + self.match(GlycanParser.LBRACK) + self.state = 260 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==27 or _la==30: + self.state = 259 + self.ct() + + + self.state = 262 + self.match(GlycanParser.NUM) + self.state = 270 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==17: + self.state = 263 + self.match(GlycanParser.COLON) + self.state = 265 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==27 or _la==30: + self.state = 264 + self.ct() + + + self.state = 267 + self.match(GlycanParser.NUM) + self.state = 272 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 273 + self.match(GlycanParser.RBRACK) + pass + elif token in [27]: + self.enterOuterAlt(localctx, 2) + self.state = 274 + self.match(GlycanParser.C) + self.state = 275 + self.match(GlycanParser.LBRACK) + self.state = 276 + self.match(GlycanParser.NUM) + self.state = 281 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==17: + self.state = 277 + self.match(GlycanParser.COLON) + self.state = 278 + self.match(GlycanParser.NUM) + self.state = 283 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 284 + self.match(GlycanParser.RBRACK) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FgiContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def COUNT(self): + return self.getToken(GlycanParser.COUNT, 0) + + def bridge(self): + return self.getTypedRuleContext(GlycanParser.BridgeContext,0) + + + def FG(self): + return self.getToken(GlycanParser.FG, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_fgi + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFgi" ): + listener.enterFgi(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFgi" ): + listener.exitFgi(self) + + + + + def fgi(self): + + localctx = GlycanParser.FgiContext(self, self._ctx, self.state) + self.enterRule(localctx, 16, self.RULE_fgi) + try: + self.state = 290 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [13]: + self.enterOuterAlt(localctx, 1) + self.state = 287 + self.match(GlycanParser.COUNT) + pass + elif token in [4, 5, 6, 7]: + self.enterOuterAlt(localctx, 2) + self.state = 288 + self.bridge() + pass + elif token in [8]: + self.enterOuterAlt(localctx, 3) + self.state = 289 + self.match(GlycanParser.FG) + pass + else: + raise NoViableAltException(self) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CarbContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def CARBON(self): + return self.getToken(GlycanParser.CARBON, 0) + + def NUM(self): + return self.getToken(GlycanParser.NUM, 0) + + def add(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(GlycanParser.AddContext) + else: + return self.getTypedRuleContext(GlycanParser.AddContext,i) + + + def AI(self): + return self.getToken(GlycanParser.AI, 0) + + def A(self): + return self.getToken(GlycanParser.A, 0) + + def I(self): + return self.getToken(GlycanParser.I, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_carb + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCarb" ): + listener.enterCarb(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCarb" ): + listener.exitCarb(self) + + + + + def carb(self): + + localctx = GlycanParser.CarbContext(self, self._ctx, self.state) + self.enterRule(localctx, 18, self.RULE_carb) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 293 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0): + self.state = 292 + _la = self._input.LA(1) + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + + + self.state = 295 + self.match(GlycanParser.CARBON) + self.state = 296 + self.match(GlycanParser.NUM) + self.state = 300 + self._errHandler.sync(self) + _la = self._input.LA(1) + while _la==27 or _la==31: + self.state = 297 + self.add() + self.state = 302 + self._errHandler.sync(self) + _la = self._input.LA(1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ModiContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def NUM(self, i:int=None): + if i is None: + return self.getTokens(GlycanParser.NUM) + else: + return self.getToken(GlycanParser.NUM, i) + + def DASH(self, i:int=None): + if i is None: + return self.getTokens(GlycanParser.DASH) + else: + return self.getToken(GlycanParser.DASH, i) + + def ANHYDRO(self): + return self.getToken(GlycanParser.ANHYDRO, 0) + + def COLON(self): + return self.getToken(GlycanParser.COLON, 0) + + def bridge(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(GlycanParser.BridgeContext) + else: + return self.getTypedRuleContext(GlycanParser.BridgeContext,i) + + + def fgi(self): + return self.getTypedRuleContext(GlycanParser.FgiContext,0) + + + def D(self): + return self.getToken(GlycanParser.D, 0) + + def E(self): + return self.getToken(GlycanParser.E, 0) + + def carb(self): + return self.getTypedRuleContext(GlycanParser.CarbContext,0) + + + def HEAD(self): + return self.getToken(GlycanParser.HEAD, 0) + + def HEADD(self): + return self.getToken(GlycanParser.HEADD, 0) + + def END(self): + return self.getToken(GlycanParser.END, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_modi + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterModi" ): + listener.enterModi(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitModi" ): + listener.exitModi(self) + + + + + def modi(self): + + localctx = GlycanParser.ModiContext(self, self._ctx, self.state) + self.enterRule(localctx, 20, self.RULE_modi) + self._la = 0 # Token type + try: + self.state = 346 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,40,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 305 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,34,self._ctx) + if la_ == 1: + self.state = 303 + self.match(GlycanParser.NUM) + self.state = 304 + self.match(GlycanParser.COLON) + + + self.state = 307 + self.match(GlycanParser.NUM) + self.state = 308 + self.match(GlycanParser.DASH) + self.state = 309 + self.match(GlycanParser.ANHYDRO) + self.state = 310 + self.match(GlycanParser.DASH) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 311 + self.match(GlycanParser.NUM) + self.state = 312 + self.match(GlycanParser.DASH) + self.state = 313 + self.bridge() + self.state = 314 + self.match(GlycanParser.DASH) + self.state = 315 + self.fgi() + self.state = 316 + self.match(GlycanParser.DASH) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 319 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==18: + self.state = 318 + self.match(GlycanParser.DASH) + + + self.state = 322 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==16: + self.state = 321 + self.match(GlycanParser.NUM) + + + self.state = 327 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,37,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 324 + self.bridge() + self.state = 329 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,37,self._ctx) + + self.state = 330 + self.fgi() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 331 + self.match(GlycanParser.NUM) + self.state = 339 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [17, 28]: + self.state = 334 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==17: + self.state = 332 + self.match(GlycanParser.COLON) + self.state = 333 + self.match(GlycanParser.NUM) + + + self.state = 336 + self.match(GlycanParser.D) + pass + elif token in [29]: + self.state = 337 + self.match(GlycanParser.E) + pass + elif token in [4, 25, 26, 32]: + self.state = 338 + self.carb() + pass + else: + raise NoViableAltException(self) + + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 341 + self.match(GlycanParser.HEAD) + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 342 + self.match(GlycanParser.HEADD) + self.state = 343 + self.match(GlycanParser.DASH) + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 344 + self.match(GlycanParser.DASH) + self.state = 345 + self.match(GlycanParser.END) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class QnumContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def QMARK(self): + return self.getToken(GlycanParser.QMARK, 0) + + def NUM(self): + return self.getToken(GlycanParser.NUM, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_qnum + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterQnum" ): + listener.enterQnum(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitQnum" ): + listener.exitQnum(self) + + + + + def qnum(self): + + localctx = GlycanParser.QnumContext(self, self._ctx, self.state) + self.enterRule(localctx, 22, self.RULE_qnum) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 348 + _la = self._input.LA(1) + if not(_la==16 or _la==33): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypiContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def TYPE(self): + return self.getToken(GlycanParser.TYPE, 0) + + def QMARK(self): + return self.getToken(GlycanParser.QMARK, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_typi + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypi" ): + listener.enterTypi(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypi" ): + listener.exitTypi(self) + + + + + def typi(self): + + localctx = GlycanParser.TypiContext(self, self._ctx, self.state) + self.enterRule(localctx, 24, self.RULE_typi) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 350 + _la = self._input.LA(1) + if not(_la==14 or _la==33): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BridgeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def CARBON(self): + return self.getToken(GlycanParser.CARBON, 0) + + def NITROGEN(self): + return self.getToken(GlycanParser.NITROGEN, 0) + + def OXYGEN(self): + return self.getToken(GlycanParser.OXYGEN, 0) + + def PHOSPHOR(self): + return self.getToken(GlycanParser.PHOSPHOR, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_bridge + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBridge" ): + listener.enterBridge(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBridge" ): + listener.exitBridge(self) + + + + + def bridge(self): + + localctx = GlycanParser.BridgeContext(self, self._ctx, self.state) + self.enterRule(localctx, 26, self.RULE_bridge) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 352 + _la = self._input.LA(1) + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 240) != 0)): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CtContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def C(self): + return self.getToken(GlycanParser.C, 0) + + def T(self): + return self.getToken(GlycanParser.T, 0) + + def getRuleIndex(self): + return GlycanParser.RULE_ct + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCt" ): + listener.enterCt(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCt" ): + listener.exitCt(self) + + + + + def ct(self): + + localctx = GlycanParser.CtContext(self, self._ctx, self.state) + self.enterRule(localctx, 28, self.RULE_ct) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 354 + _la = self._input.LA(1) + if not(_la==27 or _la==30): + self._errHandler.recoverInline(self) + else: + self._errHandler.reportMatch(self) + self.consume() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + diff --git a/glyles/grammar/__init__.py b/glyles/grammar/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/data/snfg.png b/tests/data/snfg.png deleted file mode 100644 index 19ac85098dc070fc46f61bdbb9093b75753ba701..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8427 zcmd5>X*iV8+kdPx5e>;Q27?MM60&8PnUDxWixxtNvJE0+8D>(lW-B67Dnb$!*^RP9 zC`v^dA=yIq{XNg4|Nr~@;k~Zc2iIKBIp@BA_kN%IM3T)8^YLJLAPC|+Vx(^gL7VI# zh;0v=9eim#BXtCV@I^=TiO2oZ$G;!+9yk?9wO~9THQ(Vo8lA=W;>WMjL6>b?rQ`0& z1a9k3+FiWbOU1o)W89XObHZ=s+-kI4az65EtVQjGTSls>CGl?>q<(vroJ9fR;O|A> z**_8+KcSBTXg1_0Lz-QBVn&qLE)F?{E`1armFOcD3~ddaFv$ z3waPtbUJHrIo!aQm94f^qHMa>8!J)qJ)x^@>w~@5%-0tu)>E#EFv!!Y3*ENsL9?~% z3thJNbU!qAGB+VgQ_Wqs(3j<;J~-OJG8Rft3;BZKbz*KTl2eBj#1GLa35IAW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obAI Date: Mon, 14 Oct 2024 22:26:40 +0200 Subject: [PATCH 02/14] Update of github actions for testing --- .github/workflows/test.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1798f72..0030a33 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -10,6 +10,7 @@ on: - main - auto_test - dev + - dev_1.0_grammar pull_request: branches: - main @@ -22,8 +23,8 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v3 with: python-version: 3.7 - name: Install poetry From 3497e21097d6b23987137d1d2ee81d92a22fccc9 Mon Sep 17 00:00:00 2001 From: Roman Joeres <70888826+Old-Shatterhand@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:29:06 +0200 Subject: [PATCH 03/14] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0030a33..936ecd8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v3 with: - python-version: 3.7 + python-version: 3.9 - name: Install poetry uses: abatilo/actions-poetry@v2.0.0 with: From ef53816c4861a92c7623a94d2c473fc91fcf8e5b Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Mon, 14 Oct 2024 22:32:51 +0200 Subject: [PATCH 04/14] Version update for ANTLR runtime --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a786cac..a8156e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ classifiers = [ python = ">=3.7,<4.0" numpy = "^1.21.4" rdkit-pypi = ">=2021.9.2" -antlr4-python3-runtime = "==4.9.3" +antlr4-python3-runtime = "==4.13.1" networkx = ">=2.6.3" pydot = "^1.4.2" joblib = "^1.2.0" From 53a49397b898024efbd338b82c3bee4a29edcbd4 Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Mon, 14 Oct 2024 22:45:19 +0200 Subject: [PATCH 05/14] Minor update for poetry --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 936ecd8..e4fc8ff 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -33,7 +33,7 @@ jobs: poetry-version: 1.1.12 - name: Install dependencies run: | - poetry install --no-dev + poetry update --no-dev poetry run python -m pip install pytest-cov - name: Run tests run: | From d4fc15004268c189eb81d14accea2dde34c5111a Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Mon, 14 Oct 2024 23:05:57 +0200 Subject: [PATCH 06/14] Updated dependencies pt. 2 --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a8156e9..3fd9dbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,9 +11,9 @@ classifiers = [ ] [tool.poetry.dependencies] -python = ">=3.7,<4.0" -numpy = "^1.21.4" -rdkit-pypi = ">=2021.9.2" +python = ">=3.9,<4.0" +numpy +rdkit = ">=2021.9.2" antlr4-python3-runtime = "==4.13.1" networkx = ">=2.6.3" pydot = "^1.4.2" From dd76b3cc3e064826694b2037d43db33129ff139e Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Mon, 14 Oct 2024 23:09:53 +0200 Subject: [PATCH 07/14] Updated dependencies pt. 3 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3fd9dbc..6ab4460 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ classifiers = [ [tool.poetry.dependencies] python = ">=3.9,<4.0" -numpy +numpy = "*" rdkit = ">=2021.9.2" antlr4-python3-runtime = "==4.13.1" networkx = ">=2.6.3" From c1a601378a95dcfcd68062530cf5c223529b0f83 Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Mon, 14 Oct 2024 23:19:04 +0200 Subject: [PATCH 08/14] Minor fix --- glyles/glycans/poly/merger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glyles/glycans/poly/merger.py b/glyles/glycans/poly/merger.py index eb6205c..93d6798 100644 --- a/glyles/glycans/poly/merger.py +++ b/glyles/glycans/poly/merger.py @@ -65,7 +65,7 @@ def __init__(self, factory): """ self.factory = factory - def merge(self, t, root_orientation="n", start=100, smiles_only: bool = True) -> str | tuple[str, nx.Graph]: + def merge(self, t, root_orientation="n", start=100, smiles_only: bool = True): """ Merge the provided tree of monomers enriched with the glycans in the nodes and information on the bindings between two monomer-nodes in the edges. The input graph is not changed during this process, as the methods From cd69bc7cea38cac6086765d8287617b86486f103 Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Tue, 15 Oct 2024 10:18:31 +0200 Subject: [PATCH 09/14] Grammar update to treat Count as saccharides again --- glyles/glycans/poly/walker.py | 2 + glyles/grammar/Glycan.g4 | 26 +- glyles/grammar/Glycan.interp | 3 +- glyles/grammar/GlycanListener.py | 9 - glyles/grammar/GlycanParser.py | 1002 ++++++++++-------------------- tests/test_parser.py | 27 + 6 files changed, 360 insertions(+), 709 deletions(-) diff --git a/glyles/glycans/poly/walker.py b/glyles/glycans/poly/walker.py index 8703e6c..de3d8d5 100644 --- a/glyles/glycans/poly/walker.py +++ b/glyles/glycans/poly/walker.py @@ -171,6 +171,8 @@ def build_recipe(self, node): tmp = self.build_recipe(c) if isinstance(c, GlycanParser.ModiContext): recipe.append(("".join([x[0] for x in tmp]), GlycanLexer.MOD)) + elif isinstance(c, GlycanParser.SaciContext): + recipe += [(x[0], GlycanLexer.SAC) for x in tmp] else: recipe += tmp return recipe diff --git a/glyles/grammar/Glycan.g4 b/glyles/grammar/Glycan.g4 index 21c6a98..5b5f2de 100644 --- a/glyles/grammar/Glycan.g4 +++ b/glyles/grammar/Glycan.g4 @@ -3,22 +3,19 @@ grammar Glycan; start: '#' (LBRACK branch RBRACK)* begin '#'; begin: - branch glycan ' ' TYPE - | branch glycan - | glycan ' ' TYPE - | glycan; + branch deriv ' ' TYPE + | branch deriv + | deriv ' ' TYPE + | deriv; branch: - glycan con - | glycan con branch + deriv con + | deriv con branch | LBRACE branch RBRACE - | glycan con LBRACE branch RBRACE branch - | glycan con LBRACE branch RBRACE LBRACE branch RBRACE branch - | glycan con LBRACE branch RBRACE LBRACE branch RBRACE LBRACE branch RBRACE branch; -glycan: - deriv RING TYPE | deriv TYPE | deriv RING | deriv; + | deriv con LBRACE branch RBRACE branch + | deriv con LBRACE branch RBRACE LBRACE branch RBRACE branch + | deriv con LBRACE branch RBRACE LBRACE branch RBRACE LBRACE branch RBRACE branch; deriv: - saci+ RING TYPE modi* | saci+ TYPE modi* | saci+ RING modi* | saci+ modi* - | modi+ saci+ RING TYPE modi* | modi+ saci+ TYPE modi* | modi+ saci+ RING modi* | modi+ saci+ modi*; + modi* saci+ modi* RING? TYPE?; saci: COUNT | SAC; con: LPAR typi NUM DASH qnum RPAR @@ -39,7 +36,7 @@ modi: | NUM ((COLON NUM)? D | E | carb) | HEAD | HEADD DASH - | DASH END; // |bridge deleted + | DASH END; qnum: QMARK | NUM; typi: @@ -124,5 +121,4 @@ I: QMARK: '?'; - // antlr -Dlanguage=Python3 Glycan.g4 diff --git a/glyles/grammar/Glycan.interp b/glyles/grammar/Glycan.interp index 0a3821b..9db20d5 100644 --- a/glyles/grammar/Glycan.interp +++ b/glyles/grammar/Glycan.interp @@ -74,7 +74,6 @@ rule names: start begin branch -glycan deriv saci con @@ -89,4 +88,4 @@ ct atn: -[4, 1, 33, 357, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7,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1, 4, 5, 4, 176, 8, 4, 10, 4, 12, 4, 179, 9, 4, 1, 4, 4, 4, 182, 8, 4, 11, 4, 12, 4, 183, 1, 4, 4, 4, 187, 8, 4, 11, 4, 12, 4, 188, 1, 4, 1, 4, 5, 4, 193, 8, 4, 10, 4, 12, 4, 196, 9, 4, 1, 4, 4, 4, 199, 8, 4, 11, 4, 12, 4, 200, 1, 4, 4, 4, 204, 8, 4, 11, 4, 12, 4, 205, 1, 4, 1, 4, 5, 4, 210, 8, 4, 10, 4, 12, 4, 213, 9, 4, 1, 4, 4, 4, 216, 8, 4, 11, 4, 12, 4, 217, 1, 4, 4, 4, 221, 8, 4, 11, 4, 12, 4, 222, 1, 4, 5, 4, 226, 8, 4, 10, 4, 12, 4, 229, 9, 4, 3, 4, 231, 8, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 256, 8, 6, 1, 7, 1, 7, 1, 7, 3, 7, 261, 8, 7, 1, 7, 1, 7, 1, 7, 3, 7, 266, 8, 7, 1, 7, 5, 7, 269, 8, 7, 10, 7, 12, 7, 272, 9, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 5, 7, 280, 8, 7, 10, 7, 12, 7, 283, 9, 7, 1, 7, 3, 7, 286, 8, 7, 1, 8, 1, 8, 1, 8, 3, 8, 291, 8, 8, 1, 9, 3, 9, 294, 8, 9, 1, 9, 1, 9, 1, 9, 5, 9, 299, 8, 9, 10, 9, 12, 9, 302, 9, 9, 1, 10, 1, 10, 3, 10, 306, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 320, 8, 10, 1, 10, 3, 10, 323, 8, 10, 1, 10, 5, 10, 326, 8, 10, 10, 10, 12, 10, 329, 9, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 335, 8, 10, 1, 10, 1, 10, 1, 10, 3, 10, 340, 8, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 3, 10, 347, 8, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 0, 0, 15, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 0, 6, 2, 0, 3, 3, 13, 13, 2, 0, 25, 26, 32, 32, 2, 0, 16, 16, 33, 33, 2, 0, 14, 14, 33, 33, 1, 0, 4, 7, 2, 0, 27, 27, 30, 30, 405, 0, 30, 1, 0, 0, 0, 2, 56, 1, 0, 0, 0, 4, 99, 1, 0, 0, 0, 6, 112, 1, 0, 0, 0, 8, 230, 1, 0, 0, 0, 10, 232, 1, 0, 0, 0, 12, 255, 1, 0, 0, 0, 14, 285, 1, 0, 0, 0, 16, 290, 1, 0, 0, 0, 18, 293, 1, 0, 0, 0, 20, 346, 1, 0, 0, 0, 22, 348, 1, 0, 0, 0, 24, 350, 1, 0, 0, 0, 26, 352, 1, 0, 0, 0, 28, 354, 1, 0, 0, 0, 30, 37, 5, 1, 0, 0, 31, 32, 5, 23, 0, 0, 32, 33, 3, 4, 2, 0, 33, 34, 5, 24, 0, 0, 34, 36, 1, 0, 0, 0, 35, 31, 1, 0, 0, 0, 36, 39, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 37, 38, 1, 0, 0, 0, 38, 40, 1, 0, 0, 0, 39, 37, 1, 0, 0, 0, 40, 41, 3, 2, 1, 0, 41, 42, 5, 1, 0, 0, 42, 1, 1, 0, 0, 0, 43, 44, 3, 4, 2, 0, 44, 45, 3, 6, 3, 0, 45, 46, 5, 2, 0, 0, 46, 47, 5, 14, 0, 0, 47, 57, 1, 0, 0, 0, 48, 49, 3, 4, 2, 0, 49, 50, 3, 6, 3, 0, 50, 57, 1, 0, 0, 0, 51, 52, 3, 6, 3, 0, 52, 53, 5, 2, 0, 0, 53, 54, 5, 14, 0, 0, 54, 57, 1, 0, 0, 0, 55, 57, 3, 6, 3, 0, 56, 43, 1, 0, 0, 0, 56, 48, 1, 0, 0, 0, 56, 51, 1, 0, 0, 0, 56, 55, 1, 0, 0, 0, 57, 3, 1, 0, 0, 0, 58, 59, 3, 6, 3, 0, 59, 60, 3, 12, 6, 0, 60, 100, 1, 0, 0, 0, 61, 62, 3, 6, 3, 0, 62, 63, 3, 12, 6, 0, 63, 64, 3, 4, 2, 0, 64, 100, 1, 0, 0, 0, 65, 66, 5, 21, 0, 0, 66, 67, 3, 4, 2, 0, 67, 68, 5, 22, 0, 0, 68, 100, 1, 0, 0, 0, 69, 70, 3, 6, 3, 0, 70, 71, 3, 12, 6, 0, 71, 72, 5, 21, 0, 0, 72, 73, 3, 4, 2, 0, 73, 74, 5, 22, 0, 0, 74, 75, 3, 4, 2, 0, 75, 100, 1, 0, 0, 0, 76, 77, 3, 6, 3, 0, 77, 78, 3, 12, 6, 0, 78, 79, 5, 21, 0, 0, 79, 80, 3, 4, 2, 0, 80, 81, 5, 22, 0, 0, 81, 82, 5, 21, 0, 0, 82, 83, 3, 4, 2, 0, 83, 84, 5, 22, 0, 0, 84, 85, 3, 4, 2, 0, 85, 100, 1, 0, 0, 0, 86, 87, 3, 6, 3, 0, 87, 88, 3, 12, 6, 0, 88, 89, 5, 21, 0, 0, 89, 90, 3, 4, 2, 0, 90, 91, 5, 22, 0, 0, 91, 92, 5, 21, 0, 0, 92, 93, 3, 4, 2, 0, 93, 94, 5, 22, 0, 0, 94, 95, 5, 21, 0, 0, 95, 96, 3, 4, 2, 0, 96, 97, 5, 22, 0, 0, 97, 98, 3, 4, 2, 0, 98, 100, 1, 0, 0, 0, 99, 58, 1, 0, 0, 0, 99, 61, 1, 0, 0, 0, 99, 65, 1, 0, 0, 0, 99, 69, 1, 0, 0, 0, 99, 76, 1, 0, 0, 0, 99, 86, 1, 0, 0, 0, 100, 5, 1, 0, 0, 0, 101, 102, 3, 8, 4, 0, 102, 103, 5, 15, 0, 0, 103, 104, 5, 14, 0, 0, 104, 113, 1, 0, 0, 0, 105, 106, 3, 8, 4, 0, 106, 107, 5, 14, 0, 0, 107, 113, 1, 0, 0, 0, 108, 109, 3, 8, 4, 0, 109, 110, 5, 15, 0, 0, 110, 113, 1, 0, 0, 0, 111, 113, 3, 8, 4, 0, 112, 101, 1, 0, 0, 0, 112, 105, 1, 0, 0, 0, 112, 108, 1, 0, 0, 0, 112, 111, 1, 0, 0, 0, 113, 7, 1, 0, 0, 0, 114, 116, 3, 10, 5, 0, 115, 114, 1, 0, 0, 0, 116, 117, 1, 0, 0, 0, 117, 115, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 119, 1, 0, 0, 0, 119, 120, 5, 15, 0, 0, 120, 124, 5, 14, 0, 0, 121, 123, 3, 20, 10, 0, 122, 121, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 124, 125, 1, 0, 0, 0, 125, 231, 1, 0, 0, 0, 126, 124, 1, 0, 0, 0, 127, 129, 3, 10, 5, 0, 128, 127, 1, 0, 0, 0, 129, 130, 1, 0, 0, 0, 130, 128, 1, 0, 0, 0, 130, 131, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 136, 5, 14, 0, 0, 133, 135, 3, 20, 10, 0, 134, 133, 1, 0, 0, 0, 135, 138, 1, 0, 0, 0, 136, 134, 1, 0, 0, 0, 136, 137, 1, 0, 0, 0, 137, 231, 1, 0, 0, 0, 138, 136, 1, 0, 0, 0, 139, 141, 3, 10, 5, 0, 140, 139, 1, 0, 0, 0, 141, 142, 1, 0, 0, 0, 142, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 148, 5, 15, 0, 0, 145, 147, 3, 20, 10, 0, 146, 145, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 231, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 153, 3, 10, 5, 0, 152, 151, 1, 0, 0, 0, 153, 154, 1, 0, 0, 0, 154, 152, 1, 0, 0, 0, 154, 155, 1, 0, 0, 0, 155, 159, 1, 0, 0, 0, 156, 158, 3, 20, 10, 0, 157, 156, 1, 0, 0, 0, 158, 161, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 159, 160, 1, 0, 0, 0, 160, 231, 1, 0, 0, 0, 161, 159, 1, 0, 0, 0, 162, 164, 3, 20, 10, 0, 163, 162, 1, 0, 0, 0, 164, 165, 1, 0, 0, 0, 165, 163, 1, 0, 0, 0, 165, 166, 1, 0, 0, 0, 166, 168, 1, 0, 0, 0, 167, 169, 3, 10, 5, 0, 168, 167, 1, 0, 0, 0, 169, 170, 1, 0, 0, 0, 170, 168, 1, 0, 0, 0, 170, 171, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 173, 5, 15, 0, 0, 173, 177, 5, 14, 0, 0, 174, 176, 3, 20, 10, 0, 175, 174, 1, 0, 0, 0, 176, 179, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 231, 1, 0, 0, 0, 179, 177, 1, 0, 0, 0, 180, 182, 3, 20, 10, 0, 181, 180, 1, 0, 0, 0, 182, 183, 1, 0, 0, 0, 183, 181, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 186, 1, 0, 0, 0, 185, 187, 3, 10, 5, 0, 186, 185, 1, 0, 0, 0, 187, 188, 1, 0, 0, 0, 188, 186, 1, 0, 0, 0, 188, 189, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 194, 5, 14, 0, 0, 191, 193, 3, 20, 10, 0, 192, 191, 1, 0, 0, 0, 193, 196, 1, 0, 0, 0, 194, 192, 1, 0, 0, 0, 194, 195, 1, 0, 0, 0, 195, 231, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 197, 199, 3, 20, 10, 0, 198, 197, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 198, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 203, 1, 0, 0, 0, 202, 204, 3, 10, 5, 0, 203, 202, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 203, 1, 0, 0, 0, 205, 206, 1, 0, 0, 0, 206, 207, 1, 0, 0, 0, 207, 211, 5, 15, 0, 0, 208, 210, 3, 20, 10, 0, 209, 208, 1, 0, 0, 0, 210, 213, 1, 0, 0, 0, 211, 209, 1, 0, 0, 0, 211, 212, 1, 0, 0, 0, 212, 231, 1, 0, 0, 0, 213, 211, 1, 0, 0, 0, 214, 216, 3, 20, 10, 0, 215, 214, 1, 0, 0, 0, 216, 217, 1, 0, 0, 0, 217, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 220, 1, 0, 0, 0, 219, 221, 3, 10, 5, 0, 220, 219, 1, 0, 0, 0, 221, 222, 1, 0, 0, 0, 222, 220, 1, 0, 0, 0, 222, 223, 1, 0, 0, 0, 223, 227, 1, 0, 0, 0, 224, 226, 3, 20, 10, 0, 225, 224, 1, 0, 0, 0, 226, 229, 1, 0, 0, 0, 227, 225, 1, 0, 0, 0, 227, 228, 1, 0, 0, 0, 228, 231, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 230, 115, 1, 0, 0, 0, 230, 128, 1, 0, 0, 0, 230, 140, 1, 0, 0, 0, 230, 152, 1, 0, 0, 0, 230, 163, 1, 0, 0, 0, 230, 181, 1, 0, 0, 0, 230, 198, 1, 0, 0, 0, 230, 215, 1, 0, 0, 0, 231, 9, 1, 0, 0, 0, 232, 233, 7, 0, 0, 0, 233, 11, 1, 0, 0, 0, 234, 235, 5, 19, 0, 0, 235, 236, 3, 24, 12, 0, 236, 237, 5, 16, 0, 0, 237, 238, 5, 18, 0, 0, 238, 239, 3, 22, 11, 0, 239, 240, 5, 20, 0, 0, 240, 256, 1, 0, 0, 0, 241, 242, 5, 19, 0, 0, 242, 243, 5, 16, 0, 0, 243, 244, 5, 18, 0, 0, 244, 245, 3, 22, 11, 0, 245, 246, 5, 20, 0, 0, 246, 256, 1, 0, 0, 0, 247, 248, 3, 24, 12, 0, 248, 249, 5, 16, 0, 0, 249, 250, 5, 18, 0, 0, 250, 251, 3, 22, 11, 0, 251, 256, 1, 0, 0, 0, 252, 253, 3, 24, 12, 0, 253, 254, 5, 16, 0, 0, 254, 256, 1, 0, 0, 0, 255, 234, 1, 0, 0, 0, 255, 241, 1, 0, 0, 0, 255, 247, 1, 0, 0, 0, 255, 252, 1, 0, 0, 0, 256, 13, 1, 0, 0, 0, 257, 258, 5, 31, 0, 0, 258, 260, 5, 23, 0, 0, 259, 261, 3, 28, 14, 0, 260, 259, 1, 0, 0, 0, 260, 261, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 270, 5, 16, 0, 0, 263, 265, 5, 17, 0, 0, 264, 266, 3, 28, 14, 0, 265, 264, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 269, 5, 16, 0, 0, 268, 263, 1, 0, 0, 0, 269, 272, 1, 0, 0, 0, 270, 268, 1, 0, 0, 0, 270, 271, 1, 0, 0, 0, 271, 273, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 273, 286, 5, 24, 0, 0, 274, 275, 5, 27, 0, 0, 275, 276, 5, 23, 0, 0, 276, 281, 5, 16, 0, 0, 277, 278, 5, 17, 0, 0, 278, 280, 5, 16, 0, 0, 279, 277, 1, 0, 0, 0, 280, 283, 1, 0, 0, 0, 281, 279, 1, 0, 0, 0, 281, 282, 1, 0, 0, 0, 282, 284, 1, 0, 0, 0, 283, 281, 1, 0, 0, 0, 284, 286, 5, 24, 0, 0, 285, 257, 1, 0, 0, 0, 285, 274, 1, 0, 0, 0, 286, 15, 1, 0, 0, 0, 287, 291, 5, 13, 0, 0, 288, 291, 3, 26, 13, 0, 289, 291, 5, 8, 0, 0, 290, 287, 1, 0, 0, 0, 290, 288, 1, 0, 0, 0, 290, 289, 1, 0, 0, 0, 291, 17, 1, 0, 0, 0, 292, 294, 7, 1, 0, 0, 293, 292, 1, 0, 0, 0, 293, 294, 1, 0, 0, 0, 294, 295, 1, 0, 0, 0, 295, 296, 5, 4, 0, 0, 296, 300, 5, 16, 0, 0, 297, 299, 3, 14, 7, 0, 298, 297, 1, 0, 0, 0, 299, 302, 1, 0, 0, 0, 300, 298, 1, 0, 0, 0, 300, 301, 1, 0, 0, 0, 301, 19, 1, 0, 0, 0, 302, 300, 1, 0, 0, 0, 303, 304, 5, 16, 0, 0, 304, 306, 5, 17, 0, 0, 305, 303, 1, 0, 0, 0, 305, 306, 1, 0, 0, 0, 306, 307, 1, 0, 0, 0, 307, 308, 5, 16, 0, 0, 308, 309, 5, 18, 0, 0, 309, 310, 5, 9, 0, 0, 310, 347, 5, 18, 0, 0, 311, 312, 5, 16, 0, 0, 312, 313, 5, 18, 0, 0, 313, 314, 3, 26, 13, 0, 314, 315, 5, 18, 0, 0, 315, 316, 3, 16, 8, 0, 316, 317, 5, 18, 0, 0, 317, 347, 1, 0, 0, 0, 318, 320, 5, 18, 0, 0, 319, 318, 1, 0, 0, 0, 319, 320, 1, 0, 0, 0, 320, 322, 1, 0, 0, 0, 321, 323, 5, 16, 0, 0, 322, 321, 1, 0, 0, 0, 322, 323, 1, 0, 0, 0, 323, 327, 1, 0, 0, 0, 324, 326, 3, 26, 13, 0, 325, 324, 1, 0, 0, 0, 326, 329, 1, 0, 0, 0, 327, 325, 1, 0, 0, 0, 327, 328, 1, 0, 0, 0, 328, 330, 1, 0, 0, 0, 329, 327, 1, 0, 0, 0, 330, 347, 3, 16, 8, 0, 331, 339, 5, 16, 0, 0, 332, 333, 5, 17, 0, 0, 333, 335, 5, 16, 0, 0, 334, 332, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0, 336, 340, 5, 28, 0, 0, 337, 340, 5, 29, 0, 0, 338, 340, 3, 18, 9, 0, 339, 334, 1, 0, 0, 0, 339, 337, 1, 0, 0, 0, 339, 338, 1, 0, 0, 0, 340, 347, 1, 0, 0, 0, 341, 347, 5, 10, 0, 0, 342, 343, 5, 11, 0, 0, 343, 347, 5, 18, 0, 0, 344, 345, 5, 18, 0, 0, 345, 347, 5, 12, 0, 0, 346, 305, 1, 0, 0, 0, 346, 311, 1, 0, 0, 0, 346, 319, 1, 0, 0, 0, 346, 331, 1, 0, 0, 0, 346, 341, 1, 0, 0, 0, 346, 342, 1, 0, 0, 0, 346, 344, 1, 0, 0, 0, 347, 21, 1, 0, 0, 0, 348, 349, 7, 2, 0, 0, 349, 23, 1, 0, 0, 0, 350, 351, 7, 3, 0, 0, 351, 25, 1, 0, 0, 0, 352, 353, 7, 4, 0, 0, 353, 27, 1, 0, 0, 0, 354, 355, 7, 5, 0, 0, 355, 29, 1, 0, 0, 0, 41, 37, 56, 99, 112, 117, 124, 130, 136, 142, 148, 154, 159, 165, 170, 177, 183, 188, 194, 200, 205, 211, 217, 222, 227, 230, 255, 260, 265, 270, 281, 285, 290, 293, 300, 305, 319, 322, 327, 334, 339, 346] \ No newline at end of file +[4, 1, 33, 247, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 34, 8, 0, 10, 0, 12, 0, 37, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 55, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2,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9, 1, 9, 1, 9, 3, 9, 225, 8, 9, 1, 9, 1, 9, 1, 9, 3, 9, 230, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 237, 8, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 0, 0, 14, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 0, 6, 2, 0, 3, 3, 13, 13, 2, 0, 25, 26, 32, 32, 2, 0, 16, 16, 33, 33, 2, 0, 14, 14, 33, 33, 1, 0, 4, 7, 2, 0, 27, 27, 30, 30, 271, 0, 28, 1, 0, 0, 0, 2, 54, 1, 0, 0, 0, 4, 97, 1, 0, 0, 0, 6, 102, 1, 0, 0, 0, 8, 122, 1, 0, 0, 0, 10, 145, 1, 0, 0, 0, 12, 175, 1, 0, 0, 0, 14, 180, 1, 0, 0, 0, 16, 183, 1, 0, 0, 0, 18, 236, 1, 0, 0, 0, 20, 238, 1, 0, 0, 0, 22, 240, 1, 0, 0, 0, 24, 242, 1, 0, 0, 0, 26, 244, 1, 0, 0, 0, 28, 35, 5, 1, 0, 0, 29, 30, 5, 23, 0, 0, 30, 31, 3, 4, 2, 0, 31, 32, 5, 24, 0, 0, 32, 34, 1, 0, 0, 0, 33, 29, 1, 0, 0, 0, 34, 37, 1, 0, 0, 0, 35, 33, 1, 0, 0, 0, 35, 36, 1, 0, 0, 0, 36, 38, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 38, 39, 3, 2, 1, 0, 39, 40, 5, 1, 0, 0, 40, 1, 1, 0, 0, 0, 41, 42, 3, 4, 2, 0, 42, 43, 3, 6, 3, 0, 43, 44, 5, 2, 0, 0, 44, 45, 5, 14, 0, 0, 45, 55, 1, 0, 0, 0, 46, 47, 3, 4, 2, 0, 47, 48, 3, 6, 3, 0, 48, 55, 1, 0, 0, 0, 49, 50, 3, 6, 3, 0, 50, 51, 5, 2, 0, 0, 51, 52, 5, 14, 0, 0, 52, 55, 1, 0, 0, 0, 53, 55, 3, 6, 3, 0, 54, 41, 1, 0, 0, 0, 54, 46, 1, 0, 0, 0, 54, 49, 1, 0, 0, 0, 54, 53, 1, 0, 0, 0, 55, 3, 1, 0, 0, 0, 56, 57, 3, 6, 3, 0, 57, 58, 3, 10, 5, 0, 58, 98, 1, 0, 0, 0, 59, 60, 3, 6, 3, 0, 60, 61, 3, 10, 5, 0, 61, 62, 3, 4, 2, 0, 62, 98, 1, 0, 0, 0, 63, 64, 5, 21, 0, 0, 64, 65, 3, 4, 2, 0, 65, 66, 5, 22, 0, 0, 66, 98, 1, 0, 0, 0, 67, 68, 3, 6, 3, 0, 68, 69, 3, 10, 5, 0, 69, 70, 5, 21, 0, 0, 70, 71, 3, 4, 2, 0, 71, 72, 5, 22, 0, 0, 72, 73, 3, 4, 2, 0, 73, 98, 1, 0, 0, 0, 74, 75, 3, 6, 3, 0, 75, 76, 3, 10, 5, 0, 76, 77, 5, 21, 0, 0, 77, 78, 3, 4, 2, 0, 78, 79, 5, 22, 0, 0, 79, 80, 5, 21, 0, 0, 80, 81, 3, 4, 2, 0, 81, 82, 5, 22, 0, 0, 82, 83, 3, 4, 2, 0, 83, 98, 1, 0, 0, 0, 84, 85, 3, 6, 3, 0, 85, 86, 3, 10, 5, 0, 86, 87, 5, 21, 0, 0, 87, 88, 3, 4, 2, 0, 88, 89, 5, 22, 0, 0, 89, 90, 5, 21, 0, 0, 90, 91, 3, 4, 2, 0, 91, 92, 5, 22, 0, 0, 92, 93, 5, 21, 0, 0, 93, 94, 3, 4, 2, 0, 94, 95, 5, 22, 0, 0, 95, 96, 3, 4, 2, 0, 96, 98, 1, 0, 0, 0, 97, 56, 1, 0, 0, 0, 97, 59, 1, 0, 0, 0, 97, 63, 1, 0, 0, 0, 97, 67, 1, 0, 0, 0, 97, 74, 1, 0, 0, 0, 97, 84, 1, 0, 0, 0, 98, 5, 1, 0, 0, 0, 99, 101, 3, 18, 9, 0, 100, 99, 1, 0, 0, 0, 101, 104, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 107, 3, 8, 4, 0, 106, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 113, 1, 0, 0, 0, 110, 112, 3, 18, 9, 0, 111, 110, 1, 0, 0, 0, 112, 115, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 117, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 116, 118, 5, 15, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 120, 1, 0, 0, 0, 119, 121, 5, 14, 0, 0, 120, 119, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 7, 1, 0, 0, 0, 122, 123, 7, 0, 0, 0, 123, 9, 1, 0, 0, 0, 124, 125, 5, 19, 0, 0, 125, 126, 3, 22, 11, 0, 126, 127, 5, 16, 0, 0, 127, 128, 5, 18, 0, 0, 128, 129, 3, 20, 10, 0, 129, 130, 5, 20, 0, 0, 130, 146, 1, 0, 0, 0, 131, 132, 5, 19, 0, 0, 132, 133, 5, 16, 0, 0, 133, 134, 5, 18, 0, 0, 134, 135, 3, 20, 10, 0, 135, 136, 5, 20, 0, 0, 136, 146, 1, 0, 0, 0, 137, 138, 3, 22, 11, 0, 138, 139, 5, 16, 0, 0, 139, 140, 5, 18, 0, 0, 140, 141, 3, 20, 10, 0, 141, 146, 1, 0, 0, 0, 142, 143, 3, 22, 11, 0, 143, 144, 5, 16, 0, 0, 144, 146, 1, 0, 0, 0, 145, 124, 1, 0, 0, 0, 145, 131, 1, 0, 0, 0, 145, 137, 1, 0, 0, 0, 145, 142, 1, 0, 0, 0, 146, 11, 1, 0, 0, 0, 147, 148, 5, 31, 0, 0, 148, 150, 5, 23, 0, 0, 149, 151, 3, 26, 13, 0, 150, 149, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 160, 5, 16, 0, 0, 153, 155, 5, 17, 0, 0, 154, 156, 3, 26, 13, 0, 155, 154, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 159, 5, 16, 0, 0, 158, 153, 1, 0, 0, 0, 159, 162, 1, 0, 0, 0, 160, 158, 1, 0, 0, 0, 160, 161, 1, 0, 0, 0, 161, 163, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 163, 176, 5, 24, 0, 0, 164, 165, 5, 27, 0, 0, 165, 166, 5, 23, 0, 0, 166, 171, 5, 16, 0, 0, 167, 168, 5, 17, 0, 0, 168, 170, 5, 16, 0, 0, 169, 167, 1, 0, 0, 0, 170, 173, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 174, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 174, 176, 5, 24, 0, 0, 175, 147, 1, 0, 0, 0, 175, 164, 1, 0, 0, 0, 176, 13, 1, 0, 0, 0, 177, 181, 5, 13, 0, 0, 178, 181, 3, 24, 12, 0, 179, 181, 5, 8, 0, 0, 180, 177, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 179, 1, 0, 0, 0, 181, 15, 1, 0, 0, 0, 182, 184, 7, 1, 0, 0, 183, 182, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 185, 186, 5, 4, 0, 0, 186, 190, 5, 16, 0, 0, 187, 189, 3, 12, 6, 0, 188, 187, 1, 0, 0, 0, 189, 192, 1, 0, 0, 0, 190, 188, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 17, 1, 0, 0, 0, 192, 190, 1, 0, 0, 0, 193, 194, 5, 16, 0, 0, 194, 196, 5, 17, 0, 0, 195, 193, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 198, 5, 16, 0, 0, 198, 199, 5, 18, 0, 0, 199, 200, 5, 9, 0, 0, 200, 237, 5, 18, 0, 0, 201, 202, 5, 16, 0, 0, 202, 203, 5, 18, 0, 0, 203, 204, 3, 24, 12, 0, 204, 205, 5, 18, 0, 0, 205, 206, 3, 14, 7, 0, 206, 207, 5, 18, 0, 0, 207, 237, 1, 0, 0, 0, 208, 210, 5, 18, 0, 0, 209, 208, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 212, 1, 0, 0, 0, 211, 213, 5, 16, 0, 0, 212, 211, 1, 0, 0, 0, 212, 213, 1, 0, 0, 0, 213, 217, 1, 0, 0, 0, 214, 216, 3, 24, 12, 0, 215, 214, 1, 0, 0, 0, 216, 219, 1, 0, 0, 0, 217, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 220, 1, 0, 0, 0, 219, 217, 1, 0, 0, 0, 220, 237, 3, 14, 7, 0, 221, 229, 5, 16, 0, 0, 222, 223, 5, 17, 0, 0, 223, 225, 5, 16, 0, 0, 224, 222, 1, 0, 0, 0, 224, 225, 1, 0, 0, 0, 225, 226, 1, 0, 0, 0, 226, 230, 5, 28, 0, 0, 227, 230, 5, 29, 0, 0, 228, 230, 3, 16, 8, 0, 229, 224, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 237, 1, 0, 0, 0, 231, 237, 5, 10, 0, 0, 232, 233, 5, 11, 0, 0, 233, 237, 5, 18, 0, 0, 234, 235, 5, 18, 0, 0, 235, 237, 5, 12, 0, 0, 236, 195, 1, 0, 0, 0, 236, 201, 1, 0, 0, 0, 236, 209, 1, 0, 0, 0, 236, 221, 1, 0, 0, 0, 236, 231, 1, 0, 0, 0, 236, 232, 1, 0, 0, 0, 236, 234, 1, 0, 0, 0, 237, 19, 1, 0, 0, 0, 238, 239, 7, 2, 0, 0, 239, 21, 1, 0, 0, 0, 240, 241, 7, 3, 0, 0, 241, 23, 1, 0, 0, 0, 242, 243, 7, 4, 0, 0, 243, 25, 1, 0, 0, 0, 244, 245, 7, 5, 0, 0, 245, 27, 1, 0, 0, 0, 24, 35, 54, 97, 102, 108, 113, 117, 120, 145, 150, 155, 160, 171, 175, 180, 183, 190, 195, 209, 212, 217, 224, 229, 236] \ No newline at end of file diff --git a/glyles/grammar/GlycanListener.py b/glyles/grammar/GlycanListener.py index fa60470..31a0a2e 100644 --- a/glyles/grammar/GlycanListener.py +++ b/glyles/grammar/GlycanListener.py @@ -35,15 +35,6 @@ def exitBranch(self, ctx:GlycanParser.BranchContext): pass - # Enter a parse tree produced by GlycanParser#glycan. - def enterGlycan(self, ctx:GlycanParser.GlycanContext): - pass - - # Exit a parse tree produced by GlycanParser#glycan. - def exitGlycan(self, ctx:GlycanParser.GlycanContext): - pass - - # Enter a parse tree produced by GlycanParser#deriv. def enterDeriv(self, ctx:GlycanParser.DerivContext): pass diff --git a/glyles/grammar/GlycanParser.py b/glyles/grammar/GlycanParser.py index 62d1de4..553e6de 100644 --- a/glyles/grammar/GlycanParser.py +++ b/glyles/grammar/GlycanParser.py @@ -10,138 +10,93 @@ def serializedATN(): return [ - 4,1,33,357,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 4,1,33,247,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13, - 2,14,7,14,1,0,1,0,1,0,1,0,1,0,5,0,36,8,0,10,0,12,0,39,9,0,1,0,1, - 0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,57, - 8,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, - 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, - 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,100,8,2,1,3,1,3,1,3, - 1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,3,3,113,8,3,1,4,4,4,116,8,4,11,4, - 12,4,117,1,4,1,4,1,4,5,4,123,8,4,10,4,12,4,126,9,4,1,4,4,4,129,8, - 4,11,4,12,4,130,1,4,1,4,5,4,135,8,4,10,4,12,4,138,9,4,1,4,4,4,141, - 8,4,11,4,12,4,142,1,4,1,4,5,4,147,8,4,10,4,12,4,150,9,4,1,4,4,4, - 153,8,4,11,4,12,4,154,1,4,5,4,158,8,4,10,4,12,4,161,9,4,1,4,4,4, - 164,8,4,11,4,12,4,165,1,4,4,4,169,8,4,11,4,12,4,170,1,4,1,4,1,4, - 5,4,176,8,4,10,4,12,4,179,9,4,1,4,4,4,182,8,4,11,4,12,4,183,1,4, - 4,4,187,8,4,11,4,12,4,188,1,4,1,4,5,4,193,8,4,10,4,12,4,196,9,4, - 1,4,4,4,199,8,4,11,4,12,4,200,1,4,4,4,204,8,4,11,4,12,4,205,1,4, - 1,4,5,4,210,8,4,10,4,12,4,213,9,4,1,4,4,4,216,8,4,11,4,12,4,217, - 1,4,4,4,221,8,4,11,4,12,4,222,1,4,5,4,226,8,4,10,4,12,4,229,9,4, - 3,4,231,8,4,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6, - 1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,3,6,256,8,6,1,7,1,7,1,7, - 3,7,261,8,7,1,7,1,7,1,7,3,7,266,8,7,1,7,5,7,269,8,7,10,7,12,7,272, - 9,7,1,7,1,7,1,7,1,7,1,7,1,7,5,7,280,8,7,10,7,12,7,283,9,7,1,7,3, - 7,286,8,7,1,8,1,8,1,8,3,8,291,8,8,1,9,3,9,294,8,9,1,9,1,9,1,9,5, - 9,299,8,9,10,9,12,9,302,9,9,1,10,1,10,3,10,306,8,10,1,10,1,10,1, - 10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,320,8,10,1, - 10,3,10,323,8,10,1,10,5,10,326,8,10,10,10,12,10,329,9,10,1,10,1, - 10,1,10,1,10,3,10,335,8,10,1,10,1,10,1,10,3,10,340,8,10,1,10,1,10, - 1,10,1,10,1,10,3,10,347,8,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14, - 1,14,1,14,0,0,15,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,0,6,2,0, - 3,3,13,13,2,0,25,26,32,32,2,0,16,16,33,33,2,0,14,14,33,33,1,0,4, - 7,2,0,27,27,30,30,405,0,30,1,0,0,0,2,56,1,0,0,0,4,99,1,0,0,0,6,112, - 1,0,0,0,8,230,1,0,0,0,10,232,1,0,0,0,12,255,1,0,0,0,14,285,1,0,0, - 0,16,290,1,0,0,0,18,293,1,0,0,0,20,346,1,0,0,0,22,348,1,0,0,0,24, - 350,1,0,0,0,26,352,1,0,0,0,28,354,1,0,0,0,30,37,5,1,0,0,31,32,5, - 23,0,0,32,33,3,4,2,0,33,34,5,24,0,0,34,36,1,0,0,0,35,31,1,0,0,0, - 36,39,1,0,0,0,37,35,1,0,0,0,37,38,1,0,0,0,38,40,1,0,0,0,39,37,1, - 0,0,0,40,41,3,2,1,0,41,42,5,1,0,0,42,1,1,0,0,0,43,44,3,4,2,0,44, - 45,3,6,3,0,45,46,5,2,0,0,46,47,5,14,0,0,47,57,1,0,0,0,48,49,3,4, - 2,0,49,50,3,6,3,0,50,57,1,0,0,0,51,52,3,6,3,0,52,53,5,2,0,0,53,54, - 5,14,0,0,54,57,1,0,0,0,55,57,3,6,3,0,56,43,1,0,0,0,56,48,1,0,0,0, - 56,51,1,0,0,0,56,55,1,0,0,0,57,3,1,0,0,0,58,59,3,6,3,0,59,60,3,12, - 6,0,60,100,1,0,0,0,61,62,3,6,3,0,62,63,3,12,6,0,63,64,3,4,2,0,64, - 100,1,0,0,0,65,66,5,21,0,0,66,67,3,4,2,0,67,68,5,22,0,0,68,100,1, - 0,0,0,69,70,3,6,3,0,70,71,3,12,6,0,71,72,5,21,0,0,72,73,3,4,2,0, - 73,74,5,22,0,0,74,75,3,4,2,0,75,100,1,0,0,0,76,77,3,6,3,0,77,78, - 3,12,6,0,78,79,5,21,0,0,79,80,3,4,2,0,80,81,5,22,0,0,81,82,5,21, - 0,0,82,83,3,4,2,0,83,84,5,22,0,0,84,85,3,4,2,0,85,100,1,0,0,0,86, - 87,3,6,3,0,87,88,3,12,6,0,88,89,5,21,0,0,89,90,3,4,2,0,90,91,5,22, - 0,0,91,92,5,21,0,0,92,93,3,4,2,0,93,94,5,22,0,0,94,95,5,21,0,0,95, - 96,3,4,2,0,96,97,5,22,0,0,97,98,3,4,2,0,98,100,1,0,0,0,99,58,1,0, - 0,0,99,61,1,0,0,0,99,65,1,0,0,0,99,69,1,0,0,0,99,76,1,0,0,0,99,86, - 1,0,0,0,100,5,1,0,0,0,101,102,3,8,4,0,102,103,5,15,0,0,103,104,5, - 14,0,0,104,113,1,0,0,0,105,106,3,8,4,0,106,107,5,14,0,0,107,113, - 1,0,0,0,108,109,3,8,4,0,109,110,5,15,0,0,110,113,1,0,0,0,111,113, - 3,8,4,0,112,101,1,0,0,0,112,105,1,0,0,0,112,108,1,0,0,0,112,111, - 1,0,0,0,113,7,1,0,0,0,114,116,3,10,5,0,115,114,1,0,0,0,116,117,1, - 0,0,0,117,115,1,0,0,0,117,118,1,0,0,0,118,119,1,0,0,0,119,120,5, - 15,0,0,120,124,5,14,0,0,121,123,3,20,10,0,122,121,1,0,0,0,123,126, - 1,0,0,0,124,122,1,0,0,0,124,125,1,0,0,0,125,231,1,0,0,0,126,124, - 1,0,0,0,127,129,3,10,5,0,128,127,1,0,0,0,129,130,1,0,0,0,130,128, - 1,0,0,0,130,131,1,0,0,0,131,132,1,0,0,0,132,136,5,14,0,0,133,135, - 3,20,10,0,134,133,1,0,0,0,135,138,1,0,0,0,136,134,1,0,0,0,136,137, - 1,0,0,0,137,231,1,0,0,0,138,136,1,0,0,0,139,141,3,10,5,0,140,139, - 1,0,0,0,141,142,1,0,0,0,142,140,1,0,0,0,142,143,1,0,0,0,143,144, - 1,0,0,0,144,148,5,15,0,0,145,147,3,20,10,0,146,145,1,0,0,0,147,150, - 1,0,0,0,148,146,1,0,0,0,148,149,1,0,0,0,149,231,1,0,0,0,150,148, - 1,0,0,0,151,153,3,10,5,0,152,151,1,0,0,0,153,154,1,0,0,0,154,152, - 1,0,0,0,154,155,1,0,0,0,155,159,1,0,0,0,156,158,3,20,10,0,157,156, - 1,0,0,0,158,161,1,0,0,0,159,157,1,0,0,0,159,160,1,0,0,0,160,231, - 1,0,0,0,161,159,1,0,0,0,162,164,3,20,10,0,163,162,1,0,0,0,164,165, - 1,0,0,0,165,163,1,0,0,0,165,166,1,0,0,0,166,168,1,0,0,0,167,169, - 3,10,5,0,168,167,1,0,0,0,169,170,1,0,0,0,170,168,1,0,0,0,170,171, - 1,0,0,0,171,172,1,0,0,0,172,173,5,15,0,0,173,177,5,14,0,0,174,176, - 3,20,10,0,175,174,1,0,0,0,176,179,1,0,0,0,177,175,1,0,0,0,177,178, - 1,0,0,0,178,231,1,0,0,0,179,177,1,0,0,0,180,182,3,20,10,0,181,180, - 1,0,0,0,182,183,1,0,0,0,183,181,1,0,0,0,183,184,1,0,0,0,184,186, - 1,0,0,0,185,187,3,10,5,0,186,185,1,0,0,0,187,188,1,0,0,0,188,186, - 1,0,0,0,188,189,1,0,0,0,189,190,1,0,0,0,190,194,5,14,0,0,191,193, - 3,20,10,0,192,191,1,0,0,0,193,196,1,0,0,0,194,192,1,0,0,0,194,195, - 1,0,0,0,195,231,1,0,0,0,196,194,1,0,0,0,197,199,3,20,10,0,198,197, - 1,0,0,0,199,200,1,0,0,0,200,198,1,0,0,0,200,201,1,0,0,0,201,203, - 1,0,0,0,202,204,3,10,5,0,203,202,1,0,0,0,204,205,1,0,0,0,205,203, - 1,0,0,0,205,206,1,0,0,0,206,207,1,0,0,0,207,211,5,15,0,0,208,210, - 3,20,10,0,209,208,1,0,0,0,210,213,1,0,0,0,211,209,1,0,0,0,211,212, - 1,0,0,0,212,231,1,0,0,0,213,211,1,0,0,0,214,216,3,20,10,0,215,214, - 1,0,0,0,216,217,1,0,0,0,217,215,1,0,0,0,217,218,1,0,0,0,218,220, - 1,0,0,0,219,221,3,10,5,0,220,219,1,0,0,0,221,222,1,0,0,0,222,220, - 1,0,0,0,222,223,1,0,0,0,223,227,1,0,0,0,224,226,3,20,10,0,225,224, - 1,0,0,0,226,229,1,0,0,0,227,225,1,0,0,0,227,228,1,0,0,0,228,231, - 1,0,0,0,229,227,1,0,0,0,230,115,1,0,0,0,230,128,1,0,0,0,230,140, - 1,0,0,0,230,152,1,0,0,0,230,163,1,0,0,0,230,181,1,0,0,0,230,198, - 1,0,0,0,230,215,1,0,0,0,231,9,1,0,0,0,232,233,7,0,0,0,233,11,1,0, - 0,0,234,235,5,19,0,0,235,236,3,24,12,0,236,237,5,16,0,0,237,238, - 5,18,0,0,238,239,3,22,11,0,239,240,5,20,0,0,240,256,1,0,0,0,241, - 242,5,19,0,0,242,243,5,16,0,0,243,244,5,18,0,0,244,245,3,22,11,0, - 245,246,5,20,0,0,246,256,1,0,0,0,247,248,3,24,12,0,248,249,5,16, - 0,0,249,250,5,18,0,0,250,251,3,22,11,0,251,256,1,0,0,0,252,253,3, - 24,12,0,253,254,5,16,0,0,254,256,1,0,0,0,255,234,1,0,0,0,255,241, - 1,0,0,0,255,247,1,0,0,0,255,252,1,0,0,0,256,13,1,0,0,0,257,258,5, - 31,0,0,258,260,5,23,0,0,259,261,3,28,14,0,260,259,1,0,0,0,260,261, - 1,0,0,0,261,262,1,0,0,0,262,270,5,16,0,0,263,265,5,17,0,0,264,266, - 3,28,14,0,265,264,1,0,0,0,265,266,1,0,0,0,266,267,1,0,0,0,267,269, - 5,16,0,0,268,263,1,0,0,0,269,272,1,0,0,0,270,268,1,0,0,0,270,271, - 1,0,0,0,271,273,1,0,0,0,272,270,1,0,0,0,273,286,5,24,0,0,274,275, - 5,27,0,0,275,276,5,23,0,0,276,281,5,16,0,0,277,278,5,17,0,0,278, - 280,5,16,0,0,279,277,1,0,0,0,280,283,1,0,0,0,281,279,1,0,0,0,281, - 282,1,0,0,0,282,284,1,0,0,0,283,281,1,0,0,0,284,286,5,24,0,0,285, - 257,1,0,0,0,285,274,1,0,0,0,286,15,1,0,0,0,287,291,5,13,0,0,288, - 291,3,26,13,0,289,291,5,8,0,0,290,287,1,0,0,0,290,288,1,0,0,0,290, - 289,1,0,0,0,291,17,1,0,0,0,292,294,7,1,0,0,293,292,1,0,0,0,293,294, - 1,0,0,0,294,295,1,0,0,0,295,296,5,4,0,0,296,300,5,16,0,0,297,299, - 3,14,7,0,298,297,1,0,0,0,299,302,1,0,0,0,300,298,1,0,0,0,300,301, - 1,0,0,0,301,19,1,0,0,0,302,300,1,0,0,0,303,304,5,16,0,0,304,306, - 5,17,0,0,305,303,1,0,0,0,305,306,1,0,0,0,306,307,1,0,0,0,307,308, - 5,16,0,0,308,309,5,18,0,0,309,310,5,9,0,0,310,347,5,18,0,0,311,312, - 5,16,0,0,312,313,5,18,0,0,313,314,3,26,13,0,314,315,5,18,0,0,315, - 316,3,16,8,0,316,317,5,18,0,0,317,347,1,0,0,0,318,320,5,18,0,0,319, - 318,1,0,0,0,319,320,1,0,0,0,320,322,1,0,0,0,321,323,5,16,0,0,322, - 321,1,0,0,0,322,323,1,0,0,0,323,327,1,0,0,0,324,326,3,26,13,0,325, - 324,1,0,0,0,326,329,1,0,0,0,327,325,1,0,0,0,327,328,1,0,0,0,328, - 330,1,0,0,0,329,327,1,0,0,0,330,347,3,16,8,0,331,339,5,16,0,0,332, - 333,5,17,0,0,333,335,5,16,0,0,334,332,1,0,0,0,334,335,1,0,0,0,335, - 336,1,0,0,0,336,340,5,28,0,0,337,340,5,29,0,0,338,340,3,18,9,0,339, - 334,1,0,0,0,339,337,1,0,0,0,339,338,1,0,0,0,340,347,1,0,0,0,341, - 347,5,10,0,0,342,343,5,11,0,0,343,347,5,18,0,0,344,345,5,18,0,0, - 345,347,5,12,0,0,346,305,1,0,0,0,346,311,1,0,0,0,346,319,1,0,0,0, - 346,331,1,0,0,0,346,341,1,0,0,0,346,342,1,0,0,0,346,344,1,0,0,0, - 347,21,1,0,0,0,348,349,7,2,0,0,349,23,1,0,0,0,350,351,7,3,0,0,351, - 25,1,0,0,0,352,353,7,4,0,0,353,27,1,0,0,0,354,355,7,5,0,0,355,29, - 1,0,0,0,41,37,56,99,112,117,124,130,136,142,148,154,159,165,170, - 177,183,188,194,200,205,211,217,222,227,230,255,260,265,270,281, - 285,290,293,300,305,319,322,327,334,339,346 + 1,0,1,0,1,0,1,0,1,0,5,0,34,8,0,10,0,12,0,37,9,0,1,0,1,0,1,0,1,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,55,8,1,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, + 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,98,8,2,1,3,5,3,101,8,3,10,3,12, + 3,104,9,3,1,3,4,3,107,8,3,11,3,12,3,108,1,3,5,3,112,8,3,10,3,12, + 3,115,9,3,1,3,3,3,118,8,3,1,3,3,3,121,8,3,1,4,1,4,1,5,1,5,1,5,1, + 5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1, + 5,1,5,3,5,146,8,5,1,6,1,6,1,6,3,6,151,8,6,1,6,1,6,1,6,3,6,156,8, + 6,1,6,5,6,159,8,6,10,6,12,6,162,9,6,1,6,1,6,1,6,1,6,1,6,1,6,5,6, + 170,8,6,10,6,12,6,173,9,6,1,6,3,6,176,8,6,1,7,1,7,1,7,3,7,181,8, + 7,1,8,3,8,184,8,8,1,8,1,8,1,8,5,8,189,8,8,10,8,12,8,192,9,8,1,9, + 1,9,3,9,196,8,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9, + 3,9,210,8,9,1,9,3,9,213,8,9,1,9,5,9,216,8,9,10,9,12,9,219,9,9,1, + 9,1,9,1,9,1,9,3,9,225,8,9,1,9,1,9,1,9,3,9,230,8,9,1,9,1,9,1,9,1, + 9,1,9,3,9,237,8,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,13,0, + 0,14,0,2,4,6,8,10,12,14,16,18,20,22,24,26,0,6,2,0,3,3,13,13,2,0, + 25,26,32,32,2,0,16,16,33,33,2,0,14,14,33,33,1,0,4,7,2,0,27,27,30, + 30,271,0,28,1,0,0,0,2,54,1,0,0,0,4,97,1,0,0,0,6,102,1,0,0,0,8,122, + 1,0,0,0,10,145,1,0,0,0,12,175,1,0,0,0,14,180,1,0,0,0,16,183,1,0, + 0,0,18,236,1,0,0,0,20,238,1,0,0,0,22,240,1,0,0,0,24,242,1,0,0,0, + 26,244,1,0,0,0,28,35,5,1,0,0,29,30,5,23,0,0,30,31,3,4,2,0,31,32, + 5,24,0,0,32,34,1,0,0,0,33,29,1,0,0,0,34,37,1,0,0,0,35,33,1,0,0,0, + 35,36,1,0,0,0,36,38,1,0,0,0,37,35,1,0,0,0,38,39,3,2,1,0,39,40,5, + 1,0,0,40,1,1,0,0,0,41,42,3,4,2,0,42,43,3,6,3,0,43,44,5,2,0,0,44, + 45,5,14,0,0,45,55,1,0,0,0,46,47,3,4,2,0,47,48,3,6,3,0,48,55,1,0, + 0,0,49,50,3,6,3,0,50,51,5,2,0,0,51,52,5,14,0,0,52,55,1,0,0,0,53, + 55,3,6,3,0,54,41,1,0,0,0,54,46,1,0,0,0,54,49,1,0,0,0,54,53,1,0,0, + 0,55,3,1,0,0,0,56,57,3,6,3,0,57,58,3,10,5,0,58,98,1,0,0,0,59,60, + 3,6,3,0,60,61,3,10,5,0,61,62,3,4,2,0,62,98,1,0,0,0,63,64,5,21,0, + 0,64,65,3,4,2,0,65,66,5,22,0,0,66,98,1,0,0,0,67,68,3,6,3,0,68,69, + 3,10,5,0,69,70,5,21,0,0,70,71,3,4,2,0,71,72,5,22,0,0,72,73,3,4,2, + 0,73,98,1,0,0,0,74,75,3,6,3,0,75,76,3,10,5,0,76,77,5,21,0,0,77,78, + 3,4,2,0,78,79,5,22,0,0,79,80,5,21,0,0,80,81,3,4,2,0,81,82,5,22,0, + 0,82,83,3,4,2,0,83,98,1,0,0,0,84,85,3,6,3,0,85,86,3,10,5,0,86,87, + 5,21,0,0,87,88,3,4,2,0,88,89,5,22,0,0,89,90,5,21,0,0,90,91,3,4,2, + 0,91,92,5,22,0,0,92,93,5,21,0,0,93,94,3,4,2,0,94,95,5,22,0,0,95, + 96,3,4,2,0,96,98,1,0,0,0,97,56,1,0,0,0,97,59,1,0,0,0,97,63,1,0,0, + 0,97,67,1,0,0,0,97,74,1,0,0,0,97,84,1,0,0,0,98,5,1,0,0,0,99,101, + 3,18,9,0,100,99,1,0,0,0,101,104,1,0,0,0,102,100,1,0,0,0,102,103, + 1,0,0,0,103,106,1,0,0,0,104,102,1,0,0,0,105,107,3,8,4,0,106,105, + 1,0,0,0,107,108,1,0,0,0,108,106,1,0,0,0,108,109,1,0,0,0,109,113, + 1,0,0,0,110,112,3,18,9,0,111,110,1,0,0,0,112,115,1,0,0,0,113,111, + 1,0,0,0,113,114,1,0,0,0,114,117,1,0,0,0,115,113,1,0,0,0,116,118, + 5,15,0,0,117,116,1,0,0,0,117,118,1,0,0,0,118,120,1,0,0,0,119,121, + 5,14,0,0,120,119,1,0,0,0,120,121,1,0,0,0,121,7,1,0,0,0,122,123,7, + 0,0,0,123,9,1,0,0,0,124,125,5,19,0,0,125,126,3,22,11,0,126,127,5, + 16,0,0,127,128,5,18,0,0,128,129,3,20,10,0,129,130,5,20,0,0,130,146, + 1,0,0,0,131,132,5,19,0,0,132,133,5,16,0,0,133,134,5,18,0,0,134,135, + 3,20,10,0,135,136,5,20,0,0,136,146,1,0,0,0,137,138,3,22,11,0,138, + 139,5,16,0,0,139,140,5,18,0,0,140,141,3,20,10,0,141,146,1,0,0,0, + 142,143,3,22,11,0,143,144,5,16,0,0,144,146,1,0,0,0,145,124,1,0,0, + 0,145,131,1,0,0,0,145,137,1,0,0,0,145,142,1,0,0,0,146,11,1,0,0,0, + 147,148,5,31,0,0,148,150,5,23,0,0,149,151,3,26,13,0,150,149,1,0, + 0,0,150,151,1,0,0,0,151,152,1,0,0,0,152,160,5,16,0,0,153,155,5,17, + 0,0,154,156,3,26,13,0,155,154,1,0,0,0,155,156,1,0,0,0,156,157,1, + 0,0,0,157,159,5,16,0,0,158,153,1,0,0,0,159,162,1,0,0,0,160,158,1, + 0,0,0,160,161,1,0,0,0,161,163,1,0,0,0,162,160,1,0,0,0,163,176,5, + 24,0,0,164,165,5,27,0,0,165,166,5,23,0,0,166,171,5,16,0,0,167,168, + 5,17,0,0,168,170,5,16,0,0,169,167,1,0,0,0,170,173,1,0,0,0,171,169, + 1,0,0,0,171,172,1,0,0,0,172,174,1,0,0,0,173,171,1,0,0,0,174,176, + 5,24,0,0,175,147,1,0,0,0,175,164,1,0,0,0,176,13,1,0,0,0,177,181, + 5,13,0,0,178,181,3,24,12,0,179,181,5,8,0,0,180,177,1,0,0,0,180,178, + 1,0,0,0,180,179,1,0,0,0,181,15,1,0,0,0,182,184,7,1,0,0,183,182,1, + 0,0,0,183,184,1,0,0,0,184,185,1,0,0,0,185,186,5,4,0,0,186,190,5, + 16,0,0,187,189,3,12,6,0,188,187,1,0,0,0,189,192,1,0,0,0,190,188, + 1,0,0,0,190,191,1,0,0,0,191,17,1,0,0,0,192,190,1,0,0,0,193,194,5, + 16,0,0,194,196,5,17,0,0,195,193,1,0,0,0,195,196,1,0,0,0,196,197, + 1,0,0,0,197,198,5,16,0,0,198,199,5,18,0,0,199,200,5,9,0,0,200,237, + 5,18,0,0,201,202,5,16,0,0,202,203,5,18,0,0,203,204,3,24,12,0,204, + 205,5,18,0,0,205,206,3,14,7,0,206,207,5,18,0,0,207,237,1,0,0,0,208, + 210,5,18,0,0,209,208,1,0,0,0,209,210,1,0,0,0,210,212,1,0,0,0,211, + 213,5,16,0,0,212,211,1,0,0,0,212,213,1,0,0,0,213,217,1,0,0,0,214, + 216,3,24,12,0,215,214,1,0,0,0,216,219,1,0,0,0,217,215,1,0,0,0,217, + 218,1,0,0,0,218,220,1,0,0,0,219,217,1,0,0,0,220,237,3,14,7,0,221, + 229,5,16,0,0,222,223,5,17,0,0,223,225,5,16,0,0,224,222,1,0,0,0,224, + 225,1,0,0,0,225,226,1,0,0,0,226,230,5,28,0,0,227,230,5,29,0,0,228, + 230,3,16,8,0,229,224,1,0,0,0,229,227,1,0,0,0,229,228,1,0,0,0,230, + 237,1,0,0,0,231,237,5,10,0,0,232,233,5,11,0,0,233,237,5,18,0,0,234, + 235,5,18,0,0,235,237,5,12,0,0,236,195,1,0,0,0,236,201,1,0,0,0,236, + 209,1,0,0,0,236,221,1,0,0,0,236,231,1,0,0,0,236,232,1,0,0,0,236, + 234,1,0,0,0,237,19,1,0,0,0,238,239,7,2,0,0,239,21,1,0,0,0,240,241, + 7,3,0,0,241,23,1,0,0,0,242,243,7,4,0,0,243,25,1,0,0,0,244,245,7, + 5,0,0,245,27,1,0,0,0,24,35,54,97,102,108,113,117,120,145,150,155, + 160,171,175,180,183,190,195,209,212,217,224,229,236 ] class GlycanParser ( Parser ): @@ -171,22 +126,20 @@ class GlycanParser ( Parser ): RULE_start = 0 RULE_begin = 1 RULE_branch = 2 - RULE_glycan = 3 - RULE_deriv = 4 - RULE_saci = 5 - RULE_con = 6 - RULE_add = 7 - RULE_fgi = 8 - RULE_carb = 9 - RULE_modi = 10 - RULE_qnum = 11 - RULE_typi = 12 - RULE_bridge = 13 - RULE_ct = 14 - - ruleNames = [ "start", "begin", "branch", "glycan", "deriv", "saci", - "con", "add", "fgi", "carb", "modi", "qnum", "typi", - "bridge", "ct" ] + RULE_deriv = 3 + RULE_saci = 4 + RULE_con = 5 + RULE_add = 6 + RULE_fgi = 7 + RULE_carb = 8 + RULE_modi = 9 + RULE_qnum = 10 + RULE_typi = 11 + RULE_bridge = 12 + RULE_ct = 13 + + ruleNames = [ "start", "begin", "branch", "deriv", "saci", "con", "add", + "fgi", "carb", "modi", "qnum", "typi", "bridge", "ct" ] EOF = Token.EOF T__0=1 @@ -283,25 +236,25 @@ def start(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 30 + self.state = 28 self.match(GlycanParser.T__0) - self.state = 37 + self.state = 35 self._errHandler.sync(self) _la = self._input.LA(1) while _la==23: - self.state = 31 + self.state = 29 self.match(GlycanParser.LBRACK) - self.state = 32 + self.state = 30 self.branch() - self.state = 33 + self.state = 31 self.match(GlycanParser.RBRACK) - self.state = 39 + self.state = 37 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 40 + self.state = 38 self.begin() - self.state = 41 + self.state = 39 self.match(GlycanParser.T__0) except RecognitionException as re: localctx.exception = re @@ -323,8 +276,8 @@ def branch(self): return self.getTypedRuleContext(GlycanParser.BranchContext,0) - def glycan(self): - return self.getTypedRuleContext(GlycanParser.GlycanContext,0) + def deriv(self): + return self.getTypedRuleContext(GlycanParser.DerivContext,0) def TYPE(self): @@ -349,43 +302,43 @@ def begin(self): localctx = GlycanParser.BeginContext(self, self._ctx, self.state) self.enterRule(localctx, 2, self.RULE_begin) try: - self.state = 56 + self.state = 54 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,1,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 43 + self.state = 41 self.branch() - self.state = 44 - self.glycan() - self.state = 45 + self.state = 42 + self.deriv() + self.state = 43 self.match(GlycanParser.T__1) - self.state = 46 + self.state = 44 self.match(GlycanParser.TYPE) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 48 + self.state = 46 self.branch() - self.state = 49 - self.glycan() + self.state = 47 + self.deriv() pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 51 - self.glycan() - self.state = 52 + self.state = 49 + self.deriv() + self.state = 50 self.match(GlycanParser.T__1) - self.state = 53 + self.state = 51 self.match(GlycanParser.TYPE) pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 55 - self.glycan() + self.state = 53 + self.deriv() pass @@ -405,8 +358,8 @@ def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser - def glycan(self): - return self.getTypedRuleContext(GlycanParser.GlycanContext,0) + def deriv(self): + return self.getTypedRuleContext(GlycanParser.DerivContext,0) def con(self): @@ -451,100 +404,100 @@ def branch(self): localctx = GlycanParser.BranchContext(self, self._ctx, self.state) self.enterRule(localctx, 4, self.RULE_branch) try: - self.state = 99 + self.state = 97 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,2,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 58 - self.glycan() - self.state = 59 + self.state = 56 + self.deriv() + self.state = 57 self.con() pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 61 - self.glycan() - self.state = 62 + self.state = 59 + self.deriv() + self.state = 60 self.con() - self.state = 63 + self.state = 61 self.branch() pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 65 + self.state = 63 self.match(GlycanParser.LBRACE) - self.state = 66 + self.state = 64 self.branch() - self.state = 67 + self.state = 65 self.match(GlycanParser.RBRACE) pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 69 - self.glycan() - self.state = 70 + self.state = 67 + self.deriv() + self.state = 68 self.con() - self.state = 71 + self.state = 69 self.match(GlycanParser.LBRACE) - self.state = 72 + self.state = 70 self.branch() - self.state = 73 + self.state = 71 self.match(GlycanParser.RBRACE) - self.state = 74 + self.state = 72 self.branch() pass elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 76 - self.glycan() - self.state = 77 + self.state = 74 + self.deriv() + self.state = 75 self.con() - self.state = 78 + self.state = 76 self.match(GlycanParser.LBRACE) - self.state = 79 + self.state = 77 self.branch() - self.state = 80 + self.state = 78 self.match(GlycanParser.RBRACE) - self.state = 81 + self.state = 79 self.match(GlycanParser.LBRACE) - self.state = 82 + self.state = 80 self.branch() - self.state = 83 + self.state = 81 self.match(GlycanParser.RBRACE) - self.state = 84 + self.state = 82 self.branch() pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 86 - self.glycan() - self.state = 87 + self.state = 84 + self.deriv() + self.state = 85 self.con() - self.state = 88 + self.state = 86 self.match(GlycanParser.LBRACE) - self.state = 89 + self.state = 87 self.branch() - self.state = 90 + self.state = 88 self.match(GlycanParser.RBRACE) - self.state = 91 + self.state = 89 self.match(GlycanParser.LBRACE) - self.state = 92 + self.state = 90 self.branch() - self.state = 93 + self.state = 91 self.match(GlycanParser.RBRACE) - self.state = 94 + self.state = 92 self.match(GlycanParser.LBRACE) - self.state = 95 + self.state = 93 self.branch() - self.state = 96 + self.state = 94 self.match(GlycanParser.RBRACE) - self.state = 97 + self.state = 95 self.branch() pass @@ -558,87 +511,6 @@ def branch(self): return localctx - class GlycanContext(ParserRuleContext): - __slots__ = 'parser' - - def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): - super().__init__(parent, invokingState) - self.parser = parser - - def deriv(self): - return self.getTypedRuleContext(GlycanParser.DerivContext,0) - - - def RING(self): - return self.getToken(GlycanParser.RING, 0) - - def TYPE(self): - return self.getToken(GlycanParser.TYPE, 0) - - def getRuleIndex(self): - return GlycanParser.RULE_glycan - - def enterRule(self, listener:ParseTreeListener): - if hasattr( listener, "enterGlycan" ): - listener.enterGlycan(self) - - def exitRule(self, listener:ParseTreeListener): - if hasattr( listener, "exitGlycan" ): - listener.exitGlycan(self) - - - - - def glycan(self): - - localctx = GlycanParser.GlycanContext(self, self._ctx, self.state) - self.enterRule(localctx, 6, self.RULE_glycan) - try: - self.state = 112 - self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,3,self._ctx) - if la_ == 1: - self.enterOuterAlt(localctx, 1) - self.state = 101 - self.deriv() - self.state = 102 - self.match(GlycanParser.RING) - self.state = 103 - self.match(GlycanParser.TYPE) - pass - - elif la_ == 2: - self.enterOuterAlt(localctx, 2) - self.state = 105 - self.deriv() - self.state = 106 - self.match(GlycanParser.TYPE) - pass - - elif la_ == 3: - self.enterOuterAlt(localctx, 3) - self.state = 108 - self.deriv() - self.state = 109 - self.match(GlycanParser.RING) - pass - - elif la_ == 4: - self.enterOuterAlt(localctx, 4) - self.state = 111 - self.deriv() - pass - - - except RecognitionException as re: - localctx.exception = re - self._errHandler.reportError(self, re) - self._errHandler.recover(self, re) - finally: - self.exitRule() - return localctx - - class DerivContext(ParserRuleContext): __slots__ = 'parser' @@ -646,11 +518,12 @@ def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser - def RING(self): - return self.getToken(GlycanParser.RING, 0) + def modi(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(GlycanParser.ModiContext) + else: + return self.getTypedRuleContext(GlycanParser.ModiContext,i) - def TYPE(self): - return self.getToken(GlycanParser.TYPE, 0) def saci(self, i:int=None): if i is None: @@ -659,12 +532,11 @@ def saci(self, i:int=None): return self.getTypedRuleContext(GlycanParser.SaciContext,i) - def modi(self, i:int=None): - if i is None: - return self.getTypedRuleContexts(GlycanParser.ModiContext) - else: - return self.getTypedRuleContext(GlycanParser.ModiContext,i) + def RING(self): + return self.getToken(GlycanParser.RING, 0) + def TYPE(self): + return self.getToken(GlycanParser.TYPE, 0) def getRuleIndex(self): return GlycanParser.RULE_deriv @@ -683,295 +555,59 @@ def exitRule(self, listener:ParseTreeListener): def deriv(self): localctx = GlycanParser.DerivContext(self, self._ctx, self.state) - self.enterRule(localctx, 8, self.RULE_deriv) + self.enterRule(localctx, 6, self.RULE_deriv) self._la = 0 # Token type try: - self.state = 230 + self.enterOuterAlt(localctx, 1) + self.state = 102 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,24,self._ctx) - if la_ == 1: - self.enterOuterAlt(localctx, 1) - self.state = 115 + _alt = self._interp.adaptivePredict(self._input,3,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 99 + self.modi() + self.state = 104 self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 114 - self.saci() - self.state = 117 - self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==3 or _la==13): - break + _alt = self._interp.adaptivePredict(self._input,3,self._ctx) - self.state = 119 - self.match(GlycanParser.RING) - self.state = 120 - self.match(GlycanParser.TYPE) - self.state = 124 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 121 - self.modi() - self.state = 126 - self._errHandler.sync(self) - _la = self._input.LA(1) - - pass - - elif la_ == 2: - self.enterOuterAlt(localctx, 2) - self.state = 128 - self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 127 + self.state = 106 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 105 self.saci() - self.state = 130 - self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==3 or _la==13): - break - - self.state = 132 - self.match(GlycanParser.TYPE) - self.state = 136 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 133 - self.modi() - self.state = 138 - self._errHandler.sync(self) - _la = self._input.LA(1) - - pass - elif la_ == 3: - self.enterOuterAlt(localctx, 3) - self.state = 140 - self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 139 - self.saci() - self.state = 142 - self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==3 or _la==13): - break - - self.state = 144 - self.match(GlycanParser.RING) - self.state = 148 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 145 - self.modi() - self.state = 150 - self._errHandler.sync(self) - _la = self._input.LA(1) - - pass - - elif la_ == 4: - self.enterOuterAlt(localctx, 4) - self.state = 152 - self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 151 - self.saci() - - else: - raise NoViableAltException(self) - self.state = 154 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,10,self._ctx) - - self.state = 159 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 156 - self.modi() - self.state = 161 - self._errHandler.sync(self) - _la = self._input.LA(1) - - pass - - elif la_ == 5: - self.enterOuterAlt(localctx, 5) - self.state = 163 + else: + raise NoViableAltException(self) + self.state = 108 self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 162 - self.modi() - - else: - raise NoViableAltException(self) - self.state = 165 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,12,self._ctx) + _alt = self._interp.adaptivePredict(self._input,4,self._ctx) - self.state = 168 + self.state = 113 + self._errHandler.sync(self) + _la = self._input.LA(1) + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 110 + self.modi() + self.state = 115 self._errHandler.sync(self) _la = self._input.LA(1) - while True: - self.state = 167 - self.saci() - self.state = 170 - self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==3 or _la==13): - break - self.state = 172 + self.state = 117 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==15: + self.state = 116 self.match(GlycanParser.RING) - self.state = 173 - self.match(GlycanParser.TYPE) - self.state = 177 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 174 - self.modi() - self.state = 179 - self._errHandler.sync(self) - _la = self._input.LA(1) - pass - - elif la_ == 6: - self.enterOuterAlt(localctx, 6) - self.state = 181 - self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 180 - self.modi() - else: - raise NoViableAltException(self) - self.state = 183 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,15,self._ctx) - - self.state = 186 - self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 185 - self.saci() - self.state = 188 - self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==3 or _la==13): - break - - self.state = 190 + self.state = 120 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,7,self._ctx) + if la_ == 1: + self.state = 119 self.match(GlycanParser.TYPE) - self.state = 194 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 191 - self.modi() - self.state = 196 - self._errHandler.sync(self) - _la = self._input.LA(1) - - pass - - elif la_ == 7: - self.enterOuterAlt(localctx, 7) - self.state = 198 - self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 197 - self.modi() - - else: - raise NoViableAltException(self) - self.state = 200 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,18,self._ctx) - - self.state = 203 - self._errHandler.sync(self) - _la = self._input.LA(1) - while True: - self.state = 202 - self.saci() - self.state = 205 - self._errHandler.sync(self) - _la = self._input.LA(1) - if not (_la==3 or _la==13): - break - - self.state = 207 - self.match(GlycanParser.RING) - self.state = 211 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 208 - self.modi() - self.state = 213 - self._errHandler.sync(self) - _la = self._input.LA(1) - - pass - - elif la_ == 8: - self.enterOuterAlt(localctx, 8) - self.state = 215 - self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 214 - self.modi() - - else: - raise NoViableAltException(self) - self.state = 217 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,21,self._ctx) - - self.state = 220 - self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 219 - self.saci() - - else: - raise NoViableAltException(self) - self.state = 222 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,22,self._ctx) - - self.state = 227 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 224 - self.modi() - self.state = 229 - self._errHandler.sync(self) - _la = self._input.LA(1) - - pass except RecognitionException as re: @@ -1013,11 +649,11 @@ def exitRule(self, listener:ParseTreeListener): def saci(self): localctx = GlycanParser.SaciContext(self, self._ctx, self.state) - self.enterRule(localctx, 10, self.RULE_saci) + self.enterRule(localctx, 8, self.RULE_saci) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 232 + self.state = 122 _la = self._input.LA(1) if not(_la==3 or _la==13): self._errHandler.recoverInline(self) @@ -1077,58 +713,58 @@ def exitRule(self, listener:ParseTreeListener): def con(self): localctx = GlycanParser.ConContext(self, self._ctx, self.state) - self.enterRule(localctx, 12, self.RULE_con) + self.enterRule(localctx, 10, self.RULE_con) try: - self.state = 255 + self.state = 145 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,25,self._ctx) + la_ = self._interp.adaptivePredict(self._input,8,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 234 + self.state = 124 self.match(GlycanParser.LPAR) - self.state = 235 + self.state = 125 self.typi() - self.state = 236 + self.state = 126 self.match(GlycanParser.NUM) - self.state = 237 + self.state = 127 self.match(GlycanParser.DASH) - self.state = 238 + self.state = 128 self.qnum() - self.state = 239 + self.state = 129 self.match(GlycanParser.RPAR) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 241 + self.state = 131 self.match(GlycanParser.LPAR) - self.state = 242 + self.state = 132 self.match(GlycanParser.NUM) - self.state = 243 + self.state = 133 self.match(GlycanParser.DASH) - self.state = 244 + self.state = 134 self.qnum() - self.state = 245 + self.state = 135 self.match(GlycanParser.RPAR) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 247 + self.state = 137 self.typi() - self.state = 248 + self.state = 138 self.match(GlycanParser.NUM) - self.state = 249 + self.state = 139 self.match(GlycanParser.DASH) - self.state = 250 + self.state = 140 self.qnum() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 252 + self.state = 142 self.typi() - self.state = 253 + self.state = 143 self.match(GlycanParser.NUM) pass @@ -1197,72 +833,72 @@ def exitRule(self, listener:ParseTreeListener): def add(self): localctx = GlycanParser.AddContext(self, self._ctx, self.state) - self.enterRule(localctx, 14, self.RULE_add) + self.enterRule(localctx, 12, self.RULE_add) self._la = 0 # Token type try: - self.state = 285 + self.state = 175 self._errHandler.sync(self) token = self._input.LA(1) if token in [31]: self.enterOuterAlt(localctx, 1) - self.state = 257 + self.state = 147 self.match(GlycanParser.EQ) - self.state = 258 + self.state = 148 self.match(GlycanParser.LBRACK) - self.state = 260 + self.state = 150 self._errHandler.sync(self) _la = self._input.LA(1) if _la==27 or _la==30: - self.state = 259 + self.state = 149 self.ct() - self.state = 262 + self.state = 152 self.match(GlycanParser.NUM) - self.state = 270 + self.state = 160 self._errHandler.sync(self) _la = self._input.LA(1) while _la==17: - self.state = 263 + self.state = 153 self.match(GlycanParser.COLON) - self.state = 265 + self.state = 155 self._errHandler.sync(self) _la = self._input.LA(1) if _la==27 or _la==30: - self.state = 264 + self.state = 154 self.ct() - self.state = 267 + self.state = 157 self.match(GlycanParser.NUM) - self.state = 272 + self.state = 162 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 273 + self.state = 163 self.match(GlycanParser.RBRACK) pass elif token in [27]: self.enterOuterAlt(localctx, 2) - self.state = 274 + self.state = 164 self.match(GlycanParser.C) - self.state = 275 + self.state = 165 self.match(GlycanParser.LBRACK) - self.state = 276 + self.state = 166 self.match(GlycanParser.NUM) - self.state = 281 + self.state = 171 self._errHandler.sync(self) _la = self._input.LA(1) while _la==17: - self.state = 277 + self.state = 167 self.match(GlycanParser.COLON) - self.state = 278 + self.state = 168 self.match(GlycanParser.NUM) - self.state = 283 + self.state = 173 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 284 + self.state = 174 self.match(GlycanParser.RBRACK) pass else: @@ -1311,24 +947,24 @@ def exitRule(self, listener:ParseTreeListener): def fgi(self): localctx = GlycanParser.FgiContext(self, self._ctx, self.state) - self.enterRule(localctx, 16, self.RULE_fgi) + self.enterRule(localctx, 14, self.RULE_fgi) try: - self.state = 290 + self.state = 180 self._errHandler.sync(self) token = self._input.LA(1) if token in [13]: self.enterOuterAlt(localctx, 1) - self.state = 287 + self.state = 177 self.match(GlycanParser.COUNT) pass elif token in [4, 5, 6, 7]: self.enterOuterAlt(localctx, 2) - self.state = 288 + self.state = 178 self.bridge() pass elif token in [8]: self.enterOuterAlt(localctx, 3) - self.state = 289 + self.state = 179 self.match(GlycanParser.FG) pass else: @@ -1389,15 +1025,15 @@ def exitRule(self, listener:ParseTreeListener): def carb(self): localctx = GlycanParser.CarbContext(self, self._ctx, self.state) - self.enterRule(localctx, 18, self.RULE_carb) + self.enterRule(localctx, 16, self.RULE_carb) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 293 + self.state = 183 self._errHandler.sync(self) _la = self._input.LA(1) if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0): - self.state = 292 + self.state = 182 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0)): self._errHandler.recoverInline(self) @@ -1406,17 +1042,17 @@ def carb(self): self.consume() - self.state = 295 + self.state = 185 self.match(GlycanParser.CARBON) - self.state = 296 + self.state = 186 self.match(GlycanParser.NUM) - self.state = 300 + self.state = 190 self._errHandler.sync(self) _la = self._input.LA(1) while _la==27 or _la==31: - self.state = 297 + self.state = 187 self.add() - self.state = 302 + self.state = 192 self._errHandler.sync(self) _la = self._input.LA(1) @@ -1501,110 +1137,110 @@ def exitRule(self, listener:ParseTreeListener): def modi(self): localctx = GlycanParser.ModiContext(self, self._ctx, self.state) - self.enterRule(localctx, 20, self.RULE_modi) + self.enterRule(localctx, 18, self.RULE_modi) self._la = 0 # Token type try: - self.state = 346 + self.state = 236 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,40,self._ctx) + la_ = self._interp.adaptivePredict(self._input,23,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 305 + self.state = 195 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,34,self._ctx) + la_ = self._interp.adaptivePredict(self._input,17,self._ctx) if la_ == 1: - self.state = 303 + self.state = 193 self.match(GlycanParser.NUM) - self.state = 304 + self.state = 194 self.match(GlycanParser.COLON) - self.state = 307 + self.state = 197 self.match(GlycanParser.NUM) - self.state = 308 + self.state = 198 self.match(GlycanParser.DASH) - self.state = 309 + self.state = 199 self.match(GlycanParser.ANHYDRO) - self.state = 310 + self.state = 200 self.match(GlycanParser.DASH) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 311 + self.state = 201 self.match(GlycanParser.NUM) - self.state = 312 + self.state = 202 self.match(GlycanParser.DASH) - self.state = 313 + self.state = 203 self.bridge() - self.state = 314 + self.state = 204 self.match(GlycanParser.DASH) - self.state = 315 + self.state = 205 self.fgi() - self.state = 316 + self.state = 206 self.match(GlycanParser.DASH) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 319 + self.state = 209 self._errHandler.sync(self) _la = self._input.LA(1) if _la==18: - self.state = 318 + self.state = 208 self.match(GlycanParser.DASH) - self.state = 322 + self.state = 212 self._errHandler.sync(self) _la = self._input.LA(1) if _la==16: - self.state = 321 + self.state = 211 self.match(GlycanParser.NUM) - self.state = 327 + self.state = 217 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,37,self._ctx) + _alt = self._interp.adaptivePredict(self._input,20,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 324 + self.state = 214 self.bridge() - self.state = 329 + self.state = 219 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,37,self._ctx) + _alt = self._interp.adaptivePredict(self._input,20,self._ctx) - self.state = 330 + self.state = 220 self.fgi() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 331 + self.state = 221 self.match(GlycanParser.NUM) - self.state = 339 + self.state = 229 self._errHandler.sync(self) token = self._input.LA(1) if token in [17, 28]: - self.state = 334 + self.state = 224 self._errHandler.sync(self) _la = self._input.LA(1) if _la==17: - self.state = 332 + self.state = 222 self.match(GlycanParser.COLON) - self.state = 333 + self.state = 223 self.match(GlycanParser.NUM) - self.state = 336 + self.state = 226 self.match(GlycanParser.D) pass elif token in [29]: - self.state = 337 + self.state = 227 self.match(GlycanParser.E) pass elif token in [4, 25, 26, 32]: - self.state = 338 + self.state = 228 self.carb() pass else: @@ -1614,23 +1250,23 @@ def modi(self): elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 341 + self.state = 231 self.match(GlycanParser.HEAD) pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 342 + self.state = 232 self.match(GlycanParser.HEADD) - self.state = 343 + self.state = 233 self.match(GlycanParser.DASH) pass elif la_ == 7: self.enterOuterAlt(localctx, 7) - self.state = 344 + self.state = 234 self.match(GlycanParser.DASH) - self.state = 345 + self.state = 235 self.match(GlycanParser.END) pass @@ -1674,11 +1310,11 @@ def exitRule(self, listener:ParseTreeListener): def qnum(self): localctx = GlycanParser.QnumContext(self, self._ctx, self.state) - self.enterRule(localctx, 22, self.RULE_qnum) + self.enterRule(localctx, 20, self.RULE_qnum) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 348 + self.state = 238 _la = self._input.LA(1) if not(_la==16 or _la==33): self._errHandler.recoverInline(self) @@ -1724,11 +1360,11 @@ def exitRule(self, listener:ParseTreeListener): def typi(self): localctx = GlycanParser.TypiContext(self, self._ctx, self.state) - self.enterRule(localctx, 24, self.RULE_typi) + self.enterRule(localctx, 22, self.RULE_typi) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 350 + self.state = 240 _la = self._input.LA(1) if not(_la==14 or _la==33): self._errHandler.recoverInline(self) @@ -1780,11 +1416,11 @@ def exitRule(self, listener:ParseTreeListener): def bridge(self): localctx = GlycanParser.BridgeContext(self, self._ctx, self.state) - self.enterRule(localctx, 26, self.RULE_bridge) + self.enterRule(localctx, 24, self.RULE_bridge) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 352 + self.state = 242 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 240) != 0)): self._errHandler.recoverInline(self) @@ -1830,11 +1466,11 @@ def exitRule(self, listener:ParseTreeListener): def ct(self): localctx = GlycanParser.CtContext(self, self._ctx, self.state) - self.enterRule(localctx, 28, self.RULE_ct) + self.enterRule(localctx, 26, self.RULE_ct) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 354 + self.state = 244 _la = self._input.LA(1) if not(_la==27 or _la==30): self._errHandler.recoverInline(self) diff --git a/tests/test_parser.py b/tests/test_parser.py index 9472edf..9594462 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -346,6 +346,33 @@ def test_parse_fuzzy(self, monomers, orientation, mode): id_child_111 = list(g.edges(id_child_11))[0][1] check_child(g, id_child_11, id_child_111, monomers[1], f"({c[1]})", 0, lactole=Lactole.PYRANOSE) + def test_parse_fuzzy_check(self): + monomers = ['Tag', 'Mur', 'Hex', 'Kdo', 'Dig'] + orientation = Config.ALPHA + mode = "simple" + c = ["a1-4", "a1-4", "a1-3", "a1-4"] + + iupac = f"{monomers[0]}({c[0]})[{monomers[1]}({c[1]}){monomers[2]}({c[2]})]{monomers[3]}({c[3]}){monomers[4]}" + if orientation == Config.ALPHA: + iupac += " a" + elif orientation == Config.BETA: + iupac += " b" + + g = Glycan(reduce_notation(iupac, mode), tree_only=True).get_tree() + + check_initial(g, monomers[4], 1, orientation, lactole=Lactole.PYRANOSE) + id_child_1 = list(g.edges(0))[0][1] + check_child(g, 0, id_child_1, monomers[3], f"({c[3]})", 2, lactole=Lactole.PYRANOSE) + + id_children_1 = [x[1] for x in list(g.edges(id_child_1))] + id_child_11, id_child_12 = split_children(g, id_children_1, monomers[2]) + + check_child(g, id_child_1, id_child_11, monomers[2], f"({c[2]})", 1, lactole=Lactole.PYRANOSE) + check_child(g, id_child_1, id_child_12, monomers[0], f"({c[0]})", 0, lactole=Lactole.PYRANOSE) + + id_child_111 = list(g.edges(id_child_11))[0][1] + check_child(g, id_child_11, id_child_111, monomers[1], f"({c[1]})", 0, lactole=Lactole.PYRANOSE) + @pytest.mark.parametrize("orientation", [Config.ALPHA, Config.BETA, Config.UNDEF]) @pytest.mark.parametrize("pos_man", [1, 2, 3, 4, 6]) @pytest.mark.parametrize("pos_glc", [2, 3, 4, 6]) From 98e0b6d14354069a7c0c214e3c01ba47a45fc098 Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Tue, 15 Oct 2024 13:29:15 +0200 Subject: [PATCH 10/14] Minor fixes and version specification --- .github/workflows/test.yaml | 2 +- glyles/__main__.py | 5 ++--- glyles/version.py | 1 + pyproject.toml | 8 +++++--- tests/test_derivatives.py | 2 -- 5 files changed, 9 insertions(+), 9 deletions(-) create mode 100644 glyles/version.py diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e4fc8ff..1eb8204 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -38,7 +38,7 @@ jobs: - name: Run tests run: | cd tests - poetry run python -m pytest --cov=../glyles/ --cov-report=xml -m "not todo and not slow" + poetry run python -m pytest --cov=../glyles/ --cov-report=xml -m "not todo" - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: diff --git a/glyles/__main__.py b/glyles/__main__.py index c403a16..b59eb5c 100644 --- a/glyles/__main__.py +++ b/glyles/__main__.py @@ -1,10 +1,9 @@ import os import sys import argparse -import pkg_resources - from glyles import convert +from glyles.version import __version__ def parse_args(args): @@ -40,7 +39,7 @@ def parse_args(args): "-v", "--version", action="version", - version=f"%(prog)s {pkg_resources.get_distribution('glyles').version}" + version=f"%(prog)s {__version__}" ) return vars(parser.parse_args(args)) diff --git a/glyles/version.py b/glyles/version.py new file mode 100644 index 0000000..5becc17 --- /dev/null +++ b/glyles/version.py @@ -0,0 +1 @@ +__version__ = "1.0.0" diff --git a/pyproject.toml b/pyproject.toml index 6ab4460..bf50694 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,15 @@ [tool.poetry] name = "glyles" -version = "0.5.11" +version = "1.0.0" repository = "https://github.com/kalininalab/GlyLES" readme = "README.md" description = "A tool to convert IUPAC representation of glycans into SMILES strings" authors = ["Roman Joeres "] classifiers = [ - "Development Status :: 3 - Alpha", - "Operating System :: OS Independent" + "Development Status :: 5 - Production/Stable", + "Operating System :: OS Independent", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", ] [tool.poetry.dependencies] diff --git a/tests/test_derivatives.py b/tests/test_derivatives.py index 8e79a67..23da2c8 100644 --- a/tests/test_derivatives.py +++ b/tests/test_derivatives.py @@ -23,7 +23,6 @@ def compare_smiles(computed, solution): class TestDerivatives: - @pytest.mark.slow @pytest.mark.parametrize( "line", open("data/anhydro.tsv", "r").readlines() + @@ -41,7 +40,6 @@ def test_smiles_databases(self, line): iupac, smiles = line.split("\t")[:2] compare_smiles(Glycan(iupac).get_smiles(), smiles) - @pytest.mark.slow @pytest.mark.parametrize("line", open("data/glycowork.txt", "r").readlines()) def test_iupac_databases(self, line): if '0dHex' in line or 'en' in line or 'Ins' in line: From 815aa7a0eafd89e251d30d8660617d0139c61a3c Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Tue, 15 Oct 2024 14:36:45 +0200 Subject: [PATCH 11/14] Big fix in grammar --- glyles/grammar/Glycan.g4 | 2 +- glyles/grammar/Glycan.interp | 2 +- glyles/grammar/GlycanParser.py | 379 +++++++++++++++++---------------- 3 files changed, 198 insertions(+), 185 deletions(-) diff --git a/glyles/grammar/Glycan.g4 b/glyles/grammar/Glycan.g4 index 5b5f2de..58d6451 100644 --- a/glyles/grammar/Glycan.g4 +++ b/glyles/grammar/Glycan.g4 @@ -15,7 +15,7 @@ branch: | deriv con LBRACE branch RBRACE LBRACE branch RBRACE branch | deriv con LBRACE branch RBRACE LBRACE branch RBRACE LBRACE branch RBRACE branch; deriv: - modi* saci+ modi* RING? TYPE?; + modi* saci+ modi* RING? modi* TYPE?; saci: COUNT | SAC; con: LPAR typi NUM DASH qnum RPAR diff --git a/glyles/grammar/Glycan.interp b/glyles/grammar/Glycan.interp index 9db20d5..db1dc70 100644 --- a/glyles/grammar/Glycan.interp +++ b/glyles/grammar/Glycan.interp @@ -88,4 +88,4 @@ ct atn: -[4, 1, 33, 247, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 34, 8, 0, 10, 0, 12, 0, 37, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 55, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2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 9, 225, 8, 9, 1, 9, 1, 9, 1, 9, 3, 9, 230, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 237, 8, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 0, 0, 14, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 0, 6, 2, 0, 3, 3, 13, 13, 2, 0, 25, 26, 32, 32, 2, 0, 16, 16, 33, 33, 2, 0, 14, 14, 33, 33, 1, 0, 4, 7, 2, 0, 27, 27, 30, 30, 271, 0, 28, 1, 0, 0, 0, 2, 54, 1, 0, 0, 0, 4, 97, 1, 0, 0, 0, 6, 102, 1, 0, 0, 0, 8, 122, 1, 0, 0, 0, 10, 145, 1, 0, 0, 0, 12, 175, 1, 0, 0, 0, 14, 180, 1, 0, 0, 0, 16, 183, 1, 0, 0, 0, 18, 236, 1, 0, 0, 0, 20, 238, 1, 0, 0, 0, 22, 240, 1, 0, 0, 0, 24, 242, 1, 0, 0, 0, 26, 244, 1, 0, 0, 0, 28, 35, 5, 1, 0, 0, 29, 30, 5, 23, 0, 0, 30, 31, 3, 4, 2, 0, 31, 32, 5, 24, 0, 0, 32, 34, 1, 0, 0, 0, 33, 29, 1, 0, 0, 0, 34, 37, 1, 0, 0, 0, 35, 33, 1, 0, 0, 0, 35, 36, 1, 0, 0, 0, 36, 38, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 38, 39, 3, 2, 1, 0, 39, 40, 5, 1, 0, 0, 40, 1, 1, 0, 0, 0, 41, 42, 3, 4, 2, 0, 42, 43, 3, 6, 3, 0, 43, 44, 5, 2, 0, 0, 44, 45, 5, 14, 0, 0, 45, 55, 1, 0, 0, 0, 46, 47, 3, 4, 2, 0, 47, 48, 3, 6, 3, 0, 48, 55, 1, 0, 0, 0, 49, 50, 3, 6, 3, 0, 50, 51, 5, 2, 0, 0, 51, 52, 5, 14, 0, 0, 52, 55, 1, 0, 0, 0, 53, 55, 3, 6, 3, 0, 54, 41, 1, 0, 0, 0, 54, 46, 1, 0, 0, 0, 54, 49, 1, 0, 0, 0, 54, 53, 1, 0, 0, 0, 55, 3, 1, 0, 0, 0, 56, 57, 3, 6, 3, 0, 57, 58, 3, 10, 5, 0, 58, 98, 1, 0, 0, 0, 59, 60, 3, 6, 3, 0, 60, 61, 3, 10, 5, 0, 61, 62, 3, 4, 2, 0, 62, 98, 1, 0, 0, 0, 63, 64, 5, 21, 0, 0, 64, 65, 3, 4, 2, 0, 65, 66, 5, 22, 0, 0, 66, 98, 1, 0, 0, 0, 67, 68, 3, 6, 3, 0, 68, 69, 3, 10, 5, 0, 69, 70, 5, 21, 0, 0, 70, 71, 3, 4, 2, 0, 71, 72, 5, 22, 0, 0, 72, 73, 3, 4, 2, 0, 73, 98, 1, 0, 0, 0, 74, 75, 3, 6, 3, 0, 75, 76, 3, 10, 5, 0, 76, 77, 5, 21, 0, 0, 77, 78, 3, 4, 2, 0, 78, 79, 5, 22, 0, 0, 79, 80, 5, 21, 0, 0, 80, 81, 3, 4, 2, 0, 81, 82, 5, 22, 0, 0, 82, 83, 3, 4, 2, 0, 83, 98, 1, 0, 0, 0, 84, 85, 3, 6, 3, 0, 85, 86, 3, 10, 5, 0, 86, 87, 5, 21, 0, 0, 87, 88, 3, 4, 2, 0, 88, 89, 5, 22, 0, 0, 89, 90, 5, 21, 0, 0, 90, 91, 3, 4, 2, 0, 91, 92, 5, 22, 0, 0, 92, 93, 5, 21, 0, 0, 93, 94, 3, 4, 2, 0, 94, 95, 5, 22, 0, 0, 95, 96, 3, 4, 2, 0, 96, 98, 1, 0, 0, 0, 97, 56, 1, 0, 0, 0, 97, 59, 1, 0, 0, 0, 97, 63, 1, 0, 0, 0, 97, 67, 1, 0, 0, 0, 97, 74, 1, 0, 0, 0, 97, 84, 1, 0, 0, 0, 98, 5, 1, 0, 0, 0, 99, 101, 3, 18, 9, 0, 100, 99, 1, 0, 0, 0, 101, 104, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 107, 3, 8, 4, 0, 106, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 113, 1, 0, 0, 0, 110, 112, 3, 18, 9, 0, 111, 110, 1, 0, 0, 0, 112, 115, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 117, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 116, 118, 5, 15, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 120, 1, 0, 0, 0, 119, 121, 5, 14, 0, 0, 120, 119, 1, 0, 0, 0, 120, 121, 1, 0, 0, 0, 121, 7, 1, 0, 0, 0, 122, 123, 7, 0, 0, 0, 123, 9, 1, 0, 0, 0, 124, 125, 5, 19, 0, 0, 125, 126, 3, 22, 11, 0, 126, 127, 5, 16, 0, 0, 127, 128, 5, 18, 0, 0, 128, 129, 3, 20, 10, 0, 129, 130, 5, 20, 0, 0, 130, 146, 1, 0, 0, 0, 131, 132, 5, 19, 0, 0, 132, 133, 5, 16, 0, 0, 133, 134, 5, 18, 0, 0, 134, 135, 3, 20, 10, 0, 135, 136, 5, 20, 0, 0, 136, 146, 1, 0, 0, 0, 137, 138, 3, 22, 11, 0, 138, 139, 5, 16, 0, 0, 139, 140, 5, 18, 0, 0, 140, 141, 3, 20, 10, 0, 141, 146, 1, 0, 0, 0, 142, 143, 3, 22, 11, 0, 143, 144, 5, 16, 0, 0, 144, 146, 1, 0, 0, 0, 145, 124, 1, 0, 0, 0, 145, 131, 1, 0, 0, 0, 145, 137, 1, 0, 0, 0, 145, 142, 1, 0, 0, 0, 146, 11, 1, 0, 0, 0, 147, 148, 5, 31, 0, 0, 148, 150, 5, 23, 0, 0, 149, 151, 3, 26, 13, 0, 150, 149, 1, 0, 0, 0, 150, 151, 1, 0, 0, 0, 151, 152, 1, 0, 0, 0, 152, 160, 5, 16, 0, 0, 153, 155, 5, 17, 0, 0, 154, 156, 3, 26, 13, 0, 155, 154, 1, 0, 0, 0, 155, 156, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 159, 5, 16, 0, 0, 158, 153, 1, 0, 0, 0, 159, 162, 1, 0, 0, 0, 160, 158, 1, 0, 0, 0, 160, 161, 1, 0, 0, 0, 161, 163, 1, 0, 0, 0, 162, 160, 1, 0, 0, 0, 163, 176, 5, 24, 0, 0, 164, 165, 5, 27, 0, 0, 165, 166, 5, 23, 0, 0, 166, 171, 5, 16, 0, 0, 167, 168, 5, 17, 0, 0, 168, 170, 5, 16, 0, 0, 169, 167, 1, 0, 0, 0, 170, 173, 1, 0, 0, 0, 171, 169, 1, 0, 0, 0, 171, 172, 1, 0, 0, 0, 172, 174, 1, 0, 0, 0, 173, 171, 1, 0, 0, 0, 174, 176, 5, 24, 0, 0, 175, 147, 1, 0, 0, 0, 175, 164, 1, 0, 0, 0, 176, 13, 1, 0, 0, 0, 177, 181, 5, 13, 0, 0, 178, 181, 3, 24, 12, 0, 179, 181, 5, 8, 0, 0, 180, 177, 1, 0, 0, 0, 180, 178, 1, 0, 0, 0, 180, 179, 1, 0, 0, 0, 181, 15, 1, 0, 0, 0, 182, 184, 7, 1, 0, 0, 183, 182, 1, 0, 0, 0, 183, 184, 1, 0, 0, 0, 184, 185, 1, 0, 0, 0, 185, 186, 5, 4, 0, 0, 186, 190, 5, 16, 0, 0, 187, 189, 3, 12, 6, 0, 188, 187, 1, 0, 0, 0, 189, 192, 1, 0, 0, 0, 190, 188, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 17, 1, 0, 0, 0, 192, 190, 1, 0, 0, 0, 193, 194, 5, 16, 0, 0, 194, 196, 5, 17, 0, 0, 195, 193, 1, 0, 0, 0, 195, 196, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 198, 5, 16, 0, 0, 198, 199, 5, 18, 0, 0, 199, 200, 5, 9, 0, 0, 200, 237, 5, 18, 0, 0, 201, 202, 5, 16, 0, 0, 202, 203, 5, 18, 0, 0, 203, 204, 3, 24, 12, 0, 204, 205, 5, 18, 0, 0, 205, 206, 3, 14, 7, 0, 206, 207, 5, 18, 0, 0, 207, 237, 1, 0, 0, 0, 208, 210, 5, 18, 0, 0, 209, 208, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 212, 1, 0, 0, 0, 211, 213, 5, 16, 0, 0, 212, 211, 1, 0, 0, 0, 212, 213, 1, 0, 0, 0, 213, 217, 1, 0, 0, 0, 214, 216, 3, 24, 12, 0, 215, 214, 1, 0, 0, 0, 216, 219, 1, 0, 0, 0, 217, 215, 1, 0, 0, 0, 217, 218, 1, 0, 0, 0, 218, 220, 1, 0, 0, 0, 219, 217, 1, 0, 0, 0, 220, 237, 3, 14, 7, 0, 221, 229, 5, 16, 0, 0, 222, 223, 5, 17, 0, 0, 223, 225, 5, 16, 0, 0, 224, 222, 1, 0, 0, 0, 224, 225, 1, 0, 0, 0, 225, 226, 1, 0, 0, 0, 226, 230, 5, 28, 0, 0, 227, 230, 5, 29, 0, 0, 228, 230, 3, 16, 8, 0, 229, 224, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 237, 1, 0, 0, 0, 231, 237, 5, 10, 0, 0, 232, 233, 5, 11, 0, 0, 233, 237, 5, 18, 0, 0, 234, 235, 5, 18, 0, 0, 235, 237, 5, 12, 0, 0, 236, 195, 1, 0, 0, 0, 236, 201, 1, 0, 0, 0, 236, 209, 1, 0, 0, 0, 236, 221, 1, 0, 0, 0, 236, 231, 1, 0, 0, 0, 236, 232, 1, 0, 0, 0, 236, 234, 1, 0, 0, 0, 237, 19, 1, 0, 0, 0, 238, 239, 7, 2, 0, 0, 239, 21, 1, 0, 0, 0, 240, 241, 7, 3, 0, 0, 241, 23, 1, 0, 0, 0, 242, 243, 7, 4, 0, 0, 243, 25, 1, 0, 0, 0, 244, 245, 7, 5, 0, 0, 245, 27, 1, 0, 0, 0, 24, 35, 54, 97, 102, 108, 113, 117, 120, 145, 150, 155, 160, 171, 175, 180, 183, 190, 195, 209, 212, 217, 224, 229, 236] \ No newline at end of file +[4, 1, 33, 253, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 34, 8, 0, 10, 0, 12, 0, 37, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 55, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 98, 8, 2, 1, 3, 5, 3, 101, 8, 3, 10, 3, 12, 3, 104, 9, 3, 1, 3, 4, 3, 107, 8, 3, 11, 3, 12, 3, 108, 1, 3, 5, 3, 112, 8, 3, 10, 3, 12, 3, 115, 9, 3, 1, 3, 3, 3, 118, 8, 3, 1, 3, 5, 3, 121, 8, 3, 10, 3, 12, 3, 124, 9, 3, 1, 3, 3, 3, 127, 8, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5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 0, 12, 181, 1, 0, 0, 0, 14, 186, 1, 0, 0, 0, 16, 189, 1, 0, 0, 0, 18, 242, 1, 0, 0, 0, 20, 244, 1, 0, 0, 0, 22, 246, 1, 0, 0, 0, 24, 248, 1, 0, 0, 0, 26, 250, 1, 0, 0, 0, 28, 35, 5, 1, 0, 0, 29, 30, 5, 23, 0, 0, 30, 31, 3, 4, 2, 0, 31, 32, 5, 24, 0, 0, 32, 34, 1, 0, 0, 0, 33, 29, 1, 0, 0, 0, 34, 37, 1, 0, 0, 0, 35, 33, 1, 0, 0, 0, 35, 36, 1, 0, 0, 0, 36, 38, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 38, 39, 3, 2, 1, 0, 39, 40, 5, 1, 0, 0, 40, 1, 1, 0, 0, 0, 41, 42, 3, 4, 2, 0, 42, 43, 3, 6, 3, 0, 43, 44, 5, 2, 0, 0, 44, 45, 5, 14, 0, 0, 45, 55, 1, 0, 0, 0, 46, 47, 3, 4, 2, 0, 47, 48, 3, 6, 3, 0, 48, 55, 1, 0, 0, 0, 49, 50, 3, 6, 3, 0, 50, 51, 5, 2, 0, 0, 51, 52, 5, 14, 0, 0, 52, 55, 1, 0, 0, 0, 53, 55, 3, 6, 3, 0, 54, 41, 1, 0, 0, 0, 54, 46, 1, 0, 0, 0, 54, 49, 1, 0, 0, 0, 54, 53, 1, 0, 0, 0, 55, 3, 1, 0, 0, 0, 56, 57, 3, 6, 3, 0, 57, 58, 3, 10, 5, 0, 58, 98, 1, 0, 0, 0, 59, 60, 3, 6, 3, 0, 60, 61, 3, 10, 5, 0, 61, 62, 3, 4, 2, 0, 62, 98, 1, 0, 0, 0, 63, 64, 5, 21, 0, 0, 64, 65, 3, 4, 2, 0, 65, 66, 5, 22, 0, 0, 66, 98, 1, 0, 0, 0, 67, 68, 3, 6, 3, 0, 68, 69, 3, 10, 5, 0, 69, 70, 5, 21, 0, 0, 70, 71, 3, 4, 2, 0, 71, 72, 5, 22, 0, 0, 72, 73, 3, 4, 2, 0, 73, 98, 1, 0, 0, 0, 74, 75, 3, 6, 3, 0, 75, 76, 3, 10, 5, 0, 76, 77, 5, 21, 0, 0, 77, 78, 3, 4, 2, 0, 78, 79, 5, 22, 0, 0, 79, 80, 5, 21, 0, 0, 80, 81, 3, 4, 2, 0, 81, 82, 5, 22, 0, 0, 82, 83, 3, 4, 2, 0, 83, 98, 1, 0, 0, 0, 84, 85, 3, 6, 3, 0, 85, 86, 3, 10, 5, 0, 86, 87, 5, 21, 0, 0, 87, 88, 3, 4, 2, 0, 88, 89, 5, 22, 0, 0, 89, 90, 5, 21, 0, 0, 90, 91, 3, 4, 2, 0, 91, 92, 5, 22, 0, 0, 92, 93, 5, 21, 0, 0, 93, 94, 3, 4, 2, 0, 94, 95, 5, 22, 0, 0, 95, 96, 3, 4, 2, 0, 96, 98, 1, 0, 0, 0, 97, 56, 1, 0, 0, 0, 97, 59, 1, 0, 0, 0, 97, 63, 1, 0, 0, 0, 97, 67, 1, 0, 0, 0, 97, 74, 1, 0, 0, 0, 97, 84, 1, 0, 0, 0, 98, 5, 1, 0, 0, 0, 99, 101, 3, 18, 9, 0, 100, 99, 1, 0, 0, 0, 101, 104, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 107, 3, 8, 4, 0, 106, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 113, 1, 0, 0, 0, 110, 112, 3, 18, 9, 0, 111, 110, 1, 0, 0, 0, 112, 115, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 117, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 116, 118, 5, 15, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 122, 1, 0, 0, 0, 119, 121, 3, 18, 9, 0, 120, 119, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 127, 5, 14, 0, 0, 126, 125, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 7, 1, 0, 0, 0, 128, 129, 7, 0, 0, 0, 129, 9, 1, 0, 0, 0, 130, 131, 5, 19, 0, 0, 131, 132, 3, 22, 11, 0, 132, 133, 5, 16, 0, 0, 133, 134, 5, 18, 0, 0, 134, 135, 3, 20, 10, 0, 135, 136, 5, 20, 0, 0, 136, 152, 1, 0, 0, 0, 137, 138, 5, 19, 0, 0, 138, 139, 5, 16, 0, 0, 139, 140, 5, 18, 0, 0, 140, 141, 3, 20, 10, 0, 141, 142, 5, 20, 0, 0, 142, 152, 1, 0, 0, 0, 143, 144, 3, 22, 11, 0, 144, 145, 5, 16, 0, 0, 145, 146, 5, 18, 0, 0, 146, 147, 3, 20, 10, 0, 147, 152, 1, 0, 0, 0, 148, 149, 3, 22, 11, 0, 149, 150, 5, 16, 0, 0, 150, 152, 1, 0, 0, 0, 151, 130, 1, 0, 0, 0, 151, 137, 1, 0, 0, 0, 151, 143, 1, 0, 0, 0, 151, 148, 1, 0, 0, 0, 152, 11, 1, 0, 0, 0, 153, 154, 5, 31, 0, 0, 154, 156, 5, 23, 0, 0, 155, 157, 3, 26, 13, 0, 156, 155, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 166, 5, 16, 0, 0, 159, 161, 5, 17, 0, 0, 160, 162, 3, 26, 13, 0, 161, 160, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 165, 5, 16, 0, 0, 164, 159, 1, 0, 0, 0, 165, 168, 1, 0, 0, 0, 166, 164, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 167, 169, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 169, 182, 5, 24, 0, 0, 170, 171, 5, 27, 0, 0, 171, 172, 5, 23, 0, 0, 172, 177, 5, 16, 0, 0, 173, 174, 5, 17, 0, 0, 174, 176, 5, 16, 0, 0, 175, 173, 1, 0, 0, 0, 176, 179, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 180, 1, 0, 0, 0, 179, 177, 1, 0, 0, 0, 180, 182, 5, 24, 0, 0, 181, 153, 1, 0, 0, 0, 181, 170, 1, 0, 0, 0, 182, 13, 1, 0, 0, 0, 183, 187, 5, 13, 0, 0, 184, 187, 3, 24, 12, 0, 185, 187, 5, 8, 0, 0, 186, 183, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, 186, 185, 1, 0, 0, 0, 187, 15, 1, 0, 0, 0, 188, 190, 7, 1, 0, 0, 189, 188, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 192, 5, 4, 0, 0, 192, 196, 5, 16, 0, 0, 193, 195, 3, 12, 6, 0, 194, 193, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 17, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 200, 5, 16, 0, 0, 200, 202, 5, 17, 0, 0, 201, 199, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 204, 5, 16, 0, 0, 204, 205, 5, 18, 0, 0, 205, 206, 5, 9, 0, 0, 206, 243, 5, 18, 0, 0, 207, 208, 5, 16, 0, 0, 208, 209, 5, 18, 0, 0, 209, 210, 3, 24, 12, 0, 210, 211, 5, 18, 0, 0, 211, 212, 3, 14, 7, 0, 212, 213, 5, 18, 0, 0, 213, 243, 1, 0, 0, 0, 214, 216, 5, 18, 0, 0, 215, 214, 1, 0, 0, 0, 215, 216, 1, 0, 0, 0, 216, 218, 1, 0, 0, 0, 217, 219, 5, 16, 0, 0, 218, 217, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 223, 1, 0, 0, 0, 220, 222, 3, 24, 12, 0, 221, 220, 1, 0, 0, 0, 222, 225, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 223, 224, 1, 0, 0, 0, 224, 226, 1, 0, 0, 0, 225, 223, 1, 0, 0, 0, 226, 243, 3, 14, 7, 0, 227, 235, 5, 16, 0, 0, 228, 229, 5, 17, 0, 0, 229, 231, 5, 16, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 236, 5, 28, 0, 0, 233, 236, 5, 29, 0, 0, 234, 236, 3, 16, 8, 0, 235, 230, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 235, 234, 1, 0, 0, 0, 236, 243, 1, 0, 0, 0, 237, 243, 5, 10, 0, 0, 238, 239, 5, 11, 0, 0, 239, 243, 5, 18, 0, 0, 240, 241, 5, 18, 0, 0, 241, 243, 5, 12, 0, 0, 242, 201, 1, 0, 0, 0, 242, 207, 1, 0, 0, 0, 242, 215, 1, 0, 0, 0, 242, 227, 1, 0, 0, 0, 242, 237, 1, 0, 0, 0, 242, 238, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 243, 19, 1, 0, 0, 0, 244, 245, 7, 2, 0, 0, 245, 21, 1, 0, 0, 0, 246, 247, 7, 3, 0, 0, 247, 23, 1, 0, 0, 0, 248, 249, 7, 4, 0, 0, 249, 25, 1, 0, 0, 0, 250, 251, 7, 5, 0, 0, 251, 27, 1, 0, 0, 0, 25, 35, 54, 97, 102, 108, 113, 117, 122, 126, 151, 156, 161, 166, 177, 181, 186, 189, 196, 201, 215, 218, 223, 230, 235, 242] \ No newline at end of file diff --git a/glyles/grammar/GlycanParser.py b/glyles/grammar/GlycanParser.py index 553e6de..26c5c70 100644 --- a/glyles/grammar/GlycanParser.py +++ b/glyles/grammar/GlycanParser.py @@ -10,7 +10,7 @@ def serializedATN(): return [ - 4,1,33,247,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 4,1,33,253,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13, 1,0,1,0,1,0,1,0,1,0,5,0,34,8,0,10,0,12,0,37,9,0,1,0,1,0,1,0,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,55,8,1,1,2,1, @@ -18,85 +18,87 @@ def serializedATN(): 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1, 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,98,8,2,1,3,5,3,101,8,3,10,3,12, 3,104,9,3,1,3,4,3,107,8,3,11,3,12,3,108,1,3,5,3,112,8,3,10,3,12, - 3,115,9,3,1,3,3,3,118,8,3,1,3,3,3,121,8,3,1,4,1,4,1,5,1,5,1,5,1, - 5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1, - 5,1,5,3,5,146,8,5,1,6,1,6,1,6,3,6,151,8,6,1,6,1,6,1,6,3,6,156,8, - 6,1,6,5,6,159,8,6,10,6,12,6,162,9,6,1,6,1,6,1,6,1,6,1,6,1,6,5,6, - 170,8,6,10,6,12,6,173,9,6,1,6,3,6,176,8,6,1,7,1,7,1,7,3,7,181,8, - 7,1,8,3,8,184,8,8,1,8,1,8,1,8,5,8,189,8,8,10,8,12,8,192,9,8,1,9, - 1,9,3,9,196,8,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9, - 3,9,210,8,9,1,9,3,9,213,8,9,1,9,5,9,216,8,9,10,9,12,9,219,9,9,1, - 9,1,9,1,9,1,9,3,9,225,8,9,1,9,1,9,1,9,3,9,230,8,9,1,9,1,9,1,9,1, - 9,1,9,3,9,237,8,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,13,0, - 0,14,0,2,4,6,8,10,12,14,16,18,20,22,24,26,0,6,2,0,3,3,13,13,2,0, - 25,26,32,32,2,0,16,16,33,33,2,0,14,14,33,33,1,0,4,7,2,0,27,27,30, - 30,271,0,28,1,0,0,0,2,54,1,0,0,0,4,97,1,0,0,0,6,102,1,0,0,0,8,122, - 1,0,0,0,10,145,1,0,0,0,12,175,1,0,0,0,14,180,1,0,0,0,16,183,1,0, - 0,0,18,236,1,0,0,0,20,238,1,0,0,0,22,240,1,0,0,0,24,242,1,0,0,0, - 26,244,1,0,0,0,28,35,5,1,0,0,29,30,5,23,0,0,30,31,3,4,2,0,31,32, - 5,24,0,0,32,34,1,0,0,0,33,29,1,0,0,0,34,37,1,0,0,0,35,33,1,0,0,0, - 35,36,1,0,0,0,36,38,1,0,0,0,37,35,1,0,0,0,38,39,3,2,1,0,39,40,5, - 1,0,0,40,1,1,0,0,0,41,42,3,4,2,0,42,43,3,6,3,0,43,44,5,2,0,0,44, - 45,5,14,0,0,45,55,1,0,0,0,46,47,3,4,2,0,47,48,3,6,3,0,48,55,1,0, - 0,0,49,50,3,6,3,0,50,51,5,2,0,0,51,52,5,14,0,0,52,55,1,0,0,0,53, - 55,3,6,3,0,54,41,1,0,0,0,54,46,1,0,0,0,54,49,1,0,0,0,54,53,1,0,0, - 0,55,3,1,0,0,0,56,57,3,6,3,0,57,58,3,10,5,0,58,98,1,0,0,0,59,60, - 3,6,3,0,60,61,3,10,5,0,61,62,3,4,2,0,62,98,1,0,0,0,63,64,5,21,0, - 0,64,65,3,4,2,0,65,66,5,22,0,0,66,98,1,0,0,0,67,68,3,6,3,0,68,69, - 3,10,5,0,69,70,5,21,0,0,70,71,3,4,2,0,71,72,5,22,0,0,72,73,3,4,2, - 0,73,98,1,0,0,0,74,75,3,6,3,0,75,76,3,10,5,0,76,77,5,21,0,0,77,78, - 3,4,2,0,78,79,5,22,0,0,79,80,5,21,0,0,80,81,3,4,2,0,81,82,5,22,0, - 0,82,83,3,4,2,0,83,98,1,0,0,0,84,85,3,6,3,0,85,86,3,10,5,0,86,87, - 5,21,0,0,87,88,3,4,2,0,88,89,5,22,0,0,89,90,5,21,0,0,90,91,3,4,2, - 0,91,92,5,22,0,0,92,93,5,21,0,0,93,94,3,4,2,0,94,95,5,22,0,0,95, - 96,3,4,2,0,96,98,1,0,0,0,97,56,1,0,0,0,97,59,1,0,0,0,97,63,1,0,0, - 0,97,67,1,0,0,0,97,74,1,0,0,0,97,84,1,0,0,0,98,5,1,0,0,0,99,101, - 3,18,9,0,100,99,1,0,0,0,101,104,1,0,0,0,102,100,1,0,0,0,102,103, - 1,0,0,0,103,106,1,0,0,0,104,102,1,0,0,0,105,107,3,8,4,0,106,105, - 1,0,0,0,107,108,1,0,0,0,108,106,1,0,0,0,108,109,1,0,0,0,109,113, - 1,0,0,0,110,112,3,18,9,0,111,110,1,0,0,0,112,115,1,0,0,0,113,111, - 1,0,0,0,113,114,1,0,0,0,114,117,1,0,0,0,115,113,1,0,0,0,116,118, - 5,15,0,0,117,116,1,0,0,0,117,118,1,0,0,0,118,120,1,0,0,0,119,121, - 5,14,0,0,120,119,1,0,0,0,120,121,1,0,0,0,121,7,1,0,0,0,122,123,7, - 0,0,0,123,9,1,0,0,0,124,125,5,19,0,0,125,126,3,22,11,0,126,127,5, - 16,0,0,127,128,5,18,0,0,128,129,3,20,10,0,129,130,5,20,0,0,130,146, - 1,0,0,0,131,132,5,19,0,0,132,133,5,16,0,0,133,134,5,18,0,0,134,135, - 3,20,10,0,135,136,5,20,0,0,136,146,1,0,0,0,137,138,3,22,11,0,138, - 139,5,16,0,0,139,140,5,18,0,0,140,141,3,20,10,0,141,146,1,0,0,0, - 142,143,3,22,11,0,143,144,5,16,0,0,144,146,1,0,0,0,145,124,1,0,0, - 0,145,131,1,0,0,0,145,137,1,0,0,0,145,142,1,0,0,0,146,11,1,0,0,0, - 147,148,5,31,0,0,148,150,5,23,0,0,149,151,3,26,13,0,150,149,1,0, - 0,0,150,151,1,0,0,0,151,152,1,0,0,0,152,160,5,16,0,0,153,155,5,17, - 0,0,154,156,3,26,13,0,155,154,1,0,0,0,155,156,1,0,0,0,156,157,1, - 0,0,0,157,159,5,16,0,0,158,153,1,0,0,0,159,162,1,0,0,0,160,158,1, - 0,0,0,160,161,1,0,0,0,161,163,1,0,0,0,162,160,1,0,0,0,163,176,5, - 24,0,0,164,165,5,27,0,0,165,166,5,23,0,0,166,171,5,16,0,0,167,168, - 5,17,0,0,168,170,5,16,0,0,169,167,1,0,0,0,170,173,1,0,0,0,171,169, - 1,0,0,0,171,172,1,0,0,0,172,174,1,0,0,0,173,171,1,0,0,0,174,176, - 5,24,0,0,175,147,1,0,0,0,175,164,1,0,0,0,176,13,1,0,0,0,177,181, - 5,13,0,0,178,181,3,24,12,0,179,181,5,8,0,0,180,177,1,0,0,0,180,178, - 1,0,0,0,180,179,1,0,0,0,181,15,1,0,0,0,182,184,7,1,0,0,183,182,1, - 0,0,0,183,184,1,0,0,0,184,185,1,0,0,0,185,186,5,4,0,0,186,190,5, - 16,0,0,187,189,3,12,6,0,188,187,1,0,0,0,189,192,1,0,0,0,190,188, - 1,0,0,0,190,191,1,0,0,0,191,17,1,0,0,0,192,190,1,0,0,0,193,194,5, - 16,0,0,194,196,5,17,0,0,195,193,1,0,0,0,195,196,1,0,0,0,196,197, - 1,0,0,0,197,198,5,16,0,0,198,199,5,18,0,0,199,200,5,9,0,0,200,237, - 5,18,0,0,201,202,5,16,0,0,202,203,5,18,0,0,203,204,3,24,12,0,204, - 205,5,18,0,0,205,206,3,14,7,0,206,207,5,18,0,0,207,237,1,0,0,0,208, - 210,5,18,0,0,209,208,1,0,0,0,209,210,1,0,0,0,210,212,1,0,0,0,211, - 213,5,16,0,0,212,211,1,0,0,0,212,213,1,0,0,0,213,217,1,0,0,0,214, - 216,3,24,12,0,215,214,1,0,0,0,216,219,1,0,0,0,217,215,1,0,0,0,217, - 218,1,0,0,0,218,220,1,0,0,0,219,217,1,0,0,0,220,237,3,14,7,0,221, - 229,5,16,0,0,222,223,5,17,0,0,223,225,5,16,0,0,224,222,1,0,0,0,224, - 225,1,0,0,0,225,226,1,0,0,0,226,230,5,28,0,0,227,230,5,29,0,0,228, - 230,3,16,8,0,229,224,1,0,0,0,229,227,1,0,0,0,229,228,1,0,0,0,230, - 237,1,0,0,0,231,237,5,10,0,0,232,233,5,11,0,0,233,237,5,18,0,0,234, - 235,5,18,0,0,235,237,5,12,0,0,236,195,1,0,0,0,236,201,1,0,0,0,236, - 209,1,0,0,0,236,221,1,0,0,0,236,231,1,0,0,0,236,232,1,0,0,0,236, - 234,1,0,0,0,237,19,1,0,0,0,238,239,7,2,0,0,239,21,1,0,0,0,240,241, - 7,3,0,0,241,23,1,0,0,0,242,243,7,4,0,0,243,25,1,0,0,0,244,245,7, - 5,0,0,245,27,1,0,0,0,24,35,54,97,102,108,113,117,120,145,150,155, - 160,171,175,180,183,190,195,209,212,217,224,229,236 + 3,115,9,3,1,3,3,3,118,8,3,1,3,5,3,121,8,3,10,3,12,3,124,9,3,1,3, + 3,3,127,8,3,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5, + 1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,152,8,5,1,6,1,6,1,6, + 3,6,157,8,6,1,6,1,6,1,6,3,6,162,8,6,1,6,5,6,165,8,6,10,6,12,6,168, + 9,6,1,6,1,6,1,6,1,6,1,6,1,6,5,6,176,8,6,10,6,12,6,179,9,6,1,6,3, + 6,182,8,6,1,7,1,7,1,7,3,7,187,8,7,1,8,3,8,190,8,8,1,8,1,8,1,8,5, + 8,195,8,8,10,8,12,8,198,9,8,1,9,1,9,3,9,202,8,9,1,9,1,9,1,9,1,9, + 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,216,8,9,1,9,3,9,219,8,9,1,9, + 5,9,222,8,9,10,9,12,9,225,9,9,1,9,1,9,1,9,1,9,3,9,231,8,9,1,9,1, + 9,1,9,3,9,236,8,9,1,9,1,9,1,9,1,9,1,9,3,9,243,8,9,1,10,1,10,1,11, + 1,11,1,12,1,12,1,13,1,13,1,13,0,0,14,0,2,4,6,8,10,12,14,16,18,20, + 22,24,26,0,6,2,0,3,3,13,13,2,0,25,26,32,32,2,0,16,16,33,33,2,0,14, + 14,33,33,1,0,4,7,2,0,27,27,30,30,278,0,28,1,0,0,0,2,54,1,0,0,0,4, + 97,1,0,0,0,6,102,1,0,0,0,8,128,1,0,0,0,10,151,1,0,0,0,12,181,1,0, + 0,0,14,186,1,0,0,0,16,189,1,0,0,0,18,242,1,0,0,0,20,244,1,0,0,0, + 22,246,1,0,0,0,24,248,1,0,0,0,26,250,1,0,0,0,28,35,5,1,0,0,29,30, + 5,23,0,0,30,31,3,4,2,0,31,32,5,24,0,0,32,34,1,0,0,0,33,29,1,0,0, + 0,34,37,1,0,0,0,35,33,1,0,0,0,35,36,1,0,0,0,36,38,1,0,0,0,37,35, + 1,0,0,0,38,39,3,2,1,0,39,40,5,1,0,0,40,1,1,0,0,0,41,42,3,4,2,0,42, + 43,3,6,3,0,43,44,5,2,0,0,44,45,5,14,0,0,45,55,1,0,0,0,46,47,3,4, + 2,0,47,48,3,6,3,0,48,55,1,0,0,0,49,50,3,6,3,0,50,51,5,2,0,0,51,52, + 5,14,0,0,52,55,1,0,0,0,53,55,3,6,3,0,54,41,1,0,0,0,54,46,1,0,0,0, + 54,49,1,0,0,0,54,53,1,0,0,0,55,3,1,0,0,0,56,57,3,6,3,0,57,58,3,10, + 5,0,58,98,1,0,0,0,59,60,3,6,3,0,60,61,3,10,5,0,61,62,3,4,2,0,62, + 98,1,0,0,0,63,64,5,21,0,0,64,65,3,4,2,0,65,66,5,22,0,0,66,98,1,0, + 0,0,67,68,3,6,3,0,68,69,3,10,5,0,69,70,5,21,0,0,70,71,3,4,2,0,71, + 72,5,22,0,0,72,73,3,4,2,0,73,98,1,0,0,0,74,75,3,6,3,0,75,76,3,10, + 5,0,76,77,5,21,0,0,77,78,3,4,2,0,78,79,5,22,0,0,79,80,5,21,0,0,80, + 81,3,4,2,0,81,82,5,22,0,0,82,83,3,4,2,0,83,98,1,0,0,0,84,85,3,6, + 3,0,85,86,3,10,5,0,86,87,5,21,0,0,87,88,3,4,2,0,88,89,5,22,0,0,89, + 90,5,21,0,0,90,91,3,4,2,0,91,92,5,22,0,0,92,93,5,21,0,0,93,94,3, + 4,2,0,94,95,5,22,0,0,95,96,3,4,2,0,96,98,1,0,0,0,97,56,1,0,0,0,97, + 59,1,0,0,0,97,63,1,0,0,0,97,67,1,0,0,0,97,74,1,0,0,0,97,84,1,0,0, + 0,98,5,1,0,0,0,99,101,3,18,9,0,100,99,1,0,0,0,101,104,1,0,0,0,102, + 100,1,0,0,0,102,103,1,0,0,0,103,106,1,0,0,0,104,102,1,0,0,0,105, + 107,3,8,4,0,106,105,1,0,0,0,107,108,1,0,0,0,108,106,1,0,0,0,108, + 109,1,0,0,0,109,113,1,0,0,0,110,112,3,18,9,0,111,110,1,0,0,0,112, + 115,1,0,0,0,113,111,1,0,0,0,113,114,1,0,0,0,114,117,1,0,0,0,115, + 113,1,0,0,0,116,118,5,15,0,0,117,116,1,0,0,0,117,118,1,0,0,0,118, + 122,1,0,0,0,119,121,3,18,9,0,120,119,1,0,0,0,121,124,1,0,0,0,122, + 120,1,0,0,0,122,123,1,0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,125, + 127,5,14,0,0,126,125,1,0,0,0,126,127,1,0,0,0,127,7,1,0,0,0,128,129, + 7,0,0,0,129,9,1,0,0,0,130,131,5,19,0,0,131,132,3,22,11,0,132,133, + 5,16,0,0,133,134,5,18,0,0,134,135,3,20,10,0,135,136,5,20,0,0,136, + 152,1,0,0,0,137,138,5,19,0,0,138,139,5,16,0,0,139,140,5,18,0,0,140, + 141,3,20,10,0,141,142,5,20,0,0,142,152,1,0,0,0,143,144,3,22,11,0, + 144,145,5,16,0,0,145,146,5,18,0,0,146,147,3,20,10,0,147,152,1,0, + 0,0,148,149,3,22,11,0,149,150,5,16,0,0,150,152,1,0,0,0,151,130,1, + 0,0,0,151,137,1,0,0,0,151,143,1,0,0,0,151,148,1,0,0,0,152,11,1,0, + 0,0,153,154,5,31,0,0,154,156,5,23,0,0,155,157,3,26,13,0,156,155, + 1,0,0,0,156,157,1,0,0,0,157,158,1,0,0,0,158,166,5,16,0,0,159,161, + 5,17,0,0,160,162,3,26,13,0,161,160,1,0,0,0,161,162,1,0,0,0,162,163, + 1,0,0,0,163,165,5,16,0,0,164,159,1,0,0,0,165,168,1,0,0,0,166,164, + 1,0,0,0,166,167,1,0,0,0,167,169,1,0,0,0,168,166,1,0,0,0,169,182, + 5,24,0,0,170,171,5,27,0,0,171,172,5,23,0,0,172,177,5,16,0,0,173, + 174,5,17,0,0,174,176,5,16,0,0,175,173,1,0,0,0,176,179,1,0,0,0,177, + 175,1,0,0,0,177,178,1,0,0,0,178,180,1,0,0,0,179,177,1,0,0,0,180, + 182,5,24,0,0,181,153,1,0,0,0,181,170,1,0,0,0,182,13,1,0,0,0,183, + 187,5,13,0,0,184,187,3,24,12,0,185,187,5,8,0,0,186,183,1,0,0,0,186, + 184,1,0,0,0,186,185,1,0,0,0,187,15,1,0,0,0,188,190,7,1,0,0,189,188, + 1,0,0,0,189,190,1,0,0,0,190,191,1,0,0,0,191,192,5,4,0,0,192,196, + 5,16,0,0,193,195,3,12,6,0,194,193,1,0,0,0,195,198,1,0,0,0,196,194, + 1,0,0,0,196,197,1,0,0,0,197,17,1,0,0,0,198,196,1,0,0,0,199,200,5, + 16,0,0,200,202,5,17,0,0,201,199,1,0,0,0,201,202,1,0,0,0,202,203, + 1,0,0,0,203,204,5,16,0,0,204,205,5,18,0,0,205,206,5,9,0,0,206,243, + 5,18,0,0,207,208,5,16,0,0,208,209,5,18,0,0,209,210,3,24,12,0,210, + 211,5,18,0,0,211,212,3,14,7,0,212,213,5,18,0,0,213,243,1,0,0,0,214, + 216,5,18,0,0,215,214,1,0,0,0,215,216,1,0,0,0,216,218,1,0,0,0,217, + 219,5,16,0,0,218,217,1,0,0,0,218,219,1,0,0,0,219,223,1,0,0,0,220, + 222,3,24,12,0,221,220,1,0,0,0,222,225,1,0,0,0,223,221,1,0,0,0,223, + 224,1,0,0,0,224,226,1,0,0,0,225,223,1,0,0,0,226,243,3,14,7,0,227, + 235,5,16,0,0,228,229,5,17,0,0,229,231,5,16,0,0,230,228,1,0,0,0,230, + 231,1,0,0,0,231,232,1,0,0,0,232,236,5,28,0,0,233,236,5,29,0,0,234, + 236,3,16,8,0,235,230,1,0,0,0,235,233,1,0,0,0,235,234,1,0,0,0,236, + 243,1,0,0,0,237,243,5,10,0,0,238,239,5,11,0,0,239,243,5,18,0,0,240, + 241,5,18,0,0,241,243,5,12,0,0,242,201,1,0,0,0,242,207,1,0,0,0,242, + 215,1,0,0,0,242,227,1,0,0,0,242,237,1,0,0,0,242,238,1,0,0,0,242, + 240,1,0,0,0,243,19,1,0,0,0,244,245,7,2,0,0,245,21,1,0,0,0,246,247, + 7,3,0,0,247,23,1,0,0,0,248,249,7,4,0,0,249,25,1,0,0,0,250,251,7, + 5,0,0,251,27,1,0,0,0,25,35,54,97,102,108,113,117,122,126,151,156, + 161,166,177,181,186,189,196,201,215,218,223,230,235,242 ] class GlycanParser ( Parser ): @@ -586,13 +588,14 @@ def deriv(self): self.state = 113 self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 110 - self.modi() + _alt = self._interp.adaptivePredict(self._input,5,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 110 + self.modi() self.state = 115 self._errHandler.sync(self) - _la = self._input.LA(1) + _alt = self._interp.adaptivePredict(self._input,5,self._ctx) self.state = 117 self._errHandler.sync(self) @@ -602,11 +605,21 @@ def deriv(self): self.match(GlycanParser.RING) - self.state = 120 + self.state = 122 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,7,self._ctx) - if la_ == 1: + _la = self._input.LA(1) + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): self.state = 119 + self.modi() + self.state = 124 + self._errHandler.sync(self) + _la = self._input.LA(1) + + self.state = 126 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,8,self._ctx) + if la_ == 1: + self.state = 125 self.match(GlycanParser.TYPE) @@ -653,7 +666,7 @@ def saci(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 122 + self.state = 128 _la = self._input.LA(1) if not(_la==3 or _la==13): self._errHandler.recoverInline(self) @@ -715,56 +728,56 @@ def con(self): localctx = GlycanParser.ConContext(self, self._ctx, self.state) self.enterRule(localctx, 10, self.RULE_con) try: - self.state = 145 + self.state = 151 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,8,self._ctx) + la_ = self._interp.adaptivePredict(self._input,9,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 124 + self.state = 130 self.match(GlycanParser.LPAR) - self.state = 125 + self.state = 131 self.typi() - self.state = 126 + self.state = 132 self.match(GlycanParser.NUM) - self.state = 127 + self.state = 133 self.match(GlycanParser.DASH) - self.state = 128 + self.state = 134 self.qnum() - self.state = 129 + self.state = 135 self.match(GlycanParser.RPAR) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 131 + self.state = 137 self.match(GlycanParser.LPAR) - self.state = 132 + self.state = 138 self.match(GlycanParser.NUM) - self.state = 133 + self.state = 139 self.match(GlycanParser.DASH) - self.state = 134 + self.state = 140 self.qnum() - self.state = 135 + self.state = 141 self.match(GlycanParser.RPAR) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 137 + self.state = 143 self.typi() - self.state = 138 + self.state = 144 self.match(GlycanParser.NUM) - self.state = 139 + self.state = 145 self.match(GlycanParser.DASH) - self.state = 140 + self.state = 146 self.qnum() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 142 + self.state = 148 self.typi() - self.state = 143 + self.state = 149 self.match(GlycanParser.NUM) pass @@ -836,69 +849,69 @@ def add(self): self.enterRule(localctx, 12, self.RULE_add) self._la = 0 # Token type try: - self.state = 175 + self.state = 181 self._errHandler.sync(self) token = self._input.LA(1) if token in [31]: self.enterOuterAlt(localctx, 1) - self.state = 147 + self.state = 153 self.match(GlycanParser.EQ) - self.state = 148 + self.state = 154 self.match(GlycanParser.LBRACK) - self.state = 150 + self.state = 156 self._errHandler.sync(self) _la = self._input.LA(1) if _la==27 or _la==30: - self.state = 149 + self.state = 155 self.ct() - self.state = 152 + self.state = 158 self.match(GlycanParser.NUM) - self.state = 160 + self.state = 166 self._errHandler.sync(self) _la = self._input.LA(1) while _la==17: - self.state = 153 + self.state = 159 self.match(GlycanParser.COLON) - self.state = 155 + self.state = 161 self._errHandler.sync(self) _la = self._input.LA(1) if _la==27 or _la==30: - self.state = 154 + self.state = 160 self.ct() - self.state = 157 + self.state = 163 self.match(GlycanParser.NUM) - self.state = 162 + self.state = 168 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 163 + self.state = 169 self.match(GlycanParser.RBRACK) pass elif token in [27]: self.enterOuterAlt(localctx, 2) - self.state = 164 + self.state = 170 self.match(GlycanParser.C) - self.state = 165 + self.state = 171 self.match(GlycanParser.LBRACK) - self.state = 166 + self.state = 172 self.match(GlycanParser.NUM) - self.state = 171 + self.state = 177 self._errHandler.sync(self) _la = self._input.LA(1) while _la==17: - self.state = 167 + self.state = 173 self.match(GlycanParser.COLON) - self.state = 168 + self.state = 174 self.match(GlycanParser.NUM) - self.state = 173 + self.state = 179 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 174 + self.state = 180 self.match(GlycanParser.RBRACK) pass else: @@ -949,22 +962,22 @@ def fgi(self): localctx = GlycanParser.FgiContext(self, self._ctx, self.state) self.enterRule(localctx, 14, self.RULE_fgi) try: - self.state = 180 + self.state = 186 self._errHandler.sync(self) token = self._input.LA(1) if token in [13]: self.enterOuterAlt(localctx, 1) - self.state = 177 + self.state = 183 self.match(GlycanParser.COUNT) pass elif token in [4, 5, 6, 7]: self.enterOuterAlt(localctx, 2) - self.state = 178 + self.state = 184 self.bridge() pass elif token in [8]: self.enterOuterAlt(localctx, 3) - self.state = 179 + self.state = 185 self.match(GlycanParser.FG) pass else: @@ -1029,11 +1042,11 @@ def carb(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 183 + self.state = 189 self._errHandler.sync(self) _la = self._input.LA(1) if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0): - self.state = 182 + self.state = 188 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0)): self._errHandler.recoverInline(self) @@ -1042,17 +1055,17 @@ def carb(self): self.consume() - self.state = 185 + self.state = 191 self.match(GlycanParser.CARBON) - self.state = 186 + self.state = 192 self.match(GlycanParser.NUM) - self.state = 190 + self.state = 196 self._errHandler.sync(self) _la = self._input.LA(1) while _la==27 or _la==31: - self.state = 187 + self.state = 193 self.add() - self.state = 192 + self.state = 198 self._errHandler.sync(self) _la = self._input.LA(1) @@ -1140,107 +1153,107 @@ def modi(self): self.enterRule(localctx, 18, self.RULE_modi) self._la = 0 # Token type try: - self.state = 236 + self.state = 242 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,23,self._ctx) + la_ = self._interp.adaptivePredict(self._input,24,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 195 + self.state = 201 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,17,self._ctx) + la_ = self._interp.adaptivePredict(self._input,18,self._ctx) if la_ == 1: - self.state = 193 + self.state = 199 self.match(GlycanParser.NUM) - self.state = 194 + self.state = 200 self.match(GlycanParser.COLON) - self.state = 197 + self.state = 203 self.match(GlycanParser.NUM) - self.state = 198 + self.state = 204 self.match(GlycanParser.DASH) - self.state = 199 + self.state = 205 self.match(GlycanParser.ANHYDRO) - self.state = 200 + self.state = 206 self.match(GlycanParser.DASH) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 201 + self.state = 207 self.match(GlycanParser.NUM) - self.state = 202 + self.state = 208 self.match(GlycanParser.DASH) - self.state = 203 + self.state = 209 self.bridge() - self.state = 204 + self.state = 210 self.match(GlycanParser.DASH) - self.state = 205 + self.state = 211 self.fgi() - self.state = 206 + self.state = 212 self.match(GlycanParser.DASH) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 209 + self.state = 215 self._errHandler.sync(self) _la = self._input.LA(1) if _la==18: - self.state = 208 + self.state = 214 self.match(GlycanParser.DASH) - self.state = 212 + self.state = 218 self._errHandler.sync(self) _la = self._input.LA(1) if _la==16: - self.state = 211 + self.state = 217 self.match(GlycanParser.NUM) - self.state = 217 + self.state = 223 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,20,self._ctx) + _alt = self._interp.adaptivePredict(self._input,21,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 214 + self.state = 220 self.bridge() - self.state = 219 + self.state = 225 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,20,self._ctx) + _alt = self._interp.adaptivePredict(self._input,21,self._ctx) - self.state = 220 + self.state = 226 self.fgi() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 221 + self.state = 227 self.match(GlycanParser.NUM) - self.state = 229 + self.state = 235 self._errHandler.sync(self) token = self._input.LA(1) if token in [17, 28]: - self.state = 224 + self.state = 230 self._errHandler.sync(self) _la = self._input.LA(1) if _la==17: - self.state = 222 + self.state = 228 self.match(GlycanParser.COLON) - self.state = 223 + self.state = 229 self.match(GlycanParser.NUM) - self.state = 226 + self.state = 232 self.match(GlycanParser.D) pass elif token in [29]: - self.state = 227 + self.state = 233 self.match(GlycanParser.E) pass elif token in [4, 25, 26, 32]: - self.state = 228 + self.state = 234 self.carb() pass else: @@ -1250,23 +1263,23 @@ def modi(self): elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 231 + self.state = 237 self.match(GlycanParser.HEAD) pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 232 + self.state = 238 self.match(GlycanParser.HEADD) - self.state = 233 + self.state = 239 self.match(GlycanParser.DASH) pass elif la_ == 7: self.enterOuterAlt(localctx, 7) - self.state = 234 + self.state = 240 self.match(GlycanParser.DASH) - self.state = 235 + self.state = 241 self.match(GlycanParser.END) pass @@ -1314,7 +1327,7 @@ def qnum(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 238 + self.state = 244 _la = self._input.LA(1) if not(_la==16 or _la==33): self._errHandler.recoverInline(self) @@ -1364,7 +1377,7 @@ def typi(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 240 + self.state = 246 _la = self._input.LA(1) if not(_la==14 or _la==33): self._errHandler.recoverInline(self) @@ -1420,7 +1433,7 @@ def bridge(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 242 + self.state = 248 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 240) != 0)): self._errHandler.recoverInline(self) @@ -1470,7 +1483,7 @@ def ct(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 244 + self.state = 250 _la = self._input.LA(1) if not(_la==27 or _la==30): self._errHandler.recoverInline(self) From 3989518c0d5e9d8121887578ba0dc4fe6d03ac63 Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Tue, 15 Oct 2024 23:56:05 +0200 Subject: [PATCH 12/14] Minor fixes --- glyles/glycans/mono/enum_c.py | 4 +- glyles/glycans/mono/reactor.py | 14 +- glyles/glycans/utils.py | 4 +- glyles/grammar/Glycan.g4 | 3 +- glyles/grammar/Glycan.interp | 2 +- glyles/grammar/GlycanParser.py | 559 ++++++++++++++++++++------------- 6 files changed, 350 insertions(+), 236 deletions(-) diff --git a/glyles/glycans/mono/enum_c.py b/glyles/glycans/mono/enum_c.py index 6131a17..9c85095 100644 --- a/glyles/glycans/mono/enum_c.py +++ b/glyles/glycans/mono/enum_c.py @@ -87,8 +87,8 @@ def enumerate_c_atoms(monomer, c_atoms, ringo): children = np.where(np.array(monomer.adjacency[c_id, :] == 1) & (monomer.x[:, 0] == 6) & (monomer.x[:, 3] == 1))[0] for c in children: - if int(c) not in c_tree.nodes: - stack.append((c_id, int(c))) + if c.item() not in c_tree.nodes: + stack.append((c_id, c.item())) # find the deepest node and rehang the tree to this node deepest_id, _ = c_tree.deepest_node() diff --git a/glyles/glycans/mono/reactor.py b/glyles/glycans/mono/reactor.py index 94bd1ec..37f3560 100644 --- a/glyles/glycans/mono/reactor.py +++ b/glyles/glycans/mono/reactor.py @@ -54,10 +54,10 @@ "A": "OC(=O)C", "Allyl": "CC=C", "Ac": "C(=O)C", - "Ang": "OC(=O)C/(C)=C\C", + "Ang": "OC(=O)C/(C)=C\\C", "Bz": "C(=O)c2ccccc2", "Bn": "Cc2ccccc2", - "cdPam": "OC(=O)CCCCCCC/C=C\CCCCCC", + "cdPam": "OC(=O)CCCCCCC/C=C\\CCCCCC", "Cet": "CCC(=O)O", "Cin": "OC(=O)/C=C/c2ccccc2", "Coum": "OC(=O)/C=C/c1ccc(O)ccc1", @@ -72,7 +72,7 @@ "Gro": "OCC(O)CO", "He": "C(O)C", "Lac": "OC(=O)C(O)C", - "Lin": "OC(=O)CCCCCCC/C=C\C/C=C\CCCCC", + "Lin": "OC(=O)CCCCCCC/C=C\\C/C=C\\CCCCC", "Mal": "O[C@H](C(=O)O)CC(=O)O", "Ole": "OC(=O)CCCCCCC/C=C\CCCCCCCC", "Ph": "c2ccccc2", @@ -93,9 +93,9 @@ # some special cases "3oxoMyr": "OC(=O)CC(=O)CCCCCCCCCCC", - "17HOLin": "OC(=O)CCCCCCC/C=C\C/C=C\CCCC(O)C", + "17HOLin": "OC(=O)CCCCCCC/C=C\\C/C=C\\CCCC(O)C", "aLnn": "OC(=O)CCCCCCCC=CCC=CCC=CCC", - "cVac": "OC(=O)CCCCCCCCC/C=C\CCCCCC", + "cVac": "OC(=O)CCCCCCCCC/C=C\\CCCCCC", "d2Ach": "OC(=O)CCCCCCC=CCC=CCCCCCCCC", "d3Ach": "OC(=O)CCCC=CCC=CCC=CCCCCCCCC", "d4Ach": "OC(=O)CCCC=CCC=CCC=CCC=CCCCCC", @@ -147,7 +147,7 @@ "Geddic": "OC(=O)" + "C" * 33, "Ceroplastic": "OC(=O)" + "C" * 35, "Phthi": "OC(=O)C(C)=CC(C)CC(C)" + "C" * 18, - "Ner": "OC(=O)" + "C" * 13 + "/C=C\C" + "C" * 7, + "Ner": "OC(=O)" + "C" * 13 + "/C=C\\C" + "C" * 7, } # list of functional groups that preserve the atom it is attached to instead of replacing it @@ -524,7 +524,7 @@ def add_to_carbon(self, chain, i, placeholder): # identify a hydrogen bound to the carbon atom to attach the functional group to h = None - for n in tmp.GetAtomWithIdx(int(np.where(self.monomer.x[:, 1] == i)[0])).GetNeighbors(): + for n in tmp.GetAtomWithIdx(np.where(self.monomer.x[:, 1] == i)[0].item()).GetNeighbors(): if n.GetAtomicNum() == 1: h = n.GetIdx() break diff --git a/glyles/glycans/utils.py b/glyles/glycans/utils.py index c58d565..fd46eef 100644 --- a/glyles/glycans/utils.py +++ b/glyles/glycans/utils.py @@ -417,8 +417,8 @@ def find_longest_c_chain(c_atoms, adjacency, a_type): children = np.argwhere(np.array(adjacency[c_id, :] == 1) & (a_type == 6)) for c in children: - if int(c) not in c_tree.nodes: - stack.append((c_id, int(c))) + if c.item() not in c_tree.nodes: + stack.append((c_id, c.item())) # find the deepest node and rehang the tree to this node deepest_id, _ = c_tree.deepest_node() diff --git a/glyles/grammar/Glycan.g4 b/glyles/grammar/Glycan.g4 index 58d6451..8037d62 100644 --- a/glyles/grammar/Glycan.g4 +++ b/glyles/grammar/Glycan.g4 @@ -15,7 +15,8 @@ branch: | deriv con LBRACE branch RBRACE LBRACE branch RBRACE branch | deriv con LBRACE branch RBRACE LBRACE branch RBRACE LBRACE branch RBRACE branch; deriv: - modi* saci+ modi* RING? modi* TYPE?; + modi* saci+ modi* RING? modi* TYPE? modi* + | modi* saci+ modi* TYPE? modi* RING? modi*; saci: COUNT | SAC; con: LPAR typi NUM DASH qnum RPAR diff --git a/glyles/grammar/Glycan.interp b/glyles/grammar/Glycan.interp index db1dc70..b0b496c 100644 --- a/glyles/grammar/Glycan.interp +++ b/glyles/grammar/Glycan.interp @@ -88,4 +88,4 @@ ct atn: -[4, 1, 33, 253, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 34, 8, 0, 10, 0, 12, 0, 37, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 55, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 98, 8, 2, 1, 3, 5, 3, 101, 8, 3, 10, 3, 12, 3, 104, 9, 3, 1, 3, 4, 3, 107, 8, 3, 11, 3, 12, 3, 108, 1, 3, 5, 3, 112, 8, 3, 10,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2, 0, 14, 14, 33, 33, 1, 0, 4, 7, 2, 0, 27, 27, 30, 30, 278, 0, 28, 1, 0, 0, 0, 2, 54, 1, 0, 0, 0, 4, 97, 1, 0, 0, 0, 6, 102, 1, 0, 0, 0, 8, 128, 1, 0, 0, 0, 10, 151, 1, 0, 0, 0, 12, 181, 1, 0, 0, 0, 14, 186, 1, 0, 0, 0, 16, 189, 1, 0, 0, 0, 18, 242, 1, 0, 0, 0, 20, 244, 1, 0, 0, 0, 22, 246, 1, 0, 0, 0, 24, 248, 1, 0, 0, 0, 26, 250, 1, 0, 0, 0, 28, 35, 5, 1, 0, 0, 29, 30, 5, 23, 0, 0, 30, 31, 3, 4, 2, 0, 31, 32, 5, 24, 0, 0, 32, 34, 1, 0, 0, 0, 33, 29, 1, 0, 0, 0, 34, 37, 1, 0, 0, 0, 35, 33, 1, 0, 0, 0, 35, 36, 1, 0, 0, 0, 36, 38, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 38, 39, 3, 2, 1, 0, 39, 40, 5, 1, 0, 0, 40, 1, 1, 0, 0, 0, 41, 42, 3, 4, 2, 0, 42, 43, 3, 6, 3, 0, 43, 44, 5, 2, 0, 0, 44, 45, 5, 14, 0, 0, 45, 55, 1, 0, 0, 0, 46, 47, 3, 4, 2, 0, 47, 48, 3, 6, 3, 0, 48, 55, 1, 0, 0, 0, 49, 50, 3, 6, 3, 0, 50, 51, 5, 2, 0, 0, 51, 52, 5, 14, 0, 0, 52, 55, 1, 0, 0, 0, 53, 55, 3, 6, 3, 0, 54, 41, 1, 0, 0, 0, 54, 46, 1, 0, 0, 0, 54, 49, 1, 0, 0, 0, 54, 53, 1, 0, 0, 0, 55, 3, 1, 0, 0, 0, 56, 57, 3, 6, 3, 0, 57, 58, 3, 10, 5, 0, 58, 98, 1, 0, 0, 0, 59, 60, 3, 6, 3, 0, 60, 61, 3, 10, 5, 0, 61, 62, 3, 4, 2, 0, 62, 98, 1, 0, 0, 0, 63, 64, 5, 21, 0, 0, 64, 65, 3, 4, 2, 0, 65, 66, 5, 22, 0, 0, 66, 98, 1, 0, 0, 0, 67, 68, 3, 6, 3, 0, 68, 69, 3, 10, 5, 0, 69, 70, 5, 21, 0, 0, 70, 71, 3, 4, 2, 0, 71, 72, 5, 22, 0, 0, 72, 73, 3, 4, 2, 0, 73, 98, 1, 0, 0, 0, 74, 75, 3, 6, 3, 0, 75, 76, 3, 10, 5, 0, 76, 77, 5, 21, 0, 0, 77, 78, 3, 4, 2, 0, 78, 79, 5, 22, 0, 0, 79, 80, 5, 21, 0, 0, 80, 81, 3, 4, 2, 0, 81, 82, 5, 22, 0, 0, 82, 83, 3, 4, 2, 0, 83, 98, 1, 0, 0, 0, 84, 85, 3, 6, 3, 0, 85, 86, 3, 10, 5, 0, 86, 87, 5, 21, 0, 0, 87, 88, 3, 4, 2, 0, 88, 89, 5, 22, 0, 0, 89, 90, 5, 21, 0, 0, 90, 91, 3, 4, 2, 0, 91, 92, 5, 22, 0, 0, 92, 93, 5, 21, 0, 0, 93, 94, 3, 4, 2, 0, 94, 95, 5, 22, 0, 0, 95, 96, 3, 4, 2, 0, 96, 98, 1, 0, 0, 0, 97, 56, 1, 0, 0, 0, 97, 59, 1, 0, 0, 0, 97, 63, 1, 0, 0, 0, 97, 67, 1, 0, 0, 0, 97, 74, 1, 0, 0, 0, 97, 84, 1, 0, 0, 0, 98, 5, 1, 0, 0, 0, 99, 101, 3, 18, 9, 0, 100, 99, 1, 0, 0, 0, 101, 104, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 107, 3, 8, 4, 0, 106, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 113, 1, 0, 0, 0, 110, 112, 3, 18, 9, 0, 111, 110, 1, 0, 0, 0, 112, 115, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 117, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 116, 118, 5, 15, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 122, 1, 0, 0, 0, 119, 121, 3, 18, 9, 0, 120, 119, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 127, 5, 14, 0, 0, 126, 125, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 7, 1, 0, 0, 0, 128, 129, 7, 0, 0, 0, 129, 9, 1, 0, 0, 0, 130, 131, 5, 19, 0, 0, 131, 132, 3, 22, 11, 0, 132, 133, 5, 16, 0, 0, 133, 134, 5, 18, 0, 0, 134, 135, 3, 20, 10, 0, 135, 136, 5, 20, 0, 0, 136, 152, 1, 0, 0, 0, 137, 138, 5, 19, 0, 0, 138, 139, 5, 16, 0, 0, 139, 140, 5, 18, 0, 0, 140, 141, 3, 20, 10, 0, 141, 142, 5, 20, 0, 0, 142, 152, 1, 0, 0, 0, 143, 144, 3, 22, 11, 0, 144, 145, 5, 16, 0, 0, 145, 146, 5, 18, 0, 0, 146, 147, 3, 20, 10, 0, 147, 152, 1, 0, 0, 0, 148, 149, 3, 22, 11, 0, 149, 150, 5, 16, 0, 0, 150, 152, 1, 0, 0, 0, 151, 130, 1, 0, 0, 0, 151, 137, 1, 0, 0, 0, 151, 143, 1, 0, 0, 0, 151, 148, 1, 0, 0, 0, 152, 11, 1, 0, 0, 0, 153, 154, 5, 31, 0, 0, 154, 156, 5, 23, 0, 0, 155, 157, 3, 26, 13, 0, 156, 155, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 166, 5, 16, 0, 0, 159, 161, 5, 17, 0, 0, 160, 162, 3, 26, 13, 0, 161, 160, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 165, 5, 16, 0, 0, 164, 159, 1, 0, 0, 0, 165, 168, 1, 0, 0, 0, 166, 164, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 167, 169, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 169, 182, 5, 24, 0, 0, 170, 171, 5, 27, 0, 0, 171, 172, 5, 23, 0, 0, 172, 177, 5, 16, 0, 0, 173, 174, 5, 17, 0, 0, 174, 176, 5, 16, 0, 0, 175, 173, 1, 0, 0, 0, 176, 179, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 180, 1, 0, 0, 0, 179, 177, 1, 0, 0, 0, 180, 182, 5, 24, 0, 0, 181, 153, 1, 0, 0, 0, 181, 170, 1, 0, 0, 0, 182, 13, 1, 0, 0, 0, 183, 187, 5, 13, 0, 0, 184, 187, 3, 24, 12, 0, 185, 187, 5, 8, 0, 0, 186, 183, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, 186, 185, 1, 0, 0, 0, 187, 15, 1, 0, 0, 0, 188, 190, 7, 1, 0, 0, 189, 188, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 192, 5, 4, 0, 0, 192, 196, 5, 16, 0, 0, 193, 195, 3, 12, 6, 0, 194, 193, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 17, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 200, 5, 16, 0, 0, 200, 202, 5, 17, 0, 0, 201, 199, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 204, 5, 16, 0, 0, 204, 205, 5, 18, 0, 0, 205, 206, 5, 9, 0, 0, 206, 243, 5, 18, 0, 0, 207, 208, 5, 16, 0, 0, 208, 209, 5, 18, 0, 0, 209, 210, 3, 24, 12, 0, 210, 211, 5, 18, 0, 0, 211, 212, 3, 14, 7, 0, 212, 213, 5, 18, 0, 0, 213, 243, 1, 0, 0, 0, 214, 216, 5, 18, 0, 0, 215, 214, 1, 0, 0, 0, 215, 216, 1, 0, 0, 0, 216, 218, 1, 0, 0, 0, 217, 219, 5, 16, 0, 0, 218, 217, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 223, 1, 0, 0, 0, 220, 222, 3, 24, 12, 0, 221, 220, 1, 0, 0, 0, 222, 225, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 223, 224, 1, 0, 0, 0, 224, 226, 1, 0, 0, 0, 225, 223, 1, 0, 0, 0, 226, 243, 3, 14, 7, 0, 227, 235, 5, 16, 0, 0, 228, 229, 5, 17, 0, 0, 229, 231, 5, 16, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 236, 5, 28, 0, 0, 233, 236, 5, 29, 0, 0, 234, 236, 3, 16, 8, 0, 235, 230, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 235, 234, 1, 0, 0, 0, 236, 243, 1, 0, 0, 0, 237, 243, 5, 10, 0, 0, 238, 239, 5, 11, 0, 0, 239, 243, 5, 18, 0, 0, 240, 241, 5, 18, 0, 0, 241, 243, 5, 12, 0, 0, 242, 201, 1, 0, 0, 0, 242, 207, 1, 0, 0, 0, 242, 215, 1, 0, 0, 0, 242, 227, 1, 0, 0, 0, 242, 237, 1, 0, 0, 0, 242, 238, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 243, 19, 1, 0, 0, 0, 244, 245, 7, 2, 0, 0, 245, 21, 1, 0, 0, 0, 246, 247, 7, 3, 0, 0, 247, 23, 1, 0, 0, 0, 248, 249, 7, 4, 0, 0, 249, 25, 1, 0, 0, 0, 250, 251, 7, 5, 0, 0, 251, 27, 1, 0, 0, 0, 25, 35, 54, 97, 102, 108, 113, 117, 122, 126, 151, 156, 161, 166, 177, 181, 186, 189, 196, 201, 215, 218,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32, 2, 0, 16, 16, 33, 33, 2, 0, 14, 14, 33, 33, 1, 0, 4, 7, 2, 0, 27, 27, 30, 30, 330, 0, 28, 1, 0, 0, 0, 2, 54, 1, 0, 0, 0, 4, 97, 1, 0, 0, 0, 6, 169, 1, 0, 0, 0, 8, 171, 1, 0, 0, 0, 10, 194, 1, 0, 0, 0, 12, 224, 1, 0, 0, 0, 14, 229, 1, 0, 0, 0, 16, 232, 1, 0, 0, 0, 18, 285, 1, 0, 0, 0, 20, 287, 1, 0, 0, 0, 22, 289, 1, 0, 0, 0, 24, 291, 1, 0, 0, 0, 26, 293, 1, 0, 0, 0, 28, 35, 5, 1, 0, 0, 29, 30, 5, 23, 0, 0, 30, 31, 3, 4, 2, 0, 31, 32, 5, 24, 0, 0, 32, 34, 1, 0, 0, 0, 33, 29, 1, 0, 0, 0, 34, 37, 1, 0, 0, 0, 35, 33, 1, 0, 0, 0, 35, 36, 1, 0, 0, 0, 36, 38, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 38, 39, 3, 2, 1, 0, 39, 40, 5, 1, 0, 0, 40, 1, 1, 0, 0, 0, 41, 42, 3, 4, 2, 0, 42, 43, 3, 6, 3, 0, 43, 44, 5, 2, 0, 0, 44, 45, 5, 14, 0, 0, 45, 55, 1, 0, 0, 0, 46, 47, 3, 4, 2, 0, 47, 48, 3, 6, 3, 0, 48, 55, 1, 0, 0, 0, 49, 50, 3, 6, 3, 0, 50, 51, 5, 2, 0, 0, 51, 52, 5, 14, 0, 0, 52, 55, 1, 0, 0, 0, 53, 55, 3, 6, 3, 0, 54, 41, 1, 0, 0, 0, 54, 46, 1, 0, 0, 0, 54, 49, 1, 0, 0, 0, 54, 53, 1, 0, 0, 0, 55, 3, 1, 0, 0, 0, 56, 57, 3, 6, 3, 0, 57, 58, 3, 10, 5, 0, 58, 98, 1, 0, 0, 0, 59, 60, 3, 6, 3, 0, 60, 61, 3, 10, 5, 0, 61, 62, 3, 4, 2, 0, 62, 98, 1, 0, 0, 0, 63, 64, 5, 21, 0, 0, 64, 65, 3, 4, 2, 0, 65, 66, 5, 22, 0, 0, 66, 98, 1, 0, 0, 0, 67, 68, 3, 6, 3, 0, 68, 69, 3, 10, 5, 0, 69, 70, 5, 21, 0, 0, 70, 71, 3, 4, 2, 0, 71, 72, 5, 22, 0, 0, 72, 73, 3, 4, 2, 0, 73, 98, 1, 0, 0, 0, 74, 75, 3, 6, 3, 0, 75, 76, 3, 10, 5, 0, 76, 77, 5, 21, 0, 0, 77, 78, 3, 4, 2, 0, 78, 79, 5, 22, 0, 0, 79, 80, 5, 21, 0, 0, 80, 81, 3, 4, 2, 0, 81, 82, 5, 22, 0, 0, 82, 83, 3, 4, 2, 0, 83, 98, 1, 0, 0, 0, 84, 85, 3, 6, 3, 0, 85, 86, 3, 10, 5, 0, 86, 87, 5, 21, 0, 0, 87, 88, 3, 4, 2, 0, 88, 89, 5, 22, 0, 0, 89, 90, 5, 21, 0, 0, 90, 91, 3, 4, 2, 0, 91, 92, 5, 22, 0, 0, 92, 93, 5, 21, 0, 0, 93, 94, 3, 4, 2, 0, 94, 95, 5, 22, 0, 0, 95, 96, 3, 4, 2, 0, 96, 98, 1, 0, 0, 0, 97, 56, 1, 0, 0, 0, 97, 59, 1, 0, 0, 0, 97, 63, 1, 0, 0, 0, 97, 67, 1, 0, 0, 0, 97, 74, 1, 0, 0, 0, 97, 84, 1, 0, 0, 0, 98, 5, 1, 0, 0, 0, 99, 101, 3, 18, 9, 0, 100, 99, 1, 0, 0, 0, 101, 104, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 107, 3, 8, 4, 0, 106, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 113, 1, 0, 0, 0, 110, 112, 3, 18, 9, 0, 111, 110, 1, 0, 0, 0, 112, 115, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 117, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 116, 118, 5, 15, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 122, 1, 0, 0, 0, 119, 121, 3, 18, 9, 0, 120, 119, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 127, 5, 14, 0, 0, 126, 125, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 131, 1, 0, 0, 0, 128, 130, 3, 18, 9, 0, 129, 128, 1, 0, 0, 0, 130, 133, 1, 0, 0, 0, 131, 129, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 170, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 134, 136, 3, 18, 9, 0, 135, 134, 1, 0, 0, 0, 136, 139, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 141, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 140, 142, 3, 8, 4, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 148, 1, 0, 0, 0, 145, 147, 3, 18, 9, 0, 146, 145, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 152, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 153, 5, 14, 0, 0, 152, 151, 1, 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 157, 1, 0, 0, 0, 154, 156, 3, 18, 9, 0, 155, 154, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 161, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 160, 162, 5, 15, 0, 0, 161, 160, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 166, 1, 0, 0, 0, 163, 165, 3, 18, 9, 0, 164, 163, 1, 0, 0, 0, 165, 168, 1, 0, 0, 0, 166, 164, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 167, 170, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 169, 102, 1, 0, 0, 0, 169, 137, 1, 0, 0, 0, 170, 7, 1, 0, 0, 0, 171, 172, 7, 0, 0, 0, 172, 9, 1, 0, 0, 0, 173, 174, 5, 19, 0, 0, 174, 175, 3, 22, 11, 0, 175, 176, 5, 16, 0, 0, 176, 177, 5, 18, 0, 0, 177, 178, 3, 20, 10, 0, 178, 179, 5, 20, 0, 0, 179, 195, 1, 0, 0, 0, 180, 181, 5, 19, 0, 0, 181, 182, 5, 16, 0, 0, 182, 183, 5, 18, 0, 0, 183, 184, 3, 20, 10, 0, 184, 185, 5, 20, 0, 0, 185, 195, 1, 0, 0, 0, 186, 187, 3, 22, 11, 0, 187, 188, 5, 16, 0, 0, 188, 189, 5, 18, 0, 0, 189, 190, 3, 20, 10, 0, 190, 195, 1, 0, 0, 0, 191, 192, 3, 22, 11, 0, 192, 193, 5, 16, 0, 0, 193, 195, 1, 0, 0, 0, 194, 173, 1, 0, 0, 0, 194, 180, 1, 0, 0, 0, 194, 186, 1, 0, 0, 0, 194, 191, 1, 0, 0, 0, 195, 11, 1, 0, 0, 0, 196, 197, 5, 31, 0, 0, 197, 199, 5, 23, 0, 0, 198, 200, 3, 26, 13, 0, 199, 198, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 209, 5, 16, 0, 0, 202, 204, 5, 17, 0, 0, 203, 205, 3, 26, 13, 0, 204, 203, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 206, 1, 0, 0, 0, 206, 208, 5, 16, 0, 0, 207, 202, 1, 0, 0, 0, 208, 211, 1, 0, 0, 0, 209, 207, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 212, 1, 0, 0, 0, 211, 209, 1, 0, 0, 0, 212, 225, 5, 24, 0, 0, 213, 214, 5, 27, 0, 0, 214, 215, 5, 23, 0, 0, 215, 220, 5, 16, 0, 0, 216, 217, 5, 17, 0, 0, 217, 219, 5, 16, 0, 0, 218, 216, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220, 218, 1, 0, 0, 0, 220, 221, 1, 0, 0, 0, 221, 223, 1, 0, 0, 0, 222, 220, 1, 0, 0, 0, 223, 225, 5, 24, 0, 0, 224, 196, 1, 0, 0, 0, 224, 213, 1, 0, 0, 0, 225, 13, 1, 0, 0, 0, 226, 230, 5, 13, 0, 0, 227, 230, 3, 24, 12, 0, 228, 230, 5, 8, 0, 0, 229, 226, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 15, 1, 0, 0, 0, 231, 233, 7, 1, 0, 0, 232, 231, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 235, 5, 4, 0, 0, 235, 239, 5, 16, 0, 0, 236, 238, 3, 12, 6, 0, 237, 236, 1, 0, 0, 0, 238, 241, 1, 0, 0, 0, 239, 237, 1, 0, 0, 0, 239, 240, 1, 0, 0, 0, 240, 17, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 242, 243, 5, 16, 0, 0, 243, 245, 5, 17, 0, 0, 244, 242, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 247, 5, 16, 0, 0, 247, 248, 5, 18, 0, 0, 248, 249, 5, 9, 0, 0, 249, 286, 5, 18, 0, 0, 250, 251, 5, 16, 0, 0, 251, 252, 5, 18, 0, 0, 252, 253, 3, 24, 12, 0, 253, 254, 5, 18, 0, 0, 254, 255, 3, 14, 7, 0, 255, 256, 5, 18, 0, 0, 256, 286, 1, 0, 0, 0, 257, 259, 5, 18, 0, 0, 258, 257, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 261, 1, 0, 0, 0, 260, 262, 5, 16, 0, 0, 261, 260, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 266, 1, 0, 0, 0, 263, 265, 3, 24, 12, 0, 264, 263, 1, 0, 0, 0, 265, 268, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 269, 1, 0, 0, 0, 268, 266, 1, 0, 0, 0, 269, 286, 3, 14, 7, 0, 270, 278, 5, 16, 0, 0, 271, 272, 5, 17, 0, 0, 272, 274, 5, 16, 0, 0, 273, 271, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, 275, 1, 0, 0, 0, 275, 279, 5, 28, 0, 0, 276, 279, 5, 29, 0, 0, 277, 279, 3, 16, 8, 0, 278, 273, 1, 0, 0, 0, 278, 276, 1, 0, 0, 0, 278, 277, 1, 0, 0, 0, 279, 286, 1, 0, 0, 0, 280, 286, 5, 10, 0, 0, 281, 282, 5, 11, 0, 0, 282, 286, 5, 18, 0, 0, 283, 284, 5, 18, 0, 0, 284, 286, 5, 12, 0, 0, 285, 244, 1, 0, 0, 0, 285, 250, 1, 0, 0, 0, 285, 258, 1, 0, 0, 0, 285, 270, 1, 0, 0, 0, 285, 280, 1, 0, 0, 0, 285, 281, 1, 0, 0, 0, 285, 283, 1, 0, 0, 0, 286, 19, 1, 0, 0, 0, 287, 288, 7, 2, 0, 0, 288, 21, 1, 0, 0, 0, 289, 290, 7, 3, 0, 0, 290, 23, 1, 0, 0, 0, 291, 292, 7, 4, 0, 0, 292, 25, 1, 0, 0, 0, 293, 294, 7, 5, 0, 0, 294, 27, 1, 0, 0, 0, 34, 35, 54, 97, 102, 108, 113, 117, 122, 126, 131, 137, 143, 148, 152, 157, 161, 166, 169, 194, 199, 204, 209, 220, 224, 229, 232, 239, 244, 258, 261, 266, 273, 278, 285] \ No newline at end of file diff --git a/glyles/grammar/GlycanParser.py b/glyles/grammar/GlycanParser.py index 26c5c70..ddce561 100644 --- a/glyles/grammar/GlycanParser.py +++ b/glyles/grammar/GlycanParser.py @@ -10,7 +10,7 @@ def serializedATN(): return [ - 4,1,33,253,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 4,1,33,296,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13, 1,0,1,0,1,0,1,0,1,0,5,0,34,8,0,10,0,12,0,37,9,0,1,0,1,0,1,0,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,55,8,1,1,2,1, @@ -19,86 +19,104 @@ def serializedATN(): 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,98,8,2,1,3,5,3,101,8,3,10,3,12, 3,104,9,3,1,3,4,3,107,8,3,11,3,12,3,108,1,3,5,3,112,8,3,10,3,12, 3,115,9,3,1,3,3,3,118,8,3,1,3,5,3,121,8,3,10,3,12,3,124,9,3,1,3, - 3,3,127,8,3,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5, - 1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,152,8,5,1,6,1,6,1,6, - 3,6,157,8,6,1,6,1,6,1,6,3,6,162,8,6,1,6,5,6,165,8,6,10,6,12,6,168, - 9,6,1,6,1,6,1,6,1,6,1,6,1,6,5,6,176,8,6,10,6,12,6,179,9,6,1,6,3, - 6,182,8,6,1,7,1,7,1,7,3,7,187,8,7,1,8,3,8,190,8,8,1,8,1,8,1,8,5, - 8,195,8,8,10,8,12,8,198,9,8,1,9,1,9,3,9,202,8,9,1,9,1,9,1,9,1,9, - 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,216,8,9,1,9,3,9,219,8,9,1,9, - 5,9,222,8,9,10,9,12,9,225,9,9,1,9,1,9,1,9,1,9,3,9,231,8,9,1,9,1, - 9,1,9,3,9,236,8,9,1,9,1,9,1,9,1,9,1,9,3,9,243,8,9,1,10,1,10,1,11, - 1,11,1,12,1,12,1,13,1,13,1,13,0,0,14,0,2,4,6,8,10,12,14,16,18,20, - 22,24,26,0,6,2,0,3,3,13,13,2,0,25,26,32,32,2,0,16,16,33,33,2,0,14, - 14,33,33,1,0,4,7,2,0,27,27,30,30,278,0,28,1,0,0,0,2,54,1,0,0,0,4, - 97,1,0,0,0,6,102,1,0,0,0,8,128,1,0,0,0,10,151,1,0,0,0,12,181,1,0, - 0,0,14,186,1,0,0,0,16,189,1,0,0,0,18,242,1,0,0,0,20,244,1,0,0,0, - 22,246,1,0,0,0,24,248,1,0,0,0,26,250,1,0,0,0,28,35,5,1,0,0,29,30, - 5,23,0,0,30,31,3,4,2,0,31,32,5,24,0,0,32,34,1,0,0,0,33,29,1,0,0, - 0,34,37,1,0,0,0,35,33,1,0,0,0,35,36,1,0,0,0,36,38,1,0,0,0,37,35, - 1,0,0,0,38,39,3,2,1,0,39,40,5,1,0,0,40,1,1,0,0,0,41,42,3,4,2,0,42, - 43,3,6,3,0,43,44,5,2,0,0,44,45,5,14,0,0,45,55,1,0,0,0,46,47,3,4, - 2,0,47,48,3,6,3,0,48,55,1,0,0,0,49,50,3,6,3,0,50,51,5,2,0,0,51,52, - 5,14,0,0,52,55,1,0,0,0,53,55,3,6,3,0,54,41,1,0,0,0,54,46,1,0,0,0, - 54,49,1,0,0,0,54,53,1,0,0,0,55,3,1,0,0,0,56,57,3,6,3,0,57,58,3,10, - 5,0,58,98,1,0,0,0,59,60,3,6,3,0,60,61,3,10,5,0,61,62,3,4,2,0,62, - 98,1,0,0,0,63,64,5,21,0,0,64,65,3,4,2,0,65,66,5,22,0,0,66,98,1,0, - 0,0,67,68,3,6,3,0,68,69,3,10,5,0,69,70,5,21,0,0,70,71,3,4,2,0,71, - 72,5,22,0,0,72,73,3,4,2,0,73,98,1,0,0,0,74,75,3,6,3,0,75,76,3,10, - 5,0,76,77,5,21,0,0,77,78,3,4,2,0,78,79,5,22,0,0,79,80,5,21,0,0,80, - 81,3,4,2,0,81,82,5,22,0,0,82,83,3,4,2,0,83,98,1,0,0,0,84,85,3,6, - 3,0,85,86,3,10,5,0,86,87,5,21,0,0,87,88,3,4,2,0,88,89,5,22,0,0,89, - 90,5,21,0,0,90,91,3,4,2,0,91,92,5,22,0,0,92,93,5,21,0,0,93,94,3, - 4,2,0,94,95,5,22,0,0,95,96,3,4,2,0,96,98,1,0,0,0,97,56,1,0,0,0,97, - 59,1,0,0,0,97,63,1,0,0,0,97,67,1,0,0,0,97,74,1,0,0,0,97,84,1,0,0, - 0,98,5,1,0,0,0,99,101,3,18,9,0,100,99,1,0,0,0,101,104,1,0,0,0,102, - 100,1,0,0,0,102,103,1,0,0,0,103,106,1,0,0,0,104,102,1,0,0,0,105, - 107,3,8,4,0,106,105,1,0,0,0,107,108,1,0,0,0,108,106,1,0,0,0,108, - 109,1,0,0,0,109,113,1,0,0,0,110,112,3,18,9,0,111,110,1,0,0,0,112, - 115,1,0,0,0,113,111,1,0,0,0,113,114,1,0,0,0,114,117,1,0,0,0,115, - 113,1,0,0,0,116,118,5,15,0,0,117,116,1,0,0,0,117,118,1,0,0,0,118, - 122,1,0,0,0,119,121,3,18,9,0,120,119,1,0,0,0,121,124,1,0,0,0,122, - 120,1,0,0,0,122,123,1,0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,125, - 127,5,14,0,0,126,125,1,0,0,0,126,127,1,0,0,0,127,7,1,0,0,0,128,129, - 7,0,0,0,129,9,1,0,0,0,130,131,5,19,0,0,131,132,3,22,11,0,132,133, - 5,16,0,0,133,134,5,18,0,0,134,135,3,20,10,0,135,136,5,20,0,0,136, - 152,1,0,0,0,137,138,5,19,0,0,138,139,5,16,0,0,139,140,5,18,0,0,140, - 141,3,20,10,0,141,142,5,20,0,0,142,152,1,0,0,0,143,144,3,22,11,0, - 144,145,5,16,0,0,145,146,5,18,0,0,146,147,3,20,10,0,147,152,1,0, - 0,0,148,149,3,22,11,0,149,150,5,16,0,0,150,152,1,0,0,0,151,130,1, - 0,0,0,151,137,1,0,0,0,151,143,1,0,0,0,151,148,1,0,0,0,152,11,1,0, - 0,0,153,154,5,31,0,0,154,156,5,23,0,0,155,157,3,26,13,0,156,155, - 1,0,0,0,156,157,1,0,0,0,157,158,1,0,0,0,158,166,5,16,0,0,159,161, - 5,17,0,0,160,162,3,26,13,0,161,160,1,0,0,0,161,162,1,0,0,0,162,163, - 1,0,0,0,163,165,5,16,0,0,164,159,1,0,0,0,165,168,1,0,0,0,166,164, - 1,0,0,0,166,167,1,0,0,0,167,169,1,0,0,0,168,166,1,0,0,0,169,182, - 5,24,0,0,170,171,5,27,0,0,171,172,5,23,0,0,172,177,5,16,0,0,173, - 174,5,17,0,0,174,176,5,16,0,0,175,173,1,0,0,0,176,179,1,0,0,0,177, - 175,1,0,0,0,177,178,1,0,0,0,178,180,1,0,0,0,179,177,1,0,0,0,180, - 182,5,24,0,0,181,153,1,0,0,0,181,170,1,0,0,0,182,13,1,0,0,0,183, - 187,5,13,0,0,184,187,3,24,12,0,185,187,5,8,0,0,186,183,1,0,0,0,186, - 184,1,0,0,0,186,185,1,0,0,0,187,15,1,0,0,0,188,190,7,1,0,0,189,188, - 1,0,0,0,189,190,1,0,0,0,190,191,1,0,0,0,191,192,5,4,0,0,192,196, - 5,16,0,0,193,195,3,12,6,0,194,193,1,0,0,0,195,198,1,0,0,0,196,194, - 1,0,0,0,196,197,1,0,0,0,197,17,1,0,0,0,198,196,1,0,0,0,199,200,5, - 16,0,0,200,202,5,17,0,0,201,199,1,0,0,0,201,202,1,0,0,0,202,203, - 1,0,0,0,203,204,5,16,0,0,204,205,5,18,0,0,205,206,5,9,0,0,206,243, - 5,18,0,0,207,208,5,16,0,0,208,209,5,18,0,0,209,210,3,24,12,0,210, - 211,5,18,0,0,211,212,3,14,7,0,212,213,5,18,0,0,213,243,1,0,0,0,214, - 216,5,18,0,0,215,214,1,0,0,0,215,216,1,0,0,0,216,218,1,0,0,0,217, - 219,5,16,0,0,218,217,1,0,0,0,218,219,1,0,0,0,219,223,1,0,0,0,220, - 222,3,24,12,0,221,220,1,0,0,0,222,225,1,0,0,0,223,221,1,0,0,0,223, - 224,1,0,0,0,224,226,1,0,0,0,225,223,1,0,0,0,226,243,3,14,7,0,227, - 235,5,16,0,0,228,229,5,17,0,0,229,231,5,16,0,0,230,228,1,0,0,0,230, - 231,1,0,0,0,231,232,1,0,0,0,232,236,5,28,0,0,233,236,5,29,0,0,234, - 236,3,16,8,0,235,230,1,0,0,0,235,233,1,0,0,0,235,234,1,0,0,0,236, - 243,1,0,0,0,237,243,5,10,0,0,238,239,5,11,0,0,239,243,5,18,0,0,240, - 241,5,18,0,0,241,243,5,12,0,0,242,201,1,0,0,0,242,207,1,0,0,0,242, - 215,1,0,0,0,242,227,1,0,0,0,242,237,1,0,0,0,242,238,1,0,0,0,242, - 240,1,0,0,0,243,19,1,0,0,0,244,245,7,2,0,0,245,21,1,0,0,0,246,247, - 7,3,0,0,247,23,1,0,0,0,248,249,7,4,0,0,249,25,1,0,0,0,250,251,7, - 5,0,0,251,27,1,0,0,0,25,35,54,97,102,108,113,117,122,126,151,156, - 161,166,177,181,186,189,196,201,215,218,223,230,235,242 + 3,3,127,8,3,1,3,5,3,130,8,3,10,3,12,3,133,9,3,1,3,5,3,136,8,3,10, + 3,12,3,139,9,3,1,3,4,3,142,8,3,11,3,12,3,143,1,3,5,3,147,8,3,10, + 3,12,3,150,9,3,1,3,3,3,153,8,3,1,3,5,3,156,8,3,10,3,12,3,159,9,3, + 1,3,3,3,162,8,3,1,3,5,3,165,8,3,10,3,12,3,168,9,3,3,3,170,8,3,1, + 4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1, + 5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,195,8,5,1,6,1,6,1,6,3,6,200,8,6,1, + 6,1,6,1,6,3,6,205,8,6,1,6,5,6,208,8,6,10,6,12,6,211,9,6,1,6,1,6, + 1,6,1,6,1,6,1,6,5,6,219,8,6,10,6,12,6,222,9,6,1,6,3,6,225,8,6,1, + 7,1,7,1,7,3,7,230,8,7,1,8,3,8,233,8,8,1,8,1,8,1,8,5,8,238,8,8,10, + 8,12,8,241,9,8,1,9,1,9,3,9,245,8,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1, + 9,1,9,1,9,1,9,1,9,3,9,259,8,9,1,9,3,9,262,8,9,1,9,5,9,265,8,9,10, + 9,12,9,268,9,9,1,9,1,9,1,9,1,9,3,9,274,8,9,1,9,1,9,1,9,3,9,279,8, + 9,1,9,1,9,1,9,1,9,1,9,3,9,286,8,9,1,10,1,10,1,11,1,11,1,12,1,12, + 1,13,1,13,1,13,0,0,14,0,2,4,6,8,10,12,14,16,18,20,22,24,26,0,6,2, + 0,3,3,13,13,2,0,25,26,32,32,2,0,16,16,33,33,2,0,14,14,33,33,1,0, + 4,7,2,0,27,27,30,30,330,0,28,1,0,0,0,2,54,1,0,0,0,4,97,1,0,0,0,6, + 169,1,0,0,0,8,171,1,0,0,0,10,194,1,0,0,0,12,224,1,0,0,0,14,229,1, + 0,0,0,16,232,1,0,0,0,18,285,1,0,0,0,20,287,1,0,0,0,22,289,1,0,0, + 0,24,291,1,0,0,0,26,293,1,0,0,0,28,35,5,1,0,0,29,30,5,23,0,0,30, + 31,3,4,2,0,31,32,5,24,0,0,32,34,1,0,0,0,33,29,1,0,0,0,34,37,1,0, + 0,0,35,33,1,0,0,0,35,36,1,0,0,0,36,38,1,0,0,0,37,35,1,0,0,0,38,39, + 3,2,1,0,39,40,5,1,0,0,40,1,1,0,0,0,41,42,3,4,2,0,42,43,3,6,3,0,43, + 44,5,2,0,0,44,45,5,14,0,0,45,55,1,0,0,0,46,47,3,4,2,0,47,48,3,6, + 3,0,48,55,1,0,0,0,49,50,3,6,3,0,50,51,5,2,0,0,51,52,5,14,0,0,52, + 55,1,0,0,0,53,55,3,6,3,0,54,41,1,0,0,0,54,46,1,0,0,0,54,49,1,0,0, + 0,54,53,1,0,0,0,55,3,1,0,0,0,56,57,3,6,3,0,57,58,3,10,5,0,58,98, + 1,0,0,0,59,60,3,6,3,0,60,61,3,10,5,0,61,62,3,4,2,0,62,98,1,0,0,0, + 63,64,5,21,0,0,64,65,3,4,2,0,65,66,5,22,0,0,66,98,1,0,0,0,67,68, + 3,6,3,0,68,69,3,10,5,0,69,70,5,21,0,0,70,71,3,4,2,0,71,72,5,22,0, + 0,72,73,3,4,2,0,73,98,1,0,0,0,74,75,3,6,3,0,75,76,3,10,5,0,76,77, + 5,21,0,0,77,78,3,4,2,0,78,79,5,22,0,0,79,80,5,21,0,0,80,81,3,4,2, + 0,81,82,5,22,0,0,82,83,3,4,2,0,83,98,1,0,0,0,84,85,3,6,3,0,85,86, + 3,10,5,0,86,87,5,21,0,0,87,88,3,4,2,0,88,89,5,22,0,0,89,90,5,21, + 0,0,90,91,3,4,2,0,91,92,5,22,0,0,92,93,5,21,0,0,93,94,3,4,2,0,94, + 95,5,22,0,0,95,96,3,4,2,0,96,98,1,0,0,0,97,56,1,0,0,0,97,59,1,0, + 0,0,97,63,1,0,0,0,97,67,1,0,0,0,97,74,1,0,0,0,97,84,1,0,0,0,98,5, + 1,0,0,0,99,101,3,18,9,0,100,99,1,0,0,0,101,104,1,0,0,0,102,100,1, + 0,0,0,102,103,1,0,0,0,103,106,1,0,0,0,104,102,1,0,0,0,105,107,3, + 8,4,0,106,105,1,0,0,0,107,108,1,0,0,0,108,106,1,0,0,0,108,109,1, + 0,0,0,109,113,1,0,0,0,110,112,3,18,9,0,111,110,1,0,0,0,112,115,1, + 0,0,0,113,111,1,0,0,0,113,114,1,0,0,0,114,117,1,0,0,0,115,113,1, + 0,0,0,116,118,5,15,0,0,117,116,1,0,0,0,117,118,1,0,0,0,118,122,1, + 0,0,0,119,121,3,18,9,0,120,119,1,0,0,0,121,124,1,0,0,0,122,120,1, + 0,0,0,122,123,1,0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,125,127,5, + 14,0,0,126,125,1,0,0,0,126,127,1,0,0,0,127,131,1,0,0,0,128,130,3, + 18,9,0,129,128,1,0,0,0,130,133,1,0,0,0,131,129,1,0,0,0,131,132,1, + 0,0,0,132,170,1,0,0,0,133,131,1,0,0,0,134,136,3,18,9,0,135,134,1, + 0,0,0,136,139,1,0,0,0,137,135,1,0,0,0,137,138,1,0,0,0,138,141,1, + 0,0,0,139,137,1,0,0,0,140,142,3,8,4,0,141,140,1,0,0,0,142,143,1, + 0,0,0,143,141,1,0,0,0,143,144,1,0,0,0,144,148,1,0,0,0,145,147,3, + 18,9,0,146,145,1,0,0,0,147,150,1,0,0,0,148,146,1,0,0,0,148,149,1, + 0,0,0,149,152,1,0,0,0,150,148,1,0,0,0,151,153,5,14,0,0,152,151,1, + 0,0,0,152,153,1,0,0,0,153,157,1,0,0,0,154,156,3,18,9,0,155,154,1, + 0,0,0,156,159,1,0,0,0,157,155,1,0,0,0,157,158,1,0,0,0,158,161,1, + 0,0,0,159,157,1,0,0,0,160,162,5,15,0,0,161,160,1,0,0,0,161,162,1, + 0,0,0,162,166,1,0,0,0,163,165,3,18,9,0,164,163,1,0,0,0,165,168,1, + 0,0,0,166,164,1,0,0,0,166,167,1,0,0,0,167,170,1,0,0,0,168,166,1, + 0,0,0,169,102,1,0,0,0,169,137,1,0,0,0,170,7,1,0,0,0,171,172,7,0, + 0,0,172,9,1,0,0,0,173,174,5,19,0,0,174,175,3,22,11,0,175,176,5,16, + 0,0,176,177,5,18,0,0,177,178,3,20,10,0,178,179,5,20,0,0,179,195, + 1,0,0,0,180,181,5,19,0,0,181,182,5,16,0,0,182,183,5,18,0,0,183,184, + 3,20,10,0,184,185,5,20,0,0,185,195,1,0,0,0,186,187,3,22,11,0,187, + 188,5,16,0,0,188,189,5,18,0,0,189,190,3,20,10,0,190,195,1,0,0,0, + 191,192,3,22,11,0,192,193,5,16,0,0,193,195,1,0,0,0,194,173,1,0,0, + 0,194,180,1,0,0,0,194,186,1,0,0,0,194,191,1,0,0,0,195,11,1,0,0,0, + 196,197,5,31,0,0,197,199,5,23,0,0,198,200,3,26,13,0,199,198,1,0, + 0,0,199,200,1,0,0,0,200,201,1,0,0,0,201,209,5,16,0,0,202,204,5,17, + 0,0,203,205,3,26,13,0,204,203,1,0,0,0,204,205,1,0,0,0,205,206,1, + 0,0,0,206,208,5,16,0,0,207,202,1,0,0,0,208,211,1,0,0,0,209,207,1, + 0,0,0,209,210,1,0,0,0,210,212,1,0,0,0,211,209,1,0,0,0,212,225,5, + 24,0,0,213,214,5,27,0,0,214,215,5,23,0,0,215,220,5,16,0,0,216,217, + 5,17,0,0,217,219,5,16,0,0,218,216,1,0,0,0,219,222,1,0,0,0,220,218, + 1,0,0,0,220,221,1,0,0,0,221,223,1,0,0,0,222,220,1,0,0,0,223,225, + 5,24,0,0,224,196,1,0,0,0,224,213,1,0,0,0,225,13,1,0,0,0,226,230, + 5,13,0,0,227,230,3,24,12,0,228,230,5,8,0,0,229,226,1,0,0,0,229,227, + 1,0,0,0,229,228,1,0,0,0,230,15,1,0,0,0,231,233,7,1,0,0,232,231,1, + 0,0,0,232,233,1,0,0,0,233,234,1,0,0,0,234,235,5,4,0,0,235,239,5, + 16,0,0,236,238,3,12,6,0,237,236,1,0,0,0,238,241,1,0,0,0,239,237, + 1,0,0,0,239,240,1,0,0,0,240,17,1,0,0,0,241,239,1,0,0,0,242,243,5, + 16,0,0,243,245,5,17,0,0,244,242,1,0,0,0,244,245,1,0,0,0,245,246, + 1,0,0,0,246,247,5,16,0,0,247,248,5,18,0,0,248,249,5,9,0,0,249,286, + 5,18,0,0,250,251,5,16,0,0,251,252,5,18,0,0,252,253,3,24,12,0,253, + 254,5,18,0,0,254,255,3,14,7,0,255,256,5,18,0,0,256,286,1,0,0,0,257, + 259,5,18,0,0,258,257,1,0,0,0,258,259,1,0,0,0,259,261,1,0,0,0,260, + 262,5,16,0,0,261,260,1,0,0,0,261,262,1,0,0,0,262,266,1,0,0,0,263, + 265,3,24,12,0,264,263,1,0,0,0,265,268,1,0,0,0,266,264,1,0,0,0,266, + 267,1,0,0,0,267,269,1,0,0,0,268,266,1,0,0,0,269,286,3,14,7,0,270, + 278,5,16,0,0,271,272,5,17,0,0,272,274,5,16,0,0,273,271,1,0,0,0,273, + 274,1,0,0,0,274,275,1,0,0,0,275,279,5,28,0,0,276,279,5,29,0,0,277, + 279,3,16,8,0,278,273,1,0,0,0,278,276,1,0,0,0,278,277,1,0,0,0,279, + 286,1,0,0,0,280,286,5,10,0,0,281,282,5,11,0,0,282,286,5,18,0,0,283, + 284,5,18,0,0,284,286,5,12,0,0,285,244,1,0,0,0,285,250,1,0,0,0,285, + 258,1,0,0,0,285,270,1,0,0,0,285,280,1,0,0,0,285,281,1,0,0,0,285, + 283,1,0,0,0,286,19,1,0,0,0,287,288,7,2,0,0,288,21,1,0,0,0,289,290, + 7,3,0,0,290,23,1,0,0,0,291,292,7,4,0,0,292,25,1,0,0,0,293,294,7, + 5,0,0,294,27,1,0,0,0,34,35,54,97,102,108,113,117,122,126,131,137, + 143,148,152,157,161,166,169,194,199,204,209,220,224,229,232,239, + 244,258,261,266,273,278,285 ] class GlycanParser ( Parser ): @@ -560,67 +578,162 @@ def deriv(self): self.enterRule(localctx, 6, self.RULE_deriv) self._la = 0 # Token type try: - self.enterOuterAlt(localctx, 1) - self.state = 102 + self.state = 169 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,3,self._ctx) - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt==1: - self.state = 99 - self.modi() - self.state = 104 + la_ = self._interp.adaptivePredict(self._input,17,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 102 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,3,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 99 + self.modi() + self.state = 104 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,3,self._ctx) - self.state = 106 - self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 105 - self.saci() - - else: - raise NoViableAltException(self) - self.state = 108 + self.state = 106 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,4,self._ctx) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 105 + self.saci() - self.state = 113 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,5,self._ctx) - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt==1: - self.state = 110 - self.modi() - self.state = 115 + else: + raise NoViableAltException(self) + self.state = 108 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,4,self._ctx) + + self.state = 113 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,5,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 110 + self.modi() + self.state = 115 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,5,self._ctx) - self.state = 117 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la==15: - self.state = 116 - self.match(GlycanParser.RING) + self.state = 117 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==15: + self.state = 116 + self.match(GlycanParser.RING) - self.state = 122 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 119 - self.modi() - self.state = 124 + self.state = 122 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,7,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 119 + self.modi() + self.state = 124 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,7,self._ctx) + + self.state = 126 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,8,self._ctx) + if la_ == 1: + self.state = 125 + self.match(GlycanParser.TYPE) + + + self.state = 131 self._errHandler.sync(self) _la = self._input.LA(1) + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 128 + self.modi() + self.state = 133 + self._errHandler.sync(self) + _la = self._input.LA(1) - self.state = 126 - self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,8,self._ctx) - if la_ == 1: - self.state = 125 - self.match(GlycanParser.TYPE) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 137 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,10,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 134 + self.modi() + self.state = 139 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,10,self._ctx) + + self.state = 141 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 140 + self.saci() + + else: + raise NoViableAltException(self) + self.state = 143 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,11,self._ctx) + + self.state = 148 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,12,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 145 + self.modi() + self.state = 150 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,12,self._ctx) + + self.state = 152 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,13,self._ctx) + if la_ == 1: + self.state = 151 + self.match(GlycanParser.TYPE) + + + self.state = 157 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,14,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 154 + self.modi() + self.state = 159 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,14,self._ctx) + + self.state = 161 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==15: + self.state = 160 + self.match(GlycanParser.RING) + + + self.state = 166 + self._errHandler.sync(self) + _la = self._input.LA(1) + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 163 + self.modi() + self.state = 168 + self._errHandler.sync(self) + _la = self._input.LA(1) + + pass except RecognitionException as re: @@ -666,7 +779,7 @@ def saci(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 128 + self.state = 171 _la = self._input.LA(1) if not(_la==3 or _la==13): self._errHandler.recoverInline(self) @@ -728,56 +841,56 @@ def con(self): localctx = GlycanParser.ConContext(self, self._ctx, self.state) self.enterRule(localctx, 10, self.RULE_con) try: - self.state = 151 + self.state = 194 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,9,self._ctx) + la_ = self._interp.adaptivePredict(self._input,18,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 130 + self.state = 173 self.match(GlycanParser.LPAR) - self.state = 131 + self.state = 174 self.typi() - self.state = 132 + self.state = 175 self.match(GlycanParser.NUM) - self.state = 133 + self.state = 176 self.match(GlycanParser.DASH) - self.state = 134 + self.state = 177 self.qnum() - self.state = 135 + self.state = 178 self.match(GlycanParser.RPAR) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 137 + self.state = 180 self.match(GlycanParser.LPAR) - self.state = 138 + self.state = 181 self.match(GlycanParser.NUM) - self.state = 139 + self.state = 182 self.match(GlycanParser.DASH) - self.state = 140 + self.state = 183 self.qnum() - self.state = 141 + self.state = 184 self.match(GlycanParser.RPAR) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 143 + self.state = 186 self.typi() - self.state = 144 + self.state = 187 self.match(GlycanParser.NUM) - self.state = 145 + self.state = 188 self.match(GlycanParser.DASH) - self.state = 146 + self.state = 189 self.qnum() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 148 + self.state = 191 self.typi() - self.state = 149 + self.state = 192 self.match(GlycanParser.NUM) pass @@ -849,69 +962,69 @@ def add(self): self.enterRule(localctx, 12, self.RULE_add) self._la = 0 # Token type try: - self.state = 181 + self.state = 224 self._errHandler.sync(self) token = self._input.LA(1) if token in [31]: self.enterOuterAlt(localctx, 1) - self.state = 153 + self.state = 196 self.match(GlycanParser.EQ) - self.state = 154 + self.state = 197 self.match(GlycanParser.LBRACK) - self.state = 156 + self.state = 199 self._errHandler.sync(self) _la = self._input.LA(1) if _la==27 or _la==30: - self.state = 155 + self.state = 198 self.ct() - self.state = 158 + self.state = 201 self.match(GlycanParser.NUM) - self.state = 166 + self.state = 209 self._errHandler.sync(self) _la = self._input.LA(1) while _la==17: - self.state = 159 + self.state = 202 self.match(GlycanParser.COLON) - self.state = 161 + self.state = 204 self._errHandler.sync(self) _la = self._input.LA(1) if _la==27 or _la==30: - self.state = 160 + self.state = 203 self.ct() - self.state = 163 + self.state = 206 self.match(GlycanParser.NUM) - self.state = 168 + self.state = 211 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 169 + self.state = 212 self.match(GlycanParser.RBRACK) pass elif token in [27]: self.enterOuterAlt(localctx, 2) - self.state = 170 + self.state = 213 self.match(GlycanParser.C) - self.state = 171 + self.state = 214 self.match(GlycanParser.LBRACK) - self.state = 172 + self.state = 215 self.match(GlycanParser.NUM) - self.state = 177 + self.state = 220 self._errHandler.sync(self) _la = self._input.LA(1) while _la==17: - self.state = 173 + self.state = 216 self.match(GlycanParser.COLON) - self.state = 174 + self.state = 217 self.match(GlycanParser.NUM) - self.state = 179 + self.state = 222 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 180 + self.state = 223 self.match(GlycanParser.RBRACK) pass else: @@ -962,22 +1075,22 @@ def fgi(self): localctx = GlycanParser.FgiContext(self, self._ctx, self.state) self.enterRule(localctx, 14, self.RULE_fgi) try: - self.state = 186 + self.state = 229 self._errHandler.sync(self) token = self._input.LA(1) if token in [13]: self.enterOuterAlt(localctx, 1) - self.state = 183 + self.state = 226 self.match(GlycanParser.COUNT) pass elif token in [4, 5, 6, 7]: self.enterOuterAlt(localctx, 2) - self.state = 184 + self.state = 227 self.bridge() pass elif token in [8]: self.enterOuterAlt(localctx, 3) - self.state = 185 + self.state = 228 self.match(GlycanParser.FG) pass else: @@ -1042,11 +1155,11 @@ def carb(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 189 + self.state = 232 self._errHandler.sync(self) _la = self._input.LA(1) if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0): - self.state = 188 + self.state = 231 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0)): self._errHandler.recoverInline(self) @@ -1055,17 +1168,17 @@ def carb(self): self.consume() - self.state = 191 + self.state = 234 self.match(GlycanParser.CARBON) - self.state = 192 + self.state = 235 self.match(GlycanParser.NUM) - self.state = 196 + self.state = 239 self._errHandler.sync(self) _la = self._input.LA(1) while _la==27 or _la==31: - self.state = 193 + self.state = 236 self.add() - self.state = 198 + self.state = 241 self._errHandler.sync(self) _la = self._input.LA(1) @@ -1153,107 +1266,107 @@ def modi(self): self.enterRule(localctx, 18, self.RULE_modi) self._la = 0 # Token type try: - self.state = 242 + self.state = 285 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,24,self._ctx) + la_ = self._interp.adaptivePredict(self._input,33,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 201 + self.state = 244 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,18,self._ctx) + la_ = self._interp.adaptivePredict(self._input,27,self._ctx) if la_ == 1: - self.state = 199 + self.state = 242 self.match(GlycanParser.NUM) - self.state = 200 + self.state = 243 self.match(GlycanParser.COLON) - self.state = 203 + self.state = 246 self.match(GlycanParser.NUM) - self.state = 204 + self.state = 247 self.match(GlycanParser.DASH) - self.state = 205 + self.state = 248 self.match(GlycanParser.ANHYDRO) - self.state = 206 + self.state = 249 self.match(GlycanParser.DASH) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 207 + self.state = 250 self.match(GlycanParser.NUM) - self.state = 208 + self.state = 251 self.match(GlycanParser.DASH) - self.state = 209 + self.state = 252 self.bridge() - self.state = 210 + self.state = 253 self.match(GlycanParser.DASH) - self.state = 211 + self.state = 254 self.fgi() - self.state = 212 + self.state = 255 self.match(GlycanParser.DASH) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 215 + self.state = 258 self._errHandler.sync(self) _la = self._input.LA(1) if _la==18: - self.state = 214 + self.state = 257 self.match(GlycanParser.DASH) - self.state = 218 + self.state = 261 self._errHandler.sync(self) _la = self._input.LA(1) if _la==16: - self.state = 217 + self.state = 260 self.match(GlycanParser.NUM) - self.state = 223 + self.state = 266 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,21,self._ctx) + _alt = self._interp.adaptivePredict(self._input,30,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 220 + self.state = 263 self.bridge() - self.state = 225 + self.state = 268 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,21,self._ctx) + _alt = self._interp.adaptivePredict(self._input,30,self._ctx) - self.state = 226 + self.state = 269 self.fgi() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 227 + self.state = 270 self.match(GlycanParser.NUM) - self.state = 235 + self.state = 278 self._errHandler.sync(self) token = self._input.LA(1) if token in [17, 28]: - self.state = 230 + self.state = 273 self._errHandler.sync(self) _la = self._input.LA(1) if _la==17: - self.state = 228 + self.state = 271 self.match(GlycanParser.COLON) - self.state = 229 + self.state = 272 self.match(GlycanParser.NUM) - self.state = 232 + self.state = 275 self.match(GlycanParser.D) pass elif token in [29]: - self.state = 233 + self.state = 276 self.match(GlycanParser.E) pass elif token in [4, 25, 26, 32]: - self.state = 234 + self.state = 277 self.carb() pass else: @@ -1263,23 +1376,23 @@ def modi(self): elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 237 + self.state = 280 self.match(GlycanParser.HEAD) pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 238 + self.state = 281 self.match(GlycanParser.HEADD) - self.state = 239 + self.state = 282 self.match(GlycanParser.DASH) pass elif la_ == 7: self.enterOuterAlt(localctx, 7) - self.state = 240 + self.state = 283 self.match(GlycanParser.DASH) - self.state = 241 + self.state = 284 self.match(GlycanParser.END) pass @@ -1327,7 +1440,7 @@ def qnum(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 244 + self.state = 287 _la = self._input.LA(1) if not(_la==16 or _la==33): self._errHandler.recoverInline(self) @@ -1377,7 +1490,7 @@ def typi(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 246 + self.state = 289 _la = self._input.LA(1) if not(_la==14 or _la==33): self._errHandler.recoverInline(self) @@ -1433,7 +1546,7 @@ def bridge(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 248 + self.state = 291 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 240) != 0)): self._errHandler.recoverInline(self) @@ -1483,7 +1596,7 @@ def ct(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 250 + self.state = 293 _la = self._input.LA(1) if not(_la==27 or _la==30): self._errHandler.recoverInline(self) From 1e7a969d71c56545b561b26e8d7daa6e6ace690e Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Wed, 16 Oct 2024 08:51:32 +0200 Subject: [PATCH 13/14] Grammar reversion --- glyles/grammar/Glycan.g4 | 3 +- glyles/grammar/Glycan.interp | 2 +- glyles/grammar/GlycanParser.py | 559 +++++++++++++-------------------- tests/data/pubchem_mono.tsv | 1 - 4 files changed, 225 insertions(+), 340 deletions(-) diff --git a/glyles/grammar/Glycan.g4 b/glyles/grammar/Glycan.g4 index 8037d62..58d6451 100644 --- a/glyles/grammar/Glycan.g4 +++ b/glyles/grammar/Glycan.g4 @@ -15,8 +15,7 @@ branch: | deriv con LBRACE branch RBRACE LBRACE branch RBRACE branch | deriv con LBRACE branch RBRACE LBRACE branch RBRACE LBRACE branch RBRACE branch; deriv: - modi* saci+ modi* RING? modi* TYPE? modi* - | modi* saci+ modi* TYPE? modi* RING? modi*; + modi* saci+ modi* RING? modi* TYPE?; saci: COUNT | SAC; con: LPAR typi NUM DASH qnum RPAR diff --git a/glyles/grammar/Glycan.interp b/glyles/grammar/Glycan.interp index b0b496c..db1dc70 100644 --- a/glyles/grammar/Glycan.interp +++ b/glyles/grammar/Glycan.interp @@ -88,4 +88,4 @@ ct atn: -[4, 1, 33, 296, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 34, 8, 0, 10, 0, 12, 0, 37, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 55, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 98, 8, 2, 1, 3, 5, 3, 101, 8, 3, 10, 3, 12, 3, 104, 9, 3, 1, 3, 4, 3, 107, 8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 1, 9, 3, 9, 262, 8, 9, 1, 9, 5, 9, 265, 8, 9, 10, 9, 12, 9, 268, 9, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 274, 8, 9, 1, 9, 1, 9, 1, 9, 3, 9, 279, 8, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 3, 9, 286, 8, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 0, 0, 14, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 0, 6, 2, 0, 3, 3, 13, 13, 2, 0, 25, 26, 32, 32, 2, 0, 16, 16, 33, 33, 2, 0, 14, 14, 33, 33, 1, 0, 4, 7, 2, 0, 27, 27, 30, 30, 330, 0, 28, 1, 0, 0, 0, 2, 54, 1, 0, 0, 0, 4, 97, 1, 0, 0, 0, 6, 169, 1, 0, 0, 0, 8, 171, 1, 0, 0, 0, 10, 194, 1, 0, 0, 0, 12, 224, 1, 0, 0, 0, 14, 229, 1, 0, 0, 0, 16, 232, 1, 0, 0, 0, 18, 285, 1, 0, 0, 0, 20, 287, 1, 0, 0, 0, 22, 289, 1, 0, 0, 0, 24, 291, 1, 0, 0, 0, 26, 293, 1, 0, 0, 0, 28, 35, 5, 1, 0, 0, 29, 30, 5, 23, 0, 0, 30, 31, 3, 4, 2, 0, 31, 32, 5, 24, 0, 0, 32, 34, 1, 0, 0, 0, 33, 29, 1, 0, 0, 0, 34, 37, 1, 0, 0, 0, 35, 33, 1, 0, 0, 0, 35, 36, 1, 0, 0, 0, 36, 38, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 38, 39, 3, 2, 1, 0, 39, 40, 5, 1, 0, 0, 40, 1, 1, 0, 0, 0, 41, 42, 3, 4, 2, 0, 42, 43, 3, 6, 3, 0, 43, 44, 5, 2, 0, 0, 44, 45, 5, 14, 0, 0, 45, 55, 1, 0, 0, 0, 46, 47, 3, 4, 2, 0, 47, 48, 3, 6, 3, 0, 48, 55, 1, 0, 0, 0, 49, 50, 3, 6, 3, 0, 50, 51, 5, 2, 0, 0, 51, 52, 5, 14, 0, 0, 52, 55, 1, 0, 0, 0, 53, 55, 3, 6, 3, 0, 54, 41, 1, 0, 0, 0, 54, 46, 1, 0, 0, 0, 54, 49, 1, 0, 0, 0, 54, 53, 1, 0, 0, 0, 55, 3, 1, 0, 0, 0, 56, 57, 3, 6, 3, 0, 57, 58, 3, 10, 5, 0, 58, 98, 1, 0, 0, 0, 59, 60, 3, 6, 3, 0, 60, 61, 3, 10, 5, 0, 61, 62, 3, 4, 2, 0, 62, 98, 1, 0, 0, 0, 63, 64, 5, 21, 0, 0, 64, 65, 3, 4, 2, 0, 65, 66, 5, 22, 0, 0, 66, 98, 1, 0, 0, 0, 67, 68, 3, 6, 3, 0, 68, 69, 3, 10, 5, 0, 69, 70, 5, 21, 0, 0, 70, 71, 3, 4, 2, 0, 71, 72, 5, 22, 0, 0, 72, 73, 3, 4, 2, 0, 73, 98, 1, 0, 0, 0, 74, 75, 3, 6, 3, 0, 75, 76, 3, 10, 5, 0, 76, 77, 5, 21, 0, 0, 77, 78, 3, 4, 2, 0, 78, 79, 5, 22, 0, 0, 79, 80, 5, 21, 0, 0, 80, 81, 3, 4, 2, 0, 81, 82, 5, 22, 0, 0, 82, 83, 3, 4, 2, 0, 83, 98, 1, 0, 0, 0, 84, 85, 3, 6, 3, 0, 85, 86, 3, 10, 5, 0, 86, 87, 5, 21, 0, 0, 87, 88, 3, 4, 2, 0, 88, 89, 5, 22, 0, 0, 89, 90, 5, 21, 0, 0, 90, 91, 3, 4, 2, 0, 91, 92, 5, 22, 0, 0, 92, 93, 5, 21, 0, 0, 93, 94, 3, 4, 2, 0, 94, 95, 5, 22, 0, 0, 95, 96, 3, 4, 2, 0, 96, 98, 1, 0, 0, 0, 97, 56, 1, 0, 0, 0, 97, 59, 1, 0, 0, 0, 97, 63, 1, 0, 0, 0, 97, 67, 1, 0, 0, 0, 97, 74, 1, 0, 0, 0, 97, 84, 1, 0, 0, 0, 98, 5, 1, 0, 0, 0, 99, 101, 3, 18, 9, 0, 100, 99, 1, 0, 0, 0, 101, 104, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 107, 3, 8, 4, 0, 106, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 113, 1, 0, 0, 0, 110, 112, 3, 18, 9, 0, 111, 110, 1, 0, 0, 0, 112, 115, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 117, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 116, 118, 5, 15, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 122, 1, 0, 0, 0, 119, 121, 3, 18, 9, 0, 120, 119, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 127, 5, 14, 0, 0, 126, 125, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 131, 1, 0, 0, 0, 128, 130, 3, 18, 9, 0, 129, 128, 1, 0, 0, 0, 130, 133, 1, 0, 0, 0, 131, 129, 1, 0, 0, 0, 131, 132, 1, 0, 0, 0, 132, 170, 1, 0, 0, 0, 133, 131, 1, 0, 0, 0, 134, 136, 3, 18, 9, 0, 135, 134, 1, 0, 0, 0, 136, 139, 1, 0, 0, 0, 137, 135, 1, 0, 0, 0, 137, 138, 1, 0, 0, 0, 138, 141, 1, 0, 0, 0, 139, 137, 1, 0, 0, 0, 140, 142, 3, 8, 4, 0, 141, 140, 1, 0, 0, 0, 142, 143, 1, 0, 0, 0, 143, 141, 1, 0, 0, 0, 143, 144, 1, 0, 0, 0, 144, 148, 1, 0, 0, 0, 145, 147, 3, 18, 9, 0, 146, 145, 1, 0, 0, 0, 147, 150, 1, 0, 0, 0, 148, 146, 1, 0, 0, 0, 148, 149, 1, 0, 0, 0, 149, 152, 1, 0, 0, 0, 150, 148, 1, 0, 0, 0, 151, 153, 5, 14, 0, 0, 152, 151, 1, 0, 0, 0, 152, 153, 1, 0, 0, 0, 153, 157, 1, 0, 0, 0, 154, 156, 3, 18, 9, 0, 155, 154, 1, 0, 0, 0, 156, 159, 1, 0, 0, 0, 157, 155, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 161, 1, 0, 0, 0, 159, 157, 1, 0, 0, 0, 160, 162, 5, 15, 0, 0, 161, 160, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 166, 1, 0, 0, 0, 163, 165, 3, 18, 9, 0, 164, 163, 1, 0, 0, 0, 165, 168, 1, 0, 0, 0, 166, 164, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 167, 170, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 169, 102, 1, 0, 0, 0, 169, 137, 1, 0, 0, 0, 170, 7, 1, 0, 0, 0, 171, 172, 7, 0, 0, 0, 172, 9, 1, 0, 0, 0, 173, 174, 5, 19, 0, 0, 174, 175, 3, 22, 11, 0, 175, 176, 5, 16, 0, 0, 176, 177, 5, 18, 0, 0, 177, 178, 3, 20, 10, 0, 178, 179, 5, 20, 0, 0, 179, 195, 1, 0, 0, 0, 180, 181, 5, 19, 0, 0, 181, 182, 5, 16, 0, 0, 182, 183, 5, 18, 0, 0, 183, 184, 3, 20, 10, 0, 184, 185, 5, 20, 0, 0, 185, 195, 1, 0, 0, 0, 186, 187, 3, 22, 11, 0, 187, 188, 5, 16, 0, 0, 188, 189, 5, 18, 0, 0, 189, 190, 3, 20, 10, 0, 190, 195, 1, 0, 0, 0, 191, 192, 3, 22, 11, 0, 192, 193, 5, 16, 0, 0, 193, 195, 1, 0, 0, 0, 194, 173, 1, 0, 0, 0, 194, 180, 1, 0, 0, 0, 194, 186, 1, 0, 0, 0, 194, 191, 1, 0, 0, 0, 195, 11, 1, 0, 0, 0, 196, 197, 5, 31, 0, 0, 197, 199, 5, 23, 0, 0, 198, 200, 3, 26, 13, 0, 199, 198, 1, 0, 0, 0, 199, 200, 1, 0, 0, 0, 200, 201, 1, 0, 0, 0, 201, 209, 5, 16, 0, 0, 202, 204, 5, 17, 0, 0, 203, 205, 3, 26, 13, 0, 204, 203, 1, 0, 0, 0, 204, 205, 1, 0, 0, 0, 205, 206, 1, 0, 0, 0, 206, 208, 5, 16, 0, 0, 207, 202, 1, 0, 0, 0, 208, 211, 1, 0, 0, 0, 209, 207, 1, 0, 0, 0, 209, 210, 1, 0, 0, 0, 210, 212, 1, 0, 0, 0, 211, 209, 1, 0, 0, 0, 212, 225, 5, 24, 0, 0, 213, 214, 5, 27, 0, 0, 214, 215, 5, 23, 0, 0, 215, 220, 5, 16, 0, 0, 216, 217, 5, 17, 0, 0, 217, 219, 5, 16, 0, 0, 218, 216, 1, 0, 0, 0, 219, 222, 1, 0, 0, 0, 220, 218, 1, 0, 0, 0, 220, 221, 1, 0, 0, 0, 221, 223, 1, 0, 0, 0, 222, 220, 1, 0, 0, 0, 223, 225, 5, 24, 0, 0, 224, 196, 1, 0, 0, 0, 224, 213, 1, 0, 0, 0, 225, 13, 1, 0, 0, 0, 226, 230, 5, 13, 0, 0, 227, 230, 3, 24, 12, 0, 228, 230, 5, 8, 0, 0, 229, 226, 1, 0, 0, 0, 229, 227, 1, 0, 0, 0, 229, 228, 1, 0, 0, 0, 230, 15, 1, 0, 0, 0, 231, 233, 7, 1, 0, 0, 232, 231, 1, 0, 0, 0, 232, 233, 1, 0, 0, 0, 233, 234, 1, 0, 0, 0, 234, 235, 5, 4, 0, 0, 235, 239, 5, 16, 0, 0, 236, 238, 3, 12, 6, 0, 237, 236, 1, 0, 0, 0, 238, 241, 1, 0, 0, 0, 239, 237, 1, 0, 0, 0, 239, 240, 1, 0, 0, 0, 240, 17, 1, 0, 0, 0, 241, 239, 1, 0, 0, 0, 242, 243, 5, 16, 0, 0, 243, 245, 5, 17, 0, 0, 244, 242, 1, 0, 0, 0, 244, 245, 1, 0, 0, 0, 245, 246, 1, 0, 0, 0, 246, 247, 5, 16, 0, 0, 247, 248, 5, 18, 0, 0, 248, 249, 5, 9, 0, 0, 249, 286, 5, 18, 0, 0, 250, 251, 5, 16, 0, 0, 251, 252, 5, 18, 0, 0, 252, 253, 3, 24, 12, 0, 253, 254, 5, 18, 0, 0, 254, 255, 3, 14, 7, 0, 255, 256, 5, 18, 0, 0, 256, 286, 1, 0, 0, 0, 257, 259, 5, 18, 0, 0, 258, 257, 1, 0, 0, 0, 258, 259, 1, 0, 0, 0, 259, 261, 1, 0, 0, 0, 260, 262, 5, 16, 0, 0, 261, 260, 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 266, 1, 0, 0, 0, 263, 265, 3, 24, 12, 0, 264, 263, 1, 0, 0, 0, 265, 268, 1, 0, 0, 0, 266, 264, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 269, 1, 0, 0, 0, 268, 266, 1, 0, 0, 0, 269, 286, 3, 14, 7, 0, 270, 278, 5, 16, 0, 0, 271, 272, 5, 17, 0, 0, 272, 274, 5, 16, 0, 0, 273, 271, 1, 0, 0, 0, 273, 274, 1, 0, 0, 0, 274, 275, 1, 0, 0, 0, 275, 279, 5, 28, 0, 0, 276, 279, 5, 29, 0, 0, 277, 279, 3, 16, 8, 0, 278, 273, 1, 0, 0, 0, 278, 276, 1, 0, 0, 0, 278, 277, 1, 0, 0, 0, 279, 286, 1, 0, 0, 0, 280, 286, 5, 10, 0, 0, 281, 282, 5, 11, 0, 0, 282, 286, 5, 18, 0, 0, 283, 284, 5, 18, 0, 0, 284, 286, 5, 12, 0, 0, 285, 244, 1, 0, 0, 0, 285, 250, 1, 0, 0, 0, 285, 258, 1, 0, 0, 0, 285, 270, 1, 0, 0, 0, 285, 280, 1, 0, 0, 0, 285, 281, 1, 0, 0, 0, 285, 283, 1, 0, 0, 0, 286, 19, 1, 0, 0, 0, 287, 288, 7, 2, 0, 0, 288, 21, 1, 0, 0, 0, 289, 290, 7, 3, 0, 0, 290, 23, 1, 0, 0, 0, 291, 292, 7, 4, 0, 0, 292, 25, 1, 0, 0, 0, 293, 294, 7, 5, 0, 0, 294, 27, 1, 0, 0, 0, 34, 35, 54, 97, 102, 108, 113, 117, 122, 126, 131, 137, 143, 148, 152, 157, 161, 166, 169, 194, 199, 204, 209, 220, 224, 229, 232, 239, 244, 258, 261, 266, 273, 278, 285] \ No newline at end of file +[4, 1, 33, 253, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 5, 0, 34, 8, 0, 10, 0, 12, 0, 37, 9, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 55, 8, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 98, 8, 2, 1, 3, 5, 3, 101, 8, 3, 10, 3, 12, 3, 104, 9, 3, 1, 3, 4, 3, 107, 8, 3, 11, 3, 12, 3, 108, 1, 3, 5, 3, 112, 8, 3,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33, 2, 0, 14, 14, 33, 33, 1, 0, 4, 7, 2, 0, 27, 27, 30, 30, 278, 0, 28, 1, 0, 0, 0, 2, 54, 1, 0, 0, 0, 4, 97, 1, 0, 0, 0, 6, 102, 1, 0, 0, 0, 8, 128, 1, 0, 0, 0, 10, 151, 1, 0, 0, 0, 12, 181, 1, 0, 0, 0, 14, 186, 1, 0, 0, 0, 16, 189, 1, 0, 0, 0, 18, 242, 1, 0, 0, 0, 20, 244, 1, 0, 0, 0, 22, 246, 1, 0, 0, 0, 24, 248, 1, 0, 0, 0, 26, 250, 1, 0, 0, 0, 28, 35, 5, 1, 0, 0, 29, 30, 5, 23, 0, 0, 30, 31, 3, 4, 2, 0, 31, 32, 5, 24, 0, 0, 32, 34, 1, 0, 0, 0, 33, 29, 1, 0, 0, 0, 34, 37, 1, 0, 0, 0, 35, 33, 1, 0, 0, 0, 35, 36, 1, 0, 0, 0, 36, 38, 1, 0, 0, 0, 37, 35, 1, 0, 0, 0, 38, 39, 3, 2, 1, 0, 39, 40, 5, 1, 0, 0, 40, 1, 1, 0, 0, 0, 41, 42, 3, 4, 2, 0, 42, 43, 3, 6, 3, 0, 43, 44, 5, 2, 0, 0, 44, 45, 5, 14, 0, 0, 45, 55, 1, 0, 0, 0, 46, 47, 3, 4, 2, 0, 47, 48, 3, 6, 3, 0, 48, 55, 1, 0, 0, 0, 49, 50, 3, 6, 3, 0, 50, 51, 5, 2, 0, 0, 51, 52, 5, 14, 0, 0, 52, 55, 1, 0, 0, 0, 53, 55, 3, 6, 3, 0, 54, 41, 1, 0, 0, 0, 54, 46, 1, 0, 0, 0, 54, 49, 1, 0, 0, 0, 54, 53, 1, 0, 0, 0, 55, 3, 1, 0, 0, 0, 56, 57, 3, 6, 3, 0, 57, 58, 3, 10, 5, 0, 58, 98, 1, 0, 0, 0, 59, 60, 3, 6, 3, 0, 60, 61, 3, 10, 5, 0, 61, 62, 3, 4, 2, 0, 62, 98, 1, 0, 0, 0, 63, 64, 5, 21, 0, 0, 64, 65, 3, 4, 2, 0, 65, 66, 5, 22, 0, 0, 66, 98, 1, 0, 0, 0, 67, 68, 3, 6, 3, 0, 68, 69, 3, 10, 5, 0, 69, 70, 5, 21, 0, 0, 70, 71, 3, 4, 2, 0, 71, 72, 5, 22, 0, 0, 72, 73, 3, 4, 2, 0, 73, 98, 1, 0, 0, 0, 74, 75, 3, 6, 3, 0, 75, 76, 3, 10, 5, 0, 76, 77, 5, 21, 0, 0, 77, 78, 3, 4, 2, 0, 78, 79, 5, 22, 0, 0, 79, 80, 5, 21, 0, 0, 80, 81, 3, 4, 2, 0, 81, 82, 5, 22, 0, 0, 82, 83, 3, 4, 2, 0, 83, 98, 1, 0, 0, 0, 84, 85, 3, 6, 3, 0, 85, 86, 3, 10, 5, 0, 86, 87, 5, 21, 0, 0, 87, 88, 3, 4, 2, 0, 88, 89, 5, 22, 0, 0, 89, 90, 5, 21, 0, 0, 90, 91, 3, 4, 2, 0, 91, 92, 5, 22, 0, 0, 92, 93, 5, 21, 0, 0, 93, 94, 3, 4, 2, 0, 94, 95, 5, 22, 0, 0, 95, 96, 3, 4, 2, 0, 96, 98, 1, 0, 0, 0, 97, 56, 1, 0, 0, 0, 97, 59, 1, 0, 0, 0, 97, 63, 1, 0, 0, 0, 97, 67, 1, 0, 0, 0, 97, 74, 1, 0, 0, 0, 97, 84, 1, 0, 0, 0, 98, 5, 1, 0, 0, 0, 99, 101, 3, 18, 9, 0, 100, 99, 1, 0, 0, 0, 101, 104, 1, 0, 0, 0, 102, 100, 1, 0, 0, 0, 102, 103, 1, 0, 0, 0, 103, 106, 1, 0, 0, 0, 104, 102, 1, 0, 0, 0, 105, 107, 3, 8, 4, 0, 106, 105, 1, 0, 0, 0, 107, 108, 1, 0, 0, 0, 108, 106, 1, 0, 0, 0, 108, 109, 1, 0, 0, 0, 109, 113, 1, 0, 0, 0, 110, 112, 3, 18, 9, 0, 111, 110, 1, 0, 0, 0, 112, 115, 1, 0, 0, 0, 113, 111, 1, 0, 0, 0, 113, 114, 1, 0, 0, 0, 114, 117, 1, 0, 0, 0, 115, 113, 1, 0, 0, 0, 116, 118, 5, 15, 0, 0, 117, 116, 1, 0, 0, 0, 117, 118, 1, 0, 0, 0, 118, 122, 1, 0, 0, 0, 119, 121, 3, 18, 9, 0, 120, 119, 1, 0, 0, 0, 121, 124, 1, 0, 0, 0, 122, 120, 1, 0, 0, 0, 122, 123, 1, 0, 0, 0, 123, 126, 1, 0, 0, 0, 124, 122, 1, 0, 0, 0, 125, 127, 5, 14, 0, 0, 126, 125, 1, 0, 0, 0, 126, 127, 1, 0, 0, 0, 127, 7, 1, 0, 0, 0, 128, 129, 7, 0, 0, 0, 129, 9, 1, 0, 0, 0, 130, 131, 5, 19, 0, 0, 131, 132, 3, 22, 11, 0, 132, 133, 5, 16, 0, 0, 133, 134, 5, 18, 0, 0, 134, 135, 3, 20, 10, 0, 135, 136, 5, 20, 0, 0, 136, 152, 1, 0, 0, 0, 137, 138, 5, 19, 0, 0, 138, 139, 5, 16, 0, 0, 139, 140, 5, 18, 0, 0, 140, 141, 3, 20, 10, 0, 141, 142, 5, 20, 0, 0, 142, 152, 1, 0, 0, 0, 143, 144, 3, 22, 11, 0, 144, 145, 5, 16, 0, 0, 145, 146, 5, 18, 0, 0, 146, 147, 3, 20, 10, 0, 147, 152, 1, 0, 0, 0, 148, 149, 3, 22, 11, 0, 149, 150, 5, 16, 0, 0, 150, 152, 1, 0, 0, 0, 151, 130, 1, 0, 0, 0, 151, 137, 1, 0, 0, 0, 151, 143, 1, 0, 0, 0, 151, 148, 1, 0, 0, 0, 152, 11, 1, 0, 0, 0, 153, 154, 5, 31, 0, 0, 154, 156, 5, 23, 0, 0, 155, 157, 3, 26, 13, 0, 156, 155, 1, 0, 0, 0, 156, 157, 1, 0, 0, 0, 157, 158, 1, 0, 0, 0, 158, 166, 5, 16, 0, 0, 159, 161, 5, 17, 0, 0, 160, 162, 3, 26, 13, 0, 161, 160, 1, 0, 0, 0, 161, 162, 1, 0, 0, 0, 162, 163, 1, 0, 0, 0, 163, 165, 5, 16, 0, 0, 164, 159, 1, 0, 0, 0, 165, 168, 1, 0, 0, 0, 166, 164, 1, 0, 0, 0, 166, 167, 1, 0, 0, 0, 167, 169, 1, 0, 0, 0, 168, 166, 1, 0, 0, 0, 169, 182, 5, 24, 0, 0, 170, 171, 5, 27, 0, 0, 171, 172, 5, 23, 0, 0, 172, 177, 5, 16, 0, 0, 173, 174, 5, 17, 0, 0, 174, 176, 5, 16, 0, 0, 175, 173, 1, 0, 0, 0, 176, 179, 1, 0, 0, 0, 177, 175, 1, 0, 0, 0, 177, 178, 1, 0, 0, 0, 178, 180, 1, 0, 0, 0, 179, 177, 1, 0, 0, 0, 180, 182, 5, 24, 0, 0, 181, 153, 1, 0, 0, 0, 181, 170, 1, 0, 0, 0, 182, 13, 1, 0, 0, 0, 183, 187, 5, 13, 0, 0, 184, 187, 3, 24, 12, 0, 185, 187, 5, 8, 0, 0, 186, 183, 1, 0, 0, 0, 186, 184, 1, 0, 0, 0, 186, 185, 1, 0, 0, 0, 187, 15, 1, 0, 0, 0, 188, 190, 7, 1, 0, 0, 189, 188, 1, 0, 0, 0, 189, 190, 1, 0, 0, 0, 190, 191, 1, 0, 0, 0, 191, 192, 5, 4, 0, 0, 192, 196, 5, 16, 0, 0, 193, 195, 3, 12, 6, 0, 194, 193, 1, 0, 0, 0, 195, 198, 1, 0, 0, 0, 196, 194, 1, 0, 0, 0, 196, 197, 1, 0, 0, 0, 197, 17, 1, 0, 0, 0, 198, 196, 1, 0, 0, 0, 199, 200, 5, 16, 0, 0, 200, 202, 5, 17, 0, 0, 201, 199, 1, 0, 0, 0, 201, 202, 1, 0, 0, 0, 202, 203, 1, 0, 0, 0, 203, 204, 5, 16, 0, 0, 204, 205, 5, 18, 0, 0, 205, 206, 5, 9, 0, 0, 206, 243, 5, 18, 0, 0, 207, 208, 5, 16, 0, 0, 208, 209, 5, 18, 0, 0, 209, 210, 3, 24, 12, 0, 210, 211, 5, 18, 0, 0, 211, 212, 3, 14, 7, 0, 212, 213, 5, 18, 0, 0, 213, 243, 1, 0, 0, 0, 214, 216, 5, 18, 0, 0, 215, 214, 1, 0, 0, 0, 215, 216, 1, 0, 0, 0, 216, 218, 1, 0, 0, 0, 217, 219, 5, 16, 0, 0, 218, 217, 1, 0, 0, 0, 218, 219, 1, 0, 0, 0, 219, 223, 1, 0, 0, 0, 220, 222, 3, 24, 12, 0, 221, 220, 1, 0, 0, 0, 222, 225, 1, 0, 0, 0, 223, 221, 1, 0, 0, 0, 223, 224, 1, 0, 0, 0, 224, 226, 1, 0, 0, 0, 225, 223, 1, 0, 0, 0, 226, 243, 3, 14, 7, 0, 227, 235, 5, 16, 0, 0, 228, 229, 5, 17, 0, 0, 229, 231, 5, 16, 0, 0, 230, 228, 1, 0, 0, 0, 230, 231, 1, 0, 0, 0, 231, 232, 1, 0, 0, 0, 232, 236, 5, 28, 0, 0, 233, 236, 5, 29, 0, 0, 234, 236, 3, 16, 8, 0, 235, 230, 1, 0, 0, 0, 235, 233, 1, 0, 0, 0, 235, 234, 1, 0, 0, 0, 236, 243, 1, 0, 0, 0, 237, 243, 5, 10, 0, 0, 238, 239, 5, 11, 0, 0, 239, 243, 5, 18, 0, 0, 240, 241, 5, 18, 0, 0, 241, 243, 5, 12, 0, 0, 242, 201, 1, 0, 0, 0, 242, 207, 1, 0, 0, 0, 242, 215, 1, 0, 0, 0, 242, 227, 1, 0, 0, 0, 242, 237, 1, 0, 0, 0, 242, 238, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 243, 19, 1, 0, 0, 0, 244, 245, 7, 2, 0, 0, 245, 21, 1, 0, 0, 0, 246, 247, 7, 3, 0, 0, 247, 23, 1, 0, 0, 0, 248, 249, 7, 4, 0, 0, 249, 25, 1, 0, 0, 0, 250, 251, 7, 5, 0, 0, 251, 27, 1, 0, 0, 0, 25, 35, 54, 97, 102, 108, 113, 117, 122, 126, 151, 156, 161, 166, 177, 181, 186, 189, 196, 201, 215, 218, 223, 230, 235, 242] \ No newline at end of file diff --git a/glyles/grammar/GlycanParser.py b/glyles/grammar/GlycanParser.py index ddce561..26c5c70 100644 --- a/glyles/grammar/GlycanParser.py +++ b/glyles/grammar/GlycanParser.py @@ -10,7 +10,7 @@ def serializedATN(): return [ - 4,1,33,296,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, + 4,1,33,253,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7, 6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13, 1,0,1,0,1,0,1,0,1,0,5,0,34,8,0,10,0,12,0,37,9,0,1,0,1,0,1,0,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,55,8,1,1,2,1, @@ -19,104 +19,86 @@ def serializedATN(): 2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,98,8,2,1,3,5,3,101,8,3,10,3,12, 3,104,9,3,1,3,4,3,107,8,3,11,3,12,3,108,1,3,5,3,112,8,3,10,3,12, 3,115,9,3,1,3,3,3,118,8,3,1,3,5,3,121,8,3,10,3,12,3,124,9,3,1,3, - 3,3,127,8,3,1,3,5,3,130,8,3,10,3,12,3,133,9,3,1,3,5,3,136,8,3,10, - 3,12,3,139,9,3,1,3,4,3,142,8,3,11,3,12,3,143,1,3,5,3,147,8,3,10, - 3,12,3,150,9,3,1,3,3,3,153,8,3,1,3,5,3,156,8,3,10,3,12,3,159,9,3, - 1,3,3,3,162,8,3,1,3,5,3,165,8,3,10,3,12,3,168,9,3,3,3,170,8,3,1, - 4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1, - 5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,195,8,5,1,6,1,6,1,6,3,6,200,8,6,1, - 6,1,6,1,6,3,6,205,8,6,1,6,5,6,208,8,6,10,6,12,6,211,9,6,1,6,1,6, - 1,6,1,6,1,6,1,6,5,6,219,8,6,10,6,12,6,222,9,6,1,6,3,6,225,8,6,1, - 7,1,7,1,7,3,7,230,8,7,1,8,3,8,233,8,8,1,8,1,8,1,8,5,8,238,8,8,10, - 8,12,8,241,9,8,1,9,1,9,3,9,245,8,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1, - 9,1,9,1,9,1,9,1,9,3,9,259,8,9,1,9,3,9,262,8,9,1,9,5,9,265,8,9,10, - 9,12,9,268,9,9,1,9,1,9,1,9,1,9,3,9,274,8,9,1,9,1,9,1,9,3,9,279,8, - 9,1,9,1,9,1,9,1,9,1,9,3,9,286,8,9,1,10,1,10,1,11,1,11,1,12,1,12, - 1,13,1,13,1,13,0,0,14,0,2,4,6,8,10,12,14,16,18,20,22,24,26,0,6,2, - 0,3,3,13,13,2,0,25,26,32,32,2,0,16,16,33,33,2,0,14,14,33,33,1,0, - 4,7,2,0,27,27,30,30,330,0,28,1,0,0,0,2,54,1,0,0,0,4,97,1,0,0,0,6, - 169,1,0,0,0,8,171,1,0,0,0,10,194,1,0,0,0,12,224,1,0,0,0,14,229,1, - 0,0,0,16,232,1,0,0,0,18,285,1,0,0,0,20,287,1,0,0,0,22,289,1,0,0, - 0,24,291,1,0,0,0,26,293,1,0,0,0,28,35,5,1,0,0,29,30,5,23,0,0,30, - 31,3,4,2,0,31,32,5,24,0,0,32,34,1,0,0,0,33,29,1,0,0,0,34,37,1,0, - 0,0,35,33,1,0,0,0,35,36,1,0,0,0,36,38,1,0,0,0,37,35,1,0,0,0,38,39, - 3,2,1,0,39,40,5,1,0,0,40,1,1,0,0,0,41,42,3,4,2,0,42,43,3,6,3,0,43, - 44,5,2,0,0,44,45,5,14,0,0,45,55,1,0,0,0,46,47,3,4,2,0,47,48,3,6, - 3,0,48,55,1,0,0,0,49,50,3,6,3,0,50,51,5,2,0,0,51,52,5,14,0,0,52, - 55,1,0,0,0,53,55,3,6,3,0,54,41,1,0,0,0,54,46,1,0,0,0,54,49,1,0,0, - 0,54,53,1,0,0,0,55,3,1,0,0,0,56,57,3,6,3,0,57,58,3,10,5,0,58,98, - 1,0,0,0,59,60,3,6,3,0,60,61,3,10,5,0,61,62,3,4,2,0,62,98,1,0,0,0, - 63,64,5,21,0,0,64,65,3,4,2,0,65,66,5,22,0,0,66,98,1,0,0,0,67,68, - 3,6,3,0,68,69,3,10,5,0,69,70,5,21,0,0,70,71,3,4,2,0,71,72,5,22,0, - 0,72,73,3,4,2,0,73,98,1,0,0,0,74,75,3,6,3,0,75,76,3,10,5,0,76,77, - 5,21,0,0,77,78,3,4,2,0,78,79,5,22,0,0,79,80,5,21,0,0,80,81,3,4,2, - 0,81,82,5,22,0,0,82,83,3,4,2,0,83,98,1,0,0,0,84,85,3,6,3,0,85,86, - 3,10,5,0,86,87,5,21,0,0,87,88,3,4,2,0,88,89,5,22,0,0,89,90,5,21, - 0,0,90,91,3,4,2,0,91,92,5,22,0,0,92,93,5,21,0,0,93,94,3,4,2,0,94, - 95,5,22,0,0,95,96,3,4,2,0,96,98,1,0,0,0,97,56,1,0,0,0,97,59,1,0, - 0,0,97,63,1,0,0,0,97,67,1,0,0,0,97,74,1,0,0,0,97,84,1,0,0,0,98,5, - 1,0,0,0,99,101,3,18,9,0,100,99,1,0,0,0,101,104,1,0,0,0,102,100,1, - 0,0,0,102,103,1,0,0,0,103,106,1,0,0,0,104,102,1,0,0,0,105,107,3, - 8,4,0,106,105,1,0,0,0,107,108,1,0,0,0,108,106,1,0,0,0,108,109,1, - 0,0,0,109,113,1,0,0,0,110,112,3,18,9,0,111,110,1,0,0,0,112,115,1, - 0,0,0,113,111,1,0,0,0,113,114,1,0,0,0,114,117,1,0,0,0,115,113,1, - 0,0,0,116,118,5,15,0,0,117,116,1,0,0,0,117,118,1,0,0,0,118,122,1, - 0,0,0,119,121,3,18,9,0,120,119,1,0,0,0,121,124,1,0,0,0,122,120,1, - 0,0,0,122,123,1,0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,125,127,5, - 14,0,0,126,125,1,0,0,0,126,127,1,0,0,0,127,131,1,0,0,0,128,130,3, - 18,9,0,129,128,1,0,0,0,130,133,1,0,0,0,131,129,1,0,0,0,131,132,1, - 0,0,0,132,170,1,0,0,0,133,131,1,0,0,0,134,136,3,18,9,0,135,134,1, - 0,0,0,136,139,1,0,0,0,137,135,1,0,0,0,137,138,1,0,0,0,138,141,1, - 0,0,0,139,137,1,0,0,0,140,142,3,8,4,0,141,140,1,0,0,0,142,143,1, - 0,0,0,143,141,1,0,0,0,143,144,1,0,0,0,144,148,1,0,0,0,145,147,3, - 18,9,0,146,145,1,0,0,0,147,150,1,0,0,0,148,146,1,0,0,0,148,149,1, - 0,0,0,149,152,1,0,0,0,150,148,1,0,0,0,151,153,5,14,0,0,152,151,1, - 0,0,0,152,153,1,0,0,0,153,157,1,0,0,0,154,156,3,18,9,0,155,154,1, - 0,0,0,156,159,1,0,0,0,157,155,1,0,0,0,157,158,1,0,0,0,158,161,1, - 0,0,0,159,157,1,0,0,0,160,162,5,15,0,0,161,160,1,0,0,0,161,162,1, - 0,0,0,162,166,1,0,0,0,163,165,3,18,9,0,164,163,1,0,0,0,165,168,1, - 0,0,0,166,164,1,0,0,0,166,167,1,0,0,0,167,170,1,0,0,0,168,166,1, - 0,0,0,169,102,1,0,0,0,169,137,1,0,0,0,170,7,1,0,0,0,171,172,7,0, - 0,0,172,9,1,0,0,0,173,174,5,19,0,0,174,175,3,22,11,0,175,176,5,16, - 0,0,176,177,5,18,0,0,177,178,3,20,10,0,178,179,5,20,0,0,179,195, - 1,0,0,0,180,181,5,19,0,0,181,182,5,16,0,0,182,183,5,18,0,0,183,184, - 3,20,10,0,184,185,5,20,0,0,185,195,1,0,0,0,186,187,3,22,11,0,187, - 188,5,16,0,0,188,189,5,18,0,0,189,190,3,20,10,0,190,195,1,0,0,0, - 191,192,3,22,11,0,192,193,5,16,0,0,193,195,1,0,0,0,194,173,1,0,0, - 0,194,180,1,0,0,0,194,186,1,0,0,0,194,191,1,0,0,0,195,11,1,0,0,0, - 196,197,5,31,0,0,197,199,5,23,0,0,198,200,3,26,13,0,199,198,1,0, - 0,0,199,200,1,0,0,0,200,201,1,0,0,0,201,209,5,16,0,0,202,204,5,17, - 0,0,203,205,3,26,13,0,204,203,1,0,0,0,204,205,1,0,0,0,205,206,1, - 0,0,0,206,208,5,16,0,0,207,202,1,0,0,0,208,211,1,0,0,0,209,207,1, - 0,0,0,209,210,1,0,0,0,210,212,1,0,0,0,211,209,1,0,0,0,212,225,5, - 24,0,0,213,214,5,27,0,0,214,215,5,23,0,0,215,220,5,16,0,0,216,217, - 5,17,0,0,217,219,5,16,0,0,218,216,1,0,0,0,219,222,1,0,0,0,220,218, - 1,0,0,0,220,221,1,0,0,0,221,223,1,0,0,0,222,220,1,0,0,0,223,225, - 5,24,0,0,224,196,1,0,0,0,224,213,1,0,0,0,225,13,1,0,0,0,226,230, - 5,13,0,0,227,230,3,24,12,0,228,230,5,8,0,0,229,226,1,0,0,0,229,227, - 1,0,0,0,229,228,1,0,0,0,230,15,1,0,0,0,231,233,7,1,0,0,232,231,1, - 0,0,0,232,233,1,0,0,0,233,234,1,0,0,0,234,235,5,4,0,0,235,239,5, - 16,0,0,236,238,3,12,6,0,237,236,1,0,0,0,238,241,1,0,0,0,239,237, - 1,0,0,0,239,240,1,0,0,0,240,17,1,0,0,0,241,239,1,0,0,0,242,243,5, - 16,0,0,243,245,5,17,0,0,244,242,1,0,0,0,244,245,1,0,0,0,245,246, - 1,0,0,0,246,247,5,16,0,0,247,248,5,18,0,0,248,249,5,9,0,0,249,286, - 5,18,0,0,250,251,5,16,0,0,251,252,5,18,0,0,252,253,3,24,12,0,253, - 254,5,18,0,0,254,255,3,14,7,0,255,256,5,18,0,0,256,286,1,0,0,0,257, - 259,5,18,0,0,258,257,1,0,0,0,258,259,1,0,0,0,259,261,1,0,0,0,260, - 262,5,16,0,0,261,260,1,0,0,0,261,262,1,0,0,0,262,266,1,0,0,0,263, - 265,3,24,12,0,264,263,1,0,0,0,265,268,1,0,0,0,266,264,1,0,0,0,266, - 267,1,0,0,0,267,269,1,0,0,0,268,266,1,0,0,0,269,286,3,14,7,0,270, - 278,5,16,0,0,271,272,5,17,0,0,272,274,5,16,0,0,273,271,1,0,0,0,273, - 274,1,0,0,0,274,275,1,0,0,0,275,279,5,28,0,0,276,279,5,29,0,0,277, - 279,3,16,8,0,278,273,1,0,0,0,278,276,1,0,0,0,278,277,1,0,0,0,279, - 286,1,0,0,0,280,286,5,10,0,0,281,282,5,11,0,0,282,286,5,18,0,0,283, - 284,5,18,0,0,284,286,5,12,0,0,285,244,1,0,0,0,285,250,1,0,0,0,285, - 258,1,0,0,0,285,270,1,0,0,0,285,280,1,0,0,0,285,281,1,0,0,0,285, - 283,1,0,0,0,286,19,1,0,0,0,287,288,7,2,0,0,288,21,1,0,0,0,289,290, - 7,3,0,0,290,23,1,0,0,0,291,292,7,4,0,0,292,25,1,0,0,0,293,294,7, - 5,0,0,294,27,1,0,0,0,34,35,54,97,102,108,113,117,122,126,131,137, - 143,148,152,157,161,166,169,194,199,204,209,220,224,229,232,239, - 244,258,261,266,273,278,285 + 3,3,127,8,3,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5, + 1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,1,5,3,5,152,8,5,1,6,1,6,1,6, + 3,6,157,8,6,1,6,1,6,1,6,3,6,162,8,6,1,6,5,6,165,8,6,10,6,12,6,168, + 9,6,1,6,1,6,1,6,1,6,1,6,1,6,5,6,176,8,6,10,6,12,6,179,9,6,1,6,3, + 6,182,8,6,1,7,1,7,1,7,3,7,187,8,7,1,8,3,8,190,8,8,1,8,1,8,1,8,5, + 8,195,8,8,10,8,12,8,198,9,8,1,9,1,9,3,9,202,8,9,1,9,1,9,1,9,1,9, + 1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,216,8,9,1,9,3,9,219,8,9,1,9, + 5,9,222,8,9,10,9,12,9,225,9,9,1,9,1,9,1,9,1,9,3,9,231,8,9,1,9,1, + 9,1,9,3,9,236,8,9,1,9,1,9,1,9,1,9,1,9,3,9,243,8,9,1,10,1,10,1,11, + 1,11,1,12,1,12,1,13,1,13,1,13,0,0,14,0,2,4,6,8,10,12,14,16,18,20, + 22,24,26,0,6,2,0,3,3,13,13,2,0,25,26,32,32,2,0,16,16,33,33,2,0,14, + 14,33,33,1,0,4,7,2,0,27,27,30,30,278,0,28,1,0,0,0,2,54,1,0,0,0,4, + 97,1,0,0,0,6,102,1,0,0,0,8,128,1,0,0,0,10,151,1,0,0,0,12,181,1,0, + 0,0,14,186,1,0,0,0,16,189,1,0,0,0,18,242,1,0,0,0,20,244,1,0,0,0, + 22,246,1,0,0,0,24,248,1,0,0,0,26,250,1,0,0,0,28,35,5,1,0,0,29,30, + 5,23,0,0,30,31,3,4,2,0,31,32,5,24,0,0,32,34,1,0,0,0,33,29,1,0,0, + 0,34,37,1,0,0,0,35,33,1,0,0,0,35,36,1,0,0,0,36,38,1,0,0,0,37,35, + 1,0,0,0,38,39,3,2,1,0,39,40,5,1,0,0,40,1,1,0,0,0,41,42,3,4,2,0,42, + 43,3,6,3,0,43,44,5,2,0,0,44,45,5,14,0,0,45,55,1,0,0,0,46,47,3,4, + 2,0,47,48,3,6,3,0,48,55,1,0,0,0,49,50,3,6,3,0,50,51,5,2,0,0,51,52, + 5,14,0,0,52,55,1,0,0,0,53,55,3,6,3,0,54,41,1,0,0,0,54,46,1,0,0,0, + 54,49,1,0,0,0,54,53,1,0,0,0,55,3,1,0,0,0,56,57,3,6,3,0,57,58,3,10, + 5,0,58,98,1,0,0,0,59,60,3,6,3,0,60,61,3,10,5,0,61,62,3,4,2,0,62, + 98,1,0,0,0,63,64,5,21,0,0,64,65,3,4,2,0,65,66,5,22,0,0,66,98,1,0, + 0,0,67,68,3,6,3,0,68,69,3,10,5,0,69,70,5,21,0,0,70,71,3,4,2,0,71, + 72,5,22,0,0,72,73,3,4,2,0,73,98,1,0,0,0,74,75,3,6,3,0,75,76,3,10, + 5,0,76,77,5,21,0,0,77,78,3,4,2,0,78,79,5,22,0,0,79,80,5,21,0,0,80, + 81,3,4,2,0,81,82,5,22,0,0,82,83,3,4,2,0,83,98,1,0,0,0,84,85,3,6, + 3,0,85,86,3,10,5,0,86,87,5,21,0,0,87,88,3,4,2,0,88,89,5,22,0,0,89, + 90,5,21,0,0,90,91,3,4,2,0,91,92,5,22,0,0,92,93,5,21,0,0,93,94,3, + 4,2,0,94,95,5,22,0,0,95,96,3,4,2,0,96,98,1,0,0,0,97,56,1,0,0,0,97, + 59,1,0,0,0,97,63,1,0,0,0,97,67,1,0,0,0,97,74,1,0,0,0,97,84,1,0,0, + 0,98,5,1,0,0,0,99,101,3,18,9,0,100,99,1,0,0,0,101,104,1,0,0,0,102, + 100,1,0,0,0,102,103,1,0,0,0,103,106,1,0,0,0,104,102,1,0,0,0,105, + 107,3,8,4,0,106,105,1,0,0,0,107,108,1,0,0,0,108,106,1,0,0,0,108, + 109,1,0,0,0,109,113,1,0,0,0,110,112,3,18,9,0,111,110,1,0,0,0,112, + 115,1,0,0,0,113,111,1,0,0,0,113,114,1,0,0,0,114,117,1,0,0,0,115, + 113,1,0,0,0,116,118,5,15,0,0,117,116,1,0,0,0,117,118,1,0,0,0,118, + 122,1,0,0,0,119,121,3,18,9,0,120,119,1,0,0,0,121,124,1,0,0,0,122, + 120,1,0,0,0,122,123,1,0,0,0,123,126,1,0,0,0,124,122,1,0,0,0,125, + 127,5,14,0,0,126,125,1,0,0,0,126,127,1,0,0,0,127,7,1,0,0,0,128,129, + 7,0,0,0,129,9,1,0,0,0,130,131,5,19,0,0,131,132,3,22,11,0,132,133, + 5,16,0,0,133,134,5,18,0,0,134,135,3,20,10,0,135,136,5,20,0,0,136, + 152,1,0,0,0,137,138,5,19,0,0,138,139,5,16,0,0,139,140,5,18,0,0,140, + 141,3,20,10,0,141,142,5,20,0,0,142,152,1,0,0,0,143,144,3,22,11,0, + 144,145,5,16,0,0,145,146,5,18,0,0,146,147,3,20,10,0,147,152,1,0, + 0,0,148,149,3,22,11,0,149,150,5,16,0,0,150,152,1,0,0,0,151,130,1, + 0,0,0,151,137,1,0,0,0,151,143,1,0,0,0,151,148,1,0,0,0,152,11,1,0, + 0,0,153,154,5,31,0,0,154,156,5,23,0,0,155,157,3,26,13,0,156,155, + 1,0,0,0,156,157,1,0,0,0,157,158,1,0,0,0,158,166,5,16,0,0,159,161, + 5,17,0,0,160,162,3,26,13,0,161,160,1,0,0,0,161,162,1,0,0,0,162,163, + 1,0,0,0,163,165,5,16,0,0,164,159,1,0,0,0,165,168,1,0,0,0,166,164, + 1,0,0,0,166,167,1,0,0,0,167,169,1,0,0,0,168,166,1,0,0,0,169,182, + 5,24,0,0,170,171,5,27,0,0,171,172,5,23,0,0,172,177,5,16,0,0,173, + 174,5,17,0,0,174,176,5,16,0,0,175,173,1,0,0,0,176,179,1,0,0,0,177, + 175,1,0,0,0,177,178,1,0,0,0,178,180,1,0,0,0,179,177,1,0,0,0,180, + 182,5,24,0,0,181,153,1,0,0,0,181,170,1,0,0,0,182,13,1,0,0,0,183, + 187,5,13,0,0,184,187,3,24,12,0,185,187,5,8,0,0,186,183,1,0,0,0,186, + 184,1,0,0,0,186,185,1,0,0,0,187,15,1,0,0,0,188,190,7,1,0,0,189,188, + 1,0,0,0,189,190,1,0,0,0,190,191,1,0,0,0,191,192,5,4,0,0,192,196, + 5,16,0,0,193,195,3,12,6,0,194,193,1,0,0,0,195,198,1,0,0,0,196,194, + 1,0,0,0,196,197,1,0,0,0,197,17,1,0,0,0,198,196,1,0,0,0,199,200,5, + 16,0,0,200,202,5,17,0,0,201,199,1,0,0,0,201,202,1,0,0,0,202,203, + 1,0,0,0,203,204,5,16,0,0,204,205,5,18,0,0,205,206,5,9,0,0,206,243, + 5,18,0,0,207,208,5,16,0,0,208,209,5,18,0,0,209,210,3,24,12,0,210, + 211,5,18,0,0,211,212,3,14,7,0,212,213,5,18,0,0,213,243,1,0,0,0,214, + 216,5,18,0,0,215,214,1,0,0,0,215,216,1,0,0,0,216,218,1,0,0,0,217, + 219,5,16,0,0,218,217,1,0,0,0,218,219,1,0,0,0,219,223,1,0,0,0,220, + 222,3,24,12,0,221,220,1,0,0,0,222,225,1,0,0,0,223,221,1,0,0,0,223, + 224,1,0,0,0,224,226,1,0,0,0,225,223,1,0,0,0,226,243,3,14,7,0,227, + 235,5,16,0,0,228,229,5,17,0,0,229,231,5,16,0,0,230,228,1,0,0,0,230, + 231,1,0,0,0,231,232,1,0,0,0,232,236,5,28,0,0,233,236,5,29,0,0,234, + 236,3,16,8,0,235,230,1,0,0,0,235,233,1,0,0,0,235,234,1,0,0,0,236, + 243,1,0,0,0,237,243,5,10,0,0,238,239,5,11,0,0,239,243,5,18,0,0,240, + 241,5,18,0,0,241,243,5,12,0,0,242,201,1,0,0,0,242,207,1,0,0,0,242, + 215,1,0,0,0,242,227,1,0,0,0,242,237,1,0,0,0,242,238,1,0,0,0,242, + 240,1,0,0,0,243,19,1,0,0,0,244,245,7,2,0,0,245,21,1,0,0,0,246,247, + 7,3,0,0,247,23,1,0,0,0,248,249,7,4,0,0,249,25,1,0,0,0,250,251,7, + 5,0,0,251,27,1,0,0,0,25,35,54,97,102,108,113,117,122,126,151,156, + 161,166,177,181,186,189,196,201,215,218,223,230,235,242 ] class GlycanParser ( Parser ): @@ -578,162 +560,67 @@ def deriv(self): self.enterRule(localctx, 6, self.RULE_deriv) self._la = 0 # Token type try: - self.state = 169 + self.enterOuterAlt(localctx, 1) + self.state = 102 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,17,self._ctx) - if la_ == 1: - self.enterOuterAlt(localctx, 1) - self.state = 102 + _alt = self._interp.adaptivePredict(self._input,3,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 99 + self.modi() + self.state = 104 self._errHandler.sync(self) _alt = self._interp.adaptivePredict(self._input,3,self._ctx) - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt==1: - self.state = 99 - self.modi() - self.state = 104 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,3,self._ctx) - - self.state = 106 - self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 105 - self.saci() - - else: - raise NoViableAltException(self) - self.state = 108 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,4,self._ctx) - - self.state = 113 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,5,self._ctx) - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt==1: - self.state = 110 - self.modi() - self.state = 115 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,5,self._ctx) - - self.state = 117 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la==15: - self.state = 116 - self.match(GlycanParser.RING) - - - self.state = 122 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,7,self._ctx) - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt==1: - self.state = 119 - self.modi() - self.state = 124 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,7,self._ctx) - - self.state = 126 - self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,8,self._ctx) - if la_ == 1: - self.state = 125 - self.match(GlycanParser.TYPE) - - self.state = 131 - self._errHandler.sync(self) - _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 128 - self.modi() - self.state = 133 - self._errHandler.sync(self) - _la = self._input.LA(1) - - pass - - elif la_ == 2: - self.enterOuterAlt(localctx, 2) - self.state = 137 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,10,self._ctx) - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt==1: - self.state = 134 - self.modi() - self.state = 139 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,10,self._ctx) - - self.state = 141 - self._errHandler.sync(self) - _alt = 1 - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt == 1: - self.state = 140 - self.saci() - - else: - raise NoViableAltException(self) - self.state = 143 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,11,self._ctx) + self.state = 106 + self._errHandler.sync(self) + _alt = 1 + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt == 1: + self.state = 105 + self.saci() - self.state = 148 + else: + raise NoViableAltException(self) + self.state = 108 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,12,self._ctx) - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt==1: - self.state = 145 - self.modi() - self.state = 150 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,12,self._ctx) + _alt = self._interp.adaptivePredict(self._input,4,self._ctx) - self.state = 152 - self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,13,self._ctx) - if la_ == 1: - self.state = 151 - self.match(GlycanParser.TYPE) - - - self.state = 157 + self.state = 113 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,5,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + self.state = 110 + self.modi() + self.state = 115 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,14,self._ctx) - while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: - if _alt==1: - self.state = 154 - self.modi() - self.state = 159 - self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,14,self._ctx) + _alt = self._interp.adaptivePredict(self._input,5,self._ctx) - self.state = 161 - self._errHandler.sync(self) - _la = self._input.LA(1) - if _la==15: - self.state = 160 - self.match(GlycanParser.RING) + self.state = 117 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==15: + self.state = 116 + self.match(GlycanParser.RING) - self.state = 166 + self.state = 122 + self._errHandler.sync(self) + _la = self._input.LA(1) + while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): + self.state = 119 + self.modi() + self.state = 124 self._errHandler.sync(self) _la = self._input.LA(1) - while (((_la) & ~0x3f) == 0 and ((1 << _la) & 339440) != 0): - self.state = 163 - self.modi() - self.state = 168 - self._errHandler.sync(self) - _la = self._input.LA(1) - pass + self.state = 126 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,8,self._ctx) + if la_ == 1: + self.state = 125 + self.match(GlycanParser.TYPE) except RecognitionException as re: @@ -779,7 +666,7 @@ def saci(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 171 + self.state = 128 _la = self._input.LA(1) if not(_la==3 or _la==13): self._errHandler.recoverInline(self) @@ -841,56 +728,56 @@ def con(self): localctx = GlycanParser.ConContext(self, self._ctx, self.state) self.enterRule(localctx, 10, self.RULE_con) try: - self.state = 194 + self.state = 151 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,18,self._ctx) + la_ = self._interp.adaptivePredict(self._input,9,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 173 + self.state = 130 self.match(GlycanParser.LPAR) - self.state = 174 + self.state = 131 self.typi() - self.state = 175 + self.state = 132 self.match(GlycanParser.NUM) - self.state = 176 + self.state = 133 self.match(GlycanParser.DASH) - self.state = 177 + self.state = 134 self.qnum() - self.state = 178 + self.state = 135 self.match(GlycanParser.RPAR) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 180 + self.state = 137 self.match(GlycanParser.LPAR) - self.state = 181 + self.state = 138 self.match(GlycanParser.NUM) - self.state = 182 + self.state = 139 self.match(GlycanParser.DASH) - self.state = 183 + self.state = 140 self.qnum() - self.state = 184 + self.state = 141 self.match(GlycanParser.RPAR) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 186 + self.state = 143 self.typi() - self.state = 187 + self.state = 144 self.match(GlycanParser.NUM) - self.state = 188 + self.state = 145 self.match(GlycanParser.DASH) - self.state = 189 + self.state = 146 self.qnum() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 191 + self.state = 148 self.typi() - self.state = 192 + self.state = 149 self.match(GlycanParser.NUM) pass @@ -962,69 +849,69 @@ def add(self): self.enterRule(localctx, 12, self.RULE_add) self._la = 0 # Token type try: - self.state = 224 + self.state = 181 self._errHandler.sync(self) token = self._input.LA(1) if token in [31]: self.enterOuterAlt(localctx, 1) - self.state = 196 + self.state = 153 self.match(GlycanParser.EQ) - self.state = 197 + self.state = 154 self.match(GlycanParser.LBRACK) - self.state = 199 + self.state = 156 self._errHandler.sync(self) _la = self._input.LA(1) if _la==27 or _la==30: - self.state = 198 + self.state = 155 self.ct() - self.state = 201 + self.state = 158 self.match(GlycanParser.NUM) - self.state = 209 + self.state = 166 self._errHandler.sync(self) _la = self._input.LA(1) while _la==17: - self.state = 202 + self.state = 159 self.match(GlycanParser.COLON) - self.state = 204 + self.state = 161 self._errHandler.sync(self) _la = self._input.LA(1) if _la==27 or _la==30: - self.state = 203 + self.state = 160 self.ct() - self.state = 206 + self.state = 163 self.match(GlycanParser.NUM) - self.state = 211 + self.state = 168 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 212 + self.state = 169 self.match(GlycanParser.RBRACK) pass elif token in [27]: self.enterOuterAlt(localctx, 2) - self.state = 213 + self.state = 170 self.match(GlycanParser.C) - self.state = 214 + self.state = 171 self.match(GlycanParser.LBRACK) - self.state = 215 + self.state = 172 self.match(GlycanParser.NUM) - self.state = 220 + self.state = 177 self._errHandler.sync(self) _la = self._input.LA(1) while _la==17: - self.state = 216 + self.state = 173 self.match(GlycanParser.COLON) - self.state = 217 + self.state = 174 self.match(GlycanParser.NUM) - self.state = 222 + self.state = 179 self._errHandler.sync(self) _la = self._input.LA(1) - self.state = 223 + self.state = 180 self.match(GlycanParser.RBRACK) pass else: @@ -1075,22 +962,22 @@ def fgi(self): localctx = GlycanParser.FgiContext(self, self._ctx, self.state) self.enterRule(localctx, 14, self.RULE_fgi) try: - self.state = 229 + self.state = 186 self._errHandler.sync(self) token = self._input.LA(1) if token in [13]: self.enterOuterAlt(localctx, 1) - self.state = 226 + self.state = 183 self.match(GlycanParser.COUNT) pass elif token in [4, 5, 6, 7]: self.enterOuterAlt(localctx, 2) - self.state = 227 + self.state = 184 self.bridge() pass elif token in [8]: self.enterOuterAlt(localctx, 3) - self.state = 228 + self.state = 185 self.match(GlycanParser.FG) pass else: @@ -1155,11 +1042,11 @@ def carb(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 232 + self.state = 189 self._errHandler.sync(self) _la = self._input.LA(1) if (((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0): - self.state = 231 + self.state = 188 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 4395630592) != 0)): self._errHandler.recoverInline(self) @@ -1168,17 +1055,17 @@ def carb(self): self.consume() - self.state = 234 + self.state = 191 self.match(GlycanParser.CARBON) - self.state = 235 + self.state = 192 self.match(GlycanParser.NUM) - self.state = 239 + self.state = 196 self._errHandler.sync(self) _la = self._input.LA(1) while _la==27 or _la==31: - self.state = 236 + self.state = 193 self.add() - self.state = 241 + self.state = 198 self._errHandler.sync(self) _la = self._input.LA(1) @@ -1266,107 +1153,107 @@ def modi(self): self.enterRule(localctx, 18, self.RULE_modi) self._la = 0 # Token type try: - self.state = 285 + self.state = 242 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,33,self._ctx) + la_ = self._interp.adaptivePredict(self._input,24,self._ctx) if la_ == 1: self.enterOuterAlt(localctx, 1) - self.state = 244 + self.state = 201 self._errHandler.sync(self) - la_ = self._interp.adaptivePredict(self._input,27,self._ctx) + la_ = self._interp.adaptivePredict(self._input,18,self._ctx) if la_ == 1: - self.state = 242 + self.state = 199 self.match(GlycanParser.NUM) - self.state = 243 + self.state = 200 self.match(GlycanParser.COLON) - self.state = 246 + self.state = 203 self.match(GlycanParser.NUM) - self.state = 247 + self.state = 204 self.match(GlycanParser.DASH) - self.state = 248 + self.state = 205 self.match(GlycanParser.ANHYDRO) - self.state = 249 + self.state = 206 self.match(GlycanParser.DASH) pass elif la_ == 2: self.enterOuterAlt(localctx, 2) - self.state = 250 + self.state = 207 self.match(GlycanParser.NUM) - self.state = 251 + self.state = 208 self.match(GlycanParser.DASH) - self.state = 252 + self.state = 209 self.bridge() - self.state = 253 + self.state = 210 self.match(GlycanParser.DASH) - self.state = 254 + self.state = 211 self.fgi() - self.state = 255 + self.state = 212 self.match(GlycanParser.DASH) pass elif la_ == 3: self.enterOuterAlt(localctx, 3) - self.state = 258 + self.state = 215 self._errHandler.sync(self) _la = self._input.LA(1) if _la==18: - self.state = 257 + self.state = 214 self.match(GlycanParser.DASH) - self.state = 261 + self.state = 218 self._errHandler.sync(self) _la = self._input.LA(1) if _la==16: - self.state = 260 + self.state = 217 self.match(GlycanParser.NUM) - self.state = 266 + self.state = 223 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,30,self._ctx) + _alt = self._interp.adaptivePredict(self._input,21,self._ctx) while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: if _alt==1: - self.state = 263 + self.state = 220 self.bridge() - self.state = 268 + self.state = 225 self._errHandler.sync(self) - _alt = self._interp.adaptivePredict(self._input,30,self._ctx) + _alt = self._interp.adaptivePredict(self._input,21,self._ctx) - self.state = 269 + self.state = 226 self.fgi() pass elif la_ == 4: self.enterOuterAlt(localctx, 4) - self.state = 270 + self.state = 227 self.match(GlycanParser.NUM) - self.state = 278 + self.state = 235 self._errHandler.sync(self) token = self._input.LA(1) if token in [17, 28]: - self.state = 273 + self.state = 230 self._errHandler.sync(self) _la = self._input.LA(1) if _la==17: - self.state = 271 + self.state = 228 self.match(GlycanParser.COLON) - self.state = 272 + self.state = 229 self.match(GlycanParser.NUM) - self.state = 275 + self.state = 232 self.match(GlycanParser.D) pass elif token in [29]: - self.state = 276 + self.state = 233 self.match(GlycanParser.E) pass elif token in [4, 25, 26, 32]: - self.state = 277 + self.state = 234 self.carb() pass else: @@ -1376,23 +1263,23 @@ def modi(self): elif la_ == 5: self.enterOuterAlt(localctx, 5) - self.state = 280 + self.state = 237 self.match(GlycanParser.HEAD) pass elif la_ == 6: self.enterOuterAlt(localctx, 6) - self.state = 281 + self.state = 238 self.match(GlycanParser.HEADD) - self.state = 282 + self.state = 239 self.match(GlycanParser.DASH) pass elif la_ == 7: self.enterOuterAlt(localctx, 7) - self.state = 283 + self.state = 240 self.match(GlycanParser.DASH) - self.state = 284 + self.state = 241 self.match(GlycanParser.END) pass @@ -1440,7 +1327,7 @@ def qnum(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 287 + self.state = 244 _la = self._input.LA(1) if not(_la==16 or _la==33): self._errHandler.recoverInline(self) @@ -1490,7 +1377,7 @@ def typi(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 289 + self.state = 246 _la = self._input.LA(1) if not(_la==14 or _la==33): self._errHandler.recoverInline(self) @@ -1546,7 +1433,7 @@ def bridge(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 291 + self.state = 248 _la = self._input.LA(1) if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 240) != 0)): self._errHandler.recoverInline(self) @@ -1596,7 +1483,7 @@ def ct(self): self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) - self.state = 293 + self.state = 250 _la = self._input.LA(1) if not(_la==27 or _la==30): self._errHandler.recoverInline(self) diff --git a/tests/data/pubchem_mono.tsv b/tests/data/pubchem_mono.tsv index e669c49..136e4a6 100644 --- a/tests/data/pubchem_mono.tsv +++ b/tests/data/pubchem_mono.tsv @@ -143,5 +143,4 @@ D-Arap C1[C@H]([C@H]([C@@H](C(O1)O)O)O)O 6902 1-O-P-6-O-P-D-Frufb C([C@@H]1[C@H]([C@@H]([C@](O1)(COP(=O)(O)O)O)O)O)OP(=O)(O)O 10267 D-Fucp C[C@@H]1[C@@H]([C@@H]([C@H](C(O1)O)O)O)O 19466 FruN b C1[C@H]([C@H]([C@@H]([C@](O1)(CN)O)O)O)O 20484 -D-Frubp C1[C@H]([C@H]([C@@H]([C@](O1)(CO)O)O)O)O 24310 8eLeg5Ac7Ac b C[C@@H]([C@H]([C@H]1[C@@H]([C@H](C[C@](O1)(C(=O)O)O)O)NC(=O)C)NC(=O)C)O 154573043 From 46d6a97f5d79bd3bbfe924a8c5b6d534a599c43d Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Wed, 16 Oct 2024 10:56:14 +0200 Subject: [PATCH 14/14] Fix Warnings --- glyles/glycans/mono/enum_c.py | 19 +++++++------------ glyles/glycans/mono/monomer.py | 4 ++-- glyles/glycans/mono/reactor.py | 26 +++++++++++++------------- glyles/glycans/mono/reactor_basic.py | 2 +- glyles/glycans/poly/merger.py | 4 ++-- tests/test_parser.py | 2 +- 6 files changed, 26 insertions(+), 31 deletions(-) diff --git a/glyles/glycans/mono/enum_c.py b/glyles/glycans/mono/enum_c.py index 9c85095..c2cebf1 100644 --- a/glyles/glycans/mono/enum_c.py +++ b/glyles/glycans/mono/enum_c.py @@ -24,7 +24,7 @@ def enumerate_carbon(monomer): # then iterate over all those carbons and enumerate them beginning at C1 for c_id in range(1, next_c_id): - c_index = int(np.where(monomer.x[:, 1] == c_id)[0]) + c_index = np.where(monomer.x[:, 1] == c_id)[0].item() candidates = np.where(np.array(monomer.adjacency[c_index, :] != 0) & (monomer.x[:, 1] == 0))[0] if candidates.size != 0: for candidate in list(candidates): @@ -100,14 +100,9 @@ def enumerate_c_atoms(monomer, c_atoms, ringo): start, end = longest_c_chain[0], longest_c_chain[-1] # check conditions - """start_o_conn, end_o_conn = \ - np.argwhere((monomer.adjacency[start, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1) & - (monomer.x[:, 3] == 1)).squeeze().size > 0, \ - np.argwhere((monomer.adjacency[end, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1) & - (monomer.x[:, 3] == 1)).squeeze().size > 0""" - start_o_conn = np.argwhere(np.array(monomer.adjacency[start, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & + start_o_conn = np.argwhere(np.array(monomer.adjacency[start, :] == 1) & np.isin(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1)).squeeze().size > 0 - end_o_conn = np.argwhere(np.array(monomer.adjacency[end, :] == 1) & np.in1d(monomer.x[:, 0], [7, 8]) & + end_o_conn = np.argwhere(np.array(monomer.adjacency[end, :] == 1) & np.isin(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1)).squeeze().size > 0 # decide on c1 @@ -173,14 +168,14 @@ def equidistant(monomer, start, end): c_end_candidates = np.where(np.array(monomer.adjacency[end, :] == 1) & (monomer.x[:, 0] == 6) & (monomer.x[:, 2] & 0b1))[0] if c_start_candidates.size == 1 and c_end_candidates.size == 1: - start_ring_c = int(c_start_candidates) - end_ring_c = int(c_end_candidates) + start_ring_c = c_start_candidates.item() + end_ring_c = c_end_candidates.item() # check if those ring carbons have an attached oxygen start_ring_c_o_candidates = np.where(np.array(monomer.adjacency[start_ring_c, :] == 1) & - np.in1d(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1))[0] + np.isin(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1))[0] end_ring_c_o_candidates = np.where(np.array(monomer.adjacency[end_ring_c, :] == 1) & - np.in1d(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1))[0] + np.isin(monomer.x[:, 0], [7, 8]) & (monomer.x[:, 2] != 1))[0] if start_ring_c_o_candidates.size == 1 and end_ring_c_o_candidates.size == 1: raise UnreachableError("C1 atom cannot be detected") diff --git a/glyles/glycans/mono/monomer.py b/glyles/glycans/mono/monomer.py index 0025a39..6d3d81f 100644 --- a/glyles/glycans/mono/monomer.py +++ b/glyles/glycans/mono/monomer.py @@ -312,9 +312,9 @@ def to_smiles(self, ring_index, root_idx=None, root_id=None): assert root_idx is not None or root_id is not None, "Either Index or ID has to be provided" if root_id is None: if np.where(self.x[:, 1] == root_idx)[0].size != 0: - root_id = int(np.where(self.x[:, 1] == root_idx)[0]) + root_id = np.where(self.x[:, 1] == root_idx)[0].item() else: - root_id = int(np.where(self.x[:, 1] == 1)[0]) + root_id = np.where(self.x[:, 1] == 1)[0].item() root_id = self.__check_root_id(root_id) diff --git a/glyles/glycans/mono/reactor.py b/glyles/glycans/mono/reactor.py index 37f3560..2ccc303 100644 --- a/glyles/glycans/mono/reactor.py +++ b/glyles/glycans/mono/reactor.py @@ -74,7 +74,7 @@ "Lac": "OC(=O)C(O)C", "Lin": "OC(=O)CCCCCCC/C=C\\C/C=C\\CCCCC", "Mal": "O[C@H](C(=O)O)CC(=O)O", - "Ole": "OC(=O)CCCCCCC/C=C\CCCCCCCC", + "Ole": "OC(=O)CCCCCCC/C=C\\CCCCCCCC", "Ph": "c2ccccc2", "Phyt": "OCCC(C)CCCC(C)CCCC(C)CCCC(C)C", "Pyr": "OC(=O)C(=O)C", @@ -290,12 +290,12 @@ def react(self, names, types): if n == "A" or n == "-uronic": # if there's no ring take carbon with the highest number if sum(self.monomer.x[:, 2] & 0b1) == 0: - c_id = int(max(self.monomer.x[self.monomer.x[:, 0] == 6, 1])) + c_id = np.max(self.monomer.x[self.monomer.x[:, 0] == 6, 1]).item() # else take the last carbon in the ring else: - c_id = int(max(self.monomer.x[(self.monomer.x[:, 0] == 6) & (self.monomer.x[:, 2] & 0b1), 1])) - c_id = int(np.where(self.monomer.x[:, 1] == c_id)[0]) + c_id = np.max(self.monomer.x[(self.monomer.x[:, 0] == 6) & (self.monomer.x[:, 2] & 0b1), 1]).item() + c_id = np.where(self.monomer.x[:, 1] == c_id)[0].item() # if the selected carbon has a tail raging away from the monomer, iterate all the way down children = np.where(np.array(self.monomer.adjacency[c_id, :] == 1) & (self.monomer.x[:, 0] == 6) & @@ -352,20 +352,20 @@ def react(self, names, types): # add a functional group connected with an oxygen or nitrogen elif len(n) > 4 and n[1] == n[3] == "-" and n[2] in "ON": elem = "" if functional_groups[n[4:-1]][0] == n[2] else n[2] - full &= self.set_fg(C if int(self.monomer.x[self.monomer.find_oxygen(int(n[0])), 0]) == 6 else O, int(n[0]), elem, n[4:-1]) + full &= self.set_fg(C if self.monomer.x[self.monomer.find_oxygen(int(n[0])), 0].item() == 6 else O, int(n[0]), elem, n[4:-1]) # connect a functional group with nitrogen, oxygen, or phosphate in between elif n[1] in "NOP" and n[1:] not in n_conflict + o_conflict + p_conflict: bridge, fg = extract_bridge(n) if len(bridge) > 0 and functional_groups[fg][0] == bridge[-1]: bridge = bridge[:-1] - full &= self.set_fg(C if int(self.monomer.x[self.monomer.find_oxygen(int(n[0])), 0]) == 6 else O, int(n[0]), bridge, fg) + full &= self.set_fg(C if self.monomer.x[self.monomer.find_oxygen(int(n[0])), 0].item() == 6 else O, int(n[0]), bridge, fg) # add a poly carbon group elif (n[1] == "C" and n[2:4].isnumeric()) or \ (n[1:3] in "aCiC" and n[3:5].isnumeric()) or \ (n[1:4] == "aiC" and n[4:6].isnumeric()): - full &= self.set_fg(C if int(self.monomer.x[self.monomer.find_oxygen(int(n[0])), 0]) == 6 else O, int(n[0]), "", n) + full &= self.set_fg(C if self.monomer.x[self.monomer.find_oxygen(int(n[0])), 0].item() == 6 else O, int(n[0]), "", n) # add a group connected directly to the C-Atom elif n[1] == "C" and n[1:] not in c_conflict: @@ -376,7 +376,7 @@ def react(self, names, types): else: elem = self.monomer.structure.GetAtomWithIdx(self.monomer.find_oxygen(int(n[0]))).GetSymbol() \ if n[1:] in preserve_elem else "" - attach_to = C if int(self.monomer.x[self.monomer.find_oxygen(int(n[0])), 0]) == 6 else O + attach_to = C if self.monomer.x[self.monomer.find_oxygen(int(n[0])), 0].item() == 6 else O if elem == "C": full &= self.set_fg(attach_to, int(n[0]), "", n[1:]) else: @@ -390,14 +390,14 @@ def react(self, names, types): # attach the monomer to the second carbon in the ring, it might be C2 or C3 (for 2-ketoses) if fg == "Me": - full &= self.set_fg(C if int(self.monomer.x[self.monomer.find_oxygen(self.ring_c), 0]) == 6 else O, self.ring_c, bridge, fg) + full &= self.set_fg(C if self.monomer.x[self.monomer.find_oxygen(self.ring_c), 0].item() == 6 else O, self.ring_c, bridge, fg) else: - full &= self.set_fg(C if int(self.monomer.x[self.monomer.find_oxygen(self.ring_c + 1), 0]) == 6 else O, self.ring_c + 1, bridge, fg) + full &= self.set_fg(C if self.monomer.x[self.monomer.find_oxygen(self.ring_c + 1), 0].item() == 6 else O, self.ring_c + 1, bridge, fg) # functional groups might be directly connected to the carbon of the ring elif n[0] == "C" and n not in c_conflict: if "=" in n or n[1:].isdigit(): - self.set_fg(C if int(self.monomer.x[self.monomer.find_oxygen(self.ring_c), 0]) == 6 else O, self.ring_c, "O", self.parse_poly_carbon(n)) + self.set_fg(C if self.monomer.x[self.monomer.find_oxygen(self.ring_c), 0].item() == 6 else O, self.ring_c, "O", self.parse_poly_carbon(n)) else: # add a group connected directly to the C-Atom bridge, fg = extract_bridge(n) full &= self.set_fg(C, self.ring_c, bridge, fg) @@ -407,7 +407,7 @@ def react(self, names, types): elem = self.monomer.structure.GetAtomWithIdx(self.monomer.find_oxygen(int(n[0]))).GetSymbol() \ if n[1:] in preserve_elem else "" elem = "" if functional_groups[n][0] == elem else elem - full &= self.set_fg(C if int(self.monomer.x[self.monomer.find_oxygen(self.ring_c), 0]) == 6 else O, self.ring_c, elem, n) + full &= self.set_fg(C if self.monomer.x[self.monomer.find_oxygen(self.ring_c), 0].item() == 6 else O, self.ring_c, elem, n) # after storing all functional groups in a list, iterate over them and put them into the monomers structure self.assemble_chains() @@ -478,7 +478,7 @@ def check_for_anhydro(self, names, types): nums = [int(x) for x in re.findall(r'\d+', n)] if len(nums) != 2: raise ValueError("Anhydro functional groups should have exactly two numbers: X,Y-Anhydro-...") - y_c = int(np.where(self.monomer.x[:, 1] == nums[1])[0]) + y_c = np.where(self.monomer.x[:, 1] == nums[1])[0].item() x_o = self.monomer.find_oxygen(nums[0]) y_o = self.monomer.find_oxygen(nums[1]) diff --git a/glyles/glycans/mono/reactor_basic.py b/glyles/glycans/mono/reactor_basic.py index 5c104e0..33e27de 100644 --- a/glyles/glycans/mono/reactor_basic.py +++ b/glyles/glycans/mono/reactor_basic.py @@ -70,7 +70,7 @@ def check_for_resizing(monomer, names, types): # find oxygen of c6 to delete it and find c6 to replace it # TODO: Check if this is actually valid for all cases - c_id = int(np.where(monomer.x[:, 1] == int(max(monomer.x[monomer.x[:, 0] == 6, 1])))[0]) + c_id = np.where(monomer.x[:, 1] == np.max(monomer.x[monomer.x[:, 0] == 6, 1]).item())[0].item() ox_id = monomer.find_oxygen(position=c_id) # if the carbon to be extended is part of the ring, put the extension into a side_chain diff --git a/glyles/glycans/poly/merger.py b/glyles/glycans/poly/merger.py index 93d6798..e870af7 100644 --- a/glyles/glycans/poly/merger.py +++ b/glyles/glycans/poly/merger.py @@ -87,9 +87,9 @@ def merge(self, t, root_orientation="n", start=100, smiles_only: bool = True): # return the string that can be computed from connecting the monomers as marked above if np.where(t.nodes[0]["type"].get_features()[:, 1] == start)[0].size != 0: - position = int(np.argwhere(t.nodes[0]["type"].get_features()[:, 1] == start).squeeze()) + position = np.argwhere(t.nodes[0]["type"].get_features()[:, 1] == start).squeeze().item() else: - position = int(np.argwhere(t.nodes[0]["type"].get_features()[:, 1] == 1).squeeze()) + position = np.argwhere(t.nodes[0]["type"].get_features()[:, 1] == 1).squeeze().item() smiles, mask = self.merge_int(t, 0, position, 0) if smiles_only: return smiles diff --git a/tests/test_parser.py b/tests/test_parser.py index 9594462..d9889ba 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -462,7 +462,7 @@ def test_parse_ternary_branching_2(self, mode): check_child(g, id_child_1, id_child_23, "Gal", "(a1-6)", 0, Lactole.PYRANOSE) def test_parsing_error(self, caplog): - iupac = "Alt(a1-2)[Glc(a1-4)][Gal(a1-6)]Gul(a1-4)M*#$s'\d ;«]as;an" # Invalid IUPAC string! + iupac = "Alt(a1-2)[Glc(a1-4)][Gal(a1-6)]Gul(a1-4)M*#$s'\\d ;«]as;an" # Invalid IUPAC string! g = Glycan(iupac).get_tree() assert g is None assert "A parsing error occurred" in caplog.records[0].msg