()
| 615 | } |
| 616 | |
| 617 | Token COMMENT() { |
| 618 | match('!'); |
| 619 | while ( !(c=='!' && input.LA(2)==delimiterStopChar) ) { |
| 620 | if ( c==EOF ) { |
| 621 | RecognitionException re = new MismatchedTokenException((int)'!', input); |
| 622 | re.line = input.getLine(); |
| 623 | re.charPositionInLine = input.getCharPositionInLine(); |
| 624 | errMgr.lexerError(input.getSourceName(), "Nonterminated comment starting at " + |
| 625 | startLine +":"+startCharPositionInLine + |
| 626 | ": '!" + |
| 627 | delimiterStopChar + |
| 628 | "' missing", templateToken, re); |
| 629 | break; |
| 630 | } |
| 631 | consume(); |
| 632 | } |
| 633 | consume(); |
| 634 | consume(); // grab !> |
| 635 | return newToken(COMMENT); |
| 636 | } |
| 637 | |
| 638 | void LINEBREAK() { |
| 639 | match('\\'); // only kill 2nd \ as ESCAPE() kills first one |
no test coverage detected