Package org.staccato
Class IVLSubparser
java.lang.Object
org.staccato.IVLSubparser
- All Implemented Interfaces:
Subparser
Parses Instrument, Voice, and Layer tokens. Each has values that are parsed as bytes.
- Author:
- David Koelle (dkoelle@gmail.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final char
static final char
static final char
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IVLSubparser
getTokenType
(String tokenString) Asks the subparser to provide a TokenType for the given token.byte
getValue
(String ivl, StaccatoParserContext context) Given a string like "V0" or "I[Piano]", this method will return the value of the tokenboolean
Indicates whether the subparser should be responsible for parsing the given music string.int
parse
(String music, StaccatoParserContext context) Parses the given music string.static void
populateContext
(StaccatoParserContext context)
-
Field Details
-
INSTRUMENT
public static final char INSTRUMENT- See Also:
-
LAYER
public static final char LAYER- See Also:
-
VOICE
public static final char VOICE- See Also:
-
-
Constructor Details
-
IVLSubparser
public IVLSubparser()
-
-
Method Details
-
getInstance
-
matches
Description copied from interface:Subparser
Indicates whether the subparser should be responsible for parsing the given music string. -
getTokenType
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
Description copied from interface:Subparser
Parses the given music string. -
getValue
Given a string like "V0" or "I[Piano]", this method will return the value of the token -
populateContext
-