dk.brics.grammar.operations
Class NullableFinder

java.lang.Object
  extended by dk.brics.grammar.operations.NullableFinder

public class NullableFinder
extends Object

Finds entities, nonterminals, and productions that can derive the empty string.


Constructor Summary
NullableFinder(Grammar g)
          Finds the nullables for the given grammar.
 
Method Summary
 Set<Entity> getNullableEntities()
          Returns the set of entities that can derive the empty string.
 Set<String> getNullableNonterminals()
          Returns the set of nonterminals that can derive the empty string.
 Set<Production> getNullableProductions()
          Returns the set of productions that can derive the empty string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullableFinder

public NullableFinder(Grammar g)
Finds the nullables for the given grammar.

Method Detail

getNullableEntities

public Set<Entity> getNullableEntities()
Returns the set of entities that can derive the empty string.

Returns:
set of entities

getNullableNonterminals

public Set<String> getNullableNonterminals()
Returns the set of nonterminals that can derive the empty string.

Returns:
set of nonterminals

getNullableProductions

public Set<Production> getNullableProductions()
Returns the set of productions that can derive the empty string.

Returns:
set of productions


Copyright © 2005-2008 Anders Møller.