Home | History | Annotate | Download | only in edify

Lines Matching refs:expr

22 #include "expr.h"
29 void yyerror(Expr** root, int* error_count, const char* s);
30 int yyparse(Expr** root, int* error_count);
38 Expr* expr;
41 Expr** argv;
47 %type <expr> expr
50 %parse-param {Expr** root}
65 input: expr { *root = $1; }
68 expr: STRING {
69 $$ = malloc(sizeof(Expr));
77 | '(' expr ')' { $$ = $2; $$->start=@$.start; $$->end=@$.end; }
78 | expr ';' { $$ = $1; $$->start=@1.start; $$->end=@1.end; }
79 | expr ';' expr { $$ = Build(SequenceFn, @$, 2, $1, $3); }
80 | error ';' expr { $$ = $3; $$->start=@$.start; $$->end=@$.end; }
81 | expr '+' expr { $$ = Build(ConcatFn, @$, 2, $1, $3); }
82 | expr EQ expr { $$ = Build(EqualityFn, @$, 2, $1, $3); }
83 | expr NE expr { $$ = Build(InequalityFn, @$, 2, $1, $3); }
84 | expr AND expr { $$ = Build(LogicalAndFn, @$, 2, $1, $3); }
85 | expr OR expr { $$ = Build(LogicalOrFn, @$, 2, $1, $3); }
86 | '!' expr { $$ = Build(LogicalNotFn, @$, 1, $2); }
87 | IF expr THEN expr ENDIF { $$ = Build(IfElseFn, @$, 2, $2, $4); }
88 | IF expr THEN expr ELSE expr ENDIF { $$ = Build(IfElseFn, @$, 3, $2, $4, $6); }
90 $$ = malloc(sizeof(Expr));
110 | expr {
112 $$.argv = malloc(sizeof(Expr*));
115 | arglist ',' expr {
117 $$.argv = realloc($$.argv, $$.argc * sizeof(Expr*));
124 void yyerror(Expr** root, int* error_count, const char* s) {