Searched refs:expr (Results 1 - 25 of 80) sorted by relevance

1234

/ast/src/lib/libexpr/
H A DOexparse.c59 struct Exnode_s*expr; member in union:__anon350
645 "statement : IF '(' expr ')' statement else_opt",
648 "statement : WHILE '(' expr ')' statement",
650 "statement : SWITCH '(' expr $$4 ')' '{' switch_list '}'",
672 "expr_opt : expr",
673 "expr : '(' expr ')'",
674 "expr : '(' DECLARE ')' expr",
675 "expr
[all...]
H A Dexerror.c39 if (expr.program->disc->errorf && !expr.program->errors && (sp = sfstropen()))
45 expr.program->errors = 1;
46 excontext(expr.program, buf, sizeof(buf));
53 (*expr.program->disc->errorf)(expr.program, expr.program->disc, (expr.program->disc->flags & EX_FATAL) ? 3 : 2, "%s", s);
56 else if (expr.program->disc->flags & EX_FATAL)
H A Dexparse.y37 struct Exnode_s*expr;
125 %type <expr> statement statement_list arg_list
126 %type <expr> else_opt expr_opt expr
127 %type <expr> args variable assign
128 %type <expr> dcl_list dcl_item index
129 %type <expr> initialize switch_item constant
130 %type <expr> formals formal_list formal_item
157 if ($1 && !(expr.program->disc->flags & EX_STRICT))
159 if (expr
536 expr : '(' expr ')' label
[all...]
H A Dexzero.c49 v.string = expr.nullstring;
H A Dexeval.c76 getdyn(Expr_t* ex, register Exnode_t* expr, void* env, Exassoc_t** assoc) argument
81 if (expr->data.variable.index)
85 v = eval(ex, expr->data.variable.index, env);
86 if (expr->data.variable.index->type != STRING)
91 if (!(b = (Exassoc_t*)dtmatch((Dt_t*)expr->data.variable.symbol->local.pointer, v.string)))
96 dtinsert((Dt_t*)expr->data.variable.symbol->local.pointer, b);
101 if (expr->data.variable.symbol->type == STRING && !b->value.string)
102 b->value = exzero(expr->data.variable.symbol->type);
105 v = exzero(expr->data.variable.symbol->type);
109 return expr
115 Expr_t* expr; member in struct:__anon352
296 print(Expr_t* ex, Exnode_t* expr, void* env, Sfio_t* sp) argument
402 scan(Expr_t* ex, Exnode_t* expr, void* env, Sfio_t* sp) argument
539 eval(Expr_t* ex, register Exnode_t* expr, void* env) argument
1301 exeval(Expr_t* ex, Exnode_t* expr, void* env) argument
[all...]
H A Dexcc.c113 print(Excc_t* cc, Exnode_t* expr) argument
118 if (x = expr->data.print.args)
120 sfprintf(cc->ccdisc->text, "sfprintf(%s, \"%s", expr->data.print.descriptor->op == CONSTANT && expr->data.print.descriptor->data.constant.value.integer == 2 ? "sfstderr" : "sfstdout", fmtesq(x->format, quote));
124 for (x = expr->data.print.args; x; x = x->next)
148 scan(Excc_t* cc, Exnode_t* expr) argument
153 if (x = expr->data.print.args)
159 for (x = expr->data.print.args; x; x = x->next)
183 gen(Excc_t* cc, register Exnode_t* expr) argument
194 if (!expr)
556 exccopen(Expr_t* expr, Exccdisc_t* disc) argument
638 exdump(Expr_t* expr, Exnode_t* node, Sfio_t* sp) argument
[all...]
H A Dexgram.h38 #define exlex() extoken(expr.program)
41 #define QUALIFY(r,s) ((r)&&(expr.program->disc->flags&EX_QUALIFY)?qualify(r,s):(s))
46 Exstate_t expr; variable
319 sfprintf(expr.program->tmp, "%s.%s", ref->symbol->name, sym->name);
320 s = exstash(expr.program->tmp, NiL);
321 if (!(x = (Exid_t*)dtmatch(expr.program->symbols, s)))
327 dtinsert(expr.program->symbols, x);
351 x = exnewnode(expr.program, ID, 0, 0, NiL, NiL);
366 args->data.operand.left = excast(expr.program, args->data.operand.left, type, NiL, num);
397 x = ALLOCATE(expr
[all...]
/ast/src/lib/libdss/
H A Dcxeval.c36 cxbeg(Cx_t* cx, register Cxexpr_t* expr, const char* method) argument
44 if (expr->begun)
46 expr->begun = 1;
47 if (expr->query->head)
51 expr->queried = expr->selected = 0;
52 if (expr->pass && cxbeg(cx, expr->pass, method))
54 if (expr->fail && cxbeg(cx, expr
96 cxend(Cx_t* cx, register Cxexpr_t* expr) argument
127 execute(Cx_t* cx, Cxexpr_t* expr, register Cxinstruction_t* pc, void* data, Cxoperand_t* rv, Cxdisc_t* disc) argument
180 eval(Cx_t* cx, register Cxexpr_t* expr, void* data, Cxoperand_t* rv) argument
214 cxeval(Cx_t* cx, register Cxexpr_t* expr, void* data, Cxoperand_t* rv) argument
[all...]
H A Ddss-compress.h50 compress_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
74 if (expr->pass || expr->fail || expr->parent->pass != expr)
80 expr->parent->pass = 0;
81 if (expr->parent->op != expr->op)
83 if (expr->parent->op != sfstdout)
84 sfclose(expr
[all...]
H A Ddss-count.h38 count_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
61 if ((expr->data = *argv++) && *argv)
71 count_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
73 if (expr->data)
74 sfprintf(expr->op, "%s: ", (char*)expr->data);
75 sfprintf(expr->op, "%I*u/%I*u\n", sizeof(expr->parent->selected), expr == expr
[all...]
H A Ddss-write.h39 write_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
63 if (expr->data = *argv++)
71 if (!(format = dssformat(expr->data, disc, DSS(cx)->meth)))
74 (*disc->errorf)(NiL, disc, 2, "%s: unknown format", (char*)expr->data);
80 if (!(expr->data = dssfopen(DSS(cx), expr->file, expr->op, DSS_FILE_WRITE, format)))
86 write_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
88 return dssfwrite((Dssfile_t*)expr->data, data);
92 write_end(Cx_t* cx, Cxexpr_t* expr, voi argument
98 write_ref(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
[all...]
H A Ddssmisc.c35 Cxexpr_t* expr; local
55 expr = cxcomp(dss->cx);
57 return expr;
61 * called once before the first dsseval(expr)
65 dssbeg(Dss_t* dss, Dssexpr_t* expr) argument
67 return cxbeg(dss->cx, expr, dss->meth->name);
71 * evaluate expr
75 dsseval(Dss_t* dss, Dssexpr_t* expr, Dssrecord_t* record) argument
79 if (!expr->begun && dssbeg(dss, expr))
90 dssend(Dss_t* dss, Dssexpr_t* expr) argument
100 dsslist(Dss_t* dss, Dssexpr_t* expr, Sfio_t* sp) argument
110 dssfree(Dss_t* dss, Dssexpr_t* expr) argument
[all...]
H A Ddss-print.h57 print_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
85 expr->data = 0;
86 else if (!(expr->data = *argv++))
89 if (!(expr->data = (char*)DSS(cx)->meth->print))
102 return cx->referencef ? dssprintf(DSS(cx), cx, 0, (char*)expr->data, NiL) : 0;
106 print_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
108 return dssprintf(DSS(cx), cx, expr->op, (char*)expr->data, data);
112 print_ref(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
H A Ddss-return.h41 return_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
74 return_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
79 if (!(s = expr->argv[1]) || streq(s, "skip"))
H A Ddss-scan.h38 scan_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
42 char** files = expr->files;
77 expr = expr->pass;
103 if (dssbeg(dss, expr))
109 if (dsseval(dss, expr, record) < 0)
H A Ddssopen.c515 r->value.number = cx->expr ? cx->expr->parent->queried : 0;
521 r->value.number = cx->expr ? cx->expr->parent->selected : 0;
779 * return 1 if expr contains a query
783 hasquery(register Dssexpr_t* expr) argument
787 if (!expr->query->prog)
789 if (expr->pass && hasquery(expr->pass))
791 if (expr
807 Dssexpr_t* expr; local
[all...]
/ast/src/cmd/dsslib/tests/
H A Dtest.c40 even_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
53 expr->data = state;
82 even_sel(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
84 State_t* state = (State_t*)expr->data;
86 if (!(expr->queried & 1))
89 sfprintf(sfstdout, "even_sel %I*u\n", sizeof(expr->queried), expr->queried);
96 even_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
98 sfprintf(sfstdout, "even_act %I*u\n", sizeof(expr->queried), expr
103 even_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
120 odd_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
162 odd_sel(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
176 odd_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
183 odd_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
[all...]
/ast/src/cmd/dsslib/fix/
H A Dfix.c81 fix_beg(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
177 expr->data = state;
185 fix_act(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
187 register State_t* state = (State_t*)expr->data;
215 fix_end(Cx_t* cx, Cxexpr_t* expr, void* data, Cxdisc_t* disc) argument
217 register State_t* state = (State_t*)expr->data;
272 sfprintf(expr->op, "<METHOD>flat</>\n");
273 sfprintf(expr->op, "<FLAT>\n");
274 sfprintf(expr->op, " <NAME>%s</>\n", DSS(cx)->meth->name);
278 sfprintf(expr
[all...]
/ast/src/lib/libast/string/
H A Dstrexpr.c76 expr(register Expr_t* ex, register int precedence) function
92 n = -expr(ex, 13);
95 n = expr(ex, 13);
98 n = !expr(ex, 13);
101 n = ~expr(ex, 13);
119 n = expr(ex, 1);
134 x = expr(ex, 2);
139 x = expr(ex, 2);
148 expr(ex, 2);
150 else n = expr(e
[all...]
H A Dstrperm.c27 * apply file permission expression expr to perm
35 * if non-null, e points to the first unrecognized char in expr
45 register char* expr = (char*)aexpr; local
67 switch (c = *expr++)
88 expr--;
104 switch (c = *expr++)
129 *e = expr - 1;
238 *e = expr - 1;
253 if (*expr < '0' || *expr > '
[all...]
/ast/src/cmd/ksh93/tests/
H A Dgrep.sh49 -e*) shift;expr="$1";;
50 -f*) shift;expr=$(< $1);;
53 if test "$expr" = ''
54 then expr="$1";shift
56 test "$xflag" || expr="*${expr}*"
72 $expr) # line matches pattern
/ast/src/cmd/tw/
H A Dupdatedb.sh236 expr=
238 ?*) expr="if (${skip}${alt})${alt} status = SKIP;" ;;
241 ?*) case $expr in
242 ?*) expr="${expr}${sep}else " ;;
244 expr="${expr}if (${alt}type == LNK &&${alt}level < 3 &&${alt}path == '($keep)?(/*)'${alt})${alt} status = FOLLOW;"
247 case $expr in
249 "") expr="-e${sep}${expr}
[all...]
/ast/src/lib/libtk/library/demos/
H A Dtcolor155 set red [format %.0f [expr [.scale1 get]*65.535]]
156 set green [format %.0f [expr [.scale2 get]*65.535]]
157 set blue [format %.0f [expr [.scale3 get]*65.535]]
160 set red [format %.0f [expr {65535 - [.scale1 get]*65.535}]]
161 set green [format %.0f [expr {65535 - [.scale2 get]*65.535}]]
162 set blue [format %.0f [expr {65535 - [.scale3 get]*65.535}]]
164 set list [hsbToRgb [expr {[.scale1 get]/1000.0}] \
165 [expr {[.scale2 get]/1000.0}] \
166 [expr {[.scale3 get]/1000.0}]]
187 .scale1 set [format %.0f [expr
[all...]
H A Dsquare29 .s position [expr $x-($a/2)] [expr $y-($a/2)]
53 .s size [expr {$s+$inc}]
H A Dtimer30 set hundredths [expr $hundredths+5]
33 set seconds [expr $seconds+1]

Completed in 23 milliseconds

1234