|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.dieselpoint.parser.Lexer
COPYRIGHT NOTICE SOFTWARE CONTAINING TRADE SECRETS Copyright 2003 Raritan Technologies Inc. [RTI] All rights reserved. This software and documentation constitute an unpublished work and contain valuable trade secrets and proprietary information belonging to RTI. None of the foregoing material may be copied, duplicated or disclosed without the express written permission of RTI. RTI EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES CONCERNING THIS SOFTWARE AND DOCUMENTATION, INCLUDING ANY WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR ANY PARTICULAR PURPOSE, AND WARRANTIES OF PERFORMANCE, AND ANY WARRANTY THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE. NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF THE SOFTWARE OR DOCUMENTATION. Under no circumstances shall RTI be liable for incidental, special, indirect, direct or consequential damages or loss of profits, interruption of business, or related expenses which may arise from use of software or documentation, including but not limited to those resulting from defects in software and/or documentation, or loss or inaccuracy of data of any kind.
| Field Summary | |
protected int |
absolute_position
Character position in entire query. |
protected boolean |
at_eof
State of the query stream |
protected char[] |
buf
build the token here. |
protected int |
buffer_position
Character position in the token buffer. |
protected static int |
BUFSIZ
|
protected int |
current_line
Current line number for use in error messages. |
protected int |
current_position
Character position in current line. |
protected static int |
EOF_CHAR
EOF constant. |
int |
error_count
Count of total errors detected so far. |
protected SymbolTable |
keywords
Symbol table holding keywords. |
protected int |
level
Parenthesis level |
protected int |
next_char
First character of lookahead. |
protected int |
next_char2
second character of lookahead. |
protected java.io.Reader |
reader_in
|
protected java.io.InputStream |
stream_in
Stream containing query to be parsed |
int |
warning_count
Count of warnings issued so far |
| Constructor Summary | |
Lexer(java.io.InputStream lexIn)
The constructor takes an inputStream as a parameter . |
|
Lexer(java.io.Reader lexIn)
The constructor takes a Reader as a parameter . |
|
| Method Summary | |
protected void |
advance()
Advance the scanner one character in the input stream. |
Node |
debug_next_token()
Debugging version of next_token(). |
void |
emit_error(java.lang.String message)
Emit an error message. |
void |
emit_warn(java.lang.String message)
Emit a warning message. |
int |
getLevel()
Access to the level . |
protected boolean |
id_char(int ch)
Determine if a character is ok for the middle of an id. |
protected boolean |
id_start_char(int ch)
Determine if a character is ok to start an id. |
void |
init_reader()
Initialize the scanner. |
void |
init_stream()
Initialize the scanner. |
Node |
next_token()
Return one Node. |
protected Node |
real_next_token()
The actual routine to return one Node. |
protected void |
swallow_comment()
Handle swallowing up a comment. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final int EOF_CHAR
protected static final int BUFSIZ
protected java.io.InputStream stream_in
protected java.io.Reader reader_in
protected boolean at_eof
protected SymbolTable keywords
protected int next_char
protected int next_char2
protected char[] buf
protected int level
protected int current_line
protected int current_position
protected int absolute_position
protected int buffer_position
public int error_count
public int warning_count
| Constructor Detail |
public Lexer(java.io.InputStream lexIn)
throws java.io.IOException
public Lexer(java.io.Reader lexIn)
throws java.io.IOException
| Method Detail |
public int getLevel()
public void init_stream()
throws java.io.IOException
java.io.IOException
public void init_reader()
throws java.io.IOException
java.io.IOException
protected void advance()
throws java.io.IOException
java.io.IOExceptionpublic void emit_error(java.lang.String message)
message - the message to print.public void emit_warn(java.lang.String message)
message - the message to print.protected boolean id_start_char(int ch)
ch - the character in question.protected boolean id_char(int ch)
ch - the character in question.
protected void swallow_comment()
throws java.io.IOException
java.io.IOException
public Node next_token()
throws java.io.IOException
java.io.IOException
public Node debug_next_token()
throws java.io.IOException
java.io.IOException
protected Node real_next_token()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||