Lines Matching +defs:outer +defs:s +defs:a
88 * also for whether we're in a sub-expression or not.
97 bool outer;
119 bool bre; /* convenience; is this a BRE? */
199 #define SEETWO(a, b) (MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
200 #define SEESPEC(a) (p->bre ? SEETWO('\\', a) : SEE(a))
202 #define EATTWO(a, b) ((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
203 #define EATSPEC(a) (p->bre ? EATTWO('\\', a) : EAT(a))
225 #define MIN(a,b) ((a)<(b)?(a):(b))
304 * Limit the pattern space to avoid a 32-bit overflow on buffer
306 * so make the real limit based on a 31-bit overflow.
436 - p_ere_exp - parse one subERE, an atom possibly followed by a repetition op,
545 case 's':
548 case 'a':
549 ordinary(p, '\a');
627 /* we call { a repetition if followed by a digit */
651 ASTERN(OOR1, pos); /* this one's right */
665 } else /* just a single number */
716 * Insert necessary branch book-keeping operations. This emits a
780 else if ((ate > 1 || (bc->outer && !MORE())) && !p_branch_empty(p, bc))
827 * This implementation is a bit of a kludge, in that a trailing $ is first
840 bc.outer = true;
842 bc.outer = false;
864 * p_branch_do's return value indicates whether we should
866 * a slight optimization, because it will check if we've
868 * immediately following a branch delimiter.
880 - p_simp_re - parse a simple RE, an atom possibly followed by a repetition
925 case BACKSL|'s':
928 case BACKSL|'a':
929 ordinary(p, '\a');
1020 * a (sub-)expression, counts as a bad repetition operator if it
1060 } else /* just a single number */
1076 - p_count - parse a repetition count
1095 - p_bracket - parse a bracketed character list
1172 - p_b_term - parse one term of a bracketed character list
1257 - p_b_pseudoclass - parse a pseudo-class (\w, \W, \s, \S)
1280 case 's':
1293 - p_b_cclass - parse a character-class name and deal with it
1317 - p_b_cclass_named - deal with a named character class
1350 - p_b_symbol - parse a character or [..]ed multicharacter collating symbol
1371 - p_b_coll_elem - parse a collating-element name and look it up
1430 * Build a whitelist of characters that may be escaped to produce an
1432 * been otherwise interpreted as a special character. Escaping an
1436 * special meaning, e.g. \b, \B, \w, \W, \s, \S.
1481 - bothcases - emit a dualcase version of a two-case character
1484 * Boy, is this implementation ever a kludge...
1534 * Emit a singleton set.
1547 * Boy, is this implementation ever a kludge...
1571 - repeat - generate code for a bounded repetition, recursively if needed
1645 - character from the parse struct, signals a REG_ILLSEQ error if the
1683 p->next = nuls; /* try to bring things to a halt */
1689 - allocset - allocate a set of characters for []
1712 - freeset - free a now-unused set
1734 - singleton - Determine whether a set contains only one character,
1740 wint_t i, s, n;
1745 s = i;
1748 return (s);
1788 - CHaddrange - add all characters in the range [min,max] to a character set.
1815 - CHaddtype - add all characters of a certain type to a character set.
1840 - dupl - emit a duplicate of a bunch of sops
1865 - doemit - emit a strip operator
1868 * It might seem better to implement this as a macro with a function as
1869 * hard-case backup, but it's just too big and messy unless there are
1889 /* finally, it's all reduced to the easy case */
1894 - doinsert - insert a sop into the strip
1901 sop s;
1913 s = p->strip[sn];
1928 p->strip[pos] = s;
1932 - dofwd - complete a forward reference
2009 sop s;
2023 * It's not generally safe to do a ``char'' substring search on
2024 * multibyte character strings, but it's safe for at least
2038 s = *scan++;
2039 switch (OP(s)) {
2047 size_t clen = wcrtomb(buf, (int)OPND(s), &mbs);
2064 scan += OPND(s);
2065 s = *scan;
2067 if (OP(s) != O_QUEST &&
2068 OP(s) != O_CH && OP(s) != OOR2) {
2072 } while (OP(s) != O_QUEST && OP(s) != O_CH);
2074 case OBOW: /* things that break a sequence */
2155 } while (OP(s) != OEND);
2162 /* turn it into a character string */
2173 while (OP(s = *scan++) != OCHAR)
2176 size_t clen = wcrtomb(cp, (int)OPND(s), &mbs);
2180 *cp++ = OPND(s);
2199 sop s;
2209 s = *scan++;
2210 while (OP(s) != O_QUEST && OP(s) != O_CH) {
2211 switch (OP(s)) {
2224 scan += OPND(s);
2225 s = *scan;
2226 if (OP(s) != O_QUEST &&
2227 OP(s) != O_CH && OP(s) != OOR2)
2229 } while (OP(s) != O_QUEST && OP(s) != O_CH);
2254 s = *scan++;
2268 * zero. It's based on the algorithm found on Computer Algorithms by
2288 if (g->charjump == NULL) /* Not a fatal error */
2313 * zero. It's based on the algorithm found on Computer Algorithms by
2328 * such that i+1...mlen is a substring
2346 if (g->matchjump == NULL) { /* Not a fatal error */
2359 /* If a mismatch is found, interrupting the substring,
2361 * mismatch is found, then a text substring mismatched
2375 * it's own suffix.
2403 sop s;
2415 s = *scan++;
2416 switch (OP(s)) {
2426 } while (OP(s) != OEND);