4 * mem is responsible for creating and maintaining the overall system memory
5 * map, as visible from the SH4 processor. (Note the ARM has a different map)
7 * Copyright (c) 2005 Nathan Keynes.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
20 #ifndef lxdream_gendec_H
21 #define lxdream_gendec_H 1
29 #define MAX_OPERAND_NAME 8
30 #define MAX_OPERANDS 4
31 #define MAX_OPERATION_FORMAT 64
37 #define USE_READWRITE 3
45 char name[MAX_OPERAND_NAME+1];
54 struct operand operands[MAX_OPERANDS];
55 char format[MAX_OPERATION_FORMAT+1];
60 struct rule *rules[MAX_RULES];
63 struct ruleset *parse_ruleset_file( FILE *f );
64 void dump_ruleset( struct ruleset *rules, FILE *f );
65 void dump_rulesubset( struct ruleset *rules, int ruleidx[], int rule_count, FILE *f );
73 typedef struct actionfile *actionfile_t;
75 typedef struct actiontoken {
76 enum { NONE, TEXT, ACTIONS, END, ERROR } symbol;
80 struct action actions[MAX_RULES];
83 actionfile_t action_file_open( const char *filename, struct ruleset *rules );
85 actiontoken_t action_file_next( actionfile_t af );
87 void action_file_close( actionfile_t af );
93 #endif /* !lxdream_gendec_H */
.