at.dms.kjc
Class KjcScanner
java.lang.Object
|
+--at.dms.compiler.Scanner
|
+--at.dms.kjc.KjcScanner
- All Implemented Interfaces:
- antlr.TokenStream
- public class KjcScanner
- extends Scanner
This is an handwritten scanner available for speed reasons.
Methods inherited from class at.dms.compiler.Scanner |
getBuffer, getFile, getJavadocComment, getLine, getPosition, getStatementComment, getTokenReference, isJavaIdentifierStart, nextToken, readJavaComment, reportTrouble, reportTrouble, scanEscapeSequence, setLine, setPosition |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KjcScanner
public KjcScanner(Compiler compiler,
InputBuffer buffer)
- Constructs a java scanner.
getToken
protected antlr.Token getToken()
throws PositionedError
- Description copied from class:
Scanner
- Returns the next token in the input.
- Overrides:
getToken
in class Scanner
getIdentifier
protected antlr.Token getIdentifier()
throws PositionedError
- Returns next token as identifier.
lookupKeyword
protected antlr.Token lookupKeyword(char[] data,
int start,
int length)
readIdentifier
protected boolean readIdentifier()
throws PositionedError
getNumericLiteral
protected antlr.Token getNumericLiteral()
getIntegerLiteral
protected antlr.Token getIntegerLiteral(int prefix,
int radix)
getFloatingPointLiteral
protected antlr.Token getFloatingPointLiteral()
getOperator
protected antlr.Token getOperator()
getCharLiteral
protected antlr.Token getCharLiteral()
throws PositionedError
- Parses a character literal.
getStringLiteral
protected antlr.Token getStringLiteral()
throws PositionedError