13 #define lex_tok_LOAD "LOAD"
14 #define lex_tok_STORE "STORE"
15 #define lex_tok_PUSH "PUSH"
16 #define lex_tok_POP "POP"
17 #define lex_tok_MOV "MOV"
18 #define lex_tok_JUMP "JUMP"
19 #define lex_tok_CALL "CALL"
20 #define lex_tok_RETURN "RETURN"
21 #define lex_tok_TEST "TEST"
22 #define lex_tok_HALT "HALT"
23 #define lex_tok_AND "AND"
24 #define lex_tok_NAND "NAND"
25 #define lex_tok_OR "OR"
26 #define lex_tok_NOR "NOR"
27 #define lex_tok_XOR "XOR"
28 #define lex_tok_LSL "LSL"
29 #define lex_tok_LSR "LSR"
30 #define lex_tok_NOT "NOT"
31 #define lex_tok_IADD "IADD"
32 #define lex_tok_ISUB "ISUB"
33 #define lex_tok_IMUL "IMUL"
34 #define lex_tok_IDIV "IDIV"
35 #define lex_tok_IASR "IASR"
36 #define lex_tok_FADD "FADD"
37 #define lex_tok_FSUB "FSUB"
38 #define lex_tok_FMUL "FMUL"
39 #define lex_tok_FDIV "FDIV"
40 #define lex_tok_FASR "FASR"
41 #define lex_tok_NOP "NOP"
42 #define lex_tok_SLEEP "SLEEP"
43 #define lex_tok_DATA "DATA"
46 typedef enum asm_lex_opcode_e{
85 typedef union asm_lex_token_value_e{
94 typedef enum asm_lex_token_type_e{
asm_lex_opcode
Definition: asm_lex.h:46
asm_lex_token * asm_lex_input_file(FILE *input, int *errors)
Parses an entire input file into a single lexical token stream.
Definition: asm_lex.c:185
Typedef for the asm lexer token structure.
Definition: asm_lex.h:105
int tim_immediate
typedef for tim immediate values as operands to instructions.
Definition: common.h:76
tim_condition
A condition code for conditional execution.
Definition: common.h:187
tim_immediate immediate
Definition: asm_lex.h:87
asm_lex_label * label
Definition: asm_lex.h:90
asm_lex_token_type type
Definition: asm_lex.h:106
Union to hold the correct value of an instruction.
Definition: asm_lex.h:85
tim_register
Encodes the address of the registers.
Definition: common.h:79
tim_condition condition
Definition: asm_lex.h:88
tim_register reg
Definition: asm_lex.h:86
asm_lex_token_value value
Definition: asm_lex.h:107
char asm_lex_label
Type mask for a character array.
Definition: asm_lex.h:82
asm_lex_token * next
Definition: asm_lex.h:108
asm_lex_opcode opcode
Definition: asm_lex.h:89
unsigned int line_number
Definition: asm_lex.h:109
asm_lex_token_type
The type of token that a lexer token can be.
Definition: asm_lex.h:94