Imported modules
|
|
import kjSet
import regex
import regsub
import string
|
Functions
|
|
DefaultReductFun
DumpStringWindow
NullGrammar
PrintDefaultBindings
UnMarshalGram
nonterminal
termrep
|
|
DefaultReductFun
|
DefaultReductFun ( RuleResultsList, Context )
the following function is used as a default reduction function
for rules
|
|
DumpStringWindow
|
DumpStringWindow (
Str,
Pos,
Offset=15,
)
utility function for error diagnostics
|
|
NullGrammar
|
NullGrammar ()
function to create a "null grammar"
|
|
PrintDefaultBindings
|
PrintDefaultBindings ( rulelist )
for debugging: look through a rule list
and print names of rules that have default binding
|
|
UnMarshalGram
|
UnMarshalGram ( file )
unmarshalling a marshalled grammar created by
buildmodule.CGrammar.MarshalDump(Tofile)
tightly coupled with buildmodule code...
file should be open and "pointing to" the marshalled rep.
warning: doesn't bind semantics!
|
|
nonterminal
|
nonterminal ( string )
function for declaring a variable to represent a nonterminal:
eg Program = nonterminal("program")
included for convenient autodocumentation
|
|
termrep
|
termrep ( string )
declaring a terminal WITHOUT INSTALLING IT IN A LexDict
|
Classes
|
|
|