From 8ceb48a4e60b8ff89f28372da4f66cd152e2e0fe Mon Sep 17 00:00:00 2001
From: Eugen Wissner <belka@caraus.de>
Date: Mon, 13 Jul 2026 23:59:36 +0200
Subject: Change record constructor syntax

---
 doc/appendix.tex | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

(limited to 'doc/appendix.tex')

diff --git a/doc/appendix.tex b/doc/appendix.tex
index e98da0c..71b0cc4 100644
--- a/doc/appendix.tex
+++ b/doc/appendix.tex
@@ -73,8 +73,13 @@
 	\alt{} <trait>
 	\alt{} <cast>
 	\alt{} <procedure-call>
+	\alt{} <record-constructor>
 	\alt{} `(' <expression> `)'.
 
+<record-constructor> = <identifier> `\{' [<field-initializer> \{`,' <field-initializer>\}] `\}'.
+
+<field-initializer> = <identifier> `:' <expression>.
+
 <factor> = <unary-operator> <factor> | <reference>.
 
 <term> = <factor> \{<multiplication-operator> <factor>\}.
@@ -142,9 +147,7 @@
 	| <label-declaration> | <goto-statement> | <while-statement>
 	| <if-statement> | <case-statement> | $\varepsilon{}$.
 
-<statement-part> = [`begin' <statements>
-	\alt{} `return' <expression>
-	\alt{} `begin' <statements> `;' `return' <expression>].
+<statement-part> = [`begin' <statements>].
 
 <constant-declaration> = <identifier-definition> `:=' <expression>.
 
@@ -167,7 +170,7 @@
 
 <procedure-heading> = `(' [<parameter> \{`;' <parameter>\}] `)' <return-declaration>.
 
-<procedure-body> = <constant-part> <variable-part> <statement-part> `end'.
+<procedure-body> = <constant-part> <variable-part> <statement-part> [`return' <expression>] `end'.
 
 <procedure-declaration> = `proc' <identifier-definition> <procedure-heading> \\
 	(<procedure-body> | `extern').
@@ -175,5 +178,5 @@
 <program> = <import-part>
     <constant-part> <type-part> <variable-part>
 	\{<procedure-declaration>\}
-	<statement-part> `end' `.\@'.
+	<statement-part> [`return' <expression>] `end' `.\@'.
 \end{grammar}
-- 
cgit v1.2.3

