Next in thread → Next in month →

RE: PyTREX feature complete

From
James Tauber <>
Date
2001-04-03T04:41:47+00:00
ID
C4EE90263CBFD411A0C800B0D0490095CCC5CD@bst-mail02
Thread
RE: PyTREX feature complete
Thank you for reporting this bug.

I've found the problem and, like the last one, it is in the parsing of the
TREX rather than the validation stage.

PyTREX 0.7.1 and earlier will incorrectly handle any of the following if
they contain more than one child pattern:

	- oneOrMore
	- optional
	- zeroOrMore
	- mixed
	- start

This bug will be fixed in 0.7.2

PyTREX doesn't not create an automaton so there is a lot of backtracking
which is why PyTREX is often slow.

Thank you again.

James

> Here is another bug.  JamesC's implementation correctly 
> reports validity, but 
> PyTREX 0.7.1 does not.  If you do not create an automaton, 
> you have to 
> backtrack a lot.
> 
> 1) pattern
> 
> <element name="foo">
> <optional>
> <optional>
> <optional>
> <optional>
> <optional>
> <optional>
> <optional>
>   <element name="a"><empty/></element>
> </optional>
> <element name="a"><empty/></element>
> </optional>
> <element name="a"><empty/></element>
> </optional>
> <element name="a"><empty/></element>
> </optional>
> <element name="a"><empty/></element>
> </optional>
> <element name="a"><empty/></element>
> </optional>
> <element name="a"><empty/></element>
> </optional>
> </element>
> 
> 2) document
> 
> <foo><a/><a/><a/><a/><a/><a/><a/></foo>
> 
> Cheers,
> 
> Makoto
>
Next in thread → Next in month →