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
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 +
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
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
---
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,