org.millscript.millscript.syntax
Class BothfixSyntax

java.lang.Object
  extended by org.millscript.millscript.syntax.Syntax
      extended by org.millscript.millscript.syntax.PostfixSyntax
          extended by org.millscript.millscript.syntax.BothfixSyntax
All Implemented Interfaces:
PostfixSyntaxInterface, PrefixSyntaxInterface
Direct Known Subclasses:
ParenSyntax, XMLElementSyntax

public abstract class BothfixSyntax
extends PostfixSyntax
implements PrefixSyntaxInterface

This class represents bothfix syntax, that which can be both prefix and postfix, depending on the situation. This is a convenience class to reduce the work required to implement a syntax that is both prefix and postfix. It may be that the syntax has different meanings in prefix vs. postfix form.


Constructor Summary
BothfixSyntax()
           
 
Method Summary
abstract  Expr prefix(java.lang.String sym, Parser parser)
          Parse the syntax for the specified symbol, using the specified Parser.
 
Methods inherited from class org.millscript.millscript.syntax.PostfixSyntax
getPrecedence, postfix, setPrec
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BothfixSyntax

public BothfixSyntax()
Method Detail

prefix

public abstract Expr prefix(java.lang.String sym,
                            Parser parser)
Description copied from interface: PrefixSyntaxInterface
Parse the syntax for the specified symbol, using the specified Parser. 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.

Specified by:
prefix in interface PrefixSyntaxInterface
Parameters:
sym - the symbol to parse this syntax for
parser - Parser to parse from, i.e. the source to parse from
Returns:
an expression for this syntax
See Also:
PrefixSyntaxInterface.prefix(java.lang.String, org.millscript.millscript.syntax.Parser)


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.