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
3f98185f
Commit
3f98185f
authored
Aug 01, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Use bison directives instead of defines to specify extra lexer parameters.
parent
ffbe1ca9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
25 deletions
+21
-25
cond.y
dlls/msi/cond.y
+4
-6
query.h
dlls/msi/query.h
+13
-0
sql.y
dlls/msi/sql.y
+4
-19
No files found.
dlls/msi/cond.y
View file @
3f98185f
...
@@ -42,11 +42,6 @@
...
@@ -42,11 +42,6 @@
#
include
"wine/unicode.h"
#
include
"wine/unicode.h"
#
include
"wine/list.h"
#
include
"wine/list.h"
#
define
YYLEX_PARAM
info
#
define
YYPARSE_PARAM
info
static
int
cond_error
(
const
char
*
str
);
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
WINE_DEFAULT_DEBUG_CHANNEL
(
msi
);
typedef
struct
tag_yyinput
typedef
struct
tag_yyinput
...
@@ -66,6 +61,7 @@ struct cond_str {
...
@@ -66,6 +61,7 @@ struct cond_str {
static
LPWSTR
COND_GetString
(
COND_input
*
info
,
const
struct
cond_str
*
str
);
static
LPWSTR
COND_GetString
(
COND_input
*
info
,
const
struct
cond_str
*
str
);
static
LPWSTR
COND_GetLiteral
(
COND_input
*
info
,
const
struct
cond_str
*
str
);
static
LPWSTR
COND_GetLiteral
(
COND_input
*
info
,
const
struct
cond_str
*
str
);
static
int
cond_lex
(
void
*
COND_lval
,
COND_input
*
info
);
static
int
cond_lex
(
void
*
COND_lval
,
COND_input
*
info
);
static
int
cond_error
(
COND_input
*
info
,
const
char
*
str
);
static
void
*
cond_alloc
(
COND_input
*
cond
,
unsigned
int
sz
);
static
void
*
cond_alloc
(
COND_input
*
cond
,
unsigned
int
sz
);
static
void
*
cond_track_mem
(
COND_input
*
cond
,
void
*
ptr
,
unsigned
int
sz
);
static
void
*
cond_track_mem
(
COND_input
*
cond
,
void
*
ptr
,
unsigned
int
sz
);
...
@@ -110,6 +106,8 @@ static BOOL num_from_prop( LPCWSTR p, INT *val )
...
@@ -110,6 +106,8 @@ static BOOL num_from_prop( LPCWSTR p, INT *val )
%}
%}
%
lex
-
param
{
COND_input
*
info
}
%
parse
-
param
{
COND_input
*
info
}
%
pure
-
parser
%
pure
-
parser
%
union
%
union
...
@@ -798,7 +796,7 @@ static void cond_free( void *ptr )
...
@@ -798,7 +796,7 @@ static void cond_free( void *ptr )
}
}
}
}
static
int
cond_error
(
const
char
*
str
)
static
int
cond_error
(
COND_input
*
info
,
const
char
*
str
)
{
{
TRACE
(
"%s
\n
"
,
str
);
TRACE
(
"%s
\n
"
,
str
);
return
0
;
return
0
;
...
...
dlls/msi/query.h
View file @
3f98185f
...
@@ -96,6 +96,19 @@ struct expr
...
@@ -96,6 +96,19 @@ struct expr
}
u
;
}
u
;
};
};
typedef
struct
{
MSIDATABASE
*
db
;
LPCWSTR
command
;
DWORD
n
,
len
;
UINT
r
;
MSIVIEW
**
view
;
/* View structure for the resulting query. This value
* tracks the view currently being created so we can free
* this view on syntax error.
*/
struct
list
*
mem
;
}
SQL_input
;
UINT
MSI_ParseSQL
(
MSIDATABASE
*
db
,
LPCWSTR
command
,
MSIVIEW
**
phview
,
UINT
MSI_ParseSQL
(
MSIDATABASE
*
db
,
LPCWSTR
command
,
MSIVIEW
**
phview
,
struct
list
*
mem
)
DECLSPEC_HIDDEN
;
struct
list
*
mem
)
DECLSPEC_HIDDEN
;
...
...
dlls/msi/sql.y
View file @
3f98185f
...
@@ -34,29 +34,12 @@
...
@@ -34,29 +34,12 @@
#include "wine/debug.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
#define YYLEX_PARAM info
#define YYPARSE_PARAM info
static int sql_error(const char *str);
WINE_DEFAULT_DEBUG_CHANNEL(msi);
WINE_DEFAULT_DEBUG_CHANNEL(msi);
typedef struct tag_SQL_input
{
MSIDATABASE *db;
LPCWSTR command;
DWORD n, len;
UINT r;
MSIVIEW **view; /* View structure for the resulting query. This value
* tracks the view currently being created so we can free
* this view on syntax error.
*/
struct list *mem;
} SQL_input;
static UINT SQL_getstring( void *info, const struct sql_str *strdata, LPWSTR *str );
static UINT SQL_getstring( void *info, const struct sql_str *strdata, LPWSTR *str );
static INT SQL_getint( void *info );
static INT SQL_getint( void *info );
static int sql_lex( void *SQL_lval, SQL_input *info );
static int sql_lex( void *SQL_lval, SQL_input *info );
static int sql_error( SQL_input *info, const char *str);
static LPWSTR parser_add_table( void *info, LPCWSTR list, LPCWSTR table );
static LPWSTR parser_add_table( void *info, LPCWSTR list, LPCWSTR table );
static void *parser_alloc( void *info, unsigned int sz );
static void *parser_alloc( void *info, unsigned int sz );
...
@@ -77,6 +60,8 @@ static struct expr * EXPR_wildcard( void *info );
...
@@ -77,6 +60,8 @@ static struct expr * EXPR_wildcard( void *info );
%}
%}
%lex-param { SQL_input *info }
%parse-param { SQL_input *info }
%pure-parser
%pure-parser
%union
%union
...
@@ -866,7 +851,7 @@ INT SQL_getint( void *info )
...
@@ -866,7 +851,7 @@ INT SQL_getint( void *info )
return r;
return r;
}
}
static int sql_error( const char *str )
static int sql_error(
SQL_input *info,
const char *str )
{
{
return 0;
return 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