com.croftsoft.apps.compiler
Class CalcScanner
java.lang.Object
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
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CalcScanner
public CalcScanner(Reader reader)
CalcScanner
public CalcScanner(InputStream instream)
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 Apps Javadoc (2008-09-28 21:15:07)