summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-07-07 21:01:33 +0000
committerMorgan Deters <mdeters@gmail.com>2012-07-07 21:01:33 +0000
commit8b01efc32d61391d8d3cd2aaac0de49cd8e88ecc (patch)
tree9e61b253a66fc91ca86b11bc1cabae9e1a7394da /contrib
parent8166b6cef258b198d0ffc97d125da3c85acf9708 (diff)
Various fixes to documentation---typos, some incomplete documentation fixed, \file tags corrected, copyright added to files that had it missing, etc.
I ensured that I didn't change any code with this commit, and even tested on the cluster to be doubly sure: http://church.cims.nyu.edu/regress-results/compare_jobs.php?job_id=4655&reference_id=4646&p=0
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/extract-strings-and-comments52
-rwxr-xr-xcontrib/spellcheck22
-rw-r--r--contrib/theoryskel/theory_DIR.h2
3 files changed, 75 insertions, 1 deletions
diff --git a/contrib/extract-strings-and-comments b/contrib/extract-strings-and-comments
new file mode 100755
index 000000000..a6670c1e9
--- /dev/null
+++ b/contrib/extract-strings-and-comments
@@ -0,0 +1,52 @@
+#!/usr/bin/perl -0777
+
+my $debug = 0;
+
+$_ = <>;
+my $comments = "";
+my $code = "";
+
+# ignore strings and comments appearing in preprocessor directives
+s/^#.*//mg;
+
+for(;;) {
+ s,^([^"/]+),,;
+ $code .= "$1\n";
+
+ if(m,^([^"]*)"",) {
+ s,^([^"]*)"",,s;
+ $code .= "$1\n";
+ next;
+ }
+ if(m,^([^"]*)"([^"]*)",) {
+ s,^([^"]*)"(([^\\"]*?([^\\"]|(\\.)))+)",,s;
+ print STDERR "quote: $2\n" if $debug;
+ $code .= "$1\n";
+ $comments .= "$2\n";
+ next;
+ }
+ if(m,/\*.*?\*/,) {
+ s,/\*(.*?)\*/,,s;
+ print STDERR "c-style comment: $1\n" if $debug;
+ $comments .= "$1\n";
+ print STDERR "REMAINDER:\n===========================\n$_\n=========================\n" if $debug;
+ next;
+ }
+ if(m,//,) {
+ s,//([^\n]*),,s;
+ print STDERR "c++-style comment: $1\n" if $debug;
+ $comments .= "$1\n";
+ print STDERR "REMAINDER:\n===========================\n$_\n=========================\n" if $debug;
+ next;
+ }
+ last;
+}
+
+$code .= "$_\n";
+$code =~ s,\W+,\n,g;
+$code =~ s,^,@,gm;
+print "$code\n";
+
+$comments =~ s,^,^,gm;
+print "$comments\n";
+
diff --git a/contrib/spellcheck b/contrib/spellcheck
new file mode 100755
index 000000000..4aa210a50
--- /dev/null
+++ b/contrib/spellcheck
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+dir="$(dirname "$0")"
+
+find src \( -name '*.cpp' -o -name '*.h' \) \! -path 'src/prop/minisat/*' \! -path 'src/prop/bvminisat/*' \! -path 'src/prop/cryptominisat/*' \! -path 'src/parser/*/generated/*' |
+ while read f; do
+ misspelled_words=`
+ $dir/extract-strings-and-comments $f |
+ ispell -a -W 3 2>/dev/null |
+ tail -n +2 |
+ while read s; do
+ case "$s" in
+ \**|\+*|-*) ;;
+ \&*|\#*|\?*) echo "$s" | awk '{print$2}';;
+# *) test -n "$s" && echo "UNKNOWN : $s";;
+ esac
+ done | sort -fu | sed 's,^, ,'`
+ if [ -n "$misspelled_words" ]; then
+ echo "$f"
+ echo "$misspelled_words"
+ fi
+ done
diff --git a/contrib/theoryskel/theory_DIR.h b/contrib/theoryskel/theory_DIR.h
index ed36193f7..f8151ae42 100644
--- a/contrib/theoryskel/theory_DIR.h
+++ b/contrib/theoryskel/theory_DIR.h
@@ -12,7 +12,7 @@ namespace $dir {
class Theory$camel : public Theory {
public:
- /** Constructs a new instance of TheoryUF w.r.t. the provided context.*/
+ /** Constructs a new instance of Theory$camel w.r.t. the provided context.*/
Theory$camel(context::Context* c,
context::UserContext* u,
OutputChannel& out,
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback