7 Metacharacter Definitions
From the Racket Documentaiton:
When we want a literal \ inside a Racket string or regexp literal, we must escape it so that it shows up in the string at all. Racket strings use \ as the escape character, so we end up with two \s: one Racket-string \ to escape the regexp \, which then escapes the .. Another character that would need escaping inside a Racket string is ".
(require "Lexp-structures.rkt")
(provide (all-defined-out)) |
(provide |
(all-from-out "Lexp-structures.rkt")) |
7.1 "Grepish" MetaCharacters
(perl |
"quoteNextMetaCharacter" |
"\\" |
"Quote the next metaCharacter. May require over riding to escape the slash character in a higher level use. Rendered as a double in base racket source code.") |
(perl |
"matchBeginningOfLine" |
"^" |
"Match the beginning of the line.") |
(perl |
"matchAnyCharacter" |
"." |
"Match any charcter (except NewLine)") |
(perl |
"matchEndOfLine" |
"$" |
"Match the end of the line (or before Newline at the end)") |
(perl |
"alternation" |
"|" |
"Alternation - may require over riding for higher level constructs") |
(perl |
"startGrouping" |
"(" |
"Starts Grouping - may require over riding for higher level constructs") |
(perl |
"endGrouping" |
")" |
"Ends Grouping - may require over riding for higher level constructs") |
(perl |
"StartBracketedCharacterClass" |
"[" |
"Starts Bracketed Charcter Class - may require over riding for higher level constructs") |
(perl |
"endBracketedCharacterClass" |
"]" |
"Ends Bracketed Charcter Class - may require over riding for higher level constructs") |
(perl |
"startArgument" |
"{" |
"Starts Argument - may require over riding for higher level constructs") |
(perl |
"endArgument" |
"}" |
"Ends Argument - may require over riding for higher level constructs") |
7.2 Greedy Quantifiers
(perl |
"matchZeroOrMoreTimes" |
"*" |
"Match Zero (0) or more times - the Kleene star.") |
(perl |
"matchOneOrMOreTimes" |
"+" |
"Match one (1) or more times.") |
(perl |
"matchOneOrZeroTimes" |
"?" |
"Match One (1) or Zero (0) times.") |
7.2.1 Greedy Quantifiers Requiring Over Ride
(perl |
"matchExactlyNTimes" |
"{n}" |
"Match exactly n times. Implementation must over-ride") |
(perl |
"matchAtLeastNTimes" |
"{n,}" |
"Match at least n times. Implementation must over-ride") |
(perl |
"matchAtLeastNTimesNotMorThanMTimes" |
"{n,m}" |
"Match at least n times, but not more than m times. Implementation must over-ride") |
7.3 Non-Greedy Quantifiers
(perl |
"nonGreedyMatchZeroOrMoreTimes" |
"*?" |
"Non Greedy Match Zero (0) or more times - the Kleene star.") |
(perl |
"nonGreedyMatchOneOrMOreTimes" |
"+?" |
"Non Greedy Match one (1) or more times.") |
(perl |
"nonGreedyMatchOneOrZeroTimes" |
"??" |
"Non Greedy Match One (1) or Zero (0) times.") |
7.3.1 Non-Greedy Quantifiers Requiring Over Ride
(perl |
"nonGreedyMatchExactlyNTimes" |
"{n}" |
"Non Greedy Match exactly n times. Implementation must over-ride") |
(perl |
"nonGreedyMatchAtLeastNTimes" |
"{n,}" |
"Non Greedy Match at least n times. Implementation must over-ride") |
(perl |
"nonGreedyMatchAtLeastNTimesNotMorThanMTimes" |
"{n,m}" |
"Non Greedy Match at least n times, but not more than m times. Implementation must over-ride") |