Lexical analysis is independent of the syntax parsing and the semantic analysis. The lexical analyzer splits the source text up into tokens. The lexical grammar describes the syntax of those tokens.
Source text currently only can be in ASCII encoding texts.
[Tokens]:
[Identifier]
[StringLiteral]
[CharacterLiteral]
[NumberLiteral]
[Keyword]
[UserDefinedOperator]
+
-
*
/
%
>
>=
>>
<
<=
<<
=
==
:
::
.
;
,
->
=>
{
}
(
)
[
]
Keyword:
type
fun
val
sig
struct
cons
module
export
use
if
then
else
loop
collect
case
return
break
continue
true
false
unit
for a whole list of reserved symbols please see src/reserved.inc
.