finesse.script.tokenizer module
Tokenization for kat script.
This differs from a typical tokenizer in that it tokenizes whitespace and newline characters, which have important meanings in kat script and help maintain formatting in later model serialization.
Inspired by the Python standard library tokenize module and lex.py from David Beazley’s SLY (https://github.com/dabeaz/sly/).
Sean Leavey <sean.leavey@ligo.org>
- class finesse.script.tokenizer.KatTokenizer[source]
Bases:
objectKat script token generator.
Regular expressions define patterns to match prototypes. Prototypes are then either emitted as tokens as-is, or modified by callback methods defined in this class.
Parameters