ReactOS 0.4.17-dev-357-ga8f14ff
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 {
51 EXPR_NOARG, /* not a real expression */
60
61typedef struct _expression_t {
65
66typedef struct {
70
71typedef struct {
75
76typedef struct {
80
81typedef struct {
83 double value;
85
86typedef struct {
88 const WCHAR *value;
90
91typedef struct {
95
96typedef struct {
101
102typedef struct {
105 const WCHAR *identifier;
107
108typedef struct {
113
114typedef enum {
141
142typedef struct _statement_t {
144 unsigned loc;
147
148typedef struct {
152
153typedef struct {
158
159typedef struct _dim_list_t {
160 unsigned val;
163
164typedef struct _dim_decl_t {
165 const WCHAR *name;
167 BOOL is_public; /* Used only for class members. */
171
172typedef struct _dim_statement_t {
176
177typedef struct _redim_decl_t {
182
183typedef struct {
188
189typedef struct _arg_decl_t {
190 const WCHAR *name;
194
195typedef struct _function_decl_t {
196 const WCHAR *name;
205
206typedef struct {
210
211typedef struct _class_decl_t {
212 const WCHAR *name;
217
218typedef struct _elseif_decl_t {
221 unsigned loc;
224
225typedef struct {
228 statement_t *if_stat;
230 statement_t *else_stat;
232
233typedef struct {
238
239typedef struct {
247
248typedef struct {
254
255typedef struct {
259
260typedef struct _const_decl_t {
261 const WCHAR *name;
265
266typedef struct {
270
271typedef struct _case_clausule_t {
274 struct _case_clausule_t *next;
276
277typedef struct {
282
283typedef struct {
288
289typedef struct {
293
294typedef struct {
295 const WCHAR *code;
296 const WCHAR *ptr;
297 const WCHAR *end;
298
304
306 unsigned last_nl;
307
311
314
317int parser_lex(void*,unsigned*,parser_ctx_t*);
#define stat
Definition: acwin.h:100
double DATE
Definition: compat.h:2253
short VARIANT_BOOL
Definition: compat.h:2290
expression_type_t
Definition: parser.h:227
statement_type_t
Definition: parser.h:108
struct _redim_decl_t redim_decl_t
struct _class_decl_t class_decl_t
expression_type_t
Definition: parse.h:21
@ EXPR_MEMBER
Definition: parse.h:45
@ EXPR_LT
Definition: parse.h:42
@ EXPR_NULL
Definition: parse.h:54
@ EXPR_EQV
Definition: parse.h:34
@ EXPR_DATE
Definition: parse.h:28
@ EXPR_EXP
Definition: parse.h:35
@ EXPR_BRACKETS
Definition: parse.h:25
@ EXPR_NOTHING
Definition: parse.h:53
@ EXPR_MOD
Definition: parse.h:46
@ EXPR_IDIV
Definition: parse.h:38
@ EXPR_DOUBLE
Definition: parse.h:31
@ EXPR_NEW
Definition: parse.h:50
@ EXPR_IS
Definition: parse.h:41
@ EXPR_EMPTY
Definition: parse.h:32
@ EXPR_EQUAL
Definition: parse.h:33
@ EXPR_CALL
Definition: parse.h:26
@ EXPR_IMP
Definition: parse.h:39
@ EXPR_NEG
Definition: parse.h:48
@ EXPR_CONCAT
Definition: parse.h:27
@ EXPR_DIV
Definition: parse.h:29
@ EXPR_ME
Definition: parse.h:44
@ EXPR_ADD
Definition: parse.h:22
@ EXPR_INT
Definition: parse.h:40
@ EXPR_NEQUAL
Definition: parse.h:49
@ EXPR_STRING
Definition: parse.h:56
@ EXPR_NOT
Definition: parse.h:52
@ EXPR_GTEQ
Definition: parse.h:37
@ EXPR_NOARG
Definition: parse.h:51
@ EXPR_BOOL
Definition: parse.h:24
@ EXPR_MUL
Definition: parse.h:47
@ EXPR_LTEQ
Definition: parse.h:43
@ EXPR_OR
Definition: parse.h:55
@ EXPR_DOT
Definition: parse.h:30
@ EXPR_SUB
Definition: parse.h:57
@ EXPR_GT
Definition: parse.h:36
@ EXPR_XOR
Definition: parse.h:58
@ EXPR_AND
Definition: parse.h:23
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
void parser_release(parser_ctx_t *)
struct _expression_t expression_t
struct _const_decl_t const_decl_t
statement_type_t
Definition: parse.h:114
@ STAT_EXITPROP
Definition: parse.h:124
@ STAT_DOUNTIL
Definition: parse.h:119
@ STAT_UNTIL
Definition: parse.h:135
@ STAT_RETVAL
Definition: parse.h:139
@ STAT_REDIM
Definition: parse.h:131
@ STAT_ASSIGN
Definition: parse.h:115
@ STAT_CALL
Definition: parse.h:116
@ STAT_STOP
Definition: parse.h:134
@ STAT_EXITDO
Definition: parse.h:121
@ STAT_DIM
Definition: parse.h:118
@ STAT_CONST
Definition: parse.h:117
@ STAT_ONERROR
Definition: parse.h:130
@ STAT_WITH
Definition: parse.h:138
@ STAT_IF
Definition: parse.h:129
@ STAT_FUNC
Definition: parse.h:128
@ STAT_FOREACH
Definition: parse.h:126
@ STAT_EXITSUB
Definition: parse.h:125
@ STAT_EXITFUNC
Definition: parse.h:123
@ STAT_DOWHILE
Definition: parse.h:120
@ STAT_EXITFOR
Definition: parse.h:122
@ STAT_FORTO
Definition: parse.h:127
@ STAT_WHILELOOP
Definition: parse.h:137
@ STAT_SET
Definition: parse.h:133
@ STAT_WHILE
Definition: parse.h:136
@ STAT_SELECT
Definition: parse.h:132
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
void * parser_alloc(parser_ctx_t *, size_t)
int parser_lex(void *, unsigned *, parser_ctx_t *)
Definition: lex.c:1102
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define parse_script(p, s)
Definition: activex.c:681
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
DWORD LCID
Definition: nls.h:13
struct _arg_decl_t * next
Definition: parse.h:192
BOOL by_ref
Definition: parse.h:191
const WCHAR * name
Definition: parse.h:190
struct _case_clausule_t * next
Definition: parser.h:205
statement_t * stat
Definition: parser.h:203
expression_t * expr
Definition: parser.h:201
const WCHAR * name
Definition: parse.h:212
struct _class_decl_t * next
Definition: parse.h:215
function_decl_t * funcs
Definition: parse.h:213
dim_decl_t * props
Definition: parse.h:214
const WCHAR * name
Definition: parse.h:261
struct _const_decl_t * next
Definition: parse.h:263
expression_t * value_expr
Definition: parse.h:262
struct _dim_decl_t * next
Definition: parse.h:169
const WCHAR * name
Definition: parse.h:165
dim_list_t * dims
Definition: parse.h:168
BOOL is_public
Definition: parse.h:167
BOOL is_array
Definition: parse.h:166
struct _dim_list_t * next
Definition: parse.h:161
unsigned val
Definition: parse.h:160
dim_decl_t * dim_decls
Definition: parse.h:174
statement_t stat
Definition: parse.h:173
statement_t * stat
Definition: parse.h:220
expression_t * expr
Definition: parse.h:219
unsigned loc
Definition: parse.h:221
struct _elseif_decl_t * next
Definition: parse.h:222
expression_type_t type
Definition: parser.h:289
struct _expression_t * next
Definition: parse.h:63
struct _function_decl_t * next_prop_func
Definition: parse.h:203
arg_decl_t * args
Definition: parse.h:200
const WCHAR * name
Definition: parse.h:196
BOOL is_default
Definition: parse.h:199
BOOL is_public
Definition: parse.h:198
struct _function_decl_t * next
Definition: parse.h:202
statement_t * body
Definition: parse.h:201
function_type_t type
Definition: parse.h:197
struct _redim_decl_t * next
Definition: parse.h:180
expression_t * dims
Definition: parse.h:179
const WCHAR * identifier
Definition: parse.h:178
statement_type_t type
Definition: parser.h:128
struct _statement_t * next
Definition: parse.h:145
unsigned loc
Definition: parser.h:130
expression_t * value_expr
Definition: parse.h:156
expression_t * left_expr
Definition: parse.h:155
statement_t stat
Definition: parse.h:154
expression_t * left
Definition: parse.h:98
expression_t * right
Definition: parse.h:99
expression_t expr
Definition: parse.h:67
VARIANT_BOOL value
Definition: parse.h:68
expression_t * call_expr
Definition: parse.h:110
expression_t * args
Definition: parse.h:111
statement_t stat
Definition: parse.h:149
call_expression_t * expr
Definition: parse.h:150
const_decl_t * decls
Definition: parse.h:268
statement_t stat
Definition: parse.h:267
expression_t expr
Definition: parse.h:77
expression_t expr
Definition: parse.h:82
double value
Definition: parse.h:83
Definition: query.h:86
expression_t * group_expr
Definition: parse.h:251
statement_t stat
Definition: parse.h:249
statement_t * body
Definition: parse.h:252
const WCHAR * identifier
Definition: parse.h:250
statement_t * body
Definition: parse.h:245
expression_t * step_expr
Definition: parse.h:244
expression_t * from_expr
Definition: parse.h:242
statement_t stat
Definition: parse.h:240
expression_t * to_expr
Definition: parse.h:243
const WCHAR * identifier
Definition: parse.h:241
function_decl_t * func_decl
Definition: parse.h:208
statement_t stat
Definition: parse.h:207
elseif_decl_t * elseifs
Definition: parse.h:229
LONG value
Definition: parse.h:73
expression_t expr
Definition: parse.h:72
expression_t * obj_expr
Definition: parse.h:104
statement_t stat
Definition: parse.h:256
int last_token
Definition: parse.h:305
class_decl_t * class_decls
Definition: parse.h:310
const WCHAR * end
Definition: parse.h:297
LCID lcid
Definition: parse.h:303
statement_t * stats
Definition: parse.h:308
const WCHAR * ptr
Definition: parse.h:296
HRESULT hres
Definition: parse.h:301
unsigned last_nl
Definition: parse.h:306
statement_t * stats_tail
Definition: parse.h:309
const WCHAR * code
Definition: parse.h:295
heap_pool_t heap
Definition: parse.h:312
int error_loc
Definition: parse.h:302
BOOL is_html
Definition: parse.h:300
BOOL option_explicit
Definition: parse.h:299
statement_t stat
Definition: parse.h:184
redim_decl_t * redim_decls
Definition: parse.h:186
statement_t stat
Definition: parse.h:290
expression_t * expr
Definition: parse.h:291
case_clausule_t * case_clausules
Definition: parse.h:280
expression_t * expr
Definition: parse.h:279
statement_t stat
Definition: parse.h:278
expression_t expr
Definition: parse.h:87
const WCHAR * value
Definition: parse.h:88
expression_t * subexpr
Definition: parse.h:93
statement_t * body
Definition: parse.h:236
statement_t * body
Definition: parse.h:286
function_type_t
Definition: vbscript.h:331