# Generated from grammar/org/org.g4 by ANTLR 4.9.3 # 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\4") buf.write("\7\4\2\t\2\3\2\3\2\3\2\2\2\3\2\2\2\2\5\2\4\3\2\2\2\4\5") buf.write("\7\4\2\2\5\3\3\2\2\2\2") return buf.getvalue() class orgParser ( Parser ): grammarFileName = "org.g4" atn = ATNDeserializer().deserialize(serializedATN()) decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] sharedContextCache = PredictionContextCache() literalNames = [ ] symbolicNames = [ "<INVALID>", "WS", "ORG" ] RULE_orgPart = 0 ruleNames = [ "orgPart" ] EOF = Token.EOF WS=1 ORG=2 def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) self.checkVersion("4.9.3") self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._predicates = None class OrgPartContext(ParserRuleContext): __slots__ = 'parser' def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser def ORG(self): return self.getToken(orgParser.ORG, 0) def getRuleIndex(self): return orgParser.RULE_orgPart def enterRule(self, listener:ParseTreeListener): if hasattr( listener, "enterOrgPart" ): listener.enterOrgPart(self) def exitRule(self, listener:ParseTreeListener): if hasattr( listener, "exitOrgPart" ): listener.exitOrgPart(self) def orgPart(self): localctx = orgParser.OrgPartContext(self, self._ctx, self.state) self.enterRule(localctx, 0, self.RULE_orgPart) try: self.enterOuterAlt(localctx, 1) self.state = 2 self.match(orgParser.ORG) except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) self._errHandler.recover(self, re) finally: self.exitRule() return localctx