camoroso
8e596d5979
several changes:
...
1. moved scan/symbol.go to new package sym and adapted all files that reference Symbol type and its values.
2. new type interval defined by begin, end and step values.
3. replaced operator-range.go with operator-interval.go.
4. replaced range operator begin:end with begin..end..step.
5. new implementation of sub-collection extraction based on new interval literal.
2026-07-27 16:01:52 +02:00
camoroso
1055569dd6
Dict literal now accepts expressions as keys. Key values are computed at evalutetion time and still must be integer or string
2026-05-20 05:14:22 +02:00
camoroso
1aea1c14d2
LinkedList: added support for index and range extraction
2026-05-19 06:42:45 +02:00
camoroso
84b255a51b
new type LinkedList, preliminary implementation
2026-05-17 22:43:27 +02:00
camoroso
d34b9d8a48
dict: implemented sub-field access, e.g D=["sub-dict"]["sub-field"]
2026-05-17 18:57:27 +02:00
camoroso
99c1adc434
copyright header updated to 2026
2026-05-06 09:27:42 +02:00
camoroso
7f34ccf955
moved scanner sources to package 'scan'
2026-05-03 14:19:17 +02:00
camoroso
75ed88915d
ast.go, pasrse.go: fixed the recover routine
2026-05-01 17:03:44 +02:00
camoroso
edd90054d7
parser.go: added recover from panic in parser.Parse()
2026-05-01 07:24:41 +02:00
camoroso
75a3f220df
parser: token '()' returns error
2026-04-30 07:03:28 +02:00
camoroso
4d910dd069
moved a subset of source file to the kern package
2026-04-27 19:43:37 +02:00
camoroso
0f848071c2
New prefix operators ++ and --
2025-01-04 18:12:38 +01:00
camoroso
6b3351b324
new prefix operator "!" as logic NOT
2025-01-04 17:47:59 +01:00
camoroso
760c1ee6da
New bitwise XOR operator specified by symbol ^ (caret). Iterator dereference is now done by prefixed * (star)
2025-01-03 07:33:17 +01:00
camoroso
252514943e
parser.go: fix currentItem after parse a subexpr
2024-12-28 19:16:03 +01:00
camoroso
0e55f83d56
Forced the exlamation mark as a postfix operator
2024-12-26 08:57:14 +01:00
camoroso
6211be8a8f
Completed transition of the symbol '|' from fraction to operator binary or. New fraction symbol is ':'.
...
Also, fixed and improved some parsing sections concerning collection indeces and ranges
2024-12-23 06:59:39 +01:00
camoroso
a1ec0cc611
All assignment operators set the firstToken flag
2024-12-19 15:27:38 +01:00
camoroso
8e5550bfa7
New operator %=
2024-12-19 15:14:30 +01:00
camoroso
6ee21e10af
New, more flexible, parser context datatype that includes and extends
...
the previous flags allowForest and allowVarRef.
Added binary operator (work in progress).
Better implementation of +=,-=,*=, and /= (new) operators.
2024-12-19 14:48:27 +01:00
camoroso
a28d24ba68
parser.go: improved terminal symbols thanks to new symbol-map.go functions
2024-10-13 08:42:55 +02:00
camoroso
321030c8d3
parser.go: function parameter list can't specify same parameter more than once
2024-10-01 06:39:51 +02:00
camoroso
7285109115
parser.go: number sign is now allowed after the assign operator
2024-09-16 06:49:26 +02:00
camoroso
ffe1fa3aac
op-assign expansion now end at ']' and '}' too
2024-07-24 06:37:57 +02:00
camoroso
1a1a475dd8
Added support to op-assign operators like '+='.
...
This feature is implemented by expansion, not by dedicated operators, e.g. a*=2+x is exapanded as a=a*(2+x)
2024-07-23 15:35:57 +02:00
camoroso
80d3c6ec7d
parser.go: Fixed an old bug that did not allow the parser to skip comment tokens
2024-07-21 05:37:34 +02:00
camoroso
7f367cfc49
parser.go: renamed self receiver
2024-07-07 16:14:52 +02:00
camoroso
d63b18fd76
parser.go: SymColon resets the firstToken flag; that is needed to specify range indeces that can define negative limits
2024-06-19 09:22:40 +02:00
camoroso
0d01afcc9f
member ctx removed from struct parser because it is unused
2024-06-07 09:03:42 +02:00
camoroso
10a596a4cd
parser.go: commented out some useless code
2024-06-04 11:02:26 +02:00
camoroso
9bba40f155
Expr's functions now support parameters with default value
2024-06-01 19:56:40 +02:00
camoroso
2c87d6bf9e
Eprx now supports range of indeces to extract parts of strings or lists
2024-05-26 06:19:08 +02:00
camoroso
fa136cb70b
parser.go: square brackets are also allowed after a variable
2024-05-25 03:32:13 +02:00
camoroso
03d4c192c2
new syntax to get items from collection: collection[index]. Supported collections are string, list and dict
2024-05-24 22:51:01 +02:00
camoroso
d6a1607041
The content of round bracket now returns an expressione term. This way the content is decoupled from external terms.
2024-05-19 01:34:07 +02:00
camoroso
0a9543543d
Remove the unused 'parent' param from the function newTerm().
2024-05-11 06:41:06 +02:00
camoroso
0fdd51049d
parser.go: simplified the parser of the function parameters
2024-05-04 19:10:02 +02:00
camoroso
a2c0a24494
added symbol '..' and '...'; improved some error reports in parser.go
2024-05-04 18:47:00 +02:00
camoroso
7724cabdcc
removed commented code
2024-05-04 00:57:21 +02:00
camoroso
16557d70de
the iterator operator now can be defined providing values or a list of values directly
2024-05-04 00:51:15 +02:00
camoroso
750c660331
first working implementation of iterators and some fixes to the parser around lists analysis
2024-04-26 04:45:42 +02:00
camoroso
323308d86f
expressions now support dict data-type
2024-04-21 14:24:56 +02:00
camoroso
54bc759f70
expressions now support intger value in bin (0b), oct (0o), and hex (0x) form
2024-04-17 14:15:50 +02:00
camoroso
f1afbf9b49
parser.go: removed commented code
2024-04-14 07:35:43 +02:00
camoroso
70cdb9367e
changed the structer of the selector components: now all case are a list value assigned as right operand of the selector operator
2024-04-13 10:10:25 +02:00
camoroso
b17d2250a4
parser.go: fixed a problem on the selector operator
2024-04-13 04:37:15 +02:00
camoroso
9ac88bf446
made some interfaces exportable and fixed/enhaaced some selector operator versions
2024-04-08 23:17:56 +02:00
camoroso
d3f388f7e1
Selector operator, multi-operand, added
2024-04-08 22:16:07 +02:00
camoroso
181a9210d5
parser.go -- Fix: reset to true the firstToken flag after getting a semicolon
2024-04-06 01:32:29 +02:00
camoroso
d073d11ad3
Variable references belonging to the parent scope added ('@')
2024-04-04 12:54:26 +02:00