[UrJTAG-dev] [PATCH 0/4] provide reverse-engineered jamexp.y to generate jamexp.c/jamytab.h

2022-08-13 Thread Peter Pöschl
Hi all, I have reverse-engineered a jamexp.y from urjtag/src/stapl/jamexp.c. The following patch series will provide this file and the unit tests I wrote to verify the grammar in the file. Patch 1 instruments the existing jamexp.c to report shift/reduce actions. Patch 2 adds files to allow

[UrJTAG-dev] [PATCH 2/4] tests/tap/{basic.h, basic.c, macros.h}: Add files from git://git.eyrie.org/devel/c-tap-harness.git

2022-08-13 Thread Peter Pöschl
Files from commit 14801bbe866e from 2022-02-06 copied to this project according to 'USING THE HARNESS' in https://www.eyrie.org/~eagle/software/c-tap-harness/readme.html Signed-off-by: Peter Pöschl --- urjtag/tests/tap/basic.c | 1029 +

[UrJTAG-dev] [PATCH 3/4] Add unit tests to exercise all productions of the grammar in src/stapl/jamexp.c

2022-08-13 Thread Peter Pöschl
Reverse-engineering steps and inputs: * Write table dumper program to produce output similar to 'bison --report' ** Create main program from code in [1] ** copy in tables jam_yyexca ... jam_yydef from jamexp.c ** add glue-defines ** add string arrays for better output * Write a unit test

[UrJTAG-dev] [PATCH 1/4] src/stapl/jamexp.c: instrument code to report shift/reduce actions

2022-08-13 Thread Peter Pöschl
Reporting is active when URJ_JAM_YYDEBUG is defined Signed-off-by: Peter Pöschl --- urjtag/src/stapl/jamexp.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/urjtag/src/stapl/jamexp.c b/urjtag/src/stapl/jamexp.c index 5e1f9d92..60a8d8fb 100644 ---

[UrJTAG-dev] [PATCH 4/4] Add GNU bison input file jamexp.y and unit test program for generated jamexp.c

2022-08-13 Thread Peter Pöschl
Note: jamexp.y uses GNU extensions of the YACC grammar as defined by GNU bison Reverse-engineering steps and inputs: * Write a unit test program (driver jamexp_gen.c) using a jamexp.c generated from jamexp.y with bison and the test functions in jamexp_shrd.c ** Copy old jamexp.c to jamexp.y,