This website requires JavaScript.
6bb891e09d
term.go: Error messagge about incompatible types now truncates long values
Celestino Amoroso
2024-05-20 05:26:33 +0200
1c4ffd7d64
formatter.go: Truncate function and number type names
Celestino Amoroso
2024-05-20 05:25:04 +0200
b92b19e1dd
New interface to Typer: the function TypeName() returns a more readable type name
Celestino Amoroso
2024-05-19 02:23:28 +0200
9967918418
operator-sum.go: adding item to a list is no more allowed. The sum operator '+' now ca only join two list.
Celestino Amoroso
2024-05-19 02:20:36 +0200
6c14c07d66
operand-iterator.go: adapted to the new DictType
Celestino Amoroso
2024-05-19 01:47:06 +0200
9ea170e53b
new operator 'in': it returns true if a item belongs to a list or if a key belongs to a dict
Celestino Amoroso
2024-05-19 01:44:50 +0200
a543360151
when the list value involved in an insert or append operations (directly) comes from a variable, that variable receives the result list
Celestino Amoroso
2024-05-19 01:42:15 +0200
24a25bbf94
adapted and enhanced the dict operations to make them compatible with the new DictType
Celestino Amoroso
2024-05-19 01:38:07 +0200
d6a1607041
The content of round bracket now returns an expressione term. This way the content is decoupled from external terms.
Celestino Amoroso
2024-05-19 01:34:07 +0200
4d43ab2c2f
context.go: setVar() renamed as UnsafeSetVar()
Celestino Amoroso
2024-05-19 01:27:44 +0200
9bd4a0ba23
utils.go:fromGenericAny() now supports also ListType and DictType
Celestino Amoroso
2024-05-19 01:21:06 +0200
2b184cf3f2
operand-map.go replaced by operand-dict.go
Celestino Amoroso
2024-05-19 01:20:04 +0200
263e419d9a
operand-map.go: to be removed
Celestino Amoroso
2024-05-18 08:54:18 +0200
c39970fa7e
new operator 'in' added. It check if an item is member of a list, or if a key is contained in a dictionary
v0.11.0
Celestino Amoroso
2024-05-18 07:47:41 +0200
14bb9e942b
operator-fraction.go: added link to a tutorial about fractions
Celestino Amoroso
2024-05-18 07:07:17 +0200
9451958218
utils_test.go: new test file
Celestino Amoroso
2024-05-18 07:06:06 +0200
91fdc1926e
Doc: updated last change date and time
Celestino Amoroso
2024-05-17 15:48:17 +0200
9a3abdf1b6
Doc: more details on the syntax of the selector and variable default operators
Celestino Amoroso
2024-05-17 15:46:56 +0200
ac3e690f87
Doc: more details on the syntax of the dictionaries, variables and multi-expressions
Celestino Amoroso
2024-05-17 07:31:13 +0200
f0a152a17a
Doc: more details on the syntax of the numbers, strings and boolean
v0.10.1
Celestino Amoroso
2024-05-16 07:11:20 +0200
ca89931ca9
Doc: more details on the syntax of the numbers
Celestino Amoroso
2024-05-15 22:06:26 +0200
d2e8aed4f7
parser_test.go: test on divisopn by-zero
Celestino Amoroso
2024-05-15 22:05:49 +0200
8138cd2a80
operand-func.go: commented the errors moved to common-errors..go
Celestino Amoroso
2024-05-15 22:04:38 +0200
6786666cf4
funcs_test.go: added some tests
Celestino Amoroso
2024-05-15 22:03:41 +0200
35e794701a
func-string.go: commented out the param count check
Celestino Amoroso
2024-05-15 22:03:03 +0200
52ef134be6
func-base.go: commented out the param count check
Celestino Amoroso
2024-05-15 22:02:07 +0200
624318d84e
common-errors.go: moved here some errors
Celestino Amoroso
2024-05-15 22:01:13 +0200
aa1338cd51
Fixed special convertion case from decimal 'x.y()' to fraction
Celestino Amoroso
2024-05-15 06:45:40 +0200
c9db4b84e3
funcs_test.go: added some tests
v0.10.0
Celestino Amoroso
2024-05-14 05:41:53 +0200
e7e9330b71
scanner: Fixed decimal number parser; it didn't save parenthesis around period part
Celestino Amoroso
2024-05-14 05:41:10 +0200
8eb25bbc86
operand-const.go -> operand-literal.go
Celestino Amoroso
2024-05-14 04:59:55 +0200
efc92d434b
the sum operation now supports dicts too
Celestino Amoroso
2024-05-14 04:56:24 +0200
4151f3f5e2
literals of rational number, e.g. 1.2(3), are now supported and are evaluated as fractions
Celestino Amoroso
2024-05-14 04:55:16 +0200
f028485caa
added functions to get the fenerating fraction of a decimal number
v0.9.0
Celestino Amoroso
2024-05-13 14:24:37 +0200
ab07405cda
common-errors.go: added errDivisionByZero()
Celestino Amoroso
2024-05-13 14:23:21 +0200
47be0c66cf
Doc: some typo and better examples
Celestino Amoroso
2024-05-11 20:14:54 +0200
50e7168214
Since now builtin functions are registared in a new global context. This reduces the effort to copy the whole set of builtin functions in the context of a function call; only the called function will be copied, if it is global.
Celestino Amoroso
2024-05-11 10:45:38 +0200
0a9543543d
Remove the unused 'parent' param from the function newTerm().
Celestino Amoroso
2024-05-11 06:41:06 +0200
775751c67b
Doc: string examples
Celestino Amoroso
2024-05-11 06:35:32 +0200
4aaffd6c44
dict: implemented length of dict
v0.8.0
Celestino Amoroso
2024-05-10 09:25:18 +0200
924051fbcd
extended funcs and list tests
Celestino Amoroso
2024-05-10 09:18:32 +0200
5a9b6525a2
new function isRational() that return true is the passed value is integere or fraction
Celestino Amoroso
2024-05-10 09:17:51 +0200
8c66d90532
operator-length.go: fixed length of list
Celestino Amoroso
2024-05-10 09:16:31 +0200
4aa0113c6a
new string test file
v0.7.1
Celestino Amoroso
2024-05-10 07:33:59 +0200
d035fa0d5e
operator-dot.go: fixed string index
Celestino Amoroso
2024-05-10 07:32:45 +0200
cf73b5c98d
Doc: add link to dev-expr download page
Celestino Amoroso
2024-05-10 06:39:48 +0200
8346e28340
Doc: fixed some typo and added some list details
v0.7.0
Celestino Amoroso
2024-05-10 04:49:03 +0200
9c2eca40d7
utils.go: added IsBool() and IsFract()
Celestino Amoroso
2024-05-10 04:48:13 +0200
c3198e4c79
parser_test.go: did not show the correct section name
Celestino Amoroso
2024-05-10 04:47:34 +0200
99e0190b9c
operator-dot.go: fixed the index range checking
Celestino Amoroso
2024-05-10 04:45:51 +0200
d4f63a3837
funcs_test.go: fixed and extended
Celestino Amoroso
2024-05-10 04:44:08 +0200
389d48b646
func-base.go: added functions to check data-type of a value
Celestino Amoroso
2024-05-10 04:43:14 +0200
1f7b9131fc
The 'last' variable now also receives the value of the final expression
Celestino Amoroso
2024-05-10 04:41:26 +0200
dce49fd2b7
Doc: fractions and dictionaries
Celestino Amoroso
2024-05-09 07:20:22 +0200
8ee0bb5701
Some data-type check functions (e.g. IsInteger()) exported
v0.6.0
Celestino Amoroso
2024-05-08 07:53:01 +0200
b2b0bb04c5
formatter.go: number base options added
Celestino Amoroso
2024-05-08 07:51:38 +0200
f3abf5e77c
Doc: dev-expr description updated
Celestino Amoroso
2024-05-08 07:51:01 +0200
34b7799177
parser_test.go: test added (mixed number types)
Celestino Amoroso
2024-05-07 07:23:38 +0200
8c3c54913a
Doc: dev-expr introduction
Celestino Amoroso
2024-05-07 07:22:32 +0200
5910345c08
operator-{sum,prod}.go: Fixed sum and prod operation with a fraction and a float
Celestino Amoroso
2024-05-06 17:32:39 +0200
8b4dad1381
utils.go: new function isNumOrFract(x); it returns true if x is a float, an integer, ora a fraction
Celestino Amoroso
2024-05-06 17:31:12 +0200
6ef468408c
operator-sum.go: Fixed sum of fraction and float
Celestino Amoroso
2024-05-06 17:16:30 +0200
3a30d890c6
operator-assign.go: improvements that allow to define function aliases (TODO: maybe *funcDefFunctor else-if section can be removed
Celestino Amoroso
2024-05-06 16:01:50 +0200
71ab417a56
funcs_test.go: added many new tests
Celestino Amoroso
2024-05-06 15:32:44 +0200
7cfb89c25c
parser_test.go: removed commented code
Celestino Amoroso
2024-05-06 15:32:00 +0200
569dbfda9d
expr_test.go: removed temporary test
Celestino Amoroso
2024-05-06 15:31:28 +0200
f342dfe9f3
operand-list.go: ListType constructor functions newList() and newListA()
Celestino Amoroso
2024-05-06 15:30:23 +0200
5378952394
func-string.go: added three new functions (splitStr, startsWithStr, endsWithString) to the 'string' builtin module
Celestino Amoroso
2024-05-06 15:29:13 +0200
a9d6a82011
operand-func.go: improved error report when functions reveive less params than expected
Celestino Amoroso
2024-05-06 15:26:45 +0200
43b74131fb
dict_test.go: first draft
Celestino Amoroso
2024-05-06 10:41:08 +0200
cb0eac54b2
list_test.go: new tests on member access
Celestino Amoroso
2024-05-06 10:40:19 +0200
b219b55878
parser_test.go: refactored
Celestino Amoroso
2024-05-06 10:39:21 +0200
56c86f917e
funcs_test.go: Added Setenv("EXPR_PATH",".")
Celestino Amoroso
2024-05-06 10:38:45 +0200
539a4b44e9
new test files and some refactorings
Celestino Amoroso
2024-05-06 05:52:25 +0200
74df927179
func-import.go: renamed include() as importAll()
Celestino Amoroso
2024-05-06 05:50:36 +0200
510966c497
operator-insert.go: replaced []any with ListType
Celestino Amoroso
2024-05-06 04:43:29 +0200
c977e82d9e
doc/Expr.adoc: description of the selector operator; added operators to the priority table
Celestino Amoroso
2024-05-06 04:24:17 +0200
903f1ae1ce
adjusted some error messages and added the section name in logs
Celestino Amoroso
2024-05-06 04:21:50 +0200
9c66056c18
func-math.go: improved error messages reporting wrong datatype of items
Celestino Amoroso
2024-05-06 04:18:04 +0200
f55a48aa26
operator-dot.go: replaced []any with *ListType
Celestino Amoroso
2024-05-06 04:15:46 +0200
434ddee733
operator-context.go: changed priPrePost with priIncDec
Celestino Amoroso
2024-05-06 04:14:54 +0200
fcced6149f
operator-post-inc.go: changed priPrePost with priIncDec
Celestino Amoroso
2024-05-06 04:14:03 +0200
1f0f9cae22
term.go: priPrePost renamed as priIncDec
Celestino Amoroso
2024-05-06 04:11:43 +0200
1d8569d3a9
the function call procedure now check the number of actual parameters against the numer of formal parameters
Celestino Amoroso
2024-05-04 22:35:03 +0200
0fdd51049d
parser.go: simplified the parser of the function parameters
Celestino Amoroso
2024-05-04 19:10:02 +0200
f9ed5776cd
token.go: function IsSymbol()
Celestino Amoroso
2024-05-04 19:08:02 +0200
a2c0a24494
added symbol '..' and '...'; improved some error reports in parser.go
Celestino Amoroso
2024-05-04 18:47:00 +0200
2c5f02cc69
list iterators now support start, stop e step
Celestino Amoroso
2024-05-04 08:07:49 +0200
d9fbe6f36d
data-cursor.go: now supports the 'index' command
Celestino Amoroso
2024-05-04 01:24:13 +0200
e6174aca82
operator-length.go: now returns index+1 when used with iterators; that is the number of iterations
Celestino Amoroso
2024-05-04 01:23:32 +0200
a736bba2c7
iter-list.go: now supports the 'index' command
Celestino Amoroso
2024-05-04 01:21:36 +0200
7724cabdcc
removed commented code
Celestino Amoroso
2024-05-04 00:57:21 +0200
16557d70de
the iterator operator now can be defined providing values or a list of values directly
Celestino Amoroso
2024-05-04 00:51:15 +0200
04e71a1b3f
operator-iter-value.go: now operates on Iterator instead of *dataCursor
Celestino Amoroso
2024-05-04 00:47:20 +0200
e463bd61d8
operator-post-inc.go: now operates on Iterator instead of *dataCursor
Celestino Amoroso
2024-05-04 00:39:22 +0200
419af7bfea
data-cursor.go: reset and clean operations return (bool,error)
Celestino Amoroso
2024-05-04 00:37:31 +0200
6c604812ee
iter-list.go: implemntation of the ExtInterface and coperation reset
Celestino Amoroso
2024-05-04 00:35:27 +0200
5cf0bfbad4
func-math.go: use of ExtIterator to perform clean operation
Celestino Amoroso
2024-05-04 00:33:38 +0200
a838361ea8
operator-dot.go: specific *dataCursor case replaced by general ExtIterator
Celestino Amoroso
2024-05-04 00:30:35 +0200
0dbb0ba515
iterator.go: new interface ExtIterator derived from Iterator
Celestino Amoroso
2024-05-04 00:28:17 +0200