/usr/share/doc/libghc-regexpr-doc/html/src/Hidden-SrcRegActList.html is in libghc-regexpr-doc 0.5.4-11build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
<title>Hidden/SrcRegActList.hs</title>
<link type='text/css' rel='stylesheet' href='hscolour.css' />
</head>
<body>
<pre><a name="line-1"></a><span class='hs-comment'>-- SrcRegActList.hs</span>
<a name="line-2"></a><span class='hs-comment'>--</span>
<a name="line-3"></a><span class='hs-comment'>-- Author: Yoshikuni Jujo <PAF01143@nifty.ne.jp></span>
<a name="line-4"></a><span class='hs-comment'>--</span>
<a name="line-5"></a><span class='hs-comment'>-- This file is part of regexpr library</span>
<a name="line-6"></a><span class='hs-comment'>--</span>
<a name="line-7"></a><span class='hs-comment'>-- regexpr is free software: you can redistribute it and/or modify</span>
<a name="line-8"></a><span class='hs-comment'>-- it under the terms of the GNU Lesser General Public License as</span>
<a name="line-9"></a><span class='hs-comment'>-- published by the Free Software Foundation, either version 3 of the</span>
<a name="line-10"></a><span class='hs-comment'>-- License, or any later version.</span>
<a name="line-11"></a><span class='hs-comment'>--</span>
<a name="line-12"></a><span class='hs-comment'>-- regexpr is distributed in the hope that it will be useful,</span>
<a name="line-13"></a><span class='hs-comment'>-- but WITHOUT ANY WARRANGY; without even the implied warranty of</span>
<a name="line-14"></a><span class='hs-comment'>-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
<a name="line-15"></a><span class='hs-comment'>-- GNU Lesser General Public License for more details.</span>
<a name="line-16"></a><span class='hs-comment'>--</span>
<a name="line-17"></a><span class='hs-comment'>-- You should have received a copy of the GNU Lesser General Public</span>
<a name="line-18"></a><span class='hs-comment'>-- License along with this program. If not, see</span>
<a name="line-19"></a><span class='hs-comment'>-- <<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>.</span>
<a name="line-20"></a>
<a name="line-21"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>Hidden</span><span class='hs-varop'>.</span><span class='hs-conid'>SrcRegActList</span> <span class='hs-layout'>(</span>
<a name="line-22"></a> <span class='hs-varid'>selfTest</span>
<a name="line-23"></a><span class='hs-layout'>,</span> <span class='hs-varid'>plusesList</span>
<a name="line-24"></a><span class='hs-layout'>,</span> <span class='hs-varid'>oneCharList</span>
<a name="line-25"></a><span class='hs-layout'>,</span> <span class='hs-varid'>backSlashesList</span>
<a name="line-26"></a><span class='hs-layout'>,</span> <span class='hs-varid'>parensesList</span>
<a name="line-27"></a><span class='hs-layout'>,</span> <span class='hs-varid'>charClassList</span>
<a name="line-28"></a><span class='hs-layout'>)</span> <span class='hs-keyword'>where</span>
<a name="line-29"></a>
<a name="line-30"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Hidden</span><span class='hs-varop'>.</span><span class='hs-conid'>RegexPRTypes</span> <span class='hs-layout'>(</span> <span class='hs-conid'>RegexAction</span><span class='hs-layout'>(</span><span class='hs-keyglyph'>..</span><span class='hs-layout'>)</span><span class='hs-layout'>,</span> <span class='hs-varid'>reverseRegexAction</span> <span class='hs-layout'>)</span>
<a name="line-31"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Data</span><span class='hs-varop'>.</span><span class='hs-conid'>Char</span> <span class='hs-layout'>(</span> <span class='hs-varid'>isAlphaNum</span><span class='hs-layout'>,</span> <span class='hs-varid'>isAlpha</span><span class='hs-layout'>,</span> <span class='hs-varid'>isUpper</span><span class='hs-layout'>,</span> <span class='hs-varid'>isLower</span><span class='hs-layout'>,</span>
<a name="line-32"></a> <span class='hs-varid'>isDigit</span><span class='hs-layout'>,</span> <span class='hs-varid'>isHexDigit</span><span class='hs-layout'>,</span> <span class='hs-varid'>isSpace</span><span class='hs-layout'>,</span> <span class='hs-varid'>isPrint</span><span class='hs-layout'>,</span> <span class='hs-varid'>isControl</span> <span class='hs-layout'>)</span>
<a name="line-33"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>Hidden</span><span class='hs-varop'>.</span><span class='hs-conid'>Tools</span> <span class='hs-layout'>(</span> <span class='hs-layout'>(</span><span class='hs-varop'>&&&</span><span class='hs-layout'>)</span><span class='hs-layout'>,</span> <span class='hs-layout'>(</span><span class='hs-varop'>|||</span><span class='hs-layout'>)</span><span class='hs-layout'>,</span> <span class='hs-varid'>isSymbol</span><span class='hs-layout'>,</span> <span class='hs-varid'>isBit7On</span> <span class='hs-layout'>)</span>
<a name="line-34"></a>
<a name="line-35"></a><a name="selfTest"></a><span class='hs-definition'>selfTest</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Char</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Bool</span>
<a name="line-36"></a><span class='hs-definition'>selfTest</span>
<a name="line-37"></a> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>flip</span> <span class='hs-varid'>elem</span> <span class='hs-str'>"\b\n\f\r\t !\"#%&',-/:;<=>@]_'~}"</span> <span class='hs-varop'>|||</span> <span class='hs-varid'>isAlphaNum</span> <span class='hs-varop'>|||</span> <span class='hs-varid'>isBit7On</span>
<a name="line-38"></a>
<a name="line-39"></a><a name="plusesList"></a><span class='hs-definition'>plusesList</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span> <span class='hs-layout'>(</span><span class='hs-conid'>String</span><span class='hs-layout'>,</span> <span class='hs-conid'>RegexAction</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>RegexAction</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>]</span>
<a name="line-40"></a><span class='hs-definition'>plusesList</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyglyph'>[</span>
<a name="line-41"></a> <span class='hs-layout'>(</span> <span class='hs-str'>""</span> <span class='hs-layout'>,</span> <span class='hs-varid'>id</span> <span class='hs-layout'>)</span>
<a name="line-42"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"*"</span> <span class='hs-layout'>,</span> <span class='hs-conid'>Repeat</span> <span class='hs-num'>0</span> <span class='hs-conid'>Nothing</span> <span class='hs-layout'>)</span>
<a name="line-43"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"*?"</span><span class='hs-layout'>,</span> <span class='hs-conid'>RepeatNotGreedy</span> <span class='hs-num'>0</span> <span class='hs-conid'>Nothing</span> <span class='hs-layout'>)</span>
<a name="line-44"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"+"</span> <span class='hs-layout'>,</span> <span class='hs-conid'>Repeat</span> <span class='hs-num'>1</span> <span class='hs-conid'>Nothing</span> <span class='hs-layout'>)</span>
<a name="line-45"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"+?"</span><span class='hs-layout'>,</span> <span class='hs-conid'>RepeatNotGreedy</span> <span class='hs-num'>1</span> <span class='hs-conid'>Nothing</span> <span class='hs-layout'>)</span>
<a name="line-46"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"?"</span> <span class='hs-layout'>,</span> <span class='hs-conid'>Repeat</span> <span class='hs-num'>0</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Just</span> <span class='hs-num'>1</span> <span class='hs-layout'>)</span>
<a name="line-47"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"??"</span><span class='hs-layout'>,</span> <span class='hs-conid'>RepeatNotGreedy</span> <span class='hs-num'>0</span> <span class='hs-varop'>$</span> <span class='hs-conid'>Just</span> <span class='hs-num'>1</span> <span class='hs-layout'>)</span>
<a name="line-48"></a> <span class='hs-keyglyph'>]</span>
<a name="line-49"></a>
<a name="line-50"></a><a name="oneCharList"></a><span class='hs-definition'>oneCharList</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span> <span class='hs-layout'>(</span><span class='hs-conid'>Char</span><span class='hs-layout'>,</span> <span class='hs-conid'>RegexAction</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>]</span>
<a name="line-51"></a><span class='hs-definition'>oneCharList</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyglyph'>[</span>
<a name="line-52"></a> <span class='hs-layout'>(</span><span class='hs-chr'>'.'</span><span class='hs-layout'>,</span> <span class='hs-conid'>Select</span> <span class='hs-layout'>(</span><span class='hs-varop'>/=</span><span class='hs-chr'>'\n'</span><span class='hs-layout'>)</span><span class='hs-layout'>)</span>
<a name="line-53"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span><span class='hs-chr'>'$'</span><span class='hs-layout'>,</span> <span class='hs-conid'>RegexOr</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>EndOfInput</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-layout'>(</span><span class='hs-varop'>==</span><span class='hs-chr'>'\n'</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>)</span>
<a name="line-54"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span><span class='hs-chr'>'^'</span><span class='hs-layout'>,</span> <span class='hs-conid'>RegexOr</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>BeginningOfInput</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Backword</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-layout'>(</span><span class='hs-varop'>==</span><span class='hs-chr'>'\n'</span><span class='hs-layout'>)</span><span class='hs-keyglyph'>]</span><span class='hs-keyglyph'>]</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>)</span>
<a name="line-55"></a> <span class='hs-keyglyph'>]</span>
<a name="line-56"></a>
<a name="line-57"></a><a name="backSlashesList"></a><span class='hs-definition'>backSlashesList</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span> <span class='hs-layout'>(</span><span class='hs-conid'>Char</span><span class='hs-layout'>,</span> <span class='hs-conid'>RegexAction</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>]</span>
<a name="line-58"></a><span class='hs-definition'>backSlashesList</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyglyph'>[</span>
<a name="line-59"></a> <span class='hs-layout'>(</span> <span class='hs-chr'>'w'</span><span class='hs-layout'>,</span> <span class='hs-conid'>Select</span> <span class='hs-varid'>isWord</span> <span class='hs-layout'>)</span>
<a name="line-60"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'W'</span><span class='hs-layout'>,</span> <span class='hs-conid'>Select</span> <span class='hs-varop'>$</span> <span class='hs-varid'>not</span> <span class='hs-varop'>.</span> <span class='hs-varid'>isWord</span> <span class='hs-layout'>)</span>
<a name="line-61"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'s'</span><span class='hs-layout'>,</span> <span class='hs-conid'>Select</span> <span class='hs-layout'>(</span><span class='hs-varop'>`elem`</span> <span class='hs-str'>" \t\n\r\f"</span><span class='hs-layout'>)</span> <span class='hs-layout'>)</span>
<a name="line-62"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'S'</span><span class='hs-layout'>,</span> <span class='hs-conid'>Select</span> <span class='hs-layout'>(</span><span class='hs-varop'>`notElem`</span> <span class='hs-str'>" \t\n\r\f"</span><span class='hs-layout'>)</span> <span class='hs-layout'>)</span>
<a name="line-63"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'d'</span><span class='hs-layout'>,</span> <span class='hs-conid'>Select</span> <span class='hs-varid'>isDigit</span> <span class='hs-layout'>)</span>
<a name="line-64"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'D'</span><span class='hs-layout'>,</span> <span class='hs-conid'>Select</span> <span class='hs-layout'>(</span><span class='hs-varid'>not</span> <span class='hs-varop'>.</span> <span class='hs-varid'>isDigit</span><span class='hs-layout'>)</span> <span class='hs-layout'>)</span>
<a name="line-65"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'A'</span><span class='hs-layout'>,</span> <span class='hs-conid'>BeginningOfInput</span> <span class='hs-layout'>)</span>
<a name="line-66"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'Z'</span><span class='hs-layout'>,</span> <span class='hs-conid'>RegexOr</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>EndOfInput</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-layout'>(</span><span class='hs-varop'>==</span><span class='hs-chr'>'\n'</span><span class='hs-layout'>)</span><span class='hs-layout'>,</span> <span class='hs-conid'>EndOfInput</span><span class='hs-keyglyph'>]</span><span class='hs-keyglyph'>]</span> <span class='hs-layout'>)</span>
<a name="line-67"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'z'</span><span class='hs-layout'>,</span> <span class='hs-conid'>EndOfInput</span> <span class='hs-layout'>)</span>
<a name="line-68"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'b'</span><span class='hs-layout'>,</span> <span class='hs-varid'>regexOr</span> <span class='hs-keyglyph'>[</span>
<a name="line-69"></a> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>lookBehind</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>selectNot</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>]</span>
<a name="line-70"></a> <span class='hs-layout'>,</span> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>lookBehind</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>selectNot</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>]</span>
<a name="line-71"></a> <span class='hs-layout'>,</span> <span class='hs-keyglyph'>[</span> <span class='hs-conid'>BeginningOfInput</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>]</span>
<a name="line-72"></a> <span class='hs-layout'>,</span> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>lookBehind</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>,</span> <span class='hs-conid'>EndOfInput</span> <span class='hs-keyglyph'>]</span>
<a name="line-73"></a> <span class='hs-keyglyph'>]</span> <span class='hs-layout'>)</span>
<a name="line-74"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'B'</span><span class='hs-layout'>,</span> <span class='hs-conid'>RegActNot</span> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>regexOr</span> <span class='hs-keyglyph'>[</span>
<a name="line-75"></a> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>lookBehind</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>selectNot</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>]</span>
<a name="line-76"></a> <span class='hs-layout'>,</span> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>lookBehind</span> <span class='hs-keyglyph'>[</span><span class='hs-varid'>selectNot</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>]</span>
<a name="line-77"></a> <span class='hs-layout'>,</span> <span class='hs-keyglyph'>[</span> <span class='hs-conid'>BeginningOfInput</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>]</span>
<a name="line-78"></a> <span class='hs-layout'>,</span> <span class='hs-keyglyph'>[</span> <span class='hs-varid'>lookBehind</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Select</span> <span class='hs-varid'>isWord</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>,</span> <span class='hs-conid'>EndOfInput</span> <span class='hs-keyglyph'>]</span>
<a name="line-79"></a> <span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>]</span> <span class='hs-layout'>)</span>
<a name="line-80"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-chr'>'G'</span><span class='hs-layout'>,</span> <span class='hs-conid'>PreMatchPoint</span> <span class='hs-layout'>)</span>
<a name="line-81"></a> <span class='hs-keyglyph'>]</span>
<a name="line-82"></a>
<a name="line-83"></a><a name="parensesList"></a><span class='hs-definition'>parensesList</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span> <span class='hs-layout'>(</span><span class='hs-conid'>String</span><span class='hs-layout'>,</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>RegexAction</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>RegexAction</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>]</span>
<a name="line-84"></a><span class='hs-definition'>parensesList</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyglyph'>[</span>
<a name="line-85"></a> <span class='hs-layout'>(</span> <span class='hs-str'>"?<="</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-varop'>.</span> <span class='hs-layout'>(</span><span class='hs-conop'>:</span><span class='hs-conid'>[]</span><span class='hs-layout'>)</span> <span class='hs-varop'>.</span> <span class='hs-conid'>Backword</span> <span class='hs-varop'>.</span> <span class='hs-varid'>reverse</span> <span class='hs-varop'>.</span> <span class='hs-varid'>map</span> <span class='hs-varid'>reverseRegexAction</span> <span class='hs-layout'>)</span>
<a name="line-86"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"?<!"</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-varop'>.</span> <span class='hs-layout'>(</span><span class='hs-conop'>:</span><span class='hs-conid'>[]</span><span class='hs-layout'>)</span> <span class='hs-varop'>.</span> <span class='hs-conid'>RegActNot</span> <span class='hs-varop'>.</span> <span class='hs-layout'>(</span><span class='hs-conop'>:</span><span class='hs-conid'>[]</span><span class='hs-layout'>)</span> <span class='hs-varop'>.</span> <span class='hs-conid'>Backword</span> <span class='hs-varop'>.</span> <span class='hs-varid'>reverse</span>
<a name="line-87"></a> <span class='hs-varop'>.</span> <span class='hs-varid'>map</span> <span class='hs-varid'>reverseRegexAction</span> <span class='hs-layout'>)</span>
<a name="line-88"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"?="</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-layout'>)</span>
<a name="line-89"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"?!"</span><span class='hs-layout'>,</span> <span class='hs-conid'>Still</span> <span class='hs-varop'>.</span> <span class='hs-layout'>(</span><span class='hs-conop'>:</span><span class='hs-conid'>[]</span><span class='hs-layout'>)</span> <span class='hs-varop'>.</span> <span class='hs-conid'>RegActNot</span> <span class='hs-layout'>)</span>
<a name="line-90"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"?:"</span><span class='hs-layout'>,</span> <span class='hs-conid'>Parens</span> <span class='hs-layout'>)</span>
<a name="line-91"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"?>"</span><span class='hs-layout'>,</span> <span class='hs-conid'>NoBacktrack</span> <span class='hs-layout'>)</span>
<a name="line-92"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"$>"</span><span class='hs-layout'>,</span> <span class='hs-conid'>NoBacktrack</span> <span class='hs-layout'>)</span>
<a name="line-93"></a> <span class='hs-keyglyph'>]</span>
<a name="line-94"></a>
<a name="line-95"></a><a name="charClassList"></a><span class='hs-definition'>charClassList</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span> <span class='hs-layout'>(</span><span class='hs-conid'>String</span><span class='hs-layout'>,</span> <span class='hs-conid'>Char</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Bool</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>]</span>
<a name="line-96"></a><span class='hs-definition'>charClassList</span> <span class='hs-keyglyph'>=</span> <span class='hs-keyglyph'>[</span>
<a name="line-97"></a> <span class='hs-layout'>(</span> <span class='hs-str'>"alnum"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isAlphaNum</span> <span class='hs-layout'>)</span>
<a name="line-98"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"alpha"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isAlpha</span> <span class='hs-layout'>)</span>
<a name="line-99"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"blank"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isSpace</span> <span class='hs-layout'>)</span>
<a name="line-100"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"cntrl"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isControl</span> <span class='hs-layout'>)</span>
<a name="line-101"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"digit"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isDigit</span> <span class='hs-layout'>)</span>
<a name="line-102"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"graph"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isPrint</span> <span class='hs-varop'>&&&</span> <span class='hs-layout'>(</span><span class='hs-varid'>not</span><span class='hs-varop'>.</span><span class='hs-layout'>)</span> <span class='hs-varid'>isSpace</span> <span class='hs-layout'>)</span>
<a name="line-103"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"lower"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isLower</span> <span class='hs-layout'>)</span>
<a name="line-104"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"print"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isPrint</span> <span class='hs-layout'>)</span>
<a name="line-105"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"punct"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isSymbol</span> <span class='hs-layout'>)</span>
<a name="line-106"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"space"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isSpace</span> <span class='hs-layout'>)</span>
<a name="line-107"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"upper"</span> <span class='hs-layout'>,</span> <span class='hs-varid'>isUpper</span> <span class='hs-layout'>)</span>
<a name="line-108"></a> <span class='hs-layout'>,</span> <span class='hs-layout'>(</span> <span class='hs-str'>"xdigit"</span><span class='hs-layout'>,</span> <span class='hs-varid'>isHexDigit</span> <span class='hs-layout'>)</span>
<a name="line-109"></a> <span class='hs-keyglyph'>]</span>
<a name="line-110"></a>
<a name="line-111"></a><a name="isWord"></a><span class='hs-definition'>isWord</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Char</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Bool</span>
<a name="line-112"></a><span class='hs-definition'>isWord</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>isAlphaNum</span> <span class='hs-varop'>|||</span> <span class='hs-layout'>(</span><span class='hs-varop'>==</span><span class='hs-chr'>'_'</span><span class='hs-layout'>)</span>
<a name="line-113"></a>
<a name="line-114"></a><a name="regexOr"></a><span class='hs-definition'>regexOr</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-keyglyph'>[</span><span class='hs-conid'>RegexAction</span><span class='hs-keyglyph'>]</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>RegexAction</span>
<a name="line-115"></a><span class='hs-definition'>regexOr</span> <span class='hs-keyglyph'>=</span> <span class='hs-varid'>head</span> <span class='hs-varop'>.</span> <span class='hs-varid'>foldr1</span> <span class='hs-layout'>(</span><span class='hs-keyglyph'>\</span><span class='hs-varid'>ra1</span> <span class='hs-varid'>ra2</span> <span class='hs-keyglyph'>-></span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>RegexOr</span> <span class='hs-varid'>ra1</span> <span class='hs-varid'>ra2</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>)</span>
<a name="line-116"></a>
<a name="line-117"></a><a name="lookBehind"></a><span class='hs-definition'>lookBehind</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>RegexAction</span><span class='hs-keyglyph'>]</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>RegexAction</span>
<a name="line-118"></a><span class='hs-definition'>lookBehind</span> <span class='hs-varid'>ras</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Still</span> <span class='hs-keyglyph'>[</span><span class='hs-conid'>Backword</span> <span class='hs-varid'>ras</span><span class='hs-keyglyph'>]</span>
<a name="line-119"></a>
<a name="line-120"></a><a name="selectNot"></a><span class='hs-definition'>selectNot</span> <span class='hs-keyglyph'>::</span> <span class='hs-layout'>(</span><span class='hs-conid'>Char</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>Bool</span><span class='hs-layout'>)</span> <span class='hs-keyglyph'>-></span> <span class='hs-conid'>RegexAction</span>
<a name="line-121"></a><span class='hs-definition'>selectNot</span> <span class='hs-varid'>s</span> <span class='hs-keyglyph'>=</span> <span class='hs-conid'>Select</span> <span class='hs-layout'>(</span><span class='hs-varid'>not</span> <span class='hs-varop'>.</span> <span class='hs-varid'>s</span><span class='hs-layout'>)</span>
</pre></body>
</html>
|