MCPcopy Create free account
hub / github.com/avicoder/spoodle / WordLexer

Class WordLexer

dnslib/lex.py:140–245  ·  view source on GitHub ↗

Example lexer which will split input stream into words (respecting quotes) To emit SPACE tokens: self.spacetok = ('SPACE',None) To emit NL tokens: self.nltok = ('NL',None) >>> l = WordLexer(r'abc "def\100\x3d\. ghi" jkl') >>> list(l) [('ATOM

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

__init__Method · 0.90
__init__Method · 0.90
lex.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected