|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.hpi.fgis.dude.util.bibtex.parser.PseudoLexer
final class PseudoLexer
This is not a real lexer, since BibTex
is such an insane format...
Nested Class Summary | |
---|---|
(package private) static class |
PseudoLexer.Token
The token class that is used within this lexer. |
Constructor Summary | |
---|---|
PseudoLexer(Reader input)
Initializes the PseudoLexer . |
Method Summary | |
---|---|
char |
currentInputChar()
make sure to query enforceNoEof first! |
void |
enforceNoEof(String expected,
boolean skipWhiteSpace)
make sure you call |
void |
scan(char expected)
|
int |
scanAlternatives(char[] alternatives,
boolean lookAhead)
The return value is an index into alternatives. |
void |
scanBracketedString(StringBuilder targetBuffer,
boolean includeOuterBraces)
|
String |
scanEntryTypeName()
|
String |
scanLiteral(char[] terminationSet,
boolean excludeWhitespace,
boolean enforceNonzero)
|
int |
scanLiteral(char[] terminationSet,
boolean excludeWhitespace,
boolean enforceNonzero,
StringBuilder resultTargetBuffer)
The return value is an index into the termination set the result is appended in the resultTargetBuffer |
String |
scanQuotedString()
|
PseudoLexer.Token |
scanTopLevelCommentOrAtOrEOF()
If it's a top-level comment, result.choice will be 0, for @ 1, for EOF 2. |
void |
skipWhitespace()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
PseudoLexer(Reader input) throws IOException
PseudoLexer
.
input
- The reader that is used internally.
IOException
- If an error occurs while reading the data.Method Detail |
---|
public PseudoLexer.Token scanTopLevelCommentOrAtOrEOF() throws IOException
IOException
- If an error occurs while reading the data.public final int scanAlternatives(char[] alternatives, boolean lookAhead) throws IOException, ParseException
alternatives
- ?
lookAhead
- ?
?
IOException
- If an error occurs during the reading process.
ParseException
- If a parsing error occurs.public String scanLiteral(char[] terminationSet, boolean excludeWhitespace, boolean enforceNonzero) throws ParseException, IOException
terminationSet
- excludeWhitespace
- enforceNonzero
-
ParseException
IOException
public int scanLiteral(char[] terminationSet, boolean excludeWhitespace, boolean enforceNonzero, StringBuilder resultTargetBuffer) throws ParseException, IOException
terminationSet
- excludeWhitespace
- enforceNonzero
- resultTargetBuffer
-
ParseException
IOException
public String scanQuotedString() throws IOException, ParseException
IOException
ParseException
public void scanBracketedString(StringBuilder targetBuffer, boolean includeOuterBraces) throws ParseException, IOException
targetBuffer
- includeOuterBraces
-
ParseException
IOException
public String scanEntryTypeName() throws ParseException, IOException
ParseException
IOException
public void scan(char expected) throws ParseException, IOException
expected
-
ParseException
IOException
public void skipWhitespace() throws IOException
IOException
public void enforceNoEof(String expected, boolean skipWhiteSpace) throws ParseException, IOException
expected
- skipWhiteSpace
-
ParseException
IOException
public char currentInputChar()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |