Package org.staccato
Class IVLSubparser
- java.lang.Object
-
- org.staccato.IVLSubparser
-
-
Field Summary
Fields Modifier and Type Field Description static char
INSTRUMENT
static char
LAYER
static char
VOICE
-
Constructor Summary
Constructors Constructor Description IVLSubparser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IVLSubparser
getInstance()
Token.TokenType
getTokenType(java.lang.String tokenString)
Asks the subparser to provide a TokenType for the given token.byte
getValue(java.lang.String ivl, StaccatoParserContext context)
Given a string like "V0" or "I[Piano]", this method will return the value of the tokenboolean
matches(java.lang.String music)
Indicates whether the subparser should be responsible for parsing the given music string.int
parse(java.lang.String music, StaccatoParserContext context)
Parses the given music string.static void
populateContext(StaccatoParserContext context)
-
-
-
Field Detail
-
INSTRUMENT
public static final char INSTRUMENT
- See Also:
- Constant Field Values
-
LAYER
public static final char LAYER
- See Also:
- Constant Field Values
-
VOICE
public static final char VOICE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static IVLSubparser getInstance()
-
matches
public boolean matches(java.lang.String music)
Description copied from interface:Subparser
Indicates whether the subparser should be responsible for parsing the given music string.
-
getTokenType
public Token.TokenType getTokenType(java.lang.String tokenString)
Description copied from interface:Subparser
Asks the subparser to provide a TokenType for the given token.- Specified by:
getTokenType
in interfaceSubparser
- Parameters:
tokenString
- The Staccato token to map to a type
-
parse
public int parse(java.lang.String music, StaccatoParserContext context)
Description copied from interface:Subparser
Parses the given music string.
-
getValue
public byte getValue(java.lang.String ivl, StaccatoParserContext context)
Given a string like "V0" or "I[Piano]", this method will return the value of the token
-
populateContext
public static void populateContext(StaccatoParserContext context)
-
-