summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2022-07-19 09:01:52 -0400
committerDavid Thompson <dthompson2@worcester.edu>2022-07-19 09:01:52 -0400
commite5876bf6ff4a10d111b4ce02de23fd5af7cd1f85 (patch)
treec8c0dc192656984b5feb4ae9e2507f0823e825b7
parent600088a6629ffefefe582d74e63d52a651150e9c (diff)
chapter-2: Add comments for exercises 2.9 and 2.10.
I don't feel like solving them.
-rw-r--r--chapter-2/2.2-regular-expressions.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/chapter-2/2.2-regular-expressions.scm b/chapter-2/2.2-regular-expressions.scm
index 21e3aad..056318a 100644
--- a/chapter-2/2.2-regular-expressions.scm
+++ b/chapter-2/2.2-regular-expressions.scm
@@ -368,3 +368,26 @@
"frogdog" "frogcat" '(not "frogfrog"))
(grep-test (s-regexp->bre (r:repeat 3 5 (r:alt (r:quote "cat") (r:quote "dog"))))
"catdogcat" "dogcatdogcat" "catcatcatdogdog" '(not "catdogfrogcatcat"))
+
+
+;; Exercise 2.9: Back-references
+
+
+;; Exercise 2.10: Standards?
+
+;; a
+
+;; Differences between BREs and EREs:
+
+;; - BREs use \( and \) for grouping, EREs use ( and )
+
+;; - BREs use \{ and \} for intervals, EREs use { and }
+
+;; - BREs do not support alternation (non-standard GNU extension
+;; provides it), but EREs do.
+
+;; - GNU-extended BREs use \| for alternation, EREs use |
+
+;; b
+
+;; c