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 |
---|---|
static RuntimeException |
createSyntaxError(Exception ex,
JSContext context) |
protected void |
decDepth() |
protected Object |
error(String message) |
protected char |
get() |
protected char |
get(int posParam) |
protected int |
hexDigitValue(char c) |
protected static boolean |
isArray(char c) |
protected boolean |
isBooleanLiteral() |
protected boolean |
isExponentPart() |
protected boolean |
isLiteral(char[] literal) |
protected boolean |
isNullLiteral() |
protected static boolean |
isNumber(char cur) |
protected static boolean |
isObject(char c) |
protected static boolean |
isString(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 |
read() |
protected void |
read(char expected) |
protected void |
read(String expected) |
protected int |
readDigits() |
protected void |
skipWhitespace() |
protected static void |
throwStackError() |
protected static void |
throwSyntaxError(String msg) |
protected String |
unquoteJSON(String string) |
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 isString(char c)
protected static boolean isObject(char c)
protected static boolean isArray(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 String parseJSONStringCharacters()
protected int hexDigitValue(char c)
protected void unquoteJSONUnicode(String string, int posBackslash, StringBuilder builder)
protected Number parseJSONNumber()
protected int readDigits()
protected boolean isExponentPart()
protected boolean isNullLiteral()
protected Object parseNullLiteral()
protected boolean isBooleanLiteral()
protected Object parseBooleanLiteral()
protected static boolean isWhitespace(char c)
public static RuntimeException createSyntaxError(Exception ex, JSContext context)
protected char get()
protected char get(int posParam)
protected void read()
protected void read(String expected)
protected void read(char expected)
protected void skipWhitespace()
protected boolean posValid()
protected boolean isLiteral(char[] literal)