|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.quasiliteral.quasiterm.QAstroArg | +--org.quasiliteral.quasiterm.QSome
Untamed:
Field Summary | |
private QAstroArg |
myOptSubPattern
|
private char |
myQuant
|
static StaticMaker |
QSomeMaker
Enabled: |
(package private) static long |
serialVersionUID
|
Fields inherited from class org.quasiliteral.quasiterm.QAstroArg |
EListGuard, EMPTY_INDEX, myBuilder, myOptSpan |
Fields inherited from interface org.erights.e.elib.tables.Selfless |
HONORARY, HONORED_NAMES |
Fields inherited from interface org.erights.e.elib.serial.PassByConstruction |
HONORARY, HONORED_NAMES |
Fields inherited from interface org.erights.e.elib.serial.Persistent |
HONORARY, HONORED_NAMES |
Constructor Summary | |
QSome(AstroBuilder builder,
QAstroArg optSubPattern,
char quant,
SourceSpan optSpan)
Enabled: |
Method Summary | |
(package private) void |
endShape(FlexList optBindings,
int[] prefix,
int shape)
For this subtree and this index elements, 'shape' is the number of index elements that have been successfully enumerated. |
int |
getHeight()
Enabled: If I have a sub-pattern, my height is the same as its. |
Object[] |
getSpreadUncall()
Enabled: Uses 'QSomeMaker(myBuilder, myOptSubPattern, myQuant, myOptSpan)' |
private static boolean |
inBounds(int num,
char quant)
|
int |
matchBindSlice(ConstList args,
ConstList specimenList,
FlexList bindings,
int[] index)
Enabled: |
void |
prettyPrintOn(TextWriter out)
Enabled: |
AstroArg |
qbuild(QuasiBuilder qbuilder)
Enabled: |
(package private) int |
startShape(ConstList args,
FlexList optBindings,
int[] prefix,
int shapeSoFar)
For this substree and this index-prefix, what's the most number of index elements that should be enumerated? |
ConstList |
substSlice(ConstList args,
int[] index)
Enabled: |
Methods inherited from class org.quasiliteral.quasiterm.QAstroArg |
__printOn, asText, getOptSpan, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
static final long serialVersionUID
public static final StaticMaker QSomeMaker
private final QAstroArg myOptSubPattern
private final char myQuant
Constructor Detail |
public QSome(AstroBuilder builder, QAstroArg optSubPattern, char quant, SourceSpan optSpan)
quant
- One of '?', '+', or '*'.Method Detail |
public Object[] getSpreadUncall()
private static boolean inBounds(int num, char quant)
public ConstList substSlice(ConstList args, int[] index)
substSlice
in class QAstroArg
index
- Further indexes after a hole's hole-num. For example,
If a dollar-hole's hole-num is 3 and index is [4,5], then
the dollar-hole would evaluate to args[3][4][5].
public int matchBindSlice(ConstList args, ConstList specimenList, FlexList bindings, int[] index)
matchBindSlice
in class QAstroArg
args
- See the doc on 'args' in #substitute(Object[],
String)
specimenList
- :(ConstList of(Astro))bindings
- Like 'args', but by extraction from specimenindex
- Further indexes after a hole's hole-num. For example,
If a dollar-hole's hole-num is 3 and index is [4,5], then
the dollar-hole would access args[3][4][5]. Similarly,
an at-hole with hole-num 3 would store into
bindings[3][4][5].
int startShape(ConstList args, FlexList optBindings, int[] prefix, int shapeSoFar)
QAstroArg
If this subtree has no dollar-holes, it should just return shapeSoFar. The initial shapeSoFar is -1 (meaning "indeterminate"), so a tree with no dollar-holes will just return -1. An non-ranking inner node (eg, a QTerm) just asks all its children, passing to each the shapeSoFar from the previous.
All the rest of the semantics is specific to dollar-hole, at-hole, or to raking nodes, so see the documentation there.
startShape
in class QAstroArg
void endShape(FlexList optBindings, int[] prefix, int shape)
QAstroArg
For each prefix, startShape and endShape form the openning and closing brackets around calls to matchBindSlice or substSlice.
endShape
in class QAstroArg
public AstroArg qbuild(QuasiBuilder qbuilder)
qbuild
in class QAstroArg
public int getHeight()
Otherwise, my height is 1, which is the height of a leaf.
getHeight
in class QAstroArg
public void prettyPrintOn(TextWriter out) throws IOException
prettyPrintOn
in class QAstroArg
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |