}
Tokenizer tok = new Tokenizer(s);
while(tok.hasNext()) {
String t = tok.nextToken();
if(t.equals("{")) {
if(!tok.hasNext()) throw new DexteritySyntaxException("untermiated xpath phrase");
t = tok.nextToken();
if(t.equals("}")) {
list.add(new PathEval(".",XPATH));
} else {
if(t.length() == 0) t = ".";
list.add(new PathEval(t,XPATH));
if(!"}".equals(tok.nextToken()))
throw new DexteritySyntaxException("failed to close expression phrase");
}
}
else if(t.equals("{{")) {
if(!tok.hasNext()) throw new DexteritySyntaxException("untermiated lookup phrase");
t = tok.nextToken();
if(t.equals("}}")) {
list.add(new PathEval(".",LOOKUP));
} else {
if(t.length() == 0) t = ".";
list.add(new PathEval(t,LOOKUP));
if(!"}}".equals(tok.nextToken()))
throw new DexteritySyntaxException("failed to close lookup phrase");
}
}
else {
list.add(new PathEval(t,LITERAL));
}