examples: java: use explicit token identifiers

* examples/java/calc/Calc.y: Declare all the tokens, so that we are
compatibile with api.token.raw.
* examples/java/calc/Calc.test: Adjust.
This commit is contained in:
Akim Demaille
2020-04-04 08:43:28 +02:00
parent fd98afaf10
commit 7fa23136ca
2 changed files with 50 additions and 23 deletions

View File

@@ -30,9 +30,9 @@ run 0 '7
cat >input <<EOF
1 + 2 * * 3
EOF
run 0 "err: 1.9-1.10: syntax error: expected number or '-' or '(' or '!' before '*'"
run 0 "err: 1.9-1.10: syntax error: expected ! or - or ( or number before *"
cat >input <<EOF
12 222
EOF
run 0 "err: 1.6-1.9: syntax error: expected end of line or '=' or '-' or '+' or '*' or '/' or '^' before number"
run 0 "err: 1.6-1.9: syntax error: expected + or - or * or / or ^ or = or end of line before number"