From 35c0098b617f42df555f8c4e990775688f74d895 Mon Sep 17 00:00:00 2001 From: for-just-we <1172782111@qq.com> Date: Tue, 26 Jul 2022 12:21:50 +0800 Subject: [PATCH] Initial commit --- ReadMe.md | 91 + extraTools/__init__.py | 0 extraTools/vuldetect/__init__.py | 1 + extraTools/vuldetect/deepwukong.py | 287 + extraTools/vuldetect/ivdetect.py | 105 + extraTools/vuldetect/sysevr.py | 168 + extraTools/vuldetect/utils/__init__.py | 0 extraTools/vuldetect/utils/environments.py | 97 + extraTools/vuldetect/utils/sinkPoint.py | 85 + extraTools/vuldetect/utils/symbolized.py | 128 + mainTool/CPG.py | 217 + mainTool/__init__.py | 0 mainTool/antlr/CPP14.interp | 497 + mainTool/antlr/CPP14.tokens | 263 + mainTool/antlr/CPP14Lexer.interp | 469 + mainTool/antlr/CPP14Lexer.py | 972 + mainTool/antlr/CPP14Lexer.tokens | 263 + mainTool/antlr/CPP14Listener.py | 2177 ++ mainTool/antlr/CPP14Parser.py | 20901 ++++++++++++++++ mainTool/antlr/CPP14Visitor.py | 1216 + mainTool/antlr/__init__.py | 0 mainTool/ast/ParsingUtils.py | 22 + mainTool/ast/__init__.py | 0 mainTool/ast/astNode.py | 125 + mainTool/ast/builders.py | 1206 + mainTool/ast/declarations/__init__.py | 0 mainTool/ast/declarations/complexDecls.py | 152 + mainTool/ast/declarations/simpleDecls.py | 98 + mainTool/ast/expressions/__init__.py | 0 mainTool/ast/expressions/binaryExpressions.py | 97 + mainTool/ast/expressions/expression.py | 146 + mainTool/ast/expressions/expressionHolders.py | 60 + .../ast/expressions/postfixExpressions.py | 83 + .../ast/expressions/primaryExpressions.py | 37 + mainTool/ast/statements/__init__.py | 0 mainTool/ast/statements/blockStarters.py | 119 + mainTool/ast/statements/jumps.py | 32 + mainTool/ast/statements/statements.py | 70 + mainTool/ast/walking/__init__.py | 0 mainTool/ast/walking/visitor.py | 12 + mainTool/cdg/CDG.py | 69 + mainTool/cdg/DominatorTree.py | 140 + mainTool/cdg/__init__.py | 0 mainTool/cfg/CCFG.py | 420 + mainTool/cfg/CFG.py | 115 + mainTool/cfg/__init__.py | 0 mainTool/cfg/nodes.py | 73 + mainTool/ddg/DDGCreator.py | 185 + mainTool/ddg/DefUseGraph.py | 70 + mainTool/ddg/__init__.py | 0 mainTool/udg/__init__.py | 0 mainTool/udg/astAnalyzers.py | 190 + mainTool/udg/astProvider.py | 60 + mainTool/udg/environments.py | 268 + mainTool/udg/useDefGraph.py | 50 + mainTool/utils/__init__.py | 0 mainTool/utils/graphUtils.py | 153 + mainTool/utils/types.py | 20 + resources/CPP14.g4 | 2369 ++ resources/calleeInfos.json | 193 + test/extraToolTests/__init__.py | 0 test/extraToolTests/deepwukongTest.py | 144 + test/extraToolTests/ivdetectTest.py | 139 + test/extraToolTests/sysevrTest.py | 127 + test/mainToolTests/ASTBuildTest.py | 317 + test/mainToolTests/CDGBuildTest.py | 148 + test/mainToolTests/CFGBuildTest.py | 189 + test/mainToolTests/CPGBuildTest.py | 122 + test/mainToolTests/DDGBuildTest.py | 125 + test/mainToolTests/FileParsingTest.py | 41 + test/mainToolTests/UDGBuildTest.py | 105 + test/mainToolTests/jsonTestData.py | 1389 + test/mainToolTests/parsingCode.py | 28 + test/testfiles/ComplexStruct.c | 11 + test/testfiles/IdentifierDeclTest.c | 6 + test/testfiles/inputcases | 13 + test/testfiles/sard_test_cases/CWE119_1.c | 75 + .../sard_test_cases/CWE121_new_goto.c | 89 + ...What_Where_Condition__connect_socket_53a.c | 175 + ...What_Where_Condition__connect_socket_53b.c | 78 + ...What_Where_Condition__connect_socket_53c.c | 78 + ...What_Where_Condition__connect_socket_53d.c | 106 + .../sard_test_cases/CWE_119_122_Struct.c | 78 + .../sard_test_cases/CWE_119_122_switch.c | 143 + .../sard_test_cases/CWE_119_124_class_decl.c | 35 + .../CWE_119_124_class_method_decl.c | 23 + .../sard_test_cases/CWE_119_124_fscanf.c | 148 + test/testfiles/sard_test_cases/CWE_119_fget.c | 44 + test/testfiles/sard_test_cases/io.c | 190 + 89 files changed, 38737 insertions(+) create mode 100644 ReadMe.md create mode 100644 extraTools/__init__.py create mode 100644 extraTools/vuldetect/__init__.py create mode 100644 extraTools/vuldetect/deepwukong.py create mode 100644 extraTools/vuldetect/ivdetect.py create mode 100644 extraTools/vuldetect/sysevr.py create mode 100644 extraTools/vuldetect/utils/__init__.py create mode 100644 extraTools/vuldetect/utils/environments.py create mode 100644 extraTools/vuldetect/utils/sinkPoint.py create mode 100644 extraTools/vuldetect/utils/symbolized.py create mode 100644 mainTool/CPG.py create mode 100644 mainTool/__init__.py create mode 100644 mainTool/antlr/CPP14.interp create mode 100644 mainTool/antlr/CPP14.tokens create mode 100644 mainTool/antlr/CPP14Lexer.interp create mode 100644 mainTool/antlr/CPP14Lexer.py create mode 100644 mainTool/antlr/CPP14Lexer.tokens create mode 100644 mainTool/antlr/CPP14Listener.py create mode 100644 mainTool/antlr/CPP14Parser.py create mode 100644 mainTool/antlr/CPP14Visitor.py create mode 100644 mainTool/antlr/__init__.py create mode 100644 mainTool/ast/ParsingUtils.py create mode 100644 mainTool/ast/__init__.py create mode 100644 mainTool/ast/astNode.py create mode 100644 mainTool/ast/builders.py create mode 100644 mainTool/ast/declarations/__init__.py create mode 100644 mainTool/ast/declarations/complexDecls.py create mode 100644 mainTool/ast/declarations/simpleDecls.py create mode 100644 mainTool/ast/expressions/__init__.py create mode 100644 mainTool/ast/expressions/binaryExpressions.py create mode 100644 mainTool/ast/expressions/expression.py create mode 100644 mainTool/ast/expressions/expressionHolders.py create mode 100644 mainTool/ast/expressions/postfixExpressions.py create mode 100644 mainTool/ast/expressions/primaryExpressions.py create mode 100644 mainTool/ast/statements/__init__.py create mode 100644 mainTool/ast/statements/blockStarters.py create mode 100644 mainTool/ast/statements/jumps.py create mode 100644 mainTool/ast/statements/statements.py create mode 100644 mainTool/ast/walking/__init__.py create mode 100644 mainTool/ast/walking/visitor.py create mode 100644 mainTool/cdg/CDG.py create mode 100644 mainTool/cdg/DominatorTree.py create mode 100644 mainTool/cdg/__init__.py create mode 100644 mainTool/cfg/CCFG.py create mode 100644 mainTool/cfg/CFG.py create mode 100644 mainTool/cfg/__init__.py create mode 100644 mainTool/cfg/nodes.py create mode 100644 mainTool/ddg/DDGCreator.py create mode 100644 mainTool/ddg/DefUseGraph.py create mode 100644 mainTool/ddg/__init__.py create mode 100644 mainTool/udg/__init__.py create mode 100644 mainTool/udg/astAnalyzers.py create mode 100644 mainTool/udg/astProvider.py create mode 100644 mainTool/udg/environments.py create mode 100644 mainTool/udg/useDefGraph.py create mode 100644 mainTool/utils/__init__.py create mode 100644 mainTool/utils/graphUtils.py create mode 100644 mainTool/utils/types.py create mode 100644 resources/CPP14.g4 create mode 100644 resources/calleeInfos.json create mode 100644 test/extraToolTests/__init__.py create mode 100644 test/extraToolTests/deepwukongTest.py create mode 100644 test/extraToolTests/ivdetectTest.py create mode 100644 test/extraToolTests/sysevrTest.py create mode 100644 test/mainToolTests/ASTBuildTest.py create mode 100644 test/mainToolTests/CDGBuildTest.py create mode 100644 test/mainToolTests/CFGBuildTest.py create mode 100644 test/mainToolTests/CPGBuildTest.py create mode 100644 test/mainToolTests/DDGBuildTest.py create mode 100644 test/mainToolTests/FileParsingTest.py create mode 100644 test/mainToolTests/UDGBuildTest.py create mode 100644 test/mainToolTests/jsonTestData.py create mode 100644 test/mainToolTests/parsingCode.py create mode 100644 test/testfiles/ComplexStruct.c create mode 100644 test/testfiles/IdentifierDeclTest.c create mode 100644 test/testfiles/inputcases create mode 100644 test/testfiles/sard_test_cases/CWE119_1.c create mode 100644 test/testfiles/sard_test_cases/CWE121_new_goto.c create mode 100644 test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53a.c create mode 100644 test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53b.c create mode 100644 test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53c.c create mode 100644 test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53d.c create mode 100644 test/testfiles/sard_test_cases/CWE_119_122_Struct.c create mode 100644 test/testfiles/sard_test_cases/CWE_119_122_switch.c create mode 100644 test/testfiles/sard_test_cases/CWE_119_124_class_decl.c create mode 100644 test/testfiles/sard_test_cases/CWE_119_124_class_method_decl.c create mode 100644 test/testfiles/sard_test_cases/CWE_119_124_fscanf.c create mode 100644 test/testfiles/sard_test_cases/CWE_119_fget.c create mode 100644 test/testfiles/sard_test_cases/io.c diff --git a/ReadMe.md b/ReadMe.md new file mode 100644 index 0000000..43a096d --- /dev/null +++ b/ReadMe.md @@ -0,0 +1,91 @@ +# About CppCodeAnalyzer + +It is a parsing tool based on python for C/C++ to construct code property graph, which is the python version of [CodeParser](https://github.com/for-just-we/CodeParser), most of functions of CppCodeAnalyzer are similar to Joern, the differences are that: + +- The grammar we utilize here is from the repo of [grammars-v4](https://github.com/antlr/grammars-v4) Antlr official, which means the input of module ast (Antlr AST) is quite different from Joern, but the output customized AST is the same, so the parsing module in ast package is different from Joern. + +- When constructing CFG, CppCodeAnalyzer takes `for-range` and `try-catch` into consideration. + + * when parsing code such as `for (auto p: vec){ xxx }`, the CFG is like in graph 1 + + * when parsing `try-catch`, we simple ignore statements in catch block because in normal states they are not going to be executed, and the control flow in `try-catch` is quite hard to compute. + + * when parsing use-def information by udg package, we take the information of pointer uses. For example, `memcpy(dest, src, 100);` defines symbol `* dest` and uses symbol `* src`, Joern considered pointer define with variable `Tainted` but did not consider pointer uses. + +Graph 1 +```mermaid +graph LR +EmptyCondition --> A[auto p: vec] +A --> B[xxx] +B --> EmptyCondition +EmptyCondition --> Exit +``` + +The pipeline of CppCodeAnalyzer is similar to Joern, which could be illustrated as: + +```mermaid +graph LR +AntlrAST --Transform --> AST -- control flow analysis --> CFG +CFG -- dominate analysis --> CDG +CFG -- symbol def use analysis --> UDG +UDG -- data dependence analysis --> DDG +``` + +If you want more details, coule refer to [Joern工具工作流程分析](https://blog.csdn.net/qq_44370676/article/details/125089161) + +- package ast transform Antlr AST to customized AST. + +- package cfg conduct control flow analysis and convert customized AST into CFG. + +- package cdg conduct statement dominate analysis and construct control dependence relations between statements. + +- package udg analyze the symbols defined and used in each statement independently. + +- package ddg construct data dependence relations between statements with def-use information computed in udg package. + + +# Usage + +The testfile in directionary `test/mainToolTests` illustrated the progress of each module, you could refer to those test cases to learn how to use API in CppCodeAnalyzer. + + +# Our motivations + +- When we conduct experiments with Joern tool parsing SARD datasets, we find some error.The statement `wchar_t data[50] = L'A';` should be in a single CFG node, but each token in the statement is assigned to a CFG node, after we check the source code, we believe the root cause is the grammar used by [Joern](https://github.com/octopus-platform/joern/blob/dev/projects/extensions/joern-fuzzyc/src/main/java/antlr/Function.g4#L13). + +- Also, most researches utilize python to write deep-learning programs, it could be more convenient to parse code with python because the parsing module could directly connect to deep-learning module, there would be no need to write scripts to parse output of Joern. + +# Challenges + +- Parsing control-flow in `for-range` and `try-catch` is difficult, there are no materials depicting CFG in `for-range` and `try-catch`. + +- Parsing def-use information of pointer variable is difficult. For example, in `*(p+i+1) = a[i][j];`, symbols defined include `* p` and used include `p, i, j, a, * a`. However, this is not very accurate, but computing the location of memory staticlly is difficult. This could brings following problems. + +```cpp +s1: memset(source, 100, 'A'); +s2: source[99] = '\0'; +s3: memcpy(data, source, 100); +``` + +- In results of CppCodeAnalyzer, s1 and s2 define symbol `* source` , but the later kills the front. So, there is only DDG edge `s2 -> s3` in DDG. + +- However, s1 defines `* source`, s2 defines `* ( source + 99)`, a precise DDG should contains edge `s1 -> s3, s2 -> s3` + +Also, our tool is much more slower than Joern, normally parsing a file in SARD dataset needs 20 - 30 seconds, so we recommand dump output CPG into json format first if you need to train a model. + + +# Extra Tools + +The package `extraTools` contains some preprocess code for vulnerability detectors IVDetect, SySeVR and DeepWuKong. The usage could refer to file in `test/extraToolTests` + + +# References + + +> [Yamaguchi, F. , Golde, N. , Arp, D. , & Rieck, K. . (2014). Modeling and Discovering Vulnerabilities with Code Property Graphs. IEEE Symposium on Security and Privacy. IEEE.](https://ieeexplore.ieee.org/document/6956589) + +> [Li Y , Wang S , Nguyen T N . Vulnerability Detection with Fine-grained Interpretations. 2021.](https://arxiv.org/abs/2106.10478) + +> [SySeVR: A Framework for Using Deep Learning to Detect Software Vulnerabilities\[J\]. IEEE Transactions on Dependable and Secure Computing, 2021, PP(99):1-1.](https://arxiv.org/abs/1807.06756) + +> [Cheng X , Wang H , Hua J , et al. DeepWukong[J]. ACM Transactions on Software Engineering and Methodology (TOSEM), 2021.](https://dl.acm.org/doi/10.1145/3436877) \ No newline at end of file diff --git a/extraTools/__init__.py b/extraTools/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/extraTools/vuldetect/__init__.py b/extraTools/vuldetect/__init__.py new file mode 100644 index 0000000..d540eb7 --- /dev/null +++ b/extraTools/vuldetect/__init__.py @@ -0,0 +1 @@ +# This package is used to support DL-based vulnerability detectors like SySeVR \ No newline at end of file diff --git a/extraTools/vuldetect/deepwukong.py b/extraTools/vuldetect/deepwukong.py new file mode 100644 index 0000000..b48f3b2 --- /dev/null +++ b/extraTools/vuldetect/deepwukong.py @@ -0,0 +1,287 @@ +from mainTool.ast.statements.jumps import ReturnStatement +from mainTool.utils.graphUtils import Edge +from mainTool.CPG import CodeEdge +from extraTools.vuldetect.utils.sinkPoint import SyVCPoint, CallExprTool, XFGPoint +from extraTools.vuldetect.utils.symbolized import SymbolizingTool +from mainTool.CPG import * +from typing import List, Set, Tuple +import json + +# generating xfg defined in DeepWuKong +# following paper DeepWukong: Statically Detecting Software Vulnerabilities Using Deep Graph Neural Network + +class XFG(object): + def __init__(self, keyLine: List[int], keyContent: str): + # control dependence edges + self.cdes: List[CodeEdge] = list() + # data dependence edges + self.ddes: List[CodeEdge] = list() + # key line 行号,文件Id + self.keyLine: List[int] = keyLine + # 内容 + # slice覆盖到的行号以及每一行所在的文件 + self.lineNumbers: List[List[int]] = list() + self.keyLineContent: str = keyContent + # 文件id对文件名 + self.id2file: Dict[int, str] = None + # slice中每个语句对应的token序列 + self.lineContents: List[str] = list() + + def __hash__(self): + return hash(json.dumps(self.lineContents)) + + def toJson(self) -> Dict: + return { + "keyline": self.keyLine, + "id2file": self.id2file, + "line-Nos": self.lineNumbers, + "line-contents": self.lineContents, + "control-dependences": [edge.toJson() for edge in self.cdes], + "data-dependences": [edge.toJson() for edge in self.ddes] + } + + +# 一个程序中所有function都由一个SliceTool对象处理 +# cpgs is all cpgs from functions of a program (could be a file sometimes) +class XFGSliceTool(object): + def __init__(self, cpgs: List[CPG], sensitive_apis: Set[str], symbolizingTool: SymbolizingTool): + self.cpgs: List[CPG] = cpgs + self.funcName2cpg: Dict[str, CPG] = {cpg.name: cpg for cpg in cpgs} + self.sensitive_apis: Set[str] = sensitive_apis # + self.symbolizingTool: SymbolizingTool = symbolizingTool + + self.slices: Set[XFG] = set() # store all code gadgets of a program + # backward information of data-deoendence for each statement + self.funcName2backDataInfo: Dict[str, Dict[int, Set[int]]] = dict() + # forward information of data-deoendence for each statement + self.funcName2forwDataInfo: Dict[str, Dict[int, Set[int]]] = dict() + # backward information of control-deoendence for each statement + self.funcName2backControlInfo: Dict[str, Dict[int, Set[int]]] = dict() + # forward information of control-deoendence for each statement + self.funcName2forwControlInfo: Dict[str, Dict[int, Set[int]]] = dict() + # 将文件名映射 + self.files: List[str] = list() + for cpg in self.cpgs: + self.generateForAndBackInfos(cpg) + if cpg.file not in self.files: + self.files.append(cpg.file) + self.file2Id: Dict[str, int] = { file: i for i, file in enumerate(self.files) } + + + + def generateForAndBackInfos(self, cpg: CPG): + # backward + backDataInfo: Dict[int, Set[int]] = dict() + # forward + forwDataInfo: Dict[int, Set[int]] = dict() + + # forward and backward for data dependence + for edge in cpg.DDGEdges: + # backward + if edge.destination not in backDataInfo.keys(): + backDataInfo[edge.destination] = set() + backDataInfo[edge.destination].add(edge.source) + # forward + if edge.source not in forwDataInfo.keys(): + forwDataInfo[edge.source] = set() + forwDataInfo[edge.source].add(edge.destination) + + self.funcName2backDataInfo[cpg.name] = backDataInfo + self.funcName2forwDataInfo[cpg.name] = forwDataInfo + + # backward + backControlInfo: Dict[int, Set[int]] = dict() + # forward + forwControlInfo: Dict[int, Set[int]] = dict() + + # forward and backward for control dependence + for edge in cpg.CDGEdges: + # backward + if edge.destination not in backControlInfo.keys(): + backControlInfo[edge.destination] = set() + backControlInfo[edge.destination].add(edge.source) + # forward + if edge.source not in forwControlInfo.keys(): + forwControlInfo[edge.source] = set() + forwControlInfo[edge.source].add(edge.destination) + + self.funcName2backControlInfo[cpg.name] = backControlInfo + self.funcName2forwControlInfo[cpg.name] = forwControlInfo + + + def generateSliceForProgram(self): + sinkTool: XFGPoint = XFGPoint(self.sensitive_apis) + slicesCpg = list(filter(lambda cpg: cpg.joinSlice, self.cpgs)) + for cpg in slicesCpg: + for i, stmt in enumerate(cpg.statements): + # 是否算SySe + if sinkTool.judgeSink(stmt): + coveredFileIds: Set[int] = set() + lineNumber: int = stmt.location.startLine + xfg: XFG = XFG([lineNumber, self.file2Id[cpg.file]], stmt.getEscapedCodeStr()) + + backwardFunctionChain: List[str] = list() # store function call chain in backward slices + backwardCDEdges: List[Edge[ASTNode]] = list() # store control dependence edges + backwardDDEdges: List[Edge[ASTNode]] = list() # store data dependence edges + backwardLineContents: List[ASTNode] = list() + backwardLineInfo: List[List[int]] = list() + backwardIdxs: List[int] = [i] + self.generateBackwardSlice(cpg.name, backwardIdxs, backwardLineContents, backwardFunctionChain, + backwardLineInfo, backwardCDEdges, backwardDDEdges, coveredFileIds) + + forwardFunctionChain: List[str] = list() # store function call chain in backward slices + forwardCDEdges: List[Edge[ASTNode]] = list() # store control dependence edges + forwardDDEdges: List[Edge[ASTNode]] = list() # store data dependence edges + forwardLineContents: List[ASTNode] = list() + forwardLineInfo: List[List[int]] = list() + forwardIdxs: List[int] = [i] + self.generateForwardSlice(cpg.name, forwardIdxs, forwardLineContents, forwardFunctionChain, + forwardLineInfo, forwardCDEdges, forwardDDEdges, coveredFileIds) + + idx = forwardLineContents.index(stmt) + forwardLineContents.pop(idx) + forwardLineInfo.pop(idx) + lines = backwardLineInfo + forwardLineInfo + contents = backwardLineContents + forwardLineContents + lineInfos = list() + + for lineCont in zip(lines, contents): + lineInfos.append((lineCont[0][1], lineCont[0][0], lineCont[1])) + + # XFG中的内容,先按文件Id排序,再按行号排序 + lineInfos.sort(key=lambda x: x[1]) + lineInfos.sort(key=lambda x: x[0]) + + astNode2idx: Dict[ASTNode, int] = dict() + + for i, lineInfo in enumerate(lineInfos): + xfg.lineNumbers.append([lineInfo[1], lineInfo[0]]) + xfg.lineContents.append(self.symbolizingTool.symbolize( + lineInfo[2].getEscapedCodeStr())) + astNode2idx[lineInfo[2]] = i + + cdEdgeSet: Set[Tuple[int, int]] = set() + cdEdges = backwardCDEdges + forwardCDEdges + for edge in cdEdges: + cdEdgeSet.add((astNode2idx[edge.source], astNode2idx[edge.destination])) + for edge in cdEdgeSet: + xfg.cdes.append(CodeEdge(edge[0], edge[1])) + + xfg.cdes.sort(key=lambda edge: edge.destination) + xfg.cdes.sort(key=lambda edge: edge.source) + + ddEdgeSet: Set[Tuple[int, int]] = set() + ddEdges = backwardDDEdges + forwardDDEdges + for edge in ddEdges: + ddEdgeSet.add((astNode2idx[edge.source], astNode2idx[edge.destination])) + for edge in ddEdgeSet: + xfg.ddes.append(CodeEdge(edge[0], edge[1])) + + xfg.ddes.sort(key=lambda edge: edge.destination) + xfg.ddes.sort(key=lambda edge: edge.source) + xfg.id2file = {fileId: self.files[fileId] for fileId in coveredFileIds} + self.slices.add(xfg) + + + + + def generateBackwardSlice(self, functionName: str, sliceIdxs: List[int], slices: List[ASTNode], + functionChain: List[str], sliceLines: List[List[int]], cdEdges: List[Edge[ASTNode]], + ddEdges: List[Edge[ASTNode]], coveredFileIds: Set[int]): + if functionName in functionChain: + return + # sliceIdxs stores all indexes of nodes of slices + cpg: CPG = self.funcName2cpg[functionName] + functionChain.append(functionName) + # computes all nodes with program-dependence with startIdx in a single function first + dataInfo: Dict[int, Set[int]] = self.funcName2backDataInfo[functionName] + controlInfo: Dict[int, Set[int]] = self.funcName2backControlInfo[functionName] + + workList: List[int] = sliceIdxs.copy() + while len(workList) > 0: + curIdx: int = workList.pop(0) + # data dependence + for o in dataInfo.get(curIdx, set()): + edge = Edge(cpg.statements[o], cpg.statements[curIdx]) + if edge not in ddEdges: + ddEdges.append(edge) + if o not in sliceIdxs: + sliceIdxs.append(o) + workList.append(o) + # control dependence + for o in controlInfo.get(curIdx, set()): + edge = Edge(cpg.statements[o], cpg.statements[curIdx]) + if edge not in cdEdges: + cdEdges.append(edge) + if o not in sliceIdxs: + sliceIdxs.append(o) + workList.append(o) + + coveredFileIds.add(self.file2Id[cpg.file]) + sliceIdxs.sort() + for id in sliceIdxs: + # 添加slice行代码 + slices.append(cpg.statements[id]) + # 添加slice行行号和文件id + sliceLines.append([cpg.statements[id].location.startLine, self.file2Id[cpg.file]]) + callTool = CallExprTool() + callTool.judgeCall(cpg.statements[id]) + if callTool.functionName is not None and callTool.functionName in self.funcName2cpg.keys(): + otherCpg: CPG = self.funcName2cpg[callTool.functionName] + # 以前面一行代码的return语句为起点反向遍历 + assert isinstance(otherCpg.statements[-1], ReturnStatement) + newStartIdxs: List[int] = [len(otherCpg.statements)] + self.generateBackwardSlice(otherCpg.name, newStartIdxs, slices, functionChain, sliceLines, + cdEdges, ddEdges, coveredFileIds) + + + def generateForwardSlice(self, functionName: str, sliceIdxs: List[int], slices: List[ASTNode], + functionChain: List[str], sliceLines: List[List[int]], cdEdges: List[Edge[ASTNode]], + ddEdges: List[Edge[ASTNode]], coveredFileIds: Set[int]): + if functionName in functionChain: + return + # sliceIdxs stores all indexes of nodes of slices + cpg: CPG = self.funcName2cpg[functionName] + functionChain.append(functionName) + # computes all nodes with program-dependence with startIdx in a single function first + dataInfo: Dict[int, Set[int]] = self.funcName2forwDataInfo[functionName] + controlInfo: Dict[int, Set[int]] = self.funcName2forwControlInfo[functionName] + + workList: List[int] = sliceIdxs.copy() + while len(workList) > 0: + curIdx: int = workList.pop(0) + # data dependence + for o in dataInfo.get(curIdx, set()): + edge = Edge(cpg.statements[curIdx], cpg.statements[o]) + if edge not in ddEdges: + ddEdges.append(edge) + if o not in sliceIdxs: + ddEdges.append(edge) + sliceIdxs.append(o) + workList.append(o) + # control dependence + for o in controlInfo.get(curIdx, set()): + edge = Edge(cpg.statements[curIdx], cpg.statements[o]) + if edge not in cdEdges: + cdEdges.append(edge) + if o not in sliceIdxs: + cdEdges.append(edge) + sliceIdxs.append(o) + workList.append(o) + + coveredFileIds.add(self.file2Id[cpg.file]) + sliceIdxs.sort() + for id in sliceIdxs: + # 添加slice行代码 + slices.append(cpg.statements[id]) + # 添加slice行行号和文件id + sliceLines.append([cpg.statements[id].location.startLine, self.file2Id[cpg.file]]) + callTool = CallExprTool() + callTool.judgeCall(cpg.statements[id]) + if callTool.functionName is not None and callTool.functionName in self.funcName2cpg.keys(): + otherCpg: CPG = self.funcName2cpg[callTool.functionName] + # 以前面一行代码的return语句为起点反向遍历 + assert callTool.argNum > 0 + newStartIdxs: List[int] = list(range(callTool.argNum)) + self.generateForwardSlice(otherCpg.name, newStartIdxs, slices, functionChain, sliceLines, + cdEdges, ddEdges, coveredFileIds) \ No newline at end of file diff --git a/extraTools/vuldetect/ivdetect.py b/extraTools/vuldetect/ivdetect.py new file mode 100644 index 0000000..b89189c --- /dev/null +++ b/extraTools/vuldetect/ivdetect.py @@ -0,0 +1,105 @@ +from extraTools.vuldetect.utils.symbolized import ASTVarAnalyzer +from mainTool.CPG import * + +# supproting IVDetect to extract variables and their types +# paper: Vulnerability Detection with Fine-Grained Interpretations + +# In mainTool, CppCodeAnalyzer is able to produce AST, CDG and DDG, so there is no need here +# to write script to + +# parsing the contents in a AST node into its sub token sequence, generating feature 1 +# code in https://github.com/vulnerabilitydetection/VulnerabilityDetectionResearch/blob/new_implementation/IVDetect/utils/process.py#L138 could +# produce errors when parsing identifiers like TASK_SIZE_MAX with all upper case +def lexical_parse(line: str) -> List[str]: + tokens = line.split(" ") + filtered_set = ['', ' ', ' ', ',', '\n', ';', '(', ')', '<', '>', '{', '}', '[', ']', '``', '\'\'', '\"', "'"] + + tokens = list(filter(lambda t: t not in filtered_set, tokens)) + new_tokens = list() + for token in tokens: + new_tokens.extend([t for t in token.split('_') if t != '']) + return new_tokens + + +# 返回每个statement对应的astnode及其type token序列 +def generate_feature3(statements: List[ASTNode]): + astVarAnalyzer: ASTVarAnalyzer = ASTVarAnalyzer() + varLists: List[list] = list() + for statement in statements: + provider: ASTNodeASTProvider = ASTNodeASTProvider() + provider.node = statement + astVarAnalyzer.analyzeAST(provider) + + vars = list() + for variable in astVarAnalyzer.variables: + vars.extend(lexical_parse(variable)) + if variable in astVarAnalyzer.var2type.keys(): + vars.extend(lexical_parse(astVarAnalyzer.var2type[variable])) + varLists.append(vars) + + return varLists + + +# 返回和该statement有控制依赖的结点组成的token sequence,为了不让深度太大,我们暂时限制depth = 1 +def find_control(cur_stmt_idx: int, cdg_edge_idxs: Dict[int, int], seq: List[int], depth: int, limit: int): + record = [] + if cur_stmt_idx in cdg_edge_idxs.keys(): + control_stmt = cdg_edge_idxs[cur_stmt_idx] + seq.append(control_stmt) + record.append(control_stmt) + if depth < limit: + for stmt in record: + find_control(stmt, cdg_edge_idxs, seq, depth + 1, limit) + + +def generate_feature4(cpg: CPG, limit: int = 1) -> List[List[List[str]]]: + cdg_edge_idxs: Dict[int, int] = { edge.destination: edge.source for edge in cpg.CDGEdges } + # 每个statement的控制依赖结点 + cd_idxs_for_stmt: List[List[int]] = list() + for stmt_idx in range(len(cpg.statements)): + seq: List[int] = list() + find_control(stmt_idx, cdg_edge_idxs, seq, 1, limit) + cd_idxs_for_stmt.append(seq) + + feature4_for_stmts: List[List[List[str]]] = list() + for cd_idxs in cd_idxs_for_stmt: + sub_tokens_in_stmts: List[List[str]] = [lexical_parse(cpg.statements[idx].getEscapedCodeStr()) + for idx in cd_idxs] + feature4_for_stmts.append(sub_tokens_in_stmts) + + return feature4_for_stmts + + +def find_data(cur_stmt_idx: int, ddg_edge_idxs: Dict[int, Set[int]], seq: List[int], depth: int, limit: int): + record = [] + if cur_stmt_idx in ddg_edge_idxs.keys(): + for data_stmt in ddg_edge_idxs[cur_stmt_idx]: + seq.append(data_stmt) + record.append(data_stmt) + if depth < limit: + for stmt in record: + find_data(stmt, ddg_edge_idxs, seq, depth + 1, limit) + + +# feature5, data dependence +def generate_feature5(cpg: CPG, limit: int = 1) -> List[List[List[str]]]: + ddg_edge_idxs: Dict[int, Set[int]] = dict() + for edge in cpg.DDGEdges: + if edge.destination not in ddg_edge_idxs.keys(): + ddg_edge_idxs[edge.destination] = {edge.source} + else: + ddg_edge_idxs[edge.destination].add(edge.source) + # 每个statement的控制依赖结点 + dd_idxs_for_stmt: List[List[int]] = list() + for stmt_idx in range(len(cpg.statements)): + seq: List[int] = list() + find_data(stmt_idx, ddg_edge_idxs, seq, 1, limit) + dd_idxs_for_stmt.append(seq) + + feature5_for_stmts: List[List[List[str]]] = list() + for dd_idxs in dd_idxs_for_stmt: + sub_tokens_in_stmts: List[List[str]] = [lexical_parse(cpg.statements[idx].getEscapedCodeStr()) + for idx in dd_idxs] + feature5_for_stmts.append(sub_tokens_in_stmts) + + return feature5_for_stmts \ No newline at end of file diff --git a/extraTools/vuldetect/sysevr.py b/extraTools/vuldetect/sysevr.py new file mode 100644 index 0000000..c29626c --- /dev/null +++ b/extraTools/vuldetect/sysevr.py @@ -0,0 +1,168 @@ +from mainTool.ast.statements.jumps import ReturnStatement +from extraTools.vuldetect.utils.sinkPoint import SyVCPoint, CallExprTool +from extraTools.vuldetect.utils.symbolized import SymbolizingTool +from mainTool.CPG import * +from typing import List, Set +import json + + + +class SySeSlice(object): + def __init__(self, keyLine: List[int], keyContent: str): + # slice覆盖到的行号以及每一行所在的文件 + self.lineNumbers: List[List[int]] = list() + # slice中每个语句对应的token序列 + self.lineContents: List[str] = list() + # key line 行号,文件Id + self.keyLine: List[int] = keyLine + # 内容 + self.keyLineContent: str = keyContent + # 文件id对文件名 + self.id2file: Dict[int, str] = None + + def __hash__(self): + return hash(json.dumps(self.lineContents)) + + def toJson(self) -> Dict: + return { + "keyline": self.keyLine, + "id2file": self.id2file, + "line-Nos": self.lineNumbers, + "line-contents": self.lineContents + } + + +# 一个程序中所有function都由一个SliceTool对象处理 +# cpgs is all cpgs from functions of a program (could be a file sometimes) +class SySeSliceTool(object): + def __init__(self, cpgs: List[CPG], sensitive_apis: Set[str], symbolizingTool: SymbolizingTool): + self.cpgs: List[CPG] = cpgs + self.funcName2cpg: Dict[str, CPG] = {cpg.name: cpg for cpg in cpgs} + self.sensitive_apis: Set[str] = sensitive_apis # + self.symbolizingTool: SymbolizingTool = symbolizingTool + + self.slices: Set[SySeSlice] = set() # store all code gadgets of a program + # backward information of control- data-deoendence for each statement + self.funcName2backInfo: Dict[str, Dict[int, Set[int]]] = dict() + # forward information of data-deoendence for each statement + self.funcName2forwInfo: Dict[str, Dict[int, Set[int]]] = dict() + # 将文件名映射 + self.files: List[str] = list() + for cpg in self.cpgs: + self.generateForAndBackInfos(cpg) + if cpg.file not in self.files: + self.files.append(cpg.file) + + self.file2Id: Dict[str, int] = { file: i for i, file in enumerate(self.files) } + + + + def generateForAndBackInfos(self, cpg: CPG): + # backward + backInfo: Dict[int, Set[int]] = dict() + # forward + forwInfo: Dict[int, Set[int]] = dict() + + # backward for control dependence + for edge in cpg.CDGEdges: + if edge.destination not in backInfo.keys(): + backInfo[edge.destination] = set() + backInfo[edge.destination].add(edge.source) + + # forward and backward for data dependence + for edge in cpg.DDGEdges: + # backward + if edge.destination not in backInfo.keys(): + backInfo[edge.destination] = set() + backInfo[edge.destination].add(edge.source) + # forward + if edge.source not in forwInfo.keys(): + forwInfo[edge.source] = set() + forwInfo[edge.source].add(edge.destination) + + self.funcName2backInfo[cpg.name] = backInfo + self.funcName2forwInfo[cpg.name] = forwInfo + + + def generateSliceForProgram(self): + sinkTool: SyVCPoint = SyVCPoint(self.sensitive_apis) + slicesCpg = list(filter(lambda cpg: cpg.joinSlice, self.cpgs)) + for cpg in slicesCpg: + for i, stmt in enumerate(cpg.statements): + # 是否算SySe + if sinkTool.judgeSink(stmt): + coveredFileIds: Set[int] = set() + lineNumber: int = stmt.location.startLine + slice: SySeSlice = SySeSlice([lineNumber, self.file2Id[cpg.file]], stmt.getEscapedCodeStr()) + + backwardFunctionChain: List[str] = list() # store function call chain in backward slices + backwardLineContents: List[str] = list() + backwardLineInfo: List[List[int]] = list() + backwardIdxs: List[int] = [i] + self.generateSlice(cpg.name, backwardIdxs, backwardLineContents, backwardFunctionChain, + backwardLineInfo, coveredFileIds, True) + + forwardFunctionChain: List[str] = list() # store function call chain in backward slices + forwardLineContents: List[str] = list() + forwardLineInfo: List[List[int]] = list() + forwardIdxs: List[int] = [i] + self.generateSlice(cpg.name, forwardIdxs, forwardLineContents, forwardFunctionChain, + forwardLineInfo, coveredFileIds, False) + + slice.lineNumbers.extend(backwardLineInfo) + slice.lineContents.extend(backwardLineContents) + + idx = forwardLineContents.index(stmt) + forwardLineContents.pop(idx) + forwardLineInfo.pop(idx) + slice.lineNumbers.extend(forwardLineInfo) + slice.lineContents.extend(forwardLineContents) + + slice.id2file = { fileId: self.files[fileId] for fileId in coveredFileIds } + + self.slices.add(slice) + + + def generateSlice(self, functionName: str, sliceIdxs: List[int], slices: List[str], + functionChain: List[str], sliceLines: List[List[int]], + coveredFileIds: Set[int], backward: bool=True ): + if functionName in functionChain: + return + + functionChain.append(functionName) + # computes all nodes with program-dependence with startIdx in a single function first + if backward: + Info: Dict[int, Set[int]] = self.funcName2backInfo[functionName] + else: + Info: Dict[int, Set[int]] = self.funcName2forwInfo[functionName] + workList: List[int] = sliceIdxs.copy() + while len(workList) > 0: + curIdx: int = workList.pop(0) + for o in Info.get(curIdx, set()): + if o not in sliceIdxs: + sliceIdxs.append(o) + workList.append(o) + + # sliceIdxs stores all indexes of nodes of slices + cpg: CPG = self.funcName2cpg[functionName] + coveredFileIds.add(self.file2Id[cpg.file]) + sliceIdxs.sort() + for id in sliceIdxs: + # 添加slice行代码 + slices.append(self.symbolizingTool.symbolize(cpg.statements[id].getEscapedCodeStr())) + # 添加slice行行号和文件id + sliceLines.append([cpg.statements[id].location.startLine, self.file2Id[cpg.file]]) + + callTool = CallExprTool() + callTool.judgeCall(cpg.statements[id]) + if callTool.functionName is not None and callTool.functionName in self.funcName2cpg.keys(): + otherCpg: CPG = self.funcName2cpg[callTool.functionName] + # 以前面一行代码的return语句为起点反向遍历 + if backward: + assert isinstance(otherCpg.statements[-1], ReturnStatement) + newStartIdxs: List[int] = [len(otherCpg.statements)] + else: + assert callTool.argNum> 0 + newStartIdxs: List[int] = list(range(callTool.argNum)) + self.generateSlice(otherCpg.name, newStartIdxs, slices, functionChain, sliceLines, + coveredFileIds, backward) \ No newline at end of file diff --git a/extraTools/vuldetect/utils/__init__.py b/extraTools/vuldetect/utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/extraTools/vuldetect/utils/environments.py b/extraTools/vuldetect/utils/environments.py new file mode 100644 index 0000000..ddde441 --- /dev/null +++ b/extraTools/vuldetect/utils/environments.py @@ -0,0 +1,97 @@ +from mainTool.udg.astProvider import ASTProvider +from typing import Set, Dict + + +class VariableEnvironment(object): + def __init__(self, astProvider: ASTProvider): + self.astProvider: ASTProvider = astProvider + # 交由父节点处理的token + self.handledSymbols: Set[str] = set() + # 交由父节点处理的token + self.upStreamSymbols: Set[str] = set() + self.var2type: Dict[str, str] = dict() # 变量名映射为类型名 + self.funcNames: Set[str] = set() # 使用过的函数名 + + # 处理子结点的symbol,默认自己解决子结点中的symbol + def addChildSymbols(self, childSymbols: Set[str], child: ASTProvider): + self.handledSymbols.update(childSymbols) + + # 交由父节点处理的symbol + def upstreamSymbols(self) -> Set[str]: + return self.upStreamSymbols + + # 自己处理的symbol + def selfHandledSymbols(self) -> Set[str]: + return self.handledSymbols + +# 函数调用环境 +class CallVarEnvironment(VariableEnvironment): + def addChildSymbols(self, childSymbols: Set[str], child: ASTProvider): + childNumber: int = child.getChildNumber() + # 函数名不添加 + if childNumber != 0: + # 参数中的变量名全都处理了 + self.handledSymbols.update(childSymbols) + + # 交由父节点处理的symbol + def upstreamSymbols(self) -> Set[str]: + return set() + + # 自己处理的symbol + def selfHandledSymbols(self) -> Set[str]: + return set() + +class CalleeEnvironment(VariableEnvironment): + def addChildSymbols(self, childSymbols: Set[str], child: ASTProvider): + self.funcNames.update(childSymbols) + + +class ClassStaticIdentifierVarEnvironment(VariableEnvironment): + # Identifier类型直接获取token作为symbol,并返回给父节点处理 + def upstreamSymbols(self) -> Set[str]: + code: str = self.astProvider.getChild(1).getEscapedCodeStr() + retval: Set[str] = { code } + return retval + + def selfHandledSymbols(self) -> Set[str]: + return set() + +class IdentifierVarEnvironment(VariableEnvironment): + # Identifier类型直接获取token作为symbol,并返回给父节点处理 + def upstreamSymbols(self) -> Set[str]: + code: str = self.astProvider.getEscapedCodeStr() + retval: Set[str] = { code } + return retval + + def selfHandledSymbols(self) -> Set[str]: + return set() + +# 结构体成员访问 +# 这里需要注意的是会出现 struct1 -> inner1 这种,我会将struct1 和 struct1 -> inner1 添加到变量列表,但是inner1就不会了 +class MemberAccessVarEnvironment(VariableEnvironment): + def upstreamSymbols(self) -> Set[str]: + retval: Set[str] = { self.astProvider.getEscapedCodeStr() } + return retval + + def addChildSymbols(self, childSymbols: Set[str], child: ASTProvider): + # 结构体变量名添加到symbol中但是使用的成员变量名不添加 + childNum: int = child.getChildNumber() + if childNum == 0: + self.handledSymbols.update(childSymbols) + + + +# 变量定义 +class VarDeclEnvironment(VariableEnvironment): + def __init__(self, astProvider: ASTProvider): + super().__init__(astProvider) + self.type: str = self.astProvider.getChild(0).getEscapedCodeStr() + + def addChildSymbols(self, childSymbols: Set[str], child: ASTProvider): + # 结构体变量名添加到symbol中但是使用的成员变量名不添加 + childNum: int = child.getChildNumber() + # 变量名 + if childNum == 1: + for symbol in childSymbols: + self.var2type[symbol] = self.type + self.handledSymbols.update(childSymbols) \ No newline at end of file diff --git a/extraTools/vuldetect/utils/sinkPoint.py b/extraTools/vuldetect/utils/sinkPoint.py new file mode 100644 index 0000000..8f248ad --- /dev/null +++ b/extraTools/vuldetect/utils/sinkPoint.py @@ -0,0 +1,85 @@ +from mainTool.ast.astNode import ASTNode +from mainTool.ast.expressions.postfixExpressions import CallExpression +from mainTool.ast.expressions.expressionHolders import Callee +from mainTool.ast.expressions.expression import ArrayIndexing, UnaryOp +from mainTool.ast.expressions.postfixExpressions import IncDecOp +from mainTool.ast.expressions.binaryExpressions import BinaryExpression, AssignmentExpr +from typing import Set + +# judging whether a statement could be a sink point, following SySeVR +class SyVCPoint(object): + def __init__(self, sensitive_apis: Set[str]): + self.sensitive_apis: Set[str] = sensitive_apis + + def judgeSink(self, astNode: ASTNode): + # Library/API Function Call + if isinstance(astNode, Callee): + if astNode.getEscapedCodeStr() in self.sensitive_apis: + return True + # Array Usage + elif isinstance(astNode, ArrayIndexing): + return True + # Pointer Usage + elif isinstance(astNode, UnaryOp): + if astNode.operator == '*': + return True + # Arithmetic Expression + elif isinstance(astNode, BinaryExpression): + if astNode.operator in { '+', '-', '*', '/' }: + return True + + flag = False + for i in range(astNode.getChildCount()): + flag = flag or self.judgeSink(astNode.getChild(i)) + return flag + + +class XFGPoint(SyVCPoint): + def __init__(self, sensitive_apis: Set[str]): + super(XFGPoint, self).__init__(sensitive_apis) + + def judgeSink(self, astNode: ASTNode): + # Library/API Function Call + if isinstance(astNode, Callee): + if astNode.getEscapedCodeStr() in self.sensitive_apis: + return True + # Array Usage + elif isinstance(astNode, ArrayIndexing): + return True + # Pointer Usage + elif isinstance(astNode, UnaryOp): + if astNode.operator == '*': + return True + # Arithmetic Expression + elif isinstance(astNode, BinaryExpression): + if astNode.operator in { '+', '-', '*', '/', '<<', '>>' }: + return True + # increament assignment + elif isinstance(astNode, AssignmentExpr): + if astNode.operator in { "+=", "-=", "*=", "/=", "%=", ">>=", "<<=" }: + return True + # # x++ / x-- / ++x / --x + elif isinstance(astNode, IncDecOp): + return True + + flag = False + for i in range(astNode.getChildCount()): + flag = flag or self.judgeSink(astNode.getChild(i)) + return flag + + + +# judging whether a statement could be a function call, haven't consider nesting function call +class CallExprTool(object): + def __init__(self): + self.functionName: str = None + self.argNum: int = -1 + + def judgeCall(self, astNode: ASTNode): + # Library/API Function Call + if isinstance(astNode, CallExpression): + self.functionName = astNode.getChild(0).getEscapedCodeStr() + self.argNum = astNode.argumentList.getChildCount() + return + for i in range(astNode.getChildCount()): + self.judgeCall(astNode.getChild(i)) \ No newline at end of file diff --git a/extraTools/vuldetect/utils/symbolized.py b/extraTools/vuldetect/utils/symbolized.py new file mode 100644 index 0000000..de975ad --- /dev/null +++ b/extraTools/vuldetect/utils/symbolized.py @@ -0,0 +1,128 @@ +from extraTools.vuldetect.utils.environments import * +from mainTool.CPG import * +from typing import List, Set, Tuple + + + +# symbolized variable names and function names +# however, here we don't actually symbolize them, +# we only collect the var name and func name to be symbolized +# and their corresponding symbolized name + +symbolic_var_prefix = "VAR" +symbolic_func_prefix = "FUN" + + +class ASTVarAnalyzer(object): + def __init__(self): + self.environmentStack: List[VariableEnvironment] = list() + self.variables: Set[str] = None + self.var2type: Dict[str, str] = dict() + self.funcNames: Set[str] = set() + + def reset(self): + self.environmentStack.clear() + self.variables = set() + self.funcNames = set() + # self.var2type = dict() + + def analyzeAST(self, astProvider: ASTProvider): + self.reset() + self.traverseAST(astProvider) + + + def traverseAST(self, astProvider: ASTProvider): + env: VariableEnvironment = self.createVarEnvironment(astProvider) + self.traverseASTChildren(astProvider, env) + + + def traverseASTChildren(self, astProvider: ASTProvider, env: VariableEnvironment): + numChildren: int = astProvider.getChildCount() + self.environmentStack.append(env) + for i in range(numChildren): + childProvider: ASTProvider = astProvider.getChild(i) + self.traverseAST(childProvider) + self.environmentStack.pop() + self.variables.update(env.selfHandledSymbols()) + self.reportUpstream(env) + self.var2type.update(env.var2type) + self.funcNames.update(env.funcNames) + + + def reportUpstream(self, env: VariableEnvironment): + symbols: Set[str] = env.upstreamSymbols() + astProvider: ASTProvider = env.astProvider + if len(self.environmentStack) > 0: + parentEnv: VariableEnvironment = self.environmentStack[-1] + parentEnv.addChildSymbols(symbols, astProvider) + + + + def createVarEnvironment(self, astProvider: ASTProvider) -> VariableEnvironment: + nodeType: str = astProvider.getTypeAsString() + + if nodeType == "IdentifierDecl" or nodeType == "Parameter": + return VarDeclEnvironment(astProvider) + elif nodeType == "CallExpression": + return CallVarEnvironment(astProvider) + elif nodeType == "ClassStaticIdentifier": + return ClassStaticIdentifierVarEnvironment(astProvider) + elif nodeType == "Identifier": + return IdentifierVarEnvironment(astProvider) + elif nodeType == "MemberAccess" or nodeType == "PtrMemberAccess": + return MemberAccessVarEnvironment(astProvider) + elif nodeType == "Callee": + return CalleeEnvironment(astProvider) + else: + return VariableEnvironment(astProvider) + + +def getVarFuncNamesInFunc(statements: List[ASTNode]) -> Tuple[Set[str], Set[str]]: + astVarAnalyzer: ASTVarAnalyzer = ASTVarAnalyzer() + varSets: Set[str] = set() + funcSets: Set[str] = set() + for statement in statements: + provider: ASTNodeASTProvider = ASTNodeASTProvider() + provider.node = statement + astVarAnalyzer.analyzeAST(provider) + varSets.update(astVarAnalyzer.variables) + funcSets.update(astVarAnalyzer.funcNames) + + return varSets, funcSets + + +class SymbolizingTool(object): + def __init__(self, systemDefinedVars: Set[str], systemDefinedFuncs: Set[str]): + self.systemDefinedVars: Set[str] = systemDefinedVars + self.systemDefinedFuncs: Set[str] = systemDefinedFuncs + self.var2symbol: Dict[str, str] = dict() + self.func2symbol: Dict[str, str] = dict() + + # cpgs is all cpgs from functions of a program + def getVarFuncNamesInFile(self, cpgs: List[CPG]): + for cpg in cpgs: + if cpg.name not in self.systemDefinedFuncs and cpg.name not in self.func2symbol.keys(): + self.func2symbol[cpg.name] = symbolic_func_prefix + str(len(self.func2symbol) + 1) + varSets, funcSets = getVarFuncNamesInFunc(cpg.statements) + for var in varSets: + if var not in self.var2symbol.keys() and var not in self.systemDefinedVars: + self.var2symbol[var] = symbolic_var_prefix + str(len(self.var2symbol) + 1) + for func in funcSets: + if func not in self.systemDefinedFuncs and func not in self.func2symbol.keys(): + self.func2symbol[func] = symbolic_func_prefix + str(len(self.func2symbol) + 1) + + + + def symbolize(self, code: str) -> str: + tokens = code.split(' ') + symbolized_tokens = [] + for token in tokens: + symVarName: str = self.var2symbol.get(token, None) + symFuncName: str = self.func2symbol.get(token, None) + if symVarName is not None: + symbolized_tokens.append(symVarName) + elif symFuncName is not None: + symbolized_tokens.append(symFuncName) + else: + symbolized_tokens.append(token) + return " ".join(symbolized_tokens) \ No newline at end of file diff --git a/mainTool/CPG.py b/mainTool/CPG.py new file mode 100644 index 0000000..34edb3e --- /dev/null +++ b/mainTool/CPG.py @@ -0,0 +1,217 @@ +# define code property graph +from mainTool.ast.builders import astNodeToJson, json2astNode, FileBuilder, astToSerializedJson, unserializeNode +from mainTool.cfg.CCFG import ASTToCFGConvert +from mainTool.cdg.CDG import * +from mainTool.udg.astAnalyzers import * +from mainTool.ddg.DDGCreator import * + +from mainTool.utils.graphUtils import Edge + +from mainTool.antlr.CPP14Lexer import CPP14Lexer, InputStream, CommonTokenStream +from mainTool.antlr.CPP14Parser import CPP14Parser +from antlr4.tree.Tree import ParseTree, ParseTreeWalker + +import json + +class CodeEdge(Edge[int]): + def __init__(self, source: int, destination: int, property: str = None): + super(CodeEdge, self).__init__(source, destination) + self.property = property + + def __str__(self): + if self.property is None: + return f"{self.source} ---- {self.destination}" + return f"{self.source} --[{self.property}]-- {self.destination}" + + def toJson(self): + datas = [self.source, self.destination] + if self.property is not None: + datas.append(self.property) + return datas + + @classmethod + def fromJson(cls, datas: list): + assert len(datas) in { 2, 3 } + if len(datas) == 3: + return CodeEdge(datas[0], datas[1], datas[2]) + else: + return CodeEdge(datas[0], datas[1]) + +# code property graph for a function +class CPG(object): + def __init__(self): + self.statements: List[ASTNode] = list() + self.statement2Idx: Dict[ASTNode, int] = None + + self.CFGEdges: List[CodeEdge] = list() + self.CDGEdges: List[CodeEdge] = list() + self.DDGEdges: List[CodeEdge] = list() + + self.name: str = None # 函数名 + self.file: str = None # function来源的文件名 + self.joinSlice: bool = True # slice的时候是否考虑 + # self.entry: CFGEntryNode = None + + def initCFGEdges(self, cfg: CFG): + self.name = cfg.name + nodes: List[ASTNodeContainer] = list(filter(lambda node: isinstance(node, ASTNodeContainer), cfg.vertices)) + nodes.sort(key=lambda node: node.astNode.location) + + self.statements.extend(list(map(lambda node: node.astNode, nodes))) + self.statement2Idx = { n.astNode: i for i, n in enumerate(nodes)} + + edges: List[Edge[CFGNode]] = list(filter(lambda edge: not (isinstance(edge.source, CFGEntryNode) + or isinstance(edge.destination, CFGExitNode)), cfg.getEdges())) + self.CFGEdges.extend([CodeEdge(self.statement2Idx[edge.source.astNode], self.statement2Idx[edge.destination.astNode], edge.label) + for edge in edges]) + + #self.entry: CFGEntryNode = cfg.entry + + + + def initCDGEdges(self, cdg: CDG): + edges: List[Edge[CFGNode]] = cdg.getEdges() + self.CDGEdges.extend( + [CodeEdge(self.statement2Idx[edge.source.astNode], self.statement2Idx[edge.destination.astNode]) + for edge in edges]) + # self.CDGEdges.extend( + # [CodeEdge(-1, self.statement2Idx[edge.destination.astNode]) + # for edge in edges if isinstance(edge.source, CFGEntryNode)]) + + + def initDDGEdges(self, ddg: DDG): + self.DDGEdges.extend([CodeEdge(self.statement2Idx[edge.src], self.statement2Idx[edge.dst], edge.symbol) + for edge in ddg.defUseEdges]) + + def toJson(self) -> Dict: + jsonStatements: List[dict] = [astNodeToJson(statement) for statement in self.statements] + cfgEdges: List[list] = [edge.toJson() for edge in self.CFGEdges] + cdgEdges: List[list] = [edge.toJson() for edge in self.CDGEdges] + ddgEdges: List[list] = [edge.toJson() for edge in self.DDGEdges] + + return { + "fileName": self.file, + "functionName": self.name, + "nodes": jsonStatements, + "cfgEdges": cfgEdges, + "cdgEdges": cdgEdges, + "ddgEdges": ddgEdges + } + + def toSerializedJson(self) -> Dict: + jsonStatements: List[dict] = [astToSerializedJson(statement) for statement in self.statements] + serializedCfgEdges: List[str] = [json.dumps(edge.toJson()) for edge in self.CFGEdges] + serializedCdgEdges: List[str] = [json.dumps(edge.toJson()) for edge in self.CDGEdges] + serializedDdgEdges: List[str] = [json.dumps(edge.toJson()) for edge in self.DDGEdges] + + + return { + "fileName": self.file, + "functionName": self.name, + "nodes": jsonStatements, + "cfgEdges": serializedCfgEdges, + "cdgEdges": serializedCdgEdges, + "ddgEdges": serializedDdgEdges + } + + + @staticmethod + def fromJson(jsonData: Dict): + cpg: CPG = CPG() + cpg.name = jsonData["functionName"] + cpg.file = jsonData["fileName"] + cfgEdges: List[CodeEdge] = [CodeEdge.fromJson(edge) for edge in jsonData["cfgEdges"]] + cdgEdges: List[CodeEdge] = [CodeEdge.fromJson(edge) for edge in jsonData["cdgEdges"]] + ddgEdges: List[CodeEdge] = [CodeEdge.fromJson(edge) for edge in jsonData["ddgEdges"]] + cpg.CFGEdges.extend(cfgEdges) + cpg.CDGEdges.extend(cdgEdges) + cpg.DDGEdges.extend(ddgEdges) + + stmts: List[ASTNode] = [json2astNode(jsonStmt) for jsonStmt in jsonData["nodes"]] + cpg.statements.extend(stmts) + + return cpg + + @staticmethod + def fromSerJson(serJsonData: Dict): + cfgEdges: List[list] = [json.loads(serEdge) for serEdge in serJsonData["cfgEdges"]] + cdgEdges: List[list] = [json.loads(serEdge) for serEdge in serJsonData["cdgEdges"]] + ddgEdges: List[list] = [json.loads(serEdge) for serEdge in serJsonData["ddgEdges"]] + jsonStatements: List[dict] = [unserializeNode(serStmt) for serStmt in serJsonData["nodes"]] + + json_data: Dict = { + "fileName": serJsonData["fileName"], + "functionName": serJsonData["functionName"], + "nodes": jsonStatements, + "cfgEdges": cfgEdges, + "cdgEdges": cdgEdges, + "ddgEdges": ddgEdges + } + + return CPG.fromJson(json_data) + + +def convertASTtoCPG(functionDef: FunctionDef, udgConverter: CFGToUDGConverter, defUseConverter: CFGAndUDGToDefUseCFG, + ddgCreator: DDGCreator) -> CPG: + cfg: CFG = ASTToCFGConvert(functionDef) # CFG + udgConverter.astAnalyzer.reset() + useDefGraph: UseDefGraph = udgConverter.convert(cfg) # UDG + defUseCFG: DefUseCFG = defUseConverter.convert(cfg, useDefGraph) # DefUseCFG + ddgCreator.clear() + ddg: DDG = ddgCreator.createForDefUseCFG(defUseCFG) # Data Dependence Graph + cdg: CDG = createCDG(cfg) # Control Dependence Graph + + # Code Property Graph + cpg: CPG = CPG() + cpg.initCFGEdges(cfg) + cpg.initCDGEdges(cdg) + cpg.initDDGEdges(ddg) + cpg.name = cfg.name + + return cpg + + +def fileParse(fileName: str, udgConverter: CFGToUDGConverter, + defUseConverter: CFGAndUDGToDefUseCFG, ddgCreator: DDGCreator) -> List[CPG]: + code = open(fileName, 'r', encoding='utf-8').read() + inputStream = InputStream(code) + cpp14Lexer = CPP14Lexer(inputStream) + tokenStream = CommonTokenStream(cpp14Lexer) + parser = CPP14Parser(tokenStream) + walker: ParseTreeWalker = ParseTreeWalker() + tree: ParseTree = parser.translationunit() + builder: FileBuilder = FileBuilder() + walker.walk(builder, tree) + + functions: List[FunctionDef] = builder.functionDefs.copy() + for classDecl in builder.classDefs: + functions.extend(classDecl.functionDefs) + + # astAnalyzer: ASTDefUseAnalyzer = ASTDefUseAnalyzer() + # astAnalyzer.calleeInfos = calleeInfos + # udgConverter.astAnalyzer = astAnalyzer + cpgs: List[CPG] = [convertASTtoCPG(functionDef, udgConverter, defUseConverter, ddgCreator) + for functionDef in functions] + + return cpgs + + + +def initialCalleeInfos(calleeInfs: Dict) -> CalleeInfos: + calleeInfos: CalleeInfos = CalleeInfos() + + defInfos = calleeInfs["ArgDef"] + for funcName, argNs in defInfos.items(): + for argN in argNs: + calleeInfos.addArgDef(funcName, argN) + + useInfos = calleeInfs["ArgUse"] + for funcName, argNs in useInfos.items(): + for argN in argNs: + calleeInfos.addArgUse(funcName, argN) + + startIdsInfos = calleeInfs["ArgDefStartIds"] + for funcName, argN in startIdsInfos.items(): + calleeInfos.addArgDefStartIds(funcName, argN) + + return calleeInfos \ No newline at end of file diff --git a/mainTool/__init__.py b/mainTool/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/antlr/CPP14.interp b/mainTool/antlr/CPP14.interp new file mode 100644 index 0000000..e27e0be --- /dev/null +++ b/mainTool/antlr/CPP14.interp @@ -0,0 +1,497 @@ +token literal names: +null +null +null +'alignas' +'alignof' +'asm' +'auto' +'bool' +'break' +'case' +'catch' +'char' +'char16_t' +'char32_t' +'class' +'const' +'constexpr' +'const_cast' +'continue' +'decltype' +'default' +'delete' +'do' +'double' +'dynamic_cast' +'else' +'enum' +'explicit' +'export' +'extern' +'false' +'final' +'float' +'for' +'friend' +'goto' +'if' +'inline' +'int' +'long' +'mutable' +'namespace' +'new' +'noexcept' +null +'operator' +'override' +'private' +'protected' +'public' +'register' +'reinterpret_cast' +'return' +'short' +'signed' +'sizeof' +'static' +'static_assert' +'static_cast' +'struct' +'switch' +'template' +'this' +'thread_local' +'throw' +'true' +'try' +'typedef' +'typeid' +'typename' +'union' +'unsigned' +'using' +'virtual' +'void' +'volatile' +'wchar_t' +'while' +'(' +')' +'[' +']' +'{' +'}' +'+' +'-' +'*' +'/' +'%' +'^' +'&' +'|' +'~' +'!' +'=' +'<' +'>' +'+=' +'-=' +'*=' +'/=' +'%=' +'^=' +'&=' +'|=' +'<<' +'<<=' +'==' +'!=' +'<=' +'>=' +'&&' +'||' +'++' +'--' +',' +'->*' +'->' +'?' +':' +'::' +';' +'.' +'.*' +'...' +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +MultiLineMacro +Directive +Alignas +Alignof +Asm +Auto +Bool +Break +Case +Catch +Char +Char16 +Char32 +Class +Const +Constexpr +Const_cast +Continue +Decltype +Default +Delete +Do +Double +Dynamic_cast +Else +Enum +Explicit +Export +Extern +FalseToken +Final +Float +For +Friend +Goto +If +Inline +Int +Long +Mutable +Namespace +New +Noexcept +Nullptr +Operator +Override +Private +Protected +Public +Register +Reinterpret_cast +Return +Short +Signed +Sizeof +Static +Static_assert +Static_cast +Struct +Switch +Template +This +Thread_local +Throw +TrueToken +Try +Typedef +Typeid +Typename +Union +Unsigned +Using +Virtual +Void +Volatile +Wchar +While +LeftParen +RightParen +LeftBracket +RightBracket +LeftBrace +RightBrace +Plus +Minus +Star +Div +Mod +Caret +And +Or +Tilde +Not +Assign +Less +Greater +PlusAssign +MinusAssign +StarAssign +DivAssign +ModAssign +XorAssign +AndAssign +OrAssign +LeftShift +LeftShiftAssign +Equal +NotEqual +LessEqual +GreaterEqual +AndAnd +OrOr +PlusPlus +MinusMinus +Comma +ArrowStar +Arrow +Question +Colon +Doublecolon +Semi +Dot +DotStar +Ellipsis +Identifier +Integerliteral +Decimalliteral +Octalliteral +Hexadecimalliteral +Binaryliteral +Integersuffix +Characterliteral +Floatingliteral +Stringliteral +Userdefinedintegerliteral +Userdefinedfloatingliteral +Userdefinedstringliteral +Userdefinedcharacterliteral +Whitespace +Newline +BlockComment +LineComment + +rule names: +translationunit +primaryexpression +idexpression +unqualifiedid +qualifiedid +nestednamespecifier +lambdaexpression +lambdaintroducer +lambdacapture +capturedefault +capturelist +capture +simplecapture +initcapture +lambdadeclarator +postfixexpression +expressionlist +pseudodestructorname +unaryexpression +sizeofExpression +alignofExpression +unaryoperator +newexpression +newplacement +newtypeid +newdeclarator +noptrnewdeclarator +newinitializer +deleteexpression +noexceptexpression +castexpression +pmexpression +multiplicativeexpression +additiveexpression +shiftexpression +relationalexpression +equalityexpression +andexpression +exclusiveorexpression +inclusiveorexpression +logicalandexpression +logicalorexpression +conditionalexpression +assignmentexpression +assignmentoperator +expression +constantexpression +statement +label +labeledstatement +expressionstatement +compoundstatement +statementseq +selectionstatement +condition +iterationstatement +forinitstatement +forrangedeclaration +forrangeinitializer +jumpstatement +declarationstatement +declarationseq +declaration +blockdeclaration +aliasdeclaration +simpledeclaration +static_assertdeclaration +emptydeclaration +attributedeclaration +declspecifier +declspecifierseq +storageclassspecifier +functionspecifier +typedefname +typespecifier +trailingtypespecifier +typespecifierseq +trailingtypespecifierseq +simpletypespecifier +thetypename +decltypespecifier +elaboratedtypespecifier +enumname +enumspecifier +enumhead +opaqueenumdeclaration +enumkey +enumbase +enumeratorlist +enumeratordefinition +enumerator +namespacename +originalnamespacename +namespacedefinition +namednamespacedefinition +originalnamespacedefinition +extensionnamespacedefinition +unnamednamespacedefinition +namespacebody +namespacealias +namespacealiasdefinition +qualifiednamespacespecifier +usingdeclaration +usingdirective +asmdefinition +linkagespecification +attributespecifierseq +attributespecifier +alignmentspecifier +attributelist +attribute +attributetoken +attributescopedtoken +attributenamespace +attributeargumentclause +balancedtokenseq +balancedtoken +initdeclaratorlist +initdeclarator +declarator +ptrdeclarator +noptrdeclarator +parametersandqualifiers +trailingreturntype +ptroperator +cvqualifierseq +cvqualifier +refqualifier +declaratorid +thetypeid +abstractdeclarator +ptrabstractdeclarator +noptrabstractdeclarator +abstractpackdeclarator +noptrabstractpackdeclarator +parameterdeclarationclause +parameterdeclarationlist +parameterdeclaration +functiondefinition +functionbody +initializer +braceorequalinitializer +initializerclause +initializerlist +bracedinitlist +classname +classspecifier +classhead +classheadname +classvirtspecifier +classkey +memberspecification +memberdeclaration +memberdeclaratorlist +memberdeclarator +virtspecifierseq +virtspecifier +purespecifier +baseclause +basespecifierlist +basespecifier +classordecltype +basetypespecifier +accessspecifier +conversionfunctionid +conversiontypeid +conversiondeclarator +ctorinitializer +meminitializerlist +meminitializer +meminitializerid +operatorfunctionid +literaloperatorid +templatedeclaration +templateparameterlist +templateparameter +typeparameter +simpletemplateid +templateid +templatename +templateargumentlist +templateargument +typenamespecifier +explicitinstantiation +explicitspecialization +tryblock +functiontryblock +handlerseq +handler +exceptiondeclaration +throwexpression +exceptionspecification +dynamicexceptionspecification +typeidlist +noexceptspecification +rightShift +rightShiftAssign +theoperator +literal +booleanliteral +pointerliteral +userdefinedliteral + + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 144, 2480, 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, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, 9, 147, 4, 148, 9, 148, 4, 149, 9, 149, 4, 150, 9, 150, 4, 151, 9, 151, 4, 152, 9, 152, 4, 153, 9, 153, 4, 154, 9, 154, 4, 155, 9, 155, 4, 156, 9, 156, 4, 157, 9, 157, 4, 158, 9, 158, 4, 159, 9, 159, 4, 160, 9, 160, 4, 161, 9, 161, 4, 162, 9, 162, 4, 163, 9, 163, 4, 164, 9, 164, 4, 165, 9, 165, 4, 166, 9, 166, 4, 167, 9, 167, 4, 168, 9, 168, 4, 169, 9, 169, 4, 170, 9, 170, 4, 171, 9, 171, 4, 172, 9, 172, 4, 173, 9, 173, 4, 174, 9, 174, 4, 175, 9, 175, 4, 176, 9, 176, 4, 177, 9, 177, 4, 178, 9, 178, 4, 179, 9, 179, 4, 180, 9, 180, 4, 181, 9, 181, 4, 182, 9, 182, 4, 183, 9, 183, 4, 184, 9, 184, 4, 185, 9, 185, 4, 186, 9, 186, 4, 187, 9, 187, 4, 188, 9, 188, 4, 189, 9, 189, 4, 190, 9, 190, 4, 191, 9, 191, 4, 192, 9, 192, 4, 193, 9, 193, 4, 194, 9, 194, 4, 195, 9, 195, 4, 196, 9, 196, 4, 197, 9, 197, 4, 198, 9, 198, 4, 199, 9, 199, 4, 200, 9, 200, 4, 201, 9, 201, 4, 202, 9, 202, 4, 203, 9, 203, 3, 2, 5, 2, 408, 10, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 420, 10, 3, 3, 4, 3, 4, 5, 4, 424, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 5, 5, 435, 10, 5, 3, 6, 3, 6, 5, 6, 439, 10, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 454, 10, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 5, 7, 461, 10, 7, 3, 7, 3, 7, 3, 7, 7, 7, 466, 10, 7, 12, 7, 14, 7, 469, 11, 7, 3, 8, 3, 8, 5, 8, 473, 10, 8, 3, 8, 3, 8, 3, 9, 3, 9, 5, 9, 479, 10, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 5, 10, 489, 10, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 5, 12, 496, 10, 12, 3, 12, 3, 12, 3, 12, 3, 12, 5, 12, 502, 10, 12, 7, 12, 504, 10, 12, 12, 12, 14, 12, 507, 11, 12, 3, 13, 3, 13, 5, 13, 511, 10, 13, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 517, 10, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 524, 10, 15, 3, 16, 3, 16, 3, 16, 3, 16, 5, 16, 530, 10, 16, 3, 16, 5, 16, 533, 10, 16, 3, 16, 5, 16, 536, 10, 16, 3, 16, 5, 16, 539, 10, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 546, 10, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 553, 10, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 605, 10, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 620, 10, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 626, 10, 17, 3, 17, 3, 17, 3, 17, 3, 17, 5, 17, 632, 10, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 7, 17, 645, 10, 17, 12, 17, 14, 17, 648, 11, 17, 3, 18, 3, 18, 3, 19, 5, 19, 653, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 5, 19, 668, 10, 19, 3, 19, 3, 19, 3, 19, 3, 19, 5, 19, 674, 10, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 5, 20, 689, 10, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 5, 21, 703, 10, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 24, 5, 24, 713, 10, 24, 3, 24, 3, 24, 5, 24, 717, 10, 24, 3, 24, 3, 24, 5, 24, 721, 10, 24, 3, 24, 5, 24, 724, 10, 24, 3, 24, 3, 24, 5, 24, 728, 10, 24, 3, 24, 3, 24, 3, 24, 3, 24, 5, 24, 734, 10, 24, 5, 24, 736, 10, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 5, 26, 744, 10, 26, 3, 27, 3, 27, 5, 27, 748, 10, 27, 3, 27, 5, 27, 751, 10, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 5, 28, 758, 10, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 5, 28, 765, 10, 28, 7, 28, 767, 10, 28, 12, 28, 14, 28, 770, 11, 28, 3, 29, 3, 29, 5, 29, 774, 10, 29, 3, 29, 3, 29, 5, 29, 778, 10, 29, 3, 30, 5, 30, 781, 10, 30, 3, 30, 3, 30, 3, 30, 5, 30, 786, 10, 30, 3, 30, 3, 30, 3, 30, 3, 30, 5, 30, 792, 10, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 5, 32, 805, 10, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 7, 33, 816, 10, 33, 12, 33, 14, 33, 819, 11, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 7, 34, 833, 10, 34, 12, 34, 14, 34, 836, 11, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 7, 35, 847, 10, 35, 12, 35, 14, 35, 850, 11, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 7, 36, 862, 10, 36, 12, 36, 14, 36, 865, 11, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 7, 37, 882, 10, 37, 12, 37, 14, 37, 885, 11, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 7, 38, 896, 10, 38, 12, 38, 14, 38, 899, 11, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 7, 39, 907, 10, 39, 12, 39, 14, 39, 910, 11, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 7, 40, 918, 10, 40, 12, 40, 14, 40, 921, 11, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 7, 41, 929, 10, 41, 12, 41, 14, 41, 932, 11, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 7, 42, 940, 10, 42, 12, 42, 14, 42, 943, 11, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 3, 43, 7, 43, 951, 10, 43, 12, 43, 14, 43, 954, 11, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 5, 44, 963, 10, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 971, 10, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 5, 46, 984, 10, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 7, 47, 992, 10, 47, 12, 47, 14, 47, 995, 11, 47, 3, 48, 3, 48, 3, 49, 3, 49, 5, 49, 1001, 10, 49, 3, 49, 3, 49, 5, 49, 1005, 10, 49, 3, 49, 3, 49, 5, 49, 1009, 10, 49, 3, 49, 3, 49, 5, 49, 1013, 10, 49, 3, 49, 3, 49, 5, 49, 1017, 10, 49, 3, 49, 3, 49, 3, 49, 5, 49, 1022, 10, 49, 3, 49, 5, 49, 1025, 10, 49, 3, 50, 5, 50, 1028, 10, 50, 3, 50, 3, 50, 3, 50, 5, 50, 1033, 10, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 5, 50, 1040, 10, 50, 3, 50, 3, 50, 5, 50, 1044, 10, 50, 3, 51, 3, 51, 3, 51, 3, 52, 5, 52, 1050, 10, 52, 3, 52, 3, 52, 3, 53, 3, 53, 5, 53, 1056, 10, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 7, 54, 1065, 10, 54, 12, 54, 14, 54, 1068, 11, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 5, 55, 1090, 10, 55, 3, 56, 3, 56, 5, 56, 1094, 10, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 5, 56, 1102, 10, 56, 3, 56, 3, 56, 3, 56, 3, 56, 5, 56, 1108, 10, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 5, 57, 1128, 10, 57, 3, 57, 3, 57, 5, 57, 1132, 10, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 5, 57, 1145, 10, 57, 3, 58, 3, 58, 5, 58, 1149, 10, 58, 3, 59, 5, 59, 1152, 10, 59, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 5, 60, 1159, 10, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 5, 61, 1167, 10, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 5, 61, 1177, 10, 61, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 7, 63, 1186, 10, 63, 12, 63, 14, 63, 1189, 11, 63, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 5, 64, 1200, 10, 64, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 5, 65, 1210, 10, 65, 3, 66, 3, 66, 3, 66, 5, 66, 1215, 10, 66, 3, 66, 3, 66, 3, 66, 3, 66, 3, 67, 5, 67, 1222, 10, 67, 3, 67, 5, 67, 1225, 10, 67, 3, 67, 3, 67, 3, 67, 5, 67, 1230, 10, 67, 3, 67, 3, 67, 3, 67, 5, 67, 1235, 10, 67, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 5, 71, 1256, 10, 71, 3, 72, 3, 72, 5, 72, 1260, 10, 72, 3, 72, 3, 72, 3, 72, 5, 72, 1265, 10, 72, 3, 73, 3, 73, 3, 74, 3, 74, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 5, 76, 1276, 10, 76, 3, 77, 3, 77, 3, 77, 3, 77, 5, 77, 1282, 10, 77, 3, 78, 3, 78, 5, 78, 1286, 10, 78, 3, 78, 3, 78, 3, 78, 5, 78, 1291, 10, 78, 3, 79, 3, 79, 5, 79, 1295, 10, 79, 3, 79, 3, 79, 3, 79, 5, 79, 1300, 10, 79, 3, 80, 5, 80, 1303, 10, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 3, 80, 5, 80, 1325, 10, 80, 3, 81, 3, 81, 3, 81, 3, 81, 5, 81, 1331, 10, 81, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 3, 82, 5, 82, 1342, 10, 82, 3, 83, 3, 83, 5, 83, 1346, 10, 83, 3, 83, 5, 83, 1349, 10, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 3, 83, 5, 83, 1359, 10, 83, 3, 83, 3, 83, 3, 83, 3, 83, 5, 83, 1365, 10, 83, 3, 83, 5, 83, 1368, 10, 83, 3, 84, 3, 84, 3, 85, 3, 85, 3, 85, 5, 85, 1375, 10, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 3, 85, 5, 85, 1385, 10, 85, 3, 86, 3, 86, 5, 86, 1389, 10, 86, 3, 86, 5, 86, 1392, 10, 86, 3, 86, 5, 86, 1395, 10, 86, 3, 86, 3, 86, 5, 86, 1399, 10, 86, 3, 86, 3, 86, 3, 86, 5, 86, 1404, 10, 86, 5, 86, 1406, 10, 86, 3, 87, 3, 87, 5, 87, 1410, 10, 87, 3, 87, 3, 87, 5, 87, 1414, 10, 87, 3, 87, 3, 87, 3, 88, 3, 88, 3, 88, 3, 88, 3, 88, 5, 88, 1423, 10, 88, 3, 89, 3, 89, 3, 89, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 3, 90, 7, 90, 1434, 10, 90, 12, 90, 14, 90, 1437, 11, 90, 3, 91, 3, 91, 3, 91, 3, 91, 3, 91, 5, 91, 1444, 10, 91, 3, 92, 3, 92, 3, 93, 3, 93, 5, 93, 1450, 10, 93, 3, 94, 3, 94, 3, 95, 3, 95, 5, 95, 1456, 10, 95, 3, 96, 3, 96, 5, 96, 1460, 10, 96, 3, 97, 5, 97, 1463, 10, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 97, 3, 98, 5, 98, 1472, 10, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 98, 3, 99, 5, 99, 1481, 10, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 99, 3, 100, 5, 100, 1489, 10, 100, 3, 101, 3, 101, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 102, 3, 103, 5, 103, 1500, 10, 103, 3, 103, 3, 103, 3, 104, 3, 104, 5, 104, 1506, 10, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 3, 104, 5, 104, 1517, 10, 104, 3, 105, 5, 105, 1520, 10, 105, 3, 105, 3, 105, 3, 105, 5, 105, 1525, 10, 105, 3, 105, 3, 105, 3, 105, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 106, 3, 107, 3, 107, 3, 107, 3, 107, 5, 107, 1540, 10, 107, 3, 107, 3, 107, 3, 107, 3, 107, 5, 107, 1546, 10, 107, 3, 108, 3, 108, 3, 108, 3, 108, 3, 108, 7, 108, 1553, 10, 108, 12, 108, 14, 108, 1556, 11, 108, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 3, 109, 5, 109, 1565, 10, 109, 3, 110, 3, 110, 3, 110, 3, 110, 5, 110, 1571, 10, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 3, 110, 5, 110, 1579, 10, 110, 3, 110, 3, 110, 5, 110, 1583, 10, 110, 3, 111, 3, 111, 5, 111, 1587, 10, 111, 3, 111, 3, 111, 3, 111, 5, 111, 1592, 10, 111, 3, 111, 3, 111, 3, 111, 5, 111, 1597, 10, 111, 3, 111, 3, 111, 3, 111, 3, 111, 3, 111, 7, 111, 1604, 10, 111, 12, 111, 14, 111, 1607, 11, 111, 3, 112, 3, 112, 5, 112, 1611, 10, 112, 3, 113, 3, 113, 5, 113, 1615, 10, 113, 3, 114, 3, 114, 3, 114, 3, 114, 3, 115, 3, 115, 3, 116, 3, 116, 3, 116, 3, 116, 3, 117, 3, 117, 5, 117, 1629, 10, 117, 3, 117, 3, 117, 7, 117, 1633, 10, 117, 12, 117, 14, 117, 1636, 11, 117, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 3, 118, 5, 118, 1650, 10, 118, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 3, 119, 7, 119, 1658, 10, 119, 12, 119, 14, 119, 1661, 11, 119, 3, 120, 3, 120, 5, 120, 1665, 10, 120, 3, 121, 3, 121, 3, 121, 3, 121, 3, 121, 5, 121, 1672, 10, 121, 3, 122, 3, 122, 3, 122, 3, 122, 5, 122, 1678, 10, 122, 3, 123, 3, 123, 3, 123, 5, 123, 1683, 10, 123, 3, 123, 3, 123, 3, 123, 3, 123, 5, 123, 1689, 10, 123, 3, 123, 3, 123, 3, 123, 3, 123, 3, 123, 5, 123, 1696, 10, 123, 3, 123, 3, 123, 5, 123, 1700, 10, 123, 7, 123, 1702, 10, 123, 12, 123, 14, 123, 1705, 11, 123, 3, 124, 3, 124, 3, 124, 3, 124, 5, 124, 1711, 10, 124, 3, 124, 5, 124, 1714, 10, 124, 3, 124, 5, 124, 1717, 10, 124, 3, 124, 5, 124, 1720, 10, 124, 3, 125, 3, 125, 3, 125, 5, 125, 1725, 10, 125, 3, 126, 3, 126, 5, 126, 1729, 10, 126, 3, 126, 5, 126, 1732, 10, 126, 3, 126, 3, 126, 5, 126, 1736, 10, 126, 3, 126, 3, 126, 5, 126, 1740, 10, 126, 3, 126, 3, 126, 3, 126, 5, 126, 1745, 10, 126, 3, 126, 5, 126, 1748, 10, 126, 5, 126, 1750, 10, 126, 3, 127, 3, 127, 5, 127, 1754, 10, 127, 3, 128, 3, 128, 3, 129, 3, 129, 3, 130, 5, 130, 1761, 10, 130, 3, 130, 3, 130, 3, 131, 3, 131, 5, 131, 1767, 10, 131, 3, 132, 3, 132, 5, 132, 1771, 10, 132, 3, 132, 3, 132, 3, 132, 3, 132, 5, 132, 1777, 10, 132, 3, 133, 3, 133, 3, 133, 5, 133, 1782, 10, 133, 5, 133, 1784, 10, 133, 3, 134, 3, 134, 3, 134, 3, 134, 5, 134, 1790, 10, 134, 3, 134, 3, 134, 5, 134, 1794, 10, 134, 3, 134, 3, 134, 3, 134, 3, 134, 5, 134, 1800, 10, 134, 3, 134, 3, 134, 3, 134, 3, 134, 3, 134, 5, 134, 1807, 10, 134, 3, 134, 3, 134, 5, 134, 1811, 10, 134, 7, 134, 1813, 10, 134, 12, 134, 14, 134, 1816, 11, 134, 3, 135, 3, 135, 3, 135, 3, 135, 5, 135, 1822, 10, 135, 3, 136, 3, 136, 3, 136, 3, 136, 3, 136, 3, 136, 3, 136, 3, 136, 5, 136, 1832, 10, 136, 3, 136, 3, 136, 5, 136, 1836, 10, 136, 7, 136, 1838, 10, 136, 12, 136, 14, 136, 1841, 11, 136, 3, 137, 5, 137, 1844, 10, 137, 3, 137, 5, 137, 1847, 10, 137, 3, 137, 3, 137, 3, 137, 3, 137, 5, 137, 1853, 10, 137, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 3, 138, 7, 138, 1861, 10, 138, 12, 138, 14, 138, 1864, 11, 138, 3, 139, 5, 139, 1867, 10, 139, 3, 139, 3, 139, 3, 139, 3, 139, 5, 139, 1873, 10, 139, 3, 139, 3, 139, 3, 139, 3, 139, 3, 139, 3, 139, 5, 139, 1881, 10, 139, 3, 139, 3, 139, 5, 139, 1885, 10, 139, 3, 139, 5, 139, 1888, 10, 139, 3, 139, 3, 139, 5, 139, 1892, 10, 139, 3, 139, 3, 139, 3, 139, 5, 139, 1897, 10, 139, 3, 140, 5, 140, 1900, 10, 140, 3, 140, 5, 140, 1903, 10, 140, 3, 140, 3, 140, 5, 140, 1907, 10, 140, 3, 140, 3, 140, 3, 141, 5, 141, 1912, 10, 141, 3, 141, 3, 141, 3, 141, 3, 141, 3, 141, 3, 141, 3, 141, 3, 141, 5, 141, 1922, 10, 141, 3, 142, 3, 142, 3, 142, 3, 142, 3, 142, 5, 142, 1929, 10, 142, 3, 143, 3, 143, 3, 143, 5, 143, 1934, 10, 143, 3, 144, 3, 144, 5, 144, 1938, 10, 144, 3, 145, 3, 145, 3, 145, 5, 145, 1943, 10, 145, 3, 145, 3, 145, 3, 145, 3, 145, 5, 145, 1949, 10, 145, 7, 145, 1951, 10, 145, 12, 145, 14, 145, 1954, 11, 145, 3, 146, 3, 146, 3, 146, 5, 146, 1959, 10, 146, 3, 146, 3, 146, 3, 146, 3, 146, 5, 146, 1965, 10, 146, 3, 147, 3, 147, 5, 147, 1969, 10, 147, 3, 148, 3, 148, 3, 148, 5, 148, 1974, 10, 148, 3, 148, 3, 148, 3, 149, 3, 149, 5, 149, 1980, 10, 149, 3, 149, 3, 149, 5, 149, 1984, 10, 149, 3, 149, 5, 149, 1987, 10, 149, 3, 149, 3, 149, 5, 149, 1991, 10, 149, 3, 149, 5, 149, 1994, 10, 149, 5, 149, 1996, 10, 149, 3, 150, 5, 150, 1999, 10, 150, 3, 150, 3, 150, 3, 151, 3, 151, 3, 152, 3, 152, 3, 153, 3, 153, 5, 153, 2009, 10, 153, 3, 153, 3, 153, 3, 153, 5, 153, 2014, 10, 153, 5, 153, 2016, 10, 153, 3, 154, 5, 154, 2019, 10, 154, 3, 154, 5, 154, 2022, 10, 154, 3, 154, 5, 154, 2025, 10, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 3, 154, 5, 154, 2034, 10, 154, 3, 155, 3, 155, 3, 155, 3, 155, 3, 155, 3, 155, 7, 155, 2042, 10, 155, 12, 155, 14, 155, 2045, 11, 155, 3, 156, 3, 156, 5, 156, 2049, 10, 156, 3, 156, 5, 156, 2052, 10, 156, 3, 156, 3, 156, 5, 156, 2056, 10, 156, 3, 156, 5, 156, 2059, 10, 156, 3, 156, 5, 156, 2062, 10, 156, 3, 156, 3, 156, 5, 156, 2066, 10, 156, 3, 157, 3, 157, 3, 157, 3, 157, 3, 157, 7, 157, 2073, 10, 157, 12, 157, 14, 157, 2076, 11, 157, 3, 158, 3, 158, 3, 159, 3, 159, 3, 159, 3, 159, 3, 160, 3, 160, 3, 160, 3, 161, 3, 161, 3, 161, 5, 161, 2090, 10, 161, 3, 161, 3, 161, 3, 161, 3, 161, 5, 161, 2096, 10, 161, 7, 161, 2098, 10, 161, 12, 161, 14, 161, 2101, 11, 161, 3, 162, 5, 162, 2104, 10, 162, 3, 162, 3, 162, 5, 162, 2108, 10, 162, 3, 162, 3, 162, 5, 162, 2112, 10, 162, 3, 162, 3, 162, 5, 162, 2116, 10, 162, 3, 162, 3, 162, 5, 162, 2120, 10, 162, 3, 162, 3, 162, 5, 162, 2124, 10, 162, 3, 163, 5, 163, 2127, 10, 163, 3, 163, 3, 163, 5, 163, 2131, 10, 163, 3, 164, 3, 164, 3, 165, 3, 165, 3, 166, 3, 166, 3, 166, 3, 167, 3, 167, 5, 167, 2142, 10, 167, 3, 168, 3, 168, 5, 168, 2146, 10, 168, 3, 169, 3, 169, 3, 169, 3, 170, 3, 170, 5, 170, 2153, 10, 170, 3, 170, 3, 170, 5, 170, 2157, 10, 170, 3, 170, 3, 170, 3, 170, 5, 170, 2162, 10, 170, 3, 171, 3, 171, 3, 171, 5, 171, 2167, 10, 171, 3, 171, 3, 171, 3, 171, 3, 171, 3, 171, 5, 171, 2174, 10, 171, 3, 172, 3, 172, 5, 172, 2178, 10, 172, 3, 173, 3, 173, 3, 173, 3, 174, 3, 174, 3, 174, 3, 174, 3, 174, 5, 174, 2188, 10, 174, 3, 175, 3, 175, 3, 175, 3, 175, 3, 175, 3, 175, 3, 176, 3, 176, 3, 176, 3, 176, 3, 176, 3, 176, 7, 176, 2202, 10, 176, 12, 176, 14, 176, 2205, 11, 176, 3, 177, 3, 177, 5, 177, 2209, 10, 177, 3, 178, 3, 178, 5, 178, 2213, 10, 178, 3, 178, 5, 178, 2216, 10, 178, 3, 178, 3, 178, 5, 178, 2220, 10, 178, 3, 178, 3, 178, 3, 178, 3, 178, 5, 178, 2226, 10, 178, 3, 178, 5, 178, 2229, 10, 178, 3, 178, 3, 178, 5, 178, 2233, 10, 178, 3, 178, 3, 178, 3, 178, 3, 178, 3, 178, 3, 178, 3, 178, 3, 178, 5, 178, 2243, 10, 178, 3, 178, 5, 178, 2246, 10, 178, 3, 178, 3, 178, 3, 178, 3, 178, 3, 178, 3, 178, 5, 178, 2254, 10, 178, 3, 178, 3, 178, 3, 178, 5, 178, 2259, 10, 178, 3, 179, 3, 179, 3, 179, 5, 179, 2264, 10, 179, 3, 179, 3, 179, 3, 180, 3, 180, 3, 180, 3, 180, 5, 180, 2272, 10, 180, 3, 180, 3, 180, 3, 180, 3, 180, 3, 180, 5, 180, 2279, 10, 180, 3, 180, 3, 180, 5, 180, 2283, 10, 180, 3, 181, 3, 181, 3, 182, 3, 182, 3, 182, 5, 182, 2290, 10, 182, 3, 182, 3, 182, 3, 182, 3, 182, 5, 182, 2296, 10, 182, 7, 182, 2298, 10, 182, 12, 182, 14, 182, 2301, 11, 182, 3, 183, 3, 183, 3, 183, 5, 183, 2306, 10, 183, 3, 184, 3, 184, 3, 184, 3, 184, 3, 184, 3, 184, 3, 184, 5, 184, 2315, 10, 184, 3, 184, 3, 184, 5, 184, 2319, 10, 184, 3, 185, 5, 185, 2322, 10, 185, 3, 185, 3, 185, 3, 185, 3, 186, 3, 186, 3, 186, 3, 186, 3, 186, 3, 187, 3, 187, 3, 187, 3, 187, 3, 188, 3, 188, 5, 188, 2338, 10, 188, 3, 188, 3, 188, 3, 188, 3, 189, 3, 189, 5, 189, 2345, 10, 189, 3, 190, 3, 190, 3, 190, 3, 190, 3, 190, 3, 190, 3, 191, 5, 191, 2354, 10, 191, 3, 191, 3, 191, 3, 191, 3, 191, 5, 191, 2360, 10, 191, 3, 191, 3, 191, 5, 191, 2364, 10, 191, 3, 191, 5, 191, 2367, 10, 191, 3, 192, 3, 192, 5, 192, 2371, 10, 192, 3, 193, 3, 193, 5, 193, 2375, 10, 193, 3, 194, 3, 194, 3, 194, 5, 194, 2380, 10, 194, 3, 194, 3, 194, 3, 195, 3, 195, 3, 195, 5, 195, 2387, 10, 195, 3, 195, 3, 195, 3, 195, 3, 195, 5, 195, 2393, 10, 195, 7, 195, 2395, 10, 195, 12, 195, 14, 195, 2398, 11, 195, 3, 196, 3, 196, 3, 196, 3, 196, 3, 196, 3, 196, 5, 196, 2406, 10, 196, 3, 197, 3, 197, 3, 197, 3, 198, 3, 198, 3, 198, 3, 198, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 3, 199, 5, 199, 2463, 10, 199, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 3, 200, 5, 200, 2472, 10, 200, 3, 201, 3, 201, 3, 202, 3, 202, 3, 203, 3, 203, 3, 203, 2, 36, 12, 22, 32, 54, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 92, 106, 124, 178, 214, 220, 232, 236, 244, 266, 270, 274, 288, 308, 312, 320, 350, 362, 388, 204, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190, 192, 194, 196, 198, 200, 202, 204, 206, 208, 210, 212, 214, 216, 218, 220, 222, 224, 226, 228, 230, 232, 234, 236, 238, 240, 242, 244, 246, 248, 250, 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, 272, 274, 276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, 344, 346, 348, 350, 352, 354, 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, 376, 378, 380, 382, 384, 386, 388, 390, 392, 394, 396, 398, 400, 402, 404, 2, 13, 4, 2, 92, 92, 96, 96, 4, 2, 86, 88, 92, 95, 7, 2, 31, 31, 42, 42, 52, 52, 58, 58, 65, 65, 5, 2, 29, 29, 39, 39, 75, 75, 4, 2, 17, 17, 77, 77, 4, 2, 92, 92, 113, 113, 5, 2, 16, 16, 61, 61, 72, 72, 4, 2, 33, 33, 48, 48, 3, 2, 49, 51, 4, 2, 32, 32, 67, 67, 3, 2, 137, 140, 2, 2766, 2, 407, 3, 2, 2, 2, 4, 419, 3, 2, 2, 2, 6, 423, 3, 2, 2, 2, 8, 434, 3, 2, 2, 2, 10, 436, 3, 2, 2, 2, 12, 453, 3, 2, 2, 2, 14, 470, 3, 2, 2, 2, 16, 476, 3, 2, 2, 2, 18, 488, 3, 2, 2, 2, 20, 490, 3, 2, 2, 2, 22, 492, 3, 2, 2, 2, 24, 510, 3, 2, 2, 2, 26, 516, 3, 2, 2, 2, 28, 523, 3, 2, 2, 2, 30, 525, 3, 2, 2, 2, 32, 604, 3, 2, 2, 2, 34, 649, 3, 2, 2, 2, 36, 673, 3, 2, 2, 2, 38, 688, 3, 2, 2, 2, 40, 702, 3, 2, 2, 2, 42, 704, 3, 2, 2, 2, 44, 709, 3, 2, 2, 2, 46, 735, 3, 2, 2, 2, 48, 737, 3, 2, 2, 2, 50, 741, 3, 2, 2, 2, 52, 750, 3, 2, 2, 2, 54, 752, 3, 2, 2, 2, 56, 777, 3, 2, 2, 2, 58, 791, 3, 2, 2, 2, 60, 793, 3, 2, 2, 2, 62, 804, 3, 2, 2, 2, 64, 806, 3, 2, 2, 2, 66, 820, 3, 2, 2, 2, 68, 837, 3, 2, 2, 2, 70, 851, 3, 2, 2, 2, 72, 866, 3, 2, 2, 2, 74, 886, 3, 2, 2, 2, 76, 900, 3, 2, 2, 2, 78, 911, 3, 2, 2, 2, 80, 922, 3, 2, 2, 2, 82, 933, 3, 2, 2, 2, 84, 944, 3, 2, 2, 2, 86, 962, 3, 2, 2, 2, 88, 970, 3, 2, 2, 2, 90, 983, 3, 2, 2, 2, 92, 985, 3, 2, 2, 2, 94, 996, 3, 2, 2, 2, 96, 1024, 3, 2, 2, 2, 98, 1043, 3, 2, 2, 2, 100, 1045, 3, 2, 2, 2, 102, 1049, 3, 2, 2, 2, 104, 1053, 3, 2, 2, 2, 106, 1059, 3, 2, 2, 2, 108, 1089, 3, 2, 2, 2, 110, 1107, 3, 2, 2, 2, 112, 1144, 3, 2, 2, 2, 114, 1148, 3, 2, 2, 2, 116, 1151, 3, 2, 2, 2, 118, 1158, 3, 2, 2, 2, 120, 1176, 3, 2, 2, 2, 122, 1178, 3, 2, 2, 2, 124, 1180, 3, 2, 2, 2, 126, 1199, 3, 2, 2, 2, 128, 1209, 3, 2, 2, 2, 130, 1211, 3, 2, 2, 2, 132, 1234, 3, 2, 2, 2, 134, 1236, 3, 2, 2, 2, 136, 1244, 3, 2, 2, 2, 138, 1246, 3, 2, 2, 2, 140, 1255, 3, 2, 2, 2, 142, 1264, 3, 2, 2, 2, 144, 1266, 3, 2, 2, 2, 146, 1268, 3, 2, 2, 2, 148, 1270, 3, 2, 2, 2, 150, 1275, 3, 2, 2, 2, 152, 1281, 3, 2, 2, 2, 154, 1290, 3, 2, 2, 2, 156, 1299, 3, 2, 2, 2, 158, 1324, 3, 2, 2, 2, 160, 1330, 3, 2, 2, 2, 162, 1341, 3, 2, 2, 2, 164, 1367, 3, 2, 2, 2, 166, 1369, 3, 2, 2, 2, 168, 1384, 3, 2, 2, 2, 170, 1405, 3, 2, 2, 2, 172, 1407, 3, 2, 2, 2, 174, 1422, 3, 2, 2, 2, 176, 1424, 3, 2, 2, 2, 178, 1427, 3, 2, 2, 2, 180, 1443, 3, 2, 2, 2, 182, 1445, 3, 2, 2, 2, 184, 1449, 3, 2, 2, 2, 186, 1451, 3, 2, 2, 2, 188, 1455, 3, 2, 2, 2, 190, 1459, 3, 2, 2, 2, 192, 1462, 3, 2, 2, 2, 194, 1471, 3, 2, 2, 2, 196, 1480, 3, 2, 2, 2, 198, 1488, 3, 2, 2, 2, 200, 1490, 3, 2, 2, 2, 202, 1492, 3, 2, 2, 2, 204, 1499, 3, 2, 2, 2, 206, 1516, 3, 2, 2, 2, 208, 1519, 3, 2, 2, 2, 210, 1529, 3, 2, 2, 2, 212, 1545, 3, 2, 2, 2, 214, 1547, 3, 2, 2, 2, 216, 1564, 3, 2, 2, 2, 218, 1582, 3, 2, 2, 2, 220, 1591, 3, 2, 2, 2, 222, 1608, 3, 2, 2, 2, 224, 1614, 3, 2, 2, 2, 226, 1616, 3, 2, 2, 2, 228, 1620, 3, 2, 2, 2, 230, 1622, 3, 2, 2, 2, 232, 1626, 3, 2, 2, 2, 234, 1649, 3, 2, 2, 2, 236, 1651, 3, 2, 2, 2, 238, 1662, 3, 2, 2, 2, 240, 1671, 3, 2, 2, 2, 242, 1677, 3, 2, 2, 2, 244, 1688, 3, 2, 2, 2, 246, 1706, 3, 2, 2, 2, 248, 1721, 3, 2, 2, 2, 250, 1749, 3, 2, 2, 2, 252, 1751, 3, 2, 2, 2, 254, 1755, 3, 2, 2, 2, 256, 1757, 3, 2, 2, 2, 258, 1760, 3, 2, 2, 2, 260, 1764, 3, 2, 2, 2, 262, 1776, 3, 2, 2, 2, 264, 1783, 3, 2, 2, 2, 266, 1799, 3, 2, 2, 2, 268, 1821, 3, 2, 2, 2, 270, 1823, 3, 2, 2, 2, 272, 1852, 3, 2, 2, 2, 274, 1854, 3, 2, 2, 2, 276, 1896, 3, 2, 2, 2, 278, 1899, 3, 2, 2, 2, 280, 1921, 3, 2, 2, 2, 282, 1928, 3, 2, 2, 2, 284, 1933, 3, 2, 2, 2, 286, 1937, 3, 2, 2, 2, 288, 1939, 3, 2, 2, 2, 290, 1964, 3, 2, 2, 2, 292, 1968, 3, 2, 2, 2, 294, 1970, 3, 2, 2, 2, 296, 1995, 3, 2, 2, 2, 298, 1998, 3, 2, 2, 2, 300, 2002, 3, 2, 2, 2, 302, 2004, 3, 2, 2, 2, 304, 2015, 3, 2, 2, 2, 306, 2033, 3, 2, 2, 2, 308, 2035, 3, 2, 2, 2, 310, 2065, 3, 2, 2, 2, 312, 2067, 3, 2, 2, 2, 314, 2077, 3, 2, 2, 2, 316, 2079, 3, 2, 2, 2, 318, 2083, 3, 2, 2, 2, 320, 2086, 3, 2, 2, 2, 322, 2123, 3, 2, 2, 2, 324, 2130, 3, 2, 2, 2, 326, 2132, 3, 2, 2, 2, 328, 2134, 3, 2, 2, 2, 330, 2136, 3, 2, 2, 2, 332, 2139, 3, 2, 2, 2, 334, 2143, 3, 2, 2, 2, 336, 2147, 3, 2, 2, 2, 338, 2161, 3, 2, 2, 2, 340, 2173, 3, 2, 2, 2, 342, 2177, 3, 2, 2, 2, 344, 2179, 3, 2, 2, 2, 346, 2187, 3, 2, 2, 2, 348, 2189, 3, 2, 2, 2, 350, 2195, 3, 2, 2, 2, 352, 2208, 3, 2, 2, 2, 354, 2258, 3, 2, 2, 2, 356, 2260, 3, 2, 2, 2, 358, 2282, 3, 2, 2, 2, 360, 2284, 3, 2, 2, 2, 362, 2286, 3, 2, 2, 2, 364, 2305, 3, 2, 2, 2, 366, 2318, 3, 2, 2, 2, 368, 2321, 3, 2, 2, 2, 370, 2326, 3, 2, 2, 2, 372, 2331, 3, 2, 2, 2, 374, 2335, 3, 2, 2, 2, 376, 2342, 3, 2, 2, 2, 378, 2346, 3, 2, 2, 2, 380, 2366, 3, 2, 2, 2, 382, 2368, 3, 2, 2, 2, 384, 2374, 3, 2, 2, 2, 386, 2376, 3, 2, 2, 2, 388, 2383, 3, 2, 2, 2, 390, 2405, 3, 2, 2, 2, 392, 2407, 3, 2, 2, 2, 394, 2410, 3, 2, 2, 2, 396, 2462, 3, 2, 2, 2, 398, 2471, 3, 2, 2, 2, 400, 2473, 3, 2, 2, 2, 402, 2475, 3, 2, 2, 2, 404, 2477, 3, 2, 2, 2, 406, 408, 5, 124, 63, 2, 407, 406, 3, 2, 2, 2, 407, 408, 3, 2, 2, 2, 408, 409, 3, 2, 2, 2, 409, 410, 7, 2, 2, 3, 410, 3, 3, 2, 2, 2, 411, 420, 5, 398, 200, 2, 412, 420, 7, 64, 2, 2, 413, 414, 7, 80, 2, 2, 414, 415, 5, 92, 47, 2, 415, 416, 7, 81, 2, 2, 416, 420, 3, 2, 2, 2, 417, 420, 5, 6, 4, 2, 418, 420, 5, 14, 8, 2, 419, 411, 3, 2, 2, 2, 419, 412, 3, 2, 2, 2, 419, 413, 3, 2, 2, 2, 419, 417, 3, 2, 2, 2, 419, 418, 3, 2, 2, 2, 420, 5, 3, 2, 2, 2, 421, 424, 5, 8, 5, 2, 422, 424, 5, 10, 6, 2, 423, 421, 3, 2, 2, 2, 423, 422, 3, 2, 2, 2, 424, 7, 3, 2, 2, 2, 425, 435, 7, 127, 2, 2, 426, 435, 5, 344, 173, 2, 427, 435, 5, 330, 166, 2, 428, 435, 5, 346, 174, 2, 429, 430, 7, 94, 2, 2, 430, 435, 5, 292, 147, 2, 431, 432, 7, 94, 2, 2, 432, 435, 5, 162, 82, 2, 433, 435, 5, 358, 180, 2, 434, 425, 3, 2, 2, 2, 434, 426, 3, 2, 2, 2, 434, 427, 3, 2, 2, 2, 434, 428, 3, 2, 2, 2, 434, 429, 3, 2, 2, 2, 434, 431, 3, 2, 2, 2, 434, 433, 3, 2, 2, 2, 435, 9, 3, 2, 2, 2, 436, 438, 5, 12, 7, 2, 437, 439, 7, 63, 2, 2, 438, 437, 3, 2, 2, 2, 438, 439, 3, 2, 2, 2, 439, 440, 3, 2, 2, 2, 440, 441, 5, 8, 5, 2, 441, 11, 3, 2, 2, 2, 442, 443, 8, 7, 1, 2, 443, 454, 7, 122, 2, 2, 444, 445, 5, 160, 81, 2, 445, 446, 7, 122, 2, 2, 446, 454, 3, 2, 2, 2, 447, 448, 5, 184, 93, 2, 448, 449, 7, 122, 2, 2, 449, 454, 3, 2, 2, 2, 450, 451, 5, 162, 82, 2, 451, 452, 7, 122, 2, 2, 452, 454, 3, 2, 2, 2, 453, 442, 3, 2, 2, 2, 453, 444, 3, 2, 2, 2, 453, 447, 3, 2, 2, 2, 453, 450, 3, 2, 2, 2, 454, 467, 3, 2, 2, 2, 455, 456, 12, 4, 2, 2, 456, 457, 7, 127, 2, 2, 457, 466, 7, 122, 2, 2, 458, 460, 12, 3, 2, 2, 459, 461, 7, 63, 2, 2, 460, 459, 3, 2, 2, 2, 460, 461, 3, 2, 2, 2, 461, 462, 3, 2, 2, 2, 462, 463, 5, 356, 179, 2, 463, 464, 7, 122, 2, 2, 464, 466, 3, 2, 2, 2, 465, 455, 3, 2, 2, 2, 465, 458, 3, 2, 2, 2, 466, 469, 3, 2, 2, 2, 467, 465, 3, 2, 2, 2, 467, 468, 3, 2, 2, 2, 468, 13, 3, 2, 2, 2, 469, 467, 3, 2, 2, 2, 470, 472, 5, 16, 9, 2, 471, 473, 5, 30, 16, 2, 472, 471, 3, 2, 2, 2, 472, 473, 3, 2, 2, 2, 473, 474, 3, 2, 2, 2, 474, 475, 5, 104, 53, 2, 475, 15, 3, 2, 2, 2, 476, 478, 7, 82, 2, 2, 477, 479, 5, 18, 10, 2, 478, 477, 3, 2, 2, 2, 478, 479, 3, 2, 2, 2, 479, 480, 3, 2, 2, 2, 480, 481, 7, 83, 2, 2, 481, 17, 3, 2, 2, 2, 482, 489, 5, 20, 11, 2, 483, 489, 5, 22, 12, 2, 484, 485, 5, 20, 11, 2, 485, 486, 7, 117, 2, 2, 486, 487, 5, 22, 12, 2, 487, 489, 3, 2, 2, 2, 488, 482, 3, 2, 2, 2, 488, 483, 3, 2, 2, 2, 488, 484, 3, 2, 2, 2, 489, 19, 3, 2, 2, 2, 490, 491, 9, 2, 2, 2, 491, 21, 3, 2, 2, 2, 492, 493, 8, 12, 1, 2, 493, 495, 5, 24, 13, 2, 494, 496, 7, 126, 2, 2, 495, 494, 3, 2, 2, 2, 495, 496, 3, 2, 2, 2, 496, 505, 3, 2, 2, 2, 497, 498, 12, 3, 2, 2, 498, 499, 7, 117, 2, 2, 499, 501, 5, 24, 13, 2, 500, 502, 7, 126, 2, 2, 501, 500, 3, 2, 2, 2, 501, 502, 3, 2, 2, 2, 502, 504, 3, 2, 2, 2, 503, 497, 3, 2, 2, 2, 504, 507, 3, 2, 2, 2, 505, 503, 3, 2, 2, 2, 505, 506, 3, 2, 2, 2, 506, 23, 3, 2, 2, 2, 507, 505, 3, 2, 2, 2, 508, 511, 5, 26, 14, 2, 509, 511, 5, 28, 15, 2, 510, 508, 3, 2, 2, 2, 510, 509, 3, 2, 2, 2, 511, 25, 3, 2, 2, 2, 512, 517, 7, 127, 2, 2, 513, 514, 7, 92, 2, 2, 514, 517, 7, 127, 2, 2, 515, 517, 7, 64, 2, 2, 516, 512, 3, 2, 2, 2, 516, 513, 3, 2, 2, 2, 516, 515, 3, 2, 2, 2, 517, 27, 3, 2, 2, 2, 518, 519, 7, 127, 2, 2, 519, 524, 5, 282, 142, 2, 520, 521, 7, 92, 2, 2, 521, 522, 7, 127, 2, 2, 522, 524, 5, 282, 142, 2, 523, 518, 3, 2, 2, 2, 523, 520, 3, 2, 2, 2, 524, 29, 3, 2, 2, 2, 525, 526, 7, 80, 2, 2, 526, 527, 5, 272, 137, 2, 527, 529, 7, 81, 2, 2, 528, 530, 7, 42, 2, 2, 529, 528, 3, 2, 2, 2, 529, 530, 3, 2, 2, 2, 530, 532, 3, 2, 2, 2, 531, 533, 5, 384, 193, 2, 532, 531, 3, 2, 2, 2, 532, 533, 3, 2, 2, 2, 533, 535, 3, 2, 2, 2, 534, 536, 5, 214, 108, 2, 535, 534, 3, 2, 2, 2, 535, 536, 3, 2, 2, 2, 536, 538, 3, 2, 2, 2, 537, 539, 5, 248, 125, 2, 538, 537, 3, 2, 2, 2, 538, 539, 3, 2, 2, 2, 539, 31, 3, 2, 2, 2, 540, 541, 8, 17, 1, 2, 541, 605, 5, 4, 3, 2, 542, 543, 5, 158, 80, 2, 543, 545, 7, 80, 2, 2, 544, 546, 5, 34, 18, 2, 545, 544, 3, 2, 2, 2, 545, 546, 3, 2, 2, 2, 546, 547, 3, 2, 2, 2, 547, 548, 7, 81, 2, 2, 548, 605, 3, 2, 2, 2, 549, 550, 5, 366, 184, 2, 550, 552, 7, 80, 2, 2, 551, 553, 5, 34, 18, 2, 552, 551, 3, 2, 2, 2, 552, 553, 3, 2, 2, 2, 553, 554, 3, 2, 2, 2, 554, 555, 7, 81, 2, 2, 555, 605, 3, 2, 2, 2, 556, 557, 5, 158, 80, 2, 557, 558, 5, 290, 146, 2, 558, 605, 3, 2, 2, 2, 559, 560, 5, 366, 184, 2, 560, 561, 5, 290, 146, 2, 561, 605, 3, 2, 2, 2, 562, 563, 7, 26, 2, 2, 563, 564, 7, 97, 2, 2, 564, 565, 5, 260, 131, 2, 565, 566, 7, 98, 2, 2, 566, 567, 7, 80, 2, 2, 567, 568, 5, 92, 47, 2, 568, 569, 7, 81, 2, 2, 569, 605, 3, 2, 2, 2, 570, 571, 7, 60, 2, 2, 571, 572, 7, 97, 2, 2, 572, 573, 5, 260, 131, 2, 573, 574, 7, 98, 2, 2, 574, 575, 7, 80, 2, 2, 575, 576, 5, 92, 47, 2, 576, 577, 7, 81, 2, 2, 577, 605, 3, 2, 2, 2, 578, 579, 7, 53, 2, 2, 579, 580, 7, 97, 2, 2, 580, 581, 5, 260, 131, 2, 581, 582, 7, 98, 2, 2, 582, 583, 7, 80, 2, 2, 583, 584, 5, 92, 47, 2, 584, 585, 7, 81, 2, 2, 585, 605, 3, 2, 2, 2, 586, 587, 7, 19, 2, 2, 587, 588, 7, 97, 2, 2, 588, 589, 5, 260, 131, 2, 589, 590, 7, 98, 2, 2, 590, 591, 7, 80, 2, 2, 591, 592, 5, 92, 47, 2, 592, 593, 7, 81, 2, 2, 593, 605, 3, 2, 2, 2, 594, 595, 7, 70, 2, 2, 595, 596, 7, 80, 2, 2, 596, 597, 5, 92, 47, 2, 597, 598, 7, 81, 2, 2, 598, 605, 3, 2, 2, 2, 599, 600, 7, 70, 2, 2, 600, 601, 7, 80, 2, 2, 601, 602, 5, 260, 131, 2, 602, 603, 7, 81, 2, 2, 603, 605, 3, 2, 2, 2, 604, 540, 3, 2, 2, 2, 604, 542, 3, 2, 2, 2, 604, 549, 3, 2, 2, 2, 604, 556, 3, 2, 2, 2, 604, 559, 3, 2, 2, 2, 604, 562, 3, 2, 2, 2, 604, 570, 3, 2, 2, 2, 604, 578, 3, 2, 2, 2, 604, 586, 3, 2, 2, 2, 604, 594, 3, 2, 2, 2, 604, 599, 3, 2, 2, 2, 605, 646, 3, 2, 2, 2, 606, 607, 12, 21, 2, 2, 607, 608, 7, 82, 2, 2, 608, 609, 5, 92, 47, 2, 609, 610, 7, 83, 2, 2, 610, 645, 3, 2, 2, 2, 611, 612, 12, 20, 2, 2, 612, 613, 7, 82, 2, 2, 613, 614, 5, 290, 146, 2, 614, 615, 7, 83, 2, 2, 615, 645, 3, 2, 2, 2, 616, 617, 12, 19, 2, 2, 617, 619, 7, 80, 2, 2, 618, 620, 5, 34, 18, 2, 619, 618, 3, 2, 2, 2, 619, 620, 3, 2, 2, 2, 620, 621, 3, 2, 2, 2, 621, 645, 7, 81, 2, 2, 622, 623, 12, 14, 2, 2, 623, 625, 7, 124, 2, 2, 624, 626, 7, 63, 2, 2, 625, 624, 3, 2, 2, 2, 625, 626, 3, 2, 2, 2, 626, 627, 3, 2, 2, 2, 627, 645, 5, 6, 4, 2, 628, 629, 12, 13, 2, 2, 629, 631, 7, 119, 2, 2, 630, 632, 7, 63, 2, 2, 631, 630, 3, 2, 2, 2, 631, 632, 3, 2, 2, 2, 632, 633, 3, 2, 2, 2, 633, 645, 5, 6, 4, 2, 634, 635, 12, 12, 2, 2, 635, 636, 7, 124, 2, 2, 636, 645, 5, 36, 19, 2, 637, 638, 12, 11, 2, 2, 638, 639, 7, 119, 2, 2, 639, 645, 5, 36, 19, 2, 640, 641, 12, 10, 2, 2, 641, 645, 7, 115, 2, 2, 642, 643, 12, 9, 2, 2, 643, 645, 7, 116, 2, 2, 644, 606, 3, 2, 2, 2, 644, 611, 3, 2, 2, 2, 644, 616, 3, 2, 2, 2, 644, 622, 3, 2, 2, 2, 644, 628, 3, 2, 2, 2, 644, 634, 3, 2, 2, 2, 644, 637, 3, 2, 2, 2, 644, 640, 3, 2, 2, 2, 644, 642, 3, 2, 2, 2, 645, 648, 3, 2, 2, 2, 646, 644, 3, 2, 2, 2, 646, 647, 3, 2, 2, 2, 647, 33, 3, 2, 2, 2, 648, 646, 3, 2, 2, 2, 649, 650, 5, 288, 145, 2, 650, 35, 3, 2, 2, 2, 651, 653, 5, 12, 7, 2, 652, 651, 3, 2, 2, 2, 652, 653, 3, 2, 2, 2, 653, 654, 3, 2, 2, 2, 654, 655, 5, 160, 81, 2, 655, 656, 7, 122, 2, 2, 656, 657, 7, 94, 2, 2, 657, 658, 5, 160, 81, 2, 658, 674, 3, 2, 2, 2, 659, 660, 5, 12, 7, 2, 660, 661, 7, 63, 2, 2, 661, 662, 5, 356, 179, 2, 662, 663, 7, 122, 2, 2, 663, 664, 7, 94, 2, 2, 664, 665, 5, 160, 81, 2, 665, 674, 3, 2, 2, 2, 666, 668, 5, 12, 7, 2, 667, 666, 3, 2, 2, 2, 667, 668, 3, 2, 2, 2, 668, 669, 3, 2, 2, 2, 669, 670, 7, 94, 2, 2, 670, 674, 5, 160, 81, 2, 671, 672, 7, 94, 2, 2, 672, 674, 5, 162, 82, 2, 673, 652, 3, 2, 2, 2, 673, 659, 3, 2, 2, 2, 673, 667, 3, 2, 2, 2, 673, 671, 3, 2, 2, 2, 674, 37, 3, 2, 2, 2, 675, 689, 5, 32, 17, 2, 676, 677, 7, 115, 2, 2, 677, 689, 5, 62, 32, 2, 678, 679, 7, 116, 2, 2, 679, 689, 5, 62, 32, 2, 680, 681, 5, 44, 23, 2, 681, 682, 5, 62, 32, 2, 682, 689, 3, 2, 2, 2, 683, 689, 5, 40, 21, 2, 684, 689, 5, 42, 22, 2, 685, 689, 5, 60, 31, 2, 686, 689, 5, 46, 24, 2, 687, 689, 5, 58, 30, 2, 688, 675, 3, 2, 2, 2, 688, 676, 3, 2, 2, 2, 688, 678, 3, 2, 2, 2, 688, 680, 3, 2, 2, 2, 688, 683, 3, 2, 2, 2, 688, 684, 3, 2, 2, 2, 688, 685, 3, 2, 2, 2, 688, 686, 3, 2, 2, 2, 688, 687, 3, 2, 2, 2, 689, 39, 3, 2, 2, 2, 690, 691, 7, 57, 2, 2, 691, 703, 5, 38, 20, 2, 692, 693, 7, 57, 2, 2, 693, 694, 7, 80, 2, 2, 694, 695, 5, 260, 131, 2, 695, 696, 7, 81, 2, 2, 696, 703, 3, 2, 2, 2, 697, 698, 7, 57, 2, 2, 698, 699, 7, 126, 2, 2, 699, 700, 7, 80, 2, 2, 700, 701, 7, 127, 2, 2, 701, 703, 7, 81, 2, 2, 702, 690, 3, 2, 2, 2, 702, 692, 3, 2, 2, 2, 702, 697, 3, 2, 2, 2, 703, 41, 3, 2, 2, 2, 704, 705, 7, 6, 2, 2, 705, 706, 7, 80, 2, 2, 706, 707, 5, 260, 131, 2, 707, 708, 7, 81, 2, 2, 708, 43, 3, 2, 2, 2, 709, 710, 9, 3, 2, 2, 710, 45, 3, 2, 2, 2, 711, 713, 7, 122, 2, 2, 712, 711, 3, 2, 2, 2, 712, 713, 3, 2, 2, 2, 713, 714, 3, 2, 2, 2, 714, 716, 7, 44, 2, 2, 715, 717, 5, 48, 25, 2, 716, 715, 3, 2, 2, 2, 716, 717, 3, 2, 2, 2, 717, 718, 3, 2, 2, 2, 718, 720, 5, 50, 26, 2, 719, 721, 5, 56, 29, 2, 720, 719, 3, 2, 2, 2, 720, 721, 3, 2, 2, 2, 721, 736, 3, 2, 2, 2, 722, 724, 7, 122, 2, 2, 723, 722, 3, 2, 2, 2, 723, 724, 3, 2, 2, 2, 724, 725, 3, 2, 2, 2, 725, 727, 7, 44, 2, 2, 726, 728, 5, 48, 25, 2, 727, 726, 3, 2, 2, 2, 727, 728, 3, 2, 2, 2, 728, 729, 3, 2, 2, 2, 729, 730, 7, 80, 2, 2, 730, 731, 5, 260, 131, 2, 731, 733, 7, 81, 2, 2, 732, 734, 5, 56, 29, 2, 733, 732, 3, 2, 2, 2, 733, 734, 3, 2, 2, 2, 734, 736, 3, 2, 2, 2, 735, 712, 3, 2, 2, 2, 735, 723, 3, 2, 2, 2, 736, 47, 3, 2, 2, 2, 737, 738, 7, 80, 2, 2, 738, 739, 5, 34, 18, 2, 739, 740, 7, 81, 2, 2, 740, 49, 3, 2, 2, 2, 741, 743, 5, 154, 78, 2, 742, 744, 5, 52, 27, 2, 743, 742, 3, 2, 2, 2, 743, 744, 3, 2, 2, 2, 744, 51, 3, 2, 2, 2, 745, 747, 5, 250, 126, 2, 746, 748, 5, 52, 27, 2, 747, 746, 3, 2, 2, 2, 747, 748, 3, 2, 2, 2, 748, 751, 3, 2, 2, 2, 749, 751, 5, 54, 28, 2, 750, 745, 3, 2, 2, 2, 750, 749, 3, 2, 2, 2, 751, 53, 3, 2, 2, 2, 752, 753, 8, 28, 1, 2, 753, 754, 7, 82, 2, 2, 754, 755, 5, 92, 47, 2, 755, 757, 7, 83, 2, 2, 756, 758, 5, 214, 108, 2, 757, 756, 3, 2, 2, 2, 757, 758, 3, 2, 2, 2, 758, 768, 3, 2, 2, 2, 759, 760, 12, 3, 2, 2, 760, 761, 7, 82, 2, 2, 761, 762, 5, 94, 48, 2, 762, 764, 7, 83, 2, 2, 763, 765, 5, 214, 108, 2, 764, 763, 3, 2, 2, 2, 764, 765, 3, 2, 2, 2, 765, 767, 3, 2, 2, 2, 766, 759, 3, 2, 2, 2, 767, 770, 3, 2, 2, 2, 768, 766, 3, 2, 2, 2, 768, 769, 3, 2, 2, 2, 769, 55, 3, 2, 2, 2, 770, 768, 3, 2, 2, 2, 771, 773, 7, 80, 2, 2, 772, 774, 5, 34, 18, 2, 773, 772, 3, 2, 2, 2, 773, 774, 3, 2, 2, 2, 774, 775, 3, 2, 2, 2, 775, 778, 7, 81, 2, 2, 776, 778, 5, 290, 146, 2, 777, 771, 3, 2, 2, 2, 777, 776, 3, 2, 2, 2, 778, 57, 3, 2, 2, 2, 779, 781, 7, 122, 2, 2, 780, 779, 3, 2, 2, 2, 780, 781, 3, 2, 2, 2, 781, 782, 3, 2, 2, 2, 782, 783, 7, 23, 2, 2, 783, 792, 5, 62, 32, 2, 784, 786, 7, 122, 2, 2, 785, 784, 3, 2, 2, 2, 785, 786, 3, 2, 2, 2, 786, 787, 3, 2, 2, 2, 787, 788, 7, 23, 2, 2, 788, 789, 7, 82, 2, 2, 789, 790, 7, 83, 2, 2, 790, 792, 5, 62, 32, 2, 791, 780, 3, 2, 2, 2, 791, 785, 3, 2, 2, 2, 792, 59, 3, 2, 2, 2, 793, 794, 7, 45, 2, 2, 794, 795, 7, 80, 2, 2, 795, 796, 5, 92, 47, 2, 796, 797, 7, 81, 2, 2, 797, 61, 3, 2, 2, 2, 798, 805, 5, 38, 20, 2, 799, 800, 7, 80, 2, 2, 800, 801, 5, 260, 131, 2, 801, 802, 7, 81, 2, 2, 802, 803, 5, 62, 32, 2, 803, 805, 3, 2, 2, 2, 804, 798, 3, 2, 2, 2, 804, 799, 3, 2, 2, 2, 805, 63, 3, 2, 2, 2, 806, 807, 8, 33, 1, 2, 807, 808, 5, 62, 32, 2, 808, 817, 3, 2, 2, 2, 809, 810, 12, 4, 2, 2, 810, 811, 7, 125, 2, 2, 811, 816, 5, 62, 32, 2, 812, 813, 12, 3, 2, 2, 813, 814, 7, 118, 2, 2, 814, 816, 5, 62, 32, 2, 815, 809, 3, 2, 2, 2, 815, 812, 3, 2, 2, 2, 816, 819, 3, 2, 2, 2, 817, 815, 3, 2, 2, 2, 817, 818, 3, 2, 2, 2, 818, 65, 3, 2, 2, 2, 819, 817, 3, 2, 2, 2, 820, 821, 8, 34, 1, 2, 821, 822, 5, 64, 33, 2, 822, 834, 3, 2, 2, 2, 823, 824, 12, 5, 2, 2, 824, 825, 7, 88, 2, 2, 825, 833, 5, 64, 33, 2, 826, 827, 12, 4, 2, 2, 827, 828, 7, 89, 2, 2, 828, 833, 5, 64, 33, 2, 829, 830, 12, 3, 2, 2, 830, 831, 7, 90, 2, 2, 831, 833, 5, 64, 33, 2, 832, 823, 3, 2, 2, 2, 832, 826, 3, 2, 2, 2, 832, 829, 3, 2, 2, 2, 833, 836, 3, 2, 2, 2, 834, 832, 3, 2, 2, 2, 834, 835, 3, 2, 2, 2, 835, 67, 3, 2, 2, 2, 836, 834, 3, 2, 2, 2, 837, 838, 8, 35, 1, 2, 838, 839, 5, 66, 34, 2, 839, 848, 3, 2, 2, 2, 840, 841, 12, 4, 2, 2, 841, 842, 7, 86, 2, 2, 842, 847, 5, 66, 34, 2, 843, 844, 12, 3, 2, 2, 844, 845, 7, 87, 2, 2, 845, 847, 5, 66, 34, 2, 846, 840, 3, 2, 2, 2, 846, 843, 3, 2, 2, 2, 847, 850, 3, 2, 2, 2, 848, 846, 3, 2, 2, 2, 848, 849, 3, 2, 2, 2, 849, 69, 3, 2, 2, 2, 850, 848, 3, 2, 2, 2, 851, 852, 8, 36, 1, 2, 852, 853, 5, 68, 35, 2, 853, 863, 3, 2, 2, 2, 854, 855, 12, 4, 2, 2, 855, 856, 7, 107, 2, 2, 856, 862, 5, 68, 35, 2, 857, 858, 12, 3, 2, 2, 858, 859, 5, 392, 197, 2, 859, 860, 5, 68, 35, 2, 860, 862, 3, 2, 2, 2, 861, 854, 3, 2, 2, 2, 861, 857, 3, 2, 2, 2, 862, 865, 3, 2, 2, 2, 863, 861, 3, 2, 2, 2, 863, 864, 3, 2, 2, 2, 864, 71, 3, 2, 2, 2, 865, 863, 3, 2, 2, 2, 866, 867, 8, 37, 1, 2, 867, 868, 5, 70, 36, 2, 868, 883, 3, 2, 2, 2, 869, 870, 12, 6, 2, 2, 870, 871, 7, 97, 2, 2, 871, 882, 5, 70, 36, 2, 872, 873, 12, 5, 2, 2, 873, 874, 7, 98, 2, 2, 874, 882, 5, 70, 36, 2, 875, 876, 12, 4, 2, 2, 876, 877, 7, 111, 2, 2, 877, 882, 5, 70, 36, 2, 878, 879, 12, 3, 2, 2, 879, 880, 7, 112, 2, 2, 880, 882, 5, 70, 36, 2, 881, 869, 3, 2, 2, 2, 881, 872, 3, 2, 2, 2, 881, 875, 3, 2, 2, 2, 881, 878, 3, 2, 2, 2, 882, 885, 3, 2, 2, 2, 883, 881, 3, 2, 2, 2, 883, 884, 3, 2, 2, 2, 884, 73, 3, 2, 2, 2, 885, 883, 3, 2, 2, 2, 886, 887, 8, 38, 1, 2, 887, 888, 5, 72, 37, 2, 888, 897, 3, 2, 2, 2, 889, 890, 12, 4, 2, 2, 890, 891, 7, 109, 2, 2, 891, 896, 5, 72, 37, 2, 892, 893, 12, 3, 2, 2, 893, 894, 7, 110, 2, 2, 894, 896, 5, 72, 37, 2, 895, 889, 3, 2, 2, 2, 895, 892, 3, 2, 2, 2, 896, 899, 3, 2, 2, 2, 897, 895, 3, 2, 2, 2, 897, 898, 3, 2, 2, 2, 898, 75, 3, 2, 2, 2, 899, 897, 3, 2, 2, 2, 900, 901, 8, 39, 1, 2, 901, 902, 5, 74, 38, 2, 902, 908, 3, 2, 2, 2, 903, 904, 12, 3, 2, 2, 904, 905, 7, 92, 2, 2, 905, 907, 5, 74, 38, 2, 906, 903, 3, 2, 2, 2, 907, 910, 3, 2, 2, 2, 908, 906, 3, 2, 2, 2, 908, 909, 3, 2, 2, 2, 909, 77, 3, 2, 2, 2, 910, 908, 3, 2, 2, 2, 911, 912, 8, 40, 1, 2, 912, 913, 5, 76, 39, 2, 913, 919, 3, 2, 2, 2, 914, 915, 12, 3, 2, 2, 915, 916, 7, 91, 2, 2, 916, 918, 5, 76, 39, 2, 917, 914, 3, 2, 2, 2, 918, 921, 3, 2, 2, 2, 919, 917, 3, 2, 2, 2, 919, 920, 3, 2, 2, 2, 920, 79, 3, 2, 2, 2, 921, 919, 3, 2, 2, 2, 922, 923, 8, 41, 1, 2, 923, 924, 5, 78, 40, 2, 924, 930, 3, 2, 2, 2, 925, 926, 12, 3, 2, 2, 926, 927, 7, 93, 2, 2, 927, 929, 5, 78, 40, 2, 928, 925, 3, 2, 2, 2, 929, 932, 3, 2, 2, 2, 930, 928, 3, 2, 2, 2, 930, 931, 3, 2, 2, 2, 931, 81, 3, 2, 2, 2, 932, 930, 3, 2, 2, 2, 933, 934, 8, 42, 1, 2, 934, 935, 5, 80, 41, 2, 935, 941, 3, 2, 2, 2, 936, 937, 12, 3, 2, 2, 937, 938, 7, 113, 2, 2, 938, 940, 5, 80, 41, 2, 939, 936, 3, 2, 2, 2, 940, 943, 3, 2, 2, 2, 941, 939, 3, 2, 2, 2, 941, 942, 3, 2, 2, 2, 942, 83, 3, 2, 2, 2, 943, 941, 3, 2, 2, 2, 944, 945, 8, 43, 1, 2, 945, 946, 5, 82, 42, 2, 946, 952, 3, 2, 2, 2, 947, 948, 12, 3, 2, 2, 948, 949, 7, 114, 2, 2, 949, 951, 5, 82, 42, 2, 950, 947, 3, 2, 2, 2, 951, 954, 3, 2, 2, 2, 952, 950, 3, 2, 2, 2, 952, 953, 3, 2, 2, 2, 953, 85, 3, 2, 2, 2, 954, 952, 3, 2, 2, 2, 955, 963, 5, 84, 43, 2, 956, 957, 5, 84, 43, 2, 957, 958, 7, 120, 2, 2, 958, 959, 5, 92, 47, 2, 959, 960, 7, 121, 2, 2, 960, 961, 5, 88, 45, 2, 961, 963, 3, 2, 2, 2, 962, 955, 3, 2, 2, 2, 962, 956, 3, 2, 2, 2, 963, 87, 3, 2, 2, 2, 964, 971, 5, 86, 44, 2, 965, 966, 5, 84, 43, 2, 966, 967, 5, 90, 46, 2, 967, 968, 5, 286, 144, 2, 968, 971, 3, 2, 2, 2, 969, 971, 5, 382, 192, 2, 970, 964, 3, 2, 2, 2, 970, 965, 3, 2, 2, 2, 970, 969, 3, 2, 2, 2, 971, 89, 3, 2, 2, 2, 972, 984, 7, 96, 2, 2, 973, 984, 7, 101, 2, 2, 974, 984, 7, 102, 2, 2, 975, 984, 7, 103, 2, 2, 976, 984, 7, 99, 2, 2, 977, 984, 7, 100, 2, 2, 978, 984, 5, 394, 198, 2, 979, 984, 7, 108, 2, 2, 980, 984, 7, 105, 2, 2, 981, 984, 7, 104, 2, 2, 982, 984, 7, 106, 2, 2, 983, 972, 3, 2, 2, 2, 983, 973, 3, 2, 2, 2, 983, 974, 3, 2, 2, 2, 983, 975, 3, 2, 2, 2, 983, 976, 3, 2, 2, 2, 983, 977, 3, 2, 2, 2, 983, 978, 3, 2, 2, 2, 983, 979, 3, 2, 2, 2, 983, 980, 3, 2, 2, 2, 983, 981, 3, 2, 2, 2, 983, 982, 3, 2, 2, 2, 984, 91, 3, 2, 2, 2, 985, 986, 8, 47, 1, 2, 986, 987, 5, 88, 45, 2, 987, 993, 3, 2, 2, 2, 988, 989, 12, 3, 2, 2, 989, 990, 7, 117, 2, 2, 990, 992, 5, 88, 45, 2, 991, 988, 3, 2, 2, 2, 992, 995, 3, 2, 2, 2, 993, 991, 3, 2, 2, 2, 993, 994, 3, 2, 2, 2, 994, 93, 3, 2, 2, 2, 995, 993, 3, 2, 2, 2, 996, 997, 5, 86, 44, 2, 997, 95, 3, 2, 2, 2, 998, 1025, 5, 100, 51, 2, 999, 1001, 5, 214, 108, 2, 1000, 999, 3, 2, 2, 2, 1000, 1001, 3, 2, 2, 2, 1001, 1002, 3, 2, 2, 2, 1002, 1025, 5, 102, 52, 2, 1003, 1005, 5, 214, 108, 2, 1004, 1003, 3, 2, 2, 2, 1004, 1005, 3, 2, 2, 2, 1005, 1006, 3, 2, 2, 2, 1006, 1025, 5, 104, 53, 2, 1007, 1009, 5, 214, 108, 2, 1008, 1007, 3, 2, 2, 2, 1008, 1009, 3, 2, 2, 2, 1009, 1010, 3, 2, 2, 2, 1010, 1025, 5, 108, 55, 2, 1011, 1013, 5, 214, 108, 2, 1012, 1011, 3, 2, 2, 2, 1012, 1013, 3, 2, 2, 2, 1013, 1014, 3, 2, 2, 2, 1014, 1025, 5, 112, 57, 2, 1015, 1017, 5, 214, 108, 2, 1016, 1015, 3, 2, 2, 2, 1016, 1017, 3, 2, 2, 2, 1017, 1018, 3, 2, 2, 2, 1018, 1025, 5, 120, 61, 2, 1019, 1025, 5, 122, 62, 2, 1020, 1022, 5, 214, 108, 2, 1021, 1020, 3, 2, 2, 2, 1021, 1022, 3, 2, 2, 2, 1022, 1023, 3, 2, 2, 2, 1023, 1025, 5, 372, 187, 2, 1024, 998, 3, 2, 2, 2, 1024, 1000, 3, 2, 2, 2, 1024, 1004, 3, 2, 2, 2, 1024, 1008, 3, 2, 2, 2, 1024, 1012, 3, 2, 2, 2, 1024, 1016, 3, 2, 2, 2, 1024, 1019, 3, 2, 2, 2, 1024, 1021, 3, 2, 2, 2, 1025, 97, 3, 2, 2, 2, 1026, 1028, 5, 214, 108, 2, 1027, 1026, 3, 2, 2, 2, 1027, 1028, 3, 2, 2, 2, 1028, 1029, 3, 2, 2, 2, 1029, 1030, 7, 127, 2, 2, 1030, 1044, 7, 121, 2, 2, 1031, 1033, 5, 214, 108, 2, 1032, 1031, 3, 2, 2, 2, 1032, 1033, 3, 2, 2, 2, 1033, 1034, 3, 2, 2, 2, 1034, 1035, 7, 11, 2, 2, 1035, 1036, 5, 94, 48, 2, 1036, 1037, 7, 121, 2, 2, 1037, 1044, 3, 2, 2, 2, 1038, 1040, 5, 214, 108, 2, 1039, 1038, 3, 2, 2, 2, 1039, 1040, 3, 2, 2, 2, 1040, 1041, 3, 2, 2, 2, 1041, 1042, 7, 22, 2, 2, 1042, 1044, 7, 121, 2, 2, 1043, 1027, 3, 2, 2, 2, 1043, 1032, 3, 2, 2, 2, 1043, 1039, 3, 2, 2, 2, 1044, 99, 3, 2, 2, 2, 1045, 1046, 5, 98, 50, 2, 1046, 1047, 5, 96, 49, 2, 1047, 101, 3, 2, 2, 2, 1048, 1050, 5, 92, 47, 2, 1049, 1048, 3, 2, 2, 2, 1049, 1050, 3, 2, 2, 2, 1050, 1051, 3, 2, 2, 2, 1051, 1052, 7, 123, 2, 2, 1052, 103, 3, 2, 2, 2, 1053, 1055, 7, 84, 2, 2, 1054, 1056, 5, 106, 54, 2, 1055, 1054, 3, 2, 2, 2, 1055, 1056, 3, 2, 2, 2, 1056, 1057, 3, 2, 2, 2, 1057, 1058, 7, 85, 2, 2, 1058, 105, 3, 2, 2, 2, 1059, 1060, 8, 54, 1, 2, 1060, 1061, 5, 96, 49, 2, 1061, 1066, 3, 2, 2, 2, 1062, 1063, 12, 3, 2, 2, 1063, 1065, 5, 96, 49, 2, 1064, 1062, 3, 2, 2, 2, 1065, 1068, 3, 2, 2, 2, 1066, 1064, 3, 2, 2, 2, 1066, 1067, 3, 2, 2, 2, 1067, 107, 3, 2, 2, 2, 1068, 1066, 3, 2, 2, 2, 1069, 1070, 7, 38, 2, 2, 1070, 1071, 7, 80, 2, 2, 1071, 1072, 5, 110, 56, 2, 1072, 1073, 7, 81, 2, 2, 1073, 1074, 5, 96, 49, 2, 1074, 1090, 3, 2, 2, 2, 1075, 1076, 7, 38, 2, 2, 1076, 1077, 7, 80, 2, 2, 1077, 1078, 5, 110, 56, 2, 1078, 1079, 7, 81, 2, 2, 1079, 1080, 5, 96, 49, 2, 1080, 1081, 7, 27, 2, 2, 1081, 1082, 5, 96, 49, 2, 1082, 1090, 3, 2, 2, 2, 1083, 1084, 7, 62, 2, 2, 1084, 1085, 7, 80, 2, 2, 1085, 1086, 5, 110, 56, 2, 1086, 1087, 7, 81, 2, 2, 1087, 1088, 5, 96, 49, 2, 1088, 1090, 3, 2, 2, 2, 1089, 1069, 3, 2, 2, 2, 1089, 1075, 3, 2, 2, 2, 1089, 1083, 3, 2, 2, 2, 1090, 109, 3, 2, 2, 2, 1091, 1108, 5, 92, 47, 2, 1092, 1094, 5, 214, 108, 2, 1093, 1092, 3, 2, 2, 2, 1093, 1094, 3, 2, 2, 2, 1094, 1095, 3, 2, 2, 2, 1095, 1096, 5, 142, 72, 2, 1096, 1097, 5, 240, 121, 2, 1097, 1098, 7, 96, 2, 2, 1098, 1099, 5, 286, 144, 2, 1099, 1108, 3, 2, 2, 2, 1100, 1102, 5, 214, 108, 2, 1101, 1100, 3, 2, 2, 2, 1101, 1102, 3, 2, 2, 2, 1102, 1103, 3, 2, 2, 2, 1103, 1104, 5, 142, 72, 2, 1104, 1105, 5, 240, 121, 2, 1105, 1106, 5, 290, 146, 2, 1106, 1108, 3, 2, 2, 2, 1107, 1091, 3, 2, 2, 2, 1107, 1093, 3, 2, 2, 2, 1107, 1101, 3, 2, 2, 2, 1108, 111, 3, 2, 2, 2, 1109, 1110, 7, 79, 2, 2, 1110, 1111, 7, 80, 2, 2, 1111, 1112, 5, 110, 56, 2, 1112, 1113, 7, 81, 2, 2, 1113, 1114, 5, 96, 49, 2, 1114, 1145, 3, 2, 2, 2, 1115, 1116, 7, 24, 2, 2, 1116, 1117, 5, 96, 49, 2, 1117, 1118, 7, 79, 2, 2, 1118, 1119, 7, 80, 2, 2, 1119, 1120, 5, 110, 56, 2, 1120, 1121, 7, 81, 2, 2, 1121, 1122, 7, 123, 2, 2, 1122, 1145, 3, 2, 2, 2, 1123, 1124, 7, 35, 2, 2, 1124, 1125, 7, 80, 2, 2, 1125, 1127, 5, 114, 58, 2, 1126, 1128, 5, 110, 56, 2, 1127, 1126, 3, 2, 2, 2, 1127, 1128, 3, 2, 2, 2, 1128, 1129, 3, 2, 2, 2, 1129, 1131, 7, 123, 2, 2, 1130, 1132, 5, 92, 47, 2, 1131, 1130, 3, 2, 2, 2, 1131, 1132, 3, 2, 2, 2, 1132, 1133, 3, 2, 2, 2, 1133, 1134, 7, 81, 2, 2, 1134, 1135, 5, 96, 49, 2, 1135, 1145, 3, 2, 2, 2, 1136, 1137, 7, 35, 2, 2, 1137, 1138, 7, 80, 2, 2, 1138, 1139, 5, 116, 59, 2, 1139, 1140, 7, 121, 2, 2, 1140, 1141, 5, 118, 60, 2, 1141, 1142, 7, 81, 2, 2, 1142, 1143, 5, 96, 49, 2, 1143, 1145, 3, 2, 2, 2, 1144, 1109, 3, 2, 2, 2, 1144, 1115, 3, 2, 2, 2, 1144, 1123, 3, 2, 2, 2, 1144, 1136, 3, 2, 2, 2, 1145, 113, 3, 2, 2, 2, 1146, 1149, 5, 102, 52, 2, 1147, 1149, 5, 132, 67, 2, 1148, 1146, 3, 2, 2, 2, 1148, 1147, 3, 2, 2, 2, 1149, 115, 3, 2, 2, 2, 1150, 1152, 5, 214, 108, 2, 1151, 1150, 3, 2, 2, 2, 1151, 1152, 3, 2, 2, 2, 1152, 1153, 3, 2, 2, 2, 1153, 1154, 5, 142, 72, 2, 1154, 1155, 5, 240, 121, 2, 1155, 117, 3, 2, 2, 2, 1156, 1159, 5, 92, 47, 2, 1157, 1159, 5, 290, 146, 2, 1158, 1156, 3, 2, 2, 2, 1158, 1157, 3, 2, 2, 2, 1159, 119, 3, 2, 2, 2, 1160, 1161, 7, 10, 2, 2, 1161, 1177, 7, 123, 2, 2, 1162, 1163, 7, 20, 2, 2, 1163, 1177, 7, 123, 2, 2, 1164, 1166, 7, 54, 2, 2, 1165, 1167, 5, 92, 47, 2, 1166, 1165, 3, 2, 2, 2, 1166, 1167, 3, 2, 2, 2, 1167, 1168, 3, 2, 2, 2, 1168, 1177, 7, 123, 2, 2, 1169, 1170, 7, 54, 2, 2, 1170, 1171, 5, 290, 146, 2, 1171, 1172, 7, 123, 2, 2, 1172, 1177, 3, 2, 2, 2, 1173, 1174, 7, 37, 2, 2, 1174, 1175, 7, 127, 2, 2, 1175, 1177, 7, 123, 2, 2, 1176, 1160, 3, 2, 2, 2, 1176, 1162, 3, 2, 2, 2, 1176, 1164, 3, 2, 2, 2, 1176, 1169, 3, 2, 2, 2, 1176, 1173, 3, 2, 2, 2, 1177, 121, 3, 2, 2, 2, 1178, 1179, 5, 128, 65, 2, 1179, 123, 3, 2, 2, 2, 1180, 1181, 8, 63, 1, 2, 1181, 1182, 5, 126, 64, 2, 1182, 1187, 3, 2, 2, 2, 1183, 1184, 12, 3, 2, 2, 1184, 1186, 5, 126, 64, 2, 1185, 1183, 3, 2, 2, 2, 1186, 1189, 3, 2, 2, 2, 1187, 1185, 3, 2, 2, 2, 1187, 1188, 3, 2, 2, 2, 1188, 125, 3, 2, 2, 2, 1189, 1187, 3, 2, 2, 2, 1190, 1200, 5, 128, 65, 2, 1191, 1200, 5, 278, 140, 2, 1192, 1200, 5, 348, 175, 2, 1193, 1200, 5, 368, 185, 2, 1194, 1200, 5, 370, 186, 2, 1195, 1200, 5, 212, 107, 2, 1196, 1200, 5, 188, 95, 2, 1197, 1200, 5, 136, 69, 2, 1198, 1200, 5, 138, 70, 2, 1199, 1190, 3, 2, 2, 2, 1199, 1191, 3, 2, 2, 2, 1199, 1192, 3, 2, 2, 2, 1199, 1193, 3, 2, 2, 2, 1199, 1194, 3, 2, 2, 2, 1199, 1195, 3, 2, 2, 2, 1199, 1196, 3, 2, 2, 2, 1199, 1197, 3, 2, 2, 2, 1199, 1198, 3, 2, 2, 2, 1200, 127, 3, 2, 2, 2, 1201, 1210, 5, 132, 67, 2, 1202, 1210, 5, 210, 106, 2, 1203, 1210, 5, 202, 102, 2, 1204, 1210, 5, 206, 104, 2, 1205, 1210, 5, 208, 105, 2, 1206, 1210, 5, 134, 68, 2, 1207, 1210, 5, 130, 66, 2, 1208, 1210, 5, 172, 87, 2, 1209, 1201, 3, 2, 2, 2, 1209, 1202, 3, 2, 2, 2, 1209, 1203, 3, 2, 2, 2, 1209, 1204, 3, 2, 2, 2, 1209, 1205, 3, 2, 2, 2, 1209, 1206, 3, 2, 2, 2, 1209, 1207, 3, 2, 2, 2, 1209, 1208, 3, 2, 2, 2, 1210, 129, 3, 2, 2, 2, 1211, 1212, 7, 74, 2, 2, 1212, 1214, 7, 127, 2, 2, 1213, 1215, 5, 214, 108, 2, 1214, 1213, 3, 2, 2, 2, 1214, 1215, 3, 2, 2, 2, 1215, 1216, 3, 2, 2, 2, 1216, 1217, 7, 96, 2, 2, 1217, 1218, 5, 260, 131, 2, 1218, 1219, 7, 123, 2, 2, 1219, 131, 3, 2, 2, 2, 1220, 1222, 5, 142, 72, 2, 1221, 1220, 3, 2, 2, 2, 1221, 1222, 3, 2, 2, 2, 1222, 1224, 3, 2, 2, 2, 1223, 1225, 5, 236, 119, 2, 1224, 1223, 3, 2, 2, 2, 1224, 1225, 3, 2, 2, 2, 1225, 1226, 3, 2, 2, 2, 1226, 1235, 7, 123, 2, 2, 1227, 1229, 5, 214, 108, 2, 1228, 1230, 5, 142, 72, 2, 1229, 1228, 3, 2, 2, 2, 1229, 1230, 3, 2, 2, 2, 1230, 1231, 3, 2, 2, 2, 1231, 1232, 5, 236, 119, 2, 1232, 1233, 7, 123, 2, 2, 1233, 1235, 3, 2, 2, 2, 1234, 1221, 3, 2, 2, 2, 1234, 1227, 3, 2, 2, 2, 1235, 133, 3, 2, 2, 2, 1236, 1237, 7, 59, 2, 2, 1237, 1238, 7, 80, 2, 2, 1238, 1239, 5, 94, 48, 2, 1239, 1240, 7, 117, 2, 2, 1240, 1241, 7, 136, 2, 2, 1241, 1242, 7, 81, 2, 2, 1242, 1243, 7, 123, 2, 2, 1243, 135, 3, 2, 2, 2, 1244, 1245, 7, 123, 2, 2, 1245, 137, 3, 2, 2, 2, 1246, 1247, 5, 214, 108, 2, 1247, 1248, 7, 123, 2, 2, 1248, 139, 3, 2, 2, 2, 1249, 1256, 5, 144, 73, 2, 1250, 1256, 5, 150, 76, 2, 1251, 1256, 5, 146, 74, 2, 1252, 1256, 7, 36, 2, 2, 1253, 1256, 7, 69, 2, 2, 1254, 1256, 7, 18, 2, 2, 1255, 1249, 3, 2, 2, 2, 1255, 1250, 3, 2, 2, 2, 1255, 1251, 3, 2, 2, 2, 1255, 1252, 3, 2, 2, 2, 1255, 1253, 3, 2, 2, 2, 1255, 1254, 3, 2, 2, 2, 1256, 141, 3, 2, 2, 2, 1257, 1259, 5, 140, 71, 2, 1258, 1260, 5, 214, 108, 2, 1259, 1258, 3, 2, 2, 2, 1259, 1260, 3, 2, 2, 2, 1260, 1265, 3, 2, 2, 2, 1261, 1262, 5, 140, 71, 2, 1262, 1263, 5, 142, 72, 2, 1263, 1265, 3, 2, 2, 2, 1264, 1257, 3, 2, 2, 2, 1264, 1261, 3, 2, 2, 2, 1265, 143, 3, 2, 2, 2, 1266, 1267, 9, 4, 2, 2, 1267, 145, 3, 2, 2, 2, 1268, 1269, 9, 5, 2, 2, 1269, 147, 3, 2, 2, 2, 1270, 1271, 7, 127, 2, 2, 1271, 149, 3, 2, 2, 2, 1272, 1276, 5, 152, 77, 2, 1273, 1276, 5, 294, 148, 2, 1274, 1276, 5, 168, 85, 2, 1275, 1272, 3, 2, 2, 2, 1275, 1273, 3, 2, 2, 2, 1275, 1274, 3, 2, 2, 2, 1276, 151, 3, 2, 2, 2, 1277, 1282, 5, 158, 80, 2, 1278, 1282, 5, 164, 83, 2, 1279, 1282, 5, 366, 184, 2, 1280, 1282, 5, 254, 128, 2, 1281, 1277, 3, 2, 2, 2, 1281, 1278, 3, 2, 2, 2, 1281, 1279, 3, 2, 2, 2, 1281, 1280, 3, 2, 2, 2, 1282, 153, 3, 2, 2, 2, 1283, 1285, 5, 150, 76, 2, 1284, 1286, 5, 214, 108, 2, 1285, 1284, 3, 2, 2, 2, 1285, 1286, 3, 2, 2, 2, 1286, 1291, 3, 2, 2, 2, 1287, 1288, 5, 150, 76, 2, 1288, 1289, 5, 154, 78, 2, 1289, 1291, 3, 2, 2, 2, 1290, 1283, 3, 2, 2, 2, 1290, 1287, 3, 2, 2, 2, 1291, 155, 3, 2, 2, 2, 1292, 1294, 5, 152, 77, 2, 1293, 1295, 5, 214, 108, 2, 1294, 1293, 3, 2, 2, 2, 1294, 1295, 3, 2, 2, 2, 1295, 1300, 3, 2, 2, 2, 1296, 1297, 5, 152, 77, 2, 1297, 1298, 5, 156, 79, 2, 1298, 1300, 3, 2, 2, 2, 1299, 1292, 3, 2, 2, 2, 1299, 1296, 3, 2, 2, 2, 1300, 157, 3, 2, 2, 2, 1301, 1303, 5, 12, 7, 2, 1302, 1301, 3, 2, 2, 2, 1302, 1303, 3, 2, 2, 2, 1303, 1304, 3, 2, 2, 2, 1304, 1325, 5, 160, 81, 2, 1305, 1306, 5, 12, 7, 2, 1306, 1307, 7, 63, 2, 2, 1307, 1308, 5, 356, 179, 2, 1308, 1325, 3, 2, 2, 2, 1309, 1325, 7, 13, 2, 2, 1310, 1325, 7, 14, 2, 2, 1311, 1325, 7, 15, 2, 2, 1312, 1325, 7, 78, 2, 2, 1313, 1325, 7, 9, 2, 2, 1314, 1325, 7, 55, 2, 2, 1315, 1325, 7, 40, 2, 2, 1316, 1325, 7, 41, 2, 2, 1317, 1325, 7, 56, 2, 2, 1318, 1325, 7, 73, 2, 2, 1319, 1325, 7, 34, 2, 2, 1320, 1325, 7, 25, 2, 2, 1321, 1325, 7, 76, 2, 2, 1322, 1325, 7, 8, 2, 2, 1323, 1325, 5, 162, 82, 2, 1324, 1302, 3, 2, 2, 2, 1324, 1305, 3, 2, 2, 2, 1324, 1309, 3, 2, 2, 2, 1324, 1310, 3, 2, 2, 2, 1324, 1311, 3, 2, 2, 2, 1324, 1312, 3, 2, 2, 2, 1324, 1313, 3, 2, 2, 2, 1324, 1314, 3, 2, 2, 2, 1324, 1315, 3, 2, 2, 2, 1324, 1316, 3, 2, 2, 2, 1324, 1317, 3, 2, 2, 2, 1324, 1318, 3, 2, 2, 2, 1324, 1319, 3, 2, 2, 2, 1324, 1320, 3, 2, 2, 2, 1324, 1321, 3, 2, 2, 2, 1324, 1322, 3, 2, 2, 2, 1324, 1323, 3, 2, 2, 2, 1325, 159, 3, 2, 2, 2, 1326, 1331, 5, 292, 147, 2, 1327, 1331, 5, 166, 84, 2, 1328, 1331, 5, 148, 75, 2, 1329, 1331, 5, 356, 179, 2, 1330, 1326, 3, 2, 2, 2, 1330, 1327, 3, 2, 2, 2, 1330, 1328, 3, 2, 2, 2, 1330, 1329, 3, 2, 2, 2, 1331, 161, 3, 2, 2, 2, 1332, 1333, 7, 21, 2, 2, 1333, 1334, 7, 80, 2, 2, 1334, 1335, 5, 92, 47, 2, 1335, 1336, 7, 81, 2, 2, 1336, 1342, 3, 2, 2, 2, 1337, 1338, 7, 21, 2, 2, 1338, 1339, 7, 80, 2, 2, 1339, 1340, 7, 8, 2, 2, 1340, 1342, 7, 81, 2, 2, 1341, 1332, 3, 2, 2, 2, 1341, 1337, 3, 2, 2, 2, 1342, 163, 3, 2, 2, 2, 1343, 1345, 5, 302, 152, 2, 1344, 1346, 5, 214, 108, 2, 1345, 1344, 3, 2, 2, 2, 1345, 1346, 3, 2, 2, 2, 1346, 1348, 3, 2, 2, 2, 1347, 1349, 5, 12, 7, 2, 1348, 1347, 3, 2, 2, 2, 1348, 1349, 3, 2, 2, 2, 1349, 1350, 3, 2, 2, 2, 1350, 1351, 7, 127, 2, 2, 1351, 1368, 3, 2, 2, 2, 1352, 1353, 5, 302, 152, 2, 1353, 1354, 5, 356, 179, 2, 1354, 1368, 3, 2, 2, 2, 1355, 1356, 5, 302, 152, 2, 1356, 1358, 5, 12, 7, 2, 1357, 1359, 7, 63, 2, 2, 1358, 1357, 3, 2, 2, 2, 1358, 1359, 3, 2, 2, 2, 1359, 1360, 3, 2, 2, 2, 1360, 1361, 5, 356, 179, 2, 1361, 1368, 3, 2, 2, 2, 1362, 1364, 7, 28, 2, 2, 1363, 1365, 5, 12, 7, 2, 1364, 1363, 3, 2, 2, 2, 1364, 1365, 3, 2, 2, 2, 1365, 1366, 3, 2, 2, 2, 1366, 1368, 7, 127, 2, 2, 1367, 1343, 3, 2, 2, 2, 1367, 1352, 3, 2, 2, 2, 1367, 1355, 3, 2, 2, 2, 1367, 1362, 3, 2, 2, 2, 1368, 165, 3, 2, 2, 2, 1369, 1370, 7, 127, 2, 2, 1370, 167, 3, 2, 2, 2, 1371, 1372, 5, 170, 86, 2, 1372, 1374, 7, 84, 2, 2, 1373, 1375, 5, 178, 90, 2, 1374, 1373, 3, 2, 2, 2, 1374, 1375, 3, 2, 2, 2, 1375, 1376, 3, 2, 2, 2, 1376, 1377, 7, 85, 2, 2, 1377, 1385, 3, 2, 2, 2, 1378, 1379, 5, 170, 86, 2, 1379, 1380, 7, 84, 2, 2, 1380, 1381, 5, 178, 90, 2, 1381, 1382, 7, 117, 2, 2, 1382, 1383, 7, 85, 2, 2, 1383, 1385, 3, 2, 2, 2, 1384, 1371, 3, 2, 2, 2, 1384, 1378, 3, 2, 2, 2, 1385, 169, 3, 2, 2, 2, 1386, 1388, 5, 174, 88, 2, 1387, 1389, 5, 214, 108, 2, 1388, 1387, 3, 2, 2, 2, 1388, 1389, 3, 2, 2, 2, 1389, 1391, 3, 2, 2, 2, 1390, 1392, 7, 127, 2, 2, 1391, 1390, 3, 2, 2, 2, 1391, 1392, 3, 2, 2, 2, 1392, 1394, 3, 2, 2, 2, 1393, 1395, 5, 176, 89, 2, 1394, 1393, 3, 2, 2, 2, 1394, 1395, 3, 2, 2, 2, 1395, 1406, 3, 2, 2, 2, 1396, 1398, 5, 174, 88, 2, 1397, 1399, 5, 214, 108, 2, 1398, 1397, 3, 2, 2, 2, 1398, 1399, 3, 2, 2, 2, 1399, 1400, 3, 2, 2, 2, 1400, 1401, 5, 12, 7, 2, 1401, 1403, 7, 127, 2, 2, 1402, 1404, 5, 176, 89, 2, 1403, 1402, 3, 2, 2, 2, 1403, 1404, 3, 2, 2, 2, 1404, 1406, 3, 2, 2, 2, 1405, 1386, 3, 2, 2, 2, 1405, 1396, 3, 2, 2, 2, 1406, 171, 3, 2, 2, 2, 1407, 1409, 5, 174, 88, 2, 1408, 1410, 5, 214, 108, 2, 1409, 1408, 3, 2, 2, 2, 1409, 1410, 3, 2, 2, 2, 1410, 1411, 3, 2, 2, 2, 1411, 1413, 7, 127, 2, 2, 1412, 1414, 5, 176, 89, 2, 1413, 1412, 3, 2, 2, 2, 1413, 1414, 3, 2, 2, 2, 1414, 1415, 3, 2, 2, 2, 1415, 1416, 7, 123, 2, 2, 1416, 173, 3, 2, 2, 2, 1417, 1423, 7, 28, 2, 2, 1418, 1419, 7, 28, 2, 2, 1419, 1423, 7, 16, 2, 2, 1420, 1421, 7, 28, 2, 2, 1421, 1423, 7, 61, 2, 2, 1422, 1417, 3, 2, 2, 2, 1422, 1418, 3, 2, 2, 2, 1422, 1420, 3, 2, 2, 2, 1423, 175, 3, 2, 2, 2, 1424, 1425, 7, 121, 2, 2, 1425, 1426, 5, 154, 78, 2, 1426, 177, 3, 2, 2, 2, 1427, 1428, 8, 90, 1, 2, 1428, 1429, 5, 180, 91, 2, 1429, 1435, 3, 2, 2, 2, 1430, 1431, 12, 3, 2, 2, 1431, 1432, 7, 117, 2, 2, 1432, 1434, 5, 180, 91, 2, 1433, 1430, 3, 2, 2, 2, 1434, 1437, 3, 2, 2, 2, 1435, 1433, 3, 2, 2, 2, 1435, 1436, 3, 2, 2, 2, 1436, 179, 3, 2, 2, 2, 1437, 1435, 3, 2, 2, 2, 1438, 1444, 5, 182, 92, 2, 1439, 1440, 5, 182, 92, 2, 1440, 1441, 7, 96, 2, 2, 1441, 1442, 5, 94, 48, 2, 1442, 1444, 3, 2, 2, 2, 1443, 1438, 3, 2, 2, 2, 1443, 1439, 3, 2, 2, 2, 1444, 181, 3, 2, 2, 2, 1445, 1446, 7, 127, 2, 2, 1446, 183, 3, 2, 2, 2, 1447, 1450, 5, 186, 94, 2, 1448, 1450, 5, 200, 101, 2, 1449, 1447, 3, 2, 2, 2, 1449, 1448, 3, 2, 2, 2, 1450, 185, 3, 2, 2, 2, 1451, 1452, 7, 127, 2, 2, 1452, 187, 3, 2, 2, 2, 1453, 1456, 5, 190, 96, 2, 1454, 1456, 5, 196, 99, 2, 1455, 1453, 3, 2, 2, 2, 1455, 1454, 3, 2, 2, 2, 1456, 189, 3, 2, 2, 2, 1457, 1460, 5, 192, 97, 2, 1458, 1460, 5, 194, 98, 2, 1459, 1457, 3, 2, 2, 2, 1459, 1458, 3, 2, 2, 2, 1460, 191, 3, 2, 2, 2, 1461, 1463, 7, 39, 2, 2, 1462, 1461, 3, 2, 2, 2, 1462, 1463, 3, 2, 2, 2, 1463, 1464, 3, 2, 2, 2, 1464, 1465, 7, 43, 2, 2, 1465, 1466, 7, 127, 2, 2, 1466, 1467, 7, 84, 2, 2, 1467, 1468, 5, 198, 100, 2, 1468, 1469, 7, 85, 2, 2, 1469, 193, 3, 2, 2, 2, 1470, 1472, 7, 39, 2, 2, 1471, 1470, 3, 2, 2, 2, 1471, 1472, 3, 2, 2, 2, 1472, 1473, 3, 2, 2, 2, 1473, 1474, 7, 43, 2, 2, 1474, 1475, 5, 186, 94, 2, 1475, 1476, 7, 84, 2, 2, 1476, 1477, 5, 198, 100, 2, 1477, 1478, 7, 85, 2, 2, 1478, 195, 3, 2, 2, 2, 1479, 1481, 7, 39, 2, 2, 1480, 1479, 3, 2, 2, 2, 1480, 1481, 3, 2, 2, 2, 1481, 1482, 3, 2, 2, 2, 1482, 1483, 7, 43, 2, 2, 1483, 1484, 7, 84, 2, 2, 1484, 1485, 5, 198, 100, 2, 1485, 1486, 7, 85, 2, 2, 1486, 197, 3, 2, 2, 2, 1487, 1489, 5, 124, 63, 2, 1488, 1487, 3, 2, 2, 2, 1488, 1489, 3, 2, 2, 2, 1489, 199, 3, 2, 2, 2, 1490, 1491, 7, 127, 2, 2, 1491, 201, 3, 2, 2, 2, 1492, 1493, 7, 43, 2, 2, 1493, 1494, 7, 127, 2, 2, 1494, 1495, 7, 96, 2, 2, 1495, 1496, 5, 204, 103, 2, 1496, 1497, 7, 123, 2, 2, 1497, 203, 3, 2, 2, 2, 1498, 1500, 5, 12, 7, 2, 1499, 1498, 3, 2, 2, 2, 1499, 1500, 3, 2, 2, 2, 1500, 1501, 3, 2, 2, 2, 1501, 1502, 5, 184, 93, 2, 1502, 205, 3, 2, 2, 2, 1503, 1505, 7, 74, 2, 2, 1504, 1506, 7, 71, 2, 2, 1505, 1504, 3, 2, 2, 2, 1505, 1506, 3, 2, 2, 2, 1506, 1507, 3, 2, 2, 2, 1507, 1508, 5, 12, 7, 2, 1508, 1509, 5, 8, 5, 2, 1509, 1510, 7, 123, 2, 2, 1510, 1517, 3, 2, 2, 2, 1511, 1512, 7, 74, 2, 2, 1512, 1513, 7, 122, 2, 2, 1513, 1514, 5, 8, 5, 2, 1514, 1515, 7, 123, 2, 2, 1515, 1517, 3, 2, 2, 2, 1516, 1503, 3, 2, 2, 2, 1516, 1511, 3, 2, 2, 2, 1517, 207, 3, 2, 2, 2, 1518, 1520, 5, 214, 108, 2, 1519, 1518, 3, 2, 2, 2, 1519, 1520, 3, 2, 2, 2, 1520, 1521, 3, 2, 2, 2, 1521, 1522, 7, 74, 2, 2, 1522, 1524, 7, 43, 2, 2, 1523, 1525, 5, 12, 7, 2, 1524, 1523, 3, 2, 2, 2, 1524, 1525, 3, 2, 2, 2, 1525, 1526, 3, 2, 2, 2, 1526, 1527, 5, 184, 93, 2, 1527, 1528, 7, 123, 2, 2, 1528, 209, 3, 2, 2, 2, 1529, 1530, 7, 7, 2, 2, 1530, 1531, 7, 80, 2, 2, 1531, 1532, 7, 136, 2, 2, 1532, 1533, 7, 81, 2, 2, 1533, 1534, 7, 123, 2, 2, 1534, 211, 3, 2, 2, 2, 1535, 1536, 7, 31, 2, 2, 1536, 1537, 7, 136, 2, 2, 1537, 1539, 7, 84, 2, 2, 1538, 1540, 5, 124, 63, 2, 1539, 1538, 3, 2, 2, 2, 1539, 1540, 3, 2, 2, 2, 1540, 1541, 3, 2, 2, 2, 1541, 1546, 7, 85, 2, 2, 1542, 1543, 7, 31, 2, 2, 1543, 1544, 7, 136, 2, 2, 1544, 1546, 5, 126, 64, 2, 1545, 1535, 3, 2, 2, 2, 1545, 1542, 3, 2, 2, 2, 1546, 213, 3, 2, 2, 2, 1547, 1548, 8, 108, 1, 2, 1548, 1549, 5, 216, 109, 2, 1549, 1554, 3, 2, 2, 2, 1550, 1551, 12, 3, 2, 2, 1551, 1553, 5, 216, 109, 2, 1552, 1550, 3, 2, 2, 2, 1553, 1556, 3, 2, 2, 2, 1554, 1552, 3, 2, 2, 2, 1554, 1555, 3, 2, 2, 2, 1555, 215, 3, 2, 2, 2, 1556, 1554, 3, 2, 2, 2, 1557, 1558, 7, 82, 2, 2, 1558, 1559, 7, 82, 2, 2, 1559, 1560, 5, 220, 111, 2, 1560, 1561, 7, 83, 2, 2, 1561, 1562, 7, 83, 2, 2, 1562, 1565, 3, 2, 2, 2, 1563, 1565, 5, 218, 110, 2, 1564, 1557, 3, 2, 2, 2, 1564, 1563, 3, 2, 2, 2, 1565, 217, 3, 2, 2, 2, 1566, 1567, 7, 5, 2, 2, 1567, 1568, 7, 80, 2, 2, 1568, 1570, 5, 260, 131, 2, 1569, 1571, 7, 126, 2, 2, 1570, 1569, 3, 2, 2, 2, 1570, 1571, 3, 2, 2, 2, 1571, 1572, 3, 2, 2, 2, 1572, 1573, 7, 81, 2, 2, 1573, 1583, 3, 2, 2, 2, 1574, 1575, 7, 5, 2, 2, 1575, 1576, 7, 80, 2, 2, 1576, 1578, 5, 94, 48, 2, 1577, 1579, 7, 126, 2, 2, 1578, 1577, 3, 2, 2, 2, 1578, 1579, 3, 2, 2, 2, 1579, 1580, 3, 2, 2, 2, 1580, 1581, 7, 81, 2, 2, 1581, 1583, 3, 2, 2, 2, 1582, 1566, 3, 2, 2, 2, 1582, 1574, 3, 2, 2, 2, 1583, 219, 3, 2, 2, 2, 1584, 1586, 8, 111, 1, 2, 1585, 1587, 5, 222, 112, 2, 1586, 1585, 3, 2, 2, 2, 1586, 1587, 3, 2, 2, 2, 1587, 1592, 3, 2, 2, 2, 1588, 1589, 5, 222, 112, 2, 1589, 1590, 7, 126, 2, 2, 1590, 1592, 3, 2, 2, 2, 1591, 1584, 3, 2, 2, 2, 1591, 1588, 3, 2, 2, 2, 1592, 1605, 3, 2, 2, 2, 1593, 1594, 12, 5, 2, 2, 1594, 1596, 7, 117, 2, 2, 1595, 1597, 5, 222, 112, 2, 1596, 1595, 3, 2, 2, 2, 1596, 1597, 3, 2, 2, 2, 1597, 1604, 3, 2, 2, 2, 1598, 1599, 12, 3, 2, 2, 1599, 1600, 7, 117, 2, 2, 1600, 1601, 5, 222, 112, 2, 1601, 1602, 7, 126, 2, 2, 1602, 1604, 3, 2, 2, 2, 1603, 1593, 3, 2, 2, 2, 1603, 1598, 3, 2, 2, 2, 1604, 1607, 3, 2, 2, 2, 1605, 1603, 3, 2, 2, 2, 1605, 1606, 3, 2, 2, 2, 1606, 221, 3, 2, 2, 2, 1607, 1605, 3, 2, 2, 2, 1608, 1610, 5, 224, 113, 2, 1609, 1611, 5, 230, 116, 2, 1610, 1609, 3, 2, 2, 2, 1610, 1611, 3, 2, 2, 2, 1611, 223, 3, 2, 2, 2, 1612, 1615, 7, 127, 2, 2, 1613, 1615, 5, 226, 114, 2, 1614, 1612, 3, 2, 2, 2, 1614, 1613, 3, 2, 2, 2, 1615, 225, 3, 2, 2, 2, 1616, 1617, 5, 228, 115, 2, 1617, 1618, 7, 122, 2, 2, 1618, 1619, 7, 127, 2, 2, 1619, 227, 3, 2, 2, 2, 1620, 1621, 7, 127, 2, 2, 1621, 229, 3, 2, 2, 2, 1622, 1623, 7, 80, 2, 2, 1623, 1624, 5, 232, 117, 2, 1624, 1625, 7, 81, 2, 2, 1625, 231, 3, 2, 2, 2, 1626, 1628, 8, 117, 1, 2, 1627, 1629, 5, 234, 118, 2, 1628, 1627, 3, 2, 2, 2, 1628, 1629, 3, 2, 2, 2, 1629, 1634, 3, 2, 2, 2, 1630, 1631, 12, 3, 2, 2, 1631, 1633, 5, 234, 118, 2, 1632, 1630, 3, 2, 2, 2, 1633, 1636, 3, 2, 2, 2, 1634, 1632, 3, 2, 2, 2, 1634, 1635, 3, 2, 2, 2, 1635, 233, 3, 2, 2, 2, 1636, 1634, 3, 2, 2, 2, 1637, 1638, 7, 80, 2, 2, 1638, 1639, 5, 232, 117, 2, 1639, 1640, 7, 81, 2, 2, 1640, 1650, 3, 2, 2, 2, 1641, 1642, 7, 82, 2, 2, 1642, 1643, 5, 232, 117, 2, 1643, 1644, 7, 83, 2, 2, 1644, 1650, 3, 2, 2, 2, 1645, 1646, 7, 84, 2, 2, 1646, 1647, 5, 232, 117, 2, 1647, 1648, 7, 85, 2, 2, 1648, 1650, 3, 2, 2, 2, 1649, 1637, 3, 2, 2, 2, 1649, 1641, 3, 2, 2, 2, 1649, 1645, 3, 2, 2, 2, 1650, 235, 3, 2, 2, 2, 1651, 1652, 8, 119, 1, 2, 1652, 1653, 5, 238, 120, 2, 1653, 1659, 3, 2, 2, 2, 1654, 1655, 12, 3, 2, 2, 1655, 1656, 7, 117, 2, 2, 1656, 1658, 5, 238, 120, 2, 1657, 1654, 3, 2, 2, 2, 1658, 1661, 3, 2, 2, 2, 1659, 1657, 3, 2, 2, 2, 1659, 1660, 3, 2, 2, 2, 1660, 237, 3, 2, 2, 2, 1661, 1659, 3, 2, 2, 2, 1662, 1664, 5, 240, 121, 2, 1663, 1665, 5, 282, 142, 2, 1664, 1663, 3, 2, 2, 2, 1664, 1665, 3, 2, 2, 2, 1665, 239, 3, 2, 2, 2, 1666, 1672, 5, 242, 122, 2, 1667, 1668, 5, 244, 123, 2, 1668, 1669, 5, 246, 124, 2, 1669, 1670, 5, 248, 125, 2, 1670, 1672, 3, 2, 2, 2, 1671, 1666, 3, 2, 2, 2, 1671, 1667, 3, 2, 2, 2, 1672, 241, 3, 2, 2, 2, 1673, 1678, 5, 244, 123, 2, 1674, 1675, 5, 250, 126, 2, 1675, 1676, 5, 242, 122, 2, 1676, 1678, 3, 2, 2, 2, 1677, 1673, 3, 2, 2, 2, 1677, 1674, 3, 2, 2, 2, 1678, 243, 3, 2, 2, 2, 1679, 1680, 8, 123, 1, 2, 1680, 1682, 5, 258, 130, 2, 1681, 1683, 5, 214, 108, 2, 1682, 1681, 3, 2, 2, 2, 1682, 1683, 3, 2, 2, 2, 1683, 1689, 3, 2, 2, 2, 1684, 1685, 7, 80, 2, 2, 1685, 1686, 5, 242, 122, 2, 1686, 1687, 7, 81, 2, 2, 1687, 1689, 3, 2, 2, 2, 1688, 1679, 3, 2, 2, 2, 1688, 1684, 3, 2, 2, 2, 1689, 1703, 3, 2, 2, 2, 1690, 1691, 12, 5, 2, 2, 1691, 1702, 5, 246, 124, 2, 1692, 1693, 12, 4, 2, 2, 1693, 1695, 7, 82, 2, 2, 1694, 1696, 5, 94, 48, 2, 1695, 1694, 3, 2, 2, 2, 1695, 1696, 3, 2, 2, 2, 1696, 1697, 3, 2, 2, 2, 1697, 1699, 7, 83, 2, 2, 1698, 1700, 5, 214, 108, 2, 1699, 1698, 3, 2, 2, 2, 1699, 1700, 3, 2, 2, 2, 1700, 1702, 3, 2, 2, 2, 1701, 1690, 3, 2, 2, 2, 1701, 1692, 3, 2, 2, 2, 1702, 1705, 3, 2, 2, 2, 1703, 1701, 3, 2, 2, 2, 1703, 1704, 3, 2, 2, 2, 1704, 245, 3, 2, 2, 2, 1705, 1703, 3, 2, 2, 2, 1706, 1707, 7, 80, 2, 2, 1707, 1708, 5, 272, 137, 2, 1708, 1710, 7, 81, 2, 2, 1709, 1711, 5, 252, 127, 2, 1710, 1709, 3, 2, 2, 2, 1710, 1711, 3, 2, 2, 2, 1711, 1713, 3, 2, 2, 2, 1712, 1714, 5, 256, 129, 2, 1713, 1712, 3, 2, 2, 2, 1713, 1714, 3, 2, 2, 2, 1714, 1716, 3, 2, 2, 2, 1715, 1717, 5, 384, 193, 2, 1716, 1715, 3, 2, 2, 2, 1716, 1717, 3, 2, 2, 2, 1717, 1719, 3, 2, 2, 2, 1718, 1720, 5, 214, 108, 2, 1719, 1718, 3, 2, 2, 2, 1719, 1720, 3, 2, 2, 2, 1720, 247, 3, 2, 2, 2, 1721, 1722, 7, 119, 2, 2, 1722, 1724, 5, 156, 79, 2, 1723, 1725, 5, 262, 132, 2, 1724, 1723, 3, 2, 2, 2, 1724, 1725, 3, 2, 2, 2, 1725, 249, 3, 2, 2, 2, 1726, 1728, 7, 88, 2, 2, 1727, 1729, 5, 214, 108, 2, 1728, 1727, 3, 2, 2, 2, 1728, 1729, 3, 2, 2, 2, 1729, 1731, 3, 2, 2, 2, 1730, 1732, 5, 252, 127, 2, 1731, 1730, 3, 2, 2, 2, 1731, 1732, 3, 2, 2, 2, 1732, 1750, 3, 2, 2, 2, 1733, 1735, 7, 92, 2, 2, 1734, 1736, 5, 214, 108, 2, 1735, 1734, 3, 2, 2, 2, 1735, 1736, 3, 2, 2, 2, 1736, 1750, 3, 2, 2, 2, 1737, 1739, 7, 113, 2, 2, 1738, 1740, 5, 214, 108, 2, 1739, 1738, 3, 2, 2, 2, 1739, 1740, 3, 2, 2, 2, 1740, 1750, 3, 2, 2, 2, 1741, 1742, 5, 12, 7, 2, 1742, 1744, 7, 88, 2, 2, 1743, 1745, 5, 214, 108, 2, 1744, 1743, 3, 2, 2, 2, 1744, 1745, 3, 2, 2, 2, 1745, 1747, 3, 2, 2, 2, 1746, 1748, 5, 252, 127, 2, 1747, 1746, 3, 2, 2, 2, 1747, 1748, 3, 2, 2, 2, 1748, 1750, 3, 2, 2, 2, 1749, 1726, 3, 2, 2, 2, 1749, 1733, 3, 2, 2, 2, 1749, 1737, 3, 2, 2, 2, 1749, 1741, 3, 2, 2, 2, 1750, 251, 3, 2, 2, 2, 1751, 1753, 5, 254, 128, 2, 1752, 1754, 5, 252, 127, 2, 1753, 1752, 3, 2, 2, 2, 1753, 1754, 3, 2, 2, 2, 1754, 253, 3, 2, 2, 2, 1755, 1756, 9, 6, 2, 2, 1756, 255, 3, 2, 2, 2, 1757, 1758, 9, 7, 2, 2, 1758, 257, 3, 2, 2, 2, 1759, 1761, 7, 126, 2, 2, 1760, 1759, 3, 2, 2, 2, 1760, 1761, 3, 2, 2, 2, 1761, 1762, 3, 2, 2, 2, 1762, 1763, 5, 6, 4, 2, 1763, 259, 3, 2, 2, 2, 1764, 1766, 5, 154, 78, 2, 1765, 1767, 5, 262, 132, 2, 1766, 1765, 3, 2, 2, 2, 1766, 1767, 3, 2, 2, 2, 1767, 261, 3, 2, 2, 2, 1768, 1777, 5, 264, 133, 2, 1769, 1771, 5, 266, 134, 2, 1770, 1769, 3, 2, 2, 2, 1770, 1771, 3, 2, 2, 2, 1771, 1772, 3, 2, 2, 2, 1772, 1773, 5, 246, 124, 2, 1773, 1774, 5, 248, 125, 2, 1774, 1777, 3, 2, 2, 2, 1775, 1777, 5, 268, 135, 2, 1776, 1768, 3, 2, 2, 2, 1776, 1770, 3, 2, 2, 2, 1776, 1775, 3, 2, 2, 2, 1777, 263, 3, 2, 2, 2, 1778, 1784, 5, 266, 134, 2, 1779, 1781, 5, 250, 126, 2, 1780, 1782, 5, 264, 133, 2, 1781, 1780, 3, 2, 2, 2, 1781, 1782, 3, 2, 2, 2, 1782, 1784, 3, 2, 2, 2, 1783, 1778, 3, 2, 2, 2, 1783, 1779, 3, 2, 2, 2, 1784, 265, 3, 2, 2, 2, 1785, 1786, 8, 134, 1, 2, 1786, 1800, 5, 246, 124, 2, 1787, 1789, 7, 82, 2, 2, 1788, 1790, 5, 94, 48, 2, 1789, 1788, 3, 2, 2, 2, 1789, 1790, 3, 2, 2, 2, 1790, 1791, 3, 2, 2, 2, 1791, 1793, 7, 83, 2, 2, 1792, 1794, 5, 214, 108, 2, 1793, 1792, 3, 2, 2, 2, 1793, 1794, 3, 2, 2, 2, 1794, 1800, 3, 2, 2, 2, 1795, 1796, 7, 80, 2, 2, 1796, 1797, 5, 264, 133, 2, 1797, 1798, 7, 81, 2, 2, 1798, 1800, 3, 2, 2, 2, 1799, 1785, 3, 2, 2, 2, 1799, 1787, 3, 2, 2, 2, 1799, 1795, 3, 2, 2, 2, 1800, 1814, 3, 2, 2, 2, 1801, 1802, 12, 7, 2, 2, 1802, 1813, 5, 246, 124, 2, 1803, 1804, 12, 5, 2, 2, 1804, 1806, 7, 82, 2, 2, 1805, 1807, 5, 94, 48, 2, 1806, 1805, 3, 2, 2, 2, 1806, 1807, 3, 2, 2, 2, 1807, 1808, 3, 2, 2, 2, 1808, 1810, 7, 83, 2, 2, 1809, 1811, 5, 214, 108, 2, 1810, 1809, 3, 2, 2, 2, 1810, 1811, 3, 2, 2, 2, 1811, 1813, 3, 2, 2, 2, 1812, 1801, 3, 2, 2, 2, 1812, 1803, 3, 2, 2, 2, 1813, 1816, 3, 2, 2, 2, 1814, 1812, 3, 2, 2, 2, 1814, 1815, 3, 2, 2, 2, 1815, 267, 3, 2, 2, 2, 1816, 1814, 3, 2, 2, 2, 1817, 1822, 5, 270, 136, 2, 1818, 1819, 5, 250, 126, 2, 1819, 1820, 5, 268, 135, 2, 1820, 1822, 3, 2, 2, 2, 1821, 1817, 3, 2, 2, 2, 1821, 1818, 3, 2, 2, 2, 1822, 269, 3, 2, 2, 2, 1823, 1824, 8, 136, 1, 2, 1824, 1825, 7, 126, 2, 2, 1825, 1839, 3, 2, 2, 2, 1826, 1827, 12, 5, 2, 2, 1827, 1838, 5, 246, 124, 2, 1828, 1829, 12, 4, 2, 2, 1829, 1831, 7, 82, 2, 2, 1830, 1832, 5, 94, 48, 2, 1831, 1830, 3, 2, 2, 2, 1831, 1832, 3, 2, 2, 2, 1832, 1833, 3, 2, 2, 2, 1833, 1835, 7, 83, 2, 2, 1834, 1836, 5, 214, 108, 2, 1835, 1834, 3, 2, 2, 2, 1835, 1836, 3, 2, 2, 2, 1836, 1838, 3, 2, 2, 2, 1837, 1826, 3, 2, 2, 2, 1837, 1828, 3, 2, 2, 2, 1838, 1841, 3, 2, 2, 2, 1839, 1837, 3, 2, 2, 2, 1839, 1840, 3, 2, 2, 2, 1840, 271, 3, 2, 2, 2, 1841, 1839, 3, 2, 2, 2, 1842, 1844, 5, 274, 138, 2, 1843, 1842, 3, 2, 2, 2, 1843, 1844, 3, 2, 2, 2, 1844, 1846, 3, 2, 2, 2, 1845, 1847, 7, 126, 2, 2, 1846, 1845, 3, 2, 2, 2, 1846, 1847, 3, 2, 2, 2, 1847, 1853, 3, 2, 2, 2, 1848, 1849, 5, 274, 138, 2, 1849, 1850, 7, 117, 2, 2, 1850, 1851, 7, 126, 2, 2, 1851, 1853, 3, 2, 2, 2, 1852, 1843, 3, 2, 2, 2, 1852, 1848, 3, 2, 2, 2, 1853, 273, 3, 2, 2, 2, 1854, 1855, 8, 138, 1, 2, 1855, 1856, 5, 276, 139, 2, 1856, 1862, 3, 2, 2, 2, 1857, 1858, 12, 3, 2, 2, 1858, 1859, 7, 117, 2, 2, 1859, 1861, 5, 276, 139, 2, 1860, 1857, 3, 2, 2, 2, 1861, 1864, 3, 2, 2, 2, 1862, 1860, 3, 2, 2, 2, 1862, 1863, 3, 2, 2, 2, 1863, 275, 3, 2, 2, 2, 1864, 1862, 3, 2, 2, 2, 1865, 1867, 5, 214, 108, 2, 1866, 1865, 3, 2, 2, 2, 1866, 1867, 3, 2, 2, 2, 1867, 1868, 3, 2, 2, 2, 1868, 1869, 5, 142, 72, 2, 1869, 1870, 5, 240, 121, 2, 1870, 1897, 3, 2, 2, 2, 1871, 1873, 5, 214, 108, 2, 1872, 1871, 3, 2, 2, 2, 1872, 1873, 3, 2, 2, 2, 1873, 1874, 3, 2, 2, 2, 1874, 1875, 5, 142, 72, 2, 1875, 1876, 5, 240, 121, 2, 1876, 1877, 7, 96, 2, 2, 1877, 1878, 5, 286, 144, 2, 1878, 1897, 3, 2, 2, 2, 1879, 1881, 5, 214, 108, 2, 1880, 1879, 3, 2, 2, 2, 1880, 1881, 3, 2, 2, 2, 1881, 1882, 3, 2, 2, 2, 1882, 1884, 5, 142, 72, 2, 1883, 1885, 5, 262, 132, 2, 1884, 1883, 3, 2, 2, 2, 1884, 1885, 3, 2, 2, 2, 1885, 1897, 3, 2, 2, 2, 1886, 1888, 5, 214, 108, 2, 1887, 1886, 3, 2, 2, 2, 1887, 1888, 3, 2, 2, 2, 1888, 1889, 3, 2, 2, 2, 1889, 1891, 5, 142, 72, 2, 1890, 1892, 5, 262, 132, 2, 1891, 1890, 3, 2, 2, 2, 1891, 1892, 3, 2, 2, 2, 1892, 1893, 3, 2, 2, 2, 1893, 1894, 7, 96, 2, 2, 1894, 1895, 5, 286, 144, 2, 1895, 1897, 3, 2, 2, 2, 1896, 1866, 3, 2, 2, 2, 1896, 1872, 3, 2, 2, 2, 1896, 1880, 3, 2, 2, 2, 1896, 1887, 3, 2, 2, 2, 1897, 277, 3, 2, 2, 2, 1898, 1900, 5, 214, 108, 2, 1899, 1898, 3, 2, 2, 2, 1899, 1900, 3, 2, 2, 2, 1900, 1902, 3, 2, 2, 2, 1901, 1903, 5, 142, 72, 2, 1902, 1901, 3, 2, 2, 2, 1902, 1903, 3, 2, 2, 2, 1903, 1904, 3, 2, 2, 2, 1904, 1906, 5, 240, 121, 2, 1905, 1907, 5, 312, 157, 2, 1906, 1905, 3, 2, 2, 2, 1906, 1907, 3, 2, 2, 2, 1907, 1908, 3, 2, 2, 2, 1908, 1909, 5, 280, 141, 2, 1909, 279, 3, 2, 2, 2, 1910, 1912, 5, 336, 169, 2, 1911, 1910, 3, 2, 2, 2, 1911, 1912, 3, 2, 2, 2, 1912, 1913, 3, 2, 2, 2, 1913, 1922, 5, 104, 53, 2, 1914, 1922, 5, 374, 188, 2, 1915, 1916, 7, 96, 2, 2, 1916, 1917, 7, 22, 2, 2, 1917, 1922, 7, 123, 2, 2, 1918, 1919, 7, 96, 2, 2, 1919, 1920, 7, 23, 2, 2, 1920, 1922, 7, 123, 2, 2, 1921, 1911, 3, 2, 2, 2, 1921, 1914, 3, 2, 2, 2, 1921, 1915, 3, 2, 2, 2, 1921, 1918, 3, 2, 2, 2, 1922, 281, 3, 2, 2, 2, 1923, 1929, 5, 284, 143, 2, 1924, 1925, 7, 80, 2, 2, 1925, 1926, 5, 34, 18, 2, 1926, 1927, 7, 81, 2, 2, 1927, 1929, 3, 2, 2, 2, 1928, 1923, 3, 2, 2, 2, 1928, 1924, 3, 2, 2, 2, 1929, 283, 3, 2, 2, 2, 1930, 1931, 7, 96, 2, 2, 1931, 1934, 5, 286, 144, 2, 1932, 1934, 5, 290, 146, 2, 1933, 1930, 3, 2, 2, 2, 1933, 1932, 3, 2, 2, 2, 1934, 285, 3, 2, 2, 2, 1935, 1938, 5, 88, 45, 2, 1936, 1938, 5, 290, 146, 2, 1937, 1935, 3, 2, 2, 2, 1937, 1936, 3, 2, 2, 2, 1938, 287, 3, 2, 2, 2, 1939, 1940, 8, 145, 1, 2, 1940, 1942, 5, 286, 144, 2, 1941, 1943, 7, 126, 2, 2, 1942, 1941, 3, 2, 2, 2, 1942, 1943, 3, 2, 2, 2, 1943, 1952, 3, 2, 2, 2, 1944, 1945, 12, 3, 2, 2, 1945, 1946, 7, 117, 2, 2, 1946, 1948, 5, 286, 144, 2, 1947, 1949, 7, 126, 2, 2, 1948, 1947, 3, 2, 2, 2, 1948, 1949, 3, 2, 2, 2, 1949, 1951, 3, 2, 2, 2, 1950, 1944, 3, 2, 2, 2, 1951, 1954, 3, 2, 2, 2, 1952, 1950, 3, 2, 2, 2, 1952, 1953, 3, 2, 2, 2, 1953, 289, 3, 2, 2, 2, 1954, 1952, 3, 2, 2, 2, 1955, 1956, 7, 84, 2, 2, 1956, 1958, 5, 288, 145, 2, 1957, 1959, 7, 117, 2, 2, 1958, 1957, 3, 2, 2, 2, 1958, 1959, 3, 2, 2, 2, 1959, 1960, 3, 2, 2, 2, 1960, 1961, 7, 85, 2, 2, 1961, 1965, 3, 2, 2, 2, 1962, 1963, 7, 84, 2, 2, 1963, 1965, 7, 85, 2, 2, 1964, 1955, 3, 2, 2, 2, 1964, 1962, 3, 2, 2, 2, 1965, 291, 3, 2, 2, 2, 1966, 1969, 7, 127, 2, 2, 1967, 1969, 5, 356, 179, 2, 1968, 1966, 3, 2, 2, 2, 1968, 1967, 3, 2, 2, 2, 1969, 293, 3, 2, 2, 2, 1970, 1971, 5, 296, 149, 2, 1971, 1973, 7, 84, 2, 2, 1972, 1974, 5, 304, 153, 2, 1973, 1972, 3, 2, 2, 2, 1973, 1974, 3, 2, 2, 2, 1974, 1975, 3, 2, 2, 2, 1975, 1976, 7, 85, 2, 2, 1976, 295, 3, 2, 2, 2, 1977, 1979, 5, 302, 152, 2, 1978, 1980, 5, 214, 108, 2, 1979, 1978, 3, 2, 2, 2, 1979, 1980, 3, 2, 2, 2, 1980, 1981, 3, 2, 2, 2, 1981, 1983, 5, 298, 150, 2, 1982, 1984, 5, 300, 151, 2, 1983, 1982, 3, 2, 2, 2, 1983, 1984, 3, 2, 2, 2, 1984, 1986, 3, 2, 2, 2, 1985, 1987, 5, 318, 160, 2, 1986, 1985, 3, 2, 2, 2, 1986, 1987, 3, 2, 2, 2, 1987, 1996, 3, 2, 2, 2, 1988, 1990, 5, 302, 152, 2, 1989, 1991, 5, 214, 108, 2, 1990, 1989, 3, 2, 2, 2, 1990, 1991, 3, 2, 2, 2, 1991, 1993, 3, 2, 2, 2, 1992, 1994, 5, 318, 160, 2, 1993, 1992, 3, 2, 2, 2, 1993, 1994, 3, 2, 2, 2, 1994, 1996, 3, 2, 2, 2, 1995, 1977, 3, 2, 2, 2, 1995, 1988, 3, 2, 2, 2, 1996, 297, 3, 2, 2, 2, 1997, 1999, 5, 12, 7, 2, 1998, 1997, 3, 2, 2, 2, 1998, 1999, 3, 2, 2, 2, 1999, 2000, 3, 2, 2, 2, 2000, 2001, 5, 292, 147, 2, 2001, 299, 3, 2, 2, 2, 2002, 2003, 7, 33, 2, 2, 2003, 301, 3, 2, 2, 2, 2004, 2005, 9, 8, 2, 2, 2005, 303, 3, 2, 2, 2, 2006, 2008, 5, 306, 154, 2, 2007, 2009, 5, 304, 153, 2, 2008, 2007, 3, 2, 2, 2, 2008, 2009, 3, 2, 2, 2, 2009, 2016, 3, 2, 2, 2, 2010, 2011, 5, 328, 165, 2, 2011, 2013, 7, 121, 2, 2, 2012, 2014, 5, 304, 153, 2, 2013, 2012, 3, 2, 2, 2, 2013, 2014, 3, 2, 2, 2, 2014, 2016, 3, 2, 2, 2, 2015, 2006, 3, 2, 2, 2, 2015, 2010, 3, 2, 2, 2, 2016, 305, 3, 2, 2, 2, 2017, 2019, 5, 214, 108, 2, 2018, 2017, 3, 2, 2, 2, 2018, 2019, 3, 2, 2, 2, 2019, 2021, 3, 2, 2, 2, 2020, 2022, 5, 142, 72, 2, 2021, 2020, 3, 2, 2, 2, 2021, 2022, 3, 2, 2, 2, 2022, 2024, 3, 2, 2, 2, 2023, 2025, 5, 308, 155, 2, 2024, 2023, 3, 2, 2, 2, 2024, 2025, 3, 2, 2, 2, 2025, 2026, 3, 2, 2, 2, 2026, 2034, 7, 123, 2, 2, 2027, 2034, 5, 278, 140, 2, 2028, 2034, 5, 206, 104, 2, 2029, 2034, 5, 134, 68, 2, 2030, 2034, 5, 348, 175, 2, 2031, 2034, 5, 130, 66, 2, 2032, 2034, 5, 136, 69, 2, 2033, 2018, 3, 2, 2, 2, 2033, 2027, 3, 2, 2, 2, 2033, 2028, 3, 2, 2, 2, 2033, 2029, 3, 2, 2, 2, 2033, 2030, 3, 2, 2, 2, 2033, 2031, 3, 2, 2, 2, 2033, 2032, 3, 2, 2, 2, 2034, 307, 3, 2, 2, 2, 2035, 2036, 8, 155, 1, 2, 2036, 2037, 5, 310, 156, 2, 2037, 2043, 3, 2, 2, 2, 2038, 2039, 12, 3, 2, 2, 2039, 2040, 7, 117, 2, 2, 2040, 2042, 5, 310, 156, 2, 2041, 2038, 3, 2, 2, 2, 2042, 2045, 3, 2, 2, 2, 2043, 2041, 3, 2, 2, 2, 2043, 2044, 3, 2, 2, 2, 2044, 309, 3, 2, 2, 2, 2045, 2043, 3, 2, 2, 2, 2046, 2048, 5, 240, 121, 2, 2047, 2049, 5, 312, 157, 2, 2048, 2047, 3, 2, 2, 2, 2048, 2049, 3, 2, 2, 2, 2049, 2051, 3, 2, 2, 2, 2050, 2052, 5, 316, 159, 2, 2051, 2050, 3, 2, 2, 2, 2051, 2052, 3, 2, 2, 2, 2052, 2066, 3, 2, 2, 2, 2053, 2055, 5, 240, 121, 2, 2054, 2056, 5, 284, 143, 2, 2055, 2054, 3, 2, 2, 2, 2055, 2056, 3, 2, 2, 2, 2056, 2066, 3, 2, 2, 2, 2057, 2059, 7, 127, 2, 2, 2058, 2057, 3, 2, 2, 2, 2058, 2059, 3, 2, 2, 2, 2059, 2061, 3, 2, 2, 2, 2060, 2062, 5, 214, 108, 2, 2061, 2060, 3, 2, 2, 2, 2061, 2062, 3, 2, 2, 2, 2062, 2063, 3, 2, 2, 2, 2063, 2064, 7, 121, 2, 2, 2064, 2066, 5, 94, 48, 2, 2065, 2046, 3, 2, 2, 2, 2065, 2053, 3, 2, 2, 2, 2065, 2058, 3, 2, 2, 2, 2066, 311, 3, 2, 2, 2, 2067, 2068, 8, 157, 1, 2, 2068, 2069, 5, 314, 158, 2, 2069, 2074, 3, 2, 2, 2, 2070, 2071, 12, 3, 2, 2, 2071, 2073, 5, 314, 158, 2, 2072, 2070, 3, 2, 2, 2, 2073, 2076, 3, 2, 2, 2, 2074, 2072, 3, 2, 2, 2, 2074, 2075, 3, 2, 2, 2, 2075, 313, 3, 2, 2, 2, 2076, 2074, 3, 2, 2, 2, 2077, 2078, 9, 9, 2, 2, 2078, 315, 3, 2, 2, 2, 2079, 2080, 7, 96, 2, 2, 2080, 2081, 7, 130, 2, 2, 2081, 2082, 8, 159, 1, 2, 2082, 317, 3, 2, 2, 2, 2083, 2084, 7, 121, 2, 2, 2084, 2085, 5, 320, 161, 2, 2085, 319, 3, 2, 2, 2, 2086, 2087, 8, 161, 1, 2, 2087, 2089, 5, 322, 162, 2, 2088, 2090, 7, 126, 2, 2, 2089, 2088, 3, 2, 2, 2, 2089, 2090, 3, 2, 2, 2, 2090, 2099, 3, 2, 2, 2, 2091, 2092, 12, 3, 2, 2, 2092, 2093, 7, 117, 2, 2, 2093, 2095, 5, 322, 162, 2, 2094, 2096, 7, 126, 2, 2, 2095, 2094, 3, 2, 2, 2, 2095, 2096, 3, 2, 2, 2, 2096, 2098, 3, 2, 2, 2, 2097, 2091, 3, 2, 2, 2, 2098, 2101, 3, 2, 2, 2, 2099, 2097, 3, 2, 2, 2, 2099, 2100, 3, 2, 2, 2, 2100, 321, 3, 2, 2, 2, 2101, 2099, 3, 2, 2, 2, 2102, 2104, 5, 214, 108, 2, 2103, 2102, 3, 2, 2, 2, 2103, 2104, 3, 2, 2, 2, 2104, 2105, 3, 2, 2, 2, 2105, 2124, 5, 326, 164, 2, 2106, 2108, 5, 214, 108, 2, 2107, 2106, 3, 2, 2, 2, 2107, 2108, 3, 2, 2, 2, 2108, 2109, 3, 2, 2, 2, 2109, 2111, 7, 75, 2, 2, 2110, 2112, 5, 328, 165, 2, 2111, 2110, 3, 2, 2, 2, 2111, 2112, 3, 2, 2, 2, 2112, 2113, 3, 2, 2, 2, 2113, 2124, 5, 326, 164, 2, 2114, 2116, 5, 214, 108, 2, 2115, 2114, 3, 2, 2, 2, 2115, 2116, 3, 2, 2, 2, 2116, 2117, 3, 2, 2, 2, 2117, 2119, 5, 328, 165, 2, 2118, 2120, 7, 75, 2, 2, 2119, 2118, 3, 2, 2, 2, 2119, 2120, 3, 2, 2, 2, 2120, 2121, 3, 2, 2, 2, 2121, 2122, 5, 326, 164, 2, 2122, 2124, 3, 2, 2, 2, 2123, 2103, 3, 2, 2, 2, 2123, 2107, 3, 2, 2, 2, 2123, 2115, 3, 2, 2, 2, 2124, 323, 3, 2, 2, 2, 2125, 2127, 5, 12, 7, 2, 2126, 2125, 3, 2, 2, 2, 2126, 2127, 3, 2, 2, 2, 2127, 2128, 3, 2, 2, 2, 2128, 2131, 5, 292, 147, 2, 2129, 2131, 5, 162, 82, 2, 2130, 2126, 3, 2, 2, 2, 2130, 2129, 3, 2, 2, 2, 2131, 325, 3, 2, 2, 2, 2132, 2133, 5, 324, 163, 2, 2133, 327, 3, 2, 2, 2, 2134, 2135, 9, 10, 2, 2, 2135, 329, 3, 2, 2, 2, 2136, 2137, 7, 47, 2, 2, 2137, 2138, 5, 332, 167, 2, 2138, 331, 3, 2, 2, 2, 2139, 2141, 5, 154, 78, 2, 2140, 2142, 5, 334, 168, 2, 2141, 2140, 3, 2, 2, 2, 2141, 2142, 3, 2, 2, 2, 2142, 333, 3, 2, 2, 2, 2143, 2145, 5, 250, 126, 2, 2144, 2146, 5, 334, 168, 2, 2145, 2144, 3, 2, 2, 2, 2145, 2146, 3, 2, 2, 2, 2146, 335, 3, 2, 2, 2, 2147, 2148, 7, 121, 2, 2, 2148, 2149, 5, 338, 170, 2, 2149, 337, 3, 2, 2, 2, 2150, 2152, 5, 340, 171, 2, 2151, 2153, 7, 126, 2, 2, 2152, 2151, 3, 2, 2, 2, 2152, 2153, 3, 2, 2, 2, 2153, 2162, 3, 2, 2, 2, 2154, 2156, 5, 340, 171, 2, 2155, 2157, 7, 126, 2, 2, 2156, 2155, 3, 2, 2, 2, 2156, 2157, 3, 2, 2, 2, 2157, 2158, 3, 2, 2, 2, 2158, 2159, 7, 117, 2, 2, 2159, 2160, 5, 338, 170, 2, 2160, 2162, 3, 2, 2, 2, 2161, 2150, 3, 2, 2, 2, 2161, 2154, 3, 2, 2, 2, 2162, 339, 3, 2, 2, 2, 2163, 2164, 5, 342, 172, 2, 2164, 2166, 7, 80, 2, 2, 2165, 2167, 5, 34, 18, 2, 2166, 2165, 3, 2, 2, 2, 2166, 2167, 3, 2, 2, 2, 2167, 2168, 3, 2, 2, 2, 2168, 2169, 7, 81, 2, 2, 2169, 2174, 3, 2, 2, 2, 2170, 2171, 5, 342, 172, 2, 2171, 2172, 5, 290, 146, 2, 2172, 2174, 3, 2, 2, 2, 2173, 2163, 3, 2, 2, 2, 2173, 2170, 3, 2, 2, 2, 2174, 341, 3, 2, 2, 2, 2175, 2178, 5, 324, 163, 2, 2176, 2178, 7, 127, 2, 2, 2177, 2175, 3, 2, 2, 2, 2177, 2176, 3, 2, 2, 2, 2178, 343, 3, 2, 2, 2, 2179, 2180, 7, 47, 2, 2, 2180, 2181, 5, 396, 199, 2, 2181, 345, 3, 2, 2, 2, 2182, 2183, 7, 47, 2, 2, 2183, 2184, 7, 136, 2, 2, 2184, 2188, 7, 127, 2, 2, 2185, 2186, 7, 47, 2, 2, 2186, 2188, 7, 139, 2, 2, 2187, 2182, 3, 2, 2, 2, 2187, 2185, 3, 2, 2, 2, 2188, 347, 3, 2, 2, 2, 2189, 2190, 7, 63, 2, 2, 2190, 2191, 7, 97, 2, 2, 2191, 2192, 5, 350, 176, 2, 2192, 2193, 7, 98, 2, 2, 2193, 2194, 5, 126, 64, 2, 2194, 349, 3, 2, 2, 2, 2195, 2196, 8, 176, 1, 2, 2196, 2197, 5, 352, 177, 2, 2197, 2203, 3, 2, 2, 2, 2198, 2199, 12, 3, 2, 2, 2199, 2200, 7, 117, 2, 2, 2200, 2202, 5, 352, 177, 2, 2201, 2198, 3, 2, 2, 2, 2202, 2205, 3, 2, 2, 2, 2203, 2201, 3, 2, 2, 2, 2203, 2204, 3, 2, 2, 2, 2204, 351, 3, 2, 2, 2, 2205, 2203, 3, 2, 2, 2, 2206, 2209, 5, 354, 178, 2, 2207, 2209, 5, 276, 139, 2, 2208, 2206, 3, 2, 2, 2, 2208, 2207, 3, 2, 2, 2, 2209, 353, 3, 2, 2, 2, 2210, 2212, 7, 16, 2, 2, 2211, 2213, 7, 126, 2, 2, 2212, 2211, 3, 2, 2, 2, 2212, 2213, 3, 2, 2, 2, 2213, 2215, 3, 2, 2, 2, 2214, 2216, 7, 127, 2, 2, 2215, 2214, 3, 2, 2, 2, 2215, 2216, 3, 2, 2, 2, 2216, 2259, 3, 2, 2, 2, 2217, 2219, 7, 16, 2, 2, 2218, 2220, 7, 127, 2, 2, 2219, 2218, 3, 2, 2, 2, 2219, 2220, 3, 2, 2, 2, 2220, 2221, 3, 2, 2, 2, 2221, 2222, 7, 96, 2, 2, 2222, 2259, 5, 260, 131, 2, 2223, 2225, 7, 71, 2, 2, 2224, 2226, 7, 126, 2, 2, 2225, 2224, 3, 2, 2, 2, 2225, 2226, 3, 2, 2, 2, 2226, 2228, 3, 2, 2, 2, 2227, 2229, 7, 127, 2, 2, 2228, 2227, 3, 2, 2, 2, 2228, 2229, 3, 2, 2, 2, 2229, 2259, 3, 2, 2, 2, 2230, 2232, 7, 71, 2, 2, 2231, 2233, 7, 127, 2, 2, 2232, 2231, 3, 2, 2, 2, 2232, 2233, 3, 2, 2, 2, 2233, 2234, 3, 2, 2, 2, 2234, 2235, 7, 96, 2, 2, 2235, 2259, 5, 260, 131, 2, 2236, 2237, 7, 63, 2, 2, 2237, 2238, 7, 97, 2, 2, 2238, 2239, 5, 350, 176, 2, 2239, 2240, 7, 98, 2, 2, 2240, 2242, 7, 16, 2, 2, 2241, 2243, 7, 126, 2, 2, 2242, 2241, 3, 2, 2, 2, 2242, 2243, 3, 2, 2, 2, 2243, 2245, 3, 2, 2, 2, 2244, 2246, 7, 127, 2, 2, 2245, 2244, 3, 2, 2, 2, 2245, 2246, 3, 2, 2, 2, 2246, 2259, 3, 2, 2, 2, 2247, 2248, 7, 63, 2, 2, 2248, 2249, 7, 97, 2, 2, 2249, 2250, 5, 350, 176, 2, 2250, 2251, 7, 98, 2, 2, 2251, 2253, 7, 16, 2, 2, 2252, 2254, 7, 127, 2, 2, 2253, 2252, 3, 2, 2, 2, 2253, 2254, 3, 2, 2, 2, 2254, 2255, 3, 2, 2, 2, 2255, 2256, 7, 96, 2, 2, 2256, 2257, 5, 6, 4, 2, 2257, 2259, 3, 2, 2, 2, 2258, 2210, 3, 2, 2, 2, 2258, 2217, 3, 2, 2, 2, 2258, 2223, 3, 2, 2, 2, 2258, 2230, 3, 2, 2, 2, 2258, 2236, 3, 2, 2, 2, 2258, 2247, 3, 2, 2, 2, 2259, 355, 3, 2, 2, 2, 2260, 2261, 5, 360, 181, 2, 2261, 2263, 7, 97, 2, 2, 2262, 2264, 5, 362, 182, 2, 2263, 2262, 3, 2, 2, 2, 2263, 2264, 3, 2, 2, 2, 2264, 2265, 3, 2, 2, 2, 2265, 2266, 7, 98, 2, 2, 2266, 357, 3, 2, 2, 2, 2267, 2283, 5, 356, 179, 2, 2268, 2269, 5, 344, 173, 2, 2269, 2271, 7, 97, 2, 2, 2270, 2272, 5, 362, 182, 2, 2271, 2270, 3, 2, 2, 2, 2271, 2272, 3, 2, 2, 2, 2272, 2273, 3, 2, 2, 2, 2273, 2274, 7, 98, 2, 2, 2274, 2283, 3, 2, 2, 2, 2275, 2276, 5, 346, 174, 2, 2276, 2278, 7, 97, 2, 2, 2277, 2279, 5, 362, 182, 2, 2278, 2277, 3, 2, 2, 2, 2278, 2279, 3, 2, 2, 2, 2279, 2280, 3, 2, 2, 2, 2280, 2281, 7, 98, 2, 2, 2281, 2283, 3, 2, 2, 2, 2282, 2267, 3, 2, 2, 2, 2282, 2268, 3, 2, 2, 2, 2282, 2275, 3, 2, 2, 2, 2283, 359, 3, 2, 2, 2, 2284, 2285, 7, 127, 2, 2, 2285, 361, 3, 2, 2, 2, 2286, 2287, 8, 182, 1, 2, 2287, 2289, 5, 364, 183, 2, 2288, 2290, 7, 126, 2, 2, 2289, 2288, 3, 2, 2, 2, 2289, 2290, 3, 2, 2, 2, 2290, 2299, 3, 2, 2, 2, 2291, 2292, 12, 3, 2, 2, 2292, 2293, 7, 117, 2, 2, 2293, 2295, 5, 364, 183, 2, 2294, 2296, 7, 126, 2, 2, 2295, 2294, 3, 2, 2, 2, 2295, 2296, 3, 2, 2, 2, 2296, 2298, 3, 2, 2, 2, 2297, 2291, 3, 2, 2, 2, 2298, 2301, 3, 2, 2, 2, 2299, 2297, 3, 2, 2, 2, 2299, 2300, 3, 2, 2, 2, 2300, 363, 3, 2, 2, 2, 2301, 2299, 3, 2, 2, 2, 2302, 2306, 5, 260, 131, 2, 2303, 2306, 5, 94, 48, 2, 2304, 2306, 5, 6, 4, 2, 2305, 2302, 3, 2, 2, 2, 2305, 2303, 3, 2, 2, 2, 2305, 2304, 3, 2, 2, 2, 2306, 365, 3, 2, 2, 2, 2307, 2308, 7, 71, 2, 2, 2308, 2309, 5, 12, 7, 2, 2309, 2310, 7, 127, 2, 2, 2310, 2319, 3, 2, 2, 2, 2311, 2312, 7, 71, 2, 2, 2312, 2314, 5, 12, 7, 2, 2313, 2315, 7, 63, 2, 2, 2314, 2313, 3, 2, 2, 2, 2314, 2315, 3, 2, 2, 2, 2315, 2316, 3, 2, 2, 2, 2316, 2317, 5, 356, 179, 2, 2317, 2319, 3, 2, 2, 2, 2318, 2307, 3, 2, 2, 2, 2318, 2311, 3, 2, 2, 2, 2319, 367, 3, 2, 2, 2, 2320, 2322, 7, 31, 2, 2, 2321, 2320, 3, 2, 2, 2, 2321, 2322, 3, 2, 2, 2, 2322, 2323, 3, 2, 2, 2, 2323, 2324, 7, 63, 2, 2, 2324, 2325, 5, 126, 64, 2, 2325, 369, 3, 2, 2, 2, 2326, 2327, 7, 63, 2, 2, 2327, 2328, 7, 97, 2, 2, 2328, 2329, 7, 98, 2, 2, 2329, 2330, 5, 126, 64, 2, 2330, 371, 3, 2, 2, 2, 2331, 2332, 7, 68, 2, 2, 2332, 2333, 5, 104, 53, 2, 2333, 2334, 5, 376, 189, 2, 2334, 373, 3, 2, 2, 2, 2335, 2337, 7, 68, 2, 2, 2336, 2338, 5, 336, 169, 2, 2337, 2336, 3, 2, 2, 2, 2337, 2338, 3, 2, 2, 2, 2338, 2339, 3, 2, 2, 2, 2339, 2340, 5, 104, 53, 2, 2340, 2341, 5, 376, 189, 2, 2341, 375, 3, 2, 2, 2, 2342, 2344, 5, 378, 190, 2, 2343, 2345, 5, 376, 189, 2, 2344, 2343, 3, 2, 2, 2, 2344, 2345, 3, 2, 2, 2, 2345, 377, 3, 2, 2, 2, 2346, 2347, 7, 12, 2, 2, 2347, 2348, 7, 80, 2, 2, 2348, 2349, 5, 380, 191, 2, 2349, 2350, 7, 81, 2, 2, 2350, 2351, 5, 104, 53, 2, 2351, 379, 3, 2, 2, 2, 2352, 2354, 5, 214, 108, 2, 2353, 2352, 3, 2, 2, 2, 2353, 2354, 3, 2, 2, 2, 2354, 2355, 3, 2, 2, 2, 2355, 2356, 5, 154, 78, 2, 2356, 2357, 5, 240, 121, 2, 2357, 2367, 3, 2, 2, 2, 2358, 2360, 5, 214, 108, 2, 2359, 2358, 3, 2, 2, 2, 2359, 2360, 3, 2, 2, 2, 2360, 2361, 3, 2, 2, 2, 2361, 2363, 5, 154, 78, 2, 2362, 2364, 5, 262, 132, 2, 2363, 2362, 3, 2, 2, 2, 2363, 2364, 3, 2, 2, 2, 2364, 2367, 3, 2, 2, 2, 2365, 2367, 7, 126, 2, 2, 2366, 2353, 3, 2, 2, 2, 2366, 2359, 3, 2, 2, 2, 2366, 2365, 3, 2, 2, 2, 2367, 381, 3, 2, 2, 2, 2368, 2370, 7, 66, 2, 2, 2369, 2371, 5, 88, 45, 2, 2370, 2369, 3, 2, 2, 2, 2370, 2371, 3, 2, 2, 2, 2371, 383, 3, 2, 2, 2, 2372, 2375, 5, 386, 194, 2, 2373, 2375, 5, 390, 196, 2, 2374, 2372, 3, 2, 2, 2, 2374, 2373, 3, 2, 2, 2, 2375, 385, 3, 2, 2, 2, 2376, 2377, 7, 66, 2, 2, 2377, 2379, 7, 80, 2, 2, 2378, 2380, 5, 388, 195, 2, 2379, 2378, 3, 2, 2, 2, 2379, 2380, 3, 2, 2, 2, 2380, 2381, 3, 2, 2, 2, 2381, 2382, 7, 81, 2, 2, 2382, 387, 3, 2, 2, 2, 2383, 2384, 8, 195, 1, 2, 2384, 2386, 5, 260, 131, 2, 2385, 2387, 7, 126, 2, 2, 2386, 2385, 3, 2, 2, 2, 2386, 2387, 3, 2, 2, 2, 2387, 2396, 3, 2, 2, 2, 2388, 2389, 12, 3, 2, 2, 2389, 2390, 7, 117, 2, 2, 2390, 2392, 5, 260, 131, 2, 2391, 2393, 7, 126, 2, 2, 2392, 2391, 3, 2, 2, 2, 2392, 2393, 3, 2, 2, 2, 2393, 2395, 3, 2, 2, 2, 2394, 2388, 3, 2, 2, 2, 2395, 2398, 3, 2, 2, 2, 2396, 2394, 3, 2, 2, 2, 2396, 2397, 3, 2, 2, 2, 2397, 389, 3, 2, 2, 2, 2398, 2396, 3, 2, 2, 2, 2399, 2400, 7, 45, 2, 2, 2400, 2401, 7, 80, 2, 2, 2401, 2402, 5, 94, 48, 2, 2402, 2403, 7, 81, 2, 2, 2403, 2406, 3, 2, 2, 2, 2404, 2406, 7, 45, 2, 2, 2405, 2399, 3, 2, 2, 2, 2405, 2404, 3, 2, 2, 2, 2406, 391, 3, 2, 2, 2, 2407, 2408, 7, 98, 2, 2, 2408, 2409, 7, 98, 2, 2, 2409, 393, 3, 2, 2, 2, 2410, 2411, 7, 98, 2, 2, 2411, 2412, 7, 98, 2, 2, 2412, 2413, 7, 96, 2, 2, 2413, 395, 3, 2, 2, 2, 2414, 2463, 7, 44, 2, 2, 2415, 2463, 7, 23, 2, 2, 2416, 2417, 7, 44, 2, 2, 2417, 2418, 7, 82, 2, 2, 2418, 2463, 7, 83, 2, 2, 2419, 2420, 7, 23, 2, 2, 2420, 2421, 7, 82, 2, 2, 2421, 2463, 7, 83, 2, 2, 2422, 2463, 7, 86, 2, 2, 2423, 2463, 7, 87, 2, 2, 2424, 2463, 7, 88, 2, 2, 2425, 2463, 7, 89, 2, 2, 2426, 2463, 7, 90, 2, 2, 2427, 2463, 7, 91, 2, 2, 2428, 2463, 7, 92, 2, 2, 2429, 2463, 7, 93, 2, 2, 2430, 2463, 7, 94, 2, 2, 2431, 2463, 7, 95, 2, 2, 2432, 2463, 7, 96, 2, 2, 2433, 2463, 7, 97, 2, 2, 2434, 2463, 7, 98, 2, 2, 2435, 2463, 7, 99, 2, 2, 2436, 2463, 7, 100, 2, 2, 2437, 2463, 7, 101, 2, 2, 2438, 2463, 7, 102, 2, 2, 2439, 2463, 7, 103, 2, 2, 2440, 2463, 7, 104, 2, 2, 2441, 2463, 7, 105, 2, 2, 2442, 2463, 7, 106, 2, 2, 2443, 2463, 7, 107, 2, 2, 2444, 2463, 5, 392, 197, 2, 2445, 2463, 5, 394, 198, 2, 2446, 2463, 7, 108, 2, 2, 2447, 2463, 7, 109, 2, 2, 2448, 2463, 7, 110, 2, 2, 2449, 2463, 7, 111, 2, 2, 2450, 2463, 7, 112, 2, 2, 2451, 2463, 7, 113, 2, 2, 2452, 2463, 7, 114, 2, 2, 2453, 2463, 7, 115, 2, 2, 2454, 2463, 7, 116, 2, 2, 2455, 2463, 7, 117, 2, 2, 2456, 2463, 7, 118, 2, 2, 2457, 2463, 7, 119, 2, 2, 2458, 2459, 7, 80, 2, 2, 2459, 2463, 7, 81, 2, 2, 2460, 2461, 7, 82, 2, 2, 2461, 2463, 7, 83, 2, 2, 2462, 2414, 3, 2, 2, 2, 2462, 2415, 3, 2, 2, 2, 2462, 2416, 3, 2, 2, 2, 2462, 2419, 3, 2, 2, 2, 2462, 2422, 3, 2, 2, 2, 2462, 2423, 3, 2, 2, 2, 2462, 2424, 3, 2, 2, 2, 2462, 2425, 3, 2, 2, 2, 2462, 2426, 3, 2, 2, 2, 2462, 2427, 3, 2, 2, 2, 2462, 2428, 3, 2, 2, 2, 2462, 2429, 3, 2, 2, 2, 2462, 2430, 3, 2, 2, 2, 2462, 2431, 3, 2, 2, 2, 2462, 2432, 3, 2, 2, 2, 2462, 2433, 3, 2, 2, 2, 2462, 2434, 3, 2, 2, 2, 2462, 2435, 3, 2, 2, 2, 2462, 2436, 3, 2, 2, 2, 2462, 2437, 3, 2, 2, 2, 2462, 2438, 3, 2, 2, 2, 2462, 2439, 3, 2, 2, 2, 2462, 2440, 3, 2, 2, 2, 2462, 2441, 3, 2, 2, 2, 2462, 2442, 3, 2, 2, 2, 2462, 2443, 3, 2, 2, 2, 2462, 2444, 3, 2, 2, 2, 2462, 2445, 3, 2, 2, 2, 2462, 2446, 3, 2, 2, 2, 2462, 2447, 3, 2, 2, 2, 2462, 2448, 3, 2, 2, 2, 2462, 2449, 3, 2, 2, 2, 2462, 2450, 3, 2, 2, 2, 2462, 2451, 3, 2, 2, 2, 2462, 2452, 3, 2, 2, 2, 2462, 2453, 3, 2, 2, 2, 2462, 2454, 3, 2, 2, 2, 2462, 2455, 3, 2, 2, 2, 2462, 2456, 3, 2, 2, 2, 2462, 2457, 3, 2, 2, 2, 2462, 2458, 3, 2, 2, 2, 2462, 2460, 3, 2, 2, 2, 2463, 397, 3, 2, 2, 2, 2464, 2472, 7, 128, 2, 2, 2465, 2472, 7, 134, 2, 2, 2466, 2472, 7, 135, 2, 2, 2467, 2472, 7, 136, 2, 2, 2468, 2472, 5, 400, 201, 2, 2469, 2472, 5, 402, 202, 2, 2470, 2472, 5, 404, 203, 2, 2471, 2464, 3, 2, 2, 2, 2471, 2465, 3, 2, 2, 2, 2471, 2466, 3, 2, 2, 2, 2471, 2467, 3, 2, 2, 2, 2471, 2468, 3, 2, 2, 2, 2471, 2469, 3, 2, 2, 2, 2471, 2470, 3, 2, 2, 2, 2472, 399, 3, 2, 2, 2, 2473, 2474, 9, 11, 2, 2, 2474, 401, 3, 2, 2, 2, 2475, 2476, 7, 46, 2, 2, 2476, 403, 3, 2, 2, 2, 2477, 2478, 9, 12, 2, 2, 2478, 405, 3, 2, 2, 2, 318, 407, 419, 423, 434, 438, 453, 460, 465, 467, 472, 478, 488, 495, 501, 505, 510, 516, 523, 529, 532, 535, 538, 545, 552, 604, 619, 625, 631, 644, 646, 652, 667, 673, 688, 702, 712, 716, 720, 723, 727, 733, 735, 743, 747, 750, 757, 764, 768, 773, 777, 780, 785, 791, 804, 815, 817, 832, 834, 846, 848, 861, 863, 881, 883, 895, 897, 908, 919, 930, 941, 952, 962, 970, 983, 993, 1000, 1004, 1008, 1012, 1016, 1021, 1024, 1027, 1032, 1039, 1043, 1049, 1055, 1066, 1089, 1093, 1101, 1107, 1127, 1131, 1144, 1148, 1151, 1158, 1166, 1176, 1187, 1199, 1209, 1214, 1221, 1224, 1229, 1234, 1255, 1259, 1264, 1275, 1281, 1285, 1290, 1294, 1299, 1302, 1324, 1330, 1341, 1345, 1348, 1358, 1364, 1367, 1374, 1384, 1388, 1391, 1394, 1398, 1403, 1405, 1409, 1413, 1422, 1435, 1443, 1449, 1455, 1459, 1462, 1471, 1480, 1488, 1499, 1505, 1516, 1519, 1524, 1539, 1545, 1554, 1564, 1570, 1578, 1582, 1586, 1591, 1596, 1603, 1605, 1610, 1614, 1628, 1634, 1649, 1659, 1664, 1671, 1677, 1682, 1688, 1695, 1699, 1701, 1703, 1710, 1713, 1716, 1719, 1724, 1728, 1731, 1735, 1739, 1744, 1747, 1749, 1753, 1760, 1766, 1770, 1776, 1781, 1783, 1789, 1793, 1799, 1806, 1810, 1812, 1814, 1821, 1831, 1835, 1837, 1839, 1843, 1846, 1852, 1862, 1866, 1872, 1880, 1884, 1887, 1891, 1896, 1899, 1902, 1906, 1911, 1921, 1928, 1933, 1937, 1942, 1948, 1952, 1958, 1964, 1968, 1973, 1979, 1983, 1986, 1990, 1993, 1995, 1998, 2008, 2013, 2015, 2018, 2021, 2024, 2033, 2043, 2048, 2051, 2055, 2058, 2061, 2065, 2074, 2089, 2095, 2099, 2103, 2107, 2111, 2115, 2119, 2123, 2126, 2130, 2141, 2145, 2152, 2156, 2161, 2166, 2173, 2177, 2187, 2203, 2208, 2212, 2215, 2219, 2225, 2228, 2232, 2242, 2245, 2253, 2258, 2263, 2271, 2278, 2282, 2289, 2295, 2299, 2305, 2314, 2318, 2321, 2337, 2344, 2353, 2359, 2363, 2366, 2370, 2374, 2379, 2386, 2392, 2396, 2405, 2462, 2471] \ No newline at end of file diff --git a/mainTool/antlr/CPP14.tokens b/mainTool/antlr/CPP14.tokens new file mode 100644 index 0000000..feedcf4 --- /dev/null +++ b/mainTool/antlr/CPP14.tokens @@ -0,0 +1,263 @@ +MultiLineMacro=1 +Directive=2 +Alignas=3 +Alignof=4 +Asm=5 +Auto=6 +Bool=7 +Break=8 +Case=9 +Catch=10 +Char=11 +Char16=12 +Char32=13 +Class=14 +Const=15 +Constexpr=16 +Const_cast=17 +Continue=18 +Decltype=19 +Default=20 +Delete=21 +Do=22 +Double=23 +Dynamic_cast=24 +Else=25 +Enum=26 +Explicit=27 +Export=28 +Extern=29 +FalseToken=30 +Final=31 +Float=32 +For=33 +Friend=34 +Goto=35 +If=36 +Inline=37 +Int=38 +Long=39 +Mutable=40 +Namespace=41 +New=42 +Noexcept=43 +Nullptr=44 +Operator=45 +Override=46 +Private=47 +Protected=48 +Public=49 +Register=50 +Reinterpret_cast=51 +Return=52 +Short=53 +Signed=54 +Sizeof=55 +Static=56 +Static_assert=57 +Static_cast=58 +Struct=59 +Switch=60 +Template=61 +This=62 +Thread_local=63 +Throw=64 +TrueToken=65 +Try=66 +Typedef=67 +Typeid=68 +Typename=69 +Union=70 +Unsigned=71 +Using=72 +Virtual=73 +Void=74 +Volatile=75 +Wchar=76 +While=77 +LeftParen=78 +RightParen=79 +LeftBracket=80 +RightBracket=81 +LeftBrace=82 +RightBrace=83 +Plus=84 +Minus=85 +Star=86 +Div=87 +Mod=88 +Caret=89 +And=90 +Or=91 +Tilde=92 +Not=93 +Assign=94 +Less=95 +Greater=96 +PlusAssign=97 +MinusAssign=98 +StarAssign=99 +DivAssign=100 +ModAssign=101 +XorAssign=102 +AndAssign=103 +OrAssign=104 +LeftShift=105 +LeftShiftAssign=106 +Equal=107 +NotEqual=108 +LessEqual=109 +GreaterEqual=110 +AndAnd=111 +OrOr=112 +PlusPlus=113 +MinusMinus=114 +Comma=115 +ArrowStar=116 +Arrow=117 +Question=118 +Colon=119 +Doublecolon=120 +Semi=121 +Dot=122 +DotStar=123 +Ellipsis=124 +Identifier=125 +Integerliteral=126 +Decimalliteral=127 +Octalliteral=128 +Hexadecimalliteral=129 +Binaryliteral=130 +Integersuffix=131 +Characterliteral=132 +Floatingliteral=133 +Stringliteral=134 +Userdefinedintegerliteral=135 +Userdefinedfloatingliteral=136 +Userdefinedstringliteral=137 +Userdefinedcharacterliteral=138 +Whitespace=139 +Newline=140 +BlockComment=141 +LineComment=142 +'alignas'=3 +'alignof'=4 +'asm'=5 +'auto'=6 +'bool'=7 +'break'=8 +'case'=9 +'catch'=10 +'char'=11 +'char16_t'=12 +'char32_t'=13 +'class'=14 +'const'=15 +'constexpr'=16 +'const_cast'=17 +'continue'=18 +'decltype'=19 +'default'=20 +'delete'=21 +'do'=22 +'double'=23 +'dynamic_cast'=24 +'else'=25 +'enum'=26 +'explicit'=27 +'export'=28 +'extern'=29 +'false'=30 +'final'=31 +'float'=32 +'for'=33 +'friend'=34 +'goto'=35 +'if'=36 +'inline'=37 +'int'=38 +'long'=39 +'mutable'=40 +'namespace'=41 +'new'=42 +'noexcept'=43 +'operator'=45 +'override'=46 +'private'=47 +'protected'=48 +'public'=49 +'register'=50 +'reinterpret_cast'=51 +'return'=52 +'short'=53 +'signed'=54 +'sizeof'=55 +'static'=56 +'static_assert'=57 +'static_cast'=58 +'struct'=59 +'switch'=60 +'template'=61 +'this'=62 +'thread_local'=63 +'throw'=64 +'true'=65 +'try'=66 +'typedef'=67 +'typeid'=68 +'typename'=69 +'union'=70 +'unsigned'=71 +'using'=72 +'virtual'=73 +'void'=74 +'volatile'=75 +'wchar_t'=76 +'while'=77 +'('=78 +')'=79 +'['=80 +']'=81 +'{'=82 +'}'=83 +'+'=84 +'-'=85 +'*'=86 +'/'=87 +'%'=88 +'^'=89 +'&'=90 +'|'=91 +'~'=92 +'!'=93 +'='=94 +'<'=95 +'>'=96 +'+='=97 +'-='=98 +'*='=99 +'/='=100 +'%='=101 +'^='=102 +'&='=103 +'|='=104 +'<<'=105 +'<<='=106 +'=='=107 +'!='=108 +'<='=109 +'>='=110 +'&&'=111 +'||'=112 +'++'=113 +'--'=114 +','=115 +'->*'=116 +'->'=117 +'?'=118 +':'=119 +'::'=120 +';'=121 +'.'=122 +'.*'=123 +'...'=124 diff --git a/mainTool/antlr/CPP14Lexer.interp b/mainTool/antlr/CPP14Lexer.interp new file mode 100644 index 0000000..f0f9f2f --- /dev/null +++ b/mainTool/antlr/CPP14Lexer.interp @@ -0,0 +1,469 @@ +token literal names: +null +null +null +'alignas' +'alignof' +'asm' +'auto' +'bool' +'break' +'case' +'catch' +'char' +'char16_t' +'char32_t' +'class' +'const' +'constexpr' +'const_cast' +'continue' +'decltype' +'default' +'delete' +'do' +'double' +'dynamic_cast' +'else' +'enum' +'explicit' +'export' +'extern' +'false' +'final' +'float' +'for' +'friend' +'goto' +'if' +'inline' +'int' +'long' +'mutable' +'namespace' +'new' +'noexcept' +null +'operator' +'override' +'private' +'protected' +'public' +'register' +'reinterpret_cast' +'return' +'short' +'signed' +'sizeof' +'static' +'static_assert' +'static_cast' +'struct' +'switch' +'template' +'this' +'thread_local' +'throw' +'true' +'try' +'typedef' +'typeid' +'typename' +'union' +'unsigned' +'using' +'virtual' +'void' +'volatile' +'wchar_t' +'while' +'(' +')' +'[' +']' +'{' +'}' +'+' +'-' +'*' +'/' +'%' +'^' +'&' +'|' +'~' +'!' +'=' +'<' +'>' +'+=' +'-=' +'*=' +'/=' +'%=' +'^=' +'&=' +'|=' +'<<' +'<<=' +'==' +'!=' +'<=' +'>=' +'&&' +'||' +'++' +'--' +',' +'->*' +'->' +'?' +':' +'::' +';' +'.' +'.*' +'...' +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null +null + +token symbolic names: +null +MultiLineMacro +Directive +Alignas +Alignof +Asm +Auto +Bool +Break +Case +Catch +Char +Char16 +Char32 +Class +Const +Constexpr +Const_cast +Continue +Decltype +Default +Delete +Do +Double +Dynamic_cast +Else +Enum +Explicit +Export +Extern +FalseToken +Final +Float +For +Friend +Goto +If +Inline +Int +Long +Mutable +Namespace +New +Noexcept +Nullptr +Operator +Override +Private +Protected +Public +Register +Reinterpret_cast +Return +Short +Signed +Sizeof +Static +Static_assert +Static_cast +Struct +Switch +Template +This +Thread_local +Throw +TrueToken +Try +Typedef +Typeid +Typename +Union +Unsigned +Using +Virtual +Void +Volatile +Wchar +While +LeftParen +RightParen +LeftBracket +RightBracket +LeftBrace +RightBrace +Plus +Minus +Star +Div +Mod +Caret +And +Or +Tilde +Not +Assign +Less +Greater +PlusAssign +MinusAssign +StarAssign +DivAssign +ModAssign +XorAssign +AndAssign +OrAssign +LeftShift +LeftShiftAssign +Equal +NotEqual +LessEqual +GreaterEqual +AndAnd +OrOr +PlusPlus +MinusMinus +Comma +ArrowStar +Arrow +Question +Colon +Doublecolon +Semi +Dot +DotStar +Ellipsis +Identifier +Integerliteral +Decimalliteral +Octalliteral +Hexadecimalliteral +Binaryliteral +Integersuffix +Characterliteral +Floatingliteral +Stringliteral +Userdefinedintegerliteral +Userdefinedfloatingliteral +Userdefinedstringliteral +Userdefinedcharacterliteral +Whitespace +Newline +BlockComment +LineComment + +rule names: +MultiLineMacro +Directive +Alignas +Alignof +Asm +Auto +Bool +Break +Case +Catch +Char +Char16 +Char32 +Class +Const +Constexpr +Const_cast +Continue +Decltype +Default +Delete +Do +Double +Dynamic_cast +Else +Enum +Explicit +Export +Extern +FalseToken +Final +Float +For +Friend +Goto +If +Inline +Int +Long +Mutable +Namespace +New +Noexcept +Nullptr +Operator +Override +Private +Protected +Public +Register +Reinterpret_cast +Return +Short +Signed +Sizeof +Static +Static_assert +Static_cast +Struct +Switch +Template +This +Thread_local +Throw +TrueToken +Try +Typedef +Typeid +Typename +Union +Unsigned +Using +Virtual +Void +Volatile +Wchar +While +LeftParen +RightParen +LeftBracket +RightBracket +LeftBrace +RightBrace +Plus +Minus +Star +Div +Mod +Caret +And +Or +Tilde +Not +Assign +Less +Greater +PlusAssign +MinusAssign +StarAssign +DivAssign +ModAssign +XorAssign +AndAssign +OrAssign +LeftShift +LeftShiftAssign +Equal +NotEqual +LessEqual +GreaterEqual +AndAnd +OrOr +PlusPlus +MinusMinus +Comma +ArrowStar +Arrow +Question +Colon +Doublecolon +Semi +Dot +DotStar +Ellipsis +Hexquad +Universalcharactername +Identifier +Identifiernondigit +NONDIGIT +DIGIT +Integerliteral +Decimalliteral +Octalliteral +Hexadecimalliteral +Binaryliteral +NONZERODIGIT +OCTALDIGIT +HEXADECIMALDIGIT +BINARYDIGIT +Integersuffix +Unsignedsuffix +Longsuffix +Longlongsuffix +Characterliteral +Cchar +Escapesequence +Simpleescapesequence +Octalescapesequence +Hexadecimalescapesequence +Floatingliteral +Fractionalconstant +Exponentpart +SIGN +Digitsequence +Floatingsuffix +Stringliteral +Encodingprefix +Schar +Rawstring +Userdefinedintegerliteral +Userdefinedfloatingliteral +Userdefinedstringliteral +Userdefinedcharacterliteral +Udsuffix +Whitespace +Newline +BlockComment +LineComment + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 144, 1453, 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, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 4, 54, 9, 54, 4, 55, 9, 55, 4, 56, 9, 56, 4, 57, 9, 57, 4, 58, 9, 58, 4, 59, 9, 59, 4, 60, 9, 60, 4, 61, 9, 61, 4, 62, 9, 62, 4, 63, 9, 63, 4, 64, 9, 64, 4, 65, 9, 65, 4, 66, 9, 66, 4, 67, 9, 67, 4, 68, 9, 68, 4, 69, 9, 69, 4, 70, 9, 70, 4, 71, 9, 71, 4, 72, 9, 72, 4, 73, 9, 73, 4, 74, 9, 74, 4, 75, 9, 75, 4, 76, 9, 76, 4, 77, 9, 77, 4, 78, 9, 78, 4, 79, 9, 79, 4, 80, 9, 80, 4, 81, 9, 81, 4, 82, 9, 82, 4, 83, 9, 83, 4, 84, 9, 84, 4, 85, 9, 85, 4, 86, 9, 86, 4, 87, 9, 87, 4, 88, 9, 88, 4, 89, 9, 89, 4, 90, 9, 90, 4, 91, 9, 91, 4, 92, 9, 92, 4, 93, 9, 93, 4, 94, 9, 94, 4, 95, 9, 95, 4, 96, 9, 96, 4, 97, 9, 97, 4, 98, 9, 98, 4, 99, 9, 99, 4, 100, 9, 100, 4, 101, 9, 101, 4, 102, 9, 102, 4, 103, 9, 103, 4, 104, 9, 104, 4, 105, 9, 105, 4, 106, 9, 106, 4, 107, 9, 107, 4, 108, 9, 108, 4, 109, 9, 109, 4, 110, 9, 110, 4, 111, 9, 111, 4, 112, 9, 112, 4, 113, 9, 113, 4, 114, 9, 114, 4, 115, 9, 115, 4, 116, 9, 116, 4, 117, 9, 117, 4, 118, 9, 118, 4, 119, 9, 119, 4, 120, 9, 120, 4, 121, 9, 121, 4, 122, 9, 122, 4, 123, 9, 123, 4, 124, 9, 124, 4, 125, 9, 125, 4, 126, 9, 126, 4, 127, 9, 127, 4, 128, 9, 128, 4, 129, 9, 129, 4, 130, 9, 130, 4, 131, 9, 131, 4, 132, 9, 132, 4, 133, 9, 133, 4, 134, 9, 134, 4, 135, 9, 135, 4, 136, 9, 136, 4, 137, 9, 137, 4, 138, 9, 138, 4, 139, 9, 139, 4, 140, 9, 140, 4, 141, 9, 141, 4, 142, 9, 142, 4, 143, 9, 143, 4, 144, 9, 144, 4, 145, 9, 145, 4, 146, 9, 146, 4, 147, 9, 147, 4, 148, 9, 148, 4, 149, 9, 149, 4, 150, 9, 150, 4, 151, 9, 151, 4, 152, 9, 152, 4, 153, 9, 153, 4, 154, 9, 154, 4, 155, 9, 155, 4, 156, 9, 156, 4, 157, 9, 157, 4, 158, 9, 158, 4, 159, 9, 159, 4, 160, 9, 160, 4, 161, 9, 161, 4, 162, 9, 162, 4, 163, 9, 163, 4, 164, 9, 164, 4, 165, 9, 165, 4, 166, 9, 166, 4, 167, 9, 167, 4, 168, 9, 168, 4, 169, 9, 169, 3, 2, 3, 2, 7, 2, 342, 10, 2, 12, 2, 14, 2, 345, 11, 2, 3, 2, 3, 2, 5, 2, 349, 10, 2, 3, 2, 6, 2, 352, 10, 2, 13, 2, 14, 2, 353, 3, 2, 6, 2, 357, 10, 2, 13, 2, 14, 2, 358, 3, 2, 3, 2, 3, 3, 3, 3, 7, 3, 365, 10, 3, 12, 3, 14, 3, 368, 11, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 3, 43, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 5, 45, 659, 10, 45, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 48, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 49, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 50, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 51, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 52, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 53, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 54, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 55, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 56, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 57, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 58, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 59, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 60, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 61, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 62, 3, 63, 3, 63, 3, 63, 3, 63, 3, 63, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 64, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 65, 3, 66, 3, 66, 3, 66, 3, 66, 3, 66, 3, 67, 3, 67, 3, 67, 3, 67, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 68, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 69, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 70, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 71, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 72, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 73, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 74, 3, 75, 3, 75, 3, 75, 3, 75, 3, 75, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 76, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 77, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 78, 3, 79, 3, 79, 3, 80, 3, 80, 3, 81, 3, 81, 3, 82, 3, 82, 3, 83, 3, 83, 3, 84, 3, 84, 3, 85, 3, 85, 3, 86, 3, 86, 3, 87, 3, 87, 3, 88, 3, 88, 3, 89, 3, 89, 3, 90, 3, 90, 3, 91, 3, 91, 3, 92, 3, 92, 3, 93, 3, 93, 3, 94, 3, 94, 3, 95, 3, 95, 3, 96, 3, 96, 3, 97, 3, 97, 3, 98, 3, 98, 3, 98, 3, 99, 3, 99, 3, 99, 3, 100, 3, 100, 3, 100, 3, 101, 3, 101, 3, 101, 3, 102, 3, 102, 3, 102, 3, 103, 3, 103, 3, 103, 3, 104, 3, 104, 3, 104, 3, 105, 3, 105, 3, 105, 3, 106, 3, 106, 3, 106, 3, 107, 3, 107, 3, 107, 3, 107, 3, 108, 3, 108, 3, 108, 3, 109, 3, 109, 3, 109, 3, 110, 3, 110, 3, 110, 3, 111, 3, 111, 3, 111, 3, 112, 3, 112, 3, 112, 3, 113, 3, 113, 3, 113, 3, 114, 3, 114, 3, 114, 3, 115, 3, 115, 3, 115, 3, 116, 3, 116, 3, 117, 3, 117, 3, 117, 3, 117, 3, 118, 3, 118, 3, 118, 3, 119, 3, 119, 3, 120, 3, 120, 3, 121, 3, 121, 3, 121, 3, 122, 3, 122, 3, 123, 3, 123, 3, 124, 3, 124, 3, 124, 3, 125, 3, 125, 3, 125, 3, 125, 3, 126, 3, 126, 3, 126, 3, 126, 3, 126, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 3, 127, 5, 127, 1062, 10, 127, 3, 128, 3, 128, 3, 128, 7, 128, 1067, 10, 128, 12, 128, 14, 128, 1070, 11, 128, 3, 129, 3, 129, 5, 129, 1074, 10, 129, 3, 130, 3, 130, 3, 131, 3, 131, 3, 132, 3, 132, 5, 132, 1082, 10, 132, 3, 132, 3, 132, 5, 132, 1086, 10, 132, 3, 132, 3, 132, 5, 132, 1090, 10, 132, 3, 132, 3, 132, 5, 132, 1094, 10, 132, 5, 132, 1096, 10, 132, 3, 133, 3, 133, 5, 133, 1100, 10, 133, 3, 133, 7, 133, 1103, 10, 133, 12, 133, 14, 133, 1106, 11, 133, 3, 134, 3, 134, 5, 134, 1110, 10, 134, 3, 134, 7, 134, 1113, 10, 134, 12, 134, 14, 134, 1116, 11, 134, 3, 135, 3, 135, 3, 135, 3, 135, 5, 135, 1122, 10, 135, 3, 135, 3, 135, 5, 135, 1126, 10, 135, 3, 135, 7, 135, 1129, 10, 135, 12, 135, 14, 135, 1132, 11, 135, 3, 136, 3, 136, 3, 136, 3, 136, 5, 136, 1138, 10, 136, 3, 136, 3, 136, 5, 136, 1142, 10, 136, 3, 136, 7, 136, 1145, 10, 136, 12, 136, 14, 136, 1148, 11, 136, 3, 137, 3, 137, 3, 138, 3, 138, 3, 139, 3, 139, 3, 140, 3, 140, 3, 141, 3, 141, 5, 141, 1160, 10, 141, 3, 141, 3, 141, 5, 141, 1164, 10, 141, 3, 141, 3, 141, 5, 141, 1168, 10, 141, 3, 141, 3, 141, 5, 141, 1172, 10, 141, 5, 141, 1174, 10, 141, 3, 142, 3, 142, 3, 143, 3, 143, 3, 144, 3, 144, 3, 144, 3, 144, 5, 144, 1184, 10, 144, 3, 145, 3, 145, 6, 145, 1188, 10, 145, 13, 145, 14, 145, 1189, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 6, 145, 1197, 10, 145, 13, 145, 14, 145, 1198, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 6, 145, 1206, 10, 145, 13, 145, 14, 145, 1207, 3, 145, 3, 145, 3, 145, 3, 145, 3, 145, 6, 145, 1215, 10, 145, 13, 145, 14, 145, 1216, 3, 145, 3, 145, 5, 145, 1221, 10, 145, 3, 146, 3, 146, 3, 146, 5, 146, 1226, 10, 146, 3, 147, 3, 147, 3, 147, 5, 147, 1231, 10, 147, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 3, 148, 5, 148, 1255, 10, 148, 3, 149, 3, 149, 3, 149, 3, 149, 3, 149, 3, 149, 3, 149, 3, 149, 3, 149, 3, 149, 3, 149, 5, 149, 1268, 10, 149, 3, 150, 3, 150, 3, 150, 3, 150, 6, 150, 1274, 10, 150, 13, 150, 14, 150, 1275, 3, 151, 3, 151, 5, 151, 1280, 10, 151, 3, 151, 5, 151, 1283, 10, 151, 3, 151, 3, 151, 3, 151, 5, 151, 1288, 10, 151, 5, 151, 1290, 10, 151, 3, 152, 5, 152, 1293, 10, 152, 3, 152, 3, 152, 3, 152, 3, 152, 3, 152, 5, 152, 1300, 10, 152, 3, 153, 3, 153, 5, 153, 1304, 10, 153, 3, 153, 3, 153, 3, 153, 5, 153, 1309, 10, 153, 3, 153, 5, 153, 1312, 10, 153, 3, 154, 3, 154, 3, 155, 3, 155, 5, 155, 1318, 10, 155, 3, 155, 7, 155, 1321, 10, 155, 12, 155, 14, 155, 1324, 11, 155, 3, 156, 3, 156, 3, 157, 5, 157, 1329, 10, 157, 3, 157, 3, 157, 7, 157, 1333, 10, 157, 12, 157, 14, 157, 1336, 11, 157, 3, 157, 3, 157, 5, 157, 1340, 10, 157, 3, 157, 3, 157, 5, 157, 1344, 10, 157, 3, 158, 3, 158, 3, 158, 5, 158, 1349, 10, 158, 3, 159, 3, 159, 3, 159, 5, 159, 1354, 10, 159, 3, 160, 3, 160, 7, 160, 1358, 10, 160, 12, 160, 14, 160, 1361, 11, 160, 3, 160, 3, 160, 7, 160, 1365, 10, 160, 12, 160, 14, 160, 1368, 11, 160, 3, 160, 3, 160, 7, 160, 1372, 10, 160, 12, 160, 14, 160, 1375, 11, 160, 3, 160, 3, 160, 3, 161, 3, 161, 3, 161, 3, 161, 3, 161, 3, 161, 3, 161, 3, 161, 3, 161, 3, 161, 3, 161, 3, 161, 5, 161, 1391, 10, 161, 3, 162, 3, 162, 5, 162, 1395, 10, 162, 3, 162, 3, 162, 3, 162, 3, 162, 3, 162, 3, 162, 5, 162, 1403, 10, 162, 3, 163, 3, 163, 3, 163, 3, 164, 3, 164, 3, 164, 3, 165, 3, 165, 3, 166, 6, 166, 1414, 10, 166, 13, 166, 14, 166, 1415, 3, 166, 3, 166, 3, 167, 3, 167, 5, 167, 1422, 10, 167, 3, 167, 5, 167, 1425, 10, 167, 3, 167, 3, 167, 3, 168, 3, 168, 3, 168, 3, 168, 7, 168, 1433, 10, 168, 12, 168, 14, 168, 1436, 11, 168, 3, 168, 3, 168, 3, 168, 3, 168, 3, 168, 3, 169, 3, 169, 3, 169, 3, 169, 7, 169, 1447, 10, 169, 12, 169, 14, 169, 1450, 11, 169, 3, 169, 3, 169, 7, 343, 1359, 1366, 1373, 1434, 2, 170, 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, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 97, 50, 99, 51, 101, 52, 103, 53, 105, 54, 107, 55, 109, 56, 111, 57, 113, 58, 115, 59, 117, 60, 119, 61, 121, 62, 123, 63, 125, 64, 127, 65, 129, 66, 131, 67, 133, 68, 135, 69, 137, 70, 139, 71, 141, 72, 143, 73, 145, 74, 147, 75, 149, 76, 151, 77, 153, 78, 155, 79, 157, 80, 159, 81, 161, 82, 163, 83, 165, 84, 167, 85, 169, 86, 171, 87, 173, 88, 175, 89, 177, 90, 179, 91, 181, 92, 183, 93, 185, 94, 187, 95, 189, 96, 191, 97, 193, 98, 195, 99, 197, 100, 199, 101, 201, 102, 203, 103, 205, 104, 207, 105, 209, 106, 211, 107, 213, 108, 215, 109, 217, 110, 219, 111, 221, 112, 223, 113, 225, 114, 227, 115, 229, 116, 231, 117, 233, 118, 235, 119, 237, 120, 239, 121, 241, 122, 243, 123, 245, 124, 247, 125, 249, 126, 251, 2, 253, 2, 255, 127, 257, 2, 259, 2, 261, 2, 263, 128, 265, 129, 267, 130, 269, 131, 271, 132, 273, 2, 275, 2, 277, 2, 279, 2, 281, 133, 283, 2, 285, 2, 287, 2, 289, 134, 291, 2, 293, 2, 295, 2, 297, 2, 299, 2, 301, 135, 303, 2, 305, 2, 307, 2, 309, 2, 311, 2, 313, 136, 315, 2, 317, 2, 319, 2, 321, 137, 323, 138, 325, 139, 327, 140, 329, 2, 331, 141, 333, 142, 335, 143, 337, 144, 3, 2, 18, 3, 2, 12, 12, 5, 2, 67, 92, 97, 97, 99, 124, 3, 2, 50, 59, 3, 2, 51, 59, 3, 2, 50, 57, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 50, 51, 4, 2, 87, 87, 119, 119, 4, 2, 78, 78, 110, 110, 6, 2, 12, 12, 15, 15, 41, 41, 94, 94, 4, 2, 45, 45, 47, 47, 6, 2, 72, 72, 78, 78, 104, 104, 110, 110, 5, 2, 78, 78, 87, 87, 119, 119, 6, 2, 12, 12, 15, 15, 36, 36, 94, 94, 4, 2, 11, 11, 34, 34, 4, 2, 12, 12, 15, 15, 2, 1516, 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, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 2, 97, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 101, 3, 2, 2, 2, 2, 103, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 2, 107, 3, 2, 2, 2, 2, 109, 3, 2, 2, 2, 2, 111, 3, 2, 2, 2, 2, 113, 3, 2, 2, 2, 2, 115, 3, 2, 2, 2, 2, 117, 3, 2, 2, 2, 2, 119, 3, 2, 2, 2, 2, 121, 3, 2, 2, 2, 2, 123, 3, 2, 2, 2, 2, 125, 3, 2, 2, 2, 2, 127, 3, 2, 2, 2, 2, 129, 3, 2, 2, 2, 2, 131, 3, 2, 2, 2, 2, 133, 3, 2, 2, 2, 2, 135, 3, 2, 2, 2, 2, 137, 3, 2, 2, 2, 2, 139, 3, 2, 2, 2, 2, 141, 3, 2, 2, 2, 2, 143, 3, 2, 2, 2, 2, 145, 3, 2, 2, 2, 2, 147, 3, 2, 2, 2, 2, 149, 3, 2, 2, 2, 2, 151, 3, 2, 2, 2, 2, 153, 3, 2, 2, 2, 2, 155, 3, 2, 2, 2, 2, 157, 3, 2, 2, 2, 2, 159, 3, 2, 2, 2, 2, 161, 3, 2, 2, 2, 2, 163, 3, 2, 2, 2, 2, 165, 3, 2, 2, 2, 2, 167, 3, 2, 2, 2, 2, 169, 3, 2, 2, 2, 2, 171, 3, 2, 2, 2, 2, 173, 3, 2, 2, 2, 2, 175, 3, 2, 2, 2, 2, 177, 3, 2, 2, 2, 2, 179, 3, 2, 2, 2, 2, 181, 3, 2, 2, 2, 2, 183, 3, 2, 2, 2, 2, 185, 3, 2, 2, 2, 2, 187, 3, 2, 2, 2, 2, 189, 3, 2, 2, 2, 2, 191, 3, 2, 2, 2, 2, 193, 3, 2, 2, 2, 2, 195, 3, 2, 2, 2, 2, 197, 3, 2, 2, 2, 2, 199, 3, 2, 2, 2, 2, 201, 3, 2, 2, 2, 2, 203, 3, 2, 2, 2, 2, 205, 3, 2, 2, 2, 2, 207, 3, 2, 2, 2, 2, 209, 3, 2, 2, 2, 2, 211, 3, 2, 2, 2, 2, 213, 3, 2, 2, 2, 2, 215, 3, 2, 2, 2, 2, 217, 3, 2, 2, 2, 2, 219, 3, 2, 2, 2, 2, 221, 3, 2, 2, 2, 2, 223, 3, 2, 2, 2, 2, 225, 3, 2, 2, 2, 2, 227, 3, 2, 2, 2, 2, 229, 3, 2, 2, 2, 2, 231, 3, 2, 2, 2, 2, 233, 3, 2, 2, 2, 2, 235, 3, 2, 2, 2, 2, 237, 3, 2, 2, 2, 2, 239, 3, 2, 2, 2, 2, 241, 3, 2, 2, 2, 2, 243, 3, 2, 2, 2, 2, 245, 3, 2, 2, 2, 2, 247, 3, 2, 2, 2, 2, 249, 3, 2, 2, 2, 2, 255, 3, 2, 2, 2, 2, 263, 3, 2, 2, 2, 2, 265, 3, 2, 2, 2, 2, 267, 3, 2, 2, 2, 2, 269, 3, 2, 2, 2, 2, 271, 3, 2, 2, 2, 2, 281, 3, 2, 2, 2, 2, 289, 3, 2, 2, 2, 2, 301, 3, 2, 2, 2, 2, 313, 3, 2, 2, 2, 2, 321, 3, 2, 2, 2, 2, 323, 3, 2, 2, 2, 2, 325, 3, 2, 2, 2, 2, 327, 3, 2, 2, 2, 2, 331, 3, 2, 2, 2, 2, 333, 3, 2, 2, 2, 2, 335, 3, 2, 2, 2, 2, 337, 3, 2, 2, 2, 3, 339, 3, 2, 2, 2, 5, 362, 3, 2, 2, 2, 7, 371, 3, 2, 2, 2, 9, 379, 3, 2, 2, 2, 11, 387, 3, 2, 2, 2, 13, 391, 3, 2, 2, 2, 15, 396, 3, 2, 2, 2, 17, 401, 3, 2, 2, 2, 19, 407, 3, 2, 2, 2, 21, 412, 3, 2, 2, 2, 23, 418, 3, 2, 2, 2, 25, 423, 3, 2, 2, 2, 27, 432, 3, 2, 2, 2, 29, 441, 3, 2, 2, 2, 31, 447, 3, 2, 2, 2, 33, 453, 3, 2, 2, 2, 35, 463, 3, 2, 2, 2, 37, 474, 3, 2, 2, 2, 39, 483, 3, 2, 2, 2, 41, 492, 3, 2, 2, 2, 43, 500, 3, 2, 2, 2, 45, 507, 3, 2, 2, 2, 47, 510, 3, 2, 2, 2, 49, 517, 3, 2, 2, 2, 51, 530, 3, 2, 2, 2, 53, 535, 3, 2, 2, 2, 55, 540, 3, 2, 2, 2, 57, 549, 3, 2, 2, 2, 59, 556, 3, 2, 2, 2, 61, 563, 3, 2, 2, 2, 63, 569, 3, 2, 2, 2, 65, 575, 3, 2, 2, 2, 67, 581, 3, 2, 2, 2, 69, 585, 3, 2, 2, 2, 71, 592, 3, 2, 2, 2, 73, 597, 3, 2, 2, 2, 75, 600, 3, 2, 2, 2, 77, 607, 3, 2, 2, 2, 79, 611, 3, 2, 2, 2, 81, 616, 3, 2, 2, 2, 83, 624, 3, 2, 2, 2, 85, 634, 3, 2, 2, 2, 87, 638, 3, 2, 2, 2, 89, 658, 3, 2, 2, 2, 91, 660, 3, 2, 2, 2, 93, 669, 3, 2, 2, 2, 95, 678, 3, 2, 2, 2, 97, 686, 3, 2, 2, 2, 99, 696, 3, 2, 2, 2, 101, 703, 3, 2, 2, 2, 103, 712, 3, 2, 2, 2, 105, 729, 3, 2, 2, 2, 107, 736, 3, 2, 2, 2, 109, 742, 3, 2, 2, 2, 111, 749, 3, 2, 2, 2, 113, 756, 3, 2, 2, 2, 115, 763, 3, 2, 2, 2, 117, 777, 3, 2, 2, 2, 119, 789, 3, 2, 2, 2, 121, 796, 3, 2, 2, 2, 123, 803, 3, 2, 2, 2, 125, 812, 3, 2, 2, 2, 127, 817, 3, 2, 2, 2, 129, 830, 3, 2, 2, 2, 131, 836, 3, 2, 2, 2, 133, 841, 3, 2, 2, 2, 135, 845, 3, 2, 2, 2, 137, 853, 3, 2, 2, 2, 139, 860, 3, 2, 2, 2, 141, 869, 3, 2, 2, 2, 143, 875, 3, 2, 2, 2, 145, 884, 3, 2, 2, 2, 147, 890, 3, 2, 2, 2, 149, 898, 3, 2, 2, 2, 151, 903, 3, 2, 2, 2, 153, 912, 3, 2, 2, 2, 155, 920, 3, 2, 2, 2, 157, 926, 3, 2, 2, 2, 159, 928, 3, 2, 2, 2, 161, 930, 3, 2, 2, 2, 163, 932, 3, 2, 2, 2, 165, 934, 3, 2, 2, 2, 167, 936, 3, 2, 2, 2, 169, 938, 3, 2, 2, 2, 171, 940, 3, 2, 2, 2, 173, 942, 3, 2, 2, 2, 175, 944, 3, 2, 2, 2, 177, 946, 3, 2, 2, 2, 179, 948, 3, 2, 2, 2, 181, 950, 3, 2, 2, 2, 183, 952, 3, 2, 2, 2, 185, 954, 3, 2, 2, 2, 187, 956, 3, 2, 2, 2, 189, 958, 3, 2, 2, 2, 191, 960, 3, 2, 2, 2, 193, 962, 3, 2, 2, 2, 195, 964, 3, 2, 2, 2, 197, 967, 3, 2, 2, 2, 199, 970, 3, 2, 2, 2, 201, 973, 3, 2, 2, 2, 203, 976, 3, 2, 2, 2, 205, 979, 3, 2, 2, 2, 207, 982, 3, 2, 2, 2, 209, 985, 3, 2, 2, 2, 211, 988, 3, 2, 2, 2, 213, 991, 3, 2, 2, 2, 215, 995, 3, 2, 2, 2, 217, 998, 3, 2, 2, 2, 219, 1001, 3, 2, 2, 2, 221, 1004, 3, 2, 2, 2, 223, 1007, 3, 2, 2, 2, 225, 1010, 3, 2, 2, 2, 227, 1013, 3, 2, 2, 2, 229, 1016, 3, 2, 2, 2, 231, 1019, 3, 2, 2, 2, 233, 1021, 3, 2, 2, 2, 235, 1025, 3, 2, 2, 2, 237, 1028, 3, 2, 2, 2, 239, 1030, 3, 2, 2, 2, 241, 1032, 3, 2, 2, 2, 243, 1035, 3, 2, 2, 2, 245, 1037, 3, 2, 2, 2, 247, 1039, 3, 2, 2, 2, 249, 1042, 3, 2, 2, 2, 251, 1046, 3, 2, 2, 2, 253, 1061, 3, 2, 2, 2, 255, 1063, 3, 2, 2, 2, 257, 1073, 3, 2, 2, 2, 259, 1075, 3, 2, 2, 2, 261, 1077, 3, 2, 2, 2, 263, 1095, 3, 2, 2, 2, 265, 1097, 3, 2, 2, 2, 267, 1107, 3, 2, 2, 2, 269, 1121, 3, 2, 2, 2, 271, 1137, 3, 2, 2, 2, 273, 1149, 3, 2, 2, 2, 275, 1151, 3, 2, 2, 2, 277, 1153, 3, 2, 2, 2, 279, 1155, 3, 2, 2, 2, 281, 1173, 3, 2, 2, 2, 283, 1175, 3, 2, 2, 2, 285, 1177, 3, 2, 2, 2, 287, 1183, 3, 2, 2, 2, 289, 1220, 3, 2, 2, 2, 291, 1225, 3, 2, 2, 2, 293, 1230, 3, 2, 2, 2, 295, 1254, 3, 2, 2, 2, 297, 1267, 3, 2, 2, 2, 299, 1269, 3, 2, 2, 2, 301, 1289, 3, 2, 2, 2, 303, 1299, 3, 2, 2, 2, 305, 1311, 3, 2, 2, 2, 307, 1313, 3, 2, 2, 2, 309, 1315, 3, 2, 2, 2, 311, 1325, 3, 2, 2, 2, 313, 1343, 3, 2, 2, 2, 315, 1348, 3, 2, 2, 2, 317, 1353, 3, 2, 2, 2, 319, 1355, 3, 2, 2, 2, 321, 1390, 3, 2, 2, 2, 323, 1402, 3, 2, 2, 2, 325, 1404, 3, 2, 2, 2, 327, 1407, 3, 2, 2, 2, 329, 1410, 3, 2, 2, 2, 331, 1413, 3, 2, 2, 2, 333, 1424, 3, 2, 2, 2, 335, 1428, 3, 2, 2, 2, 337, 1442, 3, 2, 2, 2, 339, 351, 7, 37, 2, 2, 340, 342, 10, 2, 2, 2, 341, 340, 3, 2, 2, 2, 342, 345, 3, 2, 2, 2, 343, 344, 3, 2, 2, 2, 343, 341, 3, 2, 2, 2, 344, 346, 3, 2, 2, 2, 345, 343, 3, 2, 2, 2, 346, 348, 7, 94, 2, 2, 347, 349, 7, 15, 2, 2, 348, 347, 3, 2, 2, 2, 348, 349, 3, 2, 2, 2, 349, 350, 3, 2, 2, 2, 350, 352, 7, 12, 2, 2, 351, 343, 3, 2, 2, 2, 352, 353, 3, 2, 2, 2, 353, 351, 3, 2, 2, 2, 353, 354, 3, 2, 2, 2, 354, 356, 3, 2, 2, 2, 355, 357, 10, 2, 2, 2, 356, 355, 3, 2, 2, 2, 357, 358, 3, 2, 2, 2, 358, 356, 3, 2, 2, 2, 358, 359, 3, 2, 2, 2, 359, 360, 3, 2, 2, 2, 360, 361, 8, 2, 2, 2, 361, 4, 3, 2, 2, 2, 362, 366, 7, 37, 2, 2, 363, 365, 10, 2, 2, 2, 364, 363, 3, 2, 2, 2, 365, 368, 3, 2, 2, 2, 366, 364, 3, 2, 2, 2, 366, 367, 3, 2, 2, 2, 367, 369, 3, 2, 2, 2, 368, 366, 3, 2, 2, 2, 369, 370, 8, 3, 2, 2, 370, 6, 3, 2, 2, 2, 371, 372, 7, 99, 2, 2, 372, 373, 7, 110, 2, 2, 373, 374, 7, 107, 2, 2, 374, 375, 7, 105, 2, 2, 375, 376, 7, 112, 2, 2, 376, 377, 7, 99, 2, 2, 377, 378, 7, 117, 2, 2, 378, 8, 3, 2, 2, 2, 379, 380, 7, 99, 2, 2, 380, 381, 7, 110, 2, 2, 381, 382, 7, 107, 2, 2, 382, 383, 7, 105, 2, 2, 383, 384, 7, 112, 2, 2, 384, 385, 7, 113, 2, 2, 385, 386, 7, 104, 2, 2, 386, 10, 3, 2, 2, 2, 387, 388, 7, 99, 2, 2, 388, 389, 7, 117, 2, 2, 389, 390, 7, 111, 2, 2, 390, 12, 3, 2, 2, 2, 391, 392, 7, 99, 2, 2, 392, 393, 7, 119, 2, 2, 393, 394, 7, 118, 2, 2, 394, 395, 7, 113, 2, 2, 395, 14, 3, 2, 2, 2, 396, 397, 7, 100, 2, 2, 397, 398, 7, 113, 2, 2, 398, 399, 7, 113, 2, 2, 399, 400, 7, 110, 2, 2, 400, 16, 3, 2, 2, 2, 401, 402, 7, 100, 2, 2, 402, 403, 7, 116, 2, 2, 403, 404, 7, 103, 2, 2, 404, 405, 7, 99, 2, 2, 405, 406, 7, 109, 2, 2, 406, 18, 3, 2, 2, 2, 407, 408, 7, 101, 2, 2, 408, 409, 7, 99, 2, 2, 409, 410, 7, 117, 2, 2, 410, 411, 7, 103, 2, 2, 411, 20, 3, 2, 2, 2, 412, 413, 7, 101, 2, 2, 413, 414, 7, 99, 2, 2, 414, 415, 7, 118, 2, 2, 415, 416, 7, 101, 2, 2, 416, 417, 7, 106, 2, 2, 417, 22, 3, 2, 2, 2, 418, 419, 7, 101, 2, 2, 419, 420, 7, 106, 2, 2, 420, 421, 7, 99, 2, 2, 421, 422, 7, 116, 2, 2, 422, 24, 3, 2, 2, 2, 423, 424, 7, 101, 2, 2, 424, 425, 7, 106, 2, 2, 425, 426, 7, 99, 2, 2, 426, 427, 7, 116, 2, 2, 427, 428, 7, 51, 2, 2, 428, 429, 7, 56, 2, 2, 429, 430, 7, 97, 2, 2, 430, 431, 7, 118, 2, 2, 431, 26, 3, 2, 2, 2, 432, 433, 7, 101, 2, 2, 433, 434, 7, 106, 2, 2, 434, 435, 7, 99, 2, 2, 435, 436, 7, 116, 2, 2, 436, 437, 7, 53, 2, 2, 437, 438, 7, 52, 2, 2, 438, 439, 7, 97, 2, 2, 439, 440, 7, 118, 2, 2, 440, 28, 3, 2, 2, 2, 441, 442, 7, 101, 2, 2, 442, 443, 7, 110, 2, 2, 443, 444, 7, 99, 2, 2, 444, 445, 7, 117, 2, 2, 445, 446, 7, 117, 2, 2, 446, 30, 3, 2, 2, 2, 447, 448, 7, 101, 2, 2, 448, 449, 7, 113, 2, 2, 449, 450, 7, 112, 2, 2, 450, 451, 7, 117, 2, 2, 451, 452, 7, 118, 2, 2, 452, 32, 3, 2, 2, 2, 453, 454, 7, 101, 2, 2, 454, 455, 7, 113, 2, 2, 455, 456, 7, 112, 2, 2, 456, 457, 7, 117, 2, 2, 457, 458, 7, 118, 2, 2, 458, 459, 7, 103, 2, 2, 459, 460, 7, 122, 2, 2, 460, 461, 7, 114, 2, 2, 461, 462, 7, 116, 2, 2, 462, 34, 3, 2, 2, 2, 463, 464, 7, 101, 2, 2, 464, 465, 7, 113, 2, 2, 465, 466, 7, 112, 2, 2, 466, 467, 7, 117, 2, 2, 467, 468, 7, 118, 2, 2, 468, 469, 7, 97, 2, 2, 469, 470, 7, 101, 2, 2, 470, 471, 7, 99, 2, 2, 471, 472, 7, 117, 2, 2, 472, 473, 7, 118, 2, 2, 473, 36, 3, 2, 2, 2, 474, 475, 7, 101, 2, 2, 475, 476, 7, 113, 2, 2, 476, 477, 7, 112, 2, 2, 477, 478, 7, 118, 2, 2, 478, 479, 7, 107, 2, 2, 479, 480, 7, 112, 2, 2, 480, 481, 7, 119, 2, 2, 481, 482, 7, 103, 2, 2, 482, 38, 3, 2, 2, 2, 483, 484, 7, 102, 2, 2, 484, 485, 7, 103, 2, 2, 485, 486, 7, 101, 2, 2, 486, 487, 7, 110, 2, 2, 487, 488, 7, 118, 2, 2, 488, 489, 7, 123, 2, 2, 489, 490, 7, 114, 2, 2, 490, 491, 7, 103, 2, 2, 491, 40, 3, 2, 2, 2, 492, 493, 7, 102, 2, 2, 493, 494, 7, 103, 2, 2, 494, 495, 7, 104, 2, 2, 495, 496, 7, 99, 2, 2, 496, 497, 7, 119, 2, 2, 497, 498, 7, 110, 2, 2, 498, 499, 7, 118, 2, 2, 499, 42, 3, 2, 2, 2, 500, 501, 7, 102, 2, 2, 501, 502, 7, 103, 2, 2, 502, 503, 7, 110, 2, 2, 503, 504, 7, 103, 2, 2, 504, 505, 7, 118, 2, 2, 505, 506, 7, 103, 2, 2, 506, 44, 3, 2, 2, 2, 507, 508, 7, 102, 2, 2, 508, 509, 7, 113, 2, 2, 509, 46, 3, 2, 2, 2, 510, 511, 7, 102, 2, 2, 511, 512, 7, 113, 2, 2, 512, 513, 7, 119, 2, 2, 513, 514, 7, 100, 2, 2, 514, 515, 7, 110, 2, 2, 515, 516, 7, 103, 2, 2, 516, 48, 3, 2, 2, 2, 517, 518, 7, 102, 2, 2, 518, 519, 7, 123, 2, 2, 519, 520, 7, 112, 2, 2, 520, 521, 7, 99, 2, 2, 521, 522, 7, 111, 2, 2, 522, 523, 7, 107, 2, 2, 523, 524, 7, 101, 2, 2, 524, 525, 7, 97, 2, 2, 525, 526, 7, 101, 2, 2, 526, 527, 7, 99, 2, 2, 527, 528, 7, 117, 2, 2, 528, 529, 7, 118, 2, 2, 529, 50, 3, 2, 2, 2, 530, 531, 7, 103, 2, 2, 531, 532, 7, 110, 2, 2, 532, 533, 7, 117, 2, 2, 533, 534, 7, 103, 2, 2, 534, 52, 3, 2, 2, 2, 535, 536, 7, 103, 2, 2, 536, 537, 7, 112, 2, 2, 537, 538, 7, 119, 2, 2, 538, 539, 7, 111, 2, 2, 539, 54, 3, 2, 2, 2, 540, 541, 7, 103, 2, 2, 541, 542, 7, 122, 2, 2, 542, 543, 7, 114, 2, 2, 543, 544, 7, 110, 2, 2, 544, 545, 7, 107, 2, 2, 545, 546, 7, 101, 2, 2, 546, 547, 7, 107, 2, 2, 547, 548, 7, 118, 2, 2, 548, 56, 3, 2, 2, 2, 549, 550, 7, 103, 2, 2, 550, 551, 7, 122, 2, 2, 551, 552, 7, 114, 2, 2, 552, 553, 7, 113, 2, 2, 553, 554, 7, 116, 2, 2, 554, 555, 7, 118, 2, 2, 555, 58, 3, 2, 2, 2, 556, 557, 7, 103, 2, 2, 557, 558, 7, 122, 2, 2, 558, 559, 7, 118, 2, 2, 559, 560, 7, 103, 2, 2, 560, 561, 7, 116, 2, 2, 561, 562, 7, 112, 2, 2, 562, 60, 3, 2, 2, 2, 563, 564, 7, 104, 2, 2, 564, 565, 7, 99, 2, 2, 565, 566, 7, 110, 2, 2, 566, 567, 7, 117, 2, 2, 567, 568, 7, 103, 2, 2, 568, 62, 3, 2, 2, 2, 569, 570, 7, 104, 2, 2, 570, 571, 7, 107, 2, 2, 571, 572, 7, 112, 2, 2, 572, 573, 7, 99, 2, 2, 573, 574, 7, 110, 2, 2, 574, 64, 3, 2, 2, 2, 575, 576, 7, 104, 2, 2, 576, 577, 7, 110, 2, 2, 577, 578, 7, 113, 2, 2, 578, 579, 7, 99, 2, 2, 579, 580, 7, 118, 2, 2, 580, 66, 3, 2, 2, 2, 581, 582, 7, 104, 2, 2, 582, 583, 7, 113, 2, 2, 583, 584, 7, 116, 2, 2, 584, 68, 3, 2, 2, 2, 585, 586, 7, 104, 2, 2, 586, 587, 7, 116, 2, 2, 587, 588, 7, 107, 2, 2, 588, 589, 7, 103, 2, 2, 589, 590, 7, 112, 2, 2, 590, 591, 7, 102, 2, 2, 591, 70, 3, 2, 2, 2, 592, 593, 7, 105, 2, 2, 593, 594, 7, 113, 2, 2, 594, 595, 7, 118, 2, 2, 595, 596, 7, 113, 2, 2, 596, 72, 3, 2, 2, 2, 597, 598, 7, 107, 2, 2, 598, 599, 7, 104, 2, 2, 599, 74, 3, 2, 2, 2, 600, 601, 7, 107, 2, 2, 601, 602, 7, 112, 2, 2, 602, 603, 7, 110, 2, 2, 603, 604, 7, 107, 2, 2, 604, 605, 7, 112, 2, 2, 605, 606, 7, 103, 2, 2, 606, 76, 3, 2, 2, 2, 607, 608, 7, 107, 2, 2, 608, 609, 7, 112, 2, 2, 609, 610, 7, 118, 2, 2, 610, 78, 3, 2, 2, 2, 611, 612, 7, 110, 2, 2, 612, 613, 7, 113, 2, 2, 613, 614, 7, 112, 2, 2, 614, 615, 7, 105, 2, 2, 615, 80, 3, 2, 2, 2, 616, 617, 7, 111, 2, 2, 617, 618, 7, 119, 2, 2, 618, 619, 7, 118, 2, 2, 619, 620, 7, 99, 2, 2, 620, 621, 7, 100, 2, 2, 621, 622, 7, 110, 2, 2, 622, 623, 7, 103, 2, 2, 623, 82, 3, 2, 2, 2, 624, 625, 7, 112, 2, 2, 625, 626, 7, 99, 2, 2, 626, 627, 7, 111, 2, 2, 627, 628, 7, 103, 2, 2, 628, 629, 7, 117, 2, 2, 629, 630, 7, 114, 2, 2, 630, 631, 7, 99, 2, 2, 631, 632, 7, 101, 2, 2, 632, 633, 7, 103, 2, 2, 633, 84, 3, 2, 2, 2, 634, 635, 7, 112, 2, 2, 635, 636, 7, 103, 2, 2, 636, 637, 7, 121, 2, 2, 637, 86, 3, 2, 2, 2, 638, 639, 7, 112, 2, 2, 639, 640, 7, 113, 2, 2, 640, 641, 7, 103, 2, 2, 641, 642, 7, 122, 2, 2, 642, 643, 7, 101, 2, 2, 643, 644, 7, 103, 2, 2, 644, 645, 7, 114, 2, 2, 645, 646, 7, 118, 2, 2, 646, 88, 3, 2, 2, 2, 647, 648, 7, 112, 2, 2, 648, 649, 7, 119, 2, 2, 649, 650, 7, 110, 2, 2, 650, 651, 7, 110, 2, 2, 651, 652, 7, 114, 2, 2, 652, 653, 7, 118, 2, 2, 653, 659, 7, 116, 2, 2, 654, 655, 7, 80, 2, 2, 655, 656, 7, 87, 2, 2, 656, 657, 7, 78, 2, 2, 657, 659, 7, 78, 2, 2, 658, 647, 3, 2, 2, 2, 658, 654, 3, 2, 2, 2, 659, 90, 3, 2, 2, 2, 660, 661, 7, 113, 2, 2, 661, 662, 7, 114, 2, 2, 662, 663, 7, 103, 2, 2, 663, 664, 7, 116, 2, 2, 664, 665, 7, 99, 2, 2, 665, 666, 7, 118, 2, 2, 666, 667, 7, 113, 2, 2, 667, 668, 7, 116, 2, 2, 668, 92, 3, 2, 2, 2, 669, 670, 7, 113, 2, 2, 670, 671, 7, 120, 2, 2, 671, 672, 7, 103, 2, 2, 672, 673, 7, 116, 2, 2, 673, 674, 7, 116, 2, 2, 674, 675, 7, 107, 2, 2, 675, 676, 7, 102, 2, 2, 676, 677, 7, 103, 2, 2, 677, 94, 3, 2, 2, 2, 678, 679, 7, 114, 2, 2, 679, 680, 7, 116, 2, 2, 680, 681, 7, 107, 2, 2, 681, 682, 7, 120, 2, 2, 682, 683, 7, 99, 2, 2, 683, 684, 7, 118, 2, 2, 684, 685, 7, 103, 2, 2, 685, 96, 3, 2, 2, 2, 686, 687, 7, 114, 2, 2, 687, 688, 7, 116, 2, 2, 688, 689, 7, 113, 2, 2, 689, 690, 7, 118, 2, 2, 690, 691, 7, 103, 2, 2, 691, 692, 7, 101, 2, 2, 692, 693, 7, 118, 2, 2, 693, 694, 7, 103, 2, 2, 694, 695, 7, 102, 2, 2, 695, 98, 3, 2, 2, 2, 696, 697, 7, 114, 2, 2, 697, 698, 7, 119, 2, 2, 698, 699, 7, 100, 2, 2, 699, 700, 7, 110, 2, 2, 700, 701, 7, 107, 2, 2, 701, 702, 7, 101, 2, 2, 702, 100, 3, 2, 2, 2, 703, 704, 7, 116, 2, 2, 704, 705, 7, 103, 2, 2, 705, 706, 7, 105, 2, 2, 706, 707, 7, 107, 2, 2, 707, 708, 7, 117, 2, 2, 708, 709, 7, 118, 2, 2, 709, 710, 7, 103, 2, 2, 710, 711, 7, 116, 2, 2, 711, 102, 3, 2, 2, 2, 712, 713, 7, 116, 2, 2, 713, 714, 7, 103, 2, 2, 714, 715, 7, 107, 2, 2, 715, 716, 7, 112, 2, 2, 716, 717, 7, 118, 2, 2, 717, 718, 7, 103, 2, 2, 718, 719, 7, 116, 2, 2, 719, 720, 7, 114, 2, 2, 720, 721, 7, 116, 2, 2, 721, 722, 7, 103, 2, 2, 722, 723, 7, 118, 2, 2, 723, 724, 7, 97, 2, 2, 724, 725, 7, 101, 2, 2, 725, 726, 7, 99, 2, 2, 726, 727, 7, 117, 2, 2, 727, 728, 7, 118, 2, 2, 728, 104, 3, 2, 2, 2, 729, 730, 7, 116, 2, 2, 730, 731, 7, 103, 2, 2, 731, 732, 7, 118, 2, 2, 732, 733, 7, 119, 2, 2, 733, 734, 7, 116, 2, 2, 734, 735, 7, 112, 2, 2, 735, 106, 3, 2, 2, 2, 736, 737, 7, 117, 2, 2, 737, 738, 7, 106, 2, 2, 738, 739, 7, 113, 2, 2, 739, 740, 7, 116, 2, 2, 740, 741, 7, 118, 2, 2, 741, 108, 3, 2, 2, 2, 742, 743, 7, 117, 2, 2, 743, 744, 7, 107, 2, 2, 744, 745, 7, 105, 2, 2, 745, 746, 7, 112, 2, 2, 746, 747, 7, 103, 2, 2, 747, 748, 7, 102, 2, 2, 748, 110, 3, 2, 2, 2, 749, 750, 7, 117, 2, 2, 750, 751, 7, 107, 2, 2, 751, 752, 7, 124, 2, 2, 752, 753, 7, 103, 2, 2, 753, 754, 7, 113, 2, 2, 754, 755, 7, 104, 2, 2, 755, 112, 3, 2, 2, 2, 756, 757, 7, 117, 2, 2, 757, 758, 7, 118, 2, 2, 758, 759, 7, 99, 2, 2, 759, 760, 7, 118, 2, 2, 760, 761, 7, 107, 2, 2, 761, 762, 7, 101, 2, 2, 762, 114, 3, 2, 2, 2, 763, 764, 7, 117, 2, 2, 764, 765, 7, 118, 2, 2, 765, 766, 7, 99, 2, 2, 766, 767, 7, 118, 2, 2, 767, 768, 7, 107, 2, 2, 768, 769, 7, 101, 2, 2, 769, 770, 7, 97, 2, 2, 770, 771, 7, 99, 2, 2, 771, 772, 7, 117, 2, 2, 772, 773, 7, 117, 2, 2, 773, 774, 7, 103, 2, 2, 774, 775, 7, 116, 2, 2, 775, 776, 7, 118, 2, 2, 776, 116, 3, 2, 2, 2, 777, 778, 7, 117, 2, 2, 778, 779, 7, 118, 2, 2, 779, 780, 7, 99, 2, 2, 780, 781, 7, 118, 2, 2, 781, 782, 7, 107, 2, 2, 782, 783, 7, 101, 2, 2, 783, 784, 7, 97, 2, 2, 784, 785, 7, 101, 2, 2, 785, 786, 7, 99, 2, 2, 786, 787, 7, 117, 2, 2, 787, 788, 7, 118, 2, 2, 788, 118, 3, 2, 2, 2, 789, 790, 7, 117, 2, 2, 790, 791, 7, 118, 2, 2, 791, 792, 7, 116, 2, 2, 792, 793, 7, 119, 2, 2, 793, 794, 7, 101, 2, 2, 794, 795, 7, 118, 2, 2, 795, 120, 3, 2, 2, 2, 796, 797, 7, 117, 2, 2, 797, 798, 7, 121, 2, 2, 798, 799, 7, 107, 2, 2, 799, 800, 7, 118, 2, 2, 800, 801, 7, 101, 2, 2, 801, 802, 7, 106, 2, 2, 802, 122, 3, 2, 2, 2, 803, 804, 7, 118, 2, 2, 804, 805, 7, 103, 2, 2, 805, 806, 7, 111, 2, 2, 806, 807, 7, 114, 2, 2, 807, 808, 7, 110, 2, 2, 808, 809, 7, 99, 2, 2, 809, 810, 7, 118, 2, 2, 810, 811, 7, 103, 2, 2, 811, 124, 3, 2, 2, 2, 812, 813, 7, 118, 2, 2, 813, 814, 7, 106, 2, 2, 814, 815, 7, 107, 2, 2, 815, 816, 7, 117, 2, 2, 816, 126, 3, 2, 2, 2, 817, 818, 7, 118, 2, 2, 818, 819, 7, 106, 2, 2, 819, 820, 7, 116, 2, 2, 820, 821, 7, 103, 2, 2, 821, 822, 7, 99, 2, 2, 822, 823, 7, 102, 2, 2, 823, 824, 7, 97, 2, 2, 824, 825, 7, 110, 2, 2, 825, 826, 7, 113, 2, 2, 826, 827, 7, 101, 2, 2, 827, 828, 7, 99, 2, 2, 828, 829, 7, 110, 2, 2, 829, 128, 3, 2, 2, 2, 830, 831, 7, 118, 2, 2, 831, 832, 7, 106, 2, 2, 832, 833, 7, 116, 2, 2, 833, 834, 7, 113, 2, 2, 834, 835, 7, 121, 2, 2, 835, 130, 3, 2, 2, 2, 836, 837, 7, 118, 2, 2, 837, 838, 7, 116, 2, 2, 838, 839, 7, 119, 2, 2, 839, 840, 7, 103, 2, 2, 840, 132, 3, 2, 2, 2, 841, 842, 7, 118, 2, 2, 842, 843, 7, 116, 2, 2, 843, 844, 7, 123, 2, 2, 844, 134, 3, 2, 2, 2, 845, 846, 7, 118, 2, 2, 846, 847, 7, 123, 2, 2, 847, 848, 7, 114, 2, 2, 848, 849, 7, 103, 2, 2, 849, 850, 7, 102, 2, 2, 850, 851, 7, 103, 2, 2, 851, 852, 7, 104, 2, 2, 852, 136, 3, 2, 2, 2, 853, 854, 7, 118, 2, 2, 854, 855, 7, 123, 2, 2, 855, 856, 7, 114, 2, 2, 856, 857, 7, 103, 2, 2, 857, 858, 7, 107, 2, 2, 858, 859, 7, 102, 2, 2, 859, 138, 3, 2, 2, 2, 860, 861, 7, 118, 2, 2, 861, 862, 7, 123, 2, 2, 862, 863, 7, 114, 2, 2, 863, 864, 7, 103, 2, 2, 864, 865, 7, 112, 2, 2, 865, 866, 7, 99, 2, 2, 866, 867, 7, 111, 2, 2, 867, 868, 7, 103, 2, 2, 868, 140, 3, 2, 2, 2, 869, 870, 7, 119, 2, 2, 870, 871, 7, 112, 2, 2, 871, 872, 7, 107, 2, 2, 872, 873, 7, 113, 2, 2, 873, 874, 7, 112, 2, 2, 874, 142, 3, 2, 2, 2, 875, 876, 7, 119, 2, 2, 876, 877, 7, 112, 2, 2, 877, 878, 7, 117, 2, 2, 878, 879, 7, 107, 2, 2, 879, 880, 7, 105, 2, 2, 880, 881, 7, 112, 2, 2, 881, 882, 7, 103, 2, 2, 882, 883, 7, 102, 2, 2, 883, 144, 3, 2, 2, 2, 884, 885, 7, 119, 2, 2, 885, 886, 7, 117, 2, 2, 886, 887, 7, 107, 2, 2, 887, 888, 7, 112, 2, 2, 888, 889, 7, 105, 2, 2, 889, 146, 3, 2, 2, 2, 890, 891, 7, 120, 2, 2, 891, 892, 7, 107, 2, 2, 892, 893, 7, 116, 2, 2, 893, 894, 7, 118, 2, 2, 894, 895, 7, 119, 2, 2, 895, 896, 7, 99, 2, 2, 896, 897, 7, 110, 2, 2, 897, 148, 3, 2, 2, 2, 898, 899, 7, 120, 2, 2, 899, 900, 7, 113, 2, 2, 900, 901, 7, 107, 2, 2, 901, 902, 7, 102, 2, 2, 902, 150, 3, 2, 2, 2, 903, 904, 7, 120, 2, 2, 904, 905, 7, 113, 2, 2, 905, 906, 7, 110, 2, 2, 906, 907, 7, 99, 2, 2, 907, 908, 7, 118, 2, 2, 908, 909, 7, 107, 2, 2, 909, 910, 7, 110, 2, 2, 910, 911, 7, 103, 2, 2, 911, 152, 3, 2, 2, 2, 912, 913, 7, 121, 2, 2, 913, 914, 7, 101, 2, 2, 914, 915, 7, 106, 2, 2, 915, 916, 7, 99, 2, 2, 916, 917, 7, 116, 2, 2, 917, 918, 7, 97, 2, 2, 918, 919, 7, 118, 2, 2, 919, 154, 3, 2, 2, 2, 920, 921, 7, 121, 2, 2, 921, 922, 7, 106, 2, 2, 922, 923, 7, 107, 2, 2, 923, 924, 7, 110, 2, 2, 924, 925, 7, 103, 2, 2, 925, 156, 3, 2, 2, 2, 926, 927, 7, 42, 2, 2, 927, 158, 3, 2, 2, 2, 928, 929, 7, 43, 2, 2, 929, 160, 3, 2, 2, 2, 930, 931, 7, 93, 2, 2, 931, 162, 3, 2, 2, 2, 932, 933, 7, 95, 2, 2, 933, 164, 3, 2, 2, 2, 934, 935, 7, 125, 2, 2, 935, 166, 3, 2, 2, 2, 936, 937, 7, 127, 2, 2, 937, 168, 3, 2, 2, 2, 938, 939, 7, 45, 2, 2, 939, 170, 3, 2, 2, 2, 940, 941, 7, 47, 2, 2, 941, 172, 3, 2, 2, 2, 942, 943, 7, 44, 2, 2, 943, 174, 3, 2, 2, 2, 944, 945, 7, 49, 2, 2, 945, 176, 3, 2, 2, 2, 946, 947, 7, 39, 2, 2, 947, 178, 3, 2, 2, 2, 948, 949, 7, 96, 2, 2, 949, 180, 3, 2, 2, 2, 950, 951, 7, 40, 2, 2, 951, 182, 3, 2, 2, 2, 952, 953, 7, 126, 2, 2, 953, 184, 3, 2, 2, 2, 954, 955, 7, 128, 2, 2, 955, 186, 3, 2, 2, 2, 956, 957, 7, 35, 2, 2, 957, 188, 3, 2, 2, 2, 958, 959, 7, 63, 2, 2, 959, 190, 3, 2, 2, 2, 960, 961, 7, 62, 2, 2, 961, 192, 3, 2, 2, 2, 962, 963, 7, 64, 2, 2, 963, 194, 3, 2, 2, 2, 964, 965, 7, 45, 2, 2, 965, 966, 7, 63, 2, 2, 966, 196, 3, 2, 2, 2, 967, 968, 7, 47, 2, 2, 968, 969, 7, 63, 2, 2, 969, 198, 3, 2, 2, 2, 970, 971, 7, 44, 2, 2, 971, 972, 7, 63, 2, 2, 972, 200, 3, 2, 2, 2, 973, 974, 7, 49, 2, 2, 974, 975, 7, 63, 2, 2, 975, 202, 3, 2, 2, 2, 976, 977, 7, 39, 2, 2, 977, 978, 7, 63, 2, 2, 978, 204, 3, 2, 2, 2, 979, 980, 7, 96, 2, 2, 980, 981, 7, 63, 2, 2, 981, 206, 3, 2, 2, 2, 982, 983, 7, 40, 2, 2, 983, 984, 7, 63, 2, 2, 984, 208, 3, 2, 2, 2, 985, 986, 7, 126, 2, 2, 986, 987, 7, 63, 2, 2, 987, 210, 3, 2, 2, 2, 988, 989, 7, 62, 2, 2, 989, 990, 7, 62, 2, 2, 990, 212, 3, 2, 2, 2, 991, 992, 7, 62, 2, 2, 992, 993, 7, 62, 2, 2, 993, 994, 7, 63, 2, 2, 994, 214, 3, 2, 2, 2, 995, 996, 7, 63, 2, 2, 996, 997, 7, 63, 2, 2, 997, 216, 3, 2, 2, 2, 998, 999, 7, 35, 2, 2, 999, 1000, 7, 63, 2, 2, 1000, 218, 3, 2, 2, 2, 1001, 1002, 7, 62, 2, 2, 1002, 1003, 7, 63, 2, 2, 1003, 220, 3, 2, 2, 2, 1004, 1005, 7, 64, 2, 2, 1005, 1006, 7, 63, 2, 2, 1006, 222, 3, 2, 2, 2, 1007, 1008, 7, 40, 2, 2, 1008, 1009, 7, 40, 2, 2, 1009, 224, 3, 2, 2, 2, 1010, 1011, 7, 126, 2, 2, 1011, 1012, 7, 126, 2, 2, 1012, 226, 3, 2, 2, 2, 1013, 1014, 7, 45, 2, 2, 1014, 1015, 7, 45, 2, 2, 1015, 228, 3, 2, 2, 2, 1016, 1017, 7, 47, 2, 2, 1017, 1018, 7, 47, 2, 2, 1018, 230, 3, 2, 2, 2, 1019, 1020, 7, 46, 2, 2, 1020, 232, 3, 2, 2, 2, 1021, 1022, 7, 47, 2, 2, 1022, 1023, 7, 64, 2, 2, 1023, 1024, 7, 44, 2, 2, 1024, 234, 3, 2, 2, 2, 1025, 1026, 7, 47, 2, 2, 1026, 1027, 7, 64, 2, 2, 1027, 236, 3, 2, 2, 2, 1028, 1029, 7, 65, 2, 2, 1029, 238, 3, 2, 2, 2, 1030, 1031, 7, 60, 2, 2, 1031, 240, 3, 2, 2, 2, 1032, 1033, 7, 60, 2, 2, 1033, 1034, 7, 60, 2, 2, 1034, 242, 3, 2, 2, 2, 1035, 1036, 7, 61, 2, 2, 1036, 244, 3, 2, 2, 2, 1037, 1038, 7, 48, 2, 2, 1038, 246, 3, 2, 2, 2, 1039, 1040, 7, 48, 2, 2, 1040, 1041, 7, 44, 2, 2, 1041, 248, 3, 2, 2, 2, 1042, 1043, 7, 48, 2, 2, 1043, 1044, 7, 48, 2, 2, 1044, 1045, 7, 48, 2, 2, 1045, 250, 3, 2, 2, 2, 1046, 1047, 5, 277, 139, 2, 1047, 1048, 5, 277, 139, 2, 1048, 1049, 5, 277, 139, 2, 1049, 1050, 5, 277, 139, 2, 1050, 252, 3, 2, 2, 2, 1051, 1052, 7, 94, 2, 2, 1052, 1053, 7, 119, 2, 2, 1053, 1054, 3, 2, 2, 2, 1054, 1062, 5, 251, 126, 2, 1055, 1056, 7, 94, 2, 2, 1056, 1057, 7, 87, 2, 2, 1057, 1058, 3, 2, 2, 2, 1058, 1059, 5, 251, 126, 2, 1059, 1060, 5, 251, 126, 2, 1060, 1062, 3, 2, 2, 2, 1061, 1051, 3, 2, 2, 2, 1061, 1055, 3, 2, 2, 2, 1062, 254, 3, 2, 2, 2, 1063, 1068, 5, 257, 129, 2, 1064, 1067, 5, 257, 129, 2, 1065, 1067, 5, 261, 131, 2, 1066, 1064, 3, 2, 2, 2, 1066, 1065, 3, 2, 2, 2, 1067, 1070, 3, 2, 2, 2, 1068, 1066, 3, 2, 2, 2, 1068, 1069, 3, 2, 2, 2, 1069, 256, 3, 2, 2, 2, 1070, 1068, 3, 2, 2, 2, 1071, 1074, 5, 259, 130, 2, 1072, 1074, 5, 253, 127, 2, 1073, 1071, 3, 2, 2, 2, 1073, 1072, 3, 2, 2, 2, 1074, 258, 3, 2, 2, 2, 1075, 1076, 9, 3, 2, 2, 1076, 260, 3, 2, 2, 2, 1077, 1078, 9, 4, 2, 2, 1078, 262, 3, 2, 2, 2, 1079, 1081, 5, 265, 133, 2, 1080, 1082, 5, 281, 141, 2, 1081, 1080, 3, 2, 2, 2, 1081, 1082, 3, 2, 2, 2, 1082, 1096, 3, 2, 2, 2, 1083, 1085, 5, 267, 134, 2, 1084, 1086, 5, 281, 141, 2, 1085, 1084, 3, 2, 2, 2, 1085, 1086, 3, 2, 2, 2, 1086, 1096, 3, 2, 2, 2, 1087, 1089, 5, 269, 135, 2, 1088, 1090, 5, 281, 141, 2, 1089, 1088, 3, 2, 2, 2, 1089, 1090, 3, 2, 2, 2, 1090, 1096, 3, 2, 2, 2, 1091, 1093, 5, 271, 136, 2, 1092, 1094, 5, 281, 141, 2, 1093, 1092, 3, 2, 2, 2, 1093, 1094, 3, 2, 2, 2, 1094, 1096, 3, 2, 2, 2, 1095, 1079, 3, 2, 2, 2, 1095, 1083, 3, 2, 2, 2, 1095, 1087, 3, 2, 2, 2, 1095, 1091, 3, 2, 2, 2, 1096, 264, 3, 2, 2, 2, 1097, 1104, 5, 273, 137, 2, 1098, 1100, 7, 41, 2, 2, 1099, 1098, 3, 2, 2, 2, 1099, 1100, 3, 2, 2, 2, 1100, 1101, 3, 2, 2, 2, 1101, 1103, 5, 261, 131, 2, 1102, 1099, 3, 2, 2, 2, 1103, 1106, 3, 2, 2, 2, 1104, 1102, 3, 2, 2, 2, 1104, 1105, 3, 2, 2, 2, 1105, 266, 3, 2, 2, 2, 1106, 1104, 3, 2, 2, 2, 1107, 1114, 7, 50, 2, 2, 1108, 1110, 7, 41, 2, 2, 1109, 1108, 3, 2, 2, 2, 1109, 1110, 3, 2, 2, 2, 1110, 1111, 3, 2, 2, 2, 1111, 1113, 5, 275, 138, 2, 1112, 1109, 3, 2, 2, 2, 1113, 1116, 3, 2, 2, 2, 1114, 1112, 3, 2, 2, 2, 1114, 1115, 3, 2, 2, 2, 1115, 268, 3, 2, 2, 2, 1116, 1114, 3, 2, 2, 2, 1117, 1118, 7, 50, 2, 2, 1118, 1122, 7, 122, 2, 2, 1119, 1120, 7, 50, 2, 2, 1120, 1122, 7, 90, 2, 2, 1121, 1117, 3, 2, 2, 2, 1121, 1119, 3, 2, 2, 2, 1122, 1123, 3, 2, 2, 2, 1123, 1130, 5, 277, 139, 2, 1124, 1126, 7, 41, 2, 2, 1125, 1124, 3, 2, 2, 2, 1125, 1126, 3, 2, 2, 2, 1126, 1127, 3, 2, 2, 2, 1127, 1129, 5, 277, 139, 2, 1128, 1125, 3, 2, 2, 2, 1129, 1132, 3, 2, 2, 2, 1130, 1128, 3, 2, 2, 2, 1130, 1131, 3, 2, 2, 2, 1131, 270, 3, 2, 2, 2, 1132, 1130, 3, 2, 2, 2, 1133, 1134, 7, 50, 2, 2, 1134, 1138, 7, 100, 2, 2, 1135, 1136, 7, 50, 2, 2, 1136, 1138, 7, 68, 2, 2, 1137, 1133, 3, 2, 2, 2, 1137, 1135, 3, 2, 2, 2, 1138, 1139, 3, 2, 2, 2, 1139, 1146, 5, 279, 140, 2, 1140, 1142, 7, 41, 2, 2, 1141, 1140, 3, 2, 2, 2, 1141, 1142, 3, 2, 2, 2, 1142, 1143, 3, 2, 2, 2, 1143, 1145, 5, 279, 140, 2, 1144, 1141, 3, 2, 2, 2, 1145, 1148, 3, 2, 2, 2, 1146, 1144, 3, 2, 2, 2, 1146, 1147, 3, 2, 2, 2, 1147, 272, 3, 2, 2, 2, 1148, 1146, 3, 2, 2, 2, 1149, 1150, 9, 5, 2, 2, 1150, 274, 3, 2, 2, 2, 1151, 1152, 9, 6, 2, 2, 1152, 276, 3, 2, 2, 2, 1153, 1154, 9, 7, 2, 2, 1154, 278, 3, 2, 2, 2, 1155, 1156, 9, 8, 2, 2, 1156, 280, 3, 2, 2, 2, 1157, 1159, 5, 283, 142, 2, 1158, 1160, 5, 285, 143, 2, 1159, 1158, 3, 2, 2, 2, 1159, 1160, 3, 2, 2, 2, 1160, 1174, 3, 2, 2, 2, 1161, 1163, 5, 283, 142, 2, 1162, 1164, 5, 287, 144, 2, 1163, 1162, 3, 2, 2, 2, 1163, 1164, 3, 2, 2, 2, 1164, 1174, 3, 2, 2, 2, 1165, 1167, 5, 285, 143, 2, 1166, 1168, 5, 283, 142, 2, 1167, 1166, 3, 2, 2, 2, 1167, 1168, 3, 2, 2, 2, 1168, 1174, 3, 2, 2, 2, 1169, 1171, 5, 287, 144, 2, 1170, 1172, 5, 283, 142, 2, 1171, 1170, 3, 2, 2, 2, 1171, 1172, 3, 2, 2, 2, 1172, 1174, 3, 2, 2, 2, 1173, 1157, 3, 2, 2, 2, 1173, 1161, 3, 2, 2, 2, 1173, 1165, 3, 2, 2, 2, 1173, 1169, 3, 2, 2, 2, 1174, 282, 3, 2, 2, 2, 1175, 1176, 9, 9, 2, 2, 1176, 284, 3, 2, 2, 2, 1177, 1178, 9, 10, 2, 2, 1178, 286, 3, 2, 2, 2, 1179, 1180, 7, 110, 2, 2, 1180, 1184, 7, 110, 2, 2, 1181, 1182, 7, 78, 2, 2, 1182, 1184, 7, 78, 2, 2, 1183, 1179, 3, 2, 2, 2, 1183, 1181, 3, 2, 2, 2, 1184, 288, 3, 2, 2, 2, 1185, 1187, 7, 41, 2, 2, 1186, 1188, 5, 291, 146, 2, 1187, 1186, 3, 2, 2, 2, 1188, 1189, 3, 2, 2, 2, 1189, 1187, 3, 2, 2, 2, 1189, 1190, 3, 2, 2, 2, 1190, 1191, 3, 2, 2, 2, 1191, 1192, 7, 41, 2, 2, 1192, 1221, 3, 2, 2, 2, 1193, 1194, 7, 119, 2, 2, 1194, 1196, 7, 41, 2, 2, 1195, 1197, 5, 291, 146, 2, 1196, 1195, 3, 2, 2, 2, 1197, 1198, 3, 2, 2, 2, 1198, 1196, 3, 2, 2, 2, 1198, 1199, 3, 2, 2, 2, 1199, 1200, 3, 2, 2, 2, 1200, 1201, 7, 41, 2, 2, 1201, 1221, 3, 2, 2, 2, 1202, 1203, 7, 87, 2, 2, 1203, 1205, 7, 41, 2, 2, 1204, 1206, 5, 291, 146, 2, 1205, 1204, 3, 2, 2, 2, 1206, 1207, 3, 2, 2, 2, 1207, 1205, 3, 2, 2, 2, 1207, 1208, 3, 2, 2, 2, 1208, 1209, 3, 2, 2, 2, 1209, 1210, 7, 41, 2, 2, 1210, 1221, 3, 2, 2, 2, 1211, 1212, 7, 78, 2, 2, 1212, 1214, 7, 41, 2, 2, 1213, 1215, 5, 291, 146, 2, 1214, 1213, 3, 2, 2, 2, 1215, 1216, 3, 2, 2, 2, 1216, 1214, 3, 2, 2, 2, 1216, 1217, 3, 2, 2, 2, 1217, 1218, 3, 2, 2, 2, 1218, 1219, 7, 41, 2, 2, 1219, 1221, 3, 2, 2, 2, 1220, 1185, 3, 2, 2, 2, 1220, 1193, 3, 2, 2, 2, 1220, 1202, 3, 2, 2, 2, 1220, 1211, 3, 2, 2, 2, 1221, 290, 3, 2, 2, 2, 1222, 1226, 10, 11, 2, 2, 1223, 1226, 5, 293, 147, 2, 1224, 1226, 5, 253, 127, 2, 1225, 1222, 3, 2, 2, 2, 1225, 1223, 3, 2, 2, 2, 1225, 1224, 3, 2, 2, 2, 1226, 292, 3, 2, 2, 2, 1227, 1231, 5, 295, 148, 2, 1228, 1231, 5, 297, 149, 2, 1229, 1231, 5, 299, 150, 2, 1230, 1227, 3, 2, 2, 2, 1230, 1228, 3, 2, 2, 2, 1230, 1229, 3, 2, 2, 2, 1231, 294, 3, 2, 2, 2, 1232, 1233, 7, 94, 2, 2, 1233, 1255, 7, 41, 2, 2, 1234, 1235, 7, 94, 2, 2, 1235, 1255, 7, 36, 2, 2, 1236, 1237, 7, 94, 2, 2, 1237, 1255, 7, 65, 2, 2, 1238, 1239, 7, 94, 2, 2, 1239, 1255, 7, 94, 2, 2, 1240, 1241, 7, 94, 2, 2, 1241, 1255, 7, 99, 2, 2, 1242, 1243, 7, 94, 2, 2, 1243, 1255, 7, 100, 2, 2, 1244, 1245, 7, 94, 2, 2, 1245, 1255, 7, 104, 2, 2, 1246, 1247, 7, 94, 2, 2, 1247, 1255, 7, 112, 2, 2, 1248, 1249, 7, 94, 2, 2, 1249, 1255, 7, 116, 2, 2, 1250, 1251, 7, 94, 2, 2, 1251, 1255, 7, 118, 2, 2, 1252, 1253, 7, 94, 2, 2, 1253, 1255, 7, 120, 2, 2, 1254, 1232, 3, 2, 2, 2, 1254, 1234, 3, 2, 2, 2, 1254, 1236, 3, 2, 2, 2, 1254, 1238, 3, 2, 2, 2, 1254, 1240, 3, 2, 2, 2, 1254, 1242, 3, 2, 2, 2, 1254, 1244, 3, 2, 2, 2, 1254, 1246, 3, 2, 2, 2, 1254, 1248, 3, 2, 2, 2, 1254, 1250, 3, 2, 2, 2, 1254, 1252, 3, 2, 2, 2, 1255, 296, 3, 2, 2, 2, 1256, 1257, 7, 94, 2, 2, 1257, 1268, 5, 275, 138, 2, 1258, 1259, 7, 94, 2, 2, 1259, 1260, 5, 275, 138, 2, 1260, 1261, 5, 275, 138, 2, 1261, 1268, 3, 2, 2, 2, 1262, 1263, 7, 94, 2, 2, 1263, 1264, 5, 275, 138, 2, 1264, 1265, 5, 275, 138, 2, 1265, 1266, 5, 275, 138, 2, 1266, 1268, 3, 2, 2, 2, 1267, 1256, 3, 2, 2, 2, 1267, 1258, 3, 2, 2, 2, 1267, 1262, 3, 2, 2, 2, 1268, 298, 3, 2, 2, 2, 1269, 1270, 7, 94, 2, 2, 1270, 1271, 7, 122, 2, 2, 1271, 1273, 3, 2, 2, 2, 1272, 1274, 5, 277, 139, 2, 1273, 1272, 3, 2, 2, 2, 1274, 1275, 3, 2, 2, 2, 1275, 1273, 3, 2, 2, 2, 1275, 1276, 3, 2, 2, 2, 1276, 300, 3, 2, 2, 2, 1277, 1279, 5, 303, 152, 2, 1278, 1280, 5, 305, 153, 2, 1279, 1278, 3, 2, 2, 2, 1279, 1280, 3, 2, 2, 2, 1280, 1282, 3, 2, 2, 2, 1281, 1283, 5, 311, 156, 2, 1282, 1281, 3, 2, 2, 2, 1282, 1283, 3, 2, 2, 2, 1283, 1290, 3, 2, 2, 2, 1284, 1285, 5, 309, 155, 2, 1285, 1287, 5, 305, 153, 2, 1286, 1288, 5, 311, 156, 2, 1287, 1286, 3, 2, 2, 2, 1287, 1288, 3, 2, 2, 2, 1288, 1290, 3, 2, 2, 2, 1289, 1277, 3, 2, 2, 2, 1289, 1284, 3, 2, 2, 2, 1290, 302, 3, 2, 2, 2, 1291, 1293, 5, 309, 155, 2, 1292, 1291, 3, 2, 2, 2, 1292, 1293, 3, 2, 2, 2, 1293, 1294, 3, 2, 2, 2, 1294, 1295, 7, 48, 2, 2, 1295, 1300, 5, 309, 155, 2, 1296, 1297, 5, 309, 155, 2, 1297, 1298, 7, 48, 2, 2, 1298, 1300, 3, 2, 2, 2, 1299, 1292, 3, 2, 2, 2, 1299, 1296, 3, 2, 2, 2, 1300, 304, 3, 2, 2, 2, 1301, 1303, 7, 103, 2, 2, 1302, 1304, 5, 307, 154, 2, 1303, 1302, 3, 2, 2, 2, 1303, 1304, 3, 2, 2, 2, 1304, 1305, 3, 2, 2, 2, 1305, 1312, 5, 309, 155, 2, 1306, 1308, 7, 71, 2, 2, 1307, 1309, 5, 307, 154, 2, 1308, 1307, 3, 2, 2, 2, 1308, 1309, 3, 2, 2, 2, 1309, 1310, 3, 2, 2, 2, 1310, 1312, 5, 309, 155, 2, 1311, 1301, 3, 2, 2, 2, 1311, 1306, 3, 2, 2, 2, 1312, 306, 3, 2, 2, 2, 1313, 1314, 9, 12, 2, 2, 1314, 308, 3, 2, 2, 2, 1315, 1322, 5, 261, 131, 2, 1316, 1318, 7, 41, 2, 2, 1317, 1316, 3, 2, 2, 2, 1317, 1318, 3, 2, 2, 2, 1318, 1319, 3, 2, 2, 2, 1319, 1321, 5, 261, 131, 2, 1320, 1317, 3, 2, 2, 2, 1321, 1324, 3, 2, 2, 2, 1322, 1320, 3, 2, 2, 2, 1322, 1323, 3, 2, 2, 2, 1323, 310, 3, 2, 2, 2, 1324, 1322, 3, 2, 2, 2, 1325, 1326, 9, 13, 2, 2, 1326, 312, 3, 2, 2, 2, 1327, 1329, 5, 315, 158, 2, 1328, 1327, 3, 2, 2, 2, 1328, 1329, 3, 2, 2, 2, 1329, 1330, 3, 2, 2, 2, 1330, 1334, 7, 36, 2, 2, 1331, 1333, 5, 317, 159, 2, 1332, 1331, 3, 2, 2, 2, 1333, 1336, 3, 2, 2, 2, 1334, 1332, 3, 2, 2, 2, 1334, 1335, 3, 2, 2, 2, 1335, 1337, 3, 2, 2, 2, 1336, 1334, 3, 2, 2, 2, 1337, 1344, 7, 36, 2, 2, 1338, 1340, 5, 315, 158, 2, 1339, 1338, 3, 2, 2, 2, 1339, 1340, 3, 2, 2, 2, 1340, 1341, 3, 2, 2, 2, 1341, 1342, 7, 84, 2, 2, 1342, 1344, 5, 319, 160, 2, 1343, 1328, 3, 2, 2, 2, 1343, 1339, 3, 2, 2, 2, 1344, 314, 3, 2, 2, 2, 1345, 1346, 7, 119, 2, 2, 1346, 1349, 7, 58, 2, 2, 1347, 1349, 9, 14, 2, 2, 1348, 1345, 3, 2, 2, 2, 1348, 1347, 3, 2, 2, 2, 1349, 316, 3, 2, 2, 2, 1350, 1354, 10, 15, 2, 2, 1351, 1354, 5, 293, 147, 2, 1352, 1354, 5, 253, 127, 2, 1353, 1350, 3, 2, 2, 2, 1353, 1351, 3, 2, 2, 2, 1353, 1352, 3, 2, 2, 2, 1354, 318, 3, 2, 2, 2, 1355, 1359, 7, 36, 2, 2, 1356, 1358, 11, 2, 2, 2, 1357, 1356, 3, 2, 2, 2, 1358, 1361, 3, 2, 2, 2, 1359, 1360, 3, 2, 2, 2, 1359, 1357, 3, 2, 2, 2, 1360, 1362, 3, 2, 2, 2, 1361, 1359, 3, 2, 2, 2, 1362, 1366, 7, 42, 2, 2, 1363, 1365, 11, 2, 2, 2, 1364, 1363, 3, 2, 2, 2, 1365, 1368, 3, 2, 2, 2, 1366, 1367, 3, 2, 2, 2, 1366, 1364, 3, 2, 2, 2, 1367, 1369, 3, 2, 2, 2, 1368, 1366, 3, 2, 2, 2, 1369, 1373, 7, 43, 2, 2, 1370, 1372, 11, 2, 2, 2, 1371, 1370, 3, 2, 2, 2, 1372, 1375, 3, 2, 2, 2, 1373, 1374, 3, 2, 2, 2, 1373, 1371, 3, 2, 2, 2, 1374, 1376, 3, 2, 2, 2, 1375, 1373, 3, 2, 2, 2, 1376, 1377, 7, 36, 2, 2, 1377, 320, 3, 2, 2, 2, 1378, 1379, 5, 265, 133, 2, 1379, 1380, 5, 329, 165, 2, 1380, 1391, 3, 2, 2, 2, 1381, 1382, 5, 267, 134, 2, 1382, 1383, 5, 329, 165, 2, 1383, 1391, 3, 2, 2, 2, 1384, 1385, 5, 269, 135, 2, 1385, 1386, 5, 329, 165, 2, 1386, 1391, 3, 2, 2, 2, 1387, 1388, 5, 271, 136, 2, 1388, 1389, 5, 329, 165, 2, 1389, 1391, 3, 2, 2, 2, 1390, 1378, 3, 2, 2, 2, 1390, 1381, 3, 2, 2, 2, 1390, 1384, 3, 2, 2, 2, 1390, 1387, 3, 2, 2, 2, 1391, 322, 3, 2, 2, 2, 1392, 1394, 5, 303, 152, 2, 1393, 1395, 5, 305, 153, 2, 1394, 1393, 3, 2, 2, 2, 1394, 1395, 3, 2, 2, 2, 1395, 1396, 3, 2, 2, 2, 1396, 1397, 5, 329, 165, 2, 1397, 1403, 3, 2, 2, 2, 1398, 1399, 5, 309, 155, 2, 1399, 1400, 5, 305, 153, 2, 1400, 1401, 5, 329, 165, 2, 1401, 1403, 3, 2, 2, 2, 1402, 1392, 3, 2, 2, 2, 1402, 1398, 3, 2, 2, 2, 1403, 324, 3, 2, 2, 2, 1404, 1405, 5, 313, 157, 2, 1405, 1406, 5, 329, 165, 2, 1406, 326, 3, 2, 2, 2, 1407, 1408, 5, 289, 145, 2, 1408, 1409, 5, 329, 165, 2, 1409, 328, 3, 2, 2, 2, 1410, 1411, 5, 255, 128, 2, 1411, 330, 3, 2, 2, 2, 1412, 1414, 9, 16, 2, 2, 1413, 1412, 3, 2, 2, 2, 1414, 1415, 3, 2, 2, 2, 1415, 1413, 3, 2, 2, 2, 1415, 1416, 3, 2, 2, 2, 1416, 1417, 3, 2, 2, 2, 1417, 1418, 8, 166, 3, 2, 1418, 332, 3, 2, 2, 2, 1419, 1421, 7, 15, 2, 2, 1420, 1422, 7, 12, 2, 2, 1421, 1420, 3, 2, 2, 2, 1421, 1422, 3, 2, 2, 2, 1422, 1425, 3, 2, 2, 2, 1423, 1425, 7, 12, 2, 2, 1424, 1419, 3, 2, 2, 2, 1424, 1423, 3, 2, 2, 2, 1425, 1426, 3, 2, 2, 2, 1426, 1427, 8, 167, 3, 2, 1427, 334, 3, 2, 2, 2, 1428, 1429, 7, 49, 2, 2, 1429, 1430, 7, 44, 2, 2, 1430, 1434, 3, 2, 2, 2, 1431, 1433, 11, 2, 2, 2, 1432, 1431, 3, 2, 2, 2, 1433, 1436, 3, 2, 2, 2, 1434, 1435, 3, 2, 2, 2, 1434, 1432, 3, 2, 2, 2, 1435, 1437, 3, 2, 2, 2, 1436, 1434, 3, 2, 2, 2, 1437, 1438, 7, 44, 2, 2, 1438, 1439, 7, 49, 2, 2, 1439, 1440, 3, 2, 2, 2, 1440, 1441, 8, 168, 3, 2, 1441, 336, 3, 2, 2, 2, 1442, 1443, 7, 49, 2, 2, 1443, 1444, 7, 49, 2, 2, 1444, 1448, 3, 2, 2, 2, 1445, 1447, 10, 17, 2, 2, 1446, 1445, 3, 2, 2, 2, 1447, 1450, 3, 2, 2, 2, 1448, 1446, 3, 2, 2, 2, 1448, 1449, 3, 2, 2, 2, 1449, 1451, 3, 2, 2, 2, 1450, 1448, 3, 2, 2, 2, 1451, 1452, 8, 169, 3, 2, 1452, 338, 3, 2, 2, 2, 72, 2, 343, 348, 353, 358, 366, 658, 1061, 1066, 1068, 1073, 1081, 1085, 1089, 1093, 1095, 1099, 1104, 1109, 1114, 1121, 1125, 1130, 1137, 1141, 1146, 1159, 1163, 1167, 1171, 1173, 1183, 1189, 1198, 1207, 1216, 1220, 1225, 1230, 1254, 1267, 1275, 1279, 1282, 1287, 1289, 1292, 1299, 1303, 1308, 1311, 1317, 1322, 1328, 1334, 1339, 1343, 1348, 1353, 1359, 1366, 1373, 1390, 1394, 1402, 1415, 1421, 1424, 1434, 1448, 4, 2, 3, 2, 8, 2, 2] \ No newline at end of file diff --git a/mainTool/antlr/CPP14Lexer.py b/mainTool/antlr/CPP14Lexer.py new file mode 100644 index 0000000..039b69c --- /dev/null +++ b/mainTool/antlr/CPP14Lexer.py @@ -0,0 +1,972 @@ +# Generated from D:/projects/python/vul detect/tools/CppCodeAnalyzer/resources\CPP14.g4 by ANTLR 4.9.2 +from antlr4 import * +from io import StringIO +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\u0090") + buf.write("\u05ad\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\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30") + buf.write("\4\31\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36") + buf.write("\t\36\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%") + buf.write("\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.") + buf.write("\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64") + buf.write("\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:") + buf.write("\4;\t;\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\t") + buf.write("C\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\t") + buf.write("L\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT\4U\t") + buf.write("U\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4") + buf.write("^\t^\4_\t_\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4") + buf.write("g\tg\4h\th\4i\ti\4j\tj\4k\tk\4l\tl\4m\tm\4n\tn\4o\to\4") + buf.write("p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4w\tw\4x\tx\4") + buf.write("y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080") + buf.write("\t\u0080\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083") + buf.write("\4\u0084\t\u0084\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087") + buf.write("\t\u0087\4\u0088\t\u0088\4\u0089\t\u0089\4\u008a\t\u008a") + buf.write("\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e") + buf.write("\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091") + buf.write("\4\u0092\t\u0092\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095") + buf.write("\t\u0095\4\u0096\t\u0096\4\u0097\t\u0097\4\u0098\t\u0098") + buf.write("\4\u0099\t\u0099\4\u009a\t\u009a\4\u009b\t\u009b\4\u009c") + buf.write("\t\u009c\4\u009d\t\u009d\4\u009e\t\u009e\4\u009f\t\u009f") + buf.write("\4\u00a0\t\u00a0\4\u00a1\t\u00a1\4\u00a2\t\u00a2\4\u00a3") + buf.write("\t\u00a3\4\u00a4\t\u00a4\4\u00a5\t\u00a5\4\u00a6\t\u00a6") + buf.write("\4\u00a7\t\u00a7\4\u00a8\t\u00a8\4\u00a9\t\u00a9\3\2\3") + buf.write("\2\7\2\u0156\n\2\f\2\16\2\u0159\13\2\3\2\3\2\5\2\u015d") + buf.write("\n\2\3\2\6\2\u0160\n\2\r\2\16\2\u0161\3\2\6\2\u0165\n") + buf.write("\2\r\2\16\2\u0166\3\2\3\2\3\3\3\3\7\3\u016d\n\3\f\3\16") + buf.write("\3\u0170\13\3\3\3\3\3\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\4") + buf.write("\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\7\3") + buf.write("\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t") + buf.write("\3\t\3\n\3\n\3\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13") + buf.write("\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3") + buf.write("\r\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3") + buf.write("\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20") + buf.write("\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\22") + buf.write("\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3\23") + buf.write("\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\24\3\24\3\24") + buf.write("\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25") + buf.write("\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\27") + buf.write("\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31") + buf.write("\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31") + buf.write("\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\34") + buf.write("\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35") + buf.write("\3\35\3\35\3\35\3\35\3\36\3\36\3\36\3\36\3\36\3\36\3\36") + buf.write("\3\37\3\37\3\37\3\37\3\37\3\37\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$") + buf.write("\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") + buf.write("*\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-\5-\u0293\n-\3.\3") + buf.write(".\3.\3.\3.\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3\60") + buf.write("\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61") + buf.write("\3\61\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\62") + buf.write("\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63") + buf.write("\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64") + buf.write("\3\64\3\64\3\64\3\64\3\64\3\64\3\65\3\65\3\65\3\65\3\65") + buf.write("\3\65\3\65\3\66\3\66\3\66\3\66\3\66\3\66\3\67\3\67\3\67") + buf.write("\3\67\3\67\3\67\3\67\38\38\38\38\38\38\38\39\39\39\39") + buf.write("\39\39\39\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") + buf.write("<\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@\3A\3") + buf.write("A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3C\3C\3C\3C\3D\3D\3D\3D\3") + buf.write("D\3D\3D\3D\3E\3E\3E\3E\3E\3E\3E\3F\3F\3F\3F\3F\3F\3F\3") + buf.write("F\3F\3G\3G\3G\3G\3G\3G\3H\3H\3H\3H\3H\3H\3H\3H\3H\3I\3") + buf.write("I\3I\3I\3I\3I\3J\3J\3J\3J\3J\3J\3J\3J\3K\3K\3K\3K\3K\3") + buf.write("L\3L\3L\3L\3L\3L\3L\3L\3L\3M\3M\3M\3M\3M\3M\3M\3M\3N\3") + buf.write("N\3N\3N\3N\3N\3O\3O\3P\3P\3Q\3Q\3R\3R\3S\3S\3T\3T\3U\3") + buf.write("U\3V\3V\3W\3W\3X\3X\3Y\3Y\3Z\3Z\3[\3[\3\\\3\\\3]\3]\3") + buf.write("^\3^\3_\3_\3`\3`\3a\3a\3b\3b\3b\3c\3c\3c\3d\3d\3d\3e\3") + buf.write("e\3e\3f\3f\3f\3g\3g\3g\3h\3h\3h\3i\3i\3i\3j\3j\3j\3k\3") + buf.write("k\3k\3k\3l\3l\3l\3m\3m\3m\3n\3n\3n\3o\3o\3o\3p\3p\3p\3") + buf.write("q\3q\3q\3r\3r\3r\3s\3s\3s\3t\3t\3u\3u\3u\3u\3v\3v\3v\3") + buf.write("w\3w\3x\3x\3y\3y\3y\3z\3z\3{\3{\3|\3|\3|\3}\3}\3}\3}\3") + buf.write("~\3~\3~\3~\3~\3\177\3\177\3\177\3\177\3\177\3\177\3\177") + buf.write("\3\177\3\177\3\177\5\177\u0426\n\177\3\u0080\3\u0080\3") + buf.write("\u0080\7\u0080\u042b\n\u0080\f\u0080\16\u0080\u042e\13") + buf.write("\u0080\3\u0081\3\u0081\5\u0081\u0432\n\u0081\3\u0082\3") + buf.write("\u0082\3\u0083\3\u0083\3\u0084\3\u0084\5\u0084\u043a\n") + buf.write("\u0084\3\u0084\3\u0084\5\u0084\u043e\n\u0084\3\u0084\3") + buf.write("\u0084\5\u0084\u0442\n\u0084\3\u0084\3\u0084\5\u0084\u0446") + buf.write("\n\u0084\5\u0084\u0448\n\u0084\3\u0085\3\u0085\5\u0085") + buf.write("\u044c\n\u0085\3\u0085\7\u0085\u044f\n\u0085\f\u0085\16") + buf.write("\u0085\u0452\13\u0085\3\u0086\3\u0086\5\u0086\u0456\n") + buf.write("\u0086\3\u0086\7\u0086\u0459\n\u0086\f\u0086\16\u0086") + buf.write("\u045c\13\u0086\3\u0087\3\u0087\3\u0087\3\u0087\5\u0087") + buf.write("\u0462\n\u0087\3\u0087\3\u0087\5\u0087\u0466\n\u0087\3") + buf.write("\u0087\7\u0087\u0469\n\u0087\f\u0087\16\u0087\u046c\13") + buf.write("\u0087\3\u0088\3\u0088\3\u0088\3\u0088\5\u0088\u0472\n") + buf.write("\u0088\3\u0088\3\u0088\5\u0088\u0476\n\u0088\3\u0088\7") + buf.write("\u0088\u0479\n\u0088\f\u0088\16\u0088\u047c\13\u0088\3") + buf.write("\u0089\3\u0089\3\u008a\3\u008a\3\u008b\3\u008b\3\u008c") + buf.write("\3\u008c\3\u008d\3\u008d\5\u008d\u0488\n\u008d\3\u008d") + buf.write("\3\u008d\5\u008d\u048c\n\u008d\3\u008d\3\u008d\5\u008d") + buf.write("\u0490\n\u008d\3\u008d\3\u008d\5\u008d\u0494\n\u008d\5") + buf.write("\u008d\u0496\n\u008d\3\u008e\3\u008e\3\u008f\3\u008f\3") + buf.write("\u0090\3\u0090\3\u0090\3\u0090\5\u0090\u04a0\n\u0090\3") + buf.write("\u0091\3\u0091\6\u0091\u04a4\n\u0091\r\u0091\16\u0091") + buf.write("\u04a5\3\u0091\3\u0091\3\u0091\3\u0091\3\u0091\6\u0091") + buf.write("\u04ad\n\u0091\r\u0091\16\u0091\u04ae\3\u0091\3\u0091") + buf.write("\3\u0091\3\u0091\3\u0091\6\u0091\u04b6\n\u0091\r\u0091") + buf.write("\16\u0091\u04b7\3\u0091\3\u0091\3\u0091\3\u0091\3\u0091") + buf.write("\6\u0091\u04bf\n\u0091\r\u0091\16\u0091\u04c0\3\u0091") + buf.write("\3\u0091\5\u0091\u04c5\n\u0091\3\u0092\3\u0092\3\u0092") + buf.write("\5\u0092\u04ca\n\u0092\3\u0093\3\u0093\3\u0093\5\u0093") + buf.write("\u04cf\n\u0093\3\u0094\3\u0094\3\u0094\3\u0094\3\u0094") + buf.write("\3\u0094\3\u0094\3\u0094\3\u0094\3\u0094\3\u0094\3\u0094") + buf.write("\3\u0094\3\u0094\3\u0094\3\u0094\3\u0094\3\u0094\3\u0094") + buf.write("\3\u0094\3\u0094\3\u0094\5\u0094\u04e7\n\u0094\3\u0095") + buf.write("\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095\3\u0095") + buf.write("\3\u0095\3\u0095\3\u0095\5\u0095\u04f4\n\u0095\3\u0096") + buf.write("\3\u0096\3\u0096\3\u0096\6\u0096\u04fa\n\u0096\r\u0096") + buf.write("\16\u0096\u04fb\3\u0097\3\u0097\5\u0097\u0500\n\u0097") + buf.write("\3\u0097\5\u0097\u0503\n\u0097\3\u0097\3\u0097\3\u0097") + buf.write("\5\u0097\u0508\n\u0097\5\u0097\u050a\n\u0097\3\u0098\5") + buf.write("\u0098\u050d\n\u0098\3\u0098\3\u0098\3\u0098\3\u0098\3") + buf.write("\u0098\5\u0098\u0514\n\u0098\3\u0099\3\u0099\5\u0099\u0518") + buf.write("\n\u0099\3\u0099\3\u0099\3\u0099\5\u0099\u051d\n\u0099") + buf.write("\3\u0099\5\u0099\u0520\n\u0099\3\u009a\3\u009a\3\u009b") + buf.write("\3\u009b\5\u009b\u0526\n\u009b\3\u009b\7\u009b\u0529\n") + buf.write("\u009b\f\u009b\16\u009b\u052c\13\u009b\3\u009c\3\u009c") + buf.write("\3\u009d\5\u009d\u0531\n\u009d\3\u009d\3\u009d\7\u009d") + buf.write("\u0535\n\u009d\f\u009d\16\u009d\u0538\13\u009d\3\u009d") + buf.write("\3\u009d\5\u009d\u053c\n\u009d\3\u009d\3\u009d\5\u009d") + buf.write("\u0540\n\u009d\3\u009e\3\u009e\3\u009e\5\u009e\u0545\n") + buf.write("\u009e\3\u009f\3\u009f\3\u009f\5\u009f\u054a\n\u009f\3") + buf.write("\u00a0\3\u00a0\7\u00a0\u054e\n\u00a0\f\u00a0\16\u00a0") + buf.write("\u0551\13\u00a0\3\u00a0\3\u00a0\7\u00a0\u0555\n\u00a0") + buf.write("\f\u00a0\16\u00a0\u0558\13\u00a0\3\u00a0\3\u00a0\7\u00a0") + buf.write("\u055c\n\u00a0\f\u00a0\16\u00a0\u055f\13\u00a0\3\u00a0") + buf.write("\3\u00a0\3\u00a1\3\u00a1\3\u00a1\3\u00a1\3\u00a1\3\u00a1") + buf.write("\3\u00a1\3\u00a1\3\u00a1\3\u00a1\3\u00a1\3\u00a1\5\u00a1") + buf.write("\u056f\n\u00a1\3\u00a2\3\u00a2\5\u00a2\u0573\n\u00a2\3") + buf.write("\u00a2\3\u00a2\3\u00a2\3\u00a2\3\u00a2\3\u00a2\5\u00a2") + buf.write("\u057b\n\u00a2\3\u00a3\3\u00a3\3\u00a3\3\u00a4\3\u00a4") + buf.write("\3\u00a4\3\u00a5\3\u00a5\3\u00a6\6\u00a6\u0586\n\u00a6") + buf.write("\r\u00a6\16\u00a6\u0587\3\u00a6\3\u00a6\3\u00a7\3\u00a7") + buf.write("\5\u00a7\u058e\n\u00a7\3\u00a7\5\u00a7\u0591\n\u00a7\3") + buf.write("\u00a7\3\u00a7\3\u00a8\3\u00a8\3\u00a8\3\u00a8\7\u00a8") + buf.write("\u0599\n\u00a8\f\u00a8\16\u00a8\u059c\13\u00a8\3\u00a8") + buf.write("\3\u00a8\3\u00a8\3\u00a8\3\u00a8\3\u00a9\3\u00a9\3\u00a9") + buf.write("\3\u00a9\7\u00a9\u05a7\n\u00a9\f\u00a9\16\u00a9\u05aa") + buf.write("\13\u00a9\3\u00a9\3\u00a9\7\u0157\u054f\u0556\u055d\u059a") + buf.write("\2\u00aa\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f") + buf.write("\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27") + buf.write("-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%") + buf.write("I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67") + buf.write("m8o9q:s;u{?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089") + buf.write("F\u008bG\u008dH\u008fI\u0091J\u0093K\u0095L\u0097M\u0099") + buf.write("N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7U\u00a9") + buf.write("V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9") + buf.write("^\u00bb_\u00bd`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9") + buf.write("f\u00cbg\u00cdh\u00cfi\u00d1j\u00d3k\u00d5l\u00d7m\u00d9") + buf.write("n\u00dbo\u00ddp\u00dfq\u00e1r\u00e3s\u00e5t\u00e7u\u00e9") + buf.write("v\u00ebw\u00edx\u00efy\u00f1z\u00f3{\u00f5|\u00f7}\u00f9") + buf.write("~\u00fb\2\u00fd\2\u00ff\177\u0101\2\u0103\2\u0105\2\u0107") + buf.write("\u0080\u0109\u0081\u010b\u0082\u010d\u0083\u010f\u0084") + buf.write("\u0111\2\u0113\2\u0115\2\u0117\2\u0119\u0085\u011b\2\u011d") + buf.write("\2\u011f\2\u0121\u0086\u0123\2\u0125\2\u0127\2\u0129\2") + buf.write("\u012b\2\u012d\u0087\u012f\2\u0131\2\u0133\2\u0135\2\u0137") + buf.write("\2\u0139\u0088\u013b\2\u013d\2\u013f\2\u0141\u0089\u0143") + buf.write("\u008a\u0145\u008b\u0147\u008c\u0149\2\u014b\u008d\u014d") + buf.write("\u008e\u014f\u008f\u0151\u0090\3\2\22\3\2\f\f\5\2C\\a") + buf.write("ac|\3\2\62;\3\2\63;\3\2\629\5\2\62;CHch\3\2\62\63\4\2") + buf.write("WWww\4\2NNnn\6\2\f\f\17\17))^^\4\2--//\6\2HHNNhhnn\5\2") + buf.write("NNWWww\6\2\f\f\17\17$$^^\4\2\13\13\"\"\4\2\f\f\17\17\2") + buf.write("\u05ec\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2") + buf.write("\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2") + buf.write("\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33") + buf.write("\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2") + buf.write("\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2") + buf.write("\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2") + buf.write("\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2") + buf.write("\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3") + buf.write("\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S") + buf.write("\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2") + buf.write("]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2") + buf.write("\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2") + buf.write("\2\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2") + buf.write("\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2") + buf.write("\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089") + buf.write("\3\2\2\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2") + buf.write("\2\2\u0091\3\2\2\2\2\u0093\3\2\2\2\2\u0095\3\2\2\2\2\u0097") + buf.write("\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d\3\2\2") + buf.write("\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5") + buf.write("\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2") + buf.write("\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3") + buf.write("\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2") + buf.write("\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1") + buf.write("\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2") + buf.write("\2\2\u00c9\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf") + buf.write("\3\2\2\2\2\u00d1\3\2\2\2\2\u00d3\3\2\2\2\2\u00d5\3\2\2") + buf.write("\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db\3\2\2\2\2\u00dd") + buf.write("\3\2\2\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2\2\u00e3\3\2\2") + buf.write("\2\2\u00e5\3\2\2\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb") + buf.write("\3\2\2\2\2\u00ed\3\2\2\2\2\u00ef\3\2\2\2\2\u00f1\3\2\2") + buf.write("\2\2\u00f3\3\2\2\2\2\u00f5\3\2\2\2\2\u00f7\3\2\2\2\2\u00f9") + buf.write("\3\2\2\2\2\u00ff\3\2\2\2\2\u0107\3\2\2\2\2\u0109\3\2\2") + buf.write("\2\2\u010b\3\2\2\2\2\u010d\3\2\2\2\2\u010f\3\2\2\2\2\u0119") + buf.write("\3\2\2\2\2\u0121\3\2\2\2\2\u012d\3\2\2\2\2\u0139\3\2\2") + buf.write("\2\2\u0141\3\2\2\2\2\u0143\3\2\2\2\2\u0145\3\2\2\2\2\u0147") + buf.write("\3\2\2\2\2\u014b\3\2\2\2\2\u014d\3\2\2\2\2\u014f\3\2\2") + buf.write("\2\2\u0151\3\2\2\2\3\u0153\3\2\2\2\5\u016a\3\2\2\2\7\u0173") + buf.write("\3\2\2\2\t\u017b\3\2\2\2\13\u0183\3\2\2\2\r\u0187\3\2") + buf.write("\2\2\17\u018c\3\2\2\2\21\u0191\3\2\2\2\23\u0197\3\2\2") + buf.write("\2\25\u019c\3\2\2\2\27\u01a2\3\2\2\2\31\u01a7\3\2\2\2") + buf.write("\33\u01b0\3\2\2\2\35\u01b9\3\2\2\2\37\u01bf\3\2\2\2!\u01c5") + buf.write("\3\2\2\2#\u01cf\3\2\2\2%\u01da\3\2\2\2\'\u01e3\3\2\2\2") + buf.write(")\u01ec\3\2\2\2+\u01f4\3\2\2\2-\u01fb\3\2\2\2/\u01fe\3") + buf.write("\2\2\2\61\u0205\3\2\2\2\63\u0212\3\2\2\2\65\u0217\3\2") + buf.write("\2\2\67\u021c\3\2\2\29\u0225\3\2\2\2;\u022c\3\2\2\2=\u0233") + buf.write("\3\2\2\2?\u0239\3\2\2\2A\u023f\3\2\2\2C\u0245\3\2\2\2") + buf.write("E\u0249\3\2\2\2G\u0250\3\2\2\2I\u0255\3\2\2\2K\u0258\3") + buf.write("\2\2\2M\u025f\3\2\2\2O\u0263\3\2\2\2Q\u0268\3\2\2\2S\u0270") + buf.write("\3\2\2\2U\u027a\3\2\2\2W\u027e\3\2\2\2Y\u0292\3\2\2\2") + buf.write("[\u0294\3\2\2\2]\u029d\3\2\2\2_\u02a6\3\2\2\2a\u02ae\3") + buf.write("\2\2\2c\u02b8\3\2\2\2e\u02bf\3\2\2\2g\u02c8\3\2\2\2i\u02d9") + buf.write("\3\2\2\2k\u02e0\3\2\2\2m\u02e6\3\2\2\2o\u02ed\3\2\2\2") + buf.write("q\u02f4\3\2\2\2s\u02fb\3\2\2\2u\u0309\3\2\2\2w\u0315\3") + buf.write("\2\2\2y\u031c\3\2\2\2{\u0323\3\2\2\2}\u032c\3\2\2\2\177") + buf.write("\u0331\3\2\2\2\u0081\u033e\3\2\2\2\u0083\u0344\3\2\2\2") + buf.write("\u0085\u0349\3\2\2\2\u0087\u034d\3\2\2\2\u0089\u0355\3") + buf.write("\2\2\2\u008b\u035c\3\2\2\2\u008d\u0365\3\2\2\2\u008f\u036b") + buf.write("\3\2\2\2\u0091\u0374\3\2\2\2\u0093\u037a\3\2\2\2\u0095") + buf.write("\u0382\3\2\2\2\u0097\u0387\3\2\2\2\u0099\u0390\3\2\2\2") + buf.write("\u009b\u0398\3\2\2\2\u009d\u039e\3\2\2\2\u009f\u03a0\3") + buf.write("\2\2\2\u00a1\u03a2\3\2\2\2\u00a3\u03a4\3\2\2\2\u00a5\u03a6") + buf.write("\3\2\2\2\u00a7\u03a8\3\2\2\2\u00a9\u03aa\3\2\2\2\u00ab") + buf.write("\u03ac\3\2\2\2\u00ad\u03ae\3\2\2\2\u00af\u03b0\3\2\2\2") + buf.write("\u00b1\u03b2\3\2\2\2\u00b3\u03b4\3\2\2\2\u00b5\u03b6\3") + buf.write("\2\2\2\u00b7\u03b8\3\2\2\2\u00b9\u03ba\3\2\2\2\u00bb\u03bc") + buf.write("\3\2\2\2\u00bd\u03be\3\2\2\2\u00bf\u03c0\3\2\2\2\u00c1") + buf.write("\u03c2\3\2\2\2\u00c3\u03c4\3\2\2\2\u00c5\u03c7\3\2\2\2") + buf.write("\u00c7\u03ca\3\2\2\2\u00c9\u03cd\3\2\2\2\u00cb\u03d0\3") + buf.write("\2\2\2\u00cd\u03d3\3\2\2\2\u00cf\u03d6\3\2\2\2\u00d1\u03d9") + buf.write("\3\2\2\2\u00d3\u03dc\3\2\2\2\u00d5\u03df\3\2\2\2\u00d7") + buf.write("\u03e3\3\2\2\2\u00d9\u03e6\3\2\2\2\u00db\u03e9\3\2\2\2") + buf.write("\u00dd\u03ec\3\2\2\2\u00df\u03ef\3\2\2\2\u00e1\u03f2\3") + buf.write("\2\2\2\u00e3\u03f5\3\2\2\2\u00e5\u03f8\3\2\2\2\u00e7\u03fb") + buf.write("\3\2\2\2\u00e9\u03fd\3\2\2\2\u00eb\u0401\3\2\2\2\u00ed") + buf.write("\u0404\3\2\2\2\u00ef\u0406\3\2\2\2\u00f1\u0408\3\2\2\2") + buf.write("\u00f3\u040b\3\2\2\2\u00f5\u040d\3\2\2\2\u00f7\u040f\3") + buf.write("\2\2\2\u00f9\u0412\3\2\2\2\u00fb\u0416\3\2\2\2\u00fd\u0425") + buf.write("\3\2\2\2\u00ff\u0427\3\2\2\2\u0101\u0431\3\2\2\2\u0103") + buf.write("\u0433\3\2\2\2\u0105\u0435\3\2\2\2\u0107\u0447\3\2\2\2") + buf.write("\u0109\u0449\3\2\2\2\u010b\u0453\3\2\2\2\u010d\u0461\3") + buf.write("\2\2\2\u010f\u0471\3\2\2\2\u0111\u047d\3\2\2\2\u0113\u047f") + buf.write("\3\2\2\2\u0115\u0481\3\2\2\2\u0117\u0483\3\2\2\2\u0119") + buf.write("\u0495\3\2\2\2\u011b\u0497\3\2\2\2\u011d\u0499\3\2\2\2") + buf.write("\u011f\u049f\3\2\2\2\u0121\u04c4\3\2\2\2\u0123\u04c9\3") + buf.write("\2\2\2\u0125\u04ce\3\2\2\2\u0127\u04e6\3\2\2\2\u0129\u04f3") + buf.write("\3\2\2\2\u012b\u04f5\3\2\2\2\u012d\u0509\3\2\2\2\u012f") + buf.write("\u0513\3\2\2\2\u0131\u051f\3\2\2\2\u0133\u0521\3\2\2\2") + buf.write("\u0135\u0523\3\2\2\2\u0137\u052d\3\2\2\2\u0139\u053f\3") + buf.write("\2\2\2\u013b\u0544\3\2\2\2\u013d\u0549\3\2\2\2\u013f\u054b") + buf.write("\3\2\2\2\u0141\u056e\3\2\2\2\u0143\u057a\3\2\2\2\u0145") + buf.write("\u057c\3\2\2\2\u0147\u057f\3\2\2\2\u0149\u0582\3\2\2\2") + buf.write("\u014b\u0585\3\2\2\2\u014d\u0590\3\2\2\2\u014f\u0594\3") + buf.write("\2\2\2\u0151\u05a2\3\2\2\2\u0153\u015f\7%\2\2\u0154\u0156") + buf.write("\n\2\2\2\u0155\u0154\3\2\2\2\u0156\u0159\3\2\2\2\u0157") + buf.write("\u0158\3\2\2\2\u0157\u0155\3\2\2\2\u0158\u015a\3\2\2\2") + buf.write("\u0159\u0157\3\2\2\2\u015a\u015c\7^\2\2\u015b\u015d\7") + buf.write("\17\2\2\u015c\u015b\3\2\2\2\u015c\u015d\3\2\2\2\u015d") + buf.write("\u015e\3\2\2\2\u015e\u0160\7\f\2\2\u015f\u0157\3\2\2\2") + buf.write("\u0160\u0161\3\2\2\2\u0161\u015f\3\2\2\2\u0161\u0162\3") + buf.write("\2\2\2\u0162\u0164\3\2\2\2\u0163\u0165\n\2\2\2\u0164\u0163") + buf.write("\3\2\2\2\u0165\u0166\3\2\2\2\u0166\u0164\3\2\2\2\u0166") + buf.write("\u0167\3\2\2\2\u0167\u0168\3\2\2\2\u0168\u0169\b\2\2\2") + buf.write("\u0169\4\3\2\2\2\u016a\u016e\7%\2\2\u016b\u016d\n\2\2") + buf.write("\2\u016c\u016b\3\2\2\2\u016d\u0170\3\2\2\2\u016e\u016c") + buf.write("\3\2\2\2\u016e\u016f\3\2\2\2\u016f\u0171\3\2\2\2\u0170") + buf.write("\u016e\3\2\2\2\u0171\u0172\b\3\2\2\u0172\6\3\2\2\2\u0173") + buf.write("\u0174\7c\2\2\u0174\u0175\7n\2\2\u0175\u0176\7k\2\2\u0176") + buf.write("\u0177\7i\2\2\u0177\u0178\7p\2\2\u0178\u0179\7c\2\2\u0179") + buf.write("\u017a\7u\2\2\u017a\b\3\2\2\2\u017b\u017c\7c\2\2\u017c") + buf.write("\u017d\7n\2\2\u017d\u017e\7k\2\2\u017e\u017f\7i\2\2\u017f") + buf.write("\u0180\7p\2\2\u0180\u0181\7q\2\2\u0181\u0182\7h\2\2\u0182") + buf.write("\n\3\2\2\2\u0183\u0184\7c\2\2\u0184\u0185\7u\2\2\u0185") + buf.write("\u0186\7o\2\2\u0186\f\3\2\2\2\u0187\u0188\7c\2\2\u0188") + buf.write("\u0189\7w\2\2\u0189\u018a\7v\2\2\u018a\u018b\7q\2\2\u018b") + buf.write("\16\3\2\2\2\u018c\u018d\7d\2\2\u018d\u018e\7q\2\2\u018e") + buf.write("\u018f\7q\2\2\u018f\u0190\7n\2\2\u0190\20\3\2\2\2\u0191") + buf.write("\u0192\7d\2\2\u0192\u0193\7t\2\2\u0193\u0194\7g\2\2\u0194") + buf.write("\u0195\7c\2\2\u0195\u0196\7m\2\2\u0196\22\3\2\2\2\u0197") + buf.write("\u0198\7e\2\2\u0198\u0199\7c\2\2\u0199\u019a\7u\2\2\u019a") + buf.write("\u019b\7g\2\2\u019b\24\3\2\2\2\u019c\u019d\7e\2\2\u019d") + buf.write("\u019e\7c\2\2\u019e\u019f\7v\2\2\u019f\u01a0\7e\2\2\u01a0") + buf.write("\u01a1\7j\2\2\u01a1\26\3\2\2\2\u01a2\u01a3\7e\2\2\u01a3") + buf.write("\u01a4\7j\2\2\u01a4\u01a5\7c\2\2\u01a5\u01a6\7t\2\2\u01a6") + buf.write("\30\3\2\2\2\u01a7\u01a8\7e\2\2\u01a8\u01a9\7j\2\2\u01a9") + buf.write("\u01aa\7c\2\2\u01aa\u01ab\7t\2\2\u01ab\u01ac\7\63\2\2") + buf.write("\u01ac\u01ad\78\2\2\u01ad\u01ae\7a\2\2\u01ae\u01af\7v") + buf.write("\2\2\u01af\32\3\2\2\2\u01b0\u01b1\7e\2\2\u01b1\u01b2\7") + buf.write("j\2\2\u01b2\u01b3\7c\2\2\u01b3\u01b4\7t\2\2\u01b4\u01b5") + buf.write("\7\65\2\2\u01b5\u01b6\7\64\2\2\u01b6\u01b7\7a\2\2\u01b7") + buf.write("\u01b8\7v\2\2\u01b8\34\3\2\2\2\u01b9\u01ba\7e\2\2\u01ba") + buf.write("\u01bb\7n\2\2\u01bb\u01bc\7c\2\2\u01bc\u01bd\7u\2\2\u01bd") + buf.write("\u01be\7u\2\2\u01be\36\3\2\2\2\u01bf\u01c0\7e\2\2\u01c0") + buf.write("\u01c1\7q\2\2\u01c1\u01c2\7p\2\2\u01c2\u01c3\7u\2\2\u01c3") + buf.write("\u01c4\7v\2\2\u01c4 \3\2\2\2\u01c5\u01c6\7e\2\2\u01c6") + buf.write("\u01c7\7q\2\2\u01c7\u01c8\7p\2\2\u01c8\u01c9\7u\2\2\u01c9") + buf.write("\u01ca\7v\2\2\u01ca\u01cb\7g\2\2\u01cb\u01cc\7z\2\2\u01cc") + buf.write("\u01cd\7r\2\2\u01cd\u01ce\7t\2\2\u01ce\"\3\2\2\2\u01cf") + buf.write("\u01d0\7e\2\2\u01d0\u01d1\7q\2\2\u01d1\u01d2\7p\2\2\u01d2") + buf.write("\u01d3\7u\2\2\u01d3\u01d4\7v\2\2\u01d4\u01d5\7a\2\2\u01d5") + buf.write("\u01d6\7e\2\2\u01d6\u01d7\7c\2\2\u01d7\u01d8\7u\2\2\u01d8") + buf.write("\u01d9\7v\2\2\u01d9$\3\2\2\2\u01da\u01db\7e\2\2\u01db") + buf.write("\u01dc\7q\2\2\u01dc\u01dd\7p\2\2\u01dd\u01de\7v\2\2\u01de") + buf.write("\u01df\7k\2\2\u01df\u01e0\7p\2\2\u01e0\u01e1\7w\2\2\u01e1") + buf.write("\u01e2\7g\2\2\u01e2&\3\2\2\2\u01e3\u01e4\7f\2\2\u01e4") + buf.write("\u01e5\7g\2\2\u01e5\u01e6\7e\2\2\u01e6\u01e7\7n\2\2\u01e7") + buf.write("\u01e8\7v\2\2\u01e8\u01e9\7{\2\2\u01e9\u01ea\7r\2\2\u01ea") + buf.write("\u01eb\7g\2\2\u01eb(\3\2\2\2\u01ec\u01ed\7f\2\2\u01ed") + buf.write("\u01ee\7g\2\2\u01ee\u01ef\7h\2\2\u01ef\u01f0\7c\2\2\u01f0") + buf.write("\u01f1\7w\2\2\u01f1\u01f2\7n\2\2\u01f2\u01f3\7v\2\2\u01f3") + buf.write("*\3\2\2\2\u01f4\u01f5\7f\2\2\u01f5\u01f6\7g\2\2\u01f6") + buf.write("\u01f7\7n\2\2\u01f7\u01f8\7g\2\2\u01f8\u01f9\7v\2\2\u01f9") + buf.write("\u01fa\7g\2\2\u01fa,\3\2\2\2\u01fb\u01fc\7f\2\2\u01fc") + buf.write("\u01fd\7q\2\2\u01fd.\3\2\2\2\u01fe\u01ff\7f\2\2\u01ff") + buf.write("\u0200\7q\2\2\u0200\u0201\7w\2\2\u0201\u0202\7d\2\2\u0202") + buf.write("\u0203\7n\2\2\u0203\u0204\7g\2\2\u0204\60\3\2\2\2\u0205") + buf.write("\u0206\7f\2\2\u0206\u0207\7{\2\2\u0207\u0208\7p\2\2\u0208") + buf.write("\u0209\7c\2\2\u0209\u020a\7o\2\2\u020a\u020b\7k\2\2\u020b") + buf.write("\u020c\7e\2\2\u020c\u020d\7a\2\2\u020d\u020e\7e\2\2\u020e") + buf.write("\u020f\7c\2\2\u020f\u0210\7u\2\2\u0210\u0211\7v\2\2\u0211") + buf.write("\62\3\2\2\2\u0212\u0213\7g\2\2\u0213\u0214\7n\2\2\u0214") + buf.write("\u0215\7u\2\2\u0215\u0216\7g\2\2\u0216\64\3\2\2\2\u0217") + buf.write("\u0218\7g\2\2\u0218\u0219\7p\2\2\u0219\u021a\7w\2\2\u021a") + buf.write("\u021b\7o\2\2\u021b\66\3\2\2\2\u021c\u021d\7g\2\2\u021d") + buf.write("\u021e\7z\2\2\u021e\u021f\7r\2\2\u021f\u0220\7n\2\2\u0220") + buf.write("\u0221\7k\2\2\u0221\u0222\7e\2\2\u0222\u0223\7k\2\2\u0223") + buf.write("\u0224\7v\2\2\u02248\3\2\2\2\u0225\u0226\7g\2\2\u0226") + buf.write("\u0227\7z\2\2\u0227\u0228\7r\2\2\u0228\u0229\7q\2\2\u0229") + buf.write("\u022a\7t\2\2\u022a\u022b\7v\2\2\u022b:\3\2\2\2\u022c") + buf.write("\u022d\7g\2\2\u022d\u022e\7z\2\2\u022e\u022f\7v\2\2\u022f") + buf.write("\u0230\7g\2\2\u0230\u0231\7t\2\2\u0231\u0232\7p\2\2\u0232") + buf.write("<\3\2\2\2\u0233\u0234\7h\2\2\u0234\u0235\7c\2\2\u0235") + buf.write("\u0236\7n\2\2\u0236\u0237\7u\2\2\u0237\u0238\7g\2\2\u0238") + buf.write(">\3\2\2\2\u0239\u023a\7h\2\2\u023a\u023b\7k\2\2\u023b") + buf.write("\u023c\7p\2\2\u023c\u023d\7c\2\2\u023d\u023e\7n\2\2\u023e") + buf.write("@\3\2\2\2\u023f\u0240\7h\2\2\u0240\u0241\7n\2\2\u0241") + buf.write("\u0242\7q\2\2\u0242\u0243\7c\2\2\u0243\u0244\7v\2\2\u0244") + buf.write("B\3\2\2\2\u0245\u0246\7h\2\2\u0246\u0247\7q\2\2\u0247") + buf.write("\u0248\7t\2\2\u0248D\3\2\2\2\u0249\u024a\7h\2\2\u024a") + buf.write("\u024b\7t\2\2\u024b\u024c\7k\2\2\u024c\u024d\7g\2\2\u024d") + buf.write("\u024e\7p\2\2\u024e\u024f\7f\2\2\u024fF\3\2\2\2\u0250") + buf.write("\u0251\7i\2\2\u0251\u0252\7q\2\2\u0252\u0253\7v\2\2\u0253") + buf.write("\u0254\7q\2\2\u0254H\3\2\2\2\u0255\u0256\7k\2\2\u0256") + buf.write("\u0257\7h\2\2\u0257J\3\2\2\2\u0258\u0259\7k\2\2\u0259") + buf.write("\u025a\7p\2\2\u025a\u025b\7n\2\2\u025b\u025c\7k\2\2\u025c") + buf.write("\u025d\7p\2\2\u025d\u025e\7g\2\2\u025eL\3\2\2\2\u025f") + buf.write("\u0260\7k\2\2\u0260\u0261\7p\2\2\u0261\u0262\7v\2\2\u0262") + buf.write("N\3\2\2\2\u0263\u0264\7n\2\2\u0264\u0265\7q\2\2\u0265") + buf.write("\u0266\7p\2\2\u0266\u0267\7i\2\2\u0267P\3\2\2\2\u0268") + buf.write("\u0269\7o\2\2\u0269\u026a\7w\2\2\u026a\u026b\7v\2\2\u026b") + buf.write("\u026c\7c\2\2\u026c\u026d\7d\2\2\u026d\u026e\7n\2\2\u026e") + buf.write("\u026f\7g\2\2\u026fR\3\2\2\2\u0270\u0271\7p\2\2\u0271") + buf.write("\u0272\7c\2\2\u0272\u0273\7o\2\2\u0273\u0274\7g\2\2\u0274") + buf.write("\u0275\7u\2\2\u0275\u0276\7r\2\2\u0276\u0277\7c\2\2\u0277") + buf.write("\u0278\7e\2\2\u0278\u0279\7g\2\2\u0279T\3\2\2\2\u027a") + buf.write("\u027b\7p\2\2\u027b\u027c\7g\2\2\u027c\u027d\7y\2\2\u027d") + buf.write("V\3\2\2\2\u027e\u027f\7p\2\2\u027f\u0280\7q\2\2\u0280") + buf.write("\u0281\7g\2\2\u0281\u0282\7z\2\2\u0282\u0283\7e\2\2\u0283") + buf.write("\u0284\7g\2\2\u0284\u0285\7r\2\2\u0285\u0286\7v\2\2\u0286") + buf.write("X\3\2\2\2\u0287\u0288\7p\2\2\u0288\u0289\7w\2\2\u0289") + buf.write("\u028a\7n\2\2\u028a\u028b\7n\2\2\u028b\u028c\7r\2\2\u028c") + buf.write("\u028d\7v\2\2\u028d\u0293\7t\2\2\u028e\u028f\7P\2\2\u028f") + buf.write("\u0290\7W\2\2\u0290\u0291\7N\2\2\u0291\u0293\7N\2\2\u0292") + buf.write("\u0287\3\2\2\2\u0292\u028e\3\2\2\2\u0293Z\3\2\2\2\u0294") + buf.write("\u0295\7q\2\2\u0295\u0296\7r\2\2\u0296\u0297\7g\2\2\u0297") + buf.write("\u0298\7t\2\2\u0298\u0299\7c\2\2\u0299\u029a\7v\2\2\u029a") + buf.write("\u029b\7q\2\2\u029b\u029c\7t\2\2\u029c\\\3\2\2\2\u029d") + buf.write("\u029e\7q\2\2\u029e\u029f\7x\2\2\u029f\u02a0\7g\2\2\u02a0") + buf.write("\u02a1\7t\2\2\u02a1\u02a2\7t\2\2\u02a2\u02a3\7k\2\2\u02a3") + buf.write("\u02a4\7f\2\2\u02a4\u02a5\7g\2\2\u02a5^\3\2\2\2\u02a6") + buf.write("\u02a7\7r\2\2\u02a7\u02a8\7t\2\2\u02a8\u02a9\7k\2\2\u02a9") + buf.write("\u02aa\7x\2\2\u02aa\u02ab\7c\2\2\u02ab\u02ac\7v\2\2\u02ac") + buf.write("\u02ad\7g\2\2\u02ad`\3\2\2\2\u02ae\u02af\7r\2\2\u02af") + buf.write("\u02b0\7t\2\2\u02b0\u02b1\7q\2\2\u02b1\u02b2\7v\2\2\u02b2") + buf.write("\u02b3\7g\2\2\u02b3\u02b4\7e\2\2\u02b4\u02b5\7v\2\2\u02b5") + buf.write("\u02b6\7g\2\2\u02b6\u02b7\7f\2\2\u02b7b\3\2\2\2\u02b8") + buf.write("\u02b9\7r\2\2\u02b9\u02ba\7w\2\2\u02ba\u02bb\7d\2\2\u02bb") + buf.write("\u02bc\7n\2\2\u02bc\u02bd\7k\2\2\u02bd\u02be\7e\2\2\u02be") + buf.write("d\3\2\2\2\u02bf\u02c0\7t\2\2\u02c0\u02c1\7g\2\2\u02c1") + buf.write("\u02c2\7i\2\2\u02c2\u02c3\7k\2\2\u02c3\u02c4\7u\2\2\u02c4") + buf.write("\u02c5\7v\2\2\u02c5\u02c6\7g\2\2\u02c6\u02c7\7t\2\2\u02c7") + buf.write("f\3\2\2\2\u02c8\u02c9\7t\2\2\u02c9\u02ca\7g\2\2\u02ca") + buf.write("\u02cb\7k\2\2\u02cb\u02cc\7p\2\2\u02cc\u02cd\7v\2\2\u02cd") + buf.write("\u02ce\7g\2\2\u02ce\u02cf\7t\2\2\u02cf\u02d0\7r\2\2\u02d0") + buf.write("\u02d1\7t\2\2\u02d1\u02d2\7g\2\2\u02d2\u02d3\7v\2\2\u02d3") + buf.write("\u02d4\7a\2\2\u02d4\u02d5\7e\2\2\u02d5\u02d6\7c\2\2\u02d6") + buf.write("\u02d7\7u\2\2\u02d7\u02d8\7v\2\2\u02d8h\3\2\2\2\u02d9") + buf.write("\u02da\7t\2\2\u02da\u02db\7g\2\2\u02db\u02dc\7v\2\2\u02dc") + buf.write("\u02dd\7w\2\2\u02dd\u02de\7t\2\2\u02de\u02df\7p\2\2\u02df") + buf.write("j\3\2\2\2\u02e0\u02e1\7u\2\2\u02e1\u02e2\7j\2\2\u02e2") + buf.write("\u02e3\7q\2\2\u02e3\u02e4\7t\2\2\u02e4\u02e5\7v\2\2\u02e5") + buf.write("l\3\2\2\2\u02e6\u02e7\7u\2\2\u02e7\u02e8\7k\2\2\u02e8") + buf.write("\u02e9\7i\2\2\u02e9\u02ea\7p\2\2\u02ea\u02eb\7g\2\2\u02eb") + buf.write("\u02ec\7f\2\2\u02ecn\3\2\2\2\u02ed\u02ee\7u\2\2\u02ee") + buf.write("\u02ef\7k\2\2\u02ef\u02f0\7|\2\2\u02f0\u02f1\7g\2\2\u02f1") + buf.write("\u02f2\7q\2\2\u02f2\u02f3\7h\2\2\u02f3p\3\2\2\2\u02f4") + buf.write("\u02f5\7u\2\2\u02f5\u02f6\7v\2\2\u02f6\u02f7\7c\2\2\u02f7") + buf.write("\u02f8\7v\2\2\u02f8\u02f9\7k\2\2\u02f9\u02fa\7e\2\2\u02fa") + buf.write("r\3\2\2\2\u02fb\u02fc\7u\2\2\u02fc\u02fd\7v\2\2\u02fd") + buf.write("\u02fe\7c\2\2\u02fe\u02ff\7v\2\2\u02ff\u0300\7k\2\2\u0300") + buf.write("\u0301\7e\2\2\u0301\u0302\7a\2\2\u0302\u0303\7c\2\2\u0303") + buf.write("\u0304\7u\2\2\u0304\u0305\7u\2\2\u0305\u0306\7g\2\2\u0306") + buf.write("\u0307\7t\2\2\u0307\u0308\7v\2\2\u0308t\3\2\2\2\u0309") + buf.write("\u030a\7u\2\2\u030a\u030b\7v\2\2\u030b\u030c\7c\2\2\u030c") + buf.write("\u030d\7v\2\2\u030d\u030e\7k\2\2\u030e\u030f\7e\2\2\u030f") + buf.write("\u0310\7a\2\2\u0310\u0311\7e\2\2\u0311\u0312\7c\2\2\u0312") + buf.write("\u0313\7u\2\2\u0313\u0314\7v\2\2\u0314v\3\2\2\2\u0315") + buf.write("\u0316\7u\2\2\u0316\u0317\7v\2\2\u0317\u0318\7t\2\2\u0318") + buf.write("\u0319\7w\2\2\u0319\u031a\7e\2\2\u031a\u031b\7v\2\2\u031b") + buf.write("x\3\2\2\2\u031c\u031d\7u\2\2\u031d\u031e\7y\2\2\u031e") + buf.write("\u031f\7k\2\2\u031f\u0320\7v\2\2\u0320\u0321\7e\2\2\u0321") + buf.write("\u0322\7j\2\2\u0322z\3\2\2\2\u0323\u0324\7v\2\2\u0324") + buf.write("\u0325\7g\2\2\u0325\u0326\7o\2\2\u0326\u0327\7r\2\2\u0327") + buf.write("\u0328\7n\2\2\u0328\u0329\7c\2\2\u0329\u032a\7v\2\2\u032a") + buf.write("\u032b\7g\2\2\u032b|\3\2\2\2\u032c\u032d\7v\2\2\u032d") + buf.write("\u032e\7j\2\2\u032e\u032f\7k\2\2\u032f\u0330\7u\2\2\u0330") + buf.write("~\3\2\2\2\u0331\u0332\7v\2\2\u0332\u0333\7j\2\2\u0333") + buf.write("\u0334\7t\2\2\u0334\u0335\7g\2\2\u0335\u0336\7c\2\2\u0336") + buf.write("\u0337\7f\2\2\u0337\u0338\7a\2\2\u0338\u0339\7n\2\2\u0339") + buf.write("\u033a\7q\2\2\u033a\u033b\7e\2\2\u033b\u033c\7c\2\2\u033c") + buf.write("\u033d\7n\2\2\u033d\u0080\3\2\2\2\u033e\u033f\7v\2\2\u033f") + buf.write("\u0340\7j\2\2\u0340\u0341\7t\2\2\u0341\u0342\7q\2\2\u0342") + buf.write("\u0343\7y\2\2\u0343\u0082\3\2\2\2\u0344\u0345\7v\2\2\u0345") + buf.write("\u0346\7t\2\2\u0346\u0347\7w\2\2\u0347\u0348\7g\2\2\u0348") + buf.write("\u0084\3\2\2\2\u0349\u034a\7v\2\2\u034a\u034b\7t\2\2\u034b") + buf.write("\u034c\7{\2\2\u034c\u0086\3\2\2\2\u034d\u034e\7v\2\2\u034e") + buf.write("\u034f\7{\2\2\u034f\u0350\7r\2\2\u0350\u0351\7g\2\2\u0351") + buf.write("\u0352\7f\2\2\u0352\u0353\7g\2\2\u0353\u0354\7h\2\2\u0354") + buf.write("\u0088\3\2\2\2\u0355\u0356\7v\2\2\u0356\u0357\7{\2\2\u0357") + buf.write("\u0358\7r\2\2\u0358\u0359\7g\2\2\u0359\u035a\7k\2\2\u035a") + buf.write("\u035b\7f\2\2\u035b\u008a\3\2\2\2\u035c\u035d\7v\2\2\u035d") + buf.write("\u035e\7{\2\2\u035e\u035f\7r\2\2\u035f\u0360\7g\2\2\u0360") + buf.write("\u0361\7p\2\2\u0361\u0362\7c\2\2\u0362\u0363\7o\2\2\u0363") + buf.write("\u0364\7g\2\2\u0364\u008c\3\2\2\2\u0365\u0366\7w\2\2\u0366") + buf.write("\u0367\7p\2\2\u0367\u0368\7k\2\2\u0368\u0369\7q\2\2\u0369") + buf.write("\u036a\7p\2\2\u036a\u008e\3\2\2\2\u036b\u036c\7w\2\2\u036c") + buf.write("\u036d\7p\2\2\u036d\u036e\7u\2\2\u036e\u036f\7k\2\2\u036f") + buf.write("\u0370\7i\2\2\u0370\u0371\7p\2\2\u0371\u0372\7g\2\2\u0372") + buf.write("\u0373\7f\2\2\u0373\u0090\3\2\2\2\u0374\u0375\7w\2\2\u0375") + buf.write("\u0376\7u\2\2\u0376\u0377\7k\2\2\u0377\u0378\7p\2\2\u0378") + buf.write("\u0379\7i\2\2\u0379\u0092\3\2\2\2\u037a\u037b\7x\2\2\u037b") + buf.write("\u037c\7k\2\2\u037c\u037d\7t\2\2\u037d\u037e\7v\2\2\u037e") + buf.write("\u037f\7w\2\2\u037f\u0380\7c\2\2\u0380\u0381\7n\2\2\u0381") + buf.write("\u0094\3\2\2\2\u0382\u0383\7x\2\2\u0383\u0384\7q\2\2\u0384") + buf.write("\u0385\7k\2\2\u0385\u0386\7f\2\2\u0386\u0096\3\2\2\2\u0387") + buf.write("\u0388\7x\2\2\u0388\u0389\7q\2\2\u0389\u038a\7n\2\2\u038a") + buf.write("\u038b\7c\2\2\u038b\u038c\7v\2\2\u038c\u038d\7k\2\2\u038d") + buf.write("\u038e\7n\2\2\u038e\u038f\7g\2\2\u038f\u0098\3\2\2\2\u0390") + buf.write("\u0391\7y\2\2\u0391\u0392\7e\2\2\u0392\u0393\7j\2\2\u0393") + buf.write("\u0394\7c\2\2\u0394\u0395\7t\2\2\u0395\u0396\7a\2\2\u0396") + buf.write("\u0397\7v\2\2\u0397\u009a\3\2\2\2\u0398\u0399\7y\2\2\u0399") + buf.write("\u039a\7j\2\2\u039a\u039b\7k\2\2\u039b\u039c\7n\2\2\u039c") + buf.write("\u039d\7g\2\2\u039d\u009c\3\2\2\2\u039e\u039f\7*\2\2\u039f") + buf.write("\u009e\3\2\2\2\u03a0\u03a1\7+\2\2\u03a1\u00a0\3\2\2\2") + buf.write("\u03a2\u03a3\7]\2\2\u03a3\u00a2\3\2\2\2\u03a4\u03a5\7") + buf.write("_\2\2\u03a5\u00a4\3\2\2\2\u03a6\u03a7\7}\2\2\u03a7\u00a6") + buf.write("\3\2\2\2\u03a8\u03a9\7\177\2\2\u03a9\u00a8\3\2\2\2\u03aa") + buf.write("\u03ab\7-\2\2\u03ab\u00aa\3\2\2\2\u03ac\u03ad\7/\2\2\u03ad") + buf.write("\u00ac\3\2\2\2\u03ae\u03af\7,\2\2\u03af\u00ae\3\2\2\2") + buf.write("\u03b0\u03b1\7\61\2\2\u03b1\u00b0\3\2\2\2\u03b2\u03b3") + buf.write("\7\'\2\2\u03b3\u00b2\3\2\2\2\u03b4\u03b5\7`\2\2\u03b5") + buf.write("\u00b4\3\2\2\2\u03b6\u03b7\7(\2\2\u03b7\u00b6\3\2\2\2") + buf.write("\u03b8\u03b9\7~\2\2\u03b9\u00b8\3\2\2\2\u03ba\u03bb\7") + buf.write("\u0080\2\2\u03bb\u00ba\3\2\2\2\u03bc\u03bd\7#\2\2\u03bd") + buf.write("\u00bc\3\2\2\2\u03be\u03bf\7?\2\2\u03bf\u00be\3\2\2\2") + buf.write("\u03c0\u03c1\7>\2\2\u03c1\u00c0\3\2\2\2\u03c2\u03c3\7") + buf.write("@\2\2\u03c3\u00c2\3\2\2\2\u03c4\u03c5\7-\2\2\u03c5\u03c6") + buf.write("\7?\2\2\u03c6\u00c4\3\2\2\2\u03c7\u03c8\7/\2\2\u03c8\u03c9") + buf.write("\7?\2\2\u03c9\u00c6\3\2\2\2\u03ca\u03cb\7,\2\2\u03cb\u03cc") + buf.write("\7?\2\2\u03cc\u00c8\3\2\2\2\u03cd\u03ce\7\61\2\2\u03ce") + buf.write("\u03cf\7?\2\2\u03cf\u00ca\3\2\2\2\u03d0\u03d1\7\'\2\2") + buf.write("\u03d1\u03d2\7?\2\2\u03d2\u00cc\3\2\2\2\u03d3\u03d4\7") + buf.write("`\2\2\u03d4\u03d5\7?\2\2\u03d5\u00ce\3\2\2\2\u03d6\u03d7") + buf.write("\7(\2\2\u03d7\u03d8\7?\2\2\u03d8\u00d0\3\2\2\2\u03d9\u03da") + buf.write("\7~\2\2\u03da\u03db\7?\2\2\u03db\u00d2\3\2\2\2\u03dc\u03dd") + buf.write("\7>\2\2\u03dd\u03de\7>\2\2\u03de\u00d4\3\2\2\2\u03df\u03e0") + buf.write("\7>\2\2\u03e0\u03e1\7>\2\2\u03e1\u03e2\7?\2\2\u03e2\u00d6") + buf.write("\3\2\2\2\u03e3\u03e4\7?\2\2\u03e4\u03e5\7?\2\2\u03e5\u00d8") + buf.write("\3\2\2\2\u03e6\u03e7\7#\2\2\u03e7\u03e8\7?\2\2\u03e8\u00da") + buf.write("\3\2\2\2\u03e9\u03ea\7>\2\2\u03ea\u03eb\7?\2\2\u03eb\u00dc") + buf.write("\3\2\2\2\u03ec\u03ed\7@\2\2\u03ed\u03ee\7?\2\2\u03ee\u00de") + buf.write("\3\2\2\2\u03ef\u03f0\7(\2\2\u03f0\u03f1\7(\2\2\u03f1\u00e0") + buf.write("\3\2\2\2\u03f2\u03f3\7~\2\2\u03f3\u03f4\7~\2\2\u03f4\u00e2") + buf.write("\3\2\2\2\u03f5\u03f6\7-\2\2\u03f6\u03f7\7-\2\2\u03f7\u00e4") + buf.write("\3\2\2\2\u03f8\u03f9\7/\2\2\u03f9\u03fa\7/\2\2\u03fa\u00e6") + buf.write("\3\2\2\2\u03fb\u03fc\7.\2\2\u03fc\u00e8\3\2\2\2\u03fd") + buf.write("\u03fe\7/\2\2\u03fe\u03ff\7@\2\2\u03ff\u0400\7,\2\2\u0400") + buf.write("\u00ea\3\2\2\2\u0401\u0402\7/\2\2\u0402\u0403\7@\2\2\u0403") + buf.write("\u00ec\3\2\2\2\u0404\u0405\7A\2\2\u0405\u00ee\3\2\2\2") + buf.write("\u0406\u0407\7<\2\2\u0407\u00f0\3\2\2\2\u0408\u0409\7") + buf.write("<\2\2\u0409\u040a\7<\2\2\u040a\u00f2\3\2\2\2\u040b\u040c") + buf.write("\7=\2\2\u040c\u00f4\3\2\2\2\u040d\u040e\7\60\2\2\u040e") + buf.write("\u00f6\3\2\2\2\u040f\u0410\7\60\2\2\u0410\u0411\7,\2\2") + buf.write("\u0411\u00f8\3\2\2\2\u0412\u0413\7\60\2\2\u0413\u0414") + buf.write("\7\60\2\2\u0414\u0415\7\60\2\2\u0415\u00fa\3\2\2\2\u0416") + buf.write("\u0417\5\u0115\u008b\2\u0417\u0418\5\u0115\u008b\2\u0418") + buf.write("\u0419\5\u0115\u008b\2\u0419\u041a\5\u0115\u008b\2\u041a") + buf.write("\u00fc\3\2\2\2\u041b\u041c\7^\2\2\u041c\u041d\7w\2\2\u041d") + buf.write("\u041e\3\2\2\2\u041e\u0426\5\u00fb~\2\u041f\u0420\7^\2") + buf.write("\2\u0420\u0421\7W\2\2\u0421\u0422\3\2\2\2\u0422\u0423") + buf.write("\5\u00fb~\2\u0423\u0424\5\u00fb~\2\u0424\u0426\3\2\2\2") + buf.write("\u0425\u041b\3\2\2\2\u0425\u041f\3\2\2\2\u0426\u00fe\3") + buf.write("\2\2\2\u0427\u042c\5\u0101\u0081\2\u0428\u042b\5\u0101") + buf.write("\u0081\2\u0429\u042b\5\u0105\u0083\2\u042a\u0428\3\2\2") + buf.write("\2\u042a\u0429\3\2\2\2\u042b\u042e\3\2\2\2\u042c\u042a") + buf.write("\3\2\2\2\u042c\u042d\3\2\2\2\u042d\u0100\3\2\2\2\u042e") + buf.write("\u042c\3\2\2\2\u042f\u0432\5\u0103\u0082\2\u0430\u0432") + buf.write("\5\u00fd\177\2\u0431\u042f\3\2\2\2\u0431\u0430\3\2\2\2") + buf.write("\u0432\u0102\3\2\2\2\u0433\u0434\t\3\2\2\u0434\u0104\3") + buf.write("\2\2\2\u0435\u0436\t\4\2\2\u0436\u0106\3\2\2\2\u0437\u0439") + buf.write("\5\u0109\u0085\2\u0438\u043a\5\u0119\u008d\2\u0439\u0438") + buf.write("\3\2\2\2\u0439\u043a\3\2\2\2\u043a\u0448\3\2\2\2\u043b") + buf.write("\u043d\5\u010b\u0086\2\u043c\u043e\5\u0119\u008d\2\u043d") + buf.write("\u043c\3\2\2\2\u043d\u043e\3\2\2\2\u043e\u0448\3\2\2\2") + buf.write("\u043f\u0441\5\u010d\u0087\2\u0440\u0442\5\u0119\u008d") + buf.write("\2\u0441\u0440\3\2\2\2\u0441\u0442\3\2\2\2\u0442\u0448") + buf.write("\3\2\2\2\u0443\u0445\5\u010f\u0088\2\u0444\u0446\5\u0119") + buf.write("\u008d\2\u0445\u0444\3\2\2\2\u0445\u0446\3\2\2\2\u0446") + buf.write("\u0448\3\2\2\2\u0447\u0437\3\2\2\2\u0447\u043b\3\2\2\2") + buf.write("\u0447\u043f\3\2\2\2\u0447\u0443\3\2\2\2\u0448\u0108\3") + buf.write("\2\2\2\u0449\u0450\5\u0111\u0089\2\u044a\u044c\7)\2\2") + buf.write("\u044b\u044a\3\2\2\2\u044b\u044c\3\2\2\2\u044c\u044d\3") + buf.write("\2\2\2\u044d\u044f\5\u0105\u0083\2\u044e\u044b\3\2\2\2") + buf.write("\u044f\u0452\3\2\2\2\u0450\u044e\3\2\2\2\u0450\u0451\3") + buf.write("\2\2\2\u0451\u010a\3\2\2\2\u0452\u0450\3\2\2\2\u0453\u045a") + buf.write("\7\62\2\2\u0454\u0456\7)\2\2\u0455\u0454\3\2\2\2\u0455") + buf.write("\u0456\3\2\2\2\u0456\u0457\3\2\2\2\u0457\u0459\5\u0113") + buf.write("\u008a\2\u0458\u0455\3\2\2\2\u0459\u045c\3\2\2\2\u045a") + buf.write("\u0458\3\2\2\2\u045a\u045b\3\2\2\2\u045b\u010c\3\2\2\2") + buf.write("\u045c\u045a\3\2\2\2\u045d\u045e\7\62\2\2\u045e\u0462") + buf.write("\7z\2\2\u045f\u0460\7\62\2\2\u0460\u0462\7Z\2\2\u0461") + buf.write("\u045d\3\2\2\2\u0461\u045f\3\2\2\2\u0462\u0463\3\2\2\2") + buf.write("\u0463\u046a\5\u0115\u008b\2\u0464\u0466\7)\2\2\u0465") + buf.write("\u0464\3\2\2\2\u0465\u0466\3\2\2\2\u0466\u0467\3\2\2\2") + buf.write("\u0467\u0469\5\u0115\u008b\2\u0468\u0465\3\2\2\2\u0469") + buf.write("\u046c\3\2\2\2\u046a\u0468\3\2\2\2\u046a\u046b\3\2\2\2") + buf.write("\u046b\u010e\3\2\2\2\u046c\u046a\3\2\2\2\u046d\u046e\7") + buf.write("\62\2\2\u046e\u0472\7d\2\2\u046f\u0470\7\62\2\2\u0470") + buf.write("\u0472\7D\2\2\u0471\u046d\3\2\2\2\u0471\u046f\3\2\2\2") + buf.write("\u0472\u0473\3\2\2\2\u0473\u047a\5\u0117\u008c\2\u0474") + buf.write("\u0476\7)\2\2\u0475\u0474\3\2\2\2\u0475\u0476\3\2\2\2") + buf.write("\u0476\u0477\3\2\2\2\u0477\u0479\5\u0117\u008c\2\u0478") + buf.write("\u0475\3\2\2\2\u0479\u047c\3\2\2\2\u047a\u0478\3\2\2\2") + buf.write("\u047a\u047b\3\2\2\2\u047b\u0110\3\2\2\2\u047c\u047a\3") + buf.write("\2\2\2\u047d\u047e\t\5\2\2\u047e\u0112\3\2\2\2\u047f\u0480") + buf.write("\t\6\2\2\u0480\u0114\3\2\2\2\u0481\u0482\t\7\2\2\u0482") + buf.write("\u0116\3\2\2\2\u0483\u0484\t\b\2\2\u0484\u0118\3\2\2\2") + buf.write("\u0485\u0487\5\u011b\u008e\2\u0486\u0488\5\u011d\u008f") + buf.write("\2\u0487\u0486\3\2\2\2\u0487\u0488\3\2\2\2\u0488\u0496") + buf.write("\3\2\2\2\u0489\u048b\5\u011b\u008e\2\u048a\u048c\5\u011f") + buf.write("\u0090\2\u048b\u048a\3\2\2\2\u048b\u048c\3\2\2\2\u048c") + buf.write("\u0496\3\2\2\2\u048d\u048f\5\u011d\u008f\2\u048e\u0490") + buf.write("\5\u011b\u008e\2\u048f\u048e\3\2\2\2\u048f\u0490\3\2\2") + buf.write("\2\u0490\u0496\3\2\2\2\u0491\u0493\5\u011f\u0090\2\u0492") + buf.write("\u0494\5\u011b\u008e\2\u0493\u0492\3\2\2\2\u0493\u0494") + buf.write("\3\2\2\2\u0494\u0496\3\2\2\2\u0495\u0485\3\2\2\2\u0495") + buf.write("\u0489\3\2\2\2\u0495\u048d\3\2\2\2\u0495\u0491\3\2\2\2") + buf.write("\u0496\u011a\3\2\2\2\u0497\u0498\t\t\2\2\u0498\u011c\3") + buf.write("\2\2\2\u0499\u049a\t\n\2\2\u049a\u011e\3\2\2\2\u049b\u049c") + buf.write("\7n\2\2\u049c\u04a0\7n\2\2\u049d\u049e\7N\2\2\u049e\u04a0") + buf.write("\7N\2\2\u049f\u049b\3\2\2\2\u049f\u049d\3\2\2\2\u04a0") + buf.write("\u0120\3\2\2\2\u04a1\u04a3\7)\2\2\u04a2\u04a4\5\u0123") + buf.write("\u0092\2\u04a3\u04a2\3\2\2\2\u04a4\u04a5\3\2\2\2\u04a5") + buf.write("\u04a3\3\2\2\2\u04a5\u04a6\3\2\2\2\u04a6\u04a7\3\2\2\2") + buf.write("\u04a7\u04a8\7)\2\2\u04a8\u04c5\3\2\2\2\u04a9\u04aa\7") + buf.write("w\2\2\u04aa\u04ac\7)\2\2\u04ab\u04ad\5\u0123\u0092\2\u04ac") + buf.write("\u04ab\3\2\2\2\u04ad\u04ae\3\2\2\2\u04ae\u04ac\3\2\2\2") + buf.write("\u04ae\u04af\3\2\2\2\u04af\u04b0\3\2\2\2\u04b0\u04b1\7") + buf.write(")\2\2\u04b1\u04c5\3\2\2\2\u04b2\u04b3\7W\2\2\u04b3\u04b5") + buf.write("\7)\2\2\u04b4\u04b6\5\u0123\u0092\2\u04b5\u04b4\3\2\2") + buf.write("\2\u04b6\u04b7\3\2\2\2\u04b7\u04b5\3\2\2\2\u04b7\u04b8") + buf.write("\3\2\2\2\u04b8\u04b9\3\2\2\2\u04b9\u04ba\7)\2\2\u04ba") + buf.write("\u04c5\3\2\2\2\u04bb\u04bc\7N\2\2\u04bc\u04be\7)\2\2\u04bd") + buf.write("\u04bf\5\u0123\u0092\2\u04be\u04bd\3\2\2\2\u04bf\u04c0") + buf.write("\3\2\2\2\u04c0\u04be\3\2\2\2\u04c0\u04c1\3\2\2\2\u04c1") + buf.write("\u04c2\3\2\2\2\u04c2\u04c3\7)\2\2\u04c3\u04c5\3\2\2\2") + buf.write("\u04c4\u04a1\3\2\2\2\u04c4\u04a9\3\2\2\2\u04c4\u04b2\3") + buf.write("\2\2\2\u04c4\u04bb\3\2\2\2\u04c5\u0122\3\2\2\2\u04c6\u04ca") + buf.write("\n\13\2\2\u04c7\u04ca\5\u0125\u0093\2\u04c8\u04ca\5\u00fd") + buf.write("\177\2\u04c9\u04c6\3\2\2\2\u04c9\u04c7\3\2\2\2\u04c9\u04c8") + buf.write("\3\2\2\2\u04ca\u0124\3\2\2\2\u04cb\u04cf\5\u0127\u0094") + buf.write("\2\u04cc\u04cf\5\u0129\u0095\2\u04cd\u04cf\5\u012b\u0096") + buf.write("\2\u04ce\u04cb\3\2\2\2\u04ce\u04cc\3\2\2\2\u04ce\u04cd") + buf.write("\3\2\2\2\u04cf\u0126\3\2\2\2\u04d0\u04d1\7^\2\2\u04d1") + buf.write("\u04e7\7)\2\2\u04d2\u04d3\7^\2\2\u04d3\u04e7\7$\2\2\u04d4") + buf.write("\u04d5\7^\2\2\u04d5\u04e7\7A\2\2\u04d6\u04d7\7^\2\2\u04d7") + buf.write("\u04e7\7^\2\2\u04d8\u04d9\7^\2\2\u04d9\u04e7\7c\2\2\u04da") + buf.write("\u04db\7^\2\2\u04db\u04e7\7d\2\2\u04dc\u04dd\7^\2\2\u04dd") + buf.write("\u04e7\7h\2\2\u04de\u04df\7^\2\2\u04df\u04e7\7p\2\2\u04e0") + buf.write("\u04e1\7^\2\2\u04e1\u04e7\7t\2\2\u04e2\u04e3\7^\2\2\u04e3") + buf.write("\u04e7\7v\2\2\u04e4\u04e5\7^\2\2\u04e5\u04e7\7x\2\2\u04e6") + buf.write("\u04d0\3\2\2\2\u04e6\u04d2\3\2\2\2\u04e6\u04d4\3\2\2\2") + buf.write("\u04e6\u04d6\3\2\2\2\u04e6\u04d8\3\2\2\2\u04e6\u04da\3") + buf.write("\2\2\2\u04e6\u04dc\3\2\2\2\u04e6\u04de\3\2\2\2\u04e6\u04e0") + buf.write("\3\2\2\2\u04e6\u04e2\3\2\2\2\u04e6\u04e4\3\2\2\2\u04e7") + buf.write("\u0128\3\2\2\2\u04e8\u04e9\7^\2\2\u04e9\u04f4\5\u0113") + buf.write("\u008a\2\u04ea\u04eb\7^\2\2\u04eb\u04ec\5\u0113\u008a") + buf.write("\2\u04ec\u04ed\5\u0113\u008a\2\u04ed\u04f4\3\2\2\2\u04ee") + buf.write("\u04ef\7^\2\2\u04ef\u04f0\5\u0113\u008a\2\u04f0\u04f1") + buf.write("\5\u0113\u008a\2\u04f1\u04f2\5\u0113\u008a\2\u04f2\u04f4") + buf.write("\3\2\2\2\u04f3\u04e8\3\2\2\2\u04f3\u04ea\3\2\2\2\u04f3") + buf.write("\u04ee\3\2\2\2\u04f4\u012a\3\2\2\2\u04f5\u04f6\7^\2\2") + buf.write("\u04f6\u04f7\7z\2\2\u04f7\u04f9\3\2\2\2\u04f8\u04fa\5") + buf.write("\u0115\u008b\2\u04f9\u04f8\3\2\2\2\u04fa\u04fb\3\2\2\2") + buf.write("\u04fb\u04f9\3\2\2\2\u04fb\u04fc\3\2\2\2\u04fc\u012c\3") + buf.write("\2\2\2\u04fd\u04ff\5\u012f\u0098\2\u04fe\u0500\5\u0131") + buf.write("\u0099\2\u04ff\u04fe\3\2\2\2\u04ff\u0500\3\2\2\2\u0500") + buf.write("\u0502\3\2\2\2\u0501\u0503\5\u0137\u009c\2\u0502\u0501") + buf.write("\3\2\2\2\u0502\u0503\3\2\2\2\u0503\u050a\3\2\2\2\u0504") + buf.write("\u0505\5\u0135\u009b\2\u0505\u0507\5\u0131\u0099\2\u0506") + buf.write("\u0508\5\u0137\u009c\2\u0507\u0506\3\2\2\2\u0507\u0508") + buf.write("\3\2\2\2\u0508\u050a\3\2\2\2\u0509\u04fd\3\2\2\2\u0509") + buf.write("\u0504\3\2\2\2\u050a\u012e\3\2\2\2\u050b\u050d\5\u0135") + buf.write("\u009b\2\u050c\u050b\3\2\2\2\u050c\u050d\3\2\2\2\u050d") + buf.write("\u050e\3\2\2\2\u050e\u050f\7\60\2\2\u050f\u0514\5\u0135") + buf.write("\u009b\2\u0510\u0511\5\u0135\u009b\2\u0511\u0512\7\60") + buf.write("\2\2\u0512\u0514\3\2\2\2\u0513\u050c\3\2\2\2\u0513\u0510") + buf.write("\3\2\2\2\u0514\u0130\3\2\2\2\u0515\u0517\7g\2\2\u0516") + buf.write("\u0518\5\u0133\u009a\2\u0517\u0516\3\2\2\2\u0517\u0518") + buf.write("\3\2\2\2\u0518\u0519\3\2\2\2\u0519\u0520\5\u0135\u009b") + buf.write("\2\u051a\u051c\7G\2\2\u051b\u051d\5\u0133\u009a\2\u051c") + buf.write("\u051b\3\2\2\2\u051c\u051d\3\2\2\2\u051d\u051e\3\2\2\2") + buf.write("\u051e\u0520\5\u0135\u009b\2\u051f\u0515\3\2\2\2\u051f") + buf.write("\u051a\3\2\2\2\u0520\u0132\3\2\2\2\u0521\u0522\t\f\2\2") + buf.write("\u0522\u0134\3\2\2\2\u0523\u052a\5\u0105\u0083\2\u0524") + buf.write("\u0526\7)\2\2\u0525\u0524\3\2\2\2\u0525\u0526\3\2\2\2") + buf.write("\u0526\u0527\3\2\2\2\u0527\u0529\5\u0105\u0083\2\u0528") + buf.write("\u0525\3\2\2\2\u0529\u052c\3\2\2\2\u052a\u0528\3\2\2\2") + buf.write("\u052a\u052b\3\2\2\2\u052b\u0136\3\2\2\2\u052c\u052a\3") + buf.write("\2\2\2\u052d\u052e\t\r\2\2\u052e\u0138\3\2\2\2\u052f\u0531") + buf.write("\5\u013b\u009e\2\u0530\u052f\3\2\2\2\u0530\u0531\3\2\2") + buf.write("\2\u0531\u0532\3\2\2\2\u0532\u0536\7$\2\2\u0533\u0535") + buf.write("\5\u013d\u009f\2\u0534\u0533\3\2\2\2\u0535\u0538\3\2\2") + buf.write("\2\u0536\u0534\3\2\2\2\u0536\u0537\3\2\2\2\u0537\u0539") + buf.write("\3\2\2\2\u0538\u0536\3\2\2\2\u0539\u0540\7$\2\2\u053a") + buf.write("\u053c\5\u013b\u009e\2\u053b\u053a\3\2\2\2\u053b\u053c") + buf.write("\3\2\2\2\u053c\u053d\3\2\2\2\u053d\u053e\7T\2\2\u053e") + buf.write("\u0540\5\u013f\u00a0\2\u053f\u0530\3\2\2\2\u053f\u053b") + buf.write("\3\2\2\2\u0540\u013a\3\2\2\2\u0541\u0542\7w\2\2\u0542") + buf.write("\u0545\7:\2\2\u0543\u0545\t\16\2\2\u0544\u0541\3\2\2\2") + buf.write("\u0544\u0543\3\2\2\2\u0545\u013c\3\2\2\2\u0546\u054a\n") + buf.write("\17\2\2\u0547\u054a\5\u0125\u0093\2\u0548\u054a\5\u00fd") + buf.write("\177\2\u0549\u0546\3\2\2\2\u0549\u0547\3\2\2\2\u0549\u0548") + buf.write("\3\2\2\2\u054a\u013e\3\2\2\2\u054b\u054f\7$\2\2\u054c") + buf.write("\u054e\13\2\2\2\u054d\u054c\3\2\2\2\u054e\u0551\3\2\2") + buf.write("\2\u054f\u0550\3\2\2\2\u054f\u054d\3\2\2\2\u0550\u0552") + buf.write("\3\2\2\2\u0551\u054f\3\2\2\2\u0552\u0556\7*\2\2\u0553") + buf.write("\u0555\13\2\2\2\u0554\u0553\3\2\2\2\u0555\u0558\3\2\2") + buf.write("\2\u0556\u0557\3\2\2\2\u0556\u0554\3\2\2\2\u0557\u0559") + buf.write("\3\2\2\2\u0558\u0556\3\2\2\2\u0559\u055d\7+\2\2\u055a") + buf.write("\u055c\13\2\2\2\u055b\u055a\3\2\2\2\u055c\u055f\3\2\2") + buf.write("\2\u055d\u055e\3\2\2\2\u055d\u055b\3\2\2\2\u055e\u0560") + buf.write("\3\2\2\2\u055f\u055d\3\2\2\2\u0560\u0561\7$\2\2\u0561") + buf.write("\u0140\3\2\2\2\u0562\u0563\5\u0109\u0085\2\u0563\u0564") + buf.write("\5\u0149\u00a5\2\u0564\u056f\3\2\2\2\u0565\u0566\5\u010b") + buf.write("\u0086\2\u0566\u0567\5\u0149\u00a5\2\u0567\u056f\3\2\2") + buf.write("\2\u0568\u0569\5\u010d\u0087\2\u0569\u056a\5\u0149\u00a5") + buf.write("\2\u056a\u056f\3\2\2\2\u056b\u056c\5\u010f\u0088\2\u056c") + buf.write("\u056d\5\u0149\u00a5\2\u056d\u056f\3\2\2\2\u056e\u0562") + buf.write("\3\2\2\2\u056e\u0565\3\2\2\2\u056e\u0568\3\2\2\2\u056e") + buf.write("\u056b\3\2\2\2\u056f\u0142\3\2\2\2\u0570\u0572\5\u012f") + buf.write("\u0098\2\u0571\u0573\5\u0131\u0099\2\u0572\u0571\3\2\2") + buf.write("\2\u0572\u0573\3\2\2\2\u0573\u0574\3\2\2\2\u0574\u0575") + buf.write("\5\u0149\u00a5\2\u0575\u057b\3\2\2\2\u0576\u0577\5\u0135") + buf.write("\u009b\2\u0577\u0578\5\u0131\u0099\2\u0578\u0579\5\u0149") + buf.write("\u00a5\2\u0579\u057b\3\2\2\2\u057a\u0570\3\2\2\2\u057a") + buf.write("\u0576\3\2\2\2\u057b\u0144\3\2\2\2\u057c\u057d\5\u0139") + buf.write("\u009d\2\u057d\u057e\5\u0149\u00a5\2\u057e\u0146\3\2\2") + buf.write("\2\u057f\u0580\5\u0121\u0091\2\u0580\u0581\5\u0149\u00a5") + buf.write("\2\u0581\u0148\3\2\2\2\u0582\u0583\5\u00ff\u0080\2\u0583") + buf.write("\u014a\3\2\2\2\u0584\u0586\t\20\2\2\u0585\u0584\3\2\2") + buf.write("\2\u0586\u0587\3\2\2\2\u0587\u0585\3\2\2\2\u0587\u0588") + buf.write("\3\2\2\2\u0588\u0589\3\2\2\2\u0589\u058a\b\u00a6\3\2\u058a") + buf.write("\u014c\3\2\2\2\u058b\u058d\7\17\2\2\u058c\u058e\7\f\2") + buf.write("\2\u058d\u058c\3\2\2\2\u058d\u058e\3\2\2\2\u058e\u0591") + buf.write("\3\2\2\2\u058f\u0591\7\f\2\2\u0590\u058b\3\2\2\2\u0590") + buf.write("\u058f\3\2\2\2\u0591\u0592\3\2\2\2\u0592\u0593\b\u00a7") + buf.write("\3\2\u0593\u014e\3\2\2\2\u0594\u0595\7\61\2\2\u0595\u0596") + buf.write("\7,\2\2\u0596\u059a\3\2\2\2\u0597\u0599\13\2\2\2\u0598") + buf.write("\u0597\3\2\2\2\u0599\u059c\3\2\2\2\u059a\u059b\3\2\2\2") + buf.write("\u059a\u0598\3\2\2\2\u059b\u059d\3\2\2\2\u059c\u059a\3") + buf.write("\2\2\2\u059d\u059e\7,\2\2\u059e\u059f\7\61\2\2\u059f\u05a0") + buf.write("\3\2\2\2\u05a0\u05a1\b\u00a8\3\2\u05a1\u0150\3\2\2\2\u05a2") + buf.write("\u05a3\7\61\2\2\u05a3\u05a4\7\61\2\2\u05a4\u05a8\3\2\2") + buf.write("\2\u05a5\u05a7\n\21\2\2\u05a6\u05a5\3\2\2\2\u05a7\u05aa") + buf.write("\3\2\2\2\u05a8\u05a6\3\2\2\2\u05a8\u05a9\3\2\2\2\u05a9") + buf.write("\u05ab\3\2\2\2\u05aa\u05a8\3\2\2\2\u05ab\u05ac\b\u00a9") + buf.write("\3\2\u05ac\u0152\3\2\2\2H\2\u0157\u015c\u0161\u0166\u016e") + buf.write("\u0292\u0425\u042a\u042c\u0431\u0439\u043d\u0441\u0445") + buf.write("\u0447\u044b\u0450\u0455\u045a\u0461\u0465\u046a\u0471") + buf.write("\u0475\u047a\u0487\u048b\u048f\u0493\u0495\u049f\u04a5") + buf.write("\u04ae\u04b7\u04c0\u04c4\u04c9\u04ce\u04e6\u04f3\u04fb") + buf.write("\u04ff\u0502\u0507\u0509\u050c\u0513\u0517\u051c\u051f") + buf.write("\u0525\u052a\u0530\u0536\u053b\u053f\u0544\u0549\u054f") + buf.write("\u0556\u055d\u056e\u0572\u057a\u0587\u058d\u0590\u059a") + buf.write("\u05a8\4\2\3\2\b\2\2") + return buf.getvalue() + + +class CPP14Lexer(Lexer): + + atn = ATNDeserializer().deserialize(serializedATN()) + + decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] + + MultiLineMacro = 1 + Directive = 2 + Alignas = 3 + Alignof = 4 + Asm = 5 + Auto = 6 + Bool = 7 + Break = 8 + Case = 9 + Catch = 10 + Char = 11 + Char16 = 12 + Char32 = 13 + Class = 14 + Const = 15 + Constexpr = 16 + Const_cast = 17 + Continue = 18 + Decltype = 19 + Default = 20 + Delete = 21 + Do = 22 + Double = 23 + Dynamic_cast = 24 + Else = 25 + Enum = 26 + Explicit = 27 + Export = 28 + Extern = 29 + FalseToken = 30 + Final = 31 + Float = 32 + For = 33 + Friend = 34 + Goto = 35 + If = 36 + Inline = 37 + Int = 38 + Long = 39 + Mutable = 40 + Namespace = 41 + New = 42 + Noexcept = 43 + Nullptr = 44 + Operator = 45 + Override = 46 + Private = 47 + Protected = 48 + Public = 49 + Register = 50 + Reinterpret_cast = 51 + Return = 52 + Short = 53 + Signed = 54 + Sizeof = 55 + Static = 56 + Static_assert = 57 + Static_cast = 58 + Struct = 59 + Switch = 60 + Template = 61 + This = 62 + Thread_local = 63 + Throw = 64 + TrueToken = 65 + Try = 66 + Typedef = 67 + Typeid = 68 + Typename = 69 + Union = 70 + Unsigned = 71 + Using = 72 + Virtual = 73 + Void = 74 + Volatile = 75 + Wchar = 76 + While = 77 + LeftParen = 78 + RightParen = 79 + LeftBracket = 80 + RightBracket = 81 + LeftBrace = 82 + RightBrace = 83 + Plus = 84 + Minus = 85 + Star = 86 + Div = 87 + Mod = 88 + Caret = 89 + And = 90 + Or = 91 + Tilde = 92 + Not = 93 + Assign = 94 + Less = 95 + Greater = 96 + PlusAssign = 97 + MinusAssign = 98 + StarAssign = 99 + DivAssign = 100 + ModAssign = 101 + XorAssign = 102 + AndAssign = 103 + OrAssign = 104 + LeftShift = 105 + LeftShiftAssign = 106 + Equal = 107 + NotEqual = 108 + LessEqual = 109 + GreaterEqual = 110 + AndAnd = 111 + OrOr = 112 + PlusPlus = 113 + MinusMinus = 114 + Comma = 115 + ArrowStar = 116 + Arrow = 117 + Question = 118 + Colon = 119 + Doublecolon = 120 + Semi = 121 + Dot = 122 + DotStar = 123 + Ellipsis = 124 + Identifier = 125 + Integerliteral = 126 + Decimalliteral = 127 + Octalliteral = 128 + Hexadecimalliteral = 129 + Binaryliteral = 130 + Integersuffix = 131 + Characterliteral = 132 + Floatingliteral = 133 + Stringliteral = 134 + Userdefinedintegerliteral = 135 + Userdefinedfloatingliteral = 136 + Userdefinedstringliteral = 137 + Userdefinedcharacterliteral = 138 + Whitespace = 139 + Newline = 140 + BlockComment = 141 + LineComment = 142 + + channelNames = [ u"DEFAULT_TOKEN_CHANNEL", u"HIDDEN" ] + + modeNames = [ "DEFAULT_MODE" ] + + literalNames = [ "", + "'alignas'", "'alignof'", "'asm'", "'auto'", "'bool'", "'break'", + "'case'", "'catch'", "'char'", "'char16_t'", "'char32_t'", "'class'", + "'const'", "'constexpr'", "'const_cast'", "'continue'", "'decltype'", + "'default'", "'delete'", "'do'", "'double'", "'dynamic_cast'", + "'else'", "'enum'", "'explicit'", "'export'", "'extern'", "'false'", + "'final'", "'float'", "'for'", "'friend'", "'goto'", "'if'", + "'inline'", "'int'", "'long'", "'mutable'", "'namespace'", "'new'", + "'noexcept'", "'operator'", "'override'", "'private'", "'protected'", + "'public'", "'register'", "'reinterpret_cast'", "'return'", + "'short'", "'signed'", "'sizeof'", "'static'", "'static_assert'", + "'static_cast'", "'struct'", "'switch'", "'template'", "'this'", + "'thread_local'", "'throw'", "'true'", "'try'", "'typedef'", + "'typeid'", "'typename'", "'union'", "'unsigned'", "'using'", + "'virtual'", "'void'", "'volatile'", "'wchar_t'", "'while'", + "'('", "')'", "'['", "']'", "'{'", "'}'", "'+'", "'-'", "'*'", + "'/'", "'%'", "'^'", "'&'", "'|'", "'~'", "'!'", "'='", "'<'", + "'>'", "'+='", "'-='", "'*='", "'/='", "'%='", "'^='", "'&='", + "'|='", "'<<'", "'<<='", "'=='", "'!='", "'<='", "'>='", "'&&'", + "'||'", "'++'", "'--'", "','", "'->*'", "'->'", "'?'", "':'", + "'::'", "';'", "'.'", "'.*'", "'...'" ] + + symbolicNames = [ "", + "MultiLineMacro", "Directive", "Alignas", "Alignof", "Asm", + "Auto", "Bool", "Break", "Case", "Catch", "Char", "Char16", + "Char32", "Class", "Const", "Constexpr", "Const_cast", "Continue", + "Decltype", "Default", "Delete", "Do", "Double", "Dynamic_cast", + "Else", "Enum", "Explicit", "Export", "Extern", "FalseToken", + "Final", "Float", "For", "Friend", "Goto", "If", "Inline", "Int", + "Long", "Mutable", "Namespace", "New", "Noexcept", "Nullptr", + "Operator", "Override", "Private", "Protected", "Public", "Register", + "Reinterpret_cast", "Return", "Short", "Signed", "Sizeof", "Static", + "Static_assert", "Static_cast", "Struct", "Switch", "Template", + "This", "Thread_local", "Throw", "TrueToken", "Try", "Typedef", + "Typeid", "Typename", "Union", "Unsigned", "Using", "Virtual", + "Void", "Volatile", "Wchar", "While", "LeftParen", "RightParen", + "LeftBracket", "RightBracket", "LeftBrace", "RightBrace", "Plus", + "Minus", "Star", "Div", "Mod", "Caret", "And", "Or", "Tilde", + "Not", "Assign", "Less", "Greater", "PlusAssign", "MinusAssign", + "StarAssign", "DivAssign", "ModAssign", "XorAssign", "AndAssign", + "OrAssign", "LeftShift", "LeftShiftAssign", "Equal", "NotEqual", + "LessEqual", "GreaterEqual", "AndAnd", "OrOr", "PlusPlus", "MinusMinus", + "Comma", "ArrowStar", "Arrow", "Question", "Colon", "Doublecolon", + "Semi", "Dot", "DotStar", "Ellipsis", "Identifier", "Integerliteral", + "Decimalliteral", "Octalliteral", "Hexadecimalliteral", "Binaryliteral", + "Integersuffix", "Characterliteral", "Floatingliteral", "Stringliteral", + "Userdefinedintegerliteral", "Userdefinedfloatingliteral", "Userdefinedstringliteral", + "Userdefinedcharacterliteral", "Whitespace", "Newline", "BlockComment", + "LineComment" ] + + ruleNames = [ "MultiLineMacro", "Directive", "Alignas", "Alignof", "Asm", + "Auto", "Bool", "Break", "Case", "Catch", "Char", "Char16", + "Char32", "Class", "Const", "Constexpr", "Const_cast", + "Continue", "Decltype", "Default", "Delete", "Do", "Double", + "Dynamic_cast", "Else", "Enum", "Explicit", "Export", + "Extern", "FalseToken", "Final", "Float", "For", "Friend", + "Goto", "If", "Inline", "Int", "Long", "Mutable", "Namespace", + "New", "Noexcept", "Nullptr", "Operator", "Override", + "Private", "Protected", "Public", "Register", "Reinterpret_cast", + "Return", "Short", "Signed", "Sizeof", "Static", "Static_assert", + "Static_cast", "Struct", "Switch", "Template", "This", + "Thread_local", "Throw", "TrueToken", "Try", "Typedef", + "Typeid", "Typename", "Union", "Unsigned", "Using", "Virtual", + "Void", "Volatile", "Wchar", "While", "LeftParen", "RightParen", + "LeftBracket", "RightBracket", "LeftBrace", "RightBrace", + "Plus", "Minus", "Star", "Div", "Mod", "Caret", "And", + "Or", "Tilde", "Not", "Assign", "Less", "Greater", "PlusAssign", + "MinusAssign", "StarAssign", "DivAssign", "ModAssign", + "XorAssign", "AndAssign", "OrAssign", "LeftShift", "LeftShiftAssign", + "Equal", "NotEqual", "LessEqual", "GreaterEqual", "AndAnd", + "OrOr", "PlusPlus", "MinusMinus", "Comma", "ArrowStar", + "Arrow", "Question", "Colon", "Doublecolon", "Semi", "Dot", + "DotStar", "Ellipsis", "Hexquad", "Universalcharactername", + "Identifier", "Identifiernondigit", "NONDIGIT", "DIGIT", + "Integerliteral", "Decimalliteral", "Octalliteral", "Hexadecimalliteral", + "Binaryliteral", "NONZERODIGIT", "OCTALDIGIT", "HEXADECIMALDIGIT", + "BINARYDIGIT", "Integersuffix", "Unsignedsuffix", "Longsuffix", + "Longlongsuffix", "Characterliteral", "Cchar", "Escapesequence", + "Simpleescapesequence", "Octalescapesequence", "Hexadecimalescapesequence", + "Floatingliteral", "Fractionalconstant", "Exponentpart", + "SIGN", "Digitsequence", "Floatingsuffix", "Stringliteral", + "Encodingprefix", "Schar", "Rawstring", "Userdefinedintegerliteral", + "Userdefinedfloatingliteral", "Userdefinedstringliteral", + "Userdefinedcharacterliteral", "Udsuffix", "Whitespace", + "Newline", "BlockComment", "LineComment" ] + + grammarFileName = "CPP14.g4" + + def __init__(self, input=None, output:TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.9.2") + self._interp = LexerATNSimulator(self, self.atn, self.decisionsToDFA, PredictionContextCache()) + self._actions = None + self._predicates = None + + diff --git a/mainTool/antlr/CPP14Lexer.tokens b/mainTool/antlr/CPP14Lexer.tokens new file mode 100644 index 0000000..feedcf4 --- /dev/null +++ b/mainTool/antlr/CPP14Lexer.tokens @@ -0,0 +1,263 @@ +MultiLineMacro=1 +Directive=2 +Alignas=3 +Alignof=4 +Asm=5 +Auto=6 +Bool=7 +Break=8 +Case=9 +Catch=10 +Char=11 +Char16=12 +Char32=13 +Class=14 +Const=15 +Constexpr=16 +Const_cast=17 +Continue=18 +Decltype=19 +Default=20 +Delete=21 +Do=22 +Double=23 +Dynamic_cast=24 +Else=25 +Enum=26 +Explicit=27 +Export=28 +Extern=29 +FalseToken=30 +Final=31 +Float=32 +For=33 +Friend=34 +Goto=35 +If=36 +Inline=37 +Int=38 +Long=39 +Mutable=40 +Namespace=41 +New=42 +Noexcept=43 +Nullptr=44 +Operator=45 +Override=46 +Private=47 +Protected=48 +Public=49 +Register=50 +Reinterpret_cast=51 +Return=52 +Short=53 +Signed=54 +Sizeof=55 +Static=56 +Static_assert=57 +Static_cast=58 +Struct=59 +Switch=60 +Template=61 +This=62 +Thread_local=63 +Throw=64 +TrueToken=65 +Try=66 +Typedef=67 +Typeid=68 +Typename=69 +Union=70 +Unsigned=71 +Using=72 +Virtual=73 +Void=74 +Volatile=75 +Wchar=76 +While=77 +LeftParen=78 +RightParen=79 +LeftBracket=80 +RightBracket=81 +LeftBrace=82 +RightBrace=83 +Plus=84 +Minus=85 +Star=86 +Div=87 +Mod=88 +Caret=89 +And=90 +Or=91 +Tilde=92 +Not=93 +Assign=94 +Less=95 +Greater=96 +PlusAssign=97 +MinusAssign=98 +StarAssign=99 +DivAssign=100 +ModAssign=101 +XorAssign=102 +AndAssign=103 +OrAssign=104 +LeftShift=105 +LeftShiftAssign=106 +Equal=107 +NotEqual=108 +LessEqual=109 +GreaterEqual=110 +AndAnd=111 +OrOr=112 +PlusPlus=113 +MinusMinus=114 +Comma=115 +ArrowStar=116 +Arrow=117 +Question=118 +Colon=119 +Doublecolon=120 +Semi=121 +Dot=122 +DotStar=123 +Ellipsis=124 +Identifier=125 +Integerliteral=126 +Decimalliteral=127 +Octalliteral=128 +Hexadecimalliteral=129 +Binaryliteral=130 +Integersuffix=131 +Characterliteral=132 +Floatingliteral=133 +Stringliteral=134 +Userdefinedintegerliteral=135 +Userdefinedfloatingliteral=136 +Userdefinedstringliteral=137 +Userdefinedcharacterliteral=138 +Whitespace=139 +Newline=140 +BlockComment=141 +LineComment=142 +'alignas'=3 +'alignof'=4 +'asm'=5 +'auto'=6 +'bool'=7 +'break'=8 +'case'=9 +'catch'=10 +'char'=11 +'char16_t'=12 +'char32_t'=13 +'class'=14 +'const'=15 +'constexpr'=16 +'const_cast'=17 +'continue'=18 +'decltype'=19 +'default'=20 +'delete'=21 +'do'=22 +'double'=23 +'dynamic_cast'=24 +'else'=25 +'enum'=26 +'explicit'=27 +'export'=28 +'extern'=29 +'false'=30 +'final'=31 +'float'=32 +'for'=33 +'friend'=34 +'goto'=35 +'if'=36 +'inline'=37 +'int'=38 +'long'=39 +'mutable'=40 +'namespace'=41 +'new'=42 +'noexcept'=43 +'operator'=45 +'override'=46 +'private'=47 +'protected'=48 +'public'=49 +'register'=50 +'reinterpret_cast'=51 +'return'=52 +'short'=53 +'signed'=54 +'sizeof'=55 +'static'=56 +'static_assert'=57 +'static_cast'=58 +'struct'=59 +'switch'=60 +'template'=61 +'this'=62 +'thread_local'=63 +'throw'=64 +'true'=65 +'try'=66 +'typedef'=67 +'typeid'=68 +'typename'=69 +'union'=70 +'unsigned'=71 +'using'=72 +'virtual'=73 +'void'=74 +'volatile'=75 +'wchar_t'=76 +'while'=77 +'('=78 +')'=79 +'['=80 +']'=81 +'{'=82 +'}'=83 +'+'=84 +'-'=85 +'*'=86 +'/'=87 +'%'=88 +'^'=89 +'&'=90 +'|'=91 +'~'=92 +'!'=93 +'='=94 +'<'=95 +'>'=96 +'+='=97 +'-='=98 +'*='=99 +'/='=100 +'%='=101 +'^='=102 +'&='=103 +'|='=104 +'<<'=105 +'<<='=106 +'=='=107 +'!='=108 +'<='=109 +'>='=110 +'&&'=111 +'||'=112 +'++'=113 +'--'=114 +','=115 +'->*'=116 +'->'=117 +'?'=118 +':'=119 +'::'=120 +';'=121 +'.'=122 +'.*'=123 +'...'=124 diff --git a/mainTool/antlr/CPP14Listener.py b/mainTool/antlr/CPP14Listener.py new file mode 100644 index 0000000..1a83884 --- /dev/null +++ b/mainTool/antlr/CPP14Listener.py @@ -0,0 +1,2177 @@ +# Generated from D:/projects/python/vul detect/tools/CppCodeAnalyzer/resources\CPP14.g4 by ANTLR 4.9.2 +from antlr4 import * +from mainTool.antlr.CPP14Parser import CPP14Parser + +# This class defines a complete listener for a parse tree produced by CPP14Parser. +class CPP14Listener(ParseTreeListener): + # Enter a parse tree produced by CPP14Parser#translationunit. + def enterTranslationunit(self, ctx:CPP14Parser.TranslationunitContext): + pass + + # Exit a parse tree produced by CPP14Parser#translationunit. + def exitTranslationunit(self, ctx:CPP14Parser.TranslationunitContext): + pass + + + # Enter a parse tree produced by CPP14Parser#primaryexpression. + def enterPrimaryexpression(self, ctx:CPP14Parser.PrimaryexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#primaryexpression. + def exitPrimaryexpression(self, ctx:CPP14Parser.PrimaryexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#idexpression. + def enterIdexpression(self, ctx:CPP14Parser.IdexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#idexpression. + def exitIdexpression(self, ctx:CPP14Parser.IdexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#unqualifiedid. + def enterUnqualifiedid(self, ctx:CPP14Parser.UnqualifiedidContext): + pass + + # Exit a parse tree produced by CPP14Parser#unqualifiedid. + def exitUnqualifiedid(self, ctx:CPP14Parser.UnqualifiedidContext): + pass + + + # Enter a parse tree produced by CPP14Parser#qualifiedid. + def enterQualifiedid(self, ctx:CPP14Parser.QualifiedidContext): + pass + + # Exit a parse tree produced by CPP14Parser#qualifiedid. + def exitQualifiedid(self, ctx:CPP14Parser.QualifiedidContext): + pass + + + # Enter a parse tree produced by CPP14Parser#normalGlobalIdentifier. + def enterNormalGlobalIdentifier(self, ctx:CPP14Parser.NormalGlobalIdentifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#normalGlobalIdentifier. + def exitNormalGlobalIdentifier(self, ctx:CPP14Parser.NormalGlobalIdentifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#classIdentifier. + def enterClassIdentifier(self, ctx:CPP14Parser.ClassIdentifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#classIdentifier. + def exitClassIdentifier(self, ctx:CPP14Parser.ClassIdentifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#nestedIdentifier. + def enterNestedIdentifier(self, ctx:CPP14Parser.NestedIdentifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#nestedIdentifier. + def exitNestedIdentifier(self, ctx:CPP14Parser.NestedIdentifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#namespaceIdentifier. + def enterNamespaceIdentifier(self, ctx:CPP14Parser.NamespaceIdentifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#namespaceIdentifier. + def exitNamespaceIdentifier(self, ctx:CPP14Parser.NamespaceIdentifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#nestedTemplateIdentifier. + def enterNestedTemplateIdentifier(self, ctx:CPP14Parser.NestedTemplateIdentifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#nestedTemplateIdentifier. + def exitNestedTemplateIdentifier(self, ctx:CPP14Parser.NestedTemplateIdentifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#decltypeIdentifier. + def enterDecltypeIdentifier(self, ctx:CPP14Parser.DecltypeIdentifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#decltypeIdentifier. + def exitDecltypeIdentifier(self, ctx:CPP14Parser.DecltypeIdentifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#lambdaexpression. + def enterLambdaexpression(self, ctx:CPP14Parser.LambdaexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#lambdaexpression. + def exitLambdaexpression(self, ctx:CPP14Parser.LambdaexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#lambdaintroducer. + def enterLambdaintroducer(self, ctx:CPP14Parser.LambdaintroducerContext): + pass + + # Exit a parse tree produced by CPP14Parser#lambdaintroducer. + def exitLambdaintroducer(self, ctx:CPP14Parser.LambdaintroducerContext): + pass + + + # Enter a parse tree produced by CPP14Parser#lambdacapture. + def enterLambdacapture(self, ctx:CPP14Parser.LambdacaptureContext): + pass + + # Exit a parse tree produced by CPP14Parser#lambdacapture. + def exitLambdacapture(self, ctx:CPP14Parser.LambdacaptureContext): + pass + + + # Enter a parse tree produced by CPP14Parser#capturedefault. + def enterCapturedefault(self, ctx:CPP14Parser.CapturedefaultContext): + pass + + # Exit a parse tree produced by CPP14Parser#capturedefault. + def exitCapturedefault(self, ctx:CPP14Parser.CapturedefaultContext): + pass + + + # Enter a parse tree produced by CPP14Parser#capturelist. + def enterCapturelist(self, ctx:CPP14Parser.CapturelistContext): + pass + + # Exit a parse tree produced by CPP14Parser#capturelist. + def exitCapturelist(self, ctx:CPP14Parser.CapturelistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#capture. + def enterCapture(self, ctx:CPP14Parser.CaptureContext): + pass + + # Exit a parse tree produced by CPP14Parser#capture. + def exitCapture(self, ctx:CPP14Parser.CaptureContext): + pass + + + # Enter a parse tree produced by CPP14Parser#simplecapture. + def enterSimplecapture(self, ctx:CPP14Parser.SimplecaptureContext): + pass + + # Exit a parse tree produced by CPP14Parser#simplecapture. + def exitSimplecapture(self, ctx:CPP14Parser.SimplecaptureContext): + pass + + + # Enter a parse tree produced by CPP14Parser#initcapture. + def enterInitcapture(self, ctx:CPP14Parser.InitcaptureContext): + pass + + # Exit a parse tree produced by CPP14Parser#initcapture. + def exitInitcapture(self, ctx:CPP14Parser.InitcaptureContext): + pass + + + # Enter a parse tree produced by CPP14Parser#lambdadeclarator. + def enterLambdadeclarator(self, ctx:CPP14Parser.LambdadeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#lambdadeclarator. + def exitLambdadeclarator(self, ctx:CPP14Parser.LambdadeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberAccess. + def enterMemberAccess(self, ctx:CPP14Parser.MemberAccessContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberAccess. + def exitMemberAccess(self, ctx:CPP14Parser.MemberAccessContext): + pass + + + # Enter a parse tree produced by CPP14Parser#postTypeCastExpression. + def enterPostTypeCastExpression(self, ctx:CPP14Parser.PostTypeCastExpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#postTypeCastExpression. + def exitPostTypeCastExpression(self, ctx:CPP14Parser.PostTypeCastExpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#incDecOp. + def enterIncDecOp(self, ctx:CPP14Parser.IncDecOpContext): + pass + + # Exit a parse tree produced by CPP14Parser#incDecOp. + def exitIncDecOp(self, ctx:CPP14Parser.IncDecOpContext): + pass + + + # Enter a parse tree produced by CPP14Parser#TypeidExpression. + def enterTypeidExpression(self, ctx:CPP14Parser.TypeidExpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#TypeidExpression. + def exitTypeidExpression(self, ctx:CPP14Parser.TypeidExpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#functionCall. + def enterFunctionCall(self, ctx:CPP14Parser.FunctionCallContext): + pass + + # Exit a parse tree produced by CPP14Parser#functionCall. + def exitFunctionCall(self, ctx:CPP14Parser.FunctionCallContext): + pass + + + # Enter a parse tree produced by CPP14Parser#postSimpleCastExpression. + def enterPostSimpleCastExpression(self, ctx:CPP14Parser.PostSimpleCastExpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#postSimpleCastExpression. + def exitPostSimpleCastExpression(self, ctx:CPP14Parser.PostSimpleCastExpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#CppCastExpression. + def enterCppCastExpression(self, ctx:CPP14Parser.CppCastExpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#CppCastExpression. + def exitCppCastExpression(self, ctx:CPP14Parser.CppCastExpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#arrayIndexing. + def enterArrayIndexing(self, ctx:CPP14Parser.ArrayIndexingContext): + pass + + # Exit a parse tree produced by CPP14Parser#arrayIndexing. + def exitArrayIndexing(self, ctx:CPP14Parser.ArrayIndexingContext): + pass + + + # Enter a parse tree produced by CPP14Parser#ptrMemberAccess. + def enterPtrMemberAccess(self, ctx:CPP14Parser.PtrMemberAccessContext): + pass + + # Exit a parse tree produced by CPP14Parser#ptrMemberAccess. + def exitPtrMemberAccess(self, ctx:CPP14Parser.PtrMemberAccessContext): + pass + + + # Enter a parse tree produced by CPP14Parser#postfixIgnore. + def enterPostfixIgnore(self, ctx:CPP14Parser.PostfixIgnoreContext): + pass + + # Exit a parse tree produced by CPP14Parser#postfixIgnore. + def exitPostfixIgnore(self, ctx:CPP14Parser.PostfixIgnoreContext): + pass + + + # Enter a parse tree produced by CPP14Parser#expressionlist. + def enterExpressionlist(self, ctx:CPP14Parser.ExpressionlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#expressionlist. + def exitExpressionlist(self, ctx:CPP14Parser.ExpressionlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#pseudodestructorname. + def enterPseudodestructorname(self, ctx:CPP14Parser.PseudodestructornameContext): + pass + + # Exit a parse tree produced by CPP14Parser#pseudodestructorname. + def exitPseudodestructorname(self, ctx:CPP14Parser.PseudodestructornameContext): + pass + + + # Enter a parse tree produced by CPP14Parser#unaryexpression. + def enterUnaryexpression(self, ctx:CPP14Parser.UnaryexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#unaryexpression. + def exitUnaryexpression(self, ctx:CPP14Parser.UnaryexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#sizeofExpression. + def enterSizeofExpression(self, ctx:CPP14Parser.SizeofExpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#sizeofExpression. + def exitSizeofExpression(self, ctx:CPP14Parser.SizeofExpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#alignofExpression. + def enterAlignofExpression(self, ctx:CPP14Parser.AlignofExpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#alignofExpression. + def exitAlignofExpression(self, ctx:CPP14Parser.AlignofExpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#unaryoperator. + def enterUnaryoperator(self, ctx:CPP14Parser.UnaryoperatorContext): + pass + + # Exit a parse tree produced by CPP14Parser#unaryoperator. + def exitUnaryoperator(self, ctx:CPP14Parser.UnaryoperatorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#newexpression. + def enterNewexpression(self, ctx:CPP14Parser.NewexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#newexpression. + def exitNewexpression(self, ctx:CPP14Parser.NewexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#newplacement. + def enterNewplacement(self, ctx:CPP14Parser.NewplacementContext): + pass + + # Exit a parse tree produced by CPP14Parser#newplacement. + def exitNewplacement(self, ctx:CPP14Parser.NewplacementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#newtypeid. + def enterNewtypeid(self, ctx:CPP14Parser.NewtypeidContext): + pass + + # Exit a parse tree produced by CPP14Parser#newtypeid. + def exitNewtypeid(self, ctx:CPP14Parser.NewtypeidContext): + pass + + + # Enter a parse tree produced by CPP14Parser#ptrNewDeclarator. + def enterPtrNewDeclarator(self, ctx:CPP14Parser.PtrNewDeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#ptrNewDeclarator. + def exitPtrNewDeclarator(self, ctx:CPP14Parser.PtrNewDeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#nonPtrNewDeclarator. + def enterNonPtrNewDeclarator(self, ctx:CPP14Parser.NonPtrNewDeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#nonPtrNewDeclarator. + def exitNonPtrNewDeclarator(self, ctx:CPP14Parser.NonPtrNewDeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#noptrnewdeclarator. + def enterNoptrnewdeclarator(self, ctx:CPP14Parser.NoptrnewdeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#noptrnewdeclarator. + def exitNoptrnewdeclarator(self, ctx:CPP14Parser.NoptrnewdeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#newinitializer. + def enterNewinitializer(self, ctx:CPP14Parser.NewinitializerContext): + pass + + # Exit a parse tree produced by CPP14Parser#newinitializer. + def exitNewinitializer(self, ctx:CPP14Parser.NewinitializerContext): + pass + + + # Enter a parse tree produced by CPP14Parser#deleteexpression. + def enterDeleteexpression(self, ctx:CPP14Parser.DeleteexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#deleteexpression. + def exitDeleteexpression(self, ctx:CPP14Parser.DeleteexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#noexceptexpression. + def enterNoexceptexpression(self, ctx:CPP14Parser.NoexceptexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#noexceptexpression. + def exitNoexceptexpression(self, ctx:CPP14Parser.NoexceptexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#castexpression. + def enterCastexpression(self, ctx:CPP14Parser.CastexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#castexpression. + def exitCastexpression(self, ctx:CPP14Parser.CastexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#pmexpression. + def enterPmexpression(self, ctx:CPP14Parser.PmexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#pmexpression. + def exitPmexpression(self, ctx:CPP14Parser.PmexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#multiplicativeexpression. + def enterMultiplicativeexpression(self, ctx:CPP14Parser.MultiplicativeexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#multiplicativeexpression. + def exitMultiplicativeexpression(self, ctx:CPP14Parser.MultiplicativeexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#additiveexpression. + def enterAdditiveexpression(self, ctx:CPP14Parser.AdditiveexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#additiveexpression. + def exitAdditiveexpression(self, ctx:CPP14Parser.AdditiveexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#shiftexpression. + def enterShiftexpression(self, ctx:CPP14Parser.ShiftexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#shiftexpression. + def exitShiftexpression(self, ctx:CPP14Parser.ShiftexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#relationalexpression. + def enterRelationalexpression(self, ctx:CPP14Parser.RelationalexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#relationalexpression. + def exitRelationalexpression(self, ctx:CPP14Parser.RelationalexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#equalityexpression. + def enterEqualityexpression(self, ctx:CPP14Parser.EqualityexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#equalityexpression. + def exitEqualityexpression(self, ctx:CPP14Parser.EqualityexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#andexpression. + def enterAndexpression(self, ctx:CPP14Parser.AndexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#andexpression. + def exitAndexpression(self, ctx:CPP14Parser.AndexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#exclusiveorexpression. + def enterExclusiveorexpression(self, ctx:CPP14Parser.ExclusiveorexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#exclusiveorexpression. + def exitExclusiveorexpression(self, ctx:CPP14Parser.ExclusiveorexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#inclusiveorexpression. + def enterInclusiveorexpression(self, ctx:CPP14Parser.InclusiveorexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#inclusiveorexpression. + def exitInclusiveorexpression(self, ctx:CPP14Parser.InclusiveorexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#logicalandexpression. + def enterLogicalandexpression(self, ctx:CPP14Parser.LogicalandexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#logicalandexpression. + def exitLogicalandexpression(self, ctx:CPP14Parser.LogicalandexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#logicalorexpression. + def enterLogicalorexpression(self, ctx:CPP14Parser.LogicalorexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#logicalorexpression. + def exitLogicalorexpression(self, ctx:CPP14Parser.LogicalorexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#nonConditionalExpression. + def enterNonConditionalExpression(self, ctx:CPP14Parser.NonConditionalExpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#nonConditionalExpression. + def exitNonConditionalExpression(self, ctx:CPP14Parser.NonConditionalExpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#realConditionalExpression. + def enterRealConditionalExpression(self, ctx:CPP14Parser.RealConditionalExpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#realConditionalExpression. + def exitRealConditionalExpression(self, ctx:CPP14Parser.RealConditionalExpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#assignmentexpression. + def enterAssignmentexpression(self, ctx:CPP14Parser.AssignmentexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#assignmentexpression. + def exitAssignmentexpression(self, ctx:CPP14Parser.AssignmentexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#assignmentoperator. + def enterAssignmentoperator(self, ctx:CPP14Parser.AssignmentoperatorContext): + pass + + # Exit a parse tree produced by CPP14Parser#assignmentoperator. + def exitAssignmentoperator(self, ctx:CPP14Parser.AssignmentoperatorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#expression. + def enterExpression(self, ctx:CPP14Parser.ExpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#expression. + def exitExpression(self, ctx:CPP14Parser.ExpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#constantexpression. + def enterConstantexpression(self, ctx:CPP14Parser.ConstantexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#constantexpression. + def exitConstantexpression(self, ctx:CPP14Parser.ConstantexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#statement. + def enterStatement(self, ctx:CPP14Parser.StatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#statement. + def exitStatement(self, ctx:CPP14Parser.StatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#label. + def enterLabel(self, ctx:CPP14Parser.LabelContext): + pass + + # Exit a parse tree produced by CPP14Parser#label. + def exitLabel(self, ctx:CPP14Parser.LabelContext): + pass + + + # Enter a parse tree produced by CPP14Parser#labeledstatement. + def enterLabeledstatement(self, ctx:CPP14Parser.LabeledstatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#labeledstatement. + def exitLabeledstatement(self, ctx:CPP14Parser.LabeledstatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#expressionstatement. + def enterExpressionstatement(self, ctx:CPP14Parser.ExpressionstatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#expressionstatement. + def exitExpressionstatement(self, ctx:CPP14Parser.ExpressionstatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#compoundstatement. + def enterCompoundstatement(self, ctx:CPP14Parser.CompoundstatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#compoundstatement. + def exitCompoundstatement(self, ctx:CPP14Parser.CompoundstatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#statementseq. + def enterStatementseq(self, ctx:CPP14Parser.StatementseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#statementseq. + def exitStatementseq(self, ctx:CPP14Parser.StatementseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#ifStatement. + def enterIfStatement(self, ctx:CPP14Parser.IfStatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#ifStatement. + def exitIfStatement(self, ctx:CPP14Parser.IfStatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#switchStatement. + def enterSwitchStatement(self, ctx:CPP14Parser.SwitchStatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#switchStatement. + def exitSwitchStatement(self, ctx:CPP14Parser.SwitchStatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#condition. + def enterCondition(self, ctx:CPP14Parser.ConditionContext): + pass + + # Exit a parse tree produced by CPP14Parser#condition. + def exitCondition(self, ctx:CPP14Parser.ConditionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#WhileStatement. + def enterWhileStatement(self, ctx:CPP14Parser.WhileStatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#WhileStatement. + def exitWhileStatement(self, ctx:CPP14Parser.WhileStatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#DoStatement. + def enterDoStatement(self, ctx:CPP14Parser.DoStatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#DoStatement. + def exitDoStatement(self, ctx:CPP14Parser.DoStatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#ForStatement. + def enterForStatement(self, ctx:CPP14Parser.ForStatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#ForStatement. + def exitForStatement(self, ctx:CPP14Parser.ForStatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#ForRangeStatement. + def enterForRangeStatement(self, ctx:CPP14Parser.ForRangeStatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#ForRangeStatement. + def exitForRangeStatement(self, ctx:CPP14Parser.ForRangeStatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#forinitstatement. + def enterForinitstatement(self, ctx:CPP14Parser.ForinitstatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#forinitstatement. + def exitForinitstatement(self, ctx:CPP14Parser.ForinitstatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#forrangedeclaration. + def enterForrangedeclaration(self, ctx:CPP14Parser.ForrangedeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#forrangedeclaration. + def exitForrangedeclaration(self, ctx:CPP14Parser.ForrangedeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#forrangeinitializer. + def enterForrangeinitializer(self, ctx:CPP14Parser.ForrangeinitializerContext): + pass + + # Exit a parse tree produced by CPP14Parser#forrangeinitializer. + def exitForrangeinitializer(self, ctx:CPP14Parser.ForrangeinitializerContext): + pass + + + # Enter a parse tree produced by CPP14Parser#jumpstatement. + def enterJumpstatement(self, ctx:CPP14Parser.JumpstatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#jumpstatement. + def exitJumpstatement(self, ctx:CPP14Parser.JumpstatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#declarationstatement. + def enterDeclarationstatement(self, ctx:CPP14Parser.DeclarationstatementContext): + pass + + # Exit a parse tree produced by CPP14Parser#declarationstatement. + def exitDeclarationstatement(self, ctx:CPP14Parser.DeclarationstatementContext): + pass + + + # Enter a parse tree produced by CPP14Parser#declarationseq. + def enterDeclarationseq(self, ctx:CPP14Parser.DeclarationseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#declarationseq. + def exitDeclarationseq(self, ctx:CPP14Parser.DeclarationseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#declaration. + def enterDeclaration(self, ctx:CPP14Parser.DeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#declaration. + def exitDeclaration(self, ctx:CPP14Parser.DeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#blockdeclaration. + def enterBlockdeclaration(self, ctx:CPP14Parser.BlockdeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#blockdeclaration. + def exitBlockdeclaration(self, ctx:CPP14Parser.BlockdeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#aliasdeclaration. + def enterAliasdeclaration(self, ctx:CPP14Parser.AliasdeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#aliasdeclaration. + def exitAliasdeclaration(self, ctx:CPP14Parser.AliasdeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#simpledeclaration. + def enterSimpledeclaration(self, ctx:CPP14Parser.SimpledeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#simpledeclaration. + def exitSimpledeclaration(self, ctx:CPP14Parser.SimpledeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#static_assertdeclaration. + def enterStatic_assertdeclaration(self, ctx:CPP14Parser.Static_assertdeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#static_assertdeclaration. + def exitStatic_assertdeclaration(self, ctx:CPP14Parser.Static_assertdeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#emptydeclaration. + def enterEmptydeclaration(self, ctx:CPP14Parser.EmptydeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#emptydeclaration. + def exitEmptydeclaration(self, ctx:CPP14Parser.EmptydeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#attributedeclaration. + def enterAttributedeclaration(self, ctx:CPP14Parser.AttributedeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#attributedeclaration. + def exitAttributedeclaration(self, ctx:CPP14Parser.AttributedeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#storageAttr. + def enterStorageAttr(self, ctx:CPP14Parser.StorageAttrContext): + pass + + # Exit a parse tree produced by CPP14Parser#storageAttr. + def exitStorageAttr(self, ctx:CPP14Parser.StorageAttrContext): + pass + + + # Enter a parse tree produced by CPP14Parser#typeAttr. + def enterTypeAttr(self, ctx:CPP14Parser.TypeAttrContext): + pass + + # Exit a parse tree produced by CPP14Parser#typeAttr. + def exitTypeAttr(self, ctx:CPP14Parser.TypeAttrContext): + pass + + + # Enter a parse tree produced by CPP14Parser#funcAttr. + def enterFuncAttr(self, ctx:CPP14Parser.FuncAttrContext): + pass + + # Exit a parse tree produced by CPP14Parser#funcAttr. + def exitFuncAttr(self, ctx:CPP14Parser.FuncAttrContext): + pass + + + # Enter a parse tree produced by CPP14Parser#friendDecl. + def enterFriendDecl(self, ctx:CPP14Parser.FriendDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#friendDecl. + def exitFriendDecl(self, ctx:CPP14Parser.FriendDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#typedefDecl. + def enterTypedefDecl(self, ctx:CPP14Parser.TypedefDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#typedefDecl. + def exitTypedefDecl(self, ctx:CPP14Parser.TypedefDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#constExprDecl. + def enterConstExprDecl(self, ctx:CPP14Parser.ConstExprDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#constExprDecl. + def exitConstExprDecl(self, ctx:CPP14Parser.ConstExprDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#declspecifierseq. + def enterDeclspecifierseq(self, ctx:CPP14Parser.DeclspecifierseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#declspecifierseq. + def exitDeclspecifierseq(self, ctx:CPP14Parser.DeclspecifierseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#storageclassspecifier. + def enterStorageclassspecifier(self, ctx:CPP14Parser.StorageclassspecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#storageclassspecifier. + def exitStorageclassspecifier(self, ctx:CPP14Parser.StorageclassspecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#functionspecifier. + def enterFunctionspecifier(self, ctx:CPP14Parser.FunctionspecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#functionspecifier. + def exitFunctionspecifier(self, ctx:CPP14Parser.FunctionspecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#typedefname. + def enterTypedefname(self, ctx:CPP14Parser.TypedefnameContext): + pass + + # Exit a parse tree produced by CPP14Parser#typedefname. + def exitTypedefname(self, ctx:CPP14Parser.TypedefnameContext): + pass + + + # Enter a parse tree produced by CPP14Parser#otherDecl. + def enterOtherDecl(self, ctx:CPP14Parser.OtherDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#otherDecl. + def exitOtherDecl(self, ctx:CPP14Parser.OtherDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#classDecl. + def enterClassDecl(self, ctx:CPP14Parser.ClassDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#classDecl. + def exitClassDecl(self, ctx:CPP14Parser.ClassDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#enumDecl. + def enterEnumDecl(self, ctx:CPP14Parser.EnumDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#enumDecl. + def exitEnumDecl(self, ctx:CPP14Parser.EnumDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#trailingtypespecifier. + def enterTrailingtypespecifier(self, ctx:CPP14Parser.TrailingtypespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#trailingtypespecifier. + def exitTrailingtypespecifier(self, ctx:CPP14Parser.TrailingtypespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#typespecifierseq. + def enterTypespecifierseq(self, ctx:CPP14Parser.TypespecifierseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#typespecifierseq. + def exitTypespecifierseq(self, ctx:CPP14Parser.TypespecifierseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#trailingtypespecifierseq. + def enterTrailingtypespecifierseq(self, ctx:CPP14Parser.TrailingtypespecifierseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#trailingtypespecifierseq. + def exitTrailingtypespecifierseq(self, ctx:CPP14Parser.TrailingtypespecifierseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#simpletypespecifier. + def enterSimpletypespecifier(self, ctx:CPP14Parser.SimpletypespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#simpletypespecifier. + def exitSimpletypespecifier(self, ctx:CPP14Parser.SimpletypespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#thetypename. + def enterThetypename(self, ctx:CPP14Parser.ThetypenameContext): + pass + + # Exit a parse tree produced by CPP14Parser#thetypename. + def exitThetypename(self, ctx:CPP14Parser.ThetypenameContext): + pass + + + # Enter a parse tree produced by CPP14Parser#decltypespecifier. + def enterDecltypespecifier(self, ctx:CPP14Parser.DecltypespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#decltypespecifier. + def exitDecltypespecifier(self, ctx:CPP14Parser.DecltypespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#elaboratedtypespecifier. + def enterElaboratedtypespecifier(self, ctx:CPP14Parser.ElaboratedtypespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#elaboratedtypespecifier. + def exitElaboratedtypespecifier(self, ctx:CPP14Parser.ElaboratedtypespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#enumname. + def enterEnumname(self, ctx:CPP14Parser.EnumnameContext): + pass + + # Exit a parse tree produced by CPP14Parser#enumname. + def exitEnumname(self, ctx:CPP14Parser.EnumnameContext): + pass + + + # Enter a parse tree produced by CPP14Parser#enumspecifier. + def enterEnumspecifier(self, ctx:CPP14Parser.EnumspecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#enumspecifier. + def exitEnumspecifier(self, ctx:CPP14Parser.EnumspecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#enumhead. + def enterEnumhead(self, ctx:CPP14Parser.EnumheadContext): + pass + + # Exit a parse tree produced by CPP14Parser#enumhead. + def exitEnumhead(self, ctx:CPP14Parser.EnumheadContext): + pass + + + # Enter a parse tree produced by CPP14Parser#opaqueenumdeclaration. + def enterOpaqueenumdeclaration(self, ctx:CPP14Parser.OpaqueenumdeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#opaqueenumdeclaration. + def exitOpaqueenumdeclaration(self, ctx:CPP14Parser.OpaqueenumdeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#enumkey. + def enterEnumkey(self, ctx:CPP14Parser.EnumkeyContext): + pass + + # Exit a parse tree produced by CPP14Parser#enumkey. + def exitEnumkey(self, ctx:CPP14Parser.EnumkeyContext): + pass + + + # Enter a parse tree produced by CPP14Parser#enumbase. + def enterEnumbase(self, ctx:CPP14Parser.EnumbaseContext): + pass + + # Exit a parse tree produced by CPP14Parser#enumbase. + def exitEnumbase(self, ctx:CPP14Parser.EnumbaseContext): + pass + + + # Enter a parse tree produced by CPP14Parser#enumeratorlist. + def enterEnumeratorlist(self, ctx:CPP14Parser.EnumeratorlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#enumeratorlist. + def exitEnumeratorlist(self, ctx:CPP14Parser.EnumeratorlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#enumeratordefinition. + def enterEnumeratordefinition(self, ctx:CPP14Parser.EnumeratordefinitionContext): + pass + + # Exit a parse tree produced by CPP14Parser#enumeratordefinition. + def exitEnumeratordefinition(self, ctx:CPP14Parser.EnumeratordefinitionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#enumerator. + def enterEnumerator(self, ctx:CPP14Parser.EnumeratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#enumerator. + def exitEnumerator(self, ctx:CPP14Parser.EnumeratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#namespacename. + def enterNamespacename(self, ctx:CPP14Parser.NamespacenameContext): + pass + + # Exit a parse tree produced by CPP14Parser#namespacename. + def exitNamespacename(self, ctx:CPP14Parser.NamespacenameContext): + pass + + + # Enter a parse tree produced by CPP14Parser#originalnamespacename. + def enterOriginalnamespacename(self, ctx:CPP14Parser.OriginalnamespacenameContext): + pass + + # Exit a parse tree produced by CPP14Parser#originalnamespacename. + def exitOriginalnamespacename(self, ctx:CPP14Parser.OriginalnamespacenameContext): + pass + + + # Enter a parse tree produced by CPP14Parser#namespacedefinition. + def enterNamespacedefinition(self, ctx:CPP14Parser.NamespacedefinitionContext): + pass + + # Exit a parse tree produced by CPP14Parser#namespacedefinition. + def exitNamespacedefinition(self, ctx:CPP14Parser.NamespacedefinitionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#namednamespacedefinition. + def enterNamednamespacedefinition(self, ctx:CPP14Parser.NamednamespacedefinitionContext): + pass + + # Exit a parse tree produced by CPP14Parser#namednamespacedefinition. + def exitNamednamespacedefinition(self, ctx:CPP14Parser.NamednamespacedefinitionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#originalnamespacedefinition. + def enterOriginalnamespacedefinition(self, ctx:CPP14Parser.OriginalnamespacedefinitionContext): + pass + + # Exit a parse tree produced by CPP14Parser#originalnamespacedefinition. + def exitOriginalnamespacedefinition(self, ctx:CPP14Parser.OriginalnamespacedefinitionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#extensionnamespacedefinition. + def enterExtensionnamespacedefinition(self, ctx:CPP14Parser.ExtensionnamespacedefinitionContext): + pass + + # Exit a parse tree produced by CPP14Parser#extensionnamespacedefinition. + def exitExtensionnamespacedefinition(self, ctx:CPP14Parser.ExtensionnamespacedefinitionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#unnamednamespacedefinition. + def enterUnnamednamespacedefinition(self, ctx:CPP14Parser.UnnamednamespacedefinitionContext): + pass + + # Exit a parse tree produced by CPP14Parser#unnamednamespacedefinition. + def exitUnnamednamespacedefinition(self, ctx:CPP14Parser.UnnamednamespacedefinitionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#namespacebody. + def enterNamespacebody(self, ctx:CPP14Parser.NamespacebodyContext): + pass + + # Exit a parse tree produced by CPP14Parser#namespacebody. + def exitNamespacebody(self, ctx:CPP14Parser.NamespacebodyContext): + pass + + + # Enter a parse tree produced by CPP14Parser#namespacealias. + def enterNamespacealias(self, ctx:CPP14Parser.NamespacealiasContext): + pass + + # Exit a parse tree produced by CPP14Parser#namespacealias. + def exitNamespacealias(self, ctx:CPP14Parser.NamespacealiasContext): + pass + + + # Enter a parse tree produced by CPP14Parser#namespacealiasdefinition. + def enterNamespacealiasdefinition(self, ctx:CPP14Parser.NamespacealiasdefinitionContext): + pass + + # Exit a parse tree produced by CPP14Parser#namespacealiasdefinition. + def exitNamespacealiasdefinition(self, ctx:CPP14Parser.NamespacealiasdefinitionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#qualifiednamespacespecifier. + def enterQualifiednamespacespecifier(self, ctx:CPP14Parser.QualifiednamespacespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#qualifiednamespacespecifier. + def exitQualifiednamespacespecifier(self, ctx:CPP14Parser.QualifiednamespacespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#usingdeclaration. + def enterUsingdeclaration(self, ctx:CPP14Parser.UsingdeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#usingdeclaration. + def exitUsingdeclaration(self, ctx:CPP14Parser.UsingdeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#usingdirective. + def enterUsingdirective(self, ctx:CPP14Parser.UsingdirectiveContext): + pass + + # Exit a parse tree produced by CPP14Parser#usingdirective. + def exitUsingdirective(self, ctx:CPP14Parser.UsingdirectiveContext): + pass + + + # Enter a parse tree produced by CPP14Parser#asmdefinition. + def enterAsmdefinition(self, ctx:CPP14Parser.AsmdefinitionContext): + pass + + # Exit a parse tree produced by CPP14Parser#asmdefinition. + def exitAsmdefinition(self, ctx:CPP14Parser.AsmdefinitionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#linkagespecification. + def enterLinkagespecification(self, ctx:CPP14Parser.LinkagespecificationContext): + pass + + # Exit a parse tree produced by CPP14Parser#linkagespecification. + def exitLinkagespecification(self, ctx:CPP14Parser.LinkagespecificationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#attributespecifierseq. + def enterAttributespecifierseq(self, ctx:CPP14Parser.AttributespecifierseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#attributespecifierseq. + def exitAttributespecifierseq(self, ctx:CPP14Parser.AttributespecifierseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#attributespecifier. + def enterAttributespecifier(self, ctx:CPP14Parser.AttributespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#attributespecifier. + def exitAttributespecifier(self, ctx:CPP14Parser.AttributespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#alignmentspecifier. + def enterAlignmentspecifier(self, ctx:CPP14Parser.AlignmentspecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#alignmentspecifier. + def exitAlignmentspecifier(self, ctx:CPP14Parser.AlignmentspecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#attributelist. + def enterAttributelist(self, ctx:CPP14Parser.AttributelistContext): + pass + + # Exit a parse tree produced by CPP14Parser#attributelist. + def exitAttributelist(self, ctx:CPP14Parser.AttributelistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#attribute. + def enterAttribute(self, ctx:CPP14Parser.AttributeContext): + pass + + # Exit a parse tree produced by CPP14Parser#attribute. + def exitAttribute(self, ctx:CPP14Parser.AttributeContext): + pass + + + # Enter a parse tree produced by CPP14Parser#attributetoken. + def enterAttributetoken(self, ctx:CPP14Parser.AttributetokenContext): + pass + + # Exit a parse tree produced by CPP14Parser#attributetoken. + def exitAttributetoken(self, ctx:CPP14Parser.AttributetokenContext): + pass + + + # Enter a parse tree produced by CPP14Parser#attributescopedtoken. + def enterAttributescopedtoken(self, ctx:CPP14Parser.AttributescopedtokenContext): + pass + + # Exit a parse tree produced by CPP14Parser#attributescopedtoken. + def exitAttributescopedtoken(self, ctx:CPP14Parser.AttributescopedtokenContext): + pass + + + # Enter a parse tree produced by CPP14Parser#attributenamespace. + def enterAttributenamespace(self, ctx:CPP14Parser.AttributenamespaceContext): + pass + + # Exit a parse tree produced by CPP14Parser#attributenamespace. + def exitAttributenamespace(self, ctx:CPP14Parser.AttributenamespaceContext): + pass + + + # Enter a parse tree produced by CPP14Parser#attributeargumentclause. + def enterAttributeargumentclause(self, ctx:CPP14Parser.AttributeargumentclauseContext): + pass + + # Exit a parse tree produced by CPP14Parser#attributeargumentclause. + def exitAttributeargumentclause(self, ctx:CPP14Parser.AttributeargumentclauseContext): + pass + + + # Enter a parse tree produced by CPP14Parser#balancedtokenseq. + def enterBalancedtokenseq(self, ctx:CPP14Parser.BalancedtokenseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#balancedtokenseq. + def exitBalancedtokenseq(self, ctx:CPP14Parser.BalancedtokenseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#balancedtoken. + def enterBalancedtoken(self, ctx:CPP14Parser.BalancedtokenContext): + pass + + # Exit a parse tree produced by CPP14Parser#balancedtoken. + def exitBalancedtoken(self, ctx:CPP14Parser.BalancedtokenContext): + pass + + + # Enter a parse tree produced by CPP14Parser#initdeclaratorlist. + def enterInitdeclaratorlist(self, ctx:CPP14Parser.InitdeclaratorlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#initdeclaratorlist. + def exitInitdeclaratorlist(self, ctx:CPP14Parser.InitdeclaratorlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#initdeclarator. + def enterInitdeclarator(self, ctx:CPP14Parser.InitdeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#initdeclarator. + def exitInitdeclarator(self, ctx:CPP14Parser.InitdeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#declarator. + def enterDeclarator(self, ctx:CPP14Parser.DeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#declarator. + def exitDeclarator(self, ctx:CPP14Parser.DeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#nonPtrDecl. + def enterNonPtrDecl(self, ctx:CPP14Parser.NonPtrDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#nonPtrDecl. + def exitNonPtrDecl(self, ctx:CPP14Parser.NonPtrDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#ptrDecl. + def enterPtrDecl(self, ctx:CPP14Parser.PtrDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#ptrDecl. + def exitPtrDecl(self, ctx:CPP14Parser.PtrDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#noptrIgnore. + def enterNoptrIgnore(self, ctx:CPP14Parser.NoptrIgnoreContext): + pass + + # Exit a parse tree produced by CPP14Parser#noptrIgnore. + def exitNoptrIgnore(self, ctx:CPP14Parser.NoptrIgnoreContext): + pass + + + # Enter a parse tree produced by CPP14Parser#normalVarDecl. + def enterNormalVarDecl(self, ctx:CPP14Parser.NormalVarDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#normalVarDecl. + def exitNormalVarDecl(self, ctx:CPP14Parser.NormalVarDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#arrayDecl. + def enterArrayDecl(self, ctx:CPP14Parser.ArrayDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#arrayDecl. + def exitArrayDecl(self, ctx:CPP14Parser.ArrayDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#parametersandqualifiers. + def enterParametersandqualifiers(self, ctx:CPP14Parser.ParametersandqualifiersContext): + pass + + # Exit a parse tree produced by CPP14Parser#parametersandqualifiers. + def exitParametersandqualifiers(self, ctx:CPP14Parser.ParametersandqualifiersContext): + pass + + + # Enter a parse tree produced by CPP14Parser#trailingreturntype. + def enterTrailingreturntype(self, ctx:CPP14Parser.TrailingreturntypeContext): + pass + + # Exit a parse tree produced by CPP14Parser#trailingreturntype. + def exitTrailingreturntype(self, ctx:CPP14Parser.TrailingreturntypeContext): + pass + + + # Enter a parse tree produced by CPP14Parser#ptroperator. + def enterPtroperator(self, ctx:CPP14Parser.PtroperatorContext): + pass + + # Exit a parse tree produced by CPP14Parser#ptroperator. + def exitPtroperator(self, ctx:CPP14Parser.PtroperatorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#cvqualifierseq. + def enterCvqualifierseq(self, ctx:CPP14Parser.CvqualifierseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#cvqualifierseq. + def exitCvqualifierseq(self, ctx:CPP14Parser.CvqualifierseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#cvqualifier. + def enterCvqualifier(self, ctx:CPP14Parser.CvqualifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#cvqualifier. + def exitCvqualifier(self, ctx:CPP14Parser.CvqualifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#refqualifier. + def enterRefqualifier(self, ctx:CPP14Parser.RefqualifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#refqualifier. + def exitRefqualifier(self, ctx:CPP14Parser.RefqualifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#declaratorid. + def enterDeclaratorid(self, ctx:CPP14Parser.DeclaratoridContext): + pass + + # Exit a parse tree produced by CPP14Parser#declaratorid. + def exitDeclaratorid(self, ctx:CPP14Parser.DeclaratoridContext): + pass + + + # Enter a parse tree produced by CPP14Parser#thetypeid. + def enterThetypeid(self, ctx:CPP14Parser.ThetypeidContext): + pass + + # Exit a parse tree produced by CPP14Parser#thetypeid. + def exitThetypeid(self, ctx:CPP14Parser.ThetypeidContext): + pass + + + # Enter a parse tree produced by CPP14Parser#abstractdeclarator. + def enterAbstractdeclarator(self, ctx:CPP14Parser.AbstractdeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#abstractdeclarator. + def exitAbstractdeclarator(self, ctx:CPP14Parser.AbstractdeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#ptrabstractdeclarator. + def enterPtrabstractdeclarator(self, ctx:CPP14Parser.PtrabstractdeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#ptrabstractdeclarator. + def exitPtrabstractdeclarator(self, ctx:CPP14Parser.PtrabstractdeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#noptrabstractdeclarator. + def enterNoptrabstractdeclarator(self, ctx:CPP14Parser.NoptrabstractdeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#noptrabstractdeclarator. + def exitNoptrabstractdeclarator(self, ctx:CPP14Parser.NoptrabstractdeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#abstractpackdeclarator. + def enterAbstractpackdeclarator(self, ctx:CPP14Parser.AbstractpackdeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#abstractpackdeclarator. + def exitAbstractpackdeclarator(self, ctx:CPP14Parser.AbstractpackdeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#noptrabstractpackdeclarator. + def enterNoptrabstractpackdeclarator(self, ctx:CPP14Parser.NoptrabstractpackdeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#noptrabstractpackdeclarator. + def exitNoptrabstractpackdeclarator(self, ctx:CPP14Parser.NoptrabstractpackdeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#parameterdeclarationclause. + def enterParameterdeclarationclause(self, ctx:CPP14Parser.ParameterdeclarationclauseContext): + pass + + # Exit a parse tree produced by CPP14Parser#parameterdeclarationclause. + def exitParameterdeclarationclause(self, ctx:CPP14Parser.ParameterdeclarationclauseContext): + pass + + + # Enter a parse tree produced by CPP14Parser#parameterdeclarationlist. + def enterParameterdeclarationlist(self, ctx:CPP14Parser.ParameterdeclarationlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#parameterdeclarationlist. + def exitParameterdeclarationlist(self, ctx:CPP14Parser.ParameterdeclarationlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#parameterdeclaration. + def enterParameterdeclaration(self, ctx:CPP14Parser.ParameterdeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#parameterdeclaration. + def exitParameterdeclaration(self, ctx:CPP14Parser.ParameterdeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#functiondefinition. + def enterFunctiondefinition(self, ctx:CPP14Parser.FunctiondefinitionContext): + pass + + # Exit a parse tree produced by CPP14Parser#functiondefinition. + def exitFunctiondefinition(self, ctx:CPP14Parser.FunctiondefinitionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#functionbody. + def enterFunctionbody(self, ctx:CPP14Parser.FunctionbodyContext): + pass + + # Exit a parse tree produced by CPP14Parser#functionbody. + def exitFunctionbody(self, ctx:CPP14Parser.FunctionbodyContext): + pass + + + # Enter a parse tree produced by CPP14Parser#initDeclWithAssignList. + def enterInitDeclWithAssignList(self, ctx:CPP14Parser.InitDeclWithAssignListContext): + pass + + # Exit a parse tree produced by CPP14Parser#initDeclWithAssignList. + def exitInitDeclWithAssignList(self, ctx:CPP14Parser.InitDeclWithAssignListContext): + pass + + + # Enter a parse tree produced by CPP14Parser#initDeclWithCall. + def enterInitDeclWithCall(self, ctx:CPP14Parser.InitDeclWithCallContext): + pass + + # Exit a parse tree produced by CPP14Parser#initDeclWithCall. + def exitInitDeclWithCall(self, ctx:CPP14Parser.InitDeclWithCallContext): + pass + + + # Enter a parse tree produced by CPP14Parser#initDeclWithAssign. + def enterInitDeclWithAssign(self, ctx:CPP14Parser.InitDeclWithAssignContext): + pass + + # Exit a parse tree produced by CPP14Parser#initDeclWithAssign. + def exitInitDeclWithAssign(self, ctx:CPP14Parser.InitDeclWithAssignContext): + pass + + + # Enter a parse tree produced by CPP14Parser#initDeclWithList. + def enterInitDeclWithList(self, ctx:CPP14Parser.InitDeclWithListContext): + pass + + # Exit a parse tree produced by CPP14Parser#initDeclWithList. + def exitInitDeclWithList(self, ctx:CPP14Parser.InitDeclWithListContext): + pass + + + # Enter a parse tree produced by CPP14Parser#normalAssign. + def enterNormalAssign(self, ctx:CPP14Parser.NormalAssignContext): + pass + + # Exit a parse tree produced by CPP14Parser#normalAssign. + def exitNormalAssign(self, ctx:CPP14Parser.NormalAssignContext): + pass + + + # Enter a parse tree produced by CPP14Parser#arrayAssign. + def enterArrayAssign(self, ctx:CPP14Parser.ArrayAssignContext): + pass + + # Exit a parse tree produced by CPP14Parser#arrayAssign. + def exitArrayAssign(self, ctx:CPP14Parser.ArrayAssignContext): + pass + + + # Enter a parse tree produced by CPP14Parser#initializerlist. + def enterInitializerlist(self, ctx:CPP14Parser.InitializerlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#initializerlist. + def exitInitializerlist(self, ctx:CPP14Parser.InitializerlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#bracedinitlist. + def enterBracedinitlist(self, ctx:CPP14Parser.BracedinitlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#bracedinitlist. + def exitBracedinitlist(self, ctx:CPP14Parser.BracedinitlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#classname. + def enterClassname(self, ctx:CPP14Parser.ClassnameContext): + pass + + # Exit a parse tree produced by CPP14Parser#classname. + def exitClassname(self, ctx:CPP14Parser.ClassnameContext): + pass + + + # Enter a parse tree produced by CPP14Parser#classspecifier. + def enterClassspecifier(self, ctx:CPP14Parser.ClassspecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#classspecifier. + def exitClassspecifier(self, ctx:CPP14Parser.ClassspecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#classhead. + def enterClasshead(self, ctx:CPP14Parser.ClassheadContext): + pass + + # Exit a parse tree produced by CPP14Parser#classhead. + def exitClasshead(self, ctx:CPP14Parser.ClassheadContext): + pass + + + # Enter a parse tree produced by CPP14Parser#classheadname. + def enterClassheadname(self, ctx:CPP14Parser.ClassheadnameContext): + pass + + # Exit a parse tree produced by CPP14Parser#classheadname. + def exitClassheadname(self, ctx:CPP14Parser.ClassheadnameContext): + pass + + + # Enter a parse tree produced by CPP14Parser#classvirtspecifier. + def enterClassvirtspecifier(self, ctx:CPP14Parser.ClassvirtspecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#classvirtspecifier. + def exitClassvirtspecifier(self, ctx:CPP14Parser.ClassvirtspecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#classkey. + def enterClasskey(self, ctx:CPP14Parser.ClasskeyContext): + pass + + # Exit a parse tree produced by CPP14Parser#classkey. + def exitClasskey(self, ctx:CPP14Parser.ClasskeyContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberspecification. + def enterMemberspecification(self, ctx:CPP14Parser.MemberspecificationContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberspecification. + def exitMemberspecification(self, ctx:CPP14Parser.MemberspecificationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberVarDecl. + def enterMemberVarDecl(self, ctx:CPP14Parser.MemberVarDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberVarDecl. + def exitMemberVarDecl(self, ctx:CPP14Parser.MemberVarDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberFuncDecl. + def enterMemberFuncDecl(self, ctx:CPP14Parser.MemberFuncDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberFuncDecl. + def exitMemberFuncDecl(self, ctx:CPP14Parser.MemberFuncDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberUsing. + def enterMemberUsing(self, ctx:CPP14Parser.MemberUsingContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberUsing. + def exitMemberUsing(self, ctx:CPP14Parser.MemberUsingContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberStaticAssert. + def enterMemberStaticAssert(self, ctx:CPP14Parser.MemberStaticAssertContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberStaticAssert. + def exitMemberStaticAssert(self, ctx:CPP14Parser.MemberStaticAssertContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberTemplateDecl. + def enterMemberTemplateDecl(self, ctx:CPP14Parser.MemberTemplateDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberTemplateDecl. + def exitMemberTemplateDecl(self, ctx:CPP14Parser.MemberTemplateDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberAliasDecl. + def enterMemberAliasDecl(self, ctx:CPP14Parser.MemberAliasDeclContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberAliasDecl. + def exitMemberAliasDecl(self, ctx:CPP14Parser.MemberAliasDeclContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberEmpty. + def enterMemberEmpty(self, ctx:CPP14Parser.MemberEmptyContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberEmpty. + def exitMemberEmpty(self, ctx:CPP14Parser.MemberEmptyContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberdeclaratorlist. + def enterMemberdeclaratorlist(self, ctx:CPP14Parser.MemberdeclaratorlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberdeclaratorlist. + def exitMemberdeclaratorlist(self, ctx:CPP14Parser.MemberdeclaratorlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#memberdeclarator. + def enterMemberdeclarator(self, ctx:CPP14Parser.MemberdeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#memberdeclarator. + def exitMemberdeclarator(self, ctx:CPP14Parser.MemberdeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#virtspecifierseq. + def enterVirtspecifierseq(self, ctx:CPP14Parser.VirtspecifierseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#virtspecifierseq. + def exitVirtspecifierseq(self, ctx:CPP14Parser.VirtspecifierseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#virtspecifier. + def enterVirtspecifier(self, ctx:CPP14Parser.VirtspecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#virtspecifier. + def exitVirtspecifier(self, ctx:CPP14Parser.VirtspecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#purespecifier. + def enterPurespecifier(self, ctx:CPP14Parser.PurespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#purespecifier. + def exitPurespecifier(self, ctx:CPP14Parser.PurespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#baseclause. + def enterBaseclause(self, ctx:CPP14Parser.BaseclauseContext): + pass + + # Exit a parse tree produced by CPP14Parser#baseclause. + def exitBaseclause(self, ctx:CPP14Parser.BaseclauseContext): + pass + + + # Enter a parse tree produced by CPP14Parser#basespecifierlist. + def enterBasespecifierlist(self, ctx:CPP14Parser.BasespecifierlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#basespecifierlist. + def exitBasespecifierlist(self, ctx:CPP14Parser.BasespecifierlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#basespecifier. + def enterBasespecifier(self, ctx:CPP14Parser.BasespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#basespecifier. + def exitBasespecifier(self, ctx:CPP14Parser.BasespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#classordecltype. + def enterClassordecltype(self, ctx:CPP14Parser.ClassordecltypeContext): + pass + + # Exit a parse tree produced by CPP14Parser#classordecltype. + def exitClassordecltype(self, ctx:CPP14Parser.ClassordecltypeContext): + pass + + + # Enter a parse tree produced by CPP14Parser#basetypespecifier. + def enterBasetypespecifier(self, ctx:CPP14Parser.BasetypespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#basetypespecifier. + def exitBasetypespecifier(self, ctx:CPP14Parser.BasetypespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#accessspecifier. + def enterAccessspecifier(self, ctx:CPP14Parser.AccessspecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#accessspecifier. + def exitAccessspecifier(self, ctx:CPP14Parser.AccessspecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#conversionfunctionid. + def enterConversionfunctionid(self, ctx:CPP14Parser.ConversionfunctionidContext): + pass + + # Exit a parse tree produced by CPP14Parser#conversionfunctionid. + def exitConversionfunctionid(self, ctx:CPP14Parser.ConversionfunctionidContext): + pass + + + # Enter a parse tree produced by CPP14Parser#conversiontypeid. + def enterConversiontypeid(self, ctx:CPP14Parser.ConversiontypeidContext): + pass + + # Exit a parse tree produced by CPP14Parser#conversiontypeid. + def exitConversiontypeid(self, ctx:CPP14Parser.ConversiontypeidContext): + pass + + + # Enter a parse tree produced by CPP14Parser#conversiondeclarator. + def enterConversiondeclarator(self, ctx:CPP14Parser.ConversiondeclaratorContext): + pass + + # Exit a parse tree produced by CPP14Parser#conversiondeclarator. + def exitConversiondeclarator(self, ctx:CPP14Parser.ConversiondeclaratorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#ctorinitializer. + def enterCtorinitializer(self, ctx:CPP14Parser.CtorinitializerContext): + pass + + # Exit a parse tree produced by CPP14Parser#ctorinitializer. + def exitCtorinitializer(self, ctx:CPP14Parser.CtorinitializerContext): + pass + + + # Enter a parse tree produced by CPP14Parser#meminitializerlist. + def enterMeminitializerlist(self, ctx:CPP14Parser.MeminitializerlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#meminitializerlist. + def exitMeminitializerlist(self, ctx:CPP14Parser.MeminitializerlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#meminitializer. + def enterMeminitializer(self, ctx:CPP14Parser.MeminitializerContext): + pass + + # Exit a parse tree produced by CPP14Parser#meminitializer. + def exitMeminitializer(self, ctx:CPP14Parser.MeminitializerContext): + pass + + + # Enter a parse tree produced by CPP14Parser#meminitializerid. + def enterMeminitializerid(self, ctx:CPP14Parser.MeminitializeridContext): + pass + + # Exit a parse tree produced by CPP14Parser#meminitializerid. + def exitMeminitializerid(self, ctx:CPP14Parser.MeminitializeridContext): + pass + + + # Enter a parse tree produced by CPP14Parser#operatorfunctionid. + def enterOperatorfunctionid(self, ctx:CPP14Parser.OperatorfunctionidContext): + pass + + # Exit a parse tree produced by CPP14Parser#operatorfunctionid. + def exitOperatorfunctionid(self, ctx:CPP14Parser.OperatorfunctionidContext): + pass + + + # Enter a parse tree produced by CPP14Parser#literaloperatorid. + def enterLiteraloperatorid(self, ctx:CPP14Parser.LiteraloperatoridContext): + pass + + # Exit a parse tree produced by CPP14Parser#literaloperatorid. + def exitLiteraloperatorid(self, ctx:CPP14Parser.LiteraloperatoridContext): + pass + + + # Enter a parse tree produced by CPP14Parser#templatedeclaration. + def enterTemplatedeclaration(self, ctx:CPP14Parser.TemplatedeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#templatedeclaration. + def exitTemplatedeclaration(self, ctx:CPP14Parser.TemplatedeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#templateparameterlist. + def enterTemplateparameterlist(self, ctx:CPP14Parser.TemplateparameterlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#templateparameterlist. + def exitTemplateparameterlist(self, ctx:CPP14Parser.TemplateparameterlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#templateparameter. + def enterTemplateparameter(self, ctx:CPP14Parser.TemplateparameterContext): + pass + + # Exit a parse tree produced by CPP14Parser#templateparameter. + def exitTemplateparameter(self, ctx:CPP14Parser.TemplateparameterContext): + pass + + + # Enter a parse tree produced by CPP14Parser#typeparameter. + def enterTypeparameter(self, ctx:CPP14Parser.TypeparameterContext): + pass + + # Exit a parse tree produced by CPP14Parser#typeparameter. + def exitTypeparameter(self, ctx:CPP14Parser.TypeparameterContext): + pass + + + # Enter a parse tree produced by CPP14Parser#simpletemplateid. + def enterSimpletemplateid(self, ctx:CPP14Parser.SimpletemplateidContext): + pass + + # Exit a parse tree produced by CPP14Parser#simpletemplateid. + def exitSimpletemplateid(self, ctx:CPP14Parser.SimpletemplateidContext): + pass + + + # Enter a parse tree produced by CPP14Parser#templateid. + def enterTemplateid(self, ctx:CPP14Parser.TemplateidContext): + pass + + # Exit a parse tree produced by CPP14Parser#templateid. + def exitTemplateid(self, ctx:CPP14Parser.TemplateidContext): + pass + + + # Enter a parse tree produced by CPP14Parser#templatename. + def enterTemplatename(self, ctx:CPP14Parser.TemplatenameContext): + pass + + # Exit a parse tree produced by CPP14Parser#templatename. + def exitTemplatename(self, ctx:CPP14Parser.TemplatenameContext): + pass + + + # Enter a parse tree produced by CPP14Parser#templateargumentlist. + def enterTemplateargumentlist(self, ctx:CPP14Parser.TemplateargumentlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#templateargumentlist. + def exitTemplateargumentlist(self, ctx:CPP14Parser.TemplateargumentlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#templateargument. + def enterTemplateargument(self, ctx:CPP14Parser.TemplateargumentContext): + pass + + # Exit a parse tree produced by CPP14Parser#templateargument. + def exitTemplateargument(self, ctx:CPP14Parser.TemplateargumentContext): + pass + + + # Enter a parse tree produced by CPP14Parser#typenamespecifier. + def enterTypenamespecifier(self, ctx:CPP14Parser.TypenamespecifierContext): + pass + + # Exit a parse tree produced by CPP14Parser#typenamespecifier. + def exitTypenamespecifier(self, ctx:CPP14Parser.TypenamespecifierContext): + pass + + + # Enter a parse tree produced by CPP14Parser#explicitinstantiation. + def enterExplicitinstantiation(self, ctx:CPP14Parser.ExplicitinstantiationContext): + pass + + # Exit a parse tree produced by CPP14Parser#explicitinstantiation. + def exitExplicitinstantiation(self, ctx:CPP14Parser.ExplicitinstantiationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#explicitspecialization. + def enterExplicitspecialization(self, ctx:CPP14Parser.ExplicitspecializationContext): + pass + + # Exit a parse tree produced by CPP14Parser#explicitspecialization. + def exitExplicitspecialization(self, ctx:CPP14Parser.ExplicitspecializationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#tryblock. + def enterTryblock(self, ctx:CPP14Parser.TryblockContext): + pass + + # Exit a parse tree produced by CPP14Parser#tryblock. + def exitTryblock(self, ctx:CPP14Parser.TryblockContext): + pass + + + # Enter a parse tree produced by CPP14Parser#functiontryblock. + def enterFunctiontryblock(self, ctx:CPP14Parser.FunctiontryblockContext): + pass + + # Exit a parse tree produced by CPP14Parser#functiontryblock. + def exitFunctiontryblock(self, ctx:CPP14Parser.FunctiontryblockContext): + pass + + + # Enter a parse tree produced by CPP14Parser#handlerseq. + def enterHandlerseq(self, ctx:CPP14Parser.HandlerseqContext): + pass + + # Exit a parse tree produced by CPP14Parser#handlerseq. + def exitHandlerseq(self, ctx:CPP14Parser.HandlerseqContext): + pass + + + # Enter a parse tree produced by CPP14Parser#handler. + def enterHandler(self, ctx:CPP14Parser.HandlerContext): + pass + + # Exit a parse tree produced by CPP14Parser#handler. + def exitHandler(self, ctx:CPP14Parser.HandlerContext): + pass + + + # Enter a parse tree produced by CPP14Parser#exceptiondeclaration. + def enterExceptiondeclaration(self, ctx:CPP14Parser.ExceptiondeclarationContext): + pass + + # Exit a parse tree produced by CPP14Parser#exceptiondeclaration. + def exitExceptiondeclaration(self, ctx:CPP14Parser.ExceptiondeclarationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#throwexpression. + def enterThrowexpression(self, ctx:CPP14Parser.ThrowexpressionContext): + pass + + # Exit a parse tree produced by CPP14Parser#throwexpression. + def exitThrowexpression(self, ctx:CPP14Parser.ThrowexpressionContext): + pass + + + # Enter a parse tree produced by CPP14Parser#exceptionspecification. + def enterExceptionspecification(self, ctx:CPP14Parser.ExceptionspecificationContext): + pass + + # Exit a parse tree produced by CPP14Parser#exceptionspecification. + def exitExceptionspecification(self, ctx:CPP14Parser.ExceptionspecificationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#dynamicexceptionspecification. + def enterDynamicexceptionspecification(self, ctx:CPP14Parser.DynamicexceptionspecificationContext): + pass + + # Exit a parse tree produced by CPP14Parser#dynamicexceptionspecification. + def exitDynamicexceptionspecification(self, ctx:CPP14Parser.DynamicexceptionspecificationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#typeidlist. + def enterTypeidlist(self, ctx:CPP14Parser.TypeidlistContext): + pass + + # Exit a parse tree produced by CPP14Parser#typeidlist. + def exitTypeidlist(self, ctx:CPP14Parser.TypeidlistContext): + pass + + + # Enter a parse tree produced by CPP14Parser#noexceptspecification. + def enterNoexceptspecification(self, ctx:CPP14Parser.NoexceptspecificationContext): + pass + + # Exit a parse tree produced by CPP14Parser#noexceptspecification. + def exitNoexceptspecification(self, ctx:CPP14Parser.NoexceptspecificationContext): + pass + + + # Enter a parse tree produced by CPP14Parser#rightShift. + def enterRightShift(self, ctx:CPP14Parser.RightShiftContext): + pass + + # Exit a parse tree produced by CPP14Parser#rightShift. + def exitRightShift(self, ctx:CPP14Parser.RightShiftContext): + pass + + + # Enter a parse tree produced by CPP14Parser#rightShiftAssign. + def enterRightShiftAssign(self, ctx:CPP14Parser.RightShiftAssignContext): + pass + + # Exit a parse tree produced by CPP14Parser#rightShiftAssign. + def exitRightShiftAssign(self, ctx:CPP14Parser.RightShiftAssignContext): + pass + + + # Enter a parse tree produced by CPP14Parser#theoperator. + def enterTheoperator(self, ctx:CPP14Parser.TheoperatorContext): + pass + + # Exit a parse tree produced by CPP14Parser#theoperator. + def exitTheoperator(self, ctx:CPP14Parser.TheoperatorContext): + pass + + + # Enter a parse tree produced by CPP14Parser#literal. + def enterLiteral(self, ctx:CPP14Parser.LiteralContext): + pass + + # Exit a parse tree produced by CPP14Parser#literal. + def exitLiteral(self, ctx:CPP14Parser.LiteralContext): + pass + + + # Enter a parse tree produced by CPP14Parser#booleanliteral. + def enterBooleanliteral(self, ctx:CPP14Parser.BooleanliteralContext): + pass + + # Exit a parse tree produced by CPP14Parser#booleanliteral. + def exitBooleanliteral(self, ctx:CPP14Parser.BooleanliteralContext): + pass + + + # Enter a parse tree produced by CPP14Parser#pointerliteral. + def enterPointerliteral(self, ctx:CPP14Parser.PointerliteralContext): + pass + + # Exit a parse tree produced by CPP14Parser#pointerliteral. + def exitPointerliteral(self, ctx:CPP14Parser.PointerliteralContext): + pass + + + # Enter a parse tree produced by CPP14Parser#userdefinedliteral. + def enterUserdefinedliteral(self, ctx:CPP14Parser.UserdefinedliteralContext): + pass + + # Exit a parse tree produced by CPP14Parser#userdefinedliteral. + def exitUserdefinedliteral(self, ctx:CPP14Parser.UserdefinedliteralContext): + pass + + + +del CPP14Parser \ No newline at end of file diff --git a/mainTool/antlr/CPP14Parser.py b/mainTool/antlr/CPP14Parser.py new file mode 100644 index 0000000..bd43365 --- /dev/null +++ b/mainTool/antlr/CPP14Parser.py @@ -0,0 +1,20901 @@ +# Generated from D:/projects/python/vul detect/tools/CppCodeAnalyzer/resources\CPP14.g4 by ANTLR 4.9.2 +# encoding: utf-8 +from antlr4 import * +from io import StringIO +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\3\u0090") + buf.write("\u09b0\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7") + buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16") + buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23") + buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31") + buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36") + buf.write("\4\37\t\37\4 \t \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t") + buf.write("&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4,\t,\4-\t-\4.\t.\4") + buf.write("/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t\64") + buf.write("\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t") + buf.write(";\4<\t<\4=\t=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\t") + buf.write("D\4E\tE\4F\tF\4G\tG\4H\tH\4I\tI\4J\tJ\4K\tK\4L\tL\4M\t") + buf.write("M\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT\4U\tU\4V\t") + buf.write("V\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4") + buf.write("_\t_\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4") + buf.write("h\th\4i\ti\4j\tj\4k\tk\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4") + buf.write("q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv\4w\tw\4x\tx\4y\ty\4") + buf.write("z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t\u0080") + buf.write("\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084") + buf.write("\t\u0084\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087") + buf.write("\4\u0088\t\u0088\4\u0089\t\u0089\4\u008a\t\u008a\4\u008b") + buf.write("\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d\4\u008e\t\u008e") + buf.write("\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092") + buf.write("\t\u0092\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095") + buf.write("\4\u0096\t\u0096\4\u0097\t\u0097\4\u0098\t\u0098\4\u0099") + buf.write("\t\u0099\4\u009a\t\u009a\4\u009b\t\u009b\4\u009c\t\u009c") + buf.write("\4\u009d\t\u009d\4\u009e\t\u009e\4\u009f\t\u009f\4\u00a0") + buf.write("\t\u00a0\4\u00a1\t\u00a1\4\u00a2\t\u00a2\4\u00a3\t\u00a3") + buf.write("\4\u00a4\t\u00a4\4\u00a5\t\u00a5\4\u00a6\t\u00a6\4\u00a7") + buf.write("\t\u00a7\4\u00a8\t\u00a8\4\u00a9\t\u00a9\4\u00aa\t\u00aa") + buf.write("\4\u00ab\t\u00ab\4\u00ac\t\u00ac\4\u00ad\t\u00ad\4\u00ae") + buf.write("\t\u00ae\4\u00af\t\u00af\4\u00b0\t\u00b0\4\u00b1\t\u00b1") + buf.write("\4\u00b2\t\u00b2\4\u00b3\t\u00b3\4\u00b4\t\u00b4\4\u00b5") + buf.write("\t\u00b5\4\u00b6\t\u00b6\4\u00b7\t\u00b7\4\u00b8\t\u00b8") + buf.write("\4\u00b9\t\u00b9\4\u00ba\t\u00ba\4\u00bb\t\u00bb\4\u00bc") + buf.write("\t\u00bc\4\u00bd\t\u00bd\4\u00be\t\u00be\4\u00bf\t\u00bf") + buf.write("\4\u00c0\t\u00c0\4\u00c1\t\u00c1\4\u00c2\t\u00c2\4\u00c3") + buf.write("\t\u00c3\4\u00c4\t\u00c4\4\u00c5\t\u00c5\4\u00c6\t\u00c6") + buf.write("\4\u00c7\t\u00c7\4\u00c8\t\u00c8\4\u00c9\t\u00c9\4\u00ca") + buf.write("\t\u00ca\4\u00cb\t\u00cb\3\2\5\2\u0198\n\2\3\2\3\2\3\3") + buf.write("\3\3\3\3\3\3\3\3\3\3\3\3\3\3\5\3\u01a4\n\3\3\4\3\4\5\4") + buf.write("\u01a8\n\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\u01b3") + buf.write("\n\5\3\6\3\6\5\6\u01b7\n\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7") + buf.write("\3\7\3\7\3\7\3\7\3\7\3\7\5\7\u01c6\n\7\3\7\3\7\3\7\3\7") + buf.write("\3\7\5\7\u01cd\n\7\3\7\3\7\3\7\7\7\u01d2\n\7\f\7\16\7") + buf.write("\u01d5\13\7\3\b\3\b\5\b\u01d9\n\b\3\b\3\b\3\t\3\t\5\t") + buf.write("\u01df\n\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\5\n\u01e9\n") + buf.write("\n\3\13\3\13\3\f\3\f\3\f\5\f\u01f0\n\f\3\f\3\f\3\f\3\f") + buf.write("\5\f\u01f6\n\f\7\f\u01f8\n\f\f\f\16\f\u01fb\13\f\3\r\3") + buf.write("\r\5\r\u01ff\n\r\3\16\3\16\3\16\3\16\5\16\u0205\n\16\3") + buf.write("\17\3\17\3\17\3\17\3\17\5\17\u020c\n\17\3\20\3\20\3\20") + buf.write("\3\20\5\20\u0212\n\20\3\20\5\20\u0215\n\20\3\20\5\20\u0218") + buf.write("\n\20\3\20\5\20\u021b\n\20\3\21\3\21\3\21\3\21\3\21\5") + buf.write("\21\u0222\n\21\3\21\3\21\3\21\3\21\3\21\5\21\u0229\n\21") + buf.write("\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21") + buf.write("\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21") + buf.write("\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21") + buf.write("\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21") + buf.write("\3\21\3\21\3\21\3\21\3\21\3\21\5\21\u025d\n\21\3\21\3") + buf.write("\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21") + buf.write("\3\21\5\21\u026c\n\21\3\21\3\21\3\21\3\21\5\21\u0272\n") + buf.write("\21\3\21\3\21\3\21\3\21\5\21\u0278\n\21\3\21\3\21\3\21") + buf.write("\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\7\21\u0285\n") + buf.write("\21\f\21\16\21\u0288\13\21\3\22\3\22\3\23\5\23\u028d\n") + buf.write("\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23") + buf.write("\3\23\3\23\3\23\5\23\u029c\n\23\3\23\3\23\3\23\3\23\5") + buf.write("\23\u02a2\n\23\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24") + buf.write("\3\24\3\24\3\24\3\24\3\24\5\24\u02b1\n\24\3\25\3\25\3") + buf.write("\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\5\25") + buf.write("\u02bf\n\25\3\26\3\26\3\26\3\26\3\26\3\27\3\27\3\30\5") + buf.write("\30\u02c9\n\30\3\30\3\30\5\30\u02cd\n\30\3\30\3\30\5\30") + buf.write("\u02d1\n\30\3\30\5\30\u02d4\n\30\3\30\3\30\5\30\u02d8") + buf.write("\n\30\3\30\3\30\3\30\3\30\5\30\u02de\n\30\5\30\u02e0\n") + buf.write("\30\3\31\3\31\3\31\3\31\3\32\3\32\5\32\u02e8\n\32\3\33") + buf.write("\3\33\5\33\u02ec\n\33\3\33\5\33\u02ef\n\33\3\34\3\34\3") + buf.write("\34\3\34\3\34\5\34\u02f6\n\34\3\34\3\34\3\34\3\34\3\34") + buf.write("\5\34\u02fd\n\34\7\34\u02ff\n\34\f\34\16\34\u0302\13\34") + buf.write("\3\35\3\35\5\35\u0306\n\35\3\35\3\35\5\35\u030a\n\35\3") + buf.write("\36\5\36\u030d\n\36\3\36\3\36\3\36\5\36\u0312\n\36\3\36") + buf.write("\3\36\3\36\3\36\5\36\u0318\n\36\3\37\3\37\3\37\3\37\3") + buf.write("\37\3 \3 \3 \3 \3 \3 \5 \u0325\n \3!\3!\3!\3!\3!\3!\3") + buf.write("!\3!\3!\7!\u0330\n!\f!\16!\u0333\13!\3\"\3\"\3\"\3\"\3") + buf.write("\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\7\"\u0341\n\"\f\"\16\"") + buf.write("\u0344\13\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\7#\u034f\n#\f#") + buf.write("\16#\u0352\13#\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\7$\u035e") + buf.write("\n$\f$\16$\u0361\13$\3%\3%\3%\3%\3%\3%\3%\3%\3%\3%\3%") + buf.write("\3%\3%\3%\3%\7%\u0372\n%\f%\16%\u0375\13%\3&\3&\3&\3&") + buf.write("\3&\3&\3&\3&\3&\7&\u0380\n&\f&\16&\u0383\13&\3\'\3\'\3") + buf.write("\'\3\'\3\'\3\'\7\'\u038b\n\'\f\'\16\'\u038e\13\'\3(\3") + buf.write("(\3(\3(\3(\3(\7(\u0396\n(\f(\16(\u0399\13(\3)\3)\3)\3") + buf.write(")\3)\3)\7)\u03a1\n)\f)\16)\u03a4\13)\3*\3*\3*\3*\3*\3") + buf.write("*\7*\u03ac\n*\f*\16*\u03af\13*\3+\3+\3+\3+\3+\3+\7+\u03b7") + buf.write("\n+\f+\16+\u03ba\13+\3,\3,\3,\3,\3,\3,\3,\5,\u03c3\n,") + buf.write("\3-\3-\3-\3-\3-\3-\5-\u03cb\n-\3.\3.\3.\3.\3.\3.\3.\3") + buf.write(".\3.\3.\3.\5.\u03d8\n.\3/\3/\3/\3/\3/\3/\7/\u03e0\n/\f") + buf.write("/\16/\u03e3\13/\3\60\3\60\3\61\3\61\5\61\u03e9\n\61\3") + buf.write("\61\3\61\5\61\u03ed\n\61\3\61\3\61\5\61\u03f1\n\61\3\61") + buf.write("\3\61\5\61\u03f5\n\61\3\61\3\61\5\61\u03f9\n\61\3\61\3") + buf.write("\61\3\61\5\61\u03fe\n\61\3\61\5\61\u0401\n\61\3\62\5\62") + buf.write("\u0404\n\62\3\62\3\62\3\62\5\62\u0409\n\62\3\62\3\62\3") + buf.write("\62\3\62\3\62\5\62\u0410\n\62\3\62\3\62\5\62\u0414\n\62") + buf.write("\3\63\3\63\3\63\3\64\5\64\u041a\n\64\3\64\3\64\3\65\3") + buf.write("\65\5\65\u0420\n\65\3\65\3\65\3\66\3\66\3\66\3\66\3\66") + buf.write("\7\66\u0429\n\66\f\66\16\66\u042c\13\66\3\67\3\67\3\67") + buf.write("\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67") + buf.write("\3\67\3\67\3\67\3\67\3\67\3\67\5\67\u0442\n\67\38\38\5") + buf.write("8\u0446\n8\38\38\38\38\38\38\58\u044e\n8\38\38\38\38\5") + buf.write("8\u0454\n8\39\39\39\39\39\39\39\39\39\39\39\39\39\39\3") + buf.write("9\39\39\39\59\u0468\n9\39\39\59\u046c\n9\39\39\39\39\3") + buf.write("9\39\39\39\39\39\39\59\u0479\n9\3:\3:\5:\u047d\n:\3;\5") + buf.write(";\u0480\n;\3;\3;\3;\3<\3<\5<\u0487\n<\3=\3=\3=\3=\3=\3") + buf.write("=\5=\u048f\n=\3=\3=\3=\3=\3=\3=\3=\3=\5=\u0499\n=\3>\3") + buf.write(">\3?\3?\3?\3?\3?\7?\u04a2\n?\f?\16?\u04a5\13?\3@\3@\3") + buf.write("@\3@\3@\3@\3@\3@\3@\5@\u04b0\n@\3A\3A\3A\3A\3A\3A\3A\3") + buf.write("A\5A\u04ba\nA\3B\3B\3B\5B\u04bf\nB\3B\3B\3B\3B\3C\5C\u04c6") + buf.write("\nC\3C\5C\u04c9\nC\3C\3C\3C\5C\u04ce\nC\3C\3C\3C\5C\u04d3") + buf.write("\nC\3D\3D\3D\3D\3D\3D\3D\3D\3E\3E\3F\3F\3F\3G\3G\3G\3") + buf.write("G\3G\3G\5G\u04e8\nG\3H\3H\5H\u04ec\nH\3H\3H\3H\5H\u04f1") + buf.write("\nH\3I\3I\3J\3J\3K\3K\3L\3L\3L\5L\u04fc\nL\3M\3M\3M\3") + buf.write("M\5M\u0502\nM\3N\3N\5N\u0506\nN\3N\3N\3N\5N\u050b\nN\3") + buf.write("O\3O\5O\u050f\nO\3O\3O\3O\5O\u0514\nO\3P\5P\u0517\nP\3") + buf.write("P\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\3P\3") + buf.write("P\3P\5P\u052d\nP\3Q\3Q\3Q\3Q\5Q\u0533\nQ\3R\3R\3R\3R\3") + buf.write("R\3R\3R\3R\3R\5R\u053e\nR\3S\3S\5S\u0542\nS\3S\5S\u0545") + buf.write("\nS\3S\3S\3S\3S\3S\3S\3S\3S\5S\u054f\nS\3S\3S\3S\3S\5") + buf.write("S\u0555\nS\3S\5S\u0558\nS\3T\3T\3U\3U\3U\5U\u055f\nU\3") + buf.write("U\3U\3U\3U\3U\3U\3U\3U\5U\u0569\nU\3V\3V\5V\u056d\nV\3") + buf.write("V\5V\u0570\nV\3V\5V\u0573\nV\3V\3V\5V\u0577\nV\3V\3V\3") + buf.write("V\5V\u057c\nV\5V\u057e\nV\3W\3W\5W\u0582\nW\3W\3W\5W\u0586") + buf.write("\nW\3W\3W\3X\3X\3X\3X\3X\5X\u058f\nX\3Y\3Y\3Y\3Z\3Z\3") + buf.write("Z\3Z\3Z\3Z\7Z\u059a\nZ\fZ\16Z\u059d\13Z\3[\3[\3[\3[\3") + buf.write("[\5[\u05a4\n[\3\\\3\\\3]\3]\5]\u05aa\n]\3^\3^\3_\3_\5") + buf.write("_\u05b0\n_\3`\3`\5`\u05b4\n`\3a\5a\u05b7\na\3a\3a\3a\3") + buf.write("a\3a\3a\3b\5b\u05c0\nb\3b\3b\3b\3b\3b\3b\3c\5c\u05c9\n") + buf.write("c\3c\3c\3c\3c\3c\3d\5d\u05d1\nd\3e\3e\3f\3f\3f\3f\3f\3") + buf.write("f\3g\5g\u05dc\ng\3g\3g\3h\3h\5h\u05e2\nh\3h\3h\3h\3h\3") + buf.write("h\3h\3h\3h\3h\5h\u05ed\nh\3i\5i\u05f0\ni\3i\3i\3i\5i\u05f5") + buf.write("\ni\3i\3i\3i\3j\3j\3j\3j\3j\3j\3k\3k\3k\3k\5k\u0604\n") + buf.write("k\3k\3k\3k\3k\5k\u060a\nk\3l\3l\3l\3l\3l\7l\u0611\nl\f") + buf.write("l\16l\u0614\13l\3m\3m\3m\3m\3m\3m\3m\5m\u061d\nm\3n\3") + buf.write("n\3n\3n\5n\u0623\nn\3n\3n\3n\3n\3n\3n\5n\u062b\nn\3n\3") + buf.write("n\5n\u062f\nn\3o\3o\5o\u0633\no\3o\3o\3o\5o\u0638\no\3") + buf.write("o\3o\3o\5o\u063d\no\3o\3o\3o\3o\3o\7o\u0644\no\fo\16o") + buf.write("\u0647\13o\3p\3p\5p\u064b\np\3q\3q\5q\u064f\nq\3r\3r\3") + buf.write("r\3r\3s\3s\3t\3t\3t\3t\3u\3u\5u\u065d\nu\3u\3u\7u\u0661") + buf.write("\nu\fu\16u\u0664\13u\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v\3v") + buf.write("\3v\5v\u0672\nv\3w\3w\3w\3w\3w\3w\7w\u067a\nw\fw\16w\u067d") + buf.write("\13w\3x\3x\5x\u0681\nx\3y\3y\3y\3y\3y\5y\u0688\ny\3z\3") + buf.write("z\3z\3z\5z\u068e\nz\3{\3{\3{\5{\u0693\n{\3{\3{\3{\3{\5") + buf.write("{\u0699\n{\3{\3{\3{\3{\3{\5{\u06a0\n{\3{\3{\5{\u06a4\n") + buf.write("{\7{\u06a6\n{\f{\16{\u06a9\13{\3|\3|\3|\3|\5|\u06af\n") + buf.write("|\3|\5|\u06b2\n|\3|\5|\u06b5\n|\3|\5|\u06b8\n|\3}\3}\3") + buf.write("}\5}\u06bd\n}\3~\3~\5~\u06c1\n~\3~\5~\u06c4\n~\3~\3~\5") + buf.write("~\u06c8\n~\3~\3~\5~\u06cc\n~\3~\3~\3~\5~\u06d1\n~\3~\5") + buf.write("~\u06d4\n~\5~\u06d6\n~\3\177\3\177\5\177\u06da\n\177\3") + buf.write("\u0080\3\u0080\3\u0081\3\u0081\3\u0082\5\u0082\u06e1\n") + buf.write("\u0082\3\u0082\3\u0082\3\u0083\3\u0083\5\u0083\u06e7\n") + buf.write("\u0083\3\u0084\3\u0084\5\u0084\u06eb\n\u0084\3\u0084\3") + buf.write("\u0084\3\u0084\3\u0084\5\u0084\u06f1\n\u0084\3\u0085\3") + buf.write("\u0085\3\u0085\5\u0085\u06f6\n\u0085\5\u0085\u06f8\n\u0085") + buf.write("\3\u0086\3\u0086\3\u0086\3\u0086\5\u0086\u06fe\n\u0086") + buf.write("\3\u0086\3\u0086\5\u0086\u0702\n\u0086\3\u0086\3\u0086") + buf.write("\3\u0086\3\u0086\5\u0086\u0708\n\u0086\3\u0086\3\u0086") + buf.write("\3\u0086\3\u0086\3\u0086\5\u0086\u070f\n\u0086\3\u0086") + buf.write("\3\u0086\5\u0086\u0713\n\u0086\7\u0086\u0715\n\u0086\f") + buf.write("\u0086\16\u0086\u0718\13\u0086\3\u0087\3\u0087\3\u0087") + buf.write("\3\u0087\5\u0087\u071e\n\u0087\3\u0088\3\u0088\3\u0088") + buf.write("\3\u0088\3\u0088\3\u0088\3\u0088\3\u0088\5\u0088\u0728") + buf.write("\n\u0088\3\u0088\3\u0088\5\u0088\u072c\n\u0088\7\u0088") + buf.write("\u072e\n\u0088\f\u0088\16\u0088\u0731\13\u0088\3\u0089") + buf.write("\5\u0089\u0734\n\u0089\3\u0089\5\u0089\u0737\n\u0089\3") + buf.write("\u0089\3\u0089\3\u0089\3\u0089\5\u0089\u073d\n\u0089\3") + buf.write("\u008a\3\u008a\3\u008a\3\u008a\3\u008a\3\u008a\7\u008a") + buf.write("\u0745\n\u008a\f\u008a\16\u008a\u0748\13\u008a\3\u008b") + buf.write("\5\u008b\u074b\n\u008b\3\u008b\3\u008b\3\u008b\3\u008b") + buf.write("\5\u008b\u0751\n\u008b\3\u008b\3\u008b\3\u008b\3\u008b") + buf.write("\3\u008b\3\u008b\5\u008b\u0759\n\u008b\3\u008b\3\u008b") + buf.write("\5\u008b\u075d\n\u008b\3\u008b\5\u008b\u0760\n\u008b\3") + buf.write("\u008b\3\u008b\5\u008b\u0764\n\u008b\3\u008b\3\u008b\3") + buf.write("\u008b\5\u008b\u0769\n\u008b\3\u008c\5\u008c\u076c\n\u008c") + buf.write("\3\u008c\5\u008c\u076f\n\u008c\3\u008c\3\u008c\5\u008c") + buf.write("\u0773\n\u008c\3\u008c\3\u008c\3\u008d\5\u008d\u0778\n") + buf.write("\u008d\3\u008d\3\u008d\3\u008d\3\u008d\3\u008d\3\u008d") + buf.write("\3\u008d\3\u008d\5\u008d\u0782\n\u008d\3\u008e\3\u008e") + buf.write("\3\u008e\3\u008e\3\u008e\5\u008e\u0789\n\u008e\3\u008f") + buf.write("\3\u008f\3\u008f\5\u008f\u078e\n\u008f\3\u0090\3\u0090") + buf.write("\5\u0090\u0792\n\u0090\3\u0091\3\u0091\3\u0091\5\u0091") + buf.write("\u0797\n\u0091\3\u0091\3\u0091\3\u0091\3\u0091\5\u0091") + buf.write("\u079d\n\u0091\7\u0091\u079f\n\u0091\f\u0091\16\u0091") + buf.write("\u07a2\13\u0091\3\u0092\3\u0092\3\u0092\5\u0092\u07a7") + buf.write("\n\u0092\3\u0092\3\u0092\3\u0092\3\u0092\5\u0092\u07ad") + buf.write("\n\u0092\3\u0093\3\u0093\5\u0093\u07b1\n\u0093\3\u0094") + buf.write("\3\u0094\3\u0094\5\u0094\u07b6\n\u0094\3\u0094\3\u0094") + buf.write("\3\u0095\3\u0095\5\u0095\u07bc\n\u0095\3\u0095\3\u0095") + buf.write("\5\u0095\u07c0\n\u0095\3\u0095\5\u0095\u07c3\n\u0095\3") + buf.write("\u0095\3\u0095\5\u0095\u07c7\n\u0095\3\u0095\5\u0095\u07ca") + buf.write("\n\u0095\5\u0095\u07cc\n\u0095\3\u0096\5\u0096\u07cf\n") + buf.write("\u0096\3\u0096\3\u0096\3\u0097\3\u0097\3\u0098\3\u0098") + buf.write("\3\u0099\3\u0099\5\u0099\u07d9\n\u0099\3\u0099\3\u0099") + buf.write("\3\u0099\5\u0099\u07de\n\u0099\5\u0099\u07e0\n\u0099\3") + buf.write("\u009a\5\u009a\u07e3\n\u009a\3\u009a\5\u009a\u07e6\n\u009a") + buf.write("\3\u009a\5\u009a\u07e9\n\u009a\3\u009a\3\u009a\3\u009a") + buf.write("\3\u009a\3\u009a\3\u009a\3\u009a\5\u009a\u07f2\n\u009a") + buf.write("\3\u009b\3\u009b\3\u009b\3\u009b\3\u009b\3\u009b\7\u009b") + buf.write("\u07fa\n\u009b\f\u009b\16\u009b\u07fd\13\u009b\3\u009c") + buf.write("\3\u009c\5\u009c\u0801\n\u009c\3\u009c\5\u009c\u0804\n") + buf.write("\u009c\3\u009c\3\u009c\5\u009c\u0808\n\u009c\3\u009c\5") + buf.write("\u009c\u080b\n\u009c\3\u009c\5\u009c\u080e\n\u009c\3\u009c") + buf.write("\3\u009c\5\u009c\u0812\n\u009c\3\u009d\3\u009d\3\u009d") + buf.write("\3\u009d\3\u009d\7\u009d\u0819\n\u009d\f\u009d\16\u009d") + buf.write("\u081c\13\u009d\3\u009e\3\u009e\3\u009f\3\u009f\3\u009f") + buf.write("\3\u009f\3\u00a0\3\u00a0\3\u00a0\3\u00a1\3\u00a1\3\u00a1") + buf.write("\5\u00a1\u082a\n\u00a1\3\u00a1\3\u00a1\3\u00a1\3\u00a1") + buf.write("\5\u00a1\u0830\n\u00a1\7\u00a1\u0832\n\u00a1\f\u00a1\16") + buf.write("\u00a1\u0835\13\u00a1\3\u00a2\5\u00a2\u0838\n\u00a2\3") + buf.write("\u00a2\3\u00a2\5\u00a2\u083c\n\u00a2\3\u00a2\3\u00a2\5") + buf.write("\u00a2\u0840\n\u00a2\3\u00a2\3\u00a2\5\u00a2\u0844\n\u00a2") + buf.write("\3\u00a2\3\u00a2\5\u00a2\u0848\n\u00a2\3\u00a2\3\u00a2") + buf.write("\5\u00a2\u084c\n\u00a2\3\u00a3\5\u00a3\u084f\n\u00a3\3") + buf.write("\u00a3\3\u00a3\5\u00a3\u0853\n\u00a3\3\u00a4\3\u00a4\3") + buf.write("\u00a5\3\u00a5\3\u00a6\3\u00a6\3\u00a6\3\u00a7\3\u00a7") + buf.write("\5\u00a7\u085e\n\u00a7\3\u00a8\3\u00a8\5\u00a8\u0862\n") + buf.write("\u00a8\3\u00a9\3\u00a9\3\u00a9\3\u00aa\3\u00aa\5\u00aa") + buf.write("\u0869\n\u00aa\3\u00aa\3\u00aa\5\u00aa\u086d\n\u00aa\3") + buf.write("\u00aa\3\u00aa\3\u00aa\5\u00aa\u0872\n\u00aa\3\u00ab\3") + buf.write("\u00ab\3\u00ab\5\u00ab\u0877\n\u00ab\3\u00ab\3\u00ab\3") + buf.write("\u00ab\3\u00ab\3\u00ab\5\u00ab\u087e\n\u00ab\3\u00ac\3") + buf.write("\u00ac\5\u00ac\u0882\n\u00ac\3\u00ad\3\u00ad\3\u00ad\3") + buf.write("\u00ae\3\u00ae\3\u00ae\3\u00ae\3\u00ae\5\u00ae\u088c\n") + buf.write("\u00ae\3\u00af\3\u00af\3\u00af\3\u00af\3\u00af\3\u00af") + buf.write("\3\u00b0\3\u00b0\3\u00b0\3\u00b0\3\u00b0\3\u00b0\7\u00b0") + buf.write("\u089a\n\u00b0\f\u00b0\16\u00b0\u089d\13\u00b0\3\u00b1") + buf.write("\3\u00b1\5\u00b1\u08a1\n\u00b1\3\u00b2\3\u00b2\5\u00b2") + buf.write("\u08a5\n\u00b2\3\u00b2\5\u00b2\u08a8\n\u00b2\3\u00b2\3") + buf.write("\u00b2\5\u00b2\u08ac\n\u00b2\3\u00b2\3\u00b2\3\u00b2\3") + buf.write("\u00b2\5\u00b2\u08b2\n\u00b2\3\u00b2\5\u00b2\u08b5\n\u00b2") + buf.write("\3\u00b2\3\u00b2\5\u00b2\u08b9\n\u00b2\3\u00b2\3\u00b2") + buf.write("\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b2\5\u00b2") + buf.write("\u08c3\n\u00b2\3\u00b2\5\u00b2\u08c6\n\u00b2\3\u00b2\3") + buf.write("\u00b2\3\u00b2\3\u00b2\3\u00b2\3\u00b2\5\u00b2\u08ce\n") + buf.write("\u00b2\3\u00b2\3\u00b2\3\u00b2\5\u00b2\u08d3\n\u00b2\3") + buf.write("\u00b3\3\u00b3\3\u00b3\5\u00b3\u08d8\n\u00b3\3\u00b3\3") + buf.write("\u00b3\3\u00b4\3\u00b4\3\u00b4\3\u00b4\5\u00b4\u08e0\n") + buf.write("\u00b4\3\u00b4\3\u00b4\3\u00b4\3\u00b4\3\u00b4\5\u00b4") + buf.write("\u08e7\n\u00b4\3\u00b4\3\u00b4\5\u00b4\u08eb\n\u00b4\3") + buf.write("\u00b5\3\u00b5\3\u00b6\3\u00b6\3\u00b6\5\u00b6\u08f2\n") + buf.write("\u00b6\3\u00b6\3\u00b6\3\u00b6\3\u00b6\5\u00b6\u08f8\n") + buf.write("\u00b6\7\u00b6\u08fa\n\u00b6\f\u00b6\16\u00b6\u08fd\13") + buf.write("\u00b6\3\u00b7\3\u00b7\3\u00b7\5\u00b7\u0902\n\u00b7\3") + buf.write("\u00b8\3\u00b8\3\u00b8\3\u00b8\3\u00b8\3\u00b8\3\u00b8") + buf.write("\5\u00b8\u090b\n\u00b8\3\u00b8\3\u00b8\5\u00b8\u090f\n") + buf.write("\u00b8\3\u00b9\5\u00b9\u0912\n\u00b9\3\u00b9\3\u00b9\3") + buf.write("\u00b9\3\u00ba\3\u00ba\3\u00ba\3\u00ba\3\u00ba\3\u00bb") + buf.write("\3\u00bb\3\u00bb\3\u00bb\3\u00bc\3\u00bc\5\u00bc\u0922") + buf.write("\n\u00bc\3\u00bc\3\u00bc\3\u00bc\3\u00bd\3\u00bd\5\u00bd") + buf.write("\u0929\n\u00bd\3\u00be\3\u00be\3\u00be\3\u00be\3\u00be") + buf.write("\3\u00be\3\u00bf\5\u00bf\u0932\n\u00bf\3\u00bf\3\u00bf") + buf.write("\3\u00bf\3\u00bf\5\u00bf\u0938\n\u00bf\3\u00bf\3\u00bf") + buf.write("\5\u00bf\u093c\n\u00bf\3\u00bf\5\u00bf\u093f\n\u00bf\3") + buf.write("\u00c0\3\u00c0\5\u00c0\u0943\n\u00c0\3\u00c1\3\u00c1\5") + buf.write("\u00c1\u0947\n\u00c1\3\u00c2\3\u00c2\3\u00c2\5\u00c2\u094c") + buf.write("\n\u00c2\3\u00c2\3\u00c2\3\u00c3\3\u00c3\3\u00c3\5\u00c3") + buf.write("\u0953\n\u00c3\3\u00c3\3\u00c3\3\u00c3\3\u00c3\5\u00c3") + buf.write("\u0959\n\u00c3\7\u00c3\u095b\n\u00c3\f\u00c3\16\u00c3") + buf.write("\u095e\13\u00c3\3\u00c4\3\u00c4\3\u00c4\3\u00c4\3\u00c4") + buf.write("\3\u00c4\5\u00c4\u0966\n\u00c4\3\u00c5\3\u00c5\3\u00c5") + buf.write("\3\u00c6\3\u00c6\3\u00c6\3\u00c6\3\u00c7\3\u00c7\3\u00c7") + buf.write("\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7") + buf.write("\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7") + buf.write("\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7") + buf.write("\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7") + buf.write("\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7") + buf.write("\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7\3\u00c7") + buf.write("\3\u00c7\3\u00c7\3\u00c7\5\u00c7\u099f\n\u00c7\3\u00c8") + buf.write("\3\u00c8\3\u00c8\3\u00c8\3\u00c8\3\u00c8\3\u00c8\5\u00c8") + buf.write("\u09a8\n\u00c8\3\u00c9\3\u00c9\3\u00ca\3\u00ca\3\u00cb") + buf.write("\3\u00cb\3\u00cb\2$\f\26 \66@BDFHJLNPRT\\j|\u00b2\u00d6") + buf.write("\u00dc\u00e8\u00ec\u00f4\u010a\u010e\u0112\u0120\u0134") + buf.write("\u0138\u0140\u015e\u016a\u0184\u00cc\2\4\6\b\n\f\16\20") + buf.write("\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJL") + buf.write("NPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088") + buf.write("\u008a\u008c\u008e\u0090\u0092\u0094\u0096\u0098\u009a") + buf.write("\u009c\u009e\u00a0\u00a2\u00a4\u00a6\u00a8\u00aa\u00ac") + buf.write("\u00ae\u00b0\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc\u00be") + buf.write("\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca\u00cc\u00ce\u00d0") + buf.write("\u00d2\u00d4\u00d6\u00d8\u00da\u00dc\u00de\u00e0\u00e2") + buf.write("\u00e4\u00e6\u00e8\u00ea\u00ec\u00ee\u00f0\u00f2\u00f4") + buf.write("\u00f6\u00f8\u00fa\u00fc\u00fe\u0100\u0102\u0104\u0106") + buf.write("\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118") + buf.write("\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a") + buf.write("\u012c\u012e\u0130\u0132\u0134\u0136\u0138\u013a\u013c") + buf.write("\u013e\u0140\u0142\u0144\u0146\u0148\u014a\u014c\u014e") + buf.write("\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160") + buf.write("\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172") + buf.write("\u0174\u0176\u0178\u017a\u017c\u017e\u0180\u0182\u0184") + buf.write("\u0186\u0188\u018a\u018c\u018e\u0190\u0192\u0194\2\r\4") + buf.write("\2\\\\``\4\2VX\\_\7\2\37\37**\64\64::AA\5\2\35\35\'\'") + buf.write("KK\4\2\21\21MM\4\2\\\\qq\5\2\20\20==HH\4\2!!\60\60\3\2") + buf.write("\61\63\4\2 CC\3\2\u0089\u008c\2\u0ace\2\u0197\3\2\2\2") + buf.write("\4\u01a3\3\2\2\2\6\u01a7\3\2\2\2\b\u01b2\3\2\2\2\n\u01b4") + buf.write("\3\2\2\2\f\u01c5\3\2\2\2\16\u01d6\3\2\2\2\20\u01dc\3\2") + buf.write("\2\2\22\u01e8\3\2\2\2\24\u01ea\3\2\2\2\26\u01ec\3\2\2") + buf.write("\2\30\u01fe\3\2\2\2\32\u0204\3\2\2\2\34\u020b\3\2\2\2") + buf.write("\36\u020d\3\2\2\2 \u025c\3\2\2\2\"\u0289\3\2\2\2$\u02a1") + buf.write("\3\2\2\2&\u02b0\3\2\2\2(\u02be\3\2\2\2*\u02c0\3\2\2\2") + buf.write(",\u02c5\3\2\2\2.\u02df\3\2\2\2\60\u02e1\3\2\2\2\62\u02e5") + buf.write("\3\2\2\2\64\u02ee\3\2\2\2\66\u02f0\3\2\2\28\u0309\3\2") + buf.write("\2\2:\u0317\3\2\2\2<\u0319\3\2\2\2>\u0324\3\2\2\2@\u0326") + buf.write("\3\2\2\2B\u0334\3\2\2\2D\u0345\3\2\2\2F\u0353\3\2\2\2") + buf.write("H\u0362\3\2\2\2J\u0376\3\2\2\2L\u0384\3\2\2\2N\u038f\3") + buf.write("\2\2\2P\u039a\3\2\2\2R\u03a5\3\2\2\2T\u03b0\3\2\2\2V\u03c2") + buf.write("\3\2\2\2X\u03ca\3\2\2\2Z\u03d7\3\2\2\2\\\u03d9\3\2\2\2") + buf.write("^\u03e4\3\2\2\2`\u0400\3\2\2\2b\u0413\3\2\2\2d\u0415\3") + buf.write("\2\2\2f\u0419\3\2\2\2h\u041d\3\2\2\2j\u0423\3\2\2\2l\u0441") + buf.write("\3\2\2\2n\u0453\3\2\2\2p\u0478\3\2\2\2r\u047c\3\2\2\2") + buf.write("t\u047f\3\2\2\2v\u0486\3\2\2\2x\u0498\3\2\2\2z\u049a\3") + buf.write("\2\2\2|\u049c\3\2\2\2~\u04af\3\2\2\2\u0080\u04b9\3\2\2") + buf.write("\2\u0082\u04bb\3\2\2\2\u0084\u04d2\3\2\2\2\u0086\u04d4") + buf.write("\3\2\2\2\u0088\u04dc\3\2\2\2\u008a\u04de\3\2\2\2\u008c") + buf.write("\u04e7\3\2\2\2\u008e\u04f0\3\2\2\2\u0090\u04f2\3\2\2\2") + buf.write("\u0092\u04f4\3\2\2\2\u0094\u04f6\3\2\2\2\u0096\u04fb\3") + buf.write("\2\2\2\u0098\u0501\3\2\2\2\u009a\u050a\3\2\2\2\u009c\u0513") + buf.write("\3\2\2\2\u009e\u052c\3\2\2\2\u00a0\u0532\3\2\2\2\u00a2") + buf.write("\u053d\3\2\2\2\u00a4\u0557\3\2\2\2\u00a6\u0559\3\2\2\2") + buf.write("\u00a8\u0568\3\2\2\2\u00aa\u057d\3\2\2\2\u00ac\u057f\3") + buf.write("\2\2\2\u00ae\u058e\3\2\2\2\u00b0\u0590\3\2\2\2\u00b2\u0593") + buf.write("\3\2\2\2\u00b4\u05a3\3\2\2\2\u00b6\u05a5\3\2\2\2\u00b8") + buf.write("\u05a9\3\2\2\2\u00ba\u05ab\3\2\2\2\u00bc\u05af\3\2\2\2") + buf.write("\u00be\u05b3\3\2\2\2\u00c0\u05b6\3\2\2\2\u00c2\u05bf\3") + buf.write("\2\2\2\u00c4\u05c8\3\2\2\2\u00c6\u05d0\3\2\2\2\u00c8\u05d2") + buf.write("\3\2\2\2\u00ca\u05d4\3\2\2\2\u00cc\u05db\3\2\2\2\u00ce") + buf.write("\u05ec\3\2\2\2\u00d0\u05ef\3\2\2\2\u00d2\u05f9\3\2\2\2") + buf.write("\u00d4\u0609\3\2\2\2\u00d6\u060b\3\2\2\2\u00d8\u061c\3") + buf.write("\2\2\2\u00da\u062e\3\2\2\2\u00dc\u0637\3\2\2\2\u00de\u0648") + buf.write("\3\2\2\2\u00e0\u064e\3\2\2\2\u00e2\u0650\3\2\2\2\u00e4") + buf.write("\u0654\3\2\2\2\u00e6\u0656\3\2\2\2\u00e8\u065a\3\2\2\2") + buf.write("\u00ea\u0671\3\2\2\2\u00ec\u0673\3\2\2\2\u00ee\u067e\3") + buf.write("\2\2\2\u00f0\u0687\3\2\2\2\u00f2\u068d\3\2\2\2\u00f4\u0698") + buf.write("\3\2\2\2\u00f6\u06aa\3\2\2\2\u00f8\u06b9\3\2\2\2\u00fa") + buf.write("\u06d5\3\2\2\2\u00fc\u06d7\3\2\2\2\u00fe\u06db\3\2\2\2") + buf.write("\u0100\u06dd\3\2\2\2\u0102\u06e0\3\2\2\2\u0104\u06e4\3") + buf.write("\2\2\2\u0106\u06f0\3\2\2\2\u0108\u06f7\3\2\2\2\u010a\u0707") + buf.write("\3\2\2\2\u010c\u071d\3\2\2\2\u010e\u071f\3\2\2\2\u0110") + buf.write("\u073c\3\2\2\2\u0112\u073e\3\2\2\2\u0114\u0768\3\2\2\2") + buf.write("\u0116\u076b\3\2\2\2\u0118\u0781\3\2\2\2\u011a\u0788\3") + buf.write("\2\2\2\u011c\u078d\3\2\2\2\u011e\u0791\3\2\2\2\u0120\u0793") + buf.write("\3\2\2\2\u0122\u07ac\3\2\2\2\u0124\u07b0\3\2\2\2\u0126") + buf.write("\u07b2\3\2\2\2\u0128\u07cb\3\2\2\2\u012a\u07ce\3\2\2\2") + buf.write("\u012c\u07d2\3\2\2\2\u012e\u07d4\3\2\2\2\u0130\u07df\3") + buf.write("\2\2\2\u0132\u07f1\3\2\2\2\u0134\u07f3\3\2\2\2\u0136\u0811") + buf.write("\3\2\2\2\u0138\u0813\3\2\2\2\u013a\u081d\3\2\2\2\u013c") + buf.write("\u081f\3\2\2\2\u013e\u0823\3\2\2\2\u0140\u0826\3\2\2\2") + buf.write("\u0142\u084b\3\2\2\2\u0144\u0852\3\2\2\2\u0146\u0854\3") + buf.write("\2\2\2\u0148\u0856\3\2\2\2\u014a\u0858\3\2\2\2\u014c\u085b") + buf.write("\3\2\2\2\u014e\u085f\3\2\2\2\u0150\u0863\3\2\2\2\u0152") + buf.write("\u0871\3\2\2\2\u0154\u087d\3\2\2\2\u0156\u0881\3\2\2\2") + buf.write("\u0158\u0883\3\2\2\2\u015a\u088b\3\2\2\2\u015c\u088d\3") + buf.write("\2\2\2\u015e\u0893\3\2\2\2\u0160\u08a0\3\2\2\2\u0162\u08d2") + buf.write("\3\2\2\2\u0164\u08d4\3\2\2\2\u0166\u08ea\3\2\2\2\u0168") + buf.write("\u08ec\3\2\2\2\u016a\u08ee\3\2\2\2\u016c\u0901\3\2\2\2") + buf.write("\u016e\u090e\3\2\2\2\u0170\u0911\3\2\2\2\u0172\u0916\3") + buf.write("\2\2\2\u0174\u091b\3\2\2\2\u0176\u091f\3\2\2\2\u0178\u0926") + buf.write("\3\2\2\2\u017a\u092a\3\2\2\2\u017c\u093e\3\2\2\2\u017e") + buf.write("\u0940\3\2\2\2\u0180\u0946\3\2\2\2\u0182\u0948\3\2\2\2") + buf.write("\u0184\u094f\3\2\2\2\u0186\u0965\3\2\2\2\u0188\u0967\3") + buf.write("\2\2\2\u018a\u096a\3\2\2\2\u018c\u099e\3\2\2\2\u018e\u09a7") + buf.write("\3\2\2\2\u0190\u09a9\3\2\2\2\u0192\u09ab\3\2\2\2\u0194") + buf.write("\u09ad\3\2\2\2\u0196\u0198\5|?\2\u0197\u0196\3\2\2\2\u0197") + buf.write("\u0198\3\2\2\2\u0198\u0199\3\2\2\2\u0199\u019a\7\2\2\3") + buf.write("\u019a\3\3\2\2\2\u019b\u01a4\5\u018e\u00c8\2\u019c\u01a4") + buf.write("\7@\2\2\u019d\u019e\7P\2\2\u019e\u019f\5\\/\2\u019f\u01a0") + buf.write("\7Q\2\2\u01a0\u01a4\3\2\2\2\u01a1\u01a4\5\6\4\2\u01a2") + buf.write("\u01a4\5\16\b\2\u01a3\u019b\3\2\2\2\u01a3\u019c\3\2\2") + buf.write("\2\u01a3\u019d\3\2\2\2\u01a3\u01a1\3\2\2\2\u01a3\u01a2") + buf.write("\3\2\2\2\u01a4\5\3\2\2\2\u01a5\u01a8\5\b\5\2\u01a6\u01a8") + buf.write("\5\n\6\2\u01a7\u01a5\3\2\2\2\u01a7\u01a6\3\2\2\2\u01a8") + buf.write("\7\3\2\2\2\u01a9\u01b3\7\177\2\2\u01aa\u01b3\5\u0158\u00ad") + buf.write("\2\u01ab\u01b3\5\u014a\u00a6\2\u01ac\u01b3\5\u015a\u00ae") + buf.write("\2\u01ad\u01ae\7^\2\2\u01ae\u01b3\5\u0124\u0093\2\u01af") + buf.write("\u01b0\7^\2\2\u01b0\u01b3\5\u00a2R\2\u01b1\u01b3\5\u0166") + buf.write("\u00b4\2\u01b2\u01a9\3\2\2\2\u01b2\u01aa\3\2\2\2\u01b2") + buf.write("\u01ab\3\2\2\2\u01b2\u01ac\3\2\2\2\u01b2\u01ad\3\2\2\2") + buf.write("\u01b2\u01af\3\2\2\2\u01b2\u01b1\3\2\2\2\u01b3\t\3\2\2") + buf.write("\2\u01b4\u01b6\5\f\7\2\u01b5\u01b7\7?\2\2\u01b6\u01b5") + buf.write("\3\2\2\2\u01b6\u01b7\3\2\2\2\u01b7\u01b8\3\2\2\2\u01b8") + buf.write("\u01b9\5\b\5\2\u01b9\13\3\2\2\2\u01ba\u01bb\b\7\1\2\u01bb") + buf.write("\u01c6\7z\2\2\u01bc\u01bd\5\u00a0Q\2\u01bd\u01be\7z\2") + buf.write("\2\u01be\u01c6\3\2\2\2\u01bf\u01c0\5\u00b8]\2\u01c0\u01c1") + buf.write("\7z\2\2\u01c1\u01c6\3\2\2\2\u01c2\u01c3\5\u00a2R\2\u01c3") + buf.write("\u01c4\7z\2\2\u01c4\u01c6\3\2\2\2\u01c5\u01ba\3\2\2\2") + buf.write("\u01c5\u01bc\3\2\2\2\u01c5\u01bf\3\2\2\2\u01c5\u01c2\3") + buf.write("\2\2\2\u01c6\u01d3\3\2\2\2\u01c7\u01c8\f\4\2\2\u01c8\u01c9") + buf.write("\7\177\2\2\u01c9\u01d2\7z\2\2\u01ca\u01cc\f\3\2\2\u01cb") + buf.write("\u01cd\7?\2\2\u01cc\u01cb\3\2\2\2\u01cc\u01cd\3\2\2\2") + buf.write("\u01cd\u01ce\3\2\2\2\u01ce\u01cf\5\u0164\u00b3\2\u01cf") + buf.write("\u01d0\7z\2\2\u01d0\u01d2\3\2\2\2\u01d1\u01c7\3\2\2\2") + buf.write("\u01d1\u01ca\3\2\2\2\u01d2\u01d5\3\2\2\2\u01d3\u01d1\3") + buf.write("\2\2\2\u01d3\u01d4\3\2\2\2\u01d4\r\3\2\2\2\u01d5\u01d3") + buf.write("\3\2\2\2\u01d6\u01d8\5\20\t\2\u01d7\u01d9\5\36\20\2\u01d8") + buf.write("\u01d7\3\2\2\2\u01d8\u01d9\3\2\2\2\u01d9\u01da\3\2\2\2") + buf.write("\u01da\u01db\5h\65\2\u01db\17\3\2\2\2\u01dc\u01de\7R\2") + buf.write("\2\u01dd\u01df\5\22\n\2\u01de\u01dd\3\2\2\2\u01de\u01df") + buf.write("\3\2\2\2\u01df\u01e0\3\2\2\2\u01e0\u01e1\7S\2\2\u01e1") + buf.write("\21\3\2\2\2\u01e2\u01e9\5\24\13\2\u01e3\u01e9\5\26\f\2") + buf.write("\u01e4\u01e5\5\24\13\2\u01e5\u01e6\7u\2\2\u01e6\u01e7") + buf.write("\5\26\f\2\u01e7\u01e9\3\2\2\2\u01e8\u01e2\3\2\2\2\u01e8") + buf.write("\u01e3\3\2\2\2\u01e8\u01e4\3\2\2\2\u01e9\23\3\2\2\2\u01ea") + buf.write("\u01eb\t\2\2\2\u01eb\25\3\2\2\2\u01ec\u01ed\b\f\1\2\u01ed") + buf.write("\u01ef\5\30\r\2\u01ee\u01f0\7~\2\2\u01ef\u01ee\3\2\2\2") + buf.write("\u01ef\u01f0\3\2\2\2\u01f0\u01f9\3\2\2\2\u01f1\u01f2\f") + buf.write("\3\2\2\u01f2\u01f3\7u\2\2\u01f3\u01f5\5\30\r\2\u01f4\u01f6") + buf.write("\7~\2\2\u01f5\u01f4\3\2\2\2\u01f5\u01f6\3\2\2\2\u01f6") + buf.write("\u01f8\3\2\2\2\u01f7\u01f1\3\2\2\2\u01f8\u01fb\3\2\2\2") + buf.write("\u01f9\u01f7\3\2\2\2\u01f9\u01fa\3\2\2\2\u01fa\27\3\2") + buf.write("\2\2\u01fb\u01f9\3\2\2\2\u01fc\u01ff\5\32\16\2\u01fd\u01ff") + buf.write("\5\34\17\2\u01fe\u01fc\3\2\2\2\u01fe\u01fd\3\2\2\2\u01ff") + buf.write("\31\3\2\2\2\u0200\u0205\7\177\2\2\u0201\u0202\7\\\2\2") + buf.write("\u0202\u0205\7\177\2\2\u0203\u0205\7@\2\2\u0204\u0200") + buf.write("\3\2\2\2\u0204\u0201\3\2\2\2\u0204\u0203\3\2\2\2\u0205") + buf.write("\33\3\2\2\2\u0206\u0207\7\177\2\2\u0207\u020c\5\u011a") + buf.write("\u008e\2\u0208\u0209\7\\\2\2\u0209\u020a\7\177\2\2\u020a") + buf.write("\u020c\5\u011a\u008e\2\u020b\u0206\3\2\2\2\u020b\u0208") + buf.write("\3\2\2\2\u020c\35\3\2\2\2\u020d\u020e\7P\2\2\u020e\u020f") + buf.write("\5\u0110\u0089\2\u020f\u0211\7Q\2\2\u0210\u0212\7*\2\2") + buf.write("\u0211\u0210\3\2\2\2\u0211\u0212\3\2\2\2\u0212\u0214\3") + buf.write("\2\2\2\u0213\u0215\5\u0180\u00c1\2\u0214\u0213\3\2\2\2") + buf.write("\u0214\u0215\3\2\2\2\u0215\u0217\3\2\2\2\u0216\u0218\5") + buf.write("\u00d6l\2\u0217\u0216\3\2\2\2\u0217\u0218\3\2\2\2\u0218") + buf.write("\u021a\3\2\2\2\u0219\u021b\5\u00f8}\2\u021a\u0219\3\2") + buf.write("\2\2\u021a\u021b\3\2\2\2\u021b\37\3\2\2\2\u021c\u021d") + buf.write("\b\21\1\2\u021d\u025d\5\4\3\2\u021e\u021f\5\u009eP\2\u021f") + buf.write("\u0221\7P\2\2\u0220\u0222\5\"\22\2\u0221\u0220\3\2\2\2") + buf.write("\u0221\u0222\3\2\2\2\u0222\u0223\3\2\2\2\u0223\u0224\7") + buf.write("Q\2\2\u0224\u025d\3\2\2\2\u0225\u0226\5\u016e\u00b8\2") + buf.write("\u0226\u0228\7P\2\2\u0227\u0229\5\"\22\2\u0228\u0227\3") + buf.write("\2\2\2\u0228\u0229\3\2\2\2\u0229\u022a\3\2\2\2\u022a\u022b") + buf.write("\7Q\2\2\u022b\u025d\3\2\2\2\u022c\u022d\5\u009eP\2\u022d") + buf.write("\u022e\5\u0122\u0092\2\u022e\u025d\3\2\2\2\u022f\u0230") + buf.write("\5\u016e\u00b8\2\u0230\u0231\5\u0122\u0092\2\u0231\u025d") + buf.write("\3\2\2\2\u0232\u0233\7\32\2\2\u0233\u0234\7a\2\2\u0234") + buf.write("\u0235\5\u0104\u0083\2\u0235\u0236\7b\2\2\u0236\u0237") + buf.write("\7P\2\2\u0237\u0238\5\\/\2\u0238\u0239\7Q\2\2\u0239\u025d") + buf.write("\3\2\2\2\u023a\u023b\7<\2\2\u023b\u023c\7a\2\2\u023c\u023d") + buf.write("\5\u0104\u0083\2\u023d\u023e\7b\2\2\u023e\u023f\7P\2\2") + buf.write("\u023f\u0240\5\\/\2\u0240\u0241\7Q\2\2\u0241\u025d\3\2") + buf.write("\2\2\u0242\u0243\7\65\2\2\u0243\u0244\7a\2\2\u0244\u0245") + buf.write("\5\u0104\u0083\2\u0245\u0246\7b\2\2\u0246\u0247\7P\2\2") + buf.write("\u0247\u0248\5\\/\2\u0248\u0249\7Q\2\2\u0249\u025d\3\2") + buf.write("\2\2\u024a\u024b\7\23\2\2\u024b\u024c\7a\2\2\u024c\u024d") + buf.write("\5\u0104\u0083\2\u024d\u024e\7b\2\2\u024e\u024f\7P\2\2") + buf.write("\u024f\u0250\5\\/\2\u0250\u0251\7Q\2\2\u0251\u025d\3\2") + buf.write("\2\2\u0252\u0253\7F\2\2\u0253\u0254\7P\2\2\u0254\u0255") + buf.write("\5\\/\2\u0255\u0256\7Q\2\2\u0256\u025d\3\2\2\2\u0257\u0258") + buf.write("\7F\2\2\u0258\u0259\7P\2\2\u0259\u025a\5\u0104\u0083\2") + buf.write("\u025a\u025b\7Q\2\2\u025b\u025d\3\2\2\2\u025c\u021c\3") + buf.write("\2\2\2\u025c\u021e\3\2\2\2\u025c\u0225\3\2\2\2\u025c\u022c") + buf.write("\3\2\2\2\u025c\u022f\3\2\2\2\u025c\u0232\3\2\2\2\u025c") + buf.write("\u023a\3\2\2\2\u025c\u0242\3\2\2\2\u025c\u024a\3\2\2\2") + buf.write("\u025c\u0252\3\2\2\2\u025c\u0257\3\2\2\2\u025d\u0286\3") + buf.write("\2\2\2\u025e\u025f\f\25\2\2\u025f\u0260\7R\2\2\u0260\u0261") + buf.write("\5\\/\2\u0261\u0262\7S\2\2\u0262\u0285\3\2\2\2\u0263\u0264") + buf.write("\f\24\2\2\u0264\u0265\7R\2\2\u0265\u0266\5\u0122\u0092") + buf.write("\2\u0266\u0267\7S\2\2\u0267\u0285\3\2\2\2\u0268\u0269") + buf.write("\f\23\2\2\u0269\u026b\7P\2\2\u026a\u026c\5\"\22\2\u026b") + buf.write("\u026a\3\2\2\2\u026b\u026c\3\2\2\2\u026c\u026d\3\2\2\2") + buf.write("\u026d\u0285\7Q\2\2\u026e\u026f\f\16\2\2\u026f\u0271\7") + buf.write("|\2\2\u0270\u0272\7?\2\2\u0271\u0270\3\2\2\2\u0271\u0272") + buf.write("\3\2\2\2\u0272\u0273\3\2\2\2\u0273\u0285\5\6\4\2\u0274") + buf.write("\u0275\f\r\2\2\u0275\u0277\7w\2\2\u0276\u0278\7?\2\2\u0277") + buf.write("\u0276\3\2\2\2\u0277\u0278\3\2\2\2\u0278\u0279\3\2\2\2") + buf.write("\u0279\u0285\5\6\4\2\u027a\u027b\f\f\2\2\u027b\u027c\7") + buf.write("|\2\2\u027c\u0285\5$\23\2\u027d\u027e\f\13\2\2\u027e\u027f") + buf.write("\7w\2\2\u027f\u0285\5$\23\2\u0280\u0281\f\n\2\2\u0281") + buf.write("\u0285\7s\2\2\u0282\u0283\f\t\2\2\u0283\u0285\7t\2\2\u0284") + buf.write("\u025e\3\2\2\2\u0284\u0263\3\2\2\2\u0284\u0268\3\2\2\2") + buf.write("\u0284\u026e\3\2\2\2\u0284\u0274\3\2\2\2\u0284\u027a\3") + buf.write("\2\2\2\u0284\u027d\3\2\2\2\u0284\u0280\3\2\2\2\u0284\u0282") + buf.write("\3\2\2\2\u0285\u0288\3\2\2\2\u0286\u0284\3\2\2\2\u0286") + buf.write("\u0287\3\2\2\2\u0287!\3\2\2\2\u0288\u0286\3\2\2\2\u0289") + buf.write("\u028a\5\u0120\u0091\2\u028a#\3\2\2\2\u028b\u028d\5\f") + buf.write("\7\2\u028c\u028b\3\2\2\2\u028c\u028d\3\2\2\2\u028d\u028e") + buf.write("\3\2\2\2\u028e\u028f\5\u00a0Q\2\u028f\u0290\7z\2\2\u0290") + buf.write("\u0291\7^\2\2\u0291\u0292\5\u00a0Q\2\u0292\u02a2\3\2\2") + buf.write("\2\u0293\u0294\5\f\7\2\u0294\u0295\7?\2\2\u0295\u0296") + buf.write("\5\u0164\u00b3\2\u0296\u0297\7z\2\2\u0297\u0298\7^\2\2") + buf.write("\u0298\u0299\5\u00a0Q\2\u0299\u02a2\3\2\2\2\u029a\u029c") + buf.write("\5\f\7\2\u029b\u029a\3\2\2\2\u029b\u029c\3\2\2\2\u029c") + buf.write("\u029d\3\2\2\2\u029d\u029e\7^\2\2\u029e\u02a2\5\u00a0") + buf.write("Q\2\u029f\u02a0\7^\2\2\u02a0\u02a2\5\u00a2R\2\u02a1\u028c") + buf.write("\3\2\2\2\u02a1\u0293\3\2\2\2\u02a1\u029b\3\2\2\2\u02a1") + buf.write("\u029f\3\2\2\2\u02a2%\3\2\2\2\u02a3\u02b1\5 \21\2\u02a4") + buf.write("\u02a5\7s\2\2\u02a5\u02b1\5> \2\u02a6\u02a7\7t\2\2\u02a7") + buf.write("\u02b1\5> \2\u02a8\u02a9\5,\27\2\u02a9\u02aa\5> \2\u02aa") + buf.write("\u02b1\3\2\2\2\u02ab\u02b1\5(\25\2\u02ac\u02b1\5*\26\2") + buf.write("\u02ad\u02b1\5<\37\2\u02ae\u02b1\5.\30\2\u02af\u02b1\5") + buf.write(":\36\2\u02b0\u02a3\3\2\2\2\u02b0\u02a4\3\2\2\2\u02b0\u02a6") + buf.write("\3\2\2\2\u02b0\u02a8\3\2\2\2\u02b0\u02ab\3\2\2\2\u02b0") + buf.write("\u02ac\3\2\2\2\u02b0\u02ad\3\2\2\2\u02b0\u02ae\3\2\2\2") + buf.write("\u02b0\u02af\3\2\2\2\u02b1\'\3\2\2\2\u02b2\u02b3\79\2") + buf.write("\2\u02b3\u02bf\5&\24\2\u02b4\u02b5\79\2\2\u02b5\u02b6") + buf.write("\7P\2\2\u02b6\u02b7\5\u0104\u0083\2\u02b7\u02b8\7Q\2\2") + buf.write("\u02b8\u02bf\3\2\2\2\u02b9\u02ba\79\2\2\u02ba\u02bb\7") + buf.write("~\2\2\u02bb\u02bc\7P\2\2\u02bc\u02bd\7\177\2\2\u02bd\u02bf") + buf.write("\7Q\2\2\u02be\u02b2\3\2\2\2\u02be\u02b4\3\2\2\2\u02be") + buf.write("\u02b9\3\2\2\2\u02bf)\3\2\2\2\u02c0\u02c1\7\6\2\2\u02c1") + buf.write("\u02c2\7P\2\2\u02c2\u02c3\5\u0104\u0083\2\u02c3\u02c4") + buf.write("\7Q\2\2\u02c4+\3\2\2\2\u02c5\u02c6\t\3\2\2\u02c6-\3\2") + buf.write("\2\2\u02c7\u02c9\7z\2\2\u02c8\u02c7\3\2\2\2\u02c8\u02c9") + buf.write("\3\2\2\2\u02c9\u02ca\3\2\2\2\u02ca\u02cc\7,\2\2\u02cb") + buf.write("\u02cd\5\60\31\2\u02cc\u02cb\3\2\2\2\u02cc\u02cd\3\2\2") + buf.write("\2\u02cd\u02ce\3\2\2\2\u02ce\u02d0\5\62\32\2\u02cf\u02d1") + buf.write("\58\35\2\u02d0\u02cf\3\2\2\2\u02d0\u02d1\3\2\2\2\u02d1") + buf.write("\u02e0\3\2\2\2\u02d2\u02d4\7z\2\2\u02d3\u02d2\3\2\2\2") + buf.write("\u02d3\u02d4\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d5\u02d7\7") + buf.write(",\2\2\u02d6\u02d8\5\60\31\2\u02d7\u02d6\3\2\2\2\u02d7") + buf.write("\u02d8\3\2\2\2\u02d8\u02d9\3\2\2\2\u02d9\u02da\7P\2\2") + buf.write("\u02da\u02db\5\u0104\u0083\2\u02db\u02dd\7Q\2\2\u02dc") + buf.write("\u02de\58\35\2\u02dd\u02dc\3\2\2\2\u02dd\u02de\3\2\2\2") + buf.write("\u02de\u02e0\3\2\2\2\u02df\u02c8\3\2\2\2\u02df\u02d3\3") + buf.write("\2\2\2\u02e0/\3\2\2\2\u02e1\u02e2\7P\2\2\u02e2\u02e3\5") + buf.write("\"\22\2\u02e3\u02e4\7Q\2\2\u02e4\61\3\2\2\2\u02e5\u02e7") + buf.write("\5\u009aN\2\u02e6\u02e8\5\64\33\2\u02e7\u02e6\3\2\2\2") + buf.write("\u02e7\u02e8\3\2\2\2\u02e8\63\3\2\2\2\u02e9\u02eb\5\u00fa") + buf.write("~\2\u02ea\u02ec\5\64\33\2\u02eb\u02ea\3\2\2\2\u02eb\u02ec") + buf.write("\3\2\2\2\u02ec\u02ef\3\2\2\2\u02ed\u02ef\5\66\34\2\u02ee") + buf.write("\u02e9\3\2\2\2\u02ee\u02ed\3\2\2\2\u02ef\65\3\2\2\2\u02f0") + buf.write("\u02f1\b\34\1\2\u02f1\u02f2\7R\2\2\u02f2\u02f3\5\\/\2") + buf.write("\u02f3\u02f5\7S\2\2\u02f4\u02f6\5\u00d6l\2\u02f5\u02f4") + buf.write("\3\2\2\2\u02f5\u02f6\3\2\2\2\u02f6\u0300\3\2\2\2\u02f7") + buf.write("\u02f8\f\3\2\2\u02f8\u02f9\7R\2\2\u02f9\u02fa\5^\60\2") + buf.write("\u02fa\u02fc\7S\2\2\u02fb\u02fd\5\u00d6l\2\u02fc\u02fb") + buf.write("\3\2\2\2\u02fc\u02fd\3\2\2\2\u02fd\u02ff\3\2\2\2\u02fe") + buf.write("\u02f7\3\2\2\2\u02ff\u0302\3\2\2\2\u0300\u02fe\3\2\2\2") + buf.write("\u0300\u0301\3\2\2\2\u0301\67\3\2\2\2\u0302\u0300\3\2") + buf.write("\2\2\u0303\u0305\7P\2\2\u0304\u0306\5\"\22\2\u0305\u0304") + buf.write("\3\2\2\2\u0305\u0306\3\2\2\2\u0306\u0307\3\2\2\2\u0307") + buf.write("\u030a\7Q\2\2\u0308\u030a\5\u0122\u0092\2\u0309\u0303") + buf.write("\3\2\2\2\u0309\u0308\3\2\2\2\u030a9\3\2\2\2\u030b\u030d") + buf.write("\7z\2\2\u030c\u030b\3\2\2\2\u030c\u030d\3\2\2\2\u030d") + buf.write("\u030e\3\2\2\2\u030e\u030f\7\27\2\2\u030f\u0318\5> \2") + buf.write("\u0310\u0312\7z\2\2\u0311\u0310\3\2\2\2\u0311\u0312\3") + buf.write("\2\2\2\u0312\u0313\3\2\2\2\u0313\u0314\7\27\2\2\u0314") + buf.write("\u0315\7R\2\2\u0315\u0316\7S\2\2\u0316\u0318\5> \2\u0317") + buf.write("\u030c\3\2\2\2\u0317\u0311\3\2\2\2\u0318;\3\2\2\2\u0319") + buf.write("\u031a\7-\2\2\u031a\u031b\7P\2\2\u031b\u031c\5\\/\2\u031c") + buf.write("\u031d\7Q\2\2\u031d=\3\2\2\2\u031e\u0325\5&\24\2\u031f") + buf.write("\u0320\7P\2\2\u0320\u0321\5\u0104\u0083\2\u0321\u0322") + buf.write("\7Q\2\2\u0322\u0323\5> \2\u0323\u0325\3\2\2\2\u0324\u031e") + buf.write("\3\2\2\2\u0324\u031f\3\2\2\2\u0325?\3\2\2\2\u0326\u0327") + buf.write("\b!\1\2\u0327\u0328\5> \2\u0328\u0331\3\2\2\2\u0329\u032a") + buf.write("\f\4\2\2\u032a\u032b\7}\2\2\u032b\u0330\5> \2\u032c\u032d") + buf.write("\f\3\2\2\u032d\u032e\7v\2\2\u032e\u0330\5> \2\u032f\u0329") + buf.write("\3\2\2\2\u032f\u032c\3\2\2\2\u0330\u0333\3\2\2\2\u0331") + buf.write("\u032f\3\2\2\2\u0331\u0332\3\2\2\2\u0332A\3\2\2\2\u0333") + buf.write("\u0331\3\2\2\2\u0334\u0335\b\"\1\2\u0335\u0336\5@!\2\u0336") + buf.write("\u0342\3\2\2\2\u0337\u0338\f\5\2\2\u0338\u0339\7X\2\2") + buf.write("\u0339\u0341\5@!\2\u033a\u033b\f\4\2\2\u033b\u033c\7Y") + buf.write("\2\2\u033c\u0341\5@!\2\u033d\u033e\f\3\2\2\u033e\u033f") + buf.write("\7Z\2\2\u033f\u0341\5@!\2\u0340\u0337\3\2\2\2\u0340\u033a") + buf.write("\3\2\2\2\u0340\u033d\3\2\2\2\u0341\u0344\3\2\2\2\u0342") + buf.write("\u0340\3\2\2\2\u0342\u0343\3\2\2\2\u0343C\3\2\2\2\u0344") + buf.write("\u0342\3\2\2\2\u0345\u0346\b#\1\2\u0346\u0347\5B\"\2\u0347") + buf.write("\u0350\3\2\2\2\u0348\u0349\f\4\2\2\u0349\u034a\7V\2\2") + buf.write("\u034a\u034f\5B\"\2\u034b\u034c\f\3\2\2\u034c\u034d\7") + buf.write("W\2\2\u034d\u034f\5B\"\2\u034e\u0348\3\2\2\2\u034e\u034b") + buf.write("\3\2\2\2\u034f\u0352\3\2\2\2\u0350\u034e\3\2\2\2\u0350") + buf.write("\u0351\3\2\2\2\u0351E\3\2\2\2\u0352\u0350\3\2\2\2\u0353") + buf.write("\u0354\b$\1\2\u0354\u0355\5D#\2\u0355\u035f\3\2\2\2\u0356") + buf.write("\u0357\f\4\2\2\u0357\u0358\7k\2\2\u0358\u035e\5D#\2\u0359") + buf.write("\u035a\f\3\2\2\u035a\u035b\5\u0188\u00c5\2\u035b\u035c") + buf.write("\5D#\2\u035c\u035e\3\2\2\2\u035d\u0356\3\2\2\2\u035d\u0359") + buf.write("\3\2\2\2\u035e\u0361\3\2\2\2\u035f\u035d\3\2\2\2\u035f") + buf.write("\u0360\3\2\2\2\u0360G\3\2\2\2\u0361\u035f\3\2\2\2\u0362") + buf.write("\u0363\b%\1\2\u0363\u0364\5F$\2\u0364\u0373\3\2\2\2\u0365") + buf.write("\u0366\f\6\2\2\u0366\u0367\7a\2\2\u0367\u0372\5F$\2\u0368") + buf.write("\u0369\f\5\2\2\u0369\u036a\7b\2\2\u036a\u0372\5F$\2\u036b") + buf.write("\u036c\f\4\2\2\u036c\u036d\7o\2\2\u036d\u0372\5F$\2\u036e") + buf.write("\u036f\f\3\2\2\u036f\u0370\7p\2\2\u0370\u0372\5F$\2\u0371") + buf.write("\u0365\3\2\2\2\u0371\u0368\3\2\2\2\u0371\u036b\3\2\2\2") + buf.write("\u0371\u036e\3\2\2\2\u0372\u0375\3\2\2\2\u0373\u0371\3") + buf.write("\2\2\2\u0373\u0374\3\2\2\2\u0374I\3\2\2\2\u0375\u0373") + buf.write("\3\2\2\2\u0376\u0377\b&\1\2\u0377\u0378\5H%\2\u0378\u0381") + buf.write("\3\2\2\2\u0379\u037a\f\4\2\2\u037a\u037b\7m\2\2\u037b") + buf.write("\u0380\5H%\2\u037c\u037d\f\3\2\2\u037d\u037e\7n\2\2\u037e") + buf.write("\u0380\5H%\2\u037f\u0379\3\2\2\2\u037f\u037c\3\2\2\2\u0380") + buf.write("\u0383\3\2\2\2\u0381\u037f\3\2\2\2\u0381\u0382\3\2\2\2") + buf.write("\u0382K\3\2\2\2\u0383\u0381\3\2\2\2\u0384\u0385\b\'\1") + buf.write("\2\u0385\u0386\5J&\2\u0386\u038c\3\2\2\2\u0387\u0388\f") + buf.write("\3\2\2\u0388\u0389\7\\\2\2\u0389\u038b\5J&\2\u038a\u0387") + buf.write("\3\2\2\2\u038b\u038e\3\2\2\2\u038c\u038a\3\2\2\2\u038c") + buf.write("\u038d\3\2\2\2\u038dM\3\2\2\2\u038e\u038c\3\2\2\2\u038f") + buf.write("\u0390\b(\1\2\u0390\u0391\5L\'\2\u0391\u0397\3\2\2\2\u0392") + buf.write("\u0393\f\3\2\2\u0393\u0394\7[\2\2\u0394\u0396\5L\'\2\u0395") + buf.write("\u0392\3\2\2\2\u0396\u0399\3\2\2\2\u0397\u0395\3\2\2\2") + buf.write("\u0397\u0398\3\2\2\2\u0398O\3\2\2\2\u0399\u0397\3\2\2") + buf.write("\2\u039a\u039b\b)\1\2\u039b\u039c\5N(\2\u039c\u03a2\3") + buf.write("\2\2\2\u039d\u039e\f\3\2\2\u039e\u039f\7]\2\2\u039f\u03a1") + buf.write("\5N(\2\u03a0\u039d\3\2\2\2\u03a1\u03a4\3\2\2\2\u03a2\u03a0") + buf.write("\3\2\2\2\u03a2\u03a3\3\2\2\2\u03a3Q\3\2\2\2\u03a4\u03a2") + buf.write("\3\2\2\2\u03a5\u03a6\b*\1\2\u03a6\u03a7\5P)\2\u03a7\u03ad") + buf.write("\3\2\2\2\u03a8\u03a9\f\3\2\2\u03a9\u03aa\7q\2\2\u03aa") + buf.write("\u03ac\5P)\2\u03ab\u03a8\3\2\2\2\u03ac\u03af\3\2\2\2\u03ad") + buf.write("\u03ab\3\2\2\2\u03ad\u03ae\3\2\2\2\u03aeS\3\2\2\2\u03af") + buf.write("\u03ad\3\2\2\2\u03b0\u03b1\b+\1\2\u03b1\u03b2\5R*\2\u03b2") + buf.write("\u03b8\3\2\2\2\u03b3\u03b4\f\3\2\2\u03b4\u03b5\7r\2\2") + buf.write("\u03b5\u03b7\5R*\2\u03b6\u03b3\3\2\2\2\u03b7\u03ba\3\2") + buf.write("\2\2\u03b8\u03b6\3\2\2\2\u03b8\u03b9\3\2\2\2\u03b9U\3") + buf.write("\2\2\2\u03ba\u03b8\3\2\2\2\u03bb\u03c3\5T+\2\u03bc\u03bd") + buf.write("\5T+\2\u03bd\u03be\7x\2\2\u03be\u03bf\5\\/\2\u03bf\u03c0") + buf.write("\7y\2\2\u03c0\u03c1\5X-\2\u03c1\u03c3\3\2\2\2\u03c2\u03bb") + buf.write("\3\2\2\2\u03c2\u03bc\3\2\2\2\u03c3W\3\2\2\2\u03c4\u03cb") + buf.write("\5V,\2\u03c5\u03c6\5T+\2\u03c6\u03c7\5Z.\2\u03c7\u03c8") + buf.write("\5\u011e\u0090\2\u03c8\u03cb\3\2\2\2\u03c9\u03cb\5\u017e") + buf.write("\u00c0\2\u03ca\u03c4\3\2\2\2\u03ca\u03c5\3\2\2\2\u03ca") + buf.write("\u03c9\3\2\2\2\u03cbY\3\2\2\2\u03cc\u03d8\7`\2\2\u03cd") + buf.write("\u03d8\7e\2\2\u03ce\u03d8\7f\2\2\u03cf\u03d8\7g\2\2\u03d0") + buf.write("\u03d8\7c\2\2\u03d1\u03d8\7d\2\2\u03d2\u03d8\5\u018a\u00c6") + buf.write("\2\u03d3\u03d8\7l\2\2\u03d4\u03d8\7i\2\2\u03d5\u03d8\7") + buf.write("h\2\2\u03d6\u03d8\7j\2\2\u03d7\u03cc\3\2\2\2\u03d7\u03cd") + buf.write("\3\2\2\2\u03d7\u03ce\3\2\2\2\u03d7\u03cf\3\2\2\2\u03d7") + buf.write("\u03d0\3\2\2\2\u03d7\u03d1\3\2\2\2\u03d7\u03d2\3\2\2\2") + buf.write("\u03d7\u03d3\3\2\2\2\u03d7\u03d4\3\2\2\2\u03d7\u03d5\3") + buf.write("\2\2\2\u03d7\u03d6\3\2\2\2\u03d8[\3\2\2\2\u03d9\u03da") + buf.write("\b/\1\2\u03da\u03db\5X-\2\u03db\u03e1\3\2\2\2\u03dc\u03dd") + buf.write("\f\3\2\2\u03dd\u03de\7u\2\2\u03de\u03e0\5X-\2\u03df\u03dc") + buf.write("\3\2\2\2\u03e0\u03e3\3\2\2\2\u03e1\u03df\3\2\2\2\u03e1") + buf.write("\u03e2\3\2\2\2\u03e2]\3\2\2\2\u03e3\u03e1\3\2\2\2\u03e4") + buf.write("\u03e5\5V,\2\u03e5_\3\2\2\2\u03e6\u0401\5d\63\2\u03e7") + buf.write("\u03e9\5\u00d6l\2\u03e8\u03e7\3\2\2\2\u03e8\u03e9\3\2") + buf.write("\2\2\u03e9\u03ea\3\2\2\2\u03ea\u0401\5f\64\2\u03eb\u03ed") + buf.write("\5\u00d6l\2\u03ec\u03eb\3\2\2\2\u03ec\u03ed\3\2\2\2\u03ed") + buf.write("\u03ee\3\2\2\2\u03ee\u0401\5h\65\2\u03ef\u03f1\5\u00d6") + buf.write("l\2\u03f0\u03ef\3\2\2\2\u03f0\u03f1\3\2\2\2\u03f1\u03f2") + buf.write("\3\2\2\2\u03f2\u0401\5l\67\2\u03f3\u03f5\5\u00d6l\2\u03f4") + buf.write("\u03f3\3\2\2\2\u03f4\u03f5\3\2\2\2\u03f5\u03f6\3\2\2\2") + buf.write("\u03f6\u0401\5p9\2\u03f7\u03f9\5\u00d6l\2\u03f8\u03f7") + buf.write("\3\2\2\2\u03f8\u03f9\3\2\2\2\u03f9\u03fa\3\2\2\2\u03fa") + buf.write("\u0401\5x=\2\u03fb\u0401\5z>\2\u03fc\u03fe\5\u00d6l\2") + buf.write("\u03fd\u03fc\3\2\2\2\u03fd\u03fe\3\2\2\2\u03fe\u03ff\3") + buf.write("\2\2\2\u03ff\u0401\5\u0174\u00bb\2\u0400\u03e6\3\2\2\2") + buf.write("\u0400\u03e8\3\2\2\2\u0400\u03ec\3\2\2\2\u0400\u03f0\3") + buf.write("\2\2\2\u0400\u03f4\3\2\2\2\u0400\u03f8\3\2\2\2\u0400\u03fb") + buf.write("\3\2\2\2\u0400\u03fd\3\2\2\2\u0401a\3\2\2\2\u0402\u0404") + buf.write("\5\u00d6l\2\u0403\u0402\3\2\2\2\u0403\u0404\3\2\2\2\u0404") + buf.write("\u0405\3\2\2\2\u0405\u0406\7\177\2\2\u0406\u0414\7y\2") + buf.write("\2\u0407\u0409\5\u00d6l\2\u0408\u0407\3\2\2\2\u0408\u0409") + buf.write("\3\2\2\2\u0409\u040a\3\2\2\2\u040a\u040b\7\13\2\2\u040b") + buf.write("\u040c\5^\60\2\u040c\u040d\7y\2\2\u040d\u0414\3\2\2\2") + buf.write("\u040e\u0410\5\u00d6l\2\u040f\u040e\3\2\2\2\u040f\u0410") + buf.write("\3\2\2\2\u0410\u0411\3\2\2\2\u0411\u0412\7\26\2\2\u0412") + buf.write("\u0414\7y\2\2\u0413\u0403\3\2\2\2\u0413\u0408\3\2\2\2") + buf.write("\u0413\u040f\3\2\2\2\u0414c\3\2\2\2\u0415\u0416\5b\62") + buf.write("\2\u0416\u0417\5`\61\2\u0417e\3\2\2\2\u0418\u041a\5\\") + buf.write("/\2\u0419\u0418\3\2\2\2\u0419\u041a\3\2\2\2\u041a\u041b") + buf.write("\3\2\2\2\u041b\u041c\7{\2\2\u041cg\3\2\2\2\u041d\u041f") + buf.write("\7T\2\2\u041e\u0420\5j\66\2\u041f\u041e\3\2\2\2\u041f") + buf.write("\u0420\3\2\2\2\u0420\u0421\3\2\2\2\u0421\u0422\7U\2\2") + buf.write("\u0422i\3\2\2\2\u0423\u0424\b\66\1\2\u0424\u0425\5`\61") + buf.write("\2\u0425\u042a\3\2\2\2\u0426\u0427\f\3\2\2\u0427\u0429") + buf.write("\5`\61\2\u0428\u0426\3\2\2\2\u0429\u042c\3\2\2\2\u042a") + buf.write("\u0428\3\2\2\2\u042a\u042b\3\2\2\2\u042bk\3\2\2\2\u042c") + buf.write("\u042a\3\2\2\2\u042d\u042e\7&\2\2\u042e\u042f\7P\2\2\u042f") + buf.write("\u0430\5n8\2\u0430\u0431\7Q\2\2\u0431\u0432\5`\61\2\u0432") + buf.write("\u0442\3\2\2\2\u0433\u0434\7&\2\2\u0434\u0435\7P\2\2\u0435") + buf.write("\u0436\5n8\2\u0436\u0437\7Q\2\2\u0437\u0438\5`\61\2\u0438") + buf.write("\u0439\7\33\2\2\u0439\u043a\5`\61\2\u043a\u0442\3\2\2") + buf.write("\2\u043b\u043c\7>\2\2\u043c\u043d\7P\2\2\u043d\u043e\5") + buf.write("n8\2\u043e\u043f\7Q\2\2\u043f\u0440\5`\61\2\u0440\u0442") + buf.write("\3\2\2\2\u0441\u042d\3\2\2\2\u0441\u0433\3\2\2\2\u0441") + buf.write("\u043b\3\2\2\2\u0442m\3\2\2\2\u0443\u0454\5\\/\2\u0444") + buf.write("\u0446\5\u00d6l\2\u0445\u0444\3\2\2\2\u0445\u0446\3\2") + buf.write("\2\2\u0446\u0447\3\2\2\2\u0447\u0448\5\u008eH\2\u0448") + buf.write("\u0449\5\u00f0y\2\u0449\u044a\7`\2\2\u044a\u044b\5\u011e") + buf.write("\u0090\2\u044b\u0454\3\2\2\2\u044c\u044e\5\u00d6l\2\u044d") + buf.write("\u044c\3\2\2\2\u044d\u044e\3\2\2\2\u044e\u044f\3\2\2\2") + buf.write("\u044f\u0450\5\u008eH\2\u0450\u0451\5\u00f0y\2\u0451\u0452") + buf.write("\5\u0122\u0092\2\u0452\u0454\3\2\2\2\u0453\u0443\3\2\2") + buf.write("\2\u0453\u0445\3\2\2\2\u0453\u044d\3\2\2\2\u0454o\3\2") + buf.write("\2\2\u0455\u0456\7O\2\2\u0456\u0457\7P\2\2\u0457\u0458") + buf.write("\5n8\2\u0458\u0459\7Q\2\2\u0459\u045a\5`\61\2\u045a\u0479") + buf.write("\3\2\2\2\u045b\u045c\7\30\2\2\u045c\u045d\5`\61\2\u045d") + buf.write("\u045e\7O\2\2\u045e\u045f\7P\2\2\u045f\u0460\5n8\2\u0460") + buf.write("\u0461\7Q\2\2\u0461\u0462\7{\2\2\u0462\u0479\3\2\2\2\u0463") + buf.write("\u0464\7#\2\2\u0464\u0465\7P\2\2\u0465\u0467\5r:\2\u0466") + buf.write("\u0468\5n8\2\u0467\u0466\3\2\2\2\u0467\u0468\3\2\2\2\u0468") + buf.write("\u0469\3\2\2\2\u0469\u046b\7{\2\2\u046a\u046c\5\\/\2\u046b") + buf.write("\u046a\3\2\2\2\u046b\u046c\3\2\2\2\u046c\u046d\3\2\2\2") + buf.write("\u046d\u046e\7Q\2\2\u046e\u046f\5`\61\2\u046f\u0479\3") + buf.write("\2\2\2\u0470\u0471\7#\2\2\u0471\u0472\7P\2\2\u0472\u0473") + buf.write("\5t;\2\u0473\u0474\7y\2\2\u0474\u0475\5v<\2\u0475\u0476") + buf.write("\7Q\2\2\u0476\u0477\5`\61\2\u0477\u0479\3\2\2\2\u0478") + buf.write("\u0455\3\2\2\2\u0478\u045b\3\2\2\2\u0478\u0463\3\2\2\2") + buf.write("\u0478\u0470\3\2\2\2\u0479q\3\2\2\2\u047a\u047d\5f\64") + buf.write("\2\u047b\u047d\5\u0084C\2\u047c\u047a\3\2\2\2\u047c\u047b") + buf.write("\3\2\2\2\u047ds\3\2\2\2\u047e\u0480\5\u00d6l\2\u047f\u047e") + buf.write("\3\2\2\2\u047f\u0480\3\2\2\2\u0480\u0481\3\2\2\2\u0481") + buf.write("\u0482\5\u008eH\2\u0482\u0483\5\u00f0y\2\u0483u\3\2\2") + buf.write("\2\u0484\u0487\5\\/\2\u0485\u0487\5\u0122\u0092\2\u0486") + buf.write("\u0484\3\2\2\2\u0486\u0485\3\2\2\2\u0487w\3\2\2\2\u0488") + buf.write("\u0489\7\n\2\2\u0489\u0499\7{\2\2\u048a\u048b\7\24\2\2") + buf.write("\u048b\u0499\7{\2\2\u048c\u048e\7\66\2\2\u048d\u048f\5") + buf.write("\\/\2\u048e\u048d\3\2\2\2\u048e\u048f\3\2\2\2\u048f\u0490") + buf.write("\3\2\2\2\u0490\u0499\7{\2\2\u0491\u0492\7\66\2\2\u0492") + buf.write("\u0493\5\u0122\u0092\2\u0493\u0494\7{\2\2\u0494\u0499") + buf.write("\3\2\2\2\u0495\u0496\7%\2\2\u0496\u0497\7\177\2\2\u0497") + buf.write("\u0499\7{\2\2\u0498\u0488\3\2\2\2\u0498\u048a\3\2\2\2") + buf.write("\u0498\u048c\3\2\2\2\u0498\u0491\3\2\2\2\u0498\u0495\3") + buf.write("\2\2\2\u0499y\3\2\2\2\u049a\u049b\5\u0080A\2\u049b{\3") + buf.write("\2\2\2\u049c\u049d\b?\1\2\u049d\u049e\5~@\2\u049e\u04a3") + buf.write("\3\2\2\2\u049f\u04a0\f\3\2\2\u04a0\u04a2\5~@\2\u04a1\u049f") + buf.write("\3\2\2\2\u04a2\u04a5\3\2\2\2\u04a3\u04a1\3\2\2\2\u04a3") + buf.write("\u04a4\3\2\2\2\u04a4}\3\2\2\2\u04a5\u04a3\3\2\2\2\u04a6") + buf.write("\u04b0\5\u0080A\2\u04a7\u04b0\5\u0116\u008c\2\u04a8\u04b0") + buf.write("\5\u015c\u00af\2\u04a9\u04b0\5\u0170\u00b9\2\u04aa\u04b0") + buf.write("\5\u0172\u00ba\2\u04ab\u04b0\5\u00d4k\2\u04ac\u04b0\5") + buf.write("\u00bc_\2\u04ad\u04b0\5\u0088E\2\u04ae\u04b0\5\u008aF") + buf.write("\2\u04af\u04a6\3\2\2\2\u04af\u04a7\3\2\2\2\u04af\u04a8") + buf.write("\3\2\2\2\u04af\u04a9\3\2\2\2\u04af\u04aa\3\2\2\2\u04af") + buf.write("\u04ab\3\2\2\2\u04af\u04ac\3\2\2\2\u04af\u04ad\3\2\2\2") + buf.write("\u04af\u04ae\3\2\2\2\u04b0\177\3\2\2\2\u04b1\u04ba\5\u0084") + buf.write("C\2\u04b2\u04ba\5\u00d2j\2\u04b3\u04ba\5\u00caf\2\u04b4") + buf.write("\u04ba\5\u00ceh\2\u04b5\u04ba\5\u00d0i\2\u04b6\u04ba\5") + buf.write("\u0086D\2\u04b7\u04ba\5\u0082B\2\u04b8\u04ba\5\u00acW") + buf.write("\2\u04b9\u04b1\3\2\2\2\u04b9\u04b2\3\2\2\2\u04b9\u04b3") + buf.write("\3\2\2\2\u04b9\u04b4\3\2\2\2\u04b9\u04b5\3\2\2\2\u04b9") + buf.write("\u04b6\3\2\2\2\u04b9\u04b7\3\2\2\2\u04b9\u04b8\3\2\2\2") + buf.write("\u04ba\u0081\3\2\2\2\u04bb\u04bc\7J\2\2\u04bc\u04be\7") + buf.write("\177\2\2\u04bd\u04bf\5\u00d6l\2\u04be\u04bd\3\2\2\2\u04be") + buf.write("\u04bf\3\2\2\2\u04bf\u04c0\3\2\2\2\u04c0\u04c1\7`\2\2") + buf.write("\u04c1\u04c2\5\u0104\u0083\2\u04c2\u04c3\7{\2\2\u04c3") + buf.write("\u0083\3\2\2\2\u04c4\u04c6\5\u008eH\2\u04c5\u04c4\3\2") + buf.write("\2\2\u04c5\u04c6\3\2\2\2\u04c6\u04c8\3\2\2\2\u04c7\u04c9") + buf.write("\5\u00ecw\2\u04c8\u04c7\3\2\2\2\u04c8\u04c9\3\2\2\2\u04c9") + buf.write("\u04ca\3\2\2\2\u04ca\u04d3\7{\2\2\u04cb\u04cd\5\u00d6") + buf.write("l\2\u04cc\u04ce\5\u008eH\2\u04cd\u04cc\3\2\2\2\u04cd\u04ce") + buf.write("\3\2\2\2\u04ce\u04cf\3\2\2\2\u04cf\u04d0\5\u00ecw\2\u04d0") + buf.write("\u04d1\7{\2\2\u04d1\u04d3\3\2\2\2\u04d2\u04c5\3\2\2\2") + buf.write("\u04d2\u04cb\3\2\2\2\u04d3\u0085\3\2\2\2\u04d4\u04d5\7") + buf.write(";\2\2\u04d5\u04d6\7P\2\2\u04d6\u04d7\5^\60\2\u04d7\u04d8") + buf.write("\7u\2\2\u04d8\u04d9\7\u0088\2\2\u04d9\u04da\7Q\2\2\u04da") + buf.write("\u04db\7{\2\2\u04db\u0087\3\2\2\2\u04dc\u04dd\7{\2\2\u04dd") + buf.write("\u0089\3\2\2\2\u04de\u04df\5\u00d6l\2\u04df\u04e0\7{\2") + buf.write("\2\u04e0\u008b\3\2\2\2\u04e1\u04e8\5\u0090I\2\u04e2\u04e8") + buf.write("\5\u0096L\2\u04e3\u04e8\5\u0092J\2\u04e4\u04e8\7$\2\2") + buf.write("\u04e5\u04e8\7E\2\2\u04e6\u04e8\7\22\2\2\u04e7\u04e1\3") + buf.write("\2\2\2\u04e7\u04e2\3\2\2\2\u04e7\u04e3\3\2\2\2\u04e7\u04e4") + buf.write("\3\2\2\2\u04e7\u04e5\3\2\2\2\u04e7\u04e6\3\2\2\2\u04e8") + buf.write("\u008d\3\2\2\2\u04e9\u04eb\5\u008cG\2\u04ea\u04ec\5\u00d6") + buf.write("l\2\u04eb\u04ea\3\2\2\2\u04eb\u04ec\3\2\2\2\u04ec\u04f1") + buf.write("\3\2\2\2\u04ed\u04ee\5\u008cG\2\u04ee\u04ef\5\u008eH\2") + buf.write("\u04ef\u04f1\3\2\2\2\u04f0\u04e9\3\2\2\2\u04f0\u04ed\3") + buf.write("\2\2\2\u04f1\u008f\3\2\2\2\u04f2\u04f3\t\4\2\2\u04f3\u0091") + buf.write("\3\2\2\2\u04f4\u04f5\t\5\2\2\u04f5\u0093\3\2\2\2\u04f6") + buf.write("\u04f7\7\177\2\2\u04f7\u0095\3\2\2\2\u04f8\u04fc\5\u0098") + buf.write("M\2\u04f9\u04fc\5\u0126\u0094\2\u04fa\u04fc\5\u00a8U\2") + buf.write("\u04fb\u04f8\3\2\2\2\u04fb\u04f9\3\2\2\2\u04fb\u04fa\3") + buf.write("\2\2\2\u04fc\u0097\3\2\2\2\u04fd\u0502\5\u009eP\2\u04fe") + buf.write("\u0502\5\u00a4S\2\u04ff\u0502\5\u016e\u00b8\2\u0500\u0502") + buf.write("\5\u00fe\u0080\2\u0501\u04fd\3\2\2\2\u0501\u04fe\3\2\2") + buf.write("\2\u0501\u04ff\3\2\2\2\u0501\u0500\3\2\2\2\u0502\u0099") + buf.write("\3\2\2\2\u0503\u0505\5\u0096L\2\u0504\u0506\5\u00d6l\2") + buf.write("\u0505\u0504\3\2\2\2\u0505\u0506\3\2\2\2\u0506\u050b\3") + buf.write("\2\2\2\u0507\u0508\5\u0096L\2\u0508\u0509\5\u009aN\2\u0509") + buf.write("\u050b\3\2\2\2\u050a\u0503\3\2\2\2\u050a\u0507\3\2\2\2") + buf.write("\u050b\u009b\3\2\2\2\u050c\u050e\5\u0098M\2\u050d\u050f") + buf.write("\5\u00d6l\2\u050e\u050d\3\2\2\2\u050e\u050f\3\2\2\2\u050f") + buf.write("\u0514\3\2\2\2\u0510\u0511\5\u0098M\2\u0511\u0512\5\u009c") + buf.write("O\2\u0512\u0514\3\2\2\2\u0513\u050c\3\2\2\2\u0513\u0510") + buf.write("\3\2\2\2\u0514\u009d\3\2\2\2\u0515\u0517\5\f\7\2\u0516") + buf.write("\u0515\3\2\2\2\u0516\u0517\3\2\2\2\u0517\u0518\3\2\2\2") + buf.write("\u0518\u052d\5\u00a0Q\2\u0519\u051a\5\f\7\2\u051a\u051b") + buf.write("\7?\2\2\u051b\u051c\5\u0164\u00b3\2\u051c\u052d\3\2\2") + buf.write("\2\u051d\u052d\7\r\2\2\u051e\u052d\7\16\2\2\u051f\u052d") + buf.write("\7\17\2\2\u0520\u052d\7N\2\2\u0521\u052d\7\t\2\2\u0522") + buf.write("\u052d\7\67\2\2\u0523\u052d\7(\2\2\u0524\u052d\7)\2\2") + buf.write("\u0525\u052d\78\2\2\u0526\u052d\7I\2\2\u0527\u052d\7\"") + buf.write("\2\2\u0528\u052d\7\31\2\2\u0529\u052d\7L\2\2\u052a\u052d") + buf.write("\7\b\2\2\u052b\u052d\5\u00a2R\2\u052c\u0516\3\2\2\2\u052c") + buf.write("\u0519\3\2\2\2\u052c\u051d\3\2\2\2\u052c\u051e\3\2\2\2") + buf.write("\u052c\u051f\3\2\2\2\u052c\u0520\3\2\2\2\u052c\u0521\3") + buf.write("\2\2\2\u052c\u0522\3\2\2\2\u052c\u0523\3\2\2\2\u052c\u0524") + buf.write("\3\2\2\2\u052c\u0525\3\2\2\2\u052c\u0526\3\2\2\2\u052c") + buf.write("\u0527\3\2\2\2\u052c\u0528\3\2\2\2\u052c\u0529\3\2\2\2") + buf.write("\u052c\u052a\3\2\2\2\u052c\u052b\3\2\2\2\u052d\u009f\3") + buf.write("\2\2\2\u052e\u0533\5\u0124\u0093\2\u052f\u0533\5\u00a6") + buf.write("T\2\u0530\u0533\5\u0094K\2\u0531\u0533\5\u0164\u00b3\2") + buf.write("\u0532\u052e\3\2\2\2\u0532\u052f\3\2\2\2\u0532\u0530\3") + buf.write("\2\2\2\u0532\u0531\3\2\2\2\u0533\u00a1\3\2\2\2\u0534\u0535") + buf.write("\7\25\2\2\u0535\u0536\7P\2\2\u0536\u0537\5\\/\2\u0537") + buf.write("\u0538\7Q\2\2\u0538\u053e\3\2\2\2\u0539\u053a\7\25\2\2") + buf.write("\u053a\u053b\7P\2\2\u053b\u053c\7\b\2\2\u053c\u053e\7") + buf.write("Q\2\2\u053d\u0534\3\2\2\2\u053d\u0539\3\2\2\2\u053e\u00a3") + buf.write("\3\2\2\2\u053f\u0541\5\u012e\u0098\2\u0540\u0542\5\u00d6") + buf.write("l\2\u0541\u0540\3\2\2\2\u0541\u0542\3\2\2\2\u0542\u0544") + buf.write("\3\2\2\2\u0543\u0545\5\f\7\2\u0544\u0543\3\2\2\2\u0544") + buf.write("\u0545\3\2\2\2\u0545\u0546\3\2\2\2\u0546\u0547\7\177\2") + buf.write("\2\u0547\u0558\3\2\2\2\u0548\u0549\5\u012e\u0098\2\u0549") + buf.write("\u054a\5\u0164\u00b3\2\u054a\u0558\3\2\2\2\u054b\u054c") + buf.write("\5\u012e\u0098\2\u054c\u054e\5\f\7\2\u054d\u054f\7?\2") + buf.write("\2\u054e\u054d\3\2\2\2\u054e\u054f\3\2\2\2\u054f\u0550") + buf.write("\3\2\2\2\u0550\u0551\5\u0164\u00b3\2\u0551\u0558\3\2\2") + buf.write("\2\u0552\u0554\7\34\2\2\u0553\u0555\5\f\7\2\u0554\u0553") + buf.write("\3\2\2\2\u0554\u0555\3\2\2\2\u0555\u0556\3\2\2\2\u0556") + buf.write("\u0558\7\177\2\2\u0557\u053f\3\2\2\2\u0557\u0548\3\2\2") + buf.write("\2\u0557\u054b\3\2\2\2\u0557\u0552\3\2\2\2\u0558\u00a5") + buf.write("\3\2\2\2\u0559\u055a\7\177\2\2\u055a\u00a7\3\2\2\2\u055b") + buf.write("\u055c\5\u00aaV\2\u055c\u055e\7T\2\2\u055d\u055f\5\u00b2") + buf.write("Z\2\u055e\u055d\3\2\2\2\u055e\u055f\3\2\2\2\u055f\u0560") + buf.write("\3\2\2\2\u0560\u0561\7U\2\2\u0561\u0569\3\2\2\2\u0562") + buf.write("\u0563\5\u00aaV\2\u0563\u0564\7T\2\2\u0564\u0565\5\u00b2") + buf.write("Z\2\u0565\u0566\7u\2\2\u0566\u0567\7U\2\2\u0567\u0569") + buf.write("\3\2\2\2\u0568\u055b\3\2\2\2\u0568\u0562\3\2\2\2\u0569") + buf.write("\u00a9\3\2\2\2\u056a\u056c\5\u00aeX\2\u056b\u056d\5\u00d6") + buf.write("l\2\u056c\u056b\3\2\2\2\u056c\u056d\3\2\2\2\u056d\u056f") + buf.write("\3\2\2\2\u056e\u0570\7\177\2\2\u056f\u056e\3\2\2\2\u056f") + buf.write("\u0570\3\2\2\2\u0570\u0572\3\2\2\2\u0571\u0573\5\u00b0") + buf.write("Y\2\u0572\u0571\3\2\2\2\u0572\u0573\3\2\2\2\u0573\u057e") + buf.write("\3\2\2\2\u0574\u0576\5\u00aeX\2\u0575\u0577\5\u00d6l\2") + buf.write("\u0576\u0575\3\2\2\2\u0576\u0577\3\2\2\2\u0577\u0578\3") + buf.write("\2\2\2\u0578\u0579\5\f\7\2\u0579\u057b\7\177\2\2\u057a") + buf.write("\u057c\5\u00b0Y\2\u057b\u057a\3\2\2\2\u057b\u057c\3\2") + buf.write("\2\2\u057c\u057e\3\2\2\2\u057d\u056a\3\2\2\2\u057d\u0574") + buf.write("\3\2\2\2\u057e\u00ab\3\2\2\2\u057f\u0581\5\u00aeX\2\u0580") + buf.write("\u0582\5\u00d6l\2\u0581\u0580\3\2\2\2\u0581\u0582\3\2") + buf.write("\2\2\u0582\u0583\3\2\2\2\u0583\u0585\7\177\2\2\u0584\u0586") + buf.write("\5\u00b0Y\2\u0585\u0584\3\2\2\2\u0585\u0586\3\2\2\2\u0586") + buf.write("\u0587\3\2\2\2\u0587\u0588\7{\2\2\u0588\u00ad\3\2\2\2") + buf.write("\u0589\u058f\7\34\2\2\u058a\u058b\7\34\2\2\u058b\u058f") + buf.write("\7\20\2\2\u058c\u058d\7\34\2\2\u058d\u058f\7=\2\2\u058e") + buf.write("\u0589\3\2\2\2\u058e\u058a\3\2\2\2\u058e\u058c\3\2\2\2") + buf.write("\u058f\u00af\3\2\2\2\u0590\u0591\7y\2\2\u0591\u0592\5") + buf.write("\u009aN\2\u0592\u00b1\3\2\2\2\u0593\u0594\bZ\1\2\u0594") + buf.write("\u0595\5\u00b4[\2\u0595\u059b\3\2\2\2\u0596\u0597\f\3") + buf.write("\2\2\u0597\u0598\7u\2\2\u0598\u059a\5\u00b4[\2\u0599\u0596") + buf.write("\3\2\2\2\u059a\u059d\3\2\2\2\u059b\u0599\3\2\2\2\u059b") + buf.write("\u059c\3\2\2\2\u059c\u00b3\3\2\2\2\u059d\u059b\3\2\2\2") + buf.write("\u059e\u05a4\5\u00b6\\\2\u059f\u05a0\5\u00b6\\\2\u05a0") + buf.write("\u05a1\7`\2\2\u05a1\u05a2\5^\60\2\u05a2\u05a4\3\2\2\2") + buf.write("\u05a3\u059e\3\2\2\2\u05a3\u059f\3\2\2\2\u05a4\u00b5\3") + buf.write("\2\2\2\u05a5\u05a6\7\177\2\2\u05a6\u00b7\3\2\2\2\u05a7") + buf.write("\u05aa\5\u00ba^\2\u05a8\u05aa\5\u00c8e\2\u05a9\u05a7\3") + buf.write("\2\2\2\u05a9\u05a8\3\2\2\2\u05aa\u00b9\3\2\2\2\u05ab\u05ac") + buf.write("\7\177\2\2\u05ac\u00bb\3\2\2\2\u05ad\u05b0\5\u00be`\2") + buf.write("\u05ae\u05b0\5\u00c4c\2\u05af\u05ad\3\2\2\2\u05af\u05ae") + buf.write("\3\2\2\2\u05b0\u00bd\3\2\2\2\u05b1\u05b4\5\u00c0a\2\u05b2") + buf.write("\u05b4\5\u00c2b\2\u05b3\u05b1\3\2\2\2\u05b3\u05b2\3\2") + buf.write("\2\2\u05b4\u00bf\3\2\2\2\u05b5\u05b7\7\'\2\2\u05b6\u05b5") + buf.write("\3\2\2\2\u05b6\u05b7\3\2\2\2\u05b7\u05b8\3\2\2\2\u05b8") + buf.write("\u05b9\7+\2\2\u05b9\u05ba\7\177\2\2\u05ba\u05bb\7T\2\2") + buf.write("\u05bb\u05bc\5\u00c6d\2\u05bc\u05bd\7U\2\2\u05bd\u00c1") + buf.write("\3\2\2\2\u05be\u05c0\7\'\2\2\u05bf\u05be\3\2\2\2\u05bf") + buf.write("\u05c0\3\2\2\2\u05c0\u05c1\3\2\2\2\u05c1\u05c2\7+\2\2") + buf.write("\u05c2\u05c3\5\u00ba^\2\u05c3\u05c4\7T\2\2\u05c4\u05c5") + buf.write("\5\u00c6d\2\u05c5\u05c6\7U\2\2\u05c6\u00c3\3\2\2\2\u05c7") + buf.write("\u05c9\7\'\2\2\u05c8\u05c7\3\2\2\2\u05c8\u05c9\3\2\2\2") + buf.write("\u05c9\u05ca\3\2\2\2\u05ca\u05cb\7+\2\2\u05cb\u05cc\7") + buf.write("T\2\2\u05cc\u05cd\5\u00c6d\2\u05cd\u05ce\7U\2\2\u05ce") + buf.write("\u00c5\3\2\2\2\u05cf\u05d1\5|?\2\u05d0\u05cf\3\2\2\2\u05d0") + buf.write("\u05d1\3\2\2\2\u05d1\u00c7\3\2\2\2\u05d2\u05d3\7\177\2") + buf.write("\2\u05d3\u00c9\3\2\2\2\u05d4\u05d5\7+\2\2\u05d5\u05d6") + buf.write("\7\177\2\2\u05d6\u05d7\7`\2\2\u05d7\u05d8\5\u00ccg\2\u05d8") + buf.write("\u05d9\7{\2\2\u05d9\u00cb\3\2\2\2\u05da\u05dc\5\f\7\2") + buf.write("\u05db\u05da\3\2\2\2\u05db\u05dc\3\2\2\2\u05dc\u05dd\3") + buf.write("\2\2\2\u05dd\u05de\5\u00b8]\2\u05de\u00cd\3\2\2\2\u05df") + buf.write("\u05e1\7J\2\2\u05e0\u05e2\7G\2\2\u05e1\u05e0\3\2\2\2\u05e1") + buf.write("\u05e2\3\2\2\2\u05e2\u05e3\3\2\2\2\u05e3\u05e4\5\f\7\2") + buf.write("\u05e4\u05e5\5\b\5\2\u05e5\u05e6\7{\2\2\u05e6\u05ed\3") + buf.write("\2\2\2\u05e7\u05e8\7J\2\2\u05e8\u05e9\7z\2\2\u05e9\u05ea") + buf.write("\5\b\5\2\u05ea\u05eb\7{\2\2\u05eb\u05ed\3\2\2\2\u05ec") + buf.write("\u05df\3\2\2\2\u05ec\u05e7\3\2\2\2\u05ed\u00cf\3\2\2\2") + buf.write("\u05ee\u05f0\5\u00d6l\2\u05ef\u05ee\3\2\2\2\u05ef\u05f0") + buf.write("\3\2\2\2\u05f0\u05f1\3\2\2\2\u05f1\u05f2\7J\2\2\u05f2") + buf.write("\u05f4\7+\2\2\u05f3\u05f5\5\f\7\2\u05f4\u05f3\3\2\2\2") + buf.write("\u05f4\u05f5\3\2\2\2\u05f5\u05f6\3\2\2\2\u05f6\u05f7\5") + buf.write("\u00b8]\2\u05f7\u05f8\7{\2\2\u05f8\u00d1\3\2\2\2\u05f9") + buf.write("\u05fa\7\7\2\2\u05fa\u05fb\7P\2\2\u05fb\u05fc\7\u0088") + buf.write("\2\2\u05fc\u05fd\7Q\2\2\u05fd\u05fe\7{\2\2\u05fe\u00d3") + buf.write("\3\2\2\2\u05ff\u0600\7\37\2\2\u0600\u0601\7\u0088\2\2") + buf.write("\u0601\u0603\7T\2\2\u0602\u0604\5|?\2\u0603\u0602\3\2") + buf.write("\2\2\u0603\u0604\3\2\2\2\u0604\u0605\3\2\2\2\u0605\u060a") + buf.write("\7U\2\2\u0606\u0607\7\37\2\2\u0607\u0608\7\u0088\2\2\u0608") + buf.write("\u060a\5~@\2\u0609\u05ff\3\2\2\2\u0609\u0606\3\2\2\2\u060a") + buf.write("\u00d5\3\2\2\2\u060b\u060c\bl\1\2\u060c\u060d\5\u00d8") + buf.write("m\2\u060d\u0612\3\2\2\2\u060e\u060f\f\3\2\2\u060f\u0611") + buf.write("\5\u00d8m\2\u0610\u060e\3\2\2\2\u0611\u0614\3\2\2\2\u0612") + buf.write("\u0610\3\2\2\2\u0612\u0613\3\2\2\2\u0613\u00d7\3\2\2\2") + buf.write("\u0614\u0612\3\2\2\2\u0615\u0616\7R\2\2\u0616\u0617\7") + buf.write("R\2\2\u0617\u0618\5\u00dco\2\u0618\u0619\7S\2\2\u0619") + buf.write("\u061a\7S\2\2\u061a\u061d\3\2\2\2\u061b\u061d\5\u00da") + buf.write("n\2\u061c\u0615\3\2\2\2\u061c\u061b\3\2\2\2\u061d\u00d9") + buf.write("\3\2\2\2\u061e\u061f\7\5\2\2\u061f\u0620\7P\2\2\u0620") + buf.write("\u0622\5\u0104\u0083\2\u0621\u0623\7~\2\2\u0622\u0621") + buf.write("\3\2\2\2\u0622\u0623\3\2\2\2\u0623\u0624\3\2\2\2\u0624") + buf.write("\u0625\7Q\2\2\u0625\u062f\3\2\2\2\u0626\u0627\7\5\2\2") + buf.write("\u0627\u0628\7P\2\2\u0628\u062a\5^\60\2\u0629\u062b\7") + buf.write("~\2\2\u062a\u0629\3\2\2\2\u062a\u062b\3\2\2\2\u062b\u062c") + buf.write("\3\2\2\2\u062c\u062d\7Q\2\2\u062d\u062f\3\2\2\2\u062e") + buf.write("\u061e\3\2\2\2\u062e\u0626\3\2\2\2\u062f\u00db\3\2\2\2") + buf.write("\u0630\u0632\bo\1\2\u0631\u0633\5\u00dep\2\u0632\u0631") + buf.write("\3\2\2\2\u0632\u0633\3\2\2\2\u0633\u0638\3\2\2\2\u0634") + buf.write("\u0635\5\u00dep\2\u0635\u0636\7~\2\2\u0636\u0638\3\2\2") + buf.write("\2\u0637\u0630\3\2\2\2\u0637\u0634\3\2\2\2\u0638\u0645") + buf.write("\3\2\2\2\u0639\u063a\f\5\2\2\u063a\u063c\7u\2\2\u063b") + buf.write("\u063d\5\u00dep\2\u063c\u063b\3\2\2\2\u063c\u063d\3\2") + buf.write("\2\2\u063d\u0644\3\2\2\2\u063e\u063f\f\3\2\2\u063f\u0640") + buf.write("\7u\2\2\u0640\u0641\5\u00dep\2\u0641\u0642\7~\2\2\u0642") + buf.write("\u0644\3\2\2\2\u0643\u0639\3\2\2\2\u0643\u063e\3\2\2\2") + buf.write("\u0644\u0647\3\2\2\2\u0645\u0643\3\2\2\2\u0645\u0646\3") + buf.write("\2\2\2\u0646\u00dd\3\2\2\2\u0647\u0645\3\2\2\2\u0648\u064a") + buf.write("\5\u00e0q\2\u0649\u064b\5\u00e6t\2\u064a\u0649\3\2\2\2") + buf.write("\u064a\u064b\3\2\2\2\u064b\u00df\3\2\2\2\u064c\u064f\7") + buf.write("\177\2\2\u064d\u064f\5\u00e2r\2\u064e\u064c\3\2\2\2\u064e") + buf.write("\u064d\3\2\2\2\u064f\u00e1\3\2\2\2\u0650\u0651\5\u00e4") + buf.write("s\2\u0651\u0652\7z\2\2\u0652\u0653\7\177\2\2\u0653\u00e3") + buf.write("\3\2\2\2\u0654\u0655\7\177\2\2\u0655\u00e5\3\2\2\2\u0656") + buf.write("\u0657\7P\2\2\u0657\u0658\5\u00e8u\2\u0658\u0659\7Q\2") + buf.write("\2\u0659\u00e7\3\2\2\2\u065a\u065c\bu\1\2\u065b\u065d") + buf.write("\5\u00eav\2\u065c\u065b\3\2\2\2\u065c\u065d\3\2\2\2\u065d") + buf.write("\u0662\3\2\2\2\u065e\u065f\f\3\2\2\u065f\u0661\5\u00ea") + buf.write("v\2\u0660\u065e\3\2\2\2\u0661\u0664\3\2\2\2\u0662\u0660") + buf.write("\3\2\2\2\u0662\u0663\3\2\2\2\u0663\u00e9\3\2\2\2\u0664") + buf.write("\u0662\3\2\2\2\u0665\u0666\7P\2\2\u0666\u0667\5\u00e8") + buf.write("u\2\u0667\u0668\7Q\2\2\u0668\u0672\3\2\2\2\u0669\u066a") + buf.write("\7R\2\2\u066a\u066b\5\u00e8u\2\u066b\u066c\7S\2\2\u066c") + buf.write("\u0672\3\2\2\2\u066d\u066e\7T\2\2\u066e\u066f\5\u00e8") + buf.write("u\2\u066f\u0670\7U\2\2\u0670\u0672\3\2\2\2\u0671\u0665") + buf.write("\3\2\2\2\u0671\u0669\3\2\2\2\u0671\u066d\3\2\2\2\u0672") + buf.write("\u00eb\3\2\2\2\u0673\u0674\bw\1\2\u0674\u0675\5\u00ee") + buf.write("x\2\u0675\u067b\3\2\2\2\u0676\u0677\f\3\2\2\u0677\u0678") + buf.write("\7u\2\2\u0678\u067a\5\u00eex\2\u0679\u0676\3\2\2\2\u067a") + buf.write("\u067d\3\2\2\2\u067b\u0679\3\2\2\2\u067b\u067c\3\2\2\2") + buf.write("\u067c\u00ed\3\2\2\2\u067d\u067b\3\2\2\2\u067e\u0680\5") + buf.write("\u00f0y\2\u067f\u0681\5\u011a\u008e\2\u0680\u067f\3\2") + buf.write("\2\2\u0680\u0681\3\2\2\2\u0681\u00ef\3\2\2\2\u0682\u0688") + buf.write("\5\u00f2z\2\u0683\u0684\5\u00f4{\2\u0684\u0685\5\u00f6") + buf.write("|\2\u0685\u0686\5\u00f8}\2\u0686\u0688\3\2\2\2\u0687\u0682") + buf.write("\3\2\2\2\u0687\u0683\3\2\2\2\u0688\u00f1\3\2\2\2\u0689") + buf.write("\u068e\5\u00f4{\2\u068a\u068b\5\u00fa~\2\u068b\u068c\5") + buf.write("\u00f2z\2\u068c\u068e\3\2\2\2\u068d\u0689\3\2\2\2\u068d") + buf.write("\u068a\3\2\2\2\u068e\u00f3\3\2\2\2\u068f\u0690\b{\1\2") + buf.write("\u0690\u0692\5\u0102\u0082\2\u0691\u0693\5\u00d6l\2\u0692") + buf.write("\u0691\3\2\2\2\u0692\u0693\3\2\2\2\u0693\u0699\3\2\2\2") + buf.write("\u0694\u0695\7P\2\2\u0695\u0696\5\u00f2z\2\u0696\u0697") + buf.write("\7Q\2\2\u0697\u0699\3\2\2\2\u0698\u068f\3\2\2\2\u0698") + buf.write("\u0694\3\2\2\2\u0699\u06a7\3\2\2\2\u069a\u069b\f\5\2\2") + buf.write("\u069b\u06a6\5\u00f6|\2\u069c\u069d\f\4\2\2\u069d\u069f") + buf.write("\7R\2\2\u069e\u06a0\5^\60\2\u069f\u069e\3\2\2\2\u069f") + buf.write("\u06a0\3\2\2\2\u06a0\u06a1\3\2\2\2\u06a1\u06a3\7S\2\2") + buf.write("\u06a2\u06a4\5\u00d6l\2\u06a3\u06a2\3\2\2\2\u06a3\u06a4") + buf.write("\3\2\2\2\u06a4\u06a6\3\2\2\2\u06a5\u069a\3\2\2\2\u06a5") + buf.write("\u069c\3\2\2\2\u06a6\u06a9\3\2\2\2\u06a7\u06a5\3\2\2\2") + buf.write("\u06a7\u06a8\3\2\2\2\u06a8\u00f5\3\2\2\2\u06a9\u06a7\3") + buf.write("\2\2\2\u06aa\u06ab\7P\2\2\u06ab\u06ac\5\u0110\u0089\2") + buf.write("\u06ac\u06ae\7Q\2\2\u06ad\u06af\5\u00fc\177\2\u06ae\u06ad") + buf.write("\3\2\2\2\u06ae\u06af\3\2\2\2\u06af\u06b1\3\2\2\2\u06b0") + buf.write("\u06b2\5\u0100\u0081\2\u06b1\u06b0\3\2\2\2\u06b1\u06b2") + buf.write("\3\2\2\2\u06b2\u06b4\3\2\2\2\u06b3\u06b5\5\u0180\u00c1") + buf.write("\2\u06b4\u06b3\3\2\2\2\u06b4\u06b5\3\2\2\2\u06b5\u06b7") + buf.write("\3\2\2\2\u06b6\u06b8\5\u00d6l\2\u06b7\u06b6\3\2\2\2\u06b7") + buf.write("\u06b8\3\2\2\2\u06b8\u00f7\3\2\2\2\u06b9\u06ba\7w\2\2") + buf.write("\u06ba\u06bc\5\u009cO\2\u06bb\u06bd\5\u0106\u0084\2\u06bc") + buf.write("\u06bb\3\2\2\2\u06bc\u06bd\3\2\2\2\u06bd\u00f9\3\2\2\2") + buf.write("\u06be\u06c0\7X\2\2\u06bf\u06c1\5\u00d6l\2\u06c0\u06bf") + buf.write("\3\2\2\2\u06c0\u06c1\3\2\2\2\u06c1\u06c3\3\2\2\2\u06c2") + buf.write("\u06c4\5\u00fc\177\2\u06c3\u06c2\3\2\2\2\u06c3\u06c4\3") + buf.write("\2\2\2\u06c4\u06d6\3\2\2\2\u06c5\u06c7\7\\\2\2\u06c6\u06c8") + buf.write("\5\u00d6l\2\u06c7\u06c6\3\2\2\2\u06c7\u06c8\3\2\2\2\u06c8") + buf.write("\u06d6\3\2\2\2\u06c9\u06cb\7q\2\2\u06ca\u06cc\5\u00d6") + buf.write("l\2\u06cb\u06ca\3\2\2\2\u06cb\u06cc\3\2\2\2\u06cc\u06d6") + buf.write("\3\2\2\2\u06cd\u06ce\5\f\7\2\u06ce\u06d0\7X\2\2\u06cf") + buf.write("\u06d1\5\u00d6l\2\u06d0\u06cf\3\2\2\2\u06d0\u06d1\3\2") + buf.write("\2\2\u06d1\u06d3\3\2\2\2\u06d2\u06d4\5\u00fc\177\2\u06d3") + buf.write("\u06d2\3\2\2\2\u06d3\u06d4\3\2\2\2\u06d4\u06d6\3\2\2\2") + buf.write("\u06d5\u06be\3\2\2\2\u06d5\u06c5\3\2\2\2\u06d5\u06c9\3") + buf.write("\2\2\2\u06d5\u06cd\3\2\2\2\u06d6\u00fb\3\2\2\2\u06d7\u06d9") + buf.write("\5\u00fe\u0080\2\u06d8\u06da\5\u00fc\177\2\u06d9\u06d8") + buf.write("\3\2\2\2\u06d9\u06da\3\2\2\2\u06da\u00fd\3\2\2\2\u06db") + buf.write("\u06dc\t\6\2\2\u06dc\u00ff\3\2\2\2\u06dd\u06de\t\7\2\2") + buf.write("\u06de\u0101\3\2\2\2\u06df\u06e1\7~\2\2\u06e0\u06df\3") + buf.write("\2\2\2\u06e0\u06e1\3\2\2\2\u06e1\u06e2\3\2\2\2\u06e2\u06e3") + buf.write("\5\6\4\2\u06e3\u0103\3\2\2\2\u06e4\u06e6\5\u009aN\2\u06e5") + buf.write("\u06e7\5\u0106\u0084\2\u06e6\u06e5\3\2\2\2\u06e6\u06e7") + buf.write("\3\2\2\2\u06e7\u0105\3\2\2\2\u06e8\u06f1\5\u0108\u0085") + buf.write("\2\u06e9\u06eb\5\u010a\u0086\2\u06ea\u06e9\3\2\2\2\u06ea") + buf.write("\u06eb\3\2\2\2\u06eb\u06ec\3\2\2\2\u06ec\u06ed\5\u00f6") + buf.write("|\2\u06ed\u06ee\5\u00f8}\2\u06ee\u06f1\3\2\2\2\u06ef\u06f1") + buf.write("\5\u010c\u0087\2\u06f0\u06e8\3\2\2\2\u06f0\u06ea\3\2\2") + buf.write("\2\u06f0\u06ef\3\2\2\2\u06f1\u0107\3\2\2\2\u06f2\u06f8") + buf.write("\5\u010a\u0086\2\u06f3\u06f5\5\u00fa~\2\u06f4\u06f6\5") + buf.write("\u0108\u0085\2\u06f5\u06f4\3\2\2\2\u06f5\u06f6\3\2\2\2") + buf.write("\u06f6\u06f8\3\2\2\2\u06f7\u06f2\3\2\2\2\u06f7\u06f3\3") + buf.write("\2\2\2\u06f8\u0109\3\2\2\2\u06f9\u06fa\b\u0086\1\2\u06fa") + buf.write("\u0708\5\u00f6|\2\u06fb\u06fd\7R\2\2\u06fc\u06fe\5^\60") + buf.write("\2\u06fd\u06fc\3\2\2\2\u06fd\u06fe\3\2\2\2\u06fe\u06ff") + buf.write("\3\2\2\2\u06ff\u0701\7S\2\2\u0700\u0702\5\u00d6l\2\u0701") + buf.write("\u0700\3\2\2\2\u0701\u0702\3\2\2\2\u0702\u0708\3\2\2\2") + buf.write("\u0703\u0704\7P\2\2\u0704\u0705\5\u0108\u0085\2\u0705") + buf.write("\u0706\7Q\2\2\u0706\u0708\3\2\2\2\u0707\u06f9\3\2\2\2") + buf.write("\u0707\u06fb\3\2\2\2\u0707\u0703\3\2\2\2\u0708\u0716\3") + buf.write("\2\2\2\u0709\u070a\f\7\2\2\u070a\u0715\5\u00f6|\2\u070b") + buf.write("\u070c\f\5\2\2\u070c\u070e\7R\2\2\u070d\u070f\5^\60\2") + buf.write("\u070e\u070d\3\2\2\2\u070e\u070f\3\2\2\2\u070f\u0710\3") + buf.write("\2\2\2\u0710\u0712\7S\2\2\u0711\u0713\5\u00d6l\2\u0712") + buf.write("\u0711\3\2\2\2\u0712\u0713\3\2\2\2\u0713\u0715\3\2\2\2") + buf.write("\u0714\u0709\3\2\2\2\u0714\u070b\3\2\2\2\u0715\u0718\3") + buf.write("\2\2\2\u0716\u0714\3\2\2\2\u0716\u0717\3\2\2\2\u0717\u010b") + buf.write("\3\2\2\2\u0718\u0716\3\2\2\2\u0719\u071e\5\u010e\u0088") + buf.write("\2\u071a\u071b\5\u00fa~\2\u071b\u071c\5\u010c\u0087\2") + buf.write("\u071c\u071e\3\2\2\2\u071d\u0719\3\2\2\2\u071d\u071a\3") + buf.write("\2\2\2\u071e\u010d\3\2\2\2\u071f\u0720\b\u0088\1\2\u0720") + buf.write("\u0721\7~\2\2\u0721\u072f\3\2\2\2\u0722\u0723\f\5\2\2") + buf.write("\u0723\u072e\5\u00f6|\2\u0724\u0725\f\4\2\2\u0725\u0727") + buf.write("\7R\2\2\u0726\u0728\5^\60\2\u0727\u0726\3\2\2\2\u0727") + buf.write("\u0728\3\2\2\2\u0728\u0729\3\2\2\2\u0729\u072b\7S\2\2") + buf.write("\u072a\u072c\5\u00d6l\2\u072b\u072a\3\2\2\2\u072b\u072c") + buf.write("\3\2\2\2\u072c\u072e\3\2\2\2\u072d\u0722\3\2\2\2\u072d") + buf.write("\u0724\3\2\2\2\u072e\u0731\3\2\2\2\u072f\u072d\3\2\2\2") + buf.write("\u072f\u0730\3\2\2\2\u0730\u010f\3\2\2\2\u0731\u072f\3") + buf.write("\2\2\2\u0732\u0734\5\u0112\u008a\2\u0733\u0732\3\2\2\2") + buf.write("\u0733\u0734\3\2\2\2\u0734\u0736\3\2\2\2\u0735\u0737\7") + buf.write("~\2\2\u0736\u0735\3\2\2\2\u0736\u0737\3\2\2\2\u0737\u073d") + buf.write("\3\2\2\2\u0738\u0739\5\u0112\u008a\2\u0739\u073a\7u\2") + buf.write("\2\u073a\u073b\7~\2\2\u073b\u073d\3\2\2\2\u073c\u0733") + buf.write("\3\2\2\2\u073c\u0738\3\2\2\2\u073d\u0111\3\2\2\2\u073e") + buf.write("\u073f\b\u008a\1\2\u073f\u0740\5\u0114\u008b\2\u0740\u0746") + buf.write("\3\2\2\2\u0741\u0742\f\3\2\2\u0742\u0743\7u\2\2\u0743") + buf.write("\u0745\5\u0114\u008b\2\u0744\u0741\3\2\2\2\u0745\u0748") + buf.write("\3\2\2\2\u0746\u0744\3\2\2\2\u0746\u0747\3\2\2\2\u0747") + buf.write("\u0113\3\2\2\2\u0748\u0746\3\2\2\2\u0749\u074b\5\u00d6") + buf.write("l\2\u074a\u0749\3\2\2\2\u074a\u074b\3\2\2\2\u074b\u074c") + buf.write("\3\2\2\2\u074c\u074d\5\u008eH\2\u074d\u074e\5\u00f0y\2") + buf.write("\u074e\u0769\3\2\2\2\u074f\u0751\5\u00d6l\2\u0750\u074f") + buf.write("\3\2\2\2\u0750\u0751\3\2\2\2\u0751\u0752\3\2\2\2\u0752") + buf.write("\u0753\5\u008eH\2\u0753\u0754\5\u00f0y\2\u0754\u0755\7") + buf.write("`\2\2\u0755\u0756\5\u011e\u0090\2\u0756\u0769\3\2\2\2") + buf.write("\u0757\u0759\5\u00d6l\2\u0758\u0757\3\2\2\2\u0758\u0759") + buf.write("\3\2\2\2\u0759\u075a\3\2\2\2\u075a\u075c\5\u008eH\2\u075b") + buf.write("\u075d\5\u0106\u0084\2\u075c\u075b\3\2\2\2\u075c\u075d") + buf.write("\3\2\2\2\u075d\u0769\3\2\2\2\u075e\u0760\5\u00d6l\2\u075f") + buf.write("\u075e\3\2\2\2\u075f\u0760\3\2\2\2\u0760\u0761\3\2\2\2") + buf.write("\u0761\u0763\5\u008eH\2\u0762\u0764\5\u0106\u0084\2\u0763") + buf.write("\u0762\3\2\2\2\u0763\u0764\3\2\2\2\u0764\u0765\3\2\2\2") + buf.write("\u0765\u0766\7`\2\2\u0766\u0767\5\u011e\u0090\2\u0767") + buf.write("\u0769\3\2\2\2\u0768\u074a\3\2\2\2\u0768\u0750\3\2\2\2") + buf.write("\u0768\u0758\3\2\2\2\u0768\u075f\3\2\2\2\u0769\u0115\3") + buf.write("\2\2\2\u076a\u076c\5\u00d6l\2\u076b\u076a\3\2\2\2\u076b") + buf.write("\u076c\3\2\2\2\u076c\u076e\3\2\2\2\u076d\u076f\5\u008e") + buf.write("H\2\u076e\u076d\3\2\2\2\u076e\u076f\3\2\2\2\u076f\u0770") + buf.write("\3\2\2\2\u0770\u0772\5\u00f0y\2\u0771\u0773\5\u0138\u009d") + buf.write("\2\u0772\u0771\3\2\2\2\u0772\u0773\3\2\2\2\u0773\u0774") + buf.write("\3\2\2\2\u0774\u0775\5\u0118\u008d\2\u0775\u0117\3\2\2") + buf.write("\2\u0776\u0778\5\u0150\u00a9\2\u0777\u0776\3\2\2\2\u0777") + buf.write("\u0778\3\2\2\2\u0778\u0779\3\2\2\2\u0779\u0782\5h\65\2") + buf.write("\u077a\u0782\5\u0176\u00bc\2\u077b\u077c\7`\2\2\u077c") + buf.write("\u077d\7\26\2\2\u077d\u0782\7{\2\2\u077e\u077f\7`\2\2") + buf.write("\u077f\u0780\7\27\2\2\u0780\u0782\7{\2\2\u0781\u0777\3") + buf.write("\2\2\2\u0781\u077a\3\2\2\2\u0781\u077b\3\2\2\2\u0781\u077e") + buf.write("\3\2\2\2\u0782\u0119\3\2\2\2\u0783\u0789\5\u011c\u008f") + buf.write("\2\u0784\u0785\7P\2\2\u0785\u0786\5\"\22\2\u0786\u0787") + buf.write("\7Q\2\2\u0787\u0789\3\2\2\2\u0788\u0783\3\2\2\2\u0788") + buf.write("\u0784\3\2\2\2\u0789\u011b\3\2\2\2\u078a\u078b\7`\2\2") + buf.write("\u078b\u078e\5\u011e\u0090\2\u078c\u078e\5\u0122\u0092") + buf.write("\2\u078d\u078a\3\2\2\2\u078d\u078c\3\2\2\2\u078e\u011d") + buf.write("\3\2\2\2\u078f\u0792\5X-\2\u0790\u0792\5\u0122\u0092\2") + buf.write("\u0791\u078f\3\2\2\2\u0791\u0790\3\2\2\2\u0792\u011f\3") + buf.write("\2\2\2\u0793\u0794\b\u0091\1\2\u0794\u0796\5\u011e\u0090") + buf.write("\2\u0795\u0797\7~\2\2\u0796\u0795\3\2\2\2\u0796\u0797") + buf.write("\3\2\2\2\u0797\u07a0\3\2\2\2\u0798\u0799\f\3\2\2\u0799") + buf.write("\u079a\7u\2\2\u079a\u079c\5\u011e\u0090\2\u079b\u079d") + buf.write("\7~\2\2\u079c\u079b\3\2\2\2\u079c\u079d\3\2\2\2\u079d") + buf.write("\u079f\3\2\2\2\u079e\u0798\3\2\2\2\u079f\u07a2\3\2\2\2") + buf.write("\u07a0\u079e\3\2\2\2\u07a0\u07a1\3\2\2\2\u07a1\u0121\3") + buf.write("\2\2\2\u07a2\u07a0\3\2\2\2\u07a3\u07a4\7T\2\2\u07a4\u07a6") + buf.write("\5\u0120\u0091\2\u07a5\u07a7\7u\2\2\u07a6\u07a5\3\2\2") + buf.write("\2\u07a6\u07a7\3\2\2\2\u07a7\u07a8\3\2\2\2\u07a8\u07a9") + buf.write("\7U\2\2\u07a9\u07ad\3\2\2\2\u07aa\u07ab\7T\2\2\u07ab\u07ad") + buf.write("\7U\2\2\u07ac\u07a3\3\2\2\2\u07ac\u07aa\3\2\2\2\u07ad") + buf.write("\u0123\3\2\2\2\u07ae\u07b1\7\177\2\2\u07af\u07b1\5\u0164") + buf.write("\u00b3\2\u07b0\u07ae\3\2\2\2\u07b0\u07af\3\2\2\2\u07b1") + buf.write("\u0125\3\2\2\2\u07b2\u07b3\5\u0128\u0095\2\u07b3\u07b5") + buf.write("\7T\2\2\u07b4\u07b6\5\u0130\u0099\2\u07b5\u07b4\3\2\2") + buf.write("\2\u07b5\u07b6\3\2\2\2\u07b6\u07b7\3\2\2\2\u07b7\u07b8") + buf.write("\7U\2\2\u07b8\u0127\3\2\2\2\u07b9\u07bb\5\u012e\u0098") + buf.write("\2\u07ba\u07bc\5\u00d6l\2\u07bb\u07ba\3\2\2\2\u07bb\u07bc") + buf.write("\3\2\2\2\u07bc\u07bd\3\2\2\2\u07bd\u07bf\5\u012a\u0096") + buf.write("\2\u07be\u07c0\5\u012c\u0097\2\u07bf\u07be\3\2\2\2\u07bf") + buf.write("\u07c0\3\2\2\2\u07c0\u07c2\3\2\2\2\u07c1\u07c3\5\u013e") + buf.write("\u00a0\2\u07c2\u07c1\3\2\2\2\u07c2\u07c3\3\2\2\2\u07c3") + buf.write("\u07cc\3\2\2\2\u07c4\u07c6\5\u012e\u0098\2\u07c5\u07c7") + buf.write("\5\u00d6l\2\u07c6\u07c5\3\2\2\2\u07c6\u07c7\3\2\2\2\u07c7") + buf.write("\u07c9\3\2\2\2\u07c8\u07ca\5\u013e\u00a0\2\u07c9\u07c8") + buf.write("\3\2\2\2\u07c9\u07ca\3\2\2\2\u07ca\u07cc\3\2\2\2\u07cb") + buf.write("\u07b9\3\2\2\2\u07cb\u07c4\3\2\2\2\u07cc\u0129\3\2\2\2") + buf.write("\u07cd\u07cf\5\f\7\2\u07ce\u07cd\3\2\2\2\u07ce\u07cf\3") + buf.write("\2\2\2\u07cf\u07d0\3\2\2\2\u07d0\u07d1\5\u0124\u0093\2") + buf.write("\u07d1\u012b\3\2\2\2\u07d2\u07d3\7!\2\2\u07d3\u012d\3") + buf.write("\2\2\2\u07d4\u07d5\t\b\2\2\u07d5\u012f\3\2\2\2\u07d6\u07d8") + buf.write("\5\u0132\u009a\2\u07d7\u07d9\5\u0130\u0099\2\u07d8\u07d7") + buf.write("\3\2\2\2\u07d8\u07d9\3\2\2\2\u07d9\u07e0\3\2\2\2\u07da") + buf.write("\u07db\5\u0148\u00a5\2\u07db\u07dd\7y\2\2\u07dc\u07de") + buf.write("\5\u0130\u0099\2\u07dd\u07dc\3\2\2\2\u07dd\u07de\3\2\2") + buf.write("\2\u07de\u07e0\3\2\2\2\u07df\u07d6\3\2\2\2\u07df\u07da") + buf.write("\3\2\2\2\u07e0\u0131\3\2\2\2\u07e1\u07e3\5\u00d6l\2\u07e2") + buf.write("\u07e1\3\2\2\2\u07e2\u07e3\3\2\2\2\u07e3\u07e5\3\2\2\2") + buf.write("\u07e4\u07e6\5\u008eH\2\u07e5\u07e4\3\2\2\2\u07e5\u07e6") + buf.write("\3\2\2\2\u07e6\u07e8\3\2\2\2\u07e7\u07e9\5\u0134\u009b") + buf.write("\2\u07e8\u07e7\3\2\2\2\u07e8\u07e9\3\2\2\2\u07e9\u07ea") + buf.write("\3\2\2\2\u07ea\u07f2\7{\2\2\u07eb\u07f2\5\u0116\u008c") + buf.write("\2\u07ec\u07f2\5\u00ceh\2\u07ed\u07f2\5\u0086D\2\u07ee") + buf.write("\u07f2\5\u015c\u00af\2\u07ef\u07f2\5\u0082B\2\u07f0\u07f2") + buf.write("\5\u0088E\2\u07f1\u07e2\3\2\2\2\u07f1\u07eb\3\2\2\2\u07f1") + buf.write("\u07ec\3\2\2\2\u07f1\u07ed\3\2\2\2\u07f1\u07ee\3\2\2\2") + buf.write("\u07f1\u07ef\3\2\2\2\u07f1\u07f0\3\2\2\2\u07f2\u0133\3") + buf.write("\2\2\2\u07f3\u07f4\b\u009b\1\2\u07f4\u07f5\5\u0136\u009c") + buf.write("\2\u07f5\u07fb\3\2\2\2\u07f6\u07f7\f\3\2\2\u07f7\u07f8") + buf.write("\7u\2\2\u07f8\u07fa\5\u0136\u009c\2\u07f9\u07f6\3\2\2") + buf.write("\2\u07fa\u07fd\3\2\2\2\u07fb\u07f9\3\2\2\2\u07fb\u07fc") + buf.write("\3\2\2\2\u07fc\u0135\3\2\2\2\u07fd\u07fb\3\2\2\2\u07fe") + buf.write("\u0800\5\u00f0y\2\u07ff\u0801\5\u0138\u009d\2\u0800\u07ff") + buf.write("\3\2\2\2\u0800\u0801\3\2\2\2\u0801\u0803\3\2\2\2\u0802") + buf.write("\u0804\5\u013c\u009f\2\u0803\u0802\3\2\2\2\u0803\u0804") + buf.write("\3\2\2\2\u0804\u0812\3\2\2\2\u0805\u0807\5\u00f0y\2\u0806") + buf.write("\u0808\5\u011c\u008f\2\u0807\u0806\3\2\2\2\u0807\u0808") + buf.write("\3\2\2\2\u0808\u0812\3\2\2\2\u0809\u080b\7\177\2\2\u080a") + buf.write("\u0809\3\2\2\2\u080a\u080b\3\2\2\2\u080b\u080d\3\2\2\2") + buf.write("\u080c\u080e\5\u00d6l\2\u080d\u080c\3\2\2\2\u080d\u080e") + buf.write("\3\2\2\2\u080e\u080f\3\2\2\2\u080f\u0810\7y\2\2\u0810") + buf.write("\u0812\5^\60\2\u0811\u07fe\3\2\2\2\u0811\u0805\3\2\2\2") + buf.write("\u0811\u080a\3\2\2\2\u0812\u0137\3\2\2\2\u0813\u0814\b") + buf.write("\u009d\1\2\u0814\u0815\5\u013a\u009e\2\u0815\u081a\3\2") + buf.write("\2\2\u0816\u0817\f\3\2\2\u0817\u0819\5\u013a\u009e\2\u0818") + buf.write("\u0816\3\2\2\2\u0819\u081c\3\2\2\2\u081a\u0818\3\2\2\2") + buf.write("\u081a\u081b\3\2\2\2\u081b\u0139\3\2\2\2\u081c\u081a\3") + buf.write("\2\2\2\u081d\u081e\t\t\2\2\u081e\u013b\3\2\2\2\u081f\u0820") + buf.write("\7`\2\2\u0820\u0821\7\u0082\2\2\u0821\u0822\b\u009f\1") + buf.write("\2\u0822\u013d\3\2\2\2\u0823\u0824\7y\2\2\u0824\u0825") + buf.write("\5\u0140\u00a1\2\u0825\u013f\3\2\2\2\u0826\u0827\b\u00a1") + buf.write("\1\2\u0827\u0829\5\u0142\u00a2\2\u0828\u082a\7~\2\2\u0829") + buf.write("\u0828\3\2\2\2\u0829\u082a\3\2\2\2\u082a\u0833\3\2\2\2") + buf.write("\u082b\u082c\f\3\2\2\u082c\u082d\7u\2\2\u082d\u082f\5") + buf.write("\u0142\u00a2\2\u082e\u0830\7~\2\2\u082f\u082e\3\2\2\2") + buf.write("\u082f\u0830\3\2\2\2\u0830\u0832\3\2\2\2\u0831\u082b\3") + buf.write("\2\2\2\u0832\u0835\3\2\2\2\u0833\u0831\3\2\2\2\u0833\u0834") + buf.write("\3\2\2\2\u0834\u0141\3\2\2\2\u0835\u0833\3\2\2\2\u0836") + buf.write("\u0838\5\u00d6l\2\u0837\u0836\3\2\2\2\u0837\u0838\3\2") + buf.write("\2\2\u0838\u0839\3\2\2\2\u0839\u084c\5\u0146\u00a4\2\u083a") + buf.write("\u083c\5\u00d6l\2\u083b\u083a\3\2\2\2\u083b\u083c\3\2") + buf.write("\2\2\u083c\u083d\3\2\2\2\u083d\u083f\7K\2\2\u083e\u0840") + buf.write("\5\u0148\u00a5\2\u083f\u083e\3\2\2\2\u083f\u0840\3\2\2") + buf.write("\2\u0840\u0841\3\2\2\2\u0841\u084c\5\u0146\u00a4\2\u0842") + buf.write("\u0844\5\u00d6l\2\u0843\u0842\3\2\2\2\u0843\u0844\3\2") + buf.write("\2\2\u0844\u0845\3\2\2\2\u0845\u0847\5\u0148\u00a5\2\u0846") + buf.write("\u0848\7K\2\2\u0847\u0846\3\2\2\2\u0847\u0848\3\2\2\2") + buf.write("\u0848\u0849\3\2\2\2\u0849\u084a\5\u0146\u00a4\2\u084a") + buf.write("\u084c\3\2\2\2\u084b\u0837\3\2\2\2\u084b\u083b\3\2\2\2") + buf.write("\u084b\u0843\3\2\2\2\u084c\u0143\3\2\2\2\u084d\u084f\5") + buf.write("\f\7\2\u084e\u084d\3\2\2\2\u084e\u084f\3\2\2\2\u084f\u0850") + buf.write("\3\2\2\2\u0850\u0853\5\u0124\u0093\2\u0851\u0853\5\u00a2") + buf.write("R\2\u0852\u084e\3\2\2\2\u0852\u0851\3\2\2\2\u0853\u0145") + buf.write("\3\2\2\2\u0854\u0855\5\u0144\u00a3\2\u0855\u0147\3\2\2") + buf.write("\2\u0856\u0857\t\n\2\2\u0857\u0149\3\2\2\2\u0858\u0859") + buf.write("\7/\2\2\u0859\u085a\5\u014c\u00a7\2\u085a\u014b\3\2\2") + buf.write("\2\u085b\u085d\5\u009aN\2\u085c\u085e\5\u014e\u00a8\2") + buf.write("\u085d\u085c\3\2\2\2\u085d\u085e\3\2\2\2\u085e\u014d\3") + buf.write("\2\2\2\u085f\u0861\5\u00fa~\2\u0860\u0862\5\u014e\u00a8") + buf.write("\2\u0861\u0860\3\2\2\2\u0861\u0862\3\2\2\2\u0862\u014f") + buf.write("\3\2\2\2\u0863\u0864\7y\2\2\u0864\u0865\5\u0152\u00aa") + buf.write("\2\u0865\u0151\3\2\2\2\u0866\u0868\5\u0154\u00ab\2\u0867") + buf.write("\u0869\7~\2\2\u0868\u0867\3\2\2\2\u0868\u0869\3\2\2\2") + buf.write("\u0869\u0872\3\2\2\2\u086a\u086c\5\u0154\u00ab\2\u086b") + buf.write("\u086d\7~\2\2\u086c\u086b\3\2\2\2\u086c\u086d\3\2\2\2") + buf.write("\u086d\u086e\3\2\2\2\u086e\u086f\7u\2\2\u086f\u0870\5") + buf.write("\u0152\u00aa\2\u0870\u0872\3\2\2\2\u0871\u0866\3\2\2\2") + buf.write("\u0871\u086a\3\2\2\2\u0872\u0153\3\2\2\2\u0873\u0874\5") + buf.write("\u0156\u00ac\2\u0874\u0876\7P\2\2\u0875\u0877\5\"\22\2") + buf.write("\u0876\u0875\3\2\2\2\u0876\u0877\3\2\2\2\u0877\u0878\3") + buf.write("\2\2\2\u0878\u0879\7Q\2\2\u0879\u087e\3\2\2\2\u087a\u087b") + buf.write("\5\u0156\u00ac\2\u087b\u087c\5\u0122\u0092\2\u087c\u087e") + buf.write("\3\2\2\2\u087d\u0873\3\2\2\2\u087d\u087a\3\2\2\2\u087e") + buf.write("\u0155\3\2\2\2\u087f\u0882\5\u0144\u00a3\2\u0880\u0882") + buf.write("\7\177\2\2\u0881\u087f\3\2\2\2\u0881\u0880\3\2\2\2\u0882") + buf.write("\u0157\3\2\2\2\u0883\u0884\7/\2\2\u0884\u0885\5\u018c") + buf.write("\u00c7\2\u0885\u0159\3\2\2\2\u0886\u0887\7/\2\2\u0887") + buf.write("\u0888\7\u0088\2\2\u0888\u088c\7\177\2\2\u0889\u088a\7") + buf.write("/\2\2\u088a\u088c\7\u008b\2\2\u088b\u0886\3\2\2\2\u088b") + buf.write("\u0889\3\2\2\2\u088c\u015b\3\2\2\2\u088d\u088e\7?\2\2") + buf.write("\u088e\u088f\7a\2\2\u088f\u0890\5\u015e\u00b0\2\u0890") + buf.write("\u0891\7b\2\2\u0891\u0892\5~@\2\u0892\u015d\3\2\2\2\u0893") + buf.write("\u0894\b\u00b0\1\2\u0894\u0895\5\u0160\u00b1\2\u0895\u089b") + buf.write("\3\2\2\2\u0896\u0897\f\3\2\2\u0897\u0898\7u\2\2\u0898") + buf.write("\u089a\5\u0160\u00b1\2\u0899\u0896\3\2\2\2\u089a\u089d") + buf.write("\3\2\2\2\u089b\u0899\3\2\2\2\u089b\u089c\3\2\2\2\u089c") + buf.write("\u015f\3\2\2\2\u089d\u089b\3\2\2\2\u089e\u08a1\5\u0162") + buf.write("\u00b2\2\u089f\u08a1\5\u0114\u008b\2\u08a0\u089e\3\2\2") + buf.write("\2\u08a0\u089f\3\2\2\2\u08a1\u0161\3\2\2\2\u08a2\u08a4") + buf.write("\7\20\2\2\u08a3\u08a5\7~\2\2\u08a4\u08a3\3\2\2\2\u08a4") + buf.write("\u08a5\3\2\2\2\u08a5\u08a7\3\2\2\2\u08a6\u08a8\7\177\2") + buf.write("\2\u08a7\u08a6\3\2\2\2\u08a7\u08a8\3\2\2\2\u08a8\u08d3") + buf.write("\3\2\2\2\u08a9\u08ab\7\20\2\2\u08aa\u08ac\7\177\2\2\u08ab") + buf.write("\u08aa\3\2\2\2\u08ab\u08ac\3\2\2\2\u08ac\u08ad\3\2\2\2") + buf.write("\u08ad\u08ae\7`\2\2\u08ae\u08d3\5\u0104\u0083\2\u08af") + buf.write("\u08b1\7G\2\2\u08b0\u08b2\7~\2\2\u08b1\u08b0\3\2\2\2\u08b1") + buf.write("\u08b2\3\2\2\2\u08b2\u08b4\3\2\2\2\u08b3\u08b5\7\177\2") + buf.write("\2\u08b4\u08b3\3\2\2\2\u08b4\u08b5\3\2\2\2\u08b5\u08d3") + buf.write("\3\2\2\2\u08b6\u08b8\7G\2\2\u08b7\u08b9\7\177\2\2\u08b8") + buf.write("\u08b7\3\2\2\2\u08b8\u08b9\3\2\2\2\u08b9\u08ba\3\2\2\2") + buf.write("\u08ba\u08bb\7`\2\2\u08bb\u08d3\5\u0104\u0083\2\u08bc") + buf.write("\u08bd\7?\2\2\u08bd\u08be\7a\2\2\u08be\u08bf\5\u015e\u00b0") + buf.write("\2\u08bf\u08c0\7b\2\2\u08c0\u08c2\7\20\2\2\u08c1\u08c3") + buf.write("\7~\2\2\u08c2\u08c1\3\2\2\2\u08c2\u08c3\3\2\2\2\u08c3") + buf.write("\u08c5\3\2\2\2\u08c4\u08c6\7\177\2\2\u08c5\u08c4\3\2\2") + buf.write("\2\u08c5\u08c6\3\2\2\2\u08c6\u08d3\3\2\2\2\u08c7\u08c8") + buf.write("\7?\2\2\u08c8\u08c9\7a\2\2\u08c9\u08ca\5\u015e\u00b0\2") + buf.write("\u08ca\u08cb\7b\2\2\u08cb\u08cd\7\20\2\2\u08cc\u08ce\7") + buf.write("\177\2\2\u08cd\u08cc\3\2\2\2\u08cd\u08ce\3\2\2\2\u08ce") + buf.write("\u08cf\3\2\2\2\u08cf\u08d0\7`\2\2\u08d0\u08d1\5\6\4\2") + buf.write("\u08d1\u08d3\3\2\2\2\u08d2\u08a2\3\2\2\2\u08d2\u08a9\3") + buf.write("\2\2\2\u08d2\u08af\3\2\2\2\u08d2\u08b6\3\2\2\2\u08d2\u08bc") + buf.write("\3\2\2\2\u08d2\u08c7\3\2\2\2\u08d3\u0163\3\2\2\2\u08d4") + buf.write("\u08d5\5\u0168\u00b5\2\u08d5\u08d7\7a\2\2\u08d6\u08d8") + buf.write("\5\u016a\u00b6\2\u08d7\u08d6\3\2\2\2\u08d7\u08d8\3\2\2") + buf.write("\2\u08d8\u08d9\3\2\2\2\u08d9\u08da\7b\2\2\u08da\u0165") + buf.write("\3\2\2\2\u08db\u08eb\5\u0164\u00b3\2\u08dc\u08dd\5\u0158") + buf.write("\u00ad\2\u08dd\u08df\7a\2\2\u08de\u08e0\5\u016a\u00b6") + buf.write("\2\u08df\u08de\3\2\2\2\u08df\u08e0\3\2\2\2\u08e0\u08e1") + buf.write("\3\2\2\2\u08e1\u08e2\7b\2\2\u08e2\u08eb\3\2\2\2\u08e3") + buf.write("\u08e4\5\u015a\u00ae\2\u08e4\u08e6\7a\2\2\u08e5\u08e7") + buf.write("\5\u016a\u00b6\2\u08e6\u08e5\3\2\2\2\u08e6\u08e7\3\2\2") + buf.write("\2\u08e7\u08e8\3\2\2\2\u08e8\u08e9\7b\2\2\u08e9\u08eb") + buf.write("\3\2\2\2\u08ea\u08db\3\2\2\2\u08ea\u08dc\3\2\2\2\u08ea") + buf.write("\u08e3\3\2\2\2\u08eb\u0167\3\2\2\2\u08ec\u08ed\7\177\2") + buf.write("\2\u08ed\u0169\3\2\2\2\u08ee\u08ef\b\u00b6\1\2\u08ef\u08f1") + buf.write("\5\u016c\u00b7\2\u08f0\u08f2\7~\2\2\u08f1\u08f0\3\2\2") + buf.write("\2\u08f1\u08f2\3\2\2\2\u08f2\u08fb\3\2\2\2\u08f3\u08f4") + buf.write("\f\3\2\2\u08f4\u08f5\7u\2\2\u08f5\u08f7\5\u016c\u00b7") + buf.write("\2\u08f6\u08f8\7~\2\2\u08f7\u08f6\3\2\2\2\u08f7\u08f8") + buf.write("\3\2\2\2\u08f8\u08fa\3\2\2\2\u08f9\u08f3\3\2\2\2\u08fa") + buf.write("\u08fd\3\2\2\2\u08fb\u08f9\3\2\2\2\u08fb\u08fc\3\2\2\2") + buf.write("\u08fc\u016b\3\2\2\2\u08fd\u08fb\3\2\2\2\u08fe\u0902\5") + buf.write("\u0104\u0083\2\u08ff\u0902\5^\60\2\u0900\u0902\5\6\4\2") + buf.write("\u0901\u08fe\3\2\2\2\u0901\u08ff\3\2\2\2\u0901\u0900\3") + buf.write("\2\2\2\u0902\u016d\3\2\2\2\u0903\u0904\7G\2\2\u0904\u0905") + buf.write("\5\f\7\2\u0905\u0906\7\177\2\2\u0906\u090f\3\2\2\2\u0907") + buf.write("\u0908\7G\2\2\u0908\u090a\5\f\7\2\u0909\u090b\7?\2\2\u090a") + buf.write("\u0909\3\2\2\2\u090a\u090b\3\2\2\2\u090b\u090c\3\2\2\2") + buf.write("\u090c\u090d\5\u0164\u00b3\2\u090d\u090f\3\2\2\2\u090e") + buf.write("\u0903\3\2\2\2\u090e\u0907\3\2\2\2\u090f\u016f\3\2\2\2") + buf.write("\u0910\u0912\7\37\2\2\u0911\u0910\3\2\2\2\u0911\u0912") + buf.write("\3\2\2\2\u0912\u0913\3\2\2\2\u0913\u0914\7?\2\2\u0914") + buf.write("\u0915\5~@\2\u0915\u0171\3\2\2\2\u0916\u0917\7?\2\2\u0917") + buf.write("\u0918\7a\2\2\u0918\u0919\7b\2\2\u0919\u091a\5~@\2\u091a") + buf.write("\u0173\3\2\2\2\u091b\u091c\7D\2\2\u091c\u091d\5h\65\2") + buf.write("\u091d\u091e\5\u0178\u00bd\2\u091e\u0175\3\2\2\2\u091f") + buf.write("\u0921\7D\2\2\u0920\u0922\5\u0150\u00a9\2\u0921\u0920") + buf.write("\3\2\2\2\u0921\u0922\3\2\2\2\u0922\u0923\3\2\2\2\u0923") + buf.write("\u0924\5h\65\2\u0924\u0925\5\u0178\u00bd\2\u0925\u0177") + buf.write("\3\2\2\2\u0926\u0928\5\u017a\u00be\2\u0927\u0929\5\u0178") + buf.write("\u00bd\2\u0928\u0927\3\2\2\2\u0928\u0929\3\2\2\2\u0929") + buf.write("\u0179\3\2\2\2\u092a\u092b\7\f\2\2\u092b\u092c\7P\2\2") + buf.write("\u092c\u092d\5\u017c\u00bf\2\u092d\u092e\7Q\2\2\u092e") + buf.write("\u092f\5h\65\2\u092f\u017b\3\2\2\2\u0930\u0932\5\u00d6") + buf.write("l\2\u0931\u0930\3\2\2\2\u0931\u0932\3\2\2\2\u0932\u0933") + buf.write("\3\2\2\2\u0933\u0934\5\u009aN\2\u0934\u0935\5\u00f0y\2") + buf.write("\u0935\u093f\3\2\2\2\u0936\u0938\5\u00d6l\2\u0937\u0936") + buf.write("\3\2\2\2\u0937\u0938\3\2\2\2\u0938\u0939\3\2\2\2\u0939") + buf.write("\u093b\5\u009aN\2\u093a\u093c\5\u0106\u0084\2\u093b\u093a") + buf.write("\3\2\2\2\u093b\u093c\3\2\2\2\u093c\u093f\3\2\2\2\u093d") + buf.write("\u093f\7~\2\2\u093e\u0931\3\2\2\2\u093e\u0937\3\2\2\2") + buf.write("\u093e\u093d\3\2\2\2\u093f\u017d\3\2\2\2\u0940\u0942\7") + buf.write("B\2\2\u0941\u0943\5X-\2\u0942\u0941\3\2\2\2\u0942\u0943") + buf.write("\3\2\2\2\u0943\u017f\3\2\2\2\u0944\u0947\5\u0182\u00c2") + buf.write("\2\u0945\u0947\5\u0186\u00c4\2\u0946\u0944\3\2\2\2\u0946") + buf.write("\u0945\3\2\2\2\u0947\u0181\3\2\2\2\u0948\u0949\7B\2\2") + buf.write("\u0949\u094b\7P\2\2\u094a\u094c\5\u0184\u00c3\2\u094b") + buf.write("\u094a\3\2\2\2\u094b\u094c\3\2\2\2\u094c\u094d\3\2\2\2") + buf.write("\u094d\u094e\7Q\2\2\u094e\u0183\3\2\2\2\u094f\u0950\b") + buf.write("\u00c3\1\2\u0950\u0952\5\u0104\u0083\2\u0951\u0953\7~") + buf.write("\2\2\u0952\u0951\3\2\2\2\u0952\u0953\3\2\2\2\u0953\u095c") + buf.write("\3\2\2\2\u0954\u0955\f\3\2\2\u0955\u0956\7u\2\2\u0956") + buf.write("\u0958\5\u0104\u0083\2\u0957\u0959\7~\2\2\u0958\u0957") + buf.write("\3\2\2\2\u0958\u0959\3\2\2\2\u0959\u095b\3\2\2\2\u095a") + buf.write("\u0954\3\2\2\2\u095b\u095e\3\2\2\2\u095c\u095a\3\2\2\2") + buf.write("\u095c\u095d\3\2\2\2\u095d\u0185\3\2\2\2\u095e\u095c\3") + buf.write("\2\2\2\u095f\u0960\7-\2\2\u0960\u0961\7P\2\2\u0961\u0962") + buf.write("\5^\60\2\u0962\u0963\7Q\2\2\u0963\u0966\3\2\2\2\u0964") + buf.write("\u0966\7-\2\2\u0965\u095f\3\2\2\2\u0965\u0964\3\2\2\2") + buf.write("\u0966\u0187\3\2\2\2\u0967\u0968\7b\2\2\u0968\u0969\7") + buf.write("b\2\2\u0969\u0189\3\2\2\2\u096a\u096b\7b\2\2\u096b\u096c") + buf.write("\7b\2\2\u096c\u096d\7`\2\2\u096d\u018b\3\2\2\2\u096e\u099f") + buf.write("\7,\2\2\u096f\u099f\7\27\2\2\u0970\u0971\7,\2\2\u0971") + buf.write("\u0972\7R\2\2\u0972\u099f\7S\2\2\u0973\u0974\7\27\2\2") + buf.write("\u0974\u0975\7R\2\2\u0975\u099f\7S\2\2\u0976\u099f\7V") + buf.write("\2\2\u0977\u099f\7W\2\2\u0978\u099f\7X\2\2\u0979\u099f") + buf.write("\7Y\2\2\u097a\u099f\7Z\2\2\u097b\u099f\7[\2\2\u097c\u099f") + buf.write("\7\\\2\2\u097d\u099f\7]\2\2\u097e\u099f\7^\2\2\u097f\u099f") + buf.write("\7_\2\2\u0980\u099f\7`\2\2\u0981\u099f\7a\2\2\u0982\u099f") + buf.write("\7b\2\2\u0983\u099f\7c\2\2\u0984\u099f\7d\2\2\u0985\u099f") + buf.write("\7e\2\2\u0986\u099f\7f\2\2\u0987\u099f\7g\2\2\u0988\u099f") + buf.write("\7h\2\2\u0989\u099f\7i\2\2\u098a\u099f\7j\2\2\u098b\u099f") + buf.write("\7k\2\2\u098c\u099f\5\u0188\u00c5\2\u098d\u099f\5\u018a") + buf.write("\u00c6\2\u098e\u099f\7l\2\2\u098f\u099f\7m\2\2\u0990\u099f") + buf.write("\7n\2\2\u0991\u099f\7o\2\2\u0992\u099f\7p\2\2\u0993\u099f") + buf.write("\7q\2\2\u0994\u099f\7r\2\2\u0995\u099f\7s\2\2\u0996\u099f") + buf.write("\7t\2\2\u0997\u099f\7u\2\2\u0998\u099f\7v\2\2\u0999\u099f") + buf.write("\7w\2\2\u099a\u099b\7P\2\2\u099b\u099f\7Q\2\2\u099c\u099d") + buf.write("\7R\2\2\u099d\u099f\7S\2\2\u099e\u096e\3\2\2\2\u099e\u096f") + buf.write("\3\2\2\2\u099e\u0970\3\2\2\2\u099e\u0973\3\2\2\2\u099e") + buf.write("\u0976\3\2\2\2\u099e\u0977\3\2\2\2\u099e\u0978\3\2\2\2") + buf.write("\u099e\u0979\3\2\2\2\u099e\u097a\3\2\2\2\u099e\u097b\3") + buf.write("\2\2\2\u099e\u097c\3\2\2\2\u099e\u097d\3\2\2\2\u099e\u097e") + buf.write("\3\2\2\2\u099e\u097f\3\2\2\2\u099e\u0980\3\2\2\2\u099e") + buf.write("\u0981\3\2\2\2\u099e\u0982\3\2\2\2\u099e\u0983\3\2\2\2") + buf.write("\u099e\u0984\3\2\2\2\u099e\u0985\3\2\2\2\u099e\u0986\3") + buf.write("\2\2\2\u099e\u0987\3\2\2\2\u099e\u0988\3\2\2\2\u099e\u0989") + buf.write("\3\2\2\2\u099e\u098a\3\2\2\2\u099e\u098b\3\2\2\2\u099e") + buf.write("\u098c\3\2\2\2\u099e\u098d\3\2\2\2\u099e\u098e\3\2\2\2") + buf.write("\u099e\u098f\3\2\2\2\u099e\u0990\3\2\2\2\u099e\u0991\3") + buf.write("\2\2\2\u099e\u0992\3\2\2\2\u099e\u0993\3\2\2\2\u099e\u0994") + buf.write("\3\2\2\2\u099e\u0995\3\2\2\2\u099e\u0996\3\2\2\2\u099e") + buf.write("\u0997\3\2\2\2\u099e\u0998\3\2\2\2\u099e\u0999\3\2\2\2") + buf.write("\u099e\u099a\3\2\2\2\u099e\u099c\3\2\2\2\u099f\u018d\3") + buf.write("\2\2\2\u09a0\u09a8\7\u0080\2\2\u09a1\u09a8\7\u0086\2\2") + buf.write("\u09a2\u09a8\7\u0087\2\2\u09a3\u09a8\7\u0088\2\2\u09a4") + buf.write("\u09a8\5\u0190\u00c9\2\u09a5\u09a8\5\u0192\u00ca\2\u09a6") + buf.write("\u09a8\5\u0194\u00cb\2\u09a7\u09a0\3\2\2\2\u09a7\u09a1") + buf.write("\3\2\2\2\u09a7\u09a2\3\2\2\2\u09a7\u09a3\3\2\2\2\u09a7") + buf.write("\u09a4\3\2\2\2\u09a7\u09a5\3\2\2\2\u09a7\u09a6\3\2\2\2") + buf.write("\u09a8\u018f\3\2\2\2\u09a9\u09aa\t\13\2\2\u09aa\u0191") + buf.write("\3\2\2\2\u09ab\u09ac\7.\2\2\u09ac\u0193\3\2\2\2\u09ad") + buf.write("\u09ae\t\f\2\2\u09ae\u0195\3\2\2\2\u013e\u0197\u01a3\u01a7") + buf.write("\u01b2\u01b6\u01c5\u01cc\u01d1\u01d3\u01d8\u01de\u01e8") + buf.write("\u01ef\u01f5\u01f9\u01fe\u0204\u020b\u0211\u0214\u0217") + buf.write("\u021a\u0221\u0228\u025c\u026b\u0271\u0277\u0284\u0286") + buf.write("\u028c\u029b\u02a1\u02b0\u02be\u02c8\u02cc\u02d0\u02d3") + buf.write("\u02d7\u02dd\u02df\u02e7\u02eb\u02ee\u02f5\u02fc\u0300") + buf.write("\u0305\u0309\u030c\u0311\u0317\u0324\u032f\u0331\u0340") + buf.write("\u0342\u034e\u0350\u035d\u035f\u0371\u0373\u037f\u0381") + buf.write("\u038c\u0397\u03a2\u03ad\u03b8\u03c2\u03ca\u03d7\u03e1") + buf.write("\u03e8\u03ec\u03f0\u03f4\u03f8\u03fd\u0400\u0403\u0408") + buf.write("\u040f\u0413\u0419\u041f\u042a\u0441\u0445\u044d\u0453") + buf.write("\u0467\u046b\u0478\u047c\u047f\u0486\u048e\u0498\u04a3") + buf.write("\u04af\u04b9\u04be\u04c5\u04c8\u04cd\u04d2\u04e7\u04eb") + buf.write("\u04f0\u04fb\u0501\u0505\u050a\u050e\u0513\u0516\u052c") + buf.write("\u0532\u053d\u0541\u0544\u054e\u0554\u0557\u055e\u0568") + buf.write("\u056c\u056f\u0572\u0576\u057b\u057d\u0581\u0585\u058e") + buf.write("\u059b\u05a3\u05a9\u05af\u05b3\u05b6\u05bf\u05c8\u05d0") + buf.write("\u05db\u05e1\u05ec\u05ef\u05f4\u0603\u0609\u0612\u061c") + buf.write("\u0622\u062a\u062e\u0632\u0637\u063c\u0643\u0645\u064a") + buf.write("\u064e\u065c\u0662\u0671\u067b\u0680\u0687\u068d\u0692") + buf.write("\u0698\u069f\u06a3\u06a5\u06a7\u06ae\u06b1\u06b4\u06b7") + buf.write("\u06bc\u06c0\u06c3\u06c7\u06cb\u06d0\u06d3\u06d5\u06d9") + buf.write("\u06e0\u06e6\u06ea\u06f0\u06f5\u06f7\u06fd\u0701\u0707") + buf.write("\u070e\u0712\u0714\u0716\u071d\u0727\u072b\u072d\u072f") + buf.write("\u0733\u0736\u073c\u0746\u074a\u0750\u0758\u075c\u075f") + buf.write("\u0763\u0768\u076b\u076e\u0772\u0777\u0781\u0788\u078d") + buf.write("\u0791\u0796\u079c\u07a0\u07a6\u07ac\u07b0\u07b5\u07bb") + buf.write("\u07bf\u07c2\u07c6\u07c9\u07cb\u07ce\u07d8\u07dd\u07df") + buf.write("\u07e2\u07e5\u07e8\u07f1\u07fb\u0800\u0803\u0807\u080a") + buf.write("\u080d\u0811\u081a\u0829\u082f\u0833\u0837\u083b\u083f") + buf.write("\u0843\u0847\u084b\u084e\u0852\u085d\u0861\u0868\u086c") + buf.write("\u0871\u0876\u087d\u0881\u088b\u089b\u08a0\u08a4\u08a7") + buf.write("\u08ab\u08b1\u08b4\u08b8\u08c2\u08c5\u08cd\u08d2\u08d7") + buf.write("\u08df\u08e6\u08ea\u08f1\u08f7\u08fb\u0901\u090a\u090e") + buf.write("\u0911\u0921\u0928\u0931\u0937\u093b\u093e\u0942\u0946") + buf.write("\u094b\u0952\u0958\u095c\u0965\u099e\u09a7") + return buf.getvalue() + + +class CPP14Parser ( Parser ): + + grammarFileName = "CPP14.g4" + + atn = ATNDeserializer().deserialize(serializedATN()) + + decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] + + sharedContextCache = PredictionContextCache() + + literalNames = [ "", "", "", "'alignas'", + "'alignof'", "'asm'", "'auto'", "'bool'", "'break'", + "'case'", "'catch'", "'char'", "'char16_t'", "'char32_t'", + "'class'", "'const'", "'constexpr'", "'const_cast'", + "'continue'", "'decltype'", "'default'", "'delete'", + "'do'", "'double'", "'dynamic_cast'", "'else'", "'enum'", + "'explicit'", "'export'", "'extern'", "'false'", "'final'", + "'float'", "'for'", "'friend'", "'goto'", "'if'", "'inline'", + "'int'", "'long'", "'mutable'", "'namespace'", "'new'", + "'noexcept'", "", "'operator'", "'override'", + "'private'", "'protected'", "'public'", "'register'", + "'reinterpret_cast'", "'return'", "'short'", "'signed'", + "'sizeof'", "'static'", "'static_assert'", "'static_cast'", + "'struct'", "'switch'", "'template'", "'this'", "'thread_local'", + "'throw'", "'true'", "'try'", "'typedef'", "'typeid'", + "'typename'", "'union'", "'unsigned'", "'using'", "'virtual'", + "'void'", "'volatile'", "'wchar_t'", "'while'", "'('", + "')'", "'['", "']'", "'{'", "'}'", "'+'", "'-'", "'*'", + "'/'", "'%'", "'^'", "'&'", "'|'", "'~'", "'!'", "'='", + "'<'", "'>'", "'+='", "'-='", "'*='", "'/='", "'%='", + "'^='", "'&='", "'|='", "'<<'", "'<<='", "'=='", "'!='", + "'<='", "'>='", "'&&'", "'||'", "'++'", "'--'", "','", + "'->*'", "'->'", "'?'", "':'", "'::'", "';'", "'.'", + "'.*'", "'...'" ] + + symbolicNames = [ "", "MultiLineMacro", "Directive", "Alignas", + "Alignof", "Asm", "Auto", "Bool", "Break", "Case", + "Catch", "Char", "Char16", "Char32", "Class", "Const", + "Constexpr", "Const_cast", "Continue", "Decltype", + "Default", "Delete", "Do", "Double", "Dynamic_cast", + "Else", "Enum", "Explicit", "Export", "Extern", "FalseToken", + "Final", "Float", "For", "Friend", "Goto", "If", "Inline", + "Int", "Long", "Mutable", "Namespace", "New", "Noexcept", + "Nullptr", "Operator", "Override", "Private", "Protected", + "Public", "Register", "Reinterpret_cast", "Return", + "Short", "Signed", "Sizeof", "Static", "Static_assert", + "Static_cast", "Struct", "Switch", "Template", "This", + "Thread_local", "Throw", "TrueToken", "Try", "Typedef", + "Typeid", "Typename", "Union", "Unsigned", "Using", + "Virtual", "Void", "Volatile", "Wchar", "While", "LeftParen", + "RightParen", "LeftBracket", "RightBracket", "LeftBrace", + "RightBrace", "Plus", "Minus", "Star", "Div", "Mod", + "Caret", "And", "Or", "Tilde", "Not", "Assign", "Less", + "Greater", "PlusAssign", "MinusAssign", "StarAssign", + "DivAssign", "ModAssign", "XorAssign", "AndAssign", + "OrAssign", "LeftShift", "LeftShiftAssign", "Equal", + "NotEqual", "LessEqual", "GreaterEqual", "AndAnd", + "OrOr", "PlusPlus", "MinusMinus", "Comma", "ArrowStar", + "Arrow", "Question", "Colon", "Doublecolon", "Semi", + "Dot", "DotStar", "Ellipsis", "Identifier", "Integerliteral", + "Decimalliteral", "Octalliteral", "Hexadecimalliteral", + "Binaryliteral", "Integersuffix", "Characterliteral", + "Floatingliteral", "Stringliteral", "Userdefinedintegerliteral", + "Userdefinedfloatingliteral", "Userdefinedstringliteral", + "Userdefinedcharacterliteral", "Whitespace", "Newline", + "BlockComment", "LineComment" ] + + RULE_translationunit = 0 + RULE_primaryexpression = 1 + RULE_idexpression = 2 + RULE_unqualifiedid = 3 + RULE_qualifiedid = 4 + RULE_nestednamespecifier = 5 + RULE_lambdaexpression = 6 + RULE_lambdaintroducer = 7 + RULE_lambdacapture = 8 + RULE_capturedefault = 9 + RULE_capturelist = 10 + RULE_capture = 11 + RULE_simplecapture = 12 + RULE_initcapture = 13 + RULE_lambdadeclarator = 14 + RULE_postfixexpression = 15 + RULE_expressionlist = 16 + RULE_pseudodestructorname = 17 + RULE_unaryexpression = 18 + RULE_sizeofExpression = 19 + RULE_alignofExpression = 20 + RULE_unaryoperator = 21 + RULE_newexpression = 22 + RULE_newplacement = 23 + RULE_newtypeid = 24 + RULE_newdeclarator = 25 + RULE_noptrnewdeclarator = 26 + RULE_newinitializer = 27 + RULE_deleteexpression = 28 + RULE_noexceptexpression = 29 + RULE_castexpression = 30 + RULE_pmexpression = 31 + RULE_multiplicativeexpression = 32 + RULE_additiveexpression = 33 + RULE_shiftexpression = 34 + RULE_relationalexpression = 35 + RULE_equalityexpression = 36 + RULE_andexpression = 37 + RULE_exclusiveorexpression = 38 + RULE_inclusiveorexpression = 39 + RULE_logicalandexpression = 40 + RULE_logicalorexpression = 41 + RULE_conditionalexpression = 42 + RULE_assignmentexpression = 43 + RULE_assignmentoperator = 44 + RULE_expression = 45 + RULE_constantexpression = 46 + RULE_statement = 47 + RULE_label = 48 + RULE_labeledstatement = 49 + RULE_expressionstatement = 50 + RULE_compoundstatement = 51 + RULE_statementseq = 52 + RULE_selectionstatement = 53 + RULE_condition = 54 + RULE_iterationstatement = 55 + RULE_forinitstatement = 56 + RULE_forrangedeclaration = 57 + RULE_forrangeinitializer = 58 + RULE_jumpstatement = 59 + RULE_declarationstatement = 60 + RULE_declarationseq = 61 + RULE_declaration = 62 + RULE_blockdeclaration = 63 + RULE_aliasdeclaration = 64 + RULE_simpledeclaration = 65 + RULE_static_assertdeclaration = 66 + RULE_emptydeclaration = 67 + RULE_attributedeclaration = 68 + RULE_declspecifier = 69 + RULE_declspecifierseq = 70 + RULE_storageclassspecifier = 71 + RULE_functionspecifier = 72 + RULE_typedefname = 73 + RULE_typespecifier = 74 + RULE_trailingtypespecifier = 75 + RULE_typespecifierseq = 76 + RULE_trailingtypespecifierseq = 77 + RULE_simpletypespecifier = 78 + RULE_thetypename = 79 + RULE_decltypespecifier = 80 + RULE_elaboratedtypespecifier = 81 + RULE_enumname = 82 + RULE_enumspecifier = 83 + RULE_enumhead = 84 + RULE_opaqueenumdeclaration = 85 + RULE_enumkey = 86 + RULE_enumbase = 87 + RULE_enumeratorlist = 88 + RULE_enumeratordefinition = 89 + RULE_enumerator = 90 + RULE_namespacename = 91 + RULE_originalnamespacename = 92 + RULE_namespacedefinition = 93 + RULE_namednamespacedefinition = 94 + RULE_originalnamespacedefinition = 95 + RULE_extensionnamespacedefinition = 96 + RULE_unnamednamespacedefinition = 97 + RULE_namespacebody = 98 + RULE_namespacealias = 99 + RULE_namespacealiasdefinition = 100 + RULE_qualifiednamespacespecifier = 101 + RULE_usingdeclaration = 102 + RULE_usingdirective = 103 + RULE_asmdefinition = 104 + RULE_linkagespecification = 105 + RULE_attributespecifierseq = 106 + RULE_attributespecifier = 107 + RULE_alignmentspecifier = 108 + RULE_attributelist = 109 + RULE_attribute = 110 + RULE_attributetoken = 111 + RULE_attributescopedtoken = 112 + RULE_attributenamespace = 113 + RULE_attributeargumentclause = 114 + RULE_balancedtokenseq = 115 + RULE_balancedtoken = 116 + RULE_initdeclaratorlist = 117 + RULE_initdeclarator = 118 + RULE_declarator = 119 + RULE_ptrdeclarator = 120 + RULE_noptrdeclarator = 121 + RULE_parametersandqualifiers = 122 + RULE_trailingreturntype = 123 + RULE_ptroperator = 124 + RULE_cvqualifierseq = 125 + RULE_cvqualifier = 126 + RULE_refqualifier = 127 + RULE_declaratorid = 128 + RULE_thetypeid = 129 + RULE_abstractdeclarator = 130 + RULE_ptrabstractdeclarator = 131 + RULE_noptrabstractdeclarator = 132 + RULE_abstractpackdeclarator = 133 + RULE_noptrabstractpackdeclarator = 134 + RULE_parameterdeclarationclause = 135 + RULE_parameterdeclarationlist = 136 + RULE_parameterdeclaration = 137 + RULE_functiondefinition = 138 + RULE_functionbody = 139 + RULE_initializer = 140 + RULE_braceorequalinitializer = 141 + RULE_initializerclause = 142 + RULE_initializerlist = 143 + RULE_bracedinitlist = 144 + RULE_classname = 145 + RULE_classspecifier = 146 + RULE_classhead = 147 + RULE_classheadname = 148 + RULE_classvirtspecifier = 149 + RULE_classkey = 150 + RULE_memberspecification = 151 + RULE_memberdeclaration = 152 + RULE_memberdeclaratorlist = 153 + RULE_memberdeclarator = 154 + RULE_virtspecifierseq = 155 + RULE_virtspecifier = 156 + RULE_purespecifier = 157 + RULE_baseclause = 158 + RULE_basespecifierlist = 159 + RULE_basespecifier = 160 + RULE_classordecltype = 161 + RULE_basetypespecifier = 162 + RULE_accessspecifier = 163 + RULE_conversionfunctionid = 164 + RULE_conversiontypeid = 165 + RULE_conversiondeclarator = 166 + RULE_ctorinitializer = 167 + RULE_meminitializerlist = 168 + RULE_meminitializer = 169 + RULE_meminitializerid = 170 + RULE_operatorfunctionid = 171 + RULE_literaloperatorid = 172 + RULE_templatedeclaration = 173 + RULE_templateparameterlist = 174 + RULE_templateparameter = 175 + RULE_typeparameter = 176 + RULE_simpletemplateid = 177 + RULE_templateid = 178 + RULE_templatename = 179 + RULE_templateargumentlist = 180 + RULE_templateargument = 181 + RULE_typenamespecifier = 182 + RULE_explicitinstantiation = 183 + RULE_explicitspecialization = 184 + RULE_tryblock = 185 + RULE_functiontryblock = 186 + RULE_handlerseq = 187 + RULE_handler = 188 + RULE_exceptiondeclaration = 189 + RULE_throwexpression = 190 + RULE_exceptionspecification = 191 + RULE_dynamicexceptionspecification = 192 + RULE_typeidlist = 193 + RULE_noexceptspecification = 194 + RULE_rightShift = 195 + RULE_rightShiftAssign = 196 + RULE_theoperator = 197 + RULE_literal = 198 + RULE_booleanliteral = 199 + RULE_pointerliteral = 200 + RULE_userdefinedliteral = 201 + + ruleNames = [ "translationunit", "primaryexpression", "idexpression", + "unqualifiedid", "qualifiedid", "nestednamespecifier", + "lambdaexpression", "lambdaintroducer", "lambdacapture", + "capturedefault", "capturelist", "capture", "simplecapture", + "initcapture", "lambdadeclarator", "postfixexpression", + "expressionlist", "pseudodestructorname", "unaryexpression", + "sizeofExpression", "alignofExpression", "unaryoperator", + "newexpression", "newplacement", "newtypeid", "newdeclarator", + "noptrnewdeclarator", "newinitializer", "deleteexpression", + "noexceptexpression", "castexpression", "pmexpression", + "multiplicativeexpression", "additiveexpression", "shiftexpression", + "relationalexpression", "equalityexpression", "andexpression", + "exclusiveorexpression", "inclusiveorexpression", "logicalandexpression", + "logicalorexpression", "conditionalexpression", "assignmentexpression", + "assignmentoperator", "expression", "constantexpression", + "statement", "label", "labeledstatement", "expressionstatement", + "compoundstatement", "statementseq", "selectionstatement", + "condition", "iterationstatement", "forinitstatement", + "forrangedeclaration", "forrangeinitializer", "jumpstatement", + "declarationstatement", "declarationseq", "declaration", + "blockdeclaration", "aliasdeclaration", "simpledeclaration", + "static_assertdeclaration", "emptydeclaration", "attributedeclaration", + "declspecifier", "declspecifierseq", "storageclassspecifier", + "functionspecifier", "typedefname", "typespecifier", + "trailingtypespecifier", "typespecifierseq", "trailingtypespecifierseq", + "simpletypespecifier", "thetypename", "decltypespecifier", + "elaboratedtypespecifier", "enumname", "enumspecifier", + "enumhead", "opaqueenumdeclaration", "enumkey", "enumbase", + "enumeratorlist", "enumeratordefinition", "enumerator", + "namespacename", "originalnamespacename", "namespacedefinition", + "namednamespacedefinition", "originalnamespacedefinition", + "extensionnamespacedefinition", "unnamednamespacedefinition", + "namespacebody", "namespacealias", "namespacealiasdefinition", + "qualifiednamespacespecifier", "usingdeclaration", "usingdirective", + "asmdefinition", "linkagespecification", "attributespecifierseq", + "attributespecifier", "alignmentspecifier", "attributelist", + "attribute", "attributetoken", "attributescopedtoken", + "attributenamespace", "attributeargumentclause", "balancedtokenseq", + "balancedtoken", "initdeclaratorlist", "initdeclarator", + "declarator", "ptrdeclarator", "noptrdeclarator", "parametersandqualifiers", + "trailingreturntype", "ptroperator", "cvqualifierseq", + "cvqualifier", "refqualifier", "declaratorid", "thetypeid", + "abstractdeclarator", "ptrabstractdeclarator", "noptrabstractdeclarator", + "abstractpackdeclarator", "noptrabstractpackdeclarator", + "parameterdeclarationclause", "parameterdeclarationlist", + "parameterdeclaration", "functiondefinition", "functionbody", + "initializer", "braceorequalinitializer", "initializerclause", + "initializerlist", "bracedinitlist", "classname", "classspecifier", + "classhead", "classheadname", "classvirtspecifier", "classkey", + "memberspecification", "memberdeclaration", "memberdeclaratorlist", + "memberdeclarator", "virtspecifierseq", "virtspecifier", + "purespecifier", "baseclause", "basespecifierlist", "basespecifier", + "classordecltype", "basetypespecifier", "accessspecifier", + "conversionfunctionid", "conversiontypeid", "conversiondeclarator", + "ctorinitializer", "meminitializerlist", "meminitializer", + "meminitializerid", "operatorfunctionid", "literaloperatorid", + "templatedeclaration", "templateparameterlist", "templateparameter", + "typeparameter", "simpletemplateid", "templateid", "templatename", + "templateargumentlist", "templateargument", "typenamespecifier", + "explicitinstantiation", "explicitspecialization", "tryblock", + "functiontryblock", "handlerseq", "handler", "exceptiondeclaration", + "throwexpression", "exceptionspecification", "dynamicexceptionspecification", + "typeidlist", "noexceptspecification", "rightShift", + "rightShiftAssign", "theoperator", "literal", "booleanliteral", + "pointerliteral", "userdefinedliteral" ] + + EOF = Token.EOF + MultiLineMacro=1 + Directive=2 + Alignas=3 + Alignof=4 + Asm=5 + Auto=6 + Bool=7 + Break=8 + Case=9 + Catch=10 + Char=11 + Char16=12 + Char32=13 + Class=14 + Const=15 + Constexpr=16 + Const_cast=17 + Continue=18 + Decltype=19 + Default=20 + Delete=21 + Do=22 + Double=23 + Dynamic_cast=24 + Else=25 + Enum=26 + Explicit=27 + Export=28 + Extern=29 + FalseToken=30 + Final=31 + Float=32 + For=33 + Friend=34 + Goto=35 + If=36 + Inline=37 + Int=38 + Long=39 + Mutable=40 + Namespace=41 + New=42 + Noexcept=43 + Nullptr=44 + Operator=45 + Override=46 + Private=47 + Protected=48 + Public=49 + Register=50 + Reinterpret_cast=51 + Return=52 + Short=53 + Signed=54 + Sizeof=55 + Static=56 + Static_assert=57 + Static_cast=58 + Struct=59 + Switch=60 + Template=61 + This=62 + Thread_local=63 + Throw=64 + TrueToken=65 + Try=66 + Typedef=67 + Typeid=68 + Typename=69 + Union=70 + Unsigned=71 + Using=72 + Virtual=73 + Void=74 + Volatile=75 + Wchar=76 + While=77 + LeftParen=78 + RightParen=79 + LeftBracket=80 + RightBracket=81 + LeftBrace=82 + RightBrace=83 + Plus=84 + Minus=85 + Star=86 + Div=87 + Mod=88 + Caret=89 + And=90 + Or=91 + Tilde=92 + Not=93 + Assign=94 + Less=95 + Greater=96 + PlusAssign=97 + MinusAssign=98 + StarAssign=99 + DivAssign=100 + ModAssign=101 + XorAssign=102 + AndAssign=103 + OrAssign=104 + LeftShift=105 + LeftShiftAssign=106 + Equal=107 + NotEqual=108 + LessEqual=109 + GreaterEqual=110 + AndAnd=111 + OrOr=112 + PlusPlus=113 + MinusMinus=114 + Comma=115 + ArrowStar=116 + Arrow=117 + Question=118 + Colon=119 + Doublecolon=120 + Semi=121 + Dot=122 + DotStar=123 + Ellipsis=124 + Identifier=125 + Integerliteral=126 + Decimalliteral=127 + Octalliteral=128 + Hexadecimalliteral=129 + Binaryliteral=130 + Integersuffix=131 + Characterliteral=132 + Floatingliteral=133 + Stringliteral=134 + Userdefinedintegerliteral=135 + Userdefinedfloatingliteral=136 + Userdefinedstringliteral=137 + Userdefinedcharacterliteral=138 + Whitespace=139 + Newline=140 + BlockComment=141 + LineComment=142 + + def __init__(self, input:TokenStream, output:TextIO = sys.stdout): + super().__init__(input, output) + self.checkVersion("4.9.2") + self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) + self._predicates = None + + + + + class TranslationunitContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def EOF(self): + return self.getToken(CPP14Parser.EOF, 0) + + def declarationseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_translationunit + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTranslationunit" ): + listener.enterTranslationunit(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTranslationunit" ): + listener.exitTranslationunit(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTranslationunit" ): + return visitor.visitTranslationunit(self) + else: + return visitor.visitChildren(self) + + + + + def translationunit(self): + + localctx = CPP14Parser.TranslationunitContext(self, self._ctx, self.state) + self.enterRule(localctx, 0, self.RULE_translationunit) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 405 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Asm) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Constexpr) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Explicit) | (1 << CPP14Parser.Extern) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Friend) | (1 << CPP14Parser.Inline) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.Namespace) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Static_assert) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.Template) | (1 << CPP14Parser.Thread_local))) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & ((1 << (CPP14Parser.Typedef - 67)) | (1 << (CPP14Parser.Typename - 67)) | (1 << (CPP14Parser.Union - 67)) | (1 << (CPP14Parser.Unsigned - 67)) | (1 << (CPP14Parser.Using - 67)) | (1 << (CPP14Parser.Virtual - 67)) | (1 << (CPP14Parser.Void - 67)) | (1 << (CPP14Parser.Volatile - 67)) | (1 << (CPP14Parser.Wchar - 67)) | (1 << (CPP14Parser.LeftParen - 67)) | (1 << (CPP14Parser.LeftBracket - 67)) | (1 << (CPP14Parser.Star - 67)) | (1 << (CPP14Parser.And - 67)) | (1 << (CPP14Parser.Tilde - 67)) | (1 << (CPP14Parser.AndAnd - 67)) | (1 << (CPP14Parser.Doublecolon - 67)) | (1 << (CPP14Parser.Semi - 67)) | (1 << (CPP14Parser.Ellipsis - 67)) | (1 << (CPP14Parser.Identifier - 67)))) != 0): + self.state = 404 + self.declarationseq(0) + + + self.state = 407 + self.match(CPP14Parser.EOF) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PrimaryexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def literal(self): + return self.getTypedRuleContext(CPP14Parser.LiteralContext,0) + + + def This(self): + return self.getToken(CPP14Parser.This, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def idexpression(self): + return self.getTypedRuleContext(CPP14Parser.IdexpressionContext,0) + + + def lambdaexpression(self): + return self.getTypedRuleContext(CPP14Parser.LambdaexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_primaryexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPrimaryexpression" ): + listener.enterPrimaryexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPrimaryexpression" ): + listener.exitPrimaryexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPrimaryexpression" ): + return visitor.visitPrimaryexpression(self) + else: + return visitor.visitChildren(self) + + + + + def primaryexpression(self): + + localctx = CPP14Parser.PrimaryexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 2, self.RULE_primaryexpression) + try: + self.state = 417 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.FalseToken, CPP14Parser.Nullptr, CPP14Parser.TrueToken, CPP14Parser.Integerliteral, CPP14Parser.Characterliteral, CPP14Parser.Floatingliteral, CPP14Parser.Stringliteral, CPP14Parser.Userdefinedintegerliteral, CPP14Parser.Userdefinedfloatingliteral, CPP14Parser.Userdefinedstringliteral, CPP14Parser.Userdefinedcharacterliteral]: + self.enterOuterAlt(localctx, 1) + self.state = 409 + self.literal() + pass + elif token in [CPP14Parser.This]: + self.enterOuterAlt(localctx, 2) + self.state = 410 + self.match(CPP14Parser.This) + pass + elif token in [CPP14Parser.LeftParen]: + self.enterOuterAlt(localctx, 3) + self.state = 411 + self.match(CPP14Parser.LeftParen) + self.state = 412 + self.expression(0) + self.state = 413 + self.match(CPP14Parser.RightParen) + pass + elif token in [CPP14Parser.Decltype, CPP14Parser.Operator, CPP14Parser.Tilde, CPP14Parser.Doublecolon, CPP14Parser.Identifier]: + self.enterOuterAlt(localctx, 4) + self.state = 415 + self.idexpression() + pass + elif token in [CPP14Parser.LeftBracket]: + self.enterOuterAlt(localctx, 5) + self.state = 416 + self.lambdaexpression() + 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 IdexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def unqualifiedid(self): + return self.getTypedRuleContext(CPP14Parser.UnqualifiedidContext,0) + + + def qualifiedid(self): + return self.getTypedRuleContext(CPP14Parser.QualifiedidContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_idexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterIdexpression" ): + listener.enterIdexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitIdexpression" ): + listener.exitIdexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitIdexpression" ): + return visitor.visitIdexpression(self) + else: + return visitor.visitChildren(self) + + + + + def idexpression(self): + + localctx = CPP14Parser.IdexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 4, self.RULE_idexpression) + try: + self.state = 421 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,2,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 419 + self.unqualifiedid() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 420 + self.qualifiedid() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class UnqualifiedidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def operatorfunctionid(self): + return self.getTypedRuleContext(CPP14Parser.OperatorfunctionidContext,0) + + + def conversionfunctionid(self): + return self.getTypedRuleContext(CPP14Parser.ConversionfunctionidContext,0) + + + def literaloperatorid(self): + return self.getTypedRuleContext(CPP14Parser.LiteraloperatoridContext,0) + + + def Tilde(self): + return self.getToken(CPP14Parser.Tilde, 0) + + def classname(self): + return self.getTypedRuleContext(CPP14Parser.ClassnameContext,0) + + + def decltypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.DecltypespecifierContext,0) + + + def templateid(self): + return self.getTypedRuleContext(CPP14Parser.TemplateidContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_unqualifiedid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterUnqualifiedid" ): + listener.enterUnqualifiedid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitUnqualifiedid" ): + listener.exitUnqualifiedid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitUnqualifiedid" ): + return visitor.visitUnqualifiedid(self) + else: + return visitor.visitChildren(self) + + + + + def unqualifiedid(self): + + localctx = CPP14Parser.UnqualifiedidContext(self, self._ctx, self.state) + self.enterRule(localctx, 6, self.RULE_unqualifiedid) + try: + self.state = 432 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,3,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 423 + self.match(CPP14Parser.Identifier) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 424 + self.operatorfunctionid() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 425 + self.conversionfunctionid() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 426 + self.literaloperatorid() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 427 + self.match(CPP14Parser.Tilde) + self.state = 428 + self.classname() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 429 + self.match(CPP14Parser.Tilde) + self.state = 430 + self.decltypespecifier() + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 431 + self.templateid() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class QualifiedidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def unqualifiedid(self): + return self.getTypedRuleContext(CPP14Parser.UnqualifiedidContext,0) + + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_qualifiedid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterQualifiedid" ): + listener.enterQualifiedid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitQualifiedid" ): + listener.exitQualifiedid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitQualifiedid" ): + return visitor.visitQualifiedid(self) + else: + return visitor.visitChildren(self) + + + + + def qualifiedid(self): + + localctx = CPP14Parser.QualifiedidContext(self, self._ctx, self.state) + self.enterRule(localctx, 8, self.RULE_qualifiedid) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 434 + self.nestednamespecifier(0) + self.state = 436 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Template: + self.state = 435 + self.match(CPP14Parser.Template) + + + self.state = 438 + self.unqualifiedid() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NestednamespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_nestednamespecifier + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + class NormalGlobalIdentifierContext(NestednamespecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NestednamespecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNormalGlobalIdentifier" ): + listener.enterNormalGlobalIdentifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNormalGlobalIdentifier" ): + listener.exitNormalGlobalIdentifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNormalGlobalIdentifier" ): + return visitor.visitNormalGlobalIdentifier(self) + else: + return visitor.visitChildren(self) + + + class ClassIdentifierContext(NestednamespecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NestednamespecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def thetypename(self): + return self.getTypedRuleContext(CPP14Parser.ThetypenameContext,0) + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassIdentifier" ): + listener.enterClassIdentifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassIdentifier" ): + listener.exitClassIdentifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClassIdentifier" ): + return visitor.visitClassIdentifier(self) + else: + return visitor.visitChildren(self) + + + class NestedIdentifierContext(NestednamespecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NestednamespecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNestedIdentifier" ): + listener.enterNestedIdentifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNestedIdentifier" ): + listener.exitNestedIdentifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNestedIdentifier" ): + return visitor.visitNestedIdentifier(self) + else: + return visitor.visitChildren(self) + + + class NamespaceIdentifierContext(NestednamespecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NestednamespecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def namespacename(self): + return self.getTypedRuleContext(CPP14Parser.NamespacenameContext,0) + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNamespaceIdentifier" ): + listener.enterNamespaceIdentifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNamespaceIdentifier" ): + listener.exitNamespaceIdentifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNamespaceIdentifier" ): + return visitor.visitNamespaceIdentifier(self) + else: + return visitor.visitChildren(self) + + + class NestedTemplateIdentifierContext(NestednamespecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NestednamespecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + def simpletemplateid(self): + return self.getTypedRuleContext(CPP14Parser.SimpletemplateidContext,0) + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNestedTemplateIdentifier" ): + listener.enterNestedTemplateIdentifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNestedTemplateIdentifier" ): + listener.exitNestedTemplateIdentifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNestedTemplateIdentifier" ): + return visitor.visitNestedTemplateIdentifier(self) + else: + return visitor.visitChildren(self) + + + class DecltypeIdentifierContext(NestednamespecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NestednamespecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def decltypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.DecltypespecifierContext,0) + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDecltypeIdentifier" ): + listener.enterDecltypeIdentifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDecltypeIdentifier" ): + listener.exitDecltypeIdentifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDecltypeIdentifier" ): + return visitor.visitDecltypeIdentifier(self) + else: + return visitor.visitChildren(self) + + + + def nestednamespecifier(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.NestednamespecifierContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 10 + self.enterRecursionRule(localctx, 10, self.RULE_nestednamespecifier, _p) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 451 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,5,self._ctx) + if la_ == 1: + localctx = CPP14Parser.NormalGlobalIdentifierContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + + self.state = 441 + self.match(CPP14Parser.Doublecolon) + pass + + elif la_ == 2: + localctx = CPP14Parser.ClassIdentifierContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 442 + self.thetypename() + self.state = 443 + self.match(CPP14Parser.Doublecolon) + pass + + elif la_ == 3: + localctx = CPP14Parser.NamespaceIdentifierContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 445 + self.namespacename() + self.state = 446 + self.match(CPP14Parser.Doublecolon) + pass + + elif la_ == 4: + localctx = CPP14Parser.DecltypeIdentifierContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 448 + self.decltypespecifier() + self.state = 449 + self.match(CPP14Parser.Doublecolon) + pass + + + self._ctx.stop = self._input.LT(-1) + self.state = 465 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,8,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 463 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,7,self._ctx) + if la_ == 1: + localctx = CPP14Parser.NestedIdentifierContext(self, CPP14Parser.NestednamespecifierContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_nestednamespecifier) + self.state = 453 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 454 + self.match(CPP14Parser.Identifier) + self.state = 455 + self.match(CPP14Parser.Doublecolon) + pass + + elif la_ == 2: + localctx = CPP14Parser.NestedTemplateIdentifierContext(self, CPP14Parser.NestednamespecifierContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_nestednamespecifier) + self.state = 456 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 458 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Template: + self.state = 457 + self.match(CPP14Parser.Template) + + + self.state = 460 + self.simpletemplateid() + self.state = 461 + self.match(CPP14Parser.Doublecolon) + pass + + + self.state = 467 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,8,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class LambdaexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def lambdaintroducer(self): + return self.getTypedRuleContext(CPP14Parser.LambdaintroducerContext,0) + + + def compoundstatement(self): + return self.getTypedRuleContext(CPP14Parser.CompoundstatementContext,0) + + + def lambdadeclarator(self): + return self.getTypedRuleContext(CPP14Parser.LambdadeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_lambdaexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdaexpression" ): + listener.enterLambdaexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdaexpression" ): + listener.exitLambdaexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLambdaexpression" ): + return visitor.visitLambdaexpression(self) + else: + return visitor.visitChildren(self) + + + + + def lambdaexpression(self): + + localctx = CPP14Parser.LambdaexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 12, self.RULE_lambdaexpression) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 468 + self.lambdaintroducer() + self.state = 470 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.LeftParen: + self.state = 469 + self.lambdadeclarator() + + + self.state = 472 + self.compoundstatement() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LambdaintroducerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + + def lambdacapture(self): + return self.getTypedRuleContext(CPP14Parser.LambdacaptureContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_lambdaintroducer + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdaintroducer" ): + listener.enterLambdaintroducer(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdaintroducer" ): + listener.exitLambdaintroducer(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLambdaintroducer" ): + return visitor.visitLambdaintroducer(self) + else: + return visitor.visitChildren(self) + + + + + def lambdaintroducer(self): + + localctx = CPP14Parser.LambdaintroducerContext(self, self._ctx, self.state) + self.enterRule(localctx, 14, self.RULE_lambdaintroducer) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 474 + self.match(CPP14Parser.LeftBracket) + self.state = 476 + self._errHandler.sync(self) + _la = self._input.LA(1) + if ((((_la - 62)) & ~0x3f) == 0 and ((1 << (_la - 62)) & ((1 << (CPP14Parser.This - 62)) | (1 << (CPP14Parser.And - 62)) | (1 << (CPP14Parser.Assign - 62)) | (1 << (CPP14Parser.Identifier - 62)))) != 0): + self.state = 475 + self.lambdacapture() + + + self.state = 478 + self.match(CPP14Parser.RightBracket) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LambdacaptureContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def capturedefault(self): + return self.getTypedRuleContext(CPP14Parser.CapturedefaultContext,0) + + + def capturelist(self): + return self.getTypedRuleContext(CPP14Parser.CapturelistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_lambdacapture + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdacapture" ): + listener.enterLambdacapture(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdacapture" ): + listener.exitLambdacapture(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLambdacapture" ): + return visitor.visitLambdacapture(self) + else: + return visitor.visitChildren(self) + + + + + def lambdacapture(self): + + localctx = CPP14Parser.LambdacaptureContext(self, self._ctx, self.state) + self.enterRule(localctx, 16, self.RULE_lambdacapture) + try: + self.state = 486 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,11,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 480 + self.capturedefault() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 481 + self.capturelist(0) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 482 + self.capturedefault() + self.state = 483 + self.match(CPP14Parser.Comma) + self.state = 484 + self.capturelist(0) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CapturedefaultContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def And(self): + return self.getToken(CPP14Parser.And, 0) + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_capturedefault + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCapturedefault" ): + listener.enterCapturedefault(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCapturedefault" ): + listener.exitCapturedefault(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCapturedefault" ): + return visitor.visitCapturedefault(self) + else: + return visitor.visitChildren(self) + + + + + def capturedefault(self): + + localctx = CPP14Parser.CapturedefaultContext(self, self._ctx, self.state) + self.enterRule(localctx, 18, self.RULE_capturedefault) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 488 + _la = self._input.LA(1) + if not(_la==CPP14Parser.And or _la==CPP14Parser.Assign): + 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 CapturelistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def capture(self): + return self.getTypedRuleContext(CPP14Parser.CaptureContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def capturelist(self): + return self.getTypedRuleContext(CPP14Parser.CapturelistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_capturelist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCapturelist" ): + listener.enterCapturelist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCapturelist" ): + listener.exitCapturelist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCapturelist" ): + return visitor.visitCapturelist(self) + else: + return visitor.visitChildren(self) + + + + def capturelist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.CapturelistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 20 + self.enterRecursionRule(localctx, 20, self.RULE_capturelist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 491 + self.capture() + self.state = 493 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,12,self._ctx) + if la_ == 1: + self.state = 492 + self.match(CPP14Parser.Ellipsis) + + + self._ctx.stop = self._input.LT(-1) + self.state = 503 + 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: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.CapturelistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_capturelist) + self.state = 495 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 496 + self.match(CPP14Parser.Comma) + self.state = 497 + self.capture() + self.state = 499 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,13,self._ctx) + if la_ == 1: + self.state = 498 + self.match(CPP14Parser.Ellipsis) + + + self.state = 505 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,14,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class CaptureContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def simplecapture(self): + return self.getTypedRuleContext(CPP14Parser.SimplecaptureContext,0) + + + def initcapture(self): + return self.getTypedRuleContext(CPP14Parser.InitcaptureContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_capture + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCapture" ): + listener.enterCapture(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCapture" ): + listener.exitCapture(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCapture" ): + return visitor.visitCapture(self) + else: + return visitor.visitChildren(self) + + + + + def capture(self): + + localctx = CPP14Parser.CaptureContext(self, self._ctx, self.state) + self.enterRule(localctx, 22, self.RULE_capture) + try: + self.state = 508 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,15,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 506 + self.simplecapture() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 507 + self.initcapture() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SimplecaptureContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def And(self): + return self.getToken(CPP14Parser.And, 0) + + def This(self): + return self.getToken(CPP14Parser.This, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_simplecapture + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSimplecapture" ): + listener.enterSimplecapture(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSimplecapture" ): + listener.exitSimplecapture(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSimplecapture" ): + return visitor.visitSimplecapture(self) + else: + return visitor.visitChildren(self) + + + + + def simplecapture(self): + + localctx = CPP14Parser.SimplecaptureContext(self, self._ctx, self.state) + self.enterRule(localctx, 24, self.RULE_simplecapture) + try: + self.state = 514 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Identifier]: + self.enterOuterAlt(localctx, 1) + self.state = 510 + self.match(CPP14Parser.Identifier) + pass + elif token in [CPP14Parser.And]: + self.enterOuterAlt(localctx, 2) + self.state = 511 + self.match(CPP14Parser.And) + self.state = 512 + self.match(CPP14Parser.Identifier) + pass + elif token in [CPP14Parser.This]: + self.enterOuterAlt(localctx, 3) + self.state = 513 + self.match(CPP14Parser.This) + 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 InitcaptureContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def initializer(self): + return self.getTypedRuleContext(CPP14Parser.InitializerContext,0) + + + def And(self): + return self.getToken(CPP14Parser.And, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_initcapture + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInitcapture" ): + listener.enterInitcapture(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInitcapture" ): + listener.exitInitcapture(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitInitcapture" ): + return visitor.visitInitcapture(self) + else: + return visitor.visitChildren(self) + + + + + def initcapture(self): + + localctx = CPP14Parser.InitcaptureContext(self, self._ctx, self.state) + self.enterRule(localctx, 26, self.RULE_initcapture) + try: + self.state = 521 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Identifier]: + self.enterOuterAlt(localctx, 1) + self.state = 516 + self.match(CPP14Parser.Identifier) + self.state = 517 + self.initializer() + pass + elif token in [CPP14Parser.And]: + self.enterOuterAlt(localctx, 2) + self.state = 518 + self.match(CPP14Parser.And) + self.state = 519 + self.match(CPP14Parser.Identifier) + self.state = 520 + self.initializer() + 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 LambdadeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def parameterdeclarationclause(self): + return self.getTypedRuleContext(CPP14Parser.ParameterdeclarationclauseContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def Mutable(self): + return self.getToken(CPP14Parser.Mutable, 0) + + def exceptionspecification(self): + return self.getTypedRuleContext(CPP14Parser.ExceptionspecificationContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def trailingreturntype(self): + return self.getTypedRuleContext(CPP14Parser.TrailingreturntypeContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_lambdadeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLambdadeclarator" ): + listener.enterLambdadeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLambdadeclarator" ): + listener.exitLambdadeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLambdadeclarator" ): + return visitor.visitLambdadeclarator(self) + else: + return visitor.visitChildren(self) + + + + + def lambdadeclarator(self): + + localctx = CPP14Parser.LambdadeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 28, self.RULE_lambdadeclarator) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 523 + self.match(CPP14Parser.LeftParen) + self.state = 524 + self.parameterdeclarationclause() + self.state = 525 + self.match(CPP14Parser.RightParen) + self.state = 527 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Mutable: + self.state = 526 + self.match(CPP14Parser.Mutable) + + + self.state = 530 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Noexcept or _la==CPP14Parser.Throw: + self.state = 529 + self.exceptionspecification() + + + self.state = 533 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 532 + self.attributespecifierseq(0) + + + self.state = 536 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Arrow: + self.state = 535 + self.trailingreturntype() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PostfixexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_postfixexpression + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + class MemberAccessContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def postfixexpression(self): + return self.getTypedRuleContext(CPP14Parser.PostfixexpressionContext,0) + + def Dot(self): + return self.getToken(CPP14Parser.Dot, 0) + def idexpression(self): + return self.getTypedRuleContext(CPP14Parser.IdexpressionContext,0) + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + def pseudodestructorname(self): + return self.getTypedRuleContext(CPP14Parser.PseudodestructornameContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberAccess" ): + listener.enterMemberAccess(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberAccess" ): + listener.exitMemberAccess(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberAccess" ): + return visitor.visitMemberAccess(self) + else: + return visitor.visitChildren(self) + + + class PostTypeCastExpressionContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def typenamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.TypenamespecifierContext,0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def expressionlist(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionlistContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPostTypeCastExpression" ): + listener.enterPostTypeCastExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPostTypeCastExpression" ): + listener.exitPostTypeCastExpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPostTypeCastExpression" ): + return visitor.visitPostTypeCastExpression(self) + else: + return visitor.visitChildren(self) + + + class IncDecOpContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def postfixexpression(self): + return self.getTypedRuleContext(CPP14Parser.PostfixexpressionContext,0) + + def PlusPlus(self): + return self.getToken(CPP14Parser.PlusPlus, 0) + def MinusMinus(self): + return self.getToken(CPP14Parser.MinusMinus, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterIncDecOp" ): + listener.enterIncDecOp(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitIncDecOp" ): + listener.exitIncDecOp(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitIncDecOp" ): + return visitor.visitIncDecOp(self) + else: + return visitor.visitChildren(self) + + + class TypeidExpressionContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def Typeid(self): + return self.getToken(CPP14Parser.Typeid, 0) + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeidExpression" ): + listener.enterTypeidExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeidExpression" ): + listener.exitTypeidExpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTypeidExpression" ): + return visitor.visitTypeidExpression(self) + else: + return visitor.visitChildren(self) + + + class FunctionCallContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def postfixexpression(self): + return self.getTypedRuleContext(CPP14Parser.PostfixexpressionContext,0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def expressionlist(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionlistContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFunctionCall" ): + listener.enterFunctionCall(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFunctionCall" ): + listener.exitFunctionCall(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunctionCall" ): + return visitor.visitFunctionCall(self) + else: + return visitor.visitChildren(self) + + + class PostSimpleCastExpressionContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def simpletypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.SimpletypespecifierContext,0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def expressionlist(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionlistContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPostSimpleCastExpression" ): + listener.enterPostSimpleCastExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPostSimpleCastExpression" ): + listener.exitPostSimpleCastExpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPostSimpleCastExpression" ): + return visitor.visitPostSimpleCastExpression(self) + else: + return visitor.visitChildren(self) + + + class CppCastExpressionContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def Dynamic_cast(self): + return self.getToken(CPP14Parser.Dynamic_cast, 0) + def Less(self): + return self.getToken(CPP14Parser.Less, 0) + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + def Greater(self): + return self.getToken(CPP14Parser.Greater, 0) + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def Static_cast(self): + return self.getToken(CPP14Parser.Static_cast, 0) + def Reinterpret_cast(self): + return self.getToken(CPP14Parser.Reinterpret_cast, 0) + def Const_cast(self): + return self.getToken(CPP14Parser.Const_cast, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCppCastExpression" ): + listener.enterCppCastExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCppCastExpression" ): + listener.exitCppCastExpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCppCastExpression" ): + return visitor.visitCppCastExpression(self) + else: + return visitor.visitChildren(self) + + + class ArrayIndexingContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def postfixexpression(self): + return self.getTypedRuleContext(CPP14Parser.PostfixexpressionContext,0) + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterArrayIndexing" ): + listener.enterArrayIndexing(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitArrayIndexing" ): + listener.exitArrayIndexing(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitArrayIndexing" ): + return visitor.visitArrayIndexing(self) + else: + return visitor.visitChildren(self) + + + class PtrMemberAccessContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def postfixexpression(self): + return self.getTypedRuleContext(CPP14Parser.PostfixexpressionContext,0) + + def Arrow(self): + return self.getToken(CPP14Parser.Arrow, 0) + def idexpression(self): + return self.getTypedRuleContext(CPP14Parser.IdexpressionContext,0) + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + def pseudodestructorname(self): + return self.getTypedRuleContext(CPP14Parser.PseudodestructornameContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPtrMemberAccess" ): + listener.enterPtrMemberAccess(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPtrMemberAccess" ): + listener.exitPtrMemberAccess(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPtrMemberAccess" ): + return visitor.visitPtrMemberAccess(self) + else: + return visitor.visitChildren(self) + + + class PostfixIgnoreContext(PostfixexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PostfixexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def primaryexpression(self): + return self.getTypedRuleContext(CPP14Parser.PrimaryexpressionContext,0) + + def simpletypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.SimpletypespecifierContext,0) + + def bracedinitlist(self): + return self.getTypedRuleContext(CPP14Parser.BracedinitlistContext,0) + + def typenamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.TypenamespecifierContext,0) + + def postfixexpression(self): + return self.getTypedRuleContext(CPP14Parser.PostfixexpressionContext,0) + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPostfixIgnore" ): + listener.enterPostfixIgnore(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPostfixIgnore" ): + listener.exitPostfixIgnore(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPostfixIgnore" ): + return visitor.visitPostfixIgnore(self) + else: + return visitor.visitChildren(self) + + + + def postfixexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.PostfixexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 30 + self.enterRecursionRule(localctx, 30, self.RULE_postfixexpression, _p) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 602 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,24,self._ctx) + if la_ == 1: + localctx = CPP14Parser.PostfixIgnoreContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + + self.state = 539 + self.primaryexpression() + pass + + elif la_ == 2: + localctx = CPP14Parser.PostSimpleCastExpressionContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 540 + self.simpletypespecifier() + self.state = 541 + self.match(CPP14Parser.LeftParen) + self.state = 543 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.LeftBrace - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 542 + self.expressionlist() + + + self.state = 545 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 3: + localctx = CPP14Parser.PostTypeCastExpressionContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 547 + self.typenamespecifier() + self.state = 548 + self.match(CPP14Parser.LeftParen) + self.state = 550 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.LeftBrace - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 549 + self.expressionlist() + + + self.state = 552 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 4: + localctx = CPP14Parser.PostfixIgnoreContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 554 + self.simpletypespecifier() + self.state = 555 + self.bracedinitlist() + pass + + elif la_ == 5: + localctx = CPP14Parser.PostfixIgnoreContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 557 + self.typenamespecifier() + self.state = 558 + self.bracedinitlist() + pass + + elif la_ == 6: + localctx = CPP14Parser.CppCastExpressionContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 560 + self.match(CPP14Parser.Dynamic_cast) + self.state = 561 + self.match(CPP14Parser.Less) + self.state = 562 + self.thetypeid() + self.state = 563 + self.match(CPP14Parser.Greater) + self.state = 564 + self.match(CPP14Parser.LeftParen) + self.state = 565 + self.expression(0) + self.state = 566 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 7: + localctx = CPP14Parser.CppCastExpressionContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 568 + self.match(CPP14Parser.Static_cast) + self.state = 569 + self.match(CPP14Parser.Less) + self.state = 570 + self.thetypeid() + self.state = 571 + self.match(CPP14Parser.Greater) + self.state = 572 + self.match(CPP14Parser.LeftParen) + self.state = 573 + self.expression(0) + self.state = 574 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 8: + localctx = CPP14Parser.CppCastExpressionContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 576 + self.match(CPP14Parser.Reinterpret_cast) + self.state = 577 + self.match(CPP14Parser.Less) + self.state = 578 + self.thetypeid() + self.state = 579 + self.match(CPP14Parser.Greater) + self.state = 580 + self.match(CPP14Parser.LeftParen) + self.state = 581 + self.expression(0) + self.state = 582 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 9: + localctx = CPP14Parser.CppCastExpressionContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 584 + self.match(CPP14Parser.Const_cast) + self.state = 585 + self.match(CPP14Parser.Less) + self.state = 586 + self.thetypeid() + self.state = 587 + self.match(CPP14Parser.Greater) + self.state = 588 + self.match(CPP14Parser.LeftParen) + self.state = 589 + self.expression(0) + self.state = 590 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 10: + localctx = CPP14Parser.TypeidExpressionContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 592 + self.match(CPP14Parser.Typeid) + self.state = 593 + self.match(CPP14Parser.LeftParen) + self.state = 594 + self.expression(0) + self.state = 595 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 11: + localctx = CPP14Parser.TypeidExpressionContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 597 + self.match(CPP14Parser.Typeid) + self.state = 598 + self.match(CPP14Parser.LeftParen) + self.state = 599 + self.thetypeid() + self.state = 600 + self.match(CPP14Parser.RightParen) + pass + + + self._ctx.stop = self._input.LT(-1) + self.state = 644 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,29,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 642 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,28,self._ctx) + if la_ == 1: + localctx = CPP14Parser.ArrayIndexingContext(self, CPP14Parser.PostfixexpressionContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_postfixexpression) + self.state = 604 + if not self.precpred(self._ctx, 19): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 19)") + self.state = 605 + self.match(CPP14Parser.LeftBracket) + self.state = 606 + self.expression(0) + self.state = 607 + self.match(CPP14Parser.RightBracket) + pass + + elif la_ == 2: + localctx = CPP14Parser.PostfixIgnoreContext(self, CPP14Parser.PostfixexpressionContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_postfixexpression) + self.state = 609 + if not self.precpred(self._ctx, 18): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 18)") + self.state = 610 + self.match(CPP14Parser.LeftBracket) + self.state = 611 + self.bracedinitlist() + self.state = 612 + self.match(CPP14Parser.RightBracket) + pass + + elif la_ == 3: + localctx = CPP14Parser.FunctionCallContext(self, CPP14Parser.PostfixexpressionContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_postfixexpression) + self.state = 614 + if not self.precpred(self._ctx, 17): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 17)") + self.state = 615 + self.match(CPP14Parser.LeftParen) + self.state = 617 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.LeftBrace - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 616 + self.expressionlist() + + + self.state = 619 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 4: + localctx = CPP14Parser.MemberAccessContext(self, CPP14Parser.PostfixexpressionContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_postfixexpression) + self.state = 620 + if not self.precpred(self._ctx, 12): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 12)") + self.state = 621 + self.match(CPP14Parser.Dot) + self.state = 623 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Template: + self.state = 622 + self.match(CPP14Parser.Template) + + + self.state = 625 + self.idexpression() + pass + + elif la_ == 5: + localctx = CPP14Parser.PtrMemberAccessContext(self, CPP14Parser.PostfixexpressionContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_postfixexpression) + self.state = 626 + if not self.precpred(self._ctx, 11): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 11)") + self.state = 627 + self.match(CPP14Parser.Arrow) + self.state = 629 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Template: + self.state = 628 + self.match(CPP14Parser.Template) + + + self.state = 631 + self.idexpression() + pass + + elif la_ == 6: + localctx = CPP14Parser.MemberAccessContext(self, CPP14Parser.PostfixexpressionContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_postfixexpression) + self.state = 632 + if not self.precpred(self._ctx, 10): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 10)") + self.state = 633 + self.match(CPP14Parser.Dot) + self.state = 634 + self.pseudodestructorname() + pass + + elif la_ == 7: + localctx = CPP14Parser.PtrMemberAccessContext(self, CPP14Parser.PostfixexpressionContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_postfixexpression) + self.state = 635 + if not self.precpred(self._ctx, 9): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 9)") + self.state = 636 + self.match(CPP14Parser.Arrow) + self.state = 637 + self.pseudodestructorname() + pass + + elif la_ == 8: + localctx = CPP14Parser.IncDecOpContext(self, CPP14Parser.PostfixexpressionContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_postfixexpression) + self.state = 638 + if not self.precpred(self._ctx, 8): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 8)") + self.state = 639 + self.match(CPP14Parser.PlusPlus) + pass + + elif la_ == 9: + localctx = CPP14Parser.IncDecOpContext(self, CPP14Parser.PostfixexpressionContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_postfixexpression) + self.state = 640 + if not self.precpred(self._ctx, 7): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 7)") + self.state = 641 + self.match(CPP14Parser.MinusMinus) + pass + + + self.state = 646 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,29,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class ExpressionlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def initializerlist(self): + return self.getTypedRuleContext(CPP14Parser.InitializerlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_expressionlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpressionlist" ): + listener.enterExpressionlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpressionlist" ): + listener.exitExpressionlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExpressionlist" ): + return visitor.visitExpressionlist(self) + else: + return visitor.visitChildren(self) + + + + + def expressionlist(self): + + localctx = CPP14Parser.ExpressionlistContext(self, self._ctx, self.state) + self.enterRule(localctx, 32, self.RULE_expressionlist) + try: + self.enterOuterAlt(localctx, 1) + self.state = 647 + self.initializerlist(0) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PseudodestructornameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def thetypename(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(CPP14Parser.ThetypenameContext) + else: + return self.getTypedRuleContext(CPP14Parser.ThetypenameContext,i) + + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def Tilde(self): + return self.getToken(CPP14Parser.Tilde, 0) + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def simpletemplateid(self): + return self.getTypedRuleContext(CPP14Parser.SimpletemplateidContext,0) + + + def decltypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.DecltypespecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_pseudodestructorname + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPseudodestructorname" ): + listener.enterPseudodestructorname(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPseudodestructorname" ): + listener.exitPseudodestructorname(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPseudodestructorname" ): + return visitor.visitPseudodestructorname(self) + else: + return visitor.visitChildren(self) + + + + + def pseudodestructorname(self): + + localctx = CPP14Parser.PseudodestructornameContext(self, self._ctx, self.state) + self.enterRule(localctx, 34, self.RULE_pseudodestructorname) + self._la = 0 # Token type + try: + self.state = 671 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,32,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 650 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,30,self._ctx) + if la_ == 1: + self.state = 649 + self.nestednamespecifier(0) + + + self.state = 652 + self.thetypename() + self.state = 653 + self.match(CPP14Parser.Doublecolon) + self.state = 654 + self.match(CPP14Parser.Tilde) + self.state = 655 + self.thetypename() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 657 + self.nestednamespecifier(0) + self.state = 658 + self.match(CPP14Parser.Template) + self.state = 659 + self.simpletemplateid() + self.state = 660 + self.match(CPP14Parser.Doublecolon) + self.state = 661 + self.match(CPP14Parser.Tilde) + self.state = 662 + self.thetypename() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 665 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Decltype or _la==CPP14Parser.Doublecolon or _la==CPP14Parser.Identifier: + self.state = 664 + self.nestednamespecifier(0) + + + self.state = 667 + self.match(CPP14Parser.Tilde) + self.state = 668 + self.thetypename() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 669 + self.match(CPP14Parser.Tilde) + self.state = 670 + self.decltypespecifier() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class UnaryexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def postfixexpression(self): + return self.getTypedRuleContext(CPP14Parser.PostfixexpressionContext,0) + + + def PlusPlus(self): + return self.getToken(CPP14Parser.PlusPlus, 0) + + def castexpression(self): + return self.getTypedRuleContext(CPP14Parser.CastexpressionContext,0) + + + def MinusMinus(self): + return self.getToken(CPP14Parser.MinusMinus, 0) + + def unaryoperator(self): + return self.getTypedRuleContext(CPP14Parser.UnaryoperatorContext,0) + + + def sizeofExpression(self): + return self.getTypedRuleContext(CPP14Parser.SizeofExpressionContext,0) + + + def alignofExpression(self): + return self.getTypedRuleContext(CPP14Parser.AlignofExpressionContext,0) + + + def noexceptexpression(self): + return self.getTypedRuleContext(CPP14Parser.NoexceptexpressionContext,0) + + + def newexpression(self): + return self.getTypedRuleContext(CPP14Parser.NewexpressionContext,0) + + + def deleteexpression(self): + return self.getTypedRuleContext(CPP14Parser.DeleteexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_unaryexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterUnaryexpression" ): + listener.enterUnaryexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitUnaryexpression" ): + listener.exitUnaryexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitUnaryexpression" ): + return visitor.visitUnaryexpression(self) + else: + return visitor.visitChildren(self) + + + + + def unaryexpression(self): + + localctx = CPP14Parser.UnaryexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 36, self.RULE_unaryexpression) + try: + self.state = 686 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,33,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 673 + self.postfixexpression(0) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 674 + self.match(CPP14Parser.PlusPlus) + self.state = 675 + self.castexpression() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 676 + self.match(CPP14Parser.MinusMinus) + self.state = 677 + self.castexpression() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 678 + self.unaryoperator() + self.state = 679 + self.castexpression() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 681 + self.sizeofExpression() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 682 + self.alignofExpression() + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 683 + self.noexceptexpression() + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 684 + self.newexpression() + pass + + elif la_ == 9: + self.enterOuterAlt(localctx, 9) + self.state = 685 + self.deleteexpression() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SizeofExpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Sizeof(self): + return self.getToken(CPP14Parser.Sizeof, 0) + + def unaryexpression(self): + return self.getTypedRuleContext(CPP14Parser.UnaryexpressionContext,0) + + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_sizeofExpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSizeofExpression" ): + listener.enterSizeofExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSizeofExpression" ): + listener.exitSizeofExpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSizeofExpression" ): + return visitor.visitSizeofExpression(self) + else: + return visitor.visitChildren(self) + + + + + def sizeofExpression(self): + + localctx = CPP14Parser.SizeofExpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 38, self.RULE_sizeofExpression) + try: + self.state = 700 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,34,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 688 + self.match(CPP14Parser.Sizeof) + self.state = 689 + self.unaryexpression() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 690 + self.match(CPP14Parser.Sizeof) + self.state = 691 + self.match(CPP14Parser.LeftParen) + self.state = 692 + self.thetypeid() + self.state = 693 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 695 + self.match(CPP14Parser.Sizeof) + self.state = 696 + self.match(CPP14Parser.Ellipsis) + self.state = 697 + self.match(CPP14Parser.LeftParen) + self.state = 698 + self.match(CPP14Parser.Identifier) + self.state = 699 + self.match(CPP14Parser.RightParen) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AlignofExpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Alignof(self): + return self.getToken(CPP14Parser.Alignof, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_alignofExpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAlignofExpression" ): + listener.enterAlignofExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAlignofExpression" ): + listener.exitAlignofExpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAlignofExpression" ): + return visitor.visitAlignofExpression(self) + else: + return visitor.visitChildren(self) + + + + + def alignofExpression(self): + + localctx = CPP14Parser.AlignofExpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 40, self.RULE_alignofExpression) + try: + self.enterOuterAlt(localctx, 1) + self.state = 702 + self.match(CPP14Parser.Alignof) + self.state = 703 + self.match(CPP14Parser.LeftParen) + self.state = 704 + self.thetypeid() + self.state = 705 + self.match(CPP14Parser.RightParen) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class UnaryoperatorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Or(self): + return self.getToken(CPP14Parser.Or, 0) + + def Star(self): + return self.getToken(CPP14Parser.Star, 0) + + def And(self): + return self.getToken(CPP14Parser.And, 0) + + def Plus(self): + return self.getToken(CPP14Parser.Plus, 0) + + def Not(self): + return self.getToken(CPP14Parser.Not, 0) + + def Tilde(self): + return self.getToken(CPP14Parser.Tilde, 0) + + def Minus(self): + return self.getToken(CPP14Parser.Minus, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_unaryoperator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterUnaryoperator" ): + listener.enterUnaryoperator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitUnaryoperator" ): + listener.exitUnaryoperator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitUnaryoperator" ): + return visitor.visitUnaryoperator(self) + else: + return visitor.visitChildren(self) + + + + + def unaryoperator(self): + + localctx = CPP14Parser.UnaryoperatorContext(self, self._ctx, self.state) + self.enterRule(localctx, 42, self.RULE_unaryoperator) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 707 + _la = self._input.LA(1) + if not(((((_la - 84)) & ~0x3f) == 0 and ((1 << (_la - 84)) & ((1 << (CPP14Parser.Plus - 84)) | (1 << (CPP14Parser.Minus - 84)) | (1 << (CPP14Parser.Star - 84)) | (1 << (CPP14Parser.And - 84)) | (1 << (CPP14Parser.Or - 84)) | (1 << (CPP14Parser.Tilde - 84)) | (1 << (CPP14Parser.Not - 84)))) != 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 NewexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def New(self): + return self.getToken(CPP14Parser.New, 0) + + def newtypeid(self): + return self.getTypedRuleContext(CPP14Parser.NewtypeidContext,0) + + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def newplacement(self): + return self.getTypedRuleContext(CPP14Parser.NewplacementContext,0) + + + def newinitializer(self): + return self.getTypedRuleContext(CPP14Parser.NewinitializerContext,0) + + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_newexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNewexpression" ): + listener.enterNewexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNewexpression" ): + listener.exitNewexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNewexpression" ): + return visitor.visitNewexpression(self) + else: + return visitor.visitChildren(self) + + + + + def newexpression(self): + + localctx = CPP14Parser.NewexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 44, self.RULE_newexpression) + self._la = 0 # Token type + try: + self.state = 733 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,41,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 710 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Doublecolon: + self.state = 709 + self.match(CPP14Parser.Doublecolon) + + + self.state = 712 + self.match(CPP14Parser.New) + self.state = 714 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.LeftParen: + self.state = 713 + self.newplacement() + + + self.state = 716 + self.newtypeid() + self.state = 718 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,37,self._ctx) + if la_ == 1: + self.state = 717 + self.newinitializer() + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 721 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Doublecolon: + self.state = 720 + self.match(CPP14Parser.Doublecolon) + + + self.state = 723 + self.match(CPP14Parser.New) + self.state = 725 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,39,self._ctx) + if la_ == 1: + self.state = 724 + self.newplacement() + + + self.state = 727 + self.match(CPP14Parser.LeftParen) + self.state = 728 + self.thetypeid() + self.state = 729 + self.match(CPP14Parser.RightParen) + self.state = 731 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,40,self._ctx) + if la_ == 1: + self.state = 730 + self.newinitializer() + + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NewplacementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def expressionlist(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionlistContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_newplacement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNewplacement" ): + listener.enterNewplacement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNewplacement" ): + listener.exitNewplacement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNewplacement" ): + return visitor.visitNewplacement(self) + else: + return visitor.visitChildren(self) + + + + + def newplacement(self): + + localctx = CPP14Parser.NewplacementContext(self, self._ctx, self.state) + self.enterRule(localctx, 46, self.RULE_newplacement) + try: + self.enterOuterAlt(localctx, 1) + self.state = 735 + self.match(CPP14Parser.LeftParen) + self.state = 736 + self.expressionlist() + self.state = 737 + self.match(CPP14Parser.RightParen) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NewtypeidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.TypespecifierseqContext,0) + + + def newdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NewdeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_newtypeid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNewtypeid" ): + listener.enterNewtypeid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNewtypeid" ): + listener.exitNewtypeid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNewtypeid" ): + return visitor.visitNewtypeid(self) + else: + return visitor.visitChildren(self) + + + + + def newtypeid(self): + + localctx = CPP14Parser.NewtypeidContext(self, self._ctx, self.state) + self.enterRule(localctx, 48, self.RULE_newtypeid) + try: + self.enterOuterAlt(localctx, 1) + self.state = 739 + self.typespecifierseq() + self.state = 741 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,42,self._ctx) + if la_ == 1: + self.state = 740 + self.newdeclarator() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NewdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_newdeclarator + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class PtrNewDeclaratorContext(NewdeclaratorContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NewdeclaratorContext + super().__init__(parser) + self.copyFrom(ctx) + + def ptroperator(self): + return self.getTypedRuleContext(CPP14Parser.PtroperatorContext,0) + + def newdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NewdeclaratorContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPtrNewDeclarator" ): + listener.enterPtrNewDeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPtrNewDeclarator" ): + listener.exitPtrNewDeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPtrNewDeclarator" ): + return visitor.visitPtrNewDeclarator(self) + else: + return visitor.visitChildren(self) + + + class NonPtrNewDeclaratorContext(NewdeclaratorContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NewdeclaratorContext + super().__init__(parser) + self.copyFrom(ctx) + + def noptrnewdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrnewdeclaratorContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNonPtrNewDeclarator" ): + listener.enterNonPtrNewDeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNonPtrNewDeclarator" ): + listener.exitNonPtrNewDeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNonPtrNewDeclarator" ): + return visitor.visitNonPtrNewDeclarator(self) + else: + return visitor.visitChildren(self) + + + + def newdeclarator(self): + + localctx = CPP14Parser.NewdeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 50, self.RULE_newdeclarator) + try: + self.state = 748 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Decltype, CPP14Parser.Star, CPP14Parser.And, CPP14Parser.AndAnd, CPP14Parser.Doublecolon, CPP14Parser.Identifier]: + localctx = CPP14Parser.PtrNewDeclaratorContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 743 + self.ptroperator() + self.state = 745 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,43,self._ctx) + if la_ == 1: + self.state = 744 + self.newdeclarator() + + + pass + elif token in [CPP14Parser.LeftBracket]: + localctx = CPP14Parser.NonPtrNewDeclaratorContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 747 + self.noptrnewdeclarator(0) + 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 NoptrnewdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def noptrnewdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrnewdeclaratorContext,0) + + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_noptrnewdeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNoptrnewdeclarator" ): + listener.enterNoptrnewdeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNoptrnewdeclarator" ): + listener.exitNoptrnewdeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNoptrnewdeclarator" ): + return visitor.visitNoptrnewdeclarator(self) + else: + return visitor.visitChildren(self) + + + + def noptrnewdeclarator(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.NoptrnewdeclaratorContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 52 + self.enterRecursionRule(localctx, 52, self.RULE_noptrnewdeclarator, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 751 + self.match(CPP14Parser.LeftBracket) + self.state = 752 + self.expression(0) + self.state = 753 + self.match(CPP14Parser.RightBracket) + self.state = 755 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,45,self._ctx) + if la_ == 1: + self.state = 754 + self.attributespecifierseq(0) + + + self._ctx.stop = self._input.LT(-1) + self.state = 766 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,47,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.NoptrnewdeclaratorContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_noptrnewdeclarator) + self.state = 757 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 758 + self.match(CPP14Parser.LeftBracket) + self.state = 759 + self.constantexpression() + self.state = 760 + self.match(CPP14Parser.RightBracket) + self.state = 762 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,46,self._ctx) + if la_ == 1: + self.state = 761 + self.attributespecifierseq(0) + + + self.state = 768 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,47,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class NewinitializerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def expressionlist(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionlistContext,0) + + + def bracedinitlist(self): + return self.getTypedRuleContext(CPP14Parser.BracedinitlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_newinitializer + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNewinitializer" ): + listener.enterNewinitializer(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNewinitializer" ): + listener.exitNewinitializer(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNewinitializer" ): + return visitor.visitNewinitializer(self) + else: + return visitor.visitChildren(self) + + + + + def newinitializer(self): + + localctx = CPP14Parser.NewinitializerContext(self, self._ctx, self.state) + self.enterRule(localctx, 54, self.RULE_newinitializer) + self._la = 0 # Token type + try: + self.state = 775 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.LeftParen]: + self.enterOuterAlt(localctx, 1) + self.state = 769 + self.match(CPP14Parser.LeftParen) + self.state = 771 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.LeftBrace - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 770 + self.expressionlist() + + + self.state = 773 + self.match(CPP14Parser.RightParen) + pass + elif token in [CPP14Parser.LeftBrace]: + self.enterOuterAlt(localctx, 2) + self.state = 774 + self.bracedinitlist() + 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 DeleteexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Delete(self): + return self.getToken(CPP14Parser.Delete, 0) + + def castexpression(self): + return self.getTypedRuleContext(CPP14Parser.CastexpressionContext,0) + + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_deleteexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDeleteexpression" ): + listener.enterDeleteexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDeleteexpression" ): + listener.exitDeleteexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDeleteexpression" ): + return visitor.visitDeleteexpression(self) + else: + return visitor.visitChildren(self) + + + + + def deleteexpression(self): + + localctx = CPP14Parser.DeleteexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 56, self.RULE_deleteexpression) + self._la = 0 # Token type + try: + self.state = 789 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,52,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 778 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Doublecolon: + self.state = 777 + self.match(CPP14Parser.Doublecolon) + + + self.state = 780 + self.match(CPP14Parser.Delete) + self.state = 781 + self.castexpression() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 783 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Doublecolon: + self.state = 782 + self.match(CPP14Parser.Doublecolon) + + + self.state = 785 + self.match(CPP14Parser.Delete) + self.state = 786 + self.match(CPP14Parser.LeftBracket) + self.state = 787 + self.match(CPP14Parser.RightBracket) + self.state = 788 + self.castexpression() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NoexceptexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Noexcept(self): + return self.getToken(CPP14Parser.Noexcept, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_noexceptexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNoexceptexpression" ): + listener.enterNoexceptexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNoexceptexpression" ): + listener.exitNoexceptexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNoexceptexpression" ): + return visitor.visitNoexceptexpression(self) + else: + return visitor.visitChildren(self) + + + + + def noexceptexpression(self): + + localctx = CPP14Parser.NoexceptexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 58, self.RULE_noexceptexpression) + try: + self.enterOuterAlt(localctx, 1) + self.state = 791 + self.match(CPP14Parser.Noexcept) + self.state = 792 + self.match(CPP14Parser.LeftParen) + self.state = 793 + self.expression(0) + self.state = 794 + self.match(CPP14Parser.RightParen) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CastexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def unaryexpression(self): + return self.getTypedRuleContext(CPP14Parser.UnaryexpressionContext,0) + + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def castexpression(self): + return self.getTypedRuleContext(CPP14Parser.CastexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_castexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCastexpression" ): + listener.enterCastexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCastexpression" ): + listener.exitCastexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCastexpression" ): + return visitor.visitCastexpression(self) + else: + return visitor.visitChildren(self) + + + + + def castexpression(self): + + localctx = CPP14Parser.CastexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 60, self.RULE_castexpression) + try: + self.state = 802 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,53,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 796 + self.unaryexpression() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 797 + self.match(CPP14Parser.LeftParen) + self.state = 798 + self.thetypeid() + self.state = 799 + self.match(CPP14Parser.RightParen) + self.state = 800 + self.castexpression() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PmexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def castexpression(self): + return self.getTypedRuleContext(CPP14Parser.CastexpressionContext,0) + + + def pmexpression(self): + return self.getTypedRuleContext(CPP14Parser.PmexpressionContext,0) + + + def DotStar(self): + return self.getToken(CPP14Parser.DotStar, 0) + + def ArrowStar(self): + return self.getToken(CPP14Parser.ArrowStar, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_pmexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPmexpression" ): + listener.enterPmexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPmexpression" ): + listener.exitPmexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPmexpression" ): + return visitor.visitPmexpression(self) + else: + return visitor.visitChildren(self) + + + + def pmexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.PmexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 62 + self.enterRecursionRule(localctx, 62, self.RULE_pmexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 805 + self.castexpression() + self._ctx.stop = self._input.LT(-1) + self.state = 815 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,55,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 813 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,54,self._ctx) + if la_ == 1: + localctx = CPP14Parser.PmexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_pmexpression) + self.state = 807 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 808 + self.match(CPP14Parser.DotStar) + self.state = 809 + self.castexpression() + pass + + elif la_ == 2: + localctx = CPP14Parser.PmexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_pmexpression) + self.state = 810 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 811 + self.match(CPP14Parser.ArrowStar) + self.state = 812 + self.castexpression() + pass + + + self.state = 817 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,55,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class MultiplicativeexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def pmexpression(self): + return self.getTypedRuleContext(CPP14Parser.PmexpressionContext,0) + + + def multiplicativeexpression(self): + return self.getTypedRuleContext(CPP14Parser.MultiplicativeexpressionContext,0) + + + def Star(self): + return self.getToken(CPP14Parser.Star, 0) + + def Div(self): + return self.getToken(CPP14Parser.Div, 0) + + def Mod(self): + return self.getToken(CPP14Parser.Mod, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_multiplicativeexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMultiplicativeexpression" ): + listener.enterMultiplicativeexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMultiplicativeexpression" ): + listener.exitMultiplicativeexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMultiplicativeexpression" ): + return visitor.visitMultiplicativeexpression(self) + else: + return visitor.visitChildren(self) + + + + def multiplicativeexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.MultiplicativeexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 64 + self.enterRecursionRule(localctx, 64, self.RULE_multiplicativeexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 819 + self.pmexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 832 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,57,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 830 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,56,self._ctx) + if la_ == 1: + localctx = CPP14Parser.MultiplicativeexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_multiplicativeexpression) + self.state = 821 + if not self.precpred(self._ctx, 3): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") + self.state = 822 + self.match(CPP14Parser.Star) + self.state = 823 + self.pmexpression(0) + pass + + elif la_ == 2: + localctx = CPP14Parser.MultiplicativeexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_multiplicativeexpression) + self.state = 824 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 825 + self.match(CPP14Parser.Div) + self.state = 826 + self.pmexpression(0) + pass + + elif la_ == 3: + localctx = CPP14Parser.MultiplicativeexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_multiplicativeexpression) + self.state = 827 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 828 + self.match(CPP14Parser.Mod) + self.state = 829 + self.pmexpression(0) + pass + + + self.state = 834 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,57,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class AdditiveexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def multiplicativeexpression(self): + return self.getTypedRuleContext(CPP14Parser.MultiplicativeexpressionContext,0) + + + def additiveexpression(self): + return self.getTypedRuleContext(CPP14Parser.AdditiveexpressionContext,0) + + + def Plus(self): + return self.getToken(CPP14Parser.Plus, 0) + + def Minus(self): + return self.getToken(CPP14Parser.Minus, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_additiveexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAdditiveexpression" ): + listener.enterAdditiveexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAdditiveexpression" ): + listener.exitAdditiveexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAdditiveexpression" ): + return visitor.visitAdditiveexpression(self) + else: + return visitor.visitChildren(self) + + + + def additiveexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.AdditiveexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 66 + self.enterRecursionRule(localctx, 66, self.RULE_additiveexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 836 + self.multiplicativeexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 846 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,59,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 844 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,58,self._ctx) + if la_ == 1: + localctx = CPP14Parser.AdditiveexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_additiveexpression) + self.state = 838 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 839 + self.match(CPP14Parser.Plus) + self.state = 840 + self.multiplicativeexpression(0) + pass + + elif la_ == 2: + localctx = CPP14Parser.AdditiveexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_additiveexpression) + self.state = 841 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 842 + self.match(CPP14Parser.Minus) + self.state = 843 + self.multiplicativeexpression(0) + pass + + + self.state = 848 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,59,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class ShiftexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def additiveexpression(self): + return self.getTypedRuleContext(CPP14Parser.AdditiveexpressionContext,0) + + + def shiftexpression(self): + return self.getTypedRuleContext(CPP14Parser.ShiftexpressionContext,0) + + + def LeftShift(self): + return self.getToken(CPP14Parser.LeftShift, 0) + + def rightShift(self): + return self.getTypedRuleContext(CPP14Parser.RightShiftContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_shiftexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterShiftexpression" ): + listener.enterShiftexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitShiftexpression" ): + listener.exitShiftexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitShiftexpression" ): + return visitor.visitShiftexpression(self) + else: + return visitor.visitChildren(self) + + + + def shiftexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.ShiftexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 68 + self.enterRecursionRule(localctx, 68, self.RULE_shiftexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 850 + self.additiveexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 861 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,61,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 859 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,60,self._ctx) + if la_ == 1: + localctx = CPP14Parser.ShiftexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_shiftexpression) + self.state = 852 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 853 + self.match(CPP14Parser.LeftShift) + self.state = 854 + self.additiveexpression(0) + pass + + elif la_ == 2: + localctx = CPP14Parser.ShiftexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_shiftexpression) + self.state = 855 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 856 + self.rightShift() + self.state = 857 + self.additiveexpression(0) + pass + + + self.state = 863 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,61,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class RelationalexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def shiftexpression(self): + return self.getTypedRuleContext(CPP14Parser.ShiftexpressionContext,0) + + + def relationalexpression(self): + return self.getTypedRuleContext(CPP14Parser.RelationalexpressionContext,0) + + + def Less(self): + return self.getToken(CPP14Parser.Less, 0) + + def Greater(self): + return self.getToken(CPP14Parser.Greater, 0) + + def LessEqual(self): + return self.getToken(CPP14Parser.LessEqual, 0) + + def GreaterEqual(self): + return self.getToken(CPP14Parser.GreaterEqual, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_relationalexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRelationalexpression" ): + listener.enterRelationalexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRelationalexpression" ): + listener.exitRelationalexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitRelationalexpression" ): + return visitor.visitRelationalexpression(self) + else: + return visitor.visitChildren(self) + + + + def relationalexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.RelationalexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 70 + self.enterRecursionRule(localctx, 70, self.RULE_relationalexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 865 + self.shiftexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 881 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,63,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 879 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,62,self._ctx) + if la_ == 1: + localctx = CPP14Parser.RelationalexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_relationalexpression) + self.state = 867 + if not self.precpred(self._ctx, 4): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 4)") + self.state = 868 + self.match(CPP14Parser.Less) + self.state = 869 + self.shiftexpression(0) + pass + + elif la_ == 2: + localctx = CPP14Parser.RelationalexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_relationalexpression) + self.state = 870 + if not self.precpred(self._ctx, 3): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") + self.state = 871 + self.match(CPP14Parser.Greater) + self.state = 872 + self.shiftexpression(0) + pass + + elif la_ == 3: + localctx = CPP14Parser.RelationalexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_relationalexpression) + self.state = 873 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 874 + self.match(CPP14Parser.LessEqual) + self.state = 875 + self.shiftexpression(0) + pass + + elif la_ == 4: + localctx = CPP14Parser.RelationalexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_relationalexpression) + self.state = 876 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 877 + self.match(CPP14Parser.GreaterEqual) + self.state = 878 + self.shiftexpression(0) + pass + + + self.state = 883 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,63,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class EqualityexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def relationalexpression(self): + return self.getTypedRuleContext(CPP14Parser.RelationalexpressionContext,0) + + + def equalityexpression(self): + return self.getTypedRuleContext(CPP14Parser.EqualityexpressionContext,0) + + + def Equal(self): + return self.getToken(CPP14Parser.Equal, 0) + + def NotEqual(self): + return self.getToken(CPP14Parser.NotEqual, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_equalityexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEqualityexpression" ): + listener.enterEqualityexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEqualityexpression" ): + listener.exitEqualityexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEqualityexpression" ): + return visitor.visitEqualityexpression(self) + else: + return visitor.visitChildren(self) + + + + def equalityexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.EqualityexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 72 + self.enterRecursionRule(localctx, 72, self.RULE_equalityexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 885 + self.relationalexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 895 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,65,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 893 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,64,self._ctx) + if la_ == 1: + localctx = CPP14Parser.EqualityexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_equalityexpression) + self.state = 887 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 888 + self.match(CPP14Parser.Equal) + self.state = 889 + self.relationalexpression(0) + pass + + elif la_ == 2: + localctx = CPP14Parser.EqualityexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_equalityexpression) + self.state = 890 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 891 + self.match(CPP14Parser.NotEqual) + self.state = 892 + self.relationalexpression(0) + pass + + + self.state = 897 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,65,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class AndexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def equalityexpression(self): + return self.getTypedRuleContext(CPP14Parser.EqualityexpressionContext,0) + + + def andexpression(self): + return self.getTypedRuleContext(CPP14Parser.AndexpressionContext,0) + + + def And(self): + return self.getToken(CPP14Parser.And, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_andexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAndexpression" ): + listener.enterAndexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAndexpression" ): + listener.exitAndexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAndexpression" ): + return visitor.visitAndexpression(self) + else: + return visitor.visitChildren(self) + + + + def andexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.AndexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 74 + self.enterRecursionRule(localctx, 74, self.RULE_andexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 899 + self.equalityexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 906 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,66,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.AndexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_andexpression) + self.state = 901 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 902 + self.match(CPP14Parser.And) + self.state = 903 + self.equalityexpression(0) + self.state = 908 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,66,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class ExclusiveorexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def andexpression(self): + return self.getTypedRuleContext(CPP14Parser.AndexpressionContext,0) + + + def exclusiveorexpression(self): + return self.getTypedRuleContext(CPP14Parser.ExclusiveorexpressionContext,0) + + + def Caret(self): + return self.getToken(CPP14Parser.Caret, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_exclusiveorexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExclusiveorexpression" ): + listener.enterExclusiveorexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExclusiveorexpression" ): + listener.exitExclusiveorexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExclusiveorexpression" ): + return visitor.visitExclusiveorexpression(self) + else: + return visitor.visitChildren(self) + + + + def exclusiveorexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.ExclusiveorexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 76 + self.enterRecursionRule(localctx, 76, self.RULE_exclusiveorexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 910 + self.andexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 917 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,67,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.ExclusiveorexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_exclusiveorexpression) + self.state = 912 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 913 + self.match(CPP14Parser.Caret) + self.state = 914 + self.andexpression(0) + self.state = 919 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,67,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class InclusiveorexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def exclusiveorexpression(self): + return self.getTypedRuleContext(CPP14Parser.ExclusiveorexpressionContext,0) + + + def inclusiveorexpression(self): + return self.getTypedRuleContext(CPP14Parser.InclusiveorexpressionContext,0) + + + def Or(self): + return self.getToken(CPP14Parser.Or, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_inclusiveorexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInclusiveorexpression" ): + listener.enterInclusiveorexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInclusiveorexpression" ): + listener.exitInclusiveorexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitInclusiveorexpression" ): + return visitor.visitInclusiveorexpression(self) + else: + return visitor.visitChildren(self) + + + + def inclusiveorexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.InclusiveorexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 78 + self.enterRecursionRule(localctx, 78, self.RULE_inclusiveorexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 921 + self.exclusiveorexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 928 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,68,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.InclusiveorexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_inclusiveorexpression) + self.state = 923 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 924 + self.match(CPP14Parser.Or) + self.state = 925 + self.exclusiveorexpression(0) + self.state = 930 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,68,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class LogicalandexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def inclusiveorexpression(self): + return self.getTypedRuleContext(CPP14Parser.InclusiveorexpressionContext,0) + + + def logicalandexpression(self): + return self.getTypedRuleContext(CPP14Parser.LogicalandexpressionContext,0) + + + def AndAnd(self): + return self.getToken(CPP14Parser.AndAnd, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_logicalandexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLogicalandexpression" ): + listener.enterLogicalandexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLogicalandexpression" ): + listener.exitLogicalandexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLogicalandexpression" ): + return visitor.visitLogicalandexpression(self) + else: + return visitor.visitChildren(self) + + + + def logicalandexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.LogicalandexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 80 + self.enterRecursionRule(localctx, 80, self.RULE_logicalandexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 932 + self.inclusiveorexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 939 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,69,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.LogicalandexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_logicalandexpression) + self.state = 934 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 935 + self.match(CPP14Parser.AndAnd) + self.state = 936 + self.inclusiveorexpression(0) + self.state = 941 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,69,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class LogicalorexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def logicalandexpression(self): + return self.getTypedRuleContext(CPP14Parser.LogicalandexpressionContext,0) + + + def logicalorexpression(self): + return self.getTypedRuleContext(CPP14Parser.LogicalorexpressionContext,0) + + + def OrOr(self): + return self.getToken(CPP14Parser.OrOr, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_logicalorexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLogicalorexpression" ): + listener.enterLogicalorexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLogicalorexpression" ): + listener.exitLogicalorexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLogicalorexpression" ): + return visitor.visitLogicalorexpression(self) + else: + return visitor.visitChildren(self) + + + + def logicalorexpression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.LogicalorexpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 82 + self.enterRecursionRule(localctx, 82, self.RULE_logicalorexpression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 943 + self.logicalandexpression(0) + self._ctx.stop = self._input.LT(-1) + self.state = 950 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,70,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.LogicalorexpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_logicalorexpression) + self.state = 945 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 946 + self.match(CPP14Parser.OrOr) + self.state = 947 + self.logicalandexpression(0) + self.state = 952 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,70,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class ConditionalexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_conditionalexpression + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class NonConditionalExpressionContext(ConditionalexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.ConditionalexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def logicalorexpression(self): + return self.getTypedRuleContext(CPP14Parser.LogicalorexpressionContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNonConditionalExpression" ): + listener.enterNonConditionalExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNonConditionalExpression" ): + listener.exitNonConditionalExpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNonConditionalExpression" ): + return visitor.visitNonConditionalExpression(self) + else: + return visitor.visitChildren(self) + + + class RealConditionalExpressionContext(ConditionalexpressionContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.ConditionalexpressionContext + super().__init__(parser) + self.copyFrom(ctx) + + def logicalorexpression(self): + return self.getTypedRuleContext(CPP14Parser.LogicalorexpressionContext,0) + + def Question(self): + return self.getToken(CPP14Parser.Question, 0) + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + def Colon(self): + return self.getToken(CPP14Parser.Colon, 0) + def assignmentexpression(self): + return self.getTypedRuleContext(CPP14Parser.AssignmentexpressionContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRealConditionalExpression" ): + listener.enterRealConditionalExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRealConditionalExpression" ): + listener.exitRealConditionalExpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitRealConditionalExpression" ): + return visitor.visitRealConditionalExpression(self) + else: + return visitor.visitChildren(self) + + + + def conditionalexpression(self): + + localctx = CPP14Parser.ConditionalexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 84, self.RULE_conditionalexpression) + try: + self.state = 960 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,71,self._ctx) + if la_ == 1: + localctx = CPP14Parser.NonConditionalExpressionContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 953 + self.logicalorexpression(0) + pass + + elif la_ == 2: + localctx = CPP14Parser.RealConditionalExpressionContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 954 + self.logicalorexpression(0) + self.state = 955 + self.match(CPP14Parser.Question) + self.state = 956 + self.expression(0) + self.state = 957 + self.match(CPP14Parser.Colon) + self.state = 958 + self.assignmentexpression() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AssignmentexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def conditionalexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConditionalexpressionContext,0) + + + def logicalorexpression(self): + return self.getTypedRuleContext(CPP14Parser.LogicalorexpressionContext,0) + + + def assignmentoperator(self): + return self.getTypedRuleContext(CPP14Parser.AssignmentoperatorContext,0) + + + def initializerclause(self): + return self.getTypedRuleContext(CPP14Parser.InitializerclauseContext,0) + + + def throwexpression(self): + return self.getTypedRuleContext(CPP14Parser.ThrowexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_assignmentexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAssignmentexpression" ): + listener.enterAssignmentexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAssignmentexpression" ): + listener.exitAssignmentexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAssignmentexpression" ): + return visitor.visitAssignmentexpression(self) + else: + return visitor.visitChildren(self) + + + + + def assignmentexpression(self): + + localctx = CPP14Parser.AssignmentexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 86, self.RULE_assignmentexpression) + try: + self.state = 968 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,72,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 962 + self.conditionalexpression() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 963 + self.logicalorexpression(0) + self.state = 964 + self.assignmentoperator() + self.state = 965 + self.initializerclause() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 967 + self.throwexpression() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AssignmentoperatorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def StarAssign(self): + return self.getToken(CPP14Parser.StarAssign, 0) + + def DivAssign(self): + return self.getToken(CPP14Parser.DivAssign, 0) + + def ModAssign(self): + return self.getToken(CPP14Parser.ModAssign, 0) + + def PlusAssign(self): + return self.getToken(CPP14Parser.PlusAssign, 0) + + def MinusAssign(self): + return self.getToken(CPP14Parser.MinusAssign, 0) + + def rightShiftAssign(self): + return self.getTypedRuleContext(CPP14Parser.RightShiftAssignContext,0) + + + def LeftShiftAssign(self): + return self.getToken(CPP14Parser.LeftShiftAssign, 0) + + def AndAssign(self): + return self.getToken(CPP14Parser.AndAssign, 0) + + def XorAssign(self): + return self.getToken(CPP14Parser.XorAssign, 0) + + def OrAssign(self): + return self.getToken(CPP14Parser.OrAssign, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_assignmentoperator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAssignmentoperator" ): + listener.enterAssignmentoperator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAssignmentoperator" ): + listener.exitAssignmentoperator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAssignmentoperator" ): + return visitor.visitAssignmentoperator(self) + else: + return visitor.visitChildren(self) + + + + + def assignmentoperator(self): + + localctx = CPP14Parser.AssignmentoperatorContext(self, self._ctx, self.state) + self.enterRule(localctx, 88, self.RULE_assignmentoperator) + try: + self.state = 981 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Assign]: + self.enterOuterAlt(localctx, 1) + self.state = 970 + self.match(CPP14Parser.Assign) + pass + elif token in [CPP14Parser.StarAssign]: + self.enterOuterAlt(localctx, 2) + self.state = 971 + self.match(CPP14Parser.StarAssign) + pass + elif token in [CPP14Parser.DivAssign]: + self.enterOuterAlt(localctx, 3) + self.state = 972 + self.match(CPP14Parser.DivAssign) + pass + elif token in [CPP14Parser.ModAssign]: + self.enterOuterAlt(localctx, 4) + self.state = 973 + self.match(CPP14Parser.ModAssign) + pass + elif token in [CPP14Parser.PlusAssign]: + self.enterOuterAlt(localctx, 5) + self.state = 974 + self.match(CPP14Parser.PlusAssign) + pass + elif token in [CPP14Parser.MinusAssign]: + self.enterOuterAlt(localctx, 6) + self.state = 975 + self.match(CPP14Parser.MinusAssign) + pass + elif token in [CPP14Parser.Greater]: + self.enterOuterAlt(localctx, 7) + self.state = 976 + self.rightShiftAssign() + pass + elif token in [CPP14Parser.LeftShiftAssign]: + self.enterOuterAlt(localctx, 8) + self.state = 977 + self.match(CPP14Parser.LeftShiftAssign) + pass + elif token in [CPP14Parser.AndAssign]: + self.enterOuterAlt(localctx, 9) + self.state = 978 + self.match(CPP14Parser.AndAssign) + pass + elif token in [CPP14Parser.XorAssign]: + self.enterOuterAlt(localctx, 10) + self.state = 979 + self.match(CPP14Parser.XorAssign) + pass + elif token in [CPP14Parser.OrAssign]: + self.enterOuterAlt(localctx, 11) + self.state = 980 + self.match(CPP14Parser.OrAssign) + 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 ExpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def assignmentexpression(self): + return self.getTypedRuleContext(CPP14Parser.AssignmentexpressionContext,0) + + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_expression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpression" ): + listener.enterExpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpression" ): + listener.exitExpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExpression" ): + return visitor.visitExpression(self) + else: + return visitor.visitChildren(self) + + + + def expression(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.ExpressionContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 90 + self.enterRecursionRule(localctx, 90, self.RULE_expression, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 984 + self.assignmentexpression() + self._ctx.stop = self._input.LT(-1) + self.state = 991 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,74,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.ExpressionContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_expression) + self.state = 986 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 987 + self.match(CPP14Parser.Comma) + self.state = 988 + self.assignmentexpression() + self.state = 993 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,74,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class ConstantexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def conditionalexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConditionalexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_constantexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConstantexpression" ): + listener.enterConstantexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConstantexpression" ): + listener.exitConstantexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitConstantexpression" ): + return visitor.visitConstantexpression(self) + else: + return visitor.visitChildren(self) + + + + + def constantexpression(self): + + localctx = CPP14Parser.ConstantexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 92, self.RULE_constantexpression) + try: + self.enterOuterAlt(localctx, 1) + self.state = 994 + self.conditionalexpression() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class StatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def labeledstatement(self): + return self.getTypedRuleContext(CPP14Parser.LabeledstatementContext,0) + + + def expressionstatement(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionstatementContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def compoundstatement(self): + return self.getTypedRuleContext(CPP14Parser.CompoundstatementContext,0) + + + def selectionstatement(self): + return self.getTypedRuleContext(CPP14Parser.SelectionstatementContext,0) + + + def iterationstatement(self): + return self.getTypedRuleContext(CPP14Parser.IterationstatementContext,0) + + + def jumpstatement(self): + return self.getTypedRuleContext(CPP14Parser.JumpstatementContext,0) + + + def declarationstatement(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationstatementContext,0) + + + def tryblock(self): + return self.getTypedRuleContext(CPP14Parser.TryblockContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_statement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStatement" ): + listener.enterStatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStatement" ): + listener.exitStatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitStatement" ): + return visitor.visitStatement(self) + else: + return visitor.visitChildren(self) + + + + + def statement(self): + + localctx = CPP14Parser.StatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 94, self.RULE_statement) + self._la = 0 # Token type + try: + self.state = 1022 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,81,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 996 + self.labeledstatement() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 998 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,75,self._ctx) + if la_ == 1: + self.state = 997 + self.attributespecifierseq(0) + + + self.state = 1000 + self.expressionstatement() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1002 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1001 + self.attributespecifierseq(0) + + + self.state = 1004 + self.compoundstatement() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1006 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1005 + self.attributespecifierseq(0) + + + self.state = 1008 + self.selectionstatement() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 1010 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1009 + self.attributespecifierseq(0) + + + self.state = 1012 + self.iterationstatement() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 1014 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1013 + self.attributespecifierseq(0) + + + self.state = 1016 + self.jumpstatement() + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 1017 + self.declarationstatement() + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 1019 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1018 + self.attributespecifierseq(0) + + + self.state = 1021 + self.tryblock() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LabelContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def Colon(self): + return self.getToken(CPP14Parser.Colon, 0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def Case(self): + return self.getToken(CPP14Parser.Case, 0) + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def Default(self): + return self.getToken(CPP14Parser.Default, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_label + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLabel" ): + listener.enterLabel(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLabel" ): + listener.exitLabel(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLabel" ): + return visitor.visitLabel(self) + else: + return visitor.visitChildren(self) + + + + + def label(self): + + localctx = CPP14Parser.LabelContext(self, self._ctx, self.state) + self.enterRule(localctx, 96, self.RULE_label) + self._la = 0 # Token type + try: + self.state = 1041 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,85,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1025 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1024 + self.attributespecifierseq(0) + + + self.state = 1027 + self.match(CPP14Parser.Identifier) + self.state = 1028 + self.match(CPP14Parser.Colon) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1030 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1029 + self.attributespecifierseq(0) + + + self.state = 1032 + self.match(CPP14Parser.Case) + self.state = 1033 + self.constantexpression() + self.state = 1034 + self.match(CPP14Parser.Colon) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1037 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1036 + self.attributespecifierseq(0) + + + self.state = 1039 + self.match(CPP14Parser.Default) + self.state = 1040 + self.match(CPP14Parser.Colon) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LabeledstatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def label(self): + return self.getTypedRuleContext(CPP14Parser.LabelContext,0) + + + def statement(self): + return self.getTypedRuleContext(CPP14Parser.StatementContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_labeledstatement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLabeledstatement" ): + listener.enterLabeledstatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLabeledstatement" ): + listener.exitLabeledstatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLabeledstatement" ): + return visitor.visitLabeledstatement(self) + else: + return visitor.visitChildren(self) + + + + + def labeledstatement(self): + + localctx = CPP14Parser.LabeledstatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 98, self.RULE_labeledstatement) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1043 + self.label() + self.state = 1044 + self.statement() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExpressionstatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_expressionstatement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExpressionstatement" ): + listener.enterExpressionstatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExpressionstatement" ): + listener.exitExpressionstatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExpressionstatement" ): + return visitor.visitExpressionstatement(self) + else: + return visitor.visitChildren(self) + + + + + def expressionstatement(self): + + localctx = CPP14Parser.ExpressionstatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 100, self.RULE_expressionstatement) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1047 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 1046 + self.expression(0) + + + self.state = 1049 + self.match(CPP14Parser.Semi) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CompoundstatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftBrace(self): + return self.getToken(CPP14Parser.LeftBrace, 0) + + def RightBrace(self): + return self.getToken(CPP14Parser.RightBrace, 0) + + def statementseq(self): + return self.getTypedRuleContext(CPP14Parser.StatementseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_compoundstatement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCompoundstatement" ): + listener.enterCompoundstatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCompoundstatement" ): + listener.exitCompoundstatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCompoundstatement" ): + return visitor.visitCompoundstatement(self) + else: + return visitor.visitChildren(self) + + + + + def compoundstatement(self): + + localctx = CPP14Parser.CompoundstatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 102, self.RULE_compoundstatement) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1051 + self.match(CPP14Parser.LeftBrace) + self.state = 1053 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Asm) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Break) | (1 << CPP14Parser.Case) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Constexpr) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Continue) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Default) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Do) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Explicit) | (1 << CPP14Parser.Extern) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.For) | (1 << CPP14Parser.Friend) | (1 << CPP14Parser.Goto) | (1 << CPP14Parser.If) | (1 << CPP14Parser.Inline) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.Namespace) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Return) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Static_assert) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.Switch) | (1 << CPP14Parser.This) | (1 << CPP14Parser.Thread_local))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Try - 64)) | (1 << (CPP14Parser.Typedef - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Union - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Using - 64)) | (1 << (CPP14Parser.Virtual - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Volatile - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.While - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.LeftBrace - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.AndAnd - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Semi - 64)) | (1 << (CPP14Parser.Ellipsis - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 1052 + self.statementseq(0) + + + self.state = 1055 + self.match(CPP14Parser.RightBrace) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class StatementseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def statement(self): + return self.getTypedRuleContext(CPP14Parser.StatementContext,0) + + + def statementseq(self): + return self.getTypedRuleContext(CPP14Parser.StatementseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_statementseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStatementseq" ): + listener.enterStatementseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStatementseq" ): + listener.exitStatementseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitStatementseq" ): + return visitor.visitStatementseq(self) + else: + return visitor.visitChildren(self) + + + + def statementseq(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.StatementseqContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 104 + self.enterRecursionRule(localctx, 104, self.RULE_statementseq, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1058 + self.statement() + self._ctx.stop = self._input.LT(-1) + self.state = 1064 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,88,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.StatementseqContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_statementseq) + self.state = 1060 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1061 + self.statement() + self.state = 1066 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,88,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class SelectionstatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_selectionstatement + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class IfStatementContext(SelectionstatementContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.SelectionstatementContext + super().__init__(parser) + self.copyFrom(ctx) + + def If(self): + return self.getToken(CPP14Parser.If, 0) + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def condition(self): + return self.getTypedRuleContext(CPP14Parser.ConditionContext,0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def statement(self, i:int=None): + if i is None: + return self.getTypedRuleContexts(CPP14Parser.StatementContext) + else: + return self.getTypedRuleContext(CPP14Parser.StatementContext,i) + + def Else(self): + return self.getToken(CPP14Parser.Else, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterIfStatement" ): + listener.enterIfStatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitIfStatement" ): + listener.exitIfStatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitIfStatement" ): + return visitor.visitIfStatement(self) + else: + return visitor.visitChildren(self) + + + class SwitchStatementContext(SelectionstatementContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.SelectionstatementContext + super().__init__(parser) + self.copyFrom(ctx) + + def Switch(self): + return self.getToken(CPP14Parser.Switch, 0) + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def condition(self): + return self.getTypedRuleContext(CPP14Parser.ConditionContext,0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def statement(self): + return self.getTypedRuleContext(CPP14Parser.StatementContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSwitchStatement" ): + listener.enterSwitchStatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSwitchStatement" ): + listener.exitSwitchStatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSwitchStatement" ): + return visitor.visitSwitchStatement(self) + else: + return visitor.visitChildren(self) + + + + def selectionstatement(self): + + localctx = CPP14Parser.SelectionstatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 106, self.RULE_selectionstatement) + try: + self.state = 1087 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,89,self._ctx) + if la_ == 1: + localctx = CPP14Parser.IfStatementContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 1067 + self.match(CPP14Parser.If) + self.state = 1068 + self.match(CPP14Parser.LeftParen) + self.state = 1069 + self.condition() + self.state = 1070 + self.match(CPP14Parser.RightParen) + self.state = 1071 + self.statement() + pass + + elif la_ == 2: + localctx = CPP14Parser.IfStatementContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 1073 + self.match(CPP14Parser.If) + self.state = 1074 + self.match(CPP14Parser.LeftParen) + self.state = 1075 + self.condition() + self.state = 1076 + self.match(CPP14Parser.RightParen) + self.state = 1077 + self.statement() + self.state = 1078 + self.match(CPP14Parser.Else) + self.state = 1079 + self.statement() + pass + + elif la_ == 3: + localctx = CPP14Parser.SwitchStatementContext(self, localctx) + self.enterOuterAlt(localctx, 3) + self.state = 1081 + self.match(CPP14Parser.Switch) + self.state = 1082 + self.match(CPP14Parser.LeftParen) + self.state = 1083 + self.condition() + self.state = 1084 + self.match(CPP14Parser.RightParen) + self.state = 1085 + self.statement() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ConditionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def declspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclspecifierseqContext,0) + + + def declarator(self): + return self.getTypedRuleContext(CPP14Parser.DeclaratorContext,0) + + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def initializerclause(self): + return self.getTypedRuleContext(CPP14Parser.InitializerclauseContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def bracedinitlist(self): + return self.getTypedRuleContext(CPP14Parser.BracedinitlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_condition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCondition" ): + listener.enterCondition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCondition" ): + listener.exitCondition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCondition" ): + return visitor.visitCondition(self) + else: + return visitor.visitChildren(self) + + + + + def condition(self): + + localctx = CPP14Parser.ConditionContext(self, self._ctx, self.state) + self.enterRule(localctx, 108, self.RULE_condition) + self._la = 0 # Token type + try: + self.state = 1105 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,92,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1089 + self.expression(0) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1091 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1090 + self.attributespecifierseq(0) + + + self.state = 1093 + self.declspecifierseq() + self.state = 1094 + self.declarator() + self.state = 1095 + self.match(CPP14Parser.Assign) + self.state = 1096 + self.initializerclause() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1099 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1098 + self.attributespecifierseq(0) + + + self.state = 1101 + self.declspecifierseq() + self.state = 1102 + self.declarator() + self.state = 1103 + self.bracedinitlist() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class IterationstatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_iterationstatement + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class DoStatementContext(IterationstatementContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.IterationstatementContext + super().__init__(parser) + self.copyFrom(ctx) + + def Do(self): + return self.getToken(CPP14Parser.Do, 0) + def statement(self): + return self.getTypedRuleContext(CPP14Parser.StatementContext,0) + + def While(self): + return self.getToken(CPP14Parser.While, 0) + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def condition(self): + return self.getTypedRuleContext(CPP14Parser.ConditionContext,0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDoStatement" ): + listener.enterDoStatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDoStatement" ): + listener.exitDoStatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDoStatement" ): + return visitor.visitDoStatement(self) + else: + return visitor.visitChildren(self) + + + class ForRangeStatementContext(IterationstatementContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.IterationstatementContext + super().__init__(parser) + self.copyFrom(ctx) + + def For(self): + return self.getToken(CPP14Parser.For, 0) + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def forrangedeclaration(self): + return self.getTypedRuleContext(CPP14Parser.ForrangedeclarationContext,0) + + def Colon(self): + return self.getToken(CPP14Parser.Colon, 0) + def forrangeinitializer(self): + return self.getTypedRuleContext(CPP14Parser.ForrangeinitializerContext,0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def statement(self): + return self.getTypedRuleContext(CPP14Parser.StatementContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterForRangeStatement" ): + listener.enterForRangeStatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitForRangeStatement" ): + listener.exitForRangeStatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitForRangeStatement" ): + return visitor.visitForRangeStatement(self) + else: + return visitor.visitChildren(self) + + + class WhileStatementContext(IterationstatementContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.IterationstatementContext + super().__init__(parser) + self.copyFrom(ctx) + + def While(self): + return self.getToken(CPP14Parser.While, 0) + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def condition(self): + return self.getTypedRuleContext(CPP14Parser.ConditionContext,0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def statement(self): + return self.getTypedRuleContext(CPP14Parser.StatementContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterWhileStatement" ): + listener.enterWhileStatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitWhileStatement" ): + listener.exitWhileStatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitWhileStatement" ): + return visitor.visitWhileStatement(self) + else: + return visitor.visitChildren(self) + + + class ForStatementContext(IterationstatementContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.IterationstatementContext + super().__init__(parser) + self.copyFrom(ctx) + + def For(self): + return self.getToken(CPP14Parser.For, 0) + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def forinitstatement(self): + return self.getTypedRuleContext(CPP14Parser.ForinitstatementContext,0) + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def statement(self): + return self.getTypedRuleContext(CPP14Parser.StatementContext,0) + + def condition(self): + return self.getTypedRuleContext(CPP14Parser.ConditionContext,0) + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterForStatement" ): + listener.enterForStatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitForStatement" ): + listener.exitForStatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitForStatement" ): + return visitor.visitForStatement(self) + else: + return visitor.visitChildren(self) + + + + def iterationstatement(self): + + localctx = CPP14Parser.IterationstatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 110, self.RULE_iterationstatement) + self._la = 0 # Token type + try: + self.state = 1142 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,95,self._ctx) + if la_ == 1: + localctx = CPP14Parser.WhileStatementContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 1107 + self.match(CPP14Parser.While) + self.state = 1108 + self.match(CPP14Parser.LeftParen) + self.state = 1109 + self.condition() + self.state = 1110 + self.match(CPP14Parser.RightParen) + self.state = 1111 + self.statement() + pass + + elif la_ == 2: + localctx = CPP14Parser.DoStatementContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 1113 + self.match(CPP14Parser.Do) + self.state = 1114 + self.statement() + self.state = 1115 + self.match(CPP14Parser.While) + self.state = 1116 + self.match(CPP14Parser.LeftParen) + self.state = 1117 + self.condition() + self.state = 1118 + self.match(CPP14Parser.RightParen) + self.state = 1119 + self.match(CPP14Parser.Semi) + pass + + elif la_ == 3: + localctx = CPP14Parser.ForStatementContext(self, localctx) + self.enterOuterAlt(localctx, 3) + self.state = 1121 + self.match(CPP14Parser.For) + self.state = 1122 + self.match(CPP14Parser.LeftParen) + self.state = 1123 + self.forinitstatement() + self.state = 1125 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Constexpr) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Explicit) | (1 << CPP14Parser.Extern) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Friend) | (1 << CPP14Parser.Inline) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.This) | (1 << CPP14Parser.Thread_local))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Typedef - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Union - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Virtual - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Volatile - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 1124 + self.condition() + + + self.state = 1127 + self.match(CPP14Parser.Semi) + self.state = 1129 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 1128 + self.expression(0) + + + self.state = 1131 + self.match(CPP14Parser.RightParen) + self.state = 1132 + self.statement() + pass + + elif la_ == 4: + localctx = CPP14Parser.ForRangeStatementContext(self, localctx) + self.enterOuterAlt(localctx, 4) + self.state = 1134 + self.match(CPP14Parser.For) + self.state = 1135 + self.match(CPP14Parser.LeftParen) + self.state = 1136 + self.forrangedeclaration() + self.state = 1137 + self.match(CPP14Parser.Colon) + self.state = 1138 + self.forrangeinitializer() + self.state = 1139 + self.match(CPP14Parser.RightParen) + self.state = 1140 + self.statement() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ForinitstatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expressionstatement(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionstatementContext,0) + + + def simpledeclaration(self): + return self.getTypedRuleContext(CPP14Parser.SimpledeclarationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_forinitstatement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterForinitstatement" ): + listener.enterForinitstatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitForinitstatement" ): + listener.exitForinitstatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitForinitstatement" ): + return visitor.visitForinitstatement(self) + else: + return visitor.visitChildren(self) + + + + + def forinitstatement(self): + + localctx = CPP14Parser.ForinitstatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 112, self.RULE_forinitstatement) + try: + self.state = 1146 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,96,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1144 + self.expressionstatement() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1145 + self.simpledeclaration() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ForrangedeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def declspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclspecifierseqContext,0) + + + def declarator(self): + return self.getTypedRuleContext(CPP14Parser.DeclaratorContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_forrangedeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterForrangedeclaration" ): + listener.enterForrangedeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitForrangedeclaration" ): + listener.exitForrangedeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitForrangedeclaration" ): + return visitor.visitForrangedeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def forrangedeclaration(self): + + localctx = CPP14Parser.ForrangedeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 114, self.RULE_forrangedeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1149 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1148 + self.attributespecifierseq(0) + + + self.state = 1151 + self.declspecifierseq() + self.state = 1152 + self.declarator() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ForrangeinitializerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def bracedinitlist(self): + return self.getTypedRuleContext(CPP14Parser.BracedinitlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_forrangeinitializer + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterForrangeinitializer" ): + listener.enterForrangeinitializer(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitForrangeinitializer" ): + listener.exitForrangeinitializer(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitForrangeinitializer" ): + return visitor.visitForrangeinitializer(self) + else: + return visitor.visitChildren(self) + + + + + def forrangeinitializer(self): + + localctx = CPP14Parser.ForrangeinitializerContext(self, self._ctx, self.state) + self.enterRule(localctx, 116, self.RULE_forrangeinitializer) + try: + self.state = 1156 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Alignof, CPP14Parser.Auto, CPP14Parser.Bool, CPP14Parser.Char, CPP14Parser.Char16, CPP14Parser.Char32, CPP14Parser.Const_cast, CPP14Parser.Decltype, CPP14Parser.Delete, CPP14Parser.Double, CPP14Parser.Dynamic_cast, CPP14Parser.FalseToken, CPP14Parser.Float, CPP14Parser.Int, CPP14Parser.Long, CPP14Parser.New, CPP14Parser.Noexcept, CPP14Parser.Nullptr, CPP14Parser.Operator, CPP14Parser.Reinterpret_cast, CPP14Parser.Short, CPP14Parser.Signed, CPP14Parser.Sizeof, CPP14Parser.Static_cast, CPP14Parser.This, CPP14Parser.Throw, CPP14Parser.TrueToken, CPP14Parser.Typeid, CPP14Parser.Typename, CPP14Parser.Unsigned, CPP14Parser.Void, CPP14Parser.Wchar, CPP14Parser.LeftParen, CPP14Parser.LeftBracket, CPP14Parser.Plus, CPP14Parser.Minus, CPP14Parser.Star, CPP14Parser.And, CPP14Parser.Or, CPP14Parser.Tilde, CPP14Parser.Not, CPP14Parser.PlusPlus, CPP14Parser.MinusMinus, CPP14Parser.Doublecolon, CPP14Parser.Identifier, CPP14Parser.Integerliteral, CPP14Parser.Characterliteral, CPP14Parser.Floatingliteral, CPP14Parser.Stringliteral, CPP14Parser.Userdefinedintegerliteral, CPP14Parser.Userdefinedfloatingliteral, CPP14Parser.Userdefinedstringliteral, CPP14Parser.Userdefinedcharacterliteral]: + self.enterOuterAlt(localctx, 1) + self.state = 1154 + self.expression(0) + pass + elif token in [CPP14Parser.LeftBrace]: + self.enterOuterAlt(localctx, 2) + self.state = 1155 + self.bracedinitlist() + 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 JumpstatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Break(self): + return self.getToken(CPP14Parser.Break, 0) + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def Continue(self): + return self.getToken(CPP14Parser.Continue, 0) + + def Return(self): + return self.getToken(CPP14Parser.Return, 0) + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def bracedinitlist(self): + return self.getTypedRuleContext(CPP14Parser.BracedinitlistContext,0) + + + def Goto(self): + return self.getToken(CPP14Parser.Goto, 0) + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_jumpstatement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterJumpstatement" ): + listener.enterJumpstatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitJumpstatement" ): + listener.exitJumpstatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitJumpstatement" ): + return visitor.visitJumpstatement(self) + else: + return visitor.visitChildren(self) + + + + + def jumpstatement(self): + + localctx = CPP14Parser.JumpstatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 118, self.RULE_jumpstatement) + self._la = 0 # Token type + try: + self.state = 1174 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,100,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1158 + self.match(CPP14Parser.Break) + self.state = 1159 + self.match(CPP14Parser.Semi) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1160 + self.match(CPP14Parser.Continue) + self.state = 1161 + self.match(CPP14Parser.Semi) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1162 + self.match(CPP14Parser.Return) + self.state = 1164 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 1163 + self.expression(0) + + + self.state = 1166 + self.match(CPP14Parser.Semi) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1167 + self.match(CPP14Parser.Return) + self.state = 1168 + self.bracedinitlist() + self.state = 1169 + self.match(CPP14Parser.Semi) + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 1171 + self.match(CPP14Parser.Goto) + self.state = 1172 + self.match(CPP14Parser.Identifier) + self.state = 1173 + self.match(CPP14Parser.Semi) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DeclarationstatementContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def blockdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.BlockdeclarationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_declarationstatement + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDeclarationstatement" ): + listener.enterDeclarationstatement(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDeclarationstatement" ): + listener.exitDeclarationstatement(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDeclarationstatement" ): + return visitor.visitDeclarationstatement(self) + else: + return visitor.visitChildren(self) + + + + + def declarationstatement(self): + + localctx = CPP14Parser.DeclarationstatementContext(self, self._ctx, self.state) + self.enterRule(localctx, 120, self.RULE_declarationstatement) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1176 + self.blockdeclaration() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DeclarationseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def declaration(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationContext,0) + + + def declarationseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_declarationseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDeclarationseq" ): + listener.enterDeclarationseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDeclarationseq" ): + listener.exitDeclarationseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDeclarationseq" ): + return visitor.visitDeclarationseq(self) + else: + return visitor.visitChildren(self) + + + + def declarationseq(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.DeclarationseqContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 122 + self.enterRecursionRule(localctx, 122, self.RULE_declarationseq, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1179 + self.declaration() + self._ctx.stop = self._input.LT(-1) + self.state = 1185 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,101,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.DeclarationseqContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_declarationseq) + self.state = 1181 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1182 + self.declaration() + self.state = 1187 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,101,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class DeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def blockdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.BlockdeclarationContext,0) + + + def functiondefinition(self): + return self.getTypedRuleContext(CPP14Parser.FunctiondefinitionContext,0) + + + def templatedeclaration(self): + return self.getTypedRuleContext(CPP14Parser.TemplatedeclarationContext,0) + + + def explicitinstantiation(self): + return self.getTypedRuleContext(CPP14Parser.ExplicitinstantiationContext,0) + + + def explicitspecialization(self): + return self.getTypedRuleContext(CPP14Parser.ExplicitspecializationContext,0) + + + def linkagespecification(self): + return self.getTypedRuleContext(CPP14Parser.LinkagespecificationContext,0) + + + def namespacedefinition(self): + return self.getTypedRuleContext(CPP14Parser.NamespacedefinitionContext,0) + + + def emptydeclaration(self): + return self.getTypedRuleContext(CPP14Parser.EmptydeclarationContext,0) + + + def attributedeclaration(self): + return self.getTypedRuleContext(CPP14Parser.AttributedeclarationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_declaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDeclaration" ): + listener.enterDeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDeclaration" ): + listener.exitDeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDeclaration" ): + return visitor.visitDeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def declaration(self): + + localctx = CPP14Parser.DeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 124, self.RULE_declaration) + try: + self.state = 1197 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,102,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1188 + self.blockdeclaration() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1189 + self.functiondefinition() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1190 + self.templatedeclaration() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1191 + self.explicitinstantiation() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 1192 + self.explicitspecialization() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 1193 + self.linkagespecification() + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 1194 + self.namespacedefinition() + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 1195 + self.emptydeclaration() + pass + + elif la_ == 9: + self.enterOuterAlt(localctx, 9) + self.state = 1196 + self.attributedeclaration() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BlockdeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def simpledeclaration(self): + return self.getTypedRuleContext(CPP14Parser.SimpledeclarationContext,0) + + + def asmdefinition(self): + return self.getTypedRuleContext(CPP14Parser.AsmdefinitionContext,0) + + + def namespacealiasdefinition(self): + return self.getTypedRuleContext(CPP14Parser.NamespacealiasdefinitionContext,0) + + + def usingdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.UsingdeclarationContext,0) + + + def usingdirective(self): + return self.getTypedRuleContext(CPP14Parser.UsingdirectiveContext,0) + + + def static_assertdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.Static_assertdeclarationContext,0) + + + def aliasdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.AliasdeclarationContext,0) + + + def opaqueenumdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.OpaqueenumdeclarationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_blockdeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBlockdeclaration" ): + listener.enterBlockdeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBlockdeclaration" ): + listener.exitBlockdeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBlockdeclaration" ): + return visitor.visitBlockdeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def blockdeclaration(self): + + localctx = CPP14Parser.BlockdeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 126, self.RULE_blockdeclaration) + try: + self.state = 1207 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,103,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1199 + self.simpledeclaration() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1200 + self.asmdefinition() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1201 + self.namespacealiasdefinition() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1202 + self.usingdeclaration() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 1203 + self.usingdirective() + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 1204 + self.static_assertdeclaration() + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 1205 + self.aliasdeclaration() + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 1206 + self.opaqueenumdeclaration() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AliasdeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Using(self): + return self.getToken(CPP14Parser.Using, 0) + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_aliasdeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAliasdeclaration" ): + listener.enterAliasdeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAliasdeclaration" ): + listener.exitAliasdeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAliasdeclaration" ): + return visitor.visitAliasdeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def aliasdeclaration(self): + + localctx = CPP14Parser.AliasdeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 128, self.RULE_aliasdeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1209 + self.match(CPP14Parser.Using) + self.state = 1210 + self.match(CPP14Parser.Identifier) + self.state = 1212 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1211 + self.attributespecifierseq(0) + + + self.state = 1214 + self.match(CPP14Parser.Assign) + self.state = 1215 + self.thetypeid() + self.state = 1216 + self.match(CPP14Parser.Semi) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SimpledeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def declspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclspecifierseqContext,0) + + + def initdeclaratorlist(self): + return self.getTypedRuleContext(CPP14Parser.InitdeclaratorlistContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_simpledeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSimpledeclaration" ): + listener.enterSimpledeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSimpledeclaration" ): + listener.exitSimpledeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSimpledeclaration" ): + return visitor.visitSimpledeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def simpledeclaration(self): + + localctx = CPP14Parser.SimpledeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 130, self.RULE_simpledeclaration) + self._la = 0 # Token type + try: + self.state = 1232 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Auto, CPP14Parser.Bool, CPP14Parser.Char, CPP14Parser.Char16, CPP14Parser.Char32, CPP14Parser.Class, CPP14Parser.Const, CPP14Parser.Constexpr, CPP14Parser.Decltype, CPP14Parser.Double, CPP14Parser.Enum, CPP14Parser.Explicit, CPP14Parser.Extern, CPP14Parser.Float, CPP14Parser.Friend, CPP14Parser.Inline, CPP14Parser.Int, CPP14Parser.Long, CPP14Parser.Mutable, CPP14Parser.Operator, CPP14Parser.Register, CPP14Parser.Short, CPP14Parser.Signed, CPP14Parser.Static, CPP14Parser.Struct, CPP14Parser.Thread_local, CPP14Parser.Typedef, CPP14Parser.Typename, CPP14Parser.Union, CPP14Parser.Unsigned, CPP14Parser.Virtual, CPP14Parser.Void, CPP14Parser.Volatile, CPP14Parser.Wchar, CPP14Parser.LeftParen, CPP14Parser.Star, CPP14Parser.And, CPP14Parser.Tilde, CPP14Parser.AndAnd, CPP14Parser.Doublecolon, CPP14Parser.Semi, CPP14Parser.Ellipsis, CPP14Parser.Identifier]: + self.enterOuterAlt(localctx, 1) + self.state = 1219 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,105,self._ctx) + if la_ == 1: + self.state = 1218 + self.declspecifierseq() + + + self.state = 1222 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Decltype or _la==CPP14Parser.Operator or ((((_la - 78)) & ~0x3f) == 0 and ((1 << (_la - 78)) & ((1 << (CPP14Parser.LeftParen - 78)) | (1 << (CPP14Parser.Star - 78)) | (1 << (CPP14Parser.And - 78)) | (1 << (CPP14Parser.Tilde - 78)) | (1 << (CPP14Parser.AndAnd - 78)) | (1 << (CPP14Parser.Doublecolon - 78)) | (1 << (CPP14Parser.Ellipsis - 78)) | (1 << (CPP14Parser.Identifier - 78)))) != 0): + self.state = 1221 + self.initdeclaratorlist(0) + + + self.state = 1224 + self.match(CPP14Parser.Semi) + pass + elif token in [CPP14Parser.Alignas, CPP14Parser.LeftBracket]: + self.enterOuterAlt(localctx, 2) + self.state = 1225 + self.attributespecifierseq(0) + self.state = 1227 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,107,self._ctx) + if la_ == 1: + self.state = 1226 + self.declspecifierseq() + + + self.state = 1229 + self.initdeclaratorlist(0) + self.state = 1230 + self.match(CPP14Parser.Semi) + 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 Static_assertdeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Static_assert(self): + return self.getToken(CPP14Parser.Static_assert, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def Stringliteral(self): + return self.getToken(CPP14Parser.Stringliteral, 0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_static_assertdeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStatic_assertdeclaration" ): + listener.enterStatic_assertdeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStatic_assertdeclaration" ): + listener.exitStatic_assertdeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitStatic_assertdeclaration" ): + return visitor.visitStatic_assertdeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def static_assertdeclaration(self): + + localctx = CPP14Parser.Static_assertdeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 132, self.RULE_static_assertdeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1234 + self.match(CPP14Parser.Static_assert) + self.state = 1235 + self.match(CPP14Parser.LeftParen) + self.state = 1236 + self.constantexpression() + self.state = 1237 + self.match(CPP14Parser.Comma) + self.state = 1238 + self.match(CPP14Parser.Stringliteral) + self.state = 1239 + self.match(CPP14Parser.RightParen) + self.state = 1240 + self.match(CPP14Parser.Semi) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EmptydeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_emptydeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEmptydeclaration" ): + listener.enterEmptydeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEmptydeclaration" ): + listener.exitEmptydeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEmptydeclaration" ): + return visitor.visitEmptydeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def emptydeclaration(self): + + localctx = CPP14Parser.EmptydeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 134, self.RULE_emptydeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1242 + self.match(CPP14Parser.Semi) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AttributedeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_attributedeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttributedeclaration" ): + listener.enterAttributedeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttributedeclaration" ): + listener.exitAttributedeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAttributedeclaration" ): + return visitor.visitAttributedeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def attributedeclaration(self): + + localctx = CPP14Parser.AttributedeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 136, self.RULE_attributedeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1244 + self.attributespecifierseq(0) + self.state = 1245 + self.match(CPP14Parser.Semi) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DeclspecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_declspecifier + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class TypedefDeclContext(DeclspecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.DeclspecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def Typedef(self): + return self.getToken(CPP14Parser.Typedef, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypedefDecl" ): + listener.enterTypedefDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypedefDecl" ): + listener.exitTypedefDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTypedefDecl" ): + return visitor.visitTypedefDecl(self) + else: + return visitor.visitChildren(self) + + + class FriendDeclContext(DeclspecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.DeclspecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def Friend(self): + return self.getToken(CPP14Parser.Friend, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFriendDecl" ): + listener.enterFriendDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFriendDecl" ): + listener.exitFriendDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFriendDecl" ): + return visitor.visitFriendDecl(self) + else: + return visitor.visitChildren(self) + + + class ConstExprDeclContext(DeclspecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.DeclspecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def Constexpr(self): + return self.getToken(CPP14Parser.Constexpr, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConstExprDecl" ): + listener.enterConstExprDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConstExprDecl" ): + listener.exitConstExprDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitConstExprDecl" ): + return visitor.visitConstExprDecl(self) + else: + return visitor.visitChildren(self) + + + class TypeAttrContext(DeclspecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.DeclspecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def typespecifier(self): + return self.getTypedRuleContext(CPP14Parser.TypespecifierContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeAttr" ): + listener.enterTypeAttr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeAttr" ): + listener.exitTypeAttr(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTypeAttr" ): + return visitor.visitTypeAttr(self) + else: + return visitor.visitChildren(self) + + + class FuncAttrContext(DeclspecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.DeclspecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def functionspecifier(self): + return self.getTypedRuleContext(CPP14Parser.FunctionspecifierContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFuncAttr" ): + listener.enterFuncAttr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFuncAttr" ): + listener.exitFuncAttr(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFuncAttr" ): + return visitor.visitFuncAttr(self) + else: + return visitor.visitChildren(self) + + + class StorageAttrContext(DeclspecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.DeclspecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def storageclassspecifier(self): + return self.getTypedRuleContext(CPP14Parser.StorageclassspecifierContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStorageAttr" ): + listener.enterStorageAttr(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStorageAttr" ): + listener.exitStorageAttr(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitStorageAttr" ): + return visitor.visitStorageAttr(self) + else: + return visitor.visitChildren(self) + + + + def declspecifier(self): + + localctx = CPP14Parser.DeclspecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 138, self.RULE_declspecifier) + try: + self.state = 1253 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Extern, CPP14Parser.Mutable, CPP14Parser.Register, CPP14Parser.Static, CPP14Parser.Thread_local]: + localctx = CPP14Parser.StorageAttrContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 1247 + self.storageclassspecifier() + pass + elif token in [CPP14Parser.Auto, CPP14Parser.Bool, CPP14Parser.Char, CPP14Parser.Char16, CPP14Parser.Char32, CPP14Parser.Class, CPP14Parser.Const, CPP14Parser.Decltype, CPP14Parser.Double, CPP14Parser.Enum, CPP14Parser.Float, CPP14Parser.Int, CPP14Parser.Long, CPP14Parser.Short, CPP14Parser.Signed, CPP14Parser.Struct, CPP14Parser.Typename, CPP14Parser.Union, CPP14Parser.Unsigned, CPP14Parser.Void, CPP14Parser.Volatile, CPP14Parser.Wchar, CPP14Parser.Doublecolon, CPP14Parser.Identifier]: + localctx = CPP14Parser.TypeAttrContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 1248 + self.typespecifier() + pass + elif token in [CPP14Parser.Explicit, CPP14Parser.Inline, CPP14Parser.Virtual]: + localctx = CPP14Parser.FuncAttrContext(self, localctx) + self.enterOuterAlt(localctx, 3) + self.state = 1249 + self.functionspecifier() + pass + elif token in [CPP14Parser.Friend]: + localctx = CPP14Parser.FriendDeclContext(self, localctx) + self.enterOuterAlt(localctx, 4) + self.state = 1250 + self.match(CPP14Parser.Friend) + pass + elif token in [CPP14Parser.Typedef]: + localctx = CPP14Parser.TypedefDeclContext(self, localctx) + self.enterOuterAlt(localctx, 5) + self.state = 1251 + self.match(CPP14Parser.Typedef) + pass + elif token in [CPP14Parser.Constexpr]: + localctx = CPP14Parser.ConstExprDeclContext(self, localctx) + self.enterOuterAlt(localctx, 6) + self.state = 1252 + self.match(CPP14Parser.Constexpr) + 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 DeclspecifierseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def declspecifier(self): + return self.getTypedRuleContext(CPP14Parser.DeclspecifierContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def declspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclspecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_declspecifierseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDeclspecifierseq" ): + listener.enterDeclspecifierseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDeclspecifierseq" ): + listener.exitDeclspecifierseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDeclspecifierseq" ): + return visitor.visitDeclspecifierseq(self) + else: + return visitor.visitChildren(self) + + + + + def declspecifierseq(self): + + localctx = CPP14Parser.DeclspecifierseqContext(self, self._ctx, self.state) + self.enterRule(localctx, 140, self.RULE_declspecifierseq) + try: + self.state = 1262 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,111,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1255 + self.declspecifier() + self.state = 1257 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,110,self._ctx) + if la_ == 1: + self.state = 1256 + self.attributespecifierseq(0) + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1259 + self.declspecifier() + self.state = 1260 + self.declspecifierseq() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class StorageclassspecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Register(self): + return self.getToken(CPP14Parser.Register, 0) + + def Static(self): + return self.getToken(CPP14Parser.Static, 0) + + def Thread_local(self): + return self.getToken(CPP14Parser.Thread_local, 0) + + def Extern(self): + return self.getToken(CPP14Parser.Extern, 0) + + def Mutable(self): + return self.getToken(CPP14Parser.Mutable, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_storageclassspecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterStorageclassspecifier" ): + listener.enterStorageclassspecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitStorageclassspecifier" ): + listener.exitStorageclassspecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitStorageclassspecifier" ): + return visitor.visitStorageclassspecifier(self) + else: + return visitor.visitChildren(self) + + + + + def storageclassspecifier(self): + + localctx = CPP14Parser.StorageclassspecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 142, self.RULE_storageclassspecifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1264 + _la = self._input.LA(1) + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Extern) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Thread_local))) != 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 FunctionspecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Inline(self): + return self.getToken(CPP14Parser.Inline, 0) + + def Virtual(self): + return self.getToken(CPP14Parser.Virtual, 0) + + def Explicit(self): + return self.getToken(CPP14Parser.Explicit, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_functionspecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFunctionspecifier" ): + listener.enterFunctionspecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFunctionspecifier" ): + listener.exitFunctionspecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunctionspecifier" ): + return visitor.visitFunctionspecifier(self) + else: + return visitor.visitChildren(self) + + + + + def functionspecifier(self): + + localctx = CPP14Parser.FunctionspecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 144, self.RULE_functionspecifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1266 + _la = self._input.LA(1) + if not(((((_la - 27)) & ~0x3f) == 0 and ((1 << (_la - 27)) & ((1 << (CPP14Parser.Explicit - 27)) | (1 << (CPP14Parser.Inline - 27)) | (1 << (CPP14Parser.Virtual - 27)))) != 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 TypedefnameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_typedefname + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypedefname" ): + listener.enterTypedefname(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypedefname" ): + listener.exitTypedefname(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTypedefname" ): + return visitor.visitTypedefname(self) + else: + return visitor.visitChildren(self) + + + + + def typedefname(self): + + localctx = CPP14Parser.TypedefnameContext(self, self._ctx, self.state) + self.enterRule(localctx, 146, self.RULE_typedefname) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1268 + self.match(CPP14Parser.Identifier) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_typespecifier + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class EnumDeclContext(TypespecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.TypespecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def enumspecifier(self): + return self.getTypedRuleContext(CPP14Parser.EnumspecifierContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumDecl" ): + listener.enterEnumDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumDecl" ): + listener.exitEnumDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEnumDecl" ): + return visitor.visitEnumDecl(self) + else: + return visitor.visitChildren(self) + + + class OtherDeclContext(TypespecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.TypespecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def trailingtypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.TrailingtypespecifierContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOtherDecl" ): + listener.enterOtherDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOtherDecl" ): + listener.exitOtherDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitOtherDecl" ): + return visitor.visitOtherDecl(self) + else: + return visitor.visitChildren(self) + + + class ClassDeclContext(TypespecifierContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.TypespecifierContext + super().__init__(parser) + self.copyFrom(ctx) + + def classspecifier(self): + return self.getTypedRuleContext(CPP14Parser.ClassspecifierContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassDecl" ): + listener.enterClassDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassDecl" ): + listener.exitClassDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClassDecl" ): + return visitor.visitClassDecl(self) + else: + return visitor.visitChildren(self) + + + + def typespecifier(self): + + localctx = CPP14Parser.TypespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 148, self.RULE_typespecifier) + try: + self.state = 1273 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,112,self._ctx) + if la_ == 1: + localctx = CPP14Parser.OtherDeclContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 1270 + self.trailingtypespecifier() + pass + + elif la_ == 2: + localctx = CPP14Parser.ClassDeclContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 1271 + self.classspecifier() + pass + + elif la_ == 3: + localctx = CPP14Parser.EnumDeclContext(self, localctx) + self.enterOuterAlt(localctx, 3) + self.state = 1272 + self.enumspecifier() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TrailingtypespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def simpletypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.SimpletypespecifierContext,0) + + + def elaboratedtypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.ElaboratedtypespecifierContext,0) + + + def typenamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.TypenamespecifierContext,0) + + + def cvqualifier(self): + return self.getTypedRuleContext(CPP14Parser.CvqualifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_trailingtypespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTrailingtypespecifier" ): + listener.enterTrailingtypespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTrailingtypespecifier" ): + listener.exitTrailingtypespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTrailingtypespecifier" ): + return visitor.visitTrailingtypespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def trailingtypespecifier(self): + + localctx = CPP14Parser.TrailingtypespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 150, self.RULE_trailingtypespecifier) + try: + self.state = 1279 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Auto, CPP14Parser.Bool, CPP14Parser.Char, CPP14Parser.Char16, CPP14Parser.Char32, CPP14Parser.Decltype, CPP14Parser.Double, CPP14Parser.Float, CPP14Parser.Int, CPP14Parser.Long, CPP14Parser.Short, CPP14Parser.Signed, CPP14Parser.Unsigned, CPP14Parser.Void, CPP14Parser.Wchar, CPP14Parser.Doublecolon, CPP14Parser.Identifier]: + self.enterOuterAlt(localctx, 1) + self.state = 1275 + self.simpletypespecifier() + pass + elif token in [CPP14Parser.Class, CPP14Parser.Enum, CPP14Parser.Struct, CPP14Parser.Union]: + self.enterOuterAlt(localctx, 2) + self.state = 1276 + self.elaboratedtypespecifier() + pass + elif token in [CPP14Parser.Typename]: + self.enterOuterAlt(localctx, 3) + self.state = 1277 + self.typenamespecifier() + pass + elif token in [CPP14Parser.Const, CPP14Parser.Volatile]: + self.enterOuterAlt(localctx, 4) + self.state = 1278 + self.cvqualifier() + 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 TypespecifierseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typespecifier(self): + return self.getTypedRuleContext(CPP14Parser.TypespecifierContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def typespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.TypespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_typespecifierseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypespecifierseq" ): + listener.enterTypespecifierseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypespecifierseq" ): + listener.exitTypespecifierseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTypespecifierseq" ): + return visitor.visitTypespecifierseq(self) + else: + return visitor.visitChildren(self) + + + + + def typespecifierseq(self): + + localctx = CPP14Parser.TypespecifierseqContext(self, self._ctx, self.state) + self.enterRule(localctx, 152, self.RULE_typespecifierseq) + try: + self.state = 1288 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,115,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1281 + self.typespecifier() + self.state = 1283 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,114,self._ctx) + if la_ == 1: + self.state = 1282 + self.attributespecifierseq(0) + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1285 + self.typespecifier() + self.state = 1286 + self.typespecifierseq() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TrailingtypespecifierseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def trailingtypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.TrailingtypespecifierContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def trailingtypespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.TrailingtypespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_trailingtypespecifierseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTrailingtypespecifierseq" ): + listener.enterTrailingtypespecifierseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTrailingtypespecifierseq" ): + listener.exitTrailingtypespecifierseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTrailingtypespecifierseq" ): + return visitor.visitTrailingtypespecifierseq(self) + else: + return visitor.visitChildren(self) + + + + + def trailingtypespecifierseq(self): + + localctx = CPP14Parser.TrailingtypespecifierseqContext(self, self._ctx, self.state) + self.enterRule(localctx, 154, self.RULE_trailingtypespecifierseq) + try: + self.state = 1297 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,117,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1290 + self.trailingtypespecifier() + self.state = 1292 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,116,self._ctx) + if la_ == 1: + self.state = 1291 + self.attributespecifierseq(0) + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1294 + self.trailingtypespecifier() + self.state = 1295 + self.trailingtypespecifierseq() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SimpletypespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def thetypename(self): + return self.getTypedRuleContext(CPP14Parser.ThetypenameContext,0) + + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def simpletemplateid(self): + return self.getTypedRuleContext(CPP14Parser.SimpletemplateidContext,0) + + + def Char(self): + return self.getToken(CPP14Parser.Char, 0) + + def Char16(self): + return self.getToken(CPP14Parser.Char16, 0) + + def Char32(self): + return self.getToken(CPP14Parser.Char32, 0) + + def Wchar(self): + return self.getToken(CPP14Parser.Wchar, 0) + + def Bool(self): + return self.getToken(CPP14Parser.Bool, 0) + + def Short(self): + return self.getToken(CPP14Parser.Short, 0) + + def Int(self): + return self.getToken(CPP14Parser.Int, 0) + + def Long(self): + return self.getToken(CPP14Parser.Long, 0) + + def Signed(self): + return self.getToken(CPP14Parser.Signed, 0) + + def Unsigned(self): + return self.getToken(CPP14Parser.Unsigned, 0) + + def Float(self): + return self.getToken(CPP14Parser.Float, 0) + + def Double(self): + return self.getToken(CPP14Parser.Double, 0) + + def Void(self): + return self.getToken(CPP14Parser.Void, 0) + + def Auto(self): + return self.getToken(CPP14Parser.Auto, 0) + + def decltypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.DecltypespecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_simpletypespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSimpletypespecifier" ): + listener.enterSimpletypespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSimpletypespecifier" ): + listener.exitSimpletypespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSimpletypespecifier" ): + return visitor.visitSimpletypespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def simpletypespecifier(self): + + localctx = CPP14Parser.SimpletypespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 156, self.RULE_simpletypespecifier) + try: + self.state = 1322 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,119,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1300 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,118,self._ctx) + if la_ == 1: + self.state = 1299 + self.nestednamespecifier(0) + + + self.state = 1302 + self.thetypename() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1303 + self.nestednamespecifier(0) + self.state = 1304 + self.match(CPP14Parser.Template) + self.state = 1305 + self.simpletemplateid() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1307 + self.match(CPP14Parser.Char) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1308 + self.match(CPP14Parser.Char16) + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 1309 + self.match(CPP14Parser.Char32) + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 1310 + self.match(CPP14Parser.Wchar) + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 1311 + self.match(CPP14Parser.Bool) + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 1312 + self.match(CPP14Parser.Short) + pass + + elif la_ == 9: + self.enterOuterAlt(localctx, 9) + self.state = 1313 + self.match(CPP14Parser.Int) + pass + + elif la_ == 10: + self.enterOuterAlt(localctx, 10) + self.state = 1314 + self.match(CPP14Parser.Long) + pass + + elif la_ == 11: + self.enterOuterAlt(localctx, 11) + self.state = 1315 + self.match(CPP14Parser.Signed) + pass + + elif la_ == 12: + self.enterOuterAlt(localctx, 12) + self.state = 1316 + self.match(CPP14Parser.Unsigned) + pass + + elif la_ == 13: + self.enterOuterAlt(localctx, 13) + self.state = 1317 + self.match(CPP14Parser.Float) + pass + + elif la_ == 14: + self.enterOuterAlt(localctx, 14) + self.state = 1318 + self.match(CPP14Parser.Double) + pass + + elif la_ == 15: + self.enterOuterAlt(localctx, 15) + self.state = 1319 + self.match(CPP14Parser.Void) + pass + + elif la_ == 16: + self.enterOuterAlt(localctx, 16) + self.state = 1320 + self.match(CPP14Parser.Auto) + pass + + elif la_ == 17: + self.enterOuterAlt(localctx, 17) + self.state = 1321 + self.decltypespecifier() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ThetypenameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classname(self): + return self.getTypedRuleContext(CPP14Parser.ClassnameContext,0) + + + def enumname(self): + return self.getTypedRuleContext(CPP14Parser.EnumnameContext,0) + + + def typedefname(self): + return self.getTypedRuleContext(CPP14Parser.TypedefnameContext,0) + + + def simpletemplateid(self): + return self.getTypedRuleContext(CPP14Parser.SimpletemplateidContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_thetypename + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterThetypename" ): + listener.enterThetypename(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitThetypename" ): + listener.exitThetypename(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitThetypename" ): + return visitor.visitThetypename(self) + else: + return visitor.visitChildren(self) + + + + + def thetypename(self): + + localctx = CPP14Parser.ThetypenameContext(self, self._ctx, self.state) + self.enterRule(localctx, 158, self.RULE_thetypename) + try: + self.state = 1328 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,120,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1324 + self.classname() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1325 + self.enumname() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1326 + self.typedefname() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1327 + self.simpletemplateid() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DecltypespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Decltype(self): + return self.getToken(CPP14Parser.Decltype, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def expression(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def Auto(self): + return self.getToken(CPP14Parser.Auto, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_decltypespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDecltypespecifier" ): + listener.enterDecltypespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDecltypespecifier" ): + listener.exitDecltypespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDecltypespecifier" ): + return visitor.visitDecltypespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def decltypespecifier(self): + + localctx = CPP14Parser.DecltypespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 160, self.RULE_decltypespecifier) + try: + self.state = 1339 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,121,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1330 + self.match(CPP14Parser.Decltype) + self.state = 1331 + self.match(CPP14Parser.LeftParen) + self.state = 1332 + self.expression(0) + self.state = 1333 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1335 + self.match(CPP14Parser.Decltype) + self.state = 1336 + self.match(CPP14Parser.LeftParen) + self.state = 1337 + self.match(CPP14Parser.Auto) + self.state = 1338 + self.match(CPP14Parser.RightParen) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ElaboratedtypespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classkey(self): + return self.getTypedRuleContext(CPP14Parser.ClasskeyContext,0) + + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def simpletemplateid(self): + return self.getTypedRuleContext(CPP14Parser.SimpletemplateidContext,0) + + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def Enum(self): + return self.getToken(CPP14Parser.Enum, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_elaboratedtypespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterElaboratedtypespecifier" ): + listener.enterElaboratedtypespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitElaboratedtypespecifier" ): + listener.exitElaboratedtypespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitElaboratedtypespecifier" ): + return visitor.visitElaboratedtypespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def elaboratedtypespecifier(self): + + localctx = CPP14Parser.ElaboratedtypespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 162, self.RULE_elaboratedtypespecifier) + self._la = 0 # Token type + try: + self.state = 1365 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,126,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1341 + self.classkey() + self.state = 1343 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1342 + self.attributespecifierseq(0) + + + self.state = 1346 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,123,self._ctx) + if la_ == 1: + self.state = 1345 + self.nestednamespecifier(0) + + + self.state = 1348 + self.match(CPP14Parser.Identifier) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1350 + self.classkey() + self.state = 1351 + self.simpletemplateid() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1353 + self.classkey() + self.state = 1354 + self.nestednamespecifier(0) + self.state = 1356 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Template: + self.state = 1355 + self.match(CPP14Parser.Template) + + + self.state = 1358 + self.simpletemplateid() + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1360 + self.match(CPP14Parser.Enum) + self.state = 1362 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,125,self._ctx) + if la_ == 1: + self.state = 1361 + self.nestednamespecifier(0) + + + self.state = 1364 + self.match(CPP14Parser.Identifier) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumnameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_enumname + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumname" ): + listener.enterEnumname(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumname" ): + listener.exitEnumname(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEnumname" ): + return visitor.visitEnumname(self) + else: + return visitor.visitChildren(self) + + + + + def enumname(self): + + localctx = CPP14Parser.EnumnameContext(self, self._ctx, self.state) + self.enterRule(localctx, 164, self.RULE_enumname) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1367 + self.match(CPP14Parser.Identifier) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumspecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def enumhead(self): + return self.getTypedRuleContext(CPP14Parser.EnumheadContext,0) + + + def LeftBrace(self): + return self.getToken(CPP14Parser.LeftBrace, 0) + + def RightBrace(self): + return self.getToken(CPP14Parser.RightBrace, 0) + + def enumeratorlist(self): + return self.getTypedRuleContext(CPP14Parser.EnumeratorlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_enumspecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumspecifier" ): + listener.enterEnumspecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumspecifier" ): + listener.exitEnumspecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEnumspecifier" ): + return visitor.visitEnumspecifier(self) + else: + return visitor.visitChildren(self) + + + + + def enumspecifier(self): + + localctx = CPP14Parser.EnumspecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 166, self.RULE_enumspecifier) + self._la = 0 # Token type + try: + self.state = 1382 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,128,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1369 + self.enumhead() + self.state = 1370 + self.match(CPP14Parser.LeftBrace) + self.state = 1372 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Identifier: + self.state = 1371 + self.enumeratorlist(0) + + + self.state = 1374 + self.match(CPP14Parser.RightBrace) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1376 + self.enumhead() + self.state = 1377 + self.match(CPP14Parser.LeftBrace) + self.state = 1378 + self.enumeratorlist(0) + self.state = 1379 + self.match(CPP14Parser.Comma) + self.state = 1380 + self.match(CPP14Parser.RightBrace) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumheadContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def enumkey(self): + return self.getTypedRuleContext(CPP14Parser.EnumkeyContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def enumbase(self): + return self.getTypedRuleContext(CPP14Parser.EnumbaseContext,0) + + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_enumhead + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumhead" ): + listener.enterEnumhead(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumhead" ): + listener.exitEnumhead(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEnumhead" ): + return visitor.visitEnumhead(self) + else: + return visitor.visitChildren(self) + + + + + def enumhead(self): + + localctx = CPP14Parser.EnumheadContext(self, self._ctx, self.state) + self.enterRule(localctx, 168, self.RULE_enumhead) + self._la = 0 # Token type + try: + self.state = 1403 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,134,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1384 + self.enumkey() + self.state = 1386 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1385 + self.attributespecifierseq(0) + + + self.state = 1389 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Identifier: + self.state = 1388 + self.match(CPP14Parser.Identifier) + + + self.state = 1392 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Colon: + self.state = 1391 + self.enumbase() + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1394 + self.enumkey() + self.state = 1396 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1395 + self.attributespecifierseq(0) + + + self.state = 1398 + self.nestednamespecifier(0) + self.state = 1399 + self.match(CPP14Parser.Identifier) + self.state = 1401 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Colon: + self.state = 1400 + self.enumbase() + + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class OpaqueenumdeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def enumkey(self): + return self.getTypedRuleContext(CPP14Parser.EnumkeyContext,0) + + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def enumbase(self): + return self.getTypedRuleContext(CPP14Parser.EnumbaseContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_opaqueenumdeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOpaqueenumdeclaration" ): + listener.enterOpaqueenumdeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOpaqueenumdeclaration" ): + listener.exitOpaqueenumdeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitOpaqueenumdeclaration" ): + return visitor.visitOpaqueenumdeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def opaqueenumdeclaration(self): + + localctx = CPP14Parser.OpaqueenumdeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 170, self.RULE_opaqueenumdeclaration) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1405 + self.enumkey() + self.state = 1407 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1406 + self.attributespecifierseq(0) + + + self.state = 1409 + self.match(CPP14Parser.Identifier) + self.state = 1411 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Colon: + self.state = 1410 + self.enumbase() + + + self.state = 1413 + self.match(CPP14Parser.Semi) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumkeyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Enum(self): + return self.getToken(CPP14Parser.Enum, 0) + + def Class(self): + return self.getToken(CPP14Parser.Class, 0) + + def Struct(self): + return self.getToken(CPP14Parser.Struct, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_enumkey + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumkey" ): + listener.enterEnumkey(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumkey" ): + listener.exitEnumkey(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEnumkey" ): + return visitor.visitEnumkey(self) + else: + return visitor.visitChildren(self) + + + + + def enumkey(self): + + localctx = CPP14Parser.EnumkeyContext(self, self._ctx, self.state) + self.enterRule(localctx, 172, self.RULE_enumkey) + try: + self.state = 1420 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,137,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1415 + self.match(CPP14Parser.Enum) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1416 + self.match(CPP14Parser.Enum) + self.state = 1417 + self.match(CPP14Parser.Class) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1418 + self.match(CPP14Parser.Enum) + self.state = 1419 + self.match(CPP14Parser.Struct) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumbaseContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Colon(self): + return self.getToken(CPP14Parser.Colon, 0) + + def typespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.TypespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_enumbase + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumbase" ): + listener.enterEnumbase(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumbase" ): + listener.exitEnumbase(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEnumbase" ): + return visitor.visitEnumbase(self) + else: + return visitor.visitChildren(self) + + + + + def enumbase(self): + + localctx = CPP14Parser.EnumbaseContext(self, self._ctx, self.state) + self.enterRule(localctx, 174, self.RULE_enumbase) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1422 + self.match(CPP14Parser.Colon) + self.state = 1423 + self.typespecifierseq() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumeratorlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def enumeratordefinition(self): + return self.getTypedRuleContext(CPP14Parser.EnumeratordefinitionContext,0) + + + def enumeratorlist(self): + return self.getTypedRuleContext(CPP14Parser.EnumeratorlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_enumeratorlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumeratorlist" ): + listener.enterEnumeratorlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumeratorlist" ): + listener.exitEnumeratorlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEnumeratorlist" ): + return visitor.visitEnumeratorlist(self) + else: + return visitor.visitChildren(self) + + + + def enumeratorlist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.EnumeratorlistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 176 + self.enterRecursionRule(localctx, 176, self.RULE_enumeratorlist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1426 + self.enumeratordefinition() + self._ctx.stop = self._input.LT(-1) + self.state = 1433 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,138,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.EnumeratorlistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_enumeratorlist) + self.state = 1428 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1429 + self.match(CPP14Parser.Comma) + self.state = 1430 + self.enumeratordefinition() + self.state = 1435 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,138,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class EnumeratordefinitionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def enumerator(self): + return self.getTypedRuleContext(CPP14Parser.EnumeratorContext,0) + + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_enumeratordefinition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumeratordefinition" ): + listener.enterEnumeratordefinition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumeratordefinition" ): + listener.exitEnumeratordefinition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEnumeratordefinition" ): + return visitor.visitEnumeratordefinition(self) + else: + return visitor.visitChildren(self) + + + + + def enumeratordefinition(self): + + localctx = CPP14Parser.EnumeratordefinitionContext(self, self._ctx, self.state) + self.enterRule(localctx, 178, self.RULE_enumeratordefinition) + try: + self.state = 1441 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,139,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1436 + self.enumerator() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1437 + self.enumerator() + self.state = 1438 + self.match(CPP14Parser.Assign) + self.state = 1439 + self.constantexpression() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class EnumeratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_enumerator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterEnumerator" ): + listener.enterEnumerator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitEnumerator" ): + listener.exitEnumerator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitEnumerator" ): + return visitor.visitEnumerator(self) + else: + return visitor.visitChildren(self) + + + + + def enumerator(self): + + localctx = CPP14Parser.EnumeratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 180, self.RULE_enumerator) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1443 + self.match(CPP14Parser.Identifier) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NamespacenameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def originalnamespacename(self): + return self.getTypedRuleContext(CPP14Parser.OriginalnamespacenameContext,0) + + + def namespacealias(self): + return self.getTypedRuleContext(CPP14Parser.NamespacealiasContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_namespacename + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNamespacename" ): + listener.enterNamespacename(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNamespacename" ): + listener.exitNamespacename(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNamespacename" ): + return visitor.visitNamespacename(self) + else: + return visitor.visitChildren(self) + + + + + def namespacename(self): + + localctx = CPP14Parser.NamespacenameContext(self, self._ctx, self.state) + self.enterRule(localctx, 182, self.RULE_namespacename) + try: + self.state = 1447 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,140,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1445 + self.originalnamespacename() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1446 + self.namespacealias() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class OriginalnamespacenameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_originalnamespacename + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOriginalnamespacename" ): + listener.enterOriginalnamespacename(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOriginalnamespacename" ): + listener.exitOriginalnamespacename(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitOriginalnamespacename" ): + return visitor.visitOriginalnamespacename(self) + else: + return visitor.visitChildren(self) + + + + + def originalnamespacename(self): + + localctx = CPP14Parser.OriginalnamespacenameContext(self, self._ctx, self.state) + self.enterRule(localctx, 184, self.RULE_originalnamespacename) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1449 + self.match(CPP14Parser.Identifier) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NamespacedefinitionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def namednamespacedefinition(self): + return self.getTypedRuleContext(CPP14Parser.NamednamespacedefinitionContext,0) + + + def unnamednamespacedefinition(self): + return self.getTypedRuleContext(CPP14Parser.UnnamednamespacedefinitionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_namespacedefinition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNamespacedefinition" ): + listener.enterNamespacedefinition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNamespacedefinition" ): + listener.exitNamespacedefinition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNamespacedefinition" ): + return visitor.visitNamespacedefinition(self) + else: + return visitor.visitChildren(self) + + + + + def namespacedefinition(self): + + localctx = CPP14Parser.NamespacedefinitionContext(self, self._ctx, self.state) + self.enterRule(localctx, 186, self.RULE_namespacedefinition) + try: + self.state = 1453 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,141,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1451 + self.namednamespacedefinition() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1452 + self.unnamednamespacedefinition() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NamednamespacedefinitionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def originalnamespacedefinition(self): + return self.getTypedRuleContext(CPP14Parser.OriginalnamespacedefinitionContext,0) + + + def extensionnamespacedefinition(self): + return self.getTypedRuleContext(CPP14Parser.ExtensionnamespacedefinitionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_namednamespacedefinition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNamednamespacedefinition" ): + listener.enterNamednamespacedefinition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNamednamespacedefinition" ): + listener.exitNamednamespacedefinition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNamednamespacedefinition" ): + return visitor.visitNamednamespacedefinition(self) + else: + return visitor.visitChildren(self) + + + + + def namednamespacedefinition(self): + + localctx = CPP14Parser.NamednamespacedefinitionContext(self, self._ctx, self.state) + self.enterRule(localctx, 188, self.RULE_namednamespacedefinition) + try: + self.state = 1457 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,142,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1455 + self.originalnamespacedefinition() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1456 + self.extensionnamespacedefinition() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class OriginalnamespacedefinitionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Namespace(self): + return self.getToken(CPP14Parser.Namespace, 0) + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def LeftBrace(self): + return self.getToken(CPP14Parser.LeftBrace, 0) + + def namespacebody(self): + return self.getTypedRuleContext(CPP14Parser.NamespacebodyContext,0) + + + def RightBrace(self): + return self.getToken(CPP14Parser.RightBrace, 0) + + def Inline(self): + return self.getToken(CPP14Parser.Inline, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_originalnamespacedefinition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOriginalnamespacedefinition" ): + listener.enterOriginalnamespacedefinition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOriginalnamespacedefinition" ): + listener.exitOriginalnamespacedefinition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitOriginalnamespacedefinition" ): + return visitor.visitOriginalnamespacedefinition(self) + else: + return visitor.visitChildren(self) + + + + + def originalnamespacedefinition(self): + + localctx = CPP14Parser.OriginalnamespacedefinitionContext(self, self._ctx, self.state) + self.enterRule(localctx, 190, self.RULE_originalnamespacedefinition) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1460 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Inline: + self.state = 1459 + self.match(CPP14Parser.Inline) + + + self.state = 1462 + self.match(CPP14Parser.Namespace) + self.state = 1463 + self.match(CPP14Parser.Identifier) + self.state = 1464 + self.match(CPP14Parser.LeftBrace) + self.state = 1465 + self.namespacebody() + self.state = 1466 + self.match(CPP14Parser.RightBrace) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExtensionnamespacedefinitionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Namespace(self): + return self.getToken(CPP14Parser.Namespace, 0) + + def originalnamespacename(self): + return self.getTypedRuleContext(CPP14Parser.OriginalnamespacenameContext,0) + + + def LeftBrace(self): + return self.getToken(CPP14Parser.LeftBrace, 0) + + def namespacebody(self): + return self.getTypedRuleContext(CPP14Parser.NamespacebodyContext,0) + + + def RightBrace(self): + return self.getToken(CPP14Parser.RightBrace, 0) + + def Inline(self): + return self.getToken(CPP14Parser.Inline, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_extensionnamespacedefinition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExtensionnamespacedefinition" ): + listener.enterExtensionnamespacedefinition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExtensionnamespacedefinition" ): + listener.exitExtensionnamespacedefinition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExtensionnamespacedefinition" ): + return visitor.visitExtensionnamespacedefinition(self) + else: + return visitor.visitChildren(self) + + + + + def extensionnamespacedefinition(self): + + localctx = CPP14Parser.ExtensionnamespacedefinitionContext(self, self._ctx, self.state) + self.enterRule(localctx, 192, self.RULE_extensionnamespacedefinition) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1469 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Inline: + self.state = 1468 + self.match(CPP14Parser.Inline) + + + self.state = 1471 + self.match(CPP14Parser.Namespace) + self.state = 1472 + self.originalnamespacename() + self.state = 1473 + self.match(CPP14Parser.LeftBrace) + self.state = 1474 + self.namespacebody() + self.state = 1475 + self.match(CPP14Parser.RightBrace) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class UnnamednamespacedefinitionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Namespace(self): + return self.getToken(CPP14Parser.Namespace, 0) + + def LeftBrace(self): + return self.getToken(CPP14Parser.LeftBrace, 0) + + def namespacebody(self): + return self.getTypedRuleContext(CPP14Parser.NamespacebodyContext,0) + + + def RightBrace(self): + return self.getToken(CPP14Parser.RightBrace, 0) + + def Inline(self): + return self.getToken(CPP14Parser.Inline, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_unnamednamespacedefinition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterUnnamednamespacedefinition" ): + listener.enterUnnamednamespacedefinition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitUnnamednamespacedefinition" ): + listener.exitUnnamednamespacedefinition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitUnnamednamespacedefinition" ): + return visitor.visitUnnamednamespacedefinition(self) + else: + return visitor.visitChildren(self) + + + + + def unnamednamespacedefinition(self): + + localctx = CPP14Parser.UnnamednamespacedefinitionContext(self, self._ctx, self.state) + self.enterRule(localctx, 194, self.RULE_unnamednamespacedefinition) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1478 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Inline: + self.state = 1477 + self.match(CPP14Parser.Inline) + + + self.state = 1480 + self.match(CPP14Parser.Namespace) + self.state = 1481 + self.match(CPP14Parser.LeftBrace) + self.state = 1482 + self.namespacebody() + self.state = 1483 + self.match(CPP14Parser.RightBrace) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NamespacebodyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def declarationseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_namespacebody + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNamespacebody" ): + listener.enterNamespacebody(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNamespacebody" ): + listener.exitNamespacebody(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNamespacebody" ): + return visitor.visitNamespacebody(self) + else: + return visitor.visitChildren(self) + + + + + def namespacebody(self): + + localctx = CPP14Parser.NamespacebodyContext(self, self._ctx, self.state) + self.enterRule(localctx, 196, self.RULE_namespacebody) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1486 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Asm) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Constexpr) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Explicit) | (1 << CPP14Parser.Extern) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Friend) | (1 << CPP14Parser.Inline) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.Namespace) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Static_assert) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.Template) | (1 << CPP14Parser.Thread_local))) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & ((1 << (CPP14Parser.Typedef - 67)) | (1 << (CPP14Parser.Typename - 67)) | (1 << (CPP14Parser.Union - 67)) | (1 << (CPP14Parser.Unsigned - 67)) | (1 << (CPP14Parser.Using - 67)) | (1 << (CPP14Parser.Virtual - 67)) | (1 << (CPP14Parser.Void - 67)) | (1 << (CPP14Parser.Volatile - 67)) | (1 << (CPP14Parser.Wchar - 67)) | (1 << (CPP14Parser.LeftParen - 67)) | (1 << (CPP14Parser.LeftBracket - 67)) | (1 << (CPP14Parser.Star - 67)) | (1 << (CPP14Parser.And - 67)) | (1 << (CPP14Parser.Tilde - 67)) | (1 << (CPP14Parser.AndAnd - 67)) | (1 << (CPP14Parser.Doublecolon - 67)) | (1 << (CPP14Parser.Semi - 67)) | (1 << (CPP14Parser.Ellipsis - 67)) | (1 << (CPP14Parser.Identifier - 67)))) != 0): + self.state = 1485 + self.declarationseq(0) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NamespacealiasContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_namespacealias + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNamespacealias" ): + listener.enterNamespacealias(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNamespacealias" ): + listener.exitNamespacealias(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNamespacealias" ): + return visitor.visitNamespacealias(self) + else: + return visitor.visitChildren(self) + + + + + def namespacealias(self): + + localctx = CPP14Parser.NamespacealiasContext(self, self._ctx, self.state) + self.enterRule(localctx, 198, self.RULE_namespacealias) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1488 + self.match(CPP14Parser.Identifier) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NamespacealiasdefinitionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Namespace(self): + return self.getToken(CPP14Parser.Namespace, 0) + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def qualifiednamespacespecifier(self): + return self.getTypedRuleContext(CPP14Parser.QualifiednamespacespecifierContext,0) + + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_namespacealiasdefinition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNamespacealiasdefinition" ): + listener.enterNamespacealiasdefinition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNamespacealiasdefinition" ): + listener.exitNamespacealiasdefinition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNamespacealiasdefinition" ): + return visitor.visitNamespacealiasdefinition(self) + else: + return visitor.visitChildren(self) + + + + + def namespacealiasdefinition(self): + + localctx = CPP14Parser.NamespacealiasdefinitionContext(self, self._ctx, self.state) + self.enterRule(localctx, 200, self.RULE_namespacealiasdefinition) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1490 + self.match(CPP14Parser.Namespace) + self.state = 1491 + self.match(CPP14Parser.Identifier) + self.state = 1492 + self.match(CPP14Parser.Assign) + self.state = 1493 + self.qualifiednamespacespecifier() + self.state = 1494 + self.match(CPP14Parser.Semi) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class QualifiednamespacespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def namespacename(self): + return self.getTypedRuleContext(CPP14Parser.NamespacenameContext,0) + + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_qualifiednamespacespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterQualifiednamespacespecifier" ): + listener.enterQualifiednamespacespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitQualifiednamespacespecifier" ): + listener.exitQualifiednamespacespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitQualifiednamespacespecifier" ): + return visitor.visitQualifiednamespacespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def qualifiednamespacespecifier(self): + + localctx = CPP14Parser.QualifiednamespacespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 202, self.RULE_qualifiednamespacespecifier) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1497 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,147,self._ctx) + if la_ == 1: + self.state = 1496 + self.nestednamespecifier(0) + + + self.state = 1499 + self.namespacename() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class UsingdeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Using(self): + return self.getToken(CPP14Parser.Using, 0) + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def unqualifiedid(self): + return self.getTypedRuleContext(CPP14Parser.UnqualifiedidContext,0) + + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def Typename(self): + return self.getToken(CPP14Parser.Typename, 0) + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_usingdeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterUsingdeclaration" ): + listener.enterUsingdeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitUsingdeclaration" ): + listener.exitUsingdeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitUsingdeclaration" ): + return visitor.visitUsingdeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def usingdeclaration(self): + + localctx = CPP14Parser.UsingdeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 204, self.RULE_usingdeclaration) + self._la = 0 # Token type + try: + self.state = 1514 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,149,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1501 + self.match(CPP14Parser.Using) + self.state = 1503 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Typename: + self.state = 1502 + self.match(CPP14Parser.Typename) + + + self.state = 1505 + self.nestednamespecifier(0) + self.state = 1506 + self.unqualifiedid() + self.state = 1507 + self.match(CPP14Parser.Semi) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1509 + self.match(CPP14Parser.Using) + self.state = 1510 + self.match(CPP14Parser.Doublecolon) + self.state = 1511 + self.unqualifiedid() + self.state = 1512 + self.match(CPP14Parser.Semi) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class UsingdirectiveContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Using(self): + return self.getToken(CPP14Parser.Using, 0) + + def Namespace(self): + return self.getToken(CPP14Parser.Namespace, 0) + + def namespacename(self): + return self.getTypedRuleContext(CPP14Parser.NamespacenameContext,0) + + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_usingdirective + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterUsingdirective" ): + listener.enterUsingdirective(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitUsingdirective" ): + listener.exitUsingdirective(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitUsingdirective" ): + return visitor.visitUsingdirective(self) + else: + return visitor.visitChildren(self) + + + + + def usingdirective(self): + + localctx = CPP14Parser.UsingdirectiveContext(self, self._ctx, self.state) + self.enterRule(localctx, 206, self.RULE_usingdirective) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1517 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1516 + self.attributespecifierseq(0) + + + self.state = 1519 + self.match(CPP14Parser.Using) + self.state = 1520 + self.match(CPP14Parser.Namespace) + self.state = 1522 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,151,self._ctx) + if la_ == 1: + self.state = 1521 + self.nestednamespecifier(0) + + + self.state = 1524 + self.namespacename() + self.state = 1525 + self.match(CPP14Parser.Semi) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AsmdefinitionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Asm(self): + return self.getToken(CPP14Parser.Asm, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def Stringliteral(self): + return self.getToken(CPP14Parser.Stringliteral, 0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_asmdefinition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAsmdefinition" ): + listener.enterAsmdefinition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAsmdefinition" ): + listener.exitAsmdefinition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAsmdefinition" ): + return visitor.visitAsmdefinition(self) + else: + return visitor.visitChildren(self) + + + + + def asmdefinition(self): + + localctx = CPP14Parser.AsmdefinitionContext(self, self._ctx, self.state) + self.enterRule(localctx, 208, self.RULE_asmdefinition) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1527 + self.match(CPP14Parser.Asm) + self.state = 1528 + self.match(CPP14Parser.LeftParen) + self.state = 1529 + self.match(CPP14Parser.Stringliteral) + self.state = 1530 + self.match(CPP14Parser.RightParen) + self.state = 1531 + self.match(CPP14Parser.Semi) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LinkagespecificationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Extern(self): + return self.getToken(CPP14Parser.Extern, 0) + + def Stringliteral(self): + return self.getToken(CPP14Parser.Stringliteral, 0) + + def LeftBrace(self): + return self.getToken(CPP14Parser.LeftBrace, 0) + + def RightBrace(self): + return self.getToken(CPP14Parser.RightBrace, 0) + + def declarationseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationseqContext,0) + + + def declaration(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_linkagespecification + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLinkagespecification" ): + listener.enterLinkagespecification(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLinkagespecification" ): + listener.exitLinkagespecification(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLinkagespecification" ): + return visitor.visitLinkagespecification(self) + else: + return visitor.visitChildren(self) + + + + + def linkagespecification(self): + + localctx = CPP14Parser.LinkagespecificationContext(self, self._ctx, self.state) + self.enterRule(localctx, 210, self.RULE_linkagespecification) + self._la = 0 # Token type + try: + self.state = 1543 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,153,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1533 + self.match(CPP14Parser.Extern) + self.state = 1534 + self.match(CPP14Parser.Stringliteral) + self.state = 1535 + self.match(CPP14Parser.LeftBrace) + self.state = 1537 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Asm) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Constexpr) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Explicit) | (1 << CPP14Parser.Extern) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Friend) | (1 << CPP14Parser.Inline) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.Namespace) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Static_assert) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.Template) | (1 << CPP14Parser.Thread_local))) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & ((1 << (CPP14Parser.Typedef - 67)) | (1 << (CPP14Parser.Typename - 67)) | (1 << (CPP14Parser.Union - 67)) | (1 << (CPP14Parser.Unsigned - 67)) | (1 << (CPP14Parser.Using - 67)) | (1 << (CPP14Parser.Virtual - 67)) | (1 << (CPP14Parser.Void - 67)) | (1 << (CPP14Parser.Volatile - 67)) | (1 << (CPP14Parser.Wchar - 67)) | (1 << (CPP14Parser.LeftParen - 67)) | (1 << (CPP14Parser.LeftBracket - 67)) | (1 << (CPP14Parser.Star - 67)) | (1 << (CPP14Parser.And - 67)) | (1 << (CPP14Parser.Tilde - 67)) | (1 << (CPP14Parser.AndAnd - 67)) | (1 << (CPP14Parser.Doublecolon - 67)) | (1 << (CPP14Parser.Semi - 67)) | (1 << (CPP14Parser.Ellipsis - 67)) | (1 << (CPP14Parser.Identifier - 67)))) != 0): + self.state = 1536 + self.declarationseq(0) + + + self.state = 1539 + self.match(CPP14Parser.RightBrace) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1540 + self.match(CPP14Parser.Extern) + self.state = 1541 + self.match(CPP14Parser.Stringliteral) + self.state = 1542 + self.declaration() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AttributespecifierseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def attributespecifier(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_attributespecifierseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttributespecifierseq" ): + listener.enterAttributespecifierseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttributespecifierseq" ): + listener.exitAttributespecifierseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAttributespecifierseq" ): + return visitor.visitAttributespecifierseq(self) + else: + return visitor.visitChildren(self) + + + + def attributespecifierseq(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.AttributespecifierseqContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 212 + self.enterRecursionRule(localctx, 212, self.RULE_attributespecifierseq, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1546 + self.attributespecifier() + self._ctx.stop = self._input.LT(-1) + self.state = 1552 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,154,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.AttributespecifierseqContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_attributespecifierseq) + self.state = 1548 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1549 + self.attributespecifier() + self.state = 1554 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,154,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class AttributespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftBracket(self, i:int=None): + if i is None: + return self.getTokens(CPP14Parser.LeftBracket) + else: + return self.getToken(CPP14Parser.LeftBracket, i) + + def attributelist(self): + return self.getTypedRuleContext(CPP14Parser.AttributelistContext,0) + + + def RightBracket(self, i:int=None): + if i is None: + return self.getTokens(CPP14Parser.RightBracket) + else: + return self.getToken(CPP14Parser.RightBracket, i) + + def alignmentspecifier(self): + return self.getTypedRuleContext(CPP14Parser.AlignmentspecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_attributespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttributespecifier" ): + listener.enterAttributespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttributespecifier" ): + listener.exitAttributespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAttributespecifier" ): + return visitor.visitAttributespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def attributespecifier(self): + + localctx = CPP14Parser.AttributespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 214, self.RULE_attributespecifier) + try: + self.state = 1562 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.LeftBracket]: + self.enterOuterAlt(localctx, 1) + self.state = 1555 + self.match(CPP14Parser.LeftBracket) + self.state = 1556 + self.match(CPP14Parser.LeftBracket) + self.state = 1557 + self.attributelist(0) + self.state = 1558 + self.match(CPP14Parser.RightBracket) + self.state = 1559 + self.match(CPP14Parser.RightBracket) + pass + elif token in [CPP14Parser.Alignas]: + self.enterOuterAlt(localctx, 2) + self.state = 1561 + self.alignmentspecifier() + 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 AlignmentspecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Alignas(self): + return self.getToken(CPP14Parser.Alignas, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_alignmentspecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAlignmentspecifier" ): + listener.enterAlignmentspecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAlignmentspecifier" ): + listener.exitAlignmentspecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAlignmentspecifier" ): + return visitor.visitAlignmentspecifier(self) + else: + return visitor.visitChildren(self) + + + + + def alignmentspecifier(self): + + localctx = CPP14Parser.AlignmentspecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 216, self.RULE_alignmentspecifier) + self._la = 0 # Token type + try: + self.state = 1580 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,158,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1564 + self.match(CPP14Parser.Alignas) + self.state = 1565 + self.match(CPP14Parser.LeftParen) + self.state = 1566 + self.thetypeid() + self.state = 1568 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Ellipsis: + self.state = 1567 + self.match(CPP14Parser.Ellipsis) + + + self.state = 1570 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1572 + self.match(CPP14Parser.Alignas) + self.state = 1573 + self.match(CPP14Parser.LeftParen) + self.state = 1574 + self.constantexpression() + self.state = 1576 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Ellipsis: + self.state = 1575 + self.match(CPP14Parser.Ellipsis) + + + self.state = 1578 + self.match(CPP14Parser.RightParen) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AttributelistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def attribute(self): + return self.getTypedRuleContext(CPP14Parser.AttributeContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def attributelist(self): + return self.getTypedRuleContext(CPP14Parser.AttributelistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_attributelist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttributelist" ): + listener.enterAttributelist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttributelist" ): + listener.exitAttributelist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAttributelist" ): + return visitor.visitAttributelist(self) + else: + return visitor.visitChildren(self) + + + + def attributelist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.AttributelistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 218 + self.enterRecursionRule(localctx, 218, self.RULE_attributelist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1589 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,160,self._ctx) + if la_ == 1: + self.state = 1584 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,159,self._ctx) + if la_ == 1: + self.state = 1583 + self.attribute() + + + pass + + elif la_ == 2: + self.state = 1586 + self.attribute() + self.state = 1587 + self.match(CPP14Parser.Ellipsis) + pass + + + self._ctx.stop = self._input.LT(-1) + self.state = 1603 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,163,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 1601 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,162,self._ctx) + if la_ == 1: + localctx = CPP14Parser.AttributelistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_attributelist) + self.state = 1591 + if not self.precpred(self._ctx, 3): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") + self.state = 1592 + self.match(CPP14Parser.Comma) + self.state = 1594 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,161,self._ctx) + if la_ == 1: + self.state = 1593 + self.attribute() + + + pass + + elif la_ == 2: + localctx = CPP14Parser.AttributelistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_attributelist) + self.state = 1596 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1597 + self.match(CPP14Parser.Comma) + self.state = 1598 + self.attribute() + self.state = 1599 + self.match(CPP14Parser.Ellipsis) + pass + + + self.state = 1605 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,163,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class AttributeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def attributetoken(self): + return self.getTypedRuleContext(CPP14Parser.AttributetokenContext,0) + + + def attributeargumentclause(self): + return self.getTypedRuleContext(CPP14Parser.AttributeargumentclauseContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_attribute + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttribute" ): + listener.enterAttribute(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttribute" ): + listener.exitAttribute(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAttribute" ): + return visitor.visitAttribute(self) + else: + return visitor.visitChildren(self) + + + + + def attribute(self): + + localctx = CPP14Parser.AttributeContext(self, self._ctx, self.state) + self.enterRule(localctx, 220, self.RULE_attribute) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1606 + self.attributetoken() + self.state = 1608 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,164,self._ctx) + if la_ == 1: + self.state = 1607 + self.attributeargumentclause() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AttributetokenContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def attributescopedtoken(self): + return self.getTypedRuleContext(CPP14Parser.AttributescopedtokenContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_attributetoken + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttributetoken" ): + listener.enterAttributetoken(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttributetoken" ): + listener.exitAttributetoken(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAttributetoken" ): + return visitor.visitAttributetoken(self) + else: + return visitor.visitChildren(self) + + + + + def attributetoken(self): + + localctx = CPP14Parser.AttributetokenContext(self, self._ctx, self.state) + self.enterRule(localctx, 222, self.RULE_attributetoken) + try: + self.state = 1612 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,165,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1610 + self.match(CPP14Parser.Identifier) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1611 + self.attributescopedtoken() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AttributescopedtokenContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def attributenamespace(self): + return self.getTypedRuleContext(CPP14Parser.AttributenamespaceContext,0) + + + def Doublecolon(self): + return self.getToken(CPP14Parser.Doublecolon, 0) + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_attributescopedtoken + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttributescopedtoken" ): + listener.enterAttributescopedtoken(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttributescopedtoken" ): + listener.exitAttributescopedtoken(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAttributescopedtoken" ): + return visitor.visitAttributescopedtoken(self) + else: + return visitor.visitChildren(self) + + + + + def attributescopedtoken(self): + + localctx = CPP14Parser.AttributescopedtokenContext(self, self._ctx, self.state) + self.enterRule(localctx, 224, self.RULE_attributescopedtoken) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1614 + self.attributenamespace() + self.state = 1615 + self.match(CPP14Parser.Doublecolon) + self.state = 1616 + self.match(CPP14Parser.Identifier) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AttributenamespaceContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_attributenamespace + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttributenamespace" ): + listener.enterAttributenamespace(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttributenamespace" ): + listener.exitAttributenamespace(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAttributenamespace" ): + return visitor.visitAttributenamespace(self) + else: + return visitor.visitChildren(self) + + + + + def attributenamespace(self): + + localctx = CPP14Parser.AttributenamespaceContext(self, self._ctx, self.state) + self.enterRule(localctx, 226, self.RULE_attributenamespace) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1618 + self.match(CPP14Parser.Identifier) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AttributeargumentclauseContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def balancedtokenseq(self): + return self.getTypedRuleContext(CPP14Parser.BalancedtokenseqContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_attributeargumentclause + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAttributeargumentclause" ): + listener.enterAttributeargumentclause(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAttributeargumentclause" ): + listener.exitAttributeargumentclause(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAttributeargumentclause" ): + return visitor.visitAttributeargumentclause(self) + else: + return visitor.visitChildren(self) + + + + + def attributeargumentclause(self): + + localctx = CPP14Parser.AttributeargumentclauseContext(self, self._ctx, self.state) + self.enterRule(localctx, 228, self.RULE_attributeargumentclause) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1620 + self.match(CPP14Parser.LeftParen) + self.state = 1621 + self.balancedtokenseq(0) + self.state = 1622 + self.match(CPP14Parser.RightParen) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BalancedtokenseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def balancedtoken(self): + return self.getTypedRuleContext(CPP14Parser.BalancedtokenContext,0) + + + def balancedtokenseq(self): + return self.getTypedRuleContext(CPP14Parser.BalancedtokenseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_balancedtokenseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBalancedtokenseq" ): + listener.enterBalancedtokenseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBalancedtokenseq" ): + listener.exitBalancedtokenseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBalancedtokenseq" ): + return visitor.visitBalancedtokenseq(self) + else: + return visitor.visitChildren(self) + + + + def balancedtokenseq(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.BalancedtokenseqContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 230 + self.enterRecursionRule(localctx, 230, self.RULE_balancedtokenseq, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1626 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,166,self._ctx) + if la_ == 1: + self.state = 1625 + self.balancedtoken() + + + self._ctx.stop = self._input.LT(-1) + self.state = 1632 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,167,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.BalancedtokenseqContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_balancedtokenseq) + self.state = 1628 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1629 + self.balancedtoken() + self.state = 1634 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,167,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class BalancedtokenContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def balancedtokenseq(self): + return self.getTypedRuleContext(CPP14Parser.BalancedtokenseqContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + + def LeftBrace(self): + return self.getToken(CPP14Parser.LeftBrace, 0) + + def RightBrace(self): + return self.getToken(CPP14Parser.RightBrace, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_balancedtoken + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBalancedtoken" ): + listener.enterBalancedtoken(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBalancedtoken" ): + listener.exitBalancedtoken(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBalancedtoken" ): + return visitor.visitBalancedtoken(self) + else: + return visitor.visitChildren(self) + + + + + def balancedtoken(self): + + localctx = CPP14Parser.BalancedtokenContext(self, self._ctx, self.state) + self.enterRule(localctx, 232, self.RULE_balancedtoken) + try: + self.state = 1647 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.LeftParen]: + self.enterOuterAlt(localctx, 1) + self.state = 1635 + self.match(CPP14Parser.LeftParen) + self.state = 1636 + self.balancedtokenseq(0) + self.state = 1637 + self.match(CPP14Parser.RightParen) + pass + elif token in [CPP14Parser.LeftBracket]: + self.enterOuterAlt(localctx, 2) + self.state = 1639 + self.match(CPP14Parser.LeftBracket) + self.state = 1640 + self.balancedtokenseq(0) + self.state = 1641 + self.match(CPP14Parser.RightBracket) + pass + elif token in [CPP14Parser.LeftBrace]: + self.enterOuterAlt(localctx, 3) + self.state = 1643 + self.match(CPP14Parser.LeftBrace) + self.state = 1644 + self.balancedtokenseq(0) + self.state = 1645 + self.match(CPP14Parser.RightBrace) + 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 InitdeclaratorlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def initdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.InitdeclaratorContext,0) + + + def initdeclaratorlist(self): + return self.getTypedRuleContext(CPP14Parser.InitdeclaratorlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_initdeclaratorlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInitdeclaratorlist" ): + listener.enterInitdeclaratorlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInitdeclaratorlist" ): + listener.exitInitdeclaratorlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitInitdeclaratorlist" ): + return visitor.visitInitdeclaratorlist(self) + else: + return visitor.visitChildren(self) + + + + def initdeclaratorlist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.InitdeclaratorlistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 234 + self.enterRecursionRule(localctx, 234, self.RULE_initdeclaratorlist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1650 + self.initdeclarator() + self._ctx.stop = self._input.LT(-1) + self.state = 1657 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,169,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.InitdeclaratorlistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_initdeclaratorlist) + self.state = 1652 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1653 + self.match(CPP14Parser.Comma) + self.state = 1654 + self.initdeclarator() + self.state = 1659 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,169,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class InitdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def declarator(self): + return self.getTypedRuleContext(CPP14Parser.DeclaratorContext,0) + + + def initializer(self): + return self.getTypedRuleContext(CPP14Parser.InitializerContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_initdeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInitdeclarator" ): + listener.enterInitdeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInitdeclarator" ): + listener.exitInitdeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitInitdeclarator" ): + return visitor.visitInitdeclarator(self) + else: + return visitor.visitChildren(self) + + + + + def initdeclarator(self): + + localctx = CPP14Parser.InitdeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 236, self.RULE_initdeclarator) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1660 + self.declarator() + self.state = 1662 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,170,self._ctx) + if la_ == 1: + self.state = 1661 + self.initializer() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class DeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def ptrdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.PtrdeclaratorContext,0) + + + def noptrdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrdeclaratorContext,0) + + + def parametersandqualifiers(self): + return self.getTypedRuleContext(CPP14Parser.ParametersandqualifiersContext,0) + + + def trailingreturntype(self): + return self.getTypedRuleContext(CPP14Parser.TrailingreturntypeContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_declarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDeclarator" ): + listener.enterDeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDeclarator" ): + listener.exitDeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDeclarator" ): + return visitor.visitDeclarator(self) + else: + return visitor.visitChildren(self) + + + + + def declarator(self): + + localctx = CPP14Parser.DeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 238, self.RULE_declarator) + try: + self.state = 1669 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,171,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1664 + self.ptrdeclarator() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1665 + self.noptrdeclarator(0) + self.state = 1666 + self.parametersandqualifiers() + self.state = 1667 + self.trailingreturntype() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PtrdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_ptrdeclarator + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class PtrDeclContext(PtrdeclaratorContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PtrdeclaratorContext + super().__init__(parser) + self.copyFrom(ctx) + + def ptroperator(self): + return self.getTypedRuleContext(CPP14Parser.PtroperatorContext,0) + + def ptrdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.PtrdeclaratorContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPtrDecl" ): + listener.enterPtrDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPtrDecl" ): + listener.exitPtrDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPtrDecl" ): + return visitor.visitPtrDecl(self) + else: + return visitor.visitChildren(self) + + + class NonPtrDeclContext(PtrdeclaratorContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.PtrdeclaratorContext + super().__init__(parser) + self.copyFrom(ctx) + + def noptrdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrdeclaratorContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNonPtrDecl" ): + listener.enterNonPtrDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNonPtrDecl" ): + listener.exitNonPtrDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNonPtrDecl" ): + return visitor.visitNonPtrDecl(self) + else: + return visitor.visitChildren(self) + + + + def ptrdeclarator(self): + + localctx = CPP14Parser.PtrdeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 240, self.RULE_ptrdeclarator) + try: + self.state = 1675 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,172,self._ctx) + if la_ == 1: + localctx = CPP14Parser.NonPtrDeclContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 1671 + self.noptrdeclarator(0) + pass + + elif la_ == 2: + localctx = CPP14Parser.PtrDeclContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 1672 + self.ptroperator() + self.state = 1673 + self.ptrdeclarator() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class NoptrdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_noptrdeclarator + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + class NoptrIgnoreContext(NoptrdeclaratorContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NoptrdeclaratorContext + super().__init__(parser) + self.copyFrom(ctx) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def ptrdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.PtrdeclaratorContext,0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + def noptrdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrdeclaratorContext,0) + + def parametersandqualifiers(self): + return self.getTypedRuleContext(CPP14Parser.ParametersandqualifiersContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNoptrIgnore" ): + listener.enterNoptrIgnore(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNoptrIgnore" ): + listener.exitNoptrIgnore(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNoptrIgnore" ): + return visitor.visitNoptrIgnore(self) + else: + return visitor.visitChildren(self) + + + class NormalVarDeclContext(NoptrdeclaratorContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NoptrdeclaratorContext + super().__init__(parser) + self.copyFrom(ctx) + + def declaratorid(self): + return self.getTypedRuleContext(CPP14Parser.DeclaratoridContext,0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNormalVarDecl" ): + listener.enterNormalVarDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNormalVarDecl" ): + listener.exitNormalVarDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNormalVarDecl" ): + return visitor.visitNormalVarDecl(self) + else: + return visitor.visitChildren(self) + + + class ArrayDeclContext(NoptrdeclaratorContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.NoptrdeclaratorContext + super().__init__(parser) + self.copyFrom(ctx) + + def noptrdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrdeclaratorContext,0) + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterArrayDecl" ): + listener.enterArrayDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitArrayDecl" ): + listener.exitArrayDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitArrayDecl" ): + return visitor.visitArrayDecl(self) + else: + return visitor.visitChildren(self) + + + + def noptrdeclarator(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.NoptrdeclaratorContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 242 + self.enterRecursionRule(localctx, 242, self.RULE_noptrdeclarator, _p) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1686 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Decltype, CPP14Parser.Operator, CPP14Parser.Tilde, CPP14Parser.Doublecolon, CPP14Parser.Ellipsis, CPP14Parser.Identifier]: + localctx = CPP14Parser.NormalVarDeclContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + + self.state = 1678 + self.declaratorid() + self.state = 1680 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,173,self._ctx) + if la_ == 1: + self.state = 1679 + self.attributespecifierseq(0) + + + pass + elif token in [CPP14Parser.LeftParen]: + localctx = CPP14Parser.NoptrIgnoreContext(self, localctx) + self._ctx = localctx + _prevctx = localctx + self.state = 1682 + self.match(CPP14Parser.LeftParen) + self.state = 1683 + self.ptrdeclarator() + self.state = 1684 + self.match(CPP14Parser.RightParen) + pass + else: + raise NoViableAltException(self) + + self._ctx.stop = self._input.LT(-1) + self.state = 1701 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,178,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 1699 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,177,self._ctx) + if la_ == 1: + localctx = CPP14Parser.NoptrIgnoreContext(self, CPP14Parser.NoptrdeclaratorContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_noptrdeclarator) + self.state = 1688 + if not self.precpred(self._ctx, 3): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") + self.state = 1689 + self.parametersandqualifiers() + pass + + elif la_ == 2: + localctx = CPP14Parser.ArrayDeclContext(self, CPP14Parser.NoptrdeclaratorContext(self, _parentctx, _parentState)) + self.pushNewRecursionContext(localctx, _startState, self.RULE_noptrdeclarator) + self.state = 1690 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 1691 + self.match(CPP14Parser.LeftBracket) + self.state = 1693 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (CPP14Parser.TrueToken - 65)) | (1 << (CPP14Parser.Typeid - 65)) | (1 << (CPP14Parser.Typename - 65)) | (1 << (CPP14Parser.Unsigned - 65)) | (1 << (CPP14Parser.Void - 65)) | (1 << (CPP14Parser.Wchar - 65)) | (1 << (CPP14Parser.LeftParen - 65)) | (1 << (CPP14Parser.LeftBracket - 65)) | (1 << (CPP14Parser.Plus - 65)) | (1 << (CPP14Parser.Minus - 65)) | (1 << (CPP14Parser.Star - 65)) | (1 << (CPP14Parser.And - 65)) | (1 << (CPP14Parser.Or - 65)) | (1 << (CPP14Parser.Tilde - 65)) | (1 << (CPP14Parser.Not - 65)) | (1 << (CPP14Parser.PlusPlus - 65)) | (1 << (CPP14Parser.MinusMinus - 65)) | (1 << (CPP14Parser.Doublecolon - 65)) | (1 << (CPP14Parser.Identifier - 65)) | (1 << (CPP14Parser.Integerliteral - 65)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 1692 + self.constantexpression() + + + self.state = 1695 + self.match(CPP14Parser.RightBracket) + self.state = 1697 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,176,self._ctx) + if la_ == 1: + self.state = 1696 + self.attributespecifierseq(0) + + + pass + + + self.state = 1703 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,178,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class ParametersandqualifiersContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def parameterdeclarationclause(self): + return self.getTypedRuleContext(CPP14Parser.ParameterdeclarationclauseContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def cvqualifierseq(self): + return self.getTypedRuleContext(CPP14Parser.CvqualifierseqContext,0) + + + def refqualifier(self): + return self.getTypedRuleContext(CPP14Parser.RefqualifierContext,0) + + + def exceptionspecification(self): + return self.getTypedRuleContext(CPP14Parser.ExceptionspecificationContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_parametersandqualifiers + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterParametersandqualifiers" ): + listener.enterParametersandqualifiers(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitParametersandqualifiers" ): + listener.exitParametersandqualifiers(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitParametersandqualifiers" ): + return visitor.visitParametersandqualifiers(self) + else: + return visitor.visitChildren(self) + + + + + def parametersandqualifiers(self): + + localctx = CPP14Parser.ParametersandqualifiersContext(self, self._ctx, self.state) + self.enterRule(localctx, 244, self.RULE_parametersandqualifiers) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1704 + self.match(CPP14Parser.LeftParen) + self.state = 1705 + self.parameterdeclarationclause() + self.state = 1706 + self.match(CPP14Parser.RightParen) + self.state = 1708 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,179,self._ctx) + if la_ == 1: + self.state = 1707 + self.cvqualifierseq() + + + self.state = 1711 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,180,self._ctx) + if la_ == 1: + self.state = 1710 + self.refqualifier() + + + self.state = 1714 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,181,self._ctx) + if la_ == 1: + self.state = 1713 + self.exceptionspecification() + + + self.state = 1717 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,182,self._ctx) + if la_ == 1: + self.state = 1716 + self.attributespecifierseq(0) + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TrailingreturntypeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Arrow(self): + return self.getToken(CPP14Parser.Arrow, 0) + + def trailingtypespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.TrailingtypespecifierseqContext,0) + + + def abstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.AbstractdeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_trailingreturntype + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTrailingreturntype" ): + listener.enterTrailingreturntype(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTrailingreturntype" ): + listener.exitTrailingreturntype(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTrailingreturntype" ): + return visitor.visitTrailingreturntype(self) + else: + return visitor.visitChildren(self) + + + + + def trailingreturntype(self): + + localctx = CPP14Parser.TrailingreturntypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 246, self.RULE_trailingreturntype) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1719 + self.match(CPP14Parser.Arrow) + self.state = 1720 + self.trailingtypespecifierseq() + self.state = 1722 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,183,self._ctx) + if la_ == 1: + self.state = 1721 + self.abstractdeclarator() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PtroperatorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Star(self): + return self.getToken(CPP14Parser.Star, 0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def cvqualifierseq(self): + return self.getTypedRuleContext(CPP14Parser.CvqualifierseqContext,0) + + + def And(self): + return self.getToken(CPP14Parser.And, 0) + + def AndAnd(self): + return self.getToken(CPP14Parser.AndAnd, 0) + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_ptroperator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPtroperator" ): + listener.enterPtroperator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPtroperator" ): + listener.exitPtroperator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPtroperator" ): + return visitor.visitPtroperator(self) + else: + return visitor.visitChildren(self) + + + + + def ptroperator(self): + + localctx = CPP14Parser.PtroperatorContext(self, self._ctx, self.state) + self.enterRule(localctx, 248, self.RULE_ptroperator) + try: + self.state = 1747 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Star]: + self.enterOuterAlt(localctx, 1) + self.state = 1724 + self.match(CPP14Parser.Star) + self.state = 1726 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,184,self._ctx) + if la_ == 1: + self.state = 1725 + self.attributespecifierseq(0) + + + self.state = 1729 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,185,self._ctx) + if la_ == 1: + self.state = 1728 + self.cvqualifierseq() + + + pass + elif token in [CPP14Parser.And]: + self.enterOuterAlt(localctx, 2) + self.state = 1731 + self.match(CPP14Parser.And) + self.state = 1733 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,186,self._ctx) + if la_ == 1: + self.state = 1732 + self.attributespecifierseq(0) + + + pass + elif token in [CPP14Parser.AndAnd]: + self.enterOuterAlt(localctx, 3) + self.state = 1735 + self.match(CPP14Parser.AndAnd) + self.state = 1737 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,187,self._ctx) + if la_ == 1: + self.state = 1736 + self.attributespecifierseq(0) + + + pass + elif token in [CPP14Parser.Decltype, CPP14Parser.Doublecolon, CPP14Parser.Identifier]: + self.enterOuterAlt(localctx, 4) + self.state = 1739 + self.nestednamespecifier(0) + self.state = 1740 + self.match(CPP14Parser.Star) + self.state = 1742 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,188,self._ctx) + if la_ == 1: + self.state = 1741 + self.attributespecifierseq(0) + + + self.state = 1745 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,189,self._ctx) + if la_ == 1: + self.state = 1744 + self.cvqualifierseq() + + + 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 CvqualifierseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def cvqualifier(self): + return self.getTypedRuleContext(CPP14Parser.CvqualifierContext,0) + + + def cvqualifierseq(self): + return self.getTypedRuleContext(CPP14Parser.CvqualifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_cvqualifierseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCvqualifierseq" ): + listener.enterCvqualifierseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCvqualifierseq" ): + listener.exitCvqualifierseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCvqualifierseq" ): + return visitor.visitCvqualifierseq(self) + else: + return visitor.visitChildren(self) + + + + + def cvqualifierseq(self): + + localctx = CPP14Parser.CvqualifierseqContext(self, self._ctx, self.state) + self.enterRule(localctx, 250, self.RULE_cvqualifierseq) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1749 + self.cvqualifier() + self.state = 1751 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,191,self._ctx) + if la_ == 1: + self.state = 1750 + self.cvqualifierseq() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CvqualifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Const(self): + return self.getToken(CPP14Parser.Const, 0) + + def Volatile(self): + return self.getToken(CPP14Parser.Volatile, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_cvqualifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCvqualifier" ): + listener.enterCvqualifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCvqualifier" ): + listener.exitCvqualifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCvqualifier" ): + return visitor.visitCvqualifier(self) + else: + return visitor.visitChildren(self) + + + + + def cvqualifier(self): + + localctx = CPP14Parser.CvqualifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 252, self.RULE_cvqualifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1753 + _la = self._input.LA(1) + if not(_la==CPP14Parser.Const or _la==CPP14Parser.Volatile): + 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 RefqualifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def And(self): + return self.getToken(CPP14Parser.And, 0) + + def AndAnd(self): + return self.getToken(CPP14Parser.AndAnd, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_refqualifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRefqualifier" ): + listener.enterRefqualifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRefqualifier" ): + listener.exitRefqualifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitRefqualifier" ): + return visitor.visitRefqualifier(self) + else: + return visitor.visitChildren(self) + + + + + def refqualifier(self): + + localctx = CPP14Parser.RefqualifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 254, self.RULE_refqualifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1755 + _la = self._input.LA(1) + if not(_la==CPP14Parser.And or _la==CPP14Parser.AndAnd): + 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 DeclaratoridContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def idexpression(self): + return self.getTypedRuleContext(CPP14Parser.IdexpressionContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_declaratorid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDeclaratorid" ): + listener.enterDeclaratorid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDeclaratorid" ): + listener.exitDeclaratorid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDeclaratorid" ): + return visitor.visitDeclaratorid(self) + else: + return visitor.visitChildren(self) + + + + + def declaratorid(self): + + localctx = CPP14Parser.DeclaratoridContext(self, self._ctx, self.state) + self.enterRule(localctx, 256, self.RULE_declaratorid) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1758 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Ellipsis: + self.state = 1757 + self.match(CPP14Parser.Ellipsis) + + + self.state = 1760 + self.idexpression() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ThetypeidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.TypespecifierseqContext,0) + + + def abstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.AbstractdeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_thetypeid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterThetypeid" ): + listener.enterThetypeid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitThetypeid" ): + listener.exitThetypeid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitThetypeid" ): + return visitor.visitThetypeid(self) + else: + return visitor.visitChildren(self) + + + + + def thetypeid(self): + + localctx = CPP14Parser.ThetypeidContext(self, self._ctx, self.state) + self.enterRule(localctx, 258, self.RULE_thetypeid) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1762 + self.typespecifierseq() + self.state = 1764 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,193,self._ctx) + if la_ == 1: + self.state = 1763 + self.abstractdeclarator() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AbstractdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def ptrabstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.PtrabstractdeclaratorContext,0) + + + def parametersandqualifiers(self): + return self.getTypedRuleContext(CPP14Parser.ParametersandqualifiersContext,0) + + + def trailingreturntype(self): + return self.getTypedRuleContext(CPP14Parser.TrailingreturntypeContext,0) + + + def noptrabstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrabstractdeclaratorContext,0) + + + def abstractpackdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.AbstractpackdeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_abstractdeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAbstractdeclarator" ): + listener.enterAbstractdeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAbstractdeclarator" ): + listener.exitAbstractdeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAbstractdeclarator" ): + return visitor.visitAbstractdeclarator(self) + else: + return visitor.visitChildren(self) + + + + + def abstractdeclarator(self): + + localctx = CPP14Parser.AbstractdeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 260, self.RULE_abstractdeclarator) + try: + self.state = 1774 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,195,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1766 + self.ptrabstractdeclarator() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1768 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,194,self._ctx) + if la_ == 1: + self.state = 1767 + self.noptrabstractdeclarator(0) + + + self.state = 1770 + self.parametersandqualifiers() + self.state = 1771 + self.trailingreturntype() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1773 + self.abstractpackdeclarator() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class PtrabstractdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def noptrabstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrabstractdeclaratorContext,0) + + + def ptroperator(self): + return self.getTypedRuleContext(CPP14Parser.PtroperatorContext,0) + + + def ptrabstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.PtrabstractdeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_ptrabstractdeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPtrabstractdeclarator" ): + listener.enterPtrabstractdeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPtrabstractdeclarator" ): + listener.exitPtrabstractdeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPtrabstractdeclarator" ): + return visitor.visitPtrabstractdeclarator(self) + else: + return visitor.visitChildren(self) + + + + + def ptrabstractdeclarator(self): + + localctx = CPP14Parser.PtrabstractdeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 262, self.RULE_ptrabstractdeclarator) + try: + self.state = 1781 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.LeftParen, CPP14Parser.LeftBracket]: + self.enterOuterAlt(localctx, 1) + self.state = 1776 + self.noptrabstractdeclarator(0) + pass + elif token in [CPP14Parser.Decltype, CPP14Parser.Star, CPP14Parser.And, CPP14Parser.AndAnd, CPP14Parser.Doublecolon, CPP14Parser.Identifier]: + self.enterOuterAlt(localctx, 2) + self.state = 1777 + self.ptroperator() + self.state = 1779 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,196,self._ctx) + if la_ == 1: + self.state = 1778 + self.ptrabstractdeclarator() + + + 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 NoptrabstractdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def parametersandqualifiers(self): + return self.getTypedRuleContext(CPP14Parser.ParametersandqualifiersContext,0) + + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def ptrabstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.PtrabstractdeclaratorContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def noptrabstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrabstractdeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_noptrabstractdeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNoptrabstractdeclarator" ): + listener.enterNoptrabstractdeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNoptrabstractdeclarator" ): + listener.exitNoptrabstractdeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNoptrabstractdeclarator" ): + return visitor.visitNoptrabstractdeclarator(self) + else: + return visitor.visitChildren(self) + + + + def noptrabstractdeclarator(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.NoptrabstractdeclaratorContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 264 + self.enterRecursionRule(localctx, 264, self.RULE_noptrabstractdeclarator, _p) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1797 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,200,self._ctx) + if la_ == 1: + self.state = 1784 + self.parametersandqualifiers() + pass + + elif la_ == 2: + self.state = 1785 + self.match(CPP14Parser.LeftBracket) + self.state = 1787 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (CPP14Parser.TrueToken - 65)) | (1 << (CPP14Parser.Typeid - 65)) | (1 << (CPP14Parser.Typename - 65)) | (1 << (CPP14Parser.Unsigned - 65)) | (1 << (CPP14Parser.Void - 65)) | (1 << (CPP14Parser.Wchar - 65)) | (1 << (CPP14Parser.LeftParen - 65)) | (1 << (CPP14Parser.LeftBracket - 65)) | (1 << (CPP14Parser.Plus - 65)) | (1 << (CPP14Parser.Minus - 65)) | (1 << (CPP14Parser.Star - 65)) | (1 << (CPP14Parser.And - 65)) | (1 << (CPP14Parser.Or - 65)) | (1 << (CPP14Parser.Tilde - 65)) | (1 << (CPP14Parser.Not - 65)) | (1 << (CPP14Parser.PlusPlus - 65)) | (1 << (CPP14Parser.MinusMinus - 65)) | (1 << (CPP14Parser.Doublecolon - 65)) | (1 << (CPP14Parser.Identifier - 65)) | (1 << (CPP14Parser.Integerliteral - 65)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 1786 + self.constantexpression() + + + self.state = 1789 + self.match(CPP14Parser.RightBracket) + self.state = 1791 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,199,self._ctx) + if la_ == 1: + self.state = 1790 + self.attributespecifierseq(0) + + + pass + + elif la_ == 3: + self.state = 1793 + self.match(CPP14Parser.LeftParen) + self.state = 1794 + self.ptrabstractdeclarator() + self.state = 1795 + self.match(CPP14Parser.RightParen) + pass + + + self._ctx.stop = self._input.LT(-1) + self.state = 1812 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,204,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 1810 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,203,self._ctx) + if la_ == 1: + localctx = CPP14Parser.NoptrabstractdeclaratorContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_noptrabstractdeclarator) + self.state = 1799 + if not self.precpred(self._ctx, 5): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 5)") + self.state = 1800 + self.parametersandqualifiers() + pass + + elif la_ == 2: + localctx = CPP14Parser.NoptrabstractdeclaratorContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_noptrabstractdeclarator) + self.state = 1801 + if not self.precpred(self._ctx, 3): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") + self.state = 1802 + self.match(CPP14Parser.LeftBracket) + self.state = 1804 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (CPP14Parser.TrueToken - 65)) | (1 << (CPP14Parser.Typeid - 65)) | (1 << (CPP14Parser.Typename - 65)) | (1 << (CPP14Parser.Unsigned - 65)) | (1 << (CPP14Parser.Void - 65)) | (1 << (CPP14Parser.Wchar - 65)) | (1 << (CPP14Parser.LeftParen - 65)) | (1 << (CPP14Parser.LeftBracket - 65)) | (1 << (CPP14Parser.Plus - 65)) | (1 << (CPP14Parser.Minus - 65)) | (1 << (CPP14Parser.Star - 65)) | (1 << (CPP14Parser.And - 65)) | (1 << (CPP14Parser.Or - 65)) | (1 << (CPP14Parser.Tilde - 65)) | (1 << (CPP14Parser.Not - 65)) | (1 << (CPP14Parser.PlusPlus - 65)) | (1 << (CPP14Parser.MinusMinus - 65)) | (1 << (CPP14Parser.Doublecolon - 65)) | (1 << (CPP14Parser.Identifier - 65)) | (1 << (CPP14Parser.Integerliteral - 65)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 1803 + self.constantexpression() + + + self.state = 1806 + self.match(CPP14Parser.RightBracket) + self.state = 1808 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,202,self._ctx) + if la_ == 1: + self.state = 1807 + self.attributespecifierseq(0) + + + pass + + + self.state = 1814 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,204,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class AbstractpackdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def noptrabstractpackdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrabstractpackdeclaratorContext,0) + + + def ptroperator(self): + return self.getTypedRuleContext(CPP14Parser.PtroperatorContext,0) + + + def abstractpackdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.AbstractpackdeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_abstractpackdeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAbstractpackdeclarator" ): + listener.enterAbstractpackdeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAbstractpackdeclarator" ): + listener.exitAbstractpackdeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAbstractpackdeclarator" ): + return visitor.visitAbstractpackdeclarator(self) + else: + return visitor.visitChildren(self) + + + + + def abstractpackdeclarator(self): + + localctx = CPP14Parser.AbstractpackdeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 266, self.RULE_abstractpackdeclarator) + try: + self.state = 1819 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Ellipsis]: + self.enterOuterAlt(localctx, 1) + self.state = 1815 + self.noptrabstractpackdeclarator(0) + pass + elif token in [CPP14Parser.Decltype, CPP14Parser.Star, CPP14Parser.And, CPP14Parser.AndAnd, CPP14Parser.Doublecolon, CPP14Parser.Identifier]: + self.enterOuterAlt(localctx, 2) + self.state = 1816 + self.ptroperator() + self.state = 1817 + self.abstractpackdeclarator() + 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 NoptrabstractpackdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def noptrabstractpackdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.NoptrabstractpackdeclaratorContext,0) + + + def parametersandqualifiers(self): + return self.getTypedRuleContext(CPP14Parser.ParametersandqualifiersContext,0) + + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_noptrabstractpackdeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNoptrabstractpackdeclarator" ): + listener.enterNoptrabstractpackdeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNoptrabstractpackdeclarator" ): + listener.exitNoptrabstractpackdeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNoptrabstractpackdeclarator" ): + return visitor.visitNoptrabstractpackdeclarator(self) + else: + return visitor.visitChildren(self) + + + + def noptrabstractpackdeclarator(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.NoptrabstractpackdeclaratorContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 268 + self.enterRecursionRule(localctx, 268, self.RULE_noptrabstractpackdeclarator, _p) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1822 + self.match(CPP14Parser.Ellipsis) + self._ctx.stop = self._input.LT(-1) + self.state = 1837 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,209,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + self.state = 1835 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,208,self._ctx) + if la_ == 1: + localctx = CPP14Parser.NoptrabstractpackdeclaratorContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_noptrabstractpackdeclarator) + self.state = 1824 + if not self.precpred(self._ctx, 3): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 3)") + self.state = 1825 + self.parametersandqualifiers() + pass + + elif la_ == 2: + localctx = CPP14Parser.NoptrabstractpackdeclaratorContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_noptrabstractpackdeclarator) + self.state = 1826 + if not self.precpred(self._ctx, 2): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 2)") + self.state = 1827 + self.match(CPP14Parser.LeftBracket) + self.state = 1829 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (CPP14Parser.TrueToken - 65)) | (1 << (CPP14Parser.Typeid - 65)) | (1 << (CPP14Parser.Typename - 65)) | (1 << (CPP14Parser.Unsigned - 65)) | (1 << (CPP14Parser.Void - 65)) | (1 << (CPP14Parser.Wchar - 65)) | (1 << (CPP14Parser.LeftParen - 65)) | (1 << (CPP14Parser.LeftBracket - 65)) | (1 << (CPP14Parser.Plus - 65)) | (1 << (CPP14Parser.Minus - 65)) | (1 << (CPP14Parser.Star - 65)) | (1 << (CPP14Parser.And - 65)) | (1 << (CPP14Parser.Or - 65)) | (1 << (CPP14Parser.Tilde - 65)) | (1 << (CPP14Parser.Not - 65)) | (1 << (CPP14Parser.PlusPlus - 65)) | (1 << (CPP14Parser.MinusMinus - 65)) | (1 << (CPP14Parser.Doublecolon - 65)) | (1 << (CPP14Parser.Identifier - 65)) | (1 << (CPP14Parser.Integerliteral - 65)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 1828 + self.constantexpression() + + + self.state = 1831 + self.match(CPP14Parser.RightBracket) + self.state = 1833 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,207,self._ctx) + if la_ == 1: + self.state = 1832 + self.attributespecifierseq(0) + + + pass + + + self.state = 1839 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,209,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class ParameterdeclarationclauseContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def parameterdeclarationlist(self): + return self.getTypedRuleContext(CPP14Parser.ParameterdeclarationlistContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_parameterdeclarationclause + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterParameterdeclarationclause" ): + listener.enterParameterdeclarationclause(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitParameterdeclarationclause" ): + listener.exitParameterdeclarationclause(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitParameterdeclarationclause" ): + return visitor.visitParameterdeclarationclause(self) + else: + return visitor.visitChildren(self) + + + + + def parameterdeclarationclause(self): + + localctx = CPP14Parser.ParameterdeclarationclauseContext(self, self._ctx, self.state) + self.enterRule(localctx, 270, self.RULE_parameterdeclarationclause) + self._la = 0 # Token type + try: + self.state = 1850 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,212,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1841 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Constexpr) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Explicit) | (1 << CPP14Parser.Extern) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Friend) | (1 << CPP14Parser.Inline) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.Thread_local))) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & ((1 << (CPP14Parser.Typedef - 67)) | (1 << (CPP14Parser.Typename - 67)) | (1 << (CPP14Parser.Union - 67)) | (1 << (CPP14Parser.Unsigned - 67)) | (1 << (CPP14Parser.Virtual - 67)) | (1 << (CPP14Parser.Void - 67)) | (1 << (CPP14Parser.Volatile - 67)) | (1 << (CPP14Parser.Wchar - 67)) | (1 << (CPP14Parser.LeftBracket - 67)) | (1 << (CPP14Parser.Doublecolon - 67)) | (1 << (CPP14Parser.Identifier - 67)))) != 0): + self.state = 1840 + self.parameterdeclarationlist(0) + + + self.state = 1844 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Ellipsis: + self.state = 1843 + self.match(CPP14Parser.Ellipsis) + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1846 + self.parameterdeclarationlist(0) + self.state = 1847 + self.match(CPP14Parser.Comma) + self.state = 1848 + self.match(CPP14Parser.Ellipsis) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ParameterdeclarationlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def parameterdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.ParameterdeclarationContext,0) + + + def parameterdeclarationlist(self): + return self.getTypedRuleContext(CPP14Parser.ParameterdeclarationlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_parameterdeclarationlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterParameterdeclarationlist" ): + listener.enterParameterdeclarationlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitParameterdeclarationlist" ): + listener.exitParameterdeclarationlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitParameterdeclarationlist" ): + return visitor.visitParameterdeclarationlist(self) + else: + return visitor.visitChildren(self) + + + + def parameterdeclarationlist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.ParameterdeclarationlistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 272 + self.enterRecursionRule(localctx, 272, self.RULE_parameterdeclarationlist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1853 + self.parameterdeclaration() + self._ctx.stop = self._input.LT(-1) + self.state = 1860 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,213,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.ParameterdeclarationlistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_parameterdeclarationlist) + self.state = 1855 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1856 + self.match(CPP14Parser.Comma) + self.state = 1857 + self.parameterdeclaration() + self.state = 1862 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,213,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class ParameterdeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def declspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclspecifierseqContext,0) + + + def declarator(self): + return self.getTypedRuleContext(CPP14Parser.DeclaratorContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def initializerclause(self): + return self.getTypedRuleContext(CPP14Parser.InitializerclauseContext,0) + + + def abstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.AbstractdeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_parameterdeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterParameterdeclaration" ): + listener.enterParameterdeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitParameterdeclaration" ): + listener.exitParameterdeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitParameterdeclaration" ): + return visitor.visitParameterdeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def parameterdeclaration(self): + + localctx = CPP14Parser.ParameterdeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 274, self.RULE_parameterdeclaration) + self._la = 0 # Token type + try: + self.state = 1894 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,220,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1864 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1863 + self.attributespecifierseq(0) + + + self.state = 1866 + self.declspecifierseq() + self.state = 1867 + self.declarator() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1870 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1869 + self.attributespecifierseq(0) + + + self.state = 1872 + self.declspecifierseq() + self.state = 1873 + self.declarator() + self.state = 1874 + self.match(CPP14Parser.Assign) + self.state = 1875 + self.initializerclause() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1878 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1877 + self.attributespecifierseq(0) + + + self.state = 1880 + self.declspecifierseq() + self.state = 1882 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,217,self._ctx) + if la_ == 1: + self.state = 1881 + self.abstractdeclarator() + + + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1885 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1884 + self.attributespecifierseq(0) + + + self.state = 1887 + self.declspecifierseq() + self.state = 1889 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Decltype or ((((_la - 78)) & ~0x3f) == 0 and ((1 << (_la - 78)) & ((1 << (CPP14Parser.LeftParen - 78)) | (1 << (CPP14Parser.LeftBracket - 78)) | (1 << (CPP14Parser.Star - 78)) | (1 << (CPP14Parser.And - 78)) | (1 << (CPP14Parser.AndAnd - 78)) | (1 << (CPP14Parser.Doublecolon - 78)) | (1 << (CPP14Parser.Ellipsis - 78)) | (1 << (CPP14Parser.Identifier - 78)))) != 0): + self.state = 1888 + self.abstractdeclarator() + + + self.state = 1891 + self.match(CPP14Parser.Assign) + self.state = 1892 + self.initializerclause() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FunctiondefinitionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def declarator(self): + return self.getTypedRuleContext(CPP14Parser.DeclaratorContext,0) + + + def functionbody(self): + return self.getTypedRuleContext(CPP14Parser.FunctionbodyContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def declspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclspecifierseqContext,0) + + + def virtspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.VirtspecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_functiondefinition + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFunctiondefinition" ): + listener.enterFunctiondefinition(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFunctiondefinition" ): + listener.exitFunctiondefinition(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunctiondefinition" ): + return visitor.visitFunctiondefinition(self) + else: + return visitor.visitChildren(self) + + + + + def functiondefinition(self): + + localctx = CPP14Parser.FunctiondefinitionContext(self, self._ctx, self.state) + self.enterRule(localctx, 276, self.RULE_functiondefinition) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1897 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1896 + self.attributespecifierseq(0) + + + self.state = 1900 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,222,self._ctx) + if la_ == 1: + self.state = 1899 + self.declspecifierseq() + + + self.state = 1902 + self.declarator() + self.state = 1904 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Final or _la==CPP14Parser.Override: + self.state = 1903 + self.virtspecifierseq(0) + + + self.state = 1906 + self.functionbody() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FunctionbodyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def compoundstatement(self): + return self.getTypedRuleContext(CPP14Parser.CompoundstatementContext,0) + + + def ctorinitializer(self): + return self.getTypedRuleContext(CPP14Parser.CtorinitializerContext,0) + + + def functiontryblock(self): + return self.getTypedRuleContext(CPP14Parser.FunctiontryblockContext,0) + + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def Default(self): + return self.getToken(CPP14Parser.Default, 0) + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + + def Delete(self): + return self.getToken(CPP14Parser.Delete, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_functionbody + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFunctionbody" ): + listener.enterFunctionbody(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFunctionbody" ): + listener.exitFunctionbody(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunctionbody" ): + return visitor.visitFunctionbody(self) + else: + return visitor.visitChildren(self) + + + + + def functionbody(self): + + localctx = CPP14Parser.FunctionbodyContext(self, self._ctx, self.state) + self.enterRule(localctx, 278, self.RULE_functionbody) + self._la = 0 # Token type + try: + self.state = 1919 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,225,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1909 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Colon: + self.state = 1908 + self.ctorinitializer() + + + self.state = 1911 + self.compoundstatement() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1912 + self.functiontryblock() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 1913 + self.match(CPP14Parser.Assign) + self.state = 1914 + self.match(CPP14Parser.Default) + self.state = 1915 + self.match(CPP14Parser.Semi) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 1916 + self.match(CPP14Parser.Assign) + self.state = 1917 + self.match(CPP14Parser.Delete) + self.state = 1918 + self.match(CPP14Parser.Semi) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class InitializerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_initializer + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class InitDeclWithAssignListContext(InitializerContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.InitializerContext + super().__init__(parser) + self.copyFrom(ctx) + + def braceorequalinitializer(self): + return self.getTypedRuleContext(CPP14Parser.BraceorequalinitializerContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInitDeclWithAssignList" ): + listener.enterInitDeclWithAssignList(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInitDeclWithAssignList" ): + listener.exitInitDeclWithAssignList(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitInitDeclWithAssignList" ): + return visitor.visitInitDeclWithAssignList(self) + else: + return visitor.visitChildren(self) + + + class InitDeclWithCallContext(InitializerContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.InitializerContext + super().__init__(parser) + self.copyFrom(ctx) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + def expressionlist(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionlistContext,0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInitDeclWithCall" ): + listener.enterInitDeclWithCall(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInitDeclWithCall" ): + listener.exitInitDeclWithCall(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitInitDeclWithCall" ): + return visitor.visitInitDeclWithCall(self) + else: + return visitor.visitChildren(self) + + + + def initializer(self): + + localctx = CPP14Parser.InitializerContext(self, self._ctx, self.state) + self.enterRule(localctx, 280, self.RULE_initializer) + try: + self.state = 1926 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.LeftBrace, CPP14Parser.Assign]: + localctx = CPP14Parser.InitDeclWithAssignListContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 1921 + self.braceorequalinitializer() + pass + elif token in [CPP14Parser.LeftParen]: + localctx = CPP14Parser.InitDeclWithCallContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 1922 + self.match(CPP14Parser.LeftParen) + self.state = 1923 + self.expressionlist() + self.state = 1924 + self.match(CPP14Parser.RightParen) + 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 BraceorequalinitializerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_braceorequalinitializer + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class InitDeclWithAssignContext(BraceorequalinitializerContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.BraceorequalinitializerContext + super().__init__(parser) + self.copyFrom(ctx) + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + def initializerclause(self): + return self.getTypedRuleContext(CPP14Parser.InitializerclauseContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInitDeclWithAssign" ): + listener.enterInitDeclWithAssign(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInitDeclWithAssign" ): + listener.exitInitDeclWithAssign(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitInitDeclWithAssign" ): + return visitor.visitInitDeclWithAssign(self) + else: + return visitor.visitChildren(self) + + + class InitDeclWithListContext(BraceorequalinitializerContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.BraceorequalinitializerContext + super().__init__(parser) + self.copyFrom(ctx) + + def bracedinitlist(self): + return self.getTypedRuleContext(CPP14Parser.BracedinitlistContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInitDeclWithList" ): + listener.enterInitDeclWithList(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInitDeclWithList" ): + listener.exitInitDeclWithList(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitInitDeclWithList" ): + return visitor.visitInitDeclWithList(self) + else: + return visitor.visitChildren(self) + + + + def braceorequalinitializer(self): + + localctx = CPP14Parser.BraceorequalinitializerContext(self, self._ctx, self.state) + self.enterRule(localctx, 282, self.RULE_braceorequalinitializer) + try: + self.state = 1931 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Assign]: + localctx = CPP14Parser.InitDeclWithAssignContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 1928 + self.match(CPP14Parser.Assign) + self.state = 1929 + self.initializerclause() + pass + elif token in [CPP14Parser.LeftBrace]: + localctx = CPP14Parser.InitDeclWithListContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 1930 + self.bracedinitlist() + 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 InitializerclauseContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_initializerclause + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class ArrayAssignContext(InitializerclauseContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.InitializerclauseContext + super().__init__(parser) + self.copyFrom(ctx) + + def bracedinitlist(self): + return self.getTypedRuleContext(CPP14Parser.BracedinitlistContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterArrayAssign" ): + listener.enterArrayAssign(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitArrayAssign" ): + listener.exitArrayAssign(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitArrayAssign" ): + return visitor.visitArrayAssign(self) + else: + return visitor.visitChildren(self) + + + class NormalAssignContext(InitializerclauseContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.InitializerclauseContext + super().__init__(parser) + self.copyFrom(ctx) + + def assignmentexpression(self): + return self.getTypedRuleContext(CPP14Parser.AssignmentexpressionContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNormalAssign" ): + listener.enterNormalAssign(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNormalAssign" ): + listener.exitNormalAssign(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNormalAssign" ): + return visitor.visitNormalAssign(self) + else: + return visitor.visitChildren(self) + + + + def initializerclause(self): + + localctx = CPP14Parser.InitializerclauseContext(self, self._ctx, self.state) + self.enterRule(localctx, 284, self.RULE_initializerclause) + try: + self.state = 1935 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Alignof, CPP14Parser.Auto, CPP14Parser.Bool, CPP14Parser.Char, CPP14Parser.Char16, CPP14Parser.Char32, CPP14Parser.Const_cast, CPP14Parser.Decltype, CPP14Parser.Delete, CPP14Parser.Double, CPP14Parser.Dynamic_cast, CPP14Parser.FalseToken, CPP14Parser.Float, CPP14Parser.Int, CPP14Parser.Long, CPP14Parser.New, CPP14Parser.Noexcept, CPP14Parser.Nullptr, CPP14Parser.Operator, CPP14Parser.Reinterpret_cast, CPP14Parser.Short, CPP14Parser.Signed, CPP14Parser.Sizeof, CPP14Parser.Static_cast, CPP14Parser.This, CPP14Parser.Throw, CPP14Parser.TrueToken, CPP14Parser.Typeid, CPP14Parser.Typename, CPP14Parser.Unsigned, CPP14Parser.Void, CPP14Parser.Wchar, CPP14Parser.LeftParen, CPP14Parser.LeftBracket, CPP14Parser.Plus, CPP14Parser.Minus, CPP14Parser.Star, CPP14Parser.And, CPP14Parser.Or, CPP14Parser.Tilde, CPP14Parser.Not, CPP14Parser.PlusPlus, CPP14Parser.MinusMinus, CPP14Parser.Doublecolon, CPP14Parser.Identifier, CPP14Parser.Integerliteral, CPP14Parser.Characterliteral, CPP14Parser.Floatingliteral, CPP14Parser.Stringliteral, CPP14Parser.Userdefinedintegerliteral, CPP14Parser.Userdefinedfloatingliteral, CPP14Parser.Userdefinedstringliteral, CPP14Parser.Userdefinedcharacterliteral]: + localctx = CPP14Parser.NormalAssignContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 1933 + self.assignmentexpression() + pass + elif token in [CPP14Parser.LeftBrace]: + localctx = CPP14Parser.ArrayAssignContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 1934 + self.bracedinitlist() + 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 InitializerlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def initializerclause(self): + return self.getTypedRuleContext(CPP14Parser.InitializerclauseContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def initializerlist(self): + return self.getTypedRuleContext(CPP14Parser.InitializerlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_initializerlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterInitializerlist" ): + listener.enterInitializerlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitInitializerlist" ): + listener.exitInitializerlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitInitializerlist" ): + return visitor.visitInitializerlist(self) + else: + return visitor.visitChildren(self) + + + + def initializerlist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.InitializerlistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 286 + self.enterRecursionRule(localctx, 286, self.RULE_initializerlist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1938 + self.initializerclause() + self.state = 1940 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,229,self._ctx) + if la_ == 1: + self.state = 1939 + self.match(CPP14Parser.Ellipsis) + + + self._ctx.stop = self._input.LT(-1) + self.state = 1950 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,231,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.InitializerlistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_initializerlist) + self.state = 1942 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 1943 + self.match(CPP14Parser.Comma) + self.state = 1944 + self.initializerclause() + self.state = 1946 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,230,self._ctx) + if la_ == 1: + self.state = 1945 + self.match(CPP14Parser.Ellipsis) + + + self.state = 1952 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,231,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class BracedinitlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def LeftBrace(self): + return self.getToken(CPP14Parser.LeftBrace, 0) + + def initializerlist(self): + return self.getTypedRuleContext(CPP14Parser.InitializerlistContext,0) + + + def RightBrace(self): + return self.getToken(CPP14Parser.RightBrace, 0) + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_bracedinitlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBracedinitlist" ): + listener.enterBracedinitlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBracedinitlist" ): + listener.exitBracedinitlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBracedinitlist" ): + return visitor.visitBracedinitlist(self) + else: + return visitor.visitChildren(self) + + + + + def bracedinitlist(self): + + localctx = CPP14Parser.BracedinitlistContext(self, self._ctx, self.state) + self.enterRule(localctx, 288, self.RULE_bracedinitlist) + self._la = 0 # Token type + try: + self.state = 1962 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,233,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1953 + self.match(CPP14Parser.LeftBrace) + self.state = 1954 + self.initializerlist(0) + self.state = 1956 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Comma: + self.state = 1955 + self.match(CPP14Parser.Comma) + + + self.state = 1958 + self.match(CPP14Parser.RightBrace) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1960 + self.match(CPP14Parser.LeftBrace) + self.state = 1961 + self.match(CPP14Parser.RightBrace) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassnameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def simpletemplateid(self): + return self.getTypedRuleContext(CPP14Parser.SimpletemplateidContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_classname + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassname" ): + listener.enterClassname(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassname" ): + listener.exitClassname(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClassname" ): + return visitor.visitClassname(self) + else: + return visitor.visitChildren(self) + + + + + def classname(self): + + localctx = CPP14Parser.ClassnameContext(self, self._ctx, self.state) + self.enterRule(localctx, 290, self.RULE_classname) + try: + self.state = 1966 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,234,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1964 + self.match(CPP14Parser.Identifier) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1965 + self.simpletemplateid() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassspecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classhead(self): + return self.getTypedRuleContext(CPP14Parser.ClassheadContext,0) + + + def LeftBrace(self): + return self.getToken(CPP14Parser.LeftBrace, 0) + + def RightBrace(self): + return self.getToken(CPP14Parser.RightBrace, 0) + + def memberspecification(self): + return self.getTypedRuleContext(CPP14Parser.MemberspecificationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_classspecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassspecifier" ): + listener.enterClassspecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassspecifier" ): + listener.exitClassspecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClassspecifier" ): + return visitor.visitClassspecifier(self) + else: + return visitor.visitChildren(self) + + + + + def classspecifier(self): + + localctx = CPP14Parser.ClassspecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 292, self.RULE_classspecifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 1968 + self.classhead() + self.state = 1969 + self.match(CPP14Parser.LeftBrace) + self.state = 1971 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Constexpr) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Explicit) | (1 << CPP14Parser.Extern) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Friend) | (1 << CPP14Parser.Inline) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Private) | (1 << CPP14Parser.Protected) | (1 << CPP14Parser.Public) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Static_assert) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.Template) | (1 << CPP14Parser.Thread_local))) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & ((1 << (CPP14Parser.Typedef - 67)) | (1 << (CPP14Parser.Typename - 67)) | (1 << (CPP14Parser.Union - 67)) | (1 << (CPP14Parser.Unsigned - 67)) | (1 << (CPP14Parser.Using - 67)) | (1 << (CPP14Parser.Virtual - 67)) | (1 << (CPP14Parser.Void - 67)) | (1 << (CPP14Parser.Volatile - 67)) | (1 << (CPP14Parser.Wchar - 67)) | (1 << (CPP14Parser.LeftParen - 67)) | (1 << (CPP14Parser.LeftBracket - 67)) | (1 << (CPP14Parser.Star - 67)) | (1 << (CPP14Parser.And - 67)) | (1 << (CPP14Parser.Tilde - 67)) | (1 << (CPP14Parser.AndAnd - 67)) | (1 << (CPP14Parser.Colon - 67)) | (1 << (CPP14Parser.Doublecolon - 67)) | (1 << (CPP14Parser.Semi - 67)) | (1 << (CPP14Parser.Ellipsis - 67)) | (1 << (CPP14Parser.Identifier - 67)))) != 0): + self.state = 1970 + self.memberspecification() + + + self.state = 1973 + self.match(CPP14Parser.RightBrace) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassheadContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classkey(self): + return self.getTypedRuleContext(CPP14Parser.ClasskeyContext,0) + + + def classheadname(self): + return self.getTypedRuleContext(CPP14Parser.ClassheadnameContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def classvirtspecifier(self): + return self.getTypedRuleContext(CPP14Parser.ClassvirtspecifierContext,0) + + + def baseclause(self): + return self.getTypedRuleContext(CPP14Parser.BaseclauseContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_classhead + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClasshead" ): + listener.enterClasshead(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClasshead" ): + listener.exitClasshead(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClasshead" ): + return visitor.visitClasshead(self) + else: + return visitor.visitChildren(self) + + + + + def classhead(self): + + localctx = CPP14Parser.ClassheadContext(self, self._ctx, self.state) + self.enterRule(localctx, 294, self.RULE_classhead) + self._la = 0 # Token type + try: + self.state = 1993 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,241,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 1975 + self.classkey() + self.state = 1977 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1976 + self.attributespecifierseq(0) + + + self.state = 1979 + self.classheadname() + self.state = 1981 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Final: + self.state = 1980 + self.classvirtspecifier() + + + self.state = 1984 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Colon: + self.state = 1983 + self.baseclause() + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 1986 + self.classkey() + self.state = 1988 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 1987 + self.attributespecifierseq(0) + + + self.state = 1991 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Colon: + self.state = 1990 + self.baseclause() + + + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassheadnameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classname(self): + return self.getTypedRuleContext(CPP14Parser.ClassnameContext,0) + + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_classheadname + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassheadname" ): + listener.enterClassheadname(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassheadname" ): + listener.exitClassheadname(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClassheadname" ): + return visitor.visitClassheadname(self) + else: + return visitor.visitChildren(self) + + + + + def classheadname(self): + + localctx = CPP14Parser.ClassheadnameContext(self, self._ctx, self.state) + self.enterRule(localctx, 296, self.RULE_classheadname) + try: + self.enterOuterAlt(localctx, 1) + self.state = 1996 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,242,self._ctx) + if la_ == 1: + self.state = 1995 + self.nestednamespecifier(0) + + + self.state = 1998 + self.classname() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassvirtspecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Final(self): + return self.getToken(CPP14Parser.Final, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_classvirtspecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassvirtspecifier" ): + listener.enterClassvirtspecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassvirtspecifier" ): + listener.exitClassvirtspecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClassvirtspecifier" ): + return visitor.visitClassvirtspecifier(self) + else: + return visitor.visitChildren(self) + + + + + def classvirtspecifier(self): + + localctx = CPP14Parser.ClassvirtspecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 298, self.RULE_classvirtspecifier) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2000 + self.match(CPP14Parser.Final) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClasskeyContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Class(self): + return self.getToken(CPP14Parser.Class, 0) + + def Struct(self): + return self.getToken(CPP14Parser.Struct, 0) + + def Union(self): + return self.getToken(CPP14Parser.Union, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_classkey + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClasskey" ): + listener.enterClasskey(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClasskey" ): + listener.exitClasskey(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClasskey" ): + return visitor.visitClasskey(self) + else: + return visitor.visitChildren(self) + + + + + def classkey(self): + + localctx = CPP14Parser.ClasskeyContext(self, self._ctx, self.state) + self.enterRule(localctx, 300, self.RULE_classkey) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 2002 + _la = self._input.LA(1) + if not(((((_la - 14)) & ~0x3f) == 0 and ((1 << (_la - 14)) & ((1 << (CPP14Parser.Class - 14)) | (1 << (CPP14Parser.Struct - 14)) | (1 << (CPP14Parser.Union - 14)))) != 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 MemberspecificationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def memberdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.MemberdeclarationContext,0) + + + def memberspecification(self): + return self.getTypedRuleContext(CPP14Parser.MemberspecificationContext,0) + + + def accessspecifier(self): + return self.getTypedRuleContext(CPP14Parser.AccessspecifierContext,0) + + + def Colon(self): + return self.getToken(CPP14Parser.Colon, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_memberspecification + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberspecification" ): + listener.enterMemberspecification(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberspecification" ): + listener.exitMemberspecification(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberspecification" ): + return visitor.visitMemberspecification(self) + else: + return visitor.visitChildren(self) + + + + + def memberspecification(self): + + localctx = CPP14Parser.MemberspecificationContext(self, self._ctx, self.state) + self.enterRule(localctx, 302, self.RULE_memberspecification) + self._la = 0 # Token type + try: + self.state = 2013 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Alignas, CPP14Parser.Auto, CPP14Parser.Bool, CPP14Parser.Char, CPP14Parser.Char16, CPP14Parser.Char32, CPP14Parser.Class, CPP14Parser.Const, CPP14Parser.Constexpr, CPP14Parser.Decltype, CPP14Parser.Double, CPP14Parser.Enum, CPP14Parser.Explicit, CPP14Parser.Extern, CPP14Parser.Float, CPP14Parser.Friend, CPP14Parser.Inline, CPP14Parser.Int, CPP14Parser.Long, CPP14Parser.Mutable, CPP14Parser.Operator, CPP14Parser.Register, CPP14Parser.Short, CPP14Parser.Signed, CPP14Parser.Static, CPP14Parser.Static_assert, CPP14Parser.Struct, CPP14Parser.Template, CPP14Parser.Thread_local, CPP14Parser.Typedef, CPP14Parser.Typename, CPP14Parser.Union, CPP14Parser.Unsigned, CPP14Parser.Using, CPP14Parser.Virtual, CPP14Parser.Void, CPP14Parser.Volatile, CPP14Parser.Wchar, CPP14Parser.LeftParen, CPP14Parser.LeftBracket, CPP14Parser.Star, CPP14Parser.And, CPP14Parser.Tilde, CPP14Parser.AndAnd, CPP14Parser.Colon, CPP14Parser.Doublecolon, CPP14Parser.Semi, CPP14Parser.Ellipsis, CPP14Parser.Identifier]: + self.enterOuterAlt(localctx, 1) + self.state = 2004 + self.memberdeclaration() + self.state = 2006 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Constexpr) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Explicit) | (1 << CPP14Parser.Extern) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Friend) | (1 << CPP14Parser.Inline) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Private) | (1 << CPP14Parser.Protected) | (1 << CPP14Parser.Public) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Static_assert) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.Template) | (1 << CPP14Parser.Thread_local))) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & ((1 << (CPP14Parser.Typedef - 67)) | (1 << (CPP14Parser.Typename - 67)) | (1 << (CPP14Parser.Union - 67)) | (1 << (CPP14Parser.Unsigned - 67)) | (1 << (CPP14Parser.Using - 67)) | (1 << (CPP14Parser.Virtual - 67)) | (1 << (CPP14Parser.Void - 67)) | (1 << (CPP14Parser.Volatile - 67)) | (1 << (CPP14Parser.Wchar - 67)) | (1 << (CPP14Parser.LeftParen - 67)) | (1 << (CPP14Parser.LeftBracket - 67)) | (1 << (CPP14Parser.Star - 67)) | (1 << (CPP14Parser.And - 67)) | (1 << (CPP14Parser.Tilde - 67)) | (1 << (CPP14Parser.AndAnd - 67)) | (1 << (CPP14Parser.Colon - 67)) | (1 << (CPP14Parser.Doublecolon - 67)) | (1 << (CPP14Parser.Semi - 67)) | (1 << (CPP14Parser.Ellipsis - 67)) | (1 << (CPP14Parser.Identifier - 67)))) != 0): + self.state = 2005 + self.memberspecification() + + + pass + elif token in [CPP14Parser.Private, CPP14Parser.Protected, CPP14Parser.Public]: + self.enterOuterAlt(localctx, 2) + self.state = 2008 + self.accessspecifier() + self.state = 2009 + self.match(CPP14Parser.Colon) + self.state = 2011 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Constexpr) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Explicit) | (1 << CPP14Parser.Extern) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Friend) | (1 << CPP14Parser.Inline) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Mutable) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Private) | (1 << CPP14Parser.Protected) | (1 << CPP14Parser.Public) | (1 << CPP14Parser.Register) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Static) | (1 << CPP14Parser.Static_assert) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.Template) | (1 << CPP14Parser.Thread_local))) != 0) or ((((_la - 67)) & ~0x3f) == 0 and ((1 << (_la - 67)) & ((1 << (CPP14Parser.Typedef - 67)) | (1 << (CPP14Parser.Typename - 67)) | (1 << (CPP14Parser.Union - 67)) | (1 << (CPP14Parser.Unsigned - 67)) | (1 << (CPP14Parser.Using - 67)) | (1 << (CPP14Parser.Virtual - 67)) | (1 << (CPP14Parser.Void - 67)) | (1 << (CPP14Parser.Volatile - 67)) | (1 << (CPP14Parser.Wchar - 67)) | (1 << (CPP14Parser.LeftParen - 67)) | (1 << (CPP14Parser.LeftBracket - 67)) | (1 << (CPP14Parser.Star - 67)) | (1 << (CPP14Parser.And - 67)) | (1 << (CPP14Parser.Tilde - 67)) | (1 << (CPP14Parser.AndAnd - 67)) | (1 << (CPP14Parser.Colon - 67)) | (1 << (CPP14Parser.Doublecolon - 67)) | (1 << (CPP14Parser.Semi - 67)) | (1 << (CPP14Parser.Ellipsis - 67)) | (1 << (CPP14Parser.Identifier - 67)))) != 0): + self.state = 2010 + self.memberspecification() + + + 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 MemberdeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + + def getRuleIndex(self): + return CPP14Parser.RULE_memberdeclaration + + + def copyFrom(self, ctx:ParserRuleContext): + super().copyFrom(ctx) + + + + class MemberStaticAssertContext(MemberdeclarationContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.MemberdeclarationContext + super().__init__(parser) + self.copyFrom(ctx) + + def static_assertdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.Static_assertdeclarationContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberStaticAssert" ): + listener.enterMemberStaticAssert(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberStaticAssert" ): + listener.exitMemberStaticAssert(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberStaticAssert" ): + return visitor.visitMemberStaticAssert(self) + else: + return visitor.visitChildren(self) + + + class MemberTemplateDeclContext(MemberdeclarationContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.MemberdeclarationContext + super().__init__(parser) + self.copyFrom(ctx) + + def templatedeclaration(self): + return self.getTypedRuleContext(CPP14Parser.TemplatedeclarationContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberTemplateDecl" ): + listener.enterMemberTemplateDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberTemplateDecl" ): + listener.exitMemberTemplateDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberTemplateDecl" ): + return visitor.visitMemberTemplateDecl(self) + else: + return visitor.visitChildren(self) + + + class MemberUsingContext(MemberdeclarationContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.MemberdeclarationContext + super().__init__(parser) + self.copyFrom(ctx) + + def usingdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.UsingdeclarationContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberUsing" ): + listener.enterMemberUsing(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberUsing" ): + listener.exitMemberUsing(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberUsing" ): + return visitor.visitMemberUsing(self) + else: + return visitor.visitChildren(self) + + + class MemberEmptyContext(MemberdeclarationContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.MemberdeclarationContext + super().__init__(parser) + self.copyFrom(ctx) + + def emptydeclaration(self): + return self.getTypedRuleContext(CPP14Parser.EmptydeclarationContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberEmpty" ): + listener.enterMemberEmpty(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberEmpty" ): + listener.exitMemberEmpty(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberEmpty" ): + return visitor.visitMemberEmpty(self) + else: + return visitor.visitChildren(self) + + + class MemberVarDeclContext(MemberdeclarationContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.MemberdeclarationContext + super().__init__(parser) + self.copyFrom(ctx) + + def Semi(self): + return self.getToken(CPP14Parser.Semi, 0) + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + def declspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.DeclspecifierseqContext,0) + + def memberdeclaratorlist(self): + return self.getTypedRuleContext(CPP14Parser.MemberdeclaratorlistContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberVarDecl" ): + listener.enterMemberVarDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberVarDecl" ): + listener.exitMemberVarDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberVarDecl" ): + return visitor.visitMemberVarDecl(self) + else: + return visitor.visitChildren(self) + + + class MemberFuncDeclContext(MemberdeclarationContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.MemberdeclarationContext + super().__init__(parser) + self.copyFrom(ctx) + + def functiondefinition(self): + return self.getTypedRuleContext(CPP14Parser.FunctiondefinitionContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberFuncDecl" ): + listener.enterMemberFuncDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberFuncDecl" ): + listener.exitMemberFuncDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberFuncDecl" ): + return visitor.visitMemberFuncDecl(self) + else: + return visitor.visitChildren(self) + + + class MemberAliasDeclContext(MemberdeclarationContext): + + def __init__(self, parser, ctx:ParserRuleContext): # actually a CPP14Parser.MemberdeclarationContext + super().__init__(parser) + self.copyFrom(ctx) + + def aliasdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.AliasdeclarationContext,0) + + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberAliasDecl" ): + listener.enterMemberAliasDecl(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberAliasDecl" ): + listener.exitMemberAliasDecl(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberAliasDecl" ): + return visitor.visitMemberAliasDecl(self) + else: + return visitor.visitChildren(self) + + + + def memberdeclaration(self): + + localctx = CPP14Parser.MemberdeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 304, self.RULE_memberdeclaration) + self._la = 0 # Token type + try: + self.state = 2031 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,249,self._ctx) + if la_ == 1: + localctx = CPP14Parser.MemberVarDeclContext(self, localctx) + self.enterOuterAlt(localctx, 1) + self.state = 2016 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,246,self._ctx) + if la_ == 1: + self.state = 2015 + self.attributespecifierseq(0) + + + self.state = 2019 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,247,self._ctx) + if la_ == 1: + self.state = 2018 + self.declspecifierseq() + + + self.state = 2022 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignas) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Operator))) != 0) or ((((_la - 78)) & ~0x3f) == 0 and ((1 << (_la - 78)) & ((1 << (CPP14Parser.LeftParen - 78)) | (1 << (CPP14Parser.LeftBracket - 78)) | (1 << (CPP14Parser.Star - 78)) | (1 << (CPP14Parser.And - 78)) | (1 << (CPP14Parser.Tilde - 78)) | (1 << (CPP14Parser.AndAnd - 78)) | (1 << (CPP14Parser.Colon - 78)) | (1 << (CPP14Parser.Doublecolon - 78)) | (1 << (CPP14Parser.Ellipsis - 78)) | (1 << (CPP14Parser.Identifier - 78)))) != 0): + self.state = 2021 + self.memberdeclaratorlist(0) + + + self.state = 2024 + self.match(CPP14Parser.Semi) + pass + + elif la_ == 2: + localctx = CPP14Parser.MemberFuncDeclContext(self, localctx) + self.enterOuterAlt(localctx, 2) + self.state = 2025 + self.functiondefinition() + pass + + elif la_ == 3: + localctx = CPP14Parser.MemberUsingContext(self, localctx) + self.enterOuterAlt(localctx, 3) + self.state = 2026 + self.usingdeclaration() + pass + + elif la_ == 4: + localctx = CPP14Parser.MemberStaticAssertContext(self, localctx) + self.enterOuterAlt(localctx, 4) + self.state = 2027 + self.static_assertdeclaration() + pass + + elif la_ == 5: + localctx = CPP14Parser.MemberTemplateDeclContext(self, localctx) + self.enterOuterAlt(localctx, 5) + self.state = 2028 + self.templatedeclaration() + pass + + elif la_ == 6: + localctx = CPP14Parser.MemberAliasDeclContext(self, localctx) + self.enterOuterAlt(localctx, 6) + self.state = 2029 + self.aliasdeclaration() + pass + + elif la_ == 7: + localctx = CPP14Parser.MemberEmptyContext(self, localctx) + self.enterOuterAlt(localctx, 7) + self.state = 2030 + self.emptydeclaration() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class MemberdeclaratorlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def memberdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.MemberdeclaratorContext,0) + + + def memberdeclaratorlist(self): + return self.getTypedRuleContext(CPP14Parser.MemberdeclaratorlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_memberdeclaratorlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberdeclaratorlist" ): + listener.enterMemberdeclaratorlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberdeclaratorlist" ): + listener.exitMemberdeclaratorlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberdeclaratorlist" ): + return visitor.visitMemberdeclaratorlist(self) + else: + return visitor.visitChildren(self) + + + + def memberdeclaratorlist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.MemberdeclaratorlistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 306 + self.enterRecursionRule(localctx, 306, self.RULE_memberdeclaratorlist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2034 + self.memberdeclarator() + self._ctx.stop = self._input.LT(-1) + self.state = 2041 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,250,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.MemberdeclaratorlistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_memberdeclaratorlist) + self.state = 2036 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 2037 + self.match(CPP14Parser.Comma) + self.state = 2038 + self.memberdeclarator() + self.state = 2043 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,250,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class MemberdeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def declarator(self): + return self.getTypedRuleContext(CPP14Parser.DeclaratorContext,0) + + + def virtspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.VirtspecifierseqContext,0) + + + def purespecifier(self): + return self.getTypedRuleContext(CPP14Parser.PurespecifierContext,0) + + + def braceorequalinitializer(self): + return self.getTypedRuleContext(CPP14Parser.BraceorequalinitializerContext,0) + + + def Colon(self): + return self.getToken(CPP14Parser.Colon, 0) + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_memberdeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMemberdeclarator" ): + listener.enterMemberdeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMemberdeclarator" ): + listener.exitMemberdeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMemberdeclarator" ): + return visitor.visitMemberdeclarator(self) + else: + return visitor.visitChildren(self) + + + + + def memberdeclarator(self): + + localctx = CPP14Parser.MemberdeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 308, self.RULE_memberdeclarator) + self._la = 0 # Token type + try: + self.state = 2063 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,256,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2044 + self.declarator() + self.state = 2046 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,251,self._ctx) + if la_ == 1: + self.state = 2045 + self.virtspecifierseq(0) + + + self.state = 2049 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,252,self._ctx) + if la_ == 1: + self.state = 2048 + self.purespecifier() + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2051 + self.declarator() + self.state = 2053 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,253,self._ctx) + if la_ == 1: + self.state = 2052 + self.braceorequalinitializer() + + + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 2056 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Identifier: + self.state = 2055 + self.match(CPP14Parser.Identifier) + + + self.state = 2059 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 2058 + self.attributespecifierseq(0) + + + self.state = 2061 + self.match(CPP14Parser.Colon) + self.state = 2062 + self.constantexpression() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class VirtspecifierseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def virtspecifier(self): + return self.getTypedRuleContext(CPP14Parser.VirtspecifierContext,0) + + + def virtspecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.VirtspecifierseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_virtspecifierseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVirtspecifierseq" ): + listener.enterVirtspecifierseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVirtspecifierseq" ): + listener.exitVirtspecifierseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitVirtspecifierseq" ): + return visitor.visitVirtspecifierseq(self) + else: + return visitor.visitChildren(self) + + + + def virtspecifierseq(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.VirtspecifierseqContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 310 + self.enterRecursionRule(localctx, 310, self.RULE_virtspecifierseq, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2066 + self.virtspecifier() + self._ctx.stop = self._input.LT(-1) + self.state = 2072 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,257,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.VirtspecifierseqContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_virtspecifierseq) + self.state = 2068 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 2069 + self.virtspecifier() + self.state = 2074 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,257,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class VirtspecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Override(self): + return self.getToken(CPP14Parser.Override, 0) + + def Final(self): + return self.getToken(CPP14Parser.Final, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_virtspecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterVirtspecifier" ): + listener.enterVirtspecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitVirtspecifier" ): + listener.exitVirtspecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitVirtspecifier" ): + return visitor.visitVirtspecifier(self) + else: + return visitor.visitChildren(self) + + + + + def virtspecifier(self): + + localctx = CPP14Parser.VirtspecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 312, self.RULE_virtspecifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 2075 + _la = self._input.LA(1) + if not(_la==CPP14Parser.Final or _la==CPP14Parser.Override): + 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 PurespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + self.val = None # Token + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def Octalliteral(self): + return self.getToken(CPP14Parser.Octalliteral, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_purespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPurespecifier" ): + listener.enterPurespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPurespecifier" ): + listener.exitPurespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPurespecifier" ): + return visitor.visitPurespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def purespecifier(self): + + localctx = CPP14Parser.PurespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 314, self.RULE_purespecifier) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2077 + self.match(CPP14Parser.Assign) + self.state = 2078 + localctx.val = self.match(CPP14Parser.Octalliteral) + if((None if localctx.val is None else localctx.val.text).compareTo("0")!=0): + exit(-1) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BaseclauseContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Colon(self): + return self.getToken(CPP14Parser.Colon, 0) + + def basespecifierlist(self): + return self.getTypedRuleContext(CPP14Parser.BasespecifierlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_baseclause + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBaseclause" ): + listener.enterBaseclause(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBaseclause" ): + listener.exitBaseclause(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBaseclause" ): + return visitor.visitBaseclause(self) + else: + return visitor.visitChildren(self) + + + + + def baseclause(self): + + localctx = CPP14Parser.BaseclauseContext(self, self._ctx, self.state) + self.enterRule(localctx, 316, self.RULE_baseclause) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2081 + self.match(CPP14Parser.Colon) + self.state = 2082 + self.basespecifierlist(0) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BasespecifierlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def basespecifier(self): + return self.getTypedRuleContext(CPP14Parser.BasespecifierContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def basespecifierlist(self): + return self.getTypedRuleContext(CPP14Parser.BasespecifierlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_basespecifierlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBasespecifierlist" ): + listener.enterBasespecifierlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBasespecifierlist" ): + listener.exitBasespecifierlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBasespecifierlist" ): + return visitor.visitBasespecifierlist(self) + else: + return visitor.visitChildren(self) + + + + def basespecifierlist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.BasespecifierlistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 318 + self.enterRecursionRule(localctx, 318, self.RULE_basespecifierlist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2085 + self.basespecifier() + self.state = 2087 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,258,self._ctx) + if la_ == 1: + self.state = 2086 + self.match(CPP14Parser.Ellipsis) + + + self._ctx.stop = self._input.LT(-1) + self.state = 2097 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,260,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.BasespecifierlistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_basespecifierlist) + self.state = 2089 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 2090 + self.match(CPP14Parser.Comma) + self.state = 2091 + self.basespecifier() + self.state = 2093 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,259,self._ctx) + if la_ == 1: + self.state = 2092 + self.match(CPP14Parser.Ellipsis) + + + self.state = 2099 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,260,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class BasespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def basetypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.BasetypespecifierContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def Virtual(self): + return self.getToken(CPP14Parser.Virtual, 0) + + def accessspecifier(self): + return self.getTypedRuleContext(CPP14Parser.AccessspecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_basespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBasespecifier" ): + listener.enterBasespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBasespecifier" ): + listener.exitBasespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBasespecifier" ): + return visitor.visitBasespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def basespecifier(self): + + localctx = CPP14Parser.BasespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 320, self.RULE_basespecifier) + self._la = 0 # Token type + try: + self.state = 2121 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,266,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2101 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 2100 + self.attributespecifierseq(0) + + + self.state = 2103 + self.basetypespecifier() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2105 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 2104 + self.attributespecifierseq(0) + + + self.state = 2107 + self.match(CPP14Parser.Virtual) + self.state = 2109 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Private) | (1 << CPP14Parser.Protected) | (1 << CPP14Parser.Public))) != 0): + self.state = 2108 + self.accessspecifier() + + + self.state = 2111 + self.basetypespecifier() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 2113 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 2112 + self.attributespecifierseq(0) + + + self.state = 2115 + self.accessspecifier() + self.state = 2117 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Virtual: + self.state = 2116 + self.match(CPP14Parser.Virtual) + + + self.state = 2119 + self.basetypespecifier() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ClassordecltypeContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classname(self): + return self.getTypedRuleContext(CPP14Parser.ClassnameContext,0) + + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def decltypespecifier(self): + return self.getTypedRuleContext(CPP14Parser.DecltypespecifierContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_classordecltype + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterClassordecltype" ): + listener.enterClassordecltype(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitClassordecltype" ): + listener.exitClassordecltype(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitClassordecltype" ): + return visitor.visitClassordecltype(self) + else: + return visitor.visitChildren(self) + + + + + def classordecltype(self): + + localctx = CPP14Parser.ClassordecltypeContext(self, self._ctx, self.state) + self.enterRule(localctx, 322, self.RULE_classordecltype) + try: + self.state = 2128 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,268,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2124 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,267,self._ctx) + if la_ == 1: + self.state = 2123 + self.nestednamespecifier(0) + + + self.state = 2126 + self.classname() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2127 + self.decltypespecifier() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class BasetypespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classordecltype(self): + return self.getTypedRuleContext(CPP14Parser.ClassordecltypeContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_basetypespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBasetypespecifier" ): + listener.enterBasetypespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBasetypespecifier" ): + listener.exitBasetypespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBasetypespecifier" ): + return visitor.visitBasetypespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def basetypespecifier(self): + + localctx = CPP14Parser.BasetypespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 324, self.RULE_basetypespecifier) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2130 + self.classordecltype() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class AccessspecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Private(self): + return self.getToken(CPP14Parser.Private, 0) + + def Protected(self): + return self.getToken(CPP14Parser.Protected, 0) + + def Public(self): + return self.getToken(CPP14Parser.Public, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_accessspecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterAccessspecifier" ): + listener.enterAccessspecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitAccessspecifier" ): + listener.exitAccessspecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitAccessspecifier" ): + return visitor.visitAccessspecifier(self) + else: + return visitor.visitChildren(self) + + + + + def accessspecifier(self): + + localctx = CPP14Parser.AccessspecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 326, self.RULE_accessspecifier) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 2132 + _la = self._input.LA(1) + if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Private) | (1 << CPP14Parser.Protected) | (1 << CPP14Parser.Public))) != 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 ConversionfunctionidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Operator(self): + return self.getToken(CPP14Parser.Operator, 0) + + def conversiontypeid(self): + return self.getTypedRuleContext(CPP14Parser.ConversiontypeidContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_conversionfunctionid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConversionfunctionid" ): + listener.enterConversionfunctionid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConversionfunctionid" ): + listener.exitConversionfunctionid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitConversionfunctionid" ): + return visitor.visitConversionfunctionid(self) + else: + return visitor.visitChildren(self) + + + + + def conversionfunctionid(self): + + localctx = CPP14Parser.ConversionfunctionidContext(self, self._ctx, self.state) + self.enterRule(localctx, 328, self.RULE_conversionfunctionid) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2134 + self.match(CPP14Parser.Operator) + self.state = 2135 + self.conversiontypeid() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ConversiontypeidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.TypespecifierseqContext,0) + + + def conversiondeclarator(self): + return self.getTypedRuleContext(CPP14Parser.ConversiondeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_conversiontypeid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConversiontypeid" ): + listener.enterConversiontypeid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConversiontypeid" ): + listener.exitConversiontypeid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitConversiontypeid" ): + return visitor.visitConversiontypeid(self) + else: + return visitor.visitChildren(self) + + + + + def conversiontypeid(self): + + localctx = CPP14Parser.ConversiontypeidContext(self, self._ctx, self.state) + self.enterRule(localctx, 330, self.RULE_conversiontypeid) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2137 + self.typespecifierseq() + self.state = 2139 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,269,self._ctx) + if la_ == 1: + self.state = 2138 + self.conversiondeclarator() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ConversiondeclaratorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def ptroperator(self): + return self.getTypedRuleContext(CPP14Parser.PtroperatorContext,0) + + + def conversiondeclarator(self): + return self.getTypedRuleContext(CPP14Parser.ConversiondeclaratorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_conversiondeclarator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterConversiondeclarator" ): + listener.enterConversiondeclarator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitConversiondeclarator" ): + listener.exitConversiondeclarator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitConversiondeclarator" ): + return visitor.visitConversiondeclarator(self) + else: + return visitor.visitChildren(self) + + + + + def conversiondeclarator(self): + + localctx = CPP14Parser.ConversiondeclaratorContext(self, self._ctx, self.state) + self.enterRule(localctx, 332, self.RULE_conversiondeclarator) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2141 + self.ptroperator() + self.state = 2143 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,270,self._ctx) + if la_ == 1: + self.state = 2142 + self.conversiondeclarator() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class CtorinitializerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Colon(self): + return self.getToken(CPP14Parser.Colon, 0) + + def meminitializerlist(self): + return self.getTypedRuleContext(CPP14Parser.MeminitializerlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_ctorinitializer + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterCtorinitializer" ): + listener.enterCtorinitializer(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitCtorinitializer" ): + listener.exitCtorinitializer(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitCtorinitializer" ): + return visitor.visitCtorinitializer(self) + else: + return visitor.visitChildren(self) + + + + + def ctorinitializer(self): + + localctx = CPP14Parser.CtorinitializerContext(self, self._ctx, self.state) + self.enterRule(localctx, 334, self.RULE_ctorinitializer) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2145 + self.match(CPP14Parser.Colon) + self.state = 2146 + self.meminitializerlist() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class MeminitializerlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def meminitializer(self): + return self.getTypedRuleContext(CPP14Parser.MeminitializerContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def meminitializerlist(self): + return self.getTypedRuleContext(CPP14Parser.MeminitializerlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_meminitializerlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMeminitializerlist" ): + listener.enterMeminitializerlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMeminitializerlist" ): + listener.exitMeminitializerlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMeminitializerlist" ): + return visitor.visitMeminitializerlist(self) + else: + return visitor.visitChildren(self) + + + + + def meminitializerlist(self): + + localctx = CPP14Parser.MeminitializerlistContext(self, self._ctx, self.state) + self.enterRule(localctx, 336, self.RULE_meminitializerlist) + self._la = 0 # Token type + try: + self.state = 2159 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,273,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2148 + self.meminitializer() + self.state = 2150 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Ellipsis: + self.state = 2149 + self.match(CPP14Parser.Ellipsis) + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2152 + self.meminitializer() + self.state = 2154 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Ellipsis: + self.state = 2153 + self.match(CPP14Parser.Ellipsis) + + + self.state = 2156 + self.match(CPP14Parser.Comma) + self.state = 2157 + self.meminitializerlist() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class MeminitializerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def meminitializerid(self): + return self.getTypedRuleContext(CPP14Parser.MeminitializeridContext,0) + + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def expressionlist(self): + return self.getTypedRuleContext(CPP14Parser.ExpressionlistContext,0) + + + def bracedinitlist(self): + return self.getTypedRuleContext(CPP14Parser.BracedinitlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_meminitializer + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMeminitializer" ): + listener.enterMeminitializer(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMeminitializer" ): + listener.exitMeminitializer(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMeminitializer" ): + return visitor.visitMeminitializer(self) + else: + return visitor.visitChildren(self) + + + + + def meminitializer(self): + + localctx = CPP14Parser.MeminitializerContext(self, self._ctx, self.state) + self.enterRule(localctx, 338, self.RULE_meminitializer) + self._la = 0 # Token type + try: + self.state = 2171 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,275,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2161 + self.meminitializerid() + self.state = 2162 + self.match(CPP14Parser.LeftParen) + self.state = 2164 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.This))) != 0) or ((((_la - 64)) & ~0x3f) == 0 and ((1 << (_la - 64)) & ((1 << (CPP14Parser.Throw - 64)) | (1 << (CPP14Parser.TrueToken - 64)) | (1 << (CPP14Parser.Typeid - 64)) | (1 << (CPP14Parser.Typename - 64)) | (1 << (CPP14Parser.Unsigned - 64)) | (1 << (CPP14Parser.Void - 64)) | (1 << (CPP14Parser.Wchar - 64)) | (1 << (CPP14Parser.LeftParen - 64)) | (1 << (CPP14Parser.LeftBracket - 64)) | (1 << (CPP14Parser.LeftBrace - 64)) | (1 << (CPP14Parser.Plus - 64)) | (1 << (CPP14Parser.Minus - 64)) | (1 << (CPP14Parser.Star - 64)) | (1 << (CPP14Parser.And - 64)) | (1 << (CPP14Parser.Or - 64)) | (1 << (CPP14Parser.Tilde - 64)) | (1 << (CPP14Parser.Not - 64)) | (1 << (CPP14Parser.PlusPlus - 64)) | (1 << (CPP14Parser.MinusMinus - 64)) | (1 << (CPP14Parser.Doublecolon - 64)) | (1 << (CPP14Parser.Identifier - 64)) | (1 << (CPP14Parser.Integerliteral - 64)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 2163 + self.expressionlist() + + + self.state = 2166 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2168 + self.meminitializerid() + self.state = 2169 + self.bracedinitlist() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class MeminitializeridContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def classordecltype(self): + return self.getTypedRuleContext(CPP14Parser.ClassordecltypeContext,0) + + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_meminitializerid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterMeminitializerid" ): + listener.enterMeminitializerid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitMeminitializerid" ): + listener.exitMeminitializerid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitMeminitializerid" ): + return visitor.visitMeminitializerid(self) + else: + return visitor.visitChildren(self) + + + + + def meminitializerid(self): + + localctx = CPP14Parser.MeminitializeridContext(self, self._ctx, self.state) + self.enterRule(localctx, 340, self.RULE_meminitializerid) + try: + self.state = 2175 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,276,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2173 + self.classordecltype() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2174 + self.match(CPP14Parser.Identifier) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class OperatorfunctionidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Operator(self): + return self.getToken(CPP14Parser.Operator, 0) + + def theoperator(self): + return self.getTypedRuleContext(CPP14Parser.TheoperatorContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_operatorfunctionid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterOperatorfunctionid" ): + listener.enterOperatorfunctionid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitOperatorfunctionid" ): + listener.exitOperatorfunctionid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitOperatorfunctionid" ): + return visitor.visitOperatorfunctionid(self) + else: + return visitor.visitChildren(self) + + + + + def operatorfunctionid(self): + + localctx = CPP14Parser.OperatorfunctionidContext(self, self._ctx, self.state) + self.enterRule(localctx, 342, self.RULE_operatorfunctionid) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2177 + self.match(CPP14Parser.Operator) + self.state = 2178 + self.theoperator() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LiteraloperatoridContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Operator(self): + return self.getToken(CPP14Parser.Operator, 0) + + def Stringliteral(self): + return self.getToken(CPP14Parser.Stringliteral, 0) + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def Userdefinedstringliteral(self): + return self.getToken(CPP14Parser.Userdefinedstringliteral, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_literaloperatorid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLiteraloperatorid" ): + listener.enterLiteraloperatorid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLiteraloperatorid" ): + listener.exitLiteraloperatorid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLiteraloperatorid" ): + return visitor.visitLiteraloperatorid(self) + else: + return visitor.visitChildren(self) + + + + + def literaloperatorid(self): + + localctx = CPP14Parser.LiteraloperatoridContext(self, self._ctx, self.state) + self.enterRule(localctx, 344, self.RULE_literaloperatorid) + try: + self.state = 2185 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,277,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2180 + self.match(CPP14Parser.Operator) + self.state = 2181 + self.match(CPP14Parser.Stringliteral) + self.state = 2182 + self.match(CPP14Parser.Identifier) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2183 + self.match(CPP14Parser.Operator) + self.state = 2184 + self.match(CPP14Parser.Userdefinedstringliteral) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TemplatedeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def Less(self): + return self.getToken(CPP14Parser.Less, 0) + + def templateparameterlist(self): + return self.getTypedRuleContext(CPP14Parser.TemplateparameterlistContext,0) + + + def Greater(self): + return self.getToken(CPP14Parser.Greater, 0) + + def declaration(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_templatedeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTemplatedeclaration" ): + listener.enterTemplatedeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTemplatedeclaration" ): + listener.exitTemplatedeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTemplatedeclaration" ): + return visitor.visitTemplatedeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def templatedeclaration(self): + + localctx = CPP14Parser.TemplatedeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 346, self.RULE_templatedeclaration) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2187 + self.match(CPP14Parser.Template) + self.state = 2188 + self.match(CPP14Parser.Less) + self.state = 2189 + self.templateparameterlist(0) + self.state = 2190 + self.match(CPP14Parser.Greater) + self.state = 2191 + self.declaration() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TemplateparameterlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def templateparameter(self): + return self.getTypedRuleContext(CPP14Parser.TemplateparameterContext,0) + + + def templateparameterlist(self): + return self.getTypedRuleContext(CPP14Parser.TemplateparameterlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_templateparameterlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTemplateparameterlist" ): + listener.enterTemplateparameterlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTemplateparameterlist" ): + listener.exitTemplateparameterlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTemplateparameterlist" ): + return visitor.visitTemplateparameterlist(self) + else: + return visitor.visitChildren(self) + + + + def templateparameterlist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.TemplateparameterlistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 348 + self.enterRecursionRule(localctx, 348, self.RULE_templateparameterlist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2194 + self.templateparameter() + self._ctx.stop = self._input.LT(-1) + self.state = 2201 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,278,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.TemplateparameterlistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_templateparameterlist) + self.state = 2196 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 2197 + self.match(CPP14Parser.Comma) + self.state = 2198 + self.templateparameter() + self.state = 2203 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,278,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class TemplateparameterContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typeparameter(self): + return self.getTypedRuleContext(CPP14Parser.TypeparameterContext,0) + + + def parameterdeclaration(self): + return self.getTypedRuleContext(CPP14Parser.ParameterdeclarationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_templateparameter + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTemplateparameter" ): + listener.enterTemplateparameter(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTemplateparameter" ): + listener.exitTemplateparameter(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTemplateparameter" ): + return visitor.visitTemplateparameter(self) + else: + return visitor.visitChildren(self) + + + + + def templateparameter(self): + + localctx = CPP14Parser.TemplateparameterContext(self, self._ctx, self.state) + self.enterRule(localctx, 350, self.RULE_templateparameter) + try: + self.state = 2206 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,279,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2204 + self.typeparameter() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2205 + self.parameterdeclaration() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeparameterContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Class(self): + return self.getToken(CPP14Parser.Class, 0) + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def Typename(self): + return self.getToken(CPP14Parser.Typename, 0) + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def Less(self): + return self.getToken(CPP14Parser.Less, 0) + + def templateparameterlist(self): + return self.getTypedRuleContext(CPP14Parser.TemplateparameterlistContext,0) + + + def Greater(self): + return self.getToken(CPP14Parser.Greater, 0) + + def idexpression(self): + return self.getTypedRuleContext(CPP14Parser.IdexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_typeparameter + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeparameter" ): + listener.enterTypeparameter(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeparameter" ): + listener.exitTypeparameter(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTypeparameter" ): + return visitor.visitTypeparameter(self) + else: + return visitor.visitChildren(self) + + + + + def typeparameter(self): + + localctx = CPP14Parser.TypeparameterContext(self, self._ctx, self.state) + self.enterRule(localctx, 352, self.RULE_typeparameter) + self._la = 0 # Token type + try: + self.state = 2256 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,289,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2208 + self.match(CPP14Parser.Class) + self.state = 2210 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,280,self._ctx) + if la_ == 1: + self.state = 2209 + self.match(CPP14Parser.Ellipsis) + + + self.state = 2213 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,281,self._ctx) + if la_ == 1: + self.state = 2212 + self.match(CPP14Parser.Identifier) + + + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2215 + self.match(CPP14Parser.Class) + self.state = 2217 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Identifier: + self.state = 2216 + self.match(CPP14Parser.Identifier) + + + self.state = 2219 + self.match(CPP14Parser.Assign) + self.state = 2220 + self.thetypeid() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 2221 + self.match(CPP14Parser.Typename) + self.state = 2223 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,283,self._ctx) + if la_ == 1: + self.state = 2222 + self.match(CPP14Parser.Ellipsis) + + + self.state = 2226 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,284,self._ctx) + if la_ == 1: + self.state = 2225 + self.match(CPP14Parser.Identifier) + + + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 2228 + self.match(CPP14Parser.Typename) + self.state = 2230 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Identifier: + self.state = 2229 + self.match(CPP14Parser.Identifier) + + + self.state = 2232 + self.match(CPP14Parser.Assign) + self.state = 2233 + self.thetypeid() + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 2234 + self.match(CPP14Parser.Template) + self.state = 2235 + self.match(CPP14Parser.Less) + self.state = 2236 + self.templateparameterlist(0) + self.state = 2237 + self.match(CPP14Parser.Greater) + self.state = 2238 + self.match(CPP14Parser.Class) + self.state = 2240 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,286,self._ctx) + if la_ == 1: + self.state = 2239 + self.match(CPP14Parser.Ellipsis) + + + self.state = 2243 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,287,self._ctx) + if la_ == 1: + self.state = 2242 + self.match(CPP14Parser.Identifier) + + + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 2245 + self.match(CPP14Parser.Template) + self.state = 2246 + self.match(CPP14Parser.Less) + self.state = 2247 + self.templateparameterlist(0) + self.state = 2248 + self.match(CPP14Parser.Greater) + self.state = 2249 + self.match(CPP14Parser.Class) + self.state = 2251 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Identifier: + self.state = 2250 + self.match(CPP14Parser.Identifier) + + + self.state = 2253 + self.match(CPP14Parser.Assign) + self.state = 2254 + self.idexpression() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class SimpletemplateidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def templatename(self): + return self.getTypedRuleContext(CPP14Parser.TemplatenameContext,0) + + + def Less(self): + return self.getToken(CPP14Parser.Less, 0) + + def Greater(self): + return self.getToken(CPP14Parser.Greater, 0) + + def templateargumentlist(self): + return self.getTypedRuleContext(CPP14Parser.TemplateargumentlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_simpletemplateid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterSimpletemplateid" ): + listener.enterSimpletemplateid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitSimpletemplateid" ): + listener.exitSimpletemplateid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitSimpletemplateid" ): + return visitor.visitSimpletemplateid(self) + else: + return visitor.visitChildren(self) + + + + + def simpletemplateid(self): + + localctx = CPP14Parser.SimpletemplateidContext(self, self._ctx, self.state) + self.enterRule(localctx, 354, self.RULE_simpletemplateid) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 2258 + self.templatename() + self.state = 2259 + self.match(CPP14Parser.Less) + self.state = 2261 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.This))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (CPP14Parser.TrueToken - 65)) | (1 << (CPP14Parser.Typeid - 65)) | (1 << (CPP14Parser.Typename - 65)) | (1 << (CPP14Parser.Union - 65)) | (1 << (CPP14Parser.Unsigned - 65)) | (1 << (CPP14Parser.Void - 65)) | (1 << (CPP14Parser.Volatile - 65)) | (1 << (CPP14Parser.Wchar - 65)) | (1 << (CPP14Parser.LeftParen - 65)) | (1 << (CPP14Parser.LeftBracket - 65)) | (1 << (CPP14Parser.Plus - 65)) | (1 << (CPP14Parser.Minus - 65)) | (1 << (CPP14Parser.Star - 65)) | (1 << (CPP14Parser.And - 65)) | (1 << (CPP14Parser.Or - 65)) | (1 << (CPP14Parser.Tilde - 65)) | (1 << (CPP14Parser.Not - 65)) | (1 << (CPP14Parser.PlusPlus - 65)) | (1 << (CPP14Parser.MinusMinus - 65)) | (1 << (CPP14Parser.Doublecolon - 65)) | (1 << (CPP14Parser.Identifier - 65)) | (1 << (CPP14Parser.Integerliteral - 65)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 2260 + self.templateargumentlist(0) + + + self.state = 2263 + self.match(CPP14Parser.Greater) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TemplateidContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def simpletemplateid(self): + return self.getTypedRuleContext(CPP14Parser.SimpletemplateidContext,0) + + + def operatorfunctionid(self): + return self.getTypedRuleContext(CPP14Parser.OperatorfunctionidContext,0) + + + def Less(self): + return self.getToken(CPP14Parser.Less, 0) + + def Greater(self): + return self.getToken(CPP14Parser.Greater, 0) + + def templateargumentlist(self): + return self.getTypedRuleContext(CPP14Parser.TemplateargumentlistContext,0) + + + def literaloperatorid(self): + return self.getTypedRuleContext(CPP14Parser.LiteraloperatoridContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_templateid + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTemplateid" ): + listener.enterTemplateid(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTemplateid" ): + listener.exitTemplateid(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTemplateid" ): + return visitor.visitTemplateid(self) + else: + return visitor.visitChildren(self) + + + + + def templateid(self): + + localctx = CPP14Parser.TemplateidContext(self, self._ctx, self.state) + self.enterRule(localctx, 356, self.RULE_templateid) + self._la = 0 # Token type + try: + self.state = 2280 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,293,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2265 + self.simpletemplateid() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2266 + self.operatorfunctionid() + self.state = 2267 + self.match(CPP14Parser.Less) + self.state = 2269 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.This))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (CPP14Parser.TrueToken - 65)) | (1 << (CPP14Parser.Typeid - 65)) | (1 << (CPP14Parser.Typename - 65)) | (1 << (CPP14Parser.Union - 65)) | (1 << (CPP14Parser.Unsigned - 65)) | (1 << (CPP14Parser.Void - 65)) | (1 << (CPP14Parser.Volatile - 65)) | (1 << (CPP14Parser.Wchar - 65)) | (1 << (CPP14Parser.LeftParen - 65)) | (1 << (CPP14Parser.LeftBracket - 65)) | (1 << (CPP14Parser.Plus - 65)) | (1 << (CPP14Parser.Minus - 65)) | (1 << (CPP14Parser.Star - 65)) | (1 << (CPP14Parser.And - 65)) | (1 << (CPP14Parser.Or - 65)) | (1 << (CPP14Parser.Tilde - 65)) | (1 << (CPP14Parser.Not - 65)) | (1 << (CPP14Parser.PlusPlus - 65)) | (1 << (CPP14Parser.MinusMinus - 65)) | (1 << (CPP14Parser.Doublecolon - 65)) | (1 << (CPP14Parser.Identifier - 65)) | (1 << (CPP14Parser.Integerliteral - 65)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 2268 + self.templateargumentlist(0) + + + self.state = 2271 + self.match(CPP14Parser.Greater) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 2273 + self.literaloperatorid() + self.state = 2274 + self.match(CPP14Parser.Less) + self.state = 2276 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Alignof) | (1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Const_cast) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Delete) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Dynamic_cast) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.FalseToken) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.New) | (1 << CPP14Parser.Noexcept) | (1 << CPP14Parser.Nullptr) | (1 << CPP14Parser.Operator) | (1 << CPP14Parser.Reinterpret_cast) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Sizeof) | (1 << CPP14Parser.Static_cast) | (1 << CPP14Parser.Struct) | (1 << CPP14Parser.This))) != 0) or ((((_la - 65)) & ~0x3f) == 0 and ((1 << (_la - 65)) & ((1 << (CPP14Parser.TrueToken - 65)) | (1 << (CPP14Parser.Typeid - 65)) | (1 << (CPP14Parser.Typename - 65)) | (1 << (CPP14Parser.Union - 65)) | (1 << (CPP14Parser.Unsigned - 65)) | (1 << (CPP14Parser.Void - 65)) | (1 << (CPP14Parser.Volatile - 65)) | (1 << (CPP14Parser.Wchar - 65)) | (1 << (CPP14Parser.LeftParen - 65)) | (1 << (CPP14Parser.LeftBracket - 65)) | (1 << (CPP14Parser.Plus - 65)) | (1 << (CPP14Parser.Minus - 65)) | (1 << (CPP14Parser.Star - 65)) | (1 << (CPP14Parser.And - 65)) | (1 << (CPP14Parser.Or - 65)) | (1 << (CPP14Parser.Tilde - 65)) | (1 << (CPP14Parser.Not - 65)) | (1 << (CPP14Parser.PlusPlus - 65)) | (1 << (CPP14Parser.MinusMinus - 65)) | (1 << (CPP14Parser.Doublecolon - 65)) | (1 << (CPP14Parser.Identifier - 65)) | (1 << (CPP14Parser.Integerliteral - 65)))) != 0) or ((((_la - 132)) & ~0x3f) == 0 and ((1 << (_la - 132)) & ((1 << (CPP14Parser.Characterliteral - 132)) | (1 << (CPP14Parser.Floatingliteral - 132)) | (1 << (CPP14Parser.Stringliteral - 132)) | (1 << (CPP14Parser.Userdefinedintegerliteral - 132)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 132)) | (1 << (CPP14Parser.Userdefinedstringliteral - 132)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 132)))) != 0): + self.state = 2275 + self.templateargumentlist(0) + + + self.state = 2278 + self.match(CPP14Parser.Greater) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TemplatenameContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_templatename + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTemplatename" ): + listener.enterTemplatename(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTemplatename" ): + listener.exitTemplatename(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTemplatename" ): + return visitor.visitTemplatename(self) + else: + return visitor.visitChildren(self) + + + + + def templatename(self): + + localctx = CPP14Parser.TemplatenameContext(self, self._ctx, self.state) + self.enterRule(localctx, 358, self.RULE_templatename) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2282 + self.match(CPP14Parser.Identifier) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TemplateargumentlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def templateargument(self): + return self.getTypedRuleContext(CPP14Parser.TemplateargumentContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def templateargumentlist(self): + return self.getTypedRuleContext(CPP14Parser.TemplateargumentlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_templateargumentlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTemplateargumentlist" ): + listener.enterTemplateargumentlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTemplateargumentlist" ): + listener.exitTemplateargumentlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTemplateargumentlist" ): + return visitor.visitTemplateargumentlist(self) + else: + return visitor.visitChildren(self) + + + + def templateargumentlist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.TemplateargumentlistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 360 + self.enterRecursionRule(localctx, 360, self.RULE_templateargumentlist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2285 + self.templateargument() + self.state = 2287 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,294,self._ctx) + if la_ == 1: + self.state = 2286 + self.match(CPP14Parser.Ellipsis) + + + self._ctx.stop = self._input.LT(-1) + self.state = 2297 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,296,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.TemplateargumentlistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_templateargumentlist) + self.state = 2289 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 2290 + self.match(CPP14Parser.Comma) + self.state = 2291 + self.templateargument() + self.state = 2293 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,295,self._ctx) + if la_ == 1: + self.state = 2292 + self.match(CPP14Parser.Ellipsis) + + + self.state = 2299 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,296,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class TemplateargumentContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def idexpression(self): + return self.getTypedRuleContext(CPP14Parser.IdexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_templateargument + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTemplateargument" ): + listener.enterTemplateargument(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTemplateargument" ): + listener.exitTemplateargument(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTemplateargument" ): + return visitor.visitTemplateargument(self) + else: + return visitor.visitChildren(self) + + + + + def templateargument(self): + + localctx = CPP14Parser.TemplateargumentContext(self, self._ctx, self.state) + self.enterRule(localctx, 362, self.RULE_templateargument) + try: + self.state = 2303 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,297,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2300 + self.thetypeid() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2301 + self.constantexpression() + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 2302 + self.idexpression() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypenamespecifierContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Typename(self): + return self.getToken(CPP14Parser.Typename, 0) + + def nestednamespecifier(self): + return self.getTypedRuleContext(CPP14Parser.NestednamespecifierContext,0) + + + def Identifier(self): + return self.getToken(CPP14Parser.Identifier, 0) + + def simpletemplateid(self): + return self.getTypedRuleContext(CPP14Parser.SimpletemplateidContext,0) + + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_typenamespecifier + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypenamespecifier" ): + listener.enterTypenamespecifier(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypenamespecifier" ): + listener.exitTypenamespecifier(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTypenamespecifier" ): + return visitor.visitTypenamespecifier(self) + else: + return visitor.visitChildren(self) + + + + + def typenamespecifier(self): + + localctx = CPP14Parser.TypenamespecifierContext(self, self._ctx, self.state) + self.enterRule(localctx, 364, self.RULE_typenamespecifier) + self._la = 0 # Token type + try: + self.state = 2316 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,299,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2305 + self.match(CPP14Parser.Typename) + self.state = 2306 + self.nestednamespecifier(0) + self.state = 2307 + self.match(CPP14Parser.Identifier) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2309 + self.match(CPP14Parser.Typename) + self.state = 2310 + self.nestednamespecifier(0) + self.state = 2312 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Template: + self.state = 2311 + self.match(CPP14Parser.Template) + + + self.state = 2314 + self.simpletemplateid() + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExplicitinstantiationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def declaration(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationContext,0) + + + def Extern(self): + return self.getToken(CPP14Parser.Extern, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_explicitinstantiation + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExplicitinstantiation" ): + listener.enterExplicitinstantiation(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExplicitinstantiation" ): + listener.exitExplicitinstantiation(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExplicitinstantiation" ): + return visitor.visitExplicitinstantiation(self) + else: + return visitor.visitChildren(self) + + + + + def explicitinstantiation(self): + + localctx = CPP14Parser.ExplicitinstantiationContext(self, self._ctx, self.state) + self.enterRule(localctx, 366, self.RULE_explicitinstantiation) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 2319 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Extern: + self.state = 2318 + self.match(CPP14Parser.Extern) + + + self.state = 2321 + self.match(CPP14Parser.Template) + self.state = 2322 + self.declaration() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExplicitspecializationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Template(self): + return self.getToken(CPP14Parser.Template, 0) + + def Less(self): + return self.getToken(CPP14Parser.Less, 0) + + def Greater(self): + return self.getToken(CPP14Parser.Greater, 0) + + def declaration(self): + return self.getTypedRuleContext(CPP14Parser.DeclarationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_explicitspecialization + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExplicitspecialization" ): + listener.enterExplicitspecialization(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExplicitspecialization" ): + listener.exitExplicitspecialization(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExplicitspecialization" ): + return visitor.visitExplicitspecialization(self) + else: + return visitor.visitChildren(self) + + + + + def explicitspecialization(self): + + localctx = CPP14Parser.ExplicitspecializationContext(self, self._ctx, self.state) + self.enterRule(localctx, 368, self.RULE_explicitspecialization) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2324 + self.match(CPP14Parser.Template) + self.state = 2325 + self.match(CPP14Parser.Less) + self.state = 2326 + self.match(CPP14Parser.Greater) + self.state = 2327 + self.declaration() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TryblockContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Try(self): + return self.getToken(CPP14Parser.Try, 0) + + def compoundstatement(self): + return self.getTypedRuleContext(CPP14Parser.CompoundstatementContext,0) + + + def handlerseq(self): + return self.getTypedRuleContext(CPP14Parser.HandlerseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_tryblock + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTryblock" ): + listener.enterTryblock(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTryblock" ): + listener.exitTryblock(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTryblock" ): + return visitor.visitTryblock(self) + else: + return visitor.visitChildren(self) + + + + + def tryblock(self): + + localctx = CPP14Parser.TryblockContext(self, self._ctx, self.state) + self.enterRule(localctx, 370, self.RULE_tryblock) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2329 + self.match(CPP14Parser.Try) + self.state = 2330 + self.compoundstatement() + self.state = 2331 + self.handlerseq() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class FunctiontryblockContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Try(self): + return self.getToken(CPP14Parser.Try, 0) + + def compoundstatement(self): + return self.getTypedRuleContext(CPP14Parser.CompoundstatementContext,0) + + + def handlerseq(self): + return self.getTypedRuleContext(CPP14Parser.HandlerseqContext,0) + + + def ctorinitializer(self): + return self.getTypedRuleContext(CPP14Parser.CtorinitializerContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_functiontryblock + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterFunctiontryblock" ): + listener.enterFunctiontryblock(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitFunctiontryblock" ): + listener.exitFunctiontryblock(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitFunctiontryblock" ): + return visitor.visitFunctiontryblock(self) + else: + return visitor.visitChildren(self) + + + + + def functiontryblock(self): + + localctx = CPP14Parser.FunctiontryblockContext(self, self._ctx, self.state) + self.enterRule(localctx, 372, self.RULE_functiontryblock) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 2333 + self.match(CPP14Parser.Try) + self.state = 2335 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Colon: + self.state = 2334 + self.ctorinitializer() + + + self.state = 2337 + self.compoundstatement() + self.state = 2338 + self.handlerseq() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class HandlerseqContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def handler(self): + return self.getTypedRuleContext(CPP14Parser.HandlerContext,0) + + + def handlerseq(self): + return self.getTypedRuleContext(CPP14Parser.HandlerseqContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_handlerseq + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterHandlerseq" ): + listener.enterHandlerseq(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitHandlerseq" ): + listener.exitHandlerseq(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitHandlerseq" ): + return visitor.visitHandlerseq(self) + else: + return visitor.visitChildren(self) + + + + + def handlerseq(self): + + localctx = CPP14Parser.HandlerseqContext(self, self._ctx, self.state) + self.enterRule(localctx, 374, self.RULE_handlerseq) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2340 + self.handler() + self.state = 2342 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,302,self._ctx) + if la_ == 1: + self.state = 2341 + self.handlerseq() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class HandlerContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Catch(self): + return self.getToken(CPP14Parser.Catch, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def exceptiondeclaration(self): + return self.getTypedRuleContext(CPP14Parser.ExceptiondeclarationContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def compoundstatement(self): + return self.getTypedRuleContext(CPP14Parser.CompoundstatementContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_handler + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterHandler" ): + listener.enterHandler(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitHandler" ): + listener.exitHandler(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitHandler" ): + return visitor.visitHandler(self) + else: + return visitor.visitChildren(self) + + + + + def handler(self): + + localctx = CPP14Parser.HandlerContext(self, self._ctx, self.state) + self.enterRule(localctx, 376, self.RULE_handler) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2344 + self.match(CPP14Parser.Catch) + self.state = 2345 + self.match(CPP14Parser.LeftParen) + self.state = 2346 + self.exceptiondeclaration() + self.state = 2347 + self.match(CPP14Parser.RightParen) + self.state = 2348 + self.compoundstatement() + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExceptiondeclarationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def typespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.TypespecifierseqContext,0) + + + def declarator(self): + return self.getTypedRuleContext(CPP14Parser.DeclaratorContext,0) + + + def attributespecifierseq(self): + return self.getTypedRuleContext(CPP14Parser.AttributespecifierseqContext,0) + + + def abstractdeclarator(self): + return self.getTypedRuleContext(CPP14Parser.AbstractdeclaratorContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_exceptiondeclaration + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExceptiondeclaration" ): + listener.enterExceptiondeclaration(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExceptiondeclaration" ): + listener.exitExceptiondeclaration(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExceptiondeclaration" ): + return visitor.visitExceptiondeclaration(self) + else: + return visitor.visitChildren(self) + + + + + def exceptiondeclaration(self): + + localctx = CPP14Parser.ExceptiondeclarationContext(self, self._ctx, self.state) + self.enterRule(localctx, 378, self.RULE_exceptiondeclaration) + self._la = 0 # Token type + try: + self.state = 2364 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,306,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2351 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 2350 + self.attributespecifierseq(0) + + + self.state = 2353 + self.typespecifierseq() + self.state = 2354 + self.declarator() + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2357 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Alignas or _la==CPP14Parser.LeftBracket: + self.state = 2356 + self.attributespecifierseq(0) + + + self.state = 2359 + self.typespecifierseq() + self.state = 2361 + self._errHandler.sync(self) + _la = self._input.LA(1) + if _la==CPP14Parser.Decltype or ((((_la - 78)) & ~0x3f) == 0 and ((1 << (_la - 78)) & ((1 << (CPP14Parser.LeftParen - 78)) | (1 << (CPP14Parser.LeftBracket - 78)) | (1 << (CPP14Parser.Star - 78)) | (1 << (CPP14Parser.And - 78)) | (1 << (CPP14Parser.AndAnd - 78)) | (1 << (CPP14Parser.Doublecolon - 78)) | (1 << (CPP14Parser.Ellipsis - 78)) | (1 << (CPP14Parser.Identifier - 78)))) != 0): + self.state = 2360 + self.abstractdeclarator() + + + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 2363 + self.match(CPP14Parser.Ellipsis) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ThrowexpressionContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Throw(self): + return self.getToken(CPP14Parser.Throw, 0) + + def assignmentexpression(self): + return self.getTypedRuleContext(CPP14Parser.AssignmentexpressionContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_throwexpression + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterThrowexpression" ): + listener.enterThrowexpression(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitThrowexpression" ): + listener.exitThrowexpression(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitThrowexpression" ): + return visitor.visitThrowexpression(self) + else: + return visitor.visitChildren(self) + + + + + def throwexpression(self): + + localctx = CPP14Parser.ThrowexpressionContext(self, self._ctx, self.state) + self.enterRule(localctx, 380, self.RULE_throwexpression) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2366 + self.match(CPP14Parser.Throw) + self.state = 2368 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,307,self._ctx) + if la_ == 1: + self.state = 2367 + self.assignmentexpression() + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class ExceptionspecificationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def dynamicexceptionspecification(self): + return self.getTypedRuleContext(CPP14Parser.DynamicexceptionspecificationContext,0) + + + def noexceptspecification(self): + return self.getTypedRuleContext(CPP14Parser.NoexceptspecificationContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_exceptionspecification + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterExceptionspecification" ): + listener.enterExceptionspecification(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitExceptionspecification" ): + listener.exitExceptionspecification(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitExceptionspecification" ): + return visitor.visitExceptionspecification(self) + else: + return visitor.visitChildren(self) + + + + + def exceptionspecification(self): + + localctx = CPP14Parser.ExceptionspecificationContext(self, self._ctx, self.state) + self.enterRule(localctx, 382, self.RULE_exceptionspecification) + try: + self.state = 2372 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Throw]: + self.enterOuterAlt(localctx, 1) + self.state = 2370 + self.dynamicexceptionspecification() + pass + elif token in [CPP14Parser.Noexcept]: + self.enterOuterAlt(localctx, 2) + self.state = 2371 + self.noexceptspecification() + 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 DynamicexceptionspecificationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Throw(self): + return self.getToken(CPP14Parser.Throw, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def typeidlist(self): + return self.getTypedRuleContext(CPP14Parser.TypeidlistContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_dynamicexceptionspecification + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterDynamicexceptionspecification" ): + listener.enterDynamicexceptionspecification(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitDynamicexceptionspecification" ): + listener.exitDynamicexceptionspecification(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitDynamicexceptionspecification" ): + return visitor.visitDynamicexceptionspecification(self) + else: + return visitor.visitChildren(self) + + + + + def dynamicexceptionspecification(self): + + localctx = CPP14Parser.DynamicexceptionspecificationContext(self, self._ctx, self.state) + self.enterRule(localctx, 384, self.RULE_dynamicexceptionspecification) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 2374 + self.match(CPP14Parser.Throw) + self.state = 2375 + self.match(CPP14Parser.LeftParen) + self.state = 2377 + self._errHandler.sync(self) + _la = self._input.LA(1) + if (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << CPP14Parser.Auto) | (1 << CPP14Parser.Bool) | (1 << CPP14Parser.Char) | (1 << CPP14Parser.Char16) | (1 << CPP14Parser.Char32) | (1 << CPP14Parser.Class) | (1 << CPP14Parser.Const) | (1 << CPP14Parser.Decltype) | (1 << CPP14Parser.Double) | (1 << CPP14Parser.Enum) | (1 << CPP14Parser.Float) | (1 << CPP14Parser.Int) | (1 << CPP14Parser.Long) | (1 << CPP14Parser.Short) | (1 << CPP14Parser.Signed) | (1 << CPP14Parser.Struct))) != 0) or ((((_la - 69)) & ~0x3f) == 0 and ((1 << (_la - 69)) & ((1 << (CPP14Parser.Typename - 69)) | (1 << (CPP14Parser.Union - 69)) | (1 << (CPP14Parser.Unsigned - 69)) | (1 << (CPP14Parser.Void - 69)) | (1 << (CPP14Parser.Volatile - 69)) | (1 << (CPP14Parser.Wchar - 69)) | (1 << (CPP14Parser.Doublecolon - 69)) | (1 << (CPP14Parser.Identifier - 69)))) != 0): + self.state = 2376 + self.typeidlist(0) + + + self.state = 2379 + self.match(CPP14Parser.RightParen) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TypeidlistContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def thetypeid(self): + return self.getTypedRuleContext(CPP14Parser.ThetypeidContext,0) + + + def Ellipsis(self): + return self.getToken(CPP14Parser.Ellipsis, 0) + + def typeidlist(self): + return self.getTypedRuleContext(CPP14Parser.TypeidlistContext,0) + + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_typeidlist + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTypeidlist" ): + listener.enterTypeidlist(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTypeidlist" ): + listener.exitTypeidlist(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTypeidlist" ): + return visitor.visitTypeidlist(self) + else: + return visitor.visitChildren(self) + + + + def typeidlist(self, _p:int=0): + _parentctx = self._ctx + _parentState = self.state + localctx = CPP14Parser.TypeidlistContext(self, self._ctx, _parentState) + _prevctx = localctx + _startState = 386 + self.enterRecursionRule(localctx, 386, self.RULE_typeidlist, _p) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2382 + self.thetypeid() + self.state = 2384 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,310,self._ctx) + if la_ == 1: + self.state = 2383 + self.match(CPP14Parser.Ellipsis) + + + self._ctx.stop = self._input.LT(-1) + self.state = 2394 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,312,self._ctx) + while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER: + if _alt==1: + if self._parseListeners is not None: + self.triggerExitRuleEvent() + _prevctx = localctx + localctx = CPP14Parser.TypeidlistContext(self, _parentctx, _parentState) + self.pushNewRecursionContext(localctx, _startState, self.RULE_typeidlist) + self.state = 2386 + if not self.precpred(self._ctx, 1): + from antlr4.error.Errors import FailedPredicateException + raise FailedPredicateException(self, "self.precpred(self._ctx, 1)") + self.state = 2387 + self.match(CPP14Parser.Comma) + self.state = 2388 + self.thetypeid() + self.state = 2390 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,311,self._ctx) + if la_ == 1: + self.state = 2389 + self.match(CPP14Parser.Ellipsis) + + + self.state = 2396 + self._errHandler.sync(self) + _alt = self._interp.adaptivePredict(self._input,312,self._ctx) + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.unrollRecursionContexts(_parentctx) + return localctx + + + class NoexceptspecificationContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Noexcept(self): + return self.getToken(CPP14Parser.Noexcept, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def constantexpression(self): + return self.getTypedRuleContext(CPP14Parser.ConstantexpressionContext,0) + + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_noexceptspecification + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterNoexceptspecification" ): + listener.enterNoexceptspecification(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitNoexceptspecification" ): + listener.exitNoexceptspecification(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitNoexceptspecification" ): + return visitor.visitNoexceptspecification(self) + else: + return visitor.visitChildren(self) + + + + + def noexceptspecification(self): + + localctx = CPP14Parser.NoexceptspecificationContext(self, self._ctx, self.state) + self.enterRule(localctx, 388, self.RULE_noexceptspecification) + try: + self.state = 2403 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,313,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2397 + self.match(CPP14Parser.Noexcept) + self.state = 2398 + self.match(CPP14Parser.LeftParen) + self.state = 2399 + self.constantexpression() + self.state = 2400 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2402 + self.match(CPP14Parser.Noexcept) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class RightShiftContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Greater(self, i:int=None): + if i is None: + return self.getTokens(CPP14Parser.Greater) + else: + return self.getToken(CPP14Parser.Greater, i) + + def getRuleIndex(self): + return CPP14Parser.RULE_rightShift + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRightShift" ): + listener.enterRightShift(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRightShift" ): + listener.exitRightShift(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitRightShift" ): + return visitor.visitRightShift(self) + else: + return visitor.visitChildren(self) + + + + + def rightShift(self): + + localctx = CPP14Parser.RightShiftContext(self, self._ctx, self.state) + self.enterRule(localctx, 390, self.RULE_rightShift) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2405 + self.match(CPP14Parser.Greater) + self.state = 2406 + self.match(CPP14Parser.Greater) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class RightShiftAssignContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Greater(self, i:int=None): + if i is None: + return self.getTokens(CPP14Parser.Greater) + else: + return self.getToken(CPP14Parser.Greater, i) + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_rightShiftAssign + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterRightShiftAssign" ): + listener.enterRightShiftAssign(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitRightShiftAssign" ): + listener.exitRightShiftAssign(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitRightShiftAssign" ): + return visitor.visitRightShiftAssign(self) + else: + return visitor.visitChildren(self) + + + + + def rightShiftAssign(self): + + localctx = CPP14Parser.RightShiftAssignContext(self, self._ctx, self.state) + self.enterRule(localctx, 392, self.RULE_rightShiftAssign) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2408 + self.match(CPP14Parser.Greater) + self.state = 2409 + self.match(CPP14Parser.Greater) + self.state = 2410 + self.match(CPP14Parser.Assign) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class TheoperatorContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def New(self): + return self.getToken(CPP14Parser.New, 0) + + def Delete(self): + return self.getToken(CPP14Parser.Delete, 0) + + def LeftBracket(self): + return self.getToken(CPP14Parser.LeftBracket, 0) + + def RightBracket(self): + return self.getToken(CPP14Parser.RightBracket, 0) + + def Plus(self): + return self.getToken(CPP14Parser.Plus, 0) + + def Minus(self): + return self.getToken(CPP14Parser.Minus, 0) + + def Star(self): + return self.getToken(CPP14Parser.Star, 0) + + def Div(self): + return self.getToken(CPP14Parser.Div, 0) + + def Mod(self): + return self.getToken(CPP14Parser.Mod, 0) + + def Caret(self): + return self.getToken(CPP14Parser.Caret, 0) + + def And(self): + return self.getToken(CPP14Parser.And, 0) + + def Or(self): + return self.getToken(CPP14Parser.Or, 0) + + def Tilde(self): + return self.getToken(CPP14Parser.Tilde, 0) + + def Not(self): + return self.getToken(CPP14Parser.Not, 0) + + def Assign(self): + return self.getToken(CPP14Parser.Assign, 0) + + def Less(self): + return self.getToken(CPP14Parser.Less, 0) + + def Greater(self): + return self.getToken(CPP14Parser.Greater, 0) + + def PlusAssign(self): + return self.getToken(CPP14Parser.PlusAssign, 0) + + def MinusAssign(self): + return self.getToken(CPP14Parser.MinusAssign, 0) + + def StarAssign(self): + return self.getToken(CPP14Parser.StarAssign, 0) + + def DivAssign(self): + return self.getToken(CPP14Parser.DivAssign, 0) + + def ModAssign(self): + return self.getToken(CPP14Parser.ModAssign, 0) + + def XorAssign(self): + return self.getToken(CPP14Parser.XorAssign, 0) + + def AndAssign(self): + return self.getToken(CPP14Parser.AndAssign, 0) + + def OrAssign(self): + return self.getToken(CPP14Parser.OrAssign, 0) + + def LeftShift(self): + return self.getToken(CPP14Parser.LeftShift, 0) + + def rightShift(self): + return self.getTypedRuleContext(CPP14Parser.RightShiftContext,0) + + + def rightShiftAssign(self): + return self.getTypedRuleContext(CPP14Parser.RightShiftAssignContext,0) + + + def LeftShiftAssign(self): + return self.getToken(CPP14Parser.LeftShiftAssign, 0) + + def Equal(self): + return self.getToken(CPP14Parser.Equal, 0) + + def NotEqual(self): + return self.getToken(CPP14Parser.NotEqual, 0) + + def LessEqual(self): + return self.getToken(CPP14Parser.LessEqual, 0) + + def GreaterEqual(self): + return self.getToken(CPP14Parser.GreaterEqual, 0) + + def AndAnd(self): + return self.getToken(CPP14Parser.AndAnd, 0) + + def OrOr(self): + return self.getToken(CPP14Parser.OrOr, 0) + + def PlusPlus(self): + return self.getToken(CPP14Parser.PlusPlus, 0) + + def MinusMinus(self): + return self.getToken(CPP14Parser.MinusMinus, 0) + + def Comma(self): + return self.getToken(CPP14Parser.Comma, 0) + + def ArrowStar(self): + return self.getToken(CPP14Parser.ArrowStar, 0) + + def Arrow(self): + return self.getToken(CPP14Parser.Arrow, 0) + + def LeftParen(self): + return self.getToken(CPP14Parser.LeftParen, 0) + + def RightParen(self): + return self.getToken(CPP14Parser.RightParen, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_theoperator + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterTheoperator" ): + listener.enterTheoperator(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitTheoperator" ): + listener.exitTheoperator(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitTheoperator" ): + return visitor.visitTheoperator(self) + else: + return visitor.visitChildren(self) + + + + + def theoperator(self): + + localctx = CPP14Parser.TheoperatorContext(self, self._ctx, self.state) + self.enterRule(localctx, 394, self.RULE_theoperator) + try: + self.state = 2460 + self._errHandler.sync(self) + la_ = self._interp.adaptivePredict(self._input,314,self._ctx) + if la_ == 1: + self.enterOuterAlt(localctx, 1) + self.state = 2412 + self.match(CPP14Parser.New) + pass + + elif la_ == 2: + self.enterOuterAlt(localctx, 2) + self.state = 2413 + self.match(CPP14Parser.Delete) + pass + + elif la_ == 3: + self.enterOuterAlt(localctx, 3) + self.state = 2414 + self.match(CPP14Parser.New) + self.state = 2415 + self.match(CPP14Parser.LeftBracket) + self.state = 2416 + self.match(CPP14Parser.RightBracket) + pass + + elif la_ == 4: + self.enterOuterAlt(localctx, 4) + self.state = 2417 + self.match(CPP14Parser.Delete) + self.state = 2418 + self.match(CPP14Parser.LeftBracket) + self.state = 2419 + self.match(CPP14Parser.RightBracket) + pass + + elif la_ == 5: + self.enterOuterAlt(localctx, 5) + self.state = 2420 + self.match(CPP14Parser.Plus) + pass + + elif la_ == 6: + self.enterOuterAlt(localctx, 6) + self.state = 2421 + self.match(CPP14Parser.Minus) + pass + + elif la_ == 7: + self.enterOuterAlt(localctx, 7) + self.state = 2422 + self.match(CPP14Parser.Star) + pass + + elif la_ == 8: + self.enterOuterAlt(localctx, 8) + self.state = 2423 + self.match(CPP14Parser.Div) + pass + + elif la_ == 9: + self.enterOuterAlt(localctx, 9) + self.state = 2424 + self.match(CPP14Parser.Mod) + pass + + elif la_ == 10: + self.enterOuterAlt(localctx, 10) + self.state = 2425 + self.match(CPP14Parser.Caret) + pass + + elif la_ == 11: + self.enterOuterAlt(localctx, 11) + self.state = 2426 + self.match(CPP14Parser.And) + pass + + elif la_ == 12: + self.enterOuterAlt(localctx, 12) + self.state = 2427 + self.match(CPP14Parser.Or) + pass + + elif la_ == 13: + self.enterOuterAlt(localctx, 13) + self.state = 2428 + self.match(CPP14Parser.Tilde) + pass + + elif la_ == 14: + self.enterOuterAlt(localctx, 14) + self.state = 2429 + self.match(CPP14Parser.Not) + pass + + elif la_ == 15: + self.enterOuterAlt(localctx, 15) + self.state = 2430 + self.match(CPP14Parser.Assign) + pass + + elif la_ == 16: + self.enterOuterAlt(localctx, 16) + self.state = 2431 + self.match(CPP14Parser.Less) + pass + + elif la_ == 17: + self.enterOuterAlt(localctx, 17) + self.state = 2432 + self.match(CPP14Parser.Greater) + pass + + elif la_ == 18: + self.enterOuterAlt(localctx, 18) + self.state = 2433 + self.match(CPP14Parser.PlusAssign) + pass + + elif la_ == 19: + self.enterOuterAlt(localctx, 19) + self.state = 2434 + self.match(CPP14Parser.MinusAssign) + pass + + elif la_ == 20: + self.enterOuterAlt(localctx, 20) + self.state = 2435 + self.match(CPP14Parser.StarAssign) + pass + + elif la_ == 21: + self.enterOuterAlt(localctx, 21) + self.state = 2436 + self.match(CPP14Parser.DivAssign) + pass + + elif la_ == 22: + self.enterOuterAlt(localctx, 22) + self.state = 2437 + self.match(CPP14Parser.ModAssign) + pass + + elif la_ == 23: + self.enterOuterAlt(localctx, 23) + self.state = 2438 + self.match(CPP14Parser.XorAssign) + pass + + elif la_ == 24: + self.enterOuterAlt(localctx, 24) + self.state = 2439 + self.match(CPP14Parser.AndAssign) + pass + + elif la_ == 25: + self.enterOuterAlt(localctx, 25) + self.state = 2440 + self.match(CPP14Parser.OrAssign) + pass + + elif la_ == 26: + self.enterOuterAlt(localctx, 26) + self.state = 2441 + self.match(CPP14Parser.LeftShift) + pass + + elif la_ == 27: + self.enterOuterAlt(localctx, 27) + self.state = 2442 + self.rightShift() + pass + + elif la_ == 28: + self.enterOuterAlt(localctx, 28) + self.state = 2443 + self.rightShiftAssign() + pass + + elif la_ == 29: + self.enterOuterAlt(localctx, 29) + self.state = 2444 + self.match(CPP14Parser.LeftShiftAssign) + pass + + elif la_ == 30: + self.enterOuterAlt(localctx, 30) + self.state = 2445 + self.match(CPP14Parser.Equal) + pass + + elif la_ == 31: + self.enterOuterAlt(localctx, 31) + self.state = 2446 + self.match(CPP14Parser.NotEqual) + pass + + elif la_ == 32: + self.enterOuterAlt(localctx, 32) + self.state = 2447 + self.match(CPP14Parser.LessEqual) + pass + + elif la_ == 33: + self.enterOuterAlt(localctx, 33) + self.state = 2448 + self.match(CPP14Parser.GreaterEqual) + pass + + elif la_ == 34: + self.enterOuterAlt(localctx, 34) + self.state = 2449 + self.match(CPP14Parser.AndAnd) + pass + + elif la_ == 35: + self.enterOuterAlt(localctx, 35) + self.state = 2450 + self.match(CPP14Parser.OrOr) + pass + + elif la_ == 36: + self.enterOuterAlt(localctx, 36) + self.state = 2451 + self.match(CPP14Parser.PlusPlus) + pass + + elif la_ == 37: + self.enterOuterAlt(localctx, 37) + self.state = 2452 + self.match(CPP14Parser.MinusMinus) + pass + + elif la_ == 38: + self.enterOuterAlt(localctx, 38) + self.state = 2453 + self.match(CPP14Parser.Comma) + pass + + elif la_ == 39: + self.enterOuterAlt(localctx, 39) + self.state = 2454 + self.match(CPP14Parser.ArrowStar) + pass + + elif la_ == 40: + self.enterOuterAlt(localctx, 40) + self.state = 2455 + self.match(CPP14Parser.Arrow) + pass + + elif la_ == 41: + self.enterOuterAlt(localctx, 41) + self.state = 2456 + self.match(CPP14Parser.LeftParen) + self.state = 2457 + self.match(CPP14Parser.RightParen) + pass + + elif la_ == 42: + self.enterOuterAlt(localctx, 42) + self.state = 2458 + self.match(CPP14Parser.LeftBracket) + self.state = 2459 + self.match(CPP14Parser.RightBracket) + pass + + + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class LiteralContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Integerliteral(self): + return self.getToken(CPP14Parser.Integerliteral, 0) + + def Characterliteral(self): + return self.getToken(CPP14Parser.Characterliteral, 0) + + def Floatingliteral(self): + return self.getToken(CPP14Parser.Floatingliteral, 0) + + def Stringliteral(self): + return self.getToken(CPP14Parser.Stringliteral, 0) + + def booleanliteral(self): + return self.getTypedRuleContext(CPP14Parser.BooleanliteralContext,0) + + + def pointerliteral(self): + return self.getTypedRuleContext(CPP14Parser.PointerliteralContext,0) + + + def userdefinedliteral(self): + return self.getTypedRuleContext(CPP14Parser.UserdefinedliteralContext,0) + + + def getRuleIndex(self): + return CPP14Parser.RULE_literal + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterLiteral" ): + listener.enterLiteral(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitLiteral" ): + listener.exitLiteral(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitLiteral" ): + return visitor.visitLiteral(self) + else: + return visitor.visitChildren(self) + + + + + def literal(self): + + localctx = CPP14Parser.LiteralContext(self, self._ctx, self.state) + self.enterRule(localctx, 396, self.RULE_literal) + try: + self.state = 2469 + self._errHandler.sync(self) + token = self._input.LA(1) + if token in [CPP14Parser.Integerliteral]: + self.enterOuterAlt(localctx, 1) + self.state = 2462 + self.match(CPP14Parser.Integerliteral) + pass + elif token in [CPP14Parser.Characterliteral]: + self.enterOuterAlt(localctx, 2) + self.state = 2463 + self.match(CPP14Parser.Characterliteral) + pass + elif token in [CPP14Parser.Floatingliteral]: + self.enterOuterAlt(localctx, 3) + self.state = 2464 + self.match(CPP14Parser.Floatingliteral) + pass + elif token in [CPP14Parser.Stringliteral]: + self.enterOuterAlt(localctx, 4) + self.state = 2465 + self.match(CPP14Parser.Stringliteral) + pass + elif token in [CPP14Parser.FalseToken, CPP14Parser.TrueToken]: + self.enterOuterAlt(localctx, 5) + self.state = 2466 + self.booleanliteral() + pass + elif token in [CPP14Parser.Nullptr]: + self.enterOuterAlt(localctx, 6) + self.state = 2467 + self.pointerliteral() + pass + elif token in [CPP14Parser.Userdefinedintegerliteral, CPP14Parser.Userdefinedfloatingliteral, CPP14Parser.Userdefinedstringliteral, CPP14Parser.Userdefinedcharacterliteral]: + self.enterOuterAlt(localctx, 7) + self.state = 2468 + self.userdefinedliteral() + 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 BooleanliteralContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def FalseToken(self): + return self.getToken(CPP14Parser.FalseToken, 0) + + def TrueToken(self): + return self.getToken(CPP14Parser.TrueToken, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_booleanliteral + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterBooleanliteral" ): + listener.enterBooleanliteral(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitBooleanliteral" ): + listener.exitBooleanliteral(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitBooleanliteral" ): + return visitor.visitBooleanliteral(self) + else: + return visitor.visitChildren(self) + + + + + def booleanliteral(self): + + localctx = CPP14Parser.BooleanliteralContext(self, self._ctx, self.state) + self.enterRule(localctx, 398, self.RULE_booleanliteral) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 2471 + _la = self._input.LA(1) + if not(_la==CPP14Parser.FalseToken or _la==CPP14Parser.TrueToken): + 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 PointerliteralContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Nullptr(self): + return self.getToken(CPP14Parser.Nullptr, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_pointerliteral + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterPointerliteral" ): + listener.enterPointerliteral(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitPointerliteral" ): + listener.exitPointerliteral(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitPointerliteral" ): + return visitor.visitPointerliteral(self) + else: + return visitor.visitChildren(self) + + + + + def pointerliteral(self): + + localctx = CPP14Parser.PointerliteralContext(self, self._ctx, self.state) + self.enterRule(localctx, 400, self.RULE_pointerliteral) + try: + self.enterOuterAlt(localctx, 1) + self.state = 2473 + self.match(CPP14Parser.Nullptr) + except RecognitionException as re: + localctx.exception = re + self._errHandler.reportError(self, re) + self._errHandler.recover(self, re) + finally: + self.exitRule() + return localctx + + + class UserdefinedliteralContext(ParserRuleContext): + __slots__ = 'parser' + + def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): + super().__init__(parent, invokingState) + self.parser = parser + + def Userdefinedintegerliteral(self): + return self.getToken(CPP14Parser.Userdefinedintegerliteral, 0) + + def Userdefinedfloatingliteral(self): + return self.getToken(CPP14Parser.Userdefinedfloatingliteral, 0) + + def Userdefinedstringliteral(self): + return self.getToken(CPP14Parser.Userdefinedstringliteral, 0) + + def Userdefinedcharacterliteral(self): + return self.getToken(CPP14Parser.Userdefinedcharacterliteral, 0) + + def getRuleIndex(self): + return CPP14Parser.RULE_userdefinedliteral + + def enterRule(self, listener:ParseTreeListener): + if hasattr( listener, "enterUserdefinedliteral" ): + listener.enterUserdefinedliteral(self) + + def exitRule(self, listener:ParseTreeListener): + if hasattr( listener, "exitUserdefinedliteral" ): + listener.exitUserdefinedliteral(self) + + def accept(self, visitor:ParseTreeVisitor): + if hasattr( visitor, "visitUserdefinedliteral" ): + return visitor.visitUserdefinedliteral(self) + else: + return visitor.visitChildren(self) + + + + + def userdefinedliteral(self): + + localctx = CPP14Parser.UserdefinedliteralContext(self, self._ctx, self.state) + self.enterRule(localctx, 402, self.RULE_userdefinedliteral) + self._la = 0 # Token type + try: + self.enterOuterAlt(localctx, 1) + self.state = 2475 + _la = self._input.LA(1) + if not(((((_la - 135)) & ~0x3f) == 0 and ((1 << (_la - 135)) & ((1 << (CPP14Parser.Userdefinedintegerliteral - 135)) | (1 << (CPP14Parser.Userdefinedfloatingliteral - 135)) | (1 << (CPP14Parser.Userdefinedstringliteral - 135)) | (1 << (CPP14Parser.Userdefinedcharacterliteral - 135)))) != 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 + + + + def sempred(self, localctx:RuleContext, ruleIndex:int, predIndex:int): + if self._predicates == None: + self._predicates = dict() + self._predicates[5] = self.nestednamespecifier_sempred + self._predicates[10] = self.capturelist_sempred + self._predicates[15] = self.postfixexpression_sempred + self._predicates[26] = self.noptrnewdeclarator_sempred + self._predicates[31] = self.pmexpression_sempred + self._predicates[32] = self.multiplicativeexpression_sempred + self._predicates[33] = self.additiveexpression_sempred + self._predicates[34] = self.shiftexpression_sempred + self._predicates[35] = self.relationalexpression_sempred + self._predicates[36] = self.equalityexpression_sempred + self._predicates[37] = self.andexpression_sempred + self._predicates[38] = self.exclusiveorexpression_sempred + self._predicates[39] = self.inclusiveorexpression_sempred + self._predicates[40] = self.logicalandexpression_sempred + self._predicates[41] = self.logicalorexpression_sempred + self._predicates[45] = self.expression_sempred + self._predicates[52] = self.statementseq_sempred + self._predicates[61] = self.declarationseq_sempred + self._predicates[88] = self.enumeratorlist_sempred + self._predicates[106] = self.attributespecifierseq_sempred + self._predicates[109] = self.attributelist_sempred + self._predicates[115] = self.balancedtokenseq_sempred + self._predicates[117] = self.initdeclaratorlist_sempred + self._predicates[121] = self.noptrdeclarator_sempred + self._predicates[132] = self.noptrabstractdeclarator_sempred + self._predicates[134] = self.noptrabstractpackdeclarator_sempred + self._predicates[136] = self.parameterdeclarationlist_sempred + self._predicates[143] = self.initializerlist_sempred + self._predicates[153] = self.memberdeclaratorlist_sempred + self._predicates[155] = self.virtspecifierseq_sempred + self._predicates[159] = self.basespecifierlist_sempred + self._predicates[174] = self.templateparameterlist_sempred + self._predicates[180] = self.templateargumentlist_sempred + self._predicates[193] = self.typeidlist_sempred + pred = self._predicates.get(ruleIndex, None) + if pred is None: + raise Exception("No predicate with index:" + str(ruleIndex)) + else: + return pred(localctx, predIndex) + + def nestednamespecifier_sempred(self, localctx:NestednamespecifierContext, predIndex:int): + if predIndex == 0: + return self.precpred(self._ctx, 2) + + + if predIndex == 1: + return self.precpred(self._ctx, 1) + + + def capturelist_sempred(self, localctx:CapturelistContext, predIndex:int): + if predIndex == 2: + return self.precpred(self._ctx, 1) + + + def postfixexpression_sempred(self, localctx:PostfixexpressionContext, predIndex:int): + if predIndex == 3: + return self.precpred(self._ctx, 19) + + + if predIndex == 4: + return self.precpred(self._ctx, 18) + + + if predIndex == 5: + return self.precpred(self._ctx, 17) + + + if predIndex == 6: + return self.precpred(self._ctx, 12) + + + if predIndex == 7: + return self.precpred(self._ctx, 11) + + + if predIndex == 8: + return self.precpred(self._ctx, 10) + + + if predIndex == 9: + return self.precpred(self._ctx, 9) + + + if predIndex == 10: + return self.precpred(self._ctx, 8) + + + if predIndex == 11: + return self.precpred(self._ctx, 7) + + + def noptrnewdeclarator_sempred(self, localctx:NoptrnewdeclaratorContext, predIndex:int): + if predIndex == 12: + return self.precpred(self._ctx, 1) + + + def pmexpression_sempred(self, localctx:PmexpressionContext, predIndex:int): + if predIndex == 13: + return self.precpred(self._ctx, 2) + + + if predIndex == 14: + return self.precpred(self._ctx, 1) + + + def multiplicativeexpression_sempred(self, localctx:MultiplicativeexpressionContext, predIndex:int): + if predIndex == 15: + return self.precpred(self._ctx, 3) + + + if predIndex == 16: + return self.precpred(self._ctx, 2) + + + if predIndex == 17: + return self.precpred(self._ctx, 1) + + + def additiveexpression_sempred(self, localctx:AdditiveexpressionContext, predIndex:int): + if predIndex == 18: + return self.precpred(self._ctx, 2) + + + if predIndex == 19: + return self.precpred(self._ctx, 1) + + + def shiftexpression_sempred(self, localctx:ShiftexpressionContext, predIndex:int): + if predIndex == 20: + return self.precpred(self._ctx, 2) + + + if predIndex == 21: + return self.precpred(self._ctx, 1) + + + def relationalexpression_sempred(self, localctx:RelationalexpressionContext, predIndex:int): + if predIndex == 22: + return self.precpred(self._ctx, 4) + + + if predIndex == 23: + return self.precpred(self._ctx, 3) + + + if predIndex == 24: + return self.precpred(self._ctx, 2) + + + if predIndex == 25: + return self.precpred(self._ctx, 1) + + + def equalityexpression_sempred(self, localctx:EqualityexpressionContext, predIndex:int): + if predIndex == 26: + return self.precpred(self._ctx, 2) + + + if predIndex == 27: + return self.precpred(self._ctx, 1) + + + def andexpression_sempred(self, localctx:AndexpressionContext, predIndex:int): + if predIndex == 28: + return self.precpred(self._ctx, 1) + + + def exclusiveorexpression_sempred(self, localctx:ExclusiveorexpressionContext, predIndex:int): + if predIndex == 29: + return self.precpred(self._ctx, 1) + + + def inclusiveorexpression_sempred(self, localctx:InclusiveorexpressionContext, predIndex:int): + if predIndex == 30: + return self.precpred(self._ctx, 1) + + + def logicalandexpression_sempred(self, localctx:LogicalandexpressionContext, predIndex:int): + if predIndex == 31: + return self.precpred(self._ctx, 1) + + + def logicalorexpression_sempred(self, localctx:LogicalorexpressionContext, predIndex:int): + if predIndex == 32: + return self.precpred(self._ctx, 1) + + + def expression_sempred(self, localctx:ExpressionContext, predIndex:int): + if predIndex == 33: + return self.precpred(self._ctx, 1) + + + def statementseq_sempred(self, localctx:StatementseqContext, predIndex:int): + if predIndex == 34: + return self.precpred(self._ctx, 1) + + + def declarationseq_sempred(self, localctx:DeclarationseqContext, predIndex:int): + if predIndex == 35: + return self.precpred(self._ctx, 1) + + + def enumeratorlist_sempred(self, localctx:EnumeratorlistContext, predIndex:int): + if predIndex == 36: + return self.precpred(self._ctx, 1) + + + def attributespecifierseq_sempred(self, localctx:AttributespecifierseqContext, predIndex:int): + if predIndex == 37: + return self.precpred(self._ctx, 1) + + + def attributelist_sempred(self, localctx:AttributelistContext, predIndex:int): + if predIndex == 38: + return self.precpred(self._ctx, 3) + + + if predIndex == 39: + return self.precpred(self._ctx, 1) + + + def balancedtokenseq_sempred(self, localctx:BalancedtokenseqContext, predIndex:int): + if predIndex == 40: + return self.precpred(self._ctx, 1) + + + def initdeclaratorlist_sempred(self, localctx:InitdeclaratorlistContext, predIndex:int): + if predIndex == 41: + return self.precpred(self._ctx, 1) + + + def noptrdeclarator_sempred(self, localctx:NoptrdeclaratorContext, predIndex:int): + if predIndex == 42: + return self.precpred(self._ctx, 3) + + + if predIndex == 43: + return self.precpred(self._ctx, 2) + + + def noptrabstractdeclarator_sempred(self, localctx:NoptrabstractdeclaratorContext, predIndex:int): + if predIndex == 44: + return self.precpred(self._ctx, 5) + + + if predIndex == 45: + return self.precpred(self._ctx, 3) + + + def noptrabstractpackdeclarator_sempred(self, localctx:NoptrabstractpackdeclaratorContext, predIndex:int): + if predIndex == 46: + return self.precpred(self._ctx, 3) + + + if predIndex == 47: + return self.precpred(self._ctx, 2) + + + def parameterdeclarationlist_sempred(self, localctx:ParameterdeclarationlistContext, predIndex:int): + if predIndex == 48: + return self.precpred(self._ctx, 1) + + + def initializerlist_sempred(self, localctx:InitializerlistContext, predIndex:int): + if predIndex == 49: + return self.precpred(self._ctx, 1) + + + def memberdeclaratorlist_sempred(self, localctx:MemberdeclaratorlistContext, predIndex:int): + if predIndex == 50: + return self.precpred(self._ctx, 1) + + + def virtspecifierseq_sempred(self, localctx:VirtspecifierseqContext, predIndex:int): + if predIndex == 51: + return self.precpred(self._ctx, 1) + + + def basespecifierlist_sempred(self, localctx:BasespecifierlistContext, predIndex:int): + if predIndex == 52: + return self.precpred(self._ctx, 1) + + + def templateparameterlist_sempred(self, localctx:TemplateparameterlistContext, predIndex:int): + if predIndex == 53: + return self.precpred(self._ctx, 1) + + + def templateargumentlist_sempred(self, localctx:TemplateargumentlistContext, predIndex:int): + if predIndex == 54: + return self.precpred(self._ctx, 1) + + + def typeidlist_sempred(self, localctx:TypeidlistContext, predIndex:int): + if predIndex == 55: + return self.precpred(self._ctx, 1) + + + + + diff --git a/mainTool/antlr/CPP14Visitor.py b/mainTool/antlr/CPP14Visitor.py new file mode 100644 index 0000000..fe96dbd --- /dev/null +++ b/mainTool/antlr/CPP14Visitor.py @@ -0,0 +1,1216 @@ +# Generated from D:/projects/python/vul detect/tools/CppCodeAnalyzer/resources\CPP14.g4 by ANTLR 4.9.2 +from antlr4 import * +from mainTool.antlr.CPP14Parser import CPP14Parser + + +# This class defines a complete generic visitor for a parse tree produced by CPP14Parser. + +class CPP14Visitor(ParseTreeVisitor): + + # Visit a parse tree produced by CPP14Parser#translationunit. + def visitTranslationunit(self, ctx:CPP14Parser.TranslationunitContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#primaryexpression. + def visitPrimaryexpression(self, ctx:CPP14Parser.PrimaryexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#idexpression. + def visitIdexpression(self, ctx:CPP14Parser.IdexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#unqualifiedid. + def visitUnqualifiedid(self, ctx:CPP14Parser.UnqualifiedidContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#qualifiedid. + def visitQualifiedid(self, ctx:CPP14Parser.QualifiedidContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#normalGlobalIdentifier. + def visitNormalGlobalIdentifier(self, ctx:CPP14Parser.NormalGlobalIdentifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#classIdentifier. + def visitClassIdentifier(self, ctx:CPP14Parser.ClassIdentifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#nestedIdentifier. + def visitNestedIdentifier(self, ctx:CPP14Parser.NestedIdentifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#namespaceIdentifier. + def visitNamespaceIdentifier(self, ctx:CPP14Parser.NamespaceIdentifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#nestedTemplateIdentifier. + def visitNestedTemplateIdentifier(self, ctx:CPP14Parser.NestedTemplateIdentifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#decltypeIdentifier. + def visitDecltypeIdentifier(self, ctx:CPP14Parser.DecltypeIdentifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#lambdaexpression. + def visitLambdaexpression(self, ctx:CPP14Parser.LambdaexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#lambdaintroducer. + def visitLambdaintroducer(self, ctx:CPP14Parser.LambdaintroducerContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#lambdacapture. + def visitLambdacapture(self, ctx:CPP14Parser.LambdacaptureContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#capturedefault. + def visitCapturedefault(self, ctx:CPP14Parser.CapturedefaultContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#capturelist. + def visitCapturelist(self, ctx:CPP14Parser.CapturelistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#capture. + def visitCapture(self, ctx:CPP14Parser.CaptureContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#simplecapture. + def visitSimplecapture(self, ctx:CPP14Parser.SimplecaptureContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#initcapture. + def visitInitcapture(self, ctx:CPP14Parser.InitcaptureContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#lambdadeclarator. + def visitLambdadeclarator(self, ctx:CPP14Parser.LambdadeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberAccess. + def visitMemberAccess(self, ctx:CPP14Parser.MemberAccessContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#postTypeCastExpression. + def visitPostTypeCastExpression(self, ctx:CPP14Parser.PostTypeCastExpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#incDecOp. + def visitIncDecOp(self, ctx:CPP14Parser.IncDecOpContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#TypeidExpression. + def visitTypeidExpression(self, ctx:CPP14Parser.TypeidExpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#functionCall. + def visitFunctionCall(self, ctx:CPP14Parser.FunctionCallContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#postSimpleCastExpression. + def visitPostSimpleCastExpression(self, ctx:CPP14Parser.PostSimpleCastExpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#CppCastExpression. + def visitCppCastExpression(self, ctx:CPP14Parser.CppCastExpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#arrayIndexing. + def visitArrayIndexing(self, ctx:CPP14Parser.ArrayIndexingContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#ptrMemberAccess. + def visitPtrMemberAccess(self, ctx:CPP14Parser.PtrMemberAccessContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#postfixIgnore. + def visitPostfixIgnore(self, ctx:CPP14Parser.PostfixIgnoreContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#expressionlist. + def visitExpressionlist(self, ctx:CPP14Parser.ExpressionlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#pseudodestructorname. + def visitPseudodestructorname(self, ctx:CPP14Parser.PseudodestructornameContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#unaryexpression. + def visitUnaryexpression(self, ctx:CPP14Parser.UnaryexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#sizeofExpression. + def visitSizeofExpression(self, ctx:CPP14Parser.SizeofExpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#alignofExpression. + def visitAlignofExpression(self, ctx:CPP14Parser.AlignofExpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#unaryoperator. + def visitUnaryoperator(self, ctx:CPP14Parser.UnaryoperatorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#newexpression. + def visitNewexpression(self, ctx:CPP14Parser.NewexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#newplacement. + def visitNewplacement(self, ctx:CPP14Parser.NewplacementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#newtypeid. + def visitNewtypeid(self, ctx:CPP14Parser.NewtypeidContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#ptrNewDeclarator. + def visitPtrNewDeclarator(self, ctx:CPP14Parser.PtrNewDeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#nonPtrNewDeclarator. + def visitNonPtrNewDeclarator(self, ctx:CPP14Parser.NonPtrNewDeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#noptrnewdeclarator. + def visitNoptrnewdeclarator(self, ctx:CPP14Parser.NoptrnewdeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#newinitializer. + def visitNewinitializer(self, ctx:CPP14Parser.NewinitializerContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#deleteexpression. + def visitDeleteexpression(self, ctx:CPP14Parser.DeleteexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#noexceptexpression. + def visitNoexceptexpression(self, ctx:CPP14Parser.NoexceptexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#castexpression. + def visitCastexpression(self, ctx:CPP14Parser.CastexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#pmexpression. + def visitPmexpression(self, ctx:CPP14Parser.PmexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#multiplicativeexpression. + def visitMultiplicativeexpression(self, ctx:CPP14Parser.MultiplicativeexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#additiveexpression. + def visitAdditiveexpression(self, ctx:CPP14Parser.AdditiveexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#shiftexpression. + def visitShiftexpression(self, ctx:CPP14Parser.ShiftexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#relationalexpression. + def visitRelationalexpression(self, ctx:CPP14Parser.RelationalexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#equalityexpression. + def visitEqualityexpression(self, ctx:CPP14Parser.EqualityexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#andexpression. + def visitAndexpression(self, ctx:CPP14Parser.AndexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#exclusiveorexpression. + def visitExclusiveorexpression(self, ctx:CPP14Parser.ExclusiveorexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#inclusiveorexpression. + def visitInclusiveorexpression(self, ctx:CPP14Parser.InclusiveorexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#logicalandexpression. + def visitLogicalandexpression(self, ctx:CPP14Parser.LogicalandexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#logicalorexpression. + def visitLogicalorexpression(self, ctx:CPP14Parser.LogicalorexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#nonConditionalExpression. + def visitNonConditionalExpression(self, ctx:CPP14Parser.NonConditionalExpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#realConditionalExpression. + def visitRealConditionalExpression(self, ctx:CPP14Parser.RealConditionalExpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#assignmentexpression. + def visitAssignmentexpression(self, ctx:CPP14Parser.AssignmentexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#assignmentoperator. + def visitAssignmentoperator(self, ctx:CPP14Parser.AssignmentoperatorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#expression. + def visitExpression(self, ctx:CPP14Parser.ExpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#constantexpression. + def visitConstantexpression(self, ctx:CPP14Parser.ConstantexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#statement. + def visitStatement(self, ctx:CPP14Parser.StatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#label. + def visitLabel(self, ctx:CPP14Parser.LabelContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#labeledstatement. + def visitLabeledstatement(self, ctx:CPP14Parser.LabeledstatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#expressionstatement. + def visitExpressionstatement(self, ctx:CPP14Parser.ExpressionstatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#compoundstatement. + def visitCompoundstatement(self, ctx:CPP14Parser.CompoundstatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#statementseq. + def visitStatementseq(self, ctx:CPP14Parser.StatementseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#ifStatement. + def visitIfStatement(self, ctx:CPP14Parser.IfStatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#switchStatement. + def visitSwitchStatement(self, ctx:CPP14Parser.SwitchStatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#condition. + def visitCondition(self, ctx:CPP14Parser.ConditionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#WhileStatement. + def visitWhileStatement(self, ctx:CPP14Parser.WhileStatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#DoStatement. + def visitDoStatement(self, ctx:CPP14Parser.DoStatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#ForStatement. + def visitForStatement(self, ctx:CPP14Parser.ForStatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#ForRangeStatement. + def visitForRangeStatement(self, ctx:CPP14Parser.ForRangeStatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#forinitstatement. + def visitForinitstatement(self, ctx:CPP14Parser.ForinitstatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#forrangedeclaration. + def visitForrangedeclaration(self, ctx:CPP14Parser.ForrangedeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#forrangeinitializer. + def visitForrangeinitializer(self, ctx:CPP14Parser.ForrangeinitializerContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#jumpstatement. + def visitJumpstatement(self, ctx:CPP14Parser.JumpstatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#declarationstatement. + def visitDeclarationstatement(self, ctx:CPP14Parser.DeclarationstatementContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#declarationseq. + def visitDeclarationseq(self, ctx:CPP14Parser.DeclarationseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#declaration. + def visitDeclaration(self, ctx:CPP14Parser.DeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#blockdeclaration. + def visitBlockdeclaration(self, ctx:CPP14Parser.BlockdeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#aliasdeclaration. + def visitAliasdeclaration(self, ctx:CPP14Parser.AliasdeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#simpledeclaration. + def visitSimpledeclaration(self, ctx:CPP14Parser.SimpledeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#static_assertdeclaration. + def visitStatic_assertdeclaration(self, ctx:CPP14Parser.Static_assertdeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#emptydeclaration. + def visitEmptydeclaration(self, ctx:CPP14Parser.EmptydeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#attributedeclaration. + def visitAttributedeclaration(self, ctx:CPP14Parser.AttributedeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#storageAttr. + def visitStorageAttr(self, ctx:CPP14Parser.StorageAttrContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#typeAttr. + def visitTypeAttr(self, ctx:CPP14Parser.TypeAttrContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#funcAttr. + def visitFuncAttr(self, ctx:CPP14Parser.FuncAttrContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#friendDecl. + def visitFriendDecl(self, ctx:CPP14Parser.FriendDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#typedefDecl. + def visitTypedefDecl(self, ctx:CPP14Parser.TypedefDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#constExprDecl. + def visitConstExprDecl(self, ctx:CPP14Parser.ConstExprDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#declspecifierseq. + def visitDeclspecifierseq(self, ctx:CPP14Parser.DeclspecifierseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#storageclassspecifier. + def visitStorageclassspecifier(self, ctx:CPP14Parser.StorageclassspecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#functionspecifier. + def visitFunctionspecifier(self, ctx:CPP14Parser.FunctionspecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#typedefname. + def visitTypedefname(self, ctx:CPP14Parser.TypedefnameContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#otherDecl. + def visitOtherDecl(self, ctx:CPP14Parser.OtherDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#classDecl. + def visitClassDecl(self, ctx:CPP14Parser.ClassDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#enumDecl. + def visitEnumDecl(self, ctx:CPP14Parser.EnumDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#trailingtypespecifier. + def visitTrailingtypespecifier(self, ctx:CPP14Parser.TrailingtypespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#typespecifierseq. + def visitTypespecifierseq(self, ctx:CPP14Parser.TypespecifierseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#trailingtypespecifierseq. + def visitTrailingtypespecifierseq(self, ctx:CPP14Parser.TrailingtypespecifierseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#simpletypespecifier. + def visitSimpletypespecifier(self, ctx:CPP14Parser.SimpletypespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#thetypename. + def visitThetypename(self, ctx:CPP14Parser.ThetypenameContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#decltypespecifier. + def visitDecltypespecifier(self, ctx:CPP14Parser.DecltypespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#elaboratedtypespecifier. + def visitElaboratedtypespecifier(self, ctx:CPP14Parser.ElaboratedtypespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#enumname. + def visitEnumname(self, ctx:CPP14Parser.EnumnameContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#enumspecifier. + def visitEnumspecifier(self, ctx:CPP14Parser.EnumspecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#enumhead. + def visitEnumhead(self, ctx:CPP14Parser.EnumheadContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#opaqueenumdeclaration. + def visitOpaqueenumdeclaration(self, ctx:CPP14Parser.OpaqueenumdeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#enumkey. + def visitEnumkey(self, ctx:CPP14Parser.EnumkeyContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#enumbase. + def visitEnumbase(self, ctx:CPP14Parser.EnumbaseContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#enumeratorlist. + def visitEnumeratorlist(self, ctx:CPP14Parser.EnumeratorlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#enumeratordefinition. + def visitEnumeratordefinition(self, ctx:CPP14Parser.EnumeratordefinitionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#enumerator. + def visitEnumerator(self, ctx:CPP14Parser.EnumeratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#namespacename. + def visitNamespacename(self, ctx:CPP14Parser.NamespacenameContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#originalnamespacename. + def visitOriginalnamespacename(self, ctx:CPP14Parser.OriginalnamespacenameContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#namespacedefinition. + def visitNamespacedefinition(self, ctx:CPP14Parser.NamespacedefinitionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#namednamespacedefinition. + def visitNamednamespacedefinition(self, ctx:CPP14Parser.NamednamespacedefinitionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#originalnamespacedefinition. + def visitOriginalnamespacedefinition(self, ctx:CPP14Parser.OriginalnamespacedefinitionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#extensionnamespacedefinition. + def visitExtensionnamespacedefinition(self, ctx:CPP14Parser.ExtensionnamespacedefinitionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#unnamednamespacedefinition. + def visitUnnamednamespacedefinition(self, ctx:CPP14Parser.UnnamednamespacedefinitionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#namespacebody. + def visitNamespacebody(self, ctx:CPP14Parser.NamespacebodyContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#namespacealias. + def visitNamespacealias(self, ctx:CPP14Parser.NamespacealiasContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#namespacealiasdefinition. + def visitNamespacealiasdefinition(self, ctx:CPP14Parser.NamespacealiasdefinitionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#qualifiednamespacespecifier. + def visitQualifiednamespacespecifier(self, ctx:CPP14Parser.QualifiednamespacespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#usingdeclaration. + def visitUsingdeclaration(self, ctx:CPP14Parser.UsingdeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#usingdirective. + def visitUsingdirective(self, ctx:CPP14Parser.UsingdirectiveContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#asmdefinition. + def visitAsmdefinition(self, ctx:CPP14Parser.AsmdefinitionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#linkagespecification. + def visitLinkagespecification(self, ctx:CPP14Parser.LinkagespecificationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#attributespecifierseq. + def visitAttributespecifierseq(self, ctx:CPP14Parser.AttributespecifierseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#attributespecifier. + def visitAttributespecifier(self, ctx:CPP14Parser.AttributespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#alignmentspecifier. + def visitAlignmentspecifier(self, ctx:CPP14Parser.AlignmentspecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#attributelist. + def visitAttributelist(self, ctx:CPP14Parser.AttributelistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#attribute. + def visitAttribute(self, ctx:CPP14Parser.AttributeContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#attributetoken. + def visitAttributetoken(self, ctx:CPP14Parser.AttributetokenContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#attributescopedtoken. + def visitAttributescopedtoken(self, ctx:CPP14Parser.AttributescopedtokenContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#attributenamespace. + def visitAttributenamespace(self, ctx:CPP14Parser.AttributenamespaceContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#attributeargumentclause. + def visitAttributeargumentclause(self, ctx:CPP14Parser.AttributeargumentclauseContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#balancedtokenseq. + def visitBalancedtokenseq(self, ctx:CPP14Parser.BalancedtokenseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#balancedtoken. + def visitBalancedtoken(self, ctx:CPP14Parser.BalancedtokenContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#initdeclaratorlist. + def visitInitdeclaratorlist(self, ctx:CPP14Parser.InitdeclaratorlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#initdeclarator. + def visitInitdeclarator(self, ctx:CPP14Parser.InitdeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#declarator. + def visitDeclarator(self, ctx:CPP14Parser.DeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#nonPtrDecl. + def visitNonPtrDecl(self, ctx:CPP14Parser.NonPtrDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#ptrDecl. + def visitPtrDecl(self, ctx:CPP14Parser.PtrDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#noptrIgnore. + def visitNoptrIgnore(self, ctx:CPP14Parser.NoptrIgnoreContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#normalVarDecl. + def visitNormalVarDecl(self, ctx:CPP14Parser.NormalVarDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#arrayDecl. + def visitArrayDecl(self, ctx:CPP14Parser.ArrayDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#parametersandqualifiers. + def visitParametersandqualifiers(self, ctx:CPP14Parser.ParametersandqualifiersContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#trailingreturntype. + def visitTrailingreturntype(self, ctx:CPP14Parser.TrailingreturntypeContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#ptroperator. + def visitPtroperator(self, ctx:CPP14Parser.PtroperatorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#cvqualifierseq. + def visitCvqualifierseq(self, ctx:CPP14Parser.CvqualifierseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#cvqualifier. + def visitCvqualifier(self, ctx:CPP14Parser.CvqualifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#refqualifier. + def visitRefqualifier(self, ctx:CPP14Parser.RefqualifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#declaratorid. + def visitDeclaratorid(self, ctx:CPP14Parser.DeclaratoridContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#thetypeid. + def visitThetypeid(self, ctx:CPP14Parser.ThetypeidContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#abstractdeclarator. + def visitAbstractdeclarator(self, ctx:CPP14Parser.AbstractdeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#ptrabstractdeclarator. + def visitPtrabstractdeclarator(self, ctx:CPP14Parser.PtrabstractdeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#noptrabstractdeclarator. + def visitNoptrabstractdeclarator(self, ctx:CPP14Parser.NoptrabstractdeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#abstractpackdeclarator. + def visitAbstractpackdeclarator(self, ctx:CPP14Parser.AbstractpackdeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#noptrabstractpackdeclarator. + def visitNoptrabstractpackdeclarator(self, ctx:CPP14Parser.NoptrabstractpackdeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#parameterdeclarationclause. + def visitParameterdeclarationclause(self, ctx:CPP14Parser.ParameterdeclarationclauseContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#parameterdeclarationlist. + def visitParameterdeclarationlist(self, ctx:CPP14Parser.ParameterdeclarationlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#parameterdeclaration. + def visitParameterdeclaration(self, ctx:CPP14Parser.ParameterdeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#functiondefinition. + def visitFunctiondefinition(self, ctx:CPP14Parser.FunctiondefinitionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#functionbody. + def visitFunctionbody(self, ctx:CPP14Parser.FunctionbodyContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#initDeclWithAssignList. + def visitInitDeclWithAssignList(self, ctx:CPP14Parser.InitDeclWithAssignListContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#initDeclWithCall. + def visitInitDeclWithCall(self, ctx:CPP14Parser.InitDeclWithCallContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#initDeclWithAssign. + def visitInitDeclWithAssign(self, ctx:CPP14Parser.InitDeclWithAssignContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#initDeclWithList. + def visitInitDeclWithList(self, ctx:CPP14Parser.InitDeclWithListContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#normalAssign. + def visitNormalAssign(self, ctx:CPP14Parser.NormalAssignContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#arrayAssign. + def visitArrayAssign(self, ctx:CPP14Parser.ArrayAssignContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#initializerlist. + def visitInitializerlist(self, ctx:CPP14Parser.InitializerlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#bracedinitlist. + def visitBracedinitlist(self, ctx:CPP14Parser.BracedinitlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#classname. + def visitClassname(self, ctx:CPP14Parser.ClassnameContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#classspecifier. + def visitClassspecifier(self, ctx:CPP14Parser.ClassspecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#classhead. + def visitClasshead(self, ctx:CPP14Parser.ClassheadContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#classheadname. + def visitClassheadname(self, ctx:CPP14Parser.ClassheadnameContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#classvirtspecifier. + def visitClassvirtspecifier(self, ctx:CPP14Parser.ClassvirtspecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#classkey. + def visitClasskey(self, ctx:CPP14Parser.ClasskeyContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberspecification. + def visitMemberspecification(self, ctx:CPP14Parser.MemberspecificationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberVarDecl. + def visitMemberVarDecl(self, ctx:CPP14Parser.MemberVarDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberFuncDecl. + def visitMemberFuncDecl(self, ctx:CPP14Parser.MemberFuncDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberUsing. + def visitMemberUsing(self, ctx:CPP14Parser.MemberUsingContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberStaticAssert. + def visitMemberStaticAssert(self, ctx:CPP14Parser.MemberStaticAssertContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberTemplateDecl. + def visitMemberTemplateDecl(self, ctx:CPP14Parser.MemberTemplateDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberAliasDecl. + def visitMemberAliasDecl(self, ctx:CPP14Parser.MemberAliasDeclContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberEmpty. + def visitMemberEmpty(self, ctx:CPP14Parser.MemberEmptyContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberdeclaratorlist. + def visitMemberdeclaratorlist(self, ctx:CPP14Parser.MemberdeclaratorlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#memberdeclarator. + def visitMemberdeclarator(self, ctx:CPP14Parser.MemberdeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#virtspecifierseq. + def visitVirtspecifierseq(self, ctx:CPP14Parser.VirtspecifierseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#virtspecifier. + def visitVirtspecifier(self, ctx:CPP14Parser.VirtspecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#purespecifier. + def visitPurespecifier(self, ctx:CPP14Parser.PurespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#baseclause. + def visitBaseclause(self, ctx:CPP14Parser.BaseclauseContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#basespecifierlist. + def visitBasespecifierlist(self, ctx:CPP14Parser.BasespecifierlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#basespecifier. + def visitBasespecifier(self, ctx:CPP14Parser.BasespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#classordecltype. + def visitClassordecltype(self, ctx:CPP14Parser.ClassordecltypeContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#basetypespecifier. + def visitBasetypespecifier(self, ctx:CPP14Parser.BasetypespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#accessspecifier. + def visitAccessspecifier(self, ctx:CPP14Parser.AccessspecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#conversionfunctionid. + def visitConversionfunctionid(self, ctx:CPP14Parser.ConversionfunctionidContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#conversiontypeid. + def visitConversiontypeid(self, ctx:CPP14Parser.ConversiontypeidContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#conversiondeclarator. + def visitConversiondeclarator(self, ctx:CPP14Parser.ConversiondeclaratorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#ctorinitializer. + def visitCtorinitializer(self, ctx:CPP14Parser.CtorinitializerContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#meminitializerlist. + def visitMeminitializerlist(self, ctx:CPP14Parser.MeminitializerlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#meminitializer. + def visitMeminitializer(self, ctx:CPP14Parser.MeminitializerContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#meminitializerid. + def visitMeminitializerid(self, ctx:CPP14Parser.MeminitializeridContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#operatorfunctionid. + def visitOperatorfunctionid(self, ctx:CPP14Parser.OperatorfunctionidContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#literaloperatorid. + def visitLiteraloperatorid(self, ctx:CPP14Parser.LiteraloperatoridContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#templatedeclaration. + def visitTemplatedeclaration(self, ctx:CPP14Parser.TemplatedeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#templateparameterlist. + def visitTemplateparameterlist(self, ctx:CPP14Parser.TemplateparameterlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#templateparameter. + def visitTemplateparameter(self, ctx:CPP14Parser.TemplateparameterContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#typeparameter. + def visitTypeparameter(self, ctx:CPP14Parser.TypeparameterContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#simpletemplateid. + def visitSimpletemplateid(self, ctx:CPP14Parser.SimpletemplateidContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#templateid. + def visitTemplateid(self, ctx:CPP14Parser.TemplateidContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#templatename. + def visitTemplatename(self, ctx:CPP14Parser.TemplatenameContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#templateargumentlist. + def visitTemplateargumentlist(self, ctx:CPP14Parser.TemplateargumentlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#templateargument. + def visitTemplateargument(self, ctx:CPP14Parser.TemplateargumentContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#typenamespecifier. + def visitTypenamespecifier(self, ctx:CPP14Parser.TypenamespecifierContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#explicitinstantiation. + def visitExplicitinstantiation(self, ctx:CPP14Parser.ExplicitinstantiationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#explicitspecialization. + def visitExplicitspecialization(self, ctx:CPP14Parser.ExplicitspecializationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#tryblock. + def visitTryblock(self, ctx:CPP14Parser.TryblockContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#functiontryblock. + def visitFunctiontryblock(self, ctx:CPP14Parser.FunctiontryblockContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#handlerseq. + def visitHandlerseq(self, ctx:CPP14Parser.HandlerseqContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#handler. + def visitHandler(self, ctx:CPP14Parser.HandlerContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#exceptiondeclaration. + def visitExceptiondeclaration(self, ctx:CPP14Parser.ExceptiondeclarationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#throwexpression. + def visitThrowexpression(self, ctx:CPP14Parser.ThrowexpressionContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#exceptionspecification. + def visitExceptionspecification(self, ctx:CPP14Parser.ExceptionspecificationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#dynamicexceptionspecification. + def visitDynamicexceptionspecification(self, ctx:CPP14Parser.DynamicexceptionspecificationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#typeidlist. + def visitTypeidlist(self, ctx:CPP14Parser.TypeidlistContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#noexceptspecification. + def visitNoexceptspecification(self, ctx:CPP14Parser.NoexceptspecificationContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#rightShift. + def visitRightShift(self, ctx:CPP14Parser.RightShiftContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#rightShiftAssign. + def visitRightShiftAssign(self, ctx:CPP14Parser.RightShiftAssignContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#theoperator. + def visitTheoperator(self, ctx:CPP14Parser.TheoperatorContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#literal. + def visitLiteral(self, ctx:CPP14Parser.LiteralContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#booleanliteral. + def visitBooleanliteral(self, ctx:CPP14Parser.BooleanliteralContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#pointerliteral. + def visitPointerliteral(self, ctx:CPP14Parser.PointerliteralContext): + return self.visitChildren(ctx) + + + # Visit a parse tree produced by CPP14Parser#userdefinedliteral. + def visitUserdefinedliteral(self, ctx:CPP14Parser.UserdefinedliteralContext): + return self.visitChildren(ctx) + + + +del CPP14Parser \ No newline at end of file diff --git a/mainTool/antlr/__init__.py b/mainTool/antlr/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/ast/ParsingUtils.py b/mainTool/ast/ParsingUtils.py new file mode 100644 index 0000000..f045184 --- /dev/null +++ b/mainTool/ast/ParsingUtils.py @@ -0,0 +1,22 @@ +from antlr4.ParserRuleContext import ParserRuleContext + +# from ast.expressions.expressionHolders import + +def childTokenString(ctx: ParserRuleContext) -> str: + if ctx is None: + return "" + nChildren: int = ctx.getChildCount() + + if nChildren == 0: + return ctx.getText() + + retval: str = "" + + for i in range(nChildren): + child: ParserRuleContext = ctx.getChild(i) + childText: str = childTokenString(child) + + if childText != "": + retval = retval + childText + " " + + return retval.strip() \ No newline at end of file diff --git a/mainTool/ast/__init__.py b/mainTool/ast/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/ast/astNode.py b/mainTool/ast/astNode.py new file mode 100644 index 0000000..7b0a282 --- /dev/null +++ b/mainTool/ast/astNode.py @@ -0,0 +1,125 @@ +from antlr4 import ParserRuleContext +from typing import List + +from mainTool.ast.ParsingUtils import childTokenString +from mainTool.ast.walking.visitor import ASTNodeVisitor + + +NOT_SET = -1 + +class CodeLocation(object): + def __init__(self, context: ParserRuleContext = None): + self.startLine: int = NOT_SET + self.startPos: int = NOT_SET + self.startIndex: int = NOT_SET + self.stopIndex: int = NOT_SET + + if context is not None: + self.initializeFromContext(context) + + def initializeFromContext(self, context: ParserRuleContext = None): + self.startLine = context.start.line + self.startPos = context.start.column + self.startIndex = context.start.tokenIndex + self.stopIndex = context.stop.tokenIndex + + def __str__(self): + return f"{self.startLine}:{self.startPos}:{self.startIndex}:{self.stopIndex}" + + def __cmp__(self, other): + if self.startLine < other.startLine: + return -1 + elif self.startLine > other.startLine: + return 1 + + if self.startPos < other.startPos: + return -1 + else: + return 1 + + def __lt__(self, other): + return self.startLine < other.startLine or (self.startLine == other.startLine and + self.startPos < other.startPos) + + def __gt__(self, other): + return self.startLine > other.startLine or (self.startLine == other.startLine and + self.startPos > other.startPos) + + + +class ASTNode(object): + def __init__(self): + self.codeStr: str = None # 该node对应的代码文本 + self.parseTreeNodeContext: ParserRuleContext = None + self.location: CodeLocation = None + self.isInCFG: bool = False # 属于CFG node还是纯粹是AST node + + self.children: List[ASTNode] = list() + self.childNumber: int = NOT_SET + + def addChild(self, node): + node.childNumber = len(self.children) + self.children.append(node) + + def getChildCount(self) -> int: + return len(self.children) + + def getChild(self, i: int): + if i < 0 or i >= len(self.children): + raise RuntimeError("index out of bound") + return self.children[i] + + def initializeFromContext(self, ctx: ParserRuleContext): + self.parseTreeNodeContext = ctx + self.setLocation(ctx) + + def setLocation(self, ctx: ParserRuleContext): + self.location = CodeLocation(ctx) + + def getEscapedCodeStr(self) -> str: + if self.codeStr is not None: + return self.codeStr + self.codeStr = self.escapeCodeStr(childTokenString(self.parseTreeNodeContext)) + return self.codeStr + + def escapeCodeStr(self, codeStr) -> str: + retval = codeStr + retval = retval.replace("\n", "\\n") + retval = retval.replace("\t", "\\t") + return retval + + def getLocationString(self) -> str: + # self.setLocation(self.parseTreeNodeContext) + return str(self.location) + + def markAsCFGNode(self): + self.isInCFG = True + + def isLeaf(self) -> bool: + return len(self.children) == 0 + + def getTypeAsString(self): + return type(self).__name__ + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + + def __str__(self): + return self.getEscapedCodeStr() + + + + + + + +if __name__ == '__main__': + location1 = CodeLocation() + location1.startLine = 1 + location1.startPos = 2 + + location2 = CodeLocation() + location2.startLine = 2 + location2.startPos = 3 + + print(location1 < location2) \ No newline at end of file diff --git a/mainTool/ast/builders.py b/mainTool/ast/builders.py new file mode 100644 index 0000000..1087e2b --- /dev/null +++ b/mainTool/ast/builders.py @@ -0,0 +1,1206 @@ +from antlr4 import TerminalNode, ParseTreeWalker +from antlr4.tree.Tree import TerminalNodeImpl + +from mainTool.antlr.CPP14Listener import CPP14Listener +from mainTool.antlr.CPP14Parser import CPP14Parser + +from mainTool.ast.astNode import CodeLocation +from mainTool.ast.declarations.complexDecls import * + +from mainTool.ast.statements.blockStarters import * +from mainTool.ast.statements.jumps import * +from mainTool.ast.statements.statements import * + +from mainTool.ast.expressions.expression import * +from mainTool.ast.expressions.primaryExpressions import * +from mainTool.ast.expressions.expressionHolders import * +from mainTool.ast.expressions.postfixExpressions import * +from mainTool.ast.expressions.binaryExpressions import * + +from typing import Dict +import json +# 将AntlrAST解析为自定义AST + + +varDecl = "VarDecl" +declarator = "Declarator" + +class NestingReconstructor(object): + def __init__(self, stack: List[ASTNode]): + self.stack: List[ASTNode] = stack + + def addItemToParent(self, expression: astNode): + topOfStack: ASTNode = self.stack[-1] + topOfStack.addChild(expression) + + def pullUpOnlyChild(self, expression: Expression) -> Expression: + if expression.getChildCount() == 1: + expression = expression.getChild(0) + return expression + + # 合并子表达式 + def consolidateSubExpression(self, ctx: ParserRuleContext): + expression: Expression = self.stack.pop() + expression.initializeFromContext(ctx) + + if not isinstance(expression, ExpressionHolder): + expression = self.pullUpOnlyChild(expression) + + self.addItemToParent(expression) + +class FunctionContentBuilder(CPP14Listener): + def __init__(self): + super(FunctionContentBuilder, self).__init__() + self.stack: List[ASTNode] = list() + self.idType: List[str] = list() + + self.curType: str = None + self.curCompleteType: str = None + self.curVarNameId: Identifier = None # 标识当前变量名,处理IdentifierDeclType时用 + + self.pastTheTypeId: bool = False # 用来解析cast type时用,为true表示现在正在解析castTarget + self.nesting: NestingReconstructor = NestingReconstructor(self.stack) + + def enterStatement(self, ctx: CPP14Parser.StatementContext): + # 跳过labelstatement + if ctx.labeledstatement() is not None: + return + statementItem: Statement = Statement() + statementItem.initializeFromContext(ctx) + self.stack.append(statementItem) + + def exitStatement(self, ctx: CPP14Parser.StatementContext): + # 跳过labelstatement + if ctx.labeledstatement() is not None: + return + if len(self.stack) == 0: + raise RuntimeError("statement parsing error") + curNode: ASTNode = self.stack.pop() + parent: ASTNode = self.stack[-1] + curNode.initializeFromContext(ctx) + + # 当前statement的父节点是If-Else + if isinstance(parent, IfStatement): + # ctx.parent就是SelectionstatementContext类型 + # 如果当前statement的父节点是If + if ctx == ctx.parentCtx.getChild(4): + parent.addChild(curNode) + # 当前statement的父节点是Else + else: + elseStatement: ElseStatement = ElseStatement() + parent.elseNode = elseStatement + elseStatement.addChild(curNode) + return + + if isinstance(curNode, IdentifierDeclStatement): + self.curType = None + parent.addChild(curNode) + + # 块语句 + def enterCompoundstatement(self, ctx: CPP14Parser.CompoundstatementContext): + if isinstance(self.stack[-1], TryStatement) or isinstance(self.stack[-1], CatchStatement): + self.stack.append(CompoundStatement()) + else: + self.stack[-1] = CompoundStatement() + + def exitCompoundstatement(self, ctx: CPP14Parser.CompoundstatementContext): + # 非try-catch语句统统在exitStatement时处理 + comp: ASTNode = self.stack.pop() + if len(self.stack) > 0 and (isinstance(self.stack[-1], TryStatement) or + isinstance(self.stack[-1], CatchStatement)): + comp.initializeFromContext(ctx) + self.stack[-1].addChild(comp) + else: + self.stack.append(comp) + + # 表达式语句 + def enterExpressionstatement(self, ctx: CPP14Parser.ExpressionstatementContext): + # expressionstatement上面可能是普通statement,也可能是forinit, 对于forinit,我们保留 + if isinstance(self.stack[-1], ForInit): + return + self.stack[-1] = ExpressionStatement() # replaceTopOfStack + + # label + def enterLabel(self, ctx: CPP14Parser.LabelContext): + label: Label = Label() + if ctx.Case() is not None: + label.type = LabelType.Case + elif ctx.Default() is not None: + label.type = LabelType.Default + else: + label.type = LabelType.Normal + self.stack.append(label) + + def exitLabel(self, ctx: CPP14Parser.LabelContext): + label: Label = self.stack.pop() + label.initializeFromContext(ctx) + self.stack[-1].addChild(label) + + # if-else语句 + def enterIfStatement(self, ctx: CPP14Parser.IfStatementContext): + self.stack[-1] = IfStatement() # replaceTopOfStack + + # switch + def enterSwitchStatement(self, ctx: CPP14Parser.SwitchStatementContext): + self.stack[-1] = SwitchStatement() # replaceTopOfStack + + # while + def enterWhileStatement(self, ctx: CPP14Parser.WhileStatementContext): + self.stack[-1] = WhileStatement() # replaceTopOfStack + + # For + def enterForStatement(self, ctx: CPP14Parser.ForStatementContext): + self.stack[-1] = ForStatement() # replaceTopOfStack + + # for init语句 + def enterForinitstatement(self, ctx: CPP14Parser.ForinitstatementContext): + forinit: ForInit = ForInit() + self.stack.append(forinit) + + def exitForinitstatement(self, ctx: CPP14Parser.ForinitstatementContext): + forinit: ASTNode = self.stack.pop() + forinit.initializeFromContext(ctx) + forStatement: ForStatement = self.stack[-1] + forStatement.addChild(forinit) + + # DoWhile + def enterDoStatement(self, ctx: CPP14Parser.DoStatementContext): + self.stack[-1] = DoStatement() # replaceTopOfStack + + # ForRange + def enterForRangeStatement(self, ctx: CPP14Parser.ForRangeStatementContext): + self.stack[-1] = ForRangeStatement() # replaceTopOfStack + + # ForRange decl + def enterForrangedeclaration(self, ctx: CPP14Parser.ForrangedeclarationContext): + forRangeInit: ForRangeInit = ForRangeInit() + self.stack.append(forRangeInit) + self.curType = "" + + def exitForrangeinitializer(self, ctx:CPP14Parser.ForrangeinitializerContext): + forRangeInit: ASTNode = self.stack.pop() + forRangeInit.initializeFromContext(ctx) + self.stack[-1].addChild(forRangeInit) + self.curType = None + self.curCompleteType = None + + # try catch异常处理 + # try语句 + def enterTryblock(self, ctx: CPP14Parser.TryblockContext): + self.stack[-1] = TryStatement() # replaceTopOfStack + + # catch语句 + def enterHandler(self, ctx: CPP14Parser.HandlerContext): + catchStatement: CatchStatement = CatchStatement() + self.stack.append(catchStatement) + + def exitHandler(self, ctx:CPP14Parser.HandlerContext): + catchStatement: CatchStatement = self.stack.pop() + catchStatement.initializeFromContext(ctx) + + if not isinstance(self.stack[-1], TryStatement): + raise RuntimeError("error when parsing try-catch block") + + tryStatement: TryStatement = self.stack[-1] + tryStatement.addCatchStatement(catchStatement) + + def enterExceptiondeclaration(self, ctx: CPP14Parser.ExceptiondeclarationContext): + self.curType = "" + + def exitExceptiondeclaration(self, ctx:CPP14Parser.ExceptiondeclarationContext): + self.curType = None + + # 跳转语句 + def enterJumpstatement(self, ctx: CPP14Parser.JumpstatementContext): + # break语句 + if ctx.Break() is not None: + self.stack[-1] = BreakStatement() + # continue语句 + elif ctx.Continue() is not None: + self.stack[-1] = ContinueStatement() + # goto语句 + elif ctx.Goto() is not None: + self.stack[-1] = GotoStatement() + # return语句 + elif ctx.Return() is not None: + self.stack[-1] = ReturnStatement() + + # 变量定义IdentifierDeclStatement + def enterSimpledeclaration(self, ctx: CPP14Parser.SimpledeclarationContext): + self.curType = "" + if isinstance(self.stack[-1], ForInit): + return + idDeclStmt: IdentifierDeclStatement = IdentifierDeclStatement() + idDeclStmt.initializeFromContext(ctx) + self.stack[-1] = idDeclStmt + + # 处理变量定义类型curType + def exitDeclspecifierseq(self, ctx: CPP14Parser.DeclspecifierseqContext): + if ctx.getChildCount() == 1: + self.curType = self.curType.strip() + + def enterOtherDecl(self, ctx: CPP14Parser.OtherDeclContext): + self.idType.append(varDecl) + + def exitOtherDecl(self, ctx: CPP14Parser.OtherDeclContext): + self.idType.pop() + + # 一个initdeclarator标识着1个变量 + def enterInitdeclarator(self, ctx: CPP14Parser.InitdeclaratorContext): + self.curCompleteType = self.curType.strip() + identifierDecl: IdentifierDecl = IdentifierDecl() + self.stack.append(identifierDecl) + declType: IdentifierDeclType = IdentifierDeclType() + # 先设置基础类型,完整类型可能是指针类型 + declType.baseType = self.curType.strip() + identifierDecl.setType(declType) + + # 一个initdeclarator标识着1个变量 + def exitInitdeclarator(self, ctx: CPP14Parser.InitdeclaratorContext): + self.curCompleteType = None + self.curVarNameId = None + identifierDecl: ASTNode = self.stack.pop() + identifierDecl.initializeFromContext(ctx) + identifierDeclStatement: ASTNode = self.stack[-1] + identifierDeclStatement.addChild(identifierDecl) + + # 处理变量名和完整类型 + def enterDeclarator(self, ctx: CPP14Parser.DeclaratorContext): + # 标识进入变量定义 + # ForRangeInit和catch要特殊处理 + if isinstance(self.stack[-1], ForRangeInit) or isinstance(self.stack[-1], CatchStatement): + self.curType = self.curType.strip() + self.curCompleteType = self.curType + self.idType.append(declarator) + + def exitDeclarator(self, ctx: CPP14Parser.DeclaratorContext): + self.idType.pop() + # For Range Init + if isinstance(self.stack[-1], ForRangeInit): + init: ForRangeInit = self.stack[-1] + initType: IdentifierDeclType = IdentifierDeclType() + initType.baseType = self.curType + initType.completeType = self.curCompleteType + init.setType(initType) + return + elif isinstance(self.stack[-1], CatchStatement): + catchStatement: CatchStatement = self.stack[-1] + identifierDeclType: IdentifierDeclType = IdentifierDeclType() + identifierDeclType.baseType = self.curType + identifierDeclType.completeType = self.curCompleteType + catchStatement.setExceptionType(identifierDeclType) + return + # 处理当前变量的完整类型 + curDecl: IdentifierDecl = self.stack[-1] + curVarType: IdentifierDeclType = curDecl.type + curVarType.completeType = self.curCompleteType + + # 处理指针定义类型, char *p; + def enterPtrDecl(self, ctx: CPP14Parser.PtrDeclContext): + if ctx.ptroperator().Star() is not None: + self.curCompleteType += " *" + + # 处理数组定义类型,char source[100];,对于这种变量其类型为 char * + def enterArrayDecl(self, ctx: CPP14Parser.ArrayDeclContext): + self.curCompleteType += " *" + + # 变量定义语句可能伴随着赋值,包括 int a = 10, b{10}, c(100); + # 对应 int a = 10; + def enterInitDeclWithAssign(self, ctx: CPP14Parser.InitDeclWithAssignContext): + assignmentExpr: AssignmentExpr = AssignmentExpr() + assignmentExpr.operator = "=" + assignmentExpr.flag = False # 不再自动设置operator + assignmentExpr.addChild(self.curVarNameId.copy()) + self.stack.append(assignmentExpr) + + def exitInitDeclWithAssign(self, ctx: CPP14Parser.InitDeclWithAssignContext): + self.nesting.consolidateSubExpression(ctx) + + # 列表初始化对应int a{10}; + def enterInitDeclWithList(self, ctx: CPP14Parser.InitDeclWithListContext): + assignmentExpr: AssignmentExpr = AssignmentExpr() + assignmentExpr.operator = "=" + assignmentExpr.flag = False # 不再自动设置operator + assignmentExpr.addChild(self.curVarNameId.copy()) + + initializerList: InitializerList = InitializerList() + self.stack.append(assignmentExpr) + self.stack.append(initializerList) + + def exitInitDeclWithList(self, ctx: CPP14Parser.InitDeclWithListContext): + self.nesting.consolidateSubExpression(ctx) + self.nesting.consolidateSubExpression(ctx) + + # 构造函数初始化,对应int a(10); + def enterInitDeclWithCall(self, ctx: CPP14Parser.InitDeclWithCallContext): + expr: CallExpression = CallExpression() + self.stack.append(expr) + + def exitInitDeclWithCall(self, ctx: CPP14Parser.InitDeclWithCallContext): + self.nesting.consolidateSubExpression(ctx) + + # 类静态变量 className::varName + def enterClassIdentifier(self, ctx: CPP14Parser.ClassIdentifierContext): + staticVariable: ClassStaticIdentifier = ClassStaticIdentifier() + self.stack.append(staticVariable) + + def exitQualifiedid(self, ctx: CPP14Parser.QualifiedidContext): + if isinstance(self.stack[-1], ClassStaticIdentifier): + staticVariable: ClassStaticIdentifier = self.stack.pop() + staticVariable.initializeFromContext(ctx) + self.stack[-1].addChild(staticVariable) + if len(self.idType) > 0 and self.idType[-1] == declarator: + self.curVarNameId = staticVariable + + # 条件判断Condition + def enterCondition(self, ctx: CPP14Parser.ConditionContext): + condition: Condition = Condition() + self.stack.append(condition) + + def exitCondition(self, ctx: CPP14Parser.ConditionContext): + condition: Condition = self.stack.pop() + parentNode: ASTNode = self.stack[-1] + parentNode.addChild(condition) + condition.initializeFromContext(ctx) + + # 三目表达式 + def enterRealConditionalExpression(self, ctx: CPP14Parser.RealConditionalExpressionContext): + expr: ConditionalExpression = ConditionalExpression() + self.stack.append(expr) + + def exitRealConditionalExpression(self, ctx: CPP14Parser.RealConditionalExpressionContext): + expr: ConditionalExpression = self.stack[-1] + child: ASTNode = expr.getChild(0) + if child is None: + return + cnd: Condition = Condition() + cnd.addChild(child) + cnd.initializeFromContext(child.parseTreeNodeContext) + expr.children[0] = cnd + self.nesting.consolidateSubExpression(ctx) + + # BinaryExpression + def enterAssignmentexpression(self, ctx: CPP14Parser.AssignmentexpressionContext): + expr: AssignmentExpr = AssignmentExpr() + self.stack.append(expr) + + def exitAssignmentexpression(self, ctx: CPP14Parser.AssignmentexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 逻辑或运算:expr1 || expr2 + def enterLogicalorexpression(self, ctx: CPP14Parser.LogicalorexpressionContext): + expr: OrExpression = OrExpression() + self.stack.append(expr) + + def exitLogicalorexpression(self, ctx: CPP14Parser.LogicalorexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 逻辑与运算,expr1 && expr2 + def enterLogicalandexpression(self, ctx: CPP14Parser.LogicalandexpressionContext): + expr: AndExpression = AndExpression() + self.stack.append(expr) + + def exitLogicalandexpression(self, ctx: CPP14Parser.LogicalandexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 与运算, expr1 | expr2 + def enterInclusiveorexpression(self, ctx: CPP14Parser.InclusiveorexpressionContext): + expr: InclusiveOrExpression = InclusiveOrExpression() + self.stack.append(expr) + + def exitInclusiveorexpression(self, ctx: CPP14Parser.InclusiveorexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 或运算, expr1 ^ expr2 + def enterExclusiveorexpression(self, ctx: CPP14Parser.ExclusiveorexpressionContext): + expr: ExclusiveOrExpression = ExclusiveOrExpression() + self.stack.append(expr) + + def exitExclusiveorexpression(self, ctx: CPP14Parser.ExclusiveorexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 与运算, expr1 & expr2 + def enterAndexpression(self, ctx: CPP14Parser.AndexpressionContext): + expr: BitAndExpression = BitAndExpression() + self.stack.append(expr) + + def exitAndexpression(self, ctx: CPP14Parser.AndexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 等于不等于判断,expr1 == expr2, expr1 != expr2 + def enterEqualityexpression(self, ctx: CPP14Parser.EqualityexpressionContext): + expr: EqualityExpression = EqualityExpression() + self.stack.append(expr) + + def exitEqualityexpression(self, ctx: CPP14Parser.EqualityexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 大于小于判断,expr1 >= / <= / < / > expr2 + def enterRelationalexpression(self, ctx: CPP14Parser.RelationalexpressionContext): + expr: RelationalExpression = RelationalExpression() + self.stack.append(expr) + + def exitRelationalexpression(self, ctx: CPP14Parser.RelationalexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 左移,右移运算 , expr1 << / >> expr2 + def enterShiftexpression(self, ctx: CPP14Parser.ShiftexpressionContext): + expr: ShiftExpression = ShiftExpression() + self.stack.append(expr) + + def exitShiftexpression(self, ctx: CPP14Parser.ShiftexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 加减法运算, expr1 + / - expr2 + def enterAdditiveexpression(self, ctx: CPP14Parser.AdditiveexpressionContext): + expr: AdditiveExpression = AdditiveExpression() + self.stack.append(expr) + + def exitAdditiveexpression(self, ctx: CPP14Parser.AdditiveexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 乘除模运算, expr1 * / / / % expr2 + def enterMultiplicativeexpression(self, ctx: CPP14Parser.MultiplicativeexpressionContext): + expr: MultiplicativeExpression = MultiplicativeExpression() + self.stack.append(expr) + + def exitMultiplicativeexpression(self, ctx: CPP14Parser.MultiplicativeexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # New操作 + def enterNewexpression(self, ctx: CPP14Parser.NewexpressionContext): + newExpression: NewExpression = NewExpression() + self.stack.append(newExpression) + + def exitNewexpression(self, ctx: CPP14Parser.NewexpressionContext): + newExpression: NewExpression = self.stack.pop() + newExpression.initializeFromContext(ctx) + topOfStack: ASTNode = self.stack[-1] + topOfStack.addChild(newExpression) + + # delete 操作 + def enterDeleteexpression(self, ctx: CPP14Parser.DeleteexpressionContext): + deleteExpression: DeleteExpression = DeleteExpression() + self.stack.append(deleteExpression) + + def exitDeleteexpression(self, ctx: CPP14Parser.DeleteexpressionContext): + deleteExpression: DeleteExpression = self.stack.pop() + deleteExpression.initializeFromContext(ctx) + topOfStack: ASTNode = self.stack[-1] + topOfStack.addChild(deleteExpression) + + def enterThrowexpression(self, ctx: CPP14Parser.ThrowexpressionContext): + throwExpression: ThrowExpression = ThrowExpression() + self.stack.append(throwExpression) + + def exitThrowexpression(self, ctx: CPP14Parser.ThrowexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # new type + def enterNewtypeid(self, ctx: CPP14Parser.NewtypeidContext): + self.curType = "" + + def exitNewtypeid(self, ctx: CPP14Parser.NewtypeidContext): + identifier: Identifier = Identifier() + identifier.codeStr = self.curType + newExpression: NewExpression = self.stack[-1] + newExpression.setTargetClass(identifier) + self.curType = None + + def enterPtrNewDeclarator(self, ctx: CPP14Parser.PtrNewDeclaratorContext): + self.curType = self.curType.strip() + " *" + + def enterThetypeid(self, ctx: CPP14Parser.ThetypeidContext): + # cast target + if isinstance(self.stack[-1], CastExpression): + self.pastTheTypeId = True + expr: CastTarget = CastTarget() + expr.codeStr = "" + self.stack.append(expr) + # sizeof class + elif isinstance(self.stack[-1], SizeofExpr): + expr: SizeofOperand = SizeofOperand() + self.stack.append(expr) + + def exitThetypeid(self, ctx: CPP14Parser.ThetypeidContext): + if isinstance(self.stack[-1], CastTarget): + self.pastTheTypeId = False + self.nesting.consolidateSubExpression(ctx) + elif isinstance(self.stack[-1], SizeofOperand): + self.nesting.consolidateSubExpression(ctx) + + # 函数调用语句 + def enterFunctionCall(self, ctx: CPP14Parser.FunctionCallContext): + expr: CallExpression = CallExpression() + self.stack.append(expr) + + def exitFunctionCall(self, ctx: CPP14Parser.FunctionCallContext): + expr: CallExpression = self.stack[-1] + child: ASTNode = expr.getChild(0) + if child is None: + return + callee: Callee = Callee() + callee.codeStr = child.getEscapedCodeStr() + callee.addChild(child) + callee.childNumber = 0 + expr.children[0] = callee + # 如果没有调用参数,就创建一个空的参数列表 + if expr.argumentList is None: + argumentList: ArgumentList = ArgumentList() + argumentList.codeStr = "" + expr.setArgumentList(argumentList) + self.nesting.consolidateSubExpression(ctx) + + # CastExpression + def enterCastexpression(self, ctx:CPP14Parser.CastexpressionContext): + expr: CastExpression = CastExpression() + self.stack.append(expr) + + def exitCastexpression(self, ctx:CPP14Parser.CastexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + def enterPostSimpleCastExpression(self, ctx:CPP14Parser.PostSimpleCastExpressionContext): + expr: CastExpression = CastExpression() + self.stack.append(expr) + + def exitPostSimpleCastExpression(self, ctx:CPP14Parser.PostSimpleCastExpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # cast target + def enterSimpletypespecifier(self, ctx:CPP14Parser.SimpletypespecifierContext): + # type(n) cast + if not self.pastTheTypeId and isinstance(self.stack[-1], CastExpression): + expr: CastTarget = CastTarget() + self.stack.append(expr) + + def exitSimpletypespecifier(self, ctx:CPP14Parser.SimpletypespecifierContext): + if not self.pastTheTypeId and isinstance(self.stack[-1], CastTarget): + self.nesting.consolidateSubExpression(ctx) + + def enterCppCastExpression(self, ctx:CPP14Parser.CppCastExpressionContext): + expr: CastExpression = CastExpression() + self.stack.append(expr) + + def exitCppCastExpression(self, ctx:CPP14Parser.CppCastExpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # Sizeof + def enterSizeofExpression(self, ctx:CPP14Parser.SizeofExpressionContext): + expr: SizeofExpr = SizeofExpr() + self.stack.append(expr) + + def exitSizeofExpression(self, ctx:CPP14Parser.SizeofExpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # expressionlist父节点可能为newExpression, meminitializer, initializer,postfix + def enterExpressionlist(self, ctx:CPP14Parser.ExpressionlistContext): + # 父节点是函数调用 + if isinstance(self.stack[-1], CallExpression): + expr: ArgumentList = ArgumentList() + self.stack.append(expr) + + def exitExpressionlist(self, ctx:CPP14Parser.ExpressionlistContext): + # 当前结点是参数列表 + if isinstance(self.stack[-1], ArgumentList): + self.nesting.consolidateSubExpression(ctx) + + # 普通赋值语句 var = literal; + def enterNormalAssign(self, ctx:CPP14Parser.NormalAssignContext): + # 父节点是函数调用参数列表 + if isinstance(self.stack[-1], ArgumentList): + expr: Argument = Argument() + self.stack.append(expr) + + def exitNormalAssign(self, ctx:CPP14Parser.NormalAssignContext): + if isinstance(self.stack[-1], Argument): + self.nesting.consolidateSubExpression(ctx) + + # 列表赋值语句 var = { literal1, literal2, ... } + def enterArrayAssign(self, ctx:CPP14Parser.ArrayAssignContext): + initializerList: InitializerList = InitializerList() + self.stack.append(initializerList) + + def exitArrayAssign(self, ctx:CPP14Parser.ArrayAssignContext): + self.nesting.consolidateSubExpression(ctx) + + # 后缀表达式,x++, x-- + def enterIncDecOp(self, ctx:CPP14Parser.IncDecOpContext): + incDecOp: IncDecOp = IncDecOp() + self.stack.append(incDecOp) + + def exitIncDecOp(self, ctx:CPP14Parser.IncDecOpContext): + self.nesting.consolidateSubExpression(ctx) + + # 单目运算符, -1 + def enterUnaryexpression(self, ctx:CPP14Parser.UnaryexpressionContext): + unaryOp: UnaryOp = UnaryOp() + self.stack.append(unaryOp) + + def exitUnaryexpression(self, ctx:CPP14Parser.UnaryexpressionContext): + self.nesting.consolidateSubExpression(ctx) + + # 结构体属性访问 + def enterMemberAccess(self, ctx:CPP14Parser.MemberAccessContext): + expr: MemberAccess = MemberAccess() + self.stack.append(expr) + + def exitMemberAccess(self, ctx:CPP14Parser.MemberAccessContext): + self.nesting.consolidateSubExpression(ctx) + + def enterPtrMemberAccess(self, ctx:CPP14Parser.PtrMemberAccessContext): + expr: PtrMemberAccess = PtrMemberAccess() + self.stack.append(expr) + + def exitPtrMemberAccess(self, ctx:CPP14Parser.PtrMemberAccessContext): + self.nesting.consolidateSubExpression(ctx) + + # 数组访问 + def enterArrayIndexing(self, ctx:CPP14Parser.ArrayIndexingContext): + expr: ArrayIndexing = ArrayIndexing() + self.stack.append(expr) + + def exitArrayIndexing(self, ctx:CPP14Parser.ArrayIndexingContext): + self.nesting.consolidateSubExpression(ctx) + + def visitTerminal(self, node: TerminalNode): + parent: ASTNode = self.stack[-1] + node_impl: TerminalNodeImpl = node + # 当前终端结点属于变量定义语句一部分并且不属于C++模板定义 + if not self.pastTheTypeId and len(self.idType) > 0 and self.idType[-1] == varDecl: + # 普通的变量定义初始化 + if self.curType is None: + return + self.curType += node_impl.getText() + " " + return + if isinstance(parent, CastTarget): + parent.codeStr = parent.getEscapedCodeStr().strip() + " " + node_impl.getText() + return + + node_type: int = node_impl.getSymbol().type + # sizeof运算符 + if node_type == CPP14Parser.Sizeof: + op: Sizeof = Sizeof() + op.codeStr = node_impl.getText() + parent.addChild(op) + # 标识符 + elif node_type == CPP14Parser.Identifier: + expr: Identifier = Identifier() + expr.codeStr = node_impl.getText() + parent.addChild(expr) + # 如果当前Identifier在变量定义语句中 + if len(self.idType) > 0 and self.idType[-1] == declarator: + self.curVarNameId = expr + + # 字面值 + elif node_type in { CPP14Parser.Integerliteral, CPP14Parser.Userdefinedintegerliteral }: + integerExpression: IntergerExpression = IntergerExpression() + integerExpression.codeStr = node_impl.getText() + parent.addChild(integerExpression) + + elif node_type in { CPP14Parser.Characterliteral, CPP14Parser.Userdefinedcharacterliteral }: + charExpression: CharExpression = CharExpression() + charExpression.codeStr = node_impl.getText() + parent.addChild(charExpression) + + elif node_type in { CPP14Parser.Floatingliteral, CPP14Parser.Userdefinedfloatingliteral }: + doubleExpression: DoubleExpression = DoubleExpression() + doubleExpression.codeStr = node_impl.getText() + parent.addChild(doubleExpression) + + elif node_type in { CPP14Parser.Stringliteral, CPP14Parser.Userdefinedstringliteral }: + stringExpression: StringExpression = StringExpression() + stringExpression.codeStr = node_impl.getText() + parent.addChild(stringExpression) + + elif node_type in { CPP14Parser.TrueToken, CPP14Parser.FalseToken }: + boolExpression: BoolExpression = BoolExpression() + boolExpression.codeStr = node_impl.getText() + parent.addChild(boolExpression) + + elif node_type == CPP14Parser.Nullptr: + pointerExpression: PointerExpression = PointerExpression() + pointerExpression.codeStr = node_impl.getText() + parent.addChild(pointerExpression) + + # 单目运算符 &, *, +, -, ~, ! + elif node_type in { CPP14Parser.Star, CPP14Parser.And, CPP14Parser.Plus, + CPP14Parser.Minus, CPP14Parser.Tilde, CPP14Parser.Not }: + # 目前是单目运算 + if isinstance(parent, UnaryOp): + unaryOperator: UnaryOperator = UnaryOperator() + unaryOperator.operator = node_impl.getText() + parent.operator = node_impl.getText() + parent.addChild(unaryOperator) + + # ++x, --x, x++, x-- + elif node_type in { CPP14Parser.PlusPlus, CPP14Parser.MinusMinus }: + incDec: IncDec = IncDec() + incDec.operator = node_impl.getText() + # ++x / --x + if isinstance(parent, UnaryOp): + incDecOp: IncDecOp = IncDecOp() + incDecOp.isPost = False + incDecOp.addChild(incDec) + self.stack[-1] = incDecOp + + # x++ / x-- + elif isinstance(parent, IncDecOp): + parent.addChild(incDec) + +# 这个类用来解析函数返回基础类型 +class FunctionTypeBuilder(CPP14Listener): + def __init__(self): + self.type: str = "" + self.idType: List[str] = list() + + def enterOtherDecl(self, ctx:CPP14Parser.OtherDeclContext): + self.idType.append(varDecl) + + def exitOtherDecl(self, ctx:CPP14Parser.OtherDeclContext): + self.idType.pop() + + def visitTerminal(self, node:TerminalNode): + if len(self.idType) > 0 and self.idType[-1] == varDecl: + self.type += node.getText() + " " + +# 解析函数名以及函数参数列表 +class FunctionNameParamBuilder(CPP14Listener): + def __init__(self): + self.stack: List[ASTNode] = list() + self.stack.append(ParameterList()) + self.idType: List[str] = list() + + self.completeType: str = None + self.funcName: Identifier = None + + self.curParamType: str = None # 参数基础类型 + self.curParamCompleteType: str = None # 参数基础类型 + + def enterPtrDecl(self, ctx:CPP14Parser.PtrDeclContext): + # 当前属于函数返回类型 + if isinstance(self.stack[-1], ParameterList): + self.completeType += " *" + else: + self.curParamCompleteType += " *" + + def enterArrayDecl(self, ctx:CPP14Parser.ArrayDeclContext): + if isinstance(self.stack[-1], Parameter): + self.curParamCompleteType += " *" + + # 参数列表 + def enterParametersandqualifiers(self, ctx:CPP14Parser.ParametersandqualifiersContext): + if isinstance(self.stack[-1], ParameterList): + self.stack[-1].initializeFromContext(ctx) + + # 参数定义 + def enterParameterdeclaration(self, ctx:CPP14Parser.ParameterdeclarationContext): + self.curParamType = "" + parameter: Parameter = Parameter() + type: ParameterType = ParameterType() + parameter.setType(type) + parameter.initializeFromContext(ctx) + self.stack.append(parameter) + + def exitParameterdeclaration(self, ctx:CPP14Parser.ParameterdeclarationContext): + parameter: Parameter = self.stack.pop() + type = parameter.type + type.baseType = self.curParamType + type.completeType = self.curParamCompleteType + + parameterList: ParameterList = self.stack[-1] + parameterList.addParameter(parameter) + self.curParamType = None + self.curParamCompleteType = None + + def enterDeclarator(self, ctx:CPP14Parser.DeclaratorContext): + if isinstance(self.stack[-1], Parameter): + self.curParamType = self.curParamType.strip() + self.curParamCompleteType = self.curParamType + + def enterOtherDecl(self, ctx:CPP14Parser.OtherDeclContext): + self.idType.append(varDecl) + + def exitOtherDecl(self, ctx:CPP14Parser.OtherDeclContext): + self.idType.pop() + + # 函数名 + # 类静态变量 className::varName + def enterClassIdentifier(self, ctx:CPP14Parser.ClassIdentifierContext): + staticVariable: ClassStaticIdentifier = ClassStaticIdentifier() + self.stack.append(staticVariable) + + def exitQualifiedid(self, ctx:CPP14Parser.QualifiedidContext): + if isinstance(self.stack[-1], ClassStaticIdentifier): + staticVariable: ClassStaticIdentifier = self.stack.pop() + staticVariable.initializeFromContext(ctx) + + # 变量名 + if isinstance(self.stack[-1], ParameterList): + self.funcName = staticVariable + + + def visitTerminal(self, node:TerminalNode): + parent: ASTNode = self.stack[-1] + node_impl: TerminalNodeImpl = node + + # 当前终端结点属于变量定义语句一部分并且不属于C++模板定义 + if len(self.idType) > 0 and self.idType[-1] == varDecl: + # 普通的变量定义初始化 + self.curParamType += node_impl.getText() + " " + return + + node_type: int = node_impl.getSymbol().type + # 标识符 + if node_type == CPP14Parser.Identifier: + expr: Identifier = Identifier() + expr.codeStr = node_impl.getText() + # 函数名 + if isinstance(self.stack[-1], ParameterList): + self.funcName = expr + else: + parent.addChild(expr) + + # 字面值 + elif node_type in {CPP14Parser.Integerliteral, CPP14Parser.Userdefinedintegerliteral}: + integerExpression: IntergerExpression = IntergerExpression() + integerExpression.codeStr = node_impl.getText() + parent.addChild(integerExpression) + + elif node_type in {CPP14Parser.Characterliteral, CPP14Parser.Userdefinedcharacterliteral}: + charExpression: CharExpression = CharExpression() + charExpression.codeStr = node_impl.getText() + parent.addChild(charExpression) + + elif node_type in {CPP14Parser.Floatingliteral, CPP14Parser.Userdefinedfloatingliteral}: + doubleExpression: DoubleExpression = DoubleExpression() + doubleExpression.codeStr = node_impl.getText() + parent.addChild(doubleExpression) + + elif node_type in {CPP14Parser.Stringliteral, CPP14Parser.Userdefinedstringliteral}: + stringExpression: StringExpression = StringExpression() + stringExpression.codeStr = node_impl.getText() + parent.addChild(stringExpression) + + elif node_type in {CPP14Parser.TrueToken, CPP14Parser.FalseToken}: + boolExpression: BoolExpression = BoolExpression() + boolExpression.codeStr = node_impl.getText() + parent.addChild(boolExpression) + + elif node_type == CPP14Parser.Nullptr: + pointerExpression: PointerExpression = PointerExpression() + pointerExpression.codeStr = node_impl.getText() + parent.addChild(pointerExpression) + + +class FunctionDefBuilder(CPP14Listener): + def __init__(self): + self.functionDef: FunctionDef = None + self.walker: ParseTreeWalker = ParseTreeWalker() + + def enterFunctiondefinition(self, ctx:CPP14Parser.FunctiondefinitionContext): + self.functionDef = FunctionDef() + + # 解析返回值类型 + typeBuilder: FunctionTypeBuilder = FunctionTypeBuilder() + self.walker.walk(typeBuilder, ctx.declspecifierseq()) + returnType: ReturnType = ReturnType() + returnType.baseType = typeBuilder.type.strip() + # 设定函数返回类型 + self.functionDef.setReturnType(returnType) + + # 解析函数名和变量列表 + nameParamBuilder: FunctionNameParamBuilder = FunctionNameParamBuilder() + nameParamBuilder.completeType = typeBuilder.type.strip() + self.walker.walk(nameParamBuilder, ctx.declarator()) + + parameterType: ParameterType = ParameterType() + parameterType.baseType = nameParamBuilder.curParamType + parameterType.completeType = nameParamBuilder.curParamCompleteType + + # 函数名 + self.functionDef.setName(nameParamBuilder.funcName) + # 参数列表 + self.functionDef.setParameterList(nameParamBuilder.stack[-1]) + # 设置完整返回类型 + self.functionDef.returnType.completeType = nameParamBuilder.completeType + + # 解析函数名 + contentBuilder: FunctionContentBuilder = FunctionContentBuilder() + contentBuilder.stack.append(Statement()) + self.walker.walk(contentBuilder, ctx.functionbody()) + content: CompoundStatement = contentBuilder.stack[-1] + content.initializeFromContext(ctx.functionbody()) + self.functionDef.setContent(content) + + +class ClassDefBuilder(CPP14Listener): + def __init__(self): + self.inClassDecl: bool = False # 是否进入类定义作用域 + self.isClassName: bool = False # 是否可能为类名 + self.curClassName: Identifier = None + self.classDefStatement: ClassDefStatement = None + self.walker: ParseTreeWalker = ParseTreeWalker() + + def enterClassDecl(self, ctx:CPP14Parser.ClassDeclContext): + self.classDefStatement = ClassDefStatement() + self.inClassDecl = True + + def exitClassDecl(self, ctx:CPP14Parser.ClassDeclContext): + self.inClassDecl = False + + def enterClassname(self, ctx:CPP14Parser.ClassnameContext): + if self.inClassDecl: + self.isClassName = True + + def exitClassname(self, ctx:CPP14Parser.ClassnameContext): + if self.inClassDecl: + self.isClassName = False + + # 成员函数定义 + def enterMemberFuncDecl(self, ctx:CPP14Parser.MemberFuncDeclContext): + defBuilder: FunctionDefBuilder = FunctionDefBuilder() + tree: CPP14Parser.FunctiondefinitionContext = ctx.functiondefinition() + self.walker.walk(defBuilder, tree) + + functionDef: FunctionDef = defBuilder.functionDef + if isinstance(functionDef.name, ClassStaticIdentifier): + raise RuntimeError("Inner method declaration should not contain class name") + staticIdentifier: ClassStaticIdentifier = ClassStaticIdentifier() + staticIdentifier.className = self.curClassName + staticIdentifier.varName = functionDef.name + functionDef.replaceName(staticIdentifier) + self.classDefStatement.functionDefs.append(functionDef) + + def visitTerminal(self, node:TerminalNode): + if node.getSymbol().type == CPP14Parser.Identifier and self.isClassName: + identifier:Identifier = Identifier() + identifier.codeStr = node.getText() + self.curClassName = identifier + self.classDefStatement.name = identifier + + +# 解析一个c文件中包含的所有类/结构体定义和函数定义 +class FileBuilder(CPP14Listener): + def __init__(self): + self.classDefs: List[ClassDefStatement] = list() + self.functionDefs: List[FunctionDef] = list() + self.walker: ParseTreeWalker = ParseTreeWalker() + + def enterClassDecl(self, ctx:CPP14Parser.ClassDeclContext): + defBuilder: ClassDefBuilder = ClassDefBuilder() + self.walker.walk(defBuilder, ctx) + self.classDefs.append(defBuilder.classDefStatement) + + def enterFunctiondefinition(self, ctx:CPP14Parser.FunctiondefinitionContext): + if isinstance(ctx.parentCtx, CPP14Parser.MemberFuncDeclContext): + return + defBuilder: FunctionDefBuilder = FunctionDefBuilder() + self.walker.walk(defBuilder, ctx) + self.functionDefs.append(defBuilder.functionDef) + + +def astNodeToJson(astNode: ASTNode) -> Dict: + contents: list = list() + astEdges: list = list() + # 这里只引用了顶层结点的行号,需要其它的可以自行添加 + line: int = astNode.location.startLine + queue: List[tuple] = [(-1, astNode)] + idx = 0 + + while len(queue) > 0: + parentIdx, node = queue.pop(0) + childNumber: int = node.getChildCount() + contents.append([node.getTypeAsString(), node.getEscapedCodeStr()]) + if parentIdx != -1: + astEdges.append([parentIdx, idx]) + for i in range(childNumber): + childNode: ASTNode = node.getChild(i) + queue.append((idx, childNode)) + idx += 1 + + return { + "contents": contents, + "edges": astEdges, + "line": line + } + + + +def astToSerializedJson(astNode: ASTNode) -> Dict: + json_data: Dict = astNodeToJson(astNode) + return { + "contents": json.dumps(json_data["contents"]), + "edges": json.dumps(json_data["edges"]), + "line": json_data["line"] + } + +def unserializeNode(data: Dict) -> Dict: + return { + "contents": json.loads(data["contents"]), + "edges": json.loads(data["edges"]), + "line": data["line"] + } + + +def json2astNode(data: dict) -> ASTNode: + types = list(map(lambda content: content[0], data["contents"])) + tokenSeqs = list(map(lambda content: content[1], data["contents"])) + nodes: List[ASTNode] = [getInstanceFromTypeName(type) for type in types] + + for node, tokenSeq in zip(nodes, tokenSeqs): + node.codeStr = tokenSeq + location: CodeLocation = CodeLocation() + location.startLine = data["line"] + nodes[0].location = location + + for edge in data["edges"]: + nodes[edge[0]].addChild(nodes[edge[1]]) + + return nodes[0] + +def getInstanceFromTypeName(astType: str) -> ASTNode: + if astType == "ParameterType": + return ParameterType() + elif astType == "ReturnType": + return ReturnType() + elif astType == "Parameter": + return Parameter() + elif astType == "ParameterList": + return ParameterList() + elif astType == "FunctionDef": + return FunctionDef() + elif astType == "ClassDefStatement": + return ClassDefStatement() + + elif astType == "IdentifierDeclType": + return IdentifierDeclType() + elif astType == "IdentifierDecl": + return IdentifierDecl() + elif astType == "ForInit": + return ForInit() + elif astType == "ForRangeInit": + return ForRangeInit() + + elif astType == "BinaryExpression": + return BinaryExpression() + elif astType == "AdditiveExpression": + return AdditiveExpression() + elif astType == "AndExpression": + return AndExpression() + elif astType == "AssignmentExpr": + return AssignmentExpr() + elif astType == "BitAndExpression": + return BitAndExpression() + elif astType == "EqualityExpression": + return EqualityExpression() + elif astType == "ExclusiveOrExpression": + return ExclusiveOrExpression() + elif astType == "InclusiveOrExpression": + return InclusiveOrExpression() + elif astType == "MultiplicativeExpression": + return MultiplicativeExpression() + elif astType == "OrExpression": + return OrExpression() + elif astType == "RelationalExpression": + return RelationalExpression() + elif astType == "ShiftExpression": + return ShiftExpression() + + elif astType == "Expression": + return Expression() + elif astType == "Identifier": + return Identifier() + elif astType == "ClassStaticIdentifier": + return ClassStaticIdentifier() + elif astType == "ArrayIndexing": + return ArrayIndexing() + elif astType == "CastTarget": + return CastTarget() + elif astType == "CastExpression": + return CastExpression() + elif astType == "ConditionalExpression": + return ConditionalExpression() + elif astType == "IncDec": + return IncDec() + elif astType == "SizeofExpr": + return SizeofExpr() + elif astType == "Sizeof": + return Sizeof() + elif astType == "SizeofOperand": + return SizeofOperand() + elif astType == "UnaryOp": + return UnaryOp() + elif astType == "UnaryOperator": + return UnaryOperator() + + elif astType == "ExpressionHolder": + return ExpressionHolder() + elif astType == "Argument": + return Argument() + elif astType == "ArgumentList": + return ArgumentList() + elif astType == "Callee": + return Callee() + elif astType == "Condition": + return Condition() + elif astType == "InitializerList": + return InitializerList() + elif astType == "ThrowExpression": + return ThrowExpression() + + elif astType == "PostfixExpression": + return PostfixExpression() + elif astType == "IncDecOp": + return IncDecOp() + elif astType == "CallExpressionBase": + return CallExpressionBase() + elif astType == "CallExpression": + return CallExpression() + elif astType == "NewExpression": + return NewExpression() + elif astType == "DeleteExpression": + return DeleteExpression() + elif astType == "MemberAccess": + return MemberAccess() + elif astType == "PtrMemberAccess": + return PtrMemberAccess() + + elif astType == "PrimaryExpression": + return PrimaryExpression() + elif astType == "BoolExpression": + return BoolExpression() + elif astType == "CharExpression": + return CharExpression() + elif astType == "DoubleExpression": + return DoubleExpression() + elif astType == "IntergerExpression": + return IntergerExpression() + elif astType == "PointerExpression": + return PointerExpression() + elif astType == "StringExpression": + return StringExpression() + + elif astType == "JumpStatement": + return JumpStatement() + elif astType == "BreakStatement": + return BreakStatement() + elif astType == "ContinueStatement": + return ContinueStatement() + elif astType == "GotoStatement": + return GotoStatement() + elif astType == "ReturnStatement": + return ReturnStatement() + + elif astType == "Statement": + return Statement() + elif astType == "ExpressionHolderStatement": + return ExpressionHolderStatement() + elif astType == "IdentifierDeclStatement": + return IdentifierDeclStatement() + elif astType == "Label": + return Label() + elif astType == "ExpressionStatement": + return ExpressionStatement() + + else: + return ASTNode() diff --git a/mainTool/ast/declarations/__init__.py b/mainTool/ast/declarations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/ast/declarations/complexDecls.py b/mainTool/ast/declarations/complexDecls.py new file mode 100644 index 0000000..1792605 --- /dev/null +++ b/mainTool/ast/declarations/complexDecls.py @@ -0,0 +1,152 @@ +from mainTool.ast.statements.statements import * +from mainTool.ast.expressions.primaryExpressions import * +from mainTool.ast.expressions.expression import * + +from typing import List +from mainTool.utils.types import ClassType + +# 包括函数和类的定义 + +# 函数参数类型 +class ParameterType(ASTNode): + def __init__(self): + super(ParameterType, self).__init__() + self.baseType: str = None + self.completeType: str = None + + def getEscapedCodeStr(self) -> str: + if self.codeStr is not None: + return self.codeStr + return self.completeType + +# 函数返回类型 +class ReturnType(ASTNode): + def __init__(self): + super(ReturnType, self).__init__() + self.baseType: str = None + self.completeType: str = None + + def getEscapedCodeStr(self) -> str: + return self.completeType + +# 函数定义形参 +class Parameter(ASTNode): + def __init__(self): + super(Parameter, self).__init__() + self.type: ParameterType = None + self.name: Identifier = None + self.defaultValue: PrimaryExpression = None + + def setName(self, name: Identifier): + self.name = name + super().addChild(name) + + def setType(self, type: ParameterType): + self.type = type + super().addChild(type) + + def setDefaultValue(self, value: PrimaryExpression): + self.defaultValue = value + super().addChild(value) + + def addChild(self, node): + if isinstance(node, Identifier): + self.setName(node) + elif isinstance(node, ParameterType): + self.setType(node) + elif isinstance(node, PrimaryExpression): + self.setDefaultValue(node) + else: + super().addChild(node) + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + + +# 参数列表 +class ParameterList(ASTNode): + def __init__(self): + super(ParameterList, self).__init__() + self.parameters: List[Parameter] = list() + + def addParameter(self, param: Parameter): + self.parameters.append(param) + super().addChild(param) + + def addChild(self, node): + if isinstance(node, Parameter): + self.addParameter(node) + + # 将所有参数名加载到一个string里面 + def getEscapedCodeStr(self) -> str: + if self.codeStr is not None: + return self.codeStr + + if len(self.parameters) == 0: + self.codeStr = "" + return self.codeStr + + s = "" + for param in self.parameters: + s += param.getEscapedCodeStr() + " , " + + s = s.encode('utf-8')[:-3].decode('utf-8') + self.codeStr = s + return s + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + + +class FunctionDef(ASTNode): + def __init__(self): + super(FunctionDef, self).__init__() + self.name: Identifier = None # 函数名 + self.parameterList: ParameterList = None # 形参列表 + self.returnType: ReturnType = None # 返回类型 + self.content: CompoundStatement = None # 函数body + + def replaceName(self, name: Identifier): + i = self.children.index(self.name) + self.children[i] = name + self.name = name + + def setContent(self, functionContent: CompoundStatement): + self.content = functionContent + super().addChild(functionContent) + + def setParameterList(self, parameterList: ParameterList): + self.parameterList = parameterList + super().addChild(parameterList) + + def setName(self, name: Identifier): + self.name = name + super().addChild(name) + + def setReturnType(self, returnType: ReturnType): + self.returnType = returnType + super().addChild(returnType) + + def addChild(self, node): + if isinstance(node, CompoundStatement): + self.setContent(node) + elif isinstance(node, ParameterList): + self.setParameterList(node) + elif isinstance(node, ReturnType): + self.setReturnType(node) + elif isinstance(node, Identifier): + self.setName(node) + else: + super().addChild(node) + +class ClassDefStatement(Statement): + def __init__(self): + super(ClassDefStatement, self).__init__() + self.name: Identifier = None + self.functionDefs: List[FunctionDef] = list() + self.type: ClassType = None + + def addChild(self, node): + if isinstance(node, Identifier): + self.name = node + super().addChild(node) \ No newline at end of file diff --git a/mainTool/ast/declarations/simpleDecls.py b/mainTool/ast/declarations/simpleDecls.py new file mode 100644 index 0000000..adc8ab0 --- /dev/null +++ b/mainTool/ast/declarations/simpleDecls.py @@ -0,0 +1,98 @@ +from mainTool.ast.expressions.expression import Expression, Identifier +from mainTool.ast.astNode import ASTNode + +class IdentifierDeclType(ASTNode): + def __init__(self): + super(IdentifierDeclType, self).__init__() + self.baseType: str = None + self.completeType: str = None + + def getEscapedCodeStr(self) -> str: + if self.codeStr is not None: + return self.codeStr + return self.completeType + + +class IdentifierDecl(ASTNode): + def __init__(self): + super(IdentifierDecl, self).__init__() + self.type: IdentifierDeclType = None + self.name: Identifier = None + + def setName(self, name: Identifier): + self.name = name + super().addChild(name) + + def setType(self, type: IdentifierDeclType): + self.type = type + super().addChild(type) + + def addChild(self, node): + if isinstance(node, Identifier): + self.setName(node) + elif isinstance(node, IdentifierDeclType): + self.setType(node) + else: + super().addChild(node) + + def getEscapedCodeStr(self) -> str: + if self.codeStr is not None: + return self.codeStr + self.codeStr = ' '.join( [self.getChild(i).getEscapedCodeStr() for i in range(self.getChildCount())]) + + # def getChildCount(self) -> int: + # childCount: int = 0 + # if self.type is not None: + # childCount += 1 + # if self.name is not None: + # childCount += 1 + # return childCount + # + # def getChild(self, i: int): + # if i == 0: + # return self.type + # elif i == 1: + # return self.name + # else: + # return self.children[i - 1] + + +# for init 表达式 +class ForInit(Expression): + pass + +class ForRangeInit(IdentifierDecl): + def __init__(self): + super(ForRangeInit, self).__init__() + # 要遍历的数组表达式 + self.arrayExpr: Expression = None + + def setArrayExpr(self, arrayExpr: Expression): + self.arrayExpr = arrayExpr + arrayExpr.childNumber = self.getChildCount() + self.children.append(arrayExpr) + + def setType(self, type: IdentifierDeclType): + super().setType(type) + self.type.childNumber = 0 + self.name.childNumber = 1 + + def addChild(self, node): + # Type var1: var2 + if isinstance(node, Identifier): + # var1 + if self.name is None: + self.setName(node) + # var2 + else: + self.setArrayExpr(node) + + elif isinstance(node, Expression): + self.setArrayExpr(node) + + elif isinstance(node, IdentifierDeclType): + self.setType(node) + + def getEscapedCodeStr(self) -> str: + return self.type.getEscapedCodeStr() + " " + self.name.getEscapedCodeStr() + " : " + self.arrayExpr.getEscapedCodeStr() + diff --git a/mainTool/ast/expressions/__init__.py b/mainTool/ast/expressions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/ast/expressions/binaryExpressions.py b/mainTool/ast/expressions/binaryExpressions.py new file mode 100644 index 0000000..b21e0db --- /dev/null +++ b/mainTool/ast/expressions/binaryExpressions.py @@ -0,0 +1,97 @@ +from mainTool.ast.expressions.expression import Expression +from mainTool.ast import astNode +from antlr4.ParserRuleContext import ParserRuleContext +from typing import List + + +# 二元运算表达式 +class BinaryExpression(Expression): + def __init__(self): + super(Expression, self).__init__() + self.flag: bool = True + self.subExpressions: List[Expression] = [None, None] + + def getLeft(self) -> Expression: + return self.subExpressions[0] + + def getRight(self) -> Expression: + return self.subExpressions[1] + + def setLeft(self, left: Expression): + self.subExpressions[0] = left + + def setRight(self, right: Expression): + self.subExpressions[1] = right + + def addChild(self, item: astNode): + if not isinstance(item, Expression): + raise RuntimeError("Error: child of BinaryExpression should be Expression") + if self.getLeft() is None: + self.setLeft(item) + elif self.getRight() is None: + self.setRight(item) + else: + raise RuntimeError("Error: attempting to add third child to binary expression") + super().addChild(item) + + def getChildCount(self) -> int: + childCount: int = 0 + if self.getLeft() is not None: + childCount += 1 + if self.getRight() is not None: + childCount += 1 + return childCount + + def getChild(self, i: int): + return self.subExpressions[i] + + def initializeFromContext(self, ctx: ParserRuleContext): + super().initializeFromContext(ctx) + if ctx.getChildCount() == 3 and self.flag: + self.operator = ctx.getChild(1).getText() + + +# 加减运算,op 包括 +, -。2个AST子结点 +class AdditiveExpression(BinaryExpression): + pass + +# 与运算,op 包括 && +class AndExpression(BinaryExpression): + pass + +# 赋值运算,op 包括 =, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |= +# c语言中规定 赋值运算符的左边必须变量,不能是常量。 +class AssignmentExpr(BinaryExpression): + pass + +# 逻辑与运算,op 包括 & +class BitAndExpression(BinaryExpression): + pass + +# 等于判断,op 包括 ==, != +class EqualityExpression(BinaryExpression): + pass + +# 逻辑异或运算,op 包括 ^ +class ExclusiveOrExpression(BinaryExpression): + pass + +# 或运算,op 包括 || +class InclusiveOrExpression(BinaryExpression): + pass + +# 乘除模运算,op 包括 *, /, % +class MultiplicativeExpression(BinaryExpression): + pass + +# 或运算,op 包括 || +class OrExpression(BinaryExpression): + pass + +# 大于小于判断,op 包括 <, >, <=, >= +class RelationalExpression(BinaryExpression): + pass + +# 移位运算,op 包括 <<, >> +class ShiftExpression(BinaryExpression): + pass \ No newline at end of file diff --git a/mainTool/ast/expressions/expression.py b/mainTool/ast/expressions/expression.py new file mode 100644 index 0000000..5bd264a --- /dev/null +++ b/mainTool/ast/expressions/expression.py @@ -0,0 +1,146 @@ +from mainTool.ast.astNode import ASTNode +from mainTool.ast.walking.visitor import ASTNodeVisitor + +class Expression(ASTNode): + def __init__(self): + super(Expression, self).__init__() + self.operator: str = "" + + def replaceFirstChild(self, node: ASTNode): + self.children[0] = node + +# 定义的标识符,主要是变量名,类名,函数名等等 +class Identifier(Expression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + + def copy(self): + identifier: Identifier = Identifier() + identifier.codeStr = self.codeStr + identifier.location = self.location + return identifier + +# 类静态变量等等,比如int testClass::var = 1; +class ClassStaticIdentifier(Identifier): + def __init__(self): + super(ClassStaticIdentifier, self).__init__() + self.className: Identifier = None + self.varName: Identifier = None + + def addChild(self, node): + if isinstance(node, Identifier): + if self.className is None: + self.className = node + else: + self.varName = node + super().addChild(node) + + def copy(self): + classIdentifier: ClassStaticIdentifier = ClassStaticIdentifier() + className: Identifier = self.className.copy() + varName: Identifier = self.varName.copy() + classIdentifier.addChild(className) + classIdentifier.addChild(varName) + classIdentifier.location = self.location + return classIdentifier + + def getEscapedCodeStr(self) -> str: + return self.className.getEscapedCodeStr() + "::" + self.varName.getEscapedCodeStr() + +# 数组访问, Expression [ Expression ] +class ArrayIndexing(Expression): + def __init__(self): + super(ArrayIndexing, self).__init__() + self.array: Expression = None # 数组名,可以为变量名,或者函数调用等表达式 + self.index: Expression = None # 索引 + + def setArrayExpression(self, array: Expression): + self.array = array + super().addChild(array) + + def setIndexExpression(self, index: Expression): + self.index = index + super().addChild(index) + + def addChild(self, node): + if isinstance(node, Expression) and self.getChildCount() == 0: + self.setArrayExpression(node) + elif isinstance(node, Expression) and self.getChildCount() == 1: + self.setIndexExpression(node) + else: + super().addChild(node) + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + + +# 转换类型 +class CastTarget(Expression): + pass + +# 类型转换 +class CastExpression(Expression): + def __init__(self): + super(CastExpression, self).__init__() + self.castTarget: Expression = None + self.castExpression: Expression = None + + def getChildCount(self) -> int: + childCount: int = 0 + if self.castTarget is not None: + childCount += 1 + if self.castExpression is not None: + childCount += 1 + return childCount + + def getChild(self, i: int): + if i == 0: + return self.castTarget + return self.castExpression + + def setCastTarget(self, castTarget: Expression): + self.castTarget = castTarget + super().addChild(castTarget) + + def setCastExpression(self, castExpression: Expression): + self.castExpression = castExpression + super().addChild(castExpression) + + def addChild(self, node): + if self.castTarget is None: + self.setCastTarget(node) + else: + self.setCastExpression(node) + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# 三目表达式, cond ? expr1 : expr2 +class ConditionalExpression(Expression): + pass + +# ++ 或 -- 运算符 +class IncDec(Expression): + pass + +## sizeof表达式 +class SizeofExpr(Expression): + pass + +# sizeof运算符 +class Sizeof(Expression): + pass + +# sizeof运算数 +class SizeofOperand(Expression): + pass + +# 单目表达式,运算符包括 &, *, +, -, ~, !, 这里 ++x, --x种,++,--也算单目运算,不过我把它算到IncDecOp中了 +class UnaryOp(Expression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# 单目运算符,包括 &, *, +, -, ~, ! +class UnaryOperator(Expression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) \ No newline at end of file diff --git a/mainTool/ast/expressions/expressionHolders.py b/mainTool/ast/expressions/expressionHolders.py new file mode 100644 index 0000000..a595ab7 --- /dev/null +++ b/mainTool/ast/expressions/expressionHolders.py @@ -0,0 +1,60 @@ +from mainTool.ast.expressions.expression import Expression +from mainTool.ast import astNode +from mainTool.ast.walking.visitor import ASTNodeVisitor + + +class ExpressionHolder(Expression): + def getEscapedCodeStr(self) -> str: + if self.codeStr is not None: + return self.codeStr + + expr: Expression = self.getExpression() + if expr is None: + return "" + codeStr = expr.getEscapedCodeStr() + return codeStr + + def getExpression(self): + if self.getChildCount() > 0: + return self.getChild(0) + return None + + +# 函数调用参数,子类为Expression +# 如果在解析AST的时候精简掉Argument后面解析Use Def的时候不太好弄 +class Argument(ExpressionHolder): + pass + +# ArgumentList可以接任意个(包括0个) Argument,没有参数的话就是一个没有child的 ArgumentList +class ArgumentList(ExpressionHolder): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + + +# Callee 可能为 Identifier(直接使用函数名)或者MemberAccess、PtrMemberAccess(成员函数) +class Callee(ExpressionHolder): + pass + +# 条件判断 +class Condition(ExpressionHolder): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# 对应数组赋值 a = { a1, a2, a3 } 中的 a1, a2, a3,可能有嵌套 +class InitializerList(ExpressionHolder): + pass + +class ThrowExpression(ExpressionHolder): + def __init__(self): + super(ThrowExpression, self).__init__() + self.throwExpression = None + + def getThrowExpression(self): + return self.throwExpression + + def addChild(self, node: astNode): + if isinstance(node, Expression): + self.throwExpression = node + super().addChild(node) + + diff --git a/mainTool/ast/expressions/postfixExpressions.py b/mainTool/ast/expressions/postfixExpressions.py new file mode 100644 index 0000000..ed5c98b --- /dev/null +++ b/mainTool/ast/expressions/postfixExpressions.py @@ -0,0 +1,83 @@ +from mainTool.ast.expressions.expression import Expression, Identifier +from mainTool.ast.expressions.expressionHolders import ArgumentList +from mainTool.ast.walking.visitor import ASTNodeVisitor + + +class PostfixExpression(Expression): + pass + +# 对应 x++ 或者 x--, ++x, --x +class IncDecOp(PostfixExpression): + def __init__(self): + super(IncDecOp, self).__init__() + # isPost为true表示 ++/-- 在变量后面, x++, x--,反之为 ++x, --x + self.isPost = True + +class CallExpressionBase(PostfixExpression): + def __init__(self): + self.targetFunc: Expression = None + self.argumentList: ArgumentList = None + super(CallExpressionBase, self).__init__() + + def setTargetFunc(self, targetFunc: Expression): + self.targetFunc = targetFunc + super().addChild(targetFunc) + + def setArgumentList(self, argumentList: ArgumentList): + self.argumentList = argumentList + super().addChild(argumentList) + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +class CallExpression(CallExpressionBase): + def addChild(self, node): + if isinstance(node, Identifier): + self.setTargetFunc(node) + elif isinstance(node, ArgumentList): + self.setArgumentList(node) + else: + super().addChild(node) + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + + +class DeleteExpression(CallExpressionBase): + def __init__(self): + # delete掉的变量名 + self.target: Expression = None + super(DeleteExpression, self).__init__() + + def addChild(self, node): + if isinstance(node, Expression) and self.target is None: + self.target = node + super().addChild(node) + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + + +class NewExpression(CallExpressionBase): + def __init__(self): + # targetClass + self.targetClass: Identifier = None + super(NewExpression, self).__init__() + + def setTargetClass(self, targetClass: Identifier): + self.targetClass = targetClass + self.targetClass.codeStr = self.targetClass.codeStr.strip() + super().addChild(targetClass) + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# 成员变量访问,对应 a.f1 +class MemberAccess(PostfixExpression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# 指针类型成员变量访问,a->f1 +class PtrMemberAccess(PostfixExpression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) \ No newline at end of file diff --git a/mainTool/ast/expressions/primaryExpressions.py b/mainTool/ast/expressions/primaryExpressions.py new file mode 100644 index 0000000..1023838 --- /dev/null +++ b/mainTool/ast/expressions/primaryExpressions.py @@ -0,0 +1,37 @@ +from mainTool.ast.expressions.expression import Expression +from mainTool.ast.walking.visitor import ASTNodeVisitor + +# literals,常量部分 +class PrimaryExpression(Expression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# bool类型常量 +class BoolExpression(PrimaryExpression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# char类型常量 +class CharExpression(PrimaryExpression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# float, double类型常量 +class DoubleExpression(PrimaryExpression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# int, short, unsigned int, unsigned short, long, unsigned long类型常量 +class IntergerExpression(PrimaryExpression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# 指针类型常量只有2种,NULL和nullptr +class PointerExpression(PrimaryExpression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# 字符串类型常量 +class StringExpression(PrimaryExpression): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) \ No newline at end of file diff --git a/mainTool/ast/statements/__init__.py b/mainTool/ast/statements/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/ast/statements/blockStarters.py b/mainTool/ast/statements/blockStarters.py new file mode 100644 index 0000000..e91ef5e --- /dev/null +++ b/mainTool/ast/statements/blockStarters.py @@ -0,0 +1,119 @@ +from mainTool.ast.statements.statements import * +from mainTool.ast.declarations.simpleDecls import * +from mainTool.ast.expressions.expressionHolders import Condition +from mainTool.ast.walking.visitor import ASTNodeVisitor + +from typing import List + +class BlockStarter(Statement): + def __init__(self): + super(BlockStarter, self).__init__() + self.statement: Statement = None + self.condition: Condition = None + + def addChild(self, node): + if isinstance(node, Condition): + self.condition = node + elif isinstance(node, Statement): + self.statement = node + super().addChild(node) + +# else语句 +class ElseStatement(BlockStarter): + pass + +# if语句 +class IfStatement(BlockStarter): + def __init__(self): + super(IfStatement, self).__init__() + self.elseNode: ElseStatement = None + + def getChildCount(self) -> int: + childCount: int = super().getChildCount() + if self.elseNode is not None: + childCount += 1 + return childCount + + def getChild(self, i: int): + if i == 0: + return self.condition + elif i == 1: + return self.statement + elif i == 2: + return self.elseNode + raise RuntimeError("Invalid IfItem") + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# switch语句 +class SwitchStatement(BlockStarter): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# while语句 +class WhileStatement(BlockStarter): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# do-while +class DoStatement(BlockStarter): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# for语句 +class ForStatement(BlockStarter): + def __init__(self): + super(ForStatement, self).__init__() + self.forInitStatement: ForInit = None + self.expression: Expression = None + + def addChild(self, node): + if isinstance(node, ForInit): + self.forInitStatement = node + elif isinstance(node, Expression) and not isinstance(node, Condition): + self.expression = node + super().addChild(node) + + +class ForRangeStatement(BlockStarter): + def __init__(self): + super(ForRangeStatement, self).__init__() + self.forRangeInit: ForRangeInit = None + + def addChild(self, node): + if isinstance(node, ForRangeInit): + self.forRangeInit = node + super().addChild(node) + + +# Try-Catch +class CatchStatement(BlockStarter): + def __init__(self): + self.exceptionType: IdentifierDeclType = None + self.exceptionIdentifier: Identifier = None + super(CatchStatement, self).__init__() + + def setExceptionType(self, exceptionType: IdentifierDeclType): + self.exceptionType = exceptionType + super().addChild(exceptionType) + + def addChild(self, node): + if isinstance(node, Identifier): + self.exceptionIdentifier = node + super().addChild(node) + +# try下面包括一个tryBlock(CompoundStatement) 和 catchList +class TryStatement(BlockStarter): + def __init__(self): + super(TryStatement, self).__init__() + self.catchList: List[CatchStatement] = list() + + def addCatchStatement(self, catchStatement: CatchStatement): + self.catchList.append(catchStatement) + + def addChild(self, node): + if isinstance(node, CatchStatement): + self.addCatchStatement(node) + else: + super().addChild(node) \ No newline at end of file diff --git a/mainTool/ast/statements/jumps.py b/mainTool/ast/statements/jumps.py new file mode 100644 index 0000000..8302e09 --- /dev/null +++ b/mainTool/ast/statements/jumps.py @@ -0,0 +1,32 @@ +from mainTool.ast.statements.statements import Statement +from mainTool.ast.walking.visitor import ASTNodeVisitor + + +class JumpStatement(Statement): + pass + +# break; +class BreakStatement(JumpStatement): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# continue; +class ContinueStatement(JumpStatement): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# goto label; +class GotoStatement(JumpStatement): + def getTarget(self) -> str: + return self.getChild(0).getEscapedCodeStr() + + def getEscapedCodeStr(self) -> str: + return "goto " + self.getTarget() + ";" + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +# return expr; +class ReturnStatement(JumpStatement): + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) \ No newline at end of file diff --git a/mainTool/ast/statements/statements.py b/mainTool/ast/statements/statements.py new file mode 100644 index 0000000..61448f3 --- /dev/null +++ b/mainTool/ast/statements/statements.py @@ -0,0 +1,70 @@ +from mainTool.ast.astNode import ASTNode +from mainTool.ast.expressions.expression import Expression +from mainTool.ast.walking.visitor import ASTNodeVisitor +from mainTool.utils.types import LabelType + +from antlr4 import ParserRuleContext + +class Statement(ASTNode): + pass + +# CompoundStatement = { + blockStatements + } +class CompoundStatement(Statement): + def __init__(self): + super(CompoundStatement, self).__init__() + + def getStatements(self) -> list: + return self.children + + def addStatement(self, stmt: ASTNode): + super().addChild(stmt) + + def getEscapedCodeStr(self) -> str: + return "" + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +class ExpressionHolderStatement(Statement): + def getEscapedCodeStr(self) -> str: + expr: Expression = self.getExpression() + if expr is None: + return "" + return expr.getEscapedCodeStr() + + def getExpression(self): + if self.getChildCount() == 0: + return None + return self.getChild(0) + +# 表达式语句, expr + ; +class ExpressionStatement(ExpressionHolderStatement): + def getEscapedCodeStr(self) -> str: + expr: Expression = self.getExpression() + if expr is None: + self.codeStr = ";" + else: + self.codeStr = expr.getEscapedCodeStr() + " ;" + return self.codeStr + +# 变量定义语句,每个child对应1个IdentifierDecl +class IdentifierDeclStatement(Statement): + def __init__(self): + super(IdentifierDeclStatement, self).__init__() + self.typeNameContext: ParserRuleContext = None + + def accept(self, visitor: ASTNodeVisitor): + visitor.visit(self) + +class Label(Statement): + # goto语句一般为NormalLabel, Case语句为Case,Default为default + def __init__(self): + super(Label, self).__init__() + self.type: LabelType = None + self.cond: Expression = None + + def addChild(self, node): + if isinstance(node, Expression): + self.cond = node + super().addChild(node) + diff --git a/mainTool/ast/walking/__init__.py b/mainTool/ast/walking/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/ast/walking/visitor.py b/mainTool/ast/walking/visitor.py new file mode 100644 index 0000000..2d54bcc --- /dev/null +++ b/mainTool/ast/walking/visitor.py @@ -0,0 +1,12 @@ +# from ast.ASTNode import ASTNode + + +class ASTNodeVisitor(object): + def visitChildren(self, item): + nChildren: int = item.getChildCount() + for i in range(nChildren): + child = item.getChild(i) + child.accept(self) + + def visit(self, item): + self.visitChildren(item) \ No newline at end of file diff --git a/mainTool/cdg/CDG.py b/mainTool/cdg/CDG.py new file mode 100644 index 0000000..c13114c --- /dev/null +++ b/mainTool/cdg/CDG.py @@ -0,0 +1,69 @@ +from mainTool.cdg.DominatorTree import * + +# 控制依赖边,连接CFG结点 +class CDGEdge(Edge[CFGNode]): + def __init__(self, source: CFGNode, destination: CFGNode): + super(CDGEdge, self).__init__(source, destination) + + def getProperties(self) -> Dict[str, object]: + return None + + def __str__(self): + return str(self.source) + " ==[]==> " + str(self.destination) + + +# 逆向控制流图 +class ReverseCFG(AbstractTwoWayGraph[CFGNode]): + def __init__(self): + super(ReverseCFG, self).__init__() + self.entry: CFGNode = None + self.exit: CFGNode = None + + @staticmethod + def newInstance(cfg: CFG): + reverseCFG: ReverseCFG = ReverseCFG() + for vertex in cfg.vertices: + reverseCFG.addVertex(vertex) + + for edge in cfg.getEdges(): + reverseEdge: CFGEdge = CFGEdge(edge.destination, edge.source, edge.label) + reverseCFG.addEdge(reverseEdge) + reverseCFG.entry = cfg.exit + reverseCFG.exit = cfg.entry + + augmentedEdge: CFGEdge = CFGEdge(reverseCFG.entry, reverseCFG.exit, CFGEdgeType.EMPTY_LABEL) + reverseCFG.addEdge(augmentedEdge) + return reverseCFG + +# 控制依赖图定义 +class CDG(AbstractGraph[CFGNode]): + def __init__(self): + super(CDG, self).__init__() + self.dominatorTree: DominatorTree[CFGNode] = None + + # 根据支配树建立控制依赖图 + @staticmethod + def newInstance(dominatorTree: DominatorTree[CFGNode]): + cdg: CDG = CDG() + cdg.dominatorTree = dominatorTree + for vertex in dominatorTree.getVertices(): + frontier: Set[CFGNode] = dominatorTree.dominanceFrontier(vertex) + if frontier is not None: + cdg.addVertex(vertex) + for f in frontier: + # 跳过entry和自我依赖的情况 + if f == vertex or str(f) == "[ENTRY]": + continue + cdg.addVertex(f) + cdg.addEdge(CDGEdge(f, vertex)) + return cdg + + +def createCDG(cfg: CFG) -> CDG: + # 建立逆向CFG + reverseCFG: ReverseCFG = ReverseCFG.newInstance(cfg) + # 根据逆向CFG构建支配树 + dominatorTreeCreator: DominatorTreeCreator[CFGNode] = DominatorTreeCreator[CFGNode](reverseCFG, reverseCFG.entry) + dominatorTree: DominatorTree[CFGNode] = dominatorTreeCreator.create() + # 基于支配树创建CDG + return CDG.newInstance(dominatorTree) \ No newline at end of file diff --git a/mainTool/cdg/DominatorTree.py b/mainTool/cdg/DominatorTree.py new file mode 100644 index 0000000..bb2bbab --- /dev/null +++ b/mainTool/cdg/DominatorTree.py @@ -0,0 +1,140 @@ +from mainTool.cfg.CFG import * +from typing import Set + +# 支配树 +class DominatorTree(Generic[T]): + def __init__(self): + self.dominators: Dict[T, T] = dict() # key -> value 表示 value 支配 key + self.dominanceFrontiers: Dict[T, Set[T]] = dict() # 前向支配 + self.postorderEnumeration: Dict[T, int] = dict() # 结点访问顺序 + + def getVertices(self) -> List[T]: + return list(self.dominators.keys()) + + def getDominator(self, vertex: T) -> T: + return self.dominators.get(vertex) + + def dominanceFrontier(self, vertex: T) -> Set[T]: + return self.dominanceFrontiers.get(vertex, None) + + def hasDominator(self, vertex: T) -> bool: + return self.dominators.get(vertex, None) is not None + + def contains(self, vertex: T) -> bool: + return vertex in self.dominators.keys() + + # 往支配树中添加结点 + def addVertex(self, vertex: T): + if not self.contains(vertex): + self.dominators[vertex] = None + return True + return False + + def setDominator(self, vertex: T, dominator: T) -> bool: + changed: bool = False + if self.contains(vertex): + currentDominator: T = self.dominators.get(vertex) + if currentDominator is None and dominator is not None: + self.dominators[vertex] = dominator + changed = True + elif not currentDominator == dominator: + self.dominators[vertex] = dominator + changed = True + else: + changed = False + return changed + + def commonDominator(self, vertex1: T, vertex2: T) -> T: + finger1: T = vertex1 + finger2: T = vertex2 + while not finger1 == finger2: + while self.postorderEnumeration.get(finger1) < self.postorderEnumeration.get(finger2): + finger1 = self.getDominator(finger1) + while self.postorderEnumeration.get(finger2) < self.postorderEnumeration.get(finger1): + finger2 = self.getDominator(finger2) + + return finger1 + + def commonDominatorList(self, vertices: List[T]) -> T: + stack: List[T] = list() + for vertex in vertices: + if self.hasDominator(vertex): + stack.append(vertex) + + if len(stack) == 0: + return None + while len(stack) > 1: + stack.append(self.commonDominator(stack.pop(), stack.pop())) + return stack.pop() + + +class DominatorTreeCreator(Generic[T]): + def __init__(self, graph: AbstractTwoWayGraph[T], startNode: T): + self.graph: AbstractTwoWayGraph[T] = graph # 逆向CFG + self.startNode: T = startNode # 一般是逆向CFG EntryNode + self.dominatorTree: DominatorTree[T] = DominatorTree[T]() + self.orderedVertices: List[T] = list() # 存储逆向CFG结点访问顺序 + + # 获取逆向CFG结点访问顺序 + def enumerateVertices(self): + counter: int = 0 + iterator: PostorderIterator[T] = PostorderIterator[T](self.graph, self.startNode) + + while iterator.hasNext(): + vertex: T = iterator.__next__() + self.orderedVertices.append(vertex) + self.dominatorTree.postorderEnumeration[vertex] = counter + counter += 1 + + if len(self.orderedVertices) < len(self.graph.vertices): + print("warning: incomplete control flow graph") + + # 初始化支配树 + def initializeDominatorTree(self): + self.dominatorTree.addVertex(self.startNode) + self.dominatorTree.setDominator(self.startNode, self.startNode) + + def buildDominatorTree(self): + changed: bool = True + while changed: + changed = False + # orderedVertices存储结点访问顺序 + reverseVertexIterator = list(reversed(self.orderedVertices)) + cur = 1 + while cur < len(reverseVertexIterator): + currentNode: T = reverseVertexIterator[cur] + cur += 1 + lis: List[T] = list() + for edge in self.graph.inNeighborhood.get(currentNode, []): + lis.append(edge.source) + newIdom: T = self.dominatorTree.commonDominatorList(lis) + self.dominatorTree.addVertex(currentNode) + if self.dominatorTree.setDominator(currentNode, newIdom): + changed = True + + + def determineDominanceFrontiers(self): + for currentNode in self.orderedVertices: # 后序遍历逆向CFG + if self.graph.inDegree(currentNode) > 1: + for edge in self.graph.inNeighborhood.get(currentNode, []): + predecessor: T = edge.source + if not predecessor in self.orderedVertices: + continue + # runnner序号大于currentNode + runner = predecessor + while not runner == self.dominatorTree.getDominator(currentNode): # value支配于key + if runner not in self.dominatorTree.dominanceFrontiers.keys(): + self.dominatorTree.dominanceFrontiers[runner] = set() + self.dominatorTree.dominanceFrontiers[runner].add(currentNode) + runner = self.dominatorTree.getDominator(runner) + + def create(self): + # 获取逆向CFG结点访问顺序 + self.enumerateVertices() + # 初始化 + self.initializeDominatorTree() + # 构建支配树 + self.buildDominatorTree() + # 控制依赖边计算 + self.determineDominanceFrontiers() + return self.dominatorTree \ No newline at end of file diff --git a/mainTool/cdg/__init__.py b/mainTool/cdg/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/cfg/CCFG.py b/mainTool/cfg/CCFG.py new file mode 100644 index 0000000..5b40b87 --- /dev/null +++ b/mainTool/cfg/CCFG.py @@ -0,0 +1,420 @@ +from mainTool.cfg.CFG import * +from mainTool.utils.types import * + +from mainTool.ast.declarations.complexDecls import * +from mainTool.ast.statements.blockStarters import * +from mainTool.ast.statements.jumps import * +from mainTool.ast.statements.statements import * +from mainTool.ast.expressions.expressionHolders import * +from mainTool.ast.expressions.binaryExpressions import * + + +# CPP CFG + +class CCFG(CFG): + def __init__(self): + super(CCFG, self).__init__() + self.breakStatements: List[CFGNode] = list() + self.continueStatements: List[CFGNode] = list() + self.returnStatements: List[CFGNode] = list() + self.gotoStatements: Dict[CFGNode, str] = dict() + self.labels: Dict[str, CFGNode] = dict() + + # 记录label(goto用到)对应的CFG结点 + def getBlockByLabel(self, label: str) -> CFGNode: + block: CFGNode = self.labels.get(label, None) + if block is None: + print(f"warning : can not find block for label {label}") + return self.getErrorNode() + return block + + def addCFG(self, otherCFG): + super().addCFG(otherCFG) + # 在之前的基础上合并jump语句。 + self.parameters.extend(otherCFG.parameters) + self.breakStatements.extend(otherCFG.breakStatements) + self.continueStatements.extend(otherCFG.continueStatements) + self.returnStatements.extend(otherCFG.returnStatements) + self.gotoStatements.update(otherCFG.gotoStatements) + self.labels.update(otherCFG.labels) + + +class StructuredFlowVisitor(ASTNodeVisitor): + def __init__(self): + self.returnCFG = None + + def visit(self, item): + if isinstance(item, ParameterList): + self.returnCFG = CCFGFactory.newParamListInstance(item) + elif isinstance(item, Parameter): + self.returnCFG = CCFGFactory.newNodesInstance([item]) + for node in self.returnCFG.vertices: + if not isinstance(node, ASTNodeContainer): + continue + self.returnCFG.parameters.append(node) + + elif isinstance(item, CompoundStatement): + self.returnCFG = CCFGFactory.newCompoundInstance(item) + + elif isinstance(item, ReturnStatement): + self.returnCFG = CCFGFactory.newReturnInstance(item) + elif isinstance(item, GotoStatement): + self.returnCFG = CCFGFactory.newGotoInstance(item) + elif isinstance(item, BreakStatement): + self.returnCFG = CCFGFactory.newBreakInstance(item) + elif isinstance(item, ContinueStatement): + self.returnCFG = CCFGFactory.newContinueInstance(item) + elif isinstance(item, Label): + self.returnCFG = CCFGFactory.newLabelInstance(item) + + elif isinstance(item, IfStatement): + self.returnCFG = CCFGFactory.newIfInstance(item) + elif isinstance(item, SwitchStatement): + self.returnCFG = CCFGFactory.newSwitchInstance(item) + elif isinstance(item, WhileStatement): + self.returnCFG = CCFGFactory.newWhileInstance(item) + elif isinstance(item, DoStatement): + self.returnCFG = CCFGFactory.newDoInstance(item) + elif isinstance(item, ForStatement): + self.returnCFG = CCFGFactory.newForInstance(item) + elif isinstance(item, ForRangeStatement): + self.returnCFG = CCFGFactory.newForRangeInstance(item) + elif isinstance(item, TryStatement): + self.returnCFG = CCFGFactory.newTryInstance(item) + + elif isinstance(item, ASTNode): + self.returnCFG = CCFGFactory.newNodesInstance([item]) + + + +class CCFGFactory(CFGFactory): + structuredFlowVisitior: StructuredFlowVisitor = StructuredFlowVisitor() + # 递归遍历AST生成CFG + @staticmethod + def convert(node: ASTNode) -> CCFG: + if node is not None: + node.accept(CCFGFactory.structuredFlowVisitior) + cfg: CCFG = CCFGFactory.structuredFlowVisitior.returnCFG + else: + cfg: CCFG = CCFGFactory.newNodesInstance([]) + return cfg + + @staticmethod + def newInstance(functionDefinition: FunctionDef) -> CFG: + function: CCFG = CCFGFactory.newNodesInstance([]) + function.name = functionDefinition.name.getEscapedCodeStr() + # 求解parameterBlock对应的cfg + parameterBlock: CCFG = CCFGFactory.convert(functionDefinition.parameterList) + # 求解functionBody对应的cfg + functionBody: CCFG = CCFGFactory.convert(functionDefinition.content) + parameterBlock.appendCFG(functionBody) + function.appendCFG(parameterBlock) + + # 语句中还存在goto和return语句 + CCFGFactory.fixGotoStatements(function) + CCFGFactory.fixReturnStatements(function) + + if len(function.breakStatements) > 0: + raise RuntimeError("error: unresolved break statement") + + if len(function.continueStatements) > 0: + raise RuntimeError("error: unresolved continue statement") + + return function + + + # 函数形参列表 + @staticmethod + def newParamListInstance(paramList: ParameterList) -> CFG: + parameterListBlock: CFG = CCFGFactory.newNodesInstance([]) + for parameter in paramList.parameters: + parameterListBlock.appendCFG(CCFGFactory.convert(parameter)) + return parameterListBlock + + + @staticmethod + def newBreakInstance(breakStatement: BreakStatement) -> CFG: + breakBlock: CCFG = CCFG() + breakContainer: CFGNode = ASTNodeContainer(breakStatement) + breakBlock.addVertex(breakContainer) + breakBlock.addCFGEdge(breakBlock.entry, breakContainer) + breakBlock.addCFGEdge(breakContainer, breakBlock.exit) + breakBlock.breakStatements.append(breakContainer) + return breakBlock + + @staticmethod + def newContinueInstance(continueStatement: ContinueStatement) -> CFG: + continueBlock: CCFG = CCFG() + continueContainer: CFGNode = ASTNodeContainer(continueStatement) + continueBlock.addVertex(continueContainer) + continueBlock.addCFGEdge(continueBlock.entry, continueContainer) + continueBlock.addCFGEdge(continueContainer, continueBlock.exit) + continueBlock.continueStatements.append(continueContainer) + return continueBlock + + + @staticmethod + def newReturnInstance(returnStatement: ReturnStatement) -> CFG: + returnBlock: CCFG = CCFG() + returnContainer: CFGNode = ASTNodeContainer(returnStatement) + returnBlock.addVertex(returnContainer) + returnBlock.addCFGEdge(returnBlock.entry, returnContainer) + returnBlock.addCFGEdge(returnContainer, returnBlock.exit) + returnBlock.returnStatements.append(returnContainer) + return returnBlock + + + @staticmethod + def newGotoInstance(gotoStatement: GotoStatement) -> CFG: + gotoBlock: CCFG = CCFG() + gotoContainer: CFGNode = ASTNodeContainer(gotoStatement) + gotoBlock.addVertex(gotoContainer) + gotoBlock.addCFGEdge(gotoBlock.entry, gotoContainer) + gotoBlock.addCFGEdge(gotoContainer, gotoBlock.exit) + gotoBlock.gotoStatements[gotoContainer] = gotoStatement.getTarget() + return gotoBlock + + + @staticmethod + def newLabelInstance(labelStatement: Label) -> CFG: + continueBlock: CCFG = CCFG() + labelContainer: CFGNode = ASTNodeContainer(labelStatement) + continueBlock.addVertex(labelContainer) + continueBlock.addCFGEdge(continueBlock.entry, labelContainer) + continueBlock.addCFGEdge(labelContainer, continueBlock.exit) + label = labelStatement.getEscapedCodeStr() + label = label.encode('utf-8')[:-2].decode('utf-8') + continueBlock.labels[label] = labelContainer + return continueBlock + + + # 空语句 + @staticmethod + def newNodesInstance(nodes: List[ASTNode]) -> CFG: + block: CCFG = CCFG() + last: CFGNode = block.entry + for node in nodes: + container: CFGNode = ASTNodeContainer(node) + block.addVertex(container) + block.addCFGEdge(last, container) + last = container + block.addCFGEdge(last, block.exit) + return block + + # 求解IfStatement对应的CFG + @staticmethod + def newIfInstance(ifStatement: IfStatement) -> CFG: + block: CCFG = CCFG() + # 先处理condition + conditionContainer: CFGNode = ASTNodeContainer(ifStatement.condition) + block.addVertex(conditionContainer) + block.addCFGEdge(block.entry, conditionContainer) + + # 再处理block + ifBlock: CFG = CCFGFactory.convert(ifStatement.statement) + block.mountCFG(conditionContainer, block.exit, ifBlock, CFGEdgeType.TRUE_LABEL) + + # 如果还有else那就处理else + if ifStatement.elseNode is not None: + elseBlock: CFG = CCFGFactory.convert(ifStatement.elseNode.statement) + block.mountCFG(conditionContainer, block.exit, elseBlock, CFGEdgeType.FALSE_LABEL) + else: + block.addCFGEdge(conditionContainer, block.exit, CFGEdgeType.FALSE_LABEL) + + return block + + # switch语句 + @staticmethod + def newSwitchInstance(switchStatement: SwitchStatement) -> CFG: + switchBlock: CCFG = CCFG() + # 处理condition + conditionContainer: CFGNode = ASTNodeContainer(switchStatement.condition) + switchBlock.addVertex(conditionContainer) + switchBlock.addCFGEdge(switchBlock.entry, conditionContainer) + + switchBody: CCFG = CCFGFactory.convert(switchStatement.statement) + switchBlock.addCFG(switchBody) + defaultLabel: bool = False + + # 获取每个case: xxx + for key, value in switchBody.labels.items(): + # 如果内容是default + if key == "default": + defaultLabel = True + switchBlock.addCFGEdge(conditionContainer, value, key) + + for edge in switchBody.inNeighborhood.get(switchBody.exit, []): + switchBlock.addCFGEdge(edge.source, switchBlock.exit) + # 不存在defalut标签的话,添加一条condition到switch结尾的CFG边 + if not defaultLabel: + switchBlock.addCFGEdge(conditionContainer, switchBlock.exit) + + # switch中break直接与switch end相连 + CCFGFactory.fixBreakStatements(switchBlock, switchBlock.exit) + return switchBlock + + + # 处理while语句 + @staticmethod + def newWhileInstance(whileStatement: WhileStatement) -> CFG: + whileBlock: CCFG = CCFG() + # 首先处理while condition + conditionContainer: CFGNode = ASTNodeContainer(whileStatement.condition) + whileBlock.addVertex(conditionContainer) + whileBlock.addCFGEdge(whileBlock.entry, conditionContainer) + # while对应的循环主体 + whileBody: CFG = CCFGFactory.convert(whileStatement.statement) + whileBlock.mountCFG(conditionContainer, conditionContainer, whileBody, CFGEdgeType.TRUE_LABEL) + whileBlock.addCFGEdge(conditionContainer, whileBlock.exit, CFGEdgeType.FALSE_LABEL) + + # 考虑break连接到exit + CCFGFactory.fixBreakStatements(whileBlock, whileBlock.exit) + # continue连接到condition + CCFGFactory.fixContinueStatements(whileBlock, conditionContainer) + return whileBlock + + @staticmethod + def newDoInstance(doStatement: DoStatement) -> CFG: + doBlock: CCFG = CCFG() + # do-while condition + conditionContainer: CFGNode = ASTNodeContainer(doStatement.condition) + doBlock.addVertex(conditionContainer) + doBlock.addCFGEdge(conditionContainer, doBlock.exit, CFGEdgeType.FALSE_LABEL) + # do-while body + doBody: CFG = CCFGFactory.convert(doStatement.statement) + doBlock.mountCFG(doBlock.entry, conditionContainer, doBody, CFGEdgeType.EMPTY_LABEL) + + for edge in doBody.outNeighborhood.get(doBody.entry, []): + doBlock.addCFGEdge(conditionContainer, edge.destination, CFGEdgeType.TRUE_LABEL) + # 该层循环中的所有break直接连接到循环exit + CCFGFactory.fixBreakStatements(doBlock, doBlock.exit) + # continue直接连接到condition + CCFGFactory.fixContinueStatements(doBlock, conditionContainer) + return doBlock + + # 处理for循环,与while相比,for的CFG会先执行forInit,然后condition和(ForBody + expression)组成循环 + @staticmethod + def newForInstance(forStatement: ForStatement) -> CFG: + forBlock: CCFG = CCFG() + # 处理forInit,forCondition和表达式 + initialization: ASTNode = forStatement.forInitStatement + condition: ASTNode = forStatement.condition + expression: ASTNode = forStatement.expression + + # forBody + forBody: CFG = CCFGFactory.convert(forStatement.statement) + if condition is not None: + conditionContainer = ASTNodeContainer(condition) + else: # 没条件的话该for循环不会终止 + conditionContainer = InfiniteForNode() + + forBlock.addVertex(conditionContainer) + # condition连接到ExitNode的false边 + forBlock.addCFGEdge(conditionContainer, forBlock.exit, CFGEdgeType.FALSE_LABEL) + + if initialization is not None: + # initialization不为null的话,将initializationContainer插入到Entry和condition之间 + initializationContainer: CFGNode = ASTNodeContainer(initialization) + forBlock.addVertex(initializationContainer) + forBlock.addCFGEdge(forBlock.entry, initializationContainer) + forBlock.addCFGEdge(initializationContainer, conditionContainer) + else: + # 否则Entry直接连接到condition + forBlock.addCFGEdge(forBlock.entry, conditionContainer) + + if expression is not None: + # expression不为null的话 + expressionContainer: CFGNode = ASTNodeContainer(expression) + forBlock.addVertex(expressionContainer) + forBlock.addCFGEdge(expressionContainer, conditionContainer) + forBlock.mountCFG(conditionContainer, expressionContainer, forBody, CFGEdgeType.TRUE_LABEL) + else: + forBlock.mountCFG(conditionContainer, conditionContainer, forBody, CFGEdgeType.TRUE_LABEL) + + # break直接连接到exit + CCFGFactory.fixBreakStatements(forBlock, forBlock.exit) + # continue连接到condition + CCFGFactory.fixContinueStatements(forBlock, conditionContainer) + return forBlock + + + @staticmethod + def newForRangeInstance(forRangeStatement: ForRangeStatement) -> CFG: + forBlock: CCFG = CCFG() + # 处理forRangeInit,forCondition和表达式 + forRangeInit: ASTNode = forRangeStatement.forRangeInit + # forBody + forBody: CFG = CCFGFactory.convert(forRangeStatement.statement) + conditionContainer: CFGNode = InfiniteForNode() + forBlock.addVertex(conditionContainer) + + # Entry到InfiniteFor + forBlock.addCFGEdge(forBlock.entry, conditionContainer) + # condition连接到ExitNode的false边 + forBlock.addCFGEdge(conditionContainer, forBlock.exit, CFGEdgeType.FALSE_LABEL) + initializationContainer: CFGNode = ASTNodeContainer(forRangeInit) + forBlock.addVertex(initializationContainer) + + # condition -> for range init + forBlock.addCFGEdge(conditionContainer, initializationContainer, CFGEdgeType.TRUE_LABEL) + # init -> forBody -> condition + forBlock.mountCFG(initializationContainer, conditionContainer, forBody, CFGEdgeType.EMPTY_LABEL) + # break直接连接到exit + CCFGFactory.fixBreakStatements(forBlock, forBlock.exit) + # continue连接到condition + CCFGFactory.fixContinueStatements(forBlock, conditionContainer) + return forBlock + + + @staticmethod + def newTryInstance(tryStatement: TryStatement): + return CCFGFactory.newCompoundInstance(tryStatement.statement) + + @staticmethod + def newCompoundInstance(content: CompoundStatement) -> CFG: + compoundBlock: CFG = CCFGFactory.newNodesInstance([]) + for statement in content.getStatements(): + compoundBlock.appendCFG(CCFGFactory.convert(statement)) + return compoundBlock + + + # jump类语句处理,添加CFG边 + @staticmethod + def fixBreakStatements(thisCFG: CCFG, target: CFGNode): + for breakStatement in thisCFG.breakStatements: + # fix之前break语句与后面的CFG结点有CFG边相连,现在全部删除 + thisCFG.removeEdgesFrom(breakStatement) + # break语句无条件跳转到target + thisCFG.addCFGEdge(breakStatement, target) + thisCFG.breakStatements.clear() + + @staticmethod + def fixContinueStatements(thisCFG: CCFG, target: CFGNode): + for continueStatement in thisCFG.continueStatements: + # 删除与continue语句直接相连的边 + thisCFG.removeEdgesFrom(continueStatement) + # target为continue跳转到的结点 + thisCFG.addCFGEdge(continueStatement, target) + thisCFG.continueStatements.clear() + + @staticmethod + def fixReturnStatements(thisCFG: CCFG): + for returnStatement in thisCFG.returnStatements: + # 删除return相连的边 + thisCFG.removeEdgesFrom(returnStatement) + # return连接到exit + thisCFG.addCFGEdge(returnStatement, thisCFG.exit) + thisCFG.returnStatements.clear() + + @staticmethod + def fixGotoStatements(thisCFG: CCFG): + for gotoStatement, label in thisCFG.gotoStatements.items(): + # 删除与goto语句相连的CFG边 + thisCFG.removeEdgesFrom(gotoStatement) + # 添加CFG边到block结点跳转的边 + thisCFG.addCFGEdge(gotoStatement, thisCFG.getBlockByLabel(label)) + thisCFG.gotoStatements.clear() + + +def ASTToCFGConvert(node: FunctionDef) -> CFG: + return CCFGFactory.newInstance(node) \ No newline at end of file diff --git a/mainTool/cfg/CFG.py b/mainTool/cfg/CFG.py new file mode 100644 index 0000000..70b2ab9 --- /dev/null +++ b/mainTool/cfg/CFG.py @@ -0,0 +1,115 @@ +from mainTool.cfg.nodes import * +from mainTool.utils.types import CFGEdgeType +from mainTool.ast.declarations.complexDecls import FunctionDef + +from mainTool.utils.graphUtils import * + +class CFGEdge(Edge[CFGNode]): + # CFG Edge的label对应 true, false, 空 + def __init__(self, source: CFGNode, destination: CFGNode, label: str = None): + super(CFGEdge, self).__init__(source, destination) + if label is None: + self.label = CFGEdgeType.EMPTY_LABEL + else: + self.label = label + + def getProperties(self) -> Dict[str, object]: + return { + "flowLabel": self.label + } + + def __hash__(self) -> int: + prime = 31 + result = super().__hash__() + result = prime * result + hash(self.label) + return result + + def __str__(self): + return str(self.source) + " ==[" + self.label + "]==> " + str(self.destination) + + def __eq__(self, o: object) -> bool: + if id(self) == id(o): + return True + if not super().__eq__(o): + return False + if not isinstance(o, CFGEdge): + return False + return self.label == o.label + +# 针对一个function的CFG +class CFG(AbstractTwoWayGraph[CFGNode]): + def __init__(self): + super(CFG, self).__init__() + self.entry: CFGEntryNode = CFGEntryNode() + self.exit: CFGExitNode = CFGExitNode() + self.addVertex(self.entry) + self.addVertex(self.exit) + self.parameters: List[CFGNode] = list() + self.errorNode: CFGErrorNode = None + self.name: str = None # 函数名 + + def getErrorNode(self): + if self.errorNode is None: + self.errorNode = CFGErrorNode() + return self.errorNode + + def isEmpty(self) -> bool: + return len(self.vertices) == 2 + + # addCFG只是将otherCFG和当前CFG的所有结点和边放到当前CFG中,otherCFG中的结点还没有和当前CFG连通 + def addCFG(self, otherCFG): + self.addVertices(otherCFG) + self.addEdges(otherCFG) + + # 合并CFG + def appendCFG(self, otherCFG): + self.addCFG(otherCFG) + if not otherCFG.isEmpty(): + # edge1为当前CFG的ExitNode的入边 + for edge1 in self.inNeighborhood.get(self.exit, []): + # edge2为otherCFG的EntryNode的出边 + for edge2 in otherCFG.outNeighborhood.get(otherCFG.entry, []): + self.addCFGEdge(edge1.source, edge2.destination, edge1.label) + # 删除当前的Exit结点 + self.removeEdgesTo(self.exit) + for edge in otherCFG.inNeighborhood.get(otherCFG.exit): + self.addCFGEdge(edge.source, self.exit, edge.label) + + # 处理if-else,while等情况 + def mountCFG(self, branchNode: CFGNode, mergeNode: CFGNode, cfg, label: str): + # 在if-else中,cfg为elseBlock对应的CFG,branchNode为condition对应的CFGNode,mergeNode为该Block对应的ExitNode + # 在while语句中,cfg为whileBody对应的CFG,branchNode和mergeNode为Condition对应的CFGNode + # 在for语句中,cfg为forBody,branchNode为forCondition,mergeNode为forExpression或者forCondition + if not cfg.isEmpty(): + self.addCFG(cfg) + for edge in cfg.outNeighborhood.get(cfg.entry, []): + self.addCFGEdge(branchNode, edge.destination, label) + for edge in cfg.inNeighborhood.get(cfg.exit, []): + self.addCFGEdge(edge.source, mergeNode, edge.label) + else: + self.addCFGEdge(branchNode, mergeNode, label) + + + def addVertices(self, cfg): + # 将cfg所有的非Entry和Exit的结点添加到当前CFG + for vertex in cfg.vertices: + if not (vertex == cfg.entry or vertex == cfg.exit): + self.addVertex(vertex) + + def addEdges(self, cfg): + # 将cfg所有非Entry和Exit的边添加到当前CFG + for vertex in cfg.vertices: + for edge in cfg.outNeighborhood.get(vertex, []): + if not (edge.source == cfg.entry or edge.destination == cfg.exit): + self.addEdge(edge) + + def addCFGEdge(self, srcBlock: CFGNode, dstBlock: CFGNode, label: str = None): + edge: CFGEdge = CFGEdge(srcBlock, dstBlock, label) + self.addEdge(edge) + + +class CFGFactory(object): + # Implement this method for each language + @staticmethod + def newInstance(functionDefinition: FunctionDef) -> CFG: + pass \ No newline at end of file diff --git a/mainTool/cfg/__init__.py b/mainTool/cfg/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/cfg/nodes.py b/mainTool/cfg/nodes.py new file mode 100644 index 0000000..68efcd0 --- /dev/null +++ b/mainTool/cfg/nodes.py @@ -0,0 +1,73 @@ +from typing import Dict +from mainTool.ast import astNode + +class CFGNode(object): + def __str__(self) -> str: + return self.__class__.__name__ + + def getProperties(self) -> Dict[str, object]: + return { + "type": str(self), + "code": self.__class__.__name__, + "IS_CFG_NODE": True + } + +# 普通CFG结点 +class ASTNodeContainer(CFGNode): + def __init__(self, node: astNode): + self.astNode: astNode = node + self.astNode.markAsCFGNode() + + def getEscapedCodeStr(self): + return self.astNode.getEscapedCodeStr() + + def __str__(self): + return "[" + self.astNode.getEscapedCodeStr() + "]" + +# 入口结点 +class CFGEntryNode(CFGNode): + def __str__(self): + return "[ENTRY]" + + def getProperties(self) -> Dict[str, object]: + return { + "type": str(self), + "code": "ENTRY", + "IS_CFG_NODE": True + } + +# 退出结点 +class CFGExitNode(CFGNode): + def __str__(self): + return "[EXIT]" + + def getProperties(self) -> Dict[str, object]: + return { + "type": str(self), + "code": "EXIT", + "IS_CFG_NODE": True + } + +# 错误结点 +class CFGErrorNode(CFGNode): + def __str__(self): + return "[ERROR]" + + def getProperties(self) -> Dict[str, object]: + return { + "type": str(self), + "code": "ERROR", + "IS_CFG_NODE": True + } + +# for循环条件没写的话就是InfiniteForNode +class InfiniteForNode(CFGNode): + def __str__(self): + return "[INFINITE FOR]" + + def getProperties(self) -> Dict[str, object]: + return { + "type": str(self), + "code": "true", + "IS_CFG_NODE": True + } \ No newline at end of file diff --git a/mainTool/ddg/DDGCreator.py b/mainTool/ddg/DDGCreator.py new file mode 100644 index 0000000..86cd389 --- /dev/null +++ b/mainTool/ddg/DDGCreator.py @@ -0,0 +1,185 @@ +from mainTool.ddg.DefUseGraph import * +from mainTool.udg.useDefGraph import * +from mainTool.cfg.CFG import * +from mainTool.ast.declarations.complexDecls import Parameter + +class CFGAndUDGToDefUseCFG(object): + + def initializeStatements(self, cfg: CFG, defUseCFG: DefUseCFG): + for statement in cfg.vertices: + if isinstance(statement, ASTNodeContainer): + statement = statement.astNode + defUseCFG.addStatement(statement) + + + def initializeParentsAndChildren(self, cfg: CFG, defUseCFG: DefUseCFG): + for edge in cfg.getEdges(): + src = edge.source + dst = edge.destination + if isinstance(src, ASTNodeContainer): + src = src.astNode + if isinstance(dst, ASTNodeContainer): + dst = dst.astNode + defUseCFG.addChildBlock(src, dst) + defUseCFG.addParentBlock(dst, src) + + + def initializeDefUses(self, udg: UseDefGraph, defUseCFG: DefUseCFG): + useDefDict: Dict[str, List[UseOrDefRecord]] = udg.useOrDefRecordTable + for symbol, defUseRecords in useDefDict.items(): + for record in defUseRecords: + if not record.astNode.isInCFG: + continue + if record.isDef: + defUseCFG.addSymbolDefined(record.astNode, symbol) + else: + defUseCFG.addSymbolUsed(record.astNode, symbol) + + + def convert(self, cfg: CFG, udg: UseDefGraph) -> DefUseCFG: + defUseCFG: DefUseCFG = DefUseCFG() + self.initializeStatements(cfg, defUseCFG) + self.initializeDefUses(udg, defUseCFG) + + parameters: List[str] = list() + for parameterCFGNode in cfg.parameters: + astNode: Parameter = parameterCFGNode.astNode + # 参数名称 + symbol: str = astNode.name.getEscapedCodeStr() + parameters.append(symbol) + + defUseCFG.exitNode = cfg.exit + defUseCFG.parameters = parameters + defUseCFG.addUsesForExitNode() + self.initializeParentsAndChildren(cfg, defUseCFG) + + return defUseCFG + + +class Definition(object): + def __init__(self, aStatement: object, aIdentifier: str): + self.statement: object = aStatement + self.identifier: str = aIdentifier + + +class DDGCreator(object): + def __init__(self): + self.cfg: DefUseCFG = None + self.In: Dict[object, Set[object]] = dict() # in集合 + self.Out: Dict[object, Set[object]] = dict() # out集合 + self.Gen: Dict[object, Set[object]] = dict() # gen集合 + self.changedNodes: List[object] = list() + + def clear(self): + self.cfg = None + self.In.clear() + self.Out.clear() + self.Gen.clear() + self.changedNodes.clear() + + def initOut(self): + for statement in self.cfg.statements: + # this has the nice side-effect that an empty hash is created for the statement. + self.Out[statement] = set() + symsDefined: List[str] = self.cfg.symbolsDefined.get(statement, []) + for s in symsDefined: + self.Out[statement].add(Definition(statement, s)) + + def initGenFromOut(self): + for statement in self.cfg.statements: + for o in self.Out.get(statement, {}): + if statement not in self.Gen.keys(): + self.Gen[statement] = set() + self.Gen[statement].add(o) + + #Reaching-Def info初始化 + def initReachingDefs(self): + self.initOut() + self.initGenFromOut() + self.changedNodes.append(self.cfg.statements[0]) # entry + for statement in self.cfg.statements[2:]: + self.changedNodes.append(statement) + self.changedNodes.append(self.cfg.statements[1]) # exit + + def updateIn(self, x: object): + parents: List[object] = self.cfg.parentBlocks.get(x, None) + if parents is None: + return + + self.In[x] = set() + # in(x) = union(out(p))_{p in parents(x)} + for parent in parents: + parentOut: Set[object] = self.Out.get(parent, {}) + self.In[x].update(parentOut) + + def updateOut(self, x: object) -> bool: + listForKey: Set[object] = self.Out.get(x) + oldOut: Set[object] = listForKey.copy() + self.Out[x] = set() + + # out(x) = in(x) + inForX: Set[object] = self.In.get(x, {}) + self.Out[x].update(inForX) + + # out(x) = out(x) - kill(x) + killX: List[str] = self.cfg.symbolsDefined.get(x, None) + if killX is not None: + outItems: Set[object] = self.Out.get(x) + deleteItems: Set[object] = set() + for item in outItems: + if item.identifier in killX: + deleteItems.add(item) + + outItems.difference_update(deleteItems) + + # gen(x) \cup out(x) + genX: Set[object] = self.Gen.get(x, {}) + self.Out[x].update(genX) + + difference = self.Out[x] == oldOut + return not difference + + + def popFromChangedNodes(self) -> object: + x: object = next(iter(self.changedNodes)) + self.changedNodes.remove(x) + return x + + # Reaching Def Analysis + def calculateReachingDefs(self): + self.initReachingDefs() + + while len(self.changedNodes) > 0: + currentBlock: object = self.popFromChangedNodes() + self.updateIn(currentBlock) # in(x) = out(p) + out(p1) ..... + changed: bool = self.updateOut(currentBlock) # out(x) = gen(x) + in(x) - kill(x) + + if not changed: + continue + # 更新的话添加后继结点 + children: List[object] = self.cfg.childBlocks.get(currentBlock, []) + self.changedNodes.extend(children) + + + def createDDGFromReachingDefs(self) -> DDG: + ddg: DDG = DDG() + for statement in self.cfg.statements: + inForBlock: Set[object] = self.In.get(statement, None) + if inForBlock is None: + continue + usedSymbols: List[str] = self.cfg.symbolsUsed.get(statement, None) + if usedSymbols is None: + continue + + for defi in inForBlock: + if defi.statement == statement or isinstance(statement, CFGExitNode): + continue + if defi.identifier in usedSymbols: + ddg.add(defi.statement, statement, defi.identifier) + + return ddg + + def createForDefUseCFG(self, aCfg: DefUseCFG) -> DDG: + self.cfg = aCfg + self.calculateReachingDefs() + return self.createDDGFromReachingDefs() \ No newline at end of file diff --git a/mainTool/ddg/DefUseGraph.py b/mainTool/ddg/DefUseGraph.py new file mode 100644 index 0000000..47afa53 --- /dev/null +++ b/mainTool/ddg/DefUseGraph.py @@ -0,0 +1,70 @@ +from typing import List, Dict, Set + +class DefUseRelation(object): + def __init__(self, src: object, dst: object, symbol: str): + self.src: object = src + self.dst: object = dst + self.symbol: str = symbol + + def __eq__(self, other): + if not isinstance(other, DefUseRelation): + return False + return self.src == other.src and self.dst == other.dst and self.symbol == other.symbol + + def __hash__(self): + return hash(self.symbol) + + def __str__(self): + return f"{self.src} ----[{self.symbol}]-----{self.dst}" + +# Data Dependence Graph +class DDG(object): + def __init__(self): + self.defUseEdges: Set[DefUseRelation] = set() + + def add(self, srcId: object, dstId: object, symbol: str): + statementPair: DefUseRelation = DefUseRelation(srcId, dstId, symbol) + self.defUseEdges.add(statementPair) + +# A CFG decorated with USE and DEFs suitable to determine reaching definitions. +class DefUseCFG(object): + def __init__(self): + self.statements: List[object] = list() + self.symbolsUsed: Dict[object, List[str]] = dict() # key是语句,value是语句中使用的symbol + self.symbolsDefined: Dict[object, List[str]] = dict() # key是语句,value是语句中定义的symbol + self.parentBlocks: Dict[object, List[str]] = dict() # key是value的CFG后继结点 + self.childBlocks: Dict[object, List[str]] = dict() # key是value的CFG前驱结点 + self.symbolIds: Dict[str, object] = dict() + + self.exitNode: object = None + self.parameters: List[str] = list() + + def addStatement(self, statementId: object): + self.statements.append(statementId) + + def addSymbolUsed(self, key: object, symbol: str): + if key not in self.symbolsUsed.keys(): + self.symbolsUsed[key] = [] + self.symbolsUsed[key].append(symbol) + + def addSymbolDefined(self, key: object, symbol: str): + if key not in self.symbolsDefined.keys(): + self.symbolsDefined[key] = [] + self.symbolsDefined[key].append(symbol) + + def addParentBlock(self, thisBlockId: object, parentId: object): + if thisBlockId not in self.parentBlocks.keys(): + self.parentBlocks[thisBlockId] = [] + self.parentBlocks[thisBlockId].append(parentId) + + def addChildBlock(self, thisBlockId: object, childId: object): + if thisBlockId not in self.childBlocks.keys(): + self.childBlocks[thisBlockId] = [] + self.childBlocks[thisBlockId].append(childId) + + def setSetSymbolId(self, symbolCode: str, symbolId: object): + self.symbolIds[symbolCode] = symbolId + + def addUsesForExitNode(self): + for symbol in self.parameters: + self.addSymbolUsed(self.exitNode, "* " + symbol) \ No newline at end of file diff --git a/mainTool/ddg/__init__.py b/mainTool/ddg/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/udg/__init__.py b/mainTool/udg/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/udg/astAnalyzers.py b/mainTool/udg/astAnalyzers.py new file mode 100644 index 0000000..42f6b18 --- /dev/null +++ b/mainTool/udg/astAnalyzers.py @@ -0,0 +1,190 @@ +from mainTool.udg.environments import CallEnvironment, UseDefEnvironment, ArgumentEnvironment, AssignmentEnvironment +from mainTool.udg.environments import IncDecEnvironment, DeclEnvironment, PtrMemberAccessEnvironment, MemberAccessEnvironment +from mainTool.udg.environments import UseEnvironment, ArrayIndexingEnvironment, UnaryOpEnvironment, IdentifierEnvironment + +from mainTool.udg.astProvider import ASTProvider, ASTNodeASTProvider +from mainTool.udg.useDefGraph import UseOrDef, UseDefGraph + +from mainTool.ast.astNode import ASTNode +from mainTool.cfg.CFG import * + +from typing import Set, Dict, List +import sys + +# 这个类主要记录函数调用中参数为指针变量的信息,等同于Joern中的TaintSource,但是Joern考虑了指针def没考虑指针use的情况 +class CalleeInfos(object): + def __init__(self): + # 假设key为memset,value为[0],表示memset的第0个参数使用了指针变量,memset(a, xx,xx); 中use的symbol要包含 * a + self.calleeToArgUseIds: Dict[str, List[int]] = dict() + # 假设key为gets, value为[0],表示gets函数重新定义了第0个指针参数,gets(buf) 重新定义了symbol * buf + self.calleeToArgDefIds: Dict[str, List[int]] = dict() + # 参数为可变参数的情况 + # 比如 scanf -> 1, 表示 scanf会重新定义第1个以后的所有参数, scanf("%d", &a) 会重新定义 a + self.calleeToDefStartIds: Dict[str, int] = dict() + + # 判断是否使用指针 + def judgeUse(self, callEnv: CallEnvironment, childNumber: int) -> bool: + callee: str = callEnv.astProvider.getChild(0).getEscapedCodeStr() + return childNumber in self.calleeToArgUseIds.get(callee, []) + + # 判断是否定义指针 + def judgeDef(self, callEnv: CallEnvironment, childNumber: int) -> bool: + callee: str = callEnv.astProvider.getChild(0).getEscapedCodeStr() + if childNumber in self.calleeToArgDefIds.get(callee, []): + return True + return childNumber >= self.calleeToDefStartIds.get(callee, sys.maxsize) + + def addArgUse(self, callee: str, argN: int): + if callee not in self.calleeToArgUseIds.keys(): + self.calleeToArgUseIds[callee] = [] + self.calleeToArgUseIds[callee].append(argN) + + def addArgDef(self, callee: str, argN: int): + if callee not in self.calleeToArgDefIds.keys(): + self.calleeToArgDefIds[callee] = [] + self.calleeToArgDefIds[callee].append(argN) + + def addArgDefStartIds(self, callee: str, argN: int): + self.calleeToDefStartIds[callee] = argN + + +class ASTDefUseAnalyzer(object): + def __init__(self): + self.environmentStack: List[UseDefEnvironment] = list() + self.useDefsOfBlock: Set[UseOrDef] = set() + self.calleeInfos: CalleeInfos = CalleeInfos() + + def reset(self): + self.environmentStack.clear() + self.useDefsOfBlock.clear() + + def emitUseOrDefs(self, toEmit: List[UseOrDef]): + for useOrDef in toEmit: + self.useDefsOfBlock.add(useOrDef) + + # Gets upstream symbols from environment and passes them to + # parent-environment by calling addChildSymbols on the parent. Asks + # parent-environment to generate useOrDefs and emit them. + def reportUpstream(self, env: UseDefEnvironment): + symbols: List[str] = env.upstreamSymbols() + astProvider: ASTProvider = env.astProvider + + if len(self.environmentStack) > 0: + parentEnv: UseDefEnvironment = self.environmentStack[-1] + parentEnv.addChildSymbols(symbols, astProvider) + + def createArgumentEnvironment(self, astProvider: ASTProvider) -> ArgumentEnvironment: + argEnv: ArgumentEnvironment = ArgumentEnvironment() + # 中间还隔着个ArgumentList + callEnv: CallEnvironment = self.environmentStack[-2] + # 该参数是否使用指针 + if self.calleeInfos.judgeUse(callEnv, astProvider.getChildNumber()): + argEnv.setIsUsePointer() + # 是否定义指针 + if self.calleeInfos.judgeDef(callEnv, astProvider.getChildNumber()): + argEnv.setIsDefPointer() + return argEnv + + # Creates a UseDefEnvironment for a given AST node. + def createUseDefEnvironment(self, astProvider: ASTProvider) -> UseDefEnvironment: + nodeType: str = astProvider.getTypeAsString() + + if nodeType == "AssignmentExpr": + return AssignmentEnvironment() + elif nodeType == "IncDecOp": + return IncDecEnvironment() + elif nodeType == "IdentifierDecl" or nodeType == "Parameter": + return DeclEnvironment() + elif nodeType == "CallExpression": + return CallEnvironment() + elif nodeType == "Argument": + return self.createArgumentEnvironment(astProvider) + elif nodeType == "PtrMemberAccess": + return PtrMemberAccessEnvironment() + elif nodeType == "MemberAccess": + return MemberAccessEnvironment() + # condition和return中只有use没有def + elif nodeType == "Condition" or nodeType == "ReturnStatement": + return UseEnvironment() + elif nodeType == "ArrayIndexing": + return ArrayIndexingEnvironment() + elif nodeType == "UnaryOp": + return UnaryOpEnvironment() + elif nodeType == "Identifier": + return IdentifierEnvironment() + else: + return UseDefEnvironment() + + + def traverseAST(self, astProvider: ASTProvider): + env: UseDefEnvironment = self.createUseDefEnvironment(astProvider) + env.astProvider = astProvider + self.traverseASTChildren(astProvider, env) + + + def traverseASTChildren(self, astProvider: ASTProvider, env: UseDefEnvironment): + numChildren: int = astProvider.getChildCount() + self.environmentStack.append(env) + for i in range(numChildren): + childProvider: ASTProvider = astProvider.getChild(i) + self.traverseAST(childProvider) + toEmit: List[UseOrDef] = env.useOrDefsFromSymbols(childProvider) + self.emitUseOrDefs(toEmit) + self.environmentStack.pop() + self.reportUpstream(env) + + def analyzeAST(self, astProvider: ASTProvider) -> Set[UseOrDef]: + self.reset() + self.traverseAST(astProvider) + return self.useDefsOfBlock + + +class CFGToUDGConverter(object): + def __init__(self): + self.astAnalyzer: ASTDefUseAnalyzer = ASTDefUseAnalyzer() + + # statementNode是CFGNode + def addToUseDefGraph(self, useDefGraph: UseDefGraph, usesAndDefs: List[UseOrDef], statementNode: ASTNode): + insertedForStatementDef: Set[str] = set() + insertedForStatementUse: Set[str] = set() + + for useOrDef in usesAndDefs: + astProvider: ASTNodeASTProvider = useOrDef.astProvider + # CHECK? + useOrDefNode: ASTNode = astProvider.node + if useOrDef.isDef: + if useOrDef.symbol not in insertedForStatementDef: + useDefGraph.addDefinition(useOrDef.symbol, statementNode) + insertedForStatementDef.add(useOrDef.symbol) + # 给ASTNode添加 + if useOrDefNode is not None and useOrDefNode != statementNode: + useDefGraph.addDefinition(useOrDef.symbol, useOrDefNode) + + else: + if useOrDef.symbol not in insertedForStatementUse: + useDefGraph.addUse(useOrDef.symbol, statementNode) + insertedForStatementUse.add(useOrDef.symbol) + # Add use-links from AST nodes to symbols + if useOrDef.astProvider is not None and useOrDefNode is not statementNode: + useDefGraph.addUse(useOrDef.symbol, useOrDefNode) + + # 将CFG转化为UDG + def convert(self, cfg: CFG) -> UseDefGraph: + # Incrementally create a UseDefGraph by generating + # UseOrDefs for each statement separately and adding those + # to the UseDefGraph + useDefGraph: UseDefGraph = UseDefGraph() + statements: List[CFGNode] = cfg.vertices + + # CFG中每个语句独立分析 + for cfgNode in statements: + # skip empty blocks + if not isinstance(cfgNode, ASTNodeContainer): + continue + statementNode: ASTNode = cfgNode.astNode + provider: ASTNodeASTProvider = ASTNodeASTProvider() + provider.node = statementNode + usesAndDefs: List[UseOrDef] = self.astAnalyzer.analyzeAST(provider) + self.addToUseDefGraph(useDefGraph, usesAndDefs, statementNode) + + return useDefGraph \ No newline at end of file diff --git a/mainTool/udg/astProvider.py b/mainTool/udg/astProvider.py new file mode 100644 index 0000000..f5d8838 --- /dev/null +++ b/mainTool/udg/astProvider.py @@ -0,0 +1,60 @@ +from abc import abstractmethod +from mainTool.ast.astNode import ASTNode +from mainTool.ast.expressions.expression import Expression + +class ASTProvider(object): + @abstractmethod + def getTypeAsString(self) -> str: + pass + + @abstractmethod + def getChild(self, i: int): + pass + + @abstractmethod + def getEscapedCodeStr(self) -> str: + pass + + @abstractmethod + def getChildNumber(self) -> int: + pass + + @abstractmethod + def getChildCount(self) -> int: + pass + + @abstractmethod + def getOperatorCode(self) -> str: + pass + + +class ASTNodeASTProvider(ASTProvider): + def __init__(self): + self.node: ASTNode = None + + def getTypeAsString(self) -> str: + return self.node.getTypeAsString() + + def getChild(self, i: int) -> ASTProvider: + childProvider: ASTNodeASTProvider = ASTNodeASTProvider() + childProvider.node = self.node.getChild(i) + return childProvider + + def getChildCount(self) -> int: + return self.node.getChildCount() + + def getEscapedCodeStr(self) -> str: + return self.node.getEscapedCodeStr() + + def getChildNumber(self) -> int: + return self.node.childNumber + + def getOperatorCode(self) -> str: + if isinstance(self.node, Expression): + return self.node.operator + return None + + def __eq__(self, other): + if not isinstance(other, ASTNodeASTProvider): + return False + return self.node == other.node \ No newline at end of file diff --git a/mainTool/udg/environments.py b/mainTool/udg/environments.py new file mode 100644 index 0000000..1af7204 --- /dev/null +++ b/mainTool/udg/environments.py @@ -0,0 +1,268 @@ +from mainTool.udg.useDefGraph import UseOrDef +from mainTool.udg.astProvider import ASTProvider +from typing import List + +class UseDefEnvironment(object): + def __init__(self): + self.astProvider: ASTProvider = None + # 交由父节点处理的token + self.symbols: List[str] = list() + + def isUse(self, child: ASTProvider) -> bool: + return False + + def isDef(self, child: ASTProvider) -> bool: + return False + + # Propagate all symbols to upstream + # 交由父节点处理的symbol + def upstreamSymbols(self) -> List[str]: + return self.symbols + + # 处理子结点的symbol,默认全部交给父节点 + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + self.symbols.extend(childSymbols) + + # 默认不生成任何use或者def symbol + def useOrDefsFromSymbols(self, child: ASTProvider) -> List[UseOrDef]: + return [] + + def createDefOrUseForSymbols(self, symbols: List[str], isDef: bool) -> List[UseOrDef]: + retval: List[UseOrDef] = list() + for s in symbols: + useOrDef: UseOrDef = UseOrDef() + useOrDef.isDef = isDef + useOrDef.symbol = s + useOrDef.astProvider = self.astProvider + retval.append(useOrDef) + return retval + + def createDefsForAllSymbols(self, symbols: List[str]) -> List[UseOrDef]: + return self.createDefOrUseForSymbols(symbols, True) + + def createUsesForAllSymbols(self, symbols: List[str]) -> List[UseOrDef]: + return self.createDefOrUseForSymbols(symbols, False) + +# 只有使用symbol,没有定义symbol,Condition和ReturnStatement属于这一类 +class UseEnvironment(UseDefEnvironment): + # 只有use,没有def + def isUse(self, child: ASTProvider) -> bool: + return True + + # 该结点下所有的symbol记为使用 + def useOrDefsFromSymbols(self, child: ASTProvider) -> List[UseOrDef]: + retval: List[UseOrDef] = self.createUsesForAllSymbols(self.symbols) + return retval + +class EmitUseEnvironment(UseDefEnvironment): + def __init__(self): + super().__init__() + self.useSymbols: List[str] = list() + + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + self.useSymbols.extend(childSymbols) + + # 该结点下所有的useSymbols记为使用 + def useOrDefsFromSymbols(self, child: ASTProvider) -> List[UseOrDef]: + retval: List[UseOrDef] = self.createUsesForAllSymbols(self.useSymbols) + return retval + + +class EmitDefEnvironment(UseDefEnvironment): + def __init__(self): + super().__init__() + self.defSymbols: List[str] = list() + + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + if self.isDef(child): + self.defSymbols.extend(childSymbols) + if self.isUse(child): + self.symbols.extend(childSymbols) + + def useOrDefsFromSymbols(self, child: ASTProvider) -> List[UseOrDef]: + retval: List[UseOrDef] = self.createDefsForAllSymbols(self.defSymbols) + \ + self.createUsesForAllSymbols(self.symbols) + return retval + + +class EmitDefAndUseEnvironment(UseDefEnvironment): + def __init__(self): + super().__init__() + self.useSymbols: List[str] = list() + self.defSymbols: List[str] = list() + + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + if self.isDef(child): + self.defSymbols.extend(childSymbols) + if self.isUse(child): + self.useSymbols.extend(childSymbols) + + def useOrDefsFromSymbols(self, child: ASTProvider) -> List[UseOrDef]: + retval: List[UseOrDef] = list() + if self.isDef(child): + retval.extend(self.createDefsForAllSymbols(self.defSymbols)) + if self.isUse(child): + retval.extend(self.createUsesForAllSymbols(self.useSymbols)) + return retval + + +class CallEnvironment(UseDefEnvironment): + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + childNumber: int = child.getChildNumber() + # 函数名不添加 + if childNumber != 0: + self.symbols.extend(childSymbols) + + +class IdentifierEnvironment(UseDefEnvironment): + # Identifier类型直接获取token作为symbol + def upstreamSymbols(self) -> List[str]: + code: str = self.astProvider.getEscapedCodeStr() + retval: List[str] = [code] + return retval + +# 结构体成员访问 +class MemberAccessEnvironment(UseDefEnvironment): + def upstreamSymbols(self) -> List[str]: + # emit all symbols + retval: List[str] = self.symbols.copy() + # emit entire code string + retval.append(self.astProvider.getEscapedCodeStr()) + return retval + + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + # 结构体变量名添加到symbol中但是使用的成员变量名不添加 + childNum: int = child.getChildNumber() + if childNum == 0: + super().addChildSymbols(childSymbols, child) + + def useOrDefsFromSymbols(self, child: ASTProvider) -> List[UseOrDef]: + return self.createUsesForAllSymbols(self.symbols) + + +class PtrMemberAccessEnvironment(UseDefEnvironment): + def upstreamSymbols(self) -> List[str]: + # emit all symbols as '* symbol' + retval: List[str] = ['* ' + c for c in self.symbols] + retval.append(self.astProvider.getEscapedCodeStr()) + return retval + + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + # 结构体变量名添加到symbol中但是使用的成员变量名不添加 + childNum: int = child.getChildNumber() + if childNum == 0: + super().addChildSymbols(childSymbols, child) + + def useOrDefsFromSymbols(self, child: ASTProvider) -> List[UseOrDef]: + return self.createUsesForAllSymbols(self.symbols) + + +# EmitDefEnvironment +# 赋值语句 +class AssignmentEnvironment(EmitDefEnvironment): + def isUse(self, child: ASTProvider) -> bool: + childNum: int = child.getChildNumber() + # 如果是第一个symbol + if childNum == 0: + # 如果operator不为空 并且 operator不是 =,也就是 x = y没有使用x,而x += y即使用也重新定义 + operatorCode: str = self.astProvider.getOperatorCode() + if operatorCode is not None and not operatorCode == "=": + return True + else: + return False + return True + + # Assignment Expr中第一个symbol为重新定义,后面的均不是 + def isDef(self, child: ASTProvider) -> bool: + childNum: int = child.getChildNumber() + if childNum == 0: + return True + return False + +# 变量定义 +class DeclEnvironment(EmitDefEnvironment): + def isUse(self, child: ASTProvider) -> bool: + return False + + def isDef(self, child: ASTProvider) -> bool: + type: str = child.getTypeAsString() + childNum: int = child.getChildNumber() + # IdentifierDecl的子结点第0个是IdentifierDeclType,第1个是Identifier + # Parameter的子结点中参数名可能是第0个参数 + return childNum == 1 and type == "Identifier" + +# x++ / x-- / ++x / --x +class IncDecEnvironment(EmitDefEnvironment): + def isUse(self, child: ASTProvider) -> bool: + return True + + def isDef(self, child: ASTProvider) -> bool: + return True + + +class UnaryOpEnvironment(EmitUseEnvironment): + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + codeStr: str = self.astProvider.getEscapedCodeStr() + if codeStr is not None and codeStr.startswith("&"): + for symbol in childSymbols: + self.symbols.append("& " + symbol) + return + # 不是*p + if codeStr is None or not codeStr.startswith("*"): + self.symbols.extend(childSymbols) + return + # emit all symbols as '* symbol' + retval: List[str] = ["* " + c for c in childSymbols] + # emit entire code string + self.useSymbols.extend(childSymbols) + self.symbols.extend(retval) + + +class ArrayIndexingEnvironment(EmitDefAndUseEnvironment): + def isUse(self, child: ASTProvider) -> bool: + return True + + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + childNum: int = child.getChildNumber() + # 数组名 + if childNum == 0: + derefedChildren: List[str] = ["* " + c for c in childSymbols] + self.symbols.extend(derefedChildren) + + self.useSymbols.extend(childSymbols) + + +class ArgumentEnvironment(EmitDefAndUseEnvironment): + def __init__(self): + super().__init__() + self.isUsePointer = False + self.isDefPointer = False + + def isUse(self, child: ASTProvider) -> bool: + return True + + def isDef(self, child: ASTProvider) -> bool: + return self.isDefPointer + + def setIsUsePointer(self): + self.isUsePointer = True + + def setIsDefPointer(self): + self.isDefPointer = True + + def addChildSymbols(self, childSymbols: List[str], child: ASTProvider): + # 函数调用默认不会改变参数,参数指针指向可能改变 + if self.isDefPointer: + # For tainted arguments, add "* symbol" instead of symbol + # to defined symbols. Make an exception if symbol starts with '& ' + derefChildSymbols: List[str] = list(map(lambda symbol: "* " + symbol if not symbol.startswith("&") + else symbol.encode('utf-8')[2:].decode('utf-8'), childSymbols)) + self.defSymbols.extend(derefChildSymbols) + + if self.isUsePointer: + # 使用了指针类型,那么 * + id 会被添加到使用到的symbol中 + derefChildSymbols: List[str] = list(map(lambda symbol: "* " + symbol if not symbol.startswith("&") + else symbol.encode('utf-8')[2:].decode('utf-8'), childSymbols)) + self.useSymbols.extend(derefChildSymbols) + # id 会被添加到使用到的symbol中 + self.useSymbols.extend(childSymbols) \ No newline at end of file diff --git a/mainTool/udg/useDefGraph.py b/mainTool/udg/useDefGraph.py new file mode 100644 index 0000000..abb583b --- /dev/null +++ b/mainTool/udg/useDefGraph.py @@ -0,0 +1,50 @@ +from mainTool.ast.astNode import ASTNode +from mainTool.udg.astProvider import ASTProvider + + +from typing import List, Dict, Set + +# 一个usedef记录,表示某个symbol在该AST中是定义还是使用 +class UseOrDefRecord(object): + def __init__(self, anASTNode: ASTNode, aIsDef: bool): + self.isDef: bool = aIsDef + self.astNode: ASTNode = anASTNode + +class UseOrDef(object): + def __init__(self): + self.isDef: int = None + self.symbol: str = None + self.astProvider: ASTProvider = None + + def __eq__(self, other): + if not isinstance(other, UseOrDef): + return False + return self.isDef == other.isDef and self.symbol == other.symbol \ + and self.astProvider == other.astProvider + + def __hash__(self): + return hash(self.symbol) + + +class UseDefGraph(object): + # A UseDefGraph is a table indexed by identifiers. Each table-entry is + # a list of the UseOrDefRecords of the identifier. + def __init__(self): + # 主要成员变量,每个key(symbol)对应1个list [(stetement, def)] + self.useOrDefRecordTable: Dict[str, List[UseOrDefRecord]] = dict() + + def getUsesAndDefsForSymbol(self, symbol: str) -> List[UseOrDefRecord]: + return self.useOrDefRecordTable.get(symbol, []) + + def add(self, identifier: str, astNode: ASTNode, isDef: bool): + record: UseOrDefRecord = UseOrDefRecord(astNode, isDef) + if identifier in self.useOrDefRecordTable.keys(): + self.useOrDefRecordTable[identifier].append(record) + else: + self.useOrDefRecordTable[identifier] = [record] + + def addDefinition(self, identifier: str, astNode: ASTNode): + self.add(identifier, astNode, True) + + def addUse(self, identifier: str, astNode: ASTNode): + self.add(identifier, astNode, False) \ No newline at end of file diff --git a/mainTool/utils/__init__.py b/mainTool/utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainTool/utils/graphUtils.py b/mainTool/utils/graphUtils.py new file mode 100644 index 0000000..e492d0f --- /dev/null +++ b/mainTool/utils/graphUtils.py @@ -0,0 +1,153 @@ +from abc import abstractmethod +from typing import List, TypeVar, Generic, Dict + +T = TypeVar('T') + +class Edge(Generic[T]): + def __init__(self, source: T, destination: T): + self.source: T = source + self.destination: T = destination + + @abstractmethod + def getProperties(self) -> Dict[str, object]: + pass + + def __eq__(self, o: object) -> bool: + if o is None: + return False + if id(self) == id(o): + return True + if not isinstance(o, Edge): + return False + return self.destination == o.destination and self.source == o.source + + def __hash__(self) -> int: + prime: int = 31 + result: int = 1 + result = prime * result + hash(self.destination) + result = prime * result + hash(self.source) + return result + + +class AbstractGraph(Generic[T]): + def __init__(self): + self.vertices: List[T] = list() + self.outNeighborhood: Dict[T, List[Edge[T]]] = dict() + + def __iter__(self): + return iter(self.vertices) + + def getEdges(self) -> List[Edge[T]]: + edges: List[Edge[T]] = list() + for v, e in self.outNeighborhood.items(): + edges.extend(e) + return edges + + def outDegree(self, vertex: T) -> int: + return len(self.outNeighborhood.get(vertex, [])) + + def addVertex(self, vertex: T) -> bool: + if not self.vertices.__contains__(vertex): + self.vertices.append(vertex) + return True + return False + + def addEdge(self, edge: Edge[T]): + if edge.source in self.outNeighborhood.keys(): + self.outNeighborhood[edge.source].append(edge) + else: + self.outNeighborhood[edge.source] = [edge] + + def removeEdge(self, src: T, dst: T): + edges: List[Edge[T]] = self.outNeighborhood[src] + for edge in edges: + if edge.destination == dst: + edges.remove(edge) + + def removeEdgesFrom(self, source: T): + self.outNeighborhood.pop(source) + + def removeEdgesTo(self, destination: T): + for src, edges in self.outNeighborhood.items(): + for edge in edges: + if edge.destination == destination: + edges.remove(edge) + + def totalEdgeNum(self) -> int: + size: int = 0 + for src, edges in self.outNeighborhood.items(): + size += len(edges) + return size + + def __str__(self) -> str: + res: str = f"Graph with {len(self.vertices)} vertices and {self.totalEdgeNum()} edges:\n" + for vertex in self.vertices: + res += str(vertex) + '\n' + for edge in self.outNeighborhood[vertex]: + res += str(edge) + '\n' + return res + +class AbstractTwoWayGraph(AbstractGraph[T]): + # 保存node -> ingoing edge + def __init__(self): + super(AbstractTwoWayGraph, self).__init__() + self.inNeighborhood: Dict[T, List[Edge[T]]] = dict() + + def inDegree(self, vertex: T) -> int: + return len(self.inNeighborhood.get(vertex, [])) + + def addEdge(self, edge: Edge[T]): + super().addEdge(edge) + if edge.destination in self.inNeighborhood.keys(): + self.inNeighborhood[edge.destination].append(edge) + else: + self.inNeighborhood[edge.destination] = [edge] + + def removeEdgesFrom(self, source: T): + for edge in self.outNeighborhood[source]: + self.inNeighborhood[edge.destination].remove(edge) + super().removeEdgesFrom(source) + + def removeEdgesTo(self, destination: T): + for edge in self.inNeighborhood[destination]: + self.outNeighborhood[edge.source].remove(edge) + self.inNeighborhood.pop(destination) + + def removeEdge(self, src: T, dst: T): + super().removeEdge(src, dst) + edges: List[Edge[T]] = self.inNeighborhood[dst] + for edge in edges: + if edge.source == src: + edges.remove(edge) + +# 后序广度优先遍历逆向CFG +class PostorderIterator(Generic[T]): + def __init__(self, graph: AbstractGraph[T], root: T): + self.graph = graph + self.remainingNodes: List[T] = [root] + self.visitedNodes: List[T] = list() + + def __iter__(self): + return self + + def hasNext(self) -> bool: + return len(self.remainingNodes) > 0 + + def __next__(self): + while self.hasNext(): + root: T = self.remainingNodes[-1] + # visit root + if not root in self.visitedNodes: + self.visitedNodes.append(root) + # predecessors first if any + if self.graph.outDegree(root) > 0: + for edge in self.graph.outNeighborhood.get(root, []): + if not edge.destination in self.visitedNodes: + self.remainingNodes.append(edge.destination) + # 深度优先,1个就够了 + break + + # 没有后续结点或者后续结点都已经被访问过了 + if self.remainingNodes[-1] == root: + return self.remainingNodes.pop() + raise StopIteration() \ No newline at end of file diff --git a/mainTool/utils/types.py b/mainTool/utils/types.py new file mode 100644 index 0000000..356acba --- /dev/null +++ b/mainTool/utils/types.py @@ -0,0 +1,20 @@ +from enum import IntEnum, Enum + +# label类别: goto label, case label, default +class LabelType(IntEnum): + Normal = 1 + Case = 2 + Default = 3 + +# 类定义类型 +class ClassType(IntEnum): + Class = 1 # 类 + Struct = 2 # 结构体 + Enum = 3 # 枚举 + Union = 4 # 联合体 + +# CFG边类型 +class CFGEdgeType: + EMPTY_LABEL = "" + TRUE_LABEL = "True" + FALSE_LABEL = "False" \ No newline at end of file diff --git a/resources/CPP14.g4 b/resources/CPP14.g4 new file mode 100644 index 0000000..5cbcdd6 --- /dev/null +++ b/resources/CPP14.g4 @@ -0,0 +1,2369 @@ +/******************************************************************************* + * The MIT License (MIT) + * + * Copyright (c) 2015 Camilo Sanchez (Camiloasc1) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + ******************************************************************************/ + +/******************************************************************************* + * C++14 Grammar for ANTLR v4 + * + * Based on n4140 draft paper + * https://github.com/cplusplus/draft/blob/master/papers/n4140.pdf + * and + * http://www.nongnu.org/hcb/ + * + * Possible Issues: + * + * Input must avoid conditional compilation blocks (this grammar ignores any preprocessor directive) + * GCC extensions not yet supported (do not try to parse the preprocessor output) + * Right angle bracket (C++11) - Solution '>>' and '>>=' are not tokens, only '>' + * Lexer issue with pure-specifier rule ('0' token) - Solution in embedded code + * Change it to match the target language you want in line 1097 or verify inside your listeners/visitors + * Java: +if($val.text.compareTo("0")!=0) throw new InputMismatchException(this); + * JavaScript: + + * Python2: + + * Python3: + + * C#: + + ******************************************************************************/ +grammar CPP14; + +/*Basic concepts*/ +translationunit +: + declarationseq? EOF +; + +/*Expressions*/ +primaryexpression +: + literal + | This + | '(' expression ')' + | idexpression + | lambdaexpression +; + +idexpression +: + unqualifiedid + | qualifiedid +; + +unqualifiedid +: + Identifier + | operatorfunctionid + | conversionfunctionid + | literaloperatorid + | '~' classname + | '~' decltypespecifier + | templateid +; + +qualifiedid // qualified通常包含:: +: + nestednamespecifier Template? unqualifiedid +; + +nestednamespecifier +: + '::' #normalGlobalIdentifier + | thetypename '::' #classIdentifier + | namespacename '::' #namespaceIdentifier + | decltypespecifier '::' #decltypeIdentifier + | nestednamespecifier Identifier '::' #nestedIdentifier + | nestednamespecifier Template? simpletemplateid '::' #nestedTemplateIdentifier +; + +lambdaexpression +: + lambdaintroducer lambdadeclarator? compoundstatement +; + +lambdaintroducer +: + '[' lambdacapture? ']' +; + +lambdacapture +: + capturedefault + | capturelist + | capturedefault ',' capturelist +; + +capturedefault +: + '&' + | '=' +; + +capturelist +: + capture '...'? + | capturelist ',' capture '...'? +; + +capture +: + simplecapture + | initcapture +; + +simplecapture +: + Identifier + | '&' Identifier + | This +; + +initcapture +: + Identifier initializer + | '&' Identifier initializer +; + +lambdadeclarator +: + '(' parameterdeclarationclause ')' Mutable? exceptionspecification? + attributespecifierseq? trailingreturntype? +; + +postfixexpression +: + primaryexpression #postfixIgnore + | postfixexpression '[' expression ']' #arrayIndexing + | postfixexpression '[' bracedinitlist ']' #postfixIgnore//没见过这种语法,aaa[{1, 2, 3}]; + | postfixexpression '(' expressionlist? ')' #functionCall//funcCall + | simpletypespecifier '(' expressionlist? ')' #postSimpleCastExpression// 类型转换,CastExpression,simpletypespecifier是castTarget + | typenamespecifier '(' expressionlist? ')' #postTypeCastExpression// 调用静态方法? + | simpletypespecifier bracedinitlist #postfixIgnore//先忽视这种语法 + | typenamespecifier bracedinitlist #postfixIgnore//先忽视这种语法 + | postfixexpression '.' Template? idexpression #memberAccess//memberAccess + | postfixexpression '->' Template? idexpression #ptrMemberAccess// ptrMemberAccess + | postfixexpression '.' pseudodestructorname #memberAccess//memberAccess + | postfixexpression '->' pseudodestructorname #ptrMemberAccess// ptrMemberAccess + | postfixexpression '++' #incDecOp + | postfixexpression '--' #incDecOp + | Dynamic_cast '<' thetypeid '>' '(' expression ')' #CppCastExpression + | Static_cast '<' thetypeid '>' '(' expression ')' #CppCastExpression + | Reinterpret_cast '<' thetypeid '>' '(' expression ')' #CppCastExpression + | Const_cast '<' thetypeid '>' '(' expression ')' #CppCastExpression + | Typeid '(' expression ')' #TypeidExpression + | Typeid '(' thetypeid ')' #TypeidExpression +; + +expressionlist +: + initializerlist +; + +pseudodestructorname +: + nestednamespecifier? thetypename '::' '~' thetypename + | nestednamespecifier Template simpletemplateid '::' '~' thetypename + | nestednamespecifier? '~' thetypename + | '~' decltypespecifier +; + +unaryexpression +: + postfixexpression + | '++' castexpression + | '--' castexpression + | unaryoperator castexpression + | sizeofExpression + | alignofExpression + | noexceptexpression + | newexpression + | deleteexpression +; + +sizeofExpression +: + Sizeof unaryexpression + | Sizeof '(' thetypeid ')' + | Sizeof '...' '(' Identifier ')' //还从没见过可变参数语法,这里直接忽略了 +; + +alignofExpression +: + Alignof '(' thetypeid ')' +; + + +unaryoperator +: + '|' + | '*' + | '&' + | '+' + | '!' + | '~' + | '-' +; + +newexpression +: + '::'? New newplacement? newtypeid newinitializer? + | '::'? New newplacement? '(' thetypeid ')' newinitializer? +; + +newplacement +: + '(' expressionlist ')' +; + +newtypeid +: + typespecifierseq newdeclarator? +; + +newdeclarator +: + ptroperator newdeclarator? #ptrNewDeclarator + | noptrnewdeclarator #nonPtrNewDeclarator +; + +noptrnewdeclarator +: + '[' expression ']' attributespecifierseq? + | noptrnewdeclarator '[' constantexpression ']' attributespecifierseq? +; + +newinitializer +: + '(' expressionlist? ')' + | bracedinitlist +; + +deleteexpression +: + '::'? Delete castexpression + | '::'? Delete '[' ']' castexpression +; + +noexceptexpression +: + Noexcept '(' expression ')' +; + +castexpression +: + unaryexpression + | '(' thetypeid ')' castexpression +; + +pmexpression +: + castexpression + | pmexpression '.*' castexpression + | pmexpression '->*' castexpression +; + +multiplicativeexpression +: + pmexpression + | multiplicativeexpression '*' pmexpression + | multiplicativeexpression '/' pmexpression + | multiplicativeexpression '%' pmexpression +; + +additiveexpression +: + multiplicativeexpression + | additiveexpression '+' multiplicativeexpression + | additiveexpression '-' multiplicativeexpression +; + +shiftexpression +: + additiveexpression + | shiftexpression '<<' additiveexpression + | shiftexpression rightShift additiveexpression +; + +relationalexpression +: + shiftexpression + | relationalexpression '<' shiftexpression + | relationalexpression '>' shiftexpression + | relationalexpression '<=' shiftexpression + | relationalexpression '>=' shiftexpression +; + +equalityexpression +: + relationalexpression + | equalityexpression '==' relationalexpression + | equalityexpression '!=' relationalexpression +; + +andexpression +: + equalityexpression + | andexpression '&' equalityexpression +; + +exclusiveorexpression +: + andexpression + | exclusiveorexpression '^' andexpression +; + +inclusiveorexpression +: + exclusiveorexpression + | inclusiveorexpression '|' exclusiveorexpression +; + +logicalandexpression +: + inclusiveorexpression + | logicalandexpression '&&' inclusiveorexpression +; + +logicalorexpression +: + logicalandexpression + | logicalorexpression '||' logicalandexpression +; + +conditionalexpression +: + logicalorexpression #nonConditionalExpression + | logicalorexpression '?' expression ':' assignmentexpression #realConditionalExpression +; + +assignmentexpression +: + conditionalexpression + | logicalorexpression assignmentoperator initializerclause + | throwexpression +; + +assignmentoperator +: + '=' + | '*=' + | '/=' + | '%=' + | '+=' + | '-=' + | rightShiftAssign + | '<<=' + | '&=' + | '^=' + | '|=' +; + +expression +: + assignmentexpression + | expression ',' assignmentexpression +; + +constantexpression +: + conditionalexpression +; +/*Statements*/ +statement +: + labeledstatement + | attributespecifierseq? expressionstatement // 表达式语句 + | attributespecifierseq? compoundstatement // 块语句 + | attributespecifierseq? selectionstatement // if-else, switch + | attributespecifierseq? iterationstatement // for, forrange, while, do-while + | attributespecifierseq? jumpstatement // break, continue, goto, return + | declarationstatement // 定义 + | attributespecifierseq? tryblock +; + +label +: + attributespecifierseq? Identifier ':' + | attributespecifierseq? Case constantexpression ':' + | attributespecifierseq? Default ':' +; + +labeledstatement +: + label statement +; + +expressionstatement +: + expression? ';' +; + +compoundstatement +: + '{' statementseq? '}' +; + +statementseq +: + statement + | statementseq statement +; + +selectionstatement +: + If '(' condition ')' statement # ifStatement + | If '(' condition ')' statement Else statement #ifStatement + | Switch '(' condition ')' statement #switchStatement +; + +condition +: + expression + | attributespecifierseq? declspecifierseq declarator '=' initializerclause + | attributespecifierseq? declspecifierseq declarator bracedinitlist +; + +iterationstatement +: + While '(' condition ')' statement #WhileStatement + | Do statement While '(' condition ')' ';' #DoStatement + | For '(' forinitstatement condition? ';' expression? ')' statement #ForStatement + | For '(' forrangedeclaration ':' forrangeinitializer ')' statement # ForRangeStatement +; + +forinitstatement +: + expressionstatement + | simpledeclaration +; + +forrangedeclaration +: + attributespecifierseq? declspecifierseq declarator +; + +forrangeinitializer +: + expression + | bracedinitlist +; + +jumpstatement +: + Break ';' + | Continue ';' + | Return expression? ';' + | Return bracedinitlist ';' + | Goto Identifier ';' +; + +declarationstatement +: + blockdeclaration +; + +/*Declarations*/ +declarationseq +: + declaration + | declarationseq declaration +; + +declaration +: + blockdeclaration + | functiondefinition //函数定义 + | templatedeclaration + | explicitinstantiation + | explicitspecialization + | linkagespecification + | namespacedefinition + | emptydeclaration + | attributedeclaration +; + +blockdeclaration +: + simpledeclaration + | asmdefinition + | namespacealiasdefinition + | usingdeclaration + | usingdirective + | static_assertdeclaration + | aliasdeclaration + | opaqueenumdeclaration +; + +aliasdeclaration +: + Using Identifier attributespecifierseq? '=' thetypeid ';' +; + +simpledeclaration +: + declspecifierseq? initdeclaratorlist? ';' + | attributespecifierseq declspecifierseq? initdeclaratorlist ';' +; + +static_assertdeclaration +: + Static_assert '(' constantexpression ',' Stringliteral ')' ';' +; + +emptydeclaration +: + ';' +; + +attributedeclaration +: + attributespecifierseq ';' +; + +declspecifier +: + storageclassspecifier # storageAttr + | typespecifier # typeAttr + | functionspecifier # funcAttr // inline, virtual, explicit + | Friend #friendDecl //友元类 + | Typedef #typedefDecl // typedef long long LL,joern会将其解析为 LL = long long + | Constexpr #constExprDecl // constexpr表达式定义 +; + +declspecifierseq +: + declspecifier attributespecifierseq? + | declspecifier declspecifierseq +; + +storageclassspecifier +: + Register + | Static + | Thread_local + | Extern + | Mutable +; + +functionspecifier +: + Inline + | Virtual + | Explicit +; + +typedefname +: + Identifier +; + +typespecifier +: + trailingtypespecifier #otherDecl + | classspecifier #classDecl + | enumspecifier #enumDecl +; + +trailingtypespecifier +: + simpletypespecifier + | elaboratedtypespecifier + | typenamespecifier + | cvqualifier +; + +typespecifierseq +: + typespecifier attributespecifierseq? + | typespecifier typespecifierseq +; + +trailingtypespecifierseq +: + trailingtypespecifier attributespecifierseq? + | trailingtypespecifier trailingtypespecifierseq +; + +simpletypespecifier +: + nestednamespecifier? thetypename //c++ style + | nestednamespecifier Template simpletemplateid //c++ style + | Char + | Char16 + | Char32 + | Wchar + | Bool + | Short + | Int + | Long + | Signed + | Unsigned + | Float + | Double + | Void + | Auto + | decltypespecifier +; + +thetypename +: + classname + | enumname + | typedefname + | simpletemplateid +; + +decltypespecifier +: + Decltype '(' expression ')' + | Decltype '(' Auto ')' +; + +elaboratedtypespecifier +: + classkey attributespecifierseq? nestednamespecifier? Identifier + | classkey simpletemplateid + | classkey nestednamespecifier Template? simpletemplateid + | Enum nestednamespecifier? Identifier +; + +enumname +: + Identifier +; + +enumspecifier +: + enumhead '{' enumeratorlist? '}' + | enumhead '{' enumeratorlist ',' '}' +; + +enumhead +: + enumkey attributespecifierseq? Identifier? enumbase? + | enumkey attributespecifierseq? nestednamespecifier Identifier enumbase? +; + +opaqueenumdeclaration +: + enumkey attributespecifierseq? Identifier enumbase? ';' +; + +enumkey +: + Enum + | Enum Class + | Enum Struct +; + +enumbase +: + ':' typespecifierseq +; + +enumeratorlist +: + enumeratordefinition + | enumeratorlist ',' enumeratordefinition +; + +enumeratordefinition +: + enumerator + | enumerator '=' constantexpression +; + +enumerator +: + Identifier +; + +namespacename +: + originalnamespacename + | namespacealias +; + +originalnamespacename +: + Identifier +; + +namespacedefinition +: + namednamespacedefinition + | unnamednamespacedefinition +; + +namednamespacedefinition +: + originalnamespacedefinition + | extensionnamespacedefinition +; + +originalnamespacedefinition +: + Inline? Namespace Identifier '{' namespacebody '}' +; + +extensionnamespacedefinition +: + Inline? Namespace originalnamespacename '{' namespacebody '}' +; + +unnamednamespacedefinition +: + Inline? Namespace '{' namespacebody '}' +; + +namespacebody +: + declarationseq? +; + +namespacealias +: + Identifier +; + +namespacealiasdefinition +: + Namespace Identifier '=' qualifiednamespacespecifier ';' +; + +qualifiednamespacespecifier +: + nestednamespecifier? namespacename +; + +usingdeclaration +: + Using Typename? nestednamespecifier unqualifiedid ';' + | Using '::' unqualifiedid ';' +; + +usingdirective +: + attributespecifierseq? Using Namespace nestednamespecifier? namespacename ';' +; + +asmdefinition +: + Asm '(' Stringliteral ')' ';' +; + +linkagespecification +: + Extern Stringliteral '{' declarationseq? '}' + | Extern Stringliteral declaration +; + +attributespecifierseq +: + attributespecifier + | attributespecifierseq attributespecifier +; + +attributespecifier +: + '[' '[' attributelist ']' ']' + | alignmentspecifier +; + +alignmentspecifier +: + Alignas '(' thetypeid '...'? ')' + | Alignas '(' constantexpression '...'? ')' +; + +attributelist +: + attribute? + | attributelist ',' attribute? + | attribute '...' + | attributelist ',' attribute '...' +; + +attribute +: + attributetoken attributeargumentclause? +; + +attributetoken +: + Identifier + | attributescopedtoken +; + +attributescopedtoken +: + attributenamespace '::' Identifier +; + +attributenamespace +: + Identifier +; + +attributeargumentclause +: + '(' balancedtokenseq ')' +; + +balancedtokenseq +: + balancedtoken? + | balancedtokenseq balancedtoken +; + +balancedtoken +: + '(' balancedtokenseq ')' + | '[' balancedtokenseq ']' + | '{' balancedtokenseq '}' + /*any token other than a parenthesis , a bracket , or a brace*/ +; + +/*Declarators*/ +initdeclaratorlist +: + initdeclarator + | initdeclaratorlist ',' initdeclarator +; + +initdeclarator +: + declarator initializer? +; + +declarator +: + ptrdeclarator + | noptrdeclarator parametersandqualifiers trailingreturntype +; + +ptrdeclarator +: + noptrdeclarator #nonPtrDecl + | ptroperator ptrdeclarator #ptrDecl +; + +noptrdeclarator //非指针类型定义 +: + declaratorid attributespecifierseq? #normalVarDecl// 普通变量定义 + | noptrdeclarator parametersandqualifiers #noptrIgnore // 不清楚这是什么语法,先忽略 + | noptrdeclarator '[' constantexpression? ']' attributespecifierseq? #arrayDecl// 数组定义, Type var[100]; + | '(' ptrdeclarator ')' #noptrIgnore// char (*p),这个语法可能会和强制类型转换 char(var)混淆,因此忽略 +; + +parametersandqualifiers +: + '(' parameterdeclarationclause ')' cvqualifierseq? refqualifier? + exceptionspecification? attributespecifierseq? +; + +trailingreturntype +: + '->' trailingtypespecifierseq abstractdeclarator? +; + +ptroperator +: + '*' attributespecifierseq? cvqualifierseq? + | '&' attributespecifierseq? + | '&&' attributespecifierseq? + | nestednamespecifier '*' attributespecifierseq? cvqualifierseq? +; + +cvqualifierseq +: + cvqualifier cvqualifierseq? +; + +cvqualifier +: + Const + | Volatile +; + +refqualifier +: + '&' + | '&&' +; + +declaratorid +: + '...'? idexpression +; + +thetypeid +: + typespecifierseq abstractdeclarator? +; + +abstractdeclarator +: + ptrabstractdeclarator + | noptrabstractdeclarator? parametersandqualifiers trailingreturntype + | abstractpackdeclarator +; + +ptrabstractdeclarator +: + noptrabstractdeclarator + | ptroperator ptrabstractdeclarator? +; + +noptrabstractdeclarator +: + noptrabstractdeclarator parametersandqualifiers + | parametersandqualifiers + | noptrabstractdeclarator '[' constantexpression? ']' attributespecifierseq? + | '[' constantexpression? ']' attributespecifierseq? + | '(' ptrabstractdeclarator ')' +; + +abstractpackdeclarator +: + noptrabstractpackdeclarator + | ptroperator abstractpackdeclarator +; + +noptrabstractpackdeclarator +: + noptrabstractpackdeclarator parametersandqualifiers + | noptrabstractpackdeclarator '[' constantexpression? ']' + attributespecifierseq? + | '...' +; + +parameterdeclarationclause +: + parameterdeclarationlist? '...'? + | parameterdeclarationlist ',' '...' +; + +parameterdeclarationlist // 参数列表 +: + parameterdeclaration + | parameterdeclarationlist ',' parameterdeclaration +; + +parameterdeclaration +: + attributespecifierseq? declspecifierseq declarator + | attributespecifierseq? declspecifierseq declarator '=' initializerclause + | attributespecifierseq? declspecifierseq abstractdeclarator? + | attributespecifierseq? declspecifierseq abstractdeclarator? '=' + initializerclause +; + +functiondefinition +: + attributespecifierseq? declspecifierseq? declarator virtspecifierseq? + functionbody +; + +functionbody // 函数体 +: + ctorinitializer? compoundstatement + | functiontryblock + | '=' Default ';' + | '=' Delete ';' +; + +initializer +: + braceorequalinitializer #initDeclWithAssignList + | '(' expressionlist ')' #initDeclWithCall +; + +braceorequalinitializer +: + '=' initializerclause #initDeclWithAssign// 普通赋值初始化 + | bracedinitlist #initDeclWithList // C++列表初始化 +; + +initializerclause //初始化语句 +: + assignmentexpression #normalAssign // 普通变量赋值 + | bracedinitlist #arrayAssign //数组,结构体赋值 +; + +initializerlist +: + initializerclause '...'? + | initializerlist ',' initializerclause '...'? +; + +bracedinitlist +: + '{' initializerlist ','? '}' + | '{' '}' +; + +/*Classes*/ +classname +: + Identifier + | simpletemplateid +; + +classspecifier +: + classhead '{' memberspecification? '}' +; + +classhead +: + classkey attributespecifierseq? classheadname classvirtspecifier? baseclause? + | classkey attributespecifierseq? baseclause? +; + +classheadname +: + nestednamespecifier? classname +; + +classvirtspecifier +: + Final +; + +classkey +: + Class + | Struct + | Union +; + +memberspecification // 结构体/类成员定义 +: + memberdeclaration memberspecification? + | accessspecifier ':' memberspecification? +; + +memberdeclaration +: + attributespecifierseq? declspecifierseq? memberdeclaratorlist? ';' #memberVarDecl + | functiondefinition #memberFuncDecl + | usingdeclaration #memberUsing + | static_assertdeclaration #memberStaticAssert + | templatedeclaration #memberTemplateDecl + | aliasdeclaration #memberAliasDecl + | emptydeclaration #memberEmpty +; + +memberdeclaratorlist +: + memberdeclarator + | memberdeclaratorlist ',' memberdeclarator +; + +memberdeclarator +: + declarator virtspecifierseq? purespecifier? + | declarator braceorequalinitializer? + | Identifier? attributespecifierseq? ':' constantexpression +; + +virtspecifierseq +: + virtspecifier + | virtspecifierseq virtspecifier +; + +virtspecifier +: + Override + | Final +; + +/* +purespecifier: + '=' '0'//Conflicts with the lexer + ; + */ +purespecifier +: + Assign val = Octalliteral + {if($val.text.compareTo("0")!=0) throw new InputMismatchException(this);} + +; + +/*Derived classes*/ +baseclause +: + ':' basespecifierlist +; + +basespecifierlist +: + basespecifier '...'? + | basespecifierlist ',' basespecifier '...'? +; + +basespecifier +: + attributespecifierseq? basetypespecifier + | attributespecifierseq? Virtual accessspecifier? basetypespecifier + | attributespecifierseq? accessspecifier Virtual? basetypespecifier +; + +classordecltype +: + nestednamespecifier? classname + | decltypespecifier +; + +basetypespecifier +: + classordecltype +; + +accessspecifier +: + Private + | Protected + | Public +; + +/*Special member functions*/ +conversionfunctionid +: + Operator conversiontypeid +; + +conversiontypeid +: + typespecifierseq conversiondeclarator? +; + +conversiondeclarator +: + ptroperator conversiondeclarator? +; + +ctorinitializer +: + ':' meminitializerlist +; + +meminitializerlist +: + meminitializer '...'? + | meminitializer '...'? ',' meminitializerlist +; + +meminitializer +: + meminitializerid '(' expressionlist? ')' + | meminitializerid bracedinitlist +; + +meminitializerid +: + classordecltype + | Identifier +; + +/*Overloading*/ +operatorfunctionid +: + Operator theoperator +; + +literaloperatorid +: + Operator Stringliteral Identifier + | Operator Userdefinedstringliteral +; + +/*Templates*/ +templatedeclaration +: + Template '<' templateparameterlist '>' declaration +; + +templateparameterlist +: + templateparameter + | templateparameterlist ',' templateparameter +; + +templateparameter +: + typeparameter + | parameterdeclaration +; + +typeparameter +: + Class '...'? Identifier? + | Class Identifier? '=' thetypeid + | Typename '...'? Identifier? + | Typename Identifier? '=' thetypeid + | Template '<' templateparameterlist '>' Class '...'? Identifier? + | Template '<' templateparameterlist '>' Class Identifier? '=' idexpression +; + +simpletemplateid +: + templatename '<' templateargumentlist? '>' +; + +templateid +: + simpletemplateid + | operatorfunctionid '<' templateargumentlist? '>' + | literaloperatorid '<' templateargumentlist? '>' +; + +templatename +: + Identifier +; + +templateargumentlist +: + templateargument '...'? + | templateargumentlist ',' templateargument '...'? +; + +templateargument +: + thetypeid + | constantexpression + | idexpression +; + +typenamespecifier +: + Typename nestednamespecifier Identifier + | Typename nestednamespecifier Template? simpletemplateid +; + +explicitinstantiation +: + Extern? Template declaration +; + +explicitspecialization +: + Template '<' '>' declaration +; + +/*Exception handling*/ +tryblock +: + Try compoundstatement handlerseq +; + +functiontryblock +: + Try ctorinitializer? compoundstatement handlerseq +; + +handlerseq +: + handler handlerseq? +; + +handler +: + Catch '(' exceptiondeclaration ')' compoundstatement +; + +exceptiondeclaration +: + attributespecifierseq? typespecifierseq declarator + | attributespecifierseq? typespecifierseq abstractdeclarator? + | '...' +; + +throwexpression +: + Throw assignmentexpression? +; + +exceptionspecification +: + dynamicexceptionspecification + | noexceptspecification +; + +dynamicexceptionspecification +: + Throw '(' typeidlist? ')' +; + +typeidlist +: + thetypeid '...'? + | typeidlist ',' thetypeid '...'? +; + +noexceptspecification +: + Noexcept '(' constantexpression ')' + | Noexcept +; + +/*Preprocessing directives*/ + +MultiLineMacro +: + '#' (~[\n]*? '\\' '\r'? '\n')+ ~[\n]+ -> channel(HIDDEN) +; + +Directive +: + '#' ~[\n]* -> channel(HIDDEN) +; + +/*Lexer*/ + +/*Keywords*/ +Alignas +: + 'alignas' +; + +Alignof +: + 'alignof' +; + +Asm +: + 'asm' +; + +Auto +: + 'auto' +; + +Bool +: + 'bool' +; + +Break +: + 'break' +; + +Case +: + 'case' +; + +Catch +: + 'catch' +; + +Char +: + 'char' +; + +Char16 +: + 'char16_t' +; + +Char32 +: + 'char32_t' +; + +Class +: + 'class' +; + +Const +: + 'const' +; + +Constexpr +: + 'constexpr' +; + +Const_cast +: + 'const_cast' +; + +Continue +: + 'continue' +; + +Decltype +: + 'decltype' +; + +Default +: + 'default' +; + +Delete +: + 'delete' +; + +Do +: + 'do' +; + +Double +: + 'double' +; + +Dynamic_cast +: + 'dynamic_cast' +; + +Else +: + 'else' +; + +Enum +: + 'enum' +; + +Explicit +: + 'explicit' +; + +Export +: + 'export' +; + +Extern +: + 'extern' +; + +FalseToken +: + 'false' +; + +Final +: + 'final' +; + +Float +: + 'float' +; + +For +: + 'for' +; + +Friend +: + 'friend' +; + +Goto +: + 'goto' +; + +If +: + 'if' +; + +Inline +: + 'inline' +; + +Int +: + 'int' +; + +Long +: + 'long' +; + +Mutable +: + 'mutable' +; + +Namespace +: + 'namespace' +; + +New +: + 'new' +; + +Noexcept +: + 'noexcept' +; + +Nullptr +: + 'nullptr' | 'NULL' +; + +Operator +: + 'operator' +; + +Override +: + 'override' +; + +Private +: + 'private' +; + +Protected +: + 'protected' +; + +Public +: + 'public' +; + +Register +: + 'register' +; + +Reinterpret_cast +: + 'reinterpret_cast' +; + +Return +: + 'return' +; + +Short +: + 'short' +; + +Signed +: + 'signed' +; + +Sizeof +: + 'sizeof' +; + +Static +: + 'static' +; + +Static_assert +: + 'static_assert' +; + +Static_cast +: + 'static_cast' +; + +Struct +: + 'struct' +; + +Switch +: + 'switch' +; + +Template +: + 'template' +; + +This +: + 'this' +; + +Thread_local +: + 'thread_local' +; + +Throw +: + 'throw' +; + +TrueToken +: + 'true' +; + +Try +: + 'try' +; + +Typedef +: + 'typedef' +; + +Typeid +: + 'typeid' +; + +Typename +: + 'typename' +; + +Union +: + 'union' +; + +Unsigned +: + 'unsigned' +; + +Using +: + 'using' +; + +Virtual +: + 'virtual' +; + +Void +: + 'void' +; + +Volatile +: + 'volatile' +; + +Wchar +: + 'wchar_t' +; + +While +: + 'while' +; + +/*Operators*/ +LeftParen +: + '(' +; + +RightParen +: + ')' +; + +LeftBracket +: + '[' +; + +RightBracket +: + ']' +; + +LeftBrace +: + '{' +; + +RightBrace +: + '}' +; + +Plus +: + '+' +; + +Minus +: + '-' +; + +Star +: + '*' +; + +Div +: + '/' +; + +Mod +: + '%' +; + +Caret +: + '^' +; + +And +: + '&' +; + +Or +: + '|' +; + +Tilde +: + '~' +; + +Not +: + '!' +; + +Assign +: + '=' +; + +Less +: + '<' +; + +Greater +: + '>' +; + +PlusAssign +: + '+=' +; + +MinusAssign +: + '-=' +; + +StarAssign +: + '*=' +; + +DivAssign +: + '/=' +; + +ModAssign +: + '%=' +; + +XorAssign +: + '^=' +; + +AndAssign +: + '&=' +; + +OrAssign +: + '|=' +; + +LeftShift +: + '<<' +; + +rightShift +: +//'>>' + Greater Greater +; + +LeftShiftAssign +: + '<<=' +; + +rightShiftAssign +: +//'>>=' + Greater Greater Assign +; + +Equal +: + '==' +; + +NotEqual +: + '!=' +; + +LessEqual +: + '<=' +; + +GreaterEqual +: + '>=' +; + +AndAnd +: + '&&' +; + +OrOr +: + '||' +; + +PlusPlus +: + '++' +; + +MinusMinus +: + '--' +; + +Comma +: + ',' +; + +ArrowStar +: + '->*' +; + +Arrow +: + '->' +; + +Question +: + '?' +; + +Colon +: + ':' +; + +Doublecolon +: + '::' +; + +Semi +: + ';' +; + +Dot +: + '.' +; + +DotStar +: + '.*' +; + +Ellipsis +: + '...' +; + +theoperator +: + New + | Delete + | New '[' ']' + | Delete '[' ']' + | '+' + | '-' + | '*' + | '/' + | '%' + | '^' + | '&' + | '|' + | '~' + | '!' + | '=' + | '<' + | '>' + | '+=' + | '-=' + | '*=' + | '/=' + | '%=' + | '^=' + | '&=' + | '|=' + | '<<' + | rightShift + | rightShiftAssign + | '<<=' + | '==' + | '!=' + | '<=' + | '>=' + | '&&' + | '||' + | '++' + | '--' + | ',' + | '->*' + | '->' + | '(' ')' + | '[' ']' +; + +/*Lexer*/ +fragment +Hexquad +: + HEXADECIMALDIGIT HEXADECIMALDIGIT HEXADECIMALDIGIT HEXADECIMALDIGIT +; + +fragment +Universalcharactername +: + '\\u' Hexquad + | '\\U' Hexquad Hexquad +; + +Identifier +: +/* + Identifiernondigit + | Identifier Identifiernondigit + | Identifier DIGIT + */ + Identifiernondigit + ( + Identifiernondigit + | DIGIT + )* +; + +fragment +Identifiernondigit +: + NONDIGIT + | Universalcharactername + /* other implementation defined characters*/ +; + +fragment +NONDIGIT +: + [a-zA-Z_] +; + +fragment +DIGIT +: + [0-9] +; + +literal +: + Integerliteral + | Characterliteral + | Floatingliteral + | Stringliteral + | booleanliteral + | pointerliteral + | userdefinedliteral +; + +Integerliteral +: + Decimalliteral Integersuffix? + | Octalliteral Integersuffix? + | Hexadecimalliteral Integersuffix? + | Binaryliteral Integersuffix? +; + +Decimalliteral +: + NONZERODIGIT + ( + '\''? DIGIT + )* +; + +Octalliteral +: + '0' + ( + '\''? OCTALDIGIT + )* +; + +Hexadecimalliteral +: + ( + '0x' + | '0X' + ) HEXADECIMALDIGIT + ( + '\''? HEXADECIMALDIGIT + )* +; + +Binaryliteral +: + ( + '0b' + | '0B' + ) BINARYDIGIT + ( + '\''? BINARYDIGIT + )* +; + +fragment +NONZERODIGIT +: + [1-9] +; + +fragment +OCTALDIGIT +: + [0-7] +; + +fragment +HEXADECIMALDIGIT +: + [0-9a-fA-F] +; + +fragment +BINARYDIGIT +: + [01] +; + +Integersuffix +: + Unsignedsuffix Longsuffix? + | Unsignedsuffix Longlongsuffix? + | Longsuffix Unsignedsuffix? + | Longlongsuffix Unsignedsuffix? +; + +fragment +Unsignedsuffix +: + [uU] +; + +fragment +Longsuffix +: + [lL] +; + +fragment +Longlongsuffix +: + 'll' + | 'LL' +; + +Characterliteral +: + '\'' Cchar+ '\'' + | 'u' '\'' Cchar+ '\'' + | 'U' '\'' Cchar+ '\'' + | 'L' '\'' Cchar+ '\'' +; + +fragment +Cchar +: + ~['\\\r\n] + | Escapesequence + | Universalcharactername +; + +fragment +Escapesequence +: + Simpleescapesequence + | Octalescapesequence + | Hexadecimalescapesequence +; + +fragment +Simpleescapesequence +: + '\\\'' + | '\\"' + | '\\?' + | '\\\\' + | '\\a' + | '\\b' + | '\\f' + | '\\n' + | '\\r' + | '\\t' + | '\\v' +; + +fragment +Octalescapesequence +: + '\\' OCTALDIGIT + | '\\' OCTALDIGIT OCTALDIGIT + | '\\' OCTALDIGIT OCTALDIGIT OCTALDIGIT +; + +fragment +Hexadecimalescapesequence +: + '\\x' HEXADECIMALDIGIT+ +; + +Floatingliteral +: + Fractionalconstant Exponentpart? Floatingsuffix? + | Digitsequence Exponentpart Floatingsuffix? +; + +fragment +Fractionalconstant +: + Digitsequence? '.' Digitsequence + | Digitsequence '.' +; + +fragment +Exponentpart +: + 'e' SIGN? Digitsequence + | 'E' SIGN? Digitsequence +; + +fragment +SIGN +: + [+-] +; + +fragment +Digitsequence +: + DIGIT + ( + '\''? DIGIT + )* +; + +fragment +Floatingsuffix +: + [flFL] +; + +Stringliteral +: + Encodingprefix? '"' Schar* '"' + | Encodingprefix? 'R' Rawstring +; + +fragment +Encodingprefix +: + 'u8' + | 'u' + | 'U' + | 'L' +; + +fragment +Schar +: + ~["\\\r\n] + | Escapesequence + | Universalcharactername +; + +fragment +Rawstring /* '"' dcharsequence? '(' rcharsequence? ')' dcharsequence? '"' */ +: + '"' .*? '(' .*? ')' .*? '"' +; + +booleanliteral +: + FalseToken + | TrueToken +; + +pointerliteral +: + Nullptr +; + +userdefinedliteral +: + Userdefinedintegerliteral + | Userdefinedfloatingliteral + | Userdefinedstringliteral + | Userdefinedcharacterliteral +; + +Userdefinedintegerliteral +: + Decimalliteral Udsuffix + | Octalliteral Udsuffix + | Hexadecimalliteral Udsuffix + | Binaryliteral Udsuffix +; + +Userdefinedfloatingliteral +: + Fractionalconstant Exponentpart? Udsuffix + | Digitsequence Exponentpart Udsuffix +; + +Userdefinedstringliteral +: + Stringliteral Udsuffix +; + +Userdefinedcharacterliteral +: + Characterliteral Udsuffix +; + +fragment +Udsuffix +: + Identifier +; + +Whitespace +: + [ \t]+ -> skip +; + +Newline +: + ( + '\r' '\n'? + | '\n' + ) -> skip +; + +BlockComment +: + '/*' .*? '*/' -> skip +; + +LineComment +: + '//' ~[\r\n]* -> skip +; \ No newline at end of file diff --git a/resources/calleeInfos.json b/resources/calleeInfos.json new file mode 100644 index 0000000..1086166 --- /dev/null +++ b/resources/calleeInfos.json @@ -0,0 +1,193 @@ +{ + "ArgDefs": { + "fgets": [2], + "gets": [0], + "fread": [0], + "snprintf": [0], + + "free": [0], + "qsort": [0], + + "bcopy": [1], + "memccpy": [0], + "memcpy": [0], + "setmem": [0], + "memset": [0], + "movmem": [1], + "memmove": [0], + "stpcpy": [0], + "strcpy": [0], + "strcat": [0], + "strlwr": [0], + "strupr": [0], + "strncat": [0], + "strncpy": [0], + "strset": [0], + + "fgetws": [0], + "swprintf": [0], + "swscanf": [0], + "vswprintf": [0], + + "mbrtowc": [0], + "mbsrtowcs": [0], + "wcrtomb": [0], + "wcsrtombs": [0], + + "wcscat": [0], + "wcscpy": [0], + "wcsncat": [0], + "wcsncpy": [0], + "wcstok": [3], + "wcsxfrm": [0], + "wmemcpy": [0], + "wmemmove": [0], + "wmemset": [0], + + "wcsftime": [3] + }, + "ArgUses": { + "fopen": [0, 1], + "freopen": [0, 1, 2], + "fflush": [0], + "fclose": [0], + "remove": [0], + "rename": [0, 1], + "tmpnam": [0], + "setvbuf": [0, 1], + "fprintf": [0, 1], + "scanf": [0], + "fscanf": [0, 1], + "fgetc": [0], + "fgets": [0], + "fputc": [1], + "getc": [0], + "puts": [0], + "ungetc": [1], + "fread": [3], + "fwrite": [0, 3], + "ftell": [0], + "rewind": [0], + "fgetpos": [0], + "fsetpos": [0, 1], + "clearerr": [0], + "feof": [0], + "ferror": [0], + "perror": [0], + "snprintf": [2], + + "atof": [0], + "atoi": [0], + "atol": [0], + "strtod": [0, 1], + "strtol": [0, 1], + "realloc": [0], + "getenv": [0], + + "bsearch": [0, 1, 2], + + "time": [0], + "mktime": [0], + "asctime": [0], + "ctime": [0], + "gmtime": [0], + "localtime": [0], + "strftime": [0, 1], + + "bcmp": [0, 1], + "bcopy": [0], + "bzero": [0], + "memccpy": [1], + "memchr": [0], + "memcpy": [1], + "memcmp": [0, 1], + "memicmp": [0, 1], + "memmove": [1], + "movmem": [0], + "stpcpy": [1], + "strcpy": [1], + "strcat": [1], + "strchr": [0], + "strcmp": [0, 1], + "stricmp": [0, 1], + "strcspn": [0, 1], + "strdup": [0], + "strlen": [0], + "strncat": [1], + "strnicmp": [0, 1], + "strncpy": [1], + "strpbrk": [0, 1], + "strrev": [0], + "strstr": [0], + "strtok": [0], + + "fgetwc": [0], + "fgetws": [1], + "fputwc": [1], + "fputws": [0, 1], + "fwide": [0], + "fwprintf": [0, 1], + "fwscanf": [0, 1], + "getwc": [0], + "putwc": [1], + "swprintf": [2], + "ungetwc": [1], + + "vfwprintf": [0, 1], + "vfwscanf": [0, 1], + "vswprintf": [2], + "vswscanf": [0, 1], + "vwprintf": [0], + "vwscanf": [0], + "wprintf": [0], + "wscanf": [0], + + "wcstod": [0, 1], + "wcstof": [0, 1], + "wcstol": [0, 1], + "wcstold": [0, 1], + "strtoll": [0, 1], + "wcstoul": [0, 1], + "wcstoull": [0, 1], + + "mbrlen": [0, 2], + "mbrtowc": [1, 3], + "mbsinit": [0], + "mbsrtowcs": [1, 3], + "wcrtomb": [2], + "wcsrtombs": [1, 3], + + "wcscat": [1], + "wcschr": [0], + "wcscmp": [0, 1], + "wcscoll": [0, 1], + "wcscpy": [1], + "wcscspn": [0, 1], + "wcslen": [0], + "wcsncat": [1], + "wcsncmp": [0, 1], + "wcsncpy": [1], + "wcspbrk": [0, 1], + "wcsrchr": [0], + "wcsspn": [0, 1], + "wcsstr": [0, 1], + "wcstok": [0, 1], + "wcsxfrm": [1], + "wmemchr": [0], + "wmemcmp": [0, 1], + "wmemcpy": [1], + "wmemmove": [1], + + "wcsftime": [0, 2] + }, + "ArgDefStartIds": { + "scanf": [1], + "fscanf": [2], + "fwscanf": [2], + "swscanf": [2], + "vfwscanf": [2], + "vswscanf": [2], + "vwscanf": [1], + "wscanf": [1] + } +} \ No newline at end of file diff --git a/test/extraToolTests/__init__.py b/test/extraToolTests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/extraToolTests/deepwukongTest.py b/test/extraToolTests/deepwukongTest.py new file mode 100644 index 0000000..697bd4b --- /dev/null +++ b/test/extraToolTests/deepwukongTest.py @@ -0,0 +1,144 @@ +from extraTools.vuldetect.deepwukong import * +from time import time + + + + +def test(): + start = time() + fileName = "../testfiles/sard_test_cases/CWE_119_124_fscanf.c" + file1: str = "../testfiles/sard_test_cases/io.c" + calleeInfs = { + "ArgDef": { + "memcpy": [0], + "memmove": [0], + "memset": [0], + "fgets": [0], + "recv": [1], + }, + "ArgUse": { + "memcpy": [1], + "memmove": [1], + "memset": [1] + }, + "ArgDefStartIds": { + "scanf": 1, + "fscanf": 2 + } + } + + systemDefinedFuncs: Set[str] = { "main", "memset", "memmove", "fscanf", "time", "printf", "wprintf", "puts" + "sscanf", "isxdigit", "iswxdigit", "swscanf", "rand"} + systemDefinedVars: Set[str] = { "argc", "argv", "stdin", "stdout", "cin", "cout" } + + calleeInfos = initialCalleeInfos(calleeInfs) + converter: CFGToUDGConverter = CFGToUDGConverter() + defUseConverter: CFGAndUDGToDefUseCFG = CFGAndUDGToDefUseCFG() + ddgCreator: DDGCreator = DDGCreator() + cpgs: List[CPG] = fileParse(fileName, calleeInfos, converter, defUseConverter, ddgCreator) + for cpg in cpgs: + cpg.file = fileName + symbolizingTool: SymbolizingTool = SymbolizingTool(systemDefinedVars, systemDefinedFuncs) + symbolizingTool.getVarFuncNamesInFile(cpgs) + print(symbolizingTool.func2symbol) + print(symbolizingTool.var2symbol) + + print("======================================") + + sensitive_apis: Set[str] = {"malloc", "memset"} + sliceTool: XFGSliceTool = XFGSliceTool(cpgs, sensitive_apis, symbolizingTool) + sliceTool.generateSliceForProgram() + + for slice in sliceTool.slices: + for key, value in slice.toJson().items(): + print(key) + print(value) + print("======================") + + end = time() + print(end - start) + return + + + +def testGenerateSlices(): + file1: str = "../testfiles/sard_test_cases/io.c" + file2: str = "../testfiles/sard_test_cases/CWE_119_122_switch.c" + + testfiles: List[str] = ["../testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53a.c", + "../testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53b.c", + "../testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53c.c", + "../testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53d.c"] + + calleeInfs = { + "ArgDef": { + "memcpy": [0], + "memmove": [0], + "memset": [0], + "fgets": [0], + "recv": [1], + "free": [0] + }, + "ArgUse": { + "memcpy": [1], + "memmove": [1], + "memset": [1], + "connect": [1] + }, + "ArgDefStartIds": { + "scanf": 1, + "fscanf": 2 + } + } + + start = time() + systemDefinedFuncs: Set[str] = {"main", "memset", "memmove", "fscanf", "time", "printf", "wprintf", "puts", + "sscanf", "isxdigit", "iswxdigit", "swscanf", "rand", "exit", + "malloc", "free", "srand", "WSAStartup", "socket", "connect", + "inet_addr", "htons", "recv", "CLOSE_SOCKET", "WSACleanup"} + systemDefinedVars: Set[str] = {"argc", "argv", "stdin", "stdout", "cin", "cout", "SOCKET_ERROR"} + sensitive_apis: Set[str] = { "malloc", "memset" } + + calleeInfos = initialCalleeInfos(calleeInfs) + converter: CFGToUDGConverter = CFGToUDGConverter() + defUseConverter: CFGAndUDGToDefUseCFG = CFGAndUDGToDefUseCFG() + ddgCreator: DDGCreator = DDGCreator() + cpgsCommon: List[CPG] = fileParse(file1, calleeInfos, converter, defUseConverter, ddgCreator) # print et al + for cpg in cpgsCommon: + cpg.joinSlice = False + cpg.file = file1 + + # cpgsMain: List[CPG] = fileParse(file2, calleeInfos, converter, defUseConverter, ddgCreator) # print et al + # for cpg in cpgsMain: + # cpg.file = file2 + cpgMainss: List[CPG] = list() + for testfile in testfiles: + cpgMains: List[CPG] = fileParse(testfile, calleeInfos, converter, defUseConverter, ddgCreator) + for cpg in cpgMains: + cpg.file = testfile + cpgMainss.extend(cpgMains) + + cpgs = cpgsCommon + cpgMainss + + symbolizingTool: SymbolizingTool = SymbolizingTool(systemDefinedVars, systemDefinedFuncs) + symbolizingTool.getVarFuncNamesInFile(cpgs) + + print(symbolizingTool.var2symbol) + print(symbolizingTool.func2symbol) + print("======================================") + + sliceTool: XFGSliceTool = XFGSliceTool(cpgs, sensitive_apis, symbolizingTool) + sliceTool.generateSliceForProgram() + + for slice in sliceTool.slices: + for key, value in slice.toJson().items(): + print(key) + print(value) + print("======================") + + end = time() + print(end - start) + return + +if __name__ == '__main__': + test() \ No newline at end of file diff --git a/test/extraToolTests/ivdetectTest.py b/test/extraToolTests/ivdetectTest.py new file mode 100644 index 0000000..158dbb1 --- /dev/null +++ b/test/extraToolTests/ivdetectTest.py @@ -0,0 +1,139 @@ +from extraTools.vuldetect.ivdetect import * + +from mainTool.ast.builders import * +from mainTool.cfg.CCFG import * +from mainTool.CPG import * + +from antlr4.tree.Tree import ParseTree, ParseTreeWalker + +walker: ParseTreeWalker = ParseTreeWalker() + +def getParser(code: str) -> CPP14Parser: + inputStream = InputStream(code) + cpp14Lexer = CPP14Lexer(inputStream) + tokenStream = CommonTokenStream(cpp14Lexer) + parser = CPP14Parser(tokenStream) + return parser + +def varGeneratingTest(): + callStmt: str = 'memset(source, dst, 100);' + declStmt: str = "unsigned int a = b + c, d{a}, e(8);" + declStmt1: str = "char aa ='A', bb{'B'}, cc('C'), **dd(NULL);" + declStmt2: str = "int aa = addr < TASK_SIZE_MAX ? 1 : a;" # 三目表达式初始化赋值 + declStmt3: str = "unsigned int test::m_value1 = 0, ::a = stu->score, *bb(4);" + + parser: CPP14Parser = getParser(declStmt2) + tree: ParseTree = parser.simpledeclaration() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + + astNode: ASTNode = builder.stack.pop() + astVarAnalyzer: ASTVarAnalyzer = ASTVarAnalyzer() + provider: ASTNodeASTProvider = ASTNodeASTProvider() + provider.node = astNode + astVarAnalyzer.analyzeAST(provider) + + return + + +astAnalyzer: ASTDefUseAnalyzer = ASTDefUseAnalyzer() +calleeInfos: CalleeInfos = CalleeInfos() + +calleeInfos.addArgDef("memcpy", 0) +calleeInfos.addArgUse("memcpy", 1) +calleeInfos.addArgDef("memmove", 0) +calleeInfos.addArgUse("memmove", 1) +calleeInfos.addArgDef("memset", 0) +calleeInfos.addArgDef("fgets", 0) +calleeInfos.addArgDef("recv", 1) +calleeInfos.addArgDefStartIds("scanf", 1) +astAnalyzer.calleeInfos = calleeInfos + + +def feature3_4_5_Test(): + code = "static void goodG2B2(int a)\n" + \ + "{\n" + \ + " char * data;\n" + \ + " data = NULL;\n" + \ + " switch(6)\n" + \ + " {\n" + \ + " case 6:\n" + \ + " /* FIX: Allocate and point data to a large buffer that is at least as large as the large buffer used in the sink */\n" + \ + " data = (char *)malloc(100*sizeof(char));\n" + \ + " if (data == NULL) {exit(-1);}\n" + \ + " data[0] = '\\0'; /* null terminate */\n" + \ + " break;\n" + \ + " default:\n" + \ + " /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */\n" + \ + " printLine(\"Benign, fixed string\");\n" + \ + " break;\n" + \ + " }\n" + \ + " {\n" + \ + " size_t i;\n" + \ + " char source[100];\n" + \ + " memset(source, 'C', 100-1); /* fill with 'C's */\n" + \ + " source[100-1] = '\\0'; /* null terminate */\n" + \ + " /* POTENTIAL FLAW: Possible buffer overflow if source is larger than data */\n" + \ + " for (i = 0; i < 100; i++)\n" + \ + " {\n" + \ + " data[i] = source[i];\n" + \ + " }\n" + \ + " data[100-1] = '\\0'; /* Ensure the destination buffer is null terminated */\n" + \ + " printLine(data);\n" + \ + " free(data);\n" + \ + " }\n" + \ + "}" + + code1 = "static inline void init_copy_chunk_defaults(struct cifs_tcon *tcon){\n" \ + " tcon->max_chunks = 256;\n" \ + " tcon->max_bytes_chunk = 1048576;\n" \ + " tcon->max_bytes_copy = 16777216;\n" \ + "}" + + code2 = "int is_valid_bugaddr(unsigned long addr){\n" \ + " unsigned short ud;\n" \ + " if (addr < TASK_SIZE_MAX)\n" \ + " return 0;\n" \ + " if (probe_kernel_address((unsigned short *)addr, ud))\n" \ + " return 0;\n" \ + " return ud == INSN_UD0 || ud == INSN_UD2;\n}" + + + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.functiondefinition() + builder: FunctionDefBuilder = FunctionDefBuilder() + walker.walk(builder, tree) + + functionDef: FunctionDef = builder.functionDef + cfg: CFG = ASTToCFGConvert(functionDef) + cdg: CDG = createCDG(cfg) + # UDG + converter: CFGToUDGConverter = CFGToUDGConverter() + converter.astAnalyzer = astAnalyzer + useDefGraph: UseDefGraph = converter.convert(cfg) + + # DefUseCFG + defUseConverter: CFGAndUDGToDefUseCFG = CFGAndUDGToDefUseCFG() + defUseCFG: DefUseCFG = defUseConverter.convert(cfg, useDefGraph) + + # Data Dependence Graph + ddgCreator: DDGCreator = DDGCreator() + ddg: DDG = ddgCreator.createForDefUseCFG(defUseCFG) + + cpg: CPG = CPG() + cpg.initCFGEdges(cfg) + cpg.initCDGEdges(cdg) + cpg.initDDGEdges(ddg) + + varLists = generate_feature3(cpg.statements) + for varList in varLists: + print(varList) + + feature4s: List[List[List[str]]] = generate_feature4(cpg) + feature5s: List[List[List[str]]] = generate_feature5(cpg) + return + + +if __name__ == '__main__': + feature3_4_5_Test() \ No newline at end of file diff --git a/test/extraToolTests/sysevrTest.py b/test/extraToolTests/sysevrTest.py new file mode 100644 index 0000000..b1612e0 --- /dev/null +++ b/test/extraToolTests/sysevrTest.py @@ -0,0 +1,127 @@ +from extraTools.vuldetect.sysevr import * +from time import time + + +def test(): + start = time() + fileName = "../testfiles/sard_test_cases/CWE_119_124_fscanf.c" + file1: str = "../testfiles/sard_test_cases/io.c" + calleeInfs = { + "ArgDef": { + "memcpy": [0], + "memmove": [0], + "memset": [0], + "fgets": [0], + "recv": [1], + }, + "ArgUse": { + "memcpy": [1], + "memmove": [1], + "memset": [1] + }, + "ArgDefStartIds": { + "scanf": 1, + "fscanf": 2 + } + } + + systemDefinedFuncs: Set[str] = { "main", "memset", "memmove", "fscanf", "time", "printf", "wprintf", "puts" + "sscanf", "isxdigit", "iswxdigit", "swscanf", "rand"} + systemDefinedVars: Set[str] = { "argc", "argv", "stdin", "stdout", "cin", "cout" } + + calleeInfos = initialCalleeInfos(calleeInfs) + converter: CFGToUDGConverter = CFGToUDGConverter() + defUseConverter: CFGAndUDGToDefUseCFG = CFGAndUDGToDefUseCFG() + ddgCreator: DDGCreator = DDGCreator() + cpgs: List[CPG] = fileParse(file1, calleeInfos, converter, defUseConverter, ddgCreator) + symbolizingTool: SymbolizingTool = SymbolizingTool(systemDefinedVars, systemDefinedFuncs) + symbolizingTool.getVarFuncNamesInFile(cpgs) + print(symbolizingTool.func2symbol) + print(symbolizingTool.var2symbol) + end = time() + print(end - start) + return + + + +def testGenerateSlices(): + file1: str = "../testfiles/sard_test_cases/io.c" + file2: str = "../testfiles/sard_test_cases/CWE_119_122_switch.c" + + testfiles: List[str] = ["../testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53a.c", + "../testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53b.c", + "../testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53c.c", + "../testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53d.c"] + + calleeInfs = { + "ArgDef": { + "memcpy": [0], + "memmove": [0], + "memset": [0], + "fgets": [0], + "recv": [1], + "free": [0] + }, + "ArgUse": { + "memcpy": [1], + "memmove": [1], + "memset": [1], + "connect": [1] + }, + "ArgDefStartIds": { + "scanf": 1, + "fscanf": 2 + } + } + + start = time() + systemDefinedFuncs: Set[str] = {"main", "memset", "memmove", "fscanf", "time", "printf", "wprintf", "puts", + "sscanf", "isxdigit", "iswxdigit", "swscanf", "rand", "exit", + "malloc", "free", "srand", "WSAStartup", "socket", "connect", + "inet_addr", "htons", "recv", "CLOSE_SOCKET", "WSACleanup"} + systemDefinedVars: Set[str] = {"argc", "argv", "stdin", "stdout", "cin", "cout", "SOCKET_ERROR"} + sensitive_apis: Set[str] = { "malloc", "memset" } + + calleeInfos = initialCalleeInfos(calleeInfs) + converter: CFGToUDGConverter = CFGToUDGConverter() + defUseConverter: CFGAndUDGToDefUseCFG = CFGAndUDGToDefUseCFG() + ddgCreator: DDGCreator = DDGCreator() + cpgsCommon: List[CPG] = fileParse(file1, calleeInfos, converter, defUseConverter, ddgCreator) # print et al + for cpg in cpgsCommon: + cpg.joinSlice = False + cpg.file = file1 + + # cpgsMain: List[CPG] = fileParse(file2, calleeInfos, converter, defUseConverter, ddgCreator) # print et al + # for cpg in cpgsMain: + # cpg.file = file2 + cpgMainss: List[CPG] = list() + for testfile in testfiles: + cpgMains: List[CPG] = fileParse(testfile, calleeInfos, converter, defUseConverter, ddgCreator) + for cpg in cpgMains: + cpg.file = testfile + cpgMainss.extend(cpgMains) + + cpgs = cpgsCommon + cpgMainss + + symbolizingTool: SymbolizingTool = SymbolizingTool(systemDefinedVars, systemDefinedFuncs) + symbolizingTool.getVarFuncNamesInFile(cpgs) + + print(symbolizingTool.var2symbol) + print(symbolizingTool.func2symbol) + print("======================================") + + sliceTool: SySeSliceTool = SySeSliceTool(cpgs, sensitive_apis, symbolizingTool) + sliceTool.generateSliceForProgram() + + for slice in sliceTool.slices: + for key, value in slice.toJson().items(): + print(key) + print(value) + print("======================") + + end = time() + print(end - start) + return + +if __name__ == '__main__': + testGenerateSlices() \ No newline at end of file diff --git a/test/mainToolTests/ASTBuildTest.py b/test/mainToolTests/ASTBuildTest.py new file mode 100644 index 0000000..fb605c5 --- /dev/null +++ b/test/mainToolTests/ASTBuildTest.py @@ -0,0 +1,317 @@ +from mainTool.antlr.CPP14Lexer import CPP14Lexer, InputStream, CommonTokenStream +from mainTool.ast.builders import * + +from antlr4.tree.Tree import ParseTree, ParseTreeWalker + +walker: ParseTreeWalker = ParseTreeWalker() + +def getParser(code: str) -> CPP14Parser: + inputStream = InputStream(code) + cpp14Lexer = CPP14Lexer(inputStream) + tokenStream = CommonTokenStream(cpp14Lexer) + parser = CPP14Parser(tokenStream) + return parser + +def testFunctionCall(): + code: str = 'func(a, b + c);' + code1: str = "func();" + parser: CPP14Parser = getParser(code1) + tree: ParseTree = parser.statement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + +def testSizeofExpr(): + code: str = 'sizeof a' + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.sizeofExpression() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(AssignmentExpr()) + walker.walk(builder, tree) + return + +def testSimpleCast(): + code: str = "char(a + b * c)" + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.postfixexpression() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(AssignmentExpr()) + walker.walk(builder, tree) + return + +def testCast(): + code: str = "(struct TestClass)a" + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.castexpression() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(AssignmentExpr()) + walker.walk(builder, tree) + return + +def testCppCast(): + code: str = "static_cast(7.987)" + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.postfixexpression() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(AssignmentExpr()) + walker.walk(builder, tree) + return + + +def testIdentifierDeclSimple(): + code: str = "unsigned int a, *p, **pp;" + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.simpledeclaration() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + + +def testIdentifierDeclWithAssign(): + # typedef + codeType: str = "typedef long long LL;" + + # C语言初始化 + code: str = "unsigned int a = b + c, d{a}, e(8);" + code1: str = "char aa ='A', bb{'B'}, cc('C'), **dd(NULL);" + code2: str = "char source[100], *dst[100], p[50][40];" # 数组定义 + code3: str = "char source[100] = L'A';" # 数组初始化 + code4: str = "int data[100] = {1, 2, 3, 4};" + code5: str = "struct ST s = {1, 'a'};" # 结构体初始化 + code6: str = "struct ST s(1, 'a');" # 构造函数初始化 + code7: str = "int aa = b > 1 ? 1 : a;" # 三目表达式初始化赋值 + + # C++初始化 + cppCpde: str = "vector v4{10,1};" + + # const int + Ccode: str = "const int a = char(1);" + autoCode: str = "auto a = &i;" + # static variable + staticCode: str = "unsigned int test::m_value1 = 0, ::a = 1, *bb(4);" + staticCode1: str = "singleton *singleton::m_instance= NULL;" + + parser: CPP14Parser = getParser(staticCode1) + tree: ParseTree = parser.simpledeclaration() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + + +def testNewExpression(): + code: str = "unsigned int **p = new unsigned int* [10];" + code1: str = "int *a = new(buf) int[a+b];" + code2: str = "Fun* ptr1 = new Fun;" + + parser: CPP14Parser = getParser(code2) + tree: ParseTree = parser.simpledeclaration() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + + +def testDeleteExpression(): + baseDelete: str = "delete [] p;" + arrayDelete: str = "delete [] p[i][j];" + ptrDelete: str = "delete [] *(p+1);" + + parser: CPP14Parser = getParser(ptrDelete) + tree: ParseTree = parser.deleteexpression() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + + +def testThrowExpression(): + throwExpr: str = "throw -1;" + throwExpr2: str = "throw \"error msg\";" + + parser: CPP14Parser = getParser(throwExpr) + tree: ParseTree = parser.expressionstatement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + +def testStd(): + code: str = "std::cout << \"yes\" << a << endl;" + code1: str = "recvResult = recv(connectSocket, (char*)(data+dataLen) , sizeof(char)*(FILENAME_MAX-dataLen-1), 0);" + + parser: CPP14Parser = getParser(code1) + tree: ParseTree = parser.expressionstatement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + + +def testSelectionStatement(): + ifElseCode: str = "if (a == 1)\n" + \ + " a = 1;\n" + \ + "else if (a == 2)\n" + \ + " a = 2;\n" + \ + "else \n" + \ + " a = 3;" + ifCode1: str = "if (staticFalse){ exit(-1); goto loop; *p = a * b; return a + 1; }" + + switchCode = "switch (staticTrue){\n" + \ + " case 1:\n" + \ + " test::a = 1;\n" + \ + " break;\n" + \ + " case 2:\n" + \ + " a = 2;\n" + \ + " break;\n" + \ + " default:\n" + \ + " a = 3;\n" + \ + "}" + + parser: CPP14Parser = getParser(switchCode) + tree: ParseTree = parser.selectionstatement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + +def testMemberAccess(): + memberaccessExpr: str = "a.x = 1;" + memberCall: str = "a.f(x, y);" + + parser: CPP14Parser = getParser(memberCall) + tree: ParseTree = parser.expressionstatement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + +def testArrayAccess(): + stmt: str = "arr[i] = 1;" + stmt1: str = "*(p + i) = 2;" + stmt2: str = "f.ar[i] = 1;" + + parser: CPP14Parser = getParser(stmt1) + tree: ParseTree = parser.expressionstatement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + + +def testTryCatch(): + code: str = "try{\n" + \ + " const int& a = 1;\n" + \ + " }catch(const int& e){\n" + \ + " }catch(...){\n" + \ + " }" + + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.tryblock() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + return + + +def testIteration(): + stmt: str = "while(x <= 1){\n" + \ + " x++;\n" + \ + " ++x;\n" + \ + " x+=1;\n" + \ + "}" + + stmt1: str = "do {\n" + \ + " int a = sizeof(int);\n" + \ + " b = sizeof(a);\n" + \ + "}while(a + b <= 4);" + + stmt2: str = "for(int i = 0; i < 10; ++i);" + + stmt3: str = "for (unsigned int * p: vec){\n" + \ + " unsigned int a = b + c, d{a}, e(8);\n" + \ + " char source[100], *dst[100], p[50][40];\n" + \ + " }" + + parser: CPP14Parser = getParser(stmt) + tree: ParseTree = parser.iterationstatement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(Statement()) + walker.walk(builder, tree) + return + + + +def FunctionDefBuilderTest(): + code: str = "struct ST* c1::func(unsigned int *a = NULL, struct ST s){\n" + \ + " int a = 1;\n" + \ + "}" + + code1: str = "char* func1(unsigned int a[], int aa = 1){\n" + \ + " int c = a[0] + aa;\n" + \ + "}" + + code2: str = "#ifdef INCLUDEMAIN\n" + \ + "\n" + \ + "int main(int argc, char * argv[])\n" + \ + "{\n" + \ + " /* seed randomness */\n" + \ + " srand( (unsigned int)time(NULL) );\n" + \ + "#ifndef OMITGOOD\n" + \ + " printLine(\"Calling good()...\");\n" + \ + " CWE127_Buffer_Underread__wchar_t_declare_memmove_68_good();\n" + \ + " printLine(\"Finished good()\");\n" + \ + "#endif /* OMITGOOD */\n" + \ + "#ifndef OMITBAD\n" + \ + " printLine(\"Calling bad()...\");\n" + \ + " CWE127_Buffer_Underread__wchar_t_declare_memmove_68_bad();\n" + \ + " printLine(\"Finished bad()\");\n" + \ + "#endif /* OMITBAD */\n" + \ + " return 0;\n" + \ + "}\n" + \ + "\n" + \ + "#endif" + + parser: CPP14Parser = getParser(code2) + tree: ParseTree = parser.functiondefinition() + builder: FunctionDefBuilder = FunctionDefBuilder() + # builder.stack.append(Statement()) + walker.walk(builder, tree) + return + + +def ClassDefBuilderTest(): + code: str = "class c1{\n" + \ + " private:\n" + \ + " unsigned int* cccc(int a[], char **p){\n" + \ + " int aa = char(c);\n" + \ + " }\n" + \ + "};" + + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.translationunit() + builder: ClassDefBuilder = ClassDefBuilder() + walker.walk(builder, tree) + return + + +def FileBuilderTest(): + fileName: str = "testfiles/sard_test_cases/CWE_119_124_class_method_decl.c" + fileName1: str = "testfiles/ComplexStruct.c" + + code = open(fileName, 'r', encoding='utf-8').read() + # inputStream: InputStream = FileStream(fileName1) + parser = getParser(code) + # cpp14Lexer = CPP14Lexer(inputStream) + # tokenStream = CommonTokenStream(cpp14Lexer) + # parser = CPP14Parser(tokenStream) + tree: ParseTree = parser.translationunit() + builder: FileBuilder = FileBuilder() + walker.walk(builder, tree) + return + + +if __name__ == '__main__': + testIteration() \ No newline at end of file diff --git a/test/mainToolTests/CDGBuildTest.py b/test/mainToolTests/CDGBuildTest.py new file mode 100644 index 0000000..9212ef4 --- /dev/null +++ b/test/mainToolTests/CDGBuildTest.py @@ -0,0 +1,148 @@ +from mainTool.cdg.CDG import * +from mainTool.antlr.CPP14Lexer import CPP14Lexer, InputStream, CommonTokenStream +from antlr4.tree.Tree import ParseTree +from mainTool.ast.builders import * + +from mainTool.cfg.CCFG import * + +walker: ParseTreeWalker = ParseTreeWalker() + +code: str = "static void goodG2B2()\n" + \ + "{\n" + \ + " char * data;\n" + \ + " data = NULL;\n" + \ + " switch(6)\n" + \ + " {\n" + \ + " case 6:\n" + \ + " /* FIX: Allocate and point data to a large buffer that is at least as large as the large buffer used in the sink */\n" + \ + " data = (char *)malloc(100*sizeof(char));\n" + \ + " if (data == NULL) {exit(-1);}\n" + \ + " data[0] = '\\0'; /* null terminate */\n" + \ + " break;\n" + \ + " default:\n" + \ + " /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */\n" + \ + " printLine(\"Benign, fixed string\");\n" + \ + " break;\n" + \ + " }\n" + \ + " {\n" + \ + " size_t i;\n" + \ + " char source[100];\n" + \ + " memset(source, 'C', 100-1); /* fill with 'C's */\n" + \ + " source[100-1] = '\\0'; /* null terminate */\n" + \ + " /* POTENTIAL FLAW: Possible buffer overflow if source is larger than data */\n" + \ + " for (i = 0; i < 100; i++)\n" + \ + " {\n" + \ + " data[i] = source[i];\n" + \ + " }\n" + \ + " data[100-1] = '\\0'; /* Ensure the destination buffer is null terminated */\n" + \ + " printLine(data);\n" + \ + " free(data);\n" + \ + " }\n" + \ + "}" + +code1: str = "void CWE124_Buffer_Underwrite__CWE839_fscanf_17_bad()\n" + \ + "{\n" + \ + " int i,j;\n" + \ + " int data;\n" + \ + " /* Initialize data */\n" + \ + " data = -1;\n" + \ + " for(i = 0; i < 1; i++)\n" + \ + " {\n" + \ + " /* POTENTIAL FLAW: Read data from the console using fscanf() */\n" + \ + " fscanf(stdin, \"%d\", &data);\n" + \ + " }\n" + \ + " for(j = 0; j < 1; j++)\n" + \ + " {\n" + \ + " {\n" + \ + " int i;\n" + \ + " int buffer[10] = { 0 };\n" + \ + " /* POTENTIAL FLAW: Attempt to access a negative index of the array\n" + \ + " * This code does not check to see if the array index is negative */\n" + \ + " if (data < 10)\n" + \ + " {\n" + \ + " buffer[data] = 1;\n" + \ + " /* Print the array values */\n" + \ + " for(i = 0; i < 10; i++)\n" + \ + " {\n" + \ + " printIntLine(buffer[i]);\n" + \ + " }\n" + \ + " }\n" + \ + " else\n" + \ + " {\n" + \ + " printLine(\"ERROR: Array index is negative.\");\n" + \ + " }\n" + \ + " }\n" + \ + " }\n" + \ + "}\n" + + +code2: str = "void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_01_bad()\n" + \ + "{\n" + \ + " int data;\n" + \ + " /* Initialize data */\n" + \ + " data = -1;\n" + \ + " {\n" + \ + " char inputBuffer[CHAR_ARRAY_SIZE] = \"\";\n" + \ + " /* POTENTIAL FLAW: Read data from the console using fgets() */\n" + \ + " if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL)\n" + \ + " {\n" + \ + " /* Convert to int */\n" + \ + " data = atoi(inputBuffer);\n" + \ + " }\n" + \ + " else\n" + \ + " {\n" + \ + " printLine(\"fgets() failed.\");\n" + \ + " }\n" + \ + " }\n" + \ + " {\n" + \ + " int i;\n" + \ + " int buffer[10] = { 0 };\n" + \ + " /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound\n" + \ + " * This code does check to see if the array index is negative */\n" + \ + " if (data >= 0)\n" + \ + " {\n" + \ + " buffer[data] = 1;\n" + \ + " /* Print the array values */\n" + \ + " for(i = 0; i < 10; i++)\n" + \ + " {\n" + \ + " printIntLine(buffer[i]);\n" + \ + " }\n" + \ + " }\n" + \ + " else\n" + \ + " {\n" + \ + " printLine(\"ERROR: Array index is negative.\");\n" + \ + " }\n" + \ + " }\n" + \ + "}" + + +def getParser(code: str) -> CPP14Parser: + inputStream = InputStream(code) + cpp14Lexer = CPP14Lexer(inputStream) + tokenStream = CommonTokenStream(cpp14Lexer) + parser = CPP14Parser(tokenStream) + return parser + +def testFunctionDef(): + parser: CPP14Parser = getParser(code2) + tree: ParseTree = parser.functiondefinition() + builder: FunctionDefBuilder = FunctionDefBuilder() + walker.walk(builder, tree) + + functionDef: FunctionDef = builder.functionDef + compCFG: CFG = ASTToCFGConvert(functionDef) + + for i, (node, edges) in enumerate(compCFG.outNeighborhood.items()): + print(f"{i} : {node}") + for edge in edges: + print(edge) + + print("=========================================") + + cdg: CDG = createCDG(compCFG) + for edge in cdg.getEdges(): + print(edge) + return + +if __name__ == '__main__': + testFunctionDef() \ No newline at end of file diff --git a/test/mainToolTests/CFGBuildTest.py b/test/mainToolTests/CFGBuildTest.py new file mode 100644 index 0000000..4df4644 --- /dev/null +++ b/test/mainToolTests/CFGBuildTest.py @@ -0,0 +1,189 @@ +from mainTool.cfg.CCFG import * +from mainTool.antlr.CPP14Lexer import CPP14Lexer, InputStream, CommonTokenStream +from mainTool.ast.builders import * + +from antlr4.tree.Tree import ParseTree, ParseTreeWalker + +walker: ParseTreeWalker = ParseTreeWalker() + +def getParser(code: str) -> CPP14Parser: + inputStream = InputStream(code) + cpp14Lexer = CPP14Lexer(inputStream) + tokenStream = CommonTokenStream(cpp14Lexer) + parser = CPP14Parser(tokenStream) + return parser + +def testCompoundStatement(): + stmt: str = "{ exit(-1); *p = a * b; int s = *p + d; }" + parser: CPP14Parser = getParser(stmt) + tree: ParseTree = parser.statement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + + compoundStatement: CompoundStatement = builder.stack.pop() + compCFG: CFG = CCFGFactory.newCompoundInstance(compoundStatement) + return + + +def testSelectionStatement(): + ifstmt: str = "if (a == 1)\n" + \ + " a = 1;\n" + \ + "else if (a == 2)\n" + \ + " a = 2;\n" + \ + "else \n" + \ + " a = 3;" + + ifCode1: str = "if (staticFalse){ exit(-1); goto loop; *p = a * b; return a + 1; }" + + switchCode: str = "switch (staticTrue){\n" + \ + " case 1:\n" + \ + " test::a = 1;\n" + \ + " break;\n" + \ + " case 2:\n" + \ + " a = 2;\n" + \ + " break;\n" + \ + " default:\n" + \ + " a = 3;\n" + \ + "}" + + parser: CPP14Parser = getParser(switchCode) + tree: ParseTree = parser.selectionstatement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(Statement()) + walker.walk(builder, tree) + + # ifStatement: IfStatement = builder.stack.pop() + switchStatement: SwitchStatement = builder.stack.pop() + compCFG: CFG = CCFGFactory.newSwitchInstance(switchStatement) + + for node, edges in compCFG.outNeighborhood.items(): + print(node) + for edge in edges: + print(edge) + return + + +def testIteration(): + whileStmt: str = "while(x <= 1){\n" + \ + " (*x)++;\n" + \ + " ++*x;\n" + \ + " if (cond)\n" + \ + " break;\n" + \ + " func(a);\n" + \ + "}" + + doStmt: str = "do {\n" + \ + " int a = sizeof(int);\n" + \ + " b = sizeof(a);\n" + \ + "}while(a + b <= 4);" + + forStmt: str = "for(int i = 0; i < 10; ++i){ \n" + \ + " int a = 1;\n" + \ + " b = c + a;" + \ + " if (a > 0)\n" + \ + " break;\n" + \ + " func(a);\n" + \ + "}" + + forRangeStmt: str = "for (unsigned int * p: vec){\n" + \ + " unsigned int a = b + c, d{a}, e(8);\n" + \ + " char source[100], *dst[100], p[50][40];\n" + \ + " if (staticTrue)\n" + \ + " break;\n" + \ + " func(a);\n" + \ + " }" + + parser: CPP14Parser = getParser(forRangeStmt) + tree: ParseTree = parser.iterationstatement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(Statement()) + walker.walk(builder, tree) + + # whileStatement: WhileStatement = builder.stack.pop() + # doStatement: DoStatement = builder.stack.pop() + # forStatement: ForStatement = builder.stack.pop() + forRangeStatement: ForRangeStatement = builder.stack.pop() + + # compCFG: CFG = CCFGFactory.newWhileInstance(whileStatement) + # compCFG: CFG = CCFGFactory.newDoInstance(doStatement) + # compCFG: CFG = CCFGFactory.newForInstance(forStatement) + compCFG: CFG = CCFGFactory.newForRangeInstance(forRangeStatement) + + for node, edges in compCFG.outNeighborhood.items(): + print(node) + for edge in edges: + print(edge) + return + + +def testTry(): + code: str = "try{\n" + \ + " const int& a = 1;\n" + \ + " }catch(const int& e){\n" + \ + " }catch(...){\n" + \ + " }" + + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.tryblock() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(Statement()) + walker.walk(builder, tree) + + tryStatement: TryStatement = builder.stack.pop() + compCFG: CFG = CCFGFactory.newTryInstance(tryStatement) + return + + +def testFunctionDef(): + code = "static void goodG2B2(int a)\n" + \ + "{\n" + \ + " char * data;\n" + \ + " data = NULL;\n" + \ + " switch(6)\n" + \ + " {\n" + \ + " case 6:\n" + \ + " /* FIX: Allocate and point data to a large buffer that is at least as large as the large buffer used in the sink */\n" + \ + " data = (char *)malloc(100*sizeof(char));\n" + \ + " if (data == NULL) {exit(-1);}\n" + \ + " data[0] = '\\0'; /* null terminate */\n" + \ + " break;\n" + \ + " default:\n" + \ + " /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */\n" + \ + " printLine(\"Benign, fixed string\");\n" + \ + " break;\n" + \ + " }\n" + \ + " {\n" + \ + " size_t i;\n" + \ + " char source[100];\n" + \ + " memset(source, 'C', 100-1); /* fill with 'C's */\n" + \ + " source[100-1] = '\\0'; /* null terminate */\n" + \ + " /* POTENTIAL FLAW: Possible buffer overflow if source is larger than data */\n" + \ + " for (i = 0; i < 100; i++)\n" + \ + " {\n" + \ + " data[i] = source[i];\n" + \ + " }\n" + \ + " data[100-1] = '\\0'; /* Ensure the destination buffer is null terminated */\n" + \ + " printLine(data);\n" + \ + " free(data);\n" + \ + " }\n" + \ + "}" + + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.functiondefinition() + builder: FunctionDefBuilder = FunctionDefBuilder() + walker.walk(builder, tree) + + functionDef: FunctionDef = builder.functionDef + compCFG: CFG = ASTToCFGConvert(functionDef) + + + for i, (node, edges) in enumerate(compCFG.outNeighborhood.items()): + print(f"{i} : {node}") + for edge in edges: + print(edge) + + return + +if __name__ == '__main__': + testIteration() \ No newline at end of file diff --git a/test/mainToolTests/CPGBuildTest.py b/test/mainToolTests/CPGBuildTest.py new file mode 100644 index 0000000..ba7de34 --- /dev/null +++ b/test/mainToolTests/CPGBuildTest.py @@ -0,0 +1,122 @@ +from mainTool.udg.astAnalyzers import ASTDefUseAnalyzer, CalleeInfos, CFGToUDGConverter +from mainTool.ddg.DDGCreator import * +from mainTool.cfg.CCFG import ASTToCFGConvert +from mainTool.CPG import CPG +from mainTool.cdg.CDG import * + +from mainTool.antlr.CPP14Lexer import CPP14Lexer, InputStream, CommonTokenStream +from mainTool.ast.builders import * + +import json +from time import time + +from antlr4.tree.Tree import ParseTree, ParseTreeWalker + +walker: ParseTreeWalker = ParseTreeWalker() + + +astAnalyzer: ASTDefUseAnalyzer = ASTDefUseAnalyzer() +calleeInfos: CalleeInfos = CalleeInfos() + +calleeInfos.addArgDef("memcpy", 0) +calleeInfos.addArgUse("memcpy", 1) +calleeInfos.addArgDef("memmove", 0) +calleeInfos.addArgUse("memmove", 1) +calleeInfos.addArgDef("memset", 0) +calleeInfos.addArgDef("fgets", 0) +calleeInfos.addArgUse("atoi", 1) +calleeInfos.addArgDef("recv", 1) +calleeInfos.addArgDefStartIds("scanf", 1) +astAnalyzer.calleeInfos = calleeInfos + + +def getParser(code: str) -> CPP14Parser: + inputStream = InputStream(code) + cpp14Lexer = CPP14Lexer(inputStream) + tokenStream = CommonTokenStream(cpp14Lexer) + parser = CPP14Parser(tokenStream) + return parser + + +code = "static void goodG2B2(int a)\n" + \ + "{\n" + \ + " char * data;\n" + \ + " data = NULL;\n" + \ + " switch(6)\n" + \ + " {\n" + \ + " case 6:\n" + \ + " /* FIX: Allocate and point data to a large buffer that is at least as large as the large buffer used in the sink */\n" + \ + " data = (char *)malloc(100*sizeof(char));\n" + \ + " if (data == NULL) {exit(-1);}\n" + \ + " data[0] = '\\0'; /* null terminate */\n" + \ + " break;\n" + \ + " default:\n" + \ + " /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */\n" + \ + " printLine(\"Benign, fixed string\");\n" + \ + " break;\n" + \ + " }\n" + \ + " {\n" + \ + " size_t i;\n" + \ + " char source[100];\n" + \ + " memset(source, 'C', 100-1); /* fill with 'C's */\n" + \ + " source[100-1] = '\\0'; /* null terminate */\n" + \ + " /* POTENTIAL FLAW: Possible buffer overflow if source is larger than data */\n" + \ + " for (i = 0; i < 100; i++)\n" + \ + " {\n" + \ + " data[i] = source[i];\n" + \ + " }\n" + \ + " data[100-1] = '\\0'; /* Ensure the destination buffer is null terminated */\n" + \ + " printLine(data);\n" + \ + " free(data);\n" + \ + " return 0;\n" + \ + " }\n" + \ + "}" + + +def test(): + # AST + start = time() + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.functiondefinition() + builder: FunctionDefBuilder = FunctionDefBuilder() + walker.walk(builder, tree) + + # CFG + functionDef: FunctionDef = builder.functionDef + compCFG: CFG = ASTToCFGConvert(functionDef) + + # UDG + converter: CFGToUDGConverter = CFGToUDGConverter() + converter.astAnalyzer = astAnalyzer + useDefGraph: UseDefGraph = converter.convert(compCFG) + + # DefUseCFG + defUseConverter: CFGAndUDGToDefUseCFG = CFGAndUDGToDefUseCFG() + defUseCFG: DefUseCFG = defUseConverter.convert(compCFG, useDefGraph) + + # Data Dependence Graph + ddgCreator: DDGCreator = DDGCreator() + ddg: DDG = ddgCreator.createForDefUseCFG(defUseCFG) + + # Control Dependence Graph + cdg: CDG = createCDG(compCFG) + + # Code Property Graph + cpg: CPG = CPG() + cpg.initCFGEdges(compCFG) + cpg.initCDGEdges(cdg) + cpg.initDDGEdges(ddg) + + end = time() + + jsonCPG: dict = cpg.toJson() + jsonSerCPG: dict = cpg.toSerializedJson() + new_cpg: CPG = CPG.fromJson(jsonCPG) + print(json.dumps(jsonSerCPG, indent=2)) + new_cpg1: CPG = CPG.fromSerJson(jsonSerCPG) + print(end - start) + return + + +if __name__ == '__main__': + test() \ No newline at end of file diff --git a/test/mainToolTests/DDGBuildTest.py b/test/mainToolTests/DDGBuildTest.py new file mode 100644 index 0000000..a47ad9b --- /dev/null +++ b/test/mainToolTests/DDGBuildTest.py @@ -0,0 +1,125 @@ +from mainTool.udg.useDefGraph import * +from mainTool.udg.astAnalyzers import ASTDefUseAnalyzer, CalleeInfos, CFGToUDGConverter +from mainTool.udg.astProvider import ASTNodeASTProvider +from mainTool.ddg.DefUseGraph import DefUseCFG +from mainTool.ddg.DDGCreator import * +from mainTool.cfg.CCFG import ASTToCFGConvert + +from mainTool.antlr.CPP14Lexer import CPP14Lexer, InputStream, CommonTokenStream +from mainTool.ast.builders import * + +from antlr4.tree.Tree import ParseTree, ParseTreeWalker + +walker: ParseTreeWalker = ParseTreeWalker() + + +astAnalyzer: ASTDefUseAnalyzer = ASTDefUseAnalyzer() +calleeInfos: CalleeInfos = CalleeInfos() + +calleeInfos.addArgDef("memcpy", 0) +calleeInfos.addArgUse("memcpy", 1) +calleeInfos.addArgDef("memmove", 0) +calleeInfos.addArgUse("memmove", 1) +calleeInfos.addArgDef("memset", 0) +calleeInfos.addArgDef("fgets", 0) +calleeInfos.addArgDef("recv", 1) +calleeInfos.addArgDefStartIds("scanf", 1) +astAnalyzer.calleeInfos = calleeInfos + + +def getParser(code: str) -> CPP14Parser: + inputStream = InputStream(code) + cpp14Lexer = CPP14Lexer(inputStream) + tokenStream = CommonTokenStream(cpp14Lexer) + parser = CPP14Parser(tokenStream) + return parser + + +code = "static void goodG2B2(int a)\n" + \ + "{\n" + \ + " char * data;\n" + \ + " data = NULL;\n" + \ + " switch(6)\n" + \ + " {\n" + \ + " case 6:\n" + \ + " /* FIX: Allocate and point data to a large buffer that is at least as large as the large buffer used in the sink */\n" + \ + " data = (char *)malloc(100*sizeof(char));\n" + \ + " if (data == NULL) {exit(-1);}\n" + \ + " data[0] = '\\0'; /* null terminate */\n" + \ + " break;\n" + \ + " default:\n" + \ + " /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */\n" + \ + " printLine(\"Benign, fixed string\");\n" + \ + " break;\n" + \ + " }\n" + \ + " {\n" + \ + " size_t i;\n" + \ + " char source[100];\n" + \ + " memset(source, 'C', 100-1); /* fill with 'C's */\n" + \ + " source[100-1] = '\\0'; /* null terminate */\n" + \ + " /* POTENTIAL FLAW: Possible buffer overflow if source is larger than data */\n" + \ + " for (i = 0; i < 100; i++)\n" + \ + " {\n" + \ + " data[i] = source[i];\n" + \ + " }\n" + \ + " data[100-1] = '\\0'; /* Ensure the destination buffer is null terminated */\n" + \ + " printLine(data);\n" + \ + " free(data);\n" + \ + " }\n" + \ + "}" + + +code1 = "void CWE124_Buffer_Underwrite__char_alloca_memmove_82_bad::action(char * data = NULL){\n" + \ + " char source[100];\n" + \ + " memset(source, 'C', 100-1);\n" + \ + " source[100-1] = '\0';\n" + \ + " memmove(data, source, 100*sizeof(char));\n" + \ + " data[100-1] = '\0';\n" + \ + " printLine(data);\n" + \ + "}" + +code2 = "void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_memmove_04_bad(){\n" + \ + " char * data;\n" + \ + " data = NULL;\n" + \ + " data = (char *)malloc(50*sizeof(char));\n" + \ + " if (data == NULL) {exit(-1);}\n" + \ + " data[0] = '\0';\n" + \ + " char source[100];\n" + \ + " memset(source, 'C', 100-1);\n" + \ + " source[100-1] = '\0';\n" + \ + " memmove(data, source, 100*sizeof(char));\n" + \ + " printLine(data);\n" + \ + " free(data);\n" + \ + "}" + + +def test(): + # AST + parser: CPP14Parser = getParser(code) + tree: ParseTree = parser.functiondefinition() + builder: FunctionDefBuilder = FunctionDefBuilder() + walker.walk(builder, tree) + + # CFG + functionDef: FunctionDef = builder.functionDef + compCFG: CFG = ASTToCFGConvert(functionDef) + + # UDG + converter: CFGToUDGConverter = CFGToUDGConverter() + converter.astAnalyzer = astAnalyzer + useDefGraph: UseDefGraph = converter.convert(compCFG) + + # DefUseCFG + defUseConverter: CFGAndUDGToDefUseCFG = CFGAndUDGToDefUseCFG() + defUseCFG: DefUseCFG = defUseConverter.convert(compCFG, useDefGraph) + + # Data Dependence Graph + ddgCreator: DDGCreator = DDGCreator() + ddg: DDG = ddgCreator.createForDefUseCFG(defUseCFG) + + for edge in ddg.defUseEdges: + print(f"{str(edge.src)} ----[{edge.symbol}] ----- {str(edge.dst)}") + return + +if __name__ == '__main__': + test() \ No newline at end of file diff --git a/test/mainToolTests/FileParsingTest.py b/test/mainToolTests/FileParsingTest.py new file mode 100644 index 0000000..a7baa0d --- /dev/null +++ b/test/mainToolTests/FileParsingTest.py @@ -0,0 +1,41 @@ +from mainTool.CPG import * +from time import time + + +def test(): + start = time() + fileName = "../testfiles/sard_test_cases/CWE121_new_goto.c" + + calleeInfs = { + "ArgDef": { + "memcpy": [0], + "memmove": [0], + "memset": [0], + "fgets": [0], + "recv": [1], + }, + "ArgUse": { + "memcpy": [1], + "memmove": [1], + "memset": [1] + }, + "ArgDefStartIds": { + "scanf": 1, + "fscanf": 2 + } + } + calleeInfos = initialCalleeInfos(calleeInfs) + converter: CFGToUDGConverter = CFGToUDGConverter() + astAnalyzer: ASTDefUseAnalyzer = ASTDefUseAnalyzer() + astAnalyzer.calleeInfos = calleeInfos + converter.astAnalyzer = astAnalyzer + defUseConverter: CFGAndUDGToDefUseCFG = CFGAndUDGToDefUseCFG() + ddgCreator: DDGCreator = DDGCreator() + cpgs: List[CPG] = fileParse(fileName, converter, defUseConverter, ddgCreator) + end = time() + print(end - start) + return + + +if __name__ == '__main__': + test() \ No newline at end of file diff --git a/test/mainToolTests/UDGBuildTest.py b/test/mainToolTests/UDGBuildTest.py new file mode 100644 index 0000000..268a606 --- /dev/null +++ b/test/mainToolTests/UDGBuildTest.py @@ -0,0 +1,105 @@ +from mainTool.udg.useDefGraph import * +from mainTool.udg.astAnalyzers import ASTDefUseAnalyzer, CalleeInfos +from mainTool.udg.astProvider import ASTNodeASTProvider + +from mainTool.antlr.CPP14Lexer import CPP14Lexer, InputStream, CommonTokenStream +from mainTool.ast.builders import * + +from antlr4.tree.Tree import ParseTree, ParseTreeWalker + +walker: ParseTreeWalker = ParseTreeWalker() + + +astAnalyzer: ASTDefUseAnalyzer = ASTDefUseAnalyzer() +calleeInfos: CalleeInfos = CalleeInfos() + +def getParser(code: str) -> CPP14Parser: + inputStream = InputStream(code) + cpp14Lexer = CPP14Lexer(inputStream) + tokenStream = CommonTokenStream(cpp14Lexer) + parser = CPP14Parser(tokenStream) + return parser + +def testFuncCallStmt(): + calleeInfos.addArgDef("memcpy", 0) + calleeInfos.addArgUse("memcpy", 1) + calleeInfos.addArgDef("memmove", 0) + calleeInfos.addArgUse("memmove", 1) + calleeInfos.addArgDef("memset", 0) + calleeInfos.addArgDef("fgets", 0) + calleeInfos.addArgDef("recv", 1) + + calleeInfos.addArgDefStartIds("scanf", 1) + calleeInfos.addArgDefStartIds("fscanf", 2) + astAnalyzer.calleeInfos = calleeInfos + + # function call + code = "memcpy(data, source, 100*sizeof(char));" # 定义了 *data,使用了 data, source, *source + code1 = "memset(source, 'C' ,100- 1);" # 定义了 *source,使用了source + code2 = "scanf(\"%d-%d\", &a, &b);" + coden = "fscanf(stdin, \"%d\", &data);" + code3 = "fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin);" + code4 = "fgets(data+dataLen, (int)(FILENAME_MAX - dataLen), stdin);" + code5 = "recvResult = recv(connectSocket, (char*)(data+dataLen) , " + \ + "sizeof(char)*(FILENAME_MAX-dataLen-1), 0);" + code6 = "recv(connectSocket, (char*)(data+dataLen) , sizeof(char)*(FILENAME_MAX-dataLen-1), 0);" + + # ptr access + ptrAccessCode = "*(p + 1 + i) = *(a + j);" + # array access + arrayAccessCode = "p[1 + i] = a[j][i];" + arrayAccessCode1 = "a[i][j] = b[1 + i];" + + # struct access + structAccCode = "foo.bar = 10;" + structAccCode1 = "foo->bar = foo1.f1.f2;" + structAccCode2 = "structCharVoid->charFirst[(sizeof(structCharVoid->charFirst) / sizeof(char))-1] = '\0';" + structAccCode3 = "structCharVoid->voidSecond = (void*)SRC_STR;" + structAccCode4 = "memmove(structCharVoid->charFirst, SRC_STR, sizeof(*structCharVoid));" + + # assign + assignCode1 = "*p = a;" + assignCode2 = "*p += a;" + + parser: CPP14Parser = getParser(coden) + tree: ParseTree = parser.statement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + expressionStatement: ExpressionStatement = builder.stack[-1].getChild(0) + + provider: ASTNodeASTProvider = ASTNodeASTProvider() + provider.node = expressionStatement + usesAndDefs: Set[UseOrDef] = astAnalyzer.analyzeAST(provider) + + for useOrDef in usesAndDefs: + print(f"{useOrDef.astProvider.getEscapedCodeStr()} --- {useOrDef.symbol} : {useOrDef.isDef}") + return + + +def testIdentifierDecl(): + code = "char source[100] = '\0';" + code1 = "char* dst = (char*)malloc(sizeof(char)*100);" + code2 = "struct my_struct foo;" + + calleeInfos.addArgDef("recv", 1) + astAnalyzer.calleeInfos = calleeInfos + + parser: CPP14Parser = getParser(code2) + tree: ParseTree = parser.statement() + builder: FunctionContentBuilder = FunctionContentBuilder() + builder.stack.append(CompoundStatement()) + walker.walk(builder, tree) + declStatement: IdentifierDeclStatement = builder.stack[-1].getChild(0) + + provider: ASTNodeASTProvider = ASTNodeASTProvider() + provider.node = declStatement + usesAndDefs: Set[UseOrDef] = astAnalyzer.analyzeAST(provider) + + for useOrDef in usesAndDefs: + print(f"{useOrDef.astProvider.getEscapedCodeStr()} --- {useOrDef.symbol} : {useOrDef.isDef}") + return + + +if __name__ == '__main__': + testFuncCallStmt() \ No newline at end of file diff --git a/test/mainToolTests/jsonTestData.py b/test/mainToolTests/jsonTestData.py new file mode 100644 index 0000000..1f01f08 --- /dev/null +++ b/test/mainToolTests/jsonTestData.py @@ -0,0 +1,1389 @@ + +data = { + "nodes": [ + { + "contents": [ + [ + "Parameter", + "int a" + ], + [ + "ParameterType", + "int" + ], + [ + "Identifier", + "a" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ] + ], + "lines": 1 + }, + { + "contents": [ + [ + "IdentifierDeclStatement", + "char * data ;" + ], + [ + "IdentifierDecl", + "* data" + ], + [ + "IdentifierDeclType", + "char *" + ], + [ + "Identifier", + "data" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ] + ], + "lines": 3 + }, + { + "contents": [ + [ + "ExpressionStatement", + "data = NULL ;" + ], + [ + "AssignmentExpr", + "data = NULL" + ], + [ + "Identifier", + "data" + ], + [ + "PointerExpression", + "NULL" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ] + ], + "lines": 4 + }, + { + "contents": [ + [ + "Condition", + "6" + ], + [ + "IntergerExpression", + "6" + ] + ], + "edges": [ + [ + 0, + 1 + ] + ], + "lines": 5 + }, + { + "contents": [ + [ + "Label", + "case 6 :" + ], + [ + "IntergerExpression", + "6" + ] + ], + "edges": [ + [ + 0, + 1 + ] + ], + "lines": 7 + }, + { + "contents": [ + [ + "ExpressionStatement", + "data = ( char * ) malloc ( 100 * sizeof ( char ) ) ;" + ], + [ + "AssignmentExpr", + "data = ( char * ) malloc ( 100 * sizeof ( char ) )" + ], + [ + "Identifier", + "data" + ], + [ + "CastExpression", + "( char * ) malloc ( 100 * sizeof ( char ) )" + ], + [ + "CastTarget", + "char *" + ], + [ + "CallExpression", + "malloc ( 100 * sizeof ( char ) )" + ], + [ + "Callee", + "malloc" + ], + [ + "ArgumentList", + "100 * sizeof ( char )" + ], + [ + "Identifier", + "malloc" + ], + [ + "Argument", + "100 * sizeof ( char )" + ], + [ + "MultiplicativeExpression", + "100 * sizeof ( char )" + ], + [ + "IntergerExpression", + "100" + ], + [ + "SizeofExpr", + "sizeof ( char )" + ], + [ + "Sizeof", + "sizeof" + ], + [ + "SizeofOperand", + "char" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 3, + 4 + ], + [ + 3, + 5 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ], + [ + 6, + 8 + ], + [ + 7, + 9 + ], + [ + 9, + 10 + ], + [ + 10, + 11 + ], + [ + 10, + 12 + ], + [ + 12, + 13 + ], + [ + 12, + 14 + ] + ], + "lines": 9 + }, + { + "contents": [ + [ + "Condition", + "data == NULL" + ], + [ + "EqualityExpression", + "data == NULL" + ], + [ + "Identifier", + "data" + ], + [ + "PointerExpression", + "NULL" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ] + ], + "lines": 10 + }, + { + "contents": [ + [ + "ExpressionStatement", + "exit ( - 1 ) ;" + ], + [ + "CallExpression", + "exit ( - 1 )" + ], + [ + "Callee", + "exit" + ], + [ + "ArgumentList", + "- 1" + ], + [ + "Identifier", + "exit" + ], + [ + "Argument", + "- 1" + ], + [ + "UnaryOp", + "- 1" + ], + [ + "UnaryOperator", + "" + ], + [ + "IntergerExpression", + "1" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 3, + 5 + ], + [ + 5, + 6 + ], + [ + 6, + 7 + ], + [ + 6, + 8 + ] + ], + "lines": 10 + }, + { + "contents": [ + [ + "ExpressionStatement", + "data [ 0 ] = '\\0' ;" + ], + [ + "AssignmentExpr", + "data [ 0 ] = '\\0'" + ], + [ + "ArrayIndexing", + "data [ 0 ]" + ], + [ + "CharExpression", + "'\\0'" + ], + [ + "Identifier", + "data" + ], + [ + "IntergerExpression", + "0" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 2, + 5 + ] + ], + "lines": 11 + }, + { + "contents": [ + [ + "BreakStatement", + "break ;" + ] + ], + "edges": [], + "lines": 12 + }, + { + "contents": [ + [ + "Label", + "default :" + ] + ], + "edges": [], + "lines": 13 + }, + { + "contents": [ + [ + "ExpressionStatement", + "printLine ( \"Benign, fixed string\" ) ;" + ], + [ + "CallExpression", + "printLine ( \"Benign, fixed string\" )" + ], + [ + "Callee", + "printLine" + ], + [ + "ArgumentList", + "\"Benign, fixed string\"" + ], + [ + "Identifier", + "printLine" + ], + [ + "Argument", + "\"Benign, fixed string\"" + ], + [ + "StringExpression", + "\"Benign, fixed string\"" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 3, + 5 + ], + [ + 5, + 6 + ] + ], + "lines": 15 + }, + { + "contents": [ + [ + "BreakStatement", + "break ;" + ] + ], + "edges": [], + "lines": 16 + }, + { + "contents": [ + [ + "IdentifierDeclStatement", + "size_t i ;" + ], + [ + "IdentifierDecl", + "i" + ], + [ + "IdentifierDeclType", + "size_t" + ], + [ + "Identifier", + "i" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ] + ], + "lines": 19 + }, + { + "contents": [ + [ + "IdentifierDeclStatement", + "char source [ 100 ] ;" + ], + [ + "IdentifierDecl", + "source [ 100 ]" + ], + [ + "IdentifierDeclType", + "char *" + ], + [ + "Identifier", + "source" + ], + [ + "IntergerExpression", + "100" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 1, + 4 + ] + ], + "lines": 20 + }, + { + "contents": [ + [ + "ExpressionStatement", + "memset ( source , 'C' , 100 - 1 ) ;" + ], + [ + "CallExpression", + "memset ( source , 'C' , 100 - 1 )" + ], + [ + "Callee", + "memset" + ], + [ + "ArgumentList", + "source" + ], + [ + "Identifier", + "memset" + ], + [ + "Argument", + "source" + ], + [ + "Argument", + "'C'" + ], + [ + "Argument", + "100 - 1" + ], + [ + "Identifier", + "source" + ], + [ + "CharExpression", + "'C'" + ], + [ + "AdditiveExpression", + "100 - 1" + ], + [ + "IntergerExpression", + "100" + ], + [ + "IntergerExpression", + "1" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 3, + 5 + ], + [ + 3, + 6 + ], + [ + 3, + 7 + ], + [ + 5, + 8 + ], + [ + 6, + 9 + ], + [ + 7, + 10 + ], + [ + 10, + 11 + ], + [ + 10, + 12 + ] + ], + "lines": 21 + }, + { + "contents": [ + [ + "ExpressionStatement", + "source [ 100 - 1 ] = '\\0' ;" + ], + [ + "AssignmentExpr", + "source [ 100 - 1 ] = '\\0'" + ], + [ + "ArrayIndexing", + "source [ 100 - 1 ]" + ], + [ + "CharExpression", + "'\\0'" + ], + [ + "Identifier", + "source" + ], + [ + "AdditiveExpression", + "100 - 1" + ], + [ + "IntergerExpression", + "100" + ], + [ + "IntergerExpression", + "1" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 2, + 5 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ] + ], + "lines": 22 + }, + { + "contents": [ + [ + "ForInit", + "i = 0 ;" + ], + [ + "AssignmentExpr", + "i = 0" + ], + [ + "Identifier", + "i" + ], + [ + "IntergerExpression", + "0" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ] + ], + "lines": 24 + }, + { + "contents": [ + [ + "Condition", + "i < 100" + ], + [ + "RelationalExpression", + "i < 100" + ], + [ + "Identifier", + "i" + ], + [ + "IntergerExpression", + "100" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ] + ], + "lines": 24 + }, + { + "contents": [ + [ + "IncDecOp", + "i ++" + ], + [ + "Identifier", + "i" + ], + [ + "IncDec", + "" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 0, + 2 + ] + ], + "lines": 24 + }, + { + "contents": [ + [ + "ExpressionStatement", + "data [ i ] = source [ i ] ;" + ], + [ + "AssignmentExpr", + "data [ i ] = source [ i ]" + ], + [ + "ArrayIndexing", + "data [ i ]" + ], + [ + "ArrayIndexing", + "source [ i ]" + ], + [ + "Identifier", + "data" + ], + [ + "Identifier", + "i" + ], + [ + "Identifier", + "source" + ], + [ + "Identifier", + "i" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 2, + 5 + ], + [ + 3, + 6 + ], + [ + 3, + 7 + ] + ], + "lines": 26 + }, + { + "contents": [ + [ + "ExpressionStatement", + "data [ 100 - 1 ] = '\\0' ;" + ], + [ + "AssignmentExpr", + "data [ 100 - 1 ] = '\\0'" + ], + [ + "ArrayIndexing", + "data [ 100 - 1 ]" + ], + [ + "CharExpression", + "'\\0'" + ], + [ + "Identifier", + "data" + ], + [ + "AdditiveExpression", + "100 - 1" + ], + [ + "IntergerExpression", + "100" + ], + [ + "IntergerExpression", + "1" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 2, + 5 + ], + [ + 5, + 6 + ], + [ + 5, + 7 + ] + ], + "lines": 28 + }, + { + "contents": [ + [ + "ExpressionStatement", + "printLine ( data ) ;" + ], + [ + "CallExpression", + "printLine ( data )" + ], + [ + "Callee", + "printLine" + ], + [ + "ArgumentList", + "data" + ], + [ + "Identifier", + "printLine" + ], + [ + "Argument", + "data" + ], + [ + "Identifier", + "data" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 3, + 5 + ], + [ + 5, + 6 + ] + ], + "lines": 29 + }, + { + "contents": [ + [ + "ExpressionStatement", + "free ( data ) ;" + ], + [ + "CallExpression", + "free ( data )" + ], + [ + "Callee", + "free" + ], + [ + "ArgumentList", + "data" + ], + [ + "Identifier", + "free" + ], + [ + "Argument", + "data" + ], + [ + "Identifier", + "data" + ] + ], + "edges": [ + [ + 0, + 1 + ], + [ + 1, + 2 + ], + [ + 1, + 3 + ], + [ + 2, + 4 + ], + [ + 3, + 5 + ], + [ + 5, + 6 + ] + ], + "lines": 30 + } + ], + "cfgEdges": [ + [ + 0, + 1, + "" + ], + [ + 1, + 2, + "" + ], + [ + 2, + 3, + "" + ], + [ + 3, + 4, + "case 6" + ], + [ + 3, + 10, + "default" + ], + [ + 4, + 5, + "" + ], + [ + 5, + 6, + "" + ], + [ + 6, + 7, + "True" + ], + [ + 6, + 8, + "False" + ], + [ + 7, + 8, + "" + ], + [ + 8, + 9, + "" + ], + [ + 9, + 13, + "" + ], + [ + 10, + 11, + "" + ], + [ + 11, + 12, + "" + ], + [ + 12, + 13, + "" + ], + [ + 13, + 14, + "" + ], + [ + 14, + 15, + "" + ], + [ + 15, + 16, + "" + ], + [ + 16, + 17, + "" + ], + [ + 18, + 20, + "True" + ], + [ + 18, + 21, + "False" + ], + [ + 17, + 18, + "" + ], + [ + 19, + 18, + "" + ], + [ + 20, + 19, + "" + ], + [ + 21, + 22, + "" + ], + [ + 22, + 23, + "" + ] + ], + "cdgEdges": [ + [ + 18, + 19 + ], + [ + 18, + 20 + ], + [ + 3, + 12 + ], + [ + 3, + 11 + ], + [ + 3, + 10 + ], + [ + 3, + 9 + ], + [ + 3, + 8 + ], + [ + 3, + 6 + ], + [ + 3, + 5 + ], + [ + 3, + 4 + ], + [ + 6, + 7 + ] + ], + "ddgEdges": [ + [ + 14, + 16, + "source" + ], + [ + 14, + 15, + "source" + ], + [ + 14, + 20, + "source" + ], + [ + 19, + 18, + "i" + ], + [ + 17, + 19, + "i" + ], + [ + 17, + 20, + "i" + ], + [ + 19, + 20, + "i" + ], + [ + 17, + 18, + "i" + ], + [ + 5, + 8, + "data" + ], + [ + 5, + 6, + "data" + ], + [ + 2, + 20, + "data" + ], + [ + 5, + 20, + "data" + ], + [ + 2, + 21, + "data" + ], + [ + 5, + 21, + "data" + ], + [ + 5, + 22, + "data" + ], + [ + 2, + 23, + "data" + ], + [ + 16, + 20, + "* source" + ], + [ + 5, + 23, + "data" + ], + [ + 2, + 22, + "data" + ] + ] +} \ No newline at end of file diff --git a/test/mainToolTests/parsingCode.py b/test/mainToolTests/parsingCode.py new file mode 100644 index 0000000..70747aa --- /dev/null +++ b/test/mainToolTests/parsingCode.py @@ -0,0 +1,28 @@ +from mainTool.antlr.CPP14Lexer import CPP14Lexer, InputStream, CommonTokenStream +from mainTool.antlr.CPP14Parser import CPP14Parser + +class A(object): + pass + +class B(A): + pass + +class C(B): + pass + +if __name__ == '__main__': + code = "while(x <= 1){\n x++;\n ++x;\n}" + inputStream = InputStream(code) + cpp14Lexer = CPP14Lexer(inputStream) + tokenStream = CommonTokenStream(cpp14Lexer) + parser = CPP14Parser(tokenStream) + tree = parser.iterationstatement() + print("========") + + set1 = set([(1, 2), (1, 3), (1, 4)]) + set2 = set([(1, 2)]) + print(set2.difference(set1)) + + print({"main", "memset", "memmove", "fscanf", "time", "printf", "wprintf", "puts", + "sscanf", "isxdigit", "iswxdigit", "swscanf", "rand", + "malloc", "free", "srand"}) diff --git a/test/testfiles/ComplexStruct.c b/test/testfiles/ComplexStruct.c new file mode 100644 index 0000000..0d2b77d --- /dev/null +++ b/test/testfiles/ComplexStruct.c @@ -0,0 +1,11 @@ +struct Date { + int d, m, y ; + void init(int dd, int mm, int yy) { //对三个成员变量进行初始化 + d = dd; + m = mm; + y = yy; + } + void print() { //打印类的具体对象 + cout << y << "-" << m << "-" << d << endl; + } +}; \ No newline at end of file diff --git a/test/testfiles/IdentifierDeclTest.c b/test/testfiles/IdentifierDeclTest.c new file mode 100644 index 0000000..68e2e3a --- /dev/null +++ b/test/testfiles/IdentifierDeclTest.c @@ -0,0 +1,6 @@ + +void main(){ + unsigned int a = 1, b{10}, c(11), *p; + a = 1; + struct St s; +} \ No newline at end of file diff --git a/test/testfiles/inputcases b/test/testfiles/inputcases new file mode 100644 index 0000000..2eb9eb5 --- /dev/null +++ b/test/testfiles/inputcases @@ -0,0 +1,13 @@ +fscanf(stdin, "%d", &data); +fscanf(stdin, "%u", &data); +fscanf(stdin, "%zu", &data); + +recvResult = recv(connectSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0); +recvResult = recv(connectSocket, (char*)(data+dataLen) , sizeof(char)*(FILENAME_MAX-dataLen-1), 0); + +fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin); +fgets(data+dataLen, (int)(100-dataLen), stdin); +fgets(data+dataLen, (int)(FILENAME_MAX - dataLen), stdin); +fgetws(data+dataLen , (int)(100 - dataLen), pFile); + +cin >> buf; \ No newline at end of file diff --git a/test/testfiles/sard_test_cases/CWE119_1.c b/test/testfiles/sard_test_cases/CWE119_1.c new file mode 100644 index 0000000..f211bb2 --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE119_1.c @@ -0,0 +1,75 @@ +#include "std_testcase.h" + +#include + +wchar_t * CWE127_Buffer_Underread__wchar_t_declare_memmove_68_badData; +wchar_t * CWE127_Buffer_Underread__wchar_t_declare_memmove_68_goodG2BData; + +#ifndef OMITBAD + +/* bad function declaration */ +void CWE127_Buffer_Underread__wchar_t_declare_memmove_68b_badSink(); + +void CWE127_Buffer_Underread__wchar_t_declare_memmove_68_bad() +{ + wchar_t * data; + wchar_t dataBuffer[100]; + wmemset(dataBuffer, L'A', 100-1); + dataBuffer[100-1] = L'\0'; + /* FLAW: Set data pointer to before the allocated memory buffer */ + data = dataBuffer - 8; + CWE127_Buffer_Underread__wchar_t_declare_memmove_68_badData = data; + CWE127_Buffer_Underread__wchar_t_declare_memmove_68b_badSink(); +} + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +/* good function declarations */ +void CWE127_Buffer_Underread__wchar_t_declare_memmove_68b_goodG2BSink(); + +/* goodG2B uses the GoodSource with the BadSink */ +static void goodG2B() +{ + wchar_t * data; + wchar_t dataBuffer[100]; + wmemset(dataBuffer, L'A', 100-1); + dataBuffer[100-1] = L'\0'; + /* FIX: Set data pointer to the allocated memory buffer */ + data = dataBuffer; + CWE127_Buffer_Underread__wchar_t_declare_memmove_68_goodG2BData = data; + CWE127_Buffer_Underread__wchar_t_declare_memmove_68b_goodG2BSink(); +} + +void CWE127_Buffer_Underread__wchar_t_declare_memmove_68_good() +{ + goodG2B(); +} + +#endif /* OMITGOOD */ + +/* Below is the main(). It is only used when building this testcase on + * its own for testing or for building a binary to use in testing binary + * analysis tools. It is not used when compiling all the testcases as one + * application, which is how source code analysis tools are tested. + */ + +#ifdef INCLUDEMAIN + +int main(int argc, char * argv[]) +{ + /* seed randomness */ + srand( (unsigned)time(NULL) ); +#ifndef OMITGOOD + printLine("Calling good()..."); + CWE127_Buffer_Underread__wchar_t_declare_memmove_68_good(); + printLine("Finished good()"); +#endif /* OMITGOOD */ +#ifndef OMITBAD + printLine("Calling bad()..."); + CWE127_Buffer_Underread__wchar_t_declare_memmove_68_bad(); + printLine("Finished bad()"); +#endif /* OMITBAD */ + return 0; +} \ No newline at end of file diff --git a/test/testfiles/sard_test_cases/CWE121_new_goto.c b/test/testfiles/sard_test_cases/CWE121_new_goto.c new file mode 100644 index 0000000..53dfa69 --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE121_new_goto.c @@ -0,0 +1,89 @@ +#include "std_testcase.h" + +#ifndef _WIN32 +#include +#endif + +/* SRC_STR is 32 char long, including the null terminator, for 64-bit architectures */ +#define SRC_STR "0123456789abcdef0123456789abcde" + +typedef struct _charVoid +{ + char charFirst[16]; + void * voidSecond; + void * voidThird; +} charVoid; + +#ifndef OMITBAD + +void CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memmove_18_bad() +{ + goto sink; +sink: + { + charVoid structCharVoid; + structCharVoid.voidSecond = (void *)SRC_STR; + /* Print the initial block pointed to by structCharVoid.voidSecond */ + printLine((char *)structCharVoid.voidSecond); + /* FLAW: Use the sizeof(structCharVoid) which will overwrite the pointer voidSecond */ + memmove(structCharVoid.charFirst, SRC_STR, sizeof(structCharVoid)); + structCharVoid.charFirst[(sizeof(structCharVoid.charFirst)/sizeof(char))-1] = '\0'; /* null terminate the string */ + printLine((char *)structCharVoid.charFirst); + printLine((char *)structCharVoid.voidSecond); + } +} + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +/* good1() reverses the blocks on the goto statement */ +static void good1() +{ + goto sink; +sink: + { + charVoid structCharVoid; + structCharVoid.voidSecond = (void *)SRC_STR; + /* Print the initial block pointed to by structCharVoid.voidSecond */ + printLine((char *)structCharVoid.voidSecond); + /* FIX: Use sizeof(structCharVoid.charFirst) to avoid overwriting the pointer voidSecond */ + memmove(structCharVoid.charFirst, SRC_STR, sizeof(structCharVoid.charFirst)); + structCharVoid.charFirst[(sizeof(structCharVoid.charFirst)/sizeof(char))-1] = '\0'; /* null terminate the string */ + printLine((char *)structCharVoid.charFirst); + printLine((char *)structCharVoid.voidSecond); + } +} + +void CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memmove_18_good() +{ + good1(); +} + +#endif /* OMITGOOD */ + +/* Below is the main(). It is only used when building this testcase on + its own for testing or for building a binary to use in testing binary + analysis tools. It is not used when compiling all the testcases as one + application, which is how source code analysis tools are tested. */ + +#ifdef INCLUDEMAIN + +int main(int argc, char * argv[]) +{ + /* seed randomness */ + srand( (unsigned)time(NULL) ); +#ifndef OMITGOOD + printLine("Calling good()..."); + CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memmove_18_good(); + printLine("Finished good()"); +#endif /* OMITGOOD */ +#ifndef OMITBAD + printLine("Calling bad()..."); + CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memmove_18_bad(); + printLine("Finished bad()"); +#endif /* OMITBAD */ + return 0; +} + +#endif \ No newline at end of file diff --git a/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53a.c b/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53a.c new file mode 100644 index 0000000..35c9542 --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53a.c @@ -0,0 +1,175 @@ +/* TEMPLATE GENERATED TESTCASE FILE +Filename: CWE123_Write_What_Where_Condition__connect_socket_53a.c +Label Definition File: CWE123_Write_What_Where_Condition.label.xml +Template File: sources-sink-53a.tmpl.c +*/ +/* + * @description + * CWE: 123 Write-What-Where Condition + * BadSource: connect_socket Overwrite linked list pointers using a connect socket (client side) + * GoodSource: Don't overwrite linked list pointers + * Sink: + * BadSink : Remove element from list + * Flow Variant: 53 Data flow: data passed as an argument from one function through two others to a fourth; all four functions are in different source files + * + * */ + +#include "std_testcase.h" + +typedef struct _linkedList +{ + struct _linkedList *next; + struct _linkedList *prev; +} linkedList; + +typedef struct _badStruct +{ + linkedList list; +} badStruct; + +static linkedList *linkedListPrev, *linkedListNext; + +#ifdef _WIN32 +#include +#include +#include +#pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ +#define CLOSE_SOCKET closesocket +#else /* NOT _WIN32 */ +#include +#include +#include +#include +#include +#define INVALID_SOCKET -1 +#define SOCKET_ERROR -1 +#define CLOSE_SOCKET close +#define SOCKET int +#endif + +#define TCP_PORT 27015 +#define IP_ADDRESS "127.0.0.1" + +#ifndef OMITBAD + +/* bad function declaration */ +void CWE123_Write_What_Where_Condition__connect_socket_53b_badSink(badStruct data); + +void CWE123_Write_What_Where_Condition__connect_socket_53_bad() +{ + badStruct data; + linkedList head = { &head, &head }; + /* This simulates a Microsoft-style linked list insertion */ + data.list.next = head.next; + data.list.prev = head.prev; + head.next = &data.list; + head.prev = &data.list; + { +#ifdef _WIN32 + WSADATA wsaData; + int wsaDataInit = 0; +#endif + int recvResult; + struct sockaddr_in service; + SOCKET connectSocket = INVALID_SOCKET; + do + { +#ifdef _WIN32 + if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR) + { + break; + } + wsaDataInit = 1; +#endif + connectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + if (connectSocket == INVALID_SOCKET) + { + break; + } + memset(&service, 0, sizeof(service)); + service.sin_family = AF_INET; + service.sin_addr.s_addr = inet_addr(IP_ADDRESS); + service.sin_port = htons(TCP_PORT); + if (connect(connectSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR) + { + break; + } + /* Abort on error or the connection was closed, make sure to recv one + * less char than is in the recv_buf in order to append a terminator */ + /* FLAW: overwrite linked list pointers with data */ + recvResult = recv(connectSocket, (char*)&data, sizeof(data), 0); + if (recvResult == SOCKET_ERROR || recvResult == 0) + { + break; + } + } + while (0); + if (connectSocket != INVALID_SOCKET) + { + CLOSE_SOCKET(connectSocket); + } +#ifdef _WIN32 + if (wsaDataInit) + { + WSACleanup(); + } +#endif + } + CWE123_Write_What_Where_Condition__connect_socket_53b_badSink(data); +} + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +/* good function declaration */ +void CWE123_Write_What_Where_Condition__connect_socket_53b_goodG2BSink(badStruct data); + +/* goodG2B uses the GoodSource with the BadSink */ +static void goodG2B() +{ + badStruct data; + linkedList head = { &head, &head }; + /* This simulates a Microsoft-style linked list insertion */ + data.list.next = head.next; + data.list.prev = head.prev; + head.next = &data.list; + head.prev = &data.list; + /* FIX: don't overwrite linked list pointers */ + ; /* empty statement needed by some flow variants */ + CWE123_Write_What_Where_Condition__connect_socket_53b_goodG2BSink(data); +} + +void CWE123_Write_What_Where_Condition__connect_socket_53_good() +{ + goodG2B(); +} + +#endif /* OMITGOOD */ + +/* Below is the main(). It is only used when building this testcase on + * its own for testing or for building a binary to use in testing binary + * analysis tools. It is not used when compiling all the testcases as one + * application, which is how source code analysis tools are tested. + */ + +#ifdef INCLUDEMAIN + +int main(int argc, char * argv[]) +{ + /* seed randomness */ + srand( (unsigned)time(NULL) ); +#ifndef OMITGOOD + printLine("Calling good()..."); + CWE123_Write_What_Where_Condition__connect_socket_53_good(); + printLine("Finished good()"); +#endif /* OMITGOOD */ +#ifndef OMITBAD + printLine("Calling bad()..."); + CWE123_Write_What_Where_Condition__connect_socket_53_bad(); + printLine("Finished bad()"); +#endif /* OMITBAD */ + return 0; +} + +#endif diff --git a/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53b.c b/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53b.c new file mode 100644 index 0000000..b8a6734 --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53b.c @@ -0,0 +1,78 @@ +/* TEMPLATE GENERATED TESTCASE FILE +Filename: CWE123_Write_What_Where_Condition__connect_socket_53b.c +Label Definition File: CWE123_Write_What_Where_Condition.label.xml +Template File: sources-sink-53b.tmpl.c +*/ +/* + * @description + * CWE: 123 Write-What-Where Condition + * BadSource: connect_socket Overwrite linked list pointers using a connect socket (client side) + * GoodSource: Don't overwrite linked list pointers + * Sink: + * BadSink : Remove element from list + * Flow Variant: 53 Data flow: data passed as an argument from one function through two others to a fourth; all four functions are in different source files + * + * */ + +#include "std_testcase.h" + +typedef struct _linkedList +{ + struct _linkedList *next; + struct _linkedList *prev; +} linkedList; + +typedef struct _badStruct +{ + linkedList list; +} badStruct; + +static linkedList *linkedListPrev, *linkedListNext; + +#ifdef _WIN32 +#include +#include +#include +#pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ +#define CLOSE_SOCKET closesocket +#else /* NOT _WIN32 */ +#include +#include +#include +#include +#include +#define INVALID_SOCKET -1 +#define SOCKET_ERROR -1 +#define CLOSE_SOCKET close +#define SOCKET int +#endif + +#define TCP_PORT 27015 +#define IP_ADDRESS "127.0.0.1" + +/* all the sinks are the same, we just want to know where the hit originated if a tool flags one */ + +#ifndef OMITBAD + +/* bad function declaration */ +void CWE123_Write_What_Where_Condition__connect_socket_53c_badSink(badStruct data); + +void CWE123_Write_What_Where_Condition__connect_socket_53b_badSink(badStruct data) +{ + CWE123_Write_What_Where_Condition__connect_socket_53c_badSink(data); +} + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +/* good function declaration */ +void CWE123_Write_What_Where_Condition__connect_socket_53c_goodG2BSink(badStruct data); + +/* goodG2B uses the GoodSource with the BadSink */ +void CWE123_Write_What_Where_Condition__connect_socket_53b_goodG2BSink(badStruct data) +{ + CWE123_Write_What_Where_Condition__connect_socket_53c_goodG2BSink(data); +} + +#endif /* OMITGOOD */ diff --git a/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53c.c b/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53c.c new file mode 100644 index 0000000..fc89d59 --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53c.c @@ -0,0 +1,78 @@ +/* TEMPLATE GENERATED TESTCASE FILE +Filename: CWE123_Write_What_Where_Condition__connect_socket_53c.c +Label Definition File: CWE123_Write_What_Where_Condition.label.xml +Template File: sources-sink-53c.tmpl.c +*/ +/* + * @description + * CWE: 123 Write-What-Where Condition + * BadSource: connect_socket Overwrite linked list pointers using a connect socket (client side) + * GoodSource: Don't overwrite linked list pointers + * Sink: + * BadSink : Remove element from list + * Flow Variant: 53 Data flow: data passed as an argument from one function through two others to a fourth; all four functions are in different source files + * + * */ + +#include "std_testcase.h" + +typedef struct _linkedList +{ + struct _linkedList *next; + struct _linkedList *prev; +} linkedList; + +typedef struct _badStruct +{ + linkedList list; +} badStruct; + +static linkedList *linkedListPrev, *linkedListNext; + +#ifdef _WIN32 +#include +#include +#include +#pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ +#define CLOSE_SOCKET closesocket +#else /* NOT _WIN32 */ +#include +#include +#include +#include +#include +#define INVALID_SOCKET -1 +#define SOCKET_ERROR -1 +#define CLOSE_SOCKET close +#define SOCKET int +#endif + +#define TCP_PORT 27015 +#define IP_ADDRESS "127.0.0.1" + +/* all the sinks are the same, we just want to know where the hit originated if a tool flags one */ + +#ifndef OMITBAD + +/* bad function declaration */ +void CWE123_Write_What_Where_Condition__connect_socket_53d_badSink(badStruct data); + +void CWE123_Write_What_Where_Condition__connect_socket_53c_badSink(badStruct data) +{ + CWE123_Write_What_Where_Condition__connect_socket_53d_badSink(data); +} + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +/* good function declaration */ +void CWE123_Write_What_Where_Condition__connect_socket_53d_goodG2BSink(badStruct data); + +/* goodG2B uses the GoodSource with the BadSink */ +void CWE123_Write_What_Where_Condition__connect_socket_53c_goodG2BSink(badStruct data) +{ + CWE123_Write_What_Where_Condition__connect_socket_53d_goodG2BSink(data); +} + +#endif /* OMITGOOD */ diff --git a/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53d.c b/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53d.c new file mode 100644 index 0000000..cb827ea --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE123_Write_What_Where_Condition__connect_socket_53d.c @@ -0,0 +1,106 @@ +/* TEMPLATE GENERATED TESTCASE FILE +Filename: CWE123_Write_What_Where_Condition__connect_socket_53d.c +Label Definition File: CWE123_Write_What_Where_Condition.label.xml +Template File: sources-sink-53d.tmpl.c +*/ +/* + * @description + * CWE: 123 Write-What-Where Condition + * BadSource: connect_socket Overwrite linked list pointers using a connect socket (client side) + * GoodSource: Don't overwrite linked list pointers + * Sink: + * BadSink : Remove element from list + * Flow Variant: 53 Data flow: data passed as an argument from one function through two others to a fourth; all four functions are in different source files + * + * */ + +#include "std_testcase.h" + +typedef struct _linkedList +{ + struct _linkedList *next; + struct _linkedList *prev; +} linkedList; + +typedef struct _badStruct +{ + linkedList list; +} badStruct; + +static linkedList *linkedListPrev, *linkedListNext; + +#ifdef _WIN32 +#include +#include +#include +#pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */ +#define CLOSE_SOCKET closesocket +#else /* NOT _WIN32 */ +#include +#include +#include +#include +#include +#define INVALID_SOCKET -1 +#define SOCKET_ERROR -1 +#define CLOSE_SOCKET close +#define SOCKET int +#endif + +#define TCP_PORT 27015 +#define IP_ADDRESS "127.0.0.1" + +/* all the sinks are the same, we just want to know where the hit originated if a tool flags one */ + +#ifndef OMITBAD + +void CWE123_Write_What_Where_Condition__connect_socket_53d_badSink(badStruct data) +{ + /* POTENTIAL FLAW: The following removes 'a' from the list. Because of the possible overflow this + * causes a "write-what-where" aka "write4". It does another write as + * well. But this is the prototypical "write-what-where" at least from + * the Windows perspective. + * + * linkedListPrev = a->list->prev WHAT + * linkedListNext = a->list->next WHERE + * linkedListPrev->next = linkedListNext "at the address that prev/WHERE points, write + * next/WHAT" + * aka "write-what-where" + * linkedListNext->prev = linkedListPrev "at the address that next/WHAT points plus 4 + * (because prev is the second field in 'list' hence + * 4 bytes away on 32b machines), write prev/WHERE" + */ + linkedListPrev = data.list.prev; + linkedListNext = data.list.next; + linkedListPrev->next = linkedListNext; + linkedListNext->prev = linkedListPrev; +} + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +/* goodG2B uses the GoodSource with the BadSink */ +void CWE123_Write_What_Where_Condition__connect_socket_53d_goodG2BSink(badStruct data) +{ + /* POTENTIAL FLAW: The following removes 'a' from the list. Because of the possible overflow this + * causes a "write-what-where" aka "write4". It does another write as + * well. But this is the prototypical "write-what-where" at least from + * the Windows perspective. + * + * linkedListPrev = a->list->prev WHAT + * linkedListNext = a->list->next WHERE + * linkedListPrev->next = linkedListNext "at the address that prev/WHERE points, write + * next/WHAT" + * aka "write-what-where" + * linkedListNext->prev = linkedListPrev "at the address that next/WHAT points plus 4 + * (because prev is the second field in 'list' hence + * 4 bytes away on 32b machines), write prev/WHERE" + */ + linkedListPrev = data.list.prev; + linkedListNext = data.list.next; + linkedListPrev->next = linkedListNext; + linkedListNext->prev = linkedListPrev; +} + +#endif /* OMITGOOD */ diff --git a/test/testfiles/sard_test_cases/CWE_119_122_Struct.c b/test/testfiles/sard_test_cases/CWE_119_122_Struct.c new file mode 100644 index 0000000..a8cfb86 --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE_119_122_Struct.c @@ -0,0 +1,78 @@ +#include "std_testcase.h" + +#include + +typedef struct _CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_structType +{ + wchar_t * structFirst; +} CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_structType; + +#ifndef OMITBAD + +/* bad function declaration */ +void CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67b_badSink(CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_structType myStruct); + +void CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_bad() +{ + wchar_t * data; + CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_structType myStruct; + data = (wchar_t *)malloc(100*sizeof(wchar_t)); + /* FLAW: Initialize data as a large buffer that is larger than the small buffer used in the sink */ + wmemset(data, L'A', 100-1); /* fill with L'A's */ + data[100-1] = L'\0'; /* null terminate */ + myStruct.structFirst = data; + CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67b_badSink(myStruct); +} + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +/* goodG2B uses the GoodSource with the BadSink */ +void CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67b_goodG2BSink(CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_structType myStruct); + +static void goodG2B() +{ + wchar_t * data; + CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_structType myStruct; + data = (wchar_t *)malloc(100*sizeof(wchar_t)); + /* FIX: Initialize data as a small buffer that as small or smaller than the small buffer used in the sink */ + wmemset(data, L'A', 50-1); /* fill with L'A's */ + data[50-1] = L'\0'; /* null terminate */ + myStruct.structFirst = data; + CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67b_goodG2BSink(myStruct); +} + +void CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_good() +{ + goodG2B(); +} + +#endif /* OMITGOOD */ + +/* Below is the main(). It is only used when building this testcase on + * its own for testing or for building a binary to use in testing binary + * analysis tools. It is not used when compiling all the testcases as one + * application, which is how source code analysis tools are tested. + */ + +#ifdef INCLUDEMAIN + +int main(int argc, char * argv[]) +{ + /* seed randomness */ + srand( (unsigned)time(NULL) ); +#ifndef OMITGOOD + printLine("Calling good()..."); + CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_good(); + printLine("Finished good()"); +#endif /* OMITGOOD */ +#ifndef OMITBAD + printLine("Calling bad()..."); + CWE122_Heap_Based_Buffer_Overflow__c_src_wchar_t_cpy_67_bad(); + printLine("Finished bad()"); +#endif /* OMITBAD */ + return 0; +} + +#endif \ No newline at end of file diff --git a/test/testfiles/sard_test_cases/CWE_119_122_switch.c b/test/testfiles/sard_test_cases/CWE_119_122_switch.c new file mode 100644 index 0000000..48ba79a --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE_119_122_switch.c @@ -0,0 +1,143 @@ +#include "std_testcase.h" + +#include + +#ifndef OMITBAD + +void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_loop_15_bad() +{ + char * data; + data = NULL; + switch(6) + { + case 6: + /* FLAW: Allocate and point data to a small buffer that is smaller than the large buffer used in the sinks */ + data = (char *)malloc(50*sizeof(char)); + if (data == NULL) {exit(-1);} + data[0] = '\0'; /* null terminate */ + break; + default: + /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ + printLine("Benign, fixed string"); + break; + } + { + size_t i; + char source[100]; + memset(source, 'C', 100-1); /* fill with 'C's */ + source[100-1] = '\0'; /* null terminate */ + /* POTENTIAL FLAW: Possible buffer overflow if source is larger than data */ + for (i = 0; i < 100; i++) + { + data[i] = source[i]; + } + data[100-1] = '\0'; /* Ensure the destination buffer is null terminated */ + printLine(data); + free(data); + } +} + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +/* goodG2B1() - use goodsource and badsink by changing the switch to switch(5) */ +static void goodG2B1() +{ + char * data; + data = NULL; + switch(5) + { + case 6: + /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ + printLine("Benign, fixed string"); + break; + default: + /* FIX: Allocate and point data to a large buffer that is at least as large as the large buffer used in the sink */ + data = (char *)malloc(100*sizeof(char)); + if (data == NULL) {exit(-1);} + data[0] = '\0'; /* null terminate */ + break; + } + { + size_t i; + char source[100]; + memset(source, 'C', 100-1); /* fill with 'C's */ + source[100-1] = '\0'; /* null terminate */ + /* POTENTIAL FLAW: Possible buffer overflow if source is larger than data */ + for (i = 0; i < 100; i++) + { + data[i] = source[i]; + } + data[100-1] = '\0'; /* Ensure the destination buffer is null terminated */ + printLine(data); + free(data); + } +} + +/* goodG2B2() - use goodsource and badsink by reversing the blocks in the switch */ +static void goodG2B2() +{ + char * data; + data = NULL; + switch(6) + { + case 6: + /* FIX: Allocate and point data to a large buffer that is at least as large as the large buffer used in the sink */ + data = (char *)malloc(100*sizeof(char)); + if (data == NULL) {exit(-1);} + data[0] = '\0'; /* null terminate */ + break; + default: + /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ + printLine("Benign, fixed string"); + break; + } + { + size_t i; + char source[100]; + memset(source, 'C', 100-1); /* fill with 'C's */ + source[100-1] = '\0'; /* null terminate */ + /* POTENTIAL FLAW: Possible buffer overflow if source is larger than data */ + for (i = 0; i < 100; i++) + { + data[i] = source[i]; + } + data[100-1] = '\0'; /* Ensure the destination buffer is null terminated */ + printLine(data); + free(data); + } +} + +void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_loop_15_good() +{ + goodG2B1(); + goodG2B2(); +} + +#endif /* OMITGOOD */ + +/* Below is the main(). It is only used when building this testcase on + * its own for testing or for building a binary to use in testing binary + * analysis tools. It is not used when compiling all the testcases as one + * application, which is how source code analysis tools are tested. + */ + +#ifdef INCLUDEMAIN + +int main(int argc, char * argv[]) +{ + /* seed randomness */ + srand( (unsigned)time(NULL) ); +#ifndef OMITGOOD + printLine("Calling good()..."); + CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_loop_15_good(); + printLine("Finished good()"); +#endif /* OMITGOOD */ +#ifndef OMITBAD + printLine("Calling bad()..."); + CWE122_Heap_Based_Buffer_Overflow__c_CWE805_char_loop_15_bad(); + printLine("Finished bad()"); +#endif /* OMITBAD */ + return 0; +} \ No newline at end of file diff --git a/test/testfiles/sard_test_cases/CWE_119_124_class_decl.c b/test/testfiles/sard_test_cases/CWE_119_124_class_decl.c new file mode 100644 index 0000000..f4c9b40 --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE_119_124_class_decl.c @@ -0,0 +1,35 @@ +#include "std_testcase.h" + +#include + +namespace CWE124_Buffer_Underwrite__char_alloca_memmove_82 +{ + +class CWE124_Buffer_Underwrite__char_alloca_memmove_82_base +{ +public: + /* pure virtual function */ + virtual void action(char * data) = 0; +}; + +#ifndef OMITBAD + +class CWE124_Buffer_Underwrite__char_alloca_memmove_82_bad : public CWE124_Buffer_Underwrite__char_alloca_memmove_82_base +{ +public: + void action(char * data); +}; + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +class CWE124_Buffer_Underwrite__char_alloca_memmove_82_goodG2B : public CWE124_Buffer_Underwrite__char_alloca_memmove_82_base +{ +public: + void action(char * data); +}; + +#endif /* OMITGOOD */ + +} \ No newline at end of file diff --git a/test/testfiles/sard_test_cases/CWE_119_124_class_method_decl.c b/test/testfiles/sard_test_cases/CWE_119_124_class_method_decl.c new file mode 100644 index 0000000..eae67d5 --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE_119_124_class_method_decl.c @@ -0,0 +1,23 @@ +#ifndef OMITBAD + +#include "std_testcase.h" +#include "CWE124_Buffer_Underwrite__char_alloca_memmove_82.h" + +namespace CWE124_Buffer_Underwrite__char_alloca_memmove_82 +{ + +void CWE124_Buffer_Underwrite__char_alloca_memmove_82_bad::action(char * data = NULL) +{ + { + char source[100]; + memset(source, 'C', 100-1); /* fill with 'C's */ + source[100-1] = '\0'; /* null terminate */ + /* POTENTIAL FLAW: Possibly copying data to memory before the destination buffer */ + memmove(data, source, 100*sizeof(char)); + /* Ensure the destination buffer is null terminated */ + data[100-1] = '\0'; + printLine(data); + } +} + +} \ No newline at end of file diff --git a/test/testfiles/sard_test_cases/CWE_119_124_fscanf.c b/test/testfiles/sard_test_cases/CWE_119_124_fscanf.c new file mode 100644 index 0000000..42f926e --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE_119_124_fscanf.c @@ -0,0 +1,148 @@ +#include "std_testcase.h" + +#ifndef OMITBAD + +void CWE124_Buffer_Underwrite__CWE839_fscanf_17_bad() +{ + int i,j; + int data; + /* Initialize data */ + data = -1; + for(i = 0; i < 1; i++) + { + /* POTENTIAL FLAW: Read data from the console using fscanf() */ + fscanf(stdin, "%d", &data); + } + for(j = 0; j < 1; j++) + { + { + int i; + int buffer[10] = { 0 }; + /* POTENTIAL FLAW: Attempt to access a negative index of the array + * This code does not check to see if the array index is negative */ + if (data < 10) + { + buffer[data] = 1; + /* Print the array values */ + for(i = 0; i < 10; i++) + { + printIntLine(buffer[i]); + } + } + else + { + printLine("ERROR: Array index is negative."); + } + } + } +} + +#endif /* OMITBAD */ + +#ifndef OMITGOOD + +/* goodB2G() - use badsource and goodsink in the for statements */ +static void goodB2G() +{ + int i,k; + int data; + /* Initialize data */ + data = -1; + for(i = 0; i < 1; i++) + { + /* POTENTIAL FLAW: Read data from the console using fscanf() */ + fscanf(stdin, "%d", &data); + } + for(k = 0; k < 1; k++) + { + { + int i; + int buffer[10] = { 0 }; + /* FIX: Properly validate the array index and prevent a buffer underwrite */ + if (data >= 0 && data < (10)) + { + buffer[data] = 1; + /* Print the array values */ + for(i = 0; i < 10; i++) + { + printIntLine(buffer[i]); + } + } + else + { + printLine("ERROR: Array index is out-of-bounds"); + } + } + } +} + +/* goodG2B() - use goodsource and badsink in the for statements */ +static void goodG2B() +{ + int h,j; + int data; + /* Initialize data */ + data = -1; + for(h = 0; h < 1; h++) + { + /* FIX: Use a value greater than 0, but less than 10 to avoid attempting to + * access an index of the array in the sink that is out-of-bounds */ + data = 7; + } + for(j = 0; j < 1; j++) + { + { + int i; + int buffer[10] = { 0 }; + /* POTENTIAL FLAW: Attempt to access a negative index of the array + * This code does not check to see if the array index is negative */ + if (data < 10) + { + buffer[data] = 1; + /* Print the array values */ + for(i = 0; i < 10; i++) + { + printIntLine(buffer[i]); + } + } + else + { + printLine("ERROR: Array index is negative."); + } + } + } +} + +void CWE124_Buffer_Underwrite__CWE839_fscanf_17_good() +{ + goodB2G(); + goodG2B(); +} + +#endif /* OMITGOOD */ + +/* Below is the main(). It is only used when building this testcase on + its own for testing or for building a binary to use in testing binary + analysis tools. It is not used when compiling all the testcases as one + application, which is how source code analysis tools are tested. */ + +#ifdef INCLUDEMAIN + +int main(int argc, char * argv[]) +{ + /* seed randomness */ + srand( (unsigned)time(NULL) ); +#ifndef OMITGOOD + printLine("Calling good()..."); + CWE124_Buffer_Underwrite__CWE839_fscanf_17_good(); + printLine("Finished good()"); +#endif /* OMITGOOD */ +#ifndef OMITBAD + printLine("Calling bad()..."); + CWE124_Buffer_Underwrite__CWE839_fscanf_17_bad(); + printLine("Finished bad()"); +#endif /* OMITBAD */ + return 0; +} + +#endif \ No newline at end of file diff --git a/test/testfiles/sard_test_cases/CWE_119_fget.c b/test/testfiles/sard_test_cases/CWE_119_fget.c new file mode 100644 index 0000000..c264085 --- /dev/null +++ b/test/testfiles/sard_test_cases/CWE_119_fget.c @@ -0,0 +1,44 @@ +#include "std_testcase.h" + +#define CHAR_ARRAY_SIZE (3 * sizeof(data) + 2) + +#ifndef OMITBAD + +void CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_01_bad() +{ + int data; + /* Initialize data */ + data = -1; + { + char inputBuffer[CHAR_ARRAY_SIZE] = ""; + /* POTENTIAL FLAW: Read data from the console using fgets() */ + if (fgets(inputBuffer, CHAR_ARRAY_SIZE, stdin) != NULL) + { + /* Convert to int */ + data = atoi(inputBuffer); + } + else + { + printLine("fgets() failed."); + } + } + { + int i; + int buffer[10] = { 0 }; + /* POTENTIAL FLAW: Attempt to write to an index of the array that is above the upper bound + * This code does check to see if the array index is negative */ + if (data >= 0) + { + buffer[data] = 1; + /* Print the array values */ + for(i = 0; i < 10; i++) + { + printIntLine(buffer[i]); + } + } + else + { + printLine("ERROR: Array index is negative."); + } + } +} \ No newline at end of file diff --git a/test/testfiles/sard_test_cases/io.c b/test/testfiles/sard_test_cases/io.c new file mode 100644 index 0000000..fad6c7b --- /dev/null +++ b/test/testfiles/sard_test_cases/io.c @@ -0,0 +1,190 @@ +#include // for PRId64 +#include +#include +#include +#include "std_testcase.h" + +#ifndef _WIN32 +#include +#endif + +void printLine (const char * line) +{ + if(line != NULL) + { + printf("%s\n", line); + } +} + +void printWLine (const wchar_t * line) +{ + if(line != NULL) + { + wprintf(L"%ls\n", line); + } +} + +void printIntLine (int intNumber) +{ + printf("%d\n", intNumber); +} + +void printShortLine (short shortNumber) +{ + printf("%hd\n", shortNumber); +} + +void printFloatLine (float floatNumber) +{ + printf("%f\n", floatNumber); +} + +void printLongLine (long longNumber) +{ + printf("%ld\n", longNumber); +} + +void printLongLongLine (int64_t longLongIntNumber) +{ + printf("%lld\n", longLongIntNumber); +} + +void printSizeTLine (size_t sizeTNumber) +{ + printf("%zu\n", sizeTNumber); +} + +void printHexCharLine (char charHex) +{ + printf("%02x\n", charHex); +} + +void printWcharLine(wchar_t wideChar) +{ + /* ISO standard dictates wchar_t can be ref'd only with %ls, so we must make a + * string to print a wchar */ + wchar_t s[2]; + s[0] = wideChar; + s[1] = L'\0'; + printf("%ls\n", s); +} + +void printUnsignedLine(unsigned unsignedNumber) +{ + printf("%u\n", unsignedNumber); +} + +void printHexUnsignedCharLine(unsigned char unsignedCharacter) +{ + printf("%02x\n", unsignedCharacter); +} + +void printDoubleLine(double doubleNumber) +{ + printf("%g\n", doubleNumber); +} + +void printStructLine (const twoIntsStruct * structTwoIntsStruct) +{ + printf("%d -- %d\n", structTwoIntsStruct->intOne, structTwoIntsStruct->intTwo); +} + +void printBytesLine(const unsigned char * bytes, size_t numBytes) +{ + size_t i; + for (i = 0; i < numBytes; ++i) + { + printf("%02x", bytes[i]); + } + puts(""); /* output newline */ +} + +/* Decode a string of hex characters into the bytes they represent. The second + * parameter specifies the length of the output buffer. The number of bytes + * actually written to the output buffer is returned. */ +size_t decodeHexChars(unsigned char * bytes, size_t numBytes, const char * hex) +{ + size_t numWritten = 0; + + /* We can't sscanf directly into the byte array since %02x expects a pointer to int, + * not a pointer to unsigned char. Also, since we expect an unbroken string of hex + * characters, we check for that before calling sscanf; otherwise we would get a + * framing error if there's whitespace in the input string. */ + while (numWritten < numBytes && isxdigit(hex[2 * numWritten]) && isxdigit(hex[2 * numWritten + 1])) + { + int byte; + sscanf(&hex[2 * numWritten], "%02x", &byte); + bytes[numWritten] = (unsigned char) byte; + ++numWritten; + } + + return numWritten; +} + +/* Decode a string of hex characters into the bytes they represent. The second + * parameter specifies the length of the output buffer. The number of bytes + * actually written to the output buffer is returned. */ + size_t decodeHexWChars(unsigned char * bytes, size_t numBytes, const wchar_t * hex) + { + size_t numWritten = 0; + + /* We can't swscanf directly into the byte array since %02x expects a pointer to int, + * not a pointer to unsigned char. Also, since we expect an unbroken string of hex + * characters, we check for that before calling swscanf; otherwise we would get a + * framing error if there's whitespace in the input string. */ + while (numWritten < numBytes && iswxdigit(hex[2 * numWritten]) && iswxdigit(hex[2 * numWritten + 1])) + { + int byte; + swscanf(&hex[2 * numWritten], L"%02x", &byte); + bytes[numWritten] = (unsigned char) byte; + ++numWritten; + } + + return numWritten; +} + +/* The two functions always return 1 or 0, so a tool should be able to + identify that uses of these functions will always return these values */ +int globalReturnsTrue() +{ + return 1; +} + +int globalReturnsFalse() +{ + return 0; +} + +int globalReturnsTrueOrFalse() +{ + return (rand() % 2); +} + +/* The variables below are declared "const", so a tool should + be able to identify that reads of these will always return their + initialized values. */ +const int GLOBAL_CONST_TRUE = 1; /* true */ +const int GLOBAL_CONST_FALSE = 0; /* false */ +const int GLOBAL_CONST_FIVE = 5; + +/* The variables below are not defined as "const", but are never + assigned any other value, so a tool should be able to identify that + reads of these will always return their initialized values. */ +int globalTrue = 1; /* true */ +int globalFalse = 0; /* false */ +int globalFive = 5; + + + +/* define global argc and argv */ + +#ifdef __cplusplus +extern "C" { +#endif + +int globalArgc = 0; +char** globalArgv = NULL; + +#ifdef __cplusplus +} +#endif