From fd5566ebbe352d9c4128e95804c8355483db43ac Mon Sep 17 00:00:00 2001 From: Bretton Date: Mon, 28 Aug 2023 20:43:39 -0700 Subject: [PATCH 1/2] Fix parse error on `\n` --- src/SAWScript/Lexer.x | 1 - 1 file changed, 1 deletion(-) diff --git a/src/SAWScript/Lexer.x b/src/SAWScript/Lexer.x index 11b42f4386..22a8909429 100644 --- a/src/SAWScript/Lexer.x +++ b/src/SAWScript/Lexer.x @@ -71,7 +71,6 @@ $charesc = [abfnrtv\\\"\'\&] sawTokens :- $white+ ; -"\n" ; "//".* ; "/*" { cnst TCmntS } "*/" { cnst TCmntE } From 1d1b639640337de76a9ff45516446e73ef334f6e Mon Sep 17 00:00:00 2001 From: Bretton Date: Mon, 28 Aug 2023 21:04:56 -0700 Subject: [PATCH 2/2] Add integration test for #1894 --- intTests/test1894/test.saw | 1 + intTests/test1894/test.sh | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 intTests/test1894/test.saw create mode 100644 intTests/test1894/test.sh diff --git a/intTests/test1894/test.saw b/intTests/test1894/test.saw new file mode 100644 index 0000000000..7e22ea36a3 --- /dev/null +++ b/intTests/test1894/test.saw @@ -0,0 +1 @@ +(\n -> n) 1; diff --git a/intTests/test1894/test.sh b/intTests/test1894/test.sh new file mode 100644 index 0000000000..2315cc233c --- /dev/null +++ b/intTests/test1894/test.sh @@ -0,0 +1,3 @@ +set -e + +$SAW test.saw