How to use the qface.idl.parser.TParser.TParser function in qface

To help you get started, we’ve selected a few qface examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Pelagicore / qface / qface / generator.py View on Github external
def _parse_stream(stream, system: System = None, document=None, profile=EProfile.FULL):
        logger.debug('parse stream')
        system = system or System()

        lexer = TLexer(stream)
        stream = CommonTokenStream(lexer)
        parser = TParser(stream)
        parser.addErrorListener(ReportingErrorListener(document))
        tree = parser.documentSymbol()
        walker = ParseTreeWalker()
        walker.walk(DomainListener(system, profile), tree)
        return system
github Pelagicore / qface / qface / idl / parser / TParser.py View on Github external
def getRuleIndex(self):
            return TParser.RULE_signalSymbol
github Pelagicore / qface / qface / idl / parser / TParser.py View on Github external
def getRuleIndex(self):
            return TParser.RULE_headerSymbol
github Pelagicore / qface / qface / idl / parser / TParser.py View on Github external
def structSymbol(self):

        localctx = TParser.StructSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_structSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 245
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 244
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 250
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
                self.state = 247
                self.tagSymbol()
                self.state = 252
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 253
            self.match(TParser.T__25)
github Pelagicore / qface / qface / idl / parser / TParser.py View on Github external
def getRuleIndex(self):
            return TParser.RULE_primitiveTypeSymbol
github Pelagicore / qface / qface / idl / parser / TParser.py View on Github external
def getRuleIndex(self):
            return TParser.RULE_typeSymbol
github Pelagicore / qface / qface / idl / parser / TParser.py View on Github external
def getRuleIndex(self):
            return TParser.RULE_enumSymbol
github Pelagicore / qface / qface / idl / parser / TParser.py View on Github external
def getRuleIndex(self):
            return TParser.RULE_structFieldSymbol
github Pelagicore / qface / qface / idl / parser / TParser.py View on Github external
def enumSymbol(self):

        localctx = TParser.EnumSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_enumSymbol)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 281
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            if _la==TParser.DOCCOMMENT:
                self.state = 280
                localctx.comment = self.match(TParser.DOCCOMMENT)


            self.state = 286
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while _la==TParser.TAGLINE:
github Pelagicore / qface / qface / idl / parser / TParser.py View on Github external
def primitiveTypeSymbol(self):

        localctx = TParser.PrimitiveTypeSymbolContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_primitiveTypeSymbol)
        try:
            self.state = 227
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [TParser.T__15]:
                self.enterOuterAlt(localctx, 1)
                self.state = 222
                localctx.name = self.match(TParser.T__15)
                pass
            elif token in [TParser.T__16]:
                self.enterOuterAlt(localctx, 2)
                self.state = 223
                localctx.name = self.match(TParser.T__16)
                pass
            elif token in [TParser.T__17]: