H. Peter Anvin | 9e6747c | 2009-06-28 17:13:04 -0700 | [diff] [blame^] | 1 | /* ----------------------------------------------------------------------- * |
| 2 | * |
| 3 | * Copyright 1996-2009 The NASM Authors - All Rights Reserved |
| 4 | * See the file AUTHORS included with the NASM distribution for |
| 5 | * the specific copyright holders. |
H. Peter Anvin | 76690a1 | 2002-04-30 20:52:49 +0000 | [diff] [blame] | 6 | * |
H. Peter Anvin | 9e6747c | 2009-06-28 17:13:04 -0700 | [diff] [blame^] | 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU Lesser General Public License as |
| 9 | * published by the Free Software Foundation, Inc., |
| 10 | * 51 Franklin St, Fifth Floor, Boston MA 02110-1301, USA; version 2.1, |
| 11 | * or, at your option, any later version, incorporated herein by |
| 12 | * reference. |
| 13 | * |
| 14 | * Patches submitted to this file are required to be dual licensed |
| 15 | * under the LGPL 2.1+ and the 2-clause BSD license: |
| 16 | * |
| 17 | * Copyright 1996-2009 the NASM Authors - All rights reserved. |
| 18 | * |
| 19 | * Redistribution and use in source and binary forms, with or without |
| 20 | * modification, are permitted provided that the following |
| 21 | * conditions are met: |
| 22 | * |
| 23 | * * Redistributions of source code must retain the above copyright |
| 24 | * notice, this list of conditions and the following disclaimer. |
| 25 | * * Redistributions in binary form must reproduce the above |
| 26 | * copyright notice, this list of conditions and the following |
| 27 | * disclaimer in the documentation and/or other materials provided |
| 28 | * with the distribution. |
| 29 | * |
| 30 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
| 31 | * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, |
| 32 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
| 33 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 34 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR |
| 35 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 36 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 37 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 38 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 39 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 40 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 41 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
| 42 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 43 | * |
| 44 | * ----------------------------------------------------------------------- */ |
| 45 | |
| 46 | /* |
| 47 | * eval.h header file for eval.c |
H. Peter Anvin | 76690a1 | 2002-04-30 20:52:49 +0000 | [diff] [blame] | 48 | */ |
| 49 | |
| 50 | #ifndef NASM_EVAL_H |
| 51 | #define NASM_EVAL_H |
| 52 | |
| 53 | /* |
| 54 | * Called once to tell the evaluator what output format is |
| 55 | * providing segment-base details, and what function can be used to |
| 56 | * look labels up. |
| 57 | */ |
H. Peter Anvin | e2c8018 | 2005-01-15 22:15:51 +0000 | [diff] [blame] | 58 | void eval_global_info(struct ofmt *output, lfunc lookup_label, |
H. Peter Anvin | 12e4651 | 2007-10-03 21:30:57 -0700 | [diff] [blame] | 59 | struct location * locp); |
H. Peter Anvin | 76690a1 | 2002-04-30 20:52:49 +0000 | [diff] [blame] | 60 | |
| 61 | /* |
| 62 | * The evaluator itself. |
| 63 | */ |
H. Peter Anvin | e2c8018 | 2005-01-15 22:15:51 +0000 | [diff] [blame] | 64 | expr *evaluate(scanner sc, void *scprivate, struct tokenval *tv, |
| 65 | int *fwref, int critical, efunc report_error, |
| 66 | struct eval_hints *hints); |
H. Peter Anvin | 76690a1 | 2002-04-30 20:52:49 +0000 | [diff] [blame] | 67 | |
H. Peter Anvin | eba20a7 | 2002-04-30 20:53:55 +0000 | [diff] [blame] | 68 | void eval_cleanup(void); |
| 69 | |
H. Peter Anvin | 76690a1 | 2002-04-30 20:52:49 +0000 | [diff] [blame] | 70 | #endif |