congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HjsonParser.isEndOfText
Code IndexAdd Tabnine to your IDE (free)

How to use
isEndOfText
method
in
org.hjson.HjsonParser

Best Java code snippets using org.hjson.HjsonParser.isEndOfText (Showing top 12 results out of 315)

origin: org.hjson/hjson

private ParseException error(String message) {
 int column=index-lineOffset;
 int offset=isEndOfText()?index:index-1;
 return new ParseException(message, offset, line, column-1);
}
origin: hjson/hjson-java

private ParseException error(String message) {
 int column=index-lineOffset;
 int offset=isEndOfText()?index:index-1;
 return new ParseException(message, offset, line, column-1);
}
origin: org.hjson/hjson

JsonValue checkTrailing(JsonValue v) throws ParseException, IOException {
 skipWhiteSpace();
 if (!isEndOfText()) throw error("Extra characters in input: "+current);
 return v;
}
origin: org.hjson/hjson

private ParseException expected(String expected) {
 if (isEndOfText()) {
  return error("Unexpected end of input");
 }
 return error("Expected "+expected);
}
origin: hjson/hjson-java

JsonValue checkTrailing(JsonValue v) throws ParseException, IOException {
 skipWhiteSpace();
 if (!isEndOfText()) throw error("Extra characters in input: "+current);
 return v;
}
origin: hjson/hjson-java

private ParseException expected(String expected) {
 if (isEndOfText()) {
  return error("Unexpected end of input");
 }
 return error("Expected "+expected);
}
origin: org.hjson/hjson

private JsonObject readObject(boolean objectWithoutBraces) throws IOException {
 if (!objectWithoutBraces) read();
 JsonObject object=new JsonObject();
 skipWhiteSpace();
 while (true) {
  if (objectWithoutBraces) {
   if (isEndOfText()) break;
  } else {
   if (isEndOfText()) throw error("End of input while parsing an object (did you forget a closing '}'?)");
   if (readIf('}')) break;
  }
  String name=readName();
  skipWhiteSpace();
  if (!readIf(':')) {
   throw expected("':'");
  }
  skipWhiteSpace();
  object.add(name, readValue());
  skipWhiteSpace();
  if (readIf(',')) skipWhiteSpace(); // , is optional
 }
 return object;
}
origin: hjson/hjson-java

private JsonObject readObject(boolean objectWithoutBraces) throws IOException {
 if (!objectWithoutBraces) read();
 JsonObject object=new JsonObject();
 skipWhiteSpace();
 while (true) {
  if (objectWithoutBraces) {
   if (isEndOfText()) break;
  } else {
   if (isEndOfText()) throw error("End of input while parsing an object (did you forget a closing '}'?)");
   if (readIf('}')) break;
  }
  String name=readName();
  skipWhiteSpace();
  if (!readIf(':')) {
   throw expected("':'");
  }
  skipWhiteSpace();
  object.add(name, readValue());
  skipWhiteSpace();
  if (readIf(',')) skipWhiteSpace(); // , is optional
 }
 return object;
}
origin: org.hjson/hjson

private void skipWhiteSpace() throws IOException {
 while (!isEndOfText()) {
  while (isWhiteSpace()) read();
  if (current=='#' || current=='/' && peek()=='/') {
   do {
    read();
   } while (current>=0 && current!='\n');
  }
  else if (current=='/' && peek()=='*') {
   read();
   do {
    read();
   } while (current>=0 && !(current=='*' && peek()=='/'));
   read(); read();
  }
  else break;
 }
}
origin: hjson/hjson-java

private void skipWhiteSpace() throws IOException {
 while (!isEndOfText()) {
  while (isWhiteSpace()) read();
  if (current=='#' || current=='/' && peek()=='/') {
   do {
    read();
   } while (current>=0 && current!='\n');
  }
  else if (current=='/' && peek()=='*') {
   read();
   do {
    read();
   } while (current>=0 && !(current=='*' && peek()=='/'));
   read(); read();
  }
  else break;
 }
}
origin: org.hjson/hjson

private JsonArray readArray() throws IOException {
 read();
 JsonArray array=new JsonArray();
 skipWhiteSpace();
 if (readIf(']')) {
  return array;
 }
 while (true) {
  skipWhiteSpace();
  array.add(readValue());
  skipWhiteSpace();
  if (readIf(',')) skipWhiteSpace(); // , is optional
  if (readIf(']')) break;
  else if (isEndOfText()) throw error("End of input while parsing an array (did you forget a closing ']'?)");
 }
 return array;
}
origin: hjson/hjson-java

private JsonArray readArray() throws IOException {
 read();
 JsonArray array=new JsonArray();
 skipWhiteSpace();
 if (readIf(']')) {
  return array;
 }
 while (true) {
  skipWhiteSpace();
  array.add(readValue());
  skipWhiteSpace();
  if (readIf(',')) skipWhiteSpace(); // , is optional
  if (readIf(']')) break;
  else if (isEndOfText()) throw error("End of input while parsing an array (did you forget a closing ']'?)");
 }
 return array;
}
org.hjsonHjsonParserisEndOfText

Popular methods of HjsonParser

  • <init>
  • checkTrailing
  • endCapture
  • error
  • expected
  • isDigit
  • isHexDigit
  • isWhiteSpace
  • parse
  • pauseCapture
  • peek
  • read
  • peek,
  • read,
  • readArray,
  • readEscape,
  • readIf,
  • readMlString,
  • readName,
  • readObject,
  • readString

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • putExtra (Intent)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now