%% The following is an Eiffel style for the latex package listings.
%% It provides syntax highliting for Eiffel source code in latex documents.
%% Note that the listings package already has an Eiffel style defined.
%% However, the style in this file is more inline with the style guidelines from
%% OOSC2

%% Usage:
%% Rename this file to lstlang0.sty and put it in your latex project directory.
%% 
%% \usepackage{listings}
%% ...
%% \begin{lstlisting}[language=OOSC2Eiffel]
%% sqrt (x: REAL): REAL is
%%   require
%%     x >= 0
%%   do
%%     -- Implementation
%%   ensure
%%     abs(Result*Result - x) <= epsilon
%%  end
%%  \end{lstlisting}
%%
%% Note: Be sure to add your own class names to `morendkeywords'.
\lstdefinelanguage{Eiffel}%
{
  morekeywords={alias,all,and,as,check,class,interface,
      creation,create,debug,deferred,do,else,elseif,end,
      ensure,expanded,export,external,false,feature,from,frozen,if,
      implies,indexing,infix,inherit,inspect,invariant,is,
      like,local,loop,not,obsolete,old,once,or,prefix,
      redefine,rename,require,rescue,retry,select,
      separate,strip,then,true,undefine,unique,until,variant,
      when,xor, Result, Current, Void},
   morendkeywords={DOUBLE, INTEGER, POINTER NONE, REAL,
     STRING,BIT,BOOLEAN,CHARACTER,STRING,
     LINKED_LIST,
     INTEGER, BOOLEAN, CURSOR, DYNAMIC_LIST, DYNAMIC_CHAIN, LIST,
     TRAVERSABLE, ACTIVE, CHAIN, OPERATING_ENVIRONMENT, ANY, STD_FILES,
     PROCEDURE, TUPLE, ROUTINE, FUNCTION, LINEAR, COLLECTION,
     CONTAINER, SEQUENCE, BILINEAR, BAR, FOO, OPEN_FILE, PERSON, CARTESIAN_PRODUCT_EXAMPLE},
   sensitive,
   morecomment=[l]--,
   morestring=[d]",
   columns=flexible,
   breaklines=true, 
   tabsize=2,
   identifierstyle=\color[HTML]{000000}\itshape,
   commentstyle=\color[HTML]{F10000},
   stringstyle=\color{HTML}{000000}\bfseries, 
   showstringspaces=false,
   keywordstyle=\color[HTML]{333399}\bfseries,
   ndkeywordstyle=\color[HTML]{3333FF}\itshape,
%   backgroundcolor=\color[rgb]{0.95,0.95,0.95}, 
   numbers=none, 
%   stepnumber=3, 
   numbersep=2pt, 
%   frame=ltrb,
%   framexleftmargin=7pt,
%   framexrightmargin=7pt,
%   frameround=tttt
 }[keywords,comments,strings]

%{morekeywords={alias,all,and,as,check,class,%
%creation,Current,debug,deferred,do,DOUBLE,else,elseif,end,%
%ensure,expanded,export,external,false,feature,from,frozen,if,%
%implies,indexing,infix,inherit,inspect,invariant,is,%
%like,local,loop,NONE,not,obsolete,old,once,or,prefix,%
%redefine,rename,require,rescue,Result,retry,select,%
%separate,strip,then,true,undefine,unique,until,variant,%
%when,xor,attribute,atomic,on_abort,Void},%
%sensitive,%
%morecomment=[l]--,%
%morestring=[d]",
%literate={\%}{$\div$~ }1,
%}[keywords,comments,strings]%
