X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FEXPORT%2Fmktheory.pl;fp=helm%2FEXPORT%2Fmktheory.pl;h=0000000000000000000000000000000000000000;hb=c7514aaa249a96c5fdd39b1123fbdb38d92f20b6;hp=2be018e988dfb6f3a30b5948e6db963a35e1ac60;hpb=1c7fb836e2af4f2f3d18afd0396701f2094265ff;p=helm.git diff --git a/helm/EXPORT/mktheory.pl b/helm/EXPORT/mktheory.pl deleted file mode 100755 index 2be018e98..000000000 --- a/helm/EXPORT/mktheory.pl +++ /dev/null @@ -1,151 +0,0 @@ -#!/usr/bin/perl - -# Assumptions: -# Comments on one line are stripped -# Comments on many lines: -# nothing after *) (end of command) -# Commands could be nested (but see previous assumption) -# Commands don't span on several lines -# If a line is commented, the comment must begin at the begin of line and end -# at the end of line -# In a line, before a command only spaces are allowed - -$curi = $ARGV[0]; -$with_types = ($ARGV[1] ? ".types" : ""); -$ident = " "; -$cid = 1; -$opencom = 0; -$openscheme = 0; -$openfix = 0; -$opengoal = 0; - -print < - - - -EOT - -while () { - chomp; - if ($opencom > 0) { - $opencom-- if (/\*\)/ && !/\(\*.*\*\)/); - } else { - if (/\(\*.*\*\)/) { # (* comment *) - s/\(\*.*\*\)//; - } elsif (/\(\*/) { - # (* comment - $opencom++; - $_ = ""; - } - - if (/Require /) { - s/ *Require *(.*)\..*/$1/; - print "$ident\n"; - } elsif (/Goal /) { - $opengoal = 1; - } elsif (/Section /) { - s/ *Section *(.*)\..*/$1/; - print "$ident
\n"; - $ident = $ident." "; - } elsif (/Chapter /) { - s/ *Chapter *(.*)\..*/$1/; - print "$ident
\n"; - $ident = $ident." "; - } elsif (/End /) { - chop($ident); - print "$ident
\n"; - } elsif (/Variable(s?) /) { - s/ *Variable(s?) *([^:]*):.*/$2/; - s/ //g; - @vl = split /,/; - foreach (@vl) { - print "$ident\n"; - } - } elsif (/Hypothesis /) { - s/ *Hypothesis *([^ :]*)( |:).*/$1/; - @vl = split /,/; - foreach (@vl) { - print "$ident\n"; - } - } elsif (/^ *Inductive /) { - if (/ *Inductive *[^ :]+ ([^ :]*) :=/) { - s/ *Inductive *[^ :]+ ([^ :]*) *:=.*/$1/; - } elsif (/ *Inductive *[^ :]*( |:)/) { - s/ *Inductive *([^ :\[]*)( |:|\[).*/$1/; - } - print "$ident\n"; - } elsif (/ *CoInductive /) { - if (/ *CoInductive *[^ :]+ ([^ :]*) *:=/) { - s/ *CoInductive *[^ :]+ ([^ :]*) *:=.*/$1/; - } elsif (/ *CoInductive *[^ :]*( |:)/) { - s/ *CoInductive *([^ :]*)( |:).*/$1/; - } - print "$ident\n"; - } elsif (/^ *Fixpoint /) { - s/ *Fixpoint *([^ \[]*)( |\[).*/$1/; - print "$ident\n"; - $openfix = 1; - } elsif (/ *CoFixpoint /) { - s/ *CoFixpoint *([^ \[]*)( |\[).*/$1/; - print "$ident\n"; - $openfix = 1; - } elsif (/^ *Definition /) { - s/ *Definition *([^ :]*)( |:)?.*/$1/; - print "$ident\n"; - } elsif (/Local /) { - s/ *Local *([^ :]*)( |:)?.*/$1/; - print "$ident\n"; - } elsif (/Lemma /) { - s/ *Lemma *([^ :]*)( |:)?.*/$1/; - print "$ident\n"; - $cid++; - } elsif (/Theorem /) { - s/ *Theorem *([^ :]+)( |:)?.*/$1/; - print "$ident\n"; - $cid++; - } elsif (/Remark /) { - s/ *Remark *([^ :]*)( |:)?.*/$1/; - print "$ident\n"; - $cid++; - } elsif (/Scheme /) { - s/ *Scheme *([^ :]*)( |:)?.*/$1/; - print "$ident\n"; - $cid++; - $openscheme = 1; - } elsif (/Save / && $opengoal) { - s/ *Save *([^ \.]*)( |\.).*/$1/; - print "$ident\n"; - $cid++; - } elsif (/with / && $openscheme) { - s/ *with *([^ :]*)( |:).*/$1/; - print "$ident\n"; - $cid++; - } elsif (/with / && $openfix) { - s/ *with *([^ :]*)( |:).*/$1/; - print "$ident\n"; - $cid++; - } elsif (/Axiom /) { - s/ *Axiom *([^ :]*)( |:).*/$1/; - print "$ident\n"; - $cid++; - } elsif (/Parameter /) { - s/ *Parameter *([^ :]*)( |:).*/$1/; - print "$ident\n"; - $cid++; - } elsif (/Record /) { - s/ *Record *([^ :]*)( |:).*/$1/; - print "$ident\n"; - $cid++; - } - - if ($openscheme && (/\./)) { - $openscheme = 0; - } elsif ($openfix && (/\./)) { - $openfix = 0; - } - - } -} - -print "\n";