jess
Interface Tokenizer

All Known Implementing Classes:
ReaderTokenizer

public interface Tokenizer

The Jess parser reads its input from a Tokenizer. In general, the supplied ReaderTokenizer interface is sufficient for most needs.

(C) 2005 Sandia National Laboratories


Field Summary
static java.lang.String BLANK_MULTI
           
static java.lang.String BLANK_PREFIX
           
 
Method Summary
 java.lang.String discardToEOL()
          Discard characters from the current stream position to the end of the current line.
 void eatWhitespace()
          Consume all characters up to, but not including, the next non-whitespace character
 int getStreamPos()
          Return the current character offset.
 JessToken nextToken()
          Return the next parsed token, skipping over all whitespace.
 java.lang.String readLine()
          Return characters from the current location to the end of the current line, as a String
 void reportNewlines(boolean b)
          Specify whether newlines should be reported as tokens
 

Field Detail

BLANK_PREFIX

public static final java.lang.String BLANK_PREFIX
See Also:
Constant Field Values

BLANK_MULTI

public static final java.lang.String BLANK_MULTI
See Also:
Constant Field Values
Method Detail

reportNewlines

public void reportNewlines(boolean b)
Specify whether newlines should be reported as tokens

Parameters:
b - true if newlines should be reported

readLine

public java.lang.String readLine()
                          throws JessException
Return characters from the current location to the end of the current line, as a String

Returns:
the rest of the current line
Throws:
JessException - if anything goes wrong

nextToken

public JessToken nextToken()
                    throws JessException
Return the next parsed token, skipping over all whitespace.

Returns:
the token
Throws:
JessException - if anything goes wrong

discardToEOL

public java.lang.String discardToEOL()
                              throws JessException
Discard characters from the current stream position to the end of the current line.

Returns:
the parsed characters
Throws:
JessException - if anything goes wrong

getStreamPos

public int getStreamPos()
Return the current character offset. The meaning depends on the underlying data source.

Returns:
the character position

eatWhitespace

public void eatWhitespace()
                   throws JessException
Consume all characters up to, but not including, the next non-whitespace character

Throws:
JessException

© 2006 Sandia Corporation