From 87c7a9c4e518f3384c1ff9fd7927d65691a6378c Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sat, 17 May 2025 18:41:10 +0200 Subject: relax HardBreak grammar --- def.peg | 2 +- def_HardBreak.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/def.peg b/def.peg index b1cb09f..263b657 100644 --- a/def.peg +++ b/def.peg @@ -26,7 +26,7 @@ LinkedWords <- '[' Words ']' '(' Uri ')' AnnotatedWords <- '[' Words ']' '{' ![{}] PlainWords '}' PlainWords <- PRINTABLES (SPACE PRINTABLES)* Uri <- '<' ![<>] PRINTABLES? '>' / ![<>] PRINTABLES -HardBreak <- SPACE SPACE NEWLINE +HardBreak <- SPACE SPACE+ NEWLINE # Terminals PRINTABLES <- [[:graph:]]+ diff --git a/def_HardBreak.py b/def_HardBreak.py index 386487d..cdc3c62 100755 --- a/def_HardBreak.py +++ b/def_HardBreak.py @@ -9,7 +9,7 @@ from railroad import * Diagram( Start("complex"), NonTerminal("SPACE"), - NonTerminal("SPACE"), + OneOrMore(NonTerminal("SPACE")), NonTerminal("NEWLINE"), End("complex") ).writeStandalone( -- cgit v1.2.3