com.croftsoft.apps.compiler.mini.parse
Class MiniScanner

java.lang.Object
  extended by com.croftsoft.apps.compiler.mini.parse.MiniScanner
All Implemented Interfaces:
CUPTokenScanner, MiniSymbols

public class MiniScanner
extends Object
implements MiniSymbols, CUPTokenScanner

Token scanner for the Mini programming language. Reference:

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

Version:
1999-04-24
Author:
David W. Croft

Field Summary
 
Fields inherited from interface com.croftsoft.apps.compiler.mini.parse.MiniSymbols
$START, ASSIGN, assignmentStatement, BEGIN, block, CALL, COMMA, comparison, conditionalStatement, CONSTANT, declaration, declarationSequence, definiteLoop, DIVIDE, DO, element, ELSE, END, EOF, EQ, error, EXP, expression, expressionList, FI, GE, GT, IF, indefiniteLoop, inputStatement, INTEGER, LE, LPAREN, LT, MINUS, MOD, NAME, name1, nameList, NE, outputStatement, parameterList, PLUS, PROCEDURE, procedureCall, program, READ, relation, RPAREN, SEMICOLON, statement, statementSequence, strongOperator, term, THEN, TIMES, TO, UMINUS, weakOperator, WHILE, WRITE
 
Constructor Summary
MiniScanner(InputStream instream)
           
MiniScanner(Reader reader)
           
 
Method Summary
static void main(String[] args)
           
 Symbol nextToken()
           
static Symbol scanConstant(String text)
           
static void test(Reader reader)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MiniScanner

public MiniScanner(Reader reader)

MiniScanner

public MiniScanner(InputStream instream)
Method Detail

main

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

test

public static void test(Reader reader)
                 throws Exception
Throws:
Exception

scanConstant

public static Symbol scanConstant(String text)

nextToken

public Symbol nextToken()
                 throws IOException
Specified by:
nextToken in interface CUPTokenScanner
Throws:
IOException

CroftSoft Javadoc

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