From 554c50d83d280554be944adb7b5b1948df683169 Mon Sep 17 00:00:00 2001 From: Greg Hewgill Date: Tue, 31 Oct 2023 21:41:33 +1300 Subject: [PATCH] Fix up ebnf_w3c to work correctly in full neon and not just helium --- contrib/grammar/ebnf_w3c.neon | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/grammar/ebnf_w3c.neon b/contrib/grammar/ebnf_w3c.neon index 671b16075..392671685 100644 --- a/contrib/grammar/ebnf_w3c.neon +++ b/contrib/grammar/ebnf_w3c.neon @@ -11,7 +11,7 @@ LOOP CHECK r ISA console.InputResult.line ELSE EXIT LOOP END CHECK - LET s: String := r.line + VAR s: String := r.line -- Skip over comment block at top. IF s.length() >= 2 AND s[1] = "*" THEN @@ -46,7 +46,7 @@ LOOP END CHECK LET rbracket: string.FindResult := string.find(s, "]") CHECK rbracket ISA string.FindResult.index ELSE - ASSERT FALSE + PANIC "expected right bracket" END CHECK s[bracket.index+1] := "(" s[rbracket.index] := ")?" @@ -60,7 +60,7 @@ LOOP END CHECK LET rbrace: string.FindResult := string.find(s, "}") CHECK rbrace ISA string.FindResult.index ELSE - ASSERT FALSE + PANIC "expected right brace" END CHECK s[brace.index+1] := "(" s[rbrace.index] := ")*"