aboutsummaryrefslogtreecommitdiffstats
path: root/support/dfa.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-12-13 14:04:45 +0200
committerArnold D. Robbins <arnold@skeeve.com>2019-12-13 14:04:45 +0200
commit893bd9fd3d78eb6d3093971ee3c3700d71da1e77 (patch)
treec11b232ca22c5b182daf949f120594504355214b /support/dfa.h
parent3e0eec7b43484fc639d8e78d3f64ae10939257ee (diff)
downloadegawk-893bd9fd3d78eb6d3093971ee3c3700d71da1e77.tar.gz
egawk-893bd9fd3d78eb6d3093971ee3c3700d71da1e77.tar.bz2
egawk-893bd9fd3d78eb6d3093971ee3c3700d71da1e77.zip
Update dfa.
Diffstat (limited to 'support/dfa.h')
-rw-r--r--support/dfa.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/support/dfa.h b/support/dfa.h
index 2e25ef9f..53d6d333 100644
--- a/support/dfa.h
+++ b/support/dfa.h
@@ -65,15 +65,20 @@ enum
extern void dfasyntax (struct dfa *, struct localeinfo const *,
reg_syntax_t, int);
-/* Build and return the struct dfamust from the given struct dfa. */
+/* Parse the given string of given length into the given struct dfa. */
+extern void dfaparse (char const *, size_t, struct dfa *);
+
+/* Allocate and return a struct dfamust from a struct dfa that was
+ initialized by dfaparse and not yet given to dfacomp. */
extern struct dfamust *dfamust (struct dfa const *);
/* Free the storage held by the components of a struct dfamust. */
extern void dfamustfree (struct dfamust *);
/* 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. */
+ The last argument says whether to build a searching or an exact matcher.
+ A null first argument means the struct dfa has already been
+ initialized by dfaparse; the second argument is ignored. */
extern void dfacomp (char const *, size_t, struct dfa *, bool);
/* Search through a buffer looking for a match to the given struct dfa.