private IToken MatchComment()
{
Match('!');
while (!(c == '!' && input.LA(2) == delimiterStopChar))
{
if (c == EOF)
{
RecognitionException re = new MismatchedTokenException((int)'!', input);
re.Line = input.Line;
re.CharPositionInLine = input.CharPositionInLine;
string message = string.Format("Nonterminated comment starting at {0}:{1}: '!{2}' missing", startLine, startCharPositionInLine, delimiterStopChar);
errMgr.LexerError(input.SourceName, message, templateToken, re);
break;
}
Consume();
}
Consume();
Consume(); // grab !>
return NewToken(COMMENT);
}