|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.cscott.sdr.calls.MatcherList
public class MatcherList
The MatcherList
contains matchers for various formations.
It mostly parallels FormationList
, although there are
matchers for general formations which are a combination of
several formations in the formation list.
js> MatcherList.STATIC_SQUARE.match(Formation.SQUARED_SET) AA^ AA: 3Gv 3Bv 4B> 2G< 4G> 2B< 1B^ 1G^ [3G: BELLE; 3B: BEAU; 4B: BEAU; 2G: BELLE; 4G: BELLE; 2B: BEAU; 1B: BEAU; 1G: BELLE]
js> fm = MatcherList.COUPLE.match(Formation.SQUARED_SET) AAv BB> CC< DD^ AA: 3B^ 3G^ [3B: BEAU; 3G: BELLE] BB: 4B^ 4G^ [4B: BEAU; 4G: BELLE] CC: 2B^ 2G^ [2B: BEAU; 2G: BELLE] DD: 1B^ 1G^ [1B: BEAU; 1G: BELLE] js> fm.matches.size() 4 js> fm.meta.dancers().size() 4
js> fm = MatcherList.COUPLE.match(Formation.FOUR_SQUARE) AAv BB^ AA: 3B^ 3G^ [3B: BEAU; 3G: BELLE] BB: 1B^ 1G^ [1B: BEAU; 1G: BELLE]
js> fm = MatcherList.FACING_DANCERS.match(Formation.FOUR_SQUARE) AAv BB^ AA: 1Bv 3G^ [1B: TRAILER; 3G: TRAILER] BB: 3Bv 1G^ [3B: TRAILER; 1G: TRAILER]
js> fm = MatcherList.FACING_COUPLES.match(Formation.FOUR_SQUARE) AA^ AA: 3Gv 3Bv 1B^ 1G^ [3G: BELLE,TRAILER; 3B: BEAU,TRAILER; 1B: BEAU,TRAILER; 1G: BELLE,TRAILER]
js> FormationList = FormationList.js(this); undefined; js> fm = MatcherList.RH_MINIWAVE.match(FormationList.PARALLEL_RH_WAVES) AA^ BBv CC^ DDv AA: ^ v [ph: BEAU; ph: BEAU] BB: ^ v [ph: BEAU; ph: BEAU] CC: ^ v [ph: BEAU; ph: BEAU] DD: ^ v [ph: BEAU; ph: BEAU]
Method Summary | |
---|---|
static Matcher |
mixed(String name,
TaggedFormation... goals)
|
static Matcher |
OR(String name,
List<Matcher> alternatives)
|
static Matcher |
OR(String name,
Matcher... alternatives)
The OR(java.lang.String, net.cscott.sdr.calls.Matcher...) function creates a Matcher which matches any one of
the given alternatives. |
static ExprFunc<Matcher> |
valueOf(String s)
Parse names of Matcher combination functions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Matcher ANY
public static final Matcher NONE
public static final Matcher SINGLE_DANCER
public static final Matcher GENERAL_PARTNERS
public static final Matcher GENERAL_TANDEM
public static final Matcher _1_X2
public static final Matcher COUPLE
public static final Matcher FACING_DANCERS
public static final Matcher BACK_TO_BACK_DANCERS
public static final Matcher TANDEM
public static final Matcher RH_MINIWAVE
public static final Matcher LH_MINIWAVE
public static final Matcher MINIWAVE
public static final Matcher GENERAL_LINE
public static final Matcher _1_X4
public static final Matcher _2_X2
public static final Matcher SINGLE_STATIC_SQUARE
public static final Matcher FACING_COUPLES
public static final Matcher BACK_TO_BACK_COUPLES
public static final Matcher TANDEM_COUPLES
public static final Matcher RH_OCEAN_WAVE
public static final Matcher LH_OCEAN_WAVE
public static final Matcher OCEAN_WAVE
public static final Matcher RH_BOX
public static final Matcher LH_BOX
public static final Matcher BOX
public static final Matcher INVERTED_BOX
public static final Matcher RH_IN_PINWHEEL
public static final Matcher LH_IN_PINWHEEL
public static final Matcher RH_OUT_PINWHEEL
public static final Matcher LH_OUT_PINWHEEL
public static final Matcher RH_SINGLE_QUARTER_ZEE
public static final Matcher LH_SINGLE_QUARTER_ZEE
public static final Matcher SINGLE_QUARTER_ZEE
public static final Matcher RH_SINGLE_THREE_QUARTER_ZEE
public static final Matcher LH_SINGLE_THREE_QUARTER_ZEE
public static final Matcher SINGLE_THREE_QUARTER_ZEE
public static final Matcher RH_TWO_FACED_LINE
public static final Matcher LH_TWO_FACED_LINE
public static final Matcher TWO_FACED_LINE
public static final Matcher SINGLE_INVERTED_LINE
public static final Matcher GENERAL_DIAMOND
public static final Matcher RH_DIAMOND
public static final Matcher RH_FACING_DIAMOND
public static final Matcher LH_DIAMOND
public static final Matcher LH_FACING_DIAMOND
public static final Matcher FACING_DIAMOND
public static final Matcher MIXED_FACING_DIAMOND
public static final Matcher DIAMOND
public static final Matcher MIXED_DIAMOND
public static final Matcher RH_STAR
public static final Matcher LH_STAR
public static final Matcher RH_SINGLE_PROMENADE
public static final Matcher LH_SINGLE_PROMENADE
public static final Matcher GENERAL_SINGLE_QUARTER_TAG
public static final Matcher RH_SINGLE_QUARTER_TAG
public static final Matcher LH_SINGLE_QUARTER_TAG
public static final Matcher SINGLE_QUARTER_TAG
public static final Matcher RH_SINGLE_THREE_QUARTER_TAG
public static final Matcher LH_SINGLE_THREE_QUARTER_TAG
public static final Matcher SINGLE_THREE_QUARTER_TAG
public static final Matcher _1_X8
public static final Matcher _2_X4
public static final Matcher PARALLEL_GENERAL_LINES
public static final Matcher GENERAL_COLUMNS
public static final Matcher STATIC_SQUARE
public static final Matcher STATIC_SQUARE_FACING_OUT
public static final Matcher SINGLE_FILE_PROMENADE
public static final Matcher REVERSE_SINGLE_FILE_PROMENADE
public static final Matcher RH_ALAMO_RING
public static final Matcher LH_ALAMO_RING
public static final Matcher O_SPOTS
public static final Matcher PROMENADE
public static final Matcher WRONG_WAY_PROMENADE
public static final Matcher STAR_PROMENADE
public static final Matcher WRONG_WAY_STAR_PROMENADE
public static final Matcher THAR
public static final Matcher WRONG_WAY_THAR
public static final Matcher RIGHT_AND_LEFT_GRAND
public static final Matcher RIGHT_AND_LEFT_GRAND_DIAMOND
public static final Matcher LEFT_AND_RIGHT_GRAND
public static final Matcher FACING_LINES
public static final Matcher EIGHT_CHAIN_THRU
public static final Matcher TRADE_BY
public static final Matcher DOUBLE_PASS_THRU
public static final Matcher SINGLE_DOUBLE_PASS_THRU
public static final Matcher COMPLETED_DOUBLE_PASS_THRU
public static final Matcher COMPLETED_SINGLE_DOUBLE_PASS_THRU
public static final Matcher LINES_FACING_OUT
public static final Matcher PARALLEL_RH_WAVES
public static final Matcher PARALLEL_LH_WAVES
public static final Matcher PARALLEL_WAVES
public static final Matcher PARALLEL_RH_TWO_FACED_LINES
public static final Matcher PARALLEL_LH_TWO_FACED_LINES
public static final Matcher PARALLEL_TWO_FACED_LINES
public static final Matcher RH_COLUMN
public static final Matcher LH_COLUMN
public static final Matcher COLUMN
public static final Matcher ENDS_IN_INVERTED_LINES
public static final Matcher ENDS_OUT_INVERTED_LINES
public static final Matcher INVERTED_LINES
public static final Matcher GENERAL_QUARTER_TAG
public static final Matcher RH_QUARTER_TAG
public static final Matcher LH_QUARTER_TAG
public static final Matcher QUARTER_TAG
public static final Matcher RH_THREE_QUARTER_TAG
public static final Matcher LH_THREE_QUARTER_TAG
public static final Matcher THREE_QUARTER_TAG
public static final Matcher RH_QUARTER_LINE
public static final Matcher LH_QUARTER_LINE
public static final Matcher QUARTER_LINE
public static final Matcher RH_THREE_QUARTER_LINE
public static final Matcher LH_THREE_QUARTER_LINE
public static final Matcher THREE_QUARTER_LINE
public static final Matcher RH_TWIN_DIAMONDS
public static final Matcher LH_TWIN_DIAMONDS
public static final Matcher TWIN_DIAMONDS
public static final Matcher RH_POINT_TO_POINT_DIAMONDS
public static final Matcher LH_POINT_TO_POINT_DIAMONDS
public static final Matcher POINT_TO_POINT_DIAMONDS
public static final Matcher RH_POINT_TO_POINT_FACING_DIAMONDS
public static final Matcher LH_POINT_TO_POINT_FACING_DIAMONDS
public static final Matcher POINT_TO_POINT_FACING_DIAMONDS
public static final Matcher RH_TWIN_FACING_DIAMONDS
public static final Matcher LH_TWIN_FACING_DIAMONDS
public static final Matcher TWIN_FACING_DIAMONDS
public static final Matcher TWIN_GENERAL_DIAMONDS
public static final Matcher POINT_TO_POINT_GENERAL_DIAMONDS
public static final Matcher RH_TIDAL_WAVE
public static final Matcher LH_TIDAL_WAVE
public static final Matcher TIDAL_WAVE
public static final Matcher RH_TIDAL_TWO_FACED_LINE
public static final Matcher LH_TIDAL_TWO_FACED_LINE
public static final Matcher TIDAL_TWO_FACED_LINE
public static final Matcher RH_TIDAL_LINE
public static final Matcher LH_TIDAL_LINE
public static final Matcher TIDAL_LINE
public static final Matcher GENERAL_TIDAL_LINE
public static final Matcher O_DOUBLE_PASS_THRU
public static final Matcher BUTTERFLY_DOUBLE_PASS_THRU
public static final Matcher CENTER_2
public static final Matcher CENTER_4
public static final Matcher CENTER_6
public static final Matcher CENTER_HALF
public static final Matcher SIAMESE
public static ExprFunc<Matcher> _MIXED
public static ExprFunc<Matcher> _OR
public static ExprFunc<Matcher> _CENTER
public static ExprFunc<Matcher> _ALLOW_UNMATCHED
public static ExprFunc<Matcher> _NOT_GRAND
js> FormationList = FormationList.js(this); undefined; js> e = net.cscott.sdr.calls.ast.AstNode.valueOf("(Expr not grand (Expr allow unmatched 'LH MINIWAVE))") (Expr not grand (Expr allow unmatched 'LH MINIWAVE)) js> sel = e.evaluate(java.lang.Class.forName("net.cscott.sdr.calls.Matcher"), null) not grand(allow unmatched(LH MINIWAVE)) js> SD = StandardDancer.values(); undefined js> f = FormationList.RH_TIDAL_WAVE.mapStd([SD[0],SD[1],SD[2],SD[3]]) ; f.toStringDiagram() 1B^ 1Gv 2B^ 2Gv 4G^ 4Bv 3G^ 3Bv js> sel.match(f) AA^ BB^ CCv DD^ EEv FFv AA: (unmatched) 1B^ BB: 1Gv 2B^ [1G: BELLE; 2B: BELLE] CC: (unmatched) 2G^ DD: (unmatched) 4G^ EE: 3Gv 4B^ [3G: BELLE; 4B: BELLE] FF: (unmatched) 3B^
public static final Matcher LH_3_AND_1
public static final Matcher LH_SPLIT_3_AND_1
public static final Matcher RH_3_AND_1
public static final Matcher RH_SPLIT_3_AND_1
Method Detail |
---|
public static Matcher OR(String name, Matcher... alternatives)
OR(java.lang.String, net.cscott.sdr.calls.Matcher...)
function creates a Matcher which matches any one of
the given alternatives.
js> FormationList = FormationList.js(this); undefined; js> sel = MatcherList.OR("OR(RH BOX,RH DIAMOND)", MatcherList.RH_BOX, MatcherList.RH_DIAMOND) OR(RH BOX,RH DIAMOND) js> sel.match(FormationList.RH_BOX) AA^ AA: ^ v ^ v [ph: BEAU,LEADER; ph: BEAU,TRAILER; ph: BEAU,TRAILER; ph: BEAU,LEADER] js> sel.match(FormationList.RH_DIAMOND) AA^ AA: > ^ v < [ph: POINT; ph: BEAU,CENTER; ph: BEAU,CENTER; ph: POINT]
public static Matcher OR(String name, List<Matcher> alternatives)
public static Matcher mixed(String name, TaggedFormation... goals)
public static ExprFunc<Matcher> valueOf(String s)
Matcher
combination functions.
|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |