<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p><span style="font-size: 12pt;">Hi Tom,</span><br>
</p>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<p><br>
</p>
<p>thank you for your contribution! However, could you maybe share some reasoning for the intended parser behavior with us? Why do you want to treat incomplete quantifier sequences as literal characters instead of raising a syntax error?</p>
<p><br>
</p>
<p>Here are some possible arguments in favor of raising a syntax error that come to my mind:</p>
<p><br>
</p>
<p>- Debugging incorrect expressions gets easier (e.g., if you missed a closing curly brace by accident).</p>
<p>- Without backtracking, the design of the parser remains simpler and duplication-free, and its performance remains higher.</p>
<p>- For other incomplete patterns such as '[a' or ':isDigit' we also raise a syntax error instead of parsing the pattern as literals.</p>
<p>- Other parsers behave inconsistently: Some treat the incomplete examples as literals (e.g., JavaScript, .NET), while others raise syntax errors (e.g., Java).</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
<p><br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Montag, 13. Februar 2023 10:30:59<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Regex-Tests-Core-tobe.34.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div class="PlainText">A new version of Regex-Tests-Core was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Regex-Tests-Core-tobe.34.mcz" id="LPlnk805634" previewremoved="true">http://source.squeak.org/inbox/Regex-Tests-Core-tobe.34.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Regex-Tests-Core-tobe.34<br>
Author: tobe<br>
Time: 13 February 2023, 10:30:58.863775 am<br>
UUID: 897286b7-bca5-405c-92c0-52e09604b1fc<br>
Ancestors: Regex-Tests-Core-ct.33<br>
<br>
Complements Regex-Core-tobe.86<br>
<br>
=============== Diff against Regex-Tests-Core-ct.33 ===============<br>
<br>
Item was added:<br>
+ ----- Method: RxParserTest>>testNonQuantifier (in category 'tests') -----<br>
+ testNonQuantifier<br>
+        "Test expressions that look like quantifier expressions but do not fully match"<br>
+        self assert: ('a{x}'  matchesRegex: 'a{x}').<br>
+        self assert: ('a{,x}'  matchesRegex: 'a{,x}').<br>
+        self assert: ('a{,}'  matchesRegex: 'a{,}').<br>
+        self assert: ('a{,,}'  matchesRegex: 'a{,,}').<br>
+        self assert: ('a{1,2,}'  matchesRegex: 'a{1,2,}').<br>
+        self assert: ('a{,'  matchesRegex: 'a{,').<br>
+        self assert: ('a{'  matchesRegex: 'a{').<br>
+        self assert: ('a{1'  matchesRegex: 'a{1').<br>
+        self assert: ('a{1,'  matchesRegex: 'a{1,').!<br>
<br>
<br>
</div>
</span></font></div>
</body>
</html>