jamexp.y: rewrite grammar using precedences
Signed-off-by: Peter Pöschl <pp+ujt2208@nest-ai.de>
This was the cover letter:
-----
Date: Tue, 27 Sep 2022 13:08:43 +0200
From: Peter Pöschl <pp+ujt2208@nest-ai.de>
To: urjtag-development@lists.sourceforge.net
Subject: [UrJTAG-dev] [PATCH 0/2] jamexp.y: rewrite grammar using precedences
Hi,
the following patch series changes the grammar in src/stapl/jamexp.y to use
precedences. This makes the grammar more efficient (only one reduction to
'expr' instead of a cascade of reductions to 'logical_or_expr') and easier to
comprehend.
Patch 1 expands the test suite with additional checks to ascertain what is
allowed on the RHS of pound and dollar tokens and in array range values
(tl;dr: the grammar was too strict, expressions are always allowed).
Patch 2 provides the changes to jamexp.y
Regards,
Peter Pöschl
-----
Committed-by: Geert Stappers <stappers@stappers.nl>