reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Support/regcomp.c
  447 	c = GETNEXT();
  449 	pos = HERE();
  452 		REQUIRE(MORE(), REG_EPAREN);
  452 		REQUIRE(MORE(), REG_EPAREN);
  453 		p->g->nsub++;
  454 		subno = p->g->nsub;
  456 			p->pbegin[subno] = HERE();
  456 			p->pbegin[subno] = HERE();
  457 		EMIT(OLPAREN, subno);
  458 		if (!SEE(')'))
  459 			p_ere(p, ')');
  461 			p->pend[subno] = HERE();
  461 			p->pend[subno] = HERE();
  464 		EMIT(ORPAREN, subno);
  465 		MUSTEAT(')', REG_EPAREN);
  476 		SETERROR(REG_EPAREN);
  480 		EMIT(OBOL, 0);
  481 		p->g->iflags |= USEBOL;
  482 		p->g->nbol++;
  486 		EMIT(OEOL, 0);
  487 		p->g->iflags |= USEEOL;
  488 		p->g->neol++;
  491 		SETERROR(REG_EMPTY);
  496 		SETERROR(REG_BADRPT);
  499 		if (p->g->cflags&REG_NEWLINE)
  500 			nonnewline(p);
  502 			EMIT(OANY, 0);
  505 		p_bracket(p);
  508 		REQUIRE(MORE(), REG_EESCAPE);
  508 		REQUIRE(MORE(), REG_EESCAPE);
  509 		c = GETNEXT();
  517 			if (p->pend[backrefnum] == 0) {
  518 				SETERROR(REG_ESUBREG);
  526 			EMIT(OBACK_, backrefnum);
  530 			(void) dupl(p, p->pbegin[backrefnum]+1, p->pend[backrefnum]);
  530 			(void) dupl(p, p->pbegin[backrefnum]+1, p->pend[backrefnum]);
  530 			(void) dupl(p, p->pbegin[backrefnum]+1, p->pend[backrefnum]);
  531 			EMIT(O_BACK, backrefnum);
  532 			p->g->backrefs = 1;
  536 			ordinary(p, c);
  540 		REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
  540 		REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
  540 		REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
  543 		ordinary(p, c);
  547 	if (!MORE())
  549 	c = PEEK();
  552 				(c == '{' && MORE2() && isdigit((uch)PEEK2())) ))
  552 				(c == '{' && MORE2() && isdigit((uch)PEEK2())) ))
  554 	NEXT();
  556 	REQUIRE(!wascaret, REG_BADRPT);
  560 		INSERT(OPLUS_, pos);
  561 		ASTERN(O_PLUS, pos);
  562 		INSERT(OQUEST_, pos);
  563 		ASTERN(O_QUEST, pos);
  566 		INSERT(OPLUS_, pos);
  567 		ASTERN(O_PLUS, pos);
  571 		INSERT(OCH_, pos);		/* offset slightly wrong */
  572 		ASTERN(OOR1, pos);		/* this one's right */
  573 		AHEAD(pos);			/* fix the OCH_ */
  574 		EMIT(OOR2, 0);			/* offset very wrong... */
  575 		AHEAD(THERE());			/* ...so fix it */
  575 		AHEAD(THERE());			/* ...so fix it */
  576 		ASTERN(O_CH, THERETHERE());
  576 		ASTERN(O_CH, THERETHERE());
  579 		count = p_count(p);
  580 		if (EAT(',')) {
  581 			if (isdigit((uch)PEEK())) {
  582 				count2 = p_count(p);
  583 				REQUIRE(count <= count2, REG_BADBR);
  588 		repeat(p, pos, count, count2);
  589 		if (!EAT('}')) {	/* error heuristics */
  590 			while (MORE() && PEEK() != '}')
  590 			while (MORE() && PEEK() != '}')
  591 				NEXT();
  592 			REQUIRE(MORE(), REG_EBRACE);
  592 			REQUIRE(MORE(), REG_EBRACE);
  593 			SETERROR(REG_BADBR);
  598 	if (!MORE())
  600 	c = PEEK();
  602 				(c == '{' && MORE2() && isdigit((uch)PEEK2())) ) )
  602 				(c == '{' && MORE2() && isdigit((uch)PEEK2())) ) )
  604 	SETERROR(REG_BADRPT);