Opened 2 years ago
Last modified 2 years ago
#2603 assigned defect
Parser conflict resolve - mintervalExp & namedMintervalExp2
Reported by: | aburamadan | Owned by: | Dimitar Misev |
---|---|---|---|
Priority: | major | Milestone: | 10.0 |
Component: | qlparser | Version: | 10.0 |
Keywords: | Cc: | dmisev/pbaumann | |
Complexity: | Medium |
Description
note: for parser warnings and conflicts to be shown, use these bison flags:
“-r state –report-file=parserreport -t -W”.
The output file 'parserreport' is generated in the /qlparser dir.
-relevant state:
82 mintervalExp: LEPAR . spatialOpList REPAR
115 namedMintervalExp2: LEPAR . namedSpatialOpList1 REPAR
—-
This r/r conflict is related to the mintervalExp and namedMintervalExp2 when a REPAR is used. I suspect it is afraid of getting [ ] as input, since namedSpatialOpList1 can be %empty.
I think this can be fixed by removing the %empty case (it is useless anyway, because of the conflict). Or if the empty case is needed, it think perhaps it could be moved to the namedMintervalExp2 grammar rule there, or fixed using precedence rules.
Interestingly, this is not the issue with namedSpatialOpList (without the ‘1’) , there are no ambiguities to bison there. Strange.
Test: After removing the empty case, the r/r conflict went away.
Also note, most of the precedence rules in oql.yy are useless according to the compiler warnings. This could be related to the conflicts.
pbaumann:
"The build process should be extended to run Bison with warnings enabled and grep afterwards to see where the conflicts or other errors happen."