X-Git-Url: http://svarog.pmf.uns.ac.rs/gitweb/?p=mjc2wsl.git;a=blobdiff_plain;f=lib%2Ftex%2Fcomparison-start.tex;fp=lib%2Ftex%2Fcomparison-start.tex;h=5fdc2c003a24908a7efdfb13e6616b3f87fdda92;hp=0000000000000000000000000000000000000000;hb=c59ce06b59fed59b40532fbfbccfcfc7658ded06;hpb=f621804588df1f499276910b6c1becdc350b0786 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