dk.brics.grammar.operations
Class Grammar2JSAGrammar

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

public class Grammar2JSAGrammar
extends Object

Converter from normalized grammars to JSA grammars.

See Also:
ProductionLengthNormalizer

Constructor Summary
Grammar2JSAGrammar()
          Constructs a new converter.
 
Method Summary
 dk.brics.string.grammar.Grammar convert(Grammar ng)
          Converts a normalized grammar to JSA grammar representation.
 Map<String,dk.brics.string.grammar.Nonterminal> getNonterminalMap()
          Returns map from old nonterminals to new nonterminals from the last conversion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grammar2JSAGrammar

public Grammar2JSAGrammar()
Constructs a new converter.

Method Detail

convert

public dk.brics.string.grammar.Grammar convert(Grammar ng)
                                        throws IllegalArgumentException
Converts a normalized grammar to JSA grammar representation.

Parameters:
ng - grammar to convert
Returns:
JSA grammar
Throws:
IllegalArgumentException - if the input grammar is not normalized

getNonterminalMap

public Map<String,dk.brics.string.grammar.Nonterminal> getNonterminalMap()
Returns map from old nonterminals to new nonterminals from the last conversion.

Returns:
nonterminal map


Copyright © 2005-2008 Anders Møller.