Module: wine Branch: master Commit: 58be89230e29689eedb84d5f97710b33f101bd06 URL: http://source.winehq.org/git/wine.git/?a=commit;h=58be89230e29689eedb84d5f97...
Author: Rob Shearman rob@codeweavers.com Date: Thu Apr 24 19:04:14 2008 +0100
widl: Allow NULL to be used in expressions.
---
tools/widl/parser.l | 1 + tools/widl/parser.y | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 4e2a6f4..4ae37ef 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -191,6 +191,7 @@ struct keyword {
static const struct keyword keywords[] = { {"FALSE", tFALSE}, + {"NULL", tNULL}, {"TRUE", tTRUE}, {"__cdecl", tCDECL}, {"__fastcall", tFASTCALL}, diff --git a/tools/widl/parser.y b/tools/widl/parser.y index f514701..0514d9c 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -219,6 +219,7 @@ static void add_explicit_handle_if_necessary(func_t *func); %token tNONBROWSABLE %token tNONCREATABLE %token tNONEXTENSIBLE +%token tNULL %token tOBJECT tODL tOLEAUTOMATION %token tOPTIONAL %token tOUT @@ -624,6 +625,7 @@ expr: aNUM { $$ = make_exprl(EXPR_NUM, $1); } | aHEXNUM { $$ = make_exprl(EXPR_HEXNUM, $1); } | aDOUBLE { $$ = make_exprd(EXPR_DOUBLE, $1); } | tFALSE { $$ = make_exprl(EXPR_TRUEFALSE, 0); } + | tNULL { $$ = make_exprl(EXPR_NUM, 0); } | tTRUE { $$ = make_exprl(EXPR_TRUEFALSE, 1); } | aIDENTIFIER { $$ = make_exprs(EXPR_IDENTIFIER, $1); } | expr '?' expr ':' expr { $$ = make_expr3(EXPR_COND, $1, $3, $5); }