|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.millscript.syntax.Syntax
org.millscript.millscript.syntax.PostfixSyntax
public abstract class PostfixSyntax
This class represents postfix syntax, that which follows an expression it operates on and have an expression follow it. This is a convenience class to reduce the work required to implement a piece of postfix syntax.
| Constructor Summary | |
|---|---|
PostfixSyntax()
|
|
| Method Summary | |
|---|---|
int |
getPrecedence()
Returns the precedence of this piece of postfix syntax. |
abstract Expr |
postfix(java.lang.String sym,
int prec,
Expr lhs,
Parser parser)
Parse the syntax for the specified symbol, using the specified Parser. |
PostfixSyntax |
setPrec(int p)
Sets the precedence for this postfix syntax and then returns the syntax object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PostfixSyntax()
| Method Detail |
|---|
public int getPrecedence()
PostfixSyntaxInterface
getPrecedence in interface PostfixSyntaxInterfacePostfixSyntaxInterface.getPrecedence()public PostfixSyntax setPrec(int p)
p - the new value for the precedence
public abstract Expr postfix(java.lang.String sym,
int prec,
Expr lhs,
Parser parser)
PostfixSyntaxInterfaceParser. The symbol is specified because different symbols
may share the same syntax, but result in slightly different expressions.
The Parser is supplied as the source to parse from. As this
is postfix syntax, we are also supplied the expression on the left hand
side of the symbol along with the current precedence we should parse to.
postfix in interface PostfixSyntaxInterfacesym - the symbol to parse this syntax forprec - the current precedence we should parse tolhs - the expression on the left hand side of the specified
symbolparser - Parser to parse from, i.e. the source to parse from
PostfixSyntaxInterface.postfix(java.lang.String, int, org.millscript.millscript.expr.Expr, org.millscript.millscript.syntax.Parser)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||