lex

Customized version of ply.lex lexer for string data

This is copy of ply.lex (from PLY 3.11) that has been modified to prevent loading arbitrary lexer table files. “Optimized” (cached) lexer table modules should be loaded by the client and passed as a module to lex().

The LEX logic itself is unchanged from the original distribution.

Classes

LexToken()

Lexer()

LexerReflect(ldict[, log, reflags])

NullLogger()

PlyLogger(f)

Exceptions

LexError(message, s)

Functions

TOKEN(r)

Token(r)

get_caller_module_dict(levels)

lex([module, debug, optimize, lextab, ...])

Generate and return a Lexer (tokenizer) object

runmain([lexer, data])