Ejemplo n.º 1
0
 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,
         )
Ejemplo n.º 2
0
 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,
     )
Ejemplo n.º 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
         )
Ejemplo n.º 4
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
Ejemplo n.º 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