se.chalmers.cs.gf.linearize
Class LinearizeAll

java.lang.Object
  extended by se.chalmers.cs.gf.linearize.LinearizeAll
All Implemented Interfaces:
Linearizer

public class LinearizeAll
extends java.lang.Object
implements Linearizer

Linearize a tree with a set of linearizers.


Constructor Summary
LinearizeAll(Linearizers linearizers)
           
 
Method Summary
 java.lang.String getName()
          Get the name of this linearizer.
 Value linearize(Tree t)
          Linearize the given abstract syntax tree to a GF value.
static java.util.List<Pair<java.lang.String,Value>> linearizeWithAll(Linearizers linearizers, Tree t)
          Linearize a value with all the linearizers.
 boolean tryThisOne()
          Whether this linearizer should be used when linearizing with all available linearizers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearizeAll

public LinearizeAll(Linearizers linearizers)
Method Detail

linearize

public Value linearize(Tree t)
Description copied from interface: Linearizer
Linearize the given abstract syntax tree to a GF value. NOTE: the tree should be annotated before calling this function.

Specified by:
linearize in interface Linearizer

getName

public java.lang.String getName()
Description copied from interface: Linearizer
Get the name of this linearizer.

Specified by:
getName in interface Linearizer

tryThisOne

public boolean tryThisOne()
Description copied from interface: Linearizer
Whether this linearizer should be used when linearizing with all available linearizers.

Specified by:
tryThisOne in interface Linearizer

linearizeWithAll

public static java.util.List<Pair<java.lang.String,Value>> linearizeWithAll(Linearizers linearizers,
                                                                            Tree t)
Linearize a value with all the linearizers.