Class browser.Parser
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class browser.Parser

java.lang.Object
   |
   +----browser.Parser

public class Parser
extends Object

Variable Index

 o flagSpaceBefore
True if there were some spaces before current token.
 o flagTokenIsSpecial
True if current token is a special symbol (&...;).
 o flagTokenIsTag
True if current token is a Tag

Constructor Index

 o Parser(URL)
Create a parser object.

Method Index

 o getNextToken()
Get the next token.
 o moreTokens()
Check if more tokens are available.
 o setPreformatted(boolean)
Turn Preformatted mode ON/OFF.

Variables

 o flagTokenIsTag
  public boolean flagTokenIsTag
True if current token is a Tag
 o flagTokenIsSpecial
  public boolean flagTokenIsSpecial
True if current token is a special symbol (&...;). The special symbols are converted into normal characters in the parser automatically.
 o flagSpaceBefore
  public boolean flagSpaceBefore
True if there were some spaces before current token. This variable has to be cleared.

Constructors

 o Parser
  public Parser(URL fileURL)
Create a parser object. Opens and reads an URL.
Parameters:
fileURL - URL to open.

Methods

 o setPreformatted
  public void setPreformatted(boolean flag)
Turn Preformatted mode ON/OFF. If it is ON all whitespace characters are treated as tokens.
Parameters:
flag - If true Preformatted mode is ON, if false - OFF.
 o moreTokens
  public boolean moreTokens()
Check if more tokens are available.
Returns:
true if more tokens available, false otherwise.
 o getNextToken
  public String getNextToken()
Get the next token.
Returns:
Token as a string.

All Packages  Class Hierarchy  This Package  Previous  Next  Index