aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorax006ho <j.hoffmann@fh-aachen.de>2018-11-05 21:46:13 +0100
committerax006ho <j.hoffmann@fh-aachen.de>2018-11-05 21:48:00 +0100
commit0c6d77b21f089351955e213f8e7924bc4e25d68f (patch)
treee094421d904f4d1d8c388ab81367f28a483d6457
parenteadd572ef289d27d915d5ffb2a7382b4849c72ee (diff)
downloadlistings-0c6d77b21f089351955e213f8e7924bc4e25d68f.tar.gz
listings-0c6d77b21f089351955e213f8e7924bc4e25d68f.tar.bz2
reorganized hansl tests, added a new test
l---------testing/languages/hansl-gretl/.svnignore1
-rw-r--r--testing/languages/hansl-gretl/Makefile7
-rw-r--r--testing/languages/hansl-gretl/hansl_00.tex (renamed from testing/languages/hansl-gretl/hansl_00_test.tex)0
-rw-r--r--testing/languages/hansl-gretl/hansl_01.tex101
-rw-r--r--testing/languages/hansl-gretl/listings.cfg9
5 files changed, 106 insertions, 12 deletions
diff --git a/testing/languages/hansl-gretl/.svnignore b/testing/languages/hansl-gretl/.svnignore
deleted file mode 120000
index 6cf8190..0000000
--- a/testing/languages/hansl-gretl/.svnignore
+++ /dev/null
@@ -1 +0,0 @@
-../../../.svnignore \ No newline at end of file
diff --git a/testing/languages/hansl-gretl/Makefile b/testing/languages/hansl-gretl/Makefile
index 4c857f7..cf09747 100644
--- a/testing/languages/hansl-gretl/Makefile
+++ b/testing/languages/hansl-gretl/Makefile
@@ -16,7 +16,8 @@
# $@: target
SOURCES = \
- hansl_00_test.tex
+ hansl_00.tex \
+ hansl_01.tex \
.PHONY: all echo
@@ -24,7 +25,9 @@ SOURCES = \
all: ${SOURCES:.tex=.pdf}
-hansl_00_test.pdf: hansl_00_test.tex functions.inp listings.cfg listings.sty lstlang2.sty
+hansl_00.pdf: hansl_00.tex functions.inp listings.cfg listings.sty lstlang2.sty
+
+hansl_01.pdf: hansl_01.tex functions.inp listings.cfg listings.sty lstlang2.sty
##################
## common settings
diff --git a/testing/languages/hansl-gretl/hansl_00_test.tex b/testing/languages/hansl-gretl/hansl_00.tex
index 54d5102..54d5102 100644
--- a/testing/languages/hansl-gretl/hansl_00_test.tex
+++ b/testing/languages/hansl-gretl/hansl_00.tex
diff --git a/testing/languages/hansl-gretl/hansl_01.tex b/testing/languages/hansl-gretl/hansl_01.tex
new file mode 100644
index 0000000..799bf46
--- /dev/null
+++ b/testing/languages/hansl-gretl/hansl_01.tex
@@ -0,0 +1,101 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Listings test with hansl
+
+\documentclass[10pt]{article}
+
+\usepackage{listings}
+
+\input{listings-hansl.prf}
+
+\begin{document}
+
+\section{Standard (black n white)}
+
+\begin{lstlisting}[language=hansl,style=hanslbw]
+function scalar double(scalar x)
+ scalar ret = 2*x
+ return ret
+end function
+
+arma 1 1 ; y
+
+series x = log(y)
+list L = null
+bundle b = null
+strings S = array(1)
+S[1] = "hello world"
+matrices b.x = defarray(3)
+mle <whatever>
+ deriv x = 0.5
+ params b
+ hessian H
+end mle --auxiliary
+
+# check if really not used anymore:
+
+kalman
+end kalman
+if isnull(x)
+ x = $coeff(y)
+endif
+# function or command?
+sscanf()
+# check the $i syntax
+loop foreach i L
+ series y = 2 * $i
+endloop
+/*and this is a C-style comment
+*/
+loop while 1 > 2 --quiet
+endloop
+loop for (i=1; i<j; i++)
+endloop
+\end{lstlisting}
+
+\section{In colour}
+
+This style tries to mimic as closely as possible the default syntax
+colouring you get in the GUI gretl client.
+
+\begin{lstlisting}[language=hansl,style=hanslcolor]
+function scalar double(scalar x)
+ scalar ret = 2*x
+ return ret
+end function
+
+arma 1 1 ; y
+
+series x = log(y)
+list L = null
+bundle b = null
+strings S = array(1)
+S[1] = "hello"
+matrices b.x = defarray(3)
+mle <whatever>
+ deriv x = 0.5
+ params b
+ hessian H
+end mle --auxiliary
+
+# check if really not used anymore:
+
+kalman
+end kalman
+if isnull(x)
+ x = $coeff(y)
+endif
+# function or command?
+sscanf()
+# check the $i syntax
+loop foreach i L
+ series y = 2 * $i
+endloop
+/*and this is a C-style comment
+*/
+loop while 1 > 2 --quiet
+endloop
+loop for (i=1; i<j; i++)
+endloop
+\end{lstlisting}
+
+\end{document}
diff --git a/testing/languages/hansl-gretl/listings.cfg b/testing/languages/hansl-gretl/listings.cfg
deleted file mode 100644
index 2cba233..0000000
--- a/testing/languages/hansl-gretl/listings.cfg
+++ /dev/null
@@ -1,9 +0,0 @@
-% listings.cfg for testing Fortran code
-%
-% $Id: listings.cfg 71 2013-08-04 10:38:38Z j_hoffmann $
-%
-\def\lstlanguagefiles{lstlang2.sty} % contains hansl language definition
-
-% \input{listings-fortran.prf}
-
-%% End of file `listings.cfg'.

Return to:

Send suggestions and report system problems to the System administrator.