static int power (int base, int exponent);
]AT_SKEL_CC_IF(
[#ifndef YYLTYPE
-# define YYLTYPE yy::location
+[#] define YYLTYPE AT_NAME_PREFIX::location
#endif
#define first_line begin.line
#define first_column begin.column
]AT_SKEL_CC_IF(
[/* A C++ error reporting function. */
void
-yy::parser::error (const location& l, const std::string& m)
+AT_NAME_PREFIX::parser::error (const location& l, const std::string& m)
{
(void) l;
std::cerr << AT_LOCATION_IF([l << ": " << ])m << std::endl;
int
yyparse (AT_PARAM_IF([semantic_value *result, int *count]))
{
- yy::parser parser[]AT_PARAM_IF([ (result, count)]);
+ AT_NAME_PREFIX::parser parser[]AT_PARAM_IF([ (result, count)]);
parser.set_debug_level (!!YYDEBUG);
return parser.parse ();
}
#
# - test the action associated to `error'
#
-# - check the look-ahead that triggers an error is not discarded
-# when we enter error recovery. Below, the look-ahead causing the
+# - check the lookahead that triggers an error is not discarded
+# when we enter error recovery. Below, the lookahead causing the
# first error is ")", which is needed to recover from the error and
# produce the "0" that triggers the "0 != 1" error.
#
calc: error: 4444 != 1])
# The same, but this time exercising explicitly triggered syntax errors.
-# POSIX says the look-ahead causing the error should not be discarded.
+# POSIX says the lookahead causing the error should not be discarded.
_AT_CHECK_CALC_ERROR([$1], [0], [(!) + (0 0) = 1], [102],
[1.9: syntax error, unexpected number
calc: error: 2222 != 1])