de.dante.extex.scanner.type.token
Interface TokenVisitor

All Known Implementing Classes:
Max

public interface TokenVisitor

This interface describes the capabilities for a visitor class on the token types. This interface is used to implement the visitor pattern.

Version:
$Revision: 1.2 $
Author:
Gerd Neugebauer

Method Summary
 java.lang.Object visitActive(ActiveCharacterToken token, java.lang.Object arg)
          This visit method is invoked on an active token.
 java.lang.Object visitCr(CrToken token, java.lang.Object arg)
          This visit method is invoked on a cr token.
 java.lang.Object visitEscape(ControlSequenceToken token, java.lang.Object arg)
          This visit method is invoked on an escape token.
 java.lang.Object visitLeftBrace(LeftBraceToken token, java.lang.Object arg)
          This visit method is invoked on a left brace token.
 java.lang.Object visitLetter(LetterToken token, java.lang.Object arg)
          This visit method is invoked on a letter token.
 java.lang.Object visitMacroParam(MacroParamToken token, java.lang.Object arg)
          This visit method is invoked on a macro parameter token.
 java.lang.Object visitMathShift(MathShiftToken token, java.lang.Object arg)
          This visit method is invoked on a math shift token.
 java.lang.Object visitOther(OtherToken token, java.lang.Object arg)
          This visit method is invoked on an other token.
 java.lang.Object visitRightBrace(RightBraceToken token, java.lang.Object arg)
          This visit method is invoked on a right brace token.
 java.lang.Object visitSpace(SpaceToken token, java.lang.Object arg)
          This visit method is invoked on a space token.
 java.lang.Object visitSubMark(SubMarkToken token, java.lang.Object arg)
          This visit method is invoked on a sub mark token.
 java.lang.Object visitSupMark(SupMarkToken token, java.lang.Object arg)
          This visit method is invoked on a sup mark token.
 java.lang.Object visitTabMark(TabMarkToken token, java.lang.Object arg)
          This visit method is invoked on a tab mark token.
 

Method Detail

visitActive

public java.lang.Object visitActive(ActiveCharacterToken token,
                                    java.lang.Object arg)
                             throws java.lang.Exception
This visit method is invoked on an active token. In TeX this is e.g. ~.

Parameters:
token - the active token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitCr

public java.lang.Object visitCr(CrToken token,
                                java.lang.Object arg)
                         throws java.lang.Exception
This visit method is invoked on a cr token.

Parameters:
token - the cr token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitEscape

public java.lang.Object visitEscape(ControlSequenceToken token,
                                    java.lang.Object arg)
                             throws java.lang.Exception
This visit method is invoked on an escape token. In TeX this normally means a control sequence.

Parameters:
token - the control sequence token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitLeftBrace

public java.lang.Object visitLeftBrace(LeftBraceToken token,
                                       java.lang.Object arg)
                                throws java.lang.Exception
This visit method is invoked on a left brace token.

Parameters:
token - the left brace token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitLetter

public java.lang.Object visitLetter(LetterToken token,
                                    java.lang.Object arg)
                             throws java.lang.Exception
This visit method is invoked on a letter token.

Parameters:
token - the letter token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitMacroParam

public java.lang.Object visitMacroParam(MacroParamToken token,
                                        java.lang.Object arg)
                                 throws java.lang.Exception
This visit method is invoked on a macro parameter token. In TeX this normally is a #.

Parameters:
token - the macro param token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitMathShift

public java.lang.Object visitMathShift(MathShiftToken token,
                                       java.lang.Object arg)
                                throws java.lang.Exception
This visit method is invoked on a math shift token. In TeX this normally is a $.

Parameters:
token - the math shift token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitOther

public java.lang.Object visitOther(OtherToken token,
                                   java.lang.Object arg)
                            throws java.lang.Exception
This visit method is invoked on an other token.

Parameters:
token - the other token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitRightBrace

public java.lang.Object visitRightBrace(RightBraceToken token,
                                        java.lang.Object arg)
                                 throws java.lang.Exception
This visit method is invoked on a right brace token.

Parameters:
token - the right brace token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitSpace

public java.lang.Object visitSpace(SpaceToken token,
                                   java.lang.Object arg)
                            throws java.lang.Exception
This visit method is invoked on a space token.

Parameters:
token - the space token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitSubMark

public java.lang.Object visitSubMark(SubMarkToken token,
                                     java.lang.Object arg)
                              throws java.lang.Exception
This visit method is invoked on a sub mark token. In TeX this normally is a _.

Parameters:
token - the sub mark token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitSupMark

public java.lang.Object visitSupMark(SupMarkToken token,
                                     java.lang.Object arg)
                              throws java.lang.Exception
This visit method is invoked on a sup mark token. In TeX this normally is a ^.

Parameters:
token - the sup mark token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error

visitTabMark

public java.lang.Object visitTabMark(TabMarkToken token,
                                     java.lang.Object arg)
                              throws java.lang.Exception
This visit method is invoked on a tab mark token. In TeX this normally is a &.

Parameters:
token - the tab mark token to visit
arg - the first argument to pass
Returns:
some value
Throws:
java.lang.Exception - in case of an error