Skip to content

parser.y: Ambiguous grammar #73

@cznic

Description

@cznic

It seems that parser.y has several shift/reduce and reduce/reduce conflicts.

S/R conflicts are sometimes expected and/or acceptable, but I don't think this applies in this case. R/R conflicts, on the other hand, are almost never okay.

The current state of the grammar with all of the conflicts means that there are valid sentences, part of the intended-to-parse language, which will parse incorrectly or not at all because the grammar is ambiguous and does not reflect the proper language.

I suggest to get rid of all conflicts in parser.y and, above that, perhaps use the -cr goyacc flag to verify reducibility of all grammar productions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions