if (identifierEquals("MAIN")) {
lexer.nextToken();
mainModel.setMainModelName(expr());
}
ModelColumnClause modelColumnClause = new ModelColumnClause();
parseQueryPartitionClause(modelColumnClause);
mainModel.setModelColumnClause(modelColumnClause);
acceptIdentifier("DIMENSION");
accept(Token.BY);
accept(Token.LPAREN);
for (;;) {
if (lexer.token() == Token.RPAREN) {
lexer.nextToken();
break;
}
ModelColumn column = new ModelColumn();
column.setExpr(expr());
column.setAlias(as());
modelColumnClause.getDimensionByColumns().add(column);
if (lexer.token() == Token.COMMA) {
lexer.nextToken();
continue;
}
}
acceptIdentifier("MEASURES");
accept(Token.LPAREN);
for (;;) {
if (lexer.token() == Token.RPAREN) {
lexer.nextToken();
break;
}
ModelColumn column = new ModelColumn();
column.setExpr(expr());
column.setAlias(as());
modelColumnClause.getMeasuresColumns().add(column);
if (lexer.token() == Token.COMMA) {
lexer.nextToken();
continue;
}