yacc

Customized version of ply.yacc parser

This is a modified version of ply.yacc (from PLY 3.11) that removes support for loading parse tables from picklefiles or arbitrary locations on the filesystem. yacc() is expected to be used in a “2-pass” mode: either called to generate the parse table module, or else passed the imported parse table module to return a fully-constructed parser.

The YACC logic itself is unchanged from the original distribution.

Classes

Grammar(terminals)

LRGeneratedTable(grammar[, method, log])

LRItem(p, n)

LRParser(lrtab, errorf)

LRTable()

MiniProduction(str, name, len, func, file, line)

NullLogger()

ParserReflect(pdict[, log])

PlyLogger(f)

Production(number, name, prod[, precedence, ...])

YaccProduction(s[, stack])

YaccSymbol()

Exceptions

GrammarError

LALRError

VersionError

YaccError

Functions

call_errorfunc(errorfunc, token, parser)

digraph(X, R, FP)

errok()

format_result(r)

format_stack_entry(r)

get_caller_module_dict(levels)

parse_grammar(doc, file, line)

restart()

rightmost_terminal(symbols, terminals)

token()

traverse(x, N, stack, F, X, R, FP)

yacc([method, debug, module, tabmodule, ...])

Generate and return a parser object