public class WhileyFileLexer extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WhileyFileLexer.Token
The base class for all tokens.
|
| Modifier and Type | Field and Description |
|---|---|
static HashMap<String,WhileyFileLexer.Token.Kind> |
keywords
A map from identifier strings to the corresponding token kind.
|
static char |
UC_ELEMENTOF |
static char |
UC_EMPTYSET |
static char |
UC_EXISTS |
static char |
UC_FORALL |
static char |
UC_GREATEREQUALS |
static char |
UC_LESSEQUALS |
static char |
UC_LOGICALAND |
static char |
UC_LOGICALOR |
static char |
UC_SETINTERSECTION |
static char |
UC_SETUNION |
static char |
UC_SUBSET |
static char |
UC_SUBSETEQ |
static char |
UC_SUPSET |
static char |
UC_SUPSETEQ |
| Constructor and Description |
|---|
WhileyFileLexer(wyfs.lang.Path.Entry<WhileyFile> entry) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isOperatorStart(char c) |
List<WhileyFileLexer.Token> |
scan()
Scan all characters from the input stream and generate a corresponding
list of tokens, whilst discarding all whitespace and comments.
|
WhileyFileLexer.Token |
scanBlockComment() |
WhileyFileLexer.Token |
scanCharacterConstant()
Scan a character constant, such as e.g.
|
WhileyFileLexer.Token |
scanIdentifier() |
WhileyFileLexer.Token |
scanIndent()
Scan one or more spaces or tab characters, combining them to form an
"indent".
|
WhileyFileLexer.Token |
scanLineComment() |
WhileyFileLexer.Token |
scanNumericConstant()
Scan a numeric constant.
|
WhileyFileLexer.Token |
scanOperator() |
WhileyFileLexer.Token |
scanStringConstant() |
void |
scanWhiteSpace(List<WhileyFileLexer.Token> tokens) |
void |
skipWhitespace(List<WhileyFileLexer.Token> tokens)
Skip over any whitespace at the current index position in the input
string.
|
public static final char UC_FORALL
public static final char UC_EXISTS
public static final char UC_EMPTYSET
public static final char UC_SUBSET
public static final char UC_SUBSETEQ
public static final char UC_SUPSET
public static final char UC_SUPSETEQ
public static final char UC_SETUNION
public static final char UC_SETINTERSECTION
public static final char UC_LESSEQUALS
public static final char UC_GREATEREQUALS
public static final char UC_ELEMENTOF
public static final char UC_LOGICALAND
public static final char UC_LOGICALOR
public static final HashMap<String,WhileyFileLexer.Token.Kind> keywords
public WhileyFileLexer(wyfs.lang.Path.Entry<WhileyFile> entry) throws IOException
IOExceptionpublic List<WhileyFileLexer.Token> scan()
public WhileyFileLexer.Token scanNumericConstant()
public WhileyFileLexer.Token scanCharacterConstant()
public WhileyFileLexer.Token scanStringConstant()
public boolean isOperatorStart(char c)
public WhileyFileLexer.Token scanOperator()
public WhileyFileLexer.Token scanIdentifier()
public void scanWhiteSpace(List<WhileyFileLexer.Token> tokens)
public WhileyFileLexer.Token scanIndent()
public WhileyFileLexer.Token scanLineComment()
public WhileyFileLexer.Token scanBlockComment()
public void skipWhitespace(List<WhileyFileLexer.Token> tokens)
tokens - Copyright © 2017. All rights reserved.