[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Strengthen location tracking tests
From: |
Akim Demaille |
Subject: |
Strengthen location tracking tests |
Date: |
12 Nov 2002 11:16:02 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
locations.
Index: tests/actions.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/actions.at,v
retrieving revision 1.18
diff -u -u -r1.18 actions.at
--- tests/actions.at 12 Nov 2002 09:07:38 -0000 1.18
+++ tests/actions.at 12 Nov 2002 10:15:42 -0000
@@ -187,23 +187,23 @@
}
%type <ival> 'x' thing line input
-%printer { fprintf (yyout, "%d from %d", $$, @$.first_line); }
+%printer { fprintf (yyout, "address@hidden", $$, @$.first_line); }
input line thing 'x'
%destructor
- { fprintf (stdout, "Freeing nterm input (%d from %d)\n", $$, @$.first_line);
}
+ { fprintf (stdout, "Freeing nterm input (address@hidden)\n", $$,
@$.first_line); }
input
%destructor
- { fprintf (stdout, "Freeing nterm line (%d from %d)\n", $$, @$.first_line); }
+ { fprintf (stdout, "Freeing nterm line (address@hidden)\n", $$,
@$.first_line); }
line
%destructor
- { fprintf (stdout, "Freeing nterm thing (%d from %d)\n", $$, @$.first_line);
}
+ { fprintf (stdout, "Freeing nterm thing (address@hidden)\n", $$,
@$.first_line); }
thing
%destructor
- { fprintf (stdout, "Freeing token 'x' (%d from %d)\n", $$, @$.first_line); }
+ { fprintf (stdout, "Freeing token 'x' (address@hidden)\n", $$,
@$.first_line); }
'x'
%%
@@ -211,13 +211,14 @@
/* Nothing. */
{
$$ = 0;
- printf ("input(%d): /* Nothing */';'\n", $$);
+ printf ("input(address@hidden): /* Nothing */';'\n", $$, @$.first_line);
}
| line input /* Right recursive to load the stack so that popping at
EOF can be exercised. */
{
$$ = 2;
- printf ("input(%d): line(%d) input(%d)';'\n", $$, $1, $2);
+ printf ("input(address@hidden): line(address@hidden)
input(address@hidden)';'\n",
+ $$, @$.first_line, $1, @1.first_line, $2, @2.first_line);
}
;
@@ -225,22 +226,27 @@
thing thing thing ';'
{
$$ = $1;
- printf ("line(%d): thing(%d) thing(%d) thing(%d) ';'\n", $$, $1, $2, $3);
+ printf ("line(address@hidden): thing(address@hidden)
thing(address@hidden) thing(address@hidden) ';'\n",
+ $$, @$.first_line, $1, @1.first_line, $2, @2.first_line,
+ $3, @3.first_line);
}
| thing thing ';'
{
$$ = $1;
- printf ("line(%d): thing(%d) thing(%d) ';'\n", $$, $1, $2);
+ printf ("line(address@hidden): thing(address@hidden)
thing(address@hidden) ';'\n",
+ $$, @$.first_line, $1, @1.first_line, $2, @2.first_line);
}
| thing ';'
{
$$ = $1;
- printf ("line(%d): thing(%d) ';'\n", $$, $1);
+ printf ("line(address@hidden): thing(address@hidden) ';'\n",
+ $$, @$.first_line, $1, @1.first_line);
}
| error ';'
{
$$ = -1;
- printf ("line(%d): error ';'\n", $$);
+ printf ("line(address@hidden): error(@%d) ';'\n",
+ $$, @$.first_line, @1.first_line);
}
;
@@ -248,7 +254,8 @@
'x'
{
$$ = $1;
- printf ("thing(%d): 'x'(%d)\n", $$, $1);
+ printf ("thing(address@hidden): 'x'(address@hidden)\n",
+ $$, @$.first_line, $1, @1.first_line);
}
;
%%
@@ -309,39 +316,39 @@
AT_COMPILE([input])
AT_PARSER_CHECK([./input], 1,
[[sending: 'x' (value = 0, line 0)
-thing(0): 'x'(0)
+thing(address@hidden): 'x'(address@hidden)
sending: 'x' (value = 1, line 10)
-thing(1): 'x'(1)
+thing(address@hidden): 'x'(address@hidden)
sending: 'x' (value = 2, line 20)
-thing(2): 'x'(2)
+thing(address@hidden): 'x'(address@hidden)
sending: 'x' (value = 3, line 30)
30: parse error, unexpected 'x', expecting ';'
-Freeing nterm thing (2 from 20)
-Freeing nterm thing (1 from 10)
-Freeing nterm thing (0 from 0)
-Freeing token 'x' (3 from 30)
+Freeing nterm thing (address@hidden)
+Freeing nterm thing (address@hidden)
+Freeing nterm thing (address@hidden)
+Freeing token 'x' (address@hidden)
sending: 'x' (value = 4, line 40)
-Freeing token 'x' (4 from 40)
+Freeing token 'x' (address@hidden)
sending: 'x' (value = 5, line 50)
-Freeing token 'x' (5 from 50)
+Freeing token 'x' (address@hidden)
sending: ';' (value = 6, line 60)
-line(-1): error ';'
+line(address@hidden): error(@50) ';'
sending: 'x' (value = 7, line 70)
-thing(7): 'x'(7)
+thing(address@hidden): 'x'(address@hidden)
sending: 'x' (value = 8, line 80)
-thing(8): 'x'(8)
+thing(address@hidden): 'x'(address@hidden)
sending: ';' (value = 9, line 90)
-line(7): thing(7) thing(8) ';'
+line(address@hidden): thing(address@hidden) thing(address@hidden) ';'
sending: 'x' (value = 10, line 100)
-thing(10): 'x'(10)
+thing(address@hidden): 'x'(address@hidden)
sending: ';' (value = 11, line 110)
-line(10): thing(10) ';'
+line(address@hidden): thing(address@hidden) ';'
sending: 'y' (value = 12, line 120)
120: parse error, unexpected $undefined, expecting $end or 'x'
sending: EOF
-Freeing nterm line (10 from 100)
-Freeing nterm line (7 from 70)
-Freeing nterm line (-1 from 50)
+Freeing nterm line (address@hidden)
+Freeing nterm line (address@hidden)
+Freeing nterm line (address@hidden)
Parsing FAILED.
]])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Strengthen location tracking tests,
Akim Demaille <=