/[bison]/bison/src/bison.simple
ViewVC logotype

Diff of /bison/src/bison.simple

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.53.2.11 by eggert, Tue Dec 4 13:28:18 2001 UTC revision 1.53.2.12 by eggert, Tue Dec 4 14:06:06 2001 UTC
# Line 80  Line 80 
80  /* A type that is properly aligned for any stack member.  */  /* A type that is properly aligned for any stack member.  */
81  union yyalloc  union yyalloc
82  {  {
83    short yys;    short yyss;
84    YYSTYPE yyv;    YYSTYPE yyvs;
85  # if YYLSP_NEEDED  # if YYLSP_NEEDED
86    YYLTYPE yyl;    YYLTYPE yyls;
87  # endif  # endif
88  };  };
89    
# Line 102  union yyalloc Line 102  union yyalloc
102        + YYSTACK_GAP_MAX)        + YYSTACK_GAP_MAX)
103  # endif  # endif
104    
 # if defined (__STDC__) || defined (__cplusplus)  
 #  define YYPOINTER void *  
 # else  
 #  define YYPOINTER char *  
 # endif  
   
105  /* Relocate the TYPE STACK from its old location to the new one.  The  /* Relocate the TYPE STACK from its old location to the new one.  The
106     local variables YYSIZE and YYSTACKSIZE give the old and new number of     local variables YYSIZE and YYSTACKSIZE give the old and new number of
107     elements in the stack, and YYPTR gives the new location of the     elements in the stack, and YYPTR gives the new location of the
# Line 117  union yyalloc Line 111  union yyalloc
111      do                                                                  \      do                                                                  \
112        {                                                                 \        {                                                                 \
113          YYSIZE_T yynewbytes;                                            \          YYSIZE_T yynewbytes;                                            \
114          yymemcpy (yyptr, (char *) (Stack),                              \          yymemcpy ((char *) yyptr, (char *) (Stack),                     \
115                    yysize * (YYSIZE_T) sizeof (Type));                   \                    yysize * (YYSIZE_T) sizeof (Type));                   \
116          (Stack) = (Type *) (YYPOINTER) yyptr;                           \          Stack = &yyptr->Stack;                                          \
117          yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX;     \          yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX;     \
118          yynewbytes -= yynewbytes % sizeof (union yyalloc);              \          yyptr += yynewbytes / sizeof (*yyptr);                          \
         yyptr += yynewbytes;                                            \  
119        }                                                                 \        }                                                                 \
120      while (0)      while (0)
121    
# Line 525  yyparse (YYPARSE_PARAM_ARG) Line 518  yyparse (YYPARSE_PARAM_ARG)
518    
519        {        {
520          short *yyss1 = yyss;          short *yyss1 = yyss;
521          char *yyptr = (char *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));          union yyalloc *yyptr =
522              (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
523          if (! yyptr)          if (! yyptr)
524            goto yyoverflowlab;            goto yyoverflowlab;
525          YYSTACK_RELOCATE (short, yyss);          YYSTACK_RELOCATE (short, yyss);

Legend:
Removed from v.1.53.2.11  
changed lines
  Added in v.1.53.2.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26