}
private static Expression parseLiteralExpression(ParsingTools stream) throws IOException {
stream.ignoreBlanks();
if (stream.isEqualTo('(')) {
Expression expr = parseExpression(stream);
stream.ignoreBlanks();
if (!stream.isEqualTo(')')) {
throw new ParsingException(stream, stream.syntaxError("')' expected"));
}
return expr;
} else if (stream.isEqualTo('!')) {
Expression expr = parseLiteralExpression(stream);
return new NotExpression(expr);
} else if (stream.isEqualTo('*')) {
return new StarLiteral();
} else if (stream.isEqualTo('[')) {
ArrayExpression expr = new ArrayExpression();
stream.ignoreBlanks();
if (!stream.isEqualTo(']')) {
Expression item = parseExpression(stream);
expr.addItem(item);
stream.ignoreBlanks();
while (stream.isEqualTo(',')) {
item = parseExpression(stream);
expr.addItem(item);