bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/8] dfa: remove useless check


From: Paolo Bonzini
Subject: [PATCH 1/8] dfa: remove useless check
Date: Fri, 20 Jan 2012 16:35:14 +0100

* src/dfa.c (state_index): There is nothing that is a newline *and*
a letter.  Remove redundant call to SUCCEEDS_IN_CONTEXT.
---
 src/dfa.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/dfa.c b/src/dfa.c
index 8dbadd5..11cb726 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -1964,8 +1964,7 @@ state_index (struct dfa *d, position_set const *s, int 
newline, int letter)
         constraint = s->elems[j].constraint;
         if (SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 0)
             || SUCCEEDS_IN_CONTEXT(constraint, newline, 0, letter, 1)
-            || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 0)
-            || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 1))
+            || SUCCEEDS_IN_CONTEXT(constraint, newline, 1, letter, 0))
           d->states[i].constraint |= constraint;
         if (! d->states[i].first_end)
           d->states[i].first_end = d->tokens[s->elems[j].index];
-- 
1.7.7.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]