/[bison]/bison/tests/calc.at
ViewVC logotype

Diff of /bison/tests/calc.at

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

revision 1.19 by akim, Tue Apr 9 19:20:10 2002 UTC revision 1.20 by ra, Wed Apr 24 16:22:57 2002 UTC
# Line 61  static int yygetc (void); Line 61  static int yygetc (void);
61  static void yyungetc (int c);  static void yyungetc (int c);
62    
63  extern void perror (const char *s);  extern void perror (const char *s);
64    
65    /* Exercise pre-prologue dependency to %union.  */
66    typedef int value_t;
67    
68  %}  %}
69    
70  /* Also exercise %union. */  /* Also exercise %union. */
71  %union  %union
72  {  {
73    int ival; /* A comment to exercise an old bug. */    value_t ival; /* A comment to exercise an old bug. */
74  };  };
75    
76    /* Exercise post-prologue dependency to %union.  */
77    %{
78    static void id (YYSTYPE *lval);
79    %}
80    
81  /* Bison Declarations */  /* Bison Declarations */
82  %token CALC_EOF 0 "end of file"  %token CALC_EOF 0 "end of file"
83  %token <ival> NUM "number"  %token <ival> NUM "number"
# Line 236  power (int base, int exponent) Line 245  power (int base, int exponent)
245    return res;    return res;
246  }  }
247    
248    void
249    id (YYSTYPE* lval)
250    {
251    }
252    
253  int  int
254  main (int argc, const char **argv)  main (int argc, const char **argv)
255  {  {

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

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