Commit Graph

12 Commits

Author SHA1 Message Date
Zheng, Lei
1f41f6f088 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
asapelkin
5a75d2ff45 removed useless std::move on const and unmovable objects 2019-11-21 17:49:57 +01:00
Zheng, Lei
36f7098257 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
8cbdc3ad5d 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
ced27a69c6 PropertyExpressionEngine: convert to link type property
PropertyExpressionEngine is changed to derived from a new class
PropertyExpressionContainer, which is in turn derives from
PropertyXLinkContainer. This makes PropertyExpressionEngine a link type
property that is capable of external linking. It now uses the unified
link property APIs for dependency management and tracking of object
life time, re-labeling, etc.

ObjectIdentifier is modified to support sub-object reference, but is
not exposed to end-user, because expression syntax is kept mostly
unchanged, which will be submitted in future PR. There is, however,
one small change in expression syntax (ExpressionParser.y) to introduce
local property reference to avoid ambiguity mentioned in
FreeCAD/FreeCAD#1619

Modified Expression/ExpressionModifier interface to support various link
property API for link modification.
2019-08-17 14:52:09 +02:00
wandererfan
ea4ac8ff68 Revert Erroneous Change to parser
- ExpressionParser.y changed in error by commit
  00e6376c.  Regen ExpressionParser.tab.c and
  lex.ExpressionParser.c
2018-12-14 19:30:49 +01:00
wmayer
47b41a7883 fixes #0002460: Use keyword 'explicit' for Quantity constructor 2016-11-05 23:21:42 +01:00
Eivind Kvedalen
4f7470c5e8 Expressions: Simpified parser, fixed precedence (parentheses) 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
b5e44436f1 Expressions: Added support for aggregate functions and ranges. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
d68b72e523 Expressions: Changed precedence of ?, :, EQ, NEQ, LT, GT, GTE, and LTE. 2016-03-15 18:28:23 +01:00
Eivind Kvedalen
e063c25b69 Expressions: Turned off debug output/tracing for expression parser. 2016-03-08 16:09:26 +01:00
Eivind Kvedalen
ae388d26ea Added Expression classes to App directory. Added Expression interface to Property base class. 2015-09-21 14:51:02 +02:00