]> git.saurik.com Git - apple/boot.git/blob - i386/nasm/eval.h
boot-111.tar.gz
[apple/boot.git] / i386 / nasm / eval.h
1 /*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /* eval.h header file for eval.c
26 *
27 * The Netwide Assembler is copyright (C) 1996 Simon Tatham and
28 * Julian Hall. All rights reserved. The software is
29 * redistributable under the licence given in the file "Licence"
30 * distributed in the NASM archive.
31 */
32
33 #ifndef NASM_EVAL_H
34 #define NASM_EVAL_H
35
36 /*
37 * Called once to tell the evaluator what output format is
38 * providing segment-base details, and what function can be used to
39 * look labels up.
40 */
41 void eval_global_info (struct ofmt *output, lfunc lookup_label);
42
43 /*
44 * Called to set the information the evaluator needs: the value of
45 * $ is set from `segment' and `offset' if `labelname' is NULL, and
46 * otherwise the name of the current line's label is set from
47 * `labelname' instead.
48 */
49 void eval_info (char *labelname, long segment, long offset);
50
51 /*
52 * The evaluator itself.
53 */
54 expr *evaluate (scanner sc, void *scprivate, struct tokenval *tv,
55 int *fwref, int critical, efunc report_error,
56 struct eval_hints *hints);
57
58 #endif