Re: How to speed up a grammar

2009-06-07 Thread Leon Timmermans
On Sun, Jun 7, 2009 at 1:44 AM, Minimiscience wrote: > > This is just a wild, uneducated, possibly delusional guess, but I don't > think that vertical bar before the '/>' should be there.  I think it might > be causing the grammar engine to check whether it can omit the ending of > each tag and att

Re: How to speed up a grammar

2009-06-06 Thread Minimiscience
On Jun 6, 2009, at 10:32 AM, Richard Hainsworth wrote: rule element { '<' * [ | '/>' | '>' * ' '>' ] } This is just a wild, uneducated, possibly delusional guess, but I don't think that vertical bar before the '/>' should be there. I think it might be causing the grammar engine to check w

How to speed up a grammar

2009-06-06 Thread Richard Hainsworth
Leon Timmermans wrote: If you want to write a fast parser for XML, preventing backtracking is going to be quite essential. I suspect the problem is your grammar, not the grammar engine itself. You could post it to perl6-users and ask for advice on it. Leon Below is the grammar. I am only inte