157 |
## Printers and Destructors. ## |
## Printers and Destructors. ## |
158 |
## -------------------------- ## |
## -------------------------- ## |
159 |
|
|
160 |
AT_SETUP([Printers and Destructors]) |
# _AT_CHECK_PRINTER_AND_DESTRUCTOR($1, $2, $3, BISON-DIRECTIVE) |
161 |
|
# ------------------------------------------------------------- |
162 |
|
m4_define([_AT_CHECK_PRINTER_AND_DESTRUCTOR], |
163 |
|
[m4_if([$1$2$3], $[1]$[2]$[3], [], |
164 |
|
[m4_fatal([$0: Invalid arguments: $@])])dnl |
165 |
|
|
166 |
|
AT_SETUP([Printers and Destructors: $4]) |
167 |
|
|
168 |
# Make sure complex $n work. |
# Make sure complex $n work. |
169 |
|
|
170 |
AT_DATA([[input.y]], |
AT_DATA([[input.y]], |
171 |
[[%{ |
[[$4 |
172 |
|
%{ |
173 |
#include <stdio.h> |
#include <stdio.h> |
174 |
#include <stdlib.h> |
#include <stdlib.h> |
175 |
#include <assert.h> |
#include <assert.h> |
346 |
]]) |
]]) |
347 |
|
|
348 |
AT_CLEANUP |
AT_CLEANUP |
349 |
|
]) |
350 |
|
|
351 |
|
|
352 |
|
# AT_CHECK_PRINTER_AND_DESTRUCTOR([BISON-OPTIONS]) |
353 |
|
# ------------------------------------------------ |
354 |
|
# Produce `calc.y'. |
355 |
|
m4_define([AT_CHECK_PRINTER_AND_DESTRUCTOR], |
356 |
|
[_AT_CHECK_PRINTER_AND_DESTRUCTOR($[1], $[2], $[3], [$1]) |
357 |
|
]) |
358 |
|
|
359 |
|
|
360 |
|
AT_CHECK_PRINTER_AND_DESTRUCTOR() |
361 |
|
AT_CHECK_PRINTER_AND_DESTRUCTOR([%glr-parser]) |