se.chalmers.cs.gf.parse.chart
Class EmptyRule

java.lang.Object
  extended by se.chalmers.cs.gf.parse.chart.Rule
      extended by se.chalmers.cs.gf.parse.chart.EmptyRule

public class EmptyRule
extends Rule

An empty CF grammar production.


Constructor Summary
EmptyRule(Category cat, java.lang.String fun, int argCount)
           
 
Method Summary
 boolean equals(EmptyRule r)
           
 boolean equals(java.lang.Object o)
           
 int getArgCount()
           
 java.lang.String getFun()
          Get the function name use to construct an abstract syntax tree from this rule.
 int getSize()
          Get the number of terminals or non-terminal on the RHS.
 int hashCode()
           
 boolean isTerminal()
          Checks if the right hand side of this rule consists of a single terminal.
 java.lang.String toString()
           
 
Methods inherited from class se.chalmers.cs.gf.parse.chart.Rule
getCategory
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EmptyRule

public EmptyRule(Category cat,
                 java.lang.String fun,
                 int argCount)
Parameters:
argCount - The number of arguments needed by the function that this rule represents.
Method Detail

getFun

public java.lang.String getFun()
Description copied from class: Rule
Get the function name use to construct an abstract syntax tree from this rule.

Specified by:
getFun in class Rule

getSize

public int getSize()
Description copied from class: Rule
Get the number of terminals or non-terminal on the RHS.

Specified by:
getSize in class Rule

isTerminal

public boolean isTerminal()
Description copied from class: Rule
Checks if the right hand side of this rule consists of a single terminal.

Specified by:
isTerminal in class Rule

getArgCount

public int getArgCount()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(EmptyRule r)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object