Consume if x is next character on the input stream.
(char x)
| 212 | */ |
| 213 | |
| 214 | public void match(char x) { |
| 215 | if ( c!= x ) { |
| 216 | NoViableAltException e = new NoViableAltException("", 0, 0, input); |
| 217 | errMgr.lexerError(input.getSourceName(), "expecting '"+x+"', found '"+str(c)+"'", |
| 218 | templateToken, |
| 219 | e); |
| 220 | } |
| 221 | consume(); |
| 222 | } |
| 223 | |
| 224 | protected void consume() { |
| 225 | input.consume(); |