Fixing live analysis

This commit is contained in:
elvis
2025-01-16 23:48:23 +01:00
parent cf0bc41a23
commit d78e8bfbe0
9 changed files with 269 additions and 27 deletions

Binary file not shown.

View File

@ -68,7 +68,7 @@
\usepackage{pgfornament} %% ornaments
%% load last
\usepackage[hidelinks]{hyperref} %% links for table of contents, load last
\usepackage{hyperref} %% links for table of contents, load last
\usepackage{bookmark} %% for better table of contents

View File

@ -23,8 +23,8 @@
\alt{} <a> `\%' <a> | <a> `^' <a> | `powmod' `(' <a> `,' <a> `,' <a> `)' | `rand' `(' <a> `)'
\end{grammar}
Where \texttt{\%} is the modulo operator and \texttt{a a \% a} is the powermod operator;
the variables are all integers, \texttt{n} is an integer and \texttt{v} is a boolean litteral.
Where \texttt{\%} is the modulo operator and the powmod operator is equivalent to \texttt{a \^{} a \% a};
the variables are all integers, \texttt{n} is an integer and \texttt{v} is a boolean literal.
The additional arithmetic expressions' semantics are implemented in a similar manner as with the other.
@ -47,7 +47,8 @@
A program \texttt{t} is defined as follows:
\begin{grammar}
<t> \(\defeq\) <n> | <v> | <x> | `(' <t> `,' <t> `)'
\alt{} `fun' <x> `:' <type> `=>' <t> | <t> <t> | <op\textsubscript{1}> <t> | <t> <op\textsubscript{2}> <t> % chktex 38
\alt{} `fun' <x> `:' <type> `=>' <t> | <t> <t> % chktex 38
\alt{} <op\(_1\)> <t> | <t> <op\(_2\)> <t>
\alt{} `powmod' `(' <t> `,' <t> `,' <t> `)'
\alt{} `rand' `(' <t> `)' |
\alt{} `if' <t> `then' <t> `else' <t>