From 3989518c0d5e9d8121887578ba0dc4fe6d03ac63 Mon Sep 17 00:00:00 2001 From: Roman Joeres Date: Tue, 15 Oct 2024 23:56:05 +0200 Subject: [PATCH] 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, 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] \ No newline at end of file +[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, 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] \ 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)