summaryrefslogtreecommitdiff
path: root/tools/coder.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/coder.h')
-rw-r--r--tools/coder.h53
1 files changed, 10 insertions, 43 deletions
diff --git a/tools/coder.h b/tools/coder.h
index c96f787..e72764c 100644
--- a/tools/coder.h
+++ b/tools/coder.h
@@ -28,6 +28,10 @@
#include <stdbool.h>
+#include "pproc.h"
+#include "spec.h"
+
+
/* Suivi des constructions */
typedef struct _rented_coder rented_coder;
@@ -55,11 +59,8 @@ void set_coder_arch(rented_coder *, const char *);
/* Définit la base des protections des fichiers d'en-tête. */
void set_coder_header_base(rented_coder *, const char *);
-/* Enregistre une correspondance en matière d'encodage. */
-void register_encoding_in_coder(rented_coder *, const char *, const char *);
-
-/* Constitue la matière d'un système de macros. */
-void define_macro_for_coder(rented_coder *, const char *, const char *);
+/* Fournit le pré-processeur du compilateur. */
+pre_processor *get_coder_pre_proc(const rented_coder *);
/* Enregistre les contours d'une instruction d'assemblage. */
void save_notes_for_coder(rented_coder *, char *, char *, const char *);
@@ -69,6 +70,8 @@ void save_notes_for_coder(rented_coder *, char *, char *, const char *);
/* --------------------------- REPRESENTATION D'ENCODAGES --------------------------- */
+/* Fournit un lien vers les spécifications courantes. */
+encoding_spec *get_current_encoding_spec(const rented_coder *);
/* Enregistre une définition supplémentaire. */
void push_encoding_spec(rented_coder *, char *, unsigned int);
@@ -85,7 +88,7 @@ void register_named_field_in_coder(rented_coder *, char *, unsigned int);
void register_bit_in_coder(rented_coder *, int);
/* Indique le nombre de bits traités. */
-unsigned int count_coder_bits(const rented_coder *);
+//unsigned int count_coder_bits(const rented_coder *);
@@ -101,49 +104,13 @@ void register_syntax_item_in_coder(rented_coder *, char *, bool);
/* Enregistre la function de conversion du brut à l'utile. */
-void register_conversion_in_coder(rented_coder *, char *, char *, char *);
+void register_conversion_in_coder(rented_coder *, conv_func *);
/* --------------------------- CONDITIONS ET CONSEQUENCES --------------------------- */
-/* Types de comparaison */
-typedef enum _CondCompType
-{
- CCT_EQUAL, /* Egalité '==' */
- CCT_DIFF /* Différence '!=' */
-
-} CondCompType;
-
-/* Types de combinaison d'expressions */
-typedef enum _CondOpType
-{
- COT_AND, /* Combinaison ET ('&&') */
- COT_OR /* Combinaison OU ('||') */
-
-} CondOpType;
-
-/* Conséquence en cas de condition remplie */
-typedef enum _CondActionType
-{
- CAT_SEE /* Renvoi vers une instruction */
-
-} CondActionType;
-
-
-/* Expression d'une condition */
-typedef struct _cond_expr cond_expr;
-
-
-/* Crée une expression conditionnelle simple. */
-cond_expr *build_simple_cond_expression(char *, CondCompType, char *);
-
-/* Crée une expression conditionnelle composée. */
-cond_expr *build_composed_cond_expression(cond_expr *, CondOpType, cond_expr *);
-
-/* Ajoute une règle complète à la définition d'un codage. */
-void add_conditional_rule_to_coder(rented_coder *, cond_expr *, CondActionType, const char *);