abc.aspectj.parse
Interface AbcLexer


public interface AbcLexer

The interface implemented by abc's lexer, exposing some additional functionality to allow for extensibility.

Author:
Pavel Avgustinov

Method Summary
 void addAspectJContextKeyword(java.lang.String keyword, LexerAction ka)
          Adds a keyword with the specified action to the ASPECTJ and POINTCUTIFEXPR lexer states.
 void addAspectJKeyword(java.lang.String keyword, LexerAction ka)
          Adds a keyword with the specified action to the ASPECTJ lexer state.
 void addGlobalKeyword(java.lang.String keyword, LexerAction ka)
          Adds a keyword with the specified action to all four lexer states.
 void addJavaKeyword(java.lang.String keyword, LexerAction ka)
          Adds a keyword with the specified action to the JAVA lexer state.
 void addPointcutIfExprKeyword(java.lang.String keyword, LexerAction ka)
          Adds a keyword with the specified action to the POINTCUTIFEXPR lexer state.
 void addPointcutKeyword(java.lang.String keyword, LexerAction ka)
          Adds a keyword with the specified action to the POINTCUT lexer state.
 int aspectj_state()
          Returns the integer constant representing the ASPECTJ lexer state.
 int currentState()
          Obtain the integer constant representing the current state of the lexer.
 void enterLexerState(int state)
          Makes the lexer change into the specified state, pushing the current state and some state-specific information onto its internal stack.
 boolean getLastTokenWasDot()
          Indicates whether the last token consumed was a dot.
 int java_state()
          Returns the integer constant representing the JAVA lexer state.
 int pointcut_state()
          Returns the integer constant representing the POINTCUT lexer state.
 int pointcutifexpr_state()
          Returns the integer constant representing the POINTCUTIFEXPR lexer state.
 void setInPerPointcut(boolean b)
          Indicate whether or not the lexer is currently examining a "per-pointcut".
 

Method Detail

java_state

int java_state()
Returns the integer constant representing the JAVA lexer state.


aspectj_state

int aspectj_state()
Returns the integer constant representing the ASPECTJ lexer state.


pointcut_state

int pointcut_state()
Returns the integer constant representing the POINTCUT lexer state.


pointcutifexpr_state

int pointcutifexpr_state()
Returns the integer constant representing the POINTCUTIFEXPR lexer state.


enterLexerState

void enterLexerState(int state)
Makes the lexer change into the specified state, pushing the current state and some state-specific information onto its internal stack. When states are terminated is state-dependent - it could be at the next ';' or '{' (for some pointcuts), at the matching '}' (for Java/AspectJ code), or at the matching ')' (for pointcut if expressions).

Parameters:
state -

addJavaKeyword

void addJavaKeyword(java.lang.String keyword,
                    LexerAction ka)
Adds a keyword with the specified action to the JAVA lexer state.

Parameters:
keyword - the keyword to be added
ka - the action to be performed.

addAspectJKeyword

void addAspectJKeyword(java.lang.String keyword,
                       LexerAction ka)
Adds a keyword with the specified action to the ASPECTJ lexer state.

Parameters:
keyword - the keyword to be added
ka - the action to be performed.

addPointcutKeyword

void addPointcutKeyword(java.lang.String keyword,
                        LexerAction ka)
Adds a keyword with the specified action to the POINTCUT lexer state.

Parameters:
keyword - the keyword to be added
ka - the action to be performed.

addPointcutIfExprKeyword

void addPointcutIfExprKeyword(java.lang.String keyword,
                              LexerAction ka)
Adds a keyword with the specified action to the POINTCUTIFEXPR lexer state.

Parameters:
keyword - the keyword to be added
ka - the action to be performed.

addGlobalKeyword

void addGlobalKeyword(java.lang.String keyword,
                      LexerAction ka)
Adds a keyword with the specified action to all four lexer states.

Parameters:
keyword - the keyword to be added
ka - the action to be performed.

addAspectJContextKeyword

void addAspectJContextKeyword(java.lang.String keyword,
                              LexerAction ka)
Adds a keyword with the specified action to the ASPECTJ and POINTCUTIFEXPR lexer states.

Parameters:
keyword - the keyword to be added
ka - the action to be performed.

setInPerPointcut

void setInPerPointcut(boolean b)
Indicate whether or not the lexer is currently examining a "per-pointcut".


currentState

int currentState()
Obtain the integer constant representing the current state of the lexer.


getLastTokenWasDot

boolean getLastTokenWasDot()
Indicates whether the last token consumed was a dot.