* Test case for PR 18452.
[binutils-gdb.git] / sim / igen / table.h
blob6b3f6e7889af7fed8c4b62d903fe616f960356b2
1 /* This file is part of the program psim.
3 Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 /* load a table into memory */
24 typedef struct _table table;
26 typedef struct _table_model_entry table_model_entry;
27 struct _table_model_entry {
28 table_model_entry *next;
29 int line_nr;
30 int nr_fields;
31 char *fields[0]; /* User defined */
34 typedef struct _table_assembler_entry table_assembler_entry;
35 struct _table_assembler_entry {
36 const char *format;
37 const char *condition;
38 const char *file_name;
39 int line_nr;
40 table_assembler_entry *next;
43 typedef struct _table_entry table_entry;
44 struct _table_entry {
45 int line_nr;
46 int nr_fields;
47 char *file_name;
48 table_assembler_entry *assembler;
49 table_model_entry *model_first;
50 table_model_entry *model_last;
51 char *annex;
52 char *fields[0]; /* User defined */
56 extern table *table_open
57 (const char *file_name,
58 int max_nr_fields,
59 int max_nr_model_fields);
61 extern table_entry *table_entry_read
62 (table *file);
64 extern void dump_table_entry
65 (table_entry *entry,
66 int indent);
68 extern void table_entry_print_cpp_line_nr
69 (lf *file,
70 table_entry *entry);