Thanks for the feedback, it helped us improve the implementation quite a bit.
> > +| rvalue QMARK rvalue COLON rvalue
> > +{
> > +@1.last_column = @5.last_column;
> > +bool is_64bit = ($3.bit_width == 64) || ($5.bit_width == 64);
> > +int bit_width = (is_64bit) ? 64 : 32;
> > +if
On Thu, 25 Feb 2021 19:30:14 -0800
Richard Henderson wrote:
> > +}
> > +}
> > +code
> > +{
> > +if (c->inst.error_count != 0) {
> > +fprintf(stderr,
> > +"Parsing of instruction %s generated %d errors!\n",
> > +c->inst.name,
> > +
On 2/25/21 7:18 AM, Alessandro Di Federico wrote:
> +instructions : instruction instructions
> +| %empty
> +;
I have never seen bison written flush-left like this, and I find it really hard
to read, especially with some of the larger non-terminals.
I'm also not a fan of large blocks of code
From: Paolo Montesel
Signed-off-by: Alessandro Di Federico
Signed-off-by: Paolo Montesel
---
target/hexagon/idef-parser/idef-parser.y | 1250 +++
target/hexagon/idef-parser/parser-helpers.c | 1925 +
target/hexagon/idef-parser/parser-helpers.h | 293 +++