diff options
| -rw-r--r-- | src/regex.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/regex.h b/src/regex.h index b39fc1e770e..692b93b094f 100644 --- a/src/regex.h +++ b/src/regex.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Definitions for data structures and routines for the regular | 1 | /* Definitions for data structures and routines for the regular |
| 2 | expression library, version 0.12. | 2 | expression library, version 0.12. |
| 3 | 3 | ||
| 4 | Copyright (C) 1985, 89, 90, 91, 92, 93, 95 Free Software Foundation, Inc. | 4 | Copyright (C) 1985,89,90,91,92,93,95,2000 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This program is free software; you can redistribute it and/or modify | 6 | This program is free software; you can redistribute it and/or modify |
| 7 | it under the terms of the GNU General Public License as published by | 7 | it under the terms of the GNU General Public License as published by |
| @@ -135,9 +135,12 @@ typedef unsigned reg_syntax_t; | |||
| 135 | without further backtracking. */ | 135 | without further backtracking. */ |
| 136 | #define RE_NO_POSIX_BACKTRACKING (RE_NO_EMPTY_RANGES << 1) | 136 | #define RE_NO_POSIX_BACKTRACKING (RE_NO_EMPTY_RANGES << 1) |
| 137 | 137 | ||
| 138 | /* If this bit is set, then (?:...) is treated as a shy group. */ | ||
| 139 | #define RE_SHY_GROUPS (RE_NO_POSIX_BACKTRACKING << 1) | ||
| 140 | |||
| 138 | /* If this bit is set, then an unmatched ) is ordinary. | 141 | /* If this bit is set, then an unmatched ) is ordinary. |
| 139 | If not set, then an unmatched ) is invalid. */ | 142 | If not set, then an unmatched ) is invalid. */ |
| 140 | #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_POSIX_BACKTRACKING << 1) | 143 | #define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_SHY_GROUPS << 1) |
| 141 | 144 | ||
| 142 | /* This global variable defines the particular regexp syntax to use (for | 145 | /* This global variable defines the particular regexp syntax to use (for |
| 143 | some interfaces). When a regexp is compiled, the syntax used is | 146 | some interfaces). When a regexp is compiled, the syntax used is |
| @@ -156,7 +159,7 @@ extern Lisp_Object re_match_object; | |||
| 156 | (The [[[ comments delimit what gets put into the Texinfo file, so | 159 | (The [[[ comments delimit what gets put into the Texinfo file, so |
| 157 | don't delete them!) */ | 160 | don't delete them!) */ |
| 158 | /* [[[begin syntaxes]]] */ | 161 | /* [[[begin syntaxes]]] */ |
| 159 | #define RE_SYNTAX_EMACS (RE_CHAR_CLASSES | RE_INTERVALS) | 162 | #define RE_SYNTAX_EMACS (RE_CHAR_CLASSES | RE_INTERVALS | RE_SHY_GROUPS) |
| 160 | 163 | ||
| 161 | #define RE_SYNTAX_AWK \ | 164 | #define RE_SYNTAX_AWK \ |
| 162 | (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ | 165 | (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ |
| @@ -331,8 +334,7 @@ struct re_pattern_buffer | |||
| 331 | /* Zero if this pattern cannot match the empty string, one else. | 334 | /* Zero if this pattern cannot match the empty string, one else. |
| 332 | Well, in truth it's used only in `re_search_2', to see | 335 | Well, in truth it's used only in `re_search_2', to see |
| 333 | whether or not we should use the fastmap, so we don't set | 336 | whether or not we should use the fastmap, so we don't set |
| 334 | this absolutely perfectly; see `re_compile_fastmap' (the | 337 | this absolutely perfectly; see `re_compile_fastmap'. */ |
| 335 | `duplicate' case). */ | ||
| 336 | unsigned can_be_null : 1; | 338 | unsigned can_be_null : 1; |
| 337 | 339 | ||
| 338 | /* If REGS_UNALLOCATED, allocate space in the `regs' structure | 340 | /* If REGS_UNALLOCATED, allocate space in the `regs' structure |