|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--openjava.syntax.AbstractSyntaxRule
The interface AbstractSyntaxRule represents a syntax rule.
Object| Field Summary | |
private SyntaxException |
lastException
|
| Constructor Summary | |
AbstractSyntaxRule()
|
|
| Method Summary | |
abstract ParseTree |
consume(TokenSource token_src)
Consumes tokens from the given token source following the rule. |
SyntaxException |
getSyntaxException()
Obtains the syntax exception at the last lookahead. |
boolean |
lookahead(TokenSource token_src)
Tests if the given token source follows this rule. |
private void |
setSyntaxException(SyntaxException e)
Sets the last syntax exception in consuming token source through the method consume(TokenSource). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private SyntaxException lastException
| Constructor Detail |
public AbstractSyntaxRule()
| Method Detail |
public abstract ParseTree consume(TokenSource token_src)
throws SyntaxException
consume in interface SyntaxRuletoken_src - token source to consume.
SyntaxException - in case to fail to consume.public final boolean lookahead(TokenSource token_src)
lookahead in interface SyntaxRuletoken_src - token source to consume.
public final SyntaxException getSyntaxException()
getSyntaxException in interface SyntaxRuleprivate final void setSyntaxException(SyntaxException e)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||