Index: third_party/yasm/patched-yasm/modules/parsers/nasm/nasm-parser.h |
=================================================================== |
--- third_party/yasm/patched-yasm/modules/parsers/nasm/nasm-parser.h (revision 71129) |
+++ third_party/yasm/patched-yasm/modules/parsers/nasm/nasm-parser.h (working copy) |
@@ -1,4 +1,4 @@ |
-/* $Id: nasm-parser.h 2167 2009-01-02 08:36:09Z peter $ |
+/* $Id: nasm-parser.h 2277 2010-01-19 07:03:15Z peter $ |
* NASM-compatible parser header file |
* |
* Copyright (C) 2002-2007 Peter Johnson |
@@ -27,6 +27,8 @@ |
#ifndef YASM_NASM_PARSER_H |
#define YASM_NASM_PARSER_H |
+#include "nasm-parser-struct.h" |
+ |
#define YYCTYPE unsigned char |
#define MAX_SAVED_LINE_LEN 80 |
@@ -55,6 +57,7 @@ |
INSN, |
PREFIX, |
REG, |
+ REGGROUP, |
SEGREG, |
TARGETMOD, |
LEFT_OP, |
@@ -72,69 +75,18 @@ |
NONE /* special token for lookahead */ |
}; |
-typedef union { |
- unsigned int int_info; |
- char *str_val; |
- yasm_intnum *intn; |
- yasm_floatnum *flt; |
- yasm_bytecode *bc; |
- uintptr_t arch_data; |
- struct { |
- char *contents; |
- size_t len; |
- } str; |
-} yystype; |
-#define YYSTYPE yystype |
+enum nasm_parser_state { |
+ INITIAL, |
+ DIRECTIVE, |
+ SECTION_DIRECTIVE, |
+ DIRECTIVE2, |
+ LINECHG, |
+ LINECHG2, |
+ INSTRUCTION |
+}; |
-typedef struct yasm_parser_nasm { |
- int tasm; |
+#define YYSTYPE nasm_yystype |
- /*@only@*/ yasm_object *object; |
- |
- /* last "base" label for local (.) labels */ |
- /*@null@*/ char *locallabel_base; |
- size_t locallabel_base_len; |
- |
- /*@dependent@*/ yasm_preproc *preproc; |
- /*@dependent@*/ yasm_errwarns *errwarns; |
- |
- /*@dependent@*/ yasm_linemap *linemap; |
- |
- /*@null@*/ yasm_bytecode *prev_bc; |
- |
- int save_input; |
- |
- yasm_scanner s; |
- enum { |
- INITIAL, |
- DIRECTIVE, |
- SECTION_DIRECTIVE, |
- DIRECTIVE2, |
- LINECHG, |
- LINECHG2, |
- INSTRUCTION |
- } state; |
- |
- int token; /* enum tokentype or any character */ |
- yystype tokval; |
- char tokch; /* first character of token */ |
- |
- /* one token of lookahead; used sparingly */ |
- int peek_token; /* NONE if none */ |
- yystype peek_tokval; |
- char peek_tokch; |
- |
- /* Starting point of the absolute section. NULL if not in an absolute |
- * section. |
- */ |
- /*@null@*/ yasm_expr *absstart; |
- |
- /* Current location inside an absolute section (including the start). |
- * NULL if not in an absolute section. |
- */ |
- /*@null@*/ yasm_expr *abspos; |
-} yasm_parser_nasm; |
- |
/* shorter access names to commonly used parser_nasm fields */ |
#define p_object (parser_nasm->object) |
#define p_symtab (parser_nasm->object->symtab) |
@@ -153,6 +105,7 @@ |
#define INSN_val (curval.bc) |
#define PREFIX_val (curval.arch_data) |
#define REG_val (curval.arch_data) |
+#define REGGROUP_val (curval.arch_data) |
#define SEGREG_val (curval.arch_data) |
#define TARGETMOD_val (curval.arch_data) |
#define ID_val (curval.str_val) |