
Project: Compiler for a MiniC 367
switch(c) {
case ’+’: return follow(’+’, INC, follow(’=’, ADDEQ, ’+’));
case ’-’: return follow(’-’, DEC, follow(’=’, SUBEQ, ’-’));
case ’*’: return follow(’=’, MULEQ, ’*’);
case ’/’: return follow(’=’, DIVEQ, ’/’);
case ’%’: return follow(’=’, MODEQ, ’%’);
case ’>’: return follow(’=’, GE, GT);
case ’<’: return follow(’=’, LE, LT);
case ’=’: return follow(’=’, EQ, ’=’);
case ’!’: return follow(’=’, NE, NOT);
case ’|’: return follow(’|’, OR, ’|’);
case ’&’: return follow(’&’, AND, ’&’);
case ’\n’: lineno++; return ’\n’;
default: return c;
}
}
backslash(int c) /* get next char with \’s interpreted */
{
static char transtab[] ...