java.lang.Object
de.grogra.grammar.Input
- All Implemented Interfaces:
CharSequence
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) voidclose()intgetChar()intgetColumnAt(int position, int tabWidth) intgetLineAt(int position) intintgetLineLength(int line, int tabWidth) intintgetPositionOfLine(int line) getTextForLine(int line) booleanisClosed()intlength()voidreset(int position) voidsubSequence(int start, int end) substring(int start) substring(int start, int end) toString()voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
IOExceptionLexicalException
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-
substring
-
substring
-
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin 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
-