Commit Graph

11 Commits

Author SHA1 Message Date
asapelkin
bbbabf99ae removed useless std::move on const and unmovable objects 2019-11-21 17:49:57 +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
93e60caa35 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
be23cf133a 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
9fe82bfbb9 fixes #0002460: Use keyword 'explicit' for Quantity constructor 2016-11-05 23:21:42 +01:00
Eivind Kvedalen
c506881614 Expressions: Simpified parser, fixed precedence (parentheses) 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
08692f811b Expressions: Added support for aggregate functions and ranges. 2016-04-02 12:01:04 +02:00
Eivind Kvedalen
9d617ce4c8 Expressions: Changed precedence of ?, :, EQ, NEQ, LT, GT, GTE, and LTE. 2016-03-15 18:28:23 +01:00
Eivind Kvedalen
34135e5d2e Expressions: Turned off debug output/tracing for expression parser. 2016-03-08 16:09:26 +01: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