Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %{
- #include <stdio.h>
- #include "p5.tab.h"
- %}
- binaryOperation UINION|INTERSECT|MINUS|TIMES|JOIN|DIVIDEBY
- compare <|>|<=|>=|=|<>
- attribute CNO|CITY|CNAME|SNO|PNO|TQTY|SNAME|QUOTA|PNAME|COST|AVQTY|S#|STATUS|P#|COLOR|WEIGHT|QTY
- relation S|P|SP|PRDCT|CUST|ORDERS
- %%
- [ \t\n]+ ;
- {binaryOperation} return binaryOperation;
- {compare} return compare;
- [0-9]+ return val;
- {attribute} return attribute;
- {relation} return relation;
- "RENAME" return RENAME;
- "AS" return AS;
- "WHERE" return WHERE;
- "(" return '(';
- ")" return ')';
- "[" return '[';
- "]" return ']';
- "," return ',';
- . {printf("REJECT\n");
- exit(0);}
- %%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement