#include <stdio.h>
#include <stdlib.h>

#define POOL_SIZE 32768
// prime number
#define HASH_TABLE_SIZE 4093
#define ERRORS_SIZE 10
#define VECTOR_POOL_SIZE 2000000
#define MAX_TOKENS 512
#define MAX_FORMAL_PARAMETERS 32
#define MAX_STACK 2048
#define MAX_OUTPUT_QUEUE 3072
#define MAX_CONS_CELL 8192
#define MAX_BYTECODES 65536
#define MAX_LABELS 32768

#define TOKEN_RING_SIZE 4
#define MAX_TOKEN_RING 3

#define MAX_COMMENT_SIZE 1024

// error messages

#define IDENTIFIER_EXPECTED 0
#define REST_OF_PROGRAM_IGNORED 1
#define EXPECT_TOKEN 2
#define BAD_STATEMENT 3
#define EXPRESSION_TOO_LONG 4
#define CONTROL_VAR_MISMATCH 5
#define EXPECTING_INCR_DECR 6
#define NUMBER_EXPECTED 7
#define MAX_ALLOWED_FORMAL_PARAMETERS 8
#define MISMATCHED 9
#define MISMATCHED2 10
#define STACK_UNDERFLOW 11
#define BAD_EXPRESSION 12
#define VECTOR_POOL_EXHAUSTION 13
#define MAX_NUMBER_OF_CONS_CELLS 14
#define UNDECLARED_IDENTIFIER 15
#define UNDEFINED_CONSTANT 16
#define BAD_HEX_NUMBER 17
#define HASH_TABLE_EXHAUSTION 18
#define VECTOR_REFERENCE_OUT_OF_RANGE 19

// annotation types

#define ANNOTATION_NONE 0 
#define ANNOTATION_SEPARATOR 1
#define ANNOTATION_OPERATOR 2
#define ANNOTATION_LOCAL_VAR 3
#define ANNOTATION_GLOBAL_VAR 4
#define ANNOTATION_FUNCTION 5
#define ANNOTATION_PROCEDURE 6
#define ANNOTATION_NUMBER 7
#define ANNOTATION_RETURN 8
#define ANNOTATION_LOCAL_VAR_ASSIGNMENT 9
#define ANNOTATION_GLOBAL_VAR_ASSIGNMENT 10

// arm opcodes

#define ARM_MOV 0
#define ARM_MVN 1
#define ARM_LDR 2
#define ARM_STR 3
#define ARM_ADD 4
#define ARM_SUB 5
#define ARM_MUL 6
#define ARM_CMP 7
#define ARM_BGE 8
#define ARM_BEQ 9
#define ARM_BNE 10
#define ARM_BL 11
#define ARM_B 12
#define ARM_MOVEQ 13
#define ARM_MOVNE 14
#define ARM_LDMFD 15
#define ARM_STMFD 16

// riscv opcodes

#define RISCV_MV 0
#define RISCV_LI 1
#define RISCV_LW 2
#define RISCV_LD 3
#define RISCV_LUI 4
#define RISCV_SW 5
#define RISCV_SD 6
#define RISCV_ADD 7
#define RISCV_ADDI 8
#define RISCV_SUB 9
#define RISCV_BEQ 10
#define RISCV_BNE 11
#define RISCV_BGE 12
#define RISCV_J 13
#define RISCV_JR 14
#define RISCV_CALL 15
#define RISCV_OR 16
#define RISCV_AND 17
#define RISCV_XOR 18
#define RISCV_SLLI 19
#define RISCV_XORI 20
#define RISCV_JALR 21

// x86 opcodes

#define X86_MOV 0
#define X86_ADD 1
#define X86_SUB 2
#define X86_MUL 3
#define X86_CMP 4
#define X86_BGE 5
#define X86_BEQ 6
#define X86_BNE 7
#define X86_B 8
#define X86_CALL 9
#define X86_RET 10
#define X86_NEG 11
#define X86_NOT 12
#define X86_AND 13
#define X86_SHL 14
#define X86_XOR 15
#define X86_TEST 16
#define X86_ALIGN 17
