/[cl-interpol]/cl-interpol/test.pl
ViewVC logotype

Contents of /cl-interpol/test.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Sat Apr 24 00:26:52 2004 UTC (9 years, 11 months ago) by eweitz
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain
pre-0.1.2 including hyperdoc support
1 #!/usr/bin/perl
2
3 ### $Header: /tiger/var/lib/cvsroots/cl-interpol/cl-interpol/test.pl,v 1.2 2004/04/24 00:26:52 eweitz Exp $
4
5 ### Copyright (c) 2002-2003, Dr. Edmund Weitz. All rights reserved.
6
7 ### Redistribution and use in source and binary forms, with or without
8 ### modification, are permitted provided that the following conditions
9 ### are met:
10
11 ### * Redistributions of source code must retain the above copyright
12 ### notice, this list of conditions and the following disclaimer.
13
14 ### * Redistributions in binary form must reproduce the above
15 ### copyright notice, this list of conditions and the following
16 ### disclaimer in the documentation and/or other materials
17 ### provided with the distribution.
18
19 ### THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
20 ### OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21 ### WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 ### ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
23 ### DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 ### DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
25 ### GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 ### INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
27 ### WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 ### NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 ### SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 my @chars = qw(\Q \L \U \E \l \u);
32
33 sub combine {
34 my $delim = shift;
35 my @result = ();
36 foreach my $char (@chars) {
37 foreach my $string (@_) {
38 push @result, "$char$delim$string";
39 }
40 }
41 @result;
42 }
43
44 sub quote {
45 local $_ = shift;
46 s/\\/\\\\/g;
47 $_;
48 }
49
50 print <<'HEAD';
51 ;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-INTERPOL; Base: 10 -*-
52 ;;; $Header: /tiger/var/lib/cvsroots/cl-interpol/cl-interpol/test.pl,v 1.2 2004/04/24 00:26:52 eweitz Exp $
53
54 ;;; Copyright (c) 2002-2003, Dr. Edmund Weitz. All rights reserved.
55
56 ;;; Redistribution and use in source and binary forms, with or without
57 ;;; modification, are permitted provided that the following conditions
58 ;;; are met:
59
60 ;;; * Redistributions of source code must retain the above copyright
61 ;;; notice, this list of conditions and the following disclaimer.
62
63 ;;; * Redistributions in binary form must reproduce the above
64 ;;; copyright notice, this list of conditions and the following
65 ;;; disclaimer in the documentation and/or other materials
66 ;;; provided with the distribution.
67
68 ;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
69 ;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
70 ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
71 ;;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
72 ;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
73 ;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
74 ;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
75 ;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
76 ;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
77 ;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
78 ;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
79
80 ;;; This file was automatically generated by a Perl script. It should
81 ;;; not be loaded directly but by "load.lisp" instead.
82
83 (in-package #:cl-interpol)
84
85 (enable-interpol-syntax)
86
87 HEAD
88
89 foreach my $a (('Aa-', 'aA-')) {
90 my $counter = 0;
91 my @arr = @chars;
92 while ($counter++ < 4) {
93 foreach my $str (@arr) {
94 print "(let ((a \"$a\"))\n";
95 my $test = "\${a}$str\${a}";
96 print " (test #?\"$test\" \"" . (quote eval "\"$test\"") . "\"))\n";
97 }
98 @arr = combine '${a}', @arr;
99 }
100 }
101
102 print "\n(disable-interpol-syntax)\n";

  ViewVC Help
Powered by ViewVC 1.1.5