public void addTrace(List<Label> trace, boolean positive);
}
public static void parseSequenceOfTraces(String traces,Configuration config,TraceAdder collector)
{
Lexer lexer = ErlangLabel.buildLexer(traces);
int match = lexer.getMatchType();
while(match > 0)
{
Boolean positiveNegative = null;
if (match == ErlangLabel.erlPlus)
positiveNegative = true;
else
if (match == ErlangLabel.erlMinus)
positiveNegative = false;
else
if (match != ErlangLabel.erlComma && lexer.getLastMatchType() != ErlangLabel.erlSpaces)
throw new IllegalArgumentException("a collection of traces should start with either "+cmdPositive+" or "+cmdNegative+", got"+lexer.getMatch()+" in "+lexer.remaining());
if (positiveNegative != null)
{
for(List<Label> sequence:StatechumXML.readSequenceList(ErlangLabel.parseFirstTermInText(lexer),config,null))
collector.addTrace(sequence, positiveNegative.booleanValue());
match = lexer.getLastMatchType();
}
else match = lexer.getMatchType();
}
}