search - Flex and Bison Associativity difficulty -
Using Flex and Bison, I have a grammatical description for the Boolean query language, which supports logical "and", "or", "
All were good till I saw that queries like" A and B or C and D " Want to parse "(a and b). (C & D) "is actually interpreted as" A & B (C & D) ", I'm almost certain that this is a collaborative issue but no suitable explanation or example can be found anywhere This or I am missing something important.
Relevant information from boolpars.y:
Can anybody find fault ? I can not see why the bison is not giving "or" the appropriate priority.
from the bison docs :
The priority of the operator is determined by the orderly order of announcements; the higher the line number of the declaration (less on the page or screen), the priority is higher.
Then change the order for your case or on screen and is a high priority
% left or% left and
Although I have not tested it)
Comments
Post a Comment