ReactOS  0.4.13-dev-247-g0f29b3f
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 
21 typedef enum {
47  EXPR_NOARG, /* not a real expression */
58 
59 typedef struct _expression_t {
62 } expression_t;
63 
64 typedef struct {
68 
69 typedef struct {
73 
74 typedef struct {
76  double value;
78 
79 typedef struct {
81  const WCHAR *value;
83 
84 typedef struct {
88 
89 typedef struct {
94 
95 typedef struct {
98  const WCHAR *identifier;
101 
102 typedef enum {
126 
127 typedef struct _statement_t {
130 } statement_t;
131 
132 typedef struct {
137 
138 typedef struct {
143 
144 typedef struct _dim_list_t {
145  unsigned val;
146  struct _dim_list_t *next;
147 } dim_list_t;
148 
149 typedef struct _dim_decl_t {
150  const WCHAR *name;
152  BOOL is_public; /* Used only for class members. */
154  struct _dim_decl_t *next;
155 } dim_decl_t;
156 
157 typedef struct _dim_statement_t {
161 
162 typedef struct _arg_decl_t {
163  const WCHAR *name;
165  struct _arg_decl_t *next;
166 } arg_decl_t;
167 
168 typedef struct _function_decl_t {
169  const WCHAR *name;
177 
178 typedef struct {
182 
183 typedef struct _class_decl_t {
184  const WCHAR *name;
188 } class_decl_t;
189 
190 typedef struct _elseif_decl_t {
194 } elseif_decl_t;
195 
196 typedef struct {
199  statement_t *if_stat;
201  statement_t *else_stat;
203 
204 typedef struct {
209 
210 typedef struct {
218 
219 typedef struct {
225 
226 typedef struct {
230 
231 typedef struct _const_decl_t {
232  const WCHAR *name;
235 } const_decl_t;
236 
237 typedef struct {
241 
242 typedef struct _case_clausule_t {
244  statement_t *stat;
245  struct _case_clausule_t *next;
247 
248 typedef struct {
253 
254 typedef struct {
255  const WCHAR *code;
256  const WCHAR *ptr;
257  const WCHAR *end;
258 
263 
265  unsigned last_nl;
266 
270 
272 } parser_ctx_t;
273 
struct _arg_decl_t * next
Definition: parse.h:165
Definition: parse.h:56
struct _expression_t expression_t
expression_t * step_expr
Definition: parse.h:215
statement_t stat
Definition: parse.h:227
expression_type_t
Definition: parser.h:216
Definition: parse.h:40
LOCAL int expr(arg_t *ap, int *altp)
Definition: match.c:512
const WCHAR * name
Definition: parse.h:169
expression_t * value_expr
Definition: parse.h:233
elseif_decl_t * elseifs
Definition: parse.h:200
statement_t stat
Definition: parse.h:158
function_decl_t * func_decl
Definition: parse.h:180
statement_t stat
Definition: parse.h:179
expression_t expr
Definition: parse.h:70
struct _class_decl_t * next
Definition: parse.h:187
expression_t * left
Definition: parse.h:91
statement_t stat
Definition: parse.h:249
struct _function_decl_t * next
Definition: parse.h:174
expression_t * args
Definition: parse.h:99
expression_t * group_expr
Definition: parse.h:222
Definition: parse.h:117
Definition: parse.h:32
statement_t stat
Definition: parse.h:220
function_decl_t * funcs
Definition: parse.h:185
const WCHAR * identifier
Definition: parse.h:221
function_type_t type
Definition: parse.h:170
Definition: parse.h:51
Definition: parse.h:22
expression_t * from_expr
Definition: parse.h:213
statement_t * body
Definition: parse.h:207
Definition: parse.h:36
statement_t stat
Definition: parse.h:133
struct _elseif_decl_t elseif_decl_t
expression_t * value_expr
Definition: parse.h:141
expression_type_t type
Definition: parser.h:278
statement_t * body
Definition: parse.h:216
short VARIANT_BOOL
Definition: compat.h:1931
const WCHAR * identifier
Definition: parse.h:212
struct _elseif_decl_t * next
Definition: parse.h:193
LONG value
Definition: parse.h:71
Definition: parse.h:46
function_type_t
Definition: vbscript.h:314
statement_t * body
Definition: parse.h:223
arg_decl_t * args
Definition: parse.h:172
expression_t expr
Definition: parse.h:65
struct _const_decl_t * next
Definition: parse.h:234
BOOL is_public
Definition: parse.h:152
struct _arg_decl_t arg_decl_t
struct _case_clausule_t case_clausule_t
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
statement_t * stat
Definition: parser.h:193
expression_t * expr
Definition: parser.h:192
const WCHAR * name
Definition: parse.h:232
const WCHAR * name
Definition: parse.h:163
expression_t * obj_expr
Definition: parse.h:97
const WCHAR * ptr
Definition: parse.h:256
BOOL is_array
Definition: parse.h:151
BOOL is_strict
Definition: parse.h:135
expression_t expr
Definition: parse.h:75
struct _case_clausule_t * next
Definition: parser.h:195
struct _parser_ctx_t parser_ctx_t
statement_type_t type
Definition: parser.h:124
statement_t stat
Definition: parse.h:211
dim_decl_t * props
Definition: parse.h:186
member_expression_t * expr
Definition: parse.h:134
const WCHAR * code
Definition: parse.h:255
Definition: parse.h:31
heap_pool_t heap
Definition: parse.h:271
Definition: parse.h:27
struct _function_decl_t * next_prop_func
Definition: parse.h:175
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
struct _statement_t statement_t
const WCHAR * name
Definition: parse.h:184
statement_t * stat
Definition: parse.h:192
void parser_release(parser_ctx_t *) DECLSPEC_HIDDEN
Definition: parser.tab.c:4330
expression_t * to_expr
Definition: parse.h:214
BOOL is_public
Definition: parse.h:171
struct _dim_decl_t dim_decl_t
statement_type_t
Definition: parser.h:104
int parser_lex(void *, parser_ctx_t *) DECLSPEC_HIDDEN
Definition: lex.c:1142
struct _dim_statement_t dim_statement_t
statement_t stat
Definition: parse.h:139
expression_t expr
Definition: parse.h:80
const WCHAR * value
Definition: parse.h:81
VARIANT_BOOL value
Definition: parse.h:66
const WCHAR * end
Definition: parse.h:257
BOOL option_explicit
Definition: parse.h:259
Definition: parse.h:53
double value
Definition: parse.h:76
Definition: parse.h:38
expression_t * subexpr
Definition: parse.h:86
expression_t * expr
Definition: parse.h:191
Definition: parse.h:44
const WCHAR * name
Definition: parse.h:150
struct _dim_list_t * next
Definition: parse.h:146
Definition: parse.h:43
case_clausule_t * case_clausules
Definition: parse.h:251
BOOL parse_complete
Definition: parse.h:260
Definition: parse.h:37
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
Definition: stat.h:345
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
statement_t * stats_tail
Definition: parse.h:268
struct _statement_t * next
Definition: parse.h:129
struct _expression_t * next
Definition: parse.h:61
struct _dim_list_t dim_list_t
Definition: parse.h:33
unsigned val
Definition: parse.h:145
statement_t * body
Definition: parse.h:173
HRESULT parse_script(parser_ctx_t *, const WCHAR *, const WCHAR *) DECLSPEC_HIDDEN
Definition: parser.tab.c:3415
struct _dim_decl_t * next
Definition: parse.h:154
expression_t * expr
Definition: parse.h:250
member_expression_t * member_expr
Definition: parse.h:140
struct _const_decl_t const_decl_t
Definition: parse.h:42
void * parser_alloc(parser_ctx_t *, size_t) DECLSPEC_HIDDEN
Definition: parser.tab.c:3405
dim_list_t * dims
Definition: parse.h:153
Definition: parse.h:23
unsigned last_nl
Definition: parse.h:265
statement_t * stats
Definition: parse.h:267
Definition: parse.h:48
class_decl_t * class_decls
Definition: parse.h:269
HRESULT hres
Definition: parse.h:262
BOOL by_ref
Definition: parse.h:164
const_decl_t * decls
Definition: parse.h:239
BOOL is_html
Definition: parse.h:261
struct _function_decl_t function_decl_t
expression_type_t
Definition: parse.h:21
struct _class_decl_t class_decl_t
dim_decl_t * dim_decls
Definition: parse.h:159
expression_t * right
Definition: parse.h:92
int last_token
Definition: parse.h:264
statement_type_t
Definition: parse.h:102
statement_t stat
Definition: parse.h:238