コード例 #1
0
ファイル: _LycParser.py プロジェクト: bloff/rmtc-parsing
 def __init__(self):
     RMTCParser.__init__(self, TokenizationContext("Lyc Tokenization Context"),
                         default_lyc_readtable,
                         IndentationReadtableTokenizer,
                         default_lyc_transducer_chain)
     self.tokenization_context.set(
         # Tokenizer classes
         DelimiterTokenizer = LycDelimiterTokenizer,
         StringTokenizer = LycStringTokenizer,
         DelimitedSymbolTokenizer = DelimitedIdentifierTokenizer,
         CommentTokenizer = CommentTokenizer,
         RawCommentTokenizer = RawCommentTokenizer,
         )
コード例 #2
0
ファイル: _LycParser.py プロジェクト: bloff/rmtc-parsing
 def __init__(self):
     RMTCParser.__init__(self,
                         TokenizationContext("Lyc Tokenization Context"),
                         default_lyc_readtable,
                         IndentationReadtableTokenizer,
                         default_lyc_transducer_chain)
     self.tokenization_context.set(
         # Tokenizer classes
         DelimiterTokenizer=LycDelimiterTokenizer,
         StringTokenizer=LycStringTokenizer,
         DelimitedSymbolTokenizer=DelimitedIdentifierTokenizer,
         CommentTokenizer=CommentTokenizer,
         RawCommentTokenizer=RawCommentTokenizer,
     )
コード例 #3
0
 def __init__(self):
     RMTCParser.__init__(self, TokenizationContext("Anoky Tokenization Context"),
                         default_readtable,
                         IndentationReadtableTokenizer,
                         default_python_transducer_chain)
     self.tokenization_context.set(
         # ..
         DelimiterTokenizer = AnokyDelimiterTokenizer,
         SharpDelimiterTokenizer = AnokySharpDelimiterTokenizer,
         SingleQuoteStringTokenizer = AnokySingleQuoteStringTokenizer,
         DoubleQuoteStringTokenizer = AnokyDoubleQuoteStringTokenizer,
         TripleSingleQuoteStringTokenizer = AnokyTripleSingleQuoteStringTokenizer,
         TripleDoubleQuoteStringTokenizer = AnokyTripleDoubleQuoteStringTokenizer,
         CommentTokenizer = AnokyCommentTokenizer,
         LispModeTokenizer = LispModeTokenizer,
         CodeQuoteTokenizer = SingleUseTokenizer,
         DelimitedIdentifier = DelimitedIdentifierTokenizer,
         MetaImporter = MetaImporter
         )
コード例 #4
0
ファイル: _LycParser.py プロジェクト: bloff/rmtc-parsing
 def _get_stream(self, code_or_stream:Union[str, CharacterStream]):
     stream = RMTCParser._get_stream(self, code_or_stream)
     if not isinstance(stream, IndentedCharacterStream):
         stream = IndentedCharacterStream(stream)
     return stream
コード例 #5
0
 def _get_stream(self, code_or_stream:Union[str, CharacterStream]):
     stream = RMTCParser._get_stream(self, code_or_stream)
     if not isinstance(stream, IndentedCharacterStream):
         stream = IndentedCharacterStream(stream)
     return stream