1 ////////////////////////////////////////////////////////////////////////////////////////////////////
2 // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System
3 // EXPR.H - Expression Analyzer
4 // Copyright (C) 199x Landon Dyer, 2011 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
13 // Tunable definitions
14 #define STKSIZE 64 // Size of expression stacks
15 #define EVSTACKSIZE 64 // Expression evaluator stack size
17 // Token classes in order of precedence
18 #define END 0 // End/beginning of input
19 #define ID 1 // Symbol or constant
22 #define SUNARY 4 // Special unary (^^defined, etc.)
23 #define UNARY 5 // Unary class: ! ~ -
24 #define MULT 6 // Multiplicative class: * / %
25 #define ADD 7 // Additive class: + -
26 #define SHIFT 8 // Shift class: << >>
27 #define REL 9 // Relational class: <= >= < > <> = !=
28 #define AND 10 // Bitwise and: &
29 #define XOR 11 // Bitwise xor: ^
30 #define OR 12 // Bitwise or: |
36 int expr(TOKEN *, VALUE *, WORD *, SYM **);
37 int evexpr(TOKEN *, VALUE *, WORD *, SYM **);