|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.quasiliteral.astro.BaseBuilder
Untamed:
Field Summary | |
private AstroSchema |
mySchema
|
Constructor Summary | |
protected |
BaseBuilder(AstroSchema schema)
|
Method Summary | |
Astro |
bag(Object args)
Enabled: |
Astro |
composite(AstroTag tag,
Object data,
SourceSpan optSpan)
Enabled: Returns a complex token rather than a AST. |
AstroSchema |
getSchema()
Enabled: |
Astro |
leafChar(char data,
SourceSpan optSpan)
Enabled: |
Astro |
leafData(Object data,
SourceSpan optSpan)
Enabled: @param data Must not be null |
Astro |
leafFloat64(double data,
SourceSpan optSpan)
Enabled: |
Astro |
leafInteger(BigInteger data,
SourceSpan optSpan)
Enabled: |
protected abstract Astro |
leafInternal(AstroTag tag,
Object optData,
SourceSpan optSpan)
Actually makes the kind of leaf this builder makes. |
Astro |
leafLong(long data,
SourceSpan optSpan)
Enabled: |
Astro |
leafString(String data,
SourceSpan optSpan)
Enabled: |
Astro |
leafTag(AstroTag tag,
SourceSpan optSource)
Enabled: @return :AstroToken |
Astro |
leafTwine(Twine data,
SourceSpan optSpan)
Enabled: |
Object |
list(AstroArg first)
Enabled: |
Object |
list(AstroArg first,
AstroArg second)
Enabled: |
Object |
list(AstroArg first,
AstroArg second,
AstroArg third)
Enabled: |
Object |
list(AstroArg first,
AstroArg second,
AstroArg third,
AstroArg fourth)
Enabled: |
Astro |
start(Astro top)
Enabled: Just returns top |
Astro |
term(Astro functor)
Enabled: |
Astro |
tuple(Object args)
Enabled: |
Object |
unpack(Astro litString)
Enabled: |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.quasiliteral.astro.AstroBuilder |
list, term, with |
Field Detail |
private final AstroSchema mySchema
Constructor Detail |
protected BaseBuilder(AstroSchema schema)
Method Detail |
public AstroSchema getSchema()
getSchema
in interface AstroBuilder
public Astro start(Astro top)
start
in interface AstroBuilder
protected abstract Astro leafInternal(AstroTag tag, Object optData, SourceSpan optSpan)
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.
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 leafTag(AstroTag tag, SourceSpan optSource)
leafTag
in interface AstroBuilder
public Astro composite(AstroTag tag, Object data, SourceSpan optSpan)
composite
in interface AstroBuilder
data
- Nust not be null
public Astro leafData(Object data, SourceSpan optSpan)
leafData
in interface AstroBuilder
public Astro leafChar(char data, SourceSpan optSpan)
leafChar
in interface AstroBuilder
public Astro leafLong(long data, SourceSpan optSpan)
leafLong
in interface AstroBuilder
public Astro leafInteger(BigInteger data, SourceSpan optSpan)
leafInteger
in interface AstroBuilder
public Astro leafFloat64(double data, SourceSpan optSpan)
leafFloat64
in interface AstroBuilder
public Astro leafString(String data, SourceSpan optSpan)
leafString
in interface AstroBuilder
public Astro leafTwine(Twine data, SourceSpan optSpan)
leafTwine
in interface AstroBuilder
public Astro term(Astro functor)
term
in interface AstroBuilder
public Astro tuple(Object args)
tuple
in interface AstroBuilder
public Astro bag(Object args)
bag
in interface AstroBuilder
public Object list(AstroArg first)
list
in interface AstroBuilder
public Object list(AstroArg first, AstroArg second)
list
in interface AstroBuilder
public Object list(AstroArg first, AstroArg second, AstroArg third)
list
in interface AstroBuilder
public Object list(AstroArg first, AstroArg second, AstroArg third, AstroArg fourth)
list
in interface AstroBuilder
public Object unpack(Astro litString)
unpack
in interface AstroBuilder
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |