Package net.sf.okapi.filters.tex.parser
Class TEXParser
- java.lang.Object
-
- net.sf.okapi.filters.tex.parser.TEXParser
-
public class TEXParser extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTEXParser.CharType
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetNewline()TEXTokengetNextToken()Returns the next available token and removes it from parserbooleanhasNextToken()voidparse(String content)Parse the given TEX content into tokens that can be then retrieved with calls togetNextToken().TEXTokenpeekNextToken()Returns the next available token and keeps it in parservoidsetNewline(String newline)
-
-
-
Method Detail
-
parse
public void parse(String content)
Parse the given TEX content into tokens that can be then retrieved with calls togetNextToken(). Any existing tokens from previous calls toparse(String)will be discarded.- Parameters:
content- The TEX content to parse into tokens
-
hasNextToken
public boolean hasNextToken()
-
getNextToken
public TEXToken getNextToken()
Returns the next available token and removes it from parser- Returns:
- The next token
- Throws:
IllegalStateException- If no more tokens are remaining
-
peekNextToken
public TEXToken peekNextToken()
Returns the next available token and keeps it in parser- Returns:
- The next token null If no more tokens are remaining
-
getNewline
public String getNewline()
-
setNewline
public void setNewline(String newline)
-
-