grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.6.3-22-g9d2bba9


From: Jim Meyering
Subject: grep branch, master, updated. v2.6.3-22-g9d2bba9
Date: Tue, 06 Apr 2010 19:47:12 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  9d2bba96e431cfc63e140ffdc8a8c16dd3a81b1e (commit)
      from  00a4833124edd60f5035b232379d2b39f3d53c9e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=9d2bba96e431cfc63e140ffdc8a8c16dd3a81b1e


commit 9d2bba96e431cfc63e140ffdc8a8c16dd3a81b1e
Author: Aharon Robbins <address@hidden>
Date:   Tue Apr 6 20:20:53 2010 +0200

    build: avoid conflict with WCHAR definition from Cygwin's <windows.h>
    
    * src/dfa.h (enum token): Remove the definition from this file.
    Replace with a declaration and typedef.  Moved to ...
    * src/dfa.c (enum token): ... here.
    Reported by Corinna Vinschen.

diff --git a/src/dfa.c b/src/dfa.c
index ca32b66..5a4b2e3 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -68,6 +68,102 @@
 # undef clrbit
 #endif
 
+/* The regexp is parsed into an array of tokens in postfix form.  Some tokens
+   are operators and others are terminal symbols.  Most (but not all) of these
+   codes are returned by the lexical analyzer. */
+enum token_enum
+{
+  END = -1,                    /* END is a terminal symbol that matches the
+                                  end of input; any value of END or less in
+                                  the parse tree is such a symbol.  Accepting
+                                  states of the DFA are those that would have
+                                  a transition on END. */
+
+  /* Ordinary character values are terminal symbols that match themselves. */
+
+  EMPTY = NOTCHAR,             /* EMPTY is a terminal symbol that matches
+                                  the empty string. */
+
+  BACKREF,                     /* BACKREF is generated by \<digit>; it
+                                  it not completely handled.  If the scanner
+                                  detects a transition on backref, it returns
+                                  a kind of "semi-success" indicating that
+                                  the match will have to be verified with
+                                  a backtracking matcher. */
+
+  BEGLINE,                     /* BEGLINE is a terminal symbol that matches
+                                  the empty string if it is at the beginning
+                                  of a line. */
+
+  ENDLINE,                     /* ENDLINE is a terminal symbol that matches
+                                  the empty string if it is at the end of
+                                  a line. */
+
+  BEGWORD,                     /* BEGWORD is a terminal symbol that matches
+                                  the empty string if it is at the beginning
+                                  of a word. */
+
+  ENDWORD,                     /* ENDWORD is a terminal symbol that matches
+                                  the empty string if it is at the end of
+                                  a word. */
+
+  LIMWORD,                     /* LIMWORD is a terminal symbol that matches
+                                  the empty string if it is at the beginning
+                                  or the end of a word. */
+
+  NOTLIMWORD,                  /* NOTLIMWORD is a terminal symbol that
+                                  matches the empty string if it is not at
+                                  the beginning or end of a word. */
+
+  QMARK,                       /* QMARK is an operator of one argument that
+                                  matches zero or one occurences of its
+                                  argument. */
+
+  STAR,                                /* STAR is an operator of one argument 
that
+                                  matches the Kleene closure (zero or more
+                                  occurrences) of its argument. */
+
+  PLUS,                                /* PLUS is an operator of one argument 
that
+                                  matches the positive closure (one or more
+                                  occurrences) of its argument. */
+
+  REPMN,                       /* REPMN is a lexical token corresponding
+                                  to the {m,n} construct.  REPMN never
+                                  appears in the compiled token vector. */
+
+  CAT,                         /* CAT is an operator of two arguments that
+                                  matches the concatenation of its
+                                  arguments.  CAT is never returned by the
+                                  lexical analyzer. */
+
+  OR,                          /* OR is an operator of two arguments that
+                                  matches either of its arguments. */
+
+  ORTOP,                       /* OR at the toplevel in the parse tree.
+                                  This is used for a boyer-moore heuristic. */
+
+  LPAREN,                      /* LPAREN never appears in the parse tree,
+                                  it is only a lexeme. */
+
+  RPAREN,                      /* RPAREN never appears in the parse tree. */
+
+#if MBS_SUPPORT
+  ANYCHAR,                     /* ANYCHAR is a terminal symbol that matches
+                                  any multibyte (or single byte) characters.
+                                 It is used only if MB_CUR_MAX > 1.  */
+
+  MBCSET,                      /* MBCSET is similar to CSET, but for
+                                  multibyte characters.  */
+
+  WCHAR,                       /* Only returned by lex.  wctok contains
+                                  the wide character representation.  */
+#endif /* MBS_SUPPORT */
+
+  CSET                         /* CSET and (and any value greater) is a
+                                  terminal symbol that matches any of a
+                                  class of characters. */
+};
+
 static void dfamust (struct dfa *dfa);
 static void regexp (int toplevel);
 
diff --git a/src/dfa.h b/src/dfa.h
index e0a575f..afa258b 100644
--- a/src/dfa.h
+++ b/src/dfa.h
@@ -46,102 +46,8 @@
 /* Sets of unsigned characters are stored as bit vectors in arrays of ints. */
 typedef int charclass[CHARCLASS_INTS];
 
-/* The regexp is parsed into an array of tokens in postfix form.  Some tokens
-   are operators and others are terminal symbols.  Most (but not all) of these
-   codes are returned by the lexical analyzer. */
-
-typedef enum
-{
-  END = -1,                    /* END is a terminal symbol that matches the
-                                  end of input; any value of END or less in
-                                  the parse tree is such a symbol.  Accepting
-                                  states of the DFA are those that would have
-                                  a transition on END. */
-
-  /* Ordinary character values are terminal symbols that match themselves. */
-
-  EMPTY = NOTCHAR,             /* EMPTY is a terminal symbol that matches
-                                  the empty string. */
-
-  BACKREF,                     /* BACKREF is generated by \<digit>; it
-                                  it not completely handled.  If the scanner
-                                  detects a transition on backref, it returns
-                                  a kind of "semi-success" indicating that
-                                  the match will have to be verified with
-                                  a backtracking matcher. */
-
-  BEGLINE,                     /* BEGLINE is a terminal symbol that matches
-                                  the empty string if it is at the beginning
-                                  of a line. */
-
-  ENDLINE,                     /* ENDLINE is a terminal symbol that matches
-                                  the empty string if it is at the end of
-                                  a line. */
-
-  BEGWORD,                     /* BEGWORD is a terminal symbol that matches
-                                  the empty string if it is at the beginning
-                                  of a word. */
-
-  ENDWORD,                     /* ENDWORD is a terminal symbol that matches
-                                  the empty string if it is at the end of
-                                  a word. */
-
-  LIMWORD,                     /* LIMWORD is a terminal symbol that matches
-                                  the empty string if it is at the beginning
-                                  or the end of a word. */
-
-  NOTLIMWORD,                  /* NOTLIMWORD is a terminal symbol that
-                                  matches the empty string if it is not at
-                                  the beginning or end of a word. */
-
-  QMARK,                       /* QMARK is an operator of one argument that
-                                  matches zero or one occurences of its
-                                  argument. */
-
-  STAR,                                /* STAR is an operator of one argument 
that
-                                  matches the Kleene closure (zero or more
-                                  occurrences) of its argument. */
-
-  PLUS,                                /* PLUS is an operator of one argument 
that
-                                  matches the positive closure (one or more
-                                  occurrences) of its argument. */
-
-  REPMN,                       /* REPMN is a lexical token corresponding
-                                  to the {m,n} construct.  REPMN never
-                                  appears in the compiled token vector. */
-
-  CAT,                         /* CAT is an operator of two arguments that
-                                  matches the concatenation of its
-                                  arguments.  CAT is never returned by the
-                                  lexical analyzer. */
-
-  OR,                          /* OR is an operator of two arguments that
-                                  matches either of its arguments. */
-
-  ORTOP,                       /* OR at the toplevel in the parse tree.
-                                  This is used for a boyer-moore heuristic. */
-
-  LPAREN,                      /* LPAREN never appears in the parse tree,
-                                  it is only a lexeme. */
-
-  RPAREN,                      /* RPAREN never appears in the parse tree. */
-
-#if MBS_SUPPORT
-  ANYCHAR,                     /* ANYCHAR is a terminal symbol that matches
-                                  any multibyte (or single byte) characters.
-                                 It is used only if MB_CUR_MAX > 1.  */
-
-  MBCSET,                      /* MBCSET is similar to CSET, but for
-                                  multibyte characters.  */
-
-  WCHAR,                       /* Only returned by lex.  wctok contains
-                                  the wide character representation.  */
-#endif /* MBS_SUPPORT */
-
-  CSET                         /* CSET and (and any value greater) is a
-                                  terminal symbol that matches any of a
-                                  class of characters. */
-} token;
+enum token_enum;
+typedef enum token_enum token;
 
 /* Sets are stored in an array in the compiled dfa; the index of the
    array corresponding to a given set token is given by SET_INDEX(t). */

-----------------------------------------------------------------------

Summary of changes:
 src/dfa.c |   96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 src/dfa.h |   98 +-----------------------------------------------------------
 2 files changed, 98 insertions(+), 96 deletions(-)


hooks/post-receive
-- 
grep




reply via email to

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