2 // RMAC - Reboot's Macro Assembler for all Atari computers
3 // EXPR.H - Expression Analyzer
4 // Copyright (C) 199x Landon Dyer, 2011-2020 Reboot and Friends
5 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
6 // Source utilised with the kind permission of Landon Dyer
14 // Tunable definitions
15 #define STKSIZE 64 // Size of expression stacks
16 #define EVSTACKSIZE 64 // Expression evaluator stack size
18 // Token classes in order of precedence
19 #define END 0 // End/beginning of input
20 #define ID 1 // Symbol or constant
23 #define SUNARY 4 // Special unary (^^defined, etc.)
24 #define UNARY 5 // Unary class: ! ~ -
25 #define MULT 6 // Multiplicative class: * / %
26 #define ADD 7 // Additive class: + -
27 #define SHIFT 8 // Shift class: << >>
28 #define REL 9 // Relational class: <= >= < > <> = !=
29 #define AND 10 // Bitwise and: &
30 #define XOR 11 // Bitwise xor: ^
31 #define OR 12 // Bitwise or: |
34 void InitExpression(void);
37 int expr(TOKEN *, uint64_t *, WORD *, SYM **);
38 int evexpr(TOKEN *, uint64_t *, WORD *, SYM **);
39 uint16_t ExpressionLength(TOKEN *);