Class ParserUtils
- java.lang.Object
-
- io.github.willena.influxql.ast.utils.ParserUtils
-
public final class ParserUtils extends Object
Parser utils. Mainly used to detect the kind of string being parsed. When building queries, it is used to find if quoting is required or not.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isDigit(char ch)
Check char is a digitstatic boolean
isIdentChar(char ch)
isIdentChar returns true if the rune can be used in an unquoted identifier.static boolean
isIdentFirstChar(char ch)
Similar to isIdentChar but check the first char. returns true if the rune can be used as the first char in an unquoted identifer.static boolean
isLetter(char ch)
isLetter returns true if the char is a letter.
-
-
-
Method Detail
-
isDigit
public static boolean isDigit(char ch)
Check char is a digit- Parameters:
ch
- char to check- Returns:
- true if digit
-
isLetter
public static boolean isLetter(char ch)
isLetter returns true if the char is a letter.- Parameters:
ch
- char to check- Returns:
- true if letter
-
isIdentChar
public static boolean isIdentChar(char ch)
isIdentChar returns true if the rune can be used in an unquoted identifier.- Parameters:
ch
- char to test- Returns:
- true if is a valid identifier char
-
isIdentFirstChar
public static boolean isIdentFirstChar(char ch)
Similar to isIdentChar but check the first char. returns true if the rune can be used as the first char in an unquoted identifer.- Parameters:
ch
- char to test- Returns:
- true if is a valid identifier first char
-
-