Lines Matching defs:program

47 %start	program
155 program : statement_list action_list
157 if ($1 && !(expr.program->disc->flags & EX_STRICT))
159 if (expr.program->main.value && !(expr.program->disc->flags & EX_RETAIN))
160 exfreenode(expr.program, expr.program->main.value);
168 exfreenode(expr.program, x);
170 expr.program->main.lex = PROCEDURE;
171 expr.program->main.value = exnewnode(expr.program, PROCEDURE, 1, $1->type, NiL, $1);
186 expr.procedure = $1->value = exnewnode(expr.program, PROCEDURE, 1, $1->type, NiL, NiL);
193 if (!(expr.procedure->data.procedure.frame = dtopen(disc, Dtset)) || !dtview(expr.procedure->data.procedure.frame, expr.program->symbols))
195 expr.program->symbols = expr.program->frame = expr.procedure->data.procedure.frame;
200 if (expr.program->frame)
202 expr.program->symbols = expr.program->frame->view;
203 dtview(expr.program->frame, NiL);
204 expr.program->frame = 0;
213 exfreenode(expr.program, x);
215 $1->value->data.operand.right = excast(expr.program, $4, $1->type, NiL, 0);
231 exfreenode(expr.program, $1);
237 $1->data.operand.last = $1->data.operand.last->data.operand.right = exnewnode(expr.program, ';', 1, $2->type, $2, NiL);
241 $$ = exnewnode(expr.program, ';', 1, $1->type, $1, NiL);
242 $$->data.operand.last = $$->data.operand.right = exnewnode(expr.program, ';', 1, $2->type, $2, NiL);
253 $$ = ($1 && $1->type == STRING) ? exnewnode(expr.program, S2B, 1, INTEGER, $1, NiL) : $1;
263 $3 = exnewnode(expr.program, S2B, 1, INTEGER, $3, NiL);
265 $3 = excast(expr.program, $3, INTEGER, NiL, 0);
266 $$ = exnewnode(expr.program, $1->index, 1, INTEGER, $3, exnewnode(expr.program, ':', 1, $5 ? $5->type : 0, $5, $6));
270 $$ = exnewnode(expr.program, ITERATE, 0, INTEGER, NiL, NiL);
277 exfreenode(expr.program, $3->data.variable.index);
285 $5 = exnewnode(expr.program, CONSTANT, 0, INTEGER, NiL, NiL);
289 $5 = exnewnode(expr.program, S2B, 1, INTEGER, $5, NiL);
291 $5 = excast(expr.program, $5, INTEGER, NiL, 0);
292 $$ = exnewnode(expr.program, $1->index, 1, INTEGER, $5, exnewnode(expr.program, ';', 1, 0, $7, $9));
294 $$ = exnewnode(expr.program, ';', 1, INTEGER, $3, $$);
299 $3 = exnewnode(expr.program, S2B, 1, INTEGER, $3, NiL);
301 $3 = excast(expr.program, $3, INTEGER, NiL, 0);
302 $$ = exnewnode(expr.program, $1->index, 1, INTEGER, $3, exnewnode(expr.program, ';', 1, 0, NiL, $5));
308 $$ = exnewnode(expr.program, $1->index, 1, INTEGER, $3, exnewnode(expr.program, DEFAULT, 1, 0, sw->defcase, sw->firstcase));
321 $2 = exnewnode(expr.program, CONSTANT, 0, INTEGER, NiL, NiL);
325 $2 = excast(expr.program, $2, INTEGER, NiL, 0);
326 $$ = exnewnode(expr.program, $1->index, 1, INTEGER, $2, NiL);
338 $2 = excast(expr.program, $2, expr.procedure ? expr.procedure->type : INTEGER, NiL, 0);
340 $$ = exnewnode(expr.program, RETURN, 1, $2 ? $2->type : 0, $2, NiL);
383 $$ = exnewnode(expr.program, CASE, 1, 0, $2, NiL);
393 $$->data.select.constant = (Extype_t**)exalloc(expr.program, (n + 1) * sizeof(Extype_t*));
431 $2 = excast(expr.program, $2, expr.swstate->type, NiL, 0);
455 $$ = $1 ? exnewnode(expr.program, ',', 1, $3->type, $1, $3) : $3;
467 if (!expr.program->disc->getf || !expr.program->symbols)
471 else if (expr.program->disc->reff)
472 (*expr.program->disc->reff)(expr.program, $$, $2, $1, NiL, EX_SCALAR, expr.program->disc);
482 $2->value = exnewnode(expr.program, 0, 0, 0, NiL, NiL);
498 $5->data.operand.right = excast(expr.program, $5->data.operand.right, $2->type, NiL, 0);
500 $5->data.operand.left = exnewnode(expr.program, DYNAMIC, 0, $2->type, NiL, NiL);
503 if (!expr.program->frame && !expr.program->errors)
506 exeval(expr.program, $$, NiL);
542 $$ = ($4->type == $2->type) ? $4 : excast(expr.program, $4, $2->type, NiL, 0);
566 $1 = excast(expr.program, $1, $3->type, $3, 0);
568 $3 = excast(expr.program, $3, $1->type, $1, 0);
570 $3 = excast(expr.program, $3, FLOATING, $1, 0);
572 $1 = excast(expr.program, $1, FLOATING, $3, 0);
576 $$ = exnewnode(expr.program, $2, 1, rel, $1, $3);
577 if (!expr.program->errors && $1->op == CONSTANT && $3->op == CONSTANT)
579 $$->data.constant.value = exeval(expr.program, $$, NiL);
582 exfreenode(expr.program, $1);
583 exfreenode(expr.program, $3);
650 $1 = exnewnode(expr.program, S2B, 1, INTEGER, $1, NiL);
652 $3 = exnewnode(expr.program, S2B, 1, INTEGER, $3, NiL);
663 exfreenode(expr.program, $1);
667 $$ = exnewnode(expr.program, ',', 1, $3->type, $1, $3);
681 $1 = exnewnode(expr.program, S2B, 1, INTEGER, $1, NiL);
683 $1 = excast(expr.program, $1, INTEGER, NiL, 0);
689 $7 = excast(expr.program, $7, FLOATING, NiL, 0);
691 $4 = excast(expr.program, $4, FLOATING, NiL, 0);
698 exfreenode(expr.program, $7);
703 exfreenode(expr.program, $4);
705 exfreenode(expr.program, $1);
708 $$ = exnewnode(expr.program, '?', 1, $4->type, $1, exnewnode(expr.program, ':', 1, $4->type, $4, $7));
714 $2 = exnewnode(expr.program, S2B, 1, INTEGER, $2, NiL);
716 $2 = excast(expr.program, $2, INTEGER, NiL, 0);
718 $$ = exnewnode(expr.program, $1, 1, $2->type == UNSIGNED ? INTEGER : $2->type, $2, NiL);
721 $$->data.constant.value = exeval(expr.program, $$, NiL);
724 exfreenode(expr.program, $2);
741 $$ = exnewnode(expr.program, ADDRESS, 0, T($2->type), $2, NiL);
745 $$ = exnewnode(expr.program, FUNCTION, 1, T($2->type), call($1, $2, $4), $4);
746 if (!expr.program->disc->getf)
748 else if (expr.program->disc->reff)
749 (*expr.program->disc->reff)(expr.program, $$->data.operand.left, $$->data.operand.left->data.variable.symbol, $1, NiL, EX_CALL, expr.program->disc);
754 $3 = excast(expr.program, $3, INTEGER, NiL, 0);
755 $$ = exnewnode(expr.program, EXIT, 1, INTEGER, $3, NiL);
759 $$ = exnewnode(expr.program, CALL, 1, $1->type, NiL, $3);
764 $$ = exnewnode(expr.program, $1->index, 0, $1->type, NiL, NiL);
774 $$->data.print.descriptor = exnewnode(expr.program, CONSTANT, 0, INTEGER, NiL, NiL);
778 $$->data.print.descriptor = exnewnode(expr.program, CONSTANT, 0, INTEGER, NiL, NiL);
791 $$ = exnewnode(expr.program, $1->index, 0, $1->type, NiL, NiL);
825 $$ = exnewnode(expr.program, CONSTANT, 0, $3->type, NiL, NiL);
826 if (!expr.program->disc->reff)
830 $$->data.constant.value = (*expr.program->disc->reff)(expr.program, $$, $3, NiL, $1, EX_SCALAR, expr.program->disc);
838 if ($1->op == ID && !expr.program->disc->setf)
851 $2->data.operand.right = excast(expr.program, $2->data.operand.right, $1->type, NiL, 0);
863 $$ = exnewnode(expr.program, $1, 0, $2->type, $2, NiL);
871 $$ = exnewnode(expr.program, $2, 0, $1->type, $1, NiL);
887 $$ = exnewnode(expr.program, CONSTANT, 0, $1->type, NiL, NiL);
888 if (!expr.program->disc->reff)
891 $$->data.constant.value = (*expr.program->disc->reff)(expr.program, $$, $1, NiL, NiL, EX_SCALAR, expr.program->disc);
895 $$ = exnewnode(expr.program, CONSTANT, 0, FLOATING, NiL, NiL);
900 $$ = exnewnode(expr.program, CONSTANT, 0, INTEGER, NiL, NiL);
905 $$ = exnewnode(expr.program, CONSTANT, 0, STRING, NiL, NiL);
910 $$ = exnewnode(expr.program, CONSTANT, 0, UNSIGNED, NiL, NiL);
926 $$ = exnewnode(expr.program, ID, 0, $2->type, NiL, NiL);
930 $3 = excast(expr.program, $3, INTEGER, NiL, 0);
932 if (!expr.program->disc->getf)
934 else if (expr.program->disc->reff)
935 (*expr.program->disc->reff)(expr.program, $$, $$->data.variable.symbol, $1, NiL, $3 ? 0 : EX_SCALAR, expr.program->disc);
940 $$ = exnewnode(expr.program, DYNAMIC, 0, $1->type, NiL, NiL);
948 $$ = exnewnode(expr.program, ID, 0, 0, NiL, NiL);
952 if (!(expr.program->disc->flags & EX_UNDECLARED))
985 exfreenode(expr.program, $1);
991 $$ = exnewnode(expr.program, ';', 1, 0, exnewnode(expr.program, ';', 1, $1->type, $1, NiL), NiL);
996 $1->data.operand.right = $1->data.operand.right->data.operand.right = exnewnode(expr.program, ',', 1, $1->type, $3, NiL);
1015 $$ = exnewnode(expr.program, ',', 1, $1->type, $1, NiL);
1024 x->data.operand.right = exnewnode(expr.program, ',', 1, $3->type, $3, NiL);
1030 $$ = exnewnode(expr.program, ID, 0, $3->type, NiL, NiL);
1033 $3->value = exnewnode(expr.program, 0, 0, 0, NiL, NiL);
1047 r = ALLOCATE(expr.program, Exref_t);
1071 $$ = exnewnode(expr.program, '=', 1, $2->type, NiL, $2);
1082 expr.procedure = exnewnode(expr.program, PROCEDURE, 1, expr.declare, NiL, NiL);
1088 if (!(expr.procedure->data.procedure.frame = dtopen(disc, Dtset)) || !dtview(expr.procedure->data.procedure.frame, expr.program->symbols))
1090 expr.program->symbols = expr.program->frame = expr.procedure->data.procedure.frame;
1091 expr.program->formals = 1;
1097 expr.program->formals = 0;
1103 if (expr.program->frame)
1105 expr.program->symbols = expr.program->frame->view;
1106 dtview(expr.program->frame, NiL);
1107 expr.program->frame = 0;
1110 $$->data.operand.right = excast(expr.program, $7, $$->type, NiL, 0);
1118 exunlex(expr.program, ';');