Package org.staccato
Class FunctionSubparser
- java.lang.Object
-
- org.staccato.FunctionSubparser
-
-
Field Summary
Fields Modifier and Type Field Description static charFUNCTION
-
Constructor Summary
Constructors Constructor Description FunctionSubparser()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgenerateFunctionCall(java.lang.String functionName, byte... vals)static java.lang.StringgenerateFunctionCall(java.lang.String functionName, java.lang.Object val)static java.lang.StringgenerateParenParamIfNecessary(java.lang.String functionId, java.lang.String value)static FunctionSubparsergetInstance()Token.TokenTypegetTokenType(java.lang.String tokenString)Asks the subparser to provide a TokenType for the given token.booleanmatches(java.lang.String music)Indicates whether the subparser should be responsible for parsing the given music string.intparse(java.lang.String music, StaccatoParserContext context)Parses the given music string.
-
-
-
Field Detail
-
FUNCTION
public static final char FUNCTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static FunctionSubparser getInstance()
-
matches
public boolean matches(java.lang.String music)
Description copied from interface:SubparserIndicates 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:SubparserAsks the subparser to provide a TokenType for the given token.- Specified by:
getTokenTypein 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:SubparserParses the given music string.
-
generateFunctionCall
public static java.lang.String generateFunctionCall(java.lang.String functionName, java.lang.Object val)
-
generateFunctionCall
public static java.lang.String generateFunctionCall(java.lang.String functionName, byte... vals)
-
generateParenParamIfNecessary
public static java.lang.String generateParenParamIfNecessary(java.lang.String functionId, java.lang.String value)
-
-