2007-04-25

Writing a parser: ADL Tokenizer correction

Sushovan made a great remark on my last post. He asked me why I didn't use the method char.IsWhiteSpace() to test for white-space. The reason I didn't, was ignorance: I had totally forgot about that method. So it's probably a good idea to change the method SkipWhitespace to this:
void SkipWhitespace()
{
    while (char.IsWhiteSpace(fCurrentChar))
        ReadNextChar();
}
Comments: Post a Comment

Links to this post:

Create a Link