summaryrefslogtreecommitdiff
path: root/eval.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2002-04-30 20:52:49 +0000
committerH. Peter Anvin <hpa@zytor.com>2002-04-30 20:52:49 +0000
commit76690a12ad212d1f77cd1f71d7ac5a9de6eaefb6 (patch)
tree6d1fe5322184b3e53a9378ce65f6a95f05b59f28 /eval.h
parent6768eb71d8debde65562619c938b997aea1bd9f9 (diff)
downloadnasm-76690a12ad212d1f77cd1f71d7ac5a9de6eaefb6.tar.gz
NASM 0.96nasm-0.96
Diffstat (limited to 'eval.h')
-rw-r--r--eval.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/eval.h b/eval.h
new file mode 100644
index 00000000..26bde15a
--- /dev/null
+++ b/eval.h
@@ -0,0 +1,34 @@
+/* eval.h header file for eval.c
+ *
+ * The Netwide Assembler is copyright (C) 1996 Simon Tatham and
+ * Julian Hall. All rights reserved. The software is
+ * redistributable under the licence given in the file "Licence"
+ * distributed in the NASM archive.
+ */
+
+#ifndef NASM_EVAL_H
+#define NASM_EVAL_H
+
+/*
+ * Called once to tell the evaluator what output format is
+ * providing segment-base details, and what function can be used to
+ * look labels up.
+ */
+void eval_global_info (struct ofmt *output, lfunc lookup_label);
+
+/*
+ * Called to set the information the evaluator needs: the value of
+ * $ is set from `segment' and `offset' if `labelname' is NULL, and
+ * otherwise the name of the current line's label is set from
+ * `labelname' instead.
+ */
+void eval_info (char *labelname, long segment, long offset);
+
+/*
+ * The evaluator itself.
+ */
+expr *evaluate (scanner sc, void *scprivate, struct tokenval *tv,
+ int *fwref, int critical, efunc report_error,
+ struct eval_hints *hints);
+
+#endif