Skip to content

Commit

Permalink
Fix formatting in parser.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@130 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Nov 3, 2008
1 parent 95940ce commit 94e5496
Showing 1 changed file with 44 additions and 16 deletions.
60 changes: 44 additions & 16 deletions src/org/olap4j/mdx/parser/impl/DefaultMdxParser.cup
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Agreement, available at the following URL:
// http://www.opensource.org/licenses/cpl.html.
// Copyright (C) 1999-2002 Kana Software, Inc.
// Copyright (C) 2002-2006 Julian Hyde and others.
// Copyright (C) 2002-2008 Julian Hyde and others.
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
Expand Down Expand Up @@ -210,7 +210,7 @@ parser code {:
public void unrecovered_syntax_error(Symbol cur_token)
throws java.lang.Exception
{
report_fatal_error( "Couldn't repair and continue parse", cur_token);
report_fatal_error("Couldn't repair and continue parse", cur_token);
}

/**
Expand Down Expand Up @@ -1048,12 +1048,24 @@ else_clause_opt ::=
// | <greater_than_or_equals_operator>
// "IS" is not a comp_op because of conflict with "<expr> IS EMPTY"
comp_op ::=
EQ {: RESULT = "="; :}
| NE {: RESULT = "<>"; :}
| LT {: RESULT = "<"; :}
| GT {: RESULT = ">"; :}
| LE {: RESULT = "<="; :}
| GE {: RESULT = ">="; :}
EQ {:
RESULT = "=";
:}
| NE {:
RESULT = "<>";
:}
| LT {:
RESULT = "<";
:}
| GT {:
RESULT = ">";
:}
| LE {:
RESULT = "<=";
:}
| GE {:
RESULT = ">=";
:}
;
//
// <equals_operator> ::= =
Expand Down Expand Up @@ -1257,7 +1269,9 @@ exp_list ::=
// jhyde: The above is wrong... you can omit 'WHERE'.
statement ::=
select_statement
| _VALUE_EXPRESSION value_expression:e {: RESULT = (ParseTreeNode) e; :}
| _VALUE_EXPRESSION value_expression:e {:
RESULT = (ParseTreeNode) e;
:}
;

select_statement ::=
Expand Down Expand Up @@ -1296,7 +1310,9 @@ axis_specification_list ::=
;
where_clause_opt ::=
/* empty */
| WHERE filter_specification:s {: RESULT = s; :};
| WHERE filter_specification:s {:
RESULT = s;
:};
cell_props_opt ::=
/* empty */ {:
RESULT = new LinkedList();
Expand Down Expand Up @@ -1441,8 +1457,12 @@ axis_specification ::=
;

non_empty_opt ::=
/* empty */ {: RESULT = Boolean.FALSE; :}
| NON EMPTY {: RESULT = Boolean.TRUE; :}
/* empty */ {:
RESULT = Boolean.FALSE;
:}
| NON EMPTY {:
RESULT = Boolean.TRUE;
:}
;
dim_props_opt ::=
/* empty */
Expand All @@ -1456,17 +1476,23 @@ dim_props_opt ::=
// | SECTIONS
// | AXIS(<index>)
axis_name ::=
identifier:i {: RESULT = i.getName(); :}
identifier:i {:
RESULT = i.getName();
:}
;

axis_number ::=
NUMBER
| AXIS LPAREN NUMBER:n RPAREN {: RESULT = n; :}
| AXIS LPAREN NUMBER:n RPAREN {:
RESULT = n;
:}
;
//
// <dim_props> ::= [DIMENSION] PROPERTIES <property> [, <property>...]
dim_props ::=
dimension_opt PROPERTIES property_list:pl {: RESULT = pl; :}
dimension_opt PROPERTIES property_list:pl {:
RESULT = pl;
:}
;
dimension_opt ::=
/* empty */
Expand Down Expand Up @@ -1498,7 +1524,9 @@ filter_specification ::=
//
// <cell_props> ::= [CELL] PROPERTIES <cell_property> [, <cell_property>...]
cell_props ::=
cell_opt PROPERTIES cell_property_list:p1 {: RESULT = p1; :}
cell_opt PROPERTIES cell_property_list:p1 {:
RESULT = p1;
:}
;
cell_opt ::=
/* empty */
Expand Down

0 comments on commit 94e5496

Please sign in to comment.