#83 sre->regexp example in documentation

open
scheme-48 (6)
1
2004-09-05
2004-09-05
No

In the end of section 6.5.2 there is the following
example:

(define re (re-seq (re-string "Pete ")
(re-repeat 1 #f (re-string "Sz"))
(re-string "ilagyi")))
(regexp->sre (re -repeat 0 1 re))
==> '("Pete" (+ "Sz") "ilagyi")

correct was:

(define re (re-seq (list (re-string "Pete ")
(re-repeat 1 #f (re-string "Sz"))
(re-string "ilagyi"))))
(regexp->sre (re -repeat 0 1 re))
==> '("Pete " (+ "Sz") "ilagyi")

The re-seq constructor takes a re-list as argument.
And the blank after "Pete_" must also appear in
the return value.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks