comparison host/libcdl/expr.cxx @ 82:6736c52df507 ecos-sw-2000-04-14

Merge from eCos master repository on 2000-04-14-13:35:46-BST
author jlarmour
date Tue, 18 Apr 2000 21:51:55 +0000
parents 435cced73e2f
children 6ed91473a1cd
comparison
equal deleted inserted replaced
81:89fef2181d7d 82:6736c52df507
1015 // <comp> ::= <shift> [<comp op> <shift>] < <= > >= 1015 // <comp> ::= <shift> [<comp op> <shift>] < <= > >=
1016 // <shift> ::= <add> [<shift op> <add>] << >> 1016 // <shift> ::= <add> [<shift op> <add>] << >>
1017 // <add> ::= <mult> [<add op> <mult>] + - 1017 // <add> ::= <mult> [<add op> <mult>] + -
1018 // <mult> ::= <unary> [<mult op> <unary>] * / % 1018 // <mult> ::= <unary> [<mult op> <unary>] * / %
1019 // <unary> ::= -<unary> | +<unary> | !<unary> | *<unary> | ?<unary> | 1019 // <unary> ::= -<unary> | +<unary> | !<unary> | *<unary> | ?<unary> |
1020 // ~<unary> |
1020 // <string constant> | <integer constant> | 1021 // <string constant> | <integer constant> |
1021 // <double constant> | <reference> | 1022 // <double constant> | <reference> |
1022 // ( <expression> ) 1023 // ( <expression> )
1023 // 1024 //
1024 // There are separate functions for each of these terms. 1025 // There are separate functions for each of these terms.
2245 2246
2246 // Either there has already been a parsing or out-of-memory 2247 // Either there has already been a parsing or out-of-memory
2247 // exception, or we should be at the end of the expression string. 2248 // exception, or we should be at the end of the expression string.
2248 if (CdlExprOp_EOD != next_op) { 2249 if (CdlExprOp_EOD != next_op) {
2249 delete result; 2250 delete result;
2250 throw CdlParseException("unexpected data at end of expression.\n" + get_error_location()); 2251 throw CdlParseException("Unexpected data at end of expression.\n" + get_error_location());
2251 } 2252 }
2252 2253
2253 // Keep a copy of the original string for diagnostics purposes. 2254 // Keep a copy of the original string for diagnostics purposes.
2254 result->expression_string = data; 2255 result->expression_string = data;
2255 2256
2787 x1 = x2; 2788 x1 = x2;
2788 x2 = tmp; 2789 x2 = tmp;
2789 } 2790 }
2790 result.double_ranges.push_back(std::make_pair(x1, x2)); 2791 result.double_ranges.push_back(std::make_pair(x1, x2));
2791 } else { 2792 } else {
2792 throw CdlEvalException("range expression involves non-numerical limits"); 2793 throw CdlEvalException("Range expression involves non-numerical limits");
2793 } 2794 }
2794 } 2795 }
2795 2796
2796 // Any problems would have resulted in an exception. If there 2797 // Any problems would have resulted in an exception. If there
2797 // was a previous EvalExeption for this property, it is no 2798 // was a previous EvalExeption for this property, it is no