/// <summary> Construct a parser using the provided lexer and feedback object. /// This would be used to create a parser for special cases where the /// normal creation of a lexer on a URLConnection needs to be customized. /// </summary> /// <param name="lexer">The lexer to draw characters from. /// </param> /// <param name="fb">The object to use when information, /// warning and error messages are produced. If <em>null</em> no feedback /// is provided. /// </param> public Parser(Lexer lexer, IParserFeedBack fb) { Feedback = fb; if (null == lexer) { throw new System.ArgumentException("lexer cannot be null"); } Lexer = lexer; NodeFactory = new PrototypicalNodeFactory(); }
static Parser() { DEVNULL = new DefaultParserFeedback(DefaultParserFeedback.QUIET); }
/// <summary> Creates a Parser object with the location of the resource (URL or file) /// You would typically create a DefaultHTMLParserFeedback object and pass /// it in. /// </summary> /// <param name="resourceLocn">Either the URL or the filename (autodetects). /// A standard HTTP GET is performed to read the content of the URL. /// </param> /// <param name="feedback">The HTMLParserFeedback object to use when information, /// warning and error messages are produced. If <em>null</em> no feedback /// is provided. /// </param> /// <throws> ParserException If the URL is invalid. </throws> public Parser(System.Uri resourceLocn, IParserFeedBack feedback) : this(new HttpProtocol(resourceLocn), feedback) { }
/// <summary> Constructor for custom HTTP access. /// This would be used to create a parser for a URLConnection that needs /// a special setup or negotiation conditioning beyond what is available /// from the {@link #getConnectionManager ConnectionManager}. /// </summary> /// <param name="connection">A fully conditioned connection. The connect() /// method will be called so it need not be connected yet. /// </param> /// <param name="fb">The object to use for message communication. /// </param> /// <throws> ParserException If the creation of the underlying Lexer </throws> /// <summary> cannot be performed. /// </summary> public Parser(HttpProtocol connection, IParserFeedBack fb) : this(new Lexer(connection), fb) { this.m_obHttpProtocol = connection; }
public IteratorImpl(Lexer lexer, IParserFeedBack fb) { mLexer = lexer; mFeedback = fb; mCursor = new Cursor(mLexer.Page, 0); }
/// <summary> Creates a Parser object with the location of the resource (URL or file) /// You would typically create a DefaultHTMLParserFeedback object and pass /// it in. /// </summary> /// <param name="resourceLocn">Either the URL or the filename (autodetects). /// A standard HTTP GET is performed to read the content of the URL. /// </param> /// <param name="feedback">The HTMLParserFeedback object to use when information, /// warning and error messages are produced. If <em>null</em> no feedback /// is provided. /// </param> /// <throws> ParserException If the URL is invalid. </throws> public Parser(System.Uri resourceLocn, IParserFeedBack feedback) :this(new HttpProtocol(resourceLocn), feedback) { }
/// <summary> Constructor for custom HTTP access. /// This would be used to create a parser for a URLConnection that needs /// a special setup or negotiation conditioning beyond what is available /// from the {@link #getConnectionManager ConnectionManager}. /// </summary> /// <param name="connection">A fully conditioned connection. The connect() /// method will be called so it need not be connected yet. /// </param> /// <param name="fb">The object to use for message communication. /// </param> /// <throws> ParserException If the creation of the underlying Lexer </throws> /// <summary> cannot be performed. /// </summary> public Parser(HttpProtocol connection, IParserFeedBack fb):this(new Lexer(connection), fb) { this.m_obHttpProtocol = connection; }
/// <summary> Construct a parser using the provided lexer and feedback object. /// This would be used to create a parser for special cases where the /// normal creation of a lexer on a URLConnection needs to be customized. /// </summary> /// <param name="lexer">The lexer to draw characters from. /// </param> /// <param name="fb">The object to use when information, /// warning and error messages are produced. If <em>null</em> no feedback /// is provided. /// </param> public Parser(Lexer lexer, IParserFeedBack fb) { Feedback = fb; if (null == lexer) throw new System.ArgumentException("lexer cannot be null"); Lexer = lexer; NodeFactory = new PrototypicalNodeFactory(); }
/// <summary> Creates a Parser object with the location of the resource (URL or file) /// You would typically create a DefaultHTMLParserFeedback object and pass /// it in. /// </summary> /// <param name="resourceLocn">Either the URL or the filename (autodetects). /// A standard HTTP GET is performed to read the content of the URL. /// </param> /// <param name="feedback">The HTMLParserFeedback object to use when information, /// warning and error messages are produced. If <em>null</em> no feedback /// is provided. /// </param> /// <throws> ParserException If the URL is invalid. </throws> public Parser(string resourceLocn, IParserFeedBack feedback) : this(new HttpProtocol(resourceLocn), feedback) { }