Reputation: 77
Below the grammar i make.
The problem is that the grammar is ambiguous because for some rules there are shift/reduce conflicts. Particularly
at the rules below for DATAKW we have shift/reduce conflict
at the rules below for DATAKW we have shift/reduce conflict
at the rules below for ATTKW we have shift/reduce conflict
at the rules below for ATTKW we have shift/reduce conflict
Can anyone help me to solve that conflicts, please.
Upvotes: 0
Views: 66
Reputation: 241911
A problem is that the grammar cannot determine where one declaration
ends and the next one begins.
A simple instance of this general problem: norelation
can be just a relatts
which can be a list of attname
s. So if you have two consecutive norelation
, that could be two sequences of attname
s. How can you distinguish two consecutive sequences from one longer sequence? Or three shorter ones? Etc.
There are many other instances of the same issue.
Unless you've transcribed the language incorrectly, this is a problem of language design, and semicolons are a common solution.
Upvotes: 0