public class ReaderScannerBase extends TextReaderBase
| Modifier and Type | Field and Description |
|---|---|
static int |
T_BASE_LAST |
static int |
T_COMMENT |
static int |
T_EOF |
static int |
T_IDENT |
static int |
T_IPADDR |
static int |
T_NUMBER |
static int |
T_STRING |
| Constructor and Description |
|---|
ReaderScannerBase(Object source,
Reader r) |
| Modifier and Type | Method and Description |
|---|---|
RuntimeException |
error(String msg) |
SourceLocation |
getSourceLocation() |
int |
getTokenColumn() |
int |
getTokenLine() |
boolean |
isAllowNewlineInString() |
boolean |
isIdChar(char c) |
boolean |
isIdStart(char c) |
int |
scanIdentifier() |
int |
scanNumber() |
void |
scanSimpleString(boolean keepquotes)
Scans a very simple string: something starting with something, terminating
with the same something and not allowing anything ugly in between.
|
int |
scanUndottedNumber() |
void |
setAllowNewlineInString(boolean allowNewlineInString) |
void |
skipWs()
Skips whitespace until current character is either EOF or non-ws.
|
void |
skipWsNoNL()
Skips whitespace until current character is either EOF or non-ws.
|
void |
startToken()
Called when a new token retrieve is started.
|
String |
tokenString(int type) |
accept, accept, append, append, clearCopy, copy, copy, getCopied, getCurrentColumn, getCurrentLine, getSource, LA, LA, sbpublic static final int T_EOF
public static final int T_STRING
public static final int T_NUMBER
public static final int T_IPADDR
public static final int T_IDENT
public static final int T_COMMENT
public static final int T_BASE_LAST
public boolean isAllowNewlineInString()
public void setAllowNewlineInString(boolean allowNewlineInString)
public String tokenString(int type)
public int getTokenLine()
public int getTokenColumn()
public SourceLocation getSourceLocation()
public RuntimeException error(String msg) throws SourceErrorException
SourceErrorExceptionpublic void skipWs()
throws IOException
IOExceptionpublic void skipWsNoNL()
throws IOException
IOExceptionpublic void scanSimpleString(boolean keepquotes)
throws IOException,
SourceErrorException
IOExceptionSourceErrorExceptionpublic int scanUndottedNumber()
throws IOException
IOExceptionpublic int scanNumber()
throws IOException
IOExceptionpublic int scanIdentifier()
throws IOException
IOExceptionpublic boolean isIdStart(char c)
public boolean isIdChar(char c)
public void startToken()
Copyright © 2017 etc.to. All rights reserved.