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

Diff of /bison/tests/torture.at

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

revision 1.15 by akim, Sun May 5 11:56:37 2002 UTC revision 1.16 by akim, Tue Jun 11 20:16:05 2002 UTC
# Line 57  EOF Line 57  EOF
57    
58  for my $size (1 .. $max)  for my $size (1 .. $max)
59    {    {
60      print "%token \"$size\" ", $size, "\n";      print "%token t$size $size \"$size\"\n";
61    };    };
62    
63  print <<EOF;  print <<EOF;
# Line 128  AT_SETUP([Big triangle]) Line 128  AT_SETUP([Big triangle])
128    
129  # I have been able to go up to 2000 on my machine.  # I have been able to go up to 2000 on my machine.
130  # I tried 3000, a 29Mb grammar file, but then my system killed bison.  # I tried 3000, a 29Mb grammar file, but then my system killed bison.
131  AT_DATA_TRIANGULAR_GRAMMAR([input.y], [500])  # With 500 and the new parser, which consume far too much memory,
132    # it gets killed too.  Of course the parser is to be cleaned.
133    AT_DATA_TRIANGULAR_GRAMMAR([input.y], [200])
134  AT_CHECK([bison input.y -v -o input.c])  AT_CHECK([bison input.y -v -o input.c])
135  AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -o input], 0, [], [ignore])  AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -o input], 0, [], [ignore])
136  AT_CHECK([./input])  AT_CHECK([./input])
# Line 164  EOF Line 166  EOF
166    
167  for my $size (1 .. $max)  for my $size (1 .. $max)
168    {    {
169      print "%token \"$size\" ", $size, "\n";      print "%token t$size $size \"$size\"\n";
170    };    };
171    
172  print <<EOF;  print <<EOF;
# Line 272  EOF Line 274  EOF
274  print  print
275    wrap ("%type <val> ",    wrap ("%type <val> ",
276          "            ",          "            ",
277          map { "token$_" } (1 .. $max)),          map { "n$_" } (1 .. $max)),
278    "\n";    "\n";
279    
280  for my $count (1 .. $max)  for my $count (1 .. $max)
281    {    {
282      print "%token \"$count\" $count\n";      print "%token t$count $count \"$count\"\n";
283    };    };
284    
285  print <<EOF;  print <<EOF;
# Line 288  input: Line 290  input:
290  ;  ;
291    
292  exp:  exp:
293    token1 "1" { assert (\@S|@1 == 1); }    n1 "1" { assert (\@S|@1 == 1); }
294  EOF  EOF
295    
296  for my $count (2 .. $max)  for my $count (2 .. $max)
297    {    {
298      print "| token$count \"$count\" { assert (\@S|@1 == $count); }\n";      print "| n$count \"$count\" { assert (\@S|@1 == $count); }\n";
299    };    };
300  print ";\n";  print ";\n";
301    
302  for my $count (1 .. $max)  for my $count (1 .. $max)
303    {    {
304      print "token$count: token { \$\$ = $count; };\n";      print "n$count: token { \$\$ = $count; };\n";
305    };    };
306    
307  print <<EOF;  print <<EOF;

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

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