Re: [xml] FW: Regular expression evaluation



On Thu, Aug 09, 2007 at 08:11:37PM +0530, harbhanu wrote:

   >  It could be errors in building the initial automata, it could be an
   error

   > when removing epsilon transitions, or it could be an error

   > when doing the execution, likely one of the 2 first ones.


   It is freeing the state node marked as the start state for the second

   atom(01),  inside  function  xmlFAEliminateEpsilonTransitions,  inturn
   invoked from xmlRegexpCompile.


   regexp: '(2){0,1}1'

   3 atoms:

    00  atom: charval once char 2

    01   atom:  subexpr  once start -572662307 end 2 <<< start pointer is
   getting freed

    02  atom: charval once char 1

   6 states:

    state: START 0, 4 transitions:

     trans: removed

     trans: removed

     trans: count based 0, epsilon to 4

     trans: counted 0, char 2 atom 0, to 2

    state: NULL

    state: 2, 3 transitions:

     trans: count based 0, epsilon to 4

     trans: removed

     trans: counted 0, char 2 atom 0, to 2

    state: NULL

    state: 4, 1 transitions:

     trans: char 1 atom 2, to 5

    state: FINAL 5, 0 transitions:

   1 counters:

    0: min -1 max 0


   I  am  not  sure  whether this node is deleted because of some problem
   while creation of

   the    automata   or   the   problem   entirely   lies   in   function
   xmlFAEliminateEpsilonTransitions.


   Is  the  regular  expression  created  correctly??  To  me  the  third
   transition in state 2, should move to state 4...


   Any clues to take it forward??

  Not really, I would basically have to draw the graphs and poke at the code
if I were to chase it now. maybe I will look at it tonight,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]