to.etc.lexer
Class ReaderScannerBase
java.lang.Object
to.etc.lexer.TextReaderBase
to.etc.lexer.ReaderScannerBase
- Direct Known Subclasses:
- ReaderTokenizerBase, TextTokenizerBase
public class ReaderScannerBase
- extends TextReaderBase
Methods inherited from class to.etc.lexer.TextReaderBase |
accept, accept, append, append, clearCopy, copy, copy, getCopied, getCurrentColumn, getCurrentLine, getSource, LA, LA, sb |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
T_EOF
public static final int T_EOF
- See Also:
- Constant Field Values
T_STRING
public static final int T_STRING
- See Also:
- Constant Field Values
T_NUMBER
public static final int T_NUMBER
- See Also:
- Constant Field Values
T_IPADDR
public static final int T_IPADDR
- See Also:
- Constant Field Values
T_IDENT
public static final int T_IDENT
- See Also:
- Constant Field Values
T_COMMENT
public static final int T_COMMENT
- See Also:
- Constant Field Values
T_BASE_LAST
public static final int T_BASE_LAST
- See Also:
- Constant Field Values
ReaderScannerBase
public ReaderScannerBase(java.lang.Object source,
java.io.Reader r)
isAllowNewlineInString
public boolean isAllowNewlineInString()
setAllowNewlineInString
public void setAllowNewlineInString(boolean allowNewlineInString)
getTokenLine
public int getTokenLine()
getTokenColumn
public int getTokenColumn()
getSourceLocation
public SourceLocation getSourceLocation()
error
public void error(java.lang.String msg)
throws SourceErrorException
- Throws:
SourceErrorException
skipWs
protected void skipWs()
throws java.io.IOException
- Skips whitespace until current character is either EOF or non-ws.
- Throws:
java.io.IOException
skipWsNoNL
protected void skipWsNoNL()
throws java.io.IOException
- Skips whitespace until current character is either EOF or non-ws.
- Throws:
java.io.IOException
scanSimpleString
protected void scanSimpleString(boolean keepquotes)
throws java.io.IOException,
SourceErrorException
- Scans a very simple string: something starting with something, terminating
with the same something and not allowing anything ugly in between.
- Throws:
java.io.IOException
SourceErrorException
scanNumber
protected int scanNumber()
throws java.io.IOException
- Throws:
java.io.IOException
scanIdentifier
protected int scanIdentifier()
throws java.io.IOException
- Throws:
java.io.IOException
isIdStart
protected boolean isIdStart(char c)
isIdChar
protected boolean isIdChar(char c)
startToken
public void startToken()
- Called when a new token retrieve is started. This saves the current
position within the file as the start location for the token and
resets the token collection buffer.