Home | Trees | Index | Help |
|
---|
Package lemon :: Package external :: Package gadfly :: Module kjParseBuild |
|
Python code for building a parser from a grammar :Author: Aaron Watters :Maintainers: http://gadfly.sf.net/ :Copyright: Aaron Robert Watters, 1994 :Id: $Id: kjParseBuild.py,v 1.1 2003/08/12 09:17:12 thejimmyg Exp $:
Classes | |
---|---|
CFSMachine |
a derived FSM class, with closure computation methods defined... |
CGrammar |
a derived grammar class this is a compilable grammar for automatic parser generation. |
codeReconstruct |
grammar reconstruction to a file... |
marshalReconstruct |
Reconstruction using marshalling to a file encodes internal structures for grammar using marshal-able objects. |
Reconstruct |
Grammar reconstruction objects encapsulate the process of grammar archiving. |
Ruleset |
Ruleset class, used to compute NFA and then DFA for parsing based on a list of rules. |
Function Summary | |
---|---|
FullBody should receive [ string, Bodylist] must determine whether the string represents a keyword, a nonterminal, or a terminal of the object grammar. | |
FullRuleList should receive list of form... | |
general procedure for different types of archiving for grammars... | |
for identifiers simply return the string... | |
InterpNonTerm should receive... | |
InterpRule should receive list of form... | |
InterpRuleName should receive... | |
NullBody should receive []... | |
function to create a "null CGrammar"... | |
NullRuleList should receive list of form []... | |
RootReduction should receive list of form... | |
function to generate a grammar for parsing grammar rules... |
Variable Summary | |
---|---|
int |
ABORTONERROR = 0 |
str |
COLKEY = '::'
|
str |
COMMENTFORM = '##.*\n'
|
str |
IDFORM = '[^\t\n\x0b\x0c\r ]+'
|
str |
IDNAME = 'ident'
|
str |
LTKEY = '>>'
|
tuple |
NULLTOKEN = (None, None)
|
str |
PMODULE = 'gadfly.kjParser'
|
str |
RSKEY = '@R'
|
Grammar |
RULEGRAM = <lemon.external.gadfly.kjParser.Grammar insta...
|
Function Details |
---|
FullBody(list, ObjectGram)FullBody should receive [ string, Bodylist] must determine whether the string represents a keyword, a nonterminal, or a terminal of the object grammar. returns (KEYFLAG, string) (TERMFLAG, string) or (NONTERMFLAG, string) respectively |
FullRuleList(list, ObjectGram)FullRuleList should receive list of form [ Rule, RuleList ] |
GrammarDumpSequence(ReconstructObj)general procedure for different types of archiving for grammars |
IdentFun(string)for identifiers simply return the string |
InterpNonTerm(list, ObjectGram)InterpNonTerm should receive [ string ] |
InterpRule(list, ObjectGram)InterpRule should receive list of form [keyword RSKEY, RuleNameStr, keyword COLKEY, Nontermtoken, keyword LTKEY, Bodylist] |
InterpRuleName(list, ObjectGram)InterpRuleName should receive [ string ] |
NullBody(list, ObjectGram)NullBody should receive [] |
NullCGrammar()function to create a "null CGrammar" |
NullRuleList(list, ObjectGram)NullRuleList should receive list of form [] |
RootReduction(list, ObjectGram)RootReduction should receive list of form [ nontermtoken, keyword COLKEY, RuleList ] |
ruleGrammar()function to generate a grammar for parsing grammar rules |
Variable Details |
---|
ABORTONERROR
|
COLKEY
|
COMMENTFORM
|
IDFORM
|
IDNAME
|
LTKEY
|
NULLTOKEN
|
PMODULE
|
RSKEY
|
RULEGRAM
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Mon Nov 10 15:08:21 2003 | http://epydoc.sf.net |