dk.brics.grammar.operations
Class FirstLastFinder

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

public class FirstLastFinder
extends Object

Contains method for finding FIRST and LAST sets.

FIRST(N) is the set of chars that may appear as the first char in strings derived from N. LAST(N) is the set of chars that may appear as the last char in strings derived from N.

See Also:
SelectFollowsFinder

Constructor Summary
FirstLastFinder(Grammar g, boolean expanded)
          Computes sets for the given grammar.
 
Method Summary
 Map<Entity,CharSet> getEntityFirst()
          Returns map from entities to charsets representing FIRST information.
 Map<Entity,CharSet> getEntityLast()
          Returns map from entities to charsets representing LAST information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FirstLastFinder

public FirstLastFinder(Grammar g,
                       boolean expanded)
Computes sets for the given grammar.

Parameters:
g - grammar
expanded - if set, assume alphabet has been expanded
Method Detail

getEntityFirst

public Map<Entity,CharSet> getEntityFirst()
Returns map from entities to charsets representing FIRST information.

Returns:
FIRST sets for entities

getEntityLast

public Map<Entity,CharSet> getEntityLast()
Returns map from entities to charsets representing LAST information.

Returns:
LAST sets for entities


Copyright © 2005-2008 Anders Møller.