Renamed JsonParserImpl to JsonParserJavacc for clarity.
This commit is contained in:
parent
2034090b15
commit
85f7c939f6
@ -49,7 +49,7 @@ public final class JsonParser {
|
||||
*/
|
||||
public JsonElement parse(Reader json) throws JsonParseException {
|
||||
try {
|
||||
JsonParserImpl parser = new JsonParserImpl(json);
|
||||
JsonParserJavacc parser = new JsonParserJavacc(json);
|
||||
return parser.parse();
|
||||
} catch (TokenMgrError e) {
|
||||
throw new JsonParseException("Failed parsing JSON source: " + json + " to Json", e);
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* Generated By:JavaCC: Do not edit this line. JsonParserImpl.java */
|
||||
/* Generated By:JavaCC: Do not edit this line. JsonParserJavacc.java */
|
||||
package com.google.gson;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
final class JsonParserImpl implements JsonParserImplConstants {
|
||||
final class JsonParserJavacc implements JsonParserJavaccConstants {
|
||||
|
||||
final public JsonElement parse() throws ParseException {
|
||||
JsonElement json = null;
|
||||
@ -417,7 +417,7 @@ final class JsonParserImpl implements JsonParserImplConstants {
|
||||
}
|
||||
|
||||
/** Generated Token Manager. */
|
||||
public JsonParserImplTokenManager token_source;
|
||||
public JsonParserJavaccTokenManager token_source;
|
||||
SimpleCharStream jj_input_stream;
|
||||
/** Current token. */
|
||||
public Token token;
|
||||
@ -445,13 +445,13 @@ final class JsonParserImpl implements JsonParserImplConstants {
|
||||
private int jj_gc = 0;
|
||||
|
||||
/** Constructor with InputStream. */
|
||||
public JsonParserImpl(java.io.InputStream stream) {
|
||||
public JsonParserJavacc(java.io.InputStream stream) {
|
||||
this(stream, null);
|
||||
}
|
||||
/** Constructor with InputStream and supplied encoding */
|
||||
public JsonParserImpl(java.io.InputStream stream, String encoding) {
|
||||
public JsonParserJavacc(java.io.InputStream stream, String encoding) {
|
||||
try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }
|
||||
token_source = new JsonParserImplTokenManager(jj_input_stream);
|
||||
token_source = new JsonParserJavaccTokenManager(jj_input_stream);
|
||||
token = new Token();
|
||||
jj_ntk = -1;
|
||||
jj_gen = 0;
|
||||
@ -475,9 +475,9 @@ final class JsonParserImpl implements JsonParserImplConstants {
|
||||
}
|
||||
|
||||
/** Constructor. */
|
||||
public JsonParserImpl(java.io.Reader stream) {
|
||||
public JsonParserJavacc(java.io.Reader stream) {
|
||||
jj_input_stream = new SimpleCharStream(stream, 1, 1);
|
||||
token_source = new JsonParserImplTokenManager(jj_input_stream);
|
||||
token_source = new JsonParserJavaccTokenManager(jj_input_stream);
|
||||
token = new Token();
|
||||
jj_ntk = -1;
|
||||
jj_gen = 0;
|
||||
@ -497,7 +497,7 @@ final class JsonParserImpl implements JsonParserImplConstants {
|
||||
}
|
||||
|
||||
/** Constructor with generated Token Manager. */
|
||||
public JsonParserImpl(JsonParserImplTokenManager tm) {
|
||||
public JsonParserJavacc(JsonParserJavaccTokenManager tm) {
|
||||
token_source = tm;
|
||||
token = new Token();
|
||||
jj_ntk = -1;
|
||||
@ -507,7 +507,7 @@ final class JsonParserImpl implements JsonParserImplConstants {
|
||||
}
|
||||
|
||||
/** Reinitialise. */
|
||||
public void ReInit(JsonParserImplTokenManager tm) {
|
||||
public void ReInit(JsonParserJavaccTokenManager tm) {
|
||||
token_source = tm;
|
||||
token = new Token();
|
||||
jj_ntk = -1;
|
@ -1,4 +1,4 @@
|
||||
/* Generated By:JavaCC: Do not edit this line. JsonParserImplConstants.java */
|
||||
/* Generated By:JavaCC: Do not edit this line. JsonParserJavaccConstants.java */
|
||||
package com.google.gson;
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ package com.google.gson;
|
||||
* Generated by org.javacc.parser.OtherFilesGen#start()
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
interface JsonParserImplConstants {
|
||||
interface JsonParserJavaccConstants {
|
||||
|
||||
/** End of File. */
|
||||
int EOF = 0;
|
@ -1,9 +1,9 @@
|
||||
/* Generated By:JavaCC: Do not edit this line. JsonParserImplTokenManager.java */
|
||||
/* Generated By:JavaCC: Do not edit this line. JsonParserJavaccTokenManager.java */
|
||||
package com.google.gson;
|
||||
|
||||
/** Token Manager. */
|
||||
@SuppressWarnings("all")
|
||||
final class JsonParserImplTokenManager implements JsonParserImplConstants
|
||||
final class JsonParserJavaccTokenManager implements JsonParserJavaccConstants
|
||||
{
|
||||
|
||||
/** Debug output. */
|
||||
@ -1018,14 +1018,14 @@ private final int[] jjrounds = new int[43];
|
||||
private final int[] jjstateSet = new int[86];
|
||||
protected char curChar;
|
||||
/** Constructor. */
|
||||
public JsonParserImplTokenManager(SimpleCharStream stream){
|
||||
public JsonParserJavaccTokenManager(SimpleCharStream stream){
|
||||
if (SimpleCharStream.staticFlag)
|
||||
throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
|
||||
input_stream = stream;
|
||||
}
|
||||
|
||||
/** Constructor. */
|
||||
public JsonParserImplTokenManager(SimpleCharStream stream, int lexState){
|
||||
public JsonParserJavaccTokenManager(SimpleCharStream stream, int lexState){
|
||||
this(stream);
|
||||
SwitchTo(lexState);
|
||||
}
|
@ -9,16 +9,16 @@ options {
|
||||
UNICODE_INPUT = true;
|
||||
}
|
||||
|
||||
PARSER_BEGIN(JsonParserImpl)
|
||||
PARSER_BEGIN(JsonParserJavacc)
|
||||
|
||||
package com.google.gson;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
final class JsonParserImpl {
|
||||
final class JsonParserJavacc {
|
||||
|
||||
}
|
||||
|
||||
PARSER_END(JsonParserImpl)
|
||||
PARSER_END(JsonParserJavacc)
|
||||
|
||||
SKIP : { " " | "\t" | "\n" | "\r" }
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user