|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object se.chalmers.cs.gf.parse.chart.Rule se.chalmers.cs.gf.parse.chart.NonTerminalRule
public class NonTerminalRule
A CF grammar prodcution whose right hand side is a list of non-terminals.
Constructor Summary | |
---|---|
NonTerminalRule(Category cat,
java.util.List<Category> rhs,
java.lang.String fun,
java.util.List<Profile> profile)
|
Method Summary | |
---|---|
boolean |
equals(NonTerminalRule r)
|
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getFun()
Get the function name use to construct an abstract syntax tree from this rule. |
java.util.List<Profile> |
getProfile()
|
java.util.List<Category> |
getRhs()
Get the right hand side of the 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. |
Tree |
makeTree(Tree[] children,
int startIndex,
int endIndex)
|
boolean |
startsWith(Category c)
Checks if the right hand side of rule starts with the given non-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 |
---|
public NonTerminalRule(Category cat, java.util.List<Category> rhs, java.lang.String fun, java.util.List<Profile> profile)
Method Detail |
---|
public java.util.List<Category> getRhs()
public java.lang.String getFun()
Rule
getFun
in class Rule
public java.util.List<Profile> getProfile()
public boolean startsWith(Category c)
public int getSize()
Rule
getSize
in class Rule
public boolean isTerminal()
public Tree makeTree(Tree[] children, int startIndex, int endIndex)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(NonTerminalRule r)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |