Is this an "acceptable" parser change

26 views
Skip to first unread message

Mark Rotteveel

unread,
Jun 12, 2025, 6:11:00 AM6/12/25
to firebir...@googlegroups.com
Trying to fix https://github.com/FirebirdSQL/firebird/issues/8182, I
made the following change in the Firebird 5 parse.y:

From:
```
%type <exprNode> in_predicate_value
in_predicate_value
: table_subquery { $$ = $1; }
| '(' value_list ')' { $$ = $2; }
;

%type <selectExprNode> table_subquery
table_subquery
: '(' column_select ')' { $$ = $2; }
;
```
to:
```
%type <exprNode> in_predicate_value
in_predicate_value
: table_subquery { $$ = $1; }
| '(' value_list ')' { $$ = $2; }
;

%type <selectExprNode> table_subquery
table_subquery
: '(' column_select ')' { $$ = $2; }
| '(' table_subquery ')' { $$ = $2; }
;
```

This seems to work, but increases the shift/reduce conflicts from 69 to 70.

Is that an acceptable trade-off, or am I maybe missing an alternative
solution?
--
Mark Rotteveel

Adriano dos Santos Fernandes

unread,
Jun 12, 2025, 9:00:03 AM6/12/25
to firebir...@googlegroups.com
Yes.


Adriano

Mark Rotteveel

unread,
Jun 12, 2025, 11:06:32 AM6/12/25
to firebir...@googlegroups.com
Thanks, I'll commit to v5 and master tomorrow (and maybe v4 and v3, I'll
need to double check some things there).

Mark

--
Mark Rotteveel

Dimitry Sibiryakov

unread,
Jun 12, 2025, 11:08:08 AM6/12/25
to firebir...@googlegroups.com
'Mark Rotteveel' via firebird-devel wrote 12.06.2025 17:06:
> I'll commit to v5 and master tomorrow (and maybe v4 and v3, I'll need to double
> check some things there).

What is a reason to commit this change into a stable branch?

--
WBR, SD.

Mark Rotteveel

unread,
Jun 13, 2025, 6:48:29 AM6/13/25
to firebir...@googlegroups.com
Fixing the bug I linked in the initial message, which can bite people
using Hibernate.
--
Mark Rotteveel

Dimitry Sibiryakov

unread,
Jun 13, 2025, 6:50:07 AM6/13/25
to firebir...@googlegroups.com
'Mark Rotteveel' via firebird-devel wrote 13.06.2025 12:48:
> Fixing the bug I linked in the initial message, which can bite people using
> Hibernate.

I thought that it is a missing feature, not a bug.

--
WBR, SD.
Reply all
Reply to author
Forward
0 new messages