pureyaml.ply package

Submodules

pureyaml.ply.cpp module

pureyaml.ply.cpp.CPP_INTEGER(t)[source]

(((((0x)|(0X))[0-9a-fA-F]+)|(d+))([uU][lL]|[lL][uU]|[uU]|[lL])?)

class pureyaml.ply.cpp.Macro(name, value, arglist=None, variadic=False)[source]

Bases: object

__dict__ = dict_proxy({'__dict__': <attribute '__dict__' of 'Macro' objects>, '__module__': 'pureyaml.ply.cpp', '__weakref__': <attribute '__weakref__' of 'Macro' objects>, '__doc__': None, '__init__': <function __init__ at 0x7fc3b774b5f0>})
__doc__ = None
__init__(name, value, arglist=None, variadic=False)[source]
__module__ = 'pureyaml.ply.cpp'
__weakref__

list of weak references to the object (if defined)

class pureyaml.ply.cpp.Preprocessor(lexer=None)[source]

Bases: object

__dict__ = dict_proxy({'__module__': 'pureyaml.ply.cpp', 'add_path': <function add_path at 0x7fc3b774bde8>, 'error': <function error at 0x7fc3b774b7d0>, 'macro_expand_args': <function macro_expand_args at 0x7fc3b779bb90>, 'lexprobe': <function lexprobe at 0x7fc3b774b8c0>, 'parse': <function parse at 0x7fc3b779b758>, 'undef': <function undef at 0x7fc3b779b320>, '__dict__': <attribute '__dict__' of 'Preprocessor' objects>, 'collect_args': <function collect_args at 0x7fc3b779baa0>, '__weakref__': <attribute '__weakref__' of 'Preprocessor' objects>, '__init__': <function __init__ at 0x7fc3b774bd70>, 'parsegen': <function parsegen at 0x7fc3b779b1b8>, 'evalexpr': <function evalexpr at 0x7fc3b779b230>, 'expand_macros': <function expand_macros at 0x7fc3b779b7d0>, 'macro_prescan': <function macro_prescan at 0x7fc3b779b5f0>, 'tokenstrip': <function tokenstrip at 0x7fc3b774bf50>, 'token': <function token at 0x7fc3b779bb18>, 'tokenize': <function tokenize at 0x7fc3b774b320>, 'include': <function include at 0x7fc3b779b410>, '__doc__': None, 'group_lines': <function group_lines at 0x7fc3b774b500>, 'define': <function define at 0x7fc3b779b500>})
__doc__ = None
__init__(lexer=None)[source]
__module__ = 'pureyaml.ply.cpp'
__weakref__

list of weak references to the object (if defined)

add_path(path)[source]
collect_args(tokenlist)[source]
define(tokens)[source]
error(file, line, msg)[source]
evalexpr(tokens)[source]
expand_macros(tokens, expanded=None)[source]
group_lines(input)[source]
include(tokens)[source]
lexprobe()[source]
macro_expand_args(macro, args)[source]
macro_prescan(macro)[source]
parse(input, source=None, ignore={})[source]
parsegen(input, source=None)[source]
token()[source]
tokenize(text)[source]
tokenstrip(tokens)[source]
undef(tokens)[source]
pureyaml.ply.cpp.t_CPP_CHAR(t)[source]

(L)?’([^\n]|(\(.|n)))*?’

pureyaml.ply.cpp.t_CPP_COMMENT1(t)[source]

(/*(.|n)*?*/)

pureyaml.ply.cpp.t_CPP_COMMENT2(t)[source]

(//.*?(n|$))

pureyaml.ply.cpp.t_CPP_INTEGER(t)

(((((0x)|(0X))[0-9a-fA-F]+)|(d+))([uU][lL]|[lL][uU]|[uU]|[lL])?)

pureyaml.ply.cpp.t_CPP_STRING(t)[source]

“([^\n]|(\(.|n)))*?”

pureyaml.ply.cpp.t_CPP_WS(t)[source]

s+

pureyaml.ply.cpp.t_error(t)[source]
pureyaml.ply.cpp.trigraph(input)[source]

pureyaml.ply.ctokens module

pureyaml.ply.ctokens.t_COMMENT(t)[source]

/*(.|n)*?*/

pureyaml.ply.ctokens.t_CPPCOMMENT(t)[source]

//.*n

pureyaml.ply.lex module

exception pureyaml.ply.lex.LexError(message, s)[source]

Bases: exceptions.Exception

__doc__ = None
__init__(message, s)[source]
__module__ = 'pureyaml.ply.lex'
__weakref__

list of weak references to the object (if defined)

class pureyaml.ply.lex.LexToken[source]

Bases: object

__dict__ = dict_proxy({'__module__': 'pureyaml.ply.lex', '__str__': <function __str__ at 0x7fc3ba10c500>, '__repr__': <function __repr__ at 0x7fc3ba10c578>, '__dict__': <attribute '__dict__' of 'LexToken' objects>, '__weakref__': <attribute '__weakref__' of 'LexToken' objects>, '__doc__': None})
__doc__ = None
__module__ = 'pureyaml.ply.lex'
__repr__()[source]
__str__()[source]
__weakref__

list of weak references to the object (if defined)

class pureyaml.ply.lex.Lexer[source]
__doc__ = None
__init__()[source]
__iter__()[source]
__module__ = 'pureyaml.ply.lex'
__next__()
begin(state)[source]
clone(object=None)[source]
current_state()[source]
input(s)[source]
next()[source]
pop_state()[source]
push_state(state)[source]
readtab(tabfile, fdict)[source]
skip(n)[source]
token()[source]
writetab(lextab, outputdir='')[source]
class pureyaml.ply.lex.LexerReflect(ldict, log=None, reflags=0)[source]

Bases: object

__dict__ = dict_proxy({'__module__': 'pureyaml.ply.lex', 'get_states': <function get_states at 0x7fc3ba11a578>, 'validate_tokens': <function validate_tokens at 0x7fc3ba11a410>, 'get_rules': <function get_rules at 0x7fc3ba11a5f0>, 'validate_all': <function validate_all at 0x7fc3ba11a320>, 'get_all': <function get_all at 0x7fc3ba11a2a8>, 'validate_module': <function validate_module at 0x7fc3ba11a6e0>, 'get_literals': <function get_literals at 0x7fc3ba11a488>, '__dict__': <attribute '__dict__' of 'LexerReflect' objects>, 'validate_literals': <function validate_literals at 0x7fc3ba11a500>, 'get_tokens': <function get_tokens at 0x7fc3ba11a398>, 'validate_rules': <function validate_rules at 0x7fc3ba11a668>, '__weakref__': <attribute '__weakref__' of 'LexerReflect' objects>, '__doc__': None, '__init__': <function __init__ at 0x7fc3ba11a230>})
__doc__ = None
__init__(ldict, log=None, reflags=0)[source]
__module__ = 'pureyaml.ply.lex'
__weakref__

list of weak references to the object (if defined)

get_all()[source]
get_literals()[source]
get_rules()[source]
get_states()[source]
get_tokens()[source]
validate_all()[source]
validate_literals()[source]
validate_module(module)[source]
validate_rules()[source]
validate_tokens()[source]
class pureyaml.ply.lex.NullLogger[source]

Bases: object

__call__(*args, **kwargs)[source]
__dict__ = dict_proxy({'__module__': 'pureyaml.ply.lex', '__getattribute__': <function __getattribute__ at 0x7fc3ba10c7d0>, '__dict__': <attribute '__dict__' of 'NullLogger' objects>, '__call__': <function __call__ at 0x7fc3ba10c848>, '__weakref__': <attribute '__weakref__' of 'NullLogger' objects>, '__doc__': None})
__doc__ = None
__getattribute__(name)[source]
__module__ = 'pureyaml.ply.lex'
__weakref__

list of weak references to the object (if defined)

class pureyaml.ply.lex.PlyLogger(f)[source]

Bases: object

__dict__ = dict_proxy({'info': <function critical at 0x7fc3ba10c668>, '__dict__': <attribute '__dict__' of 'PlyLogger' objects>, '__module__': 'pureyaml.ply.lex', 'critical': <function critical at 0x7fc3ba10c668>, 'error': <function error at 0x7fc3ba10c758>, 'debug': <function critical at 0x7fc3ba10c668>, '__weakref__': <attribute '__weakref__' of 'PlyLogger' objects>, 'warning': <function warning at 0x7fc3ba10c6e0>, '__doc__': None, '__init__': <function __init__ at 0x7fc3ba10c5f0>})
__doc__ = None
__init__(f)[source]
__module__ = 'pureyaml.ply.lex'
__weakref__

list of weak references to the object (if defined)

critical(msg, *args, **kwargs)[source]
debug(msg, *args, **kwargs)
error(msg, *args, **kwargs)[source]
info(msg, *args, **kwargs)
warning(msg, *args, **kwargs)[source]
pureyaml.ply.lex.TOKEN(r)[source]
pureyaml.ply.lex.Token(r)
pureyaml.ply.lex._form_master_re(relist, reflags, ldict, toknames)[source]
pureyaml.ply.lex._funcs_to_names(funclist, namelist)[source]
pureyaml.ply.lex._get_regex(func)[source]
pureyaml.ply.lex._names_to_funcs(namelist, fdict)[source]
pureyaml.ply.lex._statetoken(s, names)[source]
pureyaml.ply.lex.get_caller_module_dict(levels)[source]
pureyaml.ply.lex.lex(module=None, object=None, debug=False, optimize=False, lextab='lextab', reflags=0, nowarn=False, outputdir=None, debuglog=None, errorlog=None)[source]
pureyaml.ply.lex.runmain(lexer=None, data=None)[source]

pureyaml.ply.yacc module

class pureyaml.ply.yacc.Grammar(terminals)[source]

Bases: object

__dict__ = dict_proxy({'__module__': 'pureyaml.ply.yacc', 'unused_precedence': <function unused_precedence at 0x7fc3ba13ac80>, '__getitem__': <function __getitem__ at 0x7fc3ba13a848>, 'add_production': <function add_production at 0x7fc3ba13a938>, 'set_start': <function set_start at 0x7fc3ba13a9b0>, 'compute_first': <function compute_first at 0x7fc3ba13ad70>, '__dict__': <attribute '__dict__' of 'Grammar' objects>, '__weakref__': <attribute '__weakref__' of 'Grammar' objects>, '__init__': <function __init__ at 0x7fc3ba13a758>, '_first': <function _first at 0x7fc3ba13acf8>, 'find_unreachable': <function find_unreachable at 0x7fc3ba13aa28>, 'unused_terminals': <function unused_terminals at 0x7fc3ba13ab90>, 'set_precedence': <function set_precedence at 0x7fc3ba13a8c0>, 'compute_follow': <function compute_follow at 0x7fc3ba13ade8>, 'unused_rules': <function unused_rules at 0x7fc3ba13ac08>, 'undefined_symbols': <function undefined_symbols at 0x7fc3ba13ab18>, 'build_lritems': <function build_lritems at 0x7fc3ba13ae60>, '__doc__': None, '__len__': <function __len__ at 0x7fc3ba13a7d0>, 'infinite_cycles': <function infinite_cycles at 0x7fc3ba13aaa0>})
__doc__ = None
__getitem__(index)[source]
__init__(terminals)[source]
__len__()[source]
__module__ = 'pureyaml.ply.yacc'
__weakref__

list of weak references to the object (if defined)

_first(beta)[source]
add_production(prodname, syms, func=None, file='', line=0)[source]
build_lritems()[source]
compute_first()[source]
compute_follow(start=None)[source]
find_unreachable()[source]
infinite_cycles()[source]
set_precedence(term, assoc, level)[source]
set_start(start=None)[source]
undefined_symbols()[source]
unused_precedence()[source]
unused_rules()[source]
unused_terminals()[source]
exception pureyaml.ply.yacc.GrammarError[source]

Bases: pureyaml.ply.yacc.YaccError

__doc__ = None
__module__ = 'pureyaml.ply.yacc'
exception pureyaml.ply.yacc.LALRError[source]

Bases: pureyaml.ply.yacc.YaccError

__doc__ = None
__module__ = 'pureyaml.ply.yacc'
class pureyaml.ply.yacc.LRGeneratedTable(grammar, method='LALR', log=None)[source]

Bases: pureyaml.ply.yacc.LRTable

__doc__ = None
__init__(grammar, method='LALR', log=None)[source]
__module__ = 'pureyaml.ply.yacc'
add_lalr_lookaheads(C)[source]
add_lookaheads(lookbacks, followset)[source]
compute_follow_sets(ntrans, readsets, inclsets)[source]
compute_lookback_includes(C, trans, nullable)[source]
compute_nullable_nonterminals()[source]
compute_read_sets(C, ntrans, nullable)[source]
dr_relation(C, trans, nullable)[source]
find_nonterminal_transitions(C)[source]
lr0_closure(I)[source]
lr0_goto(I, x)[source]
lr0_items()[source]
lr_parse_table()[source]
pickle_table(filename, signature='')[source]
reads_relation(C, trans, empty)[source]
write_table(tabmodule, outputdir='', signature='')[source]
class pureyaml.ply.yacc.LRItem(p, n)[source]

Bases: object

__dict__ = dict_proxy({'__module__': 'pureyaml.ply.yacc', '__str__': <function __str__ at 0x7fc3ba13a5f0>, '__repr__': <function __repr__ at 0x7fc3ba13a668>, '__dict__': <attribute '__dict__' of 'LRItem' objects>, '__weakref__': <attribute '__weakref__' of 'LRItem' objects>, '__doc__': None, '__init__': <function __init__ at 0x7fc3ba13a578>})
__doc__ = None
__init__(p, n)[source]
__module__ = 'pureyaml.ply.yacc'
__repr__()[source]
__str__()[source]
__weakref__

list of weak references to the object (if defined)

class pureyaml.ply.yacc.LRParser(lrtab, errorf)[source]
__doc__ = None
__init__(lrtab, errorf)[source]
__module__ = 'pureyaml.ply.yacc'
disable_defaulted_states()[source]
errok()[source]
parse(input=None, lexer=None, debug=False, tracking=False, tokenfunc=None)[source]
parsedebug(input=None, lexer=None, debug=False, tracking=False, tokenfunc=None)[source]
parseopt(input=None, lexer=None, debug=False, tracking=False, tokenfunc=None)[source]
parseopt_notrack(input=None, lexer=None, debug=False, tracking=False, tokenfunc=None)[source]
restart()[source]
set_defaulted_states()[source]
class pureyaml.ply.yacc.LRTable[source]

Bases: object

__dict__ = dict_proxy({'__module__': 'pureyaml.ply.yacc', 'read_pickle': <function read_pickle at 0x7fc3ba13b050>, '__doc__': None, 'read_table': <function read_table at 0x7fc3ba13af50>, '__dict__': <attribute '__dict__' of 'LRTable' objects>, '__weakref__': <attribute '__weakref__' of 'LRTable' objects>, 'bind_callables': <function bind_callables at 0x7fc3ba13b0c8>, '__init__': <function __init__ at 0x7fc3ba13aed8>})
__doc__ = None
__init__()[source]
__module__ = 'pureyaml.ply.yacc'
__weakref__

list of weak references to the object (if defined)

bind_callables(pdict)[source]
read_pickle(filename)[source]
read_table(module)[source]
class pureyaml.ply.yacc.MiniProduction(str, name, len, func, file, line)[source]

Bases: object

__dict__ = dict_proxy({'__module__': 'pureyaml.ply.yacc', 'bind': <function bind at 0x7fc3ba13a500>, '__str__': <function __str__ at 0x7fc3ba13a410>, '__repr__': <function __repr__ at 0x7fc3ba13a488>, '__dict__': <attribute '__dict__' of 'MiniProduction' objects>, '__weakref__': <attribute '__weakref__' of 'MiniProduction' objects>, '__doc__': None, '__init__': <function __init__ at 0x7fc3ba13a398>})
__doc__ = None
__init__(str, name, len, func, file, line)[source]
__module__ = 'pureyaml.ply.yacc'
__repr__()[source]
__str__()[source]
__weakref__

list of weak references to the object (if defined)

bind(pdict)[source]
class pureyaml.ply.yacc.NullLogger[source]

Bases: object

__call__(*args, **kwargs)[source]
__dict__ = dict_proxy({'__module__': 'pureyaml.ply.yacc', '__getattribute__': <function __getattribute__ at 0x7fc3ba137140>, '__dict__': <attribute '__dict__' of 'NullLogger' objects>, '__call__': <function __call__ at 0x7fc3ba1371b8>, '__weakref__': <attribute '__weakref__' of 'NullLogger' objects>, '__doc__': None})
__doc__ = None
__getattribute__(name)[source]
__module__ = 'pureyaml.ply.yacc'
__weakref__

list of weak references to the object (if defined)

class pureyaml.ply.yacc.ParserReflect(pdict, log=None)[source]

Bases: object

__dict__ = dict_proxy({'validate_precedence': <function validate_precedence at 0x7fc3ba13c0c8>, 'validate_modules': <function validate_modules at 0x7fc3ba13bc80>, 'validate_error_func': <function validate_error_func at 0x7fc3ba13be60>, 'validate_all': <function validate_all at 0x7fc3ba13bb90>, 'get_all': <function get_all at 0x7fc3ba13bb18>, 'signature': <function signature at 0x7fc3ba13bc08>, '__module__': 'pureyaml.ply.yacc', 'validate_pfunctions': <function validate_pfunctions at 0x7fc3ba13c1b8>, '__dict__': <attribute '__dict__' of 'ParserReflect' objects>, '__weakref__': <attribute '__weakref__' of 'ParserReflect' objects>, '__init__': <function __init__ at 0x7fc3ba13baa0>, 'validate_tokens': <function validate_tokens at 0x7fc3ba13bf50>, 'validate_start': <function validate_start at 0x7fc3ba13bd70>, 'get_start': <function get_start at 0x7fc3ba13bcf8>, 'get_pfunctions': <function get_pfunctions at 0x7fc3ba13c140>, 'get_tokens': <function get_tokens at 0x7fc3ba13bed8>, '__doc__': None, 'get_error_func': <function get_error_func at 0x7fc3ba13bde8>, 'get_precedence': <function get_precedence at 0x7fc3ba13c050>})
__doc__ = None
__init__(pdict, log=None)[source]
__module__ = 'pureyaml.ply.yacc'
__weakref__

list of weak references to the object (if defined)

get_all()[source]
get_error_func()[source]
get_pfunctions()[source]
get_precedence()[source]
get_start()[source]
get_tokens()[source]
signature()[source]
validate_all()[source]
validate_error_func()[source]
validate_modules()[source]
validate_pfunctions()[source]
validate_precedence()[source]
validate_start()[source]
validate_tokens()[source]
class pureyaml.ply.yacc.PlyLogger(f)[source]

Bases: object

__dict__ = dict_proxy({'info': <function debug at 0x7fc3ba11af50>, '__dict__': <attribute '__dict__' of 'PlyLogger' objects>, '__module__': 'pureyaml.ply.yacc', 'warning': <function warning at 0x7fc3ba137050>, 'critical': <function debug at 0x7fc3ba11af50>, 'error': <function error at 0x7fc3ba1370c8>, 'debug': <function debug at 0x7fc3ba11af50>, '__weakref__': <attribute '__weakref__' of 'PlyLogger' objects>, '__doc__': None, '__init__': <function __init__ at 0x7fc3ba11aed8>})
__doc__ = None
__init__(f)[source]
__module__ = 'pureyaml.ply.yacc'
__weakref__

list of weak references to the object (if defined)

critical(msg, *args, **kwargs)
debug(msg, *args, **kwargs)[source]
error(msg, *args, **kwargs)[source]
info(msg, *args, **kwargs)
warning(msg, *args, **kwargs)[source]
class pureyaml.ply.yacc.Production(number, name, prod, precedence=('right', 0), func=None, file='', line=0)[source]

Bases: object

__dict__ = dict_proxy({'__module__': 'pureyaml.ply.yacc', '__nonzero__': <function __nonzero__ at 0x7fc3ba13a1b8>, '__getitem__': <function __getitem__ at 0x7fc3ba13a230>, 'lr_item': <function lr_item at 0x7fc3ba13a2a8>, 'bind': <function bind at 0x7fc3ba13a320>, '__str__': <function __str__ at 0x7fc3ba13a050>, '__doc__': None, '__len__': <function __len__ at 0x7fc3ba13a140>, '__dict__': <attribute '__dict__' of 'Production' objects>, '__weakref__': <attribute '__weakref__' of 'Production' objects>, 'reduced': 0, '__init__': <function __init__ at 0x7fc3ba137f50>, '__repr__': <function __repr__ at 0x7fc3ba13a0c8>})
__doc__ = None
__getitem__(index)[source]
__init__(number, name, prod, precedence=('right', 0), func=None, file='', line=0)[source]
__len__()[source]
__module__ = 'pureyaml.ply.yacc'
__nonzero__()[source]
__repr__()[source]
__str__()[source]
__weakref__

list of weak references to the object (if defined)

bind(pdict)[source]
lr_item(n)[source]
reduced = 0
exception pureyaml.ply.yacc.VersionError[source]

Bases: pureyaml.ply.yacc.YaccError

__doc__ = None
__module__ = 'pureyaml.ply.yacc'
exception pureyaml.ply.yacc.YaccError[source]

Bases: exceptions.Exception

__doc__ = None
__module__ = 'pureyaml.ply.yacc'
__weakref__

list of weak references to the object (if defined)

class pureyaml.ply.yacc.YaccProduction(s, stack=None)[source]
__doc__ = None
__getitem__(n)[source]
__getslice__(i, j)[source]
__init__(s, stack=None)[source]
__len__()[source]
__module__ = 'pureyaml.ply.yacc'
__setitem__(n, v)[source]
error()[source]
lexpos(n)[source]
lexspan(n)[source]
lineno(n)[source]
linespan(n)[source]
set_lineno(n, lineno)[source]
class pureyaml.ply.yacc.YaccSymbol[source]
__doc__ = None
__module__ = 'pureyaml.ply.yacc'
__repr__()[source]
__str__()[source]
pureyaml.ply.yacc.call_errorfunc(errorfunc, token, parser)[source]
pureyaml.ply.yacc.digraph(X, R, FP)[source]
pureyaml.ply.yacc.errok()[source]
pureyaml.ply.yacc.format_result(r)[source]
pureyaml.ply.yacc.format_stack_entry(r)[source]
pureyaml.ply.yacc.get_caller_module_dict(levels)[source]
pureyaml.ply.yacc.parse_grammar(doc, file, line)[source]
pureyaml.ply.yacc.restart()[source]
pureyaml.ply.yacc.rightmost_terminal(symbols, terminals)[source]
pureyaml.ply.yacc.token()[source]
pureyaml.ply.yacc.traverse(x, N, stack, F, X, R, FP)[source]
pureyaml.ply.yacc.yacc(method='LALR', debug=True, module=None, tabmodule='parsetab', start=None, check_recursion=True, optimize=False, write_tables=True, debugfile='parser.out', outputdir=None, debuglog=None, errorlog=None, picklefile=None)[source]

pureyaml.ply.ygen module

pureyaml.ply.ygen.filter_section(lines, tag)[source]
pureyaml.ply.ygen.get_source_range(lines, tag)[source]
pureyaml.ply.ygen.main()[source]