From a1a62b67948f131fc80ebe05f97ff3ea9cc6a186 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Thu, 20 Jun 2024 07:10:59 +0200 Subject: [PATCH] Doc: little changes --- doc/Expr.adoc | 76 ++++++++++++++------------- doc/Expr.html | 141 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 124 insertions(+), 93 deletions(-) diff --git a/doc/Expr.adoc b/doc/Expr.adoc index 945b3f9..9cc90c7 100644 --- a/doc/Expr.adoc +++ b/doc/Expr.adoc @@ -674,42 +674,46 @@ The table below shows all supported operators by decreasing priorities. |=== | Priority | Operators | Position | Operation | Operands and results -.2+|*ITEM*| [blue]`.` | _Infix_ | _List item_| _list_ `"."` _integer_ -> _any_ -| [blue]`.` | _Infix_ | _Dict item_ | _dict_ `"."` _any_ -> _any_ -.2+|*INC*| [blue]`++` | _Postfix_ | _Post increment_| _integer-variable_ `"++"` -> _integer_ -| [blue]`++` | _Postfix_ | _Next item_ | _iterator_ `"++"` -> _any_ -.1+|*FACT*| [blue]`!` | _Postfix_ | _Factorial_| _integer_ `"!"` -> _integer_ -.3+|*SIGN*| [blue]`+`, [blue]`-` | _Prefix_ | _Change-sign_| (`"+"`\|`"-"`) _number_ -> _number_ -| [blue]`#` | _Prefix_ | _Lenght-of_ | `"#"` _collection_ -> _integer_ -| [blue]`#` | _Prefix_ | _Size-of_ | `"#"` _iterator_ -> _integer_ -.5+|*PROD*| [blue]`*` | _Infix_ | _Product_ | _number_ `"*"` _number_ -> _number_ -| [blue]`*` | _Infix_ | _String-repeat_ | _string_ `"*"` _integer_ -> _string_ -| [blue]`/` | _Infix_ | _Division_ | _number_ `"/"` _number_ -> _number_ -| [blue]`./` | _Infix_ | _Float-division_ | __number__ `"./"` _number_ -> _float_ -| [blue]`%` | _Infix_ | _Integer-remainder_ | _integer_ `"%"` _integer_ -> _integer_ -.6+|*SUM*| [blue]`+` | _Infix_ | _Sum_ | _number_ `"+"` _number_ -> _number_ -| [blue]`+` | _Infix_ | _String-concat_ | (_string_\|_number_) `"+"` (_string_\|_number_) -> _string_ -| [blue]`+` | _Infix_ | _List-join_ | _list_ `"+"` _list_ -> _list_ -| [blue]`+` | _Infix_ | _Dict-join_ | _dict_ `"+"` _dict_ -> _dict_ -| [blue]`-` | _Infix_ | _Subtraction_ | _number_ `"-"` _number_ -> _number_ -| [blue]`-` | _Infix_ | _List-difference_ | _list_ `"-"` _list_ -> _list_ -.8+|*RELATION*| [blue]`<` | _Infix_ | _less_ | _comparable_ `"<"` _comparable_ -> _boolean_ -| [blue]`\<=` | _Infix_ | _less-equal_ | _comparable_ `"\<="` _comparable_ -> _boolean_ -| [blue]`>` | _Infix_ | _greater_ | _comparable_ `">"` _comparable_ -> _boolean_ -| [blue]`>=` | _Infix_ | _greater-equal_ | _comparable_ `">="` _comparable_ -> _boolean_ -| [blue]`==` | _Infix_ | _equal_ | _comparable_ `"=="` _comparable_ -> _boolean_ -| [blue]`!=` | _Infix_ | _not-equal_ | _comparable_ `"!="` _comparable_ -> _boolean_ -| [blue]`in` | _Infix_ | _member-of-list_ | _any_ `"in"` _list_ -> _boolean_ -| [blue]`in` | _Infix_ | _key-of-dict_ | _any_ `"in"` _dict_ -> _boolean_ -.1+|*NOT*| [blue]`not` | _Prefix_ | _not_ | `"not"` _boolean_ -> _boolean_ -.2+|*AND*| [blue]`and` | _Infix_ | _and_ | _boolean_ `"and"` _boolean_ -> _boolean_ -| [blue]`&&` | _Infix_ | _and_ | _boolean_ `"&&"` _boolean_ -> _boolean_ -.2+|*OR*| [blue]`or` | _Infix_ | _or_ | _boolean_ `"or"` _boolean_ -> _boolean_ -| [blue]`\|\|` | _Infix_ | _or_ | _boolean_ `"\|\|"` _boolean_ -> _boolean_ -.3+|*ASSIGN*| [blue]`=` | _Infix_ | _assignment_ | _identifier_ "=" _any_ -> _any_ -| [blue]`>>` | _Infix_ | _front-insert_ | _any_ ">>" _list_ -> _list_ -| [blue]`<<` | _Infix_ | _back-insert_ | _list_ "<<" _any_ -> _list_ - .1+|*BUT*| [blue]`but` | _Infix_ | _but_ | _any_ "but" _any_ -> _any_ +.2+|*ITEM*| [blue]`[`...`]` | _Postfix_ | _List item_| _list_ `[` _integer_ `]` -> _any_ +| [blue]`[`...`]` | _Postfix_ | _Dict item_ | _dict_ `[` _any_ `]` -> _any_ +.2+|*INC*| [blue]`++` | _Postfix_ | _Post increment_| _integer-variable_ `++` -> _integer_ +| [blue]`++` | _Postfix_ | _Next item_ | _iterator_ `++` -> _any_ +.1+|*FACT*| [blue]`!` | _Postfix_ | _Factorial_| _integer_ `!` -> _integer_ +.3+|*SIGN*| [blue]`+`, [blue]`-` | _Prefix_ | _Change-sign_| (`+`\|`-`) _number_ -> _number_ +| [blue]`#` | _Prefix_ | _Lenght-of_ | `#` _collection_ -> _integer_ +| [blue]`#` | _Prefix_ | _Size-of_ | `#` _iterator_ -> _integer_ +.2+|*SELECT*| [blue]`? : ::` | _Multi-Infix_ | _Case-Selector_ | _any-expr_ `?` _case-list_ _case-expr_ `:` _case-list_ _case-expr_ ... `::` _default-expr_ -> _any_ +| [blue]`? : ::` | _Multi-Infix_ | _Index-Selector_ | _int-expr_ `?` _case-expr_ `:` _case-expr_ ... `::` _default-expr_ -> _any_ +.1+|*FRACT*| [blue]`\|` | _Infix_ | _Fraction_ | _integer_ `\|` _integer_ -> _fraction_ +.5+|*PROD*| [blue]`*` | _Infix_ | _Product_ | _number_ `*` _number_ -> _number_ +| [blue]`*` | _Infix_ | _String-repeat_ | _string_ `*` _integer_ -> _string_ +| [blue]`/` | _Infix_ | _Division_ | _number_ `/` _number_ -> _number_ +| [blue]`./` | _Infix_ | _Float-division_ | __number__ `./` _number_ -> _float_ +| [blue]`%` | _Infix_ | _Integer-remainder_ | _integer_ `%` _integer_ -> _integer_ +.6+|*SUM*| [blue]`+` | _Infix_ | _Sum_ | _number_ `+` _number_ -> _number_ +| [blue]`+` | _Infix_ | _String-concat_ | (_string_\|_number_) `+` (_string_\|_number_) -> _string_ +| [blue]`+` | _Infix_ | _List-join_ | _list_ `+` _list_ -> _list_ +| [blue]`+` | _Infix_ | _Dict-join_ | _dict_ `+` _dict_ -> _dict_ +| [blue]`-` | _Infix_ | _Subtraction_ | _number_ `-` _number_ -> _number_ +| [blue]`-` | _Infix_ | _List-difference_ | _list_ `-` _list_ -> _list_ +.8+|*RELATION*| [blue]`<` | _Infix_ | _Less_ | _comparable_ `<` _comparable_ -> _boolean_ +| [blue]`\<=` | _Infix_ | _less-equal_ | _comparable_ `\<=` _comparable_ -> _boolean_ +| [blue]`>` | _Infix_ | _Greater_ | _comparable_ `>` _comparable_ -> _boolean_ +| [blue]`>=` | _Infix_ | _Greater-equal_ | _comparable_ `>=` _comparable_ -> _boolean_ +| [blue]`==` | _Infix_ | _Equal_ | _comparable_ `==` _comparable_ -> _boolean_ +| [blue]`!=` | _Infix_ | _Not-equal_ | _comparable_ `!=` _comparable_ -> _boolean_ +| [blue]`in` | _Infix_ | _Member-of-list_ | _any_ `in` _list_ -> _boolean_ +| [blue]`in` | _Infix_ | _Key-of-dict_ | _any_ `in` _dict_ -> _boolean_ +.1+|*NOT*| [blue]`not` | _Prefix_ | _Not_ | `not` _boolean_ -> _boolean_ +.2+|*AND*| [blue]`and` | _Infix_ | _And_ | _boolean_ `and` _boolean_ -> _boolean_ +| [blue]`&&` | _Infix_ | _And_ | _boolean_ `&&` _boolean_ -> _boolean_ +.2+|*OR*| [blue]`or` | _Infix_ | _Or_ | _boolean_ `or` _boolean_ -> _boolean_ +| [blue]`\|\|` | _Infix_ | _Or_ | _boolean_ `\|\|` _boolean_ -> _boolean_ +.3+|*ASSIGN*| [blue]`=` | _Infix_ | _Assignment_ | _identifier_ `=` _any_ -> _any_ +| [blue]`>>` | _Infix_ | _Front-insert_ | _any_ `>>` _list_ -> _list_ +| [blue]`<<` | _Infix_ | _Back-insert_ | _list_ `<<` _any_ -> _list_ +.1+|*BUT*| [blue]`but` | _Infix_ | _But_ | _any_ `but` _any_ -> _any_ +.1+|*RANGE*| [blue]`:` | _Infix_ | _Index-range_ | _integer_ `:` _integer_ -> _integer-pair_ |=== == Functions diff --git a/doc/Expr.html b/doc/Expr.html index d4988bc..33b15af 100644 --- a/doc/Expr.html +++ b/doc/Expr.html @@ -1795,231 +1795,258 @@ These operators have a high priority, in particular higher than the operator

ITEM

-

.

-

Infix

+

[…​]

+

Postfix

List item

-

list "." integerany

+

list [ integer ]any

-

.

-

Infix

+

[…​]

+

Postfix

Dict item

-

dict "." anyany

+

dict [ any ]any

INC

++

Postfix

Post increment

-

integer-variable "++"integer

+

integer-variable ++integer

++

Postfix

Next item

-

iterator "++"any

+

iterator ++any

FACT

!

Postfix

Factorial

-

integer "!"integer

+

integer !integer

SIGN

+, -

Prefix

Change-sign

-

("+“|”-") numbernumber

+

(+|-) numbernumber

#

Prefix

Lenght-of

-

"#" collectioninteger

+

# collectioninteger

#

Prefix

Size-of

-

"#" iteratorinteger

+

# iteratorinteger

+ + +

SELECT

+

? : ::

+

Multi-Infix

+

Case-Selector

+

any-expr ? case-list case-expr : case-list case-expr …​ :: default-exprany

+ + +

? : ::

+

Multi-Infix

+

Index-Selector

+

int-expr ? case-expr : case-expr …​ :: default-exprany

+ + +

FRACT

+

|

+

Infix

+

Fraction

+

integer | integerfraction

PROD

*

Infix

Product

-

number "*" numbernumber

+

number * numbernumber

*

Infix

String-repeat

-

string "*" integerstring

+

string * integerstring

/

Infix

Division

-

number "/" numbernumber

+

number / numbernumber

./

Infix

Float-division

-

number "./" numberfloat

+

number ./ numberfloat

%

Infix

Integer-remainder

-

integer "%" integerinteger

+

integer % integerinteger

SUM

+

Infix

Sum

-

number "+" numbernumber

+

number + numbernumber

+

Infix

String-concat

-

(string|number) "+" (string|number) → string

+

(string|number) + (string|number) → string

+

Infix

List-join

-

list "+" listlist

+

list + listlist

+

Infix

Dict-join

-

dict "+" dictdict

+

dict + dictdict

-

Infix

Subtraction

-

number "-" numbernumber

+

number - numbernumber

-

Infix

List-difference

-

list "-" listlist

+

list - listlist

RELATION

<

Infix

-

less

-

comparable "<" comparableboolean

+

Less

+

comparable < comparableboolean

<=

Infix

less-equal

-

comparable "<=" comparableboolean

+

comparable <= comparableboolean

>

Infix

-

greater

-

comparable ">" comparableboolean

+

Greater

+

comparable > comparableboolean

>=

Infix

-

greater-equal

-

comparable ">=" comparableboolean

+

Greater-equal

+

comparable >= comparableboolean

==

Infix

-

equal

-

comparable "==" comparableboolean

+

Equal

+

comparable == comparableboolean

!=

Infix

-

not-equal

-

comparable "!=" comparableboolean

+

Not-equal

+

comparable != comparableboolean

in

Infix

-

member-of-list

-

any "in" listboolean

+

Member-of-list

+

any in listboolean

in

Infix

-

key-of-dict

-

any "in" dictboolean

+

Key-of-dict

+

any in dictboolean

NOT

not

Prefix

-

not

-

"not" booleanboolean

+

Not

+

not booleanboolean

AND

and

Infix

-

and

-

boolean "and" booleanboolean

+

And

+

boolean and booleanboolean

&&

Infix

-

and

-

boolean "&&" booleanboolean

+

And

+

boolean && booleanboolean

OR

or

Infix

-

or

-

boolean "or" booleanboolean

+

Or

+

boolean or booleanboolean

||

Infix

-

or

-

boolean "||" booleanboolean

+

Or

+

boolean || booleanboolean

ASSIGN

=

Infix

-

assignment

-

identifier "=" anyany

+

Assignment

+

identifier = anyany

>>

Infix

-

front-insert

-

any ">>" listlist

+

Front-insert

+

any >> listlist

<<

Infix

-

back-insert

-

list "<<" anylist

+

Back-insert

+

list << anylist

BUT

but

Infix

-

but

-

any "but" anyany

+

But

+

any but anyany

+ + +

RANGE

+

:

+

Infix

+

Index-range

+

integer : integerinteger-pair

@@ -2095,7 +2122,7 @@ These operators have a high priority, in particular higher than the operator