From: Doni Pracner Date: Thu, 4 Dec 2014 00:30:44 +0000 (+0100) Subject: ant - new tasks for making parallel code stages display in a pdf X-Git-Tag: v0.2.1~33 X-Git-Url: https://svarog.pmf.uns.ac.rs/gitweb/?a=commitdiff_plain;h=c59ce06b59fed59b40532fbfbccfcfc7658ded06;p=mjc2wsl.git ant - new tasks for making parallel code stages display in a pdf --- diff --git a/build.xml b/build.xml index f8bde04..206065d 100644 --- a/build.xml +++ b/build.xml @@ -472,6 +472,48 @@ includes="*/*.wsl"/> + + + + + + + \section{${file.name}} + \begin{paracol}{4} + \lstinputlisting[style=mj]{../${file.name}.mj} + \switchcolumn + \lstinputlisting[style=decoded]{../${file.name}.obj.decoded} + \switchcolumn + \lstinputlisting[style=wsl,lastline=200]{../${file.name}.wsl} + \switchcolumn + \lstinputlisting[style=wslt,lastline=200]{../${file.name}${transf.wsl.ext}} + \end{paracol} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lib/tex/comparison-end.tex b/lib/tex/comparison-end.tex new file mode 100644 index 0000000..87d10d7 --- /dev/null +++ b/lib/tex/comparison-end.tex @@ -0,0 +1,2 @@ + +\end{document} diff --git a/lib/tex/comparison-start.tex b/lib/tex/comparison-start.tex new file mode 100644 index 0000000..5fdc2c0 --- /dev/null +++ b/lib/tex/comparison-start.tex @@ -0,0 +1,81 @@ +\documentclass[a4paper,landscape]{article} + +\usepackage[top=2cm, bottom=1.5cm, left=1cm, right=1cm]{geometry} + +\usepackage{graphicx} + +\usepackage{listings} + +\usepackage{paracol} + +\usepackage{courier} + +\usepackage[bookmarks,pdffitwindow=false,unicode=true]{hyperref} + + +\lstloadlanguages{Java} + +\lstdefinelanguage{wsl}{ + morekeywords = {CALL,IF,THEN,ELSE,FI,SKIP,ACTIONS,ENDACTIONS,PRINT,END,WHILE,VAR,ARRAY,PRINFLUSH,HEAD,TAIL,BEGIN,POP,PUSH,DO,OD,WHERE,ENDVAR,PROC}, + comment=[s]{C:"}{"}, + sensitive = true +} + +\lstset{ + basicstyle=\footnotesize\ttfamily, + breaklines=true, + keywordstyle=\textbf, + columns=[l]fixed, + tabsize=2, +% breakatwhitespace=true +% prebreak=\P, +% postbreak=\ding{229}\space, + showstringspaces=true +} + +\lstdefinestyle{mj}{ + %style=codeblock, + numbers=left, + language=Java +} + +\lstdefinestyle{decoded}{ + %style=codeblock, + breakatwhitespace=false +} + +\lstdefinestyle{wsl}{ + language=wsl, + basicstyle=\scriptsize\ttfamily +} + +\lstdefinestyle{wslt}{ + style=wsl, + basicstyle=\footnotesize\ttfamily +} + +\columnratio{0.2, 0.1,0.4,0.3} + +\title{Comparison of various stages of code in MJC2WSL} + +\author{automatically generated} + +\begin{document} + +\maketitle + +\tableofcontents + +\newpage + +\emph{Outputs longer than 200 lines are cut off.} + +\begin{paracol}{4} +Original code - MicroJava +\switchcolumn +Compiled into bytecode and decoded +\switchcolumn +Translated bytecode to WSL +\switchcolumn +Automatically transformed WSL +\end{paracol} \ No newline at end of file