mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
java: tests: check location tracking in the calculator
Unfortunately in the Java skeleton the user cannot override the way locations are displayed, and locations don't know the structure of the positions. So they cannot implement the tricks used in the C/C++ skeletons to display "1.1" instead of "1.1-1.2". * tests/local.at (Java): Add support for column tracking in the locations, as we did in examples/java/calc. * tests/calc.at: Use AT_CALC_YYLEX.
This commit is contained in:
10
TODO
10
TODO
@@ -3,6 +3,16 @@
|
||||
YYUNDEFTOK is an internal symbol number, as YYTERROR.
|
||||
But YYERRCODE is an external token number.
|
||||
|
||||
** Tests
|
||||
The calc.at test should call yyerror with location:
|
||||
|
||||
| exp '=' exp
|
||||
{
|
||||
if ($1.intValue () != $3.intValue ())
|
||||
yyerror (]AT_LOCATION_IF([[@$, ]])["calc: error: " + $1 + " != " + $3);
|
||||
}
|
||||
|
||||
|
||||
** doc
|
||||
I feel it's ugly to use the GNU style to declare functions in the doc. It
|
||||
generates tons of white space in the page, and may contribute to bad page
|
||||
|
||||
Reference in New Issue
Block a user