michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set sw=2 ts=2 et tw=78: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: michael@0: /** michael@0: * @file nsHTMLTokenizer.cpp michael@0: * This is an implementation of the nsITokenizer interface. michael@0: * This file contains the implementation of a tokenizer to tokenize an HTML michael@0: * document. It attempts to do so, making tradeoffs between compatibility with michael@0: * older parsers and the SGML specification. Note that most of the real michael@0: * "tokenization" takes place in nsHTMLTokens.cpp. michael@0: */ michael@0: michael@0: #include "nsHTMLTokenizer.h" michael@0: #include "nsIParser.h" michael@0: #include "nsParserConstants.h" michael@0: michael@0: /************************************************************************ michael@0: And now for the main class -- nsHTMLTokenizer... michael@0: ************************************************************************/ michael@0: michael@0: /** michael@0: * Satisfy the nsISupports interface. michael@0: */ michael@0: NS_IMPL_ISUPPORTS(nsHTMLTokenizer, nsITokenizer) michael@0: michael@0: /** michael@0: * Default constructor michael@0: */ michael@0: nsHTMLTokenizer::nsHTMLTokenizer() michael@0: { michael@0: // TODO Assert about:blank-ness. michael@0: } michael@0: michael@0: nsresult michael@0: nsHTMLTokenizer::WillTokenize(bool aIsFinalChunk) michael@0: { michael@0: return NS_OK; michael@0: } michael@0: michael@0: /** michael@0: * This method is repeatedly called by the tokenizer. michael@0: * Each time, we determine the kind of token we're about to michael@0: * read, and then we call the appropriate method to handle michael@0: * that token type. michael@0: * michael@0: * @param aScanner The source of our input. michael@0: * @param aFlushTokens An OUT parameter to tell the caller whether it should michael@0: * process our queued tokens up to now (e.g., when we michael@0: * reach a