Commit Graph

20 Commits

Author SHA1 Message Date
Zheng, Lei
3beb1bff21 App: improve FunctionExpression forward compatibility
Remove runtime check when constructing FunctionExpression, in order to
support future built-in function. Exception will be thrown when
evaluating the expression to inform user about the error.
2020-06-03 22:18:39 +02:00
donovaly
66354b3c58 add units Gauss, Weber and Oersted 2020-01-07 07:36:22 -03:00
donovaly
ca07b05fab ExpressionParser.l: fix a typo 2020-01-05 15:00:46 +01:00
donovaly
05dadb4c75 add the units Ohm and Siemens 2020-01-05 15:00:46 +01:00
luz.paz
4f308dc03c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
donovaly
6aeb0910b8 cosmetics to keep the overview 2019-12-24 13:31:00 +01:00
donovaly
cd8b63028c missing parts from from commit d9d903faea
- also add keV and MeV since these are the units used in practice
2019-12-24 13:31:00 +01:00
donovaly
9c707479a6 also add unit THz as requested 2019-12-23 16:49:45 +01:00
donovaly
63bc9c5683 add units Mpsi, cal and kcal
- also ass missing parts from commit d7ca604c
2019-12-23 16:49:45 +01:00
donovaly
2949afb55b add mJ and kW
- also some fixes
- add conversions for forces
2019-12-19 13:31:12 +01:00
donovaly
82dc8e88f5 add the following units:
- mmol
- ml
- bar
- mbar
- kJ
- kWh
- eV
- C
- T
- F (p, n, u, m)
- H (n, u, m)
2019-12-19 13:31:12 +01:00
Zheng, Lei
a1417c5ffa App: extend Expression syntax
* Support sub-object reference syntax using the following syntax,
    Part.<<Box.>>.Placement
  or, with sub-object label referencing
    Part.<<$Cube.>>.Placement

* Extend indexing support, including range based indexing, e.g.
    A1[B2+1][C3][D4:-1]

* Add new constants, None, True, true, False, false.
2019-09-28 15:31:24 +02:00
Zheng, Lei
d141975701 App: use Python number protocol in Expression
This adds support to do mul/div with matrix and vector, as well as
Python formated string with operator %.
2019-09-28 15:30:34 +02:00
Zheng, Lei
278e933527 App: allow starting '_' in an expression identifier
It's a signle line change in the flex source, bug a big change in the
generated source.
2019-08-30 14:47:53 +02:00
wandererfan
1b854e029b Add support for DMS angles to Expressions 2018-12-23 11:03:02 -02:00
wmayer
1673ab801e use specialized exception classes 2017-04-28 18:49:11 +02:00
Eivind Kvedalen
08692f811b Expressions: Added support for aggregate functions and ranges. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
8ce2f16759 Expressions: Added code to throw under/overflow exceptions. 2016-03-08 16:09:29 +01:00
Eivind Kvedalen
7b39e233e3 Expression parser: Fixed parsing of numbers like 2e3 (with e/E, but without decimal part). 2015-09-23 20:05:01 +02:00
Eivind Kvedalen
722a40dd41 Added Expression classes to App directory. Added Expression interface to Property base class. 2015-09-21 14:51:02 +02:00