|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.core.StringTokenizer | +--gov.nist.core.LexerCore
A lexical analyzer that is used by all parsers in our implementation.
Field Summary | |
static int |
ALPHA
|
static int |
AND
|
static int |
AT
|
static int |
BACK_QUOTE
|
static int |
BACKSLASH
|
static int |
BAR
|
static int |
COLON
|
static int |
DIGIT
|
static int |
DOLLAR
|
static int |
DOT
|
static int |
DOUBLEQUOTE
|
static int |
END
|
static int |
EQUALS
|
static int |
EXCLAMATION
|
static int |
GREATER_THAN
|
static int |
HAT
|
static int |
HT
|
static int |
ID
|
static int |
L_CURLY
|
static int |
L_SQUARE_BRACKET
|
static int |
LESS_THAN
|
static int |
LPAREN
|
static int |
MINUS
|
static int |
NULL
|
static int |
PERCENT
|
static int |
PLUS
|
static int |
POUND
|
static int |
QUESTION
|
static int |
QUOTE
|
static int |
R_CURLY
|
static int |
R_SQUARE_BRACKET
|
static int |
RPAREN
|
static int |
SEMICOLON
|
static int |
SLASH
|
static int |
SP
|
static int |
STAR
|
static int |
START
|
static int |
TILDE
|
static int |
UNDERSCORE
|
static int |
WHITESPACE
|
Constructor Summary | |
LexerCore(String lexerName)
|
|
LexerCore(String lexerName,
String buffer)
Initialize the lexer with a buffer. |
Method Summary | |
String |
byteStringNoComma()
|
String |
byteStringNoSemicolon()
|
static String |
charAsString(char ch)
|
String |
charAsString(int nchars)
Lookahead in the inputBuffer for n chars and return as a string. |
String |
comment()
|
ParseException |
createParseException()
Create a parse exception. |
String |
getBuffer()
Get the buffer. |
String |
getNextId()
Get the next id. |
Token |
getNextToken()
|
int |
getPtr()
Get the read pointer. |
String |
getRest()
Get the rest of the String |
String |
getString(char c)
Get the sub-String until the character is encountered |
String |
lookupToken(int value)
|
int |
markInputPosition()
Mark the position for backtracking. |
Token |
match(int tok)
Match the given token or throw an exception if no such token can be matched. |
String |
number()
Get and consume the next number. |
String |
peekNextId()
Peek the next id but dont move the buffer pointer forward. |
Token |
peekNextToken()
Look ahead for one token. |
Vector |
peekNextToken(int ntokens)
|
String |
quotedString()
|
void |
rewindInputPosition(int position)
Rewind the input ptr to the marked position. |
abstract void |
selectLexer(String lexerName)
|
void |
SPorHT()
|
boolean |
startsId()
|
String |
ttoken()
|
String |
ttokenAllowSpace()
|
Methods inherited from class gov.nist.core.StringTokenizer |
consume, consume, getLine, getLines, getNextChar, getNextToken, getSDPFieldName, hasMoreChars, isAlpha, isDigit, isHexDigit, lookAhead, lookAhead, nextToken, peekLine |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int START
public static final int END
public static final int ID
public static final int WHITESPACE
public static final int DIGIT
public static final int ALPHA
public static final int BACKSLASH
public static final int QUOTE
public static final int AT
public static final int SP
public static final int HT
public static final int COLON
public static final int STAR
public static final int DOLLAR
public static final int PLUS
public static final int POUND
public static final int MINUS
public static final int DOUBLEQUOTE
public static final int TILDE
public static final int BACK_QUOTE
public static final int NULL
public static final int EQUALS
public static final int SEMICOLON
public static final int SLASH
public static final int L_SQUARE_BRACKET
public static final int R_SQUARE_BRACKET
public static final int R_CURLY
public static final int L_CURLY
public static final int HAT
public static final int BAR
public static final int DOT
public static final int EXCLAMATION
public static final int LPAREN
public static final int RPAREN
public static final int GREATER_THAN
public static final int LESS_THAN
public static final int PERCENT
public static final int QUESTION
public static final int AND
public static final int UNDERSCORE
Constructor Detail |
public LexerCore(String lexerName)
public LexerCore(String lexerName, String buffer)
Method Detail |
public String lookupToken(int value)
public abstract void selectLexer(String lexerName)
public String peekNextId()
public String getNextId()
public Token getNextToken()
public Token peekNextToken() throws ParseException
ParseException
public Vector peekNextToken(int ntokens) throws ParseException
ParseException
public Token match(int tok) throws ParseException
ParseException
public void SPorHT()
public boolean startsId()
public String ttoken()
public String ttokenAllowSpace()
public String quotedString() throws ParseException
ParseException
public String comment() throws ParseException
ParseException
public String byteStringNoSemicolon()
public String byteStringNoComma()
public static String charAsString(char ch)
public String charAsString(int nchars)
public String number() throws ParseException
ParseException
public int markInputPosition()
public void rewindInputPosition(int position)
public String getRest()
public String getString(char c) throws ParseException
ParseException
public int getPtr()
public String getBuffer()
public ParseException createParseException()
|
NIST SIP Parser and Stack (v1.2) API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |