private NPathSelectQuery ParseSelectQuery() { NPathSelectQuery query = new NPathSelectQuery(); queries.Push(query); tokenizer.GetCurrentToken("select", "Select"); NPathSelectClause selectClause = new NPathSelectClause(); ParseSelectClause(selectClause); query.Select = selectClause; tokenizer.GetCurrentToken("from", "From"); NPathFromClause fromClause = new NPathFromClause(); ParseFromClause(fromClause); query.From = fromClause; if (tokenizer.GetCurrentToken().IsType("where")) { NPathWhereClause whereClause = new NPathWhereClause(); query.Where = whereClause; ParseWhereClause(whereClause); } if (tokenizer.GetCurrentToken().IsType("order by")) // do not localize { NPathOrderByClause orderByClause = new NPathOrderByClause(); ParseOrderByClause(orderByClause); query.OrderBy = orderByClause; } return(query); }
private void ParseWhereClause(NPathWhereClause whereClause) { tokenizer.MoveNext(); whereClause.Expression = ParseBooleanExpression(); }