Class Parser
- java.lang.Object
-
- io.github.fastclasspathscanner.utils.Parser
-
public class Parser extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParser.ParseException
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadvance(int numChars)voidappendToToken(char c)voidappendToToken(String str)StringcurrToken()Get the current token, and reset the token to empty.voidexpect(char expectedChar)chargetc()intgetPosition()StringgetPositionInfo()ObjectgetState()CharSequencegetSubsequence(int startPosition, int endPosition)StringgetSubstring(int startPosition, int endPosition)booleanhasMore()voidnext()charpeek()voidpeekExpect(char expectedChar)booleanpeekMatches(String strMatch)voidsetPosition(int position)ObjectsetState(Object state)voidskipWhitespace()StringtoString()
-
-
-
Constructor Detail
-
Parser
public Parser(String string) throws Parser.ParseException
- Throws:
Parser.ParseException
-
-
Method Detail
-
getPositionInfo
public String getPositionInfo()
-
getState
public Object getState()
-
getc
public char getc() throws Parser.ParseException- Throws:
Parser.ParseException
-
peek
public char peek()
-
peekExpect
public void peekExpect(char expectedChar) throws Parser.ParseException- Throws:
Parser.ParseException
-
peekMatches
public boolean peekMatches(String strMatch)
-
next
public void next()
-
advance
public void advance(int numChars)
-
hasMore
public boolean hasMore()
-
getPosition
public int getPosition()
-
setPosition
public void setPosition(int position)
-
getSubsequence
public CharSequence getSubsequence(int startPosition, int endPosition)
-
getSubstring
public String getSubstring(int startPosition, int endPosition)
-
expect
public void expect(char expectedChar) throws Parser.ParseException- Throws:
Parser.ParseException
-
appendToToken
public void appendToToken(String str)
-
appendToToken
public void appendToToken(char c)
-
skipWhitespace
public void skipWhitespace()
-
currToken
public String currToken()
Get the current token, and reset the token to empty.- Returns:
- The current token. Resets the current token to empty.
-
-