dk.brics.grammar.operations
Class SelectFollowsFinder

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

public class SelectFollowsFinder
extends Object

Contains method for finding SELECT and FOLLOWS sets.

FOLLOWS(N) is the set of chars that can appear immediately after a string derived from N in derivations from the start nonterminal. SELECT(N) is here the set of chars that may appear as the first char in strings derived from N, plus - if N is nullable - the chars in FOLLOWS(N).

See Also:
FirstLastFinder

Constructor Summary
SelectFollowsFinder(Grammar g)
          Computes sets for the given grammar.
 
Method Summary
 Map<String,CharSet> getNonterminalFollows()
          Returns map from nonterminal names to charsets representing FOLLOWS information.
 Map<String,CharSet> getNonterminalSelect()
          Returns map from nonterminal names to charsets representing SELECT information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectFollowsFinder

public SelectFollowsFinder(Grammar g)
Computes sets for the given grammar.

Parameters:
g - grammar
Method Detail

getNonterminalFollows

public Map<String,CharSet> getNonterminalFollows()
Returns map from nonterminal names to charsets representing FOLLOWS information.

Returns:
FOLLOWS sets

getNonterminalSelect

public Map<String,CharSet> getNonterminalSelect()
Returns map from nonterminal names to charsets representing SELECT information.

Returns:
SELECT sets


Copyright © 2005-2008 Anders Møller.