Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- expr : expr '+' ident | ident
- void ShiftIdent() {
- current_token++;
- }
- void ShiftPlus() {
- current_token++;
- }
- void ShiftExpr() {
- switch(current_token->type) {
- case ident:
- ShiftIdent();
- switch(current_token->type) {
- case '+':
- ShiftPlus();
- ShiftIdent();
- return;
- default:
- error();
- };
- return;
- default:
- error();
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement