se.chalmers.cs.gf.linearize
Class GFCLinearizer

java.lang.Object
  extended by se.chalmers.cs.gf.linearize.GFCLinearizer
All Implemented Interfaces:
java.io.Serializable, Linearizer

public class GFCLinearizer
extends java.lang.Object
implements java.io.Serializable, Linearizer

A linearizer which interprets a concrete GFC module.

See Also:
Serialized Form

Constructor Summary
GFCLinearizer(GFCModule module)
           
 
Method Summary
 java.lang.String getName()
          Get the name of this linearizer.
 java.util.List<Token> linearize(Tree t)
          Linearize the given abstract syntax tree to a GF value.
 java.util.List<Token> linearizeWithRanges(Tree t)
          Linearize the given abstract syntax tree to a GF value, where the input ranges for each constructor are shown in the output.
 boolean tryThisOne()
          Whether this linearizer should be used when linearizing with all available linearizers.
 java.util.List<Token> valueToTokens(Value v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GFCLinearizer

public GFCLinearizer(GFCModule module)
Parameters:
module - A GFC module
Method Detail

linearize

public java.util.List<Token> 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

linearizeWithRanges

public java.util.List<Token> linearizeWithRanges(Tree t)
Description copied from interface: Linearizer
Linearize the given abstract syntax tree to a GF value, where the input ranges for each constructor are shown in the output. NOTE: the tree should be annotated before calling this function.

Specified by:
linearizeWithRanges 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

valueToTokens

public java.util.List<Token> valueToTokens(Value v)