%%
%% This is file `lstsimula.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% listings.dtx  (with options: `keywordcomments')
%% lstdrvrs.dtx  (with options: `simula')
%% 
%% (w)(c) 1996,1997,1998 Carsten Heinz and/or any other author mentioned
%% elsewhere in this file.
%% 
%% This file is distributed freely. You are not allowed to take money for
%% the use or distribution of this file, except for a nominal charge for
%% copying etc..
%% 
%% This file is distributed without any warranty, express or implied, as
%% to merchantability or fitness for any particular purpose.
%% 
%% Permission is granted to change this file. You are not allowed to
%% distribute any changed version this file, neither under the same name
%% nor under a different one.
%% 
\lst@Aspect{keywordcomment}
    {\lst@MakeKeywordArg{#1}\let\lst@KCkeywords\lst@arg %
     \let\lst@DefKC\lstCC@KeywordComment}
\lst@Aspect{doublekeywordcommentsemicolon}{\lstDKCS@#1}
\gdef\lstDKCS@#1#2#3%
    {\lst@MakeKeywordArg{#1}\let\lst@KCAkeywordsB\lst@arg %
     \lst@MakeKeywordArg{#2}\let\lst@KCAkeywordsE\lst@arg %
     \lst@MakeKeywordArg{#3}\let\lst@KCBkeywordsB\lst@arg %
     \let\lst@DefKC\lstCC@DoubleKeywordCommentS}
\lst@AddToHook{SelectCharTable}{\lst@DefKC}
\lst@AddToHook{BeforeSelectCharTable}
    {\lst@ifsensitive\else %
         \lst@MakeMacroUppercase\lst@KCkeywords %
         \lst@MakeMacroUppercase\lst@KCAkeywordsB %
         \lst@MakeMacroUppercase\lst@KCAkeywordsE %
         \lst@MakeMacroUppercase\lst@KCBkeywordsB %
     \fi}
\lst@AddToHook{SetLanguage}{%
    \let\lst@DefKC\relax \let\lst@KCkeywords\@undefined %
    \let\lst@KCAkeywordsB\@undefined \let\lst@KCAkeywordsE\@undefined %
    \let\lst@KCBkeywordsB\@undefined}
\gdef\lstCC@KeywordComment{%
    \let\lst@Output@\lst@Output \let\lst@Output\lst@KCOutput}
\gdef\lst@KCOutput{%
    \ifnum\lst@length=\z@\else %
        \let\lst@next\relax %
        \expandafter\lst@IfOneOf \the\lst@token\relax \lst@KCkeywords %
            {\lst@KCOutput@\lst@BeginKC}{}%
        \lst@Output@ \lst@next %
    \fi}
\gdef\lst@KCOutput@#1{\let\lst@next#1%
    \expandafter\def\expandafter\lst@save\expandafter{\the\lst@token}%
    \lst@ifmode \ifnum\lst@mode=\lst@KCmode %
        \xdef\@gtempa{%
            \noexpand\lst@token{\the\lst@token}%
            \noexpand\lst@length\the\lst@length\relax}%
        \aftergroup\@gtempa \lst@LeaveMode \let\lst@next\relax %
    \fi \fi}
\gdef\lst@BeginKC{%
    \lstCC@BeginComment\lst@KCmode \let\lst@KCkeywords\lst@save %
    \lst@ifsensitive\else \lst@MakeMacroUppercase\lst@KCkeywords \fi}
\gdef\lstCC@DoubleKeywordCommentS{%
    \lstCC@EndKeywordComment{"003B}%
    \let\lst@Output@\lst@Output \let\lst@Output\lst@DKCOutput}
\gdef\lst@DKCOutput{%
    \ifnum\lst@length=\z@\else %
        \let\lst@next\relax %
        \expandafter\lst@IfOneOf \the\lst@token\relax\lst@KCAkeywordsB %
            {\lst@KCOutput@\lst@BeginDKCA}{%
        \expandafter\lst@IfOneOf \the\lst@token\relax\lst@KCBkeywordsB %
            {\lst@KCOutput@\lst@BeginDKCB}{}}%
        \lst@Output@ \lst@next %
    \fi}
\gdef\lst@BeginDKCA{\lstCC@BeginComment\lst@KCmode %
    \let\lst@KCAkeywordsB\lst@KCAkeywordsE \let\lst@KCBkeywordsB\@empty}
\gdef\lst@BeginDKCB{\lstCC@BeginComment\lst@KCmode %
    \let\lst@KCAkeywordsB\@empty \let\lst@KCBkeywordsB\@empty}
\gdef\lstCC@EndKeywordComment#1{%
    \lccode`\~=#1\lowercase{\lstCC@EndKeywordComment@~}{#1}}
\gdef\lstCC@EndKeywordComment@#1#2{%
    \expandafter\let\csname lstCC@EKC#2\endcsname#1%
    \def#1{%
        \ifnum\lst@mode=\lst@KCmode %
            \let\lstCC@next\lstCC@EndComment %
        \else %
            \let\lstCC@next\relax %
        \fi %
        \csname lstCC@EKC#2\endcsname \lstCC@next}}
\lstdefinelanguage[67]{Simula}%
  {keywords={activate,after,array,at,before,begin,boolean,character,%
      class,comment,delay,detach,do,else,end,external,false,for,go,%
      goto,if,in,inner,inspect,integer,is,label,name,new,none,notext,%
      otherwise,prior,procedure,qua,reactivate,real,ref,resume,simset,%
      simulation,step,switch,text,then,this,to,true,until,value,%
      virtual,when,while},%
   sensitive=false,%
   doublekeywordcommentsemicolon=%
      {end}{else,end,otherwise,when}{comment},%
   stringizer={"'}%
  }%
\lstdefinedrvlanguage[CII]{Simula}%
  {language=[67]Simula,%
   morekeywords={and,equiv,exit,impl,not,or,stop}%
  }%
\lstdefinedrvlanguage[DEC]{Simula}%
  {language=[67]Simula,%
   morekeywords={and,eq,eqv,ge,gt,hidden,imp,le,long,lt,ne,not,%
      options,or,protected,short}%
  }%
\lstdefinedrvlanguage[IBM]{Simula}{language=[DEC]Simula}
\endinput
%%
%% End of file `lstsimula.sty'.
