org.erights.e.elang.syntax
Interface BaseEBuilder

All Known Subinterfaces:
EBuilder
All Known Implementing Classes:
BaseENodeBuilder, ENodeBuilder

public interface BaseEBuilder

Untamed:

Author:
Mark S. Miller

Method Summary
 void antiPocket(String pName)
          Enabled: Complain if this feature is enabled.
 FlexList append(Object sofar, Object nexts)
          Enabled:
 EExpr assign(Object lValue, Object rValue)
          Enabled: Either makes a kernel assignment expression, or expands a non-kernel one, depending on the lValue.
 EExpr call(Object recipientExpr, Object verb, Object args)
          Enabled: Makes a kernel immediate-call expression
 Pattern cdrPattern(Object subs, Object rest)
          Enabled:
 EExpr define(Object pattern, Object rValue)
          Enabled:
 EExpr escape(Object pattern, Object bodyExpr)
          Enabled:
 Pattern finalPattern(Object name, Object valueGuardExpr)
          Enabled:
 EExpr hide(Object body)
          Enabled:
 EExpr ifx(Object condExpr, Object thenExpr, Object elseExpr)
          Enabled:
 Pattern ignore()
          Enabled:
 FlexList list()
          Enabled:
 FlexList list(Object a)
          Enabled:
 FlexList list(Object a, Object b)
          Enabled:
 FlexList list(Object a, Object b, Object c)
          Enabled:
 FlexList list(Object a, Object b, Object c, Object d)
          Enabled:
 ListPattern listPattern(Object subs)
          Enabled:
 LiteralExpr literal(Object token)
          Enabled:
 EExpr matchBind(Object specimen, Object pattern)
          Enabled:
 Matcher matcher(Object matchHead, Object bodyExpr)
          Enabled:
 MsgPatt methHead(Object verb, Object patts, Object returnGuard)
          Enabled:
 EMethodNode method(Object doco, Object msgPatt, Object bodyExpr)
          Enabled:
 ObjDecl oDecl(Object doco, Object optOName, Object optExtends, Object auditors)
          Enabled:
 void pocket(String pName)
          Enabled: Complain unless this feature is enabled.
 void reserved(String desc)
          Enabled: Complain that syntax desc is reserved for possible future use.
 EExpr send(Object recipientExpr, Object verb, Object args)
          Enabled: Makes a kernel eventual-send expression
 EExpr sequence(EExpr[] parts)
          Enabled: XXX Currently, parts.length must be >= 1
 EExpr slotExpr(Object eExpr)
          Enabled:
 Pattern suchThat(Object pattern, Object condExpr)
          Enabled:
 EExpr tryx(Object eExpr, Object catchers, Object optFinally)
          Enabled: XXX Here at the base, we should break this up into separate methods for building a CatchExpr and a FinallyExpr.
 Pattern varPattern(Object name, Object slotGuardExpr)
          Enabled:
 EScriptDecl vTable(Object optMethods, Object matchers)
          Enabled:
 FlexList with(Object sofar, Object next)
          Enabled:
 

Method Detail

reserved

public void reserved(String desc)
Enabled: Complain that syntax desc is reserved for possible future use.


pocket

public void pocket(String pName)
Enabled: Complain unless this feature is enabled.

If property e.enable.pName is true, then return silently. Otherwise, complain.


antiPocket

public void antiPocket(String pName)
Enabled: Complain if this feature is enabled.

If property e.enable.pName is true, then complain. Otherwise, return silently.


list

public FlexList list()
Enabled:


list

public FlexList list(Object a)
Enabled:


list

public FlexList list(Object a,
                     Object b)
Enabled:


list

public FlexList list(Object a,
                     Object b,
                     Object c)
Enabled:


list

public FlexList list(Object a,
                     Object b,
                     Object c,
                     Object d)
Enabled:


append

public FlexList append(Object sofar,
                       Object nexts)
Enabled:


with

public FlexList with(Object sofar,
                     Object next)
Enabled:


literal

public LiteralExpr literal(Object token)
Enabled:


assign

public EExpr assign(Object lValue,
                    Object rValue)
Enabled: Either makes a kernel assignment expression, or expands a non-kernel one, depending on the lValue.
  x := z                is kernel if x is a variable name
  x.get(y) := z         expands approximately to    x.put(y, z)
  x.get(y1, y2) := z    expands approximately to    x.put(y1, y2, z)
  x.getName() := z      expands approximately to    x.setName(z)
  x.run(y) := z         expands approximately to    x.setRun(y, z)
The actual expansion introduces a temporary variable to capture the value of z, and to have that be the value of the assignment expression as a whole.

Any lValue other than those listed above is rejected. Remember that

  x[y]     expands to  x.get(y)
  x.name   expands to  x.getName()
  x(y)     expands to  x.run(y)
so all are valid lValues.


call

public EExpr call(Object recipientExpr,
                  Object verb,
                  Object args)
Enabled: Makes a kernel immediate-call expression


send

public EExpr send(Object recipientExpr,
                  Object verb,
                  Object args)
Enabled: Makes a kernel eventual-send expression


define

public EExpr define(Object pattern,
                    Object rValue)
Enabled:


escape

public EExpr escape(Object pattern,
                    Object bodyExpr)
Enabled:


hide

public EExpr hide(Object body)
Enabled:


ifx

public EExpr ifx(Object condExpr,
                 Object thenExpr,
                 Object elseExpr)
Enabled:


matchBind

public EExpr matchBind(Object specimen,
                       Object pattern)
Enabled:


matcher

public Matcher matcher(Object matchHead,
                       Object bodyExpr)
Enabled:


method

public EMethodNode method(Object doco,
                          Object msgPatt,
                          Object bodyExpr)
Enabled:


methHead

public MsgPatt methHead(Object verb,
                        Object patts,
                        Object returnGuard)
Enabled:


oDecl

public ObjDecl oDecl(Object doco,
                     Object optOName,
                     Object optExtends,
                     Object auditors)
Enabled:


vTable

public EScriptDecl vTable(Object optMethods,
                          Object matchers)
Enabled:


sequence

public EExpr sequence(EExpr[] parts)
Enabled: XXX Currently, parts.length must be >= 1


tryx

public EExpr tryx(Object eExpr,
                  Object catchers,
                  Object optFinally)
Enabled: XXX Here at the base, we should break this up into separate methods for building a CatchExpr and a FinallyExpr.


slotExpr

public EExpr slotExpr(Object eExpr)
Enabled:


finalPattern

public Pattern finalPattern(Object name,
                            Object valueGuardExpr)
Enabled:


varPattern

public Pattern varPattern(Object name,
                          Object slotGuardExpr)
Enabled:


ignore

public Pattern ignore()
Enabled:


listPattern

public ListPattern listPattern(Object subs)
Enabled:


cdrPattern

public Pattern cdrPattern(Object subs,
                          Object rest)
Enabled:


suchThat

public Pattern suchThat(Object pattern,
                        Object condExpr)
Enabled:



comments?