com.wutka.dtd
Class Scanner

java.lang.Object
  extended bycom.wutka.dtd.Scanner

class Scanner
extends java.lang.Object

Lexical scanner for DTD's

Version:
$Revision: 1.1 $ $Date: 2005/07/29 05:07:32 $ by $Author: pavels $
Author:
Mark Wutka

Nested Class Summary
protected  class Scanner.StreamInfo
           
 
Field Summary
static TokenType ASTERISK
           
protected  boolean atEOF
           
static TokenType COMMA
           
static TokenType COMMENT
           
static TokenType CONDITIONAL
           
static TokenType ENDCONDITIONAL
           
protected  java.util.Hashtable entityExpansion
           
static TokenType EOF
           
static TokenType EQUAL
           
protected  char[] expandBuffer
           
protected  EntityExpansion expander
           
protected  int expandPos
           
static TokenType GT
           
static TokenType IDENTIFIER
           
protected  Scanner.StreamInfo in
           
protected  java.util.Stack inputStreams
           
static char[][] letterRanges
           
static TokenType LPAREN
           
static TokenType LT
           
static TokenType LTBANG
           
static TokenType LTQUES
           
protected  int nextChar
           
protected  Token nextToken
           
static TokenType NMTOKEN
           
static TokenType PERCENT
           
static TokenType PIPE
           
static TokenType PLUS
           
static TokenType QUES
           
static TokenType QUESGT
           
static TokenType RPAREN
           
static TokenType STRING
           
protected  boolean trace
           
 
Constructor Summary
Scanner(java.io.Reader inReader, boolean doTrace, EntityExpansion anExpander)
           
Scanner(java.io.Reader inReader, EntityExpansion anExpander)
           
 
Method Summary
 void addEntity(java.lang.String entityName, java.lang.String entityValue)
           
 void expand(char[] expandChars)
           
 boolean expandEntity(java.lang.String entityName)
           
 Token get()
           
 int getColumn()
           
 int getLineNumber()
           
 java.lang.String getUntil(char stopChar)
           
 java.lang.String getUriId()
           
 boolean isBaseChar(char ch)
           
 boolean isCombiningChar(char ch)
           
 boolean isDigit(char ch)
           
 boolean isExtender(char ch)
           
 boolean isIdentifierChar(char ch)
           
 boolean isIdeographic(char ch)
           
 boolean isLetter(char ch)
           
 boolean isNameChar(char ch)
           
 Token peek()
           
protected  int peekChar()
           
protected  int read()
           
protected  int readNextChar()
           
protected  Token readNextToken()
           
 void skipConditional()
           
 void skipUntil(char stopChar)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LTQUES

public static final TokenType LTQUES

IDENTIFIER

public static final TokenType IDENTIFIER

EQUAL

public static final TokenType EQUAL

LPAREN

public static final TokenType LPAREN

RPAREN

public static final TokenType RPAREN

COMMA

public static final TokenType COMMA

STRING

public static final TokenType STRING

QUESGT

public static final TokenType QUESGT

LTBANG

public static final TokenType LTBANG

GT

public static final TokenType GT

PIPE

public static final TokenType PIPE

QUES

public static final TokenType QUES

PLUS

public static final TokenType PLUS

ASTERISK

public static final TokenType ASTERISK

LT

public static final TokenType LT

EOF

public static final TokenType EOF

COMMENT

public static final TokenType COMMENT

PERCENT

public static final TokenType PERCENT

CONDITIONAL

public static final TokenType CONDITIONAL

ENDCONDITIONAL

public static final TokenType ENDCONDITIONAL

NMTOKEN

public static final TokenType NMTOKEN

in

protected Scanner.StreamInfo in

inputStreams

protected java.util.Stack inputStreams

nextToken

protected Token nextToken

nextChar

protected int nextChar

atEOF

protected boolean atEOF

trace

protected boolean trace

expandBuffer

protected char[] expandBuffer

expandPos

protected int expandPos

entityExpansion

protected java.util.Hashtable entityExpansion

expander

protected EntityExpansion expander

letterRanges

public static char[][] letterRanges
Constructor Detail

Scanner

public Scanner(java.io.Reader inReader,
               EntityExpansion anExpander)

Scanner

public Scanner(java.io.Reader inReader,
               boolean doTrace,
               EntityExpansion anExpander)
Method Detail

peek

public Token peek()
           throws java.io.IOException
Throws:
java.io.IOException

get

public Token get()
          throws java.io.IOException
Throws:
java.io.IOException

readNextChar

protected int readNextChar()
                    throws java.io.IOException
Throws:
java.io.IOException

peekChar

protected int peekChar()
                throws java.io.IOException
Throws:
java.io.IOException

read

protected int read()
            throws java.io.IOException
Throws:
java.io.IOException

getUntil

public java.lang.String getUntil(char stopChar)
                          throws java.io.IOException
Throws:
java.io.IOException

skipUntil

public void skipUntil(char stopChar)
               throws java.io.IOException
Throws:
java.io.IOException

readNextToken

protected Token readNextToken()
                       throws java.io.IOException
Throws:
java.io.IOException

skipConditional

public void skipConditional()
                     throws java.io.IOException
Throws:
java.io.IOException

getUriId

public java.lang.String getUriId()

getLineNumber

public int getLineNumber()

getColumn

public int getColumn()

isIdentifierChar

public boolean isIdentifierChar(char ch)

isNameChar

public boolean isNameChar(char ch)

isLetter

public boolean isLetter(char ch)

isBaseChar

public boolean isBaseChar(char ch)

isIdeographic

public boolean isIdeographic(char ch)

isDigit

public boolean isDigit(char ch)

isCombiningChar

public boolean isCombiningChar(char ch)

isExtender

public boolean isExtender(char ch)

expandEntity

public boolean expandEntity(java.lang.String entityName)
                     throws java.io.IOException
Throws:
java.io.IOException

expand

public void expand(char[] expandChars)

addEntity

public void addEntity(java.lang.String entityName,
                      java.lang.String entityValue)


Copyright (C) 2005-2006 Pavel Simakov
http://www.softwaresecretweapons.com