From ffe6097c534c82b9402bb6f0a57abeebd075e61d Mon Sep 17 00:00:00 2001
From: Eugen Wissner <belka@caraus.de>
Date: Wed, 8 Jul 2026 11:04:34 +0200
Subject: Allow multiple fields with the same type

---
 doc/language.tex | 52 +++++++++++++++++-----------------------------------
 1 file changed, 17 insertions(+), 35 deletions(-)

(limited to 'doc/language.tex')

diff --git a/doc/language.tex b/doc/language.tex
index 26d8b48..04f8613 100644
--- a/doc/language.tex
+++ b/doc/language.tex
@@ -1,17 +1,5 @@
 \part{Language}
 
-An Elna program consists of one or more source files, called \textbf{modules}.
-
-Each module can declare \textbf{types}, \textbf{global variables} and
-\textbf{procedures}, used by this module or exported to be used by other
-modules.
-
-Each procedure can get some input and produce an output as a result of
-executing a \textbf{statement block}, a list, where each \textbf{statement}
-is executed in the order it appears in the block.
-
-\chapter{Vocabulary}
-
 A language is an infinite set of sentences, namely the sentences well formed
 according to its syntax. In Elna, these sentences are called compilation units.
 Each unit is a finite sequence of \textit{tokens} from a finite vocabulary.
@@ -19,6 +7,20 @@ The vocabulary of Elna consists of identifiers, reserved words, numbers, charact
 strings, operators, delimiters, and comments. They are called \textit{tokens}
 and are composed of sequences of characters.
 
+To describe the syntax, an extended Backus-Naur Formalism called EBNF is used.
+
+\begin{itemize}
+	\item Alternatives are separated by |.
+	\item Brackets \lbrack{} and \rbrack{} denote optionality of the enclosed sentential form.
+	\item Braces \{ and \} denote its repetition (possibly 0 times).
+	\item Syntactic entities (non-terminal symbols) are denoted by English words expressing their
+		intuitive meaning.
+	\item Symbols of the language vocabulary (terminal symbols) are denoted by strings
+		enclosed in quote marks or by words in capital letters.
+\end{itemize}
+
+\chapter{Vocabulary}
+
 The following lexical rules must be observed when composing tokens. Blanks and
 line breaks must not occur within tokens (except in comments and strings). They
 are ignored unless they are essential to separate two consecutive tokens.
@@ -153,29 +155,9 @@ of letters and cannot be used in the role of identifiers.
 	\item (\ and\ )
 	\item \lbrack{} and \rbrack{}
 	\item \{ and \}
-	\item Pointer
-	\item module
-	\item import
-	\item type
-	\item const
-	\item var
-	\item begin
-	\item end
-	\item proc
-	\item record
-	\item while
-	\item do
-	\item case
-	\item of
-	\item if
-	\item then
-	\item elsif
-	\item else
-	\item cast
-	\item return
-	\item true
-	\item false
-	\item nil
+	\item import, type, const, var, begin, end, proc, record
+	\item while, do, case, of, if, then, elsif, else, cast, return
+	\item true, false, nil
 \end{itemize}
 
 \section{Comments}
-- 
cgit v1.2.3

