expr.y (7f8fdcbbbefb2d95259aa76a362689affafa4e4b) expr.y (aed0d6f8c6edab48be649a071e18d28efb1a203a)
1/* Simple expression parser */
2%{
3#define YYDEBUG 1
4#include <math.h>
5#include "util/debug.h"
6#include "smt.h"
7#define IN_EXPR_Y 1
8#include "expr.h"

--- 6 unchanged lines hidden (view full) ---

15%parse-param {void *scanner}
16%lex-param {void* scanner}
17
18%union {
19 double num;
20 char *str;
21}
22
1/* Simple expression parser */
2%{
3#define YYDEBUG 1
4#include <math.h>
5#include "util/debug.h"
6#include "smt.h"
7#define IN_EXPR_Y 1
8#include "expr.h"

--- 6 unchanged lines hidden (view full) ---

15%parse-param {void *scanner}
16%lex-param {void* scanner}
17
18%union {
19 double num;
20 char *str;
21}
22
23%token EXPR_PARSE EXPR_OTHER EXPR_ERROR
24%token <num> NUMBER
25%token <str> ID
26%destructor { free ($$); } <str>
27%token MIN MAX IF ELSE SMT_ON D_RATIO
23%token ID NUMBER MIN MAX IF ELSE SMT_ON D_RATIO EXPR_ERROR EXPR_PARSE EXPR_OTHER
28%left MIN MAX IF
29%left '|'
30%left '^'
31%left '&'
32%left '<' '>'
33%left '-' '+'
34%left '*' '/' '%'
35%left NEG NOT
24%left MIN MAX IF
25%left '|'
26%left '^'
27%left '&'
28%left '<' '>'
29%left '-' '+'
30%left '*' '/' '%'
31%left NEG NOT
32%type <num> NUMBER
33%type <str> ID
34%destructor { free ($$); } <str>
36%type <num> expr if_expr
37
38%{
39static void expr_error(double *final_val __maybe_unused,
40 struct expr_parse_ctx *ctx __maybe_unused,
41 void *scanner,
42 const char *s)
43{

--- 75 unchanged lines hidden ---
35%type <num> expr if_expr
36
37%{
38static void expr_error(double *final_val __maybe_unused,
39 struct expr_parse_ctx *ctx __maybe_unused,
40 void *scanner,
41 const char *s)
42{

--- 75 unchanged lines hidden ---