[SimpleParse] SimpleParse tag-table optimizations checked in...
Brought to you by:
mcfletch
|
From: Mike C. F. <mcf...@ro...> - 2003-05-19 11:08:22
|
Just a FYI: I have just checked in changes to the simpleparse engine
which produce the same parsing tables with the following two grammars:
a := (table1 / table2 / any_line)*
<any_line> := ANY*, EOL
<ANY> := -EOL
<EOL> := '\n'
table1 := 'a'
table2 := 'b'
vs.
a := (table1 / table2 / (-'\n'*, '\n'))*
table1 := 'a'
table2 := 'b'
Similarly:
a:=b <b>:= -c* c:='this'
becomes:
a := -'this'*
and
a:=b >b<:= c c:= 'this'
becomes:
a := c c:= 'this'
There are a number of other minor optimizations to the generated
mxTextTools tables (primarily getting rid of spurious table/sub-table
elements in some common areas). If you are particularly interested,
feel free to check out the code from the CVS repository. I haven't done
any empirical testing yet to see if the overall impact of the
optimization calculations make this approach worthwhile, but I would
imagine that, if the analysis stage isn't killing us entirely the parser
should be somewhat faster, particularly on grammars which use lots of
un-reporting or expanded productions.
Enjoy yourselves,
Mike
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
|