Trees | Index | Help |
|
---|
Module parser :: Class Yappy |
|
LRparser
--+
|
Yappy
Yappy_grammar
Method Summary | |
---|---|
@param tokenize: same as for L{Lexer}... | |
Reads from stdin or string and retuns parsed result | |
Reads input from file | |
To be defined using output | |
A test for each class | |
Inherited from LRparser | |
Return the LR parsing table showing for each state the action and goto function | |
Transforms a string in a grammar description | |
Transforms a string into a grammar description | |
LR Parsing Algorithm (aho86:_compil, page 218) |
Instance Variable Summary | |
---|---|
lex : a Lexer object | |
Inherited from LRparser | |
ACTION : Action function | |
cfgr : context free grammar | |
context : computational context | |
GOTO : Goto function | |
nonterminals : grammar nonterminals | |
output : list of grammar rules used for parsing tokens (right
derivation in reverse) | |
rules : grammar rules | |
stack : LR stack with pairs (state,token) | |
table : LR parsing table | |
terminals : grammar terminals | |
tokens : tokens to be parsed |
Method Details |
---|
__init__(self,
tokenize,
grammar,
table='YappyTab',
no_table=1,
tabletype=<class parser.LALRtable at 0x3009c900>,
noconflicts=1,
expect=0,
**args)
|
input(self, str=None, context={}, lexer=0)Reads from stdin or string and retuns parsed result
|
inputfile(self, FileName, context={})Reads input from file |
parse_tree(self)To be defined using output |
test(self)A test for each class |
Instance Variable Details |
---|
lexa Lexer object |
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed Jul 19 10:36:01 2006 | http://epydoc.sf.net |