|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.quasiliteral.astro.BaseBuilder | +--org.quasiliteral.term.TermBuilder
Untamed: Builds Term/Functor trees.
The type parameters of AstroBuilder are bound as follows:
Leaf --Functor
Node --Term
Arg --Term
Args -- aFlexList
of Term
Field Summary | |
static TermBuilder |
FOR_TERMS
Enabled: Builds Term trees according to the term.y grammar |
Fields inherited from class org.quasiliteral.astro.BaseBuilder |
|
Constructor Summary | |
TermBuilder(AstroSchema schema)
Enabled: |
Method Summary | |
Astro |
composite(AstroTag tag,
Object data,
SourceSpan optSpan)
Enabled: For Terms, this is non-atomic |
protected Astro |
leafInternal(AstroTag tag,
Object optData,
SourceSpan optSpan)
Actually makes the kind of leaf this builder makes. |
Object |
list()
Enabled: Returns a new empty FlexList that can be consumed by further productions. |
Astro |
term(Astro functor,
Object args)
Enabled: @param functor :Term with no arguments |
String |
toString()
Suppressed: |
Object |
with(Object list,
AstroArg next)
Enabled: 'list' is consumed (should no longer be considered valid by the caller) in order to efficiently produce the output. |
Methods inherited from class org.quasiliteral.astro.BaseBuilder |
bag, getSchema, leafChar, leafData, leafFloat64, leafInteger, leafLong, leafString, leafTag, leafTwine, list, list, list, list, start, term, tuple, unpack |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final TermBuilder FOR_TERMS
Constructor Detail |
public TermBuilder(AstroSchema schema)
Method Detail |
public String toString()
toString
in class Object
protected Astro leafInternal(AstroTag tag, Object optData, SourceSpan optSpan)
BaseBuilder
This is '*Internal' and 'protected' because it assumes that the general invariants among the arguments are already ensured. It is up to the callers of leafInternal to ensure this.
leafInternal
in class BaseBuilder
tag
- Identifies a token type in a particular grammar or set
of related grammars.optData
- null, or a Character
,
BigInteger
, Double
,
or Twine
presumably calculated from lexing this
token. If not null, then if the tag is the
corresponding literal-type-tag, then this is still a
leaf. Otherwise, it's a composite.public Astro composite(AstroTag tag, Object data, SourceSpan optSpan)
composite
in interface AstroBuilder
composite
in class BaseBuilder
data
- Nust not be null
public Astro term(Astro functor, Object args)
args
- :(EList of(Term))
public Object list()
public Object with(Object list, AstroArg next)
In fact, this simply pushes 'next' onto 'list' and returns 'list'
list
- :(EList of(Term))next
- :Term
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |