sysModel.parser
Class DefaultTokenVisitor

java.lang.Object
  extended by sysModel.parser.DefaultTokenVisitor
All Implemented Interfaces:
ITokenVisitor

public abstract class DefaultTokenVisitor
extends java.lang.Object
implements ITokenVisitor

Default token visitor, all cases call the defaultCase method.

Author:
Mathias Ricken

Constructor Summary
DefaultTokenVisitor()
           
 
Method Summary
 java.lang.Object closeCase()
          Case to be called if a closed parenthesis is read.
 java.lang.Object commaCase()
          Case to be called if a comma is read.
abstract  java.lang.Object defaultCase()
          Default case to be called of other methods are not overridden.
 java.lang.Object endCase()
          Case to be called if end of file is reached.
 java.lang.Object numCase(double num)
          Case to be called if a number is read.
 java.lang.Object openCase()
          Case to be called if an open parenthesis is read.
 java.lang.Object wordCase(java.lang.String word)
          Case to be called if a word is read.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultTokenVisitor

public DefaultTokenVisitor()
Method Detail

defaultCase

public abstract java.lang.Object defaultCase()
Default case to be called of other methods are not overridden.

Returns:
visitor-specific return value

endCase

public java.lang.Object endCase()
Case to be called if end of file is reached.

Specified by:
endCase in interface ITokenVisitor
Returns:
visitor-specific return value

wordCase

public java.lang.Object wordCase(java.lang.String word)
Case to be called if a word is read.

Specified by:
wordCase in interface ITokenVisitor
Parameters:
word - word
Returns:
visitor-specific return value

numCase

public java.lang.Object numCase(double num)
Case to be called if a number is read.

Specified by:
numCase in interface ITokenVisitor
Parameters:
num - number
Returns:
visitor-specific return value

openCase

public java.lang.Object openCase()
Case to be called if an open parenthesis is read.

Specified by:
openCase in interface ITokenVisitor
Returns:
visitor-specific return value

closeCase

public java.lang.Object closeCase()
Case to be called if a closed parenthesis is read.

Specified by:
closeCase in interface ITokenVisitor
Returns:
visitor-specific return value

commaCase

public java.lang.Object commaCase()
Case to be called if a comma is read.

Specified by:
commaCase in interface ITokenVisitor
Returns:
visitor-specific return value