Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

wsgram.c File Reference

#include "wmlscript/wsint.h"

Include dependency graph for wsgram.c:

Include dependency graph

Go to the source code of this file.

Data Structures

union  YYSTYPE
struct  YYLTYPE
union  yyalloc

Defines

#define YYBISON   1
#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 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 yystype   YYSTYPE
#define YYSTYPE_IS_DECLARED   1
#define YYSTYPE_IS_TRIVIAL   1
#define yyltype   YYLTYPE
#define YYLTYPE_IS_DECLARED   1
#define YYLTYPE_IS_TRIVIAL   1
#define YYSTACK_ALLOC   malloc
#define YYSTACK_FREE   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 YYSIZE_T   unsigned int
#define yyerrok   (yyerrstatus = 0)
#define yyclearin   (yychar = YYEMPTY)
#define YYEMPTY   (-2)
#define YYEOF   0
#define YYACCEPT   goto yyacceptlab
#define YYABORT   goto yyabortlab
#define YYERROR
#define YYFAIL   goto yyerrlab
#define YYRECOVERING()   (!!yyerrstatus)
#define YYBACKUP(Token, Value)
#define YYTERROR   1
#define YYERRCODE   256
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YYLEX   yylex (&yylval, &yylloc, YYLEX_PARAM)
#define YYDPRINTF(Args)
#define YYDSYMPRINT(Args)
#define YYDSYMPRINTF(Title, Token, Value, Location)
#define YY_STACK_PRINT(Bottom, Top)
#define YY_REDUCE_PRINT(Rule)
#define YYINITDEPTH   200
#define YYMAXDEPTH   10000
#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)

Typedefs

typedef YYSTYPE YYSTYPE
typedef YYLTYPE YYLTYPE
typedef short yysigned_char

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
}

Functions

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

Variables

const unsigned char yytranslate []
const unsigned char yyr1 []
const unsigned char yyr2 []
const unsigned char yydefact []
const short yydefgoto []
const short yypact []
const short yypgoto []
const short yytable []
const short yycheck []
const unsigned char yystos []


Define Documentation

#define tACCESS   265
 

Definition at line 157 of file wsgram.c.

#define tADDA   330
 

Definition at line 222 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tAGENT   266
 

Definition at line 158 of file wsgram.c.

#define tAND   323
 

Definition at line 215 of file wsgram.c.

#define tANDA   334
 

Definition at line 226 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tBREAK   267
 

Definition at line 159 of file wsgram.c.

#define tCASE   299
 

Definition at line 191 of file wsgram.c.

#define tCATCH   300
 

Definition at line 192 of file wsgram.c.

#define tCLASS   301
 

Definition at line 193 of file wsgram.c.

#define tCONST   302
 

Definition at line 194 of file wsgram.c.

#define tCONTINUE   268
 

Definition at line 160 of file wsgram.c.

#define tDEBUGGER   303
 

Definition at line 195 of file wsgram.c.

#define tDEFAULT   304
 

Definition at line 196 of file wsgram.c.

#define tDELETE   291
 

Definition at line 183 of file wsgram.c.

#define tDIVA   333
 

Definition at line 225 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tDO   305
 

Definition at line 197 of file wsgram.c.

#define tDOMAIN   271
 

Definition at line 163 of file wsgram.c.

#define tELSE   272
 

Definition at line 164 of file wsgram.c.

#define tENUM   306
 

Definition at line 198 of file wsgram.c.

#define tEQ   319
 

Definition at line 211 of file wsgram.c.

#define tEQUIV   273
 

Definition at line 165 of file wsgram.c.

#define tEXPORT   307
 

Definition at line 199 of file wsgram.c.

#define tEXTENDS   308
 

Definition at line 200 of file wsgram.c.

#define tEXTERN   274
 

Definition at line 166 of file wsgram.c.

#define tFALSE   260
 

Definition at line 152 of file wsgram.c.

#define tFINALLY   309
 

Definition at line 201 of file wsgram.c.

#define tFLOAT   262
 

Definition at line 154 of file wsgram.c.

#define tFOR   275
 

Definition at line 167 of file wsgram.c.

#define tFUNCTION   276
 

Definition at line 168 of file wsgram.c.

#define tGE   321
 

Definition at line 213 of file wsgram.c.

#define tHEADER   277
 

Definition at line 169 of file wsgram.c.

#define tHTTP   278
 

Definition at line 170 of file wsgram.c.

#define tIDENTIFIER   264
 

Definition at line 156 of file wsgram.c.

#define tIDIV   269
 

Definition at line 161 of file wsgram.c.

#define tIDIVA   270
 

Definition at line 162 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tIF   279
 

Definition at line 171 of file wsgram.c.

#define tIMPORT   310
 

Definition at line 202 of file wsgram.c.

#define tIN   292
 

Definition at line 184 of file wsgram.c.

#define tINTEGER   261
 

Definition at line 153 of file wsgram.c.

#define tINVALID   258
 

Definition at line 150 of file wsgram.c.

#define tISVALID   280
 

Definition at line 172 of file wsgram.c.

#define tLE   320
 

Definition at line 212 of file wsgram.c.

#define tLIB   293
 

Definition at line 185 of file wsgram.c.

#define tLSHIFT   327
 

Definition at line 219 of file wsgram.c.

#define tLSHIFTA   338
 

Definition at line 230 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tMETA   281
 

Definition at line 173 of file wsgram.c.

#define tMINUSMINUS   326
 

Definition at line 218 of file wsgram.c.

#define tMULA   332
 

Definition at line 224 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tNAME   282
 

Definition at line 174 of file wsgram.c.

#define tNE   322
 

Definition at line 214 of file wsgram.c.

#define tNEW   294
 

Definition at line 186 of file wsgram.c.

#define tNULL   295
 

Definition at line 187 of file wsgram.c.

#define tOR   324
 

Definition at line 216 of file wsgram.c.

#define tORA   335
 

Definition at line 227 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tPATH   283
 

Definition at line 175 of file wsgram.c.

#define tPLUSPLUS   325
 

Definition at line 217 of file wsgram.c.

#define tPRIVATE   311
 

Definition at line 203 of file wsgram.c.

#define tPUBLIC   312
 

Definition at line 204 of file wsgram.c.

#define tREMA   337
 

Definition at line 229 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tRETURN   284
 

Definition at line 176 of file wsgram.c.

#define tRSSHIFT   328
 

Definition at line 220 of file wsgram.c.

#define tRSSHIFTA   339
 

Definition at line 231 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tRSZSHIFT   329
 

Definition at line 221 of file wsgram.c.

#define tRSZSHIFTA   340
 

Definition at line 232 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tSIZEOF   313
 

Definition at line 205 of file wsgram.c.

#define tSTRING   263
 

Definition at line 155 of file wsgram.c.

#define tSTRUCT   314
 

Definition at line 206 of file wsgram.c.

#define tSUBA   331
 

Definition at line 223 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define tSUPER   315
 

Definition at line 207 of file wsgram.c.

#define tSWITCH   316
 

Definition at line 208 of file wsgram.c.

#define tTHIS   296
 

Definition at line 188 of file wsgram.c.

#define tTHROW   317
 

Definition at line 209 of file wsgram.c.

#define tTRUE   259
 

Definition at line 151 of file wsgram.c.

#define tTRY   318
 

Definition at line 210 of file wsgram.c.

#define tTYPEOF   285
 

Definition at line 177 of file wsgram.c.

#define tURL   290
 

Definition at line 182 of file wsgram.c.

#define tUSE   286
 

Definition at line 178 of file wsgram.c.

#define tUSER   287
 

Definition at line 179 of file wsgram.c.

#define tVAR   288
 

Definition at line 180 of file wsgram.c.

#define tVOID   297
 

Definition at line 189 of file wsgram.c.

#define tWHILE   289
 

Definition at line 181 of file wsgram.c.

#define tWITH   298
 

Definition at line 190 of file wsgram.c.

#define tXORA   336
 

Definition at line 228 of file wsgram.c.

Referenced by ws_expr_linearize(), and yyparse().

#define YY_REDUCE_PRINT Rule   ) 
 

Definition at line 1075 of file wsgram.c.

Referenced by yyparse().

#define YY_STACK_PRINT Bottom,
Top   ) 
 

Definition at line 1074 of file wsgram.c.

Referenced by yyparse().

#define YYABORT   goto yyabortlab
 

Definition at line 922 of file wsgram.c.

#define YYACCEPT   goto yyacceptlab
 

Definition at line 921 of file wsgram.c.

#define YYBACKUP Token,
Value   ) 
 

Value:

do                              \
  if (yychar == YYEMPTY && yylen == 1)              \
    {                               \
      yychar = (Token);                     \
      yylval = (Value);                     \
      yytoken = YYTRANSLATE (yychar);               \
      YYPOPSTACK;                       \
      goto yybackup;                        \
    }                               \
  else                              \
    {                               \
      yyerror ("syntax error: cannot back up");\
      YYERROR;                          \
    }                               \
while (0)

Definition at line 940 of file wsgram.c.

#define YYBISON   1
 

Definition at line 37 of file wsgram.c.

#define yychar   ws_yy_char
 

Definition at line 54 of file wsgram.c.

Referenced by yyparse().

#define yyclearin   (yychar = YYEMPTY)
 

Definition at line 917 of file wsgram.c.

#define YYCOPY To,
From,
Count   ) 
 

Value:

do                  \
    {                   \
      register YYSIZE_T yyi;        \
      for (yyi = 0; yyi < (Count); yyi++)   \
        (To)[yyi] = (From)[yyi];        \
    }                   \
      while (0)

Definition at line 388 of file wsgram.c.

#define YYDEBUG   0
 

Definition at line 272 of file wsgram.c.

#define yydebug   ws_yy_debug
 

Definition at line 55 of file wsgram.c.

#define YYDPRINTF Args   ) 
 

Definition at line 1071 of file wsgram.c.

Referenced by yyparse().

#define YYDSYMPRINT Args   ) 
 

Definition at line 1072 of file wsgram.c.

#define YYDSYMPRINTF Title,
Token,
Value,
Location   ) 
 

Definition at line 1073 of file wsgram.c.

Referenced by yyparse().

#define YYEMPTY   (-2)
 

Definition at line 918 of file wsgram.c.

#define YYEOF   0
 

Definition at line 919 of file wsgram.c.

#define YYERRCODE   256
 

Definition at line 958 of file wsgram.c.

#define yyerrok   (yyerrstatus = 0)
 

Definition at line 916 of file wsgram.c.

#define YYERROR
 

Value:

do              \
              {             \
                yylerrsp = yylsp;       \
                *++yylerrsp = yyloc;    \
                goto yyerrlab1;     \
              }             \
            while (0)

Definition at line 923 of file wsgram.c.

#define yyerror   ws_yy_error
 

Definition at line 52 of file wsgram.c.

Referenced by yyparse().

#define YYERROR_VERBOSE   0
 

Definition at line 280 of file wsgram.c.

#define YYFAIL   goto yyerrlab
 

Definition at line 936 of file wsgram.c.

#define YYFINAL   17
 

Definition at line 424 of file wsgram.c.

#define YYINITDEPTH   200
 

Definition at line 1081 of file wsgram.c.

#define YYLAST   448
 

Definition at line 426 of file wsgram.c.

Referenced by yyparse().

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

Definition at line 974 of file wsgram.c.

#define yylex   ws_yy_lex
 

Definition at line 51 of file wsgram.c.

#define YYLEX_PARAM   pctx
 

Definition at line 256 of file wsgram.c.

#define yylloc   ws_yy_lloc
 

Definition at line 57 of file wsgram.c.

Referenced by ws_yy_lex(), and yyparse().

#define YYLLOC_DEFAULT Current,
Rhs,
 ) 
 

Value:

Current.first_line   = Rhs[1].first_line;      \
  Current.first_column = Rhs[1].first_column;    \
  Current.last_line    = Rhs[N].last_line;       \
  Current.last_column  = Rhs[N].last_column;

Definition at line 964 of file wsgram.c.

Referenced by yyparse().

#define YYLSP_NEEDED   1
 

Definition at line 46 of file wsgram.c.

#define yyltype   YYLTYPE
 

Definition at line 316 of file wsgram.c.

#define YYLTYPE_IS_DECLARED   1
 

Definition at line 317 of file wsgram.c.

#define YYLTYPE_IS_TRIVIAL   1
 

Definition at line 318 of file wsgram.c.

#define yylval   ws_yy_lval
 

Definition at line 53 of file wsgram.c.

Referenced by ws_yy_lex(), and yyparse().

#define YYMAXDEPTH   10000
 

Definition at line 1096 of file wsgram.c.

Referenced by yyparse().

#define YYMAXUTOK   340
 

Definition at line 439 of file wsgram.c.

#define yynerrs   ws_yy_nerrs
 

Definition at line 56 of file wsgram.c.

Referenced by yyparse().

#define YYNNTS   55
 

Definition at line 431 of file wsgram.c.

#define YYNRULES   146
 

Definition at line 433 of file wsgram.c.

#define YYNSTATES   257
 

Definition at line 435 of file wsgram.c.

#define YYNTOKENS   109
 

Definition at line 429 of file wsgram.c.

#define YYPACT_NINF   -135
 

Definition at line 723 of file wsgram.c.

Referenced by yyparse().

#define yyparse   ws_yy_parse
 

Definition at line 50 of file wsgram.c.

#define YYPARSE_PARAM   pctx
 

Definition at line 255 of file wsgram.c.

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

#define YYPURE   1
 

Definition at line 43 of file wsgram.c.

 
#define YYRECOVERING  )     (!!yyerrstatus)
 

Definition at line 938 of file wsgram.c.

#define YYSIZE_T   unsigned int
 

Definition at line 913 of file wsgram.c.

Referenced by yyparse().

#define YYSKELETON_NAME   "yacc.c"
 

Definition at line 40 of file wsgram.c.

#define YYSTACK_ALLOC   malloc
 

Definition at line 354 of file wsgram.c.

Referenced by yyparse().

#define YYSTACK_BYTES  ) 
 

Value:

((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE))   \
      + 2 * YYSTACK_GAP_MAXIMUM)

Definition at line 377 of file wsgram.c.

Referenced by yyparse().

#define YYSTACK_FREE   free
 

Definition at line 355 of file wsgram.c.

Referenced by yyparse().

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

Definition at line 373 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 (0)

Definition at line 404 of file wsgram.c.

Referenced by yyparse().

#define yystype   YYSTYPE
 

Definition at line 303 of file wsgram.c.

#define YYSTYPE_IS_DECLARED   1
 

Definition at line 304 of file wsgram.c.

#define YYSTYPE_IS_TRIVIAL   1
 

Definition at line 305 of file wsgram.c.

#define YYTABLE_NINF   -53
 

Definition at line 769 of file wsgram.c.

#define YYTERROR   1
 

Definition at line 957 of file wsgram.c.

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

Definition at line 441 of file wsgram.c.

Referenced by yyparse().

#define YYUNDEFTOK   2
 

Definition at line 438 of file wsgram.c.


Typedef Documentation

typedef struct YYLTYPE YYLTYPE
 

typedef short yysigned_char
 

Definition at line 420 of file wsgram.c.

typedef union YYSTYPE YYSTYPE
 


Enumeration Type Documentation

enum yytokentype
 

Enumeration values:
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 64 of file wsgram.c.

00064                     {
00065      tINVALID = 258,
00066      tTRUE = 259,
00067      tFALSE = 260,
00068      tINTEGER = 261,
00069      tFLOAT = 262,
00070      tSTRING = 263,
00071      tIDENTIFIER = 264,
00072      tACCESS = 265,
00073      tAGENT = 266,
00074      tBREAK = 267,
00075      tCONTINUE = 268,
00076      tIDIV = 269,
00077      tIDIVA = 270,
00078      tDOMAIN = 271,
00079      tELSE = 272,
00080      tEQUIV = 273,
00081      tEXTERN = 274,
00082      tFOR = 275,
00083      tFUNCTION = 276,
00084      tHEADER = 277,
00085      tHTTP = 278,
00086      tIF = 279,
00087      tISVALID = 280,
00088      tMETA = 281,
00089      tNAME = 282,
00090      tPATH = 283,
00091      tRETURN = 284,
00092      tTYPEOF = 285,
00093      tUSE = 286,
00094      tUSER = 287,
00095      tVAR = 288,
00096      tWHILE = 289,
00097      tURL = 290,
00098      tDELETE = 291,
00099      tIN = 292,
00100      tLIB = 293,
00101      tNEW = 294,
00102      tNULL = 295,
00103      tTHIS = 296,
00104      tVOID = 297,
00105      tWITH = 298,
00106      tCASE = 299,
00107      tCATCH = 300,
00108      tCLASS = 301,
00109      tCONST = 302,
00110      tDEBUGGER = 303,
00111      tDEFAULT = 304,
00112      tDO = 305,
00113      tENUM = 306,
00114      tEXPORT = 307,
00115      tEXTENDS = 308,
00116      tFINALLY = 309,
00117      tIMPORT = 310,
00118      tPRIVATE = 311,
00119      tPUBLIC = 312,
00120      tSIZEOF = 313,
00121      tSTRUCT = 314,
00122      tSUPER = 315,
00123      tSWITCH = 316,
00124      tTHROW = 317,
00125      tTRY = 318,
00126      tEQ = 319,
00127      tLE = 320,
00128      tGE = 321,
00129      tNE = 322,
00130      tAND = 323,
00131      tOR = 324,
00132      tPLUSPLUS = 325,
00133      tMINUSMINUS = 326,
00134      tLSHIFT = 327,
00135      tRSSHIFT = 328,
00136      tRSZSHIFT = 329,
00137      tADDA = 330,
00138      tSUBA = 331,
00139      tMULA = 332,
00140      tDIVA = 333,
00141      tANDA = 334,
00142      tORA = 335,
00143      tXORA = 336,
00144      tREMA = 337,
00145      tLSHIFTA = 338,
00146      tRSSHIFTA = 339,
00147      tRSZSHIFTA = 340
00148    };


Function Documentation

void yydestruct int  yytype,
YYSTYPE yyvaluep,
YYLTYPE yylocationp
[static]
 

Definition at line 1205 of file wsgram.c.

Referenced by yyparse().

01210 {
01211   /* Pacify ``unused variable'' warnings.  */
01212   (void) yyvaluep;
01213   (void) yylocationp;
01214 
01215   switch (yytype)
01216     {
01217 
01218       default:
01219         break;
01220     }
01221 }

void yyerror char *  msg  ) 
 

Definition at line 2420 of file wsgram.c.

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

02421 {
02422 #if WS_DEBUG
02423   fprintf(stderr, "*** %s:%d: wsc: %s - this msg will be removed ***\n",
02424       global_compiler->input_name, global_compiler->linenum, msg);
02425 #endif /* WS_DEBUG */
02426 }

int yyparse void *  YYPARSE_PARAM  ) 
 

Definition at line 1253 of file wsgram.c.

References WsCompilerRec::bc, YYSTYPE::boolean, WsPragmaMetaBodyRec::content, WsUtf8StringRec::data, YYSTYPE::expr, YYLTYPE::first_line, WsListRec::first_line, WsListRec::last_line, WsUtf8StringRec::len, 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, WsPragmaMetaBodyRec::property_name, WsPragmaMetaBodyRec::scheme, YYSTYPE::stmt, YYSTYPE::string, string, tADDA, tANDA, tDIVA, tIDIVA, tLSHIFTA, tMULA, tORA, tREMA, tRSSHIFTA, tRSZSHIFTA, tSUBA, tXORA, WsFunctionHashRec::usage_count, YYSTYPE::vardec, 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(), WsBool, WsCompiler, WsFormalParm, WsFunctionHash, YY_REDUCE_PRINT, YY_STACK_PRINT, yychar, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYDSYMPRINTF, yyerror, YYLAST, yylloc, YYLLOC_DEFAULT, yylval, YYMAXDEPTH, yynerrs, yypact, YYPACT_NINF, yypgoto, yyr1, yyr2, YYSIZE_T, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystos, yytable, and YYTRANSLATE.

01266 {
01267   /* The lookahead symbol.  */
01268 int yychar;
01269 
01270 /* The semantic value of the lookahead symbol.  */
01271 YYSTYPE yylval;
01272 
01273 /* Number of syntax errors so far.  */
01274 int yynerrs;
01275 /* Location data for the lookahead symbol.  */
01276 YYLTYPE yylloc;
01277 
01278   register int yystate;
01279   register int yyn;
01280   int yyresult;
01281   /* Number of tokens to shift before error messages enabled.  */
01282   int yyerrstatus;
01283   /* Lookahead token as an internal (translated) token number.  */
01284   int yytoken = 0;
01285 
01286   /* Three stacks and their tools:
01287      `yyss': related to states,
01288      `yyvs': related to semantic values,
01289      `yyls': related to locations.
01290 
01291      Refer to the stacks thru separate pointers, to allow yyoverflow
01292      to reallocate them elsewhere.  */
01293 
01294   /* The state stack.  */
01295   short yyssa[YYINITDEPTH];
01296   short *yyss = yyssa;
01297   register short *yyssp;
01298 
01299   /* The semantic value stack.  */
01300   YYSTYPE yyvsa[YYINITDEPTH];
01301   YYSTYPE *yyvs = yyvsa;
01302   register YYSTYPE *yyvsp;
01303 
01304   /* The location stack.  */
01305   YYLTYPE yylsa[YYINITDEPTH];
01306   YYLTYPE *yyls = yylsa;
01307   YYLTYPE *yylsp;
01308   YYLTYPE *yylerrsp;
01309 
01310 #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
01311 
01312   YYSIZE_T yystacksize = YYINITDEPTH;
01313 
01314   /* The variables used to return semantic value and location from the
01315      action routines.  */
01316   YYSTYPE yyval;
01317   YYLTYPE yyloc;
01318 
01319   /* When reducing, the number of symbols on the RHS of the reduced
01320      rule.  */
01321   int yylen;
01322 
01323   YYDPRINTF ((stderr, "Starting parse\n"));
01324 
01325   yystate = 0;
01326   yyerrstatus = 0;
01327   yynerrs = 0;
01328   yychar = YYEMPTY;     /* Cause a token to be read.  */
01329 
01330   /* Initialize stack pointers.
01331      Waste one element of value and location stack
01332      so that they stay on the same level as the state stack.
01333      The wasted elements are never initialized.  */
01334 
01335   yyssp = yyss;
01336   yyvsp = yyvs;
01337   yylsp = yyls;
01338   goto yysetstate;
01339 
01340 /*------------------------------------------------------------.
01341 | yynewstate -- Push a new state, which is found in yystate.  |
01342 `------------------------------------------------------------*/
01343  yynewstate:
01344   /* In all cases, when you get here, the value and location stacks
01345      have just been pushed. so pushing a state here evens the stacks.
01346      */
01347   yyssp++;
01348 
01349  yysetstate:
01350   *yyssp = yystate;
01351 
01352   if (yyss + yystacksize - 1 <= yyssp)
01353     {
01354       /* Get the current used size of the three stacks, in elements.  */
01355       YYSIZE_T yysize = yyssp - yyss + 1;
01356 
01357 #ifdef yyoverflow
01358       {
01359     /* Give user a chance to reallocate the stack. Use copies of
01360        these so that the &'s don't force the real ones into
01361        memory.  */
01362     YYSTYPE *yyvs1 = yyvs;
01363     short *yyss1 = yyss;
01364     YYLTYPE *yyls1 = yyls;
01365 
01366     /* Each stack pointer address is followed by the size of the
01367        data in use in that stack, in bytes.  This used to be a
01368        conditional around just the two extra args, but that might
01369        be undefined if yyoverflow is a macro.  */
01370     yyoverflow ("parser stack overflow",
01371             &yyss1, yysize * sizeof (*yyssp),
01372             &yyvs1, yysize * sizeof (*yyvsp),
01373             &yyls1, yysize * sizeof (*yylsp),
01374             &yystacksize);
01375     yyls = yyls1;
01376     yyss = yyss1;
01377     yyvs = yyvs1;
01378       }
01379 #else /* no yyoverflow */
01380 # ifndef YYSTACK_RELOCATE
01381       goto yyoverflowlab;
01382 # else
01383       /* Extend the stack our own way.  */
01384       if (YYMAXDEPTH <= yystacksize)
01385     goto yyoverflowlab;
01386       yystacksize *= 2;
01387       if (YYMAXDEPTH < yystacksize)
01388     yystacksize = YYMAXDEPTH;
01389 
01390       {
01391     short *yyss1 = yyss;
01392     union yyalloc *yyptr =
01393       (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01394     if (! yyptr)
01395       goto yyoverflowlab;
01396     YYSTACK_RELOCATE (yyss);
01397     YYSTACK_RELOCATE (yyvs);
01398     YYSTACK_RELOCATE (yyls);
01399 #  undef YYSTACK_RELOCATE
01400     if (yyss1 != yyssa)
01401       YYSTACK_FREE (yyss1);
01402       }
01403 # endif
01404 #endif /* no yyoverflow */
01405 
01406       yyssp = yyss + yysize - 1;
01407       yyvsp = yyvs + yysize - 1;
01408       yylsp = yyls + yysize - 1;
01409 
01410       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01411           (unsigned long int) yystacksize));
01412 
01413       if (yyss + yystacksize - 1 <= yyssp)
01414     YYABORT;
01415     }
01416 
01417   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01418 
01419   goto yybackup;
01420 
01421 /*-----------.
01422 | yybackup.  |
01423 `-----------*/
01424 yybackup:
01425 
01426 /* Do appropriate processing given the current state.  */
01427 /* Read a lookahead token if we need one and don't already have one.  */
01428 /* yyresume: */
01429 
01430   /* First try to decide what to do without reference to lookahead token.  */
01431 
01432   yyn = yypact[yystate];
01433   if (yyn == YYPACT_NINF)
01434     goto yydefault;
01435 
01436   /* Not known => get a lookahead token if don't already have one.  */
01437 
01438   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
01439   if (yychar == YYEMPTY)
01440     {
01441       YYDPRINTF ((stderr, "Reading a token: "));
01442       yychar = YYLEX;
01443     }
01444 
01445   if (yychar <= YYEOF)
01446     {
01447       yychar = yytoken = YYEOF;
01448       YYDPRINTF ((stderr, "Now at end of input.\n"));
01449     }
01450   else
01451     {
01452       yytoken = YYTRANSLATE (yychar);
01453       YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
01454     }
01455 
01456   /* If the proper action on seeing token YYTOKEN is to reduce or to
01457      detect an error, take that action.  */
01458   yyn += yytoken;
01459   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01460     goto yydefault;
01461   yyn = yytable[yyn];
01462   if (yyn <= 0)
01463     {
01464       if (yyn == 0 || yyn == YYTABLE_NINF)
01465     goto yyerrlab;
01466       yyn = -yyn;
01467       goto yyreduce;
01468     }
01469 
01470   if (yyn == YYFINAL)
01471     YYACCEPT;
01472 
01473   /* Shift the lookahead token.  */
01474   YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
01475 
01476   /* Discard the token being shifted unless it is eof.  */
01477   if (yychar != YYEOF)
01478     yychar = YYEMPTY;
01479 
01480   *++yyvsp = yylval;
01481   *++yylsp = yylloc;
01482 
01483   /* Count tokens shifted since error; after three, turn off error
01484      status.  */
01485   if (yyerrstatus)
01486     yyerrstatus--;
01487 
01488   yystate = yyn;
01489   goto yynewstate;
01490 
01491 
01492 /*-----------------------------------------------------------.
01493 | yydefault -- do the default action for the current state.  |
01494 `-----------------------------------------------------------*/
01495 yydefault:
01496   yyn = yydefact[yystate];
01497   if (yyn == 0)
01498     goto yyerrlab;
01499   goto yyreduce;
01500 
01501 
01502 /*-----------------------------.
01503 | yyreduce -- Do a reduction.  |
01504 `-----------------------------*/
01505 yyreduce:
01506   /* yyn is the number of a rule to reduce with.  */
01507   yylen = yyr2[yyn];
01508 
01509   /* If YYLEN is nonzero, implement the default value of the action:
01510      `$$ = $1'.
01511 
01512      Otherwise, the following line sets YYVAL to garbage.
01513      This behavior is undocumented and Bison
01514      users should not rely upon it.  Assigning to YYVAL
01515      unconditionally makes the parser a bit smaller, and it avoids a
01516      GCC warning that YYVAL may be used uninitialized.  */
01517   yyval = yyvsp[1-yylen];
01518 
01519   /* Default location. */
01520   YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
01521   YY_REDUCE_PRINT (yyn);
01522   switch (yyn)
01523     {
01524         case 4:
01525 #line 125 "wmlscript/wsgram.y"
01526     { ws_error_syntax(pctx, yylsp[0].first_line); }
01527     break;
01528 
01529   case 8:
01530 #line 138 "wmlscript/wsgram.y"
01531     { ws_error_syntax(pctx, yylsp[0].first_line); }
01532     break;
01533 
01534   case 12:
01535 #line 149 "wmlscript/wsgram.y"
01536     { ws_pragma_use(pctx, yylsp[-1].first_line, yyvsp[-1].identifier, yyvsp[0].string); }
01537     break;
01538 
01539   case 14:
01540 #line 158 "wmlscript/wsgram.y"
01541     {
01542             WsCompiler *compiler = (WsCompiler *) pctx;
01543 
01544             /* Pass this to the byte-code */
01545             if (!ws_bc_add_pragma_access_domain(compiler->bc, yyvsp[0].string->data,
01546                                 yyvsp[0].string->len))
01547                 ws_error_memory(pctx);
01548             ws_lexer_free_utf8(compiler, yyvsp[0].string);
01549         }
01550     break;
01551 
01552   case 15:
01553 #line 168 "wmlscript/wsgram.y"
01554     {
01555             WsCompiler *compiler = (WsCompiler *) pctx;
01556 
01557             /* Pass this to the byte-code */
01558             if (!ws_bc_add_pragma_access_path(compiler->bc, yyvsp[0].string->data,
01559                               yyvsp[0].string->len))
01560                 ws_error_memory(pctx);
01561 
01562             ws_lexer_free_utf8(compiler, yyvsp[0].string);
01563         }
01564     break;
01565 
01566   case 16:
01567 #line 179 "wmlscript/wsgram.y"
01568     {
01569             WsCompiler *compiler = (WsCompiler *) pctx;
01570             WsBool success = WS_TRUE;
01571 
01572             /* Pass these to the byte-code */
01573             if (!ws_bc_add_pragma_access_domain(compiler->bc, yyvsp[-2].string->data,
01574                                 yyvsp[-2].string->len))
01575                 success = WS_FALSE;
01576 
01577             if (!ws_bc_add_pragma_access_path(compiler->bc, yyvsp[0].string->data,
01578                               yyvsp[0].string->len))
01579                 success = WS_FALSE;
01580 
01581             if (!success)
01582                 ws_error_memory(pctx);
01583 
01584             ws_lexer_free_utf8(compiler, yyvsp[-2].string);
01585             ws_lexer_free_utf8(compiler, yyvsp[0].string);
01586         }
01587     break;
01588 
01589   case 21:
01590 #line 212 "wmlscript/wsgram.y"
01591     {
01592             WsCompiler *compiler = (WsCompiler *) pctx;
01593 
01594             /* Meta information for the origin servers.  Show it
01595                      * to the user if requested. */
01596             if (compiler->params.meta_name_cb)
01597                 (*compiler->params.meta_name_cb)(
01598                     yyvsp[0].meta_body->property_name, yyvsp[0].meta_body->content,
01599                     yyvsp[0].meta_body->scheme,
01600                     compiler->params.meta_name_cb_context);
01601 
01602             /* We do not need the MetaBody anymore. */
01603             ws_pragma_meta_body_free(compiler, yyvsp[0].meta_body);
01604         }
01605     break;
01606 
01607   case 22:
01608 #line 230 "wmlscript/wsgram.y"
01609     {
01610             WsCompiler *compiler = (WsCompiler *) pctx;
01611 
01612             /* Meta information HTTP header that should be
01613                      * included to an HTTP response header.  Show it to
01614                      * the user if requested. */
01615             if (compiler->params.meta_http_equiv_cb)
01616                 (*compiler->params.meta_http_equiv_cb)(
01617                 yyvsp[0].meta_body->property_name,
01618                 yyvsp[0].meta_body->content,
01619                 yyvsp[0].meta_body->scheme,
01620                 compiler->params.meta_http_equiv_cb_context);
01621 
01622             /* We do not need the MetaBody anymore. */
01623             ws_pragma_meta_body_free(compiler, yyvsp[0].meta_body);
01624         }
01625     break;
01626 
01627   case 23:
01628 #line 250 "wmlscript/wsgram.y"
01629     {
01630             WsBool success;
01631             WsCompiler *compiler = (WsCompiler *) pctx;
01632 
01633             /* Pass this pragma to the byte-code */
01634             if (yyvsp[0].meta_body) {
01635                 if (yyvsp[0].meta_body->scheme)
01636                 success
01637               = ws_bc_add_pragma_user_agent_property_and_scheme(
01638                         compiler->bc,
01639                         yyvsp[0].meta_body->property_name->data,
01640                         yyvsp[0].meta_body->property_name->len,
01641                         yyvsp[0].meta_body->content->data,
01642                         yyvsp[0].meta_body->content->len,
01643                         yyvsp[0].meta_body->scheme->data,
01644                         yyvsp[0].meta_body->scheme->len);
01645                 else
01646                 success = ws_bc_add_pragma_user_agent_property(
01647                         compiler->bc,
01648                         yyvsp[0].meta_body->property_name->data,
01649                         yyvsp[0].meta_body->property_name->len,
01650                         yyvsp[0].meta_body->content->data,
01651                         yyvsp[0].meta_body->content->len);
01652 
01653                 /* Free the MetaBody. */
01654                 ws_pragma_meta_body_free(compiler, yyvsp[0].meta_body);
01655 
01656                 if (!success)
01657                 ws_error_memory(pctx);
01658             }
01659         }
01660     break;
01661 
01662   case 24:
01663 #line 285 "wmlscript/wsgram.y"
01664     { yyval.meta_body = ws_pragma_meta_body(pctx, yyvsp[-1].string, yyvsp[0].string, NULL); }
01665     break;
01666 
01667   case 25:
01668 #line 287 "wmlscript/wsgram.y"
01669     { yyval.meta_body = ws_pragma_meta_body(pctx, yyvsp[-2].string, yyvsp[-1].string, yyvsp[0].string); }
01670     break;
01671 
01672   case 31:
01673 #line 304 "wmlscript/wsgram.y"
01674     {
01675             char *name = ws_strdup(yyvsp[-5].identifier);
01676 
01677             ws_lexer_free_block(pctx, yyvsp[-5].identifier);
01678 
01679             if (name)
01680                 ws_function(pctx, yyvsp[-7].boolean, name, yylsp[-5].first_line, yyvsp[-3].list, yyvsp[-1].list);
01681             else
01682                 ws_error_memory(pctx);
01683         }
01684     break;
01685 
01686   case 32:
01687 #line 317 "wmlscript/wsgram.y"
01688     { yyval.boolean = WS_FALSE; }
01689     break;
01690 
01691   case 33:
01692 #line 318 "wmlscript/wsgram.y"
01693     { yyval.boolean = WS_TRUE;  }
01694     break;
01695 
01696   case 34:
01697 #line 323 "wmlscript/wsgram.y"
01698     { yyval.list = ws_list_new(pctx); }
01699     break;
01700 
01701   case 38:
01702 #line 334 "wmlscript/wsgram.y"
01703     {
01704                     char *id;
01705                     WsFormalParm *parm;
01706 
01707             id = ws_f_strdup(((WsCompiler *) pctx)->pool_stree, yyvsp[0].identifier);
01708                     parm = ws_formal_parameter(pctx, yylsp[0].first_line, id);
01709 
01710             ws_lexer_free_block(pctx, yyvsp[0].identifier);
01711 
01712             if (id == NULL || parm == NULL) {
01713                 ws_error_memory(pctx);
01714                 yyval.list = NULL;
01715             } else {
01716                 yyval.list = ws_list_new(pctx);
01717                 ws_list_append(pctx, yyval.list, parm);
01718             }
01719         }
01720     break;
01721 
01722   case 39:
01723 #line 352 "wmlscript/wsgram.y"
01724     {
01725                     char *id;
01726                     WsFormalParm *parm;
01727 
01728             id = ws_f_strdup(((WsCompiler *) pctx)->pool_stree, yyvsp[0].identifier);
01729                     parm = ws_formal_parameter(pctx, yylsp[-2].first_line, id);
01730 
01731             ws_lexer_free_block(pctx, yyvsp[0].identifier);
01732 
01733             if (id == NULL || parm == NULL) {
01734                 ws_error_memory(pctx);
01735                 yyval.list = NULL;
01736             } else
01737                 ws_list_append(pctx, yyvsp[-2].list, parm);
01738         }
01739     break;
01740 
01741   case 40:
01742 #line 373 "wmlscript/wsgram.y"
01743     {
01744             if (yyvsp[0].list)
01745                 yyval.stmt = ws_stmt_block(pctx, yyvsp[0].list->first_line, yyvsp[0].list->last_line,
01746                            yyvsp[0].list);
01747             else
01748                 yyval.stmt = NULL;
01749         }
01750     break;
01751 
01752   case 42:
01753 #line 382 "wmlscript/wsgram.y"
01754     { yyval.stmt = ws_stmt_empty(pctx, yylsp[0].first_line); }
01755     break;
01756 
01757   case 43:
01758 #line 384 "wmlscript/wsgram.y"
01759     { yyval.stmt = ws_stmt_expr(pctx, yyvsp[-1].expr->line, yyvsp[-1].expr); }
01760     break;
01761 
01762   case 46:
01763 #line 388 "wmlscript/wsgram.y"
01764     { yyval.stmt = ws_stmt_continue(pctx, yylsp[-1].first_line); }
01765     break;
01766 
01767   case 47:
01768 #line 390 "wmlscript/wsgram.y"
01769     { yyval.stmt = ws_stmt_break(pctx, yylsp[-1].first_line); }
01770     break;
01771 
01772   case 49:
01773 #line 395 "wmlscript/wsgram.y"
01774     {
01775             yyval.list = yyvsp[-1].list;
01776             if (yyval.list) {
01777                 yyval.list->first_line = yylsp[-2].first_line;
01778                 yyval.list->last_line = yylsp[0].first_line;
01779             }
01780         }
01781     break;
01782 
01783   case 50:
01784 #line 403 "wmlscript/wsgram.y"
01785     {
01786             ws_error_syntax(pctx, yylsp[0].first_line);
01787             yyval.list = NULL;
01788         }
01789     break;
01790 
01791   case 51:
01792 #line 411 "wmlscript/wsgram.y"
01793     { yyval.list = ws_list_new(pctx); }
01794     break;
01795 
01796   case 53:
01797 #line 417 "wmlscript/wsgram.y"
01798     {
01799             yyval.list = ws_list_new(pctx);
01800             ws_list_append(pctx, yyval.list, yyvsp[0].stmt);
01801         }
01802     break;
01803 
01804   case 54:
01805 #line 422 "wmlscript/wsgram.y"
01806     { ws_list_append(pctx, yyvsp[-1].list, yyvsp[0].stmt); }
01807     break;
01808 
01809   case 55:
01810 #line 427 "wmlscript/wsgram.y"
01811     { yyval.stmt = ws_stmt_variable(pctx, yylsp[-2].first_line, yyvsp[-1].list); }
01812     break;
01813 
01814   case 56:
01815 #line 429 "wmlscript/wsgram.y"
01816     { ws_error_syntax(pctx, yylsp[0].first_line); }
01817     break;
01818 
01819   case 57:
01820 #line 434 "wmlscript/wsgram.y"
01821     {
01822             yyval.list = ws_list_new(pctx);
01823             ws_list_append(pctx, yyval.list, yyvsp[0].vardec);
01824         }
01825     break;
01826 
01827   case 58:
01828 #line 439 "wmlscript/wsgram.y"
01829     { ws_list_append(pctx, yyvsp[-2].list, yyvsp[0].vardec); }
01830     break;
01831 
01832   case 59:
01833 #line 444 "wmlscript/wsgram.y"
01834     {
01835             char *id = ws_f_strdup(((WsCompiler *) pctx)->pool_stree,
01836                        yyvsp[-1].identifier);
01837 
01838             ws_lexer_free_block(pctx, yyvsp[-1].identifier);
01839             if (id == NULL) {
01840                 ws_error_memory(pctx);
01841                 yyval.vardec = NULL;
01842             } else
01843                 yyval.vardec = ws_variable_declaration(pctx, id, yyvsp[0].expr);
01844         }
01845     break;
01846 
01847   case 60:
01848 #line 459 "wmlscript/wsgram.y"
01849     { yyval.expr = NULL; }
01850     break;
01851 
01852   case 61:
01853 #line 461 "wmlscript/wsgram.y"
01854     { yyval.expr = yyvsp[0].expr; }
01855     break;
01856 
01857   case 62:
01858 #line 466 "wmlscript/wsgram.y"
01859     { yyval.stmt = ws_stmt_if(pctx, yylsp[-6].first_line, yyvsp[-4].expr, yyvsp[-2].stmt, yyvsp[0].stmt); }
01860     break;
01861 
01862   case 63:
01863 #line 468 "wmlscript/wsgram.y"
01864     { yyval.stmt = ws_stmt_if(pctx, yylsp[-4].first_line, yyvsp[-2].expr, yyvsp[0].stmt, NULL); }
01865     break;
01866 
01867   case 64:
01868 #line 473 "wmlscript/wsgram.y"
01869     { yyval.stmt = ws_stmt_while(pctx, yylsp[-4].first_line, yyvsp[-2].expr, yyvsp[0].stmt); }
01870     break;
01871 
01872   case 66:
01873 #line 480 "wmlscript/wsgram.y"
01874     { yyval.stmt = ws_stmt_for(pctx, yylsp[-8].first_line, NULL, yyvsp[-6].expr, yyvsp[-4].expr, yyvsp[-2].expr, yyvsp[0].stmt); }
01875     break;
01876 
01877   case 67:
01878 #line 483 "wmlscript/wsgram.y"
01879     { yyval.stmt = ws_stmt_for(pctx, yylsp[-9].first_line, yyvsp[-6].list, NULL, yyvsp[-4].expr, yyvsp[-2].expr, yyvsp[0].stmt); }
01880     break;
01881 
01882   case 68:
01883 #line 488 "wmlscript/wsgram.y"
01884     { yyval.stmt = ws_stmt_return(pctx, yylsp[-2].first_line, yyvsp[-1].expr); }
01885     break;
01886 
01887   case 69:
01888 #line 494 "wmlscript/wsgram.y"
01889     { yyval.expr = NULL; }
01890     break;
01891 
01892   case 72:
01893 #line 502 "wmlscript/wsgram.y"
01894     { yyval.expr = ws_expr_comma(pctx, yylsp[-1].first_line, yyvsp[-2].expr, yyvsp[0].expr); }
01895     break;
01896 
01897   case 74:
01898 #line 508 "wmlscript/wsgram.y"
01899     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, '=', yyvsp[0].expr); }
01900     break;
01901 
01902   case 75:
01903 #line 510 "wmlscript/wsgram.y"
01904     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tMULA, yyvsp[0].expr); }
01905     break;
01906 
01907   case 76:
01908 #line 512 "wmlscript/wsgram.y"
01909     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tDIVA, yyvsp[0].expr); }
01910     break;
01911 
01912   case 77:
01913 #line 514 "wmlscript/wsgram.y"
01914     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tREMA, yyvsp[0].expr); }
01915     break;
01916 
01917   case 78:
01918 #line 516 "wmlscript/wsgram.y"
01919     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tADDA, yyvsp[0].expr); }
01920     break;
01921 
01922   case 79:
01923 #line 518 "wmlscript/wsgram.y"
01924     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tSUBA, yyvsp[0].expr); }
01925     break;
01926 
01927   case 80:
01928 #line 520 "wmlscript/wsgram.y"
01929     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tLSHIFTA, yyvsp[0].expr); }
01930     break;
01931 
01932   case 81:
01933 #line 522 "wmlscript/wsgram.y"
01934     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tRSSHIFTA, yyvsp[0].expr); }
01935     break;
01936 
01937   case 82:
01938 #line 524 "wmlscript/wsgram.y"
01939     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tRSZSHIFTA, yyvsp[0].expr); }
01940     break;
01941 
01942   case 83:
01943 #line 526 "wmlscript/wsgram.y"
01944     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tANDA, yyvsp[0].expr); }
01945     break;
01946 
01947   case 84:
01948 #line 528 "wmlscript/wsgram.y"
01949     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tXORA, yyvsp[0].expr); }
01950     break;
01951 
01952   case 85:
01953 #line 530 "wmlscript/wsgram.y"
01954     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tORA, yyvsp[0].expr); }
01955     break;
01956 
01957   case 86:
01958 #line 532 "wmlscript/wsgram.y"
01959     { yyval.expr = ws_expr_assign(pctx, yylsp[-2].first_line, yyvsp[-2].identifier, tIDIVA, yyvsp[0].expr); }
01960     break;
01961 
01962   case 88:
01963 #line 538 "wmlscript/wsgram.y"
01964     { yyval.expr = ws_expr_conditional(pctx, yylsp[-3].first_line, yyvsp[-4].expr, yyvsp[-2].expr, yyvsp[0].expr); }
01965     break;
01966 
01967   case 90:
01968 #line 544 "wmlscript/wsgram.y"
01969     { yyval.expr = ws_expr_logical(pctx, yylsp[-1].first_line, WS_ASM_SCOR, yyvsp[-2].expr, yyvsp[0].expr); }
01970     break;
01971 
01972   case 92:
01973 #line 550 "wmlscript/wsgram.y"
01974     { yyval.expr = ws_expr_logical(pctx, yylsp[-1].first_line, WS_ASM_SCAND, yyvsp[-2].expr, yyvsp[0].expr); }
01975     break;
01976 
01977   case 94:
01978 #line 556 "wmlscript/wsgram.y"
01979     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_B_OR, yyvsp[-2].expr, yyvsp[0].expr); }
01980     break;
01981 
01982   case 96:
01983 #line 562 "wmlscript/wsgram.y"
01984     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_B_XOR, yyvsp[-2].expr, yyvsp[0].expr); }
01985     break;
01986 
01987   case 98:
01988 #line 568 "wmlscript/wsgram.y"
01989     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_B_AND, yyvsp[-2].expr, yyvsp[0].expr); }
01990     break;
01991 
01992   case 100:
01993 #line 574 "wmlscript/wsgram.y"
01994     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_EQ, yyvsp[-2].expr, yyvsp[0].expr); }
01995     break;
01996 
01997   case 101:
01998 #line 576 "wmlscript/wsgram.y"
01999     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_NE, yyvsp[-2].expr, yyvsp[0].expr); }
02000     break;
02001 
02002   case 103:
02003 #line 582 "wmlscript/wsgram.y"
02004     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_LT, yyvsp[-2].expr, yyvsp[0].expr); }
02005     break;
02006 
02007   case 104:
02008 #line 584 "wmlscript/wsgram.y"
02009     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_GT, yyvsp[-2].expr, yyvsp[0].expr); }
02010     break;
02011 
02012   case 105:
02013 #line 586 "wmlscript/wsgram.y"
02014     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_LE, yyvsp[-2].expr, yyvsp[0].expr); }
02015     break;
02016 
02017   case 106:
02018 #line 588 "wmlscript/wsgram.y"
02019     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_GE, yyvsp[-2].expr, yyvsp[0].expr); }
02020     break;
02021 
02022   case 108:
02023 #line 594 "wmlscript/wsgram.y"
02024     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_B_LSHIFT, yyvsp[-2].expr, yyvsp[0].expr); }
02025     break;
02026 
02027   case 109:
02028 #line 596 "wmlscript/wsgram.y"
02029     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_B_RSSHIFT, yyvsp[-2].expr, yyvsp[0].expr); }
02030     break;
02031 
02032   case 110:
02033 #line 598 "wmlscript/wsgram.y"
02034     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_B_RSZSHIFT, yyvsp[-2].expr, yyvsp[0].expr); }
02035     break;
02036 
02037   case 112:
02038 #line 604 "wmlscript/wsgram.y"
02039     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_ADD, yyvsp[-2].expr, yyvsp[0].expr); }
02040     break;
02041 
02042   case 113:
02043 #line 606 "wmlscript/wsgram.y"
02044     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_SUB, yyvsp[-2].expr, yyvsp[0].expr); }
02045     break;
02046 
02047   case 115:
02048 #line 612 "wmlscript/wsgram.y"
02049     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_MUL, yyvsp[-2].expr, yyvsp[0].expr); }
02050     break;
02051 
02052   case 116:
02053 #line 614 "wmlscript/wsgram.y"
02054     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_DIV, yyvsp[-2].expr, yyvsp[0].expr); }
02055     break;
02056 
02057   case 117:
02058 #line 616 "wmlscript/wsgram.y"
02059     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_IDIV, yyvsp[-2].expr, yyvsp[0].expr); }
02060     break;
02061 
02062   case 118:
02063 #line 618 "wmlscript/wsgram.y"
02064     { yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_REM, yyvsp[-2].expr, yyvsp[0].expr); }
02065     break;
02066 
02067   case 120:
02068 #line 624 "wmlscript/wsgram.y"
02069     { yyval.expr = ws_expr_unary(pctx, yylsp[-1].first_line, WS_ASM_TYPEOF, yyvsp[0].expr); }
02070     break;
02071 
02072   case 121:
02073 #line 626 "wmlscript/wsgram.y"
02074     { yyval.expr = ws_expr_unary(pctx, yylsp[-1].first_line, WS_ASM_ISVALID, yyvsp[0].expr); }
02075     break;
02076 
02077   case 122:
02078 #line 628 "wmlscript/wsgram.y"
02079     { yyval.expr = ws_expr_unary_var(pctx, yylsp[-1].first_line, WS_TRUE, yyvsp[0].identifier); }
02080     break;
02081 
02082   case 123:
02083 #line 630 "wmlscript/wsgram.y"
02084     { yyval.expr = ws_expr_unary_var(pctx, yylsp[-1].first_line, WS_FALSE, yyvsp[0].identifier); }
02085     break;
02086 
02087   case 124:
02088 #line 632 "wmlscript/wsgram.y"
02089     {
02090                     /* There is no direct way to compile unary `+'.
02091                      * It doesn't do anything except require type conversion
02092              * (section 7.2, 7.3.2), and we do that by converting
02093              * it to a binary expression: `UnaryExpression - 0'.
02094                      * Using `--UnaryExpression' would not be correct because
02095                      * it might overflow if UnaryExpression is the smallest
02096                      * possible integer value (see 6.2.7.1).
02097                      * Using `UnaryExpression + 0' would not be correct
02098                      * because binary `+' accepts strings, which makes the
02099              * type conversion different.
02100                      */
02101                     yyval.expr = ws_expr_binary(pctx, yylsp[-1].first_line, WS_ASM_SUB, yyvsp[0].expr,
02102                               ws_expr_const_integer(pctx, yylsp[-1].first_line, 0));
02103         }
02104     break;
02105 
02106   case 125:
02107 #line 648 "wmlscript/wsgram.y"
02108     { yyval.expr = ws_expr_unary(pctx, yylsp[-1].first_line, WS_ASM_UMINUS, yyvsp[0].expr); }
02109     break;
02110 
02111   case 126:
02112 #line 650 "wmlscript/wsgram.y"
02113     { yyval.expr = ws_expr_unary(pctx, yylsp[-1].first_line, WS_ASM_B_NOT, yyvsp[0].expr); }
02114     break;
02115 
02116   case 127:
02117 #line 652 "wmlscript/wsgram.y"
02118     { yyval.expr = ws_expr_unary(pctx, yylsp[-1].first_line, WS_ASM_NOT, yyvsp[0].expr); }
02119     break;
02120 
02121   case 129:
02122 #line 658 "wmlscript/wsgram.y"
02123     { yyval.expr = ws_expr_postfix_var(pctx, yylsp[-1].first_line, WS_TRUE, yyvsp[-1].identifier); }
02124     break;
02125 
02126   case 130:
02127 #line 660 "wmlscript/wsgram.y"
02128     { yyval.expr = ws_expr_postfix_var(pctx, yylsp[-1].first_line, WS_FALSE, yyvsp[-1].identifier); }
02129     break;
02130 
02131   case 132:
02132 #line 666 "wmlscript/wsgram.y"
02133     {
02134             WsFunctionHash *f = ws_function_hash(pctx, yyvsp[-1].identifier);
02135 
02136             /* Add an usage count for the local script function. */
02137             if (f)
02138               f->usage_count++;
02139 
02140             yyval.expr = ws_expr_call(pctx, yylsp[-1].first_line, ' ', NULL, yyvsp[-1].identifier, yyvsp[0].list);
02141         }
02142     break;
02143 
02144   case 133:
02145 #line 676 "wmlscript/wsgram.y"
02146     { yyval.expr = ws_expr_call(pctx, yylsp[-1].first_line, '#', yyvsp[-3].identifier, yyvsp[-1].identifier, yyvsp[0].list); }
02147     break;
02148 
02149   case 134:
02150 #line 678 "wmlscript/wsgram.y"
02151     { yyval.expr = ws_expr_call(pctx, yylsp[-1].first_line, '.', yyvsp[-3].identifier, yyvsp[-1].identifier, yyvsp[0].list); }
02152     break;
02153 
02154   case 135:
02155 #line 683 "wmlscript/wsgram.y"
02156     { yyval.expr = ws_expr_symbol(pctx, yylsp[0].first_line, yyvsp[0].identifier); }
02157     break;
02158 
02159   case 136:
02160 #line 685 "wmlscript/wsgram.y"
02161     { yyval.expr = ws_expr_const_invalid(pctx, yylsp[0].first_line); }
02162     break;
02163 
02164   case 137:
02165 #line 687 "wmlscript/wsgram.y"
02166     { yyval.expr = ws_expr_const_true(pctx, yylsp[0].first_line); }
02167     break;
02168 
02169   case 138:
02170 #line 689 "wmlscript/wsgram.y"
02171     { yyval.expr = ws_expr_const_false(pctx, yylsp[0].first_line); }
02172     break;
02173 
02174   case 139:
02175 #line 691 "wmlscript/wsgram.y"
02176     { yyval.expr = ws_expr_const_integer(pctx, yylsp[0].first_line, yyvsp[0].integer); }
02177     break;
02178 
02179   case 140:
02180 #line 693 "wmlscript/wsgram.y"
02181     { yyval.expr = ws_expr_const_float(pctx, yylsp[0].first_line, yyvsp[0].vfloat); }
02182     break;
02183 
02184   case 141:
02185 #line 695 "wmlscript/wsgram.y"
02186     { yyval.expr = ws_expr_const_string(pctx, yylsp[0].first_line, yyvsp[0].string); }
02187     break;
02188 
02189   case 142:
02190 #line 697 "wmlscript/wsgram.y"
02191     { yyval.expr = yyvsp[-1].expr; }
02192     break;
02193 
02194   case 143:
02195 #line 702 "wmlscript/wsgram.y"
02196     { yyval.list = ws_list_new(pctx); }
02197     break;
02198 
02199   case 144:
02200 #line 704 "wmlscript/wsgram.y"
02201     { yyval.list = yyvsp[-1].list; }
02202     break;
02203 
02204   case 145:
02205 #line 709 "wmlscript/wsgram.y"
02206     {
02207             yyval.list = ws_list_new(pctx);
02208             ws_list_append(pctx, yyval.list, yyvsp[0].expr);
02209         }
02210     break;
02211 
02212   case 146:
02213 #line 714 "wmlscript/wsgram.y"
02214     { ws_list_append(pctx, yyvsp[-2].list, yyvsp[0].expr); }
02215     break;
02216 
02217 
02218     }
02219 
02220 /* Line 999 of yacc.c.  */
02221 #line 2221 "y.tab.c"
02222 
02223   yyvsp -= yylen;
02224   yyssp -= yylen;
02225   yylsp -= yylen;
02226 
02227   YY_STACK_PRINT (yyss, yyssp);
02228 
02229   *++yyvsp = yyval;
02230   *++yylsp = yyloc;
02231 
02232   /* Now `shift' the result of the reduction.  Determine what state
02233      that goes to, based on the state we popped back to and the rule
02234      number reduced by.  */
02235 
02236   yyn = yyr1[yyn];
02237 
02238   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
02239   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
02240     yystate = yytable[yystate];
02241   else
02242     yystate = yydefgoto[yyn - YYNTOKENS];
02243 
02244   goto yynewstate;
02245 
02246 
02247 /*------------------------------------.
02248 | yyerrlab -- here on detecting error |
02249 `------------------------------------*/
02250 yyerrlab:
02251   /* If not already recovering from an error, report this error.  */
02252   if (!yyerrstatus)
02253     {
02254       ++yynerrs;
02255 #if YYERROR_VERBOSE
02256       yyn = yypact[yystate];
02257 
02258       if (YYPACT_NINF < yyn && yyn < YYLAST)
02259     {
02260       YYSIZE_T yysize = 0;
02261       int yytype = YYTRANSLATE (yychar);
02262       char *yymsg;
02263       int yyx, yycount;
02264 
02265       yycount = 0;
02266       /* Start YYX at -YYN if negative to avoid negative indexes in
02267          YYCHECK.  */
02268       for (yyx = yyn < 0 ? -yyn : 0;
02269            yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
02270         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
02271           yysize += yystrlen (yytname[yyx]) + 15, yycount++;
02272       yysize += yystrlen ("syntax error, unexpected ") + 1;
02273       yysize += yystrlen (yytname[yytype]);
02274       yymsg = (char *) YYSTACK_ALLOC (yysize);
02275       if (yymsg != 0)
02276         {
02277           char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
02278           yyp = yystpcpy (yyp, yytname[yytype]);
02279 
02280           if (yycount < 5)
02281         {
02282           yycount = 0;
02283           for (yyx = yyn < 0 ? -yyn : 0;
02284                yyx < (int) (sizeof (yytname) / sizeof (char *));
02285                yyx++)
02286             if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
02287               {
02288             const char *yyq = ! yycount ? ", expecting " : " or ";
02289             yyp = yystpcpy (yyp, yyq);
02290             yyp = yystpcpy (yyp, yytname[yyx]);
02291             yycount++;
02292               }
02293         }
02294           yyerror (yymsg);
02295           YYSTACK_FREE (yymsg);
02296         }
02297       else
02298         yyerror ("syntax error; also virtual memory exhausted");
02299     }
02300       else
02301 #endif /* YYERROR_VERBOSE */
02302     yyerror ("syntax error");
02303     }
02304 
02305   yylerrsp = yylsp;
02306 
02307   if (yyerrstatus == 3)
02308     {
02309       /* If just tried and failed to reuse lookahead token after an
02310      error, discard it.  */
02311 
02312       /* Return failure if at end of input.  */
02313       if (yychar == YYEOF)
02314         {
02315       /* Pop the error token.  */
02316           YYPOPSTACK;
02317       /* Pop the rest of the stack.  */
02318       while (yyss < yyssp)
02319         {
02320           YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
02321           yydestruct (yystos[*yyssp], yyvsp, yylsp);
02322           YYPOPSTACK;
02323         }
02324       YYABORT;
02325         }
02326 
02327       YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
02328       yydestruct (yytoken, &yylval, &yylloc);
02329       yychar = YYEMPTY;
02330       *++yylerrsp = yylloc;
02331     }
02332 
02333   /* Else will try to reuse lookahead token after shifting the error
02334      token.  */
02335   goto yyerrlab1;
02336 
02337 
02338 /*----------------------------------------------------.
02339 | yyerrlab1 -- error raised explicitly by an action.  |
02340 `----------------------------------------------------*/
02341 yyerrlab1:
02342   yyerrstatus = 3;  /* Each real token shifted decrements this.  */
02343 
02344   for (;;)
02345     {
02346       yyn = yypact[yystate];
02347       if (yyn != YYPACT_NINF)
02348     {
02349       yyn += YYTERROR;
02350       if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
02351         {
02352           yyn = yytable[yyn];
02353           if (0 < yyn)
02354         break;
02355         }
02356     }
02357 
02358       /* Pop the current state because it cannot handle the error token.  */
02359       if (yyssp == yyss)
02360     YYABORT;
02361 
02362       YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
02363       yydestruct (yystos[yystate], yyvsp, yylsp);
02364       yyvsp--;
02365       yystate = *--yyssp;
02366       yylsp--;
02367       YY_STACK_PRINT (yyss, yyssp);
02368     }
02369 
02370   if (yyn == YYFINAL)
02371     YYACCEPT;
02372 
02373   YYDPRINTF ((stderr, "Shifting error token, "));
02374 
02375   *++yyvsp = yylval;
02376   YYLLOC_DEFAULT (yyloc, yylsp, (yylerrsp - yylsp));
02377   *++yylsp = yyloc;
02378 
02379   yystate = yyn;
02380   goto yynewstate;
02381 
02382 
02383 /*-------------------------------------.
02384 | yyacceptlab -- YYACCEPT comes here.  |
02385 `-------------------------------------*/
02386 yyacceptlab:
02387   yyresult = 0;
02388   goto yyreturn;
02389 
02390 /*-----------------------------------.
02391 | yyabortlab -- YYABORT comes here.  |
02392 `-----------------------------------*/
02393 yyabortlab:
02394   yyresult = 1;
02395   goto yyreturn;
02396 
02397 #ifndef yyoverflow
02398 /*----------------------------------------------.
02399 | yyoverflowlab -- parser overflow comes here.  |
02400 `----------------------------------------------*/
02401 yyoverflowlab:
02402   yyerror ("parser stack overflow");
02403   yyresult = 2;
02404   /* Fall through.  */
02405 #endif
02406 
02407 yyreturn:
02408 #ifndef yyoverflow
02409   if (yyss != yyssa)
02410     YYSTACK_FREE (yyss);
02411 #endif
02412   return yyresult;
02413 }

Here is the call graph for this function:

int yyparse  ) 
 


Variable Documentation

const short yycheck[] [static]
 

Definition at line 819 of file wsgram.c.

Referenced by yyparse().

const unsigned char 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 680 of file wsgram.c.

Referenced by yyparse().

const short 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 711 of file wsgram.c.

Referenced by yyparse().

const short 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 724 of file wsgram.c.

Referenced by yyparse().

const short 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 755 of file wsgram.c.

Referenced by yyparse().

const unsigned char 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 638 of file wsgram.c.

Referenced by yyparse().

const unsigned char 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 658 of file wsgram.c.

Referenced by yyparse().

const unsigned char 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 870 of file wsgram.c.

Referenced by yyparse().

const short yytable[] [static]
 

Definition at line 770 of file wsgram.c.

Referenced by yyparse().

const unsigned char yytranslate[] [static]
 

Definition at line 445 of file wsgram.c.

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