Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
beef0956
Commit
beef0956
authored
Sep 19, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vbscript: Added more equality expressions parser/compiler implementation.
parent
c2feafb9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
0 deletions
+44
-0
compile.c
dlls/vbscript/compile.c
+8
-0
interp.c
dlls/vbscript/interp.c
+24
-0
parse.h
dlls/vbscript/parse.h
+4
-0
parser.y
dlls/vbscript/parser.y
+4
-0
vbscript.h
dlls/vbscript/vbscript.h
+4
-0
No files found.
dlls/vbscript/compile.c
View file @
beef0956
...
@@ -381,10 +381,18 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
...
@@ -381,10 +381,18 @@ static HRESULT compile_expression(compile_ctx_t *ctx, expression_t *expr)
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_eqv
);
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_eqv
);
case
EXPR_EXP
:
case
EXPR_EXP
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_exp
);
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_exp
);
case
EXPR_GT
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_gt
);
case
EXPR_GTEQ
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_gteq
);
case
EXPR_IDIV
:
case
EXPR_IDIV
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_idiv
);
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_idiv
);
case
EXPR_IMP
:
case
EXPR_IMP
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_imp
);
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_imp
);
case
EXPR_LT
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_lt
);
case
EXPR_LTEQ
:
return
compile_binary_expression
(
ctx
,
(
binary_expression_t
*
)
expr
,
OP_lteq
);
case
EXPR_MEMBER
:
case
EXPR_MEMBER
:
return
compile_member_expression
(
ctx
,
(
member_expression_t
*
)
expr
,
TRUE
);
return
compile_member_expression
(
ctx
,
(
member_expression_t
*
)
expr
,
TRUE
);
case
EXPR_MOD
:
case
EXPR_MOD
:
...
...
dlls/vbscript/interp.c
View file @
beef0956
...
@@ -941,6 +941,30 @@ static HRESULT interp_nequal(exec_ctx_t *ctx)
...
@@ -941,6 +941,30 @@ static HRESULT interp_nequal(exec_ctx_t *ctx)
return
stack_push
(
ctx
,
&
v
);
return
stack_push
(
ctx
,
&
v
);
}
}
static
HRESULT
interp_gt
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
interp_gteq
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
interp_lt
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
interp_lteq
(
exec_ctx_t
*
ctx
)
{
FIXME
(
"
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
interp_concat
(
exec_ctx_t
*
ctx
)
static
HRESULT
interp_concat
(
exec_ctx_t
*
ctx
)
{
{
variant_val_t
r
,
l
;
variant_val_t
r
,
l
;
...
...
dlls/vbscript/parse.h
View file @
beef0956
...
@@ -27,8 +27,12 @@ typedef enum {
...
@@ -27,8 +27,12 @@ typedef enum {
EXPR_EQUAL
,
EXPR_EQUAL
,
EXPR_EQV
,
EXPR_EQV
,
EXPR_EXP
,
EXPR_EXP
,
EXPR_GT
,
EXPR_GTEQ
,
EXPR_IDIV
,
EXPR_IDIV
,
EXPR_IMP
,
EXPR_IMP
,
EXPR_LT
,
EXPR_LTEQ
,
EXPR_MEMBER
,
EXPR_MEMBER
,
EXPR_MOD
,
EXPR_MOD
,
EXPR_MUL
,
EXPR_MUL
,
...
...
dlls/vbscript/parser.y
View file @
beef0956
...
@@ -248,6 +248,10 @@ EqualityExpression
...
@@ -248,6 +248,10 @@ EqualityExpression
: ConcatExpression { $$ = $1; }
: ConcatExpression { $$ = $1; }
| EqualityExpression '=' ConcatExpression { $$ = new_binary_expression(ctx, EXPR_EQUAL, $1, $3); CHECK_ERROR; }
| EqualityExpression '=' ConcatExpression { $$ = new_binary_expression(ctx, EXPR_EQUAL, $1, $3); CHECK_ERROR; }
| EqualityExpression tNEQ ConcatExpression { $$ = new_binary_expression(ctx, EXPR_NEQUAL, $1, $3); CHECK_ERROR; }
| EqualityExpression tNEQ ConcatExpression { $$ = new_binary_expression(ctx, EXPR_NEQUAL, $1, $3); CHECK_ERROR; }
| EqualityExpression '>' ConcatExpression { $$ = new_binary_expression(ctx, EXPR_GT, $1, $3); CHECK_ERROR; }
| EqualityExpression '<' ConcatExpression { $$ = new_binary_expression(ctx, EXPR_LT, $1, $3); CHECK_ERROR; }
| EqualityExpression tGTEQ ConcatExpression { $$ = new_binary_expression(ctx, EXPR_GTEQ, $1, $3); CHECK_ERROR; }
| EqualityExpression tLTEQ ConcatExpression { $$ = new_binary_expression(ctx, EXPR_LTEQ, $1, $3); CHECK_ERROR; }
ConcatExpression
ConcatExpression
: AdditiveExpression { $$ = $1; }
: AdditiveExpression { $$ = $1; }
...
...
dlls/vbscript/vbscript.h
View file @
beef0956
...
@@ -161,6 +161,8 @@ typedef enum {
...
@@ -161,6 +161,8 @@ typedef enum {
X(equal, 1, 0, 0) \
X(equal, 1, 0, 0) \
X(eqv, 1, 0, 0) \
X(eqv, 1, 0, 0) \
X(exp, 1, 0, 0) \
X(exp, 1, 0, 0) \
X(gt, 1, 0, 0) \
X(gteq, 1, 0, 0) \
X(icall, 1, ARG_BSTR, ARG_UINT) \
X(icall, 1, ARG_BSTR, ARG_UINT) \
X(icallv, 1, ARG_BSTR, ARG_UINT) \
X(icallv, 1, ARG_BSTR, ARG_UINT) \
X(idiv, 1, 0, 0) \
X(idiv, 1, 0, 0) \
...
@@ -169,6 +171,8 @@ typedef enum {
...
@@ -169,6 +171,8 @@ typedef enum {
X(jmp_false, 0, ARG_ADDR, 0) \
X(jmp_false, 0, ARG_ADDR, 0) \
X(jmp_true, 0, ARG_ADDR, 0) \
X(jmp_true, 0, ARG_ADDR, 0) \
X(long, 1, ARG_INT, 0) \
X(long, 1, ARG_INT, 0) \
X(lt, 1, 0, 0) \
X(lteq, 1, 0, 0) \
X(mcall, 1, ARG_BSTR, ARG_UINT) \
X(mcall, 1, ARG_BSTR, ARG_UINT) \
X(mcallv, 1, ARG_BSTR, ARG_UINT) \
X(mcallv, 1, ARG_BSTR, ARG_UINT) \
X(mod, 1, 0, 0) \
X(mod, 1, 0, 0) \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment