finesse.script.tokenizer.KatTokenizer

Overview

class finesse.script.tokenizer.KatTokenizer[source]

Bases: object

Kat 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

graph : KatGraph, optional

The parse graph to add parsed tokens to. Defaults to a new KatGraph.

Methods

KatTokenizer.__init__()

KatTokenizer.on_LBRACKET(token)

KatTokenizer.on_LPAREN(token)

KatTokenizer.on_NEWLINE(token)

KatTokenizer.on_RBRACKET(token)

KatTokenizer.on_RPAREN(token)

KatTokenizer.tokenize(string)

Tokenize specified string.

KatTokenizer.tokenize_file(fobj)

Generate tokens from the given file.