From 2db3a9d38a8787137ff34d8546c1b26fa892ca9c Mon Sep 17 00:00:00 2001 From: Carl Eastlund Date: Sat, 29 May 2010 18:31:26 -0400 Subject: [PATCH] Moved unstable/cce/regexp to unstable/regexp. --- .../unstable/regexp.rkt} | 8 +++--- collects/unstable/cce/reference/manual.scrbl | 2 -- collects/unstable/cce/test/test-main.ss | 2 -- .../unstable/{cce/regexp.ss => regexp.rkt} | 4 +-- .../reference => scribblings}/regexp.scrbl | 26 ++++++++----------- collects/unstable/scribblings/unstable.scrbl | 1 + 6 files changed, 17 insertions(+), 26 deletions(-) rename collects/{unstable/cce/test/test-regexp.ss => tests/unstable/regexp.rkt} (95%) rename collects/unstable/{cce/regexp.ss => regexp.rkt} (97%) rename collects/unstable/{cce/reference => scribblings}/regexp.scrbl (84%) diff --git a/collects/unstable/cce/test/test-regexp.ss b/collects/tests/unstable/regexp.rkt similarity index 95% rename from collects/unstable/cce/test/test-regexp.ss rename to collects/tests/unstable/regexp.rkt index 0624427c59..3a1bf50b0a 100644 --- a/collects/unstable/cce/test/test-regexp.ss +++ b/collects/tests/unstable/regexp.rkt @@ -1,8 +1,6 @@ -#lang scheme +#lang racket -(require "checks.ss" "../regexp.ss") - -(provide regexp-suite) +(require rackunit rackunit/text-ui unstable/regexp "helpers.rkt") (define-syntax (regexp-test stx) (syntax-case stx () @@ -14,7 +12,7 @@ (test-case "pregexp" (check-equal? (regexp-match (pregexp pattern) string) result))))])) -(define regexp-suite +(run-tests (test-suite "regexp.ss" (test-suite "regexp-sequence" (regexp-test (regexp-sequence) "a cat" (list "")) diff --git a/collects/unstable/cce/reference/manual.scrbl b/collects/unstable/cce/reference/manual.scrbl index acf4d82e94..c48213fb17 100644 --- a/collects/unstable/cce/reference/manual.scrbl +++ b/collects/unstable/cce/reference/manual.scrbl @@ -10,8 +10,6 @@ @table-of-contents[] -@include-section["regexp.scrbl"] - @include-section["set.scrbl"] @include-section["dict.scrbl"] diff --git a/collects/unstable/cce/test/test-main.ss b/collects/unstable/cce/test/test-main.ss index e3838537f1..72eb16461f 100644 --- a/collects/unstable/cce/test/test-main.ss +++ b/collects/unstable/cce/test/test-main.ss @@ -8,7 +8,6 @@ "test-exn.ss" "test-planet.ss" "test-port.ss" - "test-regexp.ss" "test-require-provide.ss" "test-sandbox.ss" "test-scribble.ss" @@ -24,7 +23,6 @@ exn-suite planet-suite port-suite - regexp-suite require-provide-suite sandbox-suite scribble-suite diff --git a/collects/unstable/cce/regexp.ss b/collects/unstable/regexp.rkt similarity index 97% rename from collects/unstable/cce/regexp.ss rename to collects/unstable/regexp.rkt index f7951f1191..44bf254cc2 100644 --- a/collects/unstable/cce/regexp.ss +++ b/collects/unstable/regexp.rkt @@ -1,6 +1,6 @@ -#lang scheme/base +#lang racket/base -(require scheme/list scheme/contract) +(require racket/list racket/contract) ;; regexp-or : String ... -> String ;; Produces the regexp disjunction of several regexp-strings. diff --git a/collects/unstable/cce/reference/regexp.scrbl b/collects/unstable/scribblings/regexp.scrbl similarity index 84% rename from collects/unstable/cce/reference/regexp.scrbl rename to collects/unstable/scribblings/regexp.scrbl index df5750b5a1..24af17e757 100644 --- a/collects/unstable/cce/reference/regexp.scrbl +++ b/collects/unstable/scribblings/regexp.scrbl @@ -1,13 +1,9 @@ -#lang scribble/doc -@(require scribble/manual - scribble/eval - "../scribble.ss" - "eval.ss") -@(require (for-label scheme unstable/cce/regexp)) +#lang scribble/manual +@(require scribble/eval "utils.rkt" (for-label racket unstable/regexp)) -@title[#:style 'quiet #:tag "cce-regexp"]{Regular Expressions} +@title{Regular Expressions} -@defmodule[unstable/cce/regexp] +@defmodule[unstable/regexp] This module provides tools for building strings which can be compiled to regular expressions. In particular, the constructors wrap their arguments in @@ -23,7 +19,7 @@ Produces a regular expression string that matches @scheme[start], followed by each @scheme[re] interleaved with @scheme[between], followed by @scheme[end]. @defexamples[ -#:eval (evaluator 'unstable/cce/regexp) +#:eval (eval/require 'unstable/regexp) (define re (pregexp (regexp-sequence "[0-9]+" "[0-9]+" "[0-9]+" @@ -42,7 +38,7 @@ each @scheme[re] interleaved with @scheme[between], followed by @scheme[end]. Produces a regular expression string that matches any of the given @scheme[re]s. @defexamples[ -#:eval (evaluator 'unstable/cce/regexp) +#:eval (eval/require 'unstable/regexp) (define re (pregexp (regexp-or "[0-9]+" "[a-z]"))) (regexp-match-exact? re "123") (regexp-match-exact? re "c") @@ -57,7 +53,7 @@ Produces a regular expression string that matches either the empty string, or the concatenation of all the given @scheme[re]s. @defexamples[ -#:eval (evaluator 'unstable/cce/regexp) +#:eval (eval/require 'unstable/regexp) (define re (pregexp (regexp-maybe "[0-9]+" "[.]" "[0-9]+"))) (regexp-match-exact? re "123.456") (regexp-match-exact? re "") @@ -72,7 +68,7 @@ Produces a regular expression string that matches zero or more consecutive occurrences of the concatenation of the given @scheme[re]s. @defexamples[ -#:eval (evaluator 'unstable/cce/regexp) +#:eval (eval/require 'unstable/regexp) (define re (pregexp (regexp-star "a" "b" "c"))) (regexp-match-exact? re "") (regexp-match-exact? re "abc") @@ -88,7 +84,7 @@ Produces a regular expression string that matches one or more consecutive occurrences of the concatenation of the given @scheme[re]s. @defexamples[ -#:eval (evaluator 'unstable/cce/regexp) +#:eval (eval/require 'unstable/regexp) (define re (pregexp (regexp-plus "a" "b" "c"))) (regexp-match-exact? re "") (regexp-match-exact? re "abc") @@ -104,7 +100,7 @@ Produces a regular expression string that matches the concatenation of the given @scheme[re]s and saves the result. @defexamples[ -#:eval (evaluator 'unstable/cce/regexp) +#:eval (eval/require 'unstable/regexp) (define re (pregexp (regexp-sequence (regexp-save "[0-9]+") "\\1"))) (regexp-match-exact? re "11") @@ -120,7 +116,7 @@ Produces a regular expression string that matches the concatenation of the given @scheme[re]s in multiple-line mode. @defexamples[ -#:eval (evaluator 'unstable/cce/regexp) +#:eval (eval/require 'unstable/regexp) (define re (pregexp (regexp-multi "^abc$"))) (regexp-match? re "abc") (regexp-match? re "xyz\nabc\ndef") diff --git a/collects/unstable/scribblings/unstable.scrbl b/collects/unstable/scribblings/unstable.scrbl index cc3a764af9..5a60ce2f69 100644 --- a/collects/unstable/scribblings/unstable.scrbl +++ b/collects/unstable/scribblings/unstable.scrbl @@ -82,6 +82,7 @@ Keep documentation and tests up to date. @include-section["path.scrbl"] @include-section["pretty.scrbl"] @include-section["queue.scrbl"] +@include-section["regexp.scrbl"] @include-section["srcloc.scrbl"] @include-section["string.scrbl"] @include-section["struct.scrbl"]