A dialog window for creating and editing context free grammars.
CFGEditor places the following restrictions on what
CFGs can be edited:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|