%% 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'.

\lst@definelanguage{OOSC2Eiffel}
{
  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},
   morendkeywords={DOUBLE, INTEGER, POINTER, NONE, REAL,
     STRING,BIT,BOOLEAN,CHARACTER,STRING,SIMPLE_LIST
     LINKED_LIST,
     INTEGER, BOOLEAN, CURSOR,
     ANY, PROCEDURE, TUPLE, ROUTINE, FUNCTION, 
     MATRIX, COMPARABLE, DENSE_MATRIX, ARRAY, SPARSE_MATRIX,
     PAIR, PIZZA, PIZZA_TOPPING, CHEESE_TOPPING, 
     VEGETABLE_TOPPING, ARRAYED_LIST, LIST, TREE, ROOT_CLASS,
     MY_TREE, LINKED_LIST, TREE_VIEW, PERSON
     },
   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.98,0.98,0.98}, 
   numbers=left, 
   stepnumber=2, 
   numbersep=2pt, 
%   frame=ltrb,
%   framexleftmargin=7pt,
%   framexrightmargin=7pt,
%   frameround=tttt

 }[keywords,comments,strings]


%\definecolor{lightgray}{rgb}  {0.95,0.95,0.95}
%\definecolor{darkblue}{rgb}   {0.01,0.08,0.45}
%\definecolor{darkred}{rgb}    {0.45,0.10,0.80}
%\definecolor{darkgreen}{rgb}    {0.01,0.35,0.01}

\lst@definelanguage{extNadl}%
  {morekeywords={VARIABLES, bool, nat, SYSTEM, agt, mod, eff, pre,
      ENVIRONMENT, INITIALLY, GOAL},
   sensitive,%
   morecomment=[l]\%,%
   morestring=[d]",%

  nolol=true
  breaklines=true, 
  numbers=left, 
  stepnumber=3, 
  numbersep=2pt, 
  numberstyle=\tiny,
  basicstyle=\tiny,
  backgroundcolor=\color[rgb]{0.95,0.95,0.95}, 
  identifierstyle=\color{black}, 
  commentstyle=\color[rgb]{0.01, 0.35, 0.01}, 
  stringstyle=\color[rgb]{0.01, 0.35, 0.01}\bfseries,
  showstringspaces=false,
  keywordstyle=\color[rgb]{0.01, 0.08, 0.45},
  tabsize=2,
%  frame=ltrb,
%  framexleftmargin=7pt,
%  framexrightmargin=7pt,
%  frameround=tttt

  }[keywords,comments,strings]%
