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/appendix.tex | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

(limited to 'doc/appendix.tex')

diff --git a/doc/appendix.tex b/doc/appendix.tex
index d06a49b..e98da0c 100644
--- a/doc/appendix.tex
+++ b/doc/appendix.tex
@@ -91,15 +91,17 @@
 
 <expressions> = <expression> \{`,' <expression>\}.
 
+<identifiers> = <identifier> \{`,' <identifier>\}.
+
 <identifier-definitions> = <identifier-definition> \{`,' <identifier-definition>\}.
 
 <types> = <type> \{`,' <type>\}.
 
 <statements> = <statement> \{`;' <statement>\}.
 
-<return-declaration> = [`->' `!\@' | `->' type].
+<return-declaration> = [`:\@' `!\@' | `:\@' type].
 
-<field> = <identifier> `:\@' <type>.
+<field> = <identifiers> `:\@' <type>.
 
 <array-type> = `[' <expression> `]' <type>.
 
@@ -107,9 +109,9 @@
 
 <record-type> = `record' [`(' <identifier> `)'] [<field> \{`;' <field>\}] `end'.
 
-<enumeration-type> = `(' <identifier> \{`,' <identifier>\} `)'.
+<enumeration-type> = `(' <identifiers> `)'.
 
-<procedure-type> = `proc' `(' [<types>] `)' <return-declaration>.
+<procedure-type> = `proc' <procedure-heading>.
 
 <type> = <array-type>
 	\alt{} <pointer-type>
@@ -161,12 +163,14 @@
 
 <import-part> = [`import' \{import-declaration\}].
 
-<procedure-heading> = `proc' <identifier-definition> \\
-	`(' [<field> \{`,' <field>\}] `)' <return-declaration>.
+<parameter> = <identifiers> `:\@' <type>.
+
+<procedure-heading> = `(' [<parameter> \{`;' <parameter>\}] `)' <return-declaration>.
 
-<block> = <constant-part> <variable-part> <statement-part> `end'.
+<procedure-body> = <constant-part> <variable-part> <statement-part> `end'.
 
-<procedure-declaration> = <procedure-heading> `;' (block | `extern').
+<procedure-declaration> = `proc' <identifier-definition> <procedure-heading> \\
+	(<procedure-body> | `extern').
 
 <program> = <import-part>
     <constant-part> <type-part> <variable-part>
-- 
cgit v1.2.3

