net.sourceforge.chaperon.build
Class FirstSetCollection

java.lang.Object
  extended by net.sourceforge.chaperon.build.FirstSetCollection

public class FirstSetCollection
extends java.lang.Object

This class creates a collection of FIRST sets.

Version:
CVS $Id: FirstSetCollection.java,v 1.10 2003/12/10 16:34:38 benedikta Exp $
Author:
Stephan Michels

Constructor Summary
FirstSetCollection(Grammar grammar)
          Create a collection of FIRST sets.
FirstSetCollection(Grammar grammar, org.apache.commons.logging.Log log)
          Create a collection of FIRST sets
 
Method Summary
 SymbolSet getFirstSet(Symbol symbol)
          Returns the FIRST set for a symbol.
 SymbolSet getFirstSet(SymbolList symbols)
          Returns the FIRST set for a sequence of symbols.
 java.lang.String toString()
          Return a string representation of the FIRST sets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FirstSetCollection

public FirstSetCollection(Grammar grammar)
Create a collection of FIRST sets.

Parameters:
grammar - Grammar.

FirstSetCollection

public FirstSetCollection(Grammar grammar,
                          org.apache.commons.logging.Log log)
Create a collection of FIRST sets

Parameters:
grammar - Grammar
log - Log, whch should be used.
Method Detail

getFirstSet

public SymbolSet getFirstSet(Symbol symbol)
Returns the FIRST set for a symbol.

Parameters:
symbol - Symbol.
Returns:
Set of symbols.

getFirstSet

public SymbolSet getFirstSet(SymbolList symbols)
Returns the FIRST set for a sequence of symbols.

Parameters:
symbol - Sequence of symbols.
Returns:
Set of symbols.

toString

public java.lang.String toString()
Return a string representation of the FIRST sets.

Overrides:
toString in class java.lang.Object
Returns:
String representation of the FIRST sets.


Copyright ? 2003 Chaperon project. All Rights Reserved.