예제 #1
0
파일: lexer.py 프로젝트: AdaCore/langkit
 def render(self, lexer):
     return common_renderer.render(
         "lexer/case_action",
         alts=self.alts,
         last_alt=self.last_alt,
         max_match_len=self.max_match_len,
         lexer=lexer
     )
예제 #2
0
    def emit(self):
        """
        Return the content of the .qx file corresponding to this lexer
        specification. This function is not to be called by the client, and
        will be called by langkit when needed.

        :rtype: str
        """
        return common_renderer.render("lexer/quex_lexer_spec",
                                      tokens=self.tokens,
                                      patterns=self.__patterns,
                                      rules=self.rules,
                                      lexer=self)
예제 #3
0
파일: lexer.py 프로젝트: AdaCore/langkit
    def emit(self):
        """
        Return the content of the .qx file corresponding to this lexer
        specification. This function is not to be called by the client, and
        will be called by langkit when needed.

        :rtype: str
        """
        return common_renderer.render(
            "lexer/quex_lexer_spec",
            tokens_class=self.tokens_class,
            patterns=self.__patterns,
            rules=self.rules,
            lexer=self
        )
예제 #4
0
 def render(self, lexer):
     return common_renderer.render("lexer/case_action",
                                   alts=self.alts,
                                   last_alt=self.last_alt,
                                   max_match_len=self.max_match_len,
                                   lexer=lexer)