From f022d4d35f835b830d4d79f7369c2f475a67a6c8 Mon Sep 17 00:00:00 2001 From: King Date: Mon, 18 Dec 2023 03:42:17 +0100 Subject: [PATCH] Update PatternMatching.md Fix grammatical errors in documentation. --- .../BasicProgramming/PatternMatching/PatternMatching.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/courses/Recipes/BasicProgramming/PatternMatching/PatternMatching.md b/courses/Recipes/BasicProgramming/PatternMatching/PatternMatching.md index 67d1af1c7..b292d5f4b 100644 --- a/courses/Recipes/BasicProgramming/PatternMatching/PatternMatching.md +++ b/courses/Recipes/BasicProgramming/PatternMatching/PatternMatching.md @@ -21,7 +21,7 @@ Pattern matching is _the_ mechanism for case distinction ([Switch]((Rascal:Statements-Switch)) statement) and search ([Visit]((Rascal:Expressions-Visit)) statement) in Rascal. Patterns can also be used in an explicit match operator `:=` and can then be part of larger boolean expressions. Since a pattern match may have more than one solution, local backtracking over the alternatives of a match is provided. -Patterns can also be used in [Enumerators]((Rascal:Boolean-Enumerator))s and control structures like +Patterns can also be used in [Enumerators]((Rascal:Boolean-Enumerator)) and control structures like [For]((Rascal:Statements-For)) and [While]((Rascal:Statements-While)) statement. A very rich pattern language is provided that includes string matching based on regular expressions, @@ -47,7 +47,7 @@ Regular expressions follow the Java regular expression syntax with one exception <_Name_:_RegularExpression_> ``` -If `RegularExpression` matches, the matched substring is assigned to string variable `Name`. +If `RegularExpression` matches, the matched substring is assigned to the string variable `Name`. The following abstract pattern matches the abstract syntax of a while statement defined earlier: