Home | History | Annotate | Download | only in edify

Lines Matching defs:expr

22 #include "expr.h"
29 void yyerror(Expr** root, int* error_count, const char* s);
30 int yyparse(Expr** root, int* error_count);
42 Expr* expr;
45 Expr** argv;
51 %type <expr> expr
54 %parse-param {Expr** root}
69 input: expr { *root = $1; }
72 expr: STRING {
73 $$ = malloc(sizeof(Expr));
81 | '(' expr ')' { $$ = $2; $$->start=@$.start; $$->end=@$.end; }
82 | expr ';' { $$ = $1; $$->start=@1.start; $$->end=@1.end; }
83 | expr ';' expr { $$ = Build(SequenceFn, @$, 2, $1, $3); }
84 | error ';' expr { $$ = $3; $$->start=@$.start; $$->end=@$.end; }
85 | expr '+' expr { $$ = Build(ConcatFn, @$, 2, $1, $3); }
86 | expr EQ expr { $$ = Build(EqualityFn, @$, 2, $1, $3); }
87 | expr NE expr { $$ = Build(InequalityFn, @$, 2, $1, $3); }
88 | expr AND expr { $$ = Build(LogicalAndFn, @$, 2, $1, $3); }
89 | expr OR expr { $$ = Build(LogicalOrFn, @$, 2, $1, $3); }
90 | '!' expr { $$ = Build(LogicalNotFn, @$, 1, $2); }
91 | IF expr THEN expr ENDIF { $$ = Build(IfElseFn, @$, 2, $2, $4); }
92 | IF expr THEN expr ELSE expr ENDIF { $$ = Build(IfElseFn, @$, 3, $2, $4, $6); }
94 $$ = malloc(sizeof(Expr));
114 | expr {
116 $$.argv = malloc(sizeof(Expr*));
119 | arglist ',' expr {
121 $$.argv = realloc($$.argv, $$.argc * sizeof(Expr*));
128 void yyerror(Expr** root, int* error_count, const char* s) {
136 int parse_string(const char* str, Expr** root, int* error_count) {