com.croftsoft.apps.compiler
Class CalcScanner

java.lang.Object
  extended by com.croftsoft.apps.compiler.CalcScanner
All Implemented Interfaces:
CalcSymbols

public class CalcScanner
extends Object
implements CalcSymbols

Token scanner for Calc. Reference:

"JLex: A Lexical Analyzer Generator for Java"
http://www.cs.princeton.edu/~appel/modern/java/JLex/

Version:
1999-03-15
Author:
David W. Croft

Field Summary
 
Fields inherited from interface com.croftsoft.apps.compiler.CalcSymbols
$START, ASSIGN, assignment, DIVIDE, EOF, EQ, error, EXP, expression, GE, GT, INTEGER, LE, LPAREN, LT, MINUS, MOD, NEQ, PLUS, program, RPAREN, SEMICOLON, statement, statementList, TIMES, UMINUS, VARIABLE, write, WRITE
 
Constructor Summary
CalcScanner(InputStream instream)
           
CalcScanner(Reader reader)
           
 
Method Summary
static void main(String[] args)
           
 Symbol nextToken()
           
static Symbol scanInteger(String text)
           
static void test(String testText)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalcScanner

public CalcScanner(Reader reader)

CalcScanner

public CalcScanner(InputStream instream)
Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

test

public static void test(String testText)
                 throws Exception
Throws:
Exception

scanInteger

public static Symbol scanInteger(String text)

nextToken

public Symbol nextToken()
                 throws IOException
Throws:
IOException

CroftSoft Javadoc

CroftSoft Apps Javadoc (2008-09-28 21:15:07)