Kannel: Open Source WAP and SMS gateway  $Revision: 5037 $
wsgram.c File Reference
#include "wmlscript/wsint.h"

Go to the source code of this file.

Data Structures

union  YYSTYPE
 
struct  YYLTYPE
 
union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "2.3"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   1
 
#define YYLSP_NEEDED   1
 
#define yyparse   ws_yy_parse
 
#define yylex   ws_yy_lex
 
#define yyerror   ws_yy_error
 
#define yylval   ws_yy_lval
 
#define yychar   ws_yy_char
 
#define yydebug   ws_yy_debug
 
#define yynerrs   ws_yy_nerrs
 
#define yylloc   ws_yy_lloc
 
#define YYTOKENTYPE
 
#define tINVALID   258
 
#define tTRUE   259
 
#define tFALSE   260
 
#define tINTEGER   261
 
#define tFLOAT   262
 
#define tSTRING   263
 
#define tIDENTIFIER   264
 
#define tACCESS   265
 
#define tAGENT   266
 
#define tBREAK   267
 
#define tCONTINUE   268
 
#define tIDIV   269
 
#define tIDIVA   270
 
#define tDOMAIN   271
 
#define tELSE   272
 
#define tEQUIV   273
 
#define tEXTERN   274
 
#define tFOR   275
 
#define tFUNCTION   276
 
#define tHEADER   277
 
#define tHTTP   278
 
#define tIF   279
 
#define tISVALID   280
 
#define tMETA   281
 
#define tNAME   282
 
#define tPATH   283
 
#define tRETURN   284
 
#define tTYPEOF   285
 
#define tUSE   286
 
#define tUSER   287
 
#define tVAR   288
 
#define tWHILE   289
 
#define tURL   290
 
#define tDELETE   291
 
#define tIN   292
 
#define tLIB   293
 
#define tNEW   294
 
#define tNULL   295
 
#define tTHIS   296
 
#define tVOID   297
 
#define tWITH   298
 
#define tCASE   299
 
#define tCATCH   300
 
#define tCLASS   301
 
#define tCONST   302
 
#define tDEBUGGER   303
 
#define tDEFAULT   304
 
#define tDO   305
 
#define tENUM   306
 
#define tEXPORT   307
 
#define tEXTENDS   308
 
#define tFINALLY   309
 
#define tIMPORT   310
 
#define tPRIVATE   311
 
#define tPUBLIC   312
 
#define tSIZEOF   313
 
#define tSTRUCT   314
 
#define tSUPER   315
 
#define tSWITCH   316
 
#define tTHROW   317
 
#define tTRY   318
 
#define tEQ   319
 
#define tLE   320
 
#define tGE   321
 
#define tNE   322
 
#define tAND   323
 
#define tOR   324
 
#define tPLUSPLUS   325
 
#define tMINUSMINUS   326
 
#define tLSHIFT   327
 
#define tRSSHIFT   328
 
#define tRSZSHIFT   329
 
#define tADDA   330
 
#define tSUBA   331
 
#define tMULA   332
 
#define tDIVA   333
 
#define tANDA   334
 
#define tORA   335
 
#define tXORA   336
 
#define tREMA   337
 
#define tLSHIFTA   338
 
#define tRSSHIFTA   339
 
#define tRSZSHIFTA   340
 
#define YYPARSE_PARAM   pctx
 
#define YYLEX_PARAM   pctx
 
#define YYDEBUG   0
 
#define YYERROR_VERBOSE   0
 
#define YYTOKEN_TABLE   0
 
#define yystype   YYSTYPE /* obsolescent; will be withdrawn */
 
#define YYSTYPE_IS_DECLARED   1
 
#define YYSTYPE_IS_TRIVIAL   1
 
#define yyltype   YYLTYPE /* obsolescent; will be withdrawn */
 
#define YYLTYPE_IS_DECLARED   1
 
#define YYLTYPE_IS_TRIVIAL   1
 
#define YYSIZE_T   unsigned int
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YY_(msgid)   msgid
 
#define YYUSE(e)   ((void) (e))
 
#define YYID(n)   (n)
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY(To, From, Count)
 
#define YYSTACK_RELOCATE(Stack)
 
#define YYFINAL   17
 
#define YYLAST   448
 
#define YYNTOKENS   109
 
#define YYNNTS   55
 
#define YYNRULES   146
 
#define YYNSTATES   257
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   340
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   -135
 
#define YYTABLE_NINF   -53
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYFAIL   goto yyerrlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYRHSLOC(Rhs, K)   ((Rhs)[K])
 
#define YYLLOC_DEFAULT(Current, Rhs, N)
 
#define YY_LOCATION_PRINT(File, Loc)
 
#define YYLEX   yylex (&yylval, &yylloc, YYLEX_PARAM)
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYPOPSTACK(N)    (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
 

Typedefs

typedef union YYSTYPE YYSTYPE
 
typedef struct YYLTYPE YYLTYPE
 
typedef unsigned char yytype_uint8
 
typedef short int yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef short int yytype_int16
 

Enumerations

enum  yytokentype {
  tINVALID = 258, tTRUE = 259, tFALSE = 260, tINTEGER = 261,
  tFLOAT = 262, tSTRING = 263, tIDENTIFIER = 264, tACCESS = 265,
  tAGENT = 266, tBREAK = 267, tCONTINUE = 268, tIDIV = 269,
  tIDIVA = 270, tDOMAIN = 271, tELSE = 272, tEQUIV = 273,
  tEXTERN = 274, tFOR = 275, tFUNCTION = 276, tHEADER = 277,
  tHTTP = 278, tIF = 279, tISVALID = 280, tMETA = 281,
  tNAME = 282, tPATH = 283, tRETURN = 284, tTYPEOF = 285,
  tUSE = 286, tUSER = 287, tVAR = 288, tWHILE = 289,
  tURL = 290, tDELETE = 291, tIN = 292, tLIB = 293,
  tNEW = 294, tNULL = 295, tTHIS = 296, tVOID = 297,
  tWITH = 298, tCASE = 299, tCATCH = 300, tCLASS = 301,
  tCONST = 302, tDEBUGGER = 303, tDEFAULT = 304, tDO = 305,
  tENUM = 306, tEXPORT = 307, tEXTENDS = 308, tFINALLY = 309,
  tIMPORT = 310, tPRIVATE = 311, tPUBLIC = 312, tSIZEOF = 313,
  tSTRUCT = 314, tSUPER = 315, tSWITCH = 316, tTHROW = 317,
  tTRY = 318, tEQ = 319, tLE = 320, tGE = 321,
  tNE = 322, tAND = 323, tOR = 324, tPLUSPLUS = 325,
  tMINUSMINUS = 326, tLSHIFT = 327, tRSSHIFT = 328, tRSZSHIFT = 329,
  tADDA = 330, tSUBA = 331, tMULA = 332, tDIVA = 333,
  tANDA = 334, tORA = 335, tXORA = 336, tREMA = 337,
  tLSHIFTA = 338, tRSSHIFTA = 339, tRSZSHIFTA = 340, tINVALID = 258,
  tTRUE = 259, tFALSE = 260, tINTEGER = 261, tFLOAT = 262,
  tSTRING = 263, tIDENTIFIER = 264, tACCESS = 265, tAGENT = 266,
  tBREAK = 267, tCONTINUE = 268, tIDIV = 269, tIDIVA = 270,
  tDOMAIN = 271, tELSE = 272, tEQUIV = 273, tEXTERN = 274,
  tFOR = 275, tFUNCTION = 276, tHEADER = 277, tHTTP = 278,
  tIF = 279, tISVALID = 280, tMETA = 281, tNAME = 282,
  tPATH = 283, tRETURN = 284, tTYPEOF = 285, tUSE = 286,
  tUSER = 287, tVAR = 288, tWHILE = 289, tURL = 290,
  tDELETE = 291, tIN = 292, tLIB = 293, tNEW = 294,
  tNULL = 295, tTHIS = 296, tVOID = 297, tWITH = 298,
  tCASE = 299, tCATCH = 300, tCLASS = 301, tCONST = 302,
  tDEBUGGER = 303, tDEFAULT = 304, tDO = 305, tENUM = 306,
  tEXPORT = 307, tEXTENDS = 308, tFINALLY = 309, tIMPORT = 310,
  tPRIVATE = 311, tPUBLIC = 312, tSIZEOF = 313, tSTRUCT = 314,
  tSUPER = 315, tSWITCH = 316, tTHROW = 317, tTRY = 318,
  tEQ = 319, tLE = 320, tGE = 321, tNE = 322,
  tAND = 323, tOR = 324, tPLUSPLUS = 325, tMINUSMINUS = 326,
  tLSHIFT = 327, tRSSHIFT = 328, tRSZSHIFT = 329, tADDA = 330,
  tSUBA = 331, tMULA = 332, tDIVA = 333, tANDA = 334,
  tORA = 335, tXORA = 336, tREMA = 337, tLSHIFTA = 338,
  tRSSHIFTA = 339, tRSZSHIFTA = 340
}
 

Functions

void yyerror (char *msg)
 
static void yydestruct (char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) const
 
int yyparse ()
 
int yyparse (void *YYPARSE_PARAM)
 

Variables

static const yytype_uint8 yytranslate []
 
static const yytype_uint8 yyr1 []
 
static const yytype_uint8 yyr2 []
 
static const yytype_uint8 yydefact []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yypact []
 
static const yytype_int16 yypgoto []
 
static const yytype_int16 yytable []
 
static const yytype_int16 yycheck []
 
static const yytype_uint8 yystos []
 

Macro Definition Documentation

#define tACCESS   265

Definition at line 170 of file wsgram.c.

#define tADDA   330

Definition at line 235 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tAGENT   266

Definition at line 171 of file wsgram.c.

#define tAND   323

Definition at line 228 of file wsgram.c.

Referenced by ws_yy_lex().

#define tANDA   334

Definition at line 239 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tBREAK   267

Definition at line 172 of file wsgram.c.

#define tCASE   299

Definition at line 204 of file wsgram.c.

#define tCATCH   300

Definition at line 205 of file wsgram.c.

#define tCLASS   301

Definition at line 206 of file wsgram.c.

#define tCONST   302

Definition at line 207 of file wsgram.c.

#define tCONTINUE   268

Definition at line 173 of file wsgram.c.

#define tDEBUGGER   303

Definition at line 208 of file wsgram.c.

#define tDEFAULT   304

Definition at line 209 of file wsgram.c.

#define tDELETE   291

Definition at line 196 of file wsgram.c.

#define tDIVA   333

Definition at line 238 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tDO   305

Definition at line 210 of file wsgram.c.

#define tDOMAIN   271

Definition at line 176 of file wsgram.c.

#define tELSE   272

Definition at line 177 of file wsgram.c.

#define tENUM   306

Definition at line 211 of file wsgram.c.

#define tEQ   319

Definition at line 224 of file wsgram.c.

Referenced by ws_yy_lex().

#define tEQUIV   273

Definition at line 178 of file wsgram.c.

#define tEXPORT   307

Definition at line 212 of file wsgram.c.

#define tEXTENDS   308

Definition at line 213 of file wsgram.c.

#define tEXTERN   274

Definition at line 179 of file wsgram.c.

#define tFALSE   260

Definition at line 165 of file wsgram.c.

#define tFINALLY   309

Definition at line 214 of file wsgram.c.

#define tFLOAT   262

Definition at line 167 of file wsgram.c.

Referenced by ws_yy_lex().

#define tFOR   275

Definition at line 180 of file wsgram.c.

#define tFUNCTION   276

Definition at line 181 of file wsgram.c.

#define tGE   321

Definition at line 226 of file wsgram.c.

Referenced by ws_yy_lex().

#define tHEADER   277

Definition at line 182 of file wsgram.c.

#define tHTTP   278

Definition at line 183 of file wsgram.c.

#define tIDENTIFIER   264

Definition at line 169 of file wsgram.c.

Referenced by ws_yy_lex().

#define tIDIV   269

Definition at line 174 of file wsgram.c.

Referenced by ws_yy_lex().

#define tIDIVA   270

Definition at line 175 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tIF   279

Definition at line 184 of file wsgram.c.

#define tIMPORT   310

Definition at line 215 of file wsgram.c.

#define tIN   292

Definition at line 197 of file wsgram.c.

#define tINTEGER   261

Definition at line 166 of file wsgram.c.

Referenced by ws_yy_lex().

#define tINVALID   258

Definition at line 163 of file wsgram.c.

#define tISVALID   280

Definition at line 185 of file wsgram.c.

#define tLE   320

Definition at line 225 of file wsgram.c.

Referenced by ws_yy_lex().

#define tLIB   293

Definition at line 198 of file wsgram.c.

#define tLSHIFT   327

Definition at line 232 of file wsgram.c.

Referenced by ws_yy_lex().

#define tLSHIFTA   338

Definition at line 243 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tMETA   281

Definition at line 186 of file wsgram.c.

#define tMINUSMINUS   326

Definition at line 231 of file wsgram.c.

Referenced by ws_yy_lex().

#define tMULA   332

Definition at line 237 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tNAME   282

Definition at line 187 of file wsgram.c.

#define tNE   322

Definition at line 227 of file wsgram.c.

Referenced by ws_yy_lex().

#define tNEW   294

Definition at line 199 of file wsgram.c.

#define tNULL   295

Definition at line 200 of file wsgram.c.

#define tOR   324

Definition at line 229 of file wsgram.c.

Referenced by ws_yy_lex().

#define tORA   335

Definition at line 240 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tPATH   283

Definition at line 188 of file wsgram.c.

#define tPLUSPLUS   325

Definition at line 230 of file wsgram.c.

Referenced by ws_yy_lex().

#define tPRIVATE   311

Definition at line 216 of file wsgram.c.

#define tPUBLIC   312

Definition at line 217 of file wsgram.c.

#define tREMA   337

Definition at line 242 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tRETURN   284

Definition at line 189 of file wsgram.c.

#define tRSSHIFT   328

Definition at line 233 of file wsgram.c.

Referenced by ws_yy_lex().

#define tRSSHIFTA   339

Definition at line 244 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tRSZSHIFT   329

Definition at line 234 of file wsgram.c.

Referenced by ws_yy_lex().

#define tRSZSHIFTA   340

Definition at line 245 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tSIZEOF   313

Definition at line 218 of file wsgram.c.

#define tSTRING   263

Definition at line 168 of file wsgram.c.

Referenced by ws_yy_lex().

#define tSTRUCT   314

Definition at line 219 of file wsgram.c.

#define tSUBA   331

Definition at line 236 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define tSUPER   315

Definition at line 220 of file wsgram.c.

#define tSWITCH   316

Definition at line 221 of file wsgram.c.

#define tTHIS   296

Definition at line 201 of file wsgram.c.

#define tTHROW   317

Definition at line 222 of file wsgram.c.

#define tTRUE   259

Definition at line 164 of file wsgram.c.

#define tTRY   318

Definition at line 223 of file wsgram.c.

#define tTYPEOF   285

Definition at line 190 of file wsgram.c.

#define tURL   290

Definition at line 195 of file wsgram.c.

#define tUSE   286

Definition at line 191 of file wsgram.c.

#define tUSER   287

Definition at line 192 of file wsgram.c.

#define tVAR   288

Definition at line 193 of file wsgram.c.

#define tVOID   297

Definition at line 202 of file wsgram.c.

#define tWHILE   289

Definition at line 194 of file wsgram.c.

#define tWITH   298

Definition at line 203 of file wsgram.c.

#define tXORA   336

Definition at line 241 of file wsgram.c.

Referenced by ws_expr_linearize(), ws_yy_lex(), and yyparse().

#define YY_ (   msgid)    msgid

Definition at line 403 of file wsgram.c.

Referenced by yyparse().

#define YY_LOCATION_PRINT (   File,
  Loc 
)
Value:
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)

Definition at line 1109 of file wsgram.c.

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1290 of file wsgram.c.

Referenced by yyparse().

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1289 of file wsgram.c.

Referenced by yyparse().

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Definition at line 1288 of file wsgram.c.

Referenced by yydestruct(), and yyparse().

#define YYABORT   goto yyabortlab

Definition at line 1043 of file wsgram.c.

Referenced by yyparse().

#define YYACCEPT   goto yyacceptlab

Definition at line 1042 of file wsgram.c.

Referenced by yyparse().

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
#define YYID(n)
Definition: wsgram.c:416
#define YYTRANSLATE(YYX)
Definition: wsgram.c:578
#define yychar
Definition: wsgram.c:66
#define YYEMPTY
Definition: wsgram.c:1039
#define YY_(msgid)
Definition: wsgram.c:403

Definition at line 1055 of file wsgram.c.

#define YYBISON   1

Definition at line 47 of file wsgram.c.

#define YYBISON_VERSION   "2.3"

Definition at line 50 of file wsgram.c.

#define yychar   ws_yy_char

Definition at line 66 of file wsgram.c.

Referenced by yyparse().

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1038 of file wsgram.c.

#define YYCOPY (   To,
  From,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
#define YYID(n)
Definition: wsgram.c:416

Definition at line 531 of file wsgram.c.

#define yydebug   ws_yy_debug

Definition at line 67 of file wsgram.c.

#define YYDEBUG   0

Definition at line 285 of file wsgram.c.

#define YYDPRINTF (   Args)

Definition at line 1287 of file wsgram.c.

Referenced by yyparse().

#define YYEMPTY   (-2)

Definition at line 1039 of file wsgram.c.

Referenced by yyparse().

#define YYEOF   0

Definition at line 1040 of file wsgram.c.

Referenced by yyparse().

#define YYERRCODE   256

Definition at line 1074 of file wsgram.c.

#define yyerrok   (yyerrstatus = 0)

Definition at line 1037 of file wsgram.c.

#define yyerror   ws_yy_error

Definition at line 64 of file wsgram.c.

Referenced by yyparse().

#define YYERROR   goto yyerrorlab

Definition at line 1044 of file wsgram.c.

#define YYERROR_VERBOSE   0

Definition at line 293 of file wsgram.c.

#define YYFAIL   goto yyerrlab

Definition at line 1051 of file wsgram.c.

#define YYFINAL   17

Definition at line 561 of file wsgram.c.

Referenced by yyparse().

#define YYFREE   free

Definition at line 492 of file wsgram.c.

#define YYID (   n)    (n)

Definition at line 416 of file wsgram.c.

Referenced by yyparse().

#define YYINITDEPTH   200

Definition at line 1296 of file wsgram.c.

Referenced by yyparse().

#define YYLAST   448

Definition at line 563 of file wsgram.c.

Referenced by yyparse().

#define yylex   ws_yy_lex

Definition at line 63 of file wsgram.c.

#define YYLEX   yylex (&yylval, &yylloc, YYLEX_PARAM)

Definition at line 1122 of file wsgram.c.

Referenced by yyparse().

#define YYLEX_PARAM   pctx

Definition at line 269 of file wsgram.c.

#define yylloc   ws_yy_lloc

Definition at line 69 of file wsgram.c.

Referenced by yyparse().

#define YYLLOC_DEFAULT (   Current,
  Rhs,
  N 
)
Value:
do \
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
#define YYID(n)
Definition: wsgram.c:416
#define N(n)
Definition: wslexer.c:149
#define YYRHSLOC(Rhs, K)
Definition: wsgram.c:1081

Definition at line 1083 of file wsgram.c.

Referenced by yyparse().

#define YYLSP_NEEDED   1

Definition at line 59 of file wsgram.c.

#define yyltype   YYLTYPE /* obsolescent; will be withdrawn */

Definition at line 336 of file wsgram.c.

#define YYLTYPE_IS_DECLARED   1

Definition at line 337 of file wsgram.c.

#define YYLTYPE_IS_TRIVIAL   1

Definition at line 338 of file wsgram.c.

#define yylval   ws_yy_lval

Definition at line 65 of file wsgram.c.

Referenced by yyparse().

#define YYMALLOC   malloc

Definition at line 485 of file wsgram.c.

#define YYMAXDEPTH   10000

Definition at line 1307 of file wsgram.c.

Referenced by yyparse().

#define YYMAXUTOK   340

Definition at line 576 of file wsgram.c.

#define yynerrs   ws_yy_nerrs

Definition at line 68 of file wsgram.c.

Referenced by yyparse().

#define YYNNTS   55

Definition at line 568 of file wsgram.c.

#define YYNRULES   146

Definition at line 570 of file wsgram.c.

#define YYNSTATES   257

Definition at line 572 of file wsgram.c.

#define YYNTOKENS   109

Definition at line 566 of file wsgram.c.

Referenced by yyparse().

#define YYPACT_NINF   -135

Definition at line 860 of file wsgram.c.

Referenced by yyparse().

#define yyparse   ws_yy_parse

Definition at line 62 of file wsgram.c.

#define YYPARSE_PARAM   pctx

Definition at line 268 of file wsgram.c.

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N), yylsp -= (N))

Referenced by yyparse().

#define YYPURE   1

Definition at line 56 of file wsgram.c.

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1053 of file wsgram.c.

#define YYRHSLOC (   Rhs,
 
)    ((Rhs)[K])

Definition at line 1081 of file wsgram.c.

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 393 of file wsgram.c.

#define YYSIZE_T   unsigned int

Definition at line 389 of file wsgram.c.

Referenced by yyparse().

#define YYSKELETON_NAME   "yacc.c"

Definition at line 53 of file wsgram.c.

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 471 of file wsgram.c.

Referenced by yyparse().

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 474 of file wsgram.c.

Referenced by yyparse().

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
#define YYSTACK_GAP_MAXIMUM
Definition: wsgram.c:516
#define N(n)
Definition: wslexer.c:149
union YYSTYPE YYSTYPE
short int yytype_int16
Definition: wsgram.c:376

Definition at line 520 of file wsgram.c.

Referenced by yyparse().

#define YYSTACK_FREE   YYFREE

Definition at line 472 of file wsgram.c.

Referenced by yyparse().

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

Definition at line 516 of file wsgram.c.

#define YYSTACK_RELOCATE (   Stack)
Value:
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (YYID (0))
#define YYID(n)
Definition: wsgram.c:416
#define YYSTACK_GAP_MAXIMUM
Definition: wsgram.c:516
#define YYCOPY(To, From, Count)
Definition: wsgram.c:531
#define YYSIZE_T
Definition: wsgram.c:389

Definition at line 547 of file wsgram.c.

Referenced by yyparse().

#define yystype   YYSTYPE /* obsolescent; will be withdrawn */

Definition at line 323 of file wsgram.c.

#define YYSTYPE_IS_DECLARED   1

Definition at line 324 of file wsgram.c.

#define YYSTYPE_IS_TRIVIAL   1

Definition at line 325 of file wsgram.c.

#define YYTABLE_NINF   -53

Definition at line 906 of file wsgram.c.

Referenced by yyparse().

#define YYTERROR   1

Definition at line 1073 of file wsgram.c.

Referenced by yyparse().

#define YYTOKEN_TABLE   0

Definition at line 298 of file wsgram.c.

#define YYTOKENTYPE

Definition at line 73 of file wsgram.c.

#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 578 of file wsgram.c.

Referenced by yyparse().

#define YYUNDEFTOK   2

Definition at line 575 of file wsgram.c.

#define YYUSE (   e)    ((void) (e))

Definition at line 409 of file wsgram.c.

Referenced by yydestruct().

Typedef Documentation

typedef struct YYLTYPE YYLTYPE
typedef union YYSTYPE YYSTYPE
typedef short int yytype_int16

Definition at line 376 of file wsgram.c.

typedef short int yytype_int8

Definition at line 364 of file wsgram.c.

typedef unsigned short int yytype_uint16

Definition at line 370 of file wsgram.c.

typedef unsigned char yytype_uint8

Definition at line 355 of file wsgram.c.

Enumeration Type Documentation

Enumerator
tINVALID 
tTRUE 
tFALSE 
tINTEGER 
tFLOAT 
tSTRING 
tIDENTIFIER 
tACCESS 
tAGENT 
tBREAK 
tCONTINUE 
tIDIV 
tIDIVA 
tDOMAIN 
tELSE 
tEQUIV 
tEXTERN 
tFOR 
tFUNCTION 
tHEADER 
tHTTP 
tIF 
tISVALID 
tMETA 
tNAME 
tPATH 
tRETURN 
tTYPEOF 
tUSE 
tUSER 
tVAR 
tWHILE 
tURL 
tDELETE 
tIN 
tLIB 
tNEW 
tNULL 
tTHIS 
tVOID 
tWITH 
tCASE 
tCATCH 
tCLASS 
tCONST 
tDEBUGGER 
tDEFAULT 
tDO 
tENUM 
tEXPORT 
tEXTENDS 
tFINALLY 
tIMPORT 
tPRIVATE 
tPUBLIC 
tSIZEOF 
tSTRUCT 
tSUPER 
tSWITCH 
tTHROW 
tTRY 
tEQ 
tLE 
tGE 
tNE 
tAND 
tOR 
tPLUSPLUS 
tMINUSMINUS 
tLSHIFT 
tRSSHIFT 
tRSZSHIFT 
tADDA 
tSUBA 
tMULA 
tDIVA 
tANDA 
tORA 
tXORA 
tREMA 
tLSHIFTA 
tRSSHIFTA 
tRSZSHIFTA 
tINVALID 
tTRUE 
tFALSE 
tINTEGER 
tFLOAT 
tSTRING 
tIDENTIFIER 
tACCESS 
tAGENT 
tBREAK 
tCONTINUE 
tIDIV 
tIDIVA 
tDOMAIN 
tELSE 
tEQUIV 
tEXTERN 
tFOR 
tFUNCTION 
tHEADER 
tHTTP 
tIF 
tISVALID 
tMETA 
tNAME 
tPATH 
tRETURN 
tTYPEOF 
tUSE 
tUSER 
tVAR 
tWHILE 
tURL 
tDELETE 
tIN 
tLIB 
tNEW 
tNULL 
tTHIS 
tVOID 
tWITH 
tCASE 
tCATCH 
tCLASS 
tCONST 
tDEBUGGER 
tDEFAULT 
tDO 
tENUM 
tEXPORT 
tEXTENDS 
tFINALLY 
tIMPORT 
tPRIVATE 
tPUBLIC 
tSIZEOF 
tSTRUCT 
tSUPER 
tSWITCH 
tTHROW 
tTRY 
tEQ 
tLE 
tGE 
tNE 
tAND 
tOR 
tPLUSPLUS 
tMINUSMINUS 
tLSHIFT 
tRSSHIFT 
tRSZSHIFT 
tADDA 
tSUBA 
tMULA 
tDIVA 
tANDA 
tORA 
tXORA 
tREMA 
tLSHIFTA 
tRSSHIFTA 
tRSZSHIFTA 

Definition at line 76 of file wsgram.c.

76  {
77  tINVALID = 258,
78  tTRUE = 259,
79  tFALSE = 260,
80  tINTEGER = 261,
81  tFLOAT = 262,
82  tSTRING = 263,
83  tIDENTIFIER = 264,
84  tACCESS = 265,
85  tAGENT = 266,
86  tBREAK = 267,
87  tCONTINUE = 268,
88  tIDIV = 269,
89  tIDIVA = 270,
90  tDOMAIN = 271,
91  tELSE = 272,
92  tEQUIV = 273,
93  tEXTERN = 274,
94  tFOR = 275,
95  tFUNCTION = 276,
96  tHEADER = 277,
97  tHTTP = 278,
98  tIF = 279,
99  tISVALID = 280,
100  tMETA = 281,
101  tNAME = 282,
102  tPATH = 283,
103  tRETURN = 284,
104  tTYPEOF = 285,
105  tUSE = 286,
106  tUSER = 287,
107  tVAR = 288,
108  tWHILE = 289,
109  tURL = 290,
110  tDELETE = 291,
111  tIN = 292,
112  tLIB = 293,
113  tNEW = 294,
114  tNULL = 295,
115  tTHIS = 296,
116  tVOID = 297,
117  tWITH = 298,
118  tCASE = 299,
119  tCATCH = 300,
120  tCLASS = 301,
121  tCONST = 302,
122  tDEBUGGER = 303,
123  tDEFAULT = 304,
124  tDO = 305,
125  tENUM = 306,
126  tEXPORT = 307,
127  tEXTENDS = 308,
128  tFINALLY = 309,
129  tIMPORT = 310,
130  tPRIVATE = 311,
131  tPUBLIC = 312,
132  tSIZEOF = 313,
133  tSTRUCT = 314,
134  tSUPER = 315,
135  tSWITCH = 316,
136  tTHROW = 317,
137  tTRY = 318,
138  tEQ = 319,
139  tLE = 320,
140  tGE = 321,
141  tNE = 322,
142  tAND = 323,
143  tOR = 324,
144  tPLUSPLUS = 325,
145  tMINUSMINUS = 326,
146  tLSHIFT = 327,
147  tRSSHIFT = 328,
148  tRSZSHIFT = 329,
149  tADDA = 330,
150  tSUBA = 331,
151  tMULA = 332,
152  tDIVA = 333,
153  tANDA = 334,
154  tORA = 335,
155  tXORA = 336,
156  tREMA = 337,
157  tLSHIFTA = 338,
158  tRSSHIFTA = 339,
159  tRSZSHIFTA = 340
160  };
#define tDELETE
Definition: wsgram.c:196
#define tTHROW
Definition: wsgram.c:222
#define tVAR
Definition: wsgram.c:193
#define tIMPORT
Definition: wsgram.c:215
#define tSWITCH
Definition: wsgram.c:221
#define tNULL
Definition: wsgram.c:200
#define tFOR
Definition: wsgram.c:180
#define tFALSE
Definition: wsgram.c:165
#define tEXTENDS
Definition: wsgram.c:213
#define tPLUSPLUS
Definition: wsgram.c:230
#define tDIVA
Definition: wsgram.c:238
#define tRSSHIFT
Definition: wsgram.c:233
#define tLIB
Definition: wsgram.c:198
#define tRSZSHIFTA
Definition: wsgram.c:245
#define tUSE
Definition: wsgram.c:191
#define tPUBLIC
Definition: wsgram.c:217
#define tAGENT
Definition: wsgram.c:171
#define tGE
Definition: wsgram.c:226
#define tAND
Definition: wsgram.c:228
#define tDO
Definition: wsgram.c:210
#define tACCESS
Definition: wsgram.c:170
#define tCATCH
Definition: wsgram.c:205
#define tTYPEOF
Definition: wsgram.c:190
#define tDOMAIN
Definition: wsgram.c:176
#define tPATH
Definition: wsgram.c:188
#define tWITH
Definition: wsgram.c:203
#define tRSSHIFTA
Definition: wsgram.c:244
#define tIN
Definition: wsgram.c:197
#define tREMA
Definition: wsgram.c:242
#define tEQUIV
Definition: wsgram.c:178
#define tLSHIFTA
Definition: wsgram.c:243
#define tOR
Definition: wsgram.c:229
#define tIDIVA
Definition: wsgram.c:175
#define tIF
Definition: wsgram.c:184
#define tNAME
Definition: wsgram.c:187
#define tMETA
Definition: wsgram.c:186
#define tWHILE
Definition: wsgram.c:194
#define tISVALID
Definition: wsgram.c:185
#define tFLOAT
Definition: wsgram.c:167
#define tNEW
Definition: wsgram.c:199
#define tTRUE
Definition: wsgram.c:164
#define tEXTERN
Definition: wsgram.c:179
#define tPRIVATE
Definition: wsgram.c:216
#define tURL
Definition: wsgram.c:195
#define tBREAK
Definition: wsgram.c:172
#define tEQ
Definition: wsgram.c:224
#define tMULA
Definition: wsgram.c:237
#define tNE
Definition: wsgram.c:227
#define tSUBA
Definition: wsgram.c:236
#define tINVALID
Definition: wsgram.c:163
#define tHEADER
Definition: wsgram.c:182
#define tRETURN
Definition: wsgram.c:189
#define tELSE
Definition: wsgram.c:177
#define tCONST
Definition: wsgram.c:207
#define tENUM
Definition: wsgram.c:211
#define tLE
Definition: wsgram.c:225
#define tTRY
Definition: wsgram.c:223
#define tMINUSMINUS
Definition: wsgram.c:231
#define tSIZEOF
Definition: wsgram.c:218
#define tFUNCTION
Definition: wsgram.c:181
#define tINTEGER
Definition: wsgram.c:166
#define tUSER
Definition: wsgram.c:192
#define tCLASS
Definition: wsgram.c:206
#define tXORA
Definition: wsgram.c:241
#define tORA
Definition: wsgram.c:240
#define tLSHIFT
Definition: wsgram.c:232
#define tHTTP
Definition: wsgram.c:183
#define tFINALLY
Definition: wsgram.c:214
#define tIDENTIFIER
Definition: wsgram.c:169
#define tVOID
Definition: wsgram.c:202
#define tEXPORT
Definition: wsgram.c:212
#define tIDIV
Definition: wsgram.c:174
#define tRSZSHIFT
Definition: wsgram.c:234
#define tADDA
Definition: wsgram.c:235
#define tANDA
Definition: wsgram.c:239
#define tDEBUGGER
Definition: wsgram.c:208
#define tDEFAULT
Definition: wsgram.c:209
#define tSTRUCT
Definition: wsgram.c:219
#define tCONTINUE
Definition: wsgram.c:173
#define tTHIS
Definition: wsgram.c:201
#define tSUPER
Definition: wsgram.c:220
#define tCASE
Definition: wsgram.c:204
#define tSTRING
Definition: wsgram.c:168

Function Documentation

static void yydestruct ( char *  yymsg,
int  yytype,
YYSTYPE yyvaluep,
YYLTYPE yylocationp 
) const
static

Definition at line 1534 of file wsgram.c.

References YY_SYMBOL_PRINT, and YYUSE.

Referenced by yyparse().

1540 {
1541  YYUSE (yyvaluep);
1542  YYUSE (yylocationp);
1543 
1544  if (!yymsg)
1545  yymsg = "Deleting";
1546  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1547 
1548  switch (yytype)
1549  {
1550 
1551  default:
1552  break;
1553  }
1554 }
#define YYUSE(e)
Definition: wsgram.c:409
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: wsgram.c:1288
void yyerror ( char *  msg)

Definition at line 2789 of file wsgram.c.

References WsCompilerRec::input_name, and WsCompilerRec::linenum.

2790 {
2791 #if WS_DEBUG
2792  fprintf(stderr, "*** %s:%ld: wsc: %s - this msg will be removed ***\n",
2793  global_compiler->input_name, global_compiler->linenum, msg);
2794 #endif /* WS_DEBUG */
2795 }
static XMLRPCDocument * msg
Definition: test_xmlrpc.c:86
int yyparse ( )
int yyparse ( void *  YYPARSE_PARAM)

Definition at line 1589 of file wsgram.c.

References WsCompilerRec::bc, YYSTYPE::boolean, YYSTYPE::expr, YYLTYPE::first_column, YYLTYPE::first_line, WsStatementRec::first_line, YYSTYPE::identifier, YYSTYPE::integer, YYLTYPE::last_column, YYLTYPE::last_line, YYSTYPE::list, YYSTYPE::meta_body, WsCompilerParamsRec::meta_http_equiv_cb, WsCompilerParamsRec::meta_http_equiv_cb_context, WsCompilerParamsRec::meta_name_cb, WsCompilerParamsRec::meta_name_cb_context, name, WsCompilerRec::params, YYSTYPE::stmt, YYSTYPE::string, tADDA, tANDA, tDIVA, tIDIVA, tLSHIFTA, tMULA, tORA, tREMA, tRSSHIFTA, tRSZSHIFTA, tSUBA, tXORA, WsFunctionHashRec::usage_count, YYSTYPE::vardec, YYSTYPE::vfloat, WS_ASM_ADD, WS_ASM_B_AND, WS_ASM_B_LSHIFT, WS_ASM_B_NOT, WS_ASM_B_OR, WS_ASM_B_RSSHIFT, WS_ASM_B_RSZSHIFT, WS_ASM_B_XOR, WS_ASM_DIV, WS_ASM_EQ, WS_ASM_GE, WS_ASM_GT, WS_ASM_IDIV, WS_ASM_ISVALID, WS_ASM_LE, WS_ASM_LT, WS_ASM_MUL, WS_ASM_NE, WS_ASM_NOT, WS_ASM_REM, WS_ASM_SCAND, WS_ASM_SCOR, WS_ASM_SUB, WS_ASM_TYPEOF, WS_ASM_UMINUS, ws_bc_add_pragma_access_domain(), ws_bc_add_pragma_access_path(), ws_bc_add_pragma_user_agent_property(), ws_bc_add_pragma_user_agent_property_and_scheme(), ws_error_memory(), ws_error_syntax(), ws_expr_assign(), ws_expr_binary(), ws_expr_call(), ws_expr_comma(), ws_expr_conditional(), ws_expr_const_false(), ws_expr_const_float(), ws_expr_const_integer(), ws_expr_const_invalid(), ws_expr_const_string(), ws_expr_const_true(), ws_expr_logical(), ws_expr_postfix_var(), ws_expr_symbol(), ws_expr_unary(), ws_expr_unary_var(), ws_f_strdup(), WS_FALSE, ws_formal_parameter(), ws_function(), ws_function_hash(), ws_lexer_free_block(), ws_lexer_free_utf8(), ws_list_append(), ws_list_new(), ws_pragma_meta_body(), ws_pragma_meta_body_free(), ws_pragma_use(), ws_stmt_block(), ws_stmt_break(), ws_stmt_continue(), ws_stmt_empty(), ws_stmt_expr(), ws_stmt_for(), ws_stmt_if(), ws_stmt_return(), ws_stmt_variable(), ws_stmt_while(), ws_strdup(), WS_TRUE, ws_variable_declaration(), YY_, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yychar, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror, YYFINAL, YYID, YYINITDEPTH, YYLAST, YYLEX, yylloc, YYLLOC_DEFAULT, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, YYPACT_NINF, YYPOPSTACK, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_ALLOC_MAXIMUM, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, YYTABLE_NINF, YYTERROR, and YYTRANSLATE.

1603 {
1604  /* The look-ahead symbol. */
1605 int yychar;
1606 
1607 /* The semantic value of the look-ahead symbol. */
1608 YYSTYPE yylval;
1609 
1610 /* Number of syntax errors so far. */
1611 int yynerrs;
1612 /* Location data for the look-ahead symbol. */
1613 YYLTYPE yylloc;
1614 
1615  int yystate;
1616  int yyn;
1617  int yyresult;
1618  /* Number of tokens to shift before error messages enabled. */
1619  int yyerrstatus;
1620  /* Look-ahead token as an internal (translated) token number. */
1621  int yytoken = 0;
1622 #if YYERROR_VERBOSE
1623  /* Buffer for error messages, and its allocated size. */
1624  char yymsgbuf[128];
1625  char *yymsg = yymsgbuf;
1626  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1627 #endif
1628 
1629  /* Three stacks and their tools:
1630  `yyss': related to states,
1631  `yyvs': related to semantic values,
1632  `yyls': related to locations.
1633 
1634  Refer to the stacks thru separate pointers, to allow yyoverflow
1635  to reallocate them elsewhere. */
1636 
1637  /* The state stack. */
1638  yytype_int16 yyssa[YYINITDEPTH];
1639  yytype_int16 *yyss = yyssa;
1640  yytype_int16 *yyssp;
1641 
1642  /* The semantic value stack. */
1643  YYSTYPE yyvsa[YYINITDEPTH];
1644  YYSTYPE *yyvs = yyvsa;
1645  YYSTYPE *yyvsp;
1646 
1647  /* The location stack. */
1648  YYLTYPE yylsa[YYINITDEPTH];
1649  YYLTYPE *yyls = yylsa;
1650  YYLTYPE *yylsp;
1651  /* The locations where the error started and ended. */
1652  YYLTYPE yyerror_range[2];
1653 
1654 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1655 
1656  YYSIZE_T yystacksize = YYINITDEPTH;
1657 
1658  /* The variables used to return semantic value and location from the
1659  action routines. */
1660  YYSTYPE yyval;
1661  YYLTYPE yyloc;
1662 
1663  /* The number of symbols on the RHS of the reduced rule.
1664  Keep to zero when no symbol should be popped. */
1665  int yylen = 0;
1666 
1667  YYDPRINTF ((stderr, "Starting parse\n"));
1668 
1669  yystate = 0;
1670  yyerrstatus = 0;
1671  yynerrs = 0;
1672  yychar = YYEMPTY; /* Cause a token to be read. */
1673 
1674  /* Initialize stack pointers.
1675  Waste one element of value and location stack
1676  so that they stay on the same level as the state stack.
1677  The wasted elements are never initialized. */
1678 
1679  yyssp = yyss;
1680  yyvsp = yyvs;
1681  yylsp = yyls;
1682 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
1683  /* Initialize the default location before parsing starts. */
1684  yylloc.first_line = yylloc.last_line = 1;
1685  yylloc.first_column = yylloc.last_column = 0;
1686 #endif
1687 
1688  goto yysetstate;
1689 
1690 /*------------------------------------------------------------.
1691 | yynewstate -- Push a new state, which is found in yystate. |
1692 `------------------------------------------------------------*/
1693  yynewstate:
1694  /* In all cases, when you get here, the value and location stacks
1695  have just been pushed. So pushing a state here evens the stacks. */
1696  yyssp++;
1697 
1698  yysetstate:
1699  *yyssp = yystate;
1700 
1701  if (yyss + yystacksize - 1 <= yyssp)
1702  {
1703  /* Get the current used size of the three stacks, in elements. */
1704  YYSIZE_T yysize = yyssp - yyss + 1;
1705 
1706 #ifdef yyoverflow
1707  {
1708  /* Give user a chance to reallocate the stack. Use copies of
1709  these so that the &'s don't force the real ones into
1710  memory. */
1711  YYSTYPE *yyvs1 = yyvs;
1712  yytype_int16 *yyss1 = yyss;
1713  YYLTYPE *yyls1 = yyls;
1714 
1715  /* Each stack pointer address is followed by the size of the
1716  data in use in that stack, in bytes. This used to be a
1717  conditional around just the two extra args, but that might
1718  be undefined if yyoverflow is a macro. */
1719  yyoverflow (YY_("memory exhausted"),
1720  &yyss1, yysize * sizeof (*yyssp),
1721  &yyvs1, yysize * sizeof (*yyvsp),
1722  &yyls1, yysize * sizeof (*yylsp),
1723  &yystacksize);
1724  yyls = yyls1;
1725  yyss = yyss1;
1726  yyvs = yyvs1;
1727  }
1728 #else /* no yyoverflow */
1729 # ifndef YYSTACK_RELOCATE
1730  goto yyexhaustedlab;
1731 # else
1732  /* Extend the stack our own way. */
1733  if (YYMAXDEPTH <= yystacksize)
1734  goto yyexhaustedlab;
1735  yystacksize *= 2;
1736  if (YYMAXDEPTH < yystacksize)
1737  yystacksize = YYMAXDEPTH;
1738 
1739  {
1740  yytype_int16 *yyss1 = yyss;
1741  union yyalloc *yyptr =
1742  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1743  if (! yyptr)
1744  goto yyexhaustedlab;
1745  YYSTACK_RELOCATE (yyss);
1746  YYSTACK_RELOCATE (yyvs);
1747  YYSTACK_RELOCATE (yyls);
1748 # undef YYSTACK_RELOCATE
1749  if (yyss1 != yyssa)
1750  YYSTACK_FREE (yyss1);
1751  }
1752 # endif
1753 #endif /* no yyoverflow */
1754 
1755  yyssp = yyss + yysize - 1;
1756  yyvsp = yyvs + yysize - 1;
1757  yylsp = yyls + yysize - 1;
1758 
1759  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1760  (unsigned long int) yystacksize));
1761 
1762  if (yyss + yystacksize - 1 <= yyssp)
1763  YYABORT;
1764  }
1765 
1766  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1767 
1768  goto yybackup;
1769 
1770 /*-----------.
1771 | yybackup. |
1772 `-----------*/
1773 yybackup:
1774 
1775  /* Do appropriate processing given the current state. Read a
1776  look-ahead token if we need one and don't already have one. */
1777 
1778  /* First try to decide what to do without reference to look-ahead token. */
1779  yyn = yypact[yystate];
1780  if (yyn == YYPACT_NINF)
1781  goto yydefault;
1782 
1783  /* Not known => get a look-ahead token if don't already have one. */
1784 
1785  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
1786  if (yychar == YYEMPTY)
1787  {
1788  YYDPRINTF ((stderr, "Reading a token: "));
1789  yychar = YYLEX;
1790  }
1791 
1792  if (yychar <= YYEOF)
1793  {
1794  yychar = yytoken = YYEOF;
1795  YYDPRINTF ((stderr, "Now at end of input.\n"));
1796  }
1797  else
1798  {
1799  yytoken = YYTRANSLATE (yychar);
1800  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1801  }
1802 
1803  /* If the proper action on seeing token YYTOKEN is to reduce or to
1804  detect an error, take that action. */
1805  yyn += yytoken;
1806  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1807  goto yydefault;
1808  yyn = yytable[yyn];
1809  if (yyn <= 0)
1810  {
1811  if (yyn == 0 || yyn == YYTABLE_NINF)
1812  goto yyerrlab;
1813  yyn = -yyn;
1814  goto yyreduce;
1815  }
1816 
1817  if (yyn == YYFINAL)
1818  YYACCEPT;
1819 
1820  /* Count tokens shifted since error; after three, turn off error
1821  status. */
1822  if (yyerrstatus)
1823  yyerrstatus--;
1824 
1825  /* Shift the look-ahead token. */
1826  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1827 
1828  /* Discard the shifted token unless it is eof. */
1829  if (yychar != YYEOF)
1830  yychar = YYEMPTY;
1831 
1832  yystate = yyn;
1833  *++yyvsp = yylval;
1834  *++yylsp = yylloc;
1835  goto yynewstate;
1836 
1837 
1838 /*-----------------------------------------------------------.
1839 | yydefault -- do the default action for the current state. |
1840 `-----------------------------------------------------------*/
1841 yydefault:
1842  yyn = yydefact[yystate];
1843  if (yyn == 0)
1844  goto yyerrlab;
1845  goto yyreduce;
1846 
1847 
1848 /*-----------------------------.
1849 | yyreduce -- Do a reduction. |
1850 `-----------------------------*/
1851 yyreduce:
1852  /* yyn is the number of a rule to reduce with. */
1853  yylen = yyr2[yyn];
1854 
1855  /* If YYLEN is nonzero, implement the default value of the action:
1856  `$$ = $1'.
1857 
1858  Otherwise, the following line sets YYVAL to garbage.
1859  This behavior is undocumented and Bison
1860  users should not rely upon it. Assigning to YYVAL
1861  unconditionally makes the parser a bit smaller, and it avoids a
1862  GCC warning that YYVAL may be used uninitialized. */
1863  yyval = yyvsp[1-yylen];
1864 
1865  /* Default location. */
1866  YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1867  YY_REDUCE_PRINT (yyn);
1868  switch (yyn)
1869  {
1870  case 4:
1871 #line 125 "wmlscript/wsgram.y"
1872  { ws_error_syntax(pctx, (yylsp[(1) - (1)]).first_line); }
1873  break;
1874 
1875  case 8:
1876 #line 138 "wmlscript/wsgram.y"
1877  { ws_error_syntax(pctx, (yylsp[(1) - (1)]).first_line); }
1878  break;
1879 
1880  case 12:
1881 #line 149 "wmlscript/wsgram.y"
1882  { ws_pragma_use(pctx, (yylsp[(2) - (3)]).first_line, (yyvsp[(2) - (3)].identifier), (yyvsp[(3) - (3)].string)); }
1883  break;
1884 
1885  case 14:
1886 #line 158 "wmlscript/wsgram.y"
1887  {
1888  WsCompiler *compiler = (WsCompiler *) pctx;
1889 
1890  /* Pass this to the byte-code */
1891  if (!ws_bc_add_pragma_access_domain(compiler->bc, (yyvsp[(2) - (2)].string)->data,
1892  (yyvsp[(2) - (2)].string)->len))
1893  ws_error_memory(pctx);
1894  ws_lexer_free_utf8(compiler, (yyvsp[(2) - (2)].string));
1895  }
1896  break;
1897 
1898  case 15:
1899 #line 168 "wmlscript/wsgram.y"
1900  {
1901  WsCompiler *compiler = (WsCompiler *) pctx;
1902 
1903  /* Pass this to the byte-code */
1904  if (!ws_bc_add_pragma_access_path(compiler->bc, (yyvsp[(2) - (2)].string)->data,
1905  (yyvsp[(2) - (2)].string)->len))
1906  ws_error_memory(pctx);
1907 
1908  ws_lexer_free_utf8(compiler, (yyvsp[(2) - (2)].string));
1909  }
1910  break;
1911 
1912  case 16:
1913 #line 179 "wmlscript/wsgram.y"
1914  {
1915  WsCompiler *compiler = (WsCompiler *) pctx;
1916  WsBool success = WS_TRUE;
1917 
1918  /* Pass these to the byte-code */
1919  if (!ws_bc_add_pragma_access_domain(compiler->bc, (yyvsp[(2) - (4)].string)->data,
1920  (yyvsp[(2) - (4)].string)->len))
1921  success = WS_FALSE;
1922 
1923  if (!ws_bc_add_pragma_access_path(compiler->bc, (yyvsp[(4) - (4)].string)->data,
1924  (yyvsp[(4) - (4)].string)->len))
1925  success = WS_FALSE;
1926 
1927  if (!success)
1928  ws_error_memory(pctx);
1929 
1930  ws_lexer_free_utf8(compiler, (yyvsp[(2) - (4)].string));
1931  ws_lexer_free_utf8(compiler, (yyvsp[(4) - (4)].string));
1932  }
1933  break;
1934 
1935  case 21:
1936 #line 212 "wmlscript/wsgram.y"
1937  {
1938  WsCompiler *compiler = (WsCompiler *) pctx;
1939 
1940  /* Meta information for the origin servers. Show it
1941  * to the user if requested. */
1942  if (compiler->params.meta_name_cb)
1943  (*compiler->params.meta_name_cb)(
1944  (yyvsp[(2) - (2)].meta_body)->property_name, (yyvsp[(2) - (2)].meta_body)->content,
1945  (yyvsp[(2) - (2)].meta_body)->scheme,
1946  compiler->params.meta_name_cb_context);
1947 
1948  /* We do not need the MetaBody anymore. */
1949  ws_pragma_meta_body_free(compiler, (yyvsp[(2) - (2)].meta_body));
1950  }
1951  break;
1952 
1953  case 22:
1954 #line 230 "wmlscript/wsgram.y"
1955  {
1956  WsCompiler *compiler = (WsCompiler *) pctx;
1957 
1958  /* Meta information HTTP header that should be
1959  * included to an HTTP response header. Show it to
1960  * the user if requested. */
1961  if (compiler->params.meta_http_equiv_cb)
1962  (*compiler->params.meta_http_equiv_cb)(
1963  (yyvsp[(3) - (3)].meta_body)->property_name,
1964  (yyvsp[(3) - (3)].meta_body)->content,
1965  (yyvsp[(3) - (3)].meta_body)->scheme,
1967 
1968  /* We do not need the MetaBody anymore. */
1969  ws_pragma_meta_body_free(compiler, (yyvsp[(3) - (3)].meta_body));
1970  }
1971  break;
1972 
1973  case 23:
1974 #line 250 "wmlscript/wsgram.y"
1975  {
1976  WsBool success;
1977  WsCompiler *compiler = (WsCompiler *) pctx;
1978 
1979  /* Pass this pragma to the byte-code */
1980  if ((yyvsp[(3) - (3)].meta_body)) {
1981  if ((yyvsp[(3) - (3)].meta_body)->scheme)
1982  success
1984  compiler->bc,
1985  (yyvsp[(3) - (3)].meta_body)->property_name->data,
1986  (yyvsp[(3) - (3)].meta_body)->property_name->len,
1987  (yyvsp[(3) - (3)].meta_body)->content->data,
1988  (yyvsp[(3) - (3)].meta_body)->content->len,
1989  (yyvsp[(3) - (3)].meta_body)->scheme->data,
1990  (yyvsp[(3) - (3)].meta_body)->scheme->len);
1991  else
1993  compiler->bc,
1994  (yyvsp[(3) - (3)].meta_body)->property_name->data,
1995  (yyvsp[(3) - (3)].meta_body)->property_name->len,
1996  (yyvsp[(3) - (3)].meta_body)->content->data,
1997  (yyvsp[(3) - (3)].meta_body)->content->len);
1998 
1999  /* Free the MetaBody. */
2000  ws_pragma_meta_body_free(compiler, (yyvsp[(3) - (3)].meta_body));
2001 
2002  if (!success)
2003  ws_error_memory(pctx);
2004  }
2005  }
2006  break;
2007 
2008  case 24:
2009 #line 285 "wmlscript/wsgram.y"
2010  { (yyval.meta_body) = ws_pragma_meta_body(pctx, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].string), NULL); }
2011  break;
2012 
2013  case 25:
2014 #line 287 "wmlscript/wsgram.y"
2015  { (yyval.meta_body) = ws_pragma_meta_body(pctx, (yyvsp[(1) - (3)].string), (yyvsp[(2) - (3)].string), (yyvsp[(3) - (3)].string)); }
2016  break;
2017 
2018  case 31:
2019 #line 304 "wmlscript/wsgram.y"
2020  {
2021  char *name = ws_strdup((yyvsp[(3) - (8)].identifier));
2022 
2023  ws_lexer_free_block(pctx, (yyvsp[(3) - (8)].identifier));
2024 
2025  if (name)
2026  ws_function(pctx, (yyvsp[(1) - (8)].boolean), name, (yylsp[(3) - (8)]).first_line, (yyvsp[(5) - (8)].list), (yyvsp[(7) - (8)].list));
2027  else
2028  ws_error_memory(pctx);
2029  }
2030  break;
2031 
2032  case 32:
2033 #line 317 "wmlscript/wsgram.y"
2034  { (yyval.boolean) = WS_FALSE; }
2035  break;
2036 
2037  case 33:
2038 #line 318 "wmlscript/wsgram.y"
2039  { (yyval.boolean) = WS_TRUE; }
2040  break;
2041 
2042  case 34:
2043 #line 323 "wmlscript/wsgram.y"
2044  { (yyval.list) = ws_list_new(pctx); }
2045  break;
2046 
2047  case 38:
2048 #line 334 "wmlscript/wsgram.y"
2049  {
2050  char *id;
2051  WsFormalParm *parm;
2052 
2053  id = ws_f_strdup(((WsCompiler *) pctx)->pool_stree, (yyvsp[(1) - (1)].identifier));
2054  parm = ws_formal_parameter(pctx, (yylsp[(1) - (1)]).first_line, id);
2055 
2056  ws_lexer_free_block(pctx, (yyvsp[(1) - (1)].identifier));
2057 
2058  if (id == NULL || parm == NULL) {
2059  ws_error_memory(pctx);
2060  (yyval.list) = NULL;
2061  } else {
2062  (yyval.list) = ws_list_new(pctx);
2063  ws_list_append(pctx, (yyval.list), parm);
2064  }
2065  }
2066  break;
2067 
2068  case 39:
2069 #line 352 "wmlscript/wsgram.y"
2070  {
2071  char *id;
2072  WsFormalParm *parm;
2073 
2074  id = ws_f_strdup(((WsCompiler *) pctx)->pool_stree, (yyvsp[(3) - (3)].identifier));
2075  parm = ws_formal_parameter(pctx, (yylsp[(1) - (3)]).first_line, id);
2076 
2077  ws_lexer_free_block(pctx, (yyvsp[(3) - (3)].identifier));
2078 
2079  if (id == NULL || parm == NULL) {
2080  ws_error_memory(pctx);
2081  (yyval.list) = NULL;
2082  } else
2083  ws_list_append(pctx, (yyvsp[(1) - (3)].list), parm);
2084  }
2085  break;
2086 
2087  case 40:
2088 #line 373 "wmlscript/wsgram.y"
2089  {
2090  if ((yyvsp[(1) - (1)].list))
2091  (yyval.stmt) = ws_stmt_block(pctx, (yyvsp[(1) - (1)].list)->first_line, (yyvsp[(1) - (1)].list)->last_line,
2092  (yyvsp[(1) - (1)].list));
2093  else
2094  (yyval.stmt) = NULL;
2095  }
2096  break;
2097 
2098  case 42:
2099 #line 382 "wmlscript/wsgram.y"
2100  { (yyval.stmt) = ws_stmt_empty(pctx, (yylsp[(1) - (1)]).first_line); }
2101  break;
2102 
2103  case 43:
2104 #line 384 "wmlscript/wsgram.y"
2105  { (yyval.stmt) = ws_stmt_expr(pctx, (yyvsp[(1) - (2)].expr)->line, (yyvsp[(1) - (2)].expr)); }
2106  break;
2107 
2108  case 46:
2109 #line 388 "wmlscript/wsgram.y"
2110  { (yyval.stmt) = ws_stmt_continue(pctx, (yylsp[(1) - (2)]).first_line); }
2111  break;
2112 
2113  case 47:
2114 #line 390 "wmlscript/wsgram.y"
2115  { (yyval.stmt) = ws_stmt_break(pctx, (yylsp[(1) - (2)]).first_line); }
2116  break;
2117 
2118  case 49:
2119 #line 395 "wmlscript/wsgram.y"
2120  {
2121  (yyval.list) = (yyvsp[(2) - (3)].list);
2122  if ((yyval.list)) {
2123  (yyval.list)->first_line = (yylsp[(1) - (3)]).first_line;
2124  (yyval.list)->last_line = (yylsp[(3) - (3)]).first_line;
2125  }
2126  }
2127  break;
2128 
2129  case 50:
2130 #line 403 "wmlscript/wsgram.y"
2131  {
2132  ws_error_syntax(pctx, (yylsp[(1) - (1)]).first_line);
2133  (yyval.list) = NULL;
2134  }
2135  break;
2136 
2137  case 51:
2138 #line 411 "wmlscript/wsgram.y"
2139  { (yyval.list) = ws_list_new(pctx); }
2140  break;
2141 
2142  case 53:
2143 #line 417 "wmlscript/wsgram.y"
2144  {
2145  (yyval.list) = ws_list_new(pctx);
2146  ws_list_append(pctx, (yyval.list), (yyvsp[(1) - (1)].stmt));
2147  }
2148  break;
2149 
2150  case 54:
2151 #line 422 "wmlscript/wsgram.y"
2152  { ws_list_append(pctx, (yyvsp[(1) - (2)].list), (yyvsp[(2) - (2)].stmt)); }
2153  break;
2154 
2155  case 55:
2156 #line 427 "wmlscript/wsgram.y"
2157  { (yyval.stmt) = ws_stmt_variable(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(2) - (3)].list)); }
2158  break;
2159 
2160  case 56:
2161 #line 429 "wmlscript/wsgram.y"
2162  { ws_error_syntax(pctx, (yylsp[(2) - (2)]).first_line); }
2163  break;
2164 
2165  case 57:
2166 #line 434 "wmlscript/wsgram.y"
2167  {
2168  (yyval.list) = ws_list_new(pctx);
2169  ws_list_append(pctx, (yyval.list), (yyvsp[(1) - (1)].vardec));
2170  }
2171  break;
2172 
2173  case 58:
2174 #line 439 "wmlscript/wsgram.y"
2175  { ws_list_append(pctx, (yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].vardec)); }
2176  break;
2177 
2178  case 59:
2179 #line 444 "wmlscript/wsgram.y"
2180  {
2181  char *id = ws_f_strdup(((WsCompiler *) pctx)->pool_stree,
2182  (yyvsp[(1) - (2)].identifier));
2183 
2184  ws_lexer_free_block(pctx, (yyvsp[(1) - (2)].identifier));
2185  if (id == NULL) {
2186  ws_error_memory(pctx);
2187  (yyval.vardec) = NULL;
2188  } else
2189  (yyval.vardec) = ws_variable_declaration(pctx, id, (yyvsp[(2) - (2)].expr));
2190  }
2191  break;
2192 
2193  case 60:
2194 #line 459 "wmlscript/wsgram.y"
2195  { (yyval.expr) = NULL; }
2196  break;
2197 
2198  case 61:
2199 #line 461 "wmlscript/wsgram.y"
2200  { (yyval.expr) = (yyvsp[(2) - (2)].expr); }
2201  break;
2202 
2203  case 62:
2204 #line 466 "wmlscript/wsgram.y"
2205  { (yyval.stmt) = ws_stmt_if(pctx, (yylsp[(1) - (7)]).first_line, (yyvsp[(3) - (7)].expr), (yyvsp[(5) - (7)].stmt), (yyvsp[(7) - (7)].stmt)); }
2206  break;
2207 
2208  case 63:
2209 #line 468 "wmlscript/wsgram.y"
2210  { (yyval.stmt) = ws_stmt_if(pctx, (yylsp[(1) - (5)]).first_line, (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].stmt), NULL); }
2211  break;
2212 
2213  case 64:
2214 #line 473 "wmlscript/wsgram.y"
2215  { (yyval.stmt) = ws_stmt_while(pctx, (yylsp[(1) - (5)]).first_line, (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].stmt)); }
2216  break;
2217 
2218  case 66:
2219 #line 480 "wmlscript/wsgram.y"
2220  { (yyval.stmt) = ws_stmt_for(pctx, (yylsp[(1) - (9)]).first_line, NULL, (yyvsp[(3) - (9)].expr), (yyvsp[(5) - (9)].expr), (yyvsp[(7) - (9)].expr), (yyvsp[(9) - (9)].stmt)); }
2221  break;
2222 
2223  case 67:
2224 #line 483 "wmlscript/wsgram.y"
2225  { (yyval.stmt) = ws_stmt_for(pctx, (yylsp[(1) - (10)]).first_line, (yyvsp[(4) - (10)].list), NULL, (yyvsp[(6) - (10)].expr), (yyvsp[(8) - (10)].expr), (yyvsp[(10) - (10)].stmt)); }
2226  break;
2227 
2228  case 68:
2229 #line 488 "wmlscript/wsgram.y"
2230  { (yyval.stmt) = ws_stmt_return(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(2) - (3)].expr)); }
2231  break;
2232 
2233  case 69:
2234 #line 494 "wmlscript/wsgram.y"
2235  { (yyval.expr) = NULL; }
2236  break;
2237 
2238  case 72:
2239 #line 502 "wmlscript/wsgram.y"
2240  { (yyval.expr) = ws_expr_comma(pctx, (yylsp[(2) - (3)]).first_line, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2241  break;
2242 
2243  case 74:
2244 #line 508 "wmlscript/wsgram.y"
2245  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), '=', (yyvsp[(3) - (3)].expr)); }
2246  break;
2247 
2248  case 75:
2249 #line 510 "wmlscript/wsgram.y"
2250  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tMULA, (yyvsp[(3) - (3)].expr)); }
2251  break;
2252 
2253  case 76:
2254 #line 512 "wmlscript/wsgram.y"
2255  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tDIVA, (yyvsp[(3) - (3)].expr)); }
2256  break;
2257 
2258  case 77:
2259 #line 514 "wmlscript/wsgram.y"
2260  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tREMA, (yyvsp[(3) - (3)].expr)); }
2261  break;
2262 
2263  case 78:
2264 #line 516 "wmlscript/wsgram.y"
2265  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tADDA, (yyvsp[(3) - (3)].expr)); }
2266  break;
2267 
2268  case 79:
2269 #line 518 "wmlscript/wsgram.y"
2270  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tSUBA, (yyvsp[(3) - (3)].expr)); }
2271  break;
2272 
2273  case 80:
2274 #line 520 "wmlscript/wsgram.y"
2275  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tLSHIFTA, (yyvsp[(3) - (3)].expr)); }
2276  break;
2277 
2278  case 81:
2279 #line 522 "wmlscript/wsgram.y"
2280  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tRSSHIFTA, (yyvsp[(3) - (3)].expr)); }
2281  break;
2282 
2283  case 82:
2284 #line 524 "wmlscript/wsgram.y"
2285  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tRSZSHIFTA, (yyvsp[(3) - (3)].expr)); }
2286  break;
2287 
2288  case 83:
2289 #line 526 "wmlscript/wsgram.y"
2290  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tANDA, (yyvsp[(3) - (3)].expr)); }
2291  break;
2292 
2293  case 84:
2294 #line 528 "wmlscript/wsgram.y"
2295  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tXORA, (yyvsp[(3) - (3)].expr)); }
2296  break;
2297 
2298  case 85:
2299 #line 530 "wmlscript/wsgram.y"
2300  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tORA, (yyvsp[(3) - (3)].expr)); }
2301  break;
2302 
2303  case 86:
2304 #line 532 "wmlscript/wsgram.y"
2305  { (yyval.expr) = ws_expr_assign(pctx, (yylsp[(1) - (3)]).first_line, (yyvsp[(1) - (3)].identifier), tIDIVA, (yyvsp[(3) - (3)].expr)); }
2306  break;
2307 
2308  case 88:
2309 #line 538 "wmlscript/wsgram.y"
2310  { (yyval.expr) = ws_expr_conditional(pctx, (yylsp[(2) - (5)]).first_line, (yyvsp[(1) - (5)].expr), (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].expr)); }
2311  break;
2312 
2313  case 90:
2314 #line 544 "wmlscript/wsgram.y"
2315  { (yyval.expr) = ws_expr_logical(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_SCOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2316  break;
2317 
2318  case 92:
2319 #line 550 "wmlscript/wsgram.y"
2320  { (yyval.expr) = ws_expr_logical(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_SCAND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2321  break;
2322 
2323  case 94:
2324 #line 556 "wmlscript/wsgram.y"
2325  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_B_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2326  break;
2327 
2328  case 96:
2329 #line 562 "wmlscript/wsgram.y"
2330  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_B_XOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2331  break;
2332 
2333  case 98:
2334 #line 568 "wmlscript/wsgram.y"
2335  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_B_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2336  break;
2337 
2338  case 100:
2339 #line 574 "wmlscript/wsgram.y"
2340  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_EQ, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2341  break;
2342 
2343  case 101:
2344 #line 576 "wmlscript/wsgram.y"
2345  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_NE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2346  break;
2347 
2348  case 103:
2349 #line 582 "wmlscript/wsgram.y"
2350  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_LT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2351  break;
2352 
2353  case 104:
2354 #line 584 "wmlscript/wsgram.y"
2355  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_GT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2356  break;
2357 
2358  case 105:
2359 #line 586 "wmlscript/wsgram.y"
2360  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_LE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2361  break;
2362 
2363  case 106:
2364 #line 588 "wmlscript/wsgram.y"
2365  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_GE, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2366  break;
2367 
2368  case 108:
2369 #line 594 "wmlscript/wsgram.y"
2370  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_B_LSHIFT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2371  break;
2372 
2373  case 109:
2374 #line 596 "wmlscript/wsgram.y"
2375  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_B_RSSHIFT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2376  break;
2377 
2378  case 110:
2379 #line 598 "wmlscript/wsgram.y"
2380  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_B_RSZSHIFT, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2381  break;
2382 
2383  case 112:
2384 #line 604 "wmlscript/wsgram.y"
2385  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_ADD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2386  break;
2387 
2388  case 113:
2389 #line 606 "wmlscript/wsgram.y"
2390  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_SUB, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2391  break;
2392 
2393  case 115:
2394 #line 612 "wmlscript/wsgram.y"
2395  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_MUL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2396  break;
2397 
2398  case 116:
2399 #line 614 "wmlscript/wsgram.y"
2400  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_DIV, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2401  break;
2402 
2403  case 117:
2404 #line 616 "wmlscript/wsgram.y"
2405  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_IDIV, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2406  break;
2407 
2408  case 118:
2409 #line 618 "wmlscript/wsgram.y"
2410  { (yyval.expr) = ws_expr_binary(pctx, (yylsp[(2) - (3)]).first_line, WS_ASM_REM, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); }
2411  break;
2412 
2413  case 120:
2414 #line 624 "wmlscript/wsgram.y"
2415  { (yyval.expr) = ws_expr_unary(pctx, (yylsp[(1) - (2)]).first_line, WS_ASM_TYPEOF, (yyvsp[(2) - (2)].expr)); }
2416  break;
2417 
2418  case 121:
2419 #line 626 "wmlscript/wsgram.y"
2420  { (yyval.expr) = ws_expr_unary(pctx, (yylsp[(1) - (2)]).first_line, WS_ASM_ISVALID, (yyvsp[(2) - (2)].expr)); }
2421  break;
2422 
2423  case 122:
2424 #line 628 "wmlscript/wsgram.y"
2425  { (yyval.expr) = ws_expr_unary_var(pctx, (yylsp[(1) - (2)]).first_line, WS_TRUE, (yyvsp[(2) - (2)].identifier)); }
2426  break;
2427 
2428  case 123:
2429 #line 630 "wmlscript/wsgram.y"
2430  { (yyval.expr) = ws_expr_unary_var(pctx, (yylsp[(1) - (2)]).first_line, WS_FALSE, (yyvsp[(2) - (2)].identifier)); }
2431  break;
2432 
2433  case 124:
2434 #line 632 "wmlscript/wsgram.y"
2435  {
2436  /* There is no direct way to compile unary `+'.
2437  * It doesn't do anything except require type conversion
2438  * (section 7.2, 7.3.2), and we do that by converting
2439  * it to a binary expression: `UnaryExpression - 0'.
2440  * Using `--UnaryExpression' would not be correct because
2441  * it might overflow if UnaryExpression is the smallest
2442  * possible integer value (see 6.2.7.1).
2443  * Using `UnaryExpression + 0' would not be correct
2444  * because binary `+' accepts strings, which makes the
2445  * type conversion different.
2446  */
2447  (yyval.expr) = ws_expr_binary(pctx, (yylsp[(1) - (2)]).first_line, WS_ASM_SUB, (yyvsp[(2) - (2)].expr),
2448  ws_expr_const_integer(pctx, (yylsp[(1) - (2)]).first_line, 0));
2449  }
2450  break;
2451 
2452  case 125:
2453 #line 648 "wmlscript/wsgram.y"
2454  { (yyval.expr) = ws_expr_unary(pctx, (yylsp[(1) - (2)]).first_line, WS_ASM_UMINUS, (yyvsp[(2) - (2)].expr)); }
2455  break;
2456 
2457  case 126:
2458 #line 650 "wmlscript/wsgram.y"
2459  { (yyval.expr) = ws_expr_unary(pctx, (yylsp[(1) - (2)]).first_line, WS_ASM_B_NOT, (yyvsp[(2) - (2)].expr)); }
2460  break;
2461 
2462  case 127:
2463 #line 652 "wmlscript/wsgram.y"
2464  { (yyval.expr) = ws_expr_unary(pctx, (yylsp[(1) - (2)]).first_line, WS_ASM_NOT, (yyvsp[(2) - (2)].expr)); }
2465  break;
2466 
2467  case 129:
2468 #line 658 "wmlscript/wsgram.y"
2469  { (yyval.expr) = ws_expr_postfix_var(pctx, (yylsp[(1) - (2)]).first_line, WS_TRUE, (yyvsp[(1) - (2)].identifier)); }
2470  break;
2471 
2472  case 130:
2473 #line 660 "wmlscript/wsgram.y"
2474  { (yyval.expr) = ws_expr_postfix_var(pctx, (yylsp[(1) - (2)]).first_line, WS_FALSE, (yyvsp[(1) - (2)].identifier)); }
2475  break;
2476 
2477  case 132:
2478 #line 666 "wmlscript/wsgram.y"
2479  {
2480  WsFunctionHash *f = ws_function_hash(pctx, (yyvsp[(1) - (2)].identifier));
2481 
2482  /* Add an usage count for the local script function. */
2483  if (f)
2484  f->usage_count++;
2485 
2486  (yyval.expr) = ws_expr_call(pctx, (yylsp[(1) - (2)]).first_line, ' ', NULL, (yyvsp[(1) - (2)].identifier), (yyvsp[(2) - (2)].list));
2487  }
2488  break;
2489 
2490  case 133:
2491 #line 676 "wmlscript/wsgram.y"
2492  { (yyval.expr) = ws_expr_call(pctx, (yylsp[(3) - (4)]).first_line, '#', (yyvsp[(1) - (4)].identifier), (yyvsp[(3) - (4)].identifier), (yyvsp[(4) - (4)].list)); }
2493  break;
2494 
2495  case 134:
2496 #line 678 "wmlscript/wsgram.y"
2497  { (yyval.expr) = ws_expr_call(pctx, (yylsp[(3) - (4)]).first_line, '.', (yyvsp[(1) - (4)].identifier), (yyvsp[(3) - (4)].identifier), (yyvsp[(4) - (4)].list)); }
2498  break;
2499 
2500  case 135:
2501 #line 683 "wmlscript/wsgram.y"
2502  { (yyval.expr) = ws_expr_symbol(pctx, (yylsp[(1) - (1)]).first_line, (yyvsp[(1) - (1)].identifier)); }
2503  break;
2504 
2505  case 136:
2506 #line 685 "wmlscript/wsgram.y"
2507  { (yyval.expr) = ws_expr_const_invalid(pctx, (yylsp[(1) - (1)]).first_line); }
2508  break;
2509 
2510  case 137:
2511 #line 687 "wmlscript/wsgram.y"
2512  { (yyval.expr) = ws_expr_const_true(pctx, (yylsp[(1) - (1)]).first_line); }
2513  break;
2514 
2515  case 138:
2516 #line 689 "wmlscript/wsgram.y"
2517  { (yyval.expr) = ws_expr_const_false(pctx, (yylsp[(1) - (1)]).first_line); }
2518  break;
2519 
2520  case 139:
2521 #line 691 "wmlscript/wsgram.y"
2522  { (yyval.expr) = ws_expr_const_integer(pctx, (yylsp[(1) - (1)]).first_line, (yyvsp[(1) - (1)].integer)); }
2523  break;
2524 
2525  case 140:
2526 #line 693 "wmlscript/wsgram.y"
2527  { (yyval.expr) = ws_expr_const_float(pctx, (yylsp[(1) - (1)]).first_line, (yyvsp[(1) - (1)].vfloat)); }
2528  break;
2529 
2530  case 141:
2531 #line 695 "wmlscript/wsgram.y"
2532  { (yyval.expr) = ws_expr_const_string(pctx, (yylsp[(1) - (1)]).first_line, (yyvsp[(1) - (1)].string)); }
2533  break;
2534 
2535  case 142:
2536 #line 697 "wmlscript/wsgram.y"
2537  { (yyval.expr) = (yyvsp[(2) - (3)].expr); }
2538  break;
2539 
2540  case 143:
2541 #line 702 "wmlscript/wsgram.y"
2542  { (yyval.list) = ws_list_new(pctx); }
2543  break;
2544 
2545  case 144:
2546 #line 704 "wmlscript/wsgram.y"
2547  { (yyval.list) = (yyvsp[(2) - (3)].list); }
2548  break;
2549 
2550  case 145:
2551 #line 709 "wmlscript/wsgram.y"
2552  {
2553  (yyval.list) = ws_list_new(pctx);
2554  ws_list_append(pctx, (yyval.list), (yyvsp[(1) - (1)].expr));
2555  }
2556  break;
2557 
2558  case 146:
2559 #line 714 "wmlscript/wsgram.y"
2560  { ws_list_append(pctx, (yyvsp[(1) - (3)].list), (yyvsp[(3) - (3)].expr)); }
2561  break;
2562 
2563 
2564 /* Line 1267 of yacc.c. */
2565 #line 2566 "y.tab.c"
2566  default: break;
2567  }
2568  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2569 
2570  YYPOPSTACK (yylen);
2571  yylen = 0;
2572  YY_STACK_PRINT (yyss, yyssp);
2573 
2574  *++yyvsp = yyval;
2575  *++yylsp = yyloc;
2576 
2577  /* Now `shift' the result of the reduction. Determine what state
2578  that goes to, based on the state we popped back to and the rule
2579  number reduced by. */
2580 
2581  yyn = yyr1[yyn];
2582 
2583  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
2584  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
2585  yystate = yytable[yystate];
2586  else
2587  yystate = yydefgoto[yyn - YYNTOKENS];
2588 
2589  goto yynewstate;
2590 
2591 
2592 /*------------------------------------.
2593 | yyerrlab -- here on detecting error |
2594 `------------------------------------*/
2595 yyerrlab:
2596  /* If not already recovering from an error, report this error. */
2597  if (!yyerrstatus)
2598  {
2599  ++yynerrs;
2600 #if ! YYERROR_VERBOSE
2601  yyerror (YY_("syntax error"));
2602 #else
2603  {
2604  YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
2605  if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
2606  {
2607  YYSIZE_T yyalloc = 2 * yysize;
2608  if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
2609  yyalloc = YYSTACK_ALLOC_MAXIMUM;
2610  if (yymsg != yymsgbuf)
2611  YYSTACK_FREE (yymsg);
2612  yymsg = (char *) YYSTACK_ALLOC (yyalloc);
2613  if (yymsg)
2614  yymsg_alloc = yyalloc;
2615  else
2616  {
2617  yymsg = yymsgbuf;
2618  yymsg_alloc = sizeof yymsgbuf;
2619  }
2620  }
2621 
2622  if (0 < yysize && yysize <= yymsg_alloc)
2623  {
2624  (void) yysyntax_error (yymsg, yystate, yychar);
2625  yyerror (yymsg);
2626  }
2627  else
2628  {
2629  yyerror (YY_("syntax error"));
2630  if (yysize != 0)
2631  goto yyexhaustedlab;
2632  }
2633  }
2634 #endif
2635  }
2636 
2637  yyerror_range[0] = yylloc;
2638 
2639  if (yyerrstatus == 3)
2640  {
2641  /* If just tried and failed to reuse look-ahead token after an
2642  error, discard it. */
2643 
2644  if (yychar <= YYEOF)
2645  {
2646  /* Return failure if at end of input. */
2647  if (yychar == YYEOF)
2648  YYABORT;
2649  }
2650  else
2651  {
2652  yydestruct ("Error: discarding",
2653  yytoken, &yylval, &yylloc);
2654  yychar = YYEMPTY;
2655  }
2656  }
2657 
2658  /* Else will try to reuse look-ahead token after shifting the error
2659  token. */
2660  goto yyerrlab1;
2661 
2662 
2663 /*---------------------------------------------------.
2664 | yyerrorlab -- error raised explicitly by YYERROR. |
2665 `---------------------------------------------------*/
2666 yyerrorlab:
2667 
2668  /* Pacify compilers like GCC when the user code never invokes
2669  YYERROR and the label yyerrorlab therefore never appears in user
2670  code. */
2671  if (/*CONSTCOND*/ 0)
2672  goto yyerrorlab;
2673 
2674  yyerror_range[0] = yylsp[1-yylen];
2675  /* Do not reclaim the symbols of the rule which action triggered
2676  this YYERROR. */
2677  YYPOPSTACK (yylen);
2678  yylen = 0;
2679  YY_STACK_PRINT (yyss, yyssp);
2680  yystate = *yyssp;
2681  goto yyerrlab1;
2682 
2683 
2684 /*-------------------------------------------------------------.
2685 | yyerrlab1 -- common code for both syntax error and YYERROR. |
2686 `-------------------------------------------------------------*/
2687 yyerrlab1:
2688  yyerrstatus = 3; /* Each real token shifted decrements this. */
2689 
2690  for (;;)
2691  {
2692  yyn = yypact[yystate];
2693  if (yyn != YYPACT_NINF)
2694  {
2695  yyn += YYTERROR;
2696  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2697  {
2698  yyn = yytable[yyn];
2699  if (0 < yyn)
2700  break;
2701  }
2702  }
2703 
2704  /* Pop the current state because it cannot handle the error token. */
2705  if (yyssp == yyss)
2706  YYABORT;
2707 
2708  yyerror_range[0] = *yylsp;
2709  yydestruct ("Error: popping",
2710  yystos[yystate], yyvsp, yylsp);
2711  YYPOPSTACK (1);
2712  yystate = *yyssp;
2713  YY_STACK_PRINT (yyss, yyssp);
2714  }
2715 
2716  if (yyn == YYFINAL)
2717  YYACCEPT;
2718 
2719  *++yyvsp = yylval;
2720 
2721  yyerror_range[1] = yylloc;
2722  /* Using YYLLOC is tempting, but would change the location of
2723  the look-ahead. YYLOC is available though. */
2724  YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
2725  *++yylsp = yyloc;
2726 
2727  /* Shift the error token. */
2728  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2729 
2730  yystate = yyn;
2731  goto yynewstate;
2732 
2733 
2734 /*-------------------------------------.
2735 | yyacceptlab -- YYACCEPT comes here. |
2736 `-------------------------------------*/
2737 yyacceptlab:
2738  yyresult = 0;
2739  goto yyreturn;
2740 
2741 /*-----------------------------------.
2742 | yyabortlab -- YYABORT comes here. |
2743 `-----------------------------------*/
2744 yyabortlab:
2745  yyresult = 1;
2746  goto yyreturn;
2747 
2748 #ifndef yyoverflow
2749 /*-------------------------------------------------.
2750 | yyexhaustedlab -- memory exhaustion comes here. |
2751 `-------------------------------------------------*/
2752 yyexhaustedlab:
2753  yyerror (YY_("memory exhausted"));
2754  yyresult = 2;
2755  /* Fall through. */
2756 #endif
2757 
2758 yyreturn:
2759  if (yychar != YYEOF && yychar != YYEMPTY)
2760  yydestruct ("Cleanup: discarding lookahead",
2761  yytoken, &yylval, &yylloc);
2762  /* Do not reclaim the symbols of the rule which action triggered
2763  this YYABORT or YYACCEPT. */
2764  YYPOPSTACK (yylen);
2765  YY_STACK_PRINT (yyss, yyssp);
2766  while (yyssp != yyss)
2767  {
2768  yydestruct ("Cleanup: popping",
2769  yystos[*yyssp], yyvsp, yylsp);
2770  YYPOPSTACK (1);
2771  }
2772 #ifndef yyoverflow
2773  if (yyss != yyssa)
2774  YYSTACK_FREE (yyss);
2775 #endif
2776 #if YYERROR_VERBOSE
2777  if (yymsg != yymsgbuf)
2778  YYSTACK_FREE (yymsg);
2779 #endif
2780  /* Make sure YYID is used. */
2781  return YYID (yyresult);
2782 }
void ws_function(WsCompiler *compiler, WsBool externp, char *name, WsUInt32 line, WsList *params, WsList *block)
Definition: wsstree.c:343
WsUtf8String * string
Definition: wsgram.c:308
int first_column
Definition: wsgram.c:332
static void yydestruct(char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) const
Definition: wsgram.c:1534
WsStatement * ws_stmt_empty(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1413
#define WS_ASM_SCOR
Definition: wsasm.h:207
#define WS_ASM_B_RSSHIFT
Definition: wsasm.h:195
Definition: wsint.h:131
WsStatement * ws_stmt_for(WsCompilerPtr compiler, WsUInt32 line, WsList *init, WsExpression *e1, WsExpression *e2, WsExpression *e3, WsStatement *stmt_body)
Definition: wsstree.c:1447
#define YYID(n)
Definition: wsgram.c:416
WsExpression * ws_expr_postfix_var(WsCompilerPtr compiler, WsUInt32 line, WsBool addp, char *variable)
Definition: wsstree.c:1010
#define YYABORT
Definition: wsgram.c:1043
WsExpression * ws_expr_call(WsCompiler *compiler, WsUInt32 line, int type, char *base, char *name, WsList *arguments)
Definition: wsstree.c:1028
#define tDIVA
Definition: wsgram.c:238
WsVarDec * vardec
Definition: wsgram.c:313
WsStatement * ws_stmt_return(WsCompilerPtr compiler, WsUInt32 line, WsExpression *expr)
Definition: wsstree.c:1491
#define YYSTACK_BYTES(N)
Definition: wsgram.c:520
WsBool ws_bc_add_pragma_access_domain(WsBc *bc, const unsigned char *domain, size_t domain_len)
Definition: wsbc.c:981
#define tRSZSHIFTA
Definition: wsgram.c:245
void ws_pragma_meta_body_free(WsCompilerPtr compiler, WsPragmaMetaBody *mb)
Definition: wsstree.c:291
WsStatement * ws_stmt_continue(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1479
#define YYPACT_NINF
Definition: wsgram.c:860
#define yylval
Definition: wsgram.c:65
WsExpression * ws_expr_binary(WsCompilerPtr compiler, WsUInt32 line, int type, WsExpression *left, WsExpression *right)
Definition: wsstree.c:956
#define WS_ASM_TYPEOF
Definition: wsasm.h:212
int last_column
Definition: wsgram.c:334
static const yytype_int16 yypact[]
Definition: wsgram.c:861
int last_line
Definition: wsgram.c:333
#define WS_ASM_NOT
Definition: wsasm.h:205
#define yyerror
Definition: wsgram.c:64
WsBool ws_bc_add_pragma_access_path(WsBc *bc, const unsigned char *path, size_t path_len)
Definition: wsbc.c:996
#define YYSTACK_RELOCATE(Stack)
Definition: wsgram.c:547
#define YYLLOC_DEFAULT(Current, Rhs, N)
Definition: wsgram.c:1083
static const yytype_int16 yydefgoto[]
Definition: wsgram.c:848
static const yytype_int16 yytable[]
Definition: wsgram.c:907
#define YYTRANSLATE(YYX)
Definition: wsgram.c:578
#define YYFINAL
Definition: wsgram.c:561
#define tRSSHIFTA
Definition: wsgram.c:244
#define WS_ASM_DIV
Definition: wsasm.h:186
#define yychar
Definition: wsgram.c:66
#define tREMA
Definition: wsgram.c:242
#define YYSTACK_FREE
Definition: wsgram.c:472
WsVarDec * ws_variable_declaration(WsCompilerPtr compiler, char *name, WsExpression *expr)
Definition: wsstree.c:78
#define tLSHIFTA
Definition: wsgram.c:243
WsStatement * ws_stmt_expr(WsCompiler *compiler, WsUInt32 line, WsExpression *expr)
Definition: wsstree.c:1419
WsStatement * ws_stmt_while(WsCompiler *compiler, WsUInt32 line, WsExpression *expr, WsStatement *stmt_arg)
Definition: wsstree.c:1465
#define YYTERROR
Definition: wsgram.c:1073
#define yynerrs
Definition: wsgram.c:68
#define YYPOPSTACK(N)
#define WS_ASM_B_LSHIFT
Definition: wsasm.h:194
#define YYTABLE_NINF
Definition: wsgram.c:906
WsExpression * ws_expr_const_string(WsCompiler *compiler, WsUInt32 line, WsUtf8String *string)
Definition: wsstree.c:1112
#define YY_STACK_PRINT(Bottom, Top)
Definition: wsgram.c:1289
#define tIDIVA
Definition: wsgram.c:175
WsStatement * stmt
Definition: wsgram.c:317
WsPragmaMetaBody * ws_pragma_meta_body(WsCompilerPtr compiler, WsUtf8String *property_name, WsUtf8String *content, WsUtf8String *scheme)
Definition: wsstree.c:271
#define WS_ASM_ISVALID
Definition: wsasm.h:213
static const yytype_uint8 yyr1[]
Definition: wsgram.c:775
void ws_lexer_free_block(WsCompiler *compiler, void *ptr)
Definition: ws.c:281
WsExpression * ws_expr_const_float(WsCompiler *compiler, WsUInt32 line, WsFloat fval)
Definition: wsstree.c:1100
#define WS_ASM_B_NOT
Definition: wsasm.h:193
#define WS_ASM_LE
Definition: wsasm.h:199
#define WS_ASM_REM
Definition: wsasm.h:188
WsBc * bc
Definition: wsint.h:218
WsExpression * ws_expr_symbol(WsCompiler *compiler, WsUInt32 line, char *identifier)
Definition: wsstree.c:1051
WsExpression * ws_expr_const_integer(WsCompiler *compiler, WsUInt32 line, WsUInt32 ival)
Definition: wsstree.c:1086
static const yytype_uint8 yystos[]
Definition: wsgram.c:1007
WsUInt32 integer
Definition: wsgram.c:305
WsExpression * expr
Definition: wsgram.c:318
WsFormalParm * ws_formal_parameter(WsCompilerPtr compiler, WsUInt32 line, char *name)
Definition: wsstree.c:93
#define YYLEX
Definition: wsgram.c:1122
WsStatement * ws_stmt_break(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1485
int first_line
Definition: wsgram.c:331
WsStatement * ws_stmt_if(WsCompiler *compiler, WsUInt32 line, WsExpression *expr, WsStatement *s_then, WsStatement *s_else)
Definition: wsstree.c:1431
void * meta_name_cb_context
Definition: ws.h:174
void * ws_f_strdup(WsFastMalloc *pool, const char *str)
Definition: wsfalloc.c:177
void ws_error_syntax(WsCompilerPtr compiler, WsUInt32 line)
Definition: wserror.c:120
WsPragmaMetaProc meta_name_cb
Definition: ws.h:173
char * name
Definition: smsc_cimd2.c:212
#define tMULA
Definition: wsgram.c:237
#define WS_ASM_GT
Definition: wsasm.h:202
#define tSUBA
Definition: wsgram.c:236
static const yytype_int16 yypgoto[]
Definition: wsgram.c:892
WsExpression * ws_expr_const_true(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1074
#define YYNTOKENS
Definition: wsgram.c:566
Definition: seewbmp.c:154
#define WS_ASM_NE
Definition: wsasm.h:203
void ws_pragma_use(WsCompilerPtr compiler, WsUInt32 line, char *identifier, WsUtf8String *url)
Definition: wsstree.c:220
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: wsgram.c:1288
#define YYEMPTY
Definition: wsgram.c:1039
WsUInt32 first_line
Definition: wsstree.h:524
WsStatement * ws_stmt_variable(WsCompilerPtr compiler, WsUInt32 line, WsList *variables)
Definition: wsstree.c:1401
WsExpression * ws_expr_unary(WsCompilerPtr compiler, WsUInt32 line, int type, WsExpression *expression)
Definition: wsstree.c:971
#define YYMAXDEPTH
Definition: wsgram.c:1307
#define YYACCEPT
Definition: wsgram.c:1042
WsExpression * ws_expr_logical(WsCompilerPtr compiler, WsUInt32 line, int type, WsExpression *left, WsExpression *right)
Definition: wsstree.c:941
#define YYEOF
Definition: wsgram.c:1040
WsExpression * ws_expr_const_false(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1080
#define WS_ASM_B_OR
Definition: wsasm.h:191
WsList * ws_list_new(WsCompiler *compiler)
Definition: wsstree.c:110
short int yytype_int16
Definition: wsgram.c:376
#define WS_ASM_B_XOR
Definition: wsasm.h:192
WsList * list
Definition: wsgram.c:311
WsFunctionHash * ws_function_hash(WsCompilerPtr compiler, char *name)
Definition: wsstree.c:318
WsBool
Definition: wsint.h:128
WsBool ws_bc_add_pragma_user_agent_property(WsBc *bc, const unsigned char *name, size_t name_len, const unsigned char *property, size_t property_len)
Definition: wsbc.c:1011
#define YY_(msgid)
Definition: wsgram.c:403
#define WS_ASM_EQ
Definition: wsasm.h:198
WsFloat vfloat
Definition: wsgram.c:306
#define tXORA
Definition: wsgram.c:241
void * ws_strdup(const char *str)
Definition: wsalloc.c:119
#define tORA
Definition: wsgram.c:240
#define YYSTACK_ALLOC
Definition: wsgram.c:471
#define YYDPRINTF(Args)
Definition: wsgram.c:1287
WsPragmaMetaProc meta_http_equiv_cb
Definition: ws.h:178
WsCompilerParams params
Definition: wsint.h:193
void * meta_http_equiv_cb_context
Definition: ws.h:179
WsExpression * ws_expr_const_invalid(WsCompiler *compiler, WsUInt32 line)
Definition: wsstree.c:1068
WsExpression * ws_expr_conditional(WsCompilerPtr compiler, WsUInt32 line, WsExpression *e_cond, WsExpression *e_then, WsExpression *e_else)
Definition: wsstree.c:925
char * identifier
Definition: wsgram.c:307
WsExpression * ws_expr_comma(WsCompilerPtr compiler, WsUInt32 line, WsExpression *left, WsExpression *right)
Definition: wsstree.c:889
#define WS_ASM_B_RSZSHIFT
Definition: wsasm.h:196
#define yylloc
Definition: wsgram.c:69
WsStatement * ws_stmt_block(WsCompiler *compiler, WsUInt32 fline, WsUInt32 lline, WsList *block)
Definition: wsstree.c:1389
#define WS_ASM_UMINUS
Definition: wsasm.h:182
#define YYSTACK_ALLOC_MAXIMUM
Definition: wsgram.c:474
#define WS_ASM_GE
Definition: wsasm.h:201
WsPragmaMetaBody * meta_body
Definition: wsgram.c:315
#define YYLAST
Definition: wsgram.c:563
WsBool boolean
Definition: wsgram.c:310
void ws_lexer_free_utf8(WsCompiler *compiler, WsUtf8String *string)
Definition: ws.c:305
static const yytype_uint8 yyr2[]
Definition: wsgram.c:795
#define YY_REDUCE_PRINT(Rule)
Definition: wsgram.c:1290
#define YYINITDEPTH
Definition: wsgram.c:1296
#define tADDA
Definition: wsgram.c:235
#define WS_ASM_B_AND
Definition: wsasm.h:190
#define WS_ASM_IDIV
Definition: wsasm.h:187
WsBool ws_bc_add_pragma_user_agent_property_and_scheme(WsBc *bc, const unsigned char *name, size_t name_len, const unsigned char *property, size_t property_len, const unsigned char *scheme, size_t scheme_len)
Definition: wsbc.c:1030
#define tANDA
Definition: wsgram.c:239
#define WS_ASM_MUL
Definition: wsasm.h:185
WsExpression * ws_expr_unary_var(WsCompilerPtr compiler, WsUInt32 line, WsBool addp, char *variable)
Definition: wsstree.c:993
#define WS_ASM_ADD
Definition: wsasm.h:183
WsExpression * ws_expr_assign(WsCompilerPtr compiler, WsUInt32 line, char *identifier, int op, WsExpression *expr)
Definition: wsstree.c:903
void ws_error_memory(WsCompilerPtr compiler)
Definition: wserror.c:107
#define YYSIZE_T
Definition: wsgram.c:389
void ws_list_append(WsCompiler *compiler, WsList *list, void *value)
Definition: wsstree.c:121
static const yytype_int16 yycheck[]
Definition: wsgram.c:956
WsUInt32 usage_count
Definition: wsstree.h:222
static const yytype_uint8 yydefact[]
Definition: wsgram.c:817
#define WS_ASM_SCAND
Definition: wsasm.h:206
#define WS_ASM_LT
Definition: wsasm.h:200
#define WS_ASM_SUB
Definition: wsasm.h:184

Variable Documentation

const yytype_int16 yycheck[]
static

Definition at line 956 of file wsgram.c.

const yytype_uint8 yydefact[]
static
Initial value:
=
{
0, 8, 33, 0, 0, 0, 5, 3, 29, 0,
0, 0, 0, 0, 9, 10, 11, 1, 8, 6,
2, 30, 0, 0, 0, 13, 0, 0, 0, 17,
18, 19, 20, 0, 7, 0, 14, 15, 0, 26,
21, 0, 0, 12, 34, 0, 22, 27, 24, 23,
38, 0, 35, 16, 28, 25, 0, 0, 50, 0,
36, 39, 136, 137, 138, 139, 140, 141, 135, 0,
0, 0, 0, 0, 69, 0, 0, 0, 0, 0,
42, 0, 0, 0, 0, 0, 53, 40, 0, 0,
41, 44, 45, 65, 48, 0, 71, 73, 87, 89,
91, 93, 95, 97, 99, 102, 107, 111, 114, 119,
128, 131, 37, 31, 0, 129, 130, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 132, 47, 46, 69, 0, 135, 121, 0,
70, 120, 56, 60, 0, 57, 0, 122, 123, 0,
124, 125, 126, 127, 49, 54, 43, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
78, 79, 75, 76, 83, 85, 84, 77, 80, 81,
82, 143, 145, 0, 74, 0, 0, 0, 0, 0,
68, 0, 59, 55, 0, 0, 142, 72, 90, 0,
92, 94, 96, 98, 100, 101, 105, 106, 103, 104,
108, 109, 110, 112, 113, 117, 115, 116, 118, 144,
0, 133, 134, 0, 69, 0, 61, 58, 0, 0,
146, 69, 0, 63, 64, 88, 0, 69, 0, 69,
0, 62, 0, 0, 0, 66, 67
}

Definition at line 817 of file wsgram.c.

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 4, 5, 6, 13, 14, 15, 25, 16, 29,
30, 31, 32, 40, 41, 48, 55, 7, 8, 9,
51, 113, 52, 86, 87, 88, 89, 90, 144, 145,
202, 91, 92, 93, 94, 139, 95, 96, 97, 98,
99, 100, 101, 102, 103, 104, 105, 106, 107, 108,
109, 110, 111, 132, 193
}

Definition at line 848 of file wsgram.c.

const yytype_int16 yypact[]
static
Initial value:
=
{
59, 39, -135, 28, 68, 63, -135, 38, -135, 62,
37, 54, 13, -43, -135, -135, -135, -135, -135, -135,
38, -135, 57, 67, 87, -135, 92, 108, 109, -135,
-135, -135, -135, 121, -135, 47, 123, -135, 108, -135,
-135, 141, 108, -135, 155, 164, -135, -135, 166, -135,
-135, 89, 107, -135, -135, -135, 1, 188, -135, 132,
112, -135, -135, -135, -135, -135, -135, -135, 340, 115,
120, 124, 125, 296, 308, 296, 35, 126, 198, 201,
-135, 308, 296, 296, 296, 296, -135, -135, 129, 175,
-135, -135, -135, -135, -135, -83, -135, -135, -48, 146,
122, 119, 127, 12, -25, 45, 5, 44, -135, -135,
-135, -135, -135, -135, 308, -135, -135, 308, 308, 308,
308, 308, 308, 308, 308, 308, 308, 308, 222, 308,
207, 212, -135, -135, -135, 264, 308, -38, -135, 148,
147, -135, -135, 143, -1, -135, 308, -135, -135, 43,
-135, -135, -135, -135, -135, -135, -135, 308, 296, 308,
296, 296, 296, 296, 296, 296, 296, 296, 296, 296,
296, 296, 296, 296, 296, 296, 296, 296, 296, -135,
-135, -135, -135, -135, -135, -135, -135, -135, -135, -135,
-135, -135, -135, 66, -135, 152, 152, 231, 156, 70,
-135, 296, -135, -135, 231, 82, -135, -135, 146, 149,
122, 119, 127, 12, -25, -25, 45, 45, 45, 45,
5, 5, 5, 44, 44, -135, -135, -135, -135, -135,
308, -135, -135, 25, 308, 22, -135, -135, 22, 308,
-135, 308, 158, 224, -135, -135, 162, 308, 22, 308,
161, -135, 163, 22, 22, -135, -135
}

Definition at line 861 of file wsgram.c.

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-135, -135, -135, 245, -135, -135, -135, -135, -135, -135,
-135, -135, -135, 29, -135, -135, -135, 248, 17, -135,
-135, -135, -135, -85, 199, -135, -135, -135, 60, 50,
-135, -135, -135, -135, -135, -134, -74, -109, 55, -135,
100, 99, 102, 98, 101, -22, -65, -46, 20, 14,
-135, -135, -135, -10, -135
}

Definition at line 892 of file wsgram.c.

const yytype_uint8 yyr1[]
static
Initial value:
=
{
0, 109, 110, 110, 110, 111, 111, 112, 112, 113,
113, 113, 114, 115, 116, 116, 116, 117, 118, 118,
118, 119, 120, 121, 122, 122, 123, 124, 125, 126,
126, 127, 128, 128, 129, 129, 130, 130, 131, 131,
132, 132, 132, 132, 132, 132, 132, 132, 132, 133,
133, 134, 134, 135, 135, 136, 136, 137, 137, 138,
139, 139, 140, 140, 141, 141, 142, 142, 143, 144,
144, 145, 145, 146, 146, 146, 146, 146, 146, 146,
146, 146, 146, 146, 146, 146, 146, 147, 147, 148,
148, 149, 149, 150, 150, 151, 151, 152, 152, 153,
153, 153, 154, 154, 154, 154, 154, 155, 155, 155,
155, 156, 156, 156, 157, 157, 157, 157, 157, 158,
158, 158, 158, 158, 158, 158, 158, 158, 159, 159,
159, 160, 160, 160, 160, 161, 161, 161, 161, 161,
161, 161, 161, 162, 162, 163, 163
}

Definition at line 775 of file wsgram.c.

const yytype_uint8 yyr2[]
static
Initial value:
=
{
0, 2, 2, 1, 1, 1, 2, 3, 1, 1,
1, 1, 3, 2, 2, 2, 4, 2, 1, 1,
1, 2, 3, 3, 2, 3, 1, 1, 1, 1,
2, 8, 0, 1, 0, 1, 0, 1, 1, 3,
1, 1, 1, 2, 1, 1, 2, 2, 1, 3,
1, 0, 1, 1, 2, 3, 2, 1, 3, 2,
0, 2, 7, 5, 5, 1, 9, 10, 3, 0,
1, 1, 3, 1, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 1, 5, 1,
3, 1, 3, 1, 3, 1, 3, 1, 3, 1,
3, 3, 1, 3, 3, 3, 3, 1, 3, 3,
3, 1, 3, 3, 1, 3, 3, 3, 3, 1,
2, 2, 2, 2, 2, 2, 2, 2, 1, 2,
2, 1, 2, 4, 4, 1, 1, 1, 1, 1,
1, 1, 3, 2, 3, 1, 3
}

Definition at line 795 of file wsgram.c.

const yytype_uint8 yystos[]
static
Initial value:
=
{
0, 1, 19, 31, 110, 111, 112, 126, 127, 128,
10, 26, 35, 113, 114, 115, 117, 0, 1, 112,
126, 127, 21, 16, 28, 116, 23, 27, 32, 118,
119, 120, 121, 9, 86, 9, 8, 8, 18, 8,
122, 123, 11, 8, 87, 28, 122, 8, 124, 122,
9, 129, 131, 8, 8, 125, 88, 89, 1, 90,
133, 9, 3, 4, 5, 6, 7, 8, 9, 12,
13, 20, 24, 25, 29, 30, 33, 34, 70, 71,
86, 87, 100, 101, 105, 106, 132, 133, 134, 135,
136, 140, 141, 142, 143, 145, 146, 147, 148, 149,
150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
160, 161, 86, 130, 15, 70, 71, 75, 76, 77,
78, 79, 80, 81, 82, 83, 84, 85, 87, 92,
107, 108, 162, 86, 86, 87, 87, 9, 158, 144,
145, 158, 1, 9, 137, 138, 87, 9, 9, 145,
158, 158, 158, 158, 91, 132, 86, 89, 69, 93,
68, 95, 96, 97, 64, 67, 65, 66, 98, 99,
72, 73, 74, 100, 101, 14, 102, 103, 104, 146,
146, 146, 146, 146, 146, 146, 146, 146, 146, 146,
146, 88, 146, 163, 146, 9, 9, 33, 144, 145,
86, 92, 139, 86, 89, 145, 88, 146, 149, 146,
150, 151, 152, 153, 154, 154, 155, 155, 155, 155,
156, 156, 156, 157, 157, 158, 158, 158, 158, 88,
89, 162, 162, 137, 86, 88, 147, 138, 88, 94,
146, 86, 144, 132, 132, 146, 144, 86, 17, 86,
144, 132, 144, 88, 88, 132, 132
}

Definition at line 1007 of file wsgram.c.

const yytype_int16 yytable[]
static

Definition at line 907 of file wsgram.c.

const yytype_uint8 yytranslate[]
static

Definition at line 582 of file wsgram.c.

See file LICENSE for details about the license agreement for using, modifying, copying or deriving work from this software.