Lines Matching defs:t

44 static int check_reportlist(enum nodetype t, const char *s, struct node *np);
45 static int check_num(enum nodetype t, const char *s, struct node *np);
46 static int check_quote(enum nodetype t, const char *s, struct node *np);
47 static int check_action(enum nodetype t, const char *s, struct node *np);
48 static int check_num_func(enum nodetype t, const char *s, struct node *np);
49 static int check_fru_asru(enum nodetype t, const char *s, struct node *np);
50 static int check_engine(enum nodetype t, const char *s, struct node *np);
51 static int check_count(enum nodetype t, const char *s, struct node *np);
52 static int check_timeval(enum nodetype t, const char *s, struct node *np);
53 static int check_id(enum nodetype t, const char *s, struct node *np);
54 static int check_serd_method(enum nodetype t, const char *s, struct node *np);
55 static int check_serd_id(enum nodetype t, const char *s, struct node *np);
61 static void check_proplists_lhs(enum nodetype t, struct node *lhs);
64 enum nodetype t;
67 int (*checker)(enum nodetype t, const char *s, struct node *np);
103 for (i = 0; Allowednames[i].t; i++)
129 switch (np->t) {
157 ptree_nodetype2str(np->t));
164 ASSERTinfo(np->t == T_ARROW, ptree_nodetype2str(np->t));
166 if (np->u.arrow.lhs->t != T_ARROW &&
167 np->u.arrow.lhs->t != T_LIST &&
168 np->u.arrow.lhs->t != T_EVENT) {
172 ptree_nodetype2str(np->u.arrow.lhs->t));
202 if (np->t == T_NAME)
207 if (np->t == T_NUM)
211 if (np->t == T_SUB ||
212 np->t == T_ADD ||
213 np->t == T_MUL ||
214 np->t == T_DIV)
222 check_reportlist(enum nodetype t, const char *s, struct node *np)
226 else if (np->t == T_EVENT) {
227 if (np->u.event.ename->u.name.t != N_EREPORT) {
230 ptree_nodetype2str(t), s);
234 ptree_nodetype2str(t), s);
237 } else if (np->t == T_LIST) {
238 (void) check_reportlist(t, s, np->u.expr.left);
239 (void) check_reportlist(t, s, np->u.expr.right);
245 check_num(enum nodetype t, const char *s, struct node *np)
247 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
248 if (np->t != T_NUM)
251 ptree_nodetype2str(t), s);
257 check_quote(enum nodetype t, const char *s, struct node *np)
259 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
260 if (np->t != T_QUOTE)
263 ptree_nodetype2str(t));
268 check_action(enum nodetype t, const char *s, struct node *np)
270 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
272 if (np->t != T_FUNC)
275 ptree_nodetype2str(t), s);
280 check_num_func(enum nodetype t, const char *s, struct node *np)
282 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
283 if (np->t != T_NUM && np->t != T_FUNC)
286 ptree_nodetype2str(t), s);
291 check_fru_asru(enum nodetype t, const char *s, struct node *np)
296 if (np->t == T_NAME) {
308 ptree_nodetype2str(t), s);
314 s, ptree_nodetype2str(np->t));
319 check_engine(enum nodetype t, const char *s, struct node *np)
321 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
322 if (np->t != T_EVENT)
326 ptree_nodetype2str(t), s);
332 check_count(enum nodetype t, const char *s, struct node *np)
334 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
335 if (np->t != T_EVENT)
339 ptree_nodetype2str(t), s);
346 check_timeval(enum nodetype t, const char *s, struct node *np)
348 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
349 if (np->t != T_TIMEVAL)
352 ptree_nodetype2str(t), s);
357 check_id(enum nodetype t, const char *s, struct node *np)
359 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
360 if (np->t != T_NAME || np->u.name.next || np->u.name.child)
363 ptree_nodetype2str(t), s);
368 check_serd_method(enum nodetype t, const char *s, struct node *np)
370 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
371 if (np->t != T_NAME || np->u.name.next || np->u.name.child ||
376 ptree_nodetype2str(t), s);
381 check_serd_id(enum nodetype t, const char *s, struct node *np)
383 ASSERTinfo(np != NULL, ptree_nodetype2str(t));
384 if (np->t != T_GLOBID)
387 ptree_nodetype2str(t), s);
398 for (i = 0; Allowednames[i].t; i++)
399 if (stmtnp->t == Allowednames[i].t &&
405 ptree_nodetype2str(stmtnp->t),
410 check_stmt_allowed_properties(enum nodetype t,
417 for (i = 0; Allowednames[i].t; i++)
418 if (t == Allowednames[i].t && Allowednames[i].name == NULL) {
420 (*Allowednames[i].checker)(t, s,
423 } else if (t == Allowednames[i].t && s == Allowednames[i].name)
428 ptree_nodetype2str(t), s);
433 if (np->t != nvpairnp->u.expr.right->t)
437 ptree_nodetype2str(t), s);
438 switch (np->t) {
462 ptree_nodetype2str(np->t));
467 ptree_nodetype2str(t), s);
469 (*Allowednames[i].checker)(t, s, nvpairnp->u.expr.right);
473 check_propnames(enum nodetype t, struct node *np, int from, int to)
479 ASSERTinfo(np->t == T_EVENT || np->t == T_LIST || np->t == T_ARROW,
480 ptree_nodetype2str(np->t));
482 if (np->t == T_EVENT) {
483 switch (np->u.event.ename->u.name.t) {
488 ptree_nodetype2str(t));
495 ptree_nodetype2str(t));
502 ptree_nodetype2str(t));
510 ptree_nodetype2str(t));
517 ptree_nodetype2str(t));
524 ptree_nodetype2str(t));
531 ptree_nodetype2str(t));
539 ptree_nodetype2str(t));
546 ptree_nodetype2str(t));
553 ptree_nodetype2str(t));
558 "unexpected type: %d", np->u.name.t);
564 ptree_nodetype2str(t));
568 } else if (np->t == T_LIST) {
569 check_propnames(t, np->u.expr.left, from, to);
570 check_propnames(t, np->u.expr.right, from, to);
571 } else if (np->t == T_ARROW) {
572 check_propnames(t, np->u.arrow.lhs, 1, to);
573 check_propnames(t, np->u.arrow.rhs, from, 1);
583 switch (np->t) {
599 if (np->u.name.child && np->u.name.child->t == T_NAME)
608 ptree_nodetype2str(np->t));
620 switch (np->t) {
631 if (np->u.name.child && np->u.name.child->t == T_NAME) {
685 ptree_nodetype2str(np->t));
715 enum nodetype t = (enum nodetype)arg;
719 ASSERTeq(rhs->t, t, ptree_nodetype2str);
724 ASSERT(engnp->t == T_EVENT);
729 ptree_nodetype2str(t), L_engine);
745 enum nodetype t = (enum nodetype)arg;
747 ASSERTeq(rhs->t, t, ptree_nodetype2str);
753 "%s name declared but not used: ", ptree_nodetype2str(t));
787 ASSERTeq(rhs->t, T_ERROR, ptree_nodetype2str);
832 switch (arrow->u.arrow.lhs->t) {
841 if (arrow->u.arrow.lhs->u.arrow.rhs->t != T_EVENT)
857 ptree_nodetype2str(arrow->u.arrow.lhs->t));
871 if (lhs->t == T_LIST) {
877 ASSERT(lhs->t == T_EVENT);
894 if (rhs->t == T_LIST) {
900 ASSERT(rhs->t == T_EVENT);
902 if (rhs->u.event.ename->u.name.t != N_ERROR)
922 if (np->u.name.child->t != T_NUM &&
923 np->u.name.child->t != T_NAME &&
924 np->u.name.child->t != T_CONDIF &&
925 np->u.name.child->t != T_SUB &&
926 np->u.name.child->t != T_ADD &&
927 np->u.name.child->t != T_MUL &&
928 np->u.name.child->t != T_DIV &&
929 np->u.name.child->t != T_MOD &&
930 np->u.name.child->t != T_LSHIFT &&
931 np->u.name.child->t != T_RSHIFT) {
946 if (np->t == T_EVENT) {
948 } else if (np->t == T_NAME) {
950 np->u.name.child->t != T_NUM) {
967 if (np->t == T_FUNC)
969 else if (np->t == T_LIST) {
980 ASSERTinfo(np->t == T_FUNC, ptree_nodetype2str(np->t));
983 switch (arglist->t) {
1005 if (arglist->u.expr.left->t != T_NUM &&
1006 arglist->u.expr.left->t != T_TIMEVAL) {
1016 if (arglist->u.expr.right->t != T_NUM &&
1017 arglist->u.expr.right->t != T_TIMEVAL &&
1018 arglist->u.expr.right->t != T_NAME) {
1028 if ((arglist->u.expr.left->t == T_NUM) &&
1034 if ((arglist->u.expr.right->t == T_NUM) &&
1042 if ((arglist->u.expr.right->t == T_NAME) &&
1071 if (arglist->t != T_QUOTE &&
1072 arglist->t != T_LIST &&
1073 arglist->t != T_GLOBID &&
1074 arglist->t != T_CONDIF &&
1075 arglist->t != T_LIST &&
1076 arglist->t != T_FUNC)
1080 if (arglist->t != T_NAME)
1084 if (arglist->t != T_NAME)
1089 if (arglist->t == T_LIST &&
1090 (arglist->u.expr.left->t == T_NAME ||
1091 arglist->u.expr.left->t == T_FUNC) &&
1092 (arglist->u.expr.right->t == T_NAME ||
1093 arglist->u.expr.right->t == T_FUNC)) {
1094 if (arglist->u.expr.left->t == T_FUNC)
1096 if (arglist->u.expr.right->t == T_FUNC)
1105 if (arglist->t == T_NAME || arglist->t == T_FUNC) {
1106 if (arglist->t == T_FUNC)
1114 if (arglist->t == T_NAME || arglist->t == T_FUNC) {
1115 if (arglist->t == T_FUNC)
1123 if (arglist->t == T_LIST &&
1124 (arglist->u.expr.left->t == T_NAME ||
1125 arglist->u.expr.left->t == T_FUNC) &&
1126 arglist->u.expr.right->t == T_QUOTE) {
1127 if (arglist->u.expr.left->t == T_FUNC)
1136 if (arglist->t == T_NAME || arglist->t == T_FUNC) {
1137 if (arglist->t == T_FUNC)
1145 if (arglist->t != T_QUOTE &&
1146 (arglist->t != T_LIST ||
1147 arglist->u.expr.left->t != T_QUOTE))
1153 if (arglist->t == T_LIST &&
1154 (arglist->u.expr.left->t == T_NAME ||
1155 arglist->u.expr.left->t == T_FUNC) &&
1156 arglist->u.expr.right->t == T_QUOTE) {
1157 if (arglist->u.expr.left->t == T_FUNC)
1166 if (arglist->t != T_EVENT) {
1171 if (arglist->t != T_GLOBID)
1175 if (arglist->t != T_QUOTE)
1179 if (arglist->t != T_LIST ||
1180 arglist->u.expr.left->t != T_QUOTE ||
1187 if (arglist->t != T_QUOTE)
1192 if (arglist->t == T_LIST &&
1193 arglist->u.expr.left->t == T_QUOTE) {
1194 if (arglist->u.expr.right->t == T_FUNC)
1205 if (arglist->t == T_FUNC)
1210 if (arglist->t != T_QUOTE)
1224 switch (np->t) {
1227 if (np->u.expr.left->t != T_GLOBID)
1238 ASSERTinfo(np->t == T_EVENT, ptree_nodetype2str(np->t));
1257 ASSERTeq(rhs->t, (enum nodetype)arg, ptree_nodetype2str);
1269 check_proplists(enum nodetype t, struct node *np)
1271 ASSERT(np->t == T_ARROW);
1277 check_proplists_lhs(t, np->u.arrow.lhs);
1282 check_proplists_lhs(enum nodetype t, struct node *lhs)
1284 if (lhs->t == T_ARROW) {
1285 if (lhs->u.arrow.rhs->t == T_LIST) {
1288 (t == T_PROP) ? "propagations" : "masks");
1290 check_proplists_lhs(t, lhs->u.arrow.lhs);