Class HeadFeaturedGrammarRule

java.lang.Object
  extended byGrammarRule
      extended byAugmentedGrammarRule
          extended byHeadFeaturedGrammarRule

public class HeadFeaturedGrammarRule
extends AugmentedGrammarRule

An HeadFeaturedGrammarRule is one whose constituents are HeadFeaturedConstituents (meaning that they could be marked as head constituent).


Field Summary
 
Fields inherited from class GrammarRule
id, lhs, rhs
 
Constructor Summary
HeadFeaturedGrammarRule(Symbol id, HeadFeaturedConstituent lhs, java.util.List rhs)
          Creates a new HeadFeaturedGrammarRule.
 
Method Summary
 HeadFeaturedConstituent getHeadConstituent()
          Returns the head constituent of the rhs of this GrammarRule.
 
Methods inherited from class AugmentedGrammarRule
copyWithBindings
 
Methods inherited from class GrammarRule
getId, getLhs, getRhs, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HeadFeaturedGrammarRule

public HeadFeaturedGrammarRule(Symbol id,
                               HeadFeaturedConstituent lhs,
                               java.util.List rhs)
Creates a new HeadFeaturedGrammarRule. Note that we don't check that the rhs actually consists only of HeadFeaturedConstituents (but one could do that).

Note that we apply the head feature conventions here in the constructor rather than later to minimize code duplication with parent classes.

Method Detail

getHeadConstituent

public HeadFeaturedConstituent getHeadConstituent()
Returns the head constituent of the rhs of this GrammarRule.