summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/grep/dfa.c
diff options
context:
space:
mode:
authorRodney W. Grimes <rgrimes@FreeBSD.org>1995-05-30 05:05:38 +0000
committerRodney W. Grimes <rgrimes@FreeBSD.org>1995-05-30 05:05:38 +0000
commit4399be3cbd35324f7a2c00d77229d995b4022138 (patch)
treea3959baf797787918878bec6d58d6a0fb743ad0a /gnu/usr.bin/grep/dfa.c
parent709e8f9ae1d734c1a163c9b421df4b8153939ce7 (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/grep/dfa.c')
-rw-r--r--gnu/usr.bin/grep/dfa.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gnu/usr.bin/grep/dfa.c b/gnu/usr.bin/grep/dfa.c
index 4a02d0d953c2..0409b1e9db25 100644
--- a/gnu/usr.bin/grep/dfa.c
+++ b/gnu/usr.bin/grep/dfa.c
@@ -549,7 +549,7 @@ lex()
notset(ccl);
laststart = 0;
return lasttok = CSET + charclass_index(ccl);
-
+
case '[':
if (backslash)
goto normal_char;
@@ -1907,7 +1907,7 @@ dfacomp(s, len, d, searchflag)
copy = malloc(len);
if (!copy)
dfaerror("out of memory");
-
+
/* This is a kludge. */
case_fold = 0;
for (i = 0; i < len; ++i)
@@ -1997,9 +1997,9 @@ dfafree(d)
Type left right is in
---- ---- ----- -- --
char c # c # c # c # c
-
+
CSET ZERO ZERO ZERO ZERO
-
+
STAR ZERO ZERO ZERO ZERO
QMARK ZERO ZERO ZERO ZERO
@@ -2010,12 +2010,12 @@ dfafree(d)
p->left : q->right : q->is!=ZERO) ? q->in plus
p->is##q->left p->right##q->is p->is##q->is : p->right##q->left
ZERO
-
+
OR longest common longest common (do p->is and substrings common to
leading trailing q->is have same p->in and q->in
- (sub)sequence (sub)sequence length and
- of p->left of p->right content) ?
- and q->left and q->right p->is : NULL
+ (sub)sequence (sub)sequence length and
+ of p->left of p->right content) ?
+ and q->left and q->right p->is : NULL
If there's anything else we recognize in the tree, all four sequences get set
to zero-length sequences. If there's something we don't recognize in the tree,
@@ -2042,7 +2042,7 @@ dfafree(d)
Does optimization actually accomplish anything,
or is the automaton you get from "psi|epsilon" (for example)
the same as the one you get from "psi" (for example)?
-
+
Are optimizable r.e.'s likely to be used in real-life situations
(something like 'ab*' is probably unlikely; something like is
'psi|epsilon' is likelier)? */