* @return
* @throws TikzParserException
*/
private TikzParameters parseParameters() throws TikzParserException {
//int start = offset;
TikzParameters tp = new TikzParameters();
// Make sure the first character is the parameter prefix
if(readChar() != TikzParameters.PARAMETERS_PREFIX) {
throw new TikzParserException( "parameters must start with "
+ TikzParameters.PARAMETERS_PREFIX);
}
// Go ahead with next char
offset++;
// Then read all key-values-pairs
String params
= readWord(TikzParameters.PARAMETERS_SUFFIX);
String[] keyvals
= params.split(String.valueOf(TikzParameters.PARAMETERS_SEPARATOR));
for(String keyval : keyvals) {
/*
* TODO
* Need SyntaxTikzParameters instead of TikzParameters
* so the SyntaxKeyValue can be stored.
*/
tp.addKeyValue(parseKeyValue(keyval).getRepresented());
}
// Make sure the last character is the parameter suffix
if(skipChar() != TikzParameters.PARAMETERS_SUFFIX) {
throw new TikzParserException( "parameters must end with "