public class TruffleJSONParser extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
TruffleJSONParser.Member |
| Modifier and Type | Field and Description |
|---|---|
protected static char[] |
BooleanFalseLiteral |
protected static char[] |
BooleanTrueLiteral |
protected JSContext |
context |
protected int |
len |
protected static int |
MAX_PARSE_DEPTH |
protected static char[] |
NullLiteral |
protected int |
parseDepth |
protected String |
parseStr |
protected int |
pos |
| Constructor and Description |
|---|
TruffleJSONParser(JSContext context) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decDepth() |
protected Object |
error(String message) |
protected void |
expectChar(char expected) |
protected char |
get() |
protected char |
get(int posParam) |
protected int |
hexDigitValue(char c) |
protected static boolean |
isArrayStart(char c) |
protected boolean |
isBooleanLiteral(char c) |
protected static boolean |
isDigit(char c) |
protected boolean |
isExponentPart() |
protected boolean |
isLiteral(char[] literal) |
protected boolean |
isLiteral(char[] literal,
int startPos) |
protected boolean |
isNullLiteral(char c) |
protected static boolean |
isNumber(char cur) |
protected static boolean |
isObjectStart(char c) |
protected static boolean |
isStringQuote(char c) |
protected static boolean |
isWhitespace(char c) |
Object |
parse(String value) |
protected static Number |
parseAsDouble(int sign,
String valueStr) |
protected Object |
parseBooleanLiteral() |
protected ScriptArray |
parseJSONElementList(com.oracle.truffle.api.object.DynamicObject arrayObject) |
protected Number |
parseJSONNumber() |
protected String |
parseJSONString() |
protected String |
parseJSONStringCharacters() |
protected Object |
parseJSONValue() |
protected Object |
parseNullLiteral() |
protected boolean |
posValid() |
protected void |
skipChar() |
protected void |
skipChar(char expected) |
protected void |
skipExponent() |
protected void |
skipString(String expected) |
protected void |
skipWhitespace() |
protected static void |
throwStackError() |
protected static void |
throwSyntaxError(String msg) |
protected String |
unquoteJSON(String string,
int posFirstBackslash) |
protected void |
unquoteJSONUnicode(String string,
int posBackslash,
StringBuilder builder) |
protected final JSContext context
protected int pos
protected int len
protected String parseStr
protected int parseDepth
protected static final char[] NullLiteral
protected static final char[] BooleanTrueLiteral
protected static final char[] BooleanFalseLiteral
protected static final int MAX_PARSE_DEPTH
public TruffleJSONParser(JSContext context)
protected Object parseJSONValue()
protected static boolean isNumber(char cur)
protected static boolean isObjectStart(char c)
protected static boolean isArrayStart(char c)
protected static void throwStackError()
protected static void throwSyntaxError(String msg)
protected void decDepth()
protected ScriptArray parseJSONElementList(com.oracle.truffle.api.object.DynamicObject arrayObject)
protected String parseJSONString()
protected static boolean isStringQuote(char c)
protected static boolean isDigit(char c)
protected String parseJSONStringCharacters()
protected int hexDigitValue(char c)
protected void unquoteJSONUnicode(String string, int posBackslash, StringBuilder builder)
protected Number parseJSONNumber()
protected void skipExponent()
protected boolean isExponentPart()
protected boolean isNullLiteral(char c)
protected Object parseNullLiteral()
protected boolean isBooleanLiteral(char c)
protected Object parseBooleanLiteral()
protected static boolean isWhitespace(char c)
protected char get()
protected char get(int posParam)
protected void skipString(String expected)
protected void expectChar(char expected)
protected void skipChar()
protected void skipChar(char expected)
protected void skipWhitespace()
protected boolean posValid()
protected boolean isLiteral(char[] literal)
protected boolean isLiteral(char[] literal,
int startPos)