Home | Trees | Index | Help |
|
---|
Package lemon :: Package external :: Package gadfly :: Module kjParser |
|
Python for parser interpretation :Author: Aaron Watters :Maintainers: http://gadfly.sf.net/ :Copyright: Aaron Robert Watters, 1994 :Id: $Id: kjParser.py,v 1.1 2003/08/12 09:17:12 thejimmyg Exp $:
Classes | |
---|---|
FSMachine |
|
Grammar |
the grammar class:... |
KeywordDict |
|
lexdictionary |
|
LexDictionary |
|
LexStringWalker |
|
ParserObj |
the parse class: Based loosely on Aho+Ullman, Principles of Compiler Design, Ch.6. |
ParseRule |
the rule class... |
UnMarshaller |
unmarshalling object for unmarshalling grammar from a python module... |
Exceptions | |
---|---|
BadPunctError |
if try to make whitespace a punct... |
FlowError |
shouldn't happen!!! (bug)... |
LexTokenError |
may happen on bad string... |
NondetError |
shouldn't happen?... |
ParseInitError |
shouldn't happen?... |
ReductError |
shouldn't happen?... |
UnkTermError |
ditto... |
Function Summary | |
---|---|
used as a default reduction function for rules... | |
DumpStringWindow(Str,
Pos,
Offset)
| |
function for declaring a variable to represent a nonterminal:... | |
function to create a "null grammar"... | |
for debugging: look through a rule list and print names of rules... | |
RMATCH(re,
key,
start)
| |
declaring a terminal WITHOUT INSTALLING IT IN A LexDict... | |
unmarshalling a marshalled grammar created by buildmodule.CGrammar.MarshalDump(Tofile) tightly coupled with buildmodule code... |
Variable Summary | |
---|---|
tuple |
ENDOFFILETERM = ((-8, '*'), '*')
|
tuple |
ENDOFFILETOKEN = (-8, '*')
|
int |
RUNTESTS = 0 |
str |
THISMODULE = 'gadfly.kjParser'
|
int |
WARNONDEFAULTS = 0 |
str |
WHITERE = '[\t\n\x0b\x0c\r ]+'
|
SRE_Pattern |
WHITEREGEX = [\t\n\v\f\r ]+
|
Function Details |
---|
DefaultReductFun(RuleResultsList, Context)used as a default reduction function for rules |
nonterminal(string)function for declaring a variable to represent a nonterminal: eg Program = nonterminal("program") included for convenient autodocumentation |
NullGrammar()function to create a "null grammar" |
PrintDefaultBindings(rulelist)for debugging: look through a rule list and print names of rules that have default binding |
termrep(string)declaring a terminal WITHOUT INSTALLING IT IN A LexDict |
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! |
Variable Details |
---|
ENDOFFILETERM
|
ENDOFFILETOKEN
|
RUNTESTS
|
THISMODULE
|
WARNONDEFAULTS
|
WHITERE
|
WHITEREGEX
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Mon Nov 10 15:08:20 2003 | http://epydoc.sf.net |