Class LexerAction_c

  extended by abc.aspectj.parse.LexerAction_c
All Implemented Interfaces:
Direct Known Subclasses:

public class LexerAction_c
extends java.lang.Object
implements LexerAction

Default implementation of the LexerAction interface. This class can be constructed with one or two Integer parameters. The one-argument form calls the two-argument form with null for the second parameter. The first argument is the parser token that should be returned, the second is the state that the lexer should switch to when the corresponding keyword is encountered - no switch is performed if this argument is null.

Pavel Avgustinov

Field Summary
 java.lang.Integer nextState
 java.lang.Integer token
Constructor Summary
LexerAction_c(java.lang.Integer t)
LexerAction_c(java.lang.Integer t, java.lang.Integer s)
Method Summary
 int getToken(AbcLexer lexer)
          This function is called when the keyword that is associated with this action is encountered in the lexer.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public java.lang.Integer token


public java.lang.Integer nextState
Constructor Detail


public LexerAction_c(java.lang.Integer t)


public LexerAction_c(java.lang.Integer t,
                     java.lang.Integer s)
Method Detail


public int getToken(AbcLexer lexer)
Description copied from interface: LexerAction
This function is called when the keyword that is associated with this action is encountered in the lexer. In order to be useful, it should probably make use of some of Lexer_c's public members to produce the necessary side-effects.

Specified by:
getToken in interface LexerAction
lexer - The lexer object that the action should apply to. It is used for the calls that produce side-effects.
The token that should be passed on to the parser, as defined in aspectj.ppg or similar files from extensions to abc.