|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object condor.classad.Parser
This is the internal classad parser generated by byacc. From outside this package, it should be accessed through the wrapper class ClassAdParser.
ClassAdParser
Field Summary | |
(package private) boolean |
acceptPrefix
If true, accept when a prefix of the input matches. |
static short |
ERROR
Internal code for a token. |
(package private) PrintStream |
errs
Place to send error messages. |
static short |
FALSE
Internal code for a token. |
static short |
IDENTIFIER
Internal code for a token. |
static short |
INTEGER
Internal code for a token. |
static short |
LEX_ERROR
Internal code for a token. |
static short |
OP_EQ
Internal code for a token. |
static short |
OP_GE
Internal code for a token. |
static short |
OP_IS
Internal code for a token. |
static short |
OP_ISNT
Internal code for a token. |
static short |
OP_LAND
Internal code for a token. |
static short |
OP_LE
Internal code for a token. |
static short |
OP_LOR
Internal code for a token. |
static short |
OP_NE
Internal code for a token. |
static short |
OP_SHL
Internal code for a token. |
static short |
OP_SHR
Internal code for a token. |
static short |
OP_SHRR
Internal code for a token. |
static short |
REAL
Internal code for a token. |
static short |
STRING
Internal code for a token. |
(package private) boolean |
tracing
Set to true if parsing actions should be traced. |
static short |
TRUE
Internal code for a token. |
static short |
UNARY
Internal code for a token. |
static short |
UNDEFINED
Internal code for a token. |
(package private) int |
verbosity
Verbosity for error messages. |
Constructor Summary | |
Parser(InputStream str)
Create a parser for parsing input from an InputStream. |
|
Parser(Reader rdr)
Create a parser for parsing input from a Reader. |
|
Parser(String str)
Create a parser for parsing a String. |
Method Summary | |
int |
curColumn()
Returns the current input column. |
int |
curLine()
Returns the current input line. |
boolean |
enableTracing(boolean on)
Turn debug tracing on or off. |
int |
getNextToken()
Get and remove the "lookahead" token: the first token not yet consumed by the parser. |
int |
nextToken()
Get the "lookahead" token: the first token not yet consumed by the parser. |
Object |
nextValue()
Get the value associated with the "lookahead" token: the first token not yet consumed by the parser. |
Object |
parse()
Check whether the the unconsumed input is a syntactically valid phrase according to the grammar. |
Object |
parse(boolean acceptPrefix)
Check whether the the unconsumed input is a syntactically valid phrase according to the grammar. |
(package private) void |
printMessage(String msg)
Print a message, decorated with the current line and column number. |
void |
reset(InputStream str)
Supply a new source of input to this Parser. |
void |
reset(Reader rdr)
Supply a new source of input to this Parser. |
void |
reset(String str)
Supply a new source of input to this Parser. |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short ERROR
public static final short FALSE
public static final short IDENTIFIER
public static final short INTEGER
public static final short LEX_ERROR
public static final short REAL
public static final short STRING
public static final short TRUE
public static final short UNDEFINED
public static final short OP_LOR
public static final short OP_LAND
public static final short OP_EQ
public static final short OP_NE
public static final short OP_IS
public static final short OP_ISNT
public static final short OP_LE
public static final short OP_GE
public static final short OP_SHL
public static final short OP_SHR
public static final short OP_SHRR
public static final short UNARY
boolean tracing
boolean acceptPrefix
int verbosity
PrintStream errs
Constructor Detail |
public Parser(Reader rdr)
rdr
- the source of the input characters.public Parser(InputStream str)
str
- the source of the input characters.public Parser(String str)
str
- the source of the input characters.Method Detail |
public Object parse(boolean acceptPrefix)
If the input is already at end of file when this method is called, it silently returns null. If an error occurs, a message is printed by calling the user-supplied method error(String) and the result is null. On success, the return value is the "semantic value" assigned by semantic routines to the start symbol.
acceptPrefix
- if true, the input does not to be completely consumed.
public Object parse()
public boolean enableTracing(boolean on)
on
- if true, turn tracing on; otherwise turn it off.
public void reset(Reader rdr)
rdr
- the new source of input.public void reset(InputStream str)
str
- the new source of input.public void reset(String str)
str
- the new source of input.public int curLine()
public int curColumn()
public int nextToken()
getNextToken()
public Object nextValue()
nextToken()
public int getNextToken()
getNextToken()
void printMessage(String msg)
msg
- the message to print.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |