ReactOS 0.4.15-dev-5667-ged97270
parse.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _expression_t
 
struct  bool_expression_t
 
struct  int_expression_t
 
struct  double_expression_t
 
struct  string_expression_t
 
struct  unary_expression_t
 
struct  binary_expression_t
 
struct  member_expression_t
 
struct  _statement_t
 
struct  call_statement_t
 
struct  assign_statement_t
 
struct  _dim_list_t
 
struct  _dim_decl_t
 
struct  _dim_statement_t
 
struct  _arg_decl_t
 
struct  _function_decl_t
 
struct  function_statement_t
 
struct  _class_decl_t
 
struct  _elseif_decl_t
 
struct  if_statement_t
 
struct  while_statement_t
 
struct  forto_statement_t
 
struct  foreach_statement_t
 
struct  onerror_statement_t
 
struct  _const_decl_t
 
struct  const_statement_t
 
struct  _case_clausule_t
 
struct  select_statement_t
 
struct  retval_statement_t
 
struct  parser_ctx_t
 

Typedefs

typedef struct _expression_t expression_t
 
typedef struct _statement_t statement_t
 
typedef struct _dim_list_t dim_list_t
 
typedef struct _dim_decl_t dim_decl_t
 
typedef struct _dim_statement_t dim_statement_t
 
typedef struct _arg_decl_t arg_decl_t
 
typedef struct _function_decl_t function_decl_t
 
typedef struct _class_decl_t class_decl_t
 
typedef struct _elseif_decl_t elseif_decl_t
 
typedef struct _const_decl_t const_decl_t
 
typedef struct _case_clausule_t case_clausule_t
 

Enumerations

enum  expression_type_t {
  EXPR_COMMA , EXPR_OR , EXPR_AND , EXPR_BOR ,
  EXPR_BXOR , EXPR_BAND , EXPR_INSTANCEOF , EXPR_IN ,
  EXPR_ADD , EXPR_SUB , EXPR_MUL , EXPR_DIV ,
  EXPR_MOD , EXPR_DELETE , EXPR_VOID , EXPR_TYPEOF ,
  EXPR_MINUS , EXPR_PLUS , EXPR_POSTINC , EXPR_POSTDEC ,
  EXPR_PREINC , EXPR_PREDEC , EXPR_EQ , EXPR_EQEQ ,
  EXPR_NOTEQ , EXPR_NOTEQEQ , EXPR_LESS , EXPR_LESSEQ ,
  EXPR_GREATER , EXPR_GREATEREQ , EXPR_BITNEG , EXPR_LOGNEG ,
  EXPR_LSHIFT , EXPR_RSHIFT , EXPR_RRSHIFT , EXPR_ASSIGN ,
  EXPR_ASSIGNLSHIFT , EXPR_ASSIGNRSHIFT , EXPR_ASSIGNRRSHIFT , EXPR_ASSIGNADD ,
  EXPR_ASSIGNSUB , EXPR_ASSIGNMUL , EXPR_ASSIGNDIV , EXPR_ASSIGNMOD ,
  EXPR_ASSIGNAND , EXPR_ASSIGNOR , EXPR_ASSIGNXOR , EXPR_COND ,
  EXPR_ARRAY , EXPR_MEMBER , EXPR_NEW , EXPR_CALL ,
  EXPR_THIS , EXPR_FUNC , EXPR_IDENT , EXPR_ARRAYLIT ,
  EXPR_PROPVAL , EXPR_LITERAL , EXPR_ADD , EXPR_AND ,
  EXPR_BOOL , EXPR_BRACKETS , EXPR_CONCAT , EXPR_DIV ,
  EXPR_DOUBLE , EXPR_EMPTY , EXPR_EQUAL , EXPR_EQV ,
  EXPR_EXP , EXPR_GT , EXPR_GTEQ , EXPR_IDIV ,
  EXPR_IMP , EXPR_INT , EXPR_IS , EXPR_LT ,
  EXPR_LTEQ , EXPR_ME , EXPR_MEMBER , EXPR_MOD ,
  EXPR_MUL , EXPR_NEG , EXPR_NEQUAL , EXPR_NEW ,
  EXPR_NOARG , EXPR_NOT , EXPR_NOTHING , EXPR_NULL ,
  EXPR_OR , EXPR_STRING , EXPR_SUB , EXPR_XOR
}
 
enum  statement_type_t {
  STAT_BLOCK , STAT_BREAK , STAT_CONTINUE , STAT_EMPTY ,
  STAT_EXPR , STAT_FOR , STAT_FORIN , STAT_IF ,
  STAT_LABEL , STAT_RETURN , STAT_SWITCH , STAT_THROW ,
  STAT_TRY , STAT_VAR , STAT_WHILE , STAT_WITH ,
  STAT_ASSIGN , STAT_CALL , STAT_CONST , STAT_DIM ,
  STAT_DOUNTIL , STAT_DOWHILE , STAT_EXITDO , STAT_EXITFOR ,
  STAT_EXITFUNC , STAT_EXITPROP , STAT_EXITSUB , STAT_FOREACH ,
  STAT_FORTO , STAT_FUNC , STAT_IF , STAT_ONERROR ,
  STAT_SELECT , STAT_SET , STAT_STOP , STAT_UNTIL ,
  STAT_WHILE , STAT_WHILELOOP , STAT_RETVAL
}
 

Functions

HRESULT parse_script (parser_ctx_t *, const WCHAR *, const WCHAR *, DWORD) DECLSPEC_HIDDEN
 
void parser_release (parser_ctx_t *) DECLSPEC_HIDDEN
 
int parser_lex (void *, parser_ctx_t *) DECLSPEC_HIDDEN
 
voidparser_alloc (parser_ctx_t *, size_t) DECLSPEC_HIDDEN
 

Typedef Documentation

◆ arg_decl_t

◆ case_clausule_t

◆ class_decl_t

◆ const_decl_t

◆ dim_decl_t

◆ dim_list_t

◆ dim_statement_t

◆ elseif_decl_t

◆ expression_t

◆ function_decl_t

◆ statement_t

Enumeration Type Documentation

◆ expression_type_t

Enumerator
EXPR_COMMA 
EXPR_OR 
EXPR_AND 
EXPR_BOR 
EXPR_BXOR 
EXPR_BAND 
EXPR_INSTANCEOF 
EXPR_IN 
EXPR_ADD 
EXPR_SUB 
EXPR_MUL 
EXPR_DIV 
EXPR_MOD 
EXPR_DELETE 
EXPR_VOID 
EXPR_TYPEOF 
EXPR_MINUS 
EXPR_PLUS 
EXPR_POSTINC 
EXPR_POSTDEC 
EXPR_PREINC 
EXPR_PREDEC 
EXPR_EQ 
EXPR_EQEQ 
EXPR_NOTEQ 
EXPR_NOTEQEQ 
EXPR_LESS 
EXPR_LESSEQ 
EXPR_GREATER 
EXPR_GREATEREQ 
EXPR_BITNEG 
EXPR_LOGNEG 
EXPR_LSHIFT 
EXPR_RSHIFT 
EXPR_RRSHIFT 
EXPR_ASSIGN 
EXPR_ASSIGNLSHIFT 
EXPR_ASSIGNRSHIFT 
EXPR_ASSIGNRRSHIFT 
EXPR_ASSIGNADD 
EXPR_ASSIGNSUB 
EXPR_ASSIGNMUL 
EXPR_ASSIGNDIV 
EXPR_ASSIGNMOD 
EXPR_ASSIGNAND 
EXPR_ASSIGNOR 
EXPR_ASSIGNXOR 
EXPR_COND 
EXPR_ARRAY 
EXPR_MEMBER 
EXPR_NEW 
EXPR_CALL 
EXPR_THIS 
EXPR_FUNC 
EXPR_IDENT 
EXPR_ARRAYLIT 
EXPR_PROPVAL 
EXPR_LITERAL 
EXPR_ADD 
EXPR_AND 
EXPR_BOOL 
EXPR_BRACKETS 
EXPR_CONCAT 
EXPR_DIV 
EXPR_DOUBLE 
EXPR_EMPTY 
EXPR_EQUAL 
EXPR_EQV 
EXPR_EXP 
EXPR_GT 
EXPR_GTEQ 
EXPR_IDIV 
EXPR_IMP 
EXPR_INT 
EXPR_IS 
EXPR_LT 
EXPR_LTEQ 
EXPR_ME 
EXPR_MEMBER 
EXPR_MOD 
EXPR_MUL 
EXPR_NEG 
EXPR_NEQUAL 
EXPR_NEW 
EXPR_NOARG 
EXPR_NOT 
EXPR_NOTHING 
EXPR_NULL 
EXPR_OR 
EXPR_STRING 
EXPR_SUB 
EXPR_XOR 

Definition at line 21 of file parse.h.

21 {
33 EXPR_GT,
38 EXPR_IS,
39 EXPR_LT,
41 EXPR_ME,
48 EXPR_NOARG, /* not a real expression */
52 EXPR_OR,
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

◆ statement_type_t

Enumerator
STAT_BLOCK 
STAT_BREAK 
STAT_CONTINUE 
STAT_EMPTY 
STAT_EXPR 
STAT_FOR 
STAT_FORIN 
STAT_IF 
STAT_LABEL 
STAT_RETURN 
STAT_SWITCH 
STAT_THROW 
STAT_TRY 
STAT_VAR 
STAT_WHILE 
STAT_WITH 
STAT_ASSIGN 
STAT_CALL 
STAT_CONST 
STAT_DIM 
STAT_DOUNTIL 
STAT_DOWHILE 
STAT_EXITDO 
STAT_EXITFOR 
STAT_EXITFUNC 
STAT_EXITPROP 
STAT_EXITSUB 
STAT_FOREACH 
STAT_FORTO 
STAT_FUNC 
STAT_IF 
STAT_ONERROR 
STAT_SELECT 
STAT_SET 
STAT_STOP 
STAT_UNTIL 
STAT_WHILE 
STAT_WHILELOOP 
STAT_RETVAL 

Definition at line 101 of file parse.h.

101 {
103 STAT_CALL,
105 STAT_DIM,
115 STAT_FUNC,
116 STAT_IF,
119 STAT_SET,
120 STAT_STOP,
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

Function Documentation

◆ parse_script()

HRESULT parse_script ( parser_ctx_t ,
const WCHAR ,
const WCHAR ,
DWORD   
)

Referenced by compile_script().

◆ parser_alloc()

void * parser_alloc ( parser_ctx_t ,
size_t   
)

◆ parser_lex()

int parser_lex ( void lval,
parser_ctx_t ctx 
)

Definition at line 1102 of file lex.c.

1103{
1104 int ret;
1105
1106 ctx->nl = ctx->ptr == ctx->begin;
1107
1108 do {
1109 ret = next_token(ctx, lval);
1110 } while(ret == '@' && !(ret = cc_token(ctx, lval)));
1111
1112 return ret;
1113}
static int cc_token(parser_ctx_t *ctx, void *lval)
Definition: lex.c:1003
static int next_token(parser_ctx_t *ctx, void *lval)
Definition: lex.c:546
int ret

◆ parser_release()

void parser_release ( parser_ctx_t )