Commits

Alessio Caiazza  committed c5a0f8c

Conversione SVN-HG

  • Participants

Comments (0)

Files changed (65)

+LATEX = latex
+BIBTEX = bibtex
+L2H = latex2html
+PDFLATEX = ps2pdf
+DVIPS = dvips
+PS2PDF = ps2pdf -dPDFSETTINGS=/prepress 
+
+RERUN = "(There were undefined references|Rerun to get (cross-references|the bars) right)"
+RERUNBIB = "No file.*\.bbl|Citation.*undefined"
+
+GOALS = slides.ps.gz slides.pdf
+DVIFILES = slides.dvi
+
+COPY = if test -r $*.toc; then cp $*.toc $*.toc.bak; fi 
+RM = rm -f
+
+all: slides handout
+	
+rb_sources: sources/* 
+	cd sources; make
+	
+	
+slides: ruby.slides.pdf
+
+handout: ruby.article.pdf
+
+ruby.slides.pdf:	*.tex *.sty rb_sources images/*
+#cd images; make
+				pdflatex ruby.slides.tex    
+
+ruby.article.pdf:	*.tex *.sty rb_sources images/*
+#cd images; make
+				pdflatex ruby.article.tex
+
+clean:
+				rm -f *.pdfsync *.aux *.log *.bbl *.blg *.brf *.cb *.ind *.idx *.ilg  \
+				*.inx *.ps *.dvi *.pdf *.toc *.out *.url *~ *.out *.log *.bm *.bak \#*\# \
+				*.nav *.snm
+				cd sources; make clean
+
+SOURCEFILES = beamerthemeruby.sty brianbib.sty images keyval.tex listings.cfg \
+	      listings.sty lstlang1.sty lstlang2.sty lstlang3.sty lstmisc.sty lstpatch.sty \
+	      Makefile ruby.bib ruby.sty rubytheme.sty slides.tex sources xkeyval.def xkeyval.sty xkeyval.tex \
+	      licenza.tex introduzione.tex tipi\ di\ dato.tex ruby.slides.tex ruby.article.tex
+
+source.tar.bz2: clean
+	rm -rf tmp; \
+	mkdir tmp; \
+	cp -r $(SOURCEFILES) tmp; \
+	cd tmp; \
+	find ./ | grep \\.svn | xargs rm -rf; \
+	tar -cvvjf source.tar.bz2 *; \
+	cp source.tar.bz2 ..
+
+source: source.tar.bz2

File beamerthemeruby.sty

+\ProvidesPackage{beamerthemeruby}[2004/09/25 ver 1.00]
+\NeedsTeXFormat{LaTeX2e}[1995/12/01]
+
+% Copyright 2003 by Till Tantau <tantau@cs.tu-berlin.de>.
+%
+% This program can be redistributed and/or modified under the terms
+% of the LaTeX Project Public License Distributed from CTAN
+% archives in directory macros/latex/base/lppl.txt.
+
+\newcounter{pagecount}
+\addtocounter{pagecount}{1}
+\newcounter{bst@temp}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \section{A counter that contains the number of pages}
+% \DescribeMacro{\bs@savelastpage}
+% Write number of pages into aux file
+% We need two runs for this to work
+%    \begin{MacroCode}
+\newcommand{\bs@savelastpage}{%
+  \immediate\write\@auxout{%
+    \string\message{bstransp: Loading lastpage from aux file}%
+    \string\setcounter{pagecount}{\thepage}}}
+%    \end{MacroCode}
+%
+% At the end of the document start the save procedure
+% and utter a message.
+%    \begin{MacroCode}
+\AtEndDocument{%
+  \message{bstransp: Saving set lastpage into aux file}%
+  \bs@savelastpage}
+%    \end{MacroCode}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+\mode<presentation>
+
+\RequirePackage{fp}               % FLoating point calc
+\edef\midpoint{0.5}%
+
+\beamerboxesdeclarecolorscheme{title}{structure!75!black}{structure!75!black}
+
+\usetitlepagetemplate{%
+  \vbox{}
+  \vfill
+  \begin{centering}
+    \begin{beamerboxesrounded}[shadow=false,scheme=title]{}
+      \begin{centering}\Large\color{white}\inserttitle\par%
+        \normalsize\ifx\insertsubtitle\@empty\else\vskip0.25em\insertsubtitle\par\fi
+        \hskip -\paperwidth
+        \vskip -\paperheight
+      \end{centering}
+    \end{beamerboxesrounded}
+    \vskip1em\par
+    \inserttitlegraphic
+    {\color{white}\smaller[2]\vskip-2em\insertinstitute}\par
+    \vskip1em\par
+    \normalsize\insertauthor\par
+  \end{centering}
+  \vfill
+}
+  
+\useframetitletemplate{%
+  \nointerlineskip\vskip-2pt%{\tiny\vskip.35em}\vskip-2pt%
+  \hbox{\leavevmode%
+    \advance\beamer@leftmargin by -12bp%
+    \advance\beamer@rightmargin by -12bp%
+    \beamer@tempdim=\textwidth%
+    \advance\beamer@tempdim by \beamer@leftmargin%
+    \advance\beamer@tempdim by \beamer@rightmargin%
+    \hskip-\Gm@lmargin\hbox{%
+      \setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}%
+          \vbox{}\vskip-0.9ex%
+          \leftskip0.3cm%
+          \rightskip0.3cm plus1fil\leavevmode
+          \Large\color{white}\hskip0.2em\insertframetitle%
+          \ifx\insertframesubtitle\@empty%
+            \strut\par%
+          \else%
+            \par{\footnotesize{\insertframesubtitle}\strut\par}%
+          \fi%
+          \nointerlineskip%
+          \vbox{}%
+          \end{minipage}}%
+      \color{structure!75!black}%
+      \beamer@tempdim=\ht\beamer@tempbox%
+      \advance\beamer@tempdim by 2pt%
+      \begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\beamer@tempdim}
+        \pgfrect[clip]{\pgforigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
+        \pgfbox[left,base]{\pgfuseshading{frametitleshade}}
+      \end{pgfpicture}
+      %\vrule width\paperwidth height \beamer@tempdim%
+      \hskip-\paperwidth%
+      \advance\beamer@tempdim by -2pt%
+      {\hskip-2.2pt\raisebox{0.65pt}{\includegraphics[width=0.37cm]{images/ruby-pear-red.eps}}\hskip 2.2pt}\hskip -0.37cm%
+      \box\beamer@tempbox%
+    }%
+    \hskip-\Gm@rmargin%
+  }%
+  \nointerlineskip%
+  \vskip-0.2pt%
+  \hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{topshade}\hskip-\Gm@rmargin}%
+  \vskip-2pt%
+  \vskip-1em%
+}
+
+
+\beamertemplatetriangleitem
+\beamertemplatesolidbuttons
+
+\usesectionheadtemplate{}{}
+
+\usesubsectionheadtemplate{}{}
+
+% Entries in table of contents
+%\beamertemplatenumberedballsectiontoc
+
+\pgfdeclareverticalshading{topshade}{\paperwidth}{%
+  color(0pt)=(bg);
+  color(4pt)=(black!50!bg)}
+
+\pgfdeclarehorizontalshading{frametitleshade}{\paperheight}{%
+  color(0pt)=(structure);
+  color(\paperwidth)=(black)}
+
+\newdimen\tempdimen
+% Head
+
+% Footline
+\newlength{\footrest}
+\newlength{\leftfoot}
+\newlength{\rightfoot}
+\newlength{\minleftfoot}
+\newlength{\minrightfoot}
+\newlength{\rubywidth}
+\newlength{\mingradientfoot}
+\setlength{\mingradientfoot}{0.4em}
+\setlength{\rubywidth}{0.4cm}
+\setlength{\minleftfoot}{2cm}
+\setlength{\minrightfoot}{2cm}
+\usefoottemplate{%
+  \setlength{\footrest}{\paperwidth}%
+  \addtolength{\footrest}{-\rubywidth}%
+  \addtolength{\footrest}{-\minleftfoot}%
+  \addtolength{\footrest}{-\minrightfoot}%
+  \addtolength{\footrest}{-2\mingradientfoot}%
+  \ifthenelse{\equal{\thepagecount}{1}}{}{%
+    \FPeval{\midpoint}{trunc(((thepage-1) / (thepagecount-2)):4)}%
+  }%
+  \setlength{\leftfoot}{0pt}%
+  \setlength{\rightfoot}{\footrest}%
+  \addtolength{\leftfoot}{\midpoint\footrest}%
+  \addtolength{\rightfoot}{-\leftfoot}%
+  \addtolength{\leftfoot}{\mingradientfoot}%
+  \addtolength{\rightfoot}{\mingradientfoot}%
+  \vbox{\tiny%
+    \hbox{%
+      \setbox\beamer@linebox=\hbox to\paperwidth{%
+        {\hskip 1em\tiny\color{white}\textbf{Alessio Caiazza}\hfill\textbf{Corso Ruby}\hskip 1em}}%
+      \ht\beamer@linebox=2.625ex%
+      \dp\beamer@linebox=0pt%
+      \setbox\beamer@linebox=\vbox{\box\beamer@linebox\vskip1.125ex}%
+      \hskip-\Gm@lmargin%
+      \pgfdeclarehorizontalshading{leftfootshade}{\paperheight}{%
+        color(0pt)=(structure);%
+        color(\leftfoot)=(white)}%
+      \pgfdeclarehorizontalshading{rightfootshade}{\paperheight}{%
+        color(0pt)=(white);%
+        color(\rightfoot)=(structure)}%
+      \color{structure}\vrule width \minleftfoot height\ht\beamer@linebox%
+      \begin{pgfpicture}{0pt}{0pt}{\leftfoot}{\ht\beamer@linebox}%
+        \pgfrect[clip]{\pgforigin}{\pgfpoint{\leftfoot}{\ht\beamer@linebox}}%
+        \pgfbox[left,base]{\pgfuseshading{leftfootshade}}%
+      \end{pgfpicture}%
+      \includegraphics[width=\rubywidth]{images/ruby-pear.eps}% 
+      \begin{pgfpicture}{0pt}{0pt}{\rightfoot}{\ht\beamer@linebox}%
+        \pgfrect[clip]{\pgforigin}{\pgfpoint{\rightfoot}{\ht\beamer@linebox}}%
+        \pgfbox[left,base]{\pgfuseshading{rightfootshade}}%
+      \end{pgfpicture}%
+      \color{structure}\vrule width \minrightfoot height\ht\beamer@linebox%
+      \hskip-\paperwidth%
+      \hbox{\box\beamer@linebox\hfill}\hfill\hskip-\Gm@rmargin%
+    }%
+  }%
+}
+
+
+\beamertemplateshadowblocks
+
+%\renewcommand{\beamertemplatesetupshadings}{
+  \beamerboxessetupshadows
+  \beamerboxesdeclarecolorscheme{block}{structure!75!black}{black!8!white}
+  \beamerboxesdeclarecolorscheme{alert}{alert!75!bg}{alert!8!white}
+  \beamerboxesdeclarecolorscheme{example}{beamerexample!75!bg}{beamerexample!8!white}
+%}
+
+\beamertemplateheadempty
+
+\beamertemplatenavigationsymbolsempty
+
+\usebibliographyblocktemplate
+  {\color{structure}}
+  {\par\color{black}}
+  {\par\color{black}}
+  {\par\color{structure}}
+
+\mode<all>

File brianbib.sty

+\usepackage{jurabib}
+
+\renewcommand*{\bibbtsep}{In: } % Buch vor dem Titel
+\renewcommand*{\bibjtsep}{In: } % Zeitschrift vor dem Titel
+\renewcommand*{\bibansep}{: } % Nach dem Namen
+\renewcommand*{\bibatsep}{.} % Nach dem Titel
+\renewcommand*{\bibbdsep}{} %
+\renewcommand*{\biburlprefix}{\\\jblangle{}}
+\renewcommand*{\biburlsuffix}{\jbrangle{}}
+\setlength{\jbbibhang}{2.5em}
+\jbdotafterbibentry % Punkt am Ende
+\AddTo\bibsgerman{%
+  \renewcommand*{\ibidemname}{} % a.a.O am Anfang wird zu leer
+  \renewcommand*{\ibidemmidname}{} % a.a.O in der Mitte wird zu leer
+} %
+\jurabibsetup{
+  citefull=first,               % nur einmal Vollzitat, danach Kurzzitate
+  authorformat=reducedifibidem, % Nur Nachname bei Kurzzitat
+  titleformat=colonsep,         % : Nach Autor
+  titleformat=all,
+  pages=format,                 % S. Automatisch
+  see,                          % Zweiter Parameter kann f^^fcr ``Vgl.''
+                                % verwendet werden
+  commabeforerest=true,         % Zus^^e4tzliches Komma
+  crossref=dynamic              % Kreuzreferenzen einf^^fcgen. Zus^^e4tzlich
+                                % ist aber noch f^^fcr bibtex die Kommandozeile:
+                                % $ bibtex8 --huge --min_crossrefs 1 DATEINAME
+                                % n^^f6tig
+}
+
+\renewcommand{\jbauthorfont}{\textbf}
+\renewcommand{\jbtitlefont}{\textit}
+\renewcommand{\jbcoauthorfont}{\textbf}
+\renewcommand{\jbactualauthorfont}{\textbf}
+\renewcommand{\jbauthorfontifcoauthor}{\textbf}
+\renewcommand*{\bibapifont}{\textit}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

File dettaglio.tex

+% =================
+% = dettaglio.tex =
+% =================
+% 2007-05-03
+% Approfondimento sulla programmazione ruby
+% 
+% (c) Copyright 2007 Alessio Caiazza <ac@abisso.org>. All Rights Reserved. 
+
+This is pdfeTeX, Version 3.14159-1.10b-2.1 (Web2C 7.4.5) (format=pdflatex 2005.9.4)  11 OCT 2005 22:54
+entering extended mode
+**slides.tex
+(/usr/share/texmf/tex/latex/tools/.tex{/usr/share/texmf/pdftex/config/pdftex.cf
+g}
+! Interruption.
+<to be read again> 
+                   \begingroup 
+l.1 
+    %%
+? x
+ 
+Here is how much of TeX's memory you used:
+ 6 strings out of 94960
+ 127 string characters out of 1182471
+ 47267 words of memory out of 1000001
+ 3226 multiletter control sequences out of 10000+50000
+ 3640 words of font info for 14 fonts, out of 500000 for 1000
+ 198 hyphenation exceptions out of 1000
+ 3i,0n,1p,17b,6s stack positions out of 1500i,500n,5000p,200000b,5000s
+ 0 PDF objects out of 300000
+ 0 named destinations out of 131072
+ 0 words of extra memory for PDF output out of 65536
+No pages of output.

File images/Makefile

+images := $(patsubst %.png,%.eps,$(wildcard *.png))
+
+images:	$(images)
+
+%.eps : %.png
+	convert $< eps3:$@

File images/cc.png

Added
New image

File images/ruby-etched.png

Added
New image

File images/ruby-pear-blue.png

Added
New image

File images/ruby-pear-red.png

Added
New image

File images/ruby-pear-red.xcf

Binary file added.

File images/ruby-pear.png

Added
New image

File images/rubydoc.png

Added
New image

File images/shell_irb.png

Added
New image

File images/shell_ri.png

Added
New image

File images/slide.gif

Added
New image

File images/wolf.png

Added
New image

File images/wolf_bg.png

Added
New image

File images/wolf_cover.png

Added
New image

File introduzione.tex

+%\part{Introduzione}
+
+%\frame{\partpage}
+
+%\frame{\frametitle{Content}
+%  \setcounter{tocdepth}{0}
+%  \tableofcontents
+%}
+
+\section{Introduzione a ruby}
+
+\subsection{hello world}\label{sub:hello_world} % (fold)
+\frame{\frametitle{Un ``hello world'' in stile ruby} 
+	\begin{block}{Niente paura!} 
+		Ecco un ``Hello World'' un po' fuori dal comune.\\
+		Pi� avanti capiremo bene ci� che accade.   
+	\end{block}
+
+	\begin{block}{Hello World.rb}   
+		\rubysource{sources/snippets/hello_world}
+		\rubyout{sources/snippets/hello_world}	    
+	\end{block}
+}  
+% subsection hello_world (end)
+
+\subsection{Definire una funzione}\label{sub:definire_una_funzione} % (fold)
+\frame{\frametitle{Definire una funzione}
+\begin{block}{Le funzioni sono definite attraverso la parola chiave \texttt{def}}     
+	\rubysource{sources/snippets/hello_method}
+	\rubyout{sources/snippets/hello_method}    
+\end{block}
+}
+% subsection definire_una_funzione (end)
+
+\subsection{Orientato agli oggetti}
+%FIXME trovare un modo per evitare che si sovrapponga al logo
+\vskip 11pt
+\frame{\frametitle{In ruby tutto � un oggetto}
+\begin{block}{Tutto � un oggetto, vediamo alcune chiamate di metodi}
+	\RubyXMP[0.43\textwidth]{}{sources/object}
+\end{block}
+}      
+
+\subsection{Chiamare un metodo}\label{sub:chiamare_un_metodo} % (fold)
+
+\frame{\frametitle{Chiamare un metodo}  
+\begin{block}{Ma cosa vuol dire \texttt{puts} ? }	
+	\rubysource[firstnumber=1,firstline=4,lastline=4]{sources/snippets/hello_method}
+\end{block} 
+\begin{overprint}
+\onslide<2> 
+\begin{block}{Facciamo un passo indietro} 
+	\rubysource{sources/snippets/hello_method}
+	\rubyout{sources/snippets/hello_method}
+\end{block}                                
+\onslide<3-4>
+\begin{block}{Un altro esempio}	
+	\rubysource{sources/snippets/hello_puts}
+	\rubyout{sources/snippets/hello_puts}
+\end{block}
+\end{overprint} 
+\onslide<4>
+\begin{block}{Un po' di chiarezza}	
+	In ruby � possibile chiamare i metodi senza utilizzare le parentesi. \\
+	Questo \textbf{� fortemente sconsigliato} a meno che non si tratti di casi molto semplici.
+\end{block}
+}
+% subsection chiamare_un_metodo (end)
+
+\subsection{Convenzioni per variabili e costanti}\label{sub:convenzioni_per_variabili_e_costanti} % (fold)
+\frame{\frametitle{Convenzioni per variabili e costanti}
+	\begin{block}{Convenzioni}
+		{\uncover<1->In ruby si utilizzano delle convenzioni per i nomi delle variabili e delle costanti, il primo carattere ci indica esattamente cosa rappresenta quel nome.\\} 
+		\begin{itemize}
+		\item<2-> Le variabili locali, i nomi dei metodi e i loro parametri iniziano con una lettera minuscola o l'underscore.
+		\item<3-> Classi, moduli e costanti iniziano con la maiuscola.
+		\item<4-> Le variabili globali iniziano con il dollaro (\$).
+		\item<5-> Le variabili di istanza con il simbolo ``at'' (@).  
+		\item<6-> Le variabili di classe con due ``at'' (@@).
+		\end{itemize}
+	\end{block} 
+	\uncover<7->{
+	\begin{block}{Tabella}                     
+		\begin{center}
+		\begin{tabular}{lllll}
+			\hline
+			\multicolumn{4}{c}{\textbf{Variabili}} & \textbf{Costanti e} \\
+			\textbf{Locali} & \textbf{Globali} & \textbf{Istanza} & \textbf{Classe} & \textbf{nomi di classi}\\
+			\hline
+			pippo & \$var & @punto & @@contatore & PI\\
+			\hline
+			\_pluto & \$\_  & @\_x & @@media\_pesata & IntegratoreDiFlussi\\
+			\hline
+			elabora\_e\_stampa & \$TEST & @coordinata\_y & @@TOT & Sommatore\\
+			\hline
+		\end{tabular}      
+		\end{center}
+	\end{block}} 	
+}
+% subsection convenzioni_per_variabili_e_costanti (end)
+
+\subsection{Strutture di controllo}\label{sub:strutture_di_controllo} % (fold)
+
+\frame{\frametitle{Le normali strutture di controllo}
+	\begin{block}{Le strutture di controllo disponibili}	
+		\begin{itemize}[<+-| alert@+>]
+		\item if\ldots{}elsif\ldots{}else
+		\item while
+		\item unless
+		\item case  
+		\end{itemize}
+	\end{block}
+}
+
+\frame{\frametitle{if\ldots{}elsif\ldots{}else} 
+%FIXME trovare un modo per evitare che si sovrapponga al logo
+\vskip 11pt
+\begin{block}{il costrutto \texttt{if}}
+	\rubysource{sources/snippets/if_elsif_else}
+	\rubyout{sources/snippets/if_elsif_else}
+\end{block}
+}
+
+\frame{\frametitle{while}
+\begin{block}{il costrutto \texttt{while}}
+	\rubysource[lastline=5]{sources/snippets/while}
+	\rubyout[lastline=1]{sources/snippets/while}
+	\pause
+	\textbf{Oppure} \pause
+	\rubysource[firstline=7,firstnumber=1]{sources/snippets/while}
+	\rubyout[firstline=2,firstnumber=1]{sources/snippets/while}
+\end{block}
+}
+
+\frame{\frametitle{\texttt{unless}, il contrario di \texttt{if}}
+\begin{block}{il costrutto \texttt{unless}}
+	\rubysource{sources/snippets/unless}
+	\rubyout{sources/snippets/unless}
+\end{block}
+}
+
+\frame{\frametitle{case}
+
+	\begin{overprint}
+		\onslide<1>\begin{block}{Ruby � molto semplice da leggere}	
+		Se si conoscono altri linguaggi di programmazione, 
+		questo esempio vi stupir� sicuramente:
+		
+		\rubysource[lastline=14]{sources/snippets/switch_case}
+		\end{block} 
+		
+	\onslide<2->
+	\begin{block}{Usiamo il metodo di prima}
+		\rubysource[firstline=16]{sources/snippets/switch_case}
+		\rubyout{sources/snippets/switch_case}
+	\end{block}
+		  
+	\end{overprint}
+	   
+}
+
+% subsection strutture_di_controllo (end)
+
+\subsection{Classi}\label{sub:classi} % (fold)
+\subsubsection{Definizione}\label{ssub:definizione_classi} % (fold)
+\frame{\frametitle{Classi}
+\begin{block}	{la parola chiave \texttt{class}}
+	\rubysource{sources/snippets/dipendente_class}
+	\rubyout{sources/snippets/dipendente_class}
+\end{block}
+}
+% subsubsection definizione_classi (end)
+\subsubsection{Attributi}\label{ssub:attributi} % (fold)
+\frame{\frametitle{Attributi: \texttt{reader}}
+\begin{block}	{}
+	\rubysource{sources/snippets/dipendente_class_reader}
+	\rubyout{sources/snippets/dipendente_class_reader}
+\end{block}
+}
+
+\frame{\frametitle{Attributi: \texttt{writer}}
+\begin{block}	{}
+	\rubysource[firstline=11]{sources/snippets/dipendente_class_writer}
+	\rubyout{sources/snippets/dipendente_class_writer}
+\end{block}
+}
+
+\frame{\frametitle{Attributi: \texttt{accessor}}
+\begin{block}	{}
+	\rubysource[firstline=11]{sources/snippets/dipendente_class_accessor}
+	\rubyout{sources/snippets/dipendente_class_accessor}
+\end{block}
+}  
+
+\frame{\frametitle{Classi derivate}
+	\begin{block}	{Estendiamo la classe \texttt{Dipendente} con una classe derivata}
+		\rubysource[firstline=12,firstnumber=1]{sources/snippets/dipendente_inherit}
+		\rubyout{sources/snippets/dipendente_inherit}
+	\end{block}
+}    
+                                                     
+\frame{\frametitle{Virtualizzazione degli attributi}  
+\begin{block} {}
+	\RubyXMP[0.60\textwidth]{}{sources/snippets/quadrato_semplice} 
+\end{block}
+}
+\frame{\frametitle{Virtualizzazione degli attributi}    
+\begin{overprint}
+	\onslide<1>
+	\begin{block} {Consideriamo la classe Quadrato} 
+		Come gi� visto, tramite \texttt{attr\_accessor} � possibile
+		ridurre la quantit� di codice per ottenere l'incapsulamento dei dati.
+		\vskip 12pt
+		\rubysource[lastline=10]{sources/snippets/quadrato}
+	\end{block} 
+	\onslide<2>
+	\begin{block} {Estendiamo le funzionalit� di Quadrato}  
+		La struttura metodi-attributi di ruby permette una 
+		completa e trasparente virtualizzazione dei dati di una classe.
+		
+		\vskip 12pt
+		\rubysource[firstline=12,lastline=20]{sources/snippets/quadrato}  
+	\end{block}                                                        
+	\onslide<3>
+	\begin{block} {Ecco il risultato}
+		\RubyXMP[0.60\textwidth]{firstline=22}{sources/snippets/quadrato}
+	\end{block}
+\end{overprint}
+
+}
+% subsubsection attributi (end)
+% subsection classi (end)
+
+%\frame{\frametitle{Classi ed ereditariet�}
+%\begin{columns}[t]
+%	\begin{column}{0.46\textwidth}
+%		\begin{block}{Classe Padre}
+%			\rubysource{sources/snippets/dipendente_class}
+%			\rubyout{sources/snippets/dipendente_class}
+%		\end{block}
+%	\end{column}
+%	\begin{column}{0.46\textwidth}
+%		\begin{block}{Classe Figlio}
+%			\rubysource[firstnumber=14,firstline=11]{sources/snippets/dipendente_inherit}
+%			\rubyout{sources/snippets/dipendente_inherit}
+%		\end{block}
+%	\end{column}
+%\end{columns}
+%}
+
+%%
+%% This is file `keyval.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% xkeyval.dtx  (with options: `keyval')
+%% 
+%% ------------------------------------------
+%% Copyright (C) 2003-2004 by Hendri Adriaens
+%% ------------------------------------------
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.2
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in:
+%%
+%%    http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.2 or later is part of all distributions of LaTeX
+%% version 1999/12/01 or later.
+%%
+%%
+%% Taken from keyval.sty.
+%%
+\def\XKV@tempa#1{%
+\def\KV@@sp@def##1##2{%
+  \futurelet\XKV@resa\KV@@sp@d##2\@nil\@nil#1\@nil\relax##1}%
+\def\KV@@sp@d{%
+  \ifx\XKV@resa\@sptoken
+    \expandafter\KV@@sp@b
+  \else
+    \expandafter\KV@@sp@b\expandafter#1%
+  \fi}%
+\def\KV@@sp@b#1##1 \@nil{\KV@@sp@c##1}%
+  }
+\XKV@tempa{ }
+\def\KV@@sp@c#1\@nil#2\relax#3{\toks@{#1}\edef#3{\the\toks@}}
+\def\KV@do#1,{%
+ \ifx\relax#1\empty\else
+  \KV@split#1==\relax
+  \expandafter\KV@do\fi}
+\def\KV@split#1=#2=#3\relax{%
+  \KV@@sp@def\XKV@tempa{#1}%
+  \ifx\XKV@tempa\empty\else
+    \expandafter\let\expandafter\XKV@tempc
+      \csname\KV@prefix\XKV@tempa\endcsname
+    \ifx\XKV@tempc\relax
+      \XKV@err{`\XKV@tempa' undefined}%
+    \else
+      \ifx\empty#3\empty
+        \KV@default
+      \else
+        \KV@@sp@def\XKV@tempb{#2}%
+        \expandafter\XKV@tempc\expandafter{\XKV@tempb}\relax
+      \fi
+    \fi
+  \fi}
+\def\KV@default{%
+  \expandafter\let\expandafter\XKV@tempb
+    \csname\KV@prefix\XKV@tempa @default\endcsname
+  \ifx\XKV@tempb\relax
+    \XKV@err{No value specified for key `\XKV@tempa'}%
+  \else
+    \XKV@tempb\relax
+  \fi}
+\endinput
+%%
+%% End of file `keyval.tex'.
+%
+%   Creatives Common
+%   Attribuzione - Non commerciale - Condividi allo stesso modo 2.5 Italia
+%
+	%inizio licenza
+	\section{Licence}
+	\frame[plain]{\frametitle{Licence - Creatives Commons}
+		\includegraphics[width=1.5cm]{images/cc}
+		\begin{quote}
+			Copyright \copyright  2007 Alessio Caiazza
+		\end{quote}
+
+		\textbf{Creatives Common\\Attribuzione - Non commerciale - Condividi allo stesso modo 2.5 Italia}
+		\begin{block}{Tu sei libero:}
+
+			\begin{itemize}
+
+				\item di riprodurre, distribuire, comunicare al pubblico, esporre in pubblico, rappresentare, eseguire e recitare quest'opera
+
+				\item di modificare quest'opera
+			\end{itemize}
+
+
+		\end{block}
+		\begin{block}{Alle seguenti condizioni:}
+
+			\begin{itemize}
+
+				\item Attribuzione. Devi attribuire la paternit� dell'opera nei modi indicati dall'autore o da chi ti ha dato l'opera in licenza.
+
+				\item Non commerciale. Non puoi usare quest'opera per fini commerciali.
+
+				\item Condividi allo stesso modo. Se alteri o trasformi quest'opera, o se la usi per crearne un'altra, puoi distribuire l'opera risultante solo con una licenza identica a questa.
+
+				\item Ogni volta che usi o distribuisci quest'opera, devi farlo secondo i termini di questa licenza, che va comunicata con chiarezza.
+
+				\item In ogni caso, puoi concordare col titolare dei diritti d'autore utilizzi di quest'opera non consentiti da questa licenza.
+			\end{itemize}
+
+		\end{block}
+		\color{blue}{http://creativecommons.org/licenses/by-nc-sa/2.5/it/legalcode}
+	} 

File listings.cfg

+%%
+%% This is file `listings.cfg',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% lstdrvrs-1.3.dtx  (with options: `config')
+%% 
+%% (w)(c) 1996/1997/1998/1999/2000/2001/2002/2003/2004 Carsten Heinz
+%% and/or any other author listed elsewhere in this file.
+%%
+%% This file is distributed under the terms of the LaTeX Project Public
+%% License from CTAN archives in directory  macros/latex/base/lppl.txt.
+%% Either version 1.0 or, at your option, any later version.
+%%
+%% This file is completely free and comes without any warranty.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <cheinz@gmx.de>.
+%%
+\ProvidesFile{listings.cfg}[2004/09/05 1.3 listings configuration]
+\def\lstlanguagefiles
+    {lstlang0.sty,lstlang1.sty,lstlang2.sty,lstlang3.sty}
+\lstset{defaultdialect=[R/3 6.10]ABAP,
+        defaultdialect=[95]Ada,
+        defaultdialect=[68]Algol,
+        defaultdialect=[gnu]Awk,
+        defaultdialect=[ANSI]C,
+        defaultdialect=[light]Caml,
+        defaultdialect=[1985]Cobol,
+        defaultdialect=[ISO]C++,
+        defaultdialect=[95]Fortran,
+        defaultdialect=[3.0]Mathematica,
+        defaultdialect=[OMG]OCL,
+        defaultdialect=[Standard]Pascal,
+        defaultdialect=[67]Simula,
+        defaultdialect=[plain]TeX,
+        defaultdialect=[97]VRML}
+\lstalias[]{TclTk}[tk]{tcl}
+\lstalias[6.1]{ABAP}[R/3 6.10]{ABAP}
+\lstalias[3.1]{ABAP}[R/3 3.1C]{ABAP}
+\lstalias[4.6]{ABAP}[R/3 4.6C]{ABAP}
+\endinput
+%%
+%% End of file `listings.cfg'.

File listings.sty

+%%
+%% This is file `listings.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% listings-1.3.dtx  (with options: `kernel')
+%% 
+%% Please read the software license in listings-1.3.dtx or listings-1.3.pdf.
+%%
+%% (w)(c) 1996--2004 Carsten Heinz and/or any other author listed
+%% elsewhere in this file.
+%%
+%% Send comments and ideas on the package, error reports and additional
+%% programming languages to <cheinz@gmx.de>.
+%%
+\def\filedate{2004/09/07}
+\def\fileversion{1.3}
+\NeedsTeXFormat{LaTeX2e}
+\AtEndOfPackage{\ProvidesPackage{listings}
+             [\filedate\space\fileversion\space(Carsten Heinz)]}
+\def\lst@CheckVersion#1{\edef\reserved@a{#1}%
+    \ifx\lst@version\reserved@a \expandafter\@gobble
+                          \else \expandafter\@firstofone \fi}
+\let\lst@version\fileversion
+\def\lst@InputCatcodes{%
+    \makeatletter \catcode`\"12%
+    \catcode`\^^@\active
+    \catcode`\^^I9%
+    \catcode`\^^L9%
+    \catcode`\^^M9%
+    \catcode`\%14%
+    \catcode`\~\active}
+\def\lst@RestoreCatcodes#1{%
+    \ifx\relax#1\else
+        \noexpand\catcode`\noexpand#1\the\catcode`#1\relax
+        \expandafter\lst@RestoreCatcodes
+    \fi}
+\edef\lst@RestoreCatcodes{%
+    \noexpand\lccode`\noexpand\/`\noexpand\/%
+    \lst@RestoreCatcodes\"\^^I\^^M\~\^^@\relax}
+\lst@InputCatcodes
+\AtEndOfPackage{\lst@RestoreCatcodes}
+\def\@lst{lst}
+\def\lst@IfSubstring#1#2{%
+    \def\lst@temp##1#1##2##3\relax{%
+        \ifx \@empty##2\expandafter\@secondoftwo
+                 \else \expandafter\@firstoftwo \fi}%
+    \expandafter\lst@temp#2#1\@empty\relax}
+\def\lst@IfOneOf#1\relax#2{%
+    \def\lst@temp##1,#1,##2##3\relax{%
+        \ifx \@empty##2\expandafter\@secondoftwo
+                 \else \expandafter\@firstoftwo \fi}%
+    \expandafter\lst@temp\expandafter,#2,#1,\@empty\relax}
+\def\lst@DeleteKeysIn#1#2{%
+    \expandafter\lst@DeleteKeysIn@\expandafter#1#2,\relax,}
+\def\lst@DeleteKeysIn@#1#2,{%
+    \ifx\relax#2\@empty
+        \expandafter\@firstoftwo\expandafter\lst@RemoveCommas
+    \else
+        \ifx\@empty#2\@empty\else
+            \def\lst@temp##1,#2,##2{%
+                ##1%
+                \ifx\@empty##2\@empty\else
+                    \expandafter\lst@temp\expandafter,%
+                \fi ##2}%
+            \edef#1{\expandafter\lst@temp\expandafter,#1,#2,\@empty}%
+        \fi
+    \fi
+    \lst@DeleteKeysIn@#1}
+\def\lst@RemoveCommas#1{\edef#1{\expandafter\lst@RC@#1\@empty}}
+\def\lst@RC@#1{\ifx,#1\expandafter\lst@RC@ \else #1\fi}
+\def\lst@ReplaceIn#1#2{%
+    \expandafter\lst@ReplaceIn@\expandafter#1#2\@empty\@empty}
+\def\lst@ReplaceInArg#1#2{\lst@ReplaceIn@#1#2\@empty\@empty}
+\def\lst@ReplaceIn@#1#2#3{%
+    \ifx\@empty#3\relax\else
+        \def\lst@temp##1#2##2{%
+            \ifx\@empty##2%
+                \lst@lAddTo#1{##1}%
+            \else
+                \lst@lAddTo#1{##1#3}\expandafter\lst@temp
+            \fi ##2}%
+        \let\@tempa#1\let#1\@empty
+        \expandafter\lst@temp\@tempa#2\@empty
+        \expandafter\lst@ReplaceIn@\expandafter#1%
+    \fi}
+\providecommand*\@gobblethree[3]{}
+\def\lst@GobbleNil#1\@nil{}
+\def\lst@Swap#1#2{#2#1}
+\def\lst@true{\let\lst@if\iftrue}
+\def\lst@false{\let\lst@if\iffalse}
+\lst@false
+\def\lst@IfNextCharsArg#1{%
+    \def\lst@tofind{#1}\lst@IfNextChars\lst@tofind}
+\def\lst@IfNextChars#1#2#3{%
+    \let\lst@tofind#1\def\@tempa{#2}\def\@tempb{#3}%
+    \let\lst@eaten\@empty \lst@IfNextChars@}
+\def\lst@IfNextChars@{\expandafter\lst@IfNextChars@@\lst@tofind\relax}
+\def\lst@IfNextChars@@#1#2\relax#3{%
+    \def\lst@tofind{#2}\lst@lAddTo\lst@eaten{#3}%
+    \ifx#1#3%
+        \ifx\lst@tofind\@empty
+            \let\lst@next\@tempa
+        \else
+            \let\lst@next\lst@IfNextChars@
+        \fi
+        \expandafter\lst@next
+    \else
+        \expandafter\@tempb
+    \fi}
+\def\lst@IfNextCharActive#1#2#3{%
+    \begingroup \lccode`\~=`#3\lowercase{\endgroup
+    \ifx~}#3%
+        \def\lst@next{#1}%
+    \else
+        \def\lst@next{#2}%
+    \fi \lst@next #3}
+\def\lst@for#1\do#2{%
+    \def\lst@forbody##1{#2}%
+    \@for\lst@forvar:=#1\do
+    {\expandafter\lst@forbody\expandafter{\lst@forvar}}}
+\def\lst@MakeActive#1{%
+    \let\lst@temp\@empty \lst@MakeActive@#1%
+    \relax\relax\relax\relax\relax\relax\relax\relax\relax}
+\begingroup
+\catcode`\^^@=\active \catcode`\^^A=\active \catcode`\^^B=\active
+\catcode`\^^C=\active \catcode`\^^D=\active \catcode`\^^E=\active
+\catcode`\^^F=\active \catcode`\^^G=\active \catcode`\^^H=\active
+\gdef\lst@MakeActive@#1#2#3#4#5#6#7#8#9{\let\lst@next\relax
+    \ifx#1\relax
+    \else \lccode`\^^@=`#1%
+    \ifx#2\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@}}%
+    \else \lccode`\^^A=`#2%
+    \ifx#3\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A}}%
+    \else \lccode`\^^B=`#3%
+    \ifx#4\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B}}%
+    \else \lccode`\^^C=`#4%
+    \ifx#5\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C}}%
+    \else \lccode`\^^D=`#5%
+    \ifx#6\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D}}%
+    \else \lccode`\^^E=`#6%
+    \ifx#7\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E}}%
+    \else \lccode`\^^F=`#7%
+    \ifx#8\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E^^F}}%
+    \else \lccode`\^^G=`#8%
+    \ifx#9\relax
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E^^F^^G}}%
+    \else \lccode`\^^H=`#9%
+        \lowercase{\lst@lAddTo\lst@temp{^^@^^A^^B^^C^^D^^E^^F^^G^^H}}%
+        \let\lst@next\lst@MakeActive@
+    \fi \fi \fi \fi \fi \fi \fi \fi \fi
+    \lst@next}
+\endgroup
+\def\lst@DefActive#1#2{\lst@MakeActive{#2}\let#1\lst@temp}
+\def\lst@DefOther#1#2{%
+    \begingroup \def#1{#2}\escapechar\m@ne \expandafter\endgroup
+    \expandafter\lst@DefOther@\meaning#1\relax#1}
+\def\lst@DefOther@#1>#2\relax#3{\edef#3{\zap@space#2 \@empty}}
+\def\lst@InsideConvert#1{%
+   \lst@ifmathescape
+      \lst@InsideConvert@e#1$\@nil
+      \lst@if
+         \lst@InsideConvert@ey#1\@nil
+      \else
+         \lst@InsideConvert@#1 \@empty
+         \expandafter\@gobbletwo
+      \fi
+      \expandafter\lst@next
+   \else
+      \lst@InsideConvert@#1 \@empty
+   \fi}
+\begingroup \lccode`\~=`\ \relax \lowercase{%
+\gdef\lst@InsideConvert@#1 #2{%
+    \lst@MakeActive{#1}%
+    \ifx\@empty#2%
+        \lst@lExtend\lst@arg{\lst@temp}%
+    \else
+        \lst@lExtend\lst@arg{\lst@temp~}%
+        \expandafter\lst@InsideConvert@
+    \fi #2}
+}\endgroup
+\def\lst@InsideConvert@e#1$#2\@nil{%
+   \ifx\@empty#2\@empty \lst@false \else \lst@true \fi}
+\def\lst@InsideConvert@ey#1$#2$#3\@nil{%
+   \lst@InsideConvert@#1 \@empty
+   \lst@lAddTo\lst@arg{%
+      \lst@ifdropinput\else
+         \lst@TrackNewLines\lst@OutputLostSpace \lst@XPrintToken
+         \setbox\@tempboxa=\hbox\bgroup$\lst@escapebegin
+         #2%
+         \lst@escapeend$\egroup \lst@CalcLostSpaceAndOutput
+         \lst@whitespacefalse
+      \fi}%
+   \def\lst@next{\lst@InsideConvert{#3}}%
+}
+\def\lst@XConvert{\@ifnextchar\bgroup \lst@XConvertArg\lst@XConvert@}
+\def\lst@XConvertArg#1{%
+    {\lst@false \let\lst@arg\@empty
+     \lst@XConvert#1\@nil
+     \global\let\@gtempa\lst@arg}%
+    \lst@lExtend\lst@arg{\expandafter{\@gtempa}}%
+    \lst@XConvertNext}
+\def\lst@XConvert@#1{%
+    \ifx\@nil#1\else
+        \begingroup\lccode`\~=`#1\lowercase{\endgroup
+        \lst@lAddTo\lst@arg~}%
+        \expandafter\lst@XConvertNext
+    \fi}
+\def\lst@XConvertNext{%
+    \lst@if \expandafter\lst@XConvertX
+      \else \expandafter\lst@XConvert \fi}
+\def\lst@XConvertX#1{%
+    \ifx\@nil#1\else
+        \lst@XConvertX@#1\relax
+        \expandafter\lst@XConvert
+    \fi}
+\def\lst@XConvertX@#1#2\relax{%
+    \begingroup\lccode`\~=`#1\lowercase{\endgroup
+    \lst@XCConvertX@@~}{#2}}
+\def\lst@XCConvertX@@#1#2{\lst@lAddTo\lst@arg{{#1#2}}}
+\def\lst@Require#1#2#3#4#5{%
+    \begingroup
+    \aftergroup\lst@true
+    \ifx\@empty#3\@empty\else
+        \def\lst@prefix{#2}\let\lst@require\@empty
+        \edef\lst@temp{\expandafter\zap@space#3 \@empty}%
+        \lst@for\lst@temp\do{%
+          \ifx\@empty##1\@empty\else \lstKV@OptArg[]{##1}{%
+            #4[####1]{####2}%
+            \@ifundefined{\@lst\lst@prefix @\lst@malias $\lst@oalias}%
+            {\edef\lst@require{\lst@require,\lst@malias $\lst@oalias}}%
+            {}}%
+          \fi}%
+        \global\let\lst@loadaspects\@empty
+        \lst@InputCatcodes
+        \ifx\lst@require\@empty\else
+            \lst@for{#5}\do{%
+                \ifx\lst@require\@empty\else
+                    \InputIfFileExists{##1}{}{}%
+                \fi}%
+        \fi
+        \ifx\lst@require\@empty\else
+            \PackageError{Listings}{Couldn't load requested #1}%
+            {The following #1s weren't loadable:^^J\@spaces
+             \lst@require^^JThis may cause errors in the sequel.}%
+            \aftergroup\lst@false
+        \fi
+        \ifx\lst@loadaspects\@empty\else
+            \lst@RequireAspects\lst@loadaspects
+        \fi
+    \fi
+    \endgroup}
+\def\lst@IfRequired[#1]#2{%
+    \lst@NormedDef\lst@temp{[#1]#2}%
+    \expandafter\lst@IfRequired@\lst@temp\relax}
+\def\lst@IfRequired@[#1]#2\relax#3{%
+    \lst@IfOneOf #2$#1\relax\lst@require
+        {\lst@DeleteKeysIn@\lst@require#2$#1,\relax,%
+         \global\expandafter\let
+             \csname\@lst\lst@prefix @#2$#1\endcsname\@empty
+         #3}}
+\let\lst@require\@empty
+\def\lst@NoAlias[#1]#2{%
+    \lst@NormedDef\lst@oalias{#1}\lst@NormedDef\lst@malias{#2}}
+\gdef\lst@LAS#1#2#3#4#5#6#7{%
+    \lst@Require{#1}{#2}{#3}#4#5%
+    #4#3%
+    \@ifundefined{lst#2@\lst@malias$\lst@oalias}%
+        {\PackageError{Listings}%
+         {#1 \ifx\@empty\lst@oalias\else \lst@oalias\space of \fi
+          \lst@malias\space undefined}%
+         {The #1 is not loadable. \@ehc}}%
+        {#6\csname\@lst#2@\lst@malias $\lst@oalias\endcsname #7}}
+\def\lst@RequireAspects#1{%
+    \lst@Require{aspect}{asp}{#1}\lst@NoAlias\lstaspectfiles}
+\let\lstloadaspects\lst@RequireAspects
+\@ifundefined{lstaspectfiles}
+    {\newcommand\lstaspectfiles{lstmisc0.sty,lstmisc.sty}}{}
+\gdef\lst@DefDriver#1#2#3#4{%
+    \@ifnextchar[{\lst@DefDriver@{#1}{#2}#3#4}%
+                 {\lst@DefDriver@{#1}{#2}#3#4[]}}
+\gdef\lst@DefDriver@#1#2#3#4[#5]#6{%
+    \def\lst@name{#1}\let\lst@if#4%
+    \lst@NormedDef\lst@driver{\@lst#2@#6$#5}%
+    \lst@IfRequired[#5]{#6}{\begingroup \lst@true}%
+                           {\begingroup}%
+    \lst@setcatcodes
+    \@ifnextchar[{\lst@XDefDriver{#1}#3}{\lst@DefDriver@@#3}}
+\gdef\lst@DefDriver@@#1#2{%
+    \lst@if
+        \global\@namedef{\lst@driver}{#1{#2}}%
+    \fi
+    \endgroup
+    \@ifnextchar[\lst@XXDefDriver\@empty}
+\gdef\lst@XXDefDriver[#1]{%
+    \ifx\@empty#1\@empty\else
+        \lst@if
+            \lstloadaspects{#1}%
+        \else
+            \@ifundefined{\lst@driver}{}%
+            {\xdef\lst@loadaspects{\lst@loadaspects,#1}}%
+        \fi
+    \fi}
+\gdef\lst@XDefDriver#1#2[#3]#4#5{\lst@DefDriver@@#2{also#1=[#3]#4,#5}}
+\let\lst@UserCommand\gdef
+\newcommand*\lst@BeginAspect[2][]{%
+    \def\lst@curraspect{#2}%
+    \ifx \lst@curraspect\@empty
+        \expandafter\lst@GobbleAspect
+    \else
+        \let\lst@next\@empty
+        \lst@IfRequired[]{#2}%
+            {\lst@RequireAspects{#1}%
+             \lst@if\else \let\lst@next\lst@GobbleAspect \fi}%
+            {\let\lst@next\lst@GobbleAspect}%
+        \expandafter\lst@next
+    \fi}
+\def\lst@EndAspect{%
+    \csname\@lst patch@\lst@curraspect\endcsname
+    \let\lst@curraspect\@empty}
+\long\def\lst@GobbleAspect#1\lst@EndAspect{\let\lst@curraspect\@empty}
+\def\lst@Key#1#2{%
+    \@ifnextchar[{\lstKV@def{#1}{#2}}%
+                 {\def\lst@temp{\lst@Key@{#1}{#2}}
+                  \afterassignment\lst@temp
+                  \global\@namedef{KV@\@lst @#1}####1}}
+\def\lstKV@def#1#2[#3]{%
+    \global\@namedef{KV@\@lst @#1@default\expandafter}\expandafter
+        {\csname KV@\@lst @#1\endcsname{#3}}%
+    \def\lst@temp{\lst@Key@{#1}{#2}}\afterassignment\lst@temp
+    \global\@namedef{KV@\@lst @#1}##1}
+\def\lst@Key@#1#2{%
+    \ifx\relax#2\@empty\else
+        \begingroup \globaldefs\@ne
+        \csname KV@\@lst @#1\endcsname{#2}%
+        \endgroup
+    \fi}
+\def\lst@UseHook#1{\csname\@lst hk@#1\endcsname}
+\def\lst@AddToHook{\lst@ATH@\iffalse\lst@AddTo}
+\def\lst@AddToHookExe{\lst@ATH@\iftrue\lst@AddTo}
+\def\lst@AddToHookAtTop{\lst@ATH@\iffalse\lst@AddToAtTop}
+\long\def\lst@ATH@#1#2#3#4{%
+    \@ifundefined{\@lst hk@#3}{%
+        \expandafter\gdef\csname\@lst hk@#3\endcsname{}}{}%
+    \expandafter#2\csname\@lst hk@#3\endcsname{#4}%
+    \def\lst@temp{#4}%
+    #1% \iftrue|false
+        \begingroup \globaldefs\@ne \lst@temp \endgroup
+    \fi}
+\long\def\lst@AddTo#1#2{%
+    \expandafter\gdef\expandafter#1\expandafter{#1#2}}
+\def\lst@AddToAtTop#1#2{\def\lst@temp{#2}%
+    \expandafter\expandafter\expandafter\gdef
+    \expandafter\expandafter\expandafter#1%
+    \expandafter\expandafter\expandafter{\expandafter\lst@temp#1}}
+\def\lst@lAddTo#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
+\def\lst@Extend#1#2{%
+    \expandafter\lst@AddTo\expandafter#1\expandafter{#2}}
+\def\lst@lExtend#1#2{%
+    \expandafter\lst@lAddTo\expandafter#1\expandafter{#2}}
+\RequirePackage{keyval}[1997/11/10]
+\def\lstKV@TwoArg#1#2{\gdef\@gtempa##1##2{#2}\@gtempa#1{}{}}
+\def\lstKV@ThreeArg#1#2{\gdef\@gtempa##1##2##3{#2}\@gtempa#1{}{}{}}
+\def\lstKV@FourArg#1#2{\gdef\@gtempa##1##2##3##4{#2}\@gtempa#1{}{}{}{}}
+\def\lstKV@OptArg[#1]#2#3{%
+    \gdef\@gtempa[##1]##2{#3}\lstKV@OptArg@{#1}#2\@}
+\def\lstKV@OptArg@#1{\@ifnextchar[\lstKV@OptArg@@{\lstKV@OptArg@@[#1]}}
+\def\lstKV@OptArg@@[#1]#2\@{\@gtempa[#1]{#2}}
+\def\lstKV@XOptArg[#1]#2#3{%
+    \global\let\@gtempa#3\lstKV@OptArg@{#1}#2\@}
+\def\lstKV@CSTwoArg#1#2{%
+    \gdef\@gtempa##1,##2,##3\relax{#2}%
+    \@gtempa#1,,\relax}
+\def\lstKV@SetIf#1{\lstKV@SetIf@#1\relax}
+\def\lstKV@SetIf@#1#2\relax#3{\lowercase{%
+    \expandafter\let\expandafter#3%
+        \csname if\ifx #1t}true\else false\fi\endcsname}
+\def\lstKV@SwitchCases#1#2#3{%
+    \def\lst@temp##1\\#1&##2\\##3##4\@nil{%
+        \ifx\@empty##3%
+            #3%
+        \else
+            ##2%
+        \fi
+    }%
+    \lst@temp\\#2\\#1&\\\@empty\@nil}
+\lst@UserCommand\lstset{\begingroup \lst@setcatcodes \lstset@}
+\def\lstset@#1{\endgroup \ifx\@empty#1\@empty\else\setkeys{lst}{#1}\fi}
+\def\lst@setcatcodes{\makeatletter \catcode`\==12\relax}
+\def\lst@NewMode#1{%
+    \ifx\@undefined#1%
+        \lst@mode\lst@newmode\relax \advance\lst@mode\@ne
+        \xdef\lst@newmode{\the\lst@mode}%
+        \global\chardef#1=\lst@mode
+        \lst@mode\lst@nomode
+    \fi}
+\newcount\lst@mode
+\def\lst@newmode{\m@ne}% init
+\lst@NewMode\lst@nomode % init (of \lst@mode :-)
+\def\lst@UseDynamicMode{%
+    \@tempcnta\lst@dynamicmode\relax \advance\@tempcnta\@ne
+    \edef\lst@dynamicmode{\the\@tempcnta}%
+    \expandafter\lst@Swap\expandafter{\expandafter{\lst@dynamicmode}}}
+\lst@AddToHook{InitVars}{\let\lst@dynamicmode\lst@newmode}
+\def\lst@EnterMode#1#2{%
+    \bgroup \lst@mode=#1\relax #2%
+    \lst@FontAdjust
+    \lst@lAddTo\lst@entermodes{\lst@EnterMode{#1}{#2}}}
+\lst@AddToHook{InitVars}{\let\lst@entermodes\@empty}
+\let\lst@entermodes\@empty % init
+\def\lst@LeaveMode{%
+    \ifnum\lst@mode=\lst@nomode\else
+        \egroup \expandafter\lsthk@EndGroup
+    \fi}
+\lst@AddToHook{EndGroup}{}% init
+\def\lst@InterruptModes{%
+    \lst@Extend\lst@modestack{\expandafter{\lst@entermodes}}%
+    \lst@LeaveAllModes}
+\lst@AddToHook{InitVars}{\global\let\lst@modestack\@empty}
+\def\lst@ReenterModes{%
+    \ifx\lst@modestack\@empty\else
+        \lst@LeaveAllModes
+        \global\let\@gtempa\lst@modestack
+        \global\let\lst@modestack\@empty
+        \expandafter\lst@ReenterModes@\@gtempa\relax
+    \fi}
+\def\lst@ReenterModes@#1#2{%
+    \ifx\relax#2\@empty
+        \gdef\@gtempa##1{#1}%
+        \expandafter\@gtempa
+    \else
+        \lst@AddTo\lst@modestack{{#1}}%
+        \expandafter\lst@ReenterModes@
+    \fi
+    {#2}}
+\def\lst@LeaveAllModes{%
+    \ifnum\lst@mode=\lst@nomode
+        \expandafter\lsthk@EndGroup
+    \else
+        \expandafter\egroup\expandafter\lst@LeaveAllModes
+    \fi}
+\lst@AddToHook{ExitVars}{\lst@LeaveAllModes}
+\lst@NewMode\lst@Pmode
+\lst@NewMode\lst@GPmode
+\def\lst@modetrue{\let\lst@ifmode\iftrue \lsthk@ModeTrue}
+\let\lst@ifmode\iffalse % init
+\lst@AddToHook{ModeTrue}{}% init
+\def\lst@Lmodetrue{\let\lst@ifLmode\iftrue}
+\let\lst@ifLmode\iffalse % init
+\lst@AddToHook{EOL}{\@whilesw \lst@ifLmode\fi \lst@LeaveMode}
+\def\lst@NormedDef#1#2{\lowercase{\edef#1{\zap@space#2 \@empty}}}
+\def\lst@NormedNameDef#1#2{%
+    \lowercase{\edef\lst@temp{\zap@space#1 \@empty}%
+    \expandafter\xdef\csname\lst@temp\endcsname{\zap@space#2 \@empty}}}
+\def\lst@GetFreeMacro#1{%
+    \@tempcnta\z@ \def\lst@freemacro{#1\the\@tempcnta}%
+    \lst@GFM@}
+\def\lst@GFM@{%
+    \expandafter\ifx \csname\lst@freemacro\endcsname \relax
+        \edef\lst@freemacro{\csname\lst@freemacro\endcsname}%
+    \else
+        \advance\@tempcnta\@ne
+        \expandafter\lst@GFM@
+    \fi}
+\newbox\lst@gtempboxa
+\newtoks\lst@token \newcount\lst@length
+\def\lst@ResetToken{\lst@token{}\lst@length\z@}
+\lst@AddToHook{InitVarsBOL}{\lst@ResetToken \let\lst@lastother\@empty}
+\lst@AddToHook{EndGroup}{\lst@ResetToken \let\lst@lastother\@empty}
+\def\lst@lettertrue{\let\lst@ifletter\iftrue}
+\def\lst@letterfalse{\let\lst@ifletter\iffalse}
+\lst@AddToHook{InitVars}{\lst@letterfalse}
+\def\lst@Append#1{\advance\lst@length\@ne
+                  \lst@token=\expandafter{\the\lst@token#1}}
+\def\lst@AppendOther{%
+    \lst@ifletter \lst@Output\lst@letterfalse \fi
+    \futurelet\lst@lastother\lst@Append}
+\def\lst@AppendLetter{%
+    \lst@ifletter\else \lst@OutputOther\lst@lettertrue \fi
+    \lst@Append}
+\def\lst@SaveToken{%
+    \global\let\lst@gthestyle\lst@thestyle
+    \global\let\lst@glastother\lst@lastother
+    \xdef\lst@RestoreToken{\noexpand\lst@token{\the\lst@token}%
+                           \noexpand\lst@length\the\lst@length\relax
+                           \noexpand\let\noexpand\lst@thestyle
+                                        \noexpand\lst@gthestyle
+                           \noexpand\let\noexpand\lst@lastother
+                                        \noexpand\lst@glastother}}
+\def\lst@IfLastOtherOneOf#1{\lst@IfLastOtherOneOf@ #1\relax}
+\def\lst@IfLastOtherOneOf@#1{%
+    \ifx #1\relax
+        \expandafter\@secondoftwo
+    \else
+        \ifx\lst@lastother#1%
+            \lst@IfLastOtherOneOf@t
+        \else
+            \expandafter\expandafter\expandafter\lst@IfLastOtherOneOf@
+        \fi
+    \fi}
+\def\lst@IfLastOtherOneOf@t#1\fi\fi#2\relax{\fi\fi\@firstoftwo}
+\newdimen\lst@currlwidth % \global
+\newcount\lst@column \newcount\lst@pos % \global
+\lst@AddToHook{InitVarsBOL}
+    {\global\lst@currlwidth\z@ \global\lst@pos\z@ \global\lst@column\z@}
+\def\lst@CalcColumn{%
+            \@tempcnta\lst@column
+    \advance\@tempcnta\lst@length
+    \advance\@tempcnta-\lst@pos}
+\newdimen\lst@lostspace % \global
+\lst@AddToHook{InitVarsBOL}{\global\lst@lostspace\z@}
+\def\lst@UseLostSpace{\ifdim\lst@lostspace>\z@ \lst@InsertLostSpace \fi}
+\def\lst@InsertLostSpace{%
+    \lst@Kern\lst@lostspace \global\lst@lostspace\z@}
+\def\lst@InsertHalfLostSpace{%
+    \global\lst@lostspace.5\lst@lostspace \lst@Kern\lst@lostspace}
+\newdimen\lst@width
+\lst@Key{basewidth}{0.6em,0.45em}{\lstKV@CSTwoArg{#1}%
+    {\def\lst@widthfixed{##1}\def\lst@widthflexible{##2}%
+     \ifx\lst@widthflexible\@empty
+         \let\lst@widthflexible\lst@widthfixed
+     \fi
+     \def\lst@temp{\PackageError{Listings}%
+                                {Negative value(s) treated as zero}%
+                                \@ehc}%
+     \let\lst@error\@empty
+     \ifdim \lst@widthfixed<\z@
+         \let\lst@error\lst@temp \let\lst@widthfixed\z@
+     \fi
+     \ifdim \lst@widthflexible<\z@
+         \let\lst@error\lst@temp \let\lst@widthflexible\z@
+     \fi
+     \lst@error}}
+\lst@AddToHook{FontAdjust}
+    {\lst@width=\lst@ifflexible\lst@widthflexible
+                          \else\lst@widthfixed\fi \relax}
+\lst@Key{fontadjust}{false}[t]{\lstKV@SetIf{#1}\lst@iffontadjust}
+\def\lst@FontAdjust{\lst@iffontadjust \lsthk@FontAdjust \fi}
+\lst@AddToHook{InitVars}{\lsthk@FontAdjust}
+\def\lst@OutputBox#1{\lst@alloverstyle{\box#1}}
+\def\lst@alloverstyle#1{#1}% init
+\def\lst@Kern#1{%
+    \setbox\z@\hbox{{\lst@currstyle{\kern#1}}}%
+    \global\advance\lst@currlwidth \wd\z@
+    \lst@OutputBox\z@}
+\def\lst@CalcLostSpaceAndOutput{%
+    \global\advance\lst@lostspace \lst@length\lst@width
+    \global\advance\lst@lostspace-\wd\@tempboxa
+    \global\advance\lst@currlwidth \wd\@tempboxa
+    \global\advance\lst@pos -\lst@length
+    \setbox\@tempboxa\hbox{\let\lst@OutputBox\box
+        \ifdim\lst@lostspace>\z@ \lst@leftinsert \fi
+        \box\@tempboxa
+        \ifdim\lst@lostspace>\z@ \lst@rightinsert \fi}%
+    \lst@OutputBox\@tempboxa \lsthk@PostOutput}
+\lst@AddToHook{PostOutput}{}% init
+\def\lst@OutputToken{%
+    \lst@TrackNewLines \lst@OutputLostSpace
+    \lst@ifgobbledws
+        \lst@gobbledwhitespacefalse
+        \lst@@discretionary
+    \fi
+    \lst@CheckMerge
+    {\lst@thestyle{\lst@FontAdjust
+     \setbox\@tempboxa\lst@hbox
+        {\lsthk@OutputBox
+         \lst@lefthss
+         \expandafter\lst@FillOutputBox\the\lst@token\@empty
+         \lst@righthss}%
+     \lst@CalcLostSpaceAndOutput}}%
+    \lst@ResetToken}
+\lst@AddToHook{OutputBox}{}% init
+\def\lst@gobbledwhitespacetrue{\global\let\lst@ifgobbledws\iftrue}
+\def\lst@gobbledwhitespacefalse{\global\let\lst@ifgobbledws\iffalse}
+\lst@AddToHookExe{InitBOL}{\lst@gobbledwhitespacefalse}% init
+\def\lst@Delay#1{%
+    \lst@CheckDelay
+    #1%
+    \lst@GetOutputMacro\lst@delayedoutput
+    \edef\lst@delayed{\the\lst@token}%
+    \edef\lst@delayedlength{\the\lst@length}%
+    \lst@ResetToken}
+\def\lst@Merge#1{%
+    \lst@CheckMerge
+    #1%
+    \edef\lst@merged{\the\lst@token}%
+    \edef\lst@mergedlength{\the\lst@length}%
+    \lst@ResetToken}
+\def\lst@MergeToken#1#2{%
+    \advance\lst@length#2%
+    \lst@lExtend#1{\the\lst@token}%
+    \expandafter\lst@token\expandafter{#1}%
+    \let#1\@empty}
+\def\lst@CheckDelay{%
+    \ifx\lst@delayed\@empty\else
+        \lst@GetOutputMacro\@gtempa
+        \ifx\lst@delayedoutput\@gtempa
+            \lst@MergeToken\lst@delayed\lst@delayedlength
+        \else
+            {\lst@ResetToken
+             \lst@MergeToken\lst@delayed\lst@delayedlength
+             \lst@delayedoutput}%
+            \let\lst@delayed\@empty
+        \fi
+    \fi}
+\def\lst@CheckMerge{%
+    \ifx\lst@merged\@empty\else
+        \lst@MergeToken\lst@merged\lst@mergedlength
+    \fi}
+\let\lst@delayed\@empty % init
+\let\lst@merged\@empty % init
+\def\lst@column@fixed{%
+    \lst@flexiblefalse
+    \lst@width\lst@widthfixed\relax
+    \let\lst@OutputLostSpace\lst@UseLostSpace
+    \let\lst@FillOutputBox\lst@FillFixed
+    \let\lst@hss\hss
+    \def\lst@hbox{\hbox to\lst@length\lst@width}}
+\def\lst@FillFixed#1{#1\lst@FillFixed@}
+\def\lst@FillFixed@#1{%
+    \ifx\@empty#1\else \lst@hss#1\expandafter\lst@FillFixed@ \fi}
+\def\lst@column@flexible{%
+    \lst@flexibletrue
+    \lst@width\lst@widthflexible\relax
+    \let\lst@OutputLostSpace\lst@UseLostSpace
+    \let\lst@FillOutputBox\@empty
+    \let\lst@hss\@empty
+    \let\lst@hbox\hbox}
+\def\lst@column@fullflexible{%
+    \lst@column@flexible
+    \def\lst@OutputLostSpace{\lst@ifnewline \lst@UseLostSpace\fi}%
+    \let\lst@leftinsert\@empty
+    \let\lst@rightinsert\@empty}
+\def\lst@outputpos#1#2\relax{%
+    \def\lst@lefthss{\lst@hss}\let\lst@righthss\lst@lefthss
+    \let\lst@rightinsert\lst@InsertLostSpace
+    \ifx #1c%
+        \let\lst@leftinsert\lst@InsertHalfLostSpace
+    \else\ifx #1r%
+        \let\lst@righthss\@empty
+        \let\lst@leftinsert\lst@InsertLostSpace
+        \let\lst@rightinsert\@empty
+    \else
+        \let\lst@lefthss\@empty
+        \let\lst@leftinsert\@empty
+        \ifx #1l\else \PackageWarning{Listings}%
+            {Unknown positioning for output boxes}%
+        \fi
+    \fi\fi}
+\def\lst@flexibletrue{\let\lst@ifflexible\iftrue}
+\def\lst@flexiblefalse{\let\lst@ifflexible\iffalse}
+\lst@Key{columns}{[c]fixed}{\lstKV@OptArg[]{#1}{%
+    \ifx\@empty##1\@empty\else \lst@outputpos##1\relax\relax \fi
+    \expandafter\let\expandafter\lst@arg
+                                \csname\@lst @column@##2\endcsname
+    \lst@arg
+    \ifx\lst@arg\relax
+        \PackageWarning{Listings}{Unknown column format `##2'}%
+    \else
+        \lst@ifflexible
+            \let\lst@columnsflexible\lst@arg
+        \else
+            \let\lst@columnsfixed\lst@arg
+        \fi
+    \fi}}
+\let\lst@columnsfixed\lst@column@fixed % init
+\let\lst@columnsflexible\lst@column@flexible % init
+\lst@Key{flexiblecolumns}\relax[t]{%
+    \lstKV@SetIf{#1}\lst@ifflexible
+    \lst@ifflexible \lst@columnsflexible
+              \else \lst@columnsfixed \fi}
+\newcount\lst@newlines
+\lst@AddToHook{InitVars}{\global\lst@newlines\z@}
+\lst@AddToHook{InitVarsBOL}{\global\advance\lst@newlines\@ne}
+\def\lst@NewLine{%
+    \ifx\lst@OutputBox\@gobble\else
+        \par\noindent \hbox{}%
+    \fi
+    \global\advance\lst@newlines\m@ne
+    \lst@newlinetrue}
+\def\lst@newlinetrue{\global\let\lst@ifnewline\iftrue}
+\lst@AddToHookExe{PostOutput}{\global\let\lst@ifnewline\iffalse}% init
+\def\lst@TrackNewLines{%
+    \ifnum\lst@newlines>\z@
+        \lsthk@OnNewLine
+        \lst@DoNewLines
+    \fi}
+\lst@AddToHook{OnNewLine}{}% init
+\lst@Key{emptylines}\maxdimen{%
+    \@ifstar{\lst@true\@tempcnta\@gobble#1\relax\lst@GobbleNil}%
+            {\lst@false\@tempcnta#1\relax\lst@GobbleNil}#1\@nil
+    \advance\@tempcnta\@ne
+    \edef\lst@maxempty{\the\@tempcnta\relax}%
+    \let\lst@ifpreservenumber\lst@if}
+\def\lst@DoNewLines{
+    \@whilenum\lst@newlines>\lst@maxempty \do
+        {\lst@ifpreservenumber
+            \lsthk@OnEmptyLine
+            \global\advance\c@lstnumber\lst@advancelstnum
+         \fi
+         \global\advance\lst@newlines\m@ne}%
+    \@whilenum \lst@newlines>\@ne \do
+        {\lsthk@OnEmptyLine \lst@NewLine}%
+    \ifnum\lst@newlines>\z@ \lst@NewLine \fi}
+\lst@AddToHook{OnEmptyLine}{}% init
+\lst@Key{identifierstyle}{}{\def\lst@identifierstyle{#1}}
+\lst@AddToHook{EmptyStyle}{\let\lst@identifierstyle\@empty}
+\def\lst@GotoTabStop{%
+    \ifnum\lst@newlines=\z@
+        \setbox\@tempboxa\hbox{\lst@outputspace}%
+        \setbox\@tempboxa\hbox to\wd\@tempboxa{{\lst@currstyle{\hss}}}%
+        \lst@CalcLostSpaceAndOutput
+    \else
+        \global\advance\lst@lostspace \lst@length\lst@width
+        \global\advance\lst@column\lst@length \lst@length\z@
+    \fi}
+\def\lst@OutputOther{%
+    \lst@CheckDelay
+    \ifnum\lst@length=\z@\else
+        \let\lst@thestyle\lst@currstyle
+        \lsthk@OutputOther
+        \lst@OutputToken
+    \fi}
+\lst@AddToHook{OutputOther}{}% init
+\let\lst@currstyle\relax % init
+\def\lst@Output{%
+    \lst@CheckDelay
+    \ifnum\lst@length=\z@\else
+        \ifx\lst@currstyle\relax
+            \let\lst@thestyle\lst@identifierstyle
+        \else
+            \let\lst@thestyle\lst@currstyle
+        \fi
+        \lsthk@Output
+        \lst@OutputToken
+    \fi
+    \let\lst@lastother\relax}
+\lst@AddToHook{Output}{}% init
+\def\lst@GetOutputMacro#1{%
+    \lst@ifletter \global\let#1\lst@Output
+            \else \global\let#1\lst@OutputOther\fi}
+\def\lst@PrintToken{%
+    \lst@ifletter \lst@Output \lst@letterfalse
+            \else \lst@OutputOther \let\lst@lastother\@empty \fi}
+\def\lst@XPrintToken{%
+    \lst@PrintToken \lst@CheckMerge
+    \ifnum\lst@length=\z@\else \lst@PrintToken \fi}
+\def\lst@BeginDropOutput#1{%
+    \xdef\lst@BDOnewlines{\the\lst@newlines}%
+    \global\let\lst@BDOifnewline\lst@ifnewline
+    \lst@EnterMode{#1}%
+        {\lst@modetrue
+         \let\lst@OutputBox\@gobble
+         \aftergroup\lst@BDORestore}}
+\def\lst@BDORestore{%
+    \global\lst@newlines\lst@BDOnewlines
+    \global\let\lst@ifnewline\lst@BDOifnewline}
+\let\lst@EndDropOutput\lst@LeaveMode
+\def\lst@ProcessLetter{\lst@whitespacefalse \lst@AppendLetter}
+\def\lst@ProcessOther{\lst@whitespacefalse \lst@AppendOther}
+\def\lst@ProcessDigit{%
+    \lst@whitespacefalse
+    \lst@ifletter \expandafter\lst@AppendLetter
+            \else \expandafter\lst@AppendOther\fi}
+\def\lst@whitespacetrue{\global\let\lst@ifwhitespace\iftrue}
+\def\lst@whitespacefalse{\global\let\lst@ifwhitespace\iffalse}
+\lst@AddToHook{InitVarsBOL}{\lst@whitespacetrue}
+\lst@Key{tabsize}{8}
+    {\ifnum#1>\z@ \def\lst@tabsize{#1}\else
+         \PackageError{Listings}{Strict positive integer expected}%
+         {You can't use `#1' as tabsize. \@ehc}%
+     \fi}
+\lst@Key{showtabs}f[t]{\lstKV@SetIf{#1}\lst@ifshowtabs}
+\lst@Key{tab}{\kern.06em\hbox{\vrule\@height.3ex}%
+              \hrulefill\hbox{\vrule\@height.3ex}}
+    {\def\lst@tab{#1}}
+\def\lst@ProcessTabulator{%
+    \lst@XPrintToken \lst@whitespacetrue
+    \global\advance\lst@column -\lst@pos
+    \@whilenum \lst@pos<\@ne \do
+        {\global\advance\lst@pos\lst@tabsize}%
+    \lst@length\lst@pos
+    \lst@PreGotoTabStop}
+\def\lst@PreGotoTabStop{%
+    \lst@ifshowtabs
+        \lst@TrackNewLines
+        \setbox\@tempboxa\hbox to\lst@length\lst@width
+            {{\lst@currstyle{\hss\lst@tab}}}%
+        \lst@CalcLostSpaceAndOutput
+    \else
+        \lst@ifkeepspaces
+            \@tempcnta\lst@length \lst@length\z@
+            \@whilenum \@tempcnta>\z@ \do
+                {\lst@AppendOther\lst@outputspace
+                 \advance\@tempcnta\m@ne}%
+            \lst@OutputOther
+        \else
+            \lst@GotoTabStop
+        \fi
+    \fi
+    \lst@length\z@ \global\lst@pos\z@}
+\def\lst@outputspace{\ }
+\def\lst@visiblespace{\lst@ttfamily{\char32}\textvisiblespace}
+\lst@Key{showspaces}{false}[t]{\lstKV@SetIf{#1}\lst@ifshowspaces}
+\lst@Key{keepspaces}{false}[t]{\lstKV@SetIf{#1}\lst@ifkeepspaces}
+\lst@AddToHook{Init}
+    {\lst@ifshowspaces
+         \let\lst@outputspace\lst@visiblespace
+         \lst@keepspacestrue
+     \fi}
+\def\lst@keepspacestrue{\let\lst@ifkeepspaces\iftrue}
+\def\lst@ProcessSpace{%
+    \lst@ifkeepspaces
+        \lst@whitespacetrue
+        \lst@PrintToken
+        \lst@AppendOther\lst@outputspace
+        \lst@PrintToken
+    \else \ifnum\lst@newlines=\z@
+        \lst@AppendSpecialSpace
+    \else \ifnum\lst@length=\z@
+            \global\advance\lst@lostspace\lst@width
+            \global\advance\lst@pos\m@ne
+            \lst@whitespacetrue
+        \else
+            \lst@AppendSpecialSpace
+        \fi
+    \fi \fi}
+\def\lst@AppendSpecialSpace{%
+    \lst@ifwhitespace
+        \lst@PrintToken
+        \global\advance\lst@lostspace\lst@width
+        \global\advance\lst@pos\m@ne
+        \lst@gobbledwhitespacetrue
+    \else
+        \lst@whitespacetrue
+        \lst@PrintToken
+        \lst@AppendOther\lst@outputspace
+        \lst@PrintToken
+    \fi}
+\lst@Key{formfeed}{\bigbreak}{\def\lst@formfeed{#1}}
+\def\lst@ProcessFormFeed{%
+    \lst@XPrintToken
+    \ifnum\lst@newlines=\z@
+        \lst@EOLUpdate \lsthk@InitVarsBOL
+    \fi
+    \lst@formfeed
+    \lst@whitespacetrue}
+\def\lst@Def#1{\lccode`\~=#1\lowercase{\def~}}
+\def\lst@Let#1{\lccode`\~=#1\lowercase{\let~}}
+\lst@AddToAtTop{\try@load@fontshape}{\def\space{ }}
+\def\lst@SelectStdCharTable{%
+    \lst@Def{9}{\lst@ProcessTabulator}%
+    \lst@Def{12}{\lst@ProcessFormFeed}%
+    \lst@Def{32}{\lst@ProcessSpace}}
+\def\lst@CCPut#1#2{%
+    \ifnum#2=\z@
+        \expandafter\@gobbletwo
+    \else
+        \lccode`\~=#2\lccode`\/=#2\lowercase{\lst@CCPut@~{#1/}}%
+    \fi
+    \lst@CCPut#1}
+\def\lst@CCPut@#1#2{\lst@lAddTo\lst@SelectStdCharTable{\def#1{#2}}}
+\lst@CCPut \lst@ProcessOther
+    {"21}{"22}{"28}{"29}{"2B}{"2C}{"2E}{"2F}
+    {"3A}{"3B}{"3D}{"3F}{"5B}{"5D}
+    \z@
+\lst@CCPut \lst@ProcessDigit
+    {"30}{"31}{"32}{"33}{"34}{"35}{"36}{"37}{"38}{"39}
+    \z@
+\lst@CCPut \lst@ProcessLetter
+    {"40}{"41}{"42}{"43}{"44}{"45}{"46}{"47}
+    {"48}{"49}{"4A}{"4B}{"4C}{"4D}{"4E}{"4F}
+    {"50}{"51}{"52}{"53}{"54}{"55}{"56}{"57}
+    {"58}{"59}{"5A}
+         {"61}{"62}{"63}{"64}{"65}{"66}{"67}
+    {"68}{"69}{"6A}{"6B}{"6C}{"6D}{"6E}{"6F}
+    {"70}{"71}{"72}{"73}{"74}{"75}{"76}{"77}
+    {"78}{"79}{"7A}
+    \z@
+\def\lst@CCPutMacro#1#2#3{%
+    \ifnum#2=\z@ \else
+        \begingroup\lccode`\~=#2\relax \lccode`\/=#2\relax
+        \lowercase{\endgroup\expandafter\lst@CCPutMacro@
+            \csname\@lst @um/\expandafter\endcsname
+            \csname\@lst @um/@\endcsname /~}#1{#3}%
+        \expandafter\lst@CCPutMacro
+    \fi}
+\def\lst@CCPutMacro@#1#2#3#4#5#6{%
+    \lst@lAddTo\lst@SelectStdCharTable{\def#4{#5#1}}%
+    \def#1{\lst@UM#3}%
+    \def#2{#6}}
+\def\lst@UM#1{\csname\@lst @um#1@\endcsname}
+\lst@CCPutMacro
+    \lst@ProcessOther {"23}\#
+    \lst@ProcessLetter{"24}\textdollar
+    \lst@ProcessOther {"25}\%
+    \lst@ProcessOther {"26}\&
+    \lst@ProcessOther {"27}{\lst@ifupquote \textquotesingle
+                                     \else \char39\relax \fi}
+    \lst@ProcessOther {"2A}{\lst@ttfamily*\textasteriskcentered}
+    \lst@ProcessOther {"2D}{\lst@ttfamily{-{}}{$-$}}
+    \lst@ProcessOther {"3C}{\lst@ttfamily<\textless}
+    \lst@ProcessOther {"3E}{\lst@ttfamily>\textgreater}
+    \lst@ProcessOther {"5C}{\lst@ttfamily{\char92}\textbackslash}
+    \lst@ProcessOther {"5E}\textasciicircum
+    \lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}\textunderscore}
+    \lst@ProcessOther {"60}{\lst@ifupquote \textasciigrave
+                                     \else \char96\relax \fi}
+    \lst@ProcessOther {"7B}{\lst@ttfamily{\char123}\textbraceleft}
+    \lst@ProcessOther {"7C}{\lst@ttfamily|\textbar}
+    \lst@ProcessOther {"7D}{\lst@ttfamily{\char125}\textbraceright}
+    \lst@ProcessOther {"7E}\textasciitilde
+    \lst@ProcessOther {"7F}-
+    \@empty\z@\@empty
+\def\lst@ttfamily#1#2{\ifx\f@family\ttdefault#1\relax\else#2\fi}
+\lst@AddToHook{Init}{\edef\ttdefault{\ttdefault}}
+\lst@Key{upquote}{false}[t]{\lstKV@SetIf{#1}\lst@ifupquote
+    \lst@ifupquote
+       \@ifundefined{textasciigrave}%
+          {\let\KV@lst@upquote\@gobble
+           \lstKV@SetIf f\lst@ifupquote \@gobble\fi
+           \PackageError{Listings}{Option `upquote' requires `textcomp'
+            package.\MessageBreak The option has been disabled}%
+          {Add \string\usepackage{textcomp} to your preamble.}}%
+          {}%
+    \fi}
+\AtBeginDocument{%
+  \@ifpackageloaded{upquote}{\RequirePackage{textcomp}%
+                             \lstset{upquote}}{}%
+  \@ifpackageloaded{upquote2}{\lstset{upquote}}{}}
+\def\lst@activecharstrue{\let\lst@ifactivechars\iftrue}
+\def\lst@activecharsfalse{\let\lst@ifactivechars\iffalse}
+\lst@activecharstrue
+\def\lst@SelectCharTable{%
+    \lst@SelectStdCharTable
+    \lst@ifactivechars
+        \catcode9\active \catcode12\active \catcode13\active
+        \@tempcnta=32\relax
+        \@whilenum\@tempcnta<128\do
+            {\catcode\@tempcnta\active\advance\@tempcnta\@ne}%
+    \fi
+    \lst@ifec \lst@DefEC \fi
+    \let\do\lst@do@noligs \verbatim@nolig@list
+    \lsthk@SelectCharTable
+    \lst@DeveloperSCT
+\lst@DefRange
+    \ifx\lst@Backslash\relax\else
+        \lst@LetSaveDef{"5C}\lsts@backslash\lst@Backslash
+    \fi}
+\lst@Key{SelectCharTable}{}{\def\lst@DeveloperSCT{#1}}
+\lst@Key{MoreSelectCharTable}\relax{\lst@lAddTo\lst@DeveloperSCT{#1}}
+\lst@AddToHook{SetLanguage}{\let\lst@DeveloperSCT\@empty}
+\def\lst@do@noligs#1{%
+    \begingroup \lccode`\~=`#1\lowercase{\endgroup
+    \lst@do@noligs@~}}
+\def\lst@do@noligs@#1{%
+    \expandafter\expandafter\expandafter\def
+    \expandafter\expandafter\expandafter#1%
+    \expandafter\expandafter\expandafter{\expandafter\lst@NoLig#1}}
+\def\lst@NoLig{\advance\lst@length\m@ne \lst@Append\lst@nolig}
+\def\lst@nolig{\lst@UM\@empty}%
+\@namedef{\@lst @um@}{\leavevmode\kern\z@}
+\def\lst@SaveOutputDef#1#2{%
+    \begingroup \lccode`\~=#1\relax \lowercase{\endgroup
+    \def\lst@temp##1\def~##2##3\relax}{%
+        \global\expandafter\let\expandafter#2\@gobble##2\relax}%
+    \expandafter\lst@temp\lst@SelectStdCharTable\relax}
+\lst@SaveOutputDef{"5C}\lstum@backslash
+\lst@Key{extendedchars}{true}[t]{\lstKV@SetIf{#1}\lst@ifec}
+\def\lst@DefEC{%
+    \lst@CCECUse \lst@ProcessLetter
+      ^^80^^81^^82^^83^^84^^85^^86^^87^^88^^89^^8a^^8b^^8c^^8d^^8e^^8f%
+      ^^90^^91^^92^^93^^94^^95^^96^^97^^98^^99^^9a^^9b^^9c^^9d^^9e^^9f%
+      ^^a0^^a1^^a2^^a3^^a4^^a5^^a6^^a7^^a8^^a9^^aa^^ab^^ac^^ad^^ae^^af%
+      ^^b0^^b1^^b2^^b3^^b4^^b5^^b6^^b7^^b8^^b9^^ba^^bb^^bc^^bd^^be^^bf%
+      ^^c0^^c1^^c2^^c3^^c4^^c5^^c6^^c7^^c8^^c9^^ca^^cb^^cc^^cd^^ce^^cf%
+      ^^d0^^d1^^d2^^d3^^d4^^d5^^d6^^d7^^d8^^d9^^da^^db^^dc^^dd^^de^^df%
+      ^^e0^^e1^^e2^^e3^^e4^^e5^^e6^^e7^^e8^^e9^^ea^^eb^^ec^^ed^^ee^^ef%
+      ^^f0^^f1^^f2^^f3^^f4^^f5^^f6^^f7^^f8^^f9^^fa^^fb^^fc^^fd^^fe^^ff%
+      ^^00}
+\def\lst@CCECUse#1#2{%
+    \ifnum`#2=\z@
+        \expandafter\@gobbletwo
+    \else
+        \ifnum\catcode`#2=\active
+            \lccode`\~=`#2\lccode`\/=`#2\lowercase{\lst@CCECUse@#1~/}%
+        \else
+            \lst@ifactivechars \catcode`#2=\active \fi
+            \lccode`\~=`#2\lccode`\/=`#2\lowercase{\def~{#1/}}%
+        \fi
+    \fi
+    \lst@CCECUse#1}
+\def\lst@CCECUse@#1#2#3{%
+    \expandafter\def\csname\@lst @EC#3\endcsname{\lst@UM#3}%
+    \expandafter\let\csname\@lst @um#3@\endcsname #2%
+    \edef#2{\noexpand#1%
+            \expandafter\noexpand\csname\@lst @EC#3\endcsname}}
+\lst@AddToHook{Init}
+    {\let\lsts@nfss@catcodes\nfss@catcodes
+     \let\nfss@catcodes\lst@nfss@catcodes}
+\def\lst@nfss@catcodes{%
+    \lst@makeletter
+        ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\relax
+    \@makeother (\@makeother )\@makeother ,\@makeother :\@makeother\&%
+    \@makeother 0\@makeother 1\@makeother 2\@makeother 3\@makeother 4%
+    \@makeother 5\@makeother 6\@makeother 7\@makeother 8\@makeother 9%
+    \@makeother =\lsts@nfss@catcodes}
+\def\lst@makeletter#1{%
+    \ifx\relax#1\else\catcode`#111\relax \expandafter\lst@makeletter\fi}
+\lst@Key{useoutput}{2}{\edef\lst@useoutput{\ifcase#10 0\or 1\else 2\fi}}
+\lst@AddToHook{Init}
+{\edef\lst@OrgOutput{\the\output}%
+\ifcase\lst@useoutput\relax
+\or
+ \output{\global\setbox\lst@gtempboxa\box\@cclv
+         \expandafter\egroup
+         \lst@SaveToken
+     \lst@InterruptModes
+     \setbox\@cclv\box\lst@gtempboxa
+     \bgroup\lst@OrgOutput\egroup
+     \bgroup
+     \aftergroup\pagegoal\aftergroup\vsize
+     \aftergroup\lst@ReenterModes\aftergroup\lst@RestoreToken}%
+\else
+ \output{\lst@RestoreOrigCatcodes
+         \lst@ifec \lst@RestoreOrigExtendedCatcodes \fi
+         \lst@OrgOutput}%
+\fi}
+\def\lst@GetChars#1#2#3{%
+    \let#1\@empty
+    \@tempcnta#2\relax \@tempcntb#3\relax
+    \loop \ifnum\@tempcnta<\@tempcntb\relax
+        \lst@lExtend#1{\expandafter\catcode\the\@tempcnta=}%
+        \lst@lExtend#1{\the\catcode\@tempcnta\relax}%
+        \ifnum\the\catcode\@tempcnta=\active
+            \begingroup\lccode`\~=\@tempcnta
+            \lowercase{\endgroup
+            \lst@lExtend#1{\expandafter\let\expandafter~\csname
+                                    lstecs@\the\@tempcnta\endcsname}%
+            \expandafter\let\csname lstecs@\the\@tempcnta\endcsname~}%
+        \fi
+        \advance\@tempcnta\@ne
+    \repeat}
+\def\lst@ScanChars{%
+    \lst@GetChars\lst@RestoreOrigCatcodes\@ne {128}%
+    \lst@GetChars\lst@RestoreOrigExtendedCatcodes{128}{256}}
+\lst@Key{rescanchars}\relax{\lst@ScanChars}
+\AtBeginDocument{\lst@ScanChars}
+\lst@Key{alsoletter}\relax{%
+    \lst@DoAlso{#1}\lst@alsoletter\lst@ProcessLetter}
+\lst@Key{alsodigit}\relax{%
+    \lst@DoAlso{#1}\lst@alsodigit\lst@ProcessDigit}
+\lst@Key{alsoother}\relax{%
+    \lst@DoAlso{#1}\lst@alsoother\lst@ProcessOther}
+\lst@AddToHook{SelectCharTable}
+    {\lst@alsoother \lst@alsodigit \lst@alsoletter}
+\lst@AddToHookExe{SetLanguage}% init
+    {\let\lst@alsoletter\@empty
+     \let\lst@alsodigit\@empty
+     \let\lst@alsoother\@empty}
+\def\lst@DoAlso#1#2#3{%
+    \lst@DefOther\lst@arg{#1}\let#2\@empty
+    \expandafter\lst@DoAlso@\expandafter#2\expandafter#3\lst@arg\relax}
+\def\lst@DoAlso@#1#2#3{%
+    \ifx\relax#3\expandafter\@gobblethree \else
+        \begingroup \lccode`\~=`#3\relax \lowercase{\endgroup
+        \def\lst@temp##1\def~##2##3\relax{%
+            \edef\lst@arg{\def\noexpand~{\noexpand#2\expandafter
+                                         \noexpand\@gobble##2}}}}%
+        \expandafter\lst@temp\lst@SelectStdCharTable\relax
+        \lst@lExtend#1{\lst@arg}%
+    \fi
+    \lst@DoAlso@#1#2}
+\def\lst@SaveDef#1#2{%
+    \begingroup \lccode`\~=#1\relax \lowercase{\endgroup\let#2~}}
+\def\lst@DefSaveDef#1#2{%
+    \begingroup \lccode`\~=#1\relax \lowercase{\endgroup\let#2~\def~}}
+\def\lst@LetSaveDef#1#2{%
+    \begingroup \lccode`\~=#1\relax \lowercase{\endgroup\let#2~\let~}}
+\def\lst@CDef#1{\lst@CDef@#1}
+\def\lst@CDef@#1#2#3#4{\lst@CDefIt#1{#2}{#3}{#4#2#3}#4}
+\def\lst@CDefX#1{\lst@CDefX@#1}
+\def\lst@CDefX@#1#2#3{\lst@CDefIt#1{#2}{#3}{}}
+\def\lst@CDefIt#1#2#3#4#5#6#7#8{%
+    \ifx\@empty#2\@empty
+        \def#1{#6\def\lst@next{#7#4#8}\lst@next}%
+    \else \ifx\@empty#3\@empty
+        \def#1##1{%
+            #6%
+            \ifx##1#2\def\lst@next{#7#4#8}\else
+                     \def\lst@next{#5##1}\fi
+            \lst@next}%
+    \else
+        \def#1{%
+            #6%
+            \lst@IfNextCharsArg{#2#3}{#7#4#8}%
+                                     {\expandafter#5\lst@eaten}}%
+    \fi \fi}
+\def\lst@CArgX#1#2\relax{%
+    \lst@DefActive\lst@arg{#1#2}%
+    \expandafter\lst@CArg\lst@arg\relax}
+\def\lst@CArg#1#2\relax{%
+    \lccode`\/=`#1\lowercase{\def\lst@temp{/}}%
+    \lst@GetFreeMacro{lst@c\lst@temp}%
+    \expandafter\lst@CArg@\lst@freemacro#1#2\@empty\@empty\relax}
+\def\lst@CArg@#1#2#3#4\@empty#5\relax#6{%
+    \let#1#2%
+    \ifx\@empty#3\@empty
+        \def\lst@next{#6{#2{}{}}}%
+    \else
+        \def\lst@next{#6{#2#3{#4}}}%
+    \fi
+    \lst@next #1}
+\def\lst@CArgEmpty#1\@empty{#1}
+\lst@Key{excludedelims}\relax
+    {\lsthk@ExcludeDelims \lst@NormedDef\lst@temp{#1}%
+     \expandafter\lst@for\lst@temp\do
+     {\expandafter\let\csname\@lst @ifex##1\endcsname\iftrue}}
+\def\lst@DelimPrint#1#2{%
+    #1%
+      \begingroup
+        \lst@mode\lst@nomode \lst@modetrue
+        #2\lst@XPrintToken
+      \endgroup
+      \lst@ResetToken
+    \fi}
+\def\lst@DelimOpen#1#2#3#4#5#6\@empty{%
+    \lst@TrackNewLines \lst@XPrintToken
+    \lst@DelimPrint#1{#6}%
+    \lst@EnterMode{#4}{\def\lst@currstyle#5}%
+    \lst@DelimPrint{#1#2}{#6}%
+    #3}
+\def\lst@DelimClose#1#2#3\@empty{%
+    \lst@TrackNewLines \lst@XPrintToken
+    \lst@DelimPrint{#1#2}{#3}%
+    \lst@LeaveMode
+    \lst@DelimPrint{#1}{#3}}
+\def\lst@BeginDelim{\lst@DelimOpen\iffalse\else{}}
+\def\lst@EndDelim{\lst@DelimClose\iffalse\else}
+\def\lst@BeginIDelim{\lst@DelimOpen\iffalse{}{}}
+\def\lst@EndIDelim{\lst@DelimClose\iffalse{}}
+\lst@AddToHook{SelectCharTable}{\lst@DefDelims}
+\lst@AddToHookExe{SetLanguage}{\let\lst@DefDelims\@empty}
+\def\lst@Delim#1{%
+    \lst@false \let\lst@cumulative\@empty \let\lst@arg\@empty
+    \@ifstar{\@ifstar{\lst@Delim@{#1}}%
+                     {\let\lst@cumulative\relax
+                      \lst@Delim@{#1}}}%
+            {\lst@true\lst@Delim@{#1}}}
+\def\lst@Delim@#1[#2]{%
+    \gdef\lst@delimtype{#2}%
+    \@ifnextchar[\lst@Delim@sty
+                 {\lst@Delim@sty[#1]}}
+\def\lst@Delim@sty[#1]{%
+    \def\lst@delimstyle{#1}%
+    \ifx\@empty#1\@empty\else
+        \lst@Delim@sty@ #1\@nil
+    \fi
+    \@ifnextchar[\lst@Delim@option
+                 \lst@Delim@delim}
+\def\lst@Delim@option[#1]{\def\lst@arg{[#1]}\lst@Delim@delim}
+\def\lst@Delim@sty@#1#2\@nil{%
+    \if\relax\noexpand#1\else
+        \edef\lst@delimstyle{\expandafter\noexpand
+                             \csname\@lst @\lst@delimstyle\endcsname}%
+    \fi}
+\def\lst@Delim@delim#1\relax#2#3#4#5#6#7#8{%
+    \ifx #4\@empty \lst@Delim@delall{#2}\fi
+    \ifx\@empty#1\@empty
+        \ifx #4\@nil
+            \@ifundefined{\@lst @#2DM@\lst@delimtype}%
+                {\lst@Delim@delall{#2@\lst@delimtype}}%
+                {\lst@Delim@delall{#2DM@\lst@delimtype}}%
+        \fi
+    \else
+        \expandafter\lst@Delim@args\expandafter
+            {\lst@delimtype}{#1}{#5}#6{#7}{#8}#4%
+        \let\lst@delim\@empty
+        \expandafter\lst@IfOneOf\lst@delimtype\relax#3%
+        {\@ifundefined{\@lst @#2DM@\lst@delimtype}%
+             {\lst@lExtend\lst@delim{\csname\@lst @#2@\lst@delimtype
+                                     \expandafter\endcsname\lst@arg}}%
+             {\lst@lExtend\lst@delim{\expandafter\lst@UseDynamicMode
+                                     \csname\@lst @#2DM@\lst@delimtype
+                                     \expandafter\endcsname\lst@arg}}%
+         \ifx #4\@nil
+             \let\lst@temp\lst@DefDelims \let\lst@DefDelims\@empty
+             \expandafter\lst@Delim@del\lst@temp\@empty\@nil\@nil\@nil
+         \else
+             \lst@lExtend\lst@DefDelims\lst@delim
+         \fi}%
+        {\PackageError{Listings}{Illegal type `\lst@delimtype'}%
+                                {#2 types are #3.}}%
+     \fi}
+\def\lst@Delim@args#1#2#3#4#5#6#7{%
+    \begingroup
+    \lst@false \let\lst@next\lst@XConvert
+    \@ifnextchar #4{\xdef\lst@delimtype{\expandafter\@gobble
+                                        \lst@delimtype}%
+                    #5\lst@next#2\@nil
+                    \lst@lAddTo\lst@arg{\@empty#6}%
+                    \lst@GobbleNil}%
+                   {\lst@next#2\@nil
+                    \lst@lAddTo\lst@arg{\@empty#3}%
+                    \lst@GobbleNil}%
+                 #1\@nil
+    \global\let\@gtempa\lst@arg
+    \endgroup
+    \let\lst@arg\@gtempa
+    \ifx #7\@nil\else
+        \expandafter\lst@Delim@args@\expandafter{\lst@delimstyle}%
+    \fi}
+\def\lst@Delim@args@#1{%
+    \lst@if
+        \lst@lAddTo\lst@arg{{{#1}\lst@modetrue}}%
+    \else
+        \ifx\lst@cumulative\@empty
+            \lst@lAddTo\lst@arg{{{}#1}}%
+        \else
+            \lst@lAddTo\lst@arg{{{#1}}}%
+        \fi
+    \fi}
+\def\lst@Delim@del#1\@empty#2#3#4{%
+    \ifx #2\@nil\else
+        \def\lst@temp{#1\@empty#2#3}%
+        \ifx\lst@temp\lst@delim\else
+            \lst@lAddTo\lst@DefDelims{#1\@empty#2#3{#4}}%
+        \fi
+        \expandafter\lst@Delim@del
+    \fi}
+\def\lst@Delim@delall#1{%
+    \begingroup
+    \edef\lst@delim{\expandafter\string\csname\@lst @#1\endcsname}%
+    \lst@false \global\let\@gtempa\@empty
+    \expandafter\lst@Delim@delall@\lst@DefDelims\@empty
+    \endgroup
+    \let\lst@DefDelims\@gtempa}
+\def\lst@Delim@delall@#1{%
+    \ifx #1\@empty\else
+        \ifx #1\lst@UseDynamicMode
+            \lst@true
+            \let\lst@next\lst@Delim@delall@do
+        \else
+            \def\lst@next{\lst@Delim@delall@do#1}%
+        \fi
+        \expandafter\lst@next
+    \fi}
+\def\lst@Delim@delall@do#1#2\@empty#3#4#5{%
+    \expandafter\lst@IfSubstring\expandafter{\lst@delim}{\string#1}%
+      {}%
+      {\lst@if \lst@AddTo\@gtempa\lst@UseDynamicMode \fi
+       \lst@AddTo\@gtempa{#1#2\@empty#3#4{#5}}}%
+    \lst@false \lst@Delim@delall@}
+\gdef\lst@DefDelimB#1#2#3#4#5#6#7#8{%
+    \lst@CDef{#1}#2%
+        {#3}%
+        {\let\lst@bnext\lst@CArgEmpty
+         \lst@ifmode #4\else
+             #5%
+             \def\lst@bnext{#6{#7}{#8}}%
+         \fi
+         \lst@bnext}%
+        \@empty}
+\gdef\lst@DefDelimE#1#2#3#4#5#6#7{%
+    \lst@CDef{#1}#2%
+        {#3}%
+        {\let\lst@enext\lst@CArgEmpty
+         \ifnum #7=\lst@mode%
+             #4%
+             \let\lst@enext#6%
+         \else
+             #5%
+         \fi
+         \lst@enext}%
+        \@empty}
+\lst@AddToHook{Init}{\let\lst@bnext\relax \let\lst@enext\relax}
+\gdef\lst@DefDelimBE#1#2#3#4#5#6#7#8#9{%
+    \lst@CDef{#1}#2%
+        {#3}%
+        {\let\lst@bnext\lst@CArgEmpty
+         \ifnum #7=\lst@mode
+             #4%
+             \let\lst@bnext#9%
+         \else
+             \lst@ifmode\else
+                 #5%
+                 \def\lst@bnext{#6{#7}{#8}}%
+             \fi
+         \fi
+         \lst@bnext}%
+        \@empty}
+\gdef\lst@delimtypes{s,l}
+\gdef\lst@DelimKey#1#2{%
+    \lst@Delim{}#2\relax
+        {Delim}\lst@delimtypes #1%
+                {\lst@BeginDelim\lst@EndDelim}
+        i\@empty{\lst@BeginIDelim\lst@EndIDelim}}
+\lst@Key{delim}\relax{\lst@DelimKey\@empty{#1}}
+\lst@Key{moredelim}\relax{\lst@DelimKey\relax{#1}}
+\lst@Key{deletedelim}\relax{\lst@DelimKey\@nil{#1}}
+\gdef\lst@DelimDM@l#1#2\@empty#3#4#5{%
+    \lst@CArg #2\relax\lst@DefDelimB{}{}{}#3{#1}{#5\lst@Lmodetrue}}
+\gdef\lst@DelimDM@s#1#2#3\@empty#4#5#6{%