se.chalmers.cs.gf.linearize
Class LinearizeTree

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

public class LinearizeTree
extends java.lang.Object
implements Linearizer

Linearize an abstract syntax tree to a string representation of the tree itself.


Constructor Summary
LinearizeTree()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinearizeTree

public LinearizeTree()
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