|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ourgrid.common.spec.syntactical.SyntacticalDerivationTree
public class SyntacticalDerivationTree
This is the entity that will control the derivation of a word from a language described by a grammar. Here a word is the source that has to be compiled, then; a derivation is the process of, beginning from the initial symbol of a grammar, obtain the read source.
| Constructor Summary | |
|---|---|
SyntacticalDerivationTree(Symbol endOfSourceSymbol,
Symbol initialSymbol)
Initializes the stack that will control the derivation. |
|
| Method Summary | |
|---|---|
Symbol |
pop()
Pops (removes) the symbol at the top of the derivation stack. |
void |
pushRule(Rule rule)
Pushes (insert) a given rule at the top of the derivation stack. |
Symbol |
top()
Returns the symbol at the top of the derivation stack. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SyntacticalDerivationTree(Symbol endOfSourceSymbol,
Symbol initialSymbol)
endOfSourceSymbol - The symbol that defines that the source has
ended.initialSymbol - The initial symbol of the grammar language.| Method Detail |
|---|
public Symbol top()
public Symbol pop()
public void pushRule(Rule rule)
rule - The rule that have to be inserted at the derivation stack
top.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||