Lines Matching refs:n

179 		struct node_s *n;  member
186 struct node_s *n; member
191 struct node_s *n; member
196 node n; member
240 static void debug_parse_print_tc(uint32_t n) in debug_parse_print_tc() argument
242 if (n & TC_LPAREN ) debug_printf_parse(" LPAREN" ); in debug_parse_print_tc()
243 if (n & TC_RPAREN ) debug_printf_parse(" RPAREN" ); in debug_parse_print_tc()
244 if (n & TC_REGEXP ) debug_printf_parse(" REGEXP" ); in debug_parse_print_tc()
245 if (n & TC_OUTRDR ) debug_printf_parse(" OUTRDR" ); in debug_parse_print_tc()
246 if (n & TC_UOPPOST ) debug_printf_parse(" UOPPOST" ); in debug_parse_print_tc()
247 if (n & TC_UOPPRE1 ) debug_printf_parse(" UOPPRE1" ); in debug_parse_print_tc()
248 if (n & TC_BINOPX ) debug_printf_parse(" BINOPX" ); in debug_parse_print_tc()
249 if (n & TC_IN ) debug_printf_parse(" IN" ); in debug_parse_print_tc()
250 if (n & TC_COMMA ) debug_printf_parse(" COMMA" ); in debug_parse_print_tc()
251 if (n & TC_PIPE ) debug_printf_parse(" PIPE" ); in debug_parse_print_tc()
252 if (n & TC_UOPPRE2 ) debug_printf_parse(" UOPPRE2" ); in debug_parse_print_tc()
253 if (n & TC_ARRTERM ) debug_printf_parse(" ARRTERM" ); in debug_parse_print_tc()
254 if (n & TC_LBRACE ) debug_printf_parse(" LBRACE" ); in debug_parse_print_tc()
255 if (n & TC_RBRACE ) debug_printf_parse(" RBRACE" ); in debug_parse_print_tc()
256 if (n & TC_SEMICOL ) debug_printf_parse(" SEMICOL" ); in debug_parse_print_tc()
257 if (n & TC_NEWLINE ) debug_printf_parse(" NEWLINE" ); in debug_parse_print_tc()
258 if (n & TC_STATX ) debug_printf_parse(" STATX" ); in debug_parse_print_tc()
259 if (n & TC_WHILE ) debug_printf_parse(" WHILE" ); in debug_parse_print_tc()
260 if (n & TC_ELSE ) debug_printf_parse(" ELSE" ); in debug_parse_print_tc()
261 if (n & TC_BUILTIN ) debug_printf_parse(" BUILTIN" ); in debug_parse_print_tc()
262 if (n & TC_LENGTH ) debug_printf_parse(" LENGTH" ); in debug_parse_print_tc()
263 if (n & TC_GETLINE ) debug_printf_parse(" GETLINE" ); in debug_parse_print_tc()
264 if (n & TC_FUNCDECL) debug_printf_parse(" FUNCDECL"); in debug_parse_print_tc()
265 if (n & TC_BEGIN ) debug_printf_parse(" BEGIN" ); in debug_parse_print_tc()
266 if (n & TC_END ) debug_printf_parse(" END" ); in debug_parse_print_tc()
267 if (n & TC_EOF ) debug_printf_parse(" EOF" ); in debug_parse_print_tc()
268 if (n & TC_VARIABLE) debug_printf_parse(" VARIABLE"); in debug_parse_print_tc()
269 if (n & TC_ARRAY ) debug_printf_parse(" ARRAY" ); in debug_parse_print_tc()
270 if (n & TC_FUNCTION) debug_printf_parse(" FUNCTION"); in debug_parse_print_tc()
271 if (n & TC_STRING ) debug_printf_parse(" STRING" ); in debug_parse_print_tc()
272 if (n & TC_NUMBER ) debug_printf_parse(" NUMBER" ); in debug_parse_print_tc()
907 static void fmt_num(const char *format, double n) in fmt_num() argument
909 if (n == (long long)n) { in fmt_num()
910 snprintf(g_buf, MAXVARFMT, "%lld", (long long)n); in fmt_num()
917 snprintf(g_buf, MAXVARFMT, format, (int)n); in fmt_num()
919 snprintf(g_buf, MAXVARFMT, format, n); in fmt_num()
1308 node *n; in new_node() local
1310 n = xzalloc(sizeof(node)); in new_node()
1311 n->info = info; in new_node()
1312 n->lineno = g_lineno; in new_node()
1313 return n; in new_node()
1316 static void mk_re_node(const char *s, node *n, regex_t *re) in mk_re_node() argument
1318 n->info = TI_REGEXP; in mk_re_node()
1319 n->l.re = re; in mk_re_node()
1320 n->r.ire = re + 1; in mk_re_node()
1348 sn.r.n = sn.a.n = glptr = NULL; in parse_expr()
1356 cn = glptr->l.n = new_node(OC_CONCAT | SS | P(37)); in parse_expr()
1357 cn->a.n = glptr; in parse_expr()
1367 while (((t_info & PRIMASK) > (vn->a.n->info & PRIMASK2)) in parse_expr()
1370 vn = vn->a.n; in parse_expr()
1371 if (!vn->a.n) syntax_error(EMSG_UNEXP_TOKEN); in parse_expr()
1376 cn = vn->a.n->r.n = new_node(t_info); in parse_expr()
1377 cn->a.n = vn->a.n; in parse_expr()
1379 cn->l.n = vn; in parse_expr()
1395 cn->r.n = vn; in parse_expr()
1398 vn->a.n = cn; in parse_expr()
1406 cn = vn->r.n = new_node(t_info); in parse_expr()
1407 cn->a.n = vn; in parse_expr()
1434 cn->r.n = parse_expr(TC_ARRTERM); in parse_expr()
1460 cn->l.n = parse_expr(TC_RPAREN); in parse_expr()
1465 cn = vn->r.n = parse_expr(TC_RPAREN); in parse_expr()
1468 cn->a.n = vn; in parse_expr()
1479 cn->l.n = parse_lrparen_list(); in parse_expr()
1495 cn->l.n = parse_expr(TC_RPAREN); in parse_expr()
1501 debug_printf_parse("%s() returns %p\n", __func__, sn.r.n); in parse_expr()
1502 return sn.r.n; in parse_expr()
1508 node *n; in chain_node() local
1515 n = chain_node(OC_NEWSOURCE); in chain_node()
1516 n->l.new_progname = g_progname; in chain_node()
1519 n = seq->last; in chain_node()
1520 n->info = info; in chain_node()
1521 seq->last = n->a.n = new_node(OC_DONE); in chain_node()
1523 return n; in chain_node()
1528 node *n; in chain_expr() local
1530 n = chain_node(info); in chain_expr()
1532 n->l.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_RBRACE); in chain_expr()
1533 if ((info & OF_REQUIRED) && !n->l.n) in chain_expr()
1544 node *n, *n2, *save_brk, *save_cont; in chain_loop() local
1549 n = chain_node(OC_BR | Vx); in chain_loop()
1554 n2->l.n = nn; in chain_loop()
1555 n2->a.n = n; in chain_loop()
1556 continue_ptr->a.n = n2; in chain_loop()
1557 break_ptr->a.n = n->r.n = seq->last; in chain_loop()
1562 return n; in chain_loop()
1582 node *n, *n2, *n3; in chain_group() local
1605 n = chain_node(OC_BR | Vx); in chain_group()
1606 n->l.n = parse_lrparen_list(); in chain_group()
1609 n->r.n = seq->last; in chain_group()
1612 n2->a.n = seq->last; in chain_group()
1621 n = chain_loop(NULL); in chain_group()
1622 n->l.n = n2; in chain_group()
1628 n = chain_loop(NULL); in chain_group()
1629 n2->a.n = n->a.n; in chain_group()
1631 n->l.n = parse_lrparen_list(); in chain_group()
1641 n = chain_node(OC_WALKINIT | VV); in chain_group()
1642 n->l.n = n2->l.n; in chain_group()
1643 n->r.n = n2->r.n; in chain_group()
1644 n = chain_loop(NULL); in chain_group()
1645 n->info = OC_WALKNEXT | Vx; in chain_group()
1646 n->l.n = n2->l.n; in chain_group()
1648 n = chain_node(OC_EXEC | Vx); in chain_group()
1649 n->l.n = n2; in chain_group()
1652 n = chain_loop(n3); in chain_group()
1653 n->l.n = n2; in chain_group()
1655 n->info = OC_EXEC; in chain_group()
1662 n = chain_node(t_info); in chain_group()
1663 n->l.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_OUTRDR | TC_RBRACE); in chain_group()
1665 n->info |= t_info; in chain_group()
1666 n->r.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_RBRACE); in chain_group()
1674 n = chain_node(OC_EXEC); in chain_group()
1677 n->a.n = break_ptr; in chain_group()
1683 n = chain_node(OC_EXEC); in chain_group()
1686 n->a.n = continue_ptr; in chain_group()
1775 cn->l.n = parse_expr(TC_SEMICOL | TC_NEWLINE | TC_EOF | TC_LBRACE); in parse_program()
1784 cn->r.n = mainseq.last; in parse_program()
1825 walker_list *n; in nvfree() local
1830 n = w->prev; in nvfree()
1833 w = n; in nvfree()
1846 node *n; in mk_splitter() local
1850 n = &spl->n; in mk_splitter()
1851 if (n->info == TI_REGEXP) { in mk_splitter()
1856 mk_re_node(s, n, re); in mk_splitter()
1858 n->info = (uint32_t) s[0]; in mk_splitter()
1861 return n; in mk_splitter()
1906 static char* qrealloc(char *b, int n, int *size) in qrealloc() argument
1908 if (!b || n >= *size) { in qrealloc()
1909 *size = n + (n>>1) + 80; in qrealloc()
1971 int n; in awk_split() local
1984 n = 0; in awk_split()
1987 return n; /* "": zero fields */ in awk_split()
1988 n++; /* at least one field will be there */ in awk_split()
1999 n++; /* we saw yet another delimiter */ in awk_split()
2015 return n; in awk_split()
2021 n++; in awk_split()
2023 return n; in awk_split()
2031 n++; in awk_split()
2034 n++; in awk_split()
2036 return n; in awk_split()
2043 n++; in awk_split()
2048 return n; in awk_split()
2056 int i, n; in split_f0() local
2065 n = awk_split(getvar_s(intvar[F0]), &fsplitter.n, &fstrings); in split_f0()
2066 fsrealloc(n); in split_f0()
2068 for (i = 0; i < n; i++) { in split_f0()
2083 int n; in handle_special() local
2092 n = (int)getvar_i(v); in handle_special()
2093 if (n < 0) in handle_special()
2095 fsrealloc(n); in handle_special()
2102 for (i = 0; i < n; i++) { in handle_special()
2140 n = getvar_i(intvar[NF]); in handle_special()
2141 setvar_i(intvar[NF], n > v-Fields ? n : v-Fields+1); in handle_special()
2149 node *n; in nextarg() local
2151 n = *pn; in nextarg()
2152 if (n && n->info == TI_COMMA) { in nextarg()
2153 *pn = n->r.n; in nextarg()
2154 n = n->l.n; in nextarg()
2158 return n; in nextarg()
2235 c = (char) rsplitter.n.info; in awk_getline()
2246 if (rsplitter.n.info == TI_REGEXP) { in awk_getline()
2247 if (regexec(icase ? rsplitter.n.r.ire : rsplitter.n.l.re, in awk_getline()
2322 static char *awk_printf(node *n, size_t *len) in awk_printf() argument
2334 fmt = f = xstrdup(getvar_s(evaluate(nextarg(&n), TMPVAR))); in awk_printf()
2383 arg = evaluate(nextarg(&n), TMPVAR); in awk_printf()
2496 int n = pmatch[j].rm_eo - pmatch[j].rm_so; in awk_sub() local
2497 resbuf = qrealloc(resbuf, residx + replen + n, &resbufsize); in awk_sub()
2498 memcpy(resbuf + residx, sp + pmatch[j].rm_so, n); in awk_sub()
2499 residx += n; in awk_sub()
2572 int n, start, len; in do_match() local
2575 n = regexec(re, as0, 1, pmatch, 0); in do_match()
2580 if (n == 0) { in do_match()
2601 int i, l, ll, n; in exec_builtin() local
2610 op = op->l.n; in exec_builtin()
2644 spl = &fsplitter.n; in exec_builtin()
2647 n = awk_split(as[0], spl, &s); in exec_builtin()
2650 for (i = 1; i <= n; i++) in exec_builtin()
2653 setvar_i(res, n); in exec_builtin()
2666 n = (nargs > 2) ? getvar_i(av[2]) : l-i; in exec_builtin()
2667 if (n < 0) in exec_builtin()
2668 n = 0; in exec_builtin()
2669 s = xstrndup(as[0]+i, n); in exec_builtin()
2715 n = 0; in exec_builtin()
2722 n = (s - as[0]) + 1; in exec_builtin()
2729 n = i+1; in exec_builtin()
2735 setvar_i(res, n); in exec_builtin()
2846 #define XC(n) ((n) >> 8) argument
2884 op1 = op->l.n; in evaluate()
2909 R.v = evaluate(op->r.n, TMPVAR1); in evaluate()
2928 if ((opinfo & OF_CHECKED) || ptest(op1->l.n)) { in evaluate()
2930 if (ptest(op1->r.n)) in evaluate()
2932 op = op->a.n; in evaluate()
2934 op = op->r.n; in evaluate()
2937 op = ptest(op1) ? op->a.n : op->r.n; in evaluate()
2949 op = istrue(L.v) ? op->a.n : op->r.n; in evaluate()
2961 op = hashwalk_next(L.v) ? op->a.n : op->r.n; in evaluate()
2971 if (op->r.n) { in evaluate()
3038 if (op1->r.n) { /* array ref? */ in evaluate()
3040 s = getvar_s(evaluate(op1->r.n, TMPVAR0)); in evaluate()
3088 res = op->r.n ? findvar(iamarray(L.v), R.s) : L.v; in evaluate()
3104 op1 = op->r.n; in evaluate()
3133 if (op->r.n->info != TI_COLON) in evaluate()
3135 res = evaluate(istrue(L.v) ? op->r.n->l.n : op->r.n->r.n, res); in evaluate()
3211 if (!op->r.n) in evaluate()
3436 setvar_i(res, istrue(L.v) ? ptest(op->r.n) : 0); in evaluate()
3441 setvar_i(res, istrue(L.v) ? 1 : ptest(op->r.n)); in evaluate()
3515 op = op->a.n; in evaluate()