Added tutorial

This commit is contained in:
Dmitry Boulytchev 2020-02-19 15:28:29 +03:00
parent b7271d167a
commit b0e5bc26e3
10 changed files with 153 additions and 6 deletions

View file

@ -72,8 +72,9 @@ Multiple postfixes are allowed, for example
The basic form of expression is \nonterm{primary}. The simplest form of primary is an identifier or constant. Keywords \lstinline|true| and \lstinline|false|
designate integer constants 1 and 0 respectively, character constant is implicitly converted into its ASCII code. String constants designate arrays
of one-byte characters. Infix constants allow to reference a functional value associated with corresponding infix operator, and functional constant (\emph{lambda-expression})
designates an anonymous functional value in the form of closure.
of one-byte characters. Infix constants allow to reference a functional value associated with corresponding infix operator (however, a value associated with
builtin assognment operator "\lstinline|:=|" can not be taken), and functional constant (\emph{lambda-expression})
designates an anonymous functional value in the form of closure.
\begin{figure}[h]
\[

View file

@ -15,7 +15,8 @@ redefinition of builtin infix operators:
\begin{itemize}
\item redefinitions of builtin infix operators can not be exported;
\item the assignment operator "\lstinline|:=|" can not be redefined.
\item the assignment operator "\lstinline|:=|" can not be redefined;
\item infix definitions can not be mutually recursive.
\end{itemize}
The syntax for infix operator definition is shown on Fig.~\ref{custom_infix_construct}; a custom infix definition must specify exactly two arguments.