WIP: push-based tokenization

git-svn-id: svn://10.0.0.236/trunk@1226 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg
1998-05-07 07:19:47 +00:00
parent 61e75a1a74
commit a0aa2749b7
22 changed files with 1032 additions and 512 deletions

View File

@@ -16,6 +16,8 @@
* Reserved.
*/
//#define __INCREMENTAL 1
#include "nsHTMLParser.h"
#include "nsHTMLContentSink.h"
#include "nsTokenizer.h"
@@ -513,7 +515,15 @@ PRBool nsHTMLParser::Parse(nsIURL* aURL,eParseMode aMode){
if(mDTD)
mDTD->SetParser(this);
mTokenizer=new CTokenizer(aURL, theDelegate, mParseMode);
#ifdef __INCREMENTAL
int iter=-1;
for(;;){
mTokenizer->TokenizeAvailable(++iter);
}
#else
mTokenizer->Tokenize();
#endif
result=IterateTokens();
}
return result;