pyk.kast.lexer module

class State(value)[source]

Bases: Enum

An enumeration.

DEFAULT = 1
SORT = 2
class Token(text, type)[source]

Bases: NamedTuple

text: str

Alias for field number 0

type: TokenType

Alias for field number 1

class TokenType(value)[source]

Bases: Enum

An enumeration.

COLON = 5
COMMA = 4
DOTK = 7
DOTKLIST = 8
EOF = 1
ID = 10
KLABEL = 13
KSEQ = 6
LPAREN = 2
RPAREN = 3
SORT = 12
STRING = 14
TOKEN = 9
VARIABLE = 11
lexer(text: Iterable[str]) Iterator[Token][source]