diff options
author | Peter Johnson <peter@tortall.net> | 2002-08-09 05:43:03 +0000 |
---|---|---|
committer | Peter Johnson <peter@tortall.net> | 2002-08-09 05:43:03 +0000 |
commit | 3320945f957c183c88ebff3954f914e992a329c1 (patch) | |
tree | 68b138ae74f3b327b5ce6fc010745f50eed4c09e /libyasm/expr.h | |
parent | 00497afd8f656f75eb88c37290f551e45810f4f4 (diff) | |
download | yasm-3320945f957c183c88ebff3954f914e992a329c1.tar.gz |
Massive restructuring of lexing and parsing (NASM-compatible parser).
Bugzilla Bug#3. Not all instructions are parsed yet, so this is actually a
minor feature regression from the user side, but this commit lays the framework
for much easier additions of new assembler syntaxes and architectures. The
re2c tool is now used to generate the lexers, as it's much more flexibly
function-oriented than lex.
- nasm-bison.y is a repocopy+modify of nasm/bison.y.in.
- x86arch.h now includes all of x86-int.h
svn path=/trunk/yasm/; revision=670
Diffstat (limited to 'libyasm/expr.h')
-rw-r--r-- | libyasm/expr.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libyasm/expr.h b/libyasm/expr.h index fb97248b..4521286c 100644 --- a/libyasm/expr.h +++ b/libyasm/expr.h @@ -31,7 +31,7 @@ typedef struct ExprItem ExprItem; /*@only@*/ ExprItem *ExprExpr(/*@keep@*/ expr *); /*@only@*/ ExprItem *ExprInt(/*@keep@*/ intnum *); /*@only@*/ ExprItem *ExprFloat(/*@keep@*/ floatnum *); -/*@only@*/ ExprItem *ExprReg(unsigned char reg, unsigned char size); +/*@only@*/ ExprItem *ExprReg(unsigned long reg); #define expr_new_tree(l,o,r) \ expr_new ((o), ExprExpr(l), ExprExpr(r)) @@ -79,6 +79,13 @@ void expr_expand_labelequ(expr *e, const section *srcsect, int withstart, /*@dependent@*/ /*@null@*/ const symrec *expr_get_symrec(expr **ep, int simplify); +/* Gets the register value of e if the expression is just a register. If the + * expression is more complex, returns NULL. Simplifies the expr first if + * simplify is nonzero. + */ +/*@dependent@*/ /*@null@*/ const unsigned long *expr_get_reg(expr **ep, + int simplify); + void expr_print(FILE *f, /*@null@*/ const expr *); #endif |