java.lang.Object
de.grogra.grammar.Input
- All Implemented Interfaces:
CharSequence
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchar
charAt
(int index) void
close()
int
getChar()
int
getColumnAt
(int position, int tabWidth) int
getLineAt
(int position) int
int
getLineLength
(int line, int tabWidth) int
int
getPositionOfLine
(int line) getTextForLine
(int line) boolean
isClosed()
int
length()
void
reset
(int position) void
subSequence
(int start, int end) substring
(int start) substring
(int start, int end) toString()
void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
EOF
public static final int EOF- See Also:
-
EOL
public static final char EOL- See Also:
-
-
Constructor Details
-
Input
public Input(boolean ignoreUnicodeEscapes)
-
-
Method Details
-
getSourceName
-
setSource
-
isClosed
public boolean isClosed() -
close
- Throws:
IOException
-
getPosition
public int getPosition() -
reset
public void reset(int position) -
ungetChar
public void ungetChar() -
getChar
- Throws:
IOException
LexicalException
-
subSequence
- Specified by:
subSequence
in interfaceCharSequence
-
substring
-
substring
-
toString
- Specified by:
toString
in interfaceCharSequence
- Overrides:
toString
in classObject
-
length
public int length()- Specified by:
length
in interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAt
in interfaceCharSequence
-
getLineCount
public int getLineCount() -
getLineAt
public int getLineAt(int position) -
getColumnAt
public int getColumnAt(int position, int tabWidth) -
getLineLength
public int getLineLength(int line, int tabWidth) -
getTextForLine
-
getPositionOfLine
public int getPositionOfLine(int line) -
getTmpBuffer
-