public class TEXParser extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TEXParser.CharType |
| Constructor and Description |
|---|
TEXParser()
Create a new
TEXParser that uses the platform-specific newline. |
TEXParser(String newline)
Create a new
TEXParser that uses the specified string as a newline. |
| Modifier and Type | Method and Description |
|---|---|
String |
getNewline() |
TEXToken |
getNextToken()
Returns the next available token and removes it from parser
|
boolean |
hasNextToken() |
void |
parse(String content)
Parse the given TEX content into tokens that can be then retrieved with
calls to
getNextToken(). |
TEXToken |
peekNextToken()
Returns the next available token and keeps it in parser
|
void |
setNewline(String newline) |
public TEXParser()
TEXParser that uses the platform-specific newline.public void parse(String content)
getNextToken(). Any existing tokens from
previous calls to parse(String) will be discarded.content - The TEX content to parse into tokenspublic boolean hasNextToken()
public TEXToken getNextToken()
IllegalStateException - If no more tokens are remainingpublic TEXToken peekNextToken()
public String getNewline()
public void setNewline(String newline)
Copyright © 2022. All rights reserved.