de.grogra.grammar
Class Input
java.lang.Object
de.grogra.grammar.Input
- All Implemented Interfaces:
- java.lang.CharSequence
public final class Input
- extends java.lang.Object
- implements java.lang.CharSequence
Field Summary |
static int |
EOF
|
static char |
EOL
|
Constructor Summary |
Input(boolean ignoreUnicodeEscapes)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EOF
public static final int EOF
- See Also:
- Constant Field Values
EOL
public static final char EOL
- See Also:
- Constant Field Values
Input
public Input(boolean ignoreUnicodeEscapes)
charAt
public char charAt(int index)
- Specified by:
charAt
in interface java.lang.CharSequence
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
getChar
public int getChar()
throws java.io.IOException,
LexicalException
- Throws:
java.io.IOException
LexicalException
getColumnAt
public int getColumnAt(int position,
int tabWidth)
getLineAt
public int getLineAt(int position)
getLineCount
public int getLineCount()
getLineLength
public int getLineLength(int line,
int tabWidth)
getPosition
public int getPosition()
getPositionOfLine
public int getPositionOfLine(int line)
getSourceName
public java.lang.String getSourceName()
getTextForLine
public java.lang.String getTextForLine(int line)
getTmpBuffer
public java.lang.StringBuffer getTmpBuffer()
isClosed
public boolean isClosed()
length
public int length()
- Specified by:
length
in interface java.lang.CharSequence
reset
public void reset(int position)
setSource
public void setSource(java.io.Reader source,
java.lang.String name)
subSequence
public java.lang.CharSequence subSequence(int start,
int end)
- Specified by:
subSequence
in interface java.lang.CharSequence
substring
public java.lang.String substring(int start)
substring
public java.lang.String substring(int start,
int end)
toString
public java.lang.String toString()
- Specified by:
toString
in interface java.lang.CharSequence
- Overrides:
toString
in class java.lang.Object
ungetChar
public void ungetChar()