|
|||||||||||
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.antlr.ASTBuilder
Untamed: The default implementation (and default superclass) for implementing AstroBuilder simply, for building AstroAST-trees with AstroToken leaves.
The type parameterization of AstroBuilder is:
Leaf is AstroToken Node is AstroAST Arg is AstroAST Args is null (for empty list) or AstroAST (for it and its siblings).
Field Summary |
Fields inherited from class org.quasiliteral.astro.BaseBuilder |
|
Constructor Summary | |
ASTBuilder(AstroSchema schema)
Enabled: |
Method Summary | |
protected Astro |
leafInternal(AstroTag tag,
Object optData,
SourceSpan optSpan)
Actually makes the kind of leaf this builder makes. |
Object |
list()
Enabled: @return null |
Astro |
term(Astro functor,
Object optArgs)
Enabled: @param functor :(AstroAST | AstroToken) |
String |
toString()
Suppressed: |
Object |
with(Object list,
AstroArg next)
Enabled: Modifies the last sibling in 'list' to be 'next', which itself is modified to not have any further siblings. |
Methods inherited from class org.quasiliteral.astro.BaseBuilder |
bag, composite, 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 |
Constructor Detail |
public ASTBuilder(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 term(Astro functor, Object optArgs)
optArgs
- :(AstroAST | null)
public Object list()
public Object with(Object list, AstroArg next)
list
- :(AstroAST | null)next
- :AstroAST
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |