Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Type | Name and description |
---|---|
boolean |
consumeIfMatch(char[] match) Useful for finding constants in a string like true, false, etc. |
int |
currentChar() returns the current character without changing the IO pointer or index. |
String |
errorDetails(String message) |
char[] |
findNextChar(int ch, int esc) Used to find strings and their ilk Finds the next non-escaped char |
boolean |
hadEscape() |
boolean |
hasChar() Checks to see if there is a next character. |
int |
location() This is mostly for debugging and testing. |
int |
nextChar() returns the next character moving the file pointer or index to the next location. |
char[] |
readNumber() Reads a number from the character source. |
int |
safeNextChar() Combines the operations of nextChar and hasChar. |
void |
skipWhiteSpace() Skip white space. |
Useful for finding constants in a string like true, false, etc.
returns the current character without changing the IO pointer or index.
Used to find strings and their ilk Finds the next non-escaped char
ch
- character to findesc
- escape character to avoid next char if escapedChecks to see if there is a next character.
This is mostly for debugging and testing.
returns the next character moving the file pointer or index to the next location.
Reads a number from the character source.
Combines the operations of nextChar and hasChar. Characters is -1 if not found which signifies end of file. This might be preferable to avoid two method calls.
Skip white space.