2 %% This is file `semantic.sty',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% semantic.dtx (with options: `general')
11 %% For the copyright see the source file.
13 %% Any modified versions of this file must be renamed
14 %% with new filenames distinct from semantic.sty.
16 %% For distribution of the original source see the terms
17 %% for copying and modification in the file semantic.dtx.
19 %% This generated file may be distributed as long as the
20 %% original source files, as listed above, are part of the
21 %% same distribution. (The sources need not necessarily be
22 %% in the same archive or directory.)
24 %% semantic.dtx (c)1995--2002 Peter M^^f8ller Neergaard and
25 %% Arne John Glenstrup
27 \NeedsTeXFormat{LaTeX2e}
28 \newcommand{\semanticVersion}{2.0(epsilon)}
29 \newcommand{\semanticDate}{2003/10/28}
30 \ProvidesPackage{semantic}
31 [\semanticDate\space v\semanticVersion\space]
32 \typeout{Semantic Package v\semanticVersion\space [\semanticDate]}
34 \newcounter{@@conflict}
35 \newcommand{\@semanticNotDefinable}{%
36 \typeout{Command \@backslashchar\reserved@a\space already defined}
37 \stepcounter{@@conflict}}
38 \newcommand{\@oldNotDefinable}{}
39 \let\@oldNotDefinable=\@notdefinable
40 \let\@notdefinable=\@semanticNotDefinable
41 \newcommand{\TestForConflict}{}
42 \def\TestForConflict#1{\sem@test #1,,}
43 \newcommand{\sem@test}{}
44 \newcommand{\sem@tmp}{}
45 \newcommand{\@@next}{}
48 \ifx \sem@tmp\empty \let\@@next=\relax \else
49 \@ifdefinable{#1}{} \let\@@next=\sem@test \fi
51 \TestForConflict{\@inputLigature,\@inputInference,\@inputTdiagram}
52 \TestForConflict{\@inputReservedWords,\@inputShorthand}
53 \TestForConflict{\@ddInput,\sem@nticsLoader,\lo@d}
54 \def\@inputLigature{\input{ligature.sty}\message{ math mode ligatures,}%
55 \let\@inputLigature\relax}
56 \def\@inputInference{\input{infernce.sty}\message{ inference rules,}%
57 \let\@inputInference\relax}
58 \def\@inputTdiagram{\input{tdiagram.sty}\message{ T diagrams,}%
59 \let\@inputTdiagram\relax}
60 \def\@inputReservedWords{\input{reserved.sty}\message{ reserved words,}%
61 \let\@inputReservedWords\relax}
62 \def\@inputShorthand{\input{shrthand.sty}\message{ short hands,}%
63 \let\@inputShorthand\relax}
65 \newcommand{\@ddInput}[1]{%
66 \toks1=\expandafter{\the\toks1\noexpand#1}}
67 \DeclareOption{ligature}{\@ddInput\@inputLigature}
68 \DeclareOption{inference}{\@ddInput\@inputInference}
69 \DeclareOption{tdiagram}{\@ddInput\@inputTdiagram}
70 \DeclareOption{reserved}{\@ddInput\@inputReservedWords}
71 \DeclareOption{shorthand}{\@ddInput\@inputLigature
72 \@ddInput\@inputShorthand}
74 \typeout{Loading features: }
75 \def\sem@nticsLoader{}
76 \edef\lo@d{\the\toks1}
86 \typeout{and general definitions.^^J}
88 \let\@inputInference\relax
89 \let\@inputLigature\relax
90 \let\@inputTdiagram\relax
91 \let\@inputReservedWords\relax
92 \let\@inputShorthand\relax
93 \let\sem@nticsLoader\realx
95 \TestForConflict{\@dropnext,\@ifnext,\@ifn,\@ifNextMacro,\@ifnMacro}
96 \TestForConflict{\@@maxwidth,\@@pLineBox,\if@@Nested,\@@cBox}
97 \TestForConflict{\if@@moreLines,\@@pBox}
99 \let\reserved@e=#1\def\reserved@a{#2}\def\reserved@b{#3}\futurelet%
102 \ifx \reserved@c \reserved@e\let\reserved@d\reserved@a\else%
103 \let\reserved@d\reserved@b\fi \reserved@d}
104 \def\@ifNextMacro#1#2{%
105 \def\reserved@a{#1}\def\reserved@b{#2}%
106 \futurelet\reserved@c\@ifnMacro}
108 \ifcat\noexpand\reserved@c\noexpand\@ifnMacro
109 \let\reserved@d\reserved@a
110 \else \let\reserved@d\reserved@b\fi \reserved@d}
111 \newcommand{\@dropnext}[2]{#1}
112 \ifnum \value{@@conflict} > 0
113 \PackageError{Semantic}
114 {The \the@@conflict\space command(s) listed above have been
115 redefined.\MessageBreak
116 Please report this to turtle@bu.edu}
117 {Some of the commands defined in semantic was already defined %
118 and has\MessageBreak now be redefined. There is a risk that %
119 these commands will be used\MessageBreak by other packages %
120 leading to spurious errors.\MessageBreak
121 \space\space Type <return> and cross your fingers%
123 \let\@notdefinable=\@oldNotDefinable
124 \let\@semanticNotDefinable=\relax
125 \let\@oldNotDefinable=\relax
126 \let\TestForConflict=\relax
134 \newif\if@@Nested \@@Nestedfalse
137 %% End of file `semantic.sty'.