0.12. (Implements POSIX draft P1003.2/D11.2, except for some of the
internationalization features.)
0.12. (Implements POSIX draft P1003.2/D11.2, except for some of the
internationalization features.)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
? (((c) >= 'a' && (c) <= 'z') \
|| ((c) >= 'A' && (c) <= 'Z') \
|| ((c) >= '0' && (c) <= '9')) \
? (((c) >= 'a' && (c) <= 'z') \
|| ((c) >= 'A' && (c) <= 'Z') \
|| ((c) >= '0' && (c) <= '9')) \
# define ISALPHA(c) (IS_REAL_ASCII (c) \
? (((c) >= 'a' && (c) <= 'z') \
|| ((c) >= 'A' && (c) <= 'Z')) \
# define ISALPHA(c) (IS_REAL_ASCII (c) \
? (((c) >= 'a' && (c) <= 'z') \
|| ((c) >= 'A' && (c) <= 'Z')) \
static boolean at_endline_loc_p (re_char *p, re_char *pend,
reg_syntax_t syntax);
static re_char *skip_one_char (re_char *p);
static boolean at_endline_loc_p (re_char *p, re_char *pend,
reg_syntax_t syntax);
static re_char *skip_one_char (re_char *p);
char *fastmap, const int multibyte);
/* Fetch the next character in the uncompiled pattern, with no
char *fastmap, const int multibyte);
/* Fetch the next character in the uncompiled pattern, with no
case RECC_LOWER: return BIT_LOWER;
case RECC_UPPER: return BIT_UPPER;
case RECC_PUNCT: return BIT_PUNCT;
case RECC_LOWER: return BIT_LOWER;
case RECC_UPPER: return BIT_UPPER;
case RECC_PUNCT: return BIT_PUNCT;
- (simple || !analyse_first (laststart, b, NULL, 0))
+ (simple || !analyze_first (laststart, b, NULL, 0))
- boolean emptyp = analyse_first (laststart, b, NULL, 0);
+ boolean emptyp = analyze_first (laststart, b, NULL, 0);
#endif /* emacs */
/* In most cases the matching rule for char classes
only uses the syntax table for multibyte chars,
#endif /* emacs */
/* In most cases the matching rule for char classes
only uses the syntax table for multibyte chars,
hardcoded in the range_table. SPACE and WORD are
the two exceptions. */
if ((1 << cc) & ((1 << RECC_SPACE) | (1 << RECC_WORD)))
hardcoded in the range_table. SPACE and WORD are
the two exceptions. */
if ((1 << cc) & ((1 << RECC_SPACE) | (1 << RECC_WORD)))
can't simply set bit and repeat the loop.
Instead, just set it to C and handle below. */
c = ':';
can't simply set bit and repeat the loop.
Instead, just set it to C and handle below. */
c = ':';
If fastmap is non-NULL, go through the pattern and fill fastmap
with all the possible leading chars. If fastmap is NULL, don't
bother filling it up (obviously) and only return whether the
If fastmap is non-NULL, go through the pattern and fill fastmap
with all the possible leading chars. If fastmap is NULL, don't
bother filling it up (obviously) and only return whether the
-analyse_first (const_re_char *p, const_re_char *pend, char *fastmap,
+analyze_first (const_re_char *p, const_re_char *pend, char *fastmap,
{ /* We have to look down both arms.
We first go down the "straight" path so as to minimize
stack usage when going through alternatives. */
{ /* We have to look down both arms.
We first go down the "straight" path so as to minimize
stack usage when going through alternatives. */
- int r = analyse_first (p, pend, fastmap, multibyte);
+ int r = analyze_first (p, pend, fastmap, multibyte);
\f
/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible
\f
/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible
memset (fastmap, 0, 1 << BYTEWIDTH); /* Assume nothing's valid. */
bufp->fastmap_accurate = 1; /* It will be when we're done. */
memset (fastmap, 0, 1 << BYTEWIDTH); /* Assume nothing's valid. */
bufp->fastmap_accurate = 1; /* It will be when we're done. */
fastmap, RE_MULTIBYTE_P (bufp));
bufp->can_be_null = (analysis != 0);
return 0;
fastmap, RE_MULTIBYTE_P (bufp));
bufp->can_be_null = (analysis != 0);
return 0;
| (class_bits & BIT_PUNCT && ISPUNCT (c))
| (class_bits & BIT_SPACE && ISSPACE (c))
| (class_bits & BIT_UPPER && ISUPPER (c))
| (class_bits & BIT_PUNCT && ISPUNCT (c))
| (class_bits & BIT_SPACE && ISSPACE (c))
| (class_bits & BIT_UPPER && ISUPPER (c))
not = !not;
else
CHARSET_LOOKUP_RANGE_TABLE_RAW (not, c, range_table, count);
not = !not;
else
CHARSET_LOOKUP_RANGE_TABLE_RAW (not, c, range_table, count);