tclDate.c File Reference

#include "tclInt.h"

Go to the source code of this file.

Data Structures

struct  DateInfo
struct  _TABLE
union  YYSTYPE
union  yyalloc

Defines

#define YYBISON   1
#define YYBISON_VERSION   "2.3"
#define YYSKELETON_NAME   "yacc.c"
#define YYPURE   0
#define YYLSP_NEEDED   0
#define yyparse   TclDateparse
#define yylex   TclDatelex
#define yyerror   TclDateerror
#define yylval   TclDatelval
#define yychar   TclDatechar
#define yydebug   TclDatedebug
#define yynerrs   TclDatenerrs
#define tAGO   258
#define tDAY   259
#define tDAYZONE   260
#define tID   261
#define tMERIDIAN   262
#define tMINUTE_UNIT   263
#define tMONTH   264
#define tMONTH_UNIT   265
#define tSTARDATE   266
#define tSEC_UNIT   267
#define tSNUMBER   268
#define tUNUMBER   269
#define tZONE   270
#define tEPOCH   271
#define tDST   272
#define tISOBASE   273
#define tDAY_UNIT   274
#define tNEXT   275
#define YYPARSE_PARAM   info
#define YYLEX_PARAM   info
#define YYMALLOC   ckalloc
#define YYFREE(x)   (ckfree((void*) (x)))
#define yyDSTmode   (((DateInfo *) info)->dateDSTmode)
#define yyDayOrdinal   (((DateInfo *) info)->dateDayOrdinal)
#define yyDayNumber   (((DateInfo *) info)->dateDayNumber)
#define yyMonthOrdinal   (((DateInfo *) info)->dateMonthOrdinal)
#define yyHaveDate   (((DateInfo *) info)->dateHaveDate)
#define yyHaveDay   (((DateInfo *) info)->dateHaveDay)
#define yyHaveOrdinalMonth   (((DateInfo *) info)->dateHaveOrdinalMonth)
#define yyHaveRel   (((DateInfo *) info)->dateHaveRel)
#define yyHaveTime   (((DateInfo *) info)->dateHaveTime)
#define yyHaveZone   (((DateInfo *) info)->dateHaveZone)
#define yyTimezone   (((DateInfo *) info)->dateTimezone)
#define yyDay   (((DateInfo *) info)->dateDay)
#define yyMonth   (((DateInfo *) info)->dateMonth)
#define yyYear   (((DateInfo *) info)->dateYear)
#define yyHour   (((DateInfo *) info)->dateHour)
#define yyMinutes   (((DateInfo *) info)->dateMinutes)
#define yySeconds   (((DateInfo *) info)->dateSeconds)
#define yyMeridian   (((DateInfo *) info)->dateMeridian)
#define yyRelMonth   (((DateInfo *) info)->dateRelMonth)
#define yyRelDay   (((DateInfo *) info)->dateRelDay)
#define yyRelSeconds   (((DateInfo *) info)->dateRelSeconds)
#define yyRelPointer   (((DateInfo *) info)->dateRelPointer)
#define yyInput   (((DateInfo *) info)->dateInput)
#define yyDigitCount   (((DateInfo *) info)->dateDigitCount)
#define EPOCH   1970
#define START_OF_TIME   1902
#define END_OF_TIME   2037
#define TM_YEAR_BASE   1900
#define HOUR(x)   ((int) (60 * x))
#define SECSPERDAY   (24L * 60L * 60L)
#define IsLeapYear(x)   ((x % 4 == 0) && (x % 100 != 0 || x % 400 == 0))
#define YYDEBUG   0
#define YYERROR_VERBOSE   0
#define YYTOKEN_TABLE   0
#define yystype   YYSTYPE
#define YYSTYPE_IS_DECLARED   1
#define YYSTYPE_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 YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
#define YYSTACK_BYTES(N)
#define YYCOPY(To, From, Count)
#define YYSTACK_RELOCATE(Stack)
#define YYFINAL   2
#define YYLAST   79
#define YYNTOKENS   27
#define YYNNTS   16
#define YYNRULES   56
#define YYNSTATES   83
#define YYUNDEFTOK   2
#define YYMAXUTOK   275
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
#define YYPACT_NINF   -23
#define YYTABLE_NINF   -1
#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)   ((void) 0)
#define YYLEX   yylex (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))

Typedefs

typedef _TABLE TABLE
typedef enum _DSTMODE DSTMODE
typedef enum _MERIDIAN MERIDIAN
typedef unsigned char yytype_uint8
typedef short int yytype_int8
typedef unsigned short int yytype_uint16
typedef short int yytype_int16

Enumerations

enum  yytokentype {
  tAGO = 258, tDAY = 259, tDAYZONE = 260, tID = 261,
  tMERIDIAN = 262, tMINUTE_UNIT = 263, tMONTH = 264, tMONTH_UNIT = 265,
  tSTARDATE = 266, tSEC_UNIT = 267, tSNUMBER = 268, tUNUMBER = 269,
  tZONE = 270, tEPOCH = 271, tDST = 272, tISOBASE = 273,
  tDAY_UNIT = 274, tNEXT = 275
}
enum  _DSTMODE { DSTon, DSToff, DSTmaybe }
enum  _MERIDIAN { MERam, MERpm, MER24 }

Functions

MODULE_SCOPE int yyparse (void *)
int yyparse ()
int TclClockOldscanObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST *objv)

Variables

int yychar
YYSTYPE yylval
int yynerrs
MODULE_SCOPE int yychar
MODULE_SCOPE YYSTYPE yylval
MODULE_SCOPE int yynerrs


Define Documentation

#define END_OF_TIME   2037

Definition at line 220 of file tclDate.c.

#define EPOCH   1970

Definition at line 218 of file tclDate.c.

Referenced by yyparse().

#define HOUR (  )     ((int) (60 * x))

Definition at line 229 of file tclDate.c.

Referenced by yyparse().

#define IsLeapYear (  )     ((x % 4 == 0) && (x % 100 != 0 || x % 400 == 0))

Definition at line 231 of file tclDate.c.

Referenced by yyparse().

#define SECSPERDAY   (24L * 60L * 60L)

Definition at line 230 of file tclDate.c.

#define START_OF_TIME   1902

Definition at line 219 of file tclDate.c.

#define tAGO   258

Definition at line 98 of file tclDate.c.

#define tDAY   259

Definition at line 99 of file tclDate.c.

#define tDAY_UNIT   274

Definition at line 114 of file tclDate.c.

#define tDAYZONE   260

Definition at line 100 of file tclDate.c.

#define tDST   272

Definition at line 112 of file tclDate.c.

#define tEPOCH   271

Definition at line 111 of file tclDate.c.

#define tID   261

Definition at line 101 of file tclDate.c.

#define tISOBASE   273

Definition at line 113 of file tclDate.c.

#define TM_YEAR_BASE   1900

Definition at line 227 of file tclDate.c.

#define tMERIDIAN   262

Definition at line 102 of file tclDate.c.

#define tMINUTE_UNIT   263

Definition at line 103 of file tclDate.c.

#define tMONTH   264

Definition at line 104 of file tclDate.c.

#define tMONTH_UNIT   265

Definition at line 105 of file tclDate.c.

#define tNEXT   275

Definition at line 115 of file tclDate.c.

#define tSEC_UNIT   267

Definition at line 107 of file tclDate.c.

#define tSNUMBER   268

Definition at line 108 of file tclDate.c.

#define tSTARDATE   266

Definition at line 106 of file tclDate.c.

#define tUNUMBER   269

Definition at line 109 of file tclDate.c.

#define tZONE   270

Definition at line 110 of file tclDate.c.

#define YY_ ( msgid   )     msgid

Definition at line 368 of file tclDate.c.

Referenced by yyparse().

#define YY_LOCATION_PRINT ( File,
Loc   )     ((void) 0)

Definition at line 840 of file tclDate.c.

#define YY_REDUCE_PRINT ( Rule   ) 

Definition at line 1010 of file tclDate.c.

Referenced by yyparse().

#define YY_STACK_PRINT ( Bottom,
Top   ) 

Definition at line 1009 of file tclDate.c.

Referenced by yyparse().

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

Definition at line 1008 of file tclDate.c.

Referenced by yyparse().

#define YYABORT   goto yyabortlab

Definition at line 769 of file tclDate.c.

Referenced by yyparse().

#define YYACCEPT   goto yyacceptlab

Definition at line 768 of file tclDate.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))

Definition at line 781 of file tclDate.c.

#define YYBISON   1

Definition at line 47 of file tclDate.c.

#define YYBISON_VERSION   "2.3"

Definition at line 50 of file tclDate.c.

#define yychar   TclDatechar

Definition at line 66 of file tclDate.c.

#define yyclearin   (yychar = YYEMPTY)

Definition at line 764 of file tclDate.c.

#define YYCOPY ( To,
From,
Count   ) 

Value:

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

Definition at line 494 of file tclDate.c.

#define yyDay   (((DateInfo *) info)->dateDay)

Definition at line 204 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyDayNumber   (((DateInfo *) info)->dateDayNumber)

Definition at line 195 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyDayOrdinal   (((DateInfo *) info)->dateDayOrdinal)

Definition at line 194 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define YYDEBUG   0

Definition at line 274 of file tclDate.c.

#define yydebug   TclDatedebug

Definition at line 67 of file tclDate.c.

#define yyDigitCount   (((DateInfo *) info)->dateDigitCount)

Definition at line 216 of file tclDate.c.

Referenced by yyparse().

#define YYDPRINTF ( Args   ) 

Definition at line 1007 of file tclDate.c.

Referenced by yyparse().

#define yyDSTmode   (((DateInfo *) info)->dateDSTmode)

Definition at line 193 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define YYEMPTY   (-2)

Definition at line 765 of file tclDate.c.

Referenced by yyparse().

#define YYEOF   0

Definition at line 766 of file tclDate.c.

Referenced by yyparse().

#define YYERRCODE   256

Definition at line 800 of file tclDate.c.

#define yyerrok   (yyerrstatus = 0)

Definition at line 763 of file tclDate.c.

#define YYERROR   goto yyerrorlab

Definition at line 770 of file tclDate.c.

#define yyerror   TclDateerror

Definition at line 64 of file tclDate.c.

Referenced by yyparse().

#define YYERROR_VERBOSE   0

Definition at line 282 of file tclDate.c.

#define YYFAIL   goto yyerrlab

Definition at line 777 of file tclDate.c.

#define YYFINAL   2

Definition at line 524 of file tclDate.c.

Referenced by yyparse().

#define YYFREE (  )     (ckfree((void*) (x)))

Definition at line 191 of file tclDate.c.

#define yyHaveDate   (((DateInfo *) info)->dateHaveDate)

Definition at line 197 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyHaveDay   (((DateInfo *) info)->dateHaveDay)

Definition at line 198 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyHaveOrdinalMonth   (((DateInfo *) info)->dateHaveOrdinalMonth)

Definition at line 199 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyHaveRel   (((DateInfo *) info)->dateHaveRel)

Definition at line 200 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyHaveTime   (((DateInfo *) info)->dateHaveTime)

Definition at line 201 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyHaveZone   (((DateInfo *) info)->dateHaveZone)

Definition at line 202 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyHour   (((DateInfo *) info)->dateHour)

Definition at line 207 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define YYID (  )     (n)

Definition at line 381 of file tclDate.c.

Referenced by yyparse().

#define YYINITDEPTH   200

Definition at line 1016 of file tclDate.c.

Referenced by yyparse().

#define yyInput   (((DateInfo *) info)->dateInput)

Definition at line 215 of file tclDate.c.

#define YYLAST   79

Definition at line 526 of file tclDate.c.

Referenced by yyparse().

#define YYLEX   yylex (YYLEX_PARAM)

Definition at line 848 of file tclDate.c.

Referenced by yyparse().

#define yylex   TclDatelex

Definition at line 63 of file tclDate.c.

#define YYLEX_PARAM   info

Definition at line 188 of file tclDate.c.

#define YYLLOC_DEFAULT ( Current,
Rhs,
 ) 

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))

Definition at line 809 of file tclDate.c.

#define YYLSP_NEEDED   0

Definition at line 59 of file tclDate.c.

#define yylval   TclDatelval

Definition at line 65 of file tclDate.c.

Referenced by yyparse().

#define YYMALLOC   ckalloc

Definition at line 190 of file tclDate.c.

#define YYMAXDEPTH   10000

Definition at line 1027 of file tclDate.c.

Referenced by yyparse().

#define YYMAXUTOK   275

Definition at line 539 of file tclDate.c.

#define yyMeridian   (((DateInfo *) info)->dateMeridian)

Definition at line 210 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyMinutes   (((DateInfo *) info)->dateMinutes)

Definition at line 208 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyMonth   (((DateInfo *) info)->dateMonth)

Definition at line 205 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyMonthOrdinal   (((DateInfo *) info)->dateMonthOrdinal)

Definition at line 196 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yynerrs   TclDatenerrs

Definition at line 68 of file tclDate.c.

#define YYNNTS   16

Definition at line 531 of file tclDate.c.

#define YYNRULES   56

Definition at line 533 of file tclDate.c.

#define YYNSTATES   83

Definition at line 535 of file tclDate.c.

#define YYNTOKENS   27

Definition at line 529 of file tclDate.c.

Referenced by yyparse().

#define YYPACT_NINF   -23

Definition at line 698 of file tclDate.c.

Referenced by yyparse().

#define yyparse   TclDateparse

Definition at line 62 of file tclDate.c.

Referenced by TclClockOldscanObjCmd().

#define YYPARSE_PARAM   info

Definition at line 187 of file tclDate.c.

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

Referenced by yyparse().

#define YYPURE   0

Definition at line 56 of file tclDate.c.

 
#define YYRECOVERING (  )     (!!yyerrstatus)

Definition at line 779 of file tclDate.c.

#define yyRelDay   (((DateInfo *) info)->dateRelDay)

Definition at line 212 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyRelMonth   (((DateInfo *) info)->dateRelMonth)

Definition at line 211 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyRelPointer   (((DateInfo *) info)->dateRelPointer)

Definition at line 214 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define yyRelSeconds   (((DateInfo *) info)->dateRelSeconds)

Definition at line 213 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

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

Definition at line 807 of file tclDate.c.

#define yySeconds   (((DateInfo *) info)->dateSeconds)

Definition at line 209 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 358 of file tclDate.c.

#define YYSIZE_T   unsigned int

Definition at line 354 of file tclDate.c.

Referenced by yyparse().

#define YYSKELETON_NAME   "yacc.c"

Definition at line 53 of file tclDate.c.

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 436 of file tclDate.c.

Referenced by yyparse().

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 439 of file tclDate.c.

Referenced by yyparse().

#define YYSTACK_BYTES (  ) 

Value:

((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

Definition at line 483 of file tclDate.c.

Referenced by yyparse().

#define YYSTACK_FREE   YYFREE

Definition at line 437 of file tclDate.c.

Referenced by yyparse().

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

Definition at line 479 of file tclDate.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))

Definition at line 510 of file tclDate.c.

Referenced by yyparse().

#define yystype   YYSTYPE

Definition at line 300 of file tclDate.c.

#define YYSTYPE_IS_DECLARED   1

Definition at line 301 of file tclDate.c.

#define YYSTYPE_IS_TRIVIAL   1

Definition at line 302 of file tclDate.c.

#define YYTABLE_NINF   -1

Definition at line 723 of file tclDate.c.

Referenced by yyparse().

#define YYTERROR   1

Definition at line 799 of file tclDate.c.

Referenced by yyparse().

#define yyTimezone   (((DateInfo *) info)->dateTimezone)

Definition at line 203 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().

#define YYTOKEN_TABLE   0

Definition at line 287 of file tclDate.c.

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

Definition at line 541 of file tclDate.c.

Referenced by yyparse().

#define YYUNDEFTOK   2

Definition at line 538 of file tclDate.c.

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

Definition at line 374 of file tclDate.c.

#define yyYear   (((DateInfo *) info)->dateYear)

Definition at line 206 of file tclDate.c.

Referenced by TclClockOldscanObjCmd(), and yyparse().


Typedef Documentation

typedef enum _DSTMODE DSTMODE

typedef enum _MERIDIAN MERIDIAN

typedef struct _TABLE TABLE

typedef short int yytype_int16

Definition at line 341 of file tclDate.c.

typedef short int yytype_int8

Definition at line 329 of file tclDate.c.

typedef unsigned short int yytype_uint16

Definition at line 335 of file tclDate.c.

typedef unsigned char yytype_uint8

Definition at line 320 of file tclDate.c.


Enumeration Type Documentation

enum _DSTMODE

Enumerator:
DSTon 
DSToff 
DSTmaybe 

Definition at line 247 of file tclDate.c.

enum _MERIDIAN

Enumerator:
MERam 
MERpm 
MER24 

Definition at line 255 of file tclDate.c.

Enumerator:
tAGO 
tDAY 
tDAYZONE 
tID 
tMERIDIAN 
tMINUTE_UNIT 
tMONTH 
tMONTH_UNIT 
tSTARDATE 
tSEC_UNIT 
tSNUMBER 
tUNUMBER 
tZONE 
tEPOCH 
tDST 
tISOBASE 
tDAY_UNIT 
tNEXT 

Definition at line 76 of file tclDate.c.


Function Documentation

int yyparse (  ) 


Variable Documentation

MODULE_SCOPE int yychar

Definition at line 2243 of file tclDate.c.

int yychar

Definition at line 1294 of file tclDate.c.

MODULE_SCOPE YYSTYPE yylval

Definition at line 2244 of file tclDate.c.

Definition at line 1297 of file tclDate.c.

MODULE_SCOPE int yynerrs

Definition at line 2245 of file tclDate.c.

int yynerrs

Definition at line 1300 of file tclDate.c.



Generated on Wed Mar 12 12:18:29 2008 by  doxygen 1.5.1