From d9b9ec4ec59cec05dff88328e560bfbd97cc0238 Mon Sep 17 00:00:00 2001 From: marcobaye Date: Mon, 27 Jan 2020 14:18:05 +0100 Subject: [PATCH 1/2] Allowed for empty strings --- bpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpp b/bpp index e92d50d..e4c067b 100755 --- a/bpp +++ b/bpp @@ -307,7 +307,7 @@ class Line until @text.empty? - if (match = /^["](?[^"]+)["]/.match(@text)) + if (match = /^["](?[^"]*)["]/.match(@text)) self << Literal.new(match["string"]) @text = match.post_match.strip From 455a651eb9770b679733b1b1dcc5d61d16f8023b Mon Sep 17 00:00:00 2001 From: marcobaye Date: Mon, 27 Jan 2020 14:21:25 +0100 Subject: [PATCH 2/2] Ugly kluge to get stuff like "then v=0" to work: now labels need goto/gosub before them --- bpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpp b/bpp index e4c067b..487639e 100755 --- a/bpp +++ b/bpp @@ -311,7 +311,7 @@ class Line self << Literal.new(match["string"]) @text = match.post_match.strip - elsif (match = /^(?then\s*(go(sub|to))|then|go(sub|to))\s*(?[\w\s,.]+)+/ + elsif (match = /^(?go(sub|to))\s*(?[\w\s,.]+)+/ .match(@text)) self << Code.new(match["code"])