name.angoca.db2sa.core.syntax
Class AbstractSyntacticalAnalyzer

Package class diagram package AbstractSyntacticalAnalyzer
java.lang.Object
  extended by name.angoca.db2sa.core.syntax.AbstractSyntacticalAnalyzer
Direct Known Subclasses:
ImplSyntaxAnalyzer

public abstract class AbstractSyntacticalAnalyzer
extends Object

This object has methods to scan the structure and to find the possibilities of next tokens, that provide the possible ways that the user can take when writing a command.
A phrase is a set of words that can or can't have a meaning for DB2.
Control Version

Version:
1.0.0 2009-07-19
Author:
Andres Gomez Casanova (AngocA)

Constructor Summary
AbstractSyntacticalAnalyzer()
           
 
Method Summary
abstract  GraphAnswer getOptions(List<Token> phrase)
          Returns the possible options that a given phrase can have.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSyntacticalAnalyzer

public AbstractSyntacticalAnalyzer()
Method Detail

getOptions

public abstract GraphAnswer getOptions(List<Token> phrase)
                                throws InvalidGraphException
Returns the possible options that a given phrase can have. When no option is found, the returned array is empty (not null).

Parameters:
phrase - Phrase to analyze. This is an ensemble of tokens that are sorted in the same way that words were written by the user.
Returns:
The possible answers: the command completed or the options.
Throws:
InvalidGraphException - When the graph has an invalid structure.


Andres Gomez Casanova (AngocA) Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.