From b1ebaac5c08407ddd680041cae918b9341fea5be Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 18 May 2025 13:53:00 +0200 Subject: fix replace Optional(...) with Choice(0, ... , Skip()) --- def_Paragraph.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'def_Paragraph.py') diff --git a/def_Paragraph.py b/def_Paragraph.py index 90a7816..d5bd00e 100755 --- a/def_Paragraph.py +++ b/def_Paragraph.py @@ -9,9 +9,12 @@ from railroad import * Diagram( Start("complex"), NonTerminal("Words"), - ZeroOrMore( - NonTerminal("HardBreak"), - NonTerminal("Words") + Choice(0, + OneOrMore( + NonTerminal("HardBreak"), + NonTerminal("Words") + ), + Skip() ), OneOrMore( NonTerminal("NEWLINE") -- cgit v1.2.3