diff options
author | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2014-06-24 13:18:33 +0200 |
---|---|---|
committer | Juergen Kahrs <Juergen.Kahrs@googlemail.com> | 2014-06-24 13:18:33 +0200 |
commit | f1245d04a9f076773c60499b468f44ed9c91b59b (patch) | |
tree | 2b49234400150bfaac7ebf8c017562300edc7471 /dfa.h | |
parent | ee9707cc44eea3ca64cb71666ac3e8ed26a3bb7f (diff) | |
parent | 78ded8ee8f11a321c96417e7d02dac2f5723a221 (diff) | |
download | egawk-f1245d04a9f076773c60499b468f44ed9c91b59b.tar.gz egawk-f1245d04a9f076773c60499b468f44ed9c91b59b.tar.bz2 egawk-f1245d04a9f076773c60499b468f44ed9c91b59b.zip |
Merge remote-tracking branch 'origin/master' into cmake
Diffstat (limited to 'dfa.h')
-rw-r--r-- | dfa.h | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* dfa.h - declarations for GNU deterministic regexp compiler - Copyright (C) 1988, 1998, 2007, 2009-2013 Free Software Foundation, Inc. + Copyright (C) 1988, 1998, 2007, 2009-2014 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,13 +19,20 @@ /* Written June, 1988 by Mike Haertel */ #include <regex.h> +#ifdef HAVE_STDBOOL_H +#include <stdbool.h> +#else +#include "missing_d/gawkbool.h" +#endif /* HAVE_STDBOOL_H */ #include <stddef.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 { - int exact; + bool exact; + bool begline; + bool endline; char *must; struct dfamust *next; }; @@ -68,6 +75,15 @@ extern void dfacomp (char const *, size_t, struct dfa *, int); extern char *dfaexec (struct dfa *d, char const *begin, char *end, int newline, size_t *count, int *backref); +/* Return a superset for D. The superset matches everything that D + matches, along with some other strings (though the latter should be + rare, for efficiency reasons). Return a null pointer if no useful + superset is available. */ +extern struct dfa *dfasuperset (struct dfa const *d) _GL_ATTRIBUTE_PURE; + +/* The DFA is likely to be fast. */ +extern bool dfaisfast (struct dfa const *) _GL_ATTRIBUTE_PURE; + /* Free the storage held by the components of a struct dfa. */ extern void dfafree (struct dfa *); @@ -99,3 +115,5 @@ 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 int using_utf8 (void); |