ch.uzh.ifi.attempto.chartparser
Class CPNextTokenOptions

java.lang.Object
  extended by ch.uzh.ifi.attempto.chartparser.CPNextTokenOptions
All Implemented Interfaces:
NextTokenOptions

public class CPNextTokenOptions
extends java.lang.Object
implements NextTokenOptions

This class represents a set of options that describe how a partial text can be continued according to a given grammar, and contains specific code for its use in the chart parser.

Author:
Tobias Kuhn

Method Summary
 boolean containsCategory(Preterminal c)
          Returns true if the given pre-terminal category represents a possible next token.
 boolean containsCategory(java.lang.String categoryName)
          Returns true if the specifed category represents a possible next token.
 boolean containsToken(java.lang.String token)
          Returns true if the specified token is a possible next token.
 java.util.Set<CPAbstractOption> getAbstractOptions()
          Returns the abstract options.
 java.util.Set<CPAbstractOption> getAbstractOptions(java.lang.String categoryName)
          Returns the abstract options that have a pre-terminal category with the specified name.
 java.util.Set<CPConcreteOption> getConcreteOptions()
          Returns the concrete options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAbstractOptions

public java.util.Set<CPAbstractOption> getAbstractOptions()
Description copied from interface: NextTokenOptions
Returns the abstract options.

Specified by:
getAbstractOptions in interface NextTokenOptions
Returns:
The set of abstract options.

getAbstractOptions

public java.util.Set<CPAbstractOption> getAbstractOptions(java.lang.String categoryName)
Returns the abstract options that have a pre-terminal category with the specified name.

Parameters:
categoryName - The name of the category.
Returns:
The set of abstract options with the respective category name.

getConcreteOptions

public java.util.Set<CPConcreteOption> getConcreteOptions()
Description copied from interface: NextTokenOptions
Returns the concrete options.

Specified by:
getConcreteOptions in interface NextTokenOptions
Returns:
The set of concrete options.

containsToken

public boolean containsToken(java.lang.String token)
Description copied from interface: NextTokenOptions
Returns true if the specified token is a possible next token.

Specified by:
containsToken in interface NextTokenOptions
Parameters:
token - The token text.
Returns:
true if it is a possible next token.

containsCategory

public boolean containsCategory(java.lang.String categoryName)
Description copied from interface: NextTokenOptions
Returns true if the specifed category represents a possible next token.

Specified by:
containsCategory in interface NextTokenOptions
Parameters:
categoryName - The name of the category.
Returns:
true if it represents a possible next token.

containsCategory

public boolean containsCategory(Preterminal c)
Returns true if the given pre-terminal category represents a possible next token.

Parameters:
c - The pre-terminal category.
Returns:
true if it represents a possible next token.


Copyright 2008-2012, AceWiki developers