org.erights.e.elang.syntax
Class BaseENodeBuilder

java.lang.Object
  |
  +--org.erights.e.elang.syntax.BaseENodeBuilder
All Implemented Interfaces:
BaseEBuilder
Direct Known Subclasses:
ENodeBuilder

public class BaseENodeBuilder
extends Object
implements BaseEBuilder

Untamed:

Author:
Mark S. Miller

Field Summary
(package private)  LexerFace myLexer
           
(package private)  ConstMap myProps
           
 
Constructor Summary
BaseENodeBuilder(ConstMap props, LexerFace lexer)
          Enabled:
 
Method Summary
 void antiPocket(String pName)
          Enabled:
 FlexList append(Object sofar, Object nexts)
          Enabled:
 EExpr assign(Object lValue, Object rValue)
          Enabled:
 EExpr call(Object recipientExpr, Object verb, Object args)
          Enabled:
 Pattern cdrPattern(Object subs, Object rest)
          Enabled:
 EExpr define(Object pattern, Object rValue)
          Enabled:
(package private) static String docComment(Object doco)
           
 EExpr escape(Object pattern, Object bodyExpr)
          Enabled:
(package private) static EExpr[] exprs(Object vec)
           
 Pattern finalPattern(Object name, Object valueGuardExpr)
          Enabled:
 EExpr hide(Object body)
          Enabled:
(package private)  Astro ident(Object identOrStr)
           
(package private)  String idStr(Object identOrStr)
           
 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 tokenOrData)
          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:
(package private) static NounExpr noun(Object identOrStr)
          XXX should be made properly polymorphic
(package private)  EExpr object(String docComment, String optOName, EExpr[] impls, EScript script)
           
 ObjDecl oDecl(Object doco, Object optOName, Object optExtends, Object auditors)
          Enabled:
private static Pattern[] patterns(Object vec)
           
 void pocket(String pName)
          Enabled:
 void reserved(String desc)
          Enabled:
 EExpr send(Object recipientExpr, Object verb, Object args)
          Enabled:
 EExpr sequence(EExpr[] parts)
          Enabled: XXX Currently, parts.length must be >= 1
 EExpr slotExpr(Object eExpr)
          Enabled:
 Pattern suchThat(Object pattern, Object condExpr)
          Enabled:
(package private)  void syntaxError(String msg)
           
 EExpr tryx(Object eExpr, Object optCatcher, Object optFinally)
          Enabled:
(package private) static Object[] typedArray(Object vec, Class elementType)
          Should be put into a more generic place
 Pattern varPattern(Object name, Object slotGuardExpr)
          Enabled:
 EScriptDecl vTable(Object optMethods, Object matchers)
          Enabled:
 FlexList with(Object sofar, Object next)
          Enabled:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myProps

ConstMap myProps

myLexer

final LexerFace myLexer
Constructor Detail

BaseENodeBuilder

public BaseENodeBuilder(ConstMap props,
                        LexerFace lexer)
Enabled:

Method Detail

docComment

static String docComment(Object doco)

typedArray

static Object[] typedArray(Object vec,
                           Class elementType)
Should be put into a more generic place


exprs

static EExpr[] exprs(Object vec)

patterns

private static Pattern[] patterns(Object vec)

noun

static NounExpr noun(Object identOrStr)
XXX should be made properly polymorphic


syntaxError

void syntaxError(String msg)
           throws SyntaxException
SyntaxException

reserved

public void reserved(String desc)
Enabled:

Specified by:
reserved in interface BaseEBuilder

pocket

public void pocket(String pName)
Enabled:

Specified by:
pocket in interface BaseEBuilder

antiPocket

public void antiPocket(String pName)
Enabled:

Specified by:
antiPocket in interface BaseEBuilder

ident

Astro ident(Object identOrStr)

idStr

String idStr(Object identOrStr)

list

public FlexList list()
Enabled:

Specified by:
list in interface BaseEBuilder

list

public FlexList list(Object a)
Enabled:

Specified by:
list in interface BaseEBuilder

list

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

Specified by:
list in interface BaseEBuilder

list

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

Specified by:
list in interface BaseEBuilder

list

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

Specified by:
list in interface BaseEBuilder

with

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

Specified by:
with in interface BaseEBuilder

append

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

Specified by:
append in interface BaseEBuilder

literal

public LiteralExpr literal(Object tokenOrData)
Enabled:

Specified by:
literal in interface BaseEBuilder

assign

public EExpr assign(Object lValue,
                    Object rValue)
Enabled:

Specified by:
assign in interface BaseEBuilder

call

public EExpr call(Object recipientExpr,
                  Object verb,
                  Object args)
Enabled:

Specified by:
call in interface BaseEBuilder

send

public EExpr send(Object recipientExpr,
                  Object verb,
                  Object args)
Enabled:

Specified by:
send in interface BaseEBuilder

define

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

Specified by:
define in interface BaseEBuilder

slotExpr

public EExpr slotExpr(Object eExpr)
Enabled:

Specified by:
slotExpr in interface BaseEBuilder

oDecl

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

Specified by:
oDecl in interface BaseEBuilder

escape

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

Specified by:
escape in interface BaseEBuilder

hide

public EExpr hide(Object body)
Enabled:

Specified by:
hide in interface BaseEBuilder

ifx

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

Specified by:
ifx in interface BaseEBuilder

matchBind

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

Specified by:
matchBind in interface BaseEBuilder

matcher

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

Specified by:
matcher in interface BaseEBuilder

method

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

Specified by:
method in interface BaseEBuilder

methHead

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

Specified by:
methHead in interface BaseEBuilder

vTable

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

Specified by:
vTable in interface BaseEBuilder

object

EExpr object(String docComment,
             String optOName,
             EExpr[] impls,
             EScript script)
Parameters:
optOName - may be null (meaning anonymous), a String, a LiteralString/LiteralTwine (a literal string as an FQN) or a Pattern representing both the variable to be initialized and the name part of a FQN.

sequence

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

Specified by:
sequence in interface BaseEBuilder

tryx

public EExpr tryx(Object eExpr,
                  Object optCatcher,
                  Object optFinally)
Enabled:

Specified by:
tryx in interface BaseEBuilder

finalPattern

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

Specified by:
finalPattern in interface BaseEBuilder

varPattern

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

Specified by:
varPattern in interface BaseEBuilder

ignore

public Pattern ignore()
Enabled:

Specified by:
ignore in interface BaseEBuilder

listPattern

public ListPattern listPattern(Object subs)
Enabled:

Specified by:
listPattern in interface BaseEBuilder

cdrPattern

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

Specified by:
cdrPattern in interface BaseEBuilder

suchThat

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

Specified by:
suchThat in interface BaseEBuilder


comments?