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_PlainWords.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'def_PlainWords.py') diff --git a/def_PlainWords.py b/def_PlainWords.py index 098c3d6..ebbe38b 100755 --- a/def_PlainWords.py +++ b/def_PlainWords.py @@ -9,9 +9,12 @@ from railroad import * Diagram( Start("complex"), NonTerminal("PRINTABLES"), - ZeroOrMore( - NonTerminal("_"), - NonTerminal("PRINTABLES") + Choice(0, + OneOrMore( + NonTerminal("_"), + NonTerminal("PRINTABLES") + ), + Skip() ), End("complex") ).writeStandalone( -- cgit v1.2.3