diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-09-01 20:47:26 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-09-01 20:47:26 +0300 |
commit | 6400e2ed3ad3eca3d6bc8957820b43f9ee8e0dc6 (patch) | |
tree | 7e19f5c28c54a2b99785dff68274717e7fd73006 /dfa.h | |
parent | e2607077715b14bc033e62d0203bd34d32b708c2 (diff) | |
parent | b02f580f06996bd88f741f9c7330aff79216a169 (diff) | |
download | egawk-6400e2ed3ad3eca3d6bc8957820b43f9ee8e0dc6.tar.gz egawk-6400e2ed3ad3eca3d6bc8957820b43f9ee8e0dc6.tar.bz2 egawk-6400e2ed3ad3eca3d6bc8957820b43f9ee8e0dc6.zip |
Merge branch 'master' into feature/typed-regex
Diffstat (limited to 'dfa.h')
-rw-r--r-- | dfa.h | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -28,6 +28,8 @@ #define _GL_ATTRIBUTE_MALLOC +struct localeinfo; /* See localeinfo.h. */ + /* Element of a list of strings, at least one of which is known to appear in any R.E. matching the DFA. */ struct dfamust @@ -48,17 +50,22 @@ struct dfa; calling dfafree() on it. */ extern struct dfa *dfaalloc (void) _GL_ATTRIBUTE_MALLOC; +/* Initialize or reinitialize a DFA. This must be called before + any of the routines below. The arguments are: + 1. The DFA to operate on. + 2. Information about the current locale. + 3. The syntax bits described earlier in this file. + 4. The case-folding flag. + 5. The line terminator. */ +extern void dfasyntax (struct dfa *, struct localeinfo const *, + reg_syntax_t, bool, unsigned char); + /* Build and return the struct dfamust from the given struct dfa. */ extern struct dfamust *dfamust (struct dfa const *); /* Free the storage held by the components of a struct dfamust. */ extern void dfamustfree (struct dfamust *); -/* dfasyntax() takes four arguments; the first is the dfa to operate on, the - second sets the syntax bits described earlier in this file, the third sets - the case-folding flag, and the fourth specifies the line terminator. */ -extern void dfasyntax (struct dfa *, reg_syntax_t, bool, unsigned char); - /* Compile the given string of the given length into the given struct dfa. Final argument is a flag specifying whether to build a searching or an exact matcher. */ @@ -103,8 +110,3 @@ extern void dfawarn (const char *); takes a single argument, a NUL-terminated string describing the error. The user must supply a dfaerror. */ extern _Noreturn void dfaerror (const char *); - -extern bool dfa_using_utf8 (void) _GL_ATTRIBUTE_PURE; - -/* This must be called before calling any of the above dfa*() functions. */ -extern void dfa_init (void); |