[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 00/13] Clean up the Java skeleton and tests
From: |
Akim Demaille |
Subject: |
[PATCH 00/13] Clean up the Java skeleton and tests |
Date: |
Wed, 5 Feb 2020 18:04:52 +0100 |
Before porting the new ways to produce error message to the Java
skeleton, I encountered a few issues:
- the traces are different. Sometimes the way the Java skeleton
handles them is better, so, overall, all the traces have been
revised to be more alike, and easier to follow.
- the Java code is sometimes inconsistent, and (uselessly?) hairy.
Maybe it was addressing portability issues with real old versions of
Java, I don't know, I'm definitely not familiar with Java.
- the calc test suite was forked twice for Java: once for pull
parsers, and another time for push parsers. That would have led to
more testing efforts for parse.error, which I don't want.
This series of commits address these problems. Comments would be most
welcome, especially from Java practitioners.
Akim Demaille (13):
traces: write the "Reading a token" alone on its line
traces: show the stack after reading a token
traces: don't print the stack before the gotos
java: examples: split in two
java: examples: prefer switch to chains of else-if
java: examples: fix the tracking of locations
java: style: prefer putting the square brackets on the type
java: style: avoid useless initializers
java: tests: prepare the replacement of calculator tests
java: tests: check location tracking in the calculator
java: tests: remove now redundant tests
java: tests: check push parsers
java: tests: remove now redundant tests
NEWS | 9 +
TODO | 10 +
data/skeletons/glr.c | 2 +-
data/skeletons/java.m4 | 8 +-
data/skeletons/lalr1.cc | 4 +-
data/skeletons/lalr1.d | 9 +-
data/skeletons/lalr1.java | 9 +-
data/skeletons/yacc.c | 4 +-
doc/bison.texi | 24 +-
examples/c/calc/calc.y | 1 +
examples/java/README.md | 7 +-
examples/java/calc/Calc.test | 38 ++
examples/java/{ => calc}/Calc.y | 42 +-
examples/java/{ => calc}/Makefile | 0
examples/java/calc/local.mk | 36 ++
examples/java/local.mk | 24 +-
examples/java/{ => simple}/Calc.test | 2 +-
examples/java/simple/Calc.y | 110 +++++
examples/java/simple/Makefile | 26 ++
examples/java/simple/local.mk | 36 ++
tests/actions.at | 89 ++--
tests/c++.at | 19 +-
tests/calc.at | 200 ++++-----
tests/glr-regression.at | 12 +-
tests/java.at | 312 ++-----------
tests/javapush.at | 635 +--------------------------
tests/local.at | 61 ++-
tests/regression.at | 14 +-
tests/torture.at | 3 +-
29 files changed, 594 insertions(+), 1152 deletions(-)
create mode 100644 examples/java/calc/Calc.test
rename examples/java/{ => calc}/Calc.y (81%)
rename examples/java/{ => calc}/Makefile (100%)
create mode 100644 examples/java/calc/local.mk
rename examples/java/{ => simple}/Calc.test (90%)
create mode 100644 examples/java/simple/Calc.y
create mode 100644 examples/java/simple/Makefile
create mode 100644 examples/java/simple/local.mk
--
2.25.0
- [PATCH 00/13] Clean up the Java skeleton and tests,
Akim Demaille <=
- [PATCH 03/13] traces: don't print the stack before the gotos, Akim Demaille, 2020/02/05
- [PATCH 01/13] traces: write the "Reading a token" alone on its line, Akim Demaille, 2020/02/05
- [PATCH 02/13] traces: show the stack after reading a token, Akim Demaille, 2020/02/05
- [PATCH 05/13] java: examples: prefer switch to chains of else-if, Akim Demaille, 2020/02/05
- [PATCH 04/13] java: examples: split in two, Akim Demaille, 2020/02/05
- [PATCH 06/13] java: examples: fix the tracking of locations, Akim Demaille, 2020/02/05
- [PATCH 07/13] java: style: prefer putting the square brackets on the type, Akim Demaille, 2020/02/05
- [PATCH 08/13] java: style: avoid useless initializers, Akim Demaille, 2020/02/05
- [PATCH 09/13] java: tests: prepare the replacement of calculator tests, Akim Demaille, 2020/02/05