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.


Fields inherited from class at.dms.compiler.Scanner
buffer
 
Constructor Summary
KjcScanner(Compiler compiler, InputBuffer buffer)
          Constructs a java scanner.
 
Method Summary
protected  antlr.Token getCharLiteral()
          Parses a character literal.
protected  antlr.Token getFloatingPointLiteral()
           
protected  antlr.Token getIdentifier()
          Returns next token as identifier.
protected  antlr.Token getIntegerLiteral(int prefix, int radix)
           
protected  antlr.Token getNumericLiteral()
           
protected  antlr.Token getOperator()
           
protected  antlr.Token getStringLiteral()
           
protected  antlr.Token getToken()
          Returns the next token in the input.
protected  antlr.Token lookupKeyword(char[] data, int start, int length)
           
protected  boolean readIdentifier()
           
 
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
 

Constructor Detail

KjcScanner

public KjcScanner(Compiler compiler,
                  InputBuffer buffer)
Constructs a java scanner.
Method Detail

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