func: void dfacomp(const char *s,size_t len,struct dfa *d,int searchflag) dfaanalyze ( d , searchflag ); void dfaanalyze(struct dfa *d,int searchflag) int * nullable ; size_t * nfirstpos ; position * firstpos ; size_t * nlastpos ; position * lastpos ; position_set merged ; position * o_firstpos ; position * o_lastpos ; size_t i ; size_t j ; position * pos ; d -> searchflag = searchflag; nullable = ( ( sizeof ( ( * nullable ) ) == 1 ? xmalloc ( d -> depth ) : xnmalloc ( d -> depth , sizeof ( ( * nullable ) ) ) ) ); while ( 0 )  nfirstpos = ( ( sizeof ( ( * nfirstpos ) ) == 1 ? xmalloc ( d -> depth ) : xnmalloc ( d -> depth , sizeof ( ( * nfirstpos ) ) ) ) ); while ( 0 )  firstpos = ( ( sizeof ( ( * firstpos ) ) == 1 ? xmalloc ( d -> nleaves ) : xnmalloc ( d -> nleaves , sizeof ( ( * firstpos ) ) ) ) ); while ( 0 )  o_firstpos = firstpos , firstpos += d -> nleaves; nlastpos = ( ( sizeof ( ( * nlastpos ) ) == 1 ? xmalloc ( d -> depth ) : xnmalloc ( d -> depth , sizeof ( ( * nlastpos ) ) ) ) ); while ( 0 )  lastpos = ( ( sizeof ( ( * lastpos ) ) == 1 ? xmalloc ( d -> nleaves ) : xnmalloc ( d -> nleaves , sizeof ( ( * lastpos ) ) ) ) ); while ( 0 )  o_lastpos = lastpos , lastpos += d -> nleaves; d -> follows = ( ( sizeof ( ( * d -> follows ) ) == 1 ? xzalloc ( d -> tindex ) : xcalloc ( d -> tindex , sizeof ( ( * d -> follows ) ) ) ) ); while ( 0 )  for (i = 0; i < d -> tindex; ++i) switch ( d -> tokens [ i ] )  * ( nullable ++ ) = 1; * ( nfirstpos ++ ) = * ( nlastpos ++ ) = 0; pos = lastpos; if ( d -> tokens [ i ] != PLUS )  nullable [ - 1 ] = 1; pos = lastpos + nlastpos [ - 1 ]; for (j = 0; j < nlastpos[- 2]; ++j) copy ( ( & merged ) , & d -> follows [ pos [ j ] . index ] ); if ( nullable [ - 2 ] )  nfirstpos [ - 2 ] += nfirstpos [ - 1 ]; firstpos += nfirstpos [ - 1 ]; if ( nullable [ - 1 ] )  nlastpos [ - 2 ] += nlastpos [ - 1 ]; pos = lastpos + nlastpos [ - 2 ]; for (j = nlastpos[- 1]; j-- > 0; ) pos [ j ] = lastpos [ j ]; lastpos += nlastpos [ - 2 ]; nlastpos [ - 2 ] = nlastpos [ - 1 ]; nullable [ - 2 ] = nullable [ - 1 ] && nullable [ - 2 ]; nfirstpos [ - 2 ] += nfirstpos [ - 1 ]; nlastpos [ - 2 ] += nlastpos [ - 1 ]; nullable [ - 2 ] = nullable [ - 1 ] || nullable [ - 2 ]; * ( nullable ++ ) = d -> tokens [ i ] == BACKREF; * ( nfirstpos ++ ) = * ( nlastpos ++ ) = 1; firstpos -> index = lastpos -> index = i; firstpos -> constraint = lastpos -> constraint = 0x777; 