comparison lwcc/tree.h @ 498:1bd2d590d734

Rejig parser to eliminate lemon No longer use lemon for building the parser. It adds too much complexity, really, and a hand written recursive descent parser is far more flexible. The current iteration can handle exactly one statement: "return <int>".
author William Astle <lost@l-w.ca>
date Thu, 08 Aug 2019 23:32:23 -0600
parents a3e277c58df9
children f3e9732973f1
comparison
equal deleted inserted replaced
497:4b865c9d4371 498:1bd2d590d734
47 #define NODE_TYPE_LDOUBLE 19 // long double 47 #define NODE_TYPE_LDOUBLE 19 // long double
48 #define NODE_FUNDEF 20 // function definition 48 #define NODE_FUNDEF 20 // function definition
49 #define NODE_FUNDECL 21 // function declaration 49 #define NODE_FUNDECL 21 // function declaration
50 #define NODE_FUNARGS 22 // list of function args 50 #define NODE_FUNARGS 22 // list of function args
51 #define NODE_BLOCK 23 // statement block 51 #define NODE_BLOCK 23 // statement block
52 #define NODE_NUMTYPES 24 // the number of node types 52 #define NODE_STMT_RETURN 24 // return statement
53 #define NODE_CONST_INT 25 // constant integer
54 #define NODE_NUMTYPES 26 // the number of node types
53 55
54 typedef struct node_s node_t; 56 typedef struct node_s node_t;
55 57
56 struct node_s 58 struct node_s
57 { 59 {