diff --git a/doc/Manual.aux b/doc/Manual.aux new file mode 100644 index 0000000..062c02f --- /dev/null +++ b/doc/Manual.aux @@ -0,0 +1,12 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}Compiling}{1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Variables}{1}} +\newlabel{sec:var}{{2}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Variable Declaration}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Primitive Types}{1}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Functions}{2}} +\@writefile{toc}{\contentsline {section}{\numberline {4}Classes}{2}} +\@writefile{toc}{\contentsline {section}{\numberline {5}Templates}{2}} +\@writefile{toc}{\contentsline {section}{\numberline {6}Standard Library}{2}} +\@writefile{toc}{\contentsline {section}{\numberline {7}Understanding Kraken Errors}{2}} +\@writefile{toc}{\contentsline {section}{\numberline {8}Answers to Definitions}{2}} diff --git a/doc/Manual.log b/doc/Manual.log new file mode 100644 index 0000000..cac26ad --- /dev/null +++ b/doc/Manual.log @@ -0,0 +1,276 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Arch Linux) (preloaded format=pdflatex 2015.9.17) 18 OCT 2015 15:27 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**\nonstopmode \input{Manual.tex} +(./Manual.tex (/usr/share/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR) + +(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) +(/usr/share/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR) + +(/usr/share/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 1999/03/16 v1.09 sin cos tan (DPC) +) +(/usr/share/texmf-dist/tex/latex/latexconfig/graphics.cfg +File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live +) +Package graphics Info: Driver file: pdftex.def on input line 94. + +(/usr/share/texmf-dist/tex/latex/pdftex-def/pdftex.def +File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX + +(/usr/share/texmf-dist/tex/generic/oberdiek/infwarerr.sty +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +) +(/usr/share/texmf-dist/tex/generic/oberdiek/ltxcmds.sty +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +) +\Gread@gobject=\count87 +)) +\Gin@req@height=\dimen103 +\Gin@req@width=\dimen104 +) +(/usr/share/texmf-dist/tex/latex/amsmath/amsmath.sty +Package: amsmath 2013/01/14 v2.14 AMS math features +\@mathmargin=\skip43 + +For additional information on amsmath, use the `?' option. +(/usr/share/texmf-dist/tex/latex/amsmath/amstext.sty +Package: amstext 2000/06/29 v2.01 + +(/usr/share/texmf-dist/tex/latex/amsmath/amsgen.sty +File: amsgen.sty 1999/11/30 v2.0 +\@emptytoks=\toks15 +\ex@=\dimen105 +)) +(/usr/share/texmf-dist/tex/latex/amsmath/amsbsy.sty +Package: amsbsy 1999/11/29 v1.2d +\pmbraise@=\dimen106 +) +(/usr/share/texmf-dist/tex/latex/amsmath/amsopn.sty +Package: amsopn 1999/12/14 v2.01 operator names +) +\inf@bad=\count88 +LaTeX Info: Redefining \frac on input line 210. +\uproot@=\count89 +\leftroot@=\count90 +LaTeX Info: Redefining \overline on input line 306. +\classnum@=\count91 +\DOTSCASE@=\count92 +LaTeX Info: Redefining \ldots on input line 378. +LaTeX Info: Redefining \dots on input line 381. +LaTeX Info: Redefining \cdots on input line 466. +\Mathstrutbox@=\box26 +\strutbox@=\box27 +\big@size=\dimen107 +LaTeX Font Info: Redeclaring font encoding OML on input line 566. +LaTeX Font Info: Redeclaring font encoding OMS on input line 567. +\macc@depth=\count93 +\c@MaxMatrixCols=\count94 +\dotsspace@=\muskip10 +\c@parentequation=\count95 +\dspbrk@lvl=\count96 +\tag@help=\toks16 +\row@=\count97 +\column@=\count98 +\maxfields@=\count99 +\andhelp@=\toks17 +\eqnshift@=\dimen108 +\alignsep@=\dimen109 +\tagshift@=\dimen110 +\tagwidth@=\dimen111 +\totwidth@=\dimen112 +\lineht@=\dimen113 +\@envbody=\toks18 +\multlinegap=\skip44 +\multlinetaggap=\skip45 +\mathdisplay@stack=\toks19 +LaTeX Info: Redefining \[ on input line 2665. +LaTeX Info: Redefining \] on input line 2666. +) +(/usr/share/texmf-dist/tex/latex/psnfss/times.sty +Package: times 2005/04/12 PSNFSS-v9.2a (SPQR) +) +(/usr/share/texmf-dist/tex/latex/listings/listings.sty +\lst@mode=\count100 +\lst@gtempboxa=\box28 +\lst@token=\toks20 +\lst@length=\count101 +\lst@currlwidth=\dimen114 +\lst@column=\count102 +\lst@pos=\count103 +\lst@lostspace=\dimen115 +\lst@width=\dimen116 +\lst@newlines=\count104 +\lst@lineno=\count105 +\lst@maxwidth=\dimen117 + +(/usr/share/texmf-dist/tex/latex/listings/lstmisc.sty +File: lstmisc.sty 2015/06/04 1.6 (Carsten Heinz) +\c@lstnumber=\count106 +\lst@skipnumbers=\count107 +\lst@framebox=\box29 +) +(/usr/share/texmf-dist/tex/latex/listings/listings.cfg +File: listings.cfg 2015/06/04 1.6 listings configuration +)) +Package: listings 2015/06/04 1.6 (Carsten Heinz) + (./Manual.aux) +\openout1 = `Manual.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 28. +LaTeX Font Info: ... okay on input line 28. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 28. +LaTeX Font Info: ... okay on input line 28. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 28. +LaTeX Font Info: ... okay on input line 28. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 28. +LaTeX Font Info: ... okay on input line 28. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 28. +LaTeX Font Info: ... okay on input line 28. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 28. +LaTeX Font Info: ... okay on input line 28. +LaTeX Font Info: Try loading font information for OT1+ptm on input line 28. + +(/usr/share/texmf-dist/tex/latex/psnfss/ot1ptm.fd +File: ot1ptm.fd 2001/06/04 font definitions for OT1/ptm. +) +(/usr/share/texmf-dist/tex/context/base/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count108 +\scratchdimen=\dimen118 +\scratchbox=\box30 +\nofMPsegments=\count109 +\nofMParguments=\count110 +\everyMPshowfont=\toks21 +\MPscratchCnt=\count111 +\MPscratchDim=\dimen119 +\MPnumerator=\count112 +\makeMPintoPDFobject=\count113 +\everyMPtoPDFconversion=\toks22 +) (/usr/share/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty +Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO +) + +(/usr/share/texmf-dist/tex/generic/oberdiek/ifluatex.sty +Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +) +(/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty +Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) +Package ifpdf Info: pdfTeX in PDF mode is detected. +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +) +(/usr/share/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty +Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf + +(/usr/share/texmf-dist/tex/latex/oberdiek/grfext.sty +Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO) + +(/usr/share/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty +Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) +)) +(/usr/share/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) + +(/usr/share/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty +Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) + +(/usr/share/texmf-dist/tex/generic/oberdiek/etexcmds.sty +Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +))) +Package grfext Info: Graphics extension search list: +(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE +G,.JBIG2,.JB2,.eps] +(grfext) \AppendGraphicsExtensions on input line 452. + +(/usr/share/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv +e +)) +\c@lstlisting=\count114 +LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <14.4> not available +(Font) Font shape `OT1/ptm/b/n' tried instead on input line 35. +LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <12> not available +(Font) Font shape `OT1/ptm/b/n' tried instead on input line 68. + +(/usr/share/texmf-dist/tex/latex/listings/lstlang1.sty +File: lstlang1.sty 2015/06/04 1.6 listings language file +) +(/usr/share/texmf-dist/tex/latex/listings/lstlang1.sty +File: lstlang1.sty 2015/06/04 1.6 listings language file +) +(/usr/share/texmf-dist/tex/latex/listings/lstmisc.sty +File: lstmisc.sty 2015/06/04 1.6 (Carsten Heinz) +) +LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <10> not available +(Font) Font shape `OT1/ptm/b/n' tried instead on input line 70. +LaTeX Font Info: Try loading font information for OMS+ptm on input line 70. + +(/usr/share/texmf-dist/tex/latex/psnfss/omsptm.fd +File: omsptm.fd +) +LaTeX Font Info: Font shape `OMS/ptm/m/n' in size <10> not available +(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 70. +LaTeX Font Info: Try loading font information for OML+ptm on input line 71. + +(/usr/share/texmf-dist/tex/latex/psnfss/omlptm.fd +File: omlptm.fd +) +LaTeX Font Info: Font shape `OML/ptm/m/n' in size <10> not available +(Font) Font shape `OML/cmm/m/it' tried instead on input line 71. + [1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] (./Manual.aux) ) +Here is how much of TeX's memory you used: + 3541 strings out of 493089 + 48658 string characters out of 6140694 + 142499 words of memory out of 5000000 + 6978 multiletter control sequences out of 15000+600000 + 21052 words of font info for 45 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 39i,6n,60p,356b,1261s stack positions out of 5000i,500n,10000p,200000b,80000s +{/usr/ +share/texmf-dist/fonts/enc/dvips/base/8r.enc} +Output written on Manual.pdf (2 pages, 65177 bytes). +PDF statistics: + 36 PDF objects out of 1000 (max. 8388607) + 25 compressed objects within 1 object stream + 0 named destinations out of 1000 (max. 500000) + 1 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/doc/Manual.pdf b/doc/Manual.pdf new file mode 100644 index 0000000..6e9b203 Binary files /dev/null and b/doc/Manual.pdf differ diff --git a/doc/Manual.tex b/doc/Manual.tex new file mode 100644 index 0000000..ffe2a6a --- /dev/null +++ b/doc/Manual.tex @@ -0,0 +1,129 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Kraken Documentation +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +%---------------------------------------------------------------------------------------- +% PACKAGES AND DOCUMENT CONFIGURATIONS +%---------------------------------------------------------------------------------------- + +\documentclass{article} + +\usepackage{graphicx} % Required for the inclusion of images +\usepackage{amsmath} % Required for some math elements +\renewcommand{\labelenumi}{\alph{enumi}.} % Make numbering in the enumerate environment by letter rather than number (e.g. section 6) + +\usepackage{times} % Uncomment to use the Times New Roman font +\usepackage{listings} +%---------------------------------------------------------------------------------------- +% DOCUMENT INFORMATION +%---------------------------------------------------------------------------------------- + +\title{Kraken Programming Guide} % Title + +\author{Jack \textsc{Sparrow}} % Author name + +\date{\today} % Date for the report + +\begin{document} + +\maketitle % Insert the title, author and date + +%---------------------------------------------------------------------------------------- +% SECTION Compiling +%---------------------------------------------------------------------------------------- +\section{Compiling} + Kraken compilation currently only supports building the compiler from source. +You can clone the repository from a terminal using: + \begin{lstlisting} + git clone https://github.com/Limvot/kraken.git + \end{lstlisting} +Once you have the repository, run the following commands: + \begin{lstlisting} + mkdir build %Create a build directory + cd build + cmake .. %Requires cmake to build the compiler + make %Create the compiler executable + \end{lstlisting} +This will create a kraken executable, which is how we will call the compiler. +Kraken supports several ways of invoking the compiler. These include: + \begin{lstlisting} + kraken source.krak + kraken source.krak outputExe + kraken grammarFile.kgm source.krak outputExe + \end{lstlisting} +The grammar file is a file specific to the compiler, and should be included +in the github repository. When you run the compile command, a new directory +with the name of the outputExe you specified will be created. In this directory +is a shell script, which will compile the created C file into a binary executable. +This binary exectuable can then be run as a normal C executable. + +%---------------------------------------------------------------------------------------- +% SECTION Variables +%---------------------------------------------------------------------------------------- + +\section{Variables} +\label{sec:var} + +\subsection{Variable Declaration} + \begin{lstlisting}[language=C++] + int main(){ + std::cout << "Hello World" << std::endl; + return 0; + } + \end{lstlisting} +\subsection{Primitive Types} + primitive types +%---------------------------------------------------------------------------------------- +% SECTION 2: Functions +%---------------------------------------------------------------------------------------- + +\section{Functions} + Section func + +%---------------------------------------------------------------------------------------- +% SECTION Classes +%---------------------------------------------------------------------------------------- + +\section{Classes} + Section class +%---------------------------------------------------------------------------------------- +% SECTION Templates +%---------------------------------------------------------------------------------------- + +\section{Templates} + Section T +%---------------------------------------------------------------------------------------- +% SECTION Standard Library +%---------------------------------------------------------------------------------------- + +\section{Standard Library} + Section STL + +%---------------------------------------------------------------------------------------- +% SECTION Understanding Kraken Errors +%---------------------------------------------------------------------------------------- +\section{Understanding Kraken Errors} + Section error +%---------------------------------------------------------------------------------------- +% SECTION C Passthrough +%---------------------------------------------------------------------------------------- + +\section{Answers to Definitions} + +\begin{enumerate} +\begin{item} + Item 1 +\end{item} +\begin{item} +The \emph{units of atomic weight} are two-fold, with an identical numerical value. They are g/mole of atoms (or just g/mol) or amu/atom. +\end{item} +\begin{item} +\emph{Percentage discrepancy} between an accepted (literature) value and an experimental value is +\begin{equation*} + a = 4 +\end{equation*} +\end{item} +\end{enumerate} + +\end{document}