Opened 11 years ago
Closed 11 years ago
#747 closed defect (fixed)
Parsing subtraction bug
Reported by: | Dimitar Misev | Owned by: | Veranika Liaukevich |
---|---|---|---|
Priority: | major | Milestone: | 9.0.x |
Component: | qlparser | Version: | development |
Keywords: | Cc: | Peter Baumann | |
Complexity: | Medium |
Description
This fails
$ rasql -q 'select 2-1 from mr2 as c' --out string Executing retrieval query...rasdaman error 300: Parsing error 300 in line 1, column 9: Unexpected name -1.
while this works
$ rasql -q 'select 2- 1 from mr2 as c' --out string Result element 1: 1
Both should work in the same way, it seems like when the '-' is exactly in front of the argument with no whitespace, it is wrongly considered as the unary minus sign.
Change History (4)
comment:1 by , 11 years ago
Status: | new → accepted |
---|
comment:2 by , 11 years ago
before doing that let us have a chat to find out what this exactly entails.
comment:3 by , 11 years ago
We can delegate unary minus operation to some other bison rule (e.g. intLitExp, which is now useless in the way it is), and then replace IntegerLit with intLitExp in other rules.
I have just checked it, at least systemtests passed without failure.
comment:4 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Note:
See TracTickets
for help on using tickets.
This minus is considered as a part of negative integer '-1' by Lex, so I think it would be better to move all 'unary minus' logic to Bison part.