mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-16 03:38:47 +00:00
Added tutorial
This commit is contained in:
parent
b7271d167a
commit
b0e5bc26e3
10 changed files with 153 additions and 6 deletions
|
|
@ -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]
|
||||
\[
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue