diff options
author | Felix Lange <fjl@twurst.com> | 2011-10-14 05:45:42 +0200 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2011-10-14 05:45:42 +0200 |
commit | bd5145368593e09460d4461256ee4f934b2ebf26 (patch) | |
tree | 471852782d61d64bede27d67552eb79af0a598aa /src/cord_regexp.erl | |
parent | 90640c1aed302fd83a500bb9ccdfb6cf7b481112 (diff) | |
download | ermacs-fork-bd5145368593e09460d4461256ee4f934b2ebf26.tar.gz |
remove cruft
cruft includes:
- module header comments (yikes..)
- author attributes (sorry luke)
- old guard tests
Diffstat (limited to 'src/cord_regexp.erl')
-rw-r--r-- | src/cord_regexp.erl | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/cord_regexp.erl b/src/cord_regexp.erl index 1d6bb4d..9927af2 100644 --- a/src/cord_regexp.erl +++ b/src/cord_regexp.erl @@ -1,12 +1,4 @@ -%%%---------------------------------------------------------------------- -%%% File : cord_regexp.erl -%%% Author : Luke Gorrie <luke@bluetail.com> -%%% Purpose : Regexp ops on cords -%%% Created : 10 Mar 2001 by Luke Gorrie <luke@bluetail.com> -%%%---------------------------------------------------------------------- - -module(cord_regexp). --author('luke@bluetail.com'). -compile(export_all). %%-export([Function/Arity, ...]). @@ -59,7 +51,7 @@ continue_match(RE, {W, N}) -> X end. -first_match1(RE, W, Pos) when list(RE) -> +first_match1(RE, W, Pos) when is_list(RE) -> case regexp:parse(RE) of {ok, REP} -> first_match1(optimise(REP), W, Pos); @@ -111,20 +103,11 @@ re_apply(eos, More, done, P, C) -> end; re_apply(eos, More, $\n, P, C) -> re_apply_more(More, P, push($\n, C)); % \n isn't consumed -re_apply(eos, More, done, P, C) -> - case cord:walker_direction(C) of - forward -> re_apply_more(More, P, C); - backward -> nomatch - end; re_apply(bos, More, done, P, C) -> case cord:walker_direction(C) of forward -> nomatch; backward -> re_apply_more(More, P, C) end; -re_apply(eos, _, done, _, _) -> - true; -re_apply(eos, _, done, _, _) -> - true; re_apply({'or', RE1, RE2}, More, Ch, P, C) -> re_apply_or({apply, RE1, More, Ch, P, C}, {apply, RE2, More, Ch, P, C}); @@ -155,7 +138,7 @@ re_apply({comp_class, Cc}, More, Ch, P, C) -> true -> nomatch; false -> re_apply_more(More, advance(P, C), C) end; -re_apply(Ch, More, Ch, P, C) when integer(Ch) -> +re_apply(Ch, More, Ch, P, C) when is_integer(Ch) -> re_apply_more(More, advance(P, C), C); re_apply(_, _, _, _, _) -> nomatch. |