Lines Matching defs:ss
354 register Scan_t* ss;
372 ss = newof(0, Scan_t, 1, 0);
373 ss->flags = flags;
391 ss->classid = newof(0, Action_t, 1, 0);
392 scanaction(ss->classid, s);
393 ss->data = hashalloc(NiL, HASH_set, HASH_ALLOCATE, HASH_name, r->name, 0);
396 if (!(ss->flags & SCAN_define))
413 ss->after = newof(0, Action_t, 1, 0);
414 scanaction(ss->after, s);
425 ss->flags |= SCAN_macro;
428 ss->flags |= SCAN_override;
431 ss->flags |= SCAN_state;
446 q->next = ss->quote;
447 ss->quote = q;
511 ss->type[*q->begin] |= q->flags;
515 ss->before = newof(0, Action_t, 1, 0);
516 scanaction(ss->before, s);
521 if (ss->external)
524 free(ss->external);
526 ss->external = strdup(s);
535 ss->action = a = newof(0, Action_t, p - x + 1, 0);
536 ss->state = newof(0, Scanstate_t, z * 4, 0);
601 scanbranch(ss->state, ss->action, ss->action + 1, ss->action + z, 0);
612 return ss;
818 scanmacro(int fd, Rule_t* r, Scan_t* ss, register List_t* p)
941 if (ss->action && ss->action[1].attrprop && ss->action[1].type == 'I')
943 u->attribute &= ~ss->action[1].attribute.clear;
944 u->attribute |= ss->action[1].attribute.set;
945 u->property &= ~ss->action[1].property.clear;
946 u->property |= ss->action[1].property.set;
972 if (ss->action && ss->action[1].attrprop && ss->action[1].type == 'I')
974 u->attribute &= ~ss->action[1].attribute.clear;
975 u->attribute |= ss->action[1].attribute.set;
976 u->property &= ~ss->action[1].property.clear;
977 u->property |= ss->action[1].property.set;
1241 * scan fd on file r for patterns compiled in ss
1246 scanexec(int fd, Rule_t* r, Scan_t* ss, List_t* p)
1286 if (ss->flags & SCAN_macro)
1287 return scanmacro(fd, r, ss, p);
1288 if (ss->external)
1292 if (!(sp = fapply(r, null, r->name, ss->external, CO_ALWAYS|CO_LOCAL|CO_URGENT)))
1309 tab = ss->classid ? (Hash_table_t*)ss->data : (Hash_table_t*)0;
1329 if (s = ss->state)
1511 error(2, "scanexec: HIT %s: %c n=%d \"%s\" \"%s\"", r->name, ss->action[*s].type, n - 1, b + arg[0].begin, b + arg[1].begin);
1514 switch (c = ss->action[*s].type)
1546 p = scanmatch(p, &ss->action[*s], r, (char*)b, a, iflev, c == 'T' ? -1 : a != null && a > (char*)b && (c = *(a - 1)) != '"' && c != '\'' && (c != '<' || arg[0].replace != '>'));
1607 n = (ss->flags & SCAN_state) && state.fullscan;
1608 x = ss->type;
1621 g = scanquote(fd, buf, &b, g, ss->quote, QUOTE_comment|QUOTE_quote);
1742 p = scanmatch(p, ss->classid, r, pos->bucket->name, pos->bucket->name, 0, 0);
1763 Scan_t* ss;
1785 ss = 0;
1802 ss = strategy[r->scan];
1808 if (ss)
1811 ss = 0;
1822 s->prereqs = scanexec(fd, r, ss, ss->before ? scanmatch(NiL, ss->before, r, null, null, 0, 1) : (List_t*)0);
1844 if (ss)
1846 if (ss->after)
1854 s->prereqs = scanmatch(s->prereqs, ss->after, r, null, null, 0, 1);