jamexp.y: rewrite grammar using precedencesmaster
commitd9a2943fb5e0c3e085a16f6cf139f8f5946648f6
authorPeter Pöschl <pp+ujt2208@nest-ai.de>
Tue, 27 Sep 2022 11:09:40 +0000 (27 13:09 +0200)
committerGeert Stappers <stappers@stappers.nl>
Fri, 30 Sep 2022 15:12:59 +0000 (30 17:12 +0200)
treeb9193b8270c9ec9ed157a19a99c5337ff397fb1a
parentaa39d46b2b5d8d79d42ca93efab7b0685ee108c8
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>
urjtag/src/stapl/jamexp.y