NAME
Felix operators and operator names (these need to be checked!).
A chainable binary operator such as + creates a list of subexpressions.
assignment
Assignment operators are sugar for statements, so only one is allowed.
= asgn
<- asgn
:= initialise new val
+= pluseq
-= minuseq
*= muleq
/= diveq
%= modeq
|= oreq
^= xoreq
&= andeq
let/in
let <expr> in <expr> prefix
tuple
, chain
logic
Note that "shortcut" doesn’t apply in Felix since expressions are purely functional.
|| lor
chain
&& land chain
! lnot prefix
comparison
== eq
binary
<= le chain
< lt chain
>= ge chain
> gt chain
<> ne chain
!= ne chain
-> arrow left assoc
case <int> of <int> unassoc
numeric
Note that + has a lower precedence than -, and * has a lower precedence than / which is unusual.
- sub
left assoc
+ add chain
* mul chain
/ div left assoc
% mod left assoc
- sub prefix
+ sub prefix
** pow right (special prec rules)
addressing
&
prefix
* prefix
bitwise
| bor
chain
^ xor chain
& band chain
~ bnot prefix
application
(juxtaposition) left assoc
coercion
: left assoc
component
. left assoc
qualified name
:: left assoc
suffixed name
of left assoc
atomic
if/then/else/endif
match
<expr> with
| <pattern> => <expr>
...
endmatch
regmatch
<expr> with
| <regexp> => <expr>
...
endmatch
(fun
(<arglist>):<type> = { <expr> })
(fun (<arglist>):<type> = { <statements>
})
{ <expr> }
Lambda function. The return type is optional. The third form
is short for (fun () = { <expr> })
(proc
(<arglist>){ <statements> })
{ <statements> }
Lambda procedure. The second form is short for (proc () =
{ <statements> })
VERSION
1.1.1_rc1
SEE ALSO
felix(1)
for a language introduction and man page index
flx(1) for a list of the tools.
flxcc(1) for a description of the wrapper generator
tool.
flx_lit(1) for a description of literals
flx_op(1) for a list of operators
flx_cop(1) for a list of C operator precedence names
flx_key(1) for a list of keywords
flx_grammar(1) for a grammar summary
flx_lib_typ(1) for a list of library types
flx_dir(1) for a list of directives
flx_exec(1) for a list of executable statements
flx_decl(1) for a list of declarative statements
flx_bind(1) for a list of binding statements
WEB SITE
See http://felix.sourceforge.net
AUTHOR
John Maxwell Skaller, mailto:skaller [AT] users.net