X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=dfa%2Fdfap.h;h=fd8bf9313d6c6df93cffd35ec828b65c2c9937c3;hb=2b33b395b50c562323ea2b0251f9b798cf5241d2;hp=b158d8412faf00f5ae86b54ce1dab484a0256fbf;hpb=4461019c0de49358856cb1c84ca162395b247f16;p=idzebra-moved-to-github.git diff --git a/dfa/dfap.h b/dfa/dfap.h index b158d84..fd8bf93 100644 --- a/dfa/dfap.h +++ b/dfa/dfap.h @@ -1,10 +1,34 @@ /* - * Copyright (C) 1994, Index Data I/S + * Copyright (C) 1994-1999, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: dfap.h,v $ - * Revision 1.2 1995-01-25 11:30:50 adam + * Revision 1.9 1999-05-26 07:49:12 adam + * C++ compilation. + * + * Revision 1.8 1999/02/02 14:50:06 adam + * Updated WIN32 code specific sections. Changed header. + * + * Revision 1.7 1997/09/29 09:05:17 adam + * Thread safe DFA module. We simply had to put a few static vars to + * the DFA_parse structure. + * + * Revision 1.6 1997/09/18 08:59:17 adam + * Extra generic handle for the character mapping routines. + * + * Revision 1.5 1997/09/05 15:29:58 adam + * Changed prototype for chr_map_input - added const. + * Added support for C++, headers uses extern "C" for public definitions. + * + * Revision 1.4 1996/06/04 10:20:03 adam + * Added support for character mapping. + * + * Revision 1.3 1996/01/08 09:09:19 adam + * Function dfa_parse got 'const' string argument. + * New functions to define char mappings made public. + * + * Revision 1.2 1995/01/25 11:30:50 adam * Simple error reporting when parsing regular expressions. * Memory usage reduced. * @@ -19,6 +43,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct DFA_parse { struct Tnode *root; /* root of regular syntax tree */ int position; /* no of positions so far */ @@ -29,6 +57,23 @@ struct DFA_parse { int max_Tnode; /* allocated Tnodes */ struct Tblock *start; /* start block of Tnodes */ struct Tblock *end; /* end block of Tnodes */ + int *charMap; + int charMapSize; + void *cmap_data; + + unsigned look_ch; + int lookahead; + BSet look_chars; + int err_code; + int inside_string; + const unsigned char *expr_ptr; + + struct Tnode **posar; + + SetType poset; + Set *followpos; + + const char **(*cmap)(void *vp, const char **from, int len); }; typedef struct DFA_stateb_ { @@ -58,4 +103,7 @@ void sort_DFA_states (struct DFA_states *dfas); void add_DFA_tran (struct DFA_states *, struct DFA_state *, int, int, int); +#ifdef __cplusplus +} +#endif #endif