ReactOS 0.4.15-dev-7924-g5949c20
parse.h
Go to the documentation of this file.
1/*
2 * Copyright 2011 Jacek Caban for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#pragma once
20
21typedef enum {
48 EXPR_NOARG, /* not a real expression */
57
58typedef struct _expression_t {
62
63typedef struct {
67
68typedef struct {
72
73typedef struct {
75 double value;
77
78typedef struct {
80 const WCHAR *value;
82
83typedef struct {
87
88typedef struct {
93
94typedef struct {
97 const WCHAR *identifier;
100
101typedef enum {
126
127typedef struct _statement_t {
131
132typedef struct {
137
138typedef struct {
143
144typedef struct _dim_list_t {
145 unsigned val;
148
149typedef struct _dim_decl_t {
150 const WCHAR *name;
152 BOOL is_public; /* Used only for class members. */
156
157typedef struct _dim_statement_t {
161
162typedef struct _arg_decl_t {
163 const WCHAR *name;
167
168typedef struct _function_decl_t {
169 const WCHAR *name;
177
178typedef struct {
182
183typedef struct _class_decl_t {
184 const WCHAR *name;
189
190typedef struct _elseif_decl_t {
195
196typedef struct {
199 statement_t *if_stat;
201 statement_t *else_stat;
203
204typedef struct {
209
210typedef struct {
218
219typedef struct {
225
226typedef struct {
230
231typedef struct _const_decl_t {
232 const WCHAR *name;
236
237typedef struct {
241
242typedef struct _case_clausule_t {
245 struct _case_clausule_t *next;
247
248typedef struct {
253
254typedef struct {
258
259typedef struct {
260 const WCHAR *code;
261 const WCHAR *ptr;
262 const WCHAR *end;
263
268
270 unsigned last_nl;
271
275
278
#define stat
Definition: acwin.h:99
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
short VARIANT_BOOL
Definition: compat.h:2290
expression_type_t
Definition: parser.h:216
statement_type_t
Definition: parser.h:104
void parser_release(parser_ctx_t *) DECLSPEC_HIDDEN
struct _class_decl_t class_decl_t
expression_type_t
Definition: parse.h:21
@ EXPR_MEMBER
Definition: parse.h:42
@ EXPR_LT
Definition: parse.h:39
@ EXPR_NULL
Definition: parse.h:51
@ EXPR_EQV
Definition: parse.h:31
@ EXPR_EXP
Definition: parse.h:32
@ EXPR_BRACKETS
Definition: parse.h:25
@ EXPR_NOTHING
Definition: parse.h:50
@ EXPR_MOD
Definition: parse.h:43
@ EXPR_IDIV
Definition: parse.h:35
@ EXPR_DOUBLE
Definition: parse.h:28
@ EXPR_NEW
Definition: parse.h:47
@ EXPR_IS
Definition: parse.h:38
@ EXPR_EMPTY
Definition: parse.h:29
@ EXPR_EQUAL
Definition: parse.h:30
@ EXPR_IMP
Definition: parse.h:36
@ EXPR_NEG
Definition: parse.h:45
@ EXPR_CONCAT
Definition: parse.h:26
@ EXPR_DIV
Definition: parse.h:27
@ EXPR_ME
Definition: parse.h:41
@ EXPR_ADD
Definition: parse.h:22
@ EXPR_INT
Definition: parse.h:37
@ EXPR_NEQUAL
Definition: parse.h:46
@ EXPR_STRING
Definition: parse.h:53
@ EXPR_NOT
Definition: parse.h:49
@ EXPR_GTEQ
Definition: parse.h:34
@ EXPR_NOARG
Definition: parse.h:48
@ EXPR_BOOL
Definition: parse.h:24
@ EXPR_MUL
Definition: parse.h:44
@ EXPR_LTEQ
Definition: parse.h:40
@ EXPR_OR
Definition: parse.h:52
@ EXPR_SUB
Definition: parse.h:54
@ EXPR_GT
Definition: parse.h:33
@ EXPR_XOR
Definition: parse.h:55
@ EXPR_AND
Definition: parse.h:23
HRESULT parse_script(parser_ctx_t *, const WCHAR *, const WCHAR *, DWORD) DECLSPEC_HIDDEN
struct _arg_decl_t arg_decl_t
struct _dim_decl_t dim_decl_t
struct _dim_statement_t dim_statement_t
struct _dim_list_t dim_list_t
struct _expression_t expression_t
struct _const_decl_t const_decl_t
void * parser_alloc(parser_ctx_t *, size_t) DECLSPEC_HIDDEN
statement_type_t
Definition: parse.h:101
@ STAT_EXITPROP
Definition: parse.h:111
@ STAT_DOUNTIL
Definition: parse.h:106
@ STAT_UNTIL
Definition: parse.h:121
@ STAT_RETVAL
Definition: parse.h:124
@ STAT_ASSIGN
Definition: parse.h:102
@ STAT_CALL
Definition: parse.h:103
@ STAT_STOP
Definition: parse.h:120
@ STAT_EXITDO
Definition: parse.h:108
@ STAT_DIM
Definition: parse.h:105
@ STAT_CONST
Definition: parse.h:104
@ STAT_ONERROR
Definition: parse.h:117
@ STAT_IF
Definition: parse.h:116
@ STAT_FUNC
Definition: parse.h:115
@ STAT_FOREACH
Definition: parse.h:113
@ STAT_EXITSUB
Definition: parse.h:112
@ STAT_EXITFUNC
Definition: parse.h:110
@ STAT_DOWHILE
Definition: parse.h:107
@ STAT_EXITFOR
Definition: parse.h:109
@ STAT_FORTO
Definition: parse.h:114
@ STAT_WHILELOOP
Definition: parse.h:123
@ STAT_SET
Definition: parse.h:119
@ STAT_WHILE
Definition: parse.h:122
@ STAT_SELECT
Definition: parse.h:118
struct _statement_t statement_t
struct _elseif_decl_t elseif_decl_t
struct _function_decl_t function_decl_t
struct _case_clausule_t case_clausule_t
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
long LONG
Definition: pedump.c:60
int parser_lex(void)
struct _arg_decl_t * next
Definition: parse.h:165
BOOL by_ref
Definition: parse.h:164
const WCHAR * name
Definition: parse.h:163
struct _case_clausule_t * next
Definition: parser.h:195
statement_t * stat
Definition: parser.h:193
expression_t * expr
Definition: parser.h:192
const WCHAR * name
Definition: parse.h:184
struct _class_decl_t * next
Definition: parse.h:187
function_decl_t * funcs
Definition: parse.h:185
dim_decl_t * props
Definition: parse.h:186
const WCHAR * name
Definition: parse.h:232
struct _const_decl_t * next
Definition: parse.h:234
expression_t * value_expr
Definition: parse.h:233
struct _dim_decl_t * next
Definition: parse.h:154
const WCHAR * name
Definition: parse.h:150
dim_list_t * dims
Definition: parse.h:153
BOOL is_public
Definition: parse.h:152
BOOL is_array
Definition: parse.h:151
struct _dim_list_t * next
Definition: parse.h:146
unsigned val
Definition: parse.h:145
dim_decl_t * dim_decls
Definition: parse.h:159
statement_t stat
Definition: parse.h:158
statement_t * stat
Definition: parse.h:192
expression_t * expr
Definition: parse.h:191
struct _elseif_decl_t * next
Definition: parse.h:193
expression_type_t type
Definition: parser.h:278
struct _expression_t * next
Definition: parse.h:60
struct _function_decl_t * next_prop_func
Definition: parse.h:175
arg_decl_t * args
Definition: parse.h:172
const WCHAR * name
Definition: parse.h:169
BOOL is_public
Definition: parse.h:171
struct _function_decl_t * next
Definition: parse.h:174
statement_t * body
Definition: parse.h:173
function_type_t type
Definition: parse.h:170
statement_type_t type
Definition: parser.h:124
struct _statement_t * next
Definition: parse.h:129
expression_t * value_expr
Definition: parse.h:141
member_expression_t * member_expr
Definition: parse.h:140
statement_t stat
Definition: parse.h:139
expression_t * left
Definition: parse.h:90
expression_t * right
Definition: parse.h:91
expression_t expr
Definition: parse.h:64
VARIANT_BOOL value
Definition: parse.h:65
BOOL is_strict
Definition: parse.h:135
statement_t stat
Definition: parse.h:133
member_expression_t * expr
Definition: parse.h:134
const_decl_t * decls
Definition: parse.h:239
statement_t stat
Definition: parse.h:238
expression_t expr
Definition: parse.h:74
double value
Definition: parse.h:75
Definition: query.h:87
expression_t * group_expr
Definition: parse.h:222
statement_t stat
Definition: parse.h:220
statement_t * body
Definition: parse.h:223
const WCHAR * identifier
Definition: parse.h:221
statement_t * body
Definition: parse.h:216
expression_t * step_expr
Definition: parse.h:215
expression_t * from_expr
Definition: parse.h:213
statement_t stat
Definition: parse.h:211
expression_t * to_expr
Definition: parse.h:214
const WCHAR * identifier
Definition: parse.h:212
function_decl_t * func_decl
Definition: parse.h:180
statement_t stat
Definition: parse.h:179
elseif_decl_t * elseifs
Definition: parse.h:200
LONG value
Definition: parse.h:70
expression_t expr
Definition: parse.h:69
expression_t * obj_expr
Definition: parse.h:96
expression_t * args
Definition: parse.h:98
statement_t stat
Definition: parse.h:227
BOOL parse_complete
Definition: parse.h:265
int last_token
Definition: parse.h:269
class_decl_t * class_decls
Definition: parse.h:274
const WCHAR * end
Definition: parse.h:262
statement_t * stats
Definition: parse.h:272
const WCHAR * ptr
Definition: parse.h:261
HRESULT hres
Definition: parse.h:267
unsigned last_nl
Definition: parse.h:270
statement_t * stats_tail
Definition: parse.h:273
const WCHAR * code
Definition: parse.h:260
heap_pool_t heap
Definition: parse.h:276
BOOL is_html
Definition: parse.h:266
BOOL option_explicit
Definition: parse.h:264
statement_t stat
Definition: parse.h:255
expression_t * expr
Definition: parse.h:256
case_clausule_t * case_clausules
Definition: parse.h:251
expression_t * expr
Definition: parse.h:250
statement_t stat
Definition: parse.h:249
expression_t expr
Definition: parse.h:79
const WCHAR * value
Definition: parse.h:80
expression_t * subexpr
Definition: parse.h:85
statement_t * body
Definition: parse.h:207
function_type_t
Definition: vbscript.h:307
__wchar_t WCHAR
Definition: xmlstorage.h:180