sidekick.html.parser.html
Class HtmlParser

java.lang.Object
  extended by sidekick.html.parser.html.HtmlParser
All Implemented Interfaces:
HtmlParserConstants

public class HtmlParser
extends java.lang.Object
implements HtmlParserConstants


Field Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 HtmlParserTokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface sidekick.html.parser.html.HtmlParserConstants
ALPHA_CHAR, ALPHANUM_CHAR, ATTR_EQ, ATTR_NAME, ATTR_VAL, BLOCK_EOL, BLOCK_LBR, BLOCK_WORD, COMMENT_END, COMMENT_EOL, COMMENT_START, COMMENT_WORD, DASH, DECL_ANY, DECL_END, DECL_START, DEFAULT, ENDTAG_START, EOF, EOL, IDENTIFIER, IDENTIFIER_CHAR, IMPLICIT_TAG_END, IN_JSP_EXP, JSP_EXP_END, LAV_ERROR, LexAttrVal, LexComment, LexDecl, LexInTag, LexScript, LexStartTag, LexStyle, LIT_ERROR, LST_ERROR, NEWLINE, NUM_CHAR, PCDATA, QUOTE, QUOTED_STRING, QUOTED_STRING_NB, SCRIPT_END, STYLE_END, STYLE_IDENTIFIER, TAG_END, TAG_NAME, TAG_SCRIPT, TAG_SLASHEND, TAG_START, TAG_STYLE, tokenImage, WHITESPACE
 
Constructor Summary
HtmlParser(HtmlParserTokenManager tm)
          Constructor with generated Token Manager.
HtmlParser(java.io.InputStream stream)
          Constructor with InputStream.
HtmlParser(java.io.InputStream stream, java.lang.String encoding)
          Constructor with InputStream and supplied encoding
HtmlParser(java.io.Reader stream)
          Constructor.
HtmlParser(java.io.Reader in, int lineOffset, int columnOffset)
          The line offset is used when the HTML to be parsed is only part of a file,
 
Method Summary
 HtmlDocument.Attribute Attribute()
           
 HtmlDocument.AttributeList AttributeList()
           
 HtmlDocument.Comment CommentTag()
           
 HtmlDocument.Comment DeclTag()
           
 void disable_tracing()
          Disable tracing.
 HtmlDocument.HtmlElement Element()
           
 HtmlDocument.ElementSequence ElementSequence()
           
 void enable_tracing()
          Enable tracing.
 HtmlDocument.HtmlElement EndTag()
           
 ParseException generateParseException()
          Generate ParseException.
 Token getNextToken()
          Get the next Token.
 java.util.List<sidekick.util.ParseError> getParseErrors()
           
 int getTabSize()
           
 Token getToken(int index)
          Get the specific Token.
 HtmlDocument HtmlDocument()
           
static void main(java.lang.String[] args)
           
 void ReInit(HtmlParserTokenManager tm)
          Reinitialise.
 void ReInit(java.io.InputStream stream)
          Reinitialise.
 void ReInit(java.io.InputStream stream, java.lang.String encoding)
          Reinitialise.
 void ReInit(java.io.Reader stream)
          Reinitialise.
 HtmlDocument.HtmlElement ScriptBlock()
           
 java.lang.String ScriptBlockContents()
           
 void setLineSeparator(java.lang.String ls)
           
 void setTabSize(int size)
           
 HtmlDocument.HtmlElement StyleBlock()
           
 java.lang.String StyleBlockContents()
           
 HtmlDocument.HtmlElement Tag()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

token_source

public HtmlParserTokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

HtmlParser

public HtmlParser(java.io.Reader in,
                  int lineOffset,
                  int columnOffset)
The line offset is used when the HTML to be parsed is only part of a file,

Parameters:
lineOffset - The line number of the first line of the fragment.
columnOffset - The column number of the first character of the fragment.

HtmlParser

public HtmlParser(java.io.InputStream stream)
Constructor with InputStream.


HtmlParser

public HtmlParser(java.io.InputStream stream,
                  java.lang.String encoding)
Constructor with InputStream and supplied encoding


HtmlParser

public HtmlParser(java.io.Reader stream)
Constructor.


HtmlParser

public HtmlParser(HtmlParserTokenManager tm)
Constructor with generated Token Manager.

Method Detail

setLineSeparator

public void setLineSeparator(java.lang.String ls)

main

public static void main(java.lang.String[] args)
                 throws ParseException
Throws:
ParseException

setTabSize

public void setTabSize(int size)

getTabSize

public int getTabSize()

getParseErrors

public java.util.List<sidekick.util.ParseError> getParseErrors()

HtmlDocument

public final HtmlDocument HtmlDocument()
                                throws ParseException
Throws:
ParseException

ElementSequence

public final HtmlDocument.ElementSequence ElementSequence()
                                                   throws ParseException
Throws:
ParseException

Element

public final HtmlDocument.HtmlElement Element()
                                       throws ParseException
Throws:
ParseException

Attribute

public final HtmlDocument.Attribute Attribute()
                                       throws ParseException
Throws:
ParseException

AttributeList

public final HtmlDocument.AttributeList AttributeList()
                                               throws ParseException
Throws:
ParseException

Tag

public final HtmlDocument.HtmlElement Tag()
                                   throws ParseException
Throws:
ParseException

StyleBlockContents

public final java.lang.String StyleBlockContents()
                                          throws ParseException
Throws:
ParseException

ScriptBlockContents

public final java.lang.String ScriptBlockContents()
                                           throws ParseException
Throws:
ParseException

ScriptBlock

public final HtmlDocument.HtmlElement ScriptBlock()
                                           throws ParseException
Throws:
ParseException

StyleBlock

public final HtmlDocument.HtmlElement StyleBlock()
                                          throws ParseException
Throws:
ParseException

EndTag

public final HtmlDocument.HtmlElement EndTag()
                                      throws ParseException
Throws:
ParseException

CommentTag

public final HtmlDocument.Comment CommentTag()
                                      throws ParseException
Throws:
ParseException

DeclTag

public final HtmlDocument.Comment DeclTag()
                                   throws ParseException
Throws:
ParseException

ReInit

public void ReInit(java.io.InputStream stream)
Reinitialise.


ReInit

public void ReInit(java.io.InputStream stream,
                   java.lang.String encoding)
Reinitialise.


ReInit

public void ReInit(java.io.Reader stream)
Reinitialise.


ReInit

public void ReInit(HtmlParserTokenManager tm)
Reinitialise.


getNextToken

public final Token getNextToken()
Get the next Token.


getToken

public final Token getToken(int index)
Get the specific Token.


generateParseException

public ParseException generateParseException()
Generate ParseException.


enable_tracing

public final void enable_tracing()
Enable tracing.


disable_tracing

public final void disable_tracing()
Disable tracing.