Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

AtomParser.C File Reference

#include <stdio.h>
#include <string.h>
#include "AtomParser.h"
#include "Inform.h"
#include <inttypes.h>
#include <stdlib.h>
#include <values.h>

Go to the source code of this file.

Compounds

union  YYSTYPE
struct  yytoktype

Defines

#define KEY   257
#define WITHIN   258
#define EXWITHIN   259
#define PBWITHIN   260
#define WITHINBONDS   261
#define MAXRINGSIZE   262
#define RINGSIZE   263
#define WHERE   264
#define FUNC   265
#define STRFCTN   266
#define SAME   267
#define NEAREST   268
#define SINGLE   269
#define FROM   270
#define OF   271
#define AS   272
#define THROUGH   273
#define PARSEERROR   274
#define RANGE   275
#define FLOATVAL   276
#define INTVAL   277
#define STRWORD   278
#define COMPARE   279
#define OR   280
#define AND   281
#define LT   282
#define LE   283
#define EQ   284
#define GE   285
#define GT   286
#define NE   287
#define NLT   288
#define NLE   289
#define NEQ   290
#define NGE   291
#define NGT   292
#define NNE   293
#define SLT   294
#define SLE   295
#define SEQ   296
#define SGE   297
#define SGT   298
#define SNE   299
#define MATCH   300
#define ADD   301
#define SUB   302
#define MULT   303
#define DIV   304
#define MOD   305
#define EXP   306
#define nonassoc   307
#define NOT   308
#define UMINUS   309
#define YYCONST   const
#define yyclearin   yychar = -1
#define yyerrok   yyerrflag = 0
#define YYMAXDEPTH   150
#define YYERRCODE   256
#define YYNPROD   59
#define YYLAST   368
#define YYDEBUG   0
#define YYERROR   goto yyerrlab
#define YYACCEPT   return(0)
#define YYABORT   return(1)
#define YYBACKUP(newtoken, newvalue)
#define YYRECOVERING()   (!!yyerrflag)
#define YYNEW(type)   malloc(sizeof(type) * yynewmax)
#define YYCOPY(to, from, type)   (type *) memcpy(to, (char *) from, yymaxdepth * sizeof (type))
#define YYENLARGE(from, type)   (type *) realloc((char *) from, yynewmax * sizeof(type))
#define YYFLAG   (-10000000)
#define YYLEX()   yylex()

Typedefs

typedef int yytabelem

Functions

int yyparse ()
void yyerror (const char *s)
int yylex ()
int yywrap (void)

Variables

atomparser_nodeatomparser_result
 contains the final parse tree, or NULL if there was an error. More...

int yychar
int yyerrflag
YYSTYPE yylval
YYSTYPE yyval
int yy_yys [YYMAXDEPTH]
int * yys = yy_yys
YYSTYPE yy_yyv [YYMAXDEPTH]
YYSTYPEyyv = yy_yyv
int yymaxdepth = YYMAXDEPTH
YYCONST yytabelem yyexca []
YYCONST yytabelem yyact []
YYCONST yytabelem yypact []
YYCONST yytabelem yypgo []
YYCONST yytabelem yyr1 []
YYCONST yytabelem yyr2 []
YYCONST yytabelem yychk []
YYCONST yytabelem yydef []
int yydebug
YYSTYPEyypv
int * yyps
int yystate
int yytmp
int yynerrs


Define Documentation

#define ADD   301
 

Definition at line 93 of file AtomParser.C.

Referenced by yyparse.

#define AND   281
 

Definition at line 73 of file AtomParser.C.

Referenced by yyparse.

#define AS   272
 

Definition at line 64 of file AtomParser.C.

#define COMPARE   279
 

Definition at line 71 of file AtomParser.C.

Referenced by yyparse.

#define DIV   304
 

Definition at line 96 of file AtomParser.C.

Referenced by yyparse.

#define EQ   284
 

Definition at line 76 of file AtomParser.C.

#define EXP   306
 

Definition at line 98 of file AtomParser.C.

Referenced by yyparse.

#define EXWITHIN   259
 

Definition at line 51 of file AtomParser.C.

Referenced by yyparse.

#define FLOATVAL   276
 

Definition at line 68 of file AtomParser.C.

Referenced by yyparse.

#define FROM   270
 

Definition at line 62 of file AtomParser.C.

#define FUNC   265
 

Definition at line 57 of file AtomParser.C.

#define GE   285
 

Definition at line 77 of file AtomParser.C.

#define GT   286
 

Definition at line 78 of file AtomParser.C.

#define INTVAL   277
 

Definition at line 69 of file AtomParser.C.

Referenced by yyparse.

#define KEY   257
 

Definition at line 49 of file AtomParser.C.

#define LE   283
 

Definition at line 75 of file AtomParser.C.

#define LT   282
 

Definition at line 74 of file AtomParser.C.

#define MATCH   300
 

Definition at line 92 of file AtomParser.C.

Referenced by yyparse.

#define MAXRINGSIZE   262
 

Definition at line 54 of file AtomParser.C.

Referenced by yyparse.

#define MOD   305
 

Definition at line 97 of file AtomParser.C.

Referenced by yyparse.

#define MULT   303
 

Definition at line 95 of file AtomParser.C.

Referenced by yyparse.

#define NE   287
 

Definition at line 79 of file AtomParser.C.

#define NEAREST   268
 

Definition at line 60 of file AtomParser.C.

Referenced by yyparse.

#define NEQ   290
 

Definition at line 82 of file AtomParser.C.

Referenced by yyparse.

#define NGE   291
 

Definition at line 83 of file AtomParser.C.

Referenced by yyparse.

#define NGT   292
 

Definition at line 84 of file AtomParser.C.

Referenced by yyparse.

#define NLE   289
 

Definition at line 81 of file AtomParser.C.

Referenced by yyparse.

#define NLT   288
 

Definition at line 80 of file AtomParser.C.

Referenced by yyparse.

#define NNE   293
 

Definition at line 85 of file AtomParser.C.

Referenced by yyparse.

#define nonassoc   307
 

Definition at line 99 of file AtomParser.C.

#define NOT   308
 

Definition at line 100 of file AtomParser.C.

Referenced by yyparse.

#define OF   271
 

Definition at line 63 of file AtomParser.C.

#define OR   280
 

Definition at line 72 of file AtomParser.C.

Referenced by yyparse.

#define PARSEERROR   274
 

Definition at line 66 of file AtomParser.C.

#define PBWITHIN   260
 

Definition at line 52 of file AtomParser.C.

Referenced by yyparse.

#define RANGE   275
 

Definition at line 67 of file AtomParser.C.

#define RINGSIZE   263
 

Definition at line 55 of file AtomParser.C.

Referenced by yyparse.

#define SAME   267
 

Definition at line 59 of file AtomParser.C.

Referenced by yyparse.

#define SEQ   296
 

Definition at line 88 of file AtomParser.C.

Referenced by yyparse.

#define SGE   297
 

Definition at line 89 of file AtomParser.C.

Referenced by yyparse.

#define SGT   298
 

Definition at line 90 of file AtomParser.C.

Referenced by yyparse.

#define SINGLE   269
 

Definition at line 61 of file AtomParser.C.

#define SLE   295
 

Definition at line 87 of file AtomParser.C.

Referenced by yyparse.

#define SLT   294
 

Definition at line 86 of file AtomParser.C.

Referenced by yyparse.

#define SNE   299
 

Definition at line 91 of file AtomParser.C.

Referenced by yyparse.

#define STRFCTN   266
 

Definition at line 58 of file AtomParser.C.

#define STRWORD   278
 

Definition at line 70 of file AtomParser.C.

Referenced by yyparse.

#define SUB   302
 

Definition at line 94 of file AtomParser.C.

Referenced by yyparse.

#define THROUGH   273
 

Definition at line 65 of file AtomParser.C.

#define UMINUS   309
 

Definition at line 101 of file AtomParser.C.

Referenced by yyparse.

#define WHERE   264
 

Definition at line 56 of file AtomParser.C.

#define WITHIN   258
 

Definition at line 50 of file AtomParser.C.

Referenced by yyparse.

#define WITHINBONDS   261
 

Definition at line 53 of file AtomParser.C.

Referenced by yyparse.

#define YYABORT   return(1)
 

Definition at line 438 of file AtomParser.C.

Referenced by yyparse.

#define YYACCEPT   return(0)
 

Definition at line 437 of file AtomParser.C.

Referenced by yyparse.

#define YYBACKUP newtoken,
newvalue   
 

Value:

{\
        if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
        {\
                yyerror( "syntax error - cannot backup" );\
                goto yyerrlab;\
        }\
        yychar = newtoken;\
        yystate = *yyps;\
        yylval = newvalue;\
        goto yynewstate;\
}

Definition at line 439 of file AtomParser.C.

#define yyclearin   yychar = -1
 

Definition at line 142 of file AtomParser.C.

#define YYCONST   const
 

Definition at line 111 of file AtomParser.C.

Referenced by yyparse.

#define YYCOPY to,
from,
type       (type *) memcpy(to, (char *) from, yymaxdepth * sizeof (type))
 

Definition at line 453 of file AtomParser.C.

Referenced by yyparse.

#define YYDEBUG   0
 

Definition at line 293 of file AtomParser.C.

#define YYENLARGE from,
type       (type *) realloc((char *) from, yynewmax * sizeof(type))
 

Definition at line 455 of file AtomParser.C.

Referenced by yyparse.

#define YYERRCODE   256
 

Definition at line 160 of file AtomParser.C.

Referenced by yyparse.

#define yyerrok   yyerrflag = 0
 

Definition at line 143 of file AtomParser.C.

#define YYERROR   goto yyerrlab
 

Definition at line 436 of file AtomParser.C.

#define YYFLAG   (-10000000)
 

Definition at line 469 of file AtomParser.C.

Referenced by yyparse.

#define YYLAST   368
 

Definition at line 184 of file AtomParser.C.

Referenced by yyparse.

 
#define YYLEX      yylex()
 

YYNMBCHARS

Definition at line 526 of file AtomParser.C.

Referenced by yyparse.

#define YYMAXDEPTH   150
 

Definition at line 150 of file AtomParser.C.

Referenced by yyparse.

#define YYNEW type       malloc(sizeof(type) * yynewmax)
 

Definition at line 452 of file AtomParser.C.

Referenced by yyparse.

#define YYNPROD   59
 

Definition at line 183 of file AtomParser.C.

 
#define YYRECOVERING      (!!yyerrflag)
 

Definition at line 451 of file AtomParser.C.


Typedef Documentation

typedef int yytabelem
 

Definition at line 148 of file AtomParser.C.


Function Documentation

void yyerror const char *    s
 

Definition at line 165 of file AtomParser.C.

Referenced by yyparse.

int yylex  
 

int yyparse  
 

YYNMBCHARS

Definition at line 535 of file AtomParser.C.

References ADD, AND, atomparser_node, atomparser_yystring, COMPARE, DIV, YYSTYPE::dval, atomparser_node::dval, EXP, EXWITHIN, FLOATVAL, INTVAL, YYSTYPE::ival, atomparser_node::ival, atomparser_node::left, MATCH, MAXRINGSIZE, MOD, MULT, NEAREST, NEQ, NGE, NGT, NLE, NLT, NNE, YYSTYPE::node, atomparser_node::node_type, NOT, NULL, OR, PBWITHIN, RAW_STRING, atomparser_node::right, RINGSIZE, SAME, SEQ, SGE, SGT, SLE, SLT, SNE, STRWORD, SUB, yytoktype::t_val, UMINUS, WITHIN, WITHINBONDS, YYABORT, YYACCEPT, yyact, yychar, yychk, YYCONST, YYCOPY, yydebug, yydef, YYENLARGE, YYERRCODE, yyerrflag, yyerror, yyexca, YYFLAG, YYLAST, YYLEX, YYMAXDEPTH, yymaxdepth, yynerrs, YYNEW, yypact, yypgo, yyps, yyr1, yyr2, yys, yystate, and yytmp.

Referenced by SymbolTable::parse.

int yywrap void   
 

Definition at line 171 of file AtomParser.C.


Variable Documentation

atomparser_node* atomparser_result
 

contains the final parse tree, or NULL if there was an error.

Definition at line 37 of file AtomParser.C.

int yy_yys[YYMAXDEPTH]
 

Definition at line 153 of file AtomParser.C.

YYSTYPE yy_yyv[YYMAXDEPTH]
 

Definition at line 154 of file AtomParser.C.

YYCONST yytabelem yyact[] [static]
 

Definition at line 185 of file AtomParser.C.

Referenced by yyparse.

int yychar
 

Definition at line 482 of file AtomParser.C.

Referenced by yyparse.

YYCONST yytabelem yychk[] [static]
 

Initial value:

{

-10000000,   -10,    -2,   256,    40,   308,   269,    -4,    -8,   258,
   259,   260,   261,   268,   262,   263,   267,    -3,   257,   266,
   276,   277,   278,   302,   301,   265,   281,   280,    -2,    -3,
    -2,    -2,    -9,   276,   277,    -9,    -9,   277,   277,   277,
   277,   257,    -1,   301,   302,   305,   306,   303,   304,   288,
   289,   290,   291,   292,   293,   294,   295,   296,   297,   298,
   299,   300,    -5,    -7,    -6,   278,   277,   276,    -5,    -3,
    40,   257,    -3,    40,    -2,    -2,    41,    41,   271,   271,
   271,   271,   273,   270,   270,   272,    -3,    -3,    -3,    -3,
    -3,    -3,    -3,    -7,   273,    -3,    -3,    -2,    -2,    -2,
    -2,    -2,    -2,    -2,    -2,    -6,    41 }

Definition at line 257 of file AtomParser.C.

Referenced by yyparse.

int yydebug
 

Definition at line 464 of file AtomParser.C.

Referenced by yyparse.

YYCONST yytabelem yydef[] [static]
 

Initial value:

{

    -2,    -2,     2,     3,     0,     0,     6,    10,    11,     0,
     0,     0,     0,     0,     0,     0,     0,     0,    44,     0,
    32,    33,    34,     0,     0,     0,     0,     0,     0,     0,
     5,     7,     0,    30,    31,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,    46,
    47,    48,    49,    50,    51,    52,    53,    54,    55,    56,
    57,    58,    21,    28,    26,    23,    24,    25,    22,    38,
     0,    44,    39,     0,     8,     9,     4,    35,     0,     0,
     0,     0,     0,     0,     0,     0,    20,    36,    37,    40,
    41,    42,    43,    29,     0,     0,     0,    12,    13,    14,
    15,    16,    17,    18,    19,    27,    45 }

Definition at line 270 of file AtomParser.C.

Referenced by yyparse.

int yyerrflag
 

Definition at line 481 of file AtomParser.C.

Referenced by yyparse.

YYCONST yytabelem yyexca[] [static]
 

Initial value:

{
-1, 0,
        0, 1,
        -2, 0,
-1, 1,
        0, -1,
        -2, 0,
        }

Definition at line 175 of file AtomParser.C.

Referenced by yyparse.

YYSTYPE yylval
 

Definition at line 146 of file AtomParser.C.

int yymaxdepth = YYMAXDEPTH [static]
 

Definition at line 159 of file AtomParser.C.

Referenced by yyparse.

int yynerrs
 

Definition at line 480 of file AtomParser.C.

Referenced by yyparse.

YYCONST yytabelem yypact[] [static]
 

Initial value:

{

   -40,-10000000,  -246,-10000000,   -18,   -18,   -18,-10000000,-10000000,  -237,
  -237,  -237,  -232,  -234,  -235,  -236,  -200,  -287,  -240,  -240,
-10000000,-10000000,-10000000,    65,    65,    20,   -18,   -18,    -8,     3,
-10000000,  -246,  -218,-10000000,-10000000,  -219,  -220,  -222,  -226,  -215,
  -216,  -224,    65,    65,    65,    65,    65,    65,    65,-10000000,
-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
-10000000,-10000000,  -240,-10000000,  -227,-10000000,-10000000,-10000000,  -240,-10000000,
    65,-10000000,-10000000,    65,-10000000,  -260,-10000000,-10000000,   -18,   -18,
   -18,   -18,   -18,   -18,   -18,   -18,  -278,  -274,  -274,  -286,
-10000000,  -286,  -286,-10000000,  -240,    15,     9,  -246,  -246,  -246,
  -246,  -246,  -246,  -246,  -246,-10000000,-10000000 }

Definition at line 224 of file AtomParser.C.

Referenced by yyparse.

YYCONST yytabelem yypgo[] [static]
 

Initial value:

{

     0,    70,    58,    74,    69,    62,    59,    61,    68,    66,
    67 }

Definition at line 237 of file AtomParser.C.

Referenced by yyparse.

int* yyps
 

Definition at line 475 of file AtomParser.C.

Referenced by yyparse.

YYSTYPE* yypv
 

Definition at line 474 of file AtomParser.C.

YYCONST yytabelem yyr1[] [static]
 

Initial value:

{

     0,    10,    10,    10,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     4,     8,     6,     6,     6,     7,     7,     5,     5,
     9,     9,     3,     3,     3,     3,     3,     3,     3,     3,
     3,     3,     3,     3,     3,     3,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1 }

Definition at line 241 of file AtomParser.C.

Referenced by yyparse.

YYCONST yytabelem yyr2[] [static]
 

Initial value:

{

     0,     1,     3,     3,     7,     5,     3,     5,     7,     7,
     3,     3,     9,     9,     9,     9,     9,     9,     9,     9,
     7,     5,     5,     3,     3,     3,     3,     7,     3,     5,
     3,     3,     3,     3,     3,     7,     7,     7,     5,     5,
     7,     7,     7,     7,     3,     9,     3,     3,     3,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     3 }

Definition at line 249 of file AtomParser.C.

Referenced by yyparse.

int * yys = yy_yys
 

Definition at line 153 of file AtomParser.C.

Referenced by yyparse.

int yystate
 

Definition at line 477 of file AtomParser.C.

Referenced by yyparse.

int yytmp
 

Definition at line 478 of file AtomParser.C.

Referenced by yyparse.

YYSTYPE * yyv = yy_yyv
 

Definition at line 154 of file AtomParser.C.

YYSTYPE yyval
 

Definition at line 147 of file AtomParser.C.


Generated on Wed Nov 6 02:45:38 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002