public TokenStream Scan() { TokenStream retStream = new TokenStream (errorLog); EatWhiteSpaces (); while (PeekChar () != -1) { Token nextToken = NextToken (); if (nextToken != null) retStream.AddToken (nextToken); EatWhiteSpaces (); } return retStream; }
public TokenStream Scan () { TokenStream retStream = new TokenStream (errorLog); EatWhiteSpaces (); while (PeekChar () != -1) { Token nextToken = NextToken (); if (nextToken != null) retStream.AddToken (nextToken); EatWhiteSpaces (); } if (errorLog.ErrorCount > 0) { throw new SyntaxException (errorLog); } return retStream; }
public TokenStream Scan() { TokenStream retStream = new TokenStream(errorLog); EatWhiteSpaces(); while (PeekChar() != -1) { Token nextToken = NextToken(); if (nextToken != null) { retStream.AddToken(nextToken); } EatWhiteSpaces(); } if (errorLog.ErrorCount > 0) { throw new SyntaxException(errorLog); } return(retStream); }