Opened 2 years ago

Last modified 2 years ago

#2601 assigned defect

Parser conflict resolve - intLitExp & floatLitExp

Reported by: aburamadan Owned by: Dimitar Misev
Priority: major Milestone: 10.0
Component: qlparser Version: 10.0
Keywords: Parser, Conflicts 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 states:

intLitExp: MINUS intLitExp .
atomicLit: intLitExp .

AND:

floatLitExp: MINUS floatLitExp .
atomicLit: floatLitExp .

The intLitExp & floatLitExp have some r/r conflicts. (the same issue applies to both)
-also, based on the state report file, 'the %prec UNARYOP' line which is used by both expressions is ignored by the parser here completely (rule is reduced before they are looked at), making them useless. Taking the context-dependent precedence %prec out, the r/r conflict is gone. And UNARYOP is now available (not sure if wanted, though. Seems useless still).

I would also double check if UNARYOP is needed for the positive cases. not sure why it is only used in the negative cases.

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."

Change History (1)

comment:1 by Bang Pham Huu, 2 years ago

Owner: set to Dimitar Misev
Status: newassigned
Note: See TracTickets for help on using tickets.