This patch series adds a regression test framework for the parser.
Then it changes/extends the syntax recognized by the parser as
follows:
- certain syntax errors are no longer ignored (1)
- // style comments are recognized and skipped (2)
- /* ... */ style comments are recognized and skipped
- semicolons are accepted as optional separators between assignments (2)
- a bare dot (.) is no longer considered a valid number
(1) Things like a = b + * c or even a = b) - c went unpunished.
Lo and behold, we had several patches with this kind of typos.
In patch 3/8, I attempted to fix them. Please review !
(2) These are things that are handled by compiler.c this far, but
that will soon become the responsibility of the parser.
- Werner
Werner Almesberger (8):
compiler/ptest/: FNP parser tester
compiler/test/: regression test framework and a few test cases
patches/: fix various typos (PLEASE REVIEW !)
parser.y: make syntax errors fatal
compiler: allow semicolons at the end of assignments
compiler: added //-type comments
compiler: added /*...*/-type comments
compiler: a bare "." is not a number
... & Rovastar - Altars Of Madness 2 (X42 Mix).fnp | 2 +-
...Lekernel & Rozzor & Aderassi - Video Cannon.fnp | 2 +-
patches/Rovastar & Idiot24-7 - Balk Acid.fnp | 2 +-
patches/Rozzor & Aderrasi - Canon (DMX out).fnp | 2 +-
src/compiler/Makefile | 23 ++
src/compiler/parser.y | 7 +-
src/compiler/ptest/Makefile | 63 ++++++
src/compiler/ptest/ptest.c | 211 ++++++++++++++++++++
src/compiler/scanner.re | 9 +-
src/compiler/test/Common | 52 +++++
src/compiler/test/arith | 49 +++++
src/compiler/test/comment | 136 +++++++++++++
src/compiler/test/error | 32 +++
src/compiler/test/number | 59 ++++++
src/compiler/test/wrap | 91 +++++++++
15 files changed, 734 insertions(+), 6 deletions(-)
create mode 100644 src/compiler/Makefile
create mode 100644 src/compiler/ptest/Makefile
create mode 100644 src/compiler/ptest/ptest.c
create mode 100755 src/compiler/test/Common
create mode 100755 src/compiler/test/arith
create mode 100755 src/compiler/test/comment
create mode 100755 src/compiler/test/error
create mode 100755 src/compiler/test/number
create mode 100755 src/compiler/test/wrap
_______________________________________________
http://lists.milkymist.org/listinfo.cgi/devel-milkymist.org
IRC: #milkymist@Freenode