org.ourgrid.common.spec.semantic
Class CommonSemanticAnalyzer

java.lang.Object
  extended by org.ourgrid.common.spec.semantic.CommonSemanticAnalyzer
All Implemented Interfaces:
SemanticAnalyzer

public class CommonSemanticAnalyzer
extends java.lang.Object
implements SemanticAnalyzer

This implementation of the semantic analyzer uses more then one language to compile. Thats why uses SemanticActions as sets to each different language actions.


Constructor Summary
CommonSemanticAnalyzer(SemanticActions actions)
          The constructor.
 
Method Summary
 int getOperationMode()
          Returns a integer code that can be used to signalize some functional modes.
 void performAction(java.lang.String action, Token token)
          This is the interface method for the semantic actions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommonSemanticAnalyzer

public CommonSemanticAnalyzer(SemanticActions actions)
The constructor.

Parameters:
actions - The set of the actions that will be used for a determined language.
Method Detail

performAction

public void performAction(java.lang.String action,
                          Token token)
                   throws SemanticException
Description copied from interface: SemanticAnalyzer
This is the interface method for the semantic actions. It will try to execute the action defined by the paramether.

Specified by:
performAction in interface SemanticAnalyzer
Parameters:
action - The name of the action. It is generally a integer number.
token - The token that will be used at action
Throws:
SemanticException - If the action does not exists or any other problem happens.
See Also:
SemanticAnalyzer.performAction(java.lang.String, org.ourgrid.common.spec.token.Token)

getOperationMode

public int getOperationMode()
Description copied from interface: SemanticAnalyzer
Returns a integer code that can be used to signalize some functional modes. It is used basically to export some chages that can be used by the other modules, principally the SyntacticalAnalyzer.

Specified by:
getOperationMode in interface SemanticAnalyzer
Returns:
The integer code
See Also:
SemanticAnalyzer.getOperationMode()