A dialog window for creating and editing context free grammars.
CFGEditor
places the following restrictions on what
CFG
s can be edited:
|
__init__(self,
parent,
cfg=None,
set_cfg_callback=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
_clear_tags(self,
linenum)
Remove all tags (except arrow and sel ) from
the given line of the text widget used for editing the productions. |
source code
|
|
|
|
|
|
|
_analyze_token(self,
match,
linenum)
Given a line number and a regexp match for a token on that line,
colorize the token. |
source code
|
|
|
_init_nonterminal_tag(self,
tag,
foreground=' blue ' ) |
source code
|
|
|
_analyze_line(self,
linenum)
Colorize a given line. |
source code
|
|
|
_mark_error(self,
linenum,
line)
Mark the location of an error in a line. |
source code
|
|
|
_analyze(self,
*e)
Replace -> with arrows, and colorize the entire
buffer. |
source code
|
|
|
_parse_productions(self)
Parse the current contents of the textwidget buffer, to create a list
of productions. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|