diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2021-11-08 14:24:43 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2021-11-08 14:24:43 +0000 |
commit | a12094123dcacee41a7472031db6fe6027b083a7 (patch) | |
tree | f9f01291a7e0992e6761451f26da79415ea41600 | |
parent | eba31c969bb289bb79f844a23acc1604825d05ff (diff) | |
parent | bfe37a3570961ee3ddf29c291528649b1dbebe12 (diff) | |
download | esotericFORTRAN-a12094123dcacee41a7472031db6fe6027b083a7.tar.gz esotericFORTRAN-a12094123dcacee41a7472031db6fe6027b083a7.zip |
Merge branch 'main' of https://github.com/AlfieEagleton/EsotericProject
-rw-r--r-- | report/References.bib | 9 | ||||
-rw-r--r-- | report/esoteric_project_report.pdf | bin | 211738 -> 202851 bytes | |||
-rw-r--r-- | report/esoteric_project_report.tex | 53 |
3 files changed, 61 insertions, 1 deletions
diff --git a/report/References.bib b/report/References.bib index 9b6ea82..a6c8964 100644 --- a/report/References.bib +++ b/report/References.bib @@ -126,5 +126,14 @@ keywords = {Fetal head molding, Delivery, Photographic method}, year = {1983} } + +@book{davie1982recursive, + title={Recursive descent compiling}, + author={Davie, JT and Morrison, Ronald}, + year={1982}, + publisher={John Wiley \& Sons, Inc.} +} + +
\ No newline at end of file diff --git a/report/esoteric_project_report.pdf b/report/esoteric_project_report.pdf Binary files differindex 1261091..edc2800 100644 --- a/report/esoteric_project_report.pdf +++ b/report/esoteric_project_report.pdf diff --git a/report/esoteric_project_report.tex b/report/esoteric_project_report.tex index a6f0079..f42a7a6 100644 --- a/report/esoteric_project_report.tex +++ b/report/esoteric_project_report.tex @@ -10,6 +10,8 @@ \newcommand{\la}{\leftarrow} \usepackage{algorithm} \usepackage{algorithmic} +\usepackage{amsmath} +\usepackage{mathtools} \topmargin = 0pt \voffset = -80pt \oddsidemargin = 15pt @@ -211,6 +213,9 @@ asdf \clearpage \chapter{BNF form} +\cite{davie1982recursive} talk about bnf form here + + \begin{table}[h!] \begin{center} @@ -218,10 +223,34 @@ asdf \hline \textbf{Abbreviation} & \textbf{Term}\\ \hline + $<$program$>$ ::= & $<$sequence$>$ \\ + \hline $<$statement$>$ ::= & $<$assignment$>$ $|$ \\ & IF $|$ \\ & WHILE \\ \hline + $<$sequence$>$ ::= & $<$assignment$>$ $|$ $<$sequence$>$ $|$ \\ + & $<$clause$>$ $|$ $<$sequence$>$ $|$ \\ + &$<$empty$>$ \\ + \hline + $<$clause$>$ ::= & IF $|$ \\ + & DO $|$ \\ + & PRINT $|$ \\ + & FUNCTION \textbar \\ + & SUBROUTINE \\ + \hline + $<$assignment$>$ ::= & CHARACTER $<$string$>$ = $<$expression$>$ $|$ \\ + & LOGICAL $<$string$>$ = $<$expression$>$ $|$ \\ + & COMPLEX $<$string$>$ = $<$expression$>$ $|$ \\ + & REAL $<$string$>$ = $<$expression$>$ $|$ \\ + & INTEGER $<$string$>$ = $<$expression$>$ \\ + \hline + PRINT ::= & PRINT format [ , output\textunderscore item\textunderscore list ] \\ + \hline + FUNCTION ::= & FUNCTION $<$string$>$ [ , output\textunderscore item\textunderscore list ] \\ + & $<$sequence$>$ \\ + & RETURN END FUNCTION \\ + \hline IF ::= & IF $<$expression$>$ THEN $<$statement$>$ END IF $|$\\ & IF $<$expression$>$ THEN $<$statement$>$ ELSE $<$statement$>$ END IF \\ \hline @@ -230,8 +259,30 @@ asdf & DO $<$expression$>$ $<$expression$>$ = $<$expression$>$, \\ & $<$expression$>$, $<$expression$>$ $<$statement$>$ continue \\ \hline - + + CHARACTER ::= & any character in ascii table\\ + \hline + + LOGICAL ::= & TRUE\textbar FALSE \\ + \hline + + COMPLEX ::= & a combination of real and imaginary numbers e.g. $3i$ where $i = \sqrt{-1}$\\ + \hline + + REAL ::= & INTEGER\textbar RATIONAL\textbar IRRATIONAL\\ + \hline + + RATIONAL :: = & any fractional number e.g. 1/3 or 0.333 \\ + \hline + + IRRATIONAL ::= & $\pi$ \textbar $\sqrt{2} $ etc. \\ + \hline + + + INTEGER ::= & 0\textbar1\textbar2\textbar3\textbar4\textbar5\textbar6\textbar7\textbar8\textbar9 \\ + + \hline \end{tabular} \label{tab:table1} \caption{Grammar table for Fortran} |