shithub: mc

Download patch

ref: 186c4e4026e1d9db729153e185bd717377060926
parent: 24020b49aee678a72f3d9883371af8c70e4af9a5
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Jan 4 17:04:59 EST 2017

Remove dead makefiles and shuffle around docs.

diff: cannot open a/lib/regex/doc//null: file does not exist: 'a/lib/regex/doc//null'
--- a/bench/Makefile
+++ /dev/null
@@ -1,22 +1,0 @@
-BIN=runner
-OBJ=runner.o
-BENCHSRC= intsort.myr \
-	 copious-allocs.myr \
-	 sha1-compute.myr \
-	 bigfactorial.myr \
-	 mandelbrot.myr \
-	 regex-match.myr
-
-include ../config.mk
-include ../mk/c.mk
-
-bench: runner cleanbuild
-	./runner $(BENCHSRC:.myr=)
-
-.PHONY: cleanbuild
-cleanbuild:
-	rm -f $(BENCHSRC:.myr=) $(BENCHSRC:.myr=.o) $(BENCHSRC:.myr=.use)
-	@for i in $(BENCHSRC:.myr=); do \
-	    ../mbld/mbld -b $$i  -C../6/6m -M../muse/muse -I../libstd -r../rt/_myrrt.o $$i.myr; \
-	done
-
--- a/lib/regex/bld.sub
+++ b/lib/regex/bld.sub
@@ -21,3 +21,5 @@
 ;;
 
 sub = test ;;
+
+man = myr-regex.3 ;;
--- a/lib/regex/doc/Makefile
+++ /dev/null
@@ -1,5 +1,0 @@
-MAN=myr-regex.3 \
-
-include ../config.mk
-include ../mk/myr.mk
-
--- a/lib/regex/doc/myr-regex.3
+++ /dev/null
@@ -1,198 +1,0 @@
-.TH MYR REGEX 1
-.SH NAME
-regex myr-regex
-.SH LIBRARY
-regex
-.SH SYNOPSIS
-.B use regex
-.I const compile	: (re : byte[:] -> std.error(regex#, status))
-.I const dbgcompile	: (re : byte[:] -> std.error(regex#, status))
-.I const free           : (re : regex# -> void)
-.br
-.I const exec	: (re : regex#, str : byte[:] -> bool)
-.I const search	: (re : regex#, str : byte[:] -> bool)
-.SH DESCRIPTION
-.PP
-The regex library provides functions for compiling and evaluating regular
-expressions, as described later in this document, or in myr-regex(7).
-.PP
-.I regex.compile will take a string describing a regex, and will attempt
-to compile it, returing 
-.I `std.Success regex#
-if the regex is valid, and there were no error conditions encountered during
-compilation. If the compilation failed,
-.I `std.Failure regex.status
-will be returned, where regex.status is a failure code.
-
-.PP 
-.I regex.dbgcompile
-is identical to 
-.I regex.compile,
-however, it will print debugging information as it compiles, and each
-time the regex is evaluated.
-
-.PP
-.I regex.exec
-will take the regex passed to it, and evaluate it over the text provided,
-returning the 
-.I `std.Some matches,
-or 
-.I `std.None
-if there were no matches found. The matches must span the whole string.
-
-.PP
-.I regex.search
-is similar to regex.exec, but it will attempt to find a match somewhere
-within the string, instead of attempting to find a match spanning the whole
-string.
-
-.SH REGEX SYNTAX
-.PP
-The grammar used by libregex is below:
-
-.EX
-    regex       : altexpr
-    altexpr     : catexpr ('|' altexpr)+
-    catexpr     : repexpr (catexpr)+
-    repexpr     : baseexpr[*+?]
-    baseexpr    : literal
-                | charclass
-                | charrange
-                | escaped
-                | '.'
-                | '^'
-                | '$'
-                | '(' regex ')'
-    charclass   : see below
-    charrange   : '[' (literal('-' literal)?)+']'
-.EE
-
-The following metacharacters have the meanings listed below:
-.TP
-.
-Matches a single unicode character
-.TP
-^
-Matches the beginning of a line. Does not consume any characters.
-.TP
-$
-Matches the end of a line. Does not consume any characters.
-.TP
-*
-Matches any number of repetitions of the preceding regex fragment.
-.TP
-*?
-Reluctantly matches any number of repetitions of the preceding regex fragment.
-.TP
-+
-Matches one or more repetitions of the preceding regex fragment.
-.TP
-+?
-Reluctantly matches one or more repetitions of the preceding regex fragment.
-.TP
-?
-Matches zero or one of the preceding regex fragment.
-
-.PP
-In order to match a literal metacharacter, it needs to be preceded by
-a '\\' character.
-
-The following character classes are supported:
-.TP
-\\d
-ASCII digits
-.TP
-\\D
-Negation of ASCII digits
-.TP
-\\x
-ASCII Hex digits
-.TP
-\\X
-Negation of ASCII Hex digits
-.TP
-\\s
-ASCII spaces
-.TP
-\\S
-Negation of ASCII spaces
-.TP
-\\w
-ASCII word characters
-.TP
-\\W
-Negation of ASCII word characters
-.TP
-\\h
-ASCII whitespace characters
-.TP
-\\H
-Negation of ASCII whitespace characters
-.TP
-\\pX, \\p{X}
-Characters with unicode property 'X'
-.TP
-\\PX, \\P{X}
-Negation of characters with unicode property 'X'
-
-.PP
-Unicode properties that are supported are listed below:
-
-.TP
-L, Letter
-Unicode letter property
-.TP
-Lu, Uppercase_Letter
-Uppercase letter unicode property
-.TP
-Ll, Lowercase_Letter
-Lowercase letter unicode property
-.TP
-Lt, Titlecase_Letter
-Titlecase letter unicode property
-.TP
-N, Number
-Number unicode property
-.TP
-Z, Separator
-Any separator character unicode property
-.TP
-Zs, Space_Separator
-Space separator unicode property
-
-
-.SH EXAMPLE
-.EX
-        use std
-        use regex
-
-        const main = {
-            match regex.compile(pat)
-            var i
-            | `std.Success re:
-                    match regex.exec(re, text)
-                    | `std.Some matches:
-                            for i = 0; i < matches.len; i++
-                                std.put("Match %i: %s\n", i, match[i])
-                            ;;
-                    | `std.None: std.put("Text did not match\n")
-                    ;;
-            | `std.Failure err:
-                    std.put("failed to compile regex")
-            ;;
-        }
-.EE
-
-.SH FILES
-The source code for this compiler is available from
-.B git://git.eigenstate.org/git/ori/libregex.git
-
-.SH SEE ALSO
-.IR 6m(1)
-
-.SH BUGS
-.PP
-This code is insufficiently tested.
-
-.PP
-This code does not support all of the regex features that one would expect.
--- /dev/null
+++ b/lib/regex/myr-regex.3
@@ -1,0 +1,198 @@
+.TH MYR REGEX 1
+.SH NAME
+regex myr-regex
+.SH LIBRARY
+regex
+.SH SYNOPSIS
+.B use regex
+.I const compile	: (re : byte[:] -> std.error(regex#, status))
+.I const dbgcompile	: (re : byte[:] -> std.error(regex#, status))
+.I const free           : (re : regex# -> void)
+.br
+.I const exec	: (re : regex#, str : byte[:] -> bool)
+.I const search	: (re : regex#, str : byte[:] -> bool)
+.SH DESCRIPTION
+.PP
+The regex library provides functions for compiling and evaluating regular
+expressions, as described later in this document, or in myr-regex(7).
+.PP
+.I regex.compile will take a string describing a regex, and will attempt
+to compile it, returing 
+.I `std.Success regex#
+if the regex is valid, and there were no error conditions encountered during
+compilation. If the compilation failed,
+.I `std.Failure regex.status
+will be returned, where regex.status is a failure code.
+
+.PP 
+.I regex.dbgcompile
+is identical to 
+.I regex.compile,
+however, it will print debugging information as it compiles, and each
+time the regex is evaluated.
+
+.PP
+.I regex.exec
+will take the regex passed to it, and evaluate it over the text provided,
+returning the 
+.I `std.Some matches,
+or 
+.I `std.None
+if there were no matches found. The matches must span the whole string.
+
+.PP
+.I regex.search
+is similar to regex.exec, but it will attempt to find a match somewhere
+within the string, instead of attempting to find a match spanning the whole
+string.
+
+.SH REGEX SYNTAX
+.PP
+The grammar used by libregex is below:
+
+.EX
+    regex       : altexpr
+    altexpr     : catexpr ('|' altexpr)+
+    catexpr     : repexpr (catexpr)+
+    repexpr     : baseexpr[*+?]
+    baseexpr    : literal
+                | charclass
+                | charrange
+                | escaped
+                | '.'
+                | '^'
+                | '$'
+                | '(' regex ')'
+    charclass   : see below
+    charrange   : '[' (literal('-' literal)?)+']'
+.EE
+
+The following metacharacters have the meanings listed below:
+.TP
+.
+Matches a single unicode character
+.TP
+^
+Matches the beginning of a line. Does not consume any characters.
+.TP
+$
+Matches the end of a line. Does not consume any characters.
+.TP
+*
+Matches any number of repetitions of the preceding regex fragment.
+.TP
+*?
+Reluctantly matches any number of repetitions of the preceding regex fragment.
+.TP
++
+Matches one or more repetitions of the preceding regex fragment.
+.TP
++?
+Reluctantly matches one or more repetitions of the preceding regex fragment.
+.TP
+?
+Matches zero or one of the preceding regex fragment.
+
+.PP
+In order to match a literal metacharacter, it needs to be preceded by
+a '\\' character.
+
+The following character classes are supported:
+.TP
+\\d
+ASCII digits
+.TP
+\\D
+Negation of ASCII digits
+.TP
+\\x
+ASCII Hex digits
+.TP
+\\X
+Negation of ASCII Hex digits
+.TP
+\\s
+ASCII spaces
+.TP
+\\S
+Negation of ASCII spaces
+.TP
+\\w
+ASCII word characters
+.TP
+\\W
+Negation of ASCII word characters
+.TP
+\\h
+ASCII whitespace characters
+.TP
+\\H
+Negation of ASCII whitespace characters
+.TP
+\\pX, \\p{X}
+Characters with unicode property 'X'
+.TP
+\\PX, \\P{X}
+Negation of characters with unicode property 'X'
+
+.PP
+Unicode properties that are supported are listed below:
+
+.TP
+L, Letter
+Unicode letter property
+.TP
+Lu, Uppercase_Letter
+Uppercase letter unicode property
+.TP
+Ll, Lowercase_Letter
+Lowercase letter unicode property
+.TP
+Lt, Titlecase_Letter
+Titlecase letter unicode property
+.TP
+N, Number
+Number unicode property
+.TP
+Z, Separator
+Any separator character unicode property
+.TP
+Zs, Space_Separator
+Space separator unicode property
+
+
+.SH EXAMPLE
+.EX
+        use std
+        use regex
+
+        const main = {
+            match regex.compile(pat)
+            var i
+            | `std.Success re:
+                    match regex.exec(re, text)
+                    | `std.Some matches:
+                            for i = 0; i < matches.len; i++
+                                std.put("Match %i: %s\n", i, match[i])
+                            ;;
+                    | `std.None: std.put("Text did not match\n")
+                    ;;
+            | `std.Failure err:
+                    std.put("failed to compile regex")
+            ;;
+        }
+.EE
+
+.SH FILES
+The source code for this compiler is available from
+.B git://git.eigenstate.org/git/ori/libregex.git
+
+.SH SEE ALSO
+.IR 6m(1)
+
+.SH BUGS
+.PP
+This code is insufficiently tested.
+
+.PP
+This code does not support all of the regex features that one would expect.