Advertisement
Guest User

Untitled

a guest
Feb 1st, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. expr : expr '+' ident | ident
  2.  
  3. void ShiftIdent() {
  4. current_token++;
  5. }
  6.  
  7. void ShiftPlus() {
  8. current_token++;
  9. }
  10.  
  11. void ShiftExpr() {
  12. switch(current_token->type) {
  13. case ident:
  14. ShiftIdent();
  15. switch(current_token->type) {
  16. case '+':
  17. ShiftPlus();
  18. ShiftIdent();
  19. return;
  20. default:
  21. error();
  22. };
  23. return;
  24. default:
  25. error();
  26. };
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement