Lines Matching defs:pat

264 	irec_free_pats(alt->pat);
275 rec_pat *pat;
278 if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
283 pat->type = type;
284 if ((pat->prev = inf->ppat) != NULL)
285 inf->ppat->next = pat;
287 inf->palt->pat = pat;
288 inf->ppat = pat;
295 rec_pat *pat;
336 if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
341 pat->type = Rep_Literal;
342 pat->data.chr = value;
343 if ((pat->prev = inf->ppat) != NULL)
344 inf->ppat->next = pat;
346 inf->palt->pat = pat;
347 inf->ppat = pat;
354 rec_pat *pat;
402 if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
407 pat->type = Rep_CaseLiteral;
408 pat->data.cse.lower = lower;
409 pat->data.cse.upper = upper;
410 pat->prev = inf->ppat;
411 if ((pat->prev = inf->ppat) != NULL)
412 inf->ppat->next = pat;
414 inf->palt->pat = pat;
415 inf->ppat = pat;
421 rec_pat *pat;
430 if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
438 free(pat);
443 pat->type = Rep_Group;
444 pat->data.grp = grp;
445 grp->parent = pat;
450 if ((pat->prev = inf->ppat) != NULL)
451 inf->ppat->next = pat;
453 inf->palt->pat = pat;
483 rec_pat *pat;
490 pat = calloc(1, sizeof(rec_pat));
491 if (pat == NULL) {
497 if (pat == NULL) {
498 free(pat);
503 pat->data.rng = rng;
504 pat->type = not ? Rep_RangeNot : Rep_Range;
505 if ((pat->prev = inf->ppat) != NULL)
506 inf->ppat->next = pat;
508 inf->palt->pat = pat;
509 inf->ppat = pat;
587 rec_pat *pat;
657 if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
661 pat->type = Rep_Backref;
662 pat->data.chr = chr;
663 pat->prev = inf->ppat;
665 inf->ppat->next = pat;
667 inf->palt->pat = pat;
668 inf->ppat = pat;
835 rec_pat *pat;
850 if (grp->alt && grp->alt->pat) {
851 for (any = grp->alt->pat; any->next; any = any->next)
920 if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
927 pat->type = Rep_Literal;
928 pat->prev = inf->ppat;
929 pat->data.chr = inf->ppat->data.str[length - 1];
940 inf->ppat->next = pat;
941 inf->ppat = pat;
945 if ((pat = calloc(1, sizeof(rec_pat))) == NULL) {
952 pat->type = Rep_CaseLiteral;
953 pat->prev = inf->ppat;
954 pat->data.cse.lower = inf->ppat->data.str[length - 2];
955 pat->data.cse.upper = inf->ppat->data.str[length - 1];
963 inf->ppat->next = pat;
969 inf->ppat->next = pat;
970 inf->ppat = pat;
996 irec_free_pats(rec_pat *pat)
1001 while (pat) {
1002 next = pat->next;
1003 if (pat->rep)
1004 free(pat->rep);
1005 rect = pat->type;
1007 free(pat->data.rng);
1009 irec_free_grp(pat->data.grp);
1011 orec_free_stl(pat->data.stl);
1012 free(pat);
1013 pat = next;