From 9bb793c19011c4ca898fac7e82d81dba5e30e117 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Fri, 15 May 2020 18:03:35 -0400 Subject: [PATCH] Fix grammar parsing for block separators Previously this allows blocks to be separated by commas and have one trailing off. Now this only allows blocks to be properly separated by commas and trailing comms are no longer allowed. This also now enforces that when parameters are not separated by commas, they are spearated by at least one space. --- grammar.ebnf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/grammar.ebnf b/grammar.ebnf index 127f5675..b1e2295d 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -126,14 +126,18 @@ implicit_identifier_tuple block_parameters = @+:block_parameter - [ {SP}* "," ] { - {SP}* + block_parameter_separator @+:block_parameter - [ {SP}* "," ] }* ; +block_parameter_separator + = + | ( {SP}* "," {SP}* ) + | ( {SP}+ ) + ; + block_parameter = | block_parameter_key_value -- 2.47.3