{
// IN ((literal|parameter) [, (literal|parameter)])
processPrimary();
if (stack.peek() == null)
{
throw new QueryCompilerSyntaxException("Expected literal|parameter but got " +
p.remaining(), p.getIndex(), p.getInput());
}
// Generate node for comparison with this value
Node valueNode = stack.pop();
Node compareNode = new Node(Node.OPERATOR, (not ? "!=" : "=="));
compareNode.appendChildNode(inputNode);
compareNode.appendChildNode(valueNode);
if (inNode == null)
{
inNode = compareNode;
}
else
{
Node newInNode = new Node(Node.OPERATOR, (not ? "&&" : "||"));
newInNode.appendChildNode(inNode);
newInNode.appendChildNode(compareNode);
inNode = newInNode;
}
} while (p.parseChar(','));
if (!p.parseChar(')'))
{
throw new QueryCompilerSyntaxException("Expected: ')' but got " + p.remaining(),
p.getIndex(), p.getInput());
}
stack.push(inNode);
}