\usepackage{listings}

\lstdefinelanguage{SPLCode}{%
	alsoletter={ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_1234567890},
	morekeywords={print,isEmpty,if,else,while},
	sensitive=true,
	morecomment=[l]{//},
	morecomment=[n]{/*}{*/},
	morestring=[b]",
	morestring=[b]',
	basicstyle=\small,
	identifierstyle=\small\ttfamily,
	commentstyle=\itshape,
	keywordstyle=\bfseries,
	stringstyle=\ttfamily,
	showstringspaces=false,
	basewidth=0.45em,
	columns=[c]fixed,
	keepspaces=true,
	breaklines=true,
	tabsize=4,
	texcl=true,
}

\newcommand{\SPLInline}[1]{\lstinline[language=SPLCode]¦#1¦}
\newcommand{\SI}[1]{\SPLInline{#1}}

\lstdefinestyle{numbers}{numbers=left, stepnumber=1, numberstyle=\tiny, numbersep=5pt}

\lstnewenvironment{SPLCode}{\lstset{language=SPLCode}}{}
