Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. %{
  2. #include <stdio.h>
  3. #include "p5.tab.h"
  4. %}
  5. binaryOperation UINION|INTERSECT|MINUS|TIMES|JOIN|DIVIDEBY
  6. compare <|>|<=|>=|=|<>
  7. attribute CNO|CITY|CNAME|SNO|PNO|TQTY|SNAME|QUOTA|PNAME|COST|AVQTY|S#|STATUS|P#|COLOR|WEIGHT|QTY
  8. relation S|P|SP|PRDCT|CUST|ORDERS
  9. %%
  10. [ \t\n]+ ;
  11. {binaryOperation} return binaryOperation;
  12. {compare} return compare;
  13. [0-9]+ return val;
  14. {attribute} return attribute;
  15. {relation} return relation;
  16. "RENAME" return RENAME;
  17. "AS" return AS;
  18. "WHERE" return WHERE;
  19. "(" return '(';
  20. ")" return ')';
  21. "[" return '[';
  22. "]" return ']';
  23. "," return ',';
  24. . {printf("REJECT\n");
  25. exit(0);}
  26. %%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement