1 Subject: parse.y: macro cleanup
5 source/parse.y | 33 ++++++++++++++++++++++++++++-----
6 1 file changed, 28 insertions(+), 5 deletions(-)
8 diff --quilt old/source/parse.y new/source/parse.y
10 +++ new/source/parse.y
16 /* Macros to add error processing to AddOp and AddSym calls */
17 -#define ADD_OP(op) if (!AddOp(op, &ErrMsg)) return 1
18 -#define ADD_SYM(sym) if (!AddSym(sym, &ErrMsg)) return 1
19 -#define ADD_IMMED(val) if (!AddImmediate(val, &ErrMsg)) return 1
20 -#define ADD_BR_OFF(to) if (!AddBranchOffset(to, &ErrMsg)) return 1
21 -#define SET_BR_OFF(from, to) ((from)->value) = ((Inst *)(to)) - ((Inst *)(from))
24 + if (!AddOp(op, &ErrMsg)) { \
28 +#define ADD_SYM(sym) \
30 + if (!AddSym(sym, &ErrMsg)) { \
34 +#define ADD_IMMED(val) \
36 + if (!AddImmediate(val, &ErrMsg)) { \
40 +#define ADD_BR_OFF(to) \
42 + if (!AddBranchOffset(to, &ErrMsg)) { \
46 +#define SET_BR_OFF(from, to) \
48 + ((from)->value) = ((Inst *)(to)) - ((Inst *)(from)); \
51 /* Max. length for a string constant (... there shouldn't be a maximum) */
52 #define MAX_STRING_CONST_LEN 5000
54 static const char CVSID[] = "$Id: parse.y,v 1.29 2007/01/12 16:17:42 tringali Exp $";