summaryrefslogtreecommitdiff
path: root/tools/d2c/syntax.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2014-12-04 22:59:30 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2014-12-04 22:59:30 (GMT)
commit12154652c576144405011b5bd267c15c9667f223 (patch)
treebe552b2b7bc563a58892e8950afd920a45132a6e /tools/d2c/syntax.h
parent6803c5d5b86416d1748d4d37a5cc5cb44fe007b1 (diff)
Provided a new way to build the full name of each instruction and cached it.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@435 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'tools/d2c/syntax.h')
-rw-r--r--tools/d2c/syntax.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/tools/d2c/syntax.h b/tools/d2c/syntax.h
index 0cd9210..fc7cc6b 100644
--- a/tools/d2c/syntax.h
+++ b/tools/d2c/syntax.h
@@ -34,6 +34,15 @@
+/* Type d'éléments de syntaxe */
+typedef enum _SyntaxItemType
+{
+ SIT_KEYWORD, /* Elément de l'instruction */
+ SIT_INT_OPERAND, /* Propriété d'architecture */
+ SIT_EXT_OPERAND /* Opérande généraliste */
+
+} SyntaxItemType;
+
/* Syntaxe d'une ligne d'assembleur */
typedef struct _asm_syntax asm_syntax;
@@ -45,7 +54,7 @@ asm_syntax *create_asm_syntax(void);
void delete_asm_syntax(asm_syntax *);
/* Enregistre la présence d'un nouvel opérande dans la syntaxe. */
-void register_syntax_item(asm_syntax *, char *, bool);
+void register_syntax_item(asm_syntax *, char *, SyntaxItemType);
/* Marque les champs de bits effectivement utilisés. */
bool mark_syntax_items(const asm_syntax *, const coding_bits *, const conv_list *);
@@ -53,6 +62,9 @@ bool mark_syntax_items(const asm_syntax *, const coding_bits *, const conv_list
/* Déclare les variables C associées aux opérandes de syntaxe. */
bool declare_syntax_items(const asm_syntax *, int, const coding_bits *, const conv_list *, unsigned int);
+/* Fournit si elle existe un nom nouveau pour une instruction. */
+const char *get_new_keyword_from_syntax_items(const asm_syntax *);
+
/* Définit les variables C associées aux opérandes de syntaxe. */
bool define_syntax_items(const asm_syntax *, int, const char *, const coding_bits *, const conv_list *, const pre_processor *);