From ba4f071b308604db0bce9c095b38f5629ec0cf77 Mon Sep 17 00:00:00 2001 From: "chris.sutcliffe" Date: Mon, 8 Nov 2021 13:05:33 +0000 Subject: add reference to bib for bnf form, add to table --- report/References.bib | 9 +++++++++ report/esoteric_project_report.tex | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'report') 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.tex b/report/esoteric_project_report.tex index a6f0079..e4b208d 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,8 @@ asdf \clearpage \chapter{BNF form} +\cite{davie1982recursive} talk about bnf form here + \begin{table}[h!] \begin{center} @@ -230,8 +234,11 @@ asdf & DO $<$expression$>$ $<$expression$>$ = $<$expression$>$, \\ & $<$expression$>$, $<$expression$>$ $<$statement$>$ continue \\ \hline - + CHARACTER ::= & any character in ascii table\\ + \hline + INTEGER ::= & 0\textbar1\textbar2\textbar3\textbar4\textbar5\textbar6\textbar7\textbar8\textbar9 \\ + \hline \end{tabular} \label{tab:table1} \caption{Grammar table for Fortran} -- cgit v1.2.3 From 4e9e9953e32be9232edc97df4238d1c939638cd1 Mon Sep 17 00:00:00 2001 From: Alfie Eagleton <67986414+TheAlfanator@users.noreply.github.com> Date: Mon, 8 Nov 2021 13:05:57 +0000 Subject: added to BNF yes --- report/esoteric_project_report.pdf | Bin 211738 -> 212373 bytes report/esoteric_project_report.tex | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'report') diff --git a/report/esoteric_project_report.pdf b/report/esoteric_project_report.pdf index 1261091..a27f989 100644 Binary files a/report/esoteric_project_report.pdf and b/report/esoteric_project_report.pdf differ diff --git a/report/esoteric_project_report.tex b/report/esoteric_project_report.tex index a6f0079..00fbab1 100644 --- a/report/esoteric_project_report.tex +++ b/report/esoteric_project_report.tex @@ -222,6 +222,20 @@ asdf & IF $|$ \\ & WHILE \\ \hline + $<$sequence$>$ ::= & $<$assignment$>$ $|$ $<$sequence$>$ $|$ \\ + & $<$clause$>$ $|$ $<$sequence$>$ $|$ \\ + &$<$empty$>$ \\ + \hline + $<$clause$>$ ::= & IF $|$ \\ + & DO $|$ \\ + & PRINT $|$ \\ + \hline + $<$assignment$>$ ::= & CHARACTER $|$ \\ + & LOGICAL $|$ \\ + & COMPLEX $|$ \\ + & REAL $|$ \\ + & INTEGER \\ + \hline IF ::= & IF $<$expression$>$ THEN $<$statement$>$ END IF $|$\\ & IF $<$expression$>$ THEN $<$statement$>$ ELSE $<$statement$>$ END IF \\ \hline @@ -230,7 +244,8 @@ asdf & DO $<$expression$>$ $<$expression$>$ = $<$expression$>$, \\ & $<$expression$>$, $<$expression$>$ $<$statement$>$ continue \\ \hline - + + \end{tabular} \label{tab:table1} -- cgit v1.2.3 From 5b68c981912b69d376da81ce221601b6ac976a6f Mon Sep 17 00:00:00 2001 From: Alfie Eagleton <67986414+TheAlfanator@users.noreply.github.com> Date: Mon, 8 Nov 2021 13:30:38 +0000 Subject: more updates --- report/esoteric_project_report.pdf | Bin 212373 -> 213989 bytes report/esoteric_project_report.tex | 20 +++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'report') diff --git a/report/esoteric_project_report.pdf b/report/esoteric_project_report.pdf index a27f989..4a9c351 100644 Binary files a/report/esoteric_project_report.pdf and b/report/esoteric_project_report.pdf differ diff --git a/report/esoteric_project_report.tex b/report/esoteric_project_report.tex index b3b83bb..39e40ab 100644 --- a/report/esoteric_project_report.tex +++ b/report/esoteric_project_report.tex @@ -222,6 +222,8 @@ asdf \hline \textbf{Abbreviation} & \textbf{Term}\\ \hline + $<$program$>$ ::= & $<$sequence$>$ \\ + \hline $<$statement$>$ ::= & $<$assignment$>$ $|$ \\ & IF $|$ \\ & WHILE \\ @@ -233,12 +235,20 @@ asdf $<$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 - $<$assignment$>$ ::= & CHARACTER $|$ \\ - & LOGICAL $|$ \\ - & COMPLEX $|$ \\ - & REAL $|$ \\ - & INTEGER \\ + 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 \\ -- cgit v1.2.3 From 914dc28aeb1545e7530d92daed5fd2ca402bdd67 Mon Sep 17 00:00:00 2001 From: "chris.sutcliffe" Date: Mon, 8 Nov 2021 13:48:41 +0000 Subject: add to bnf table --- report/esoteric_project_report.tex | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'report') diff --git a/report/esoteric_project_report.tex b/report/esoteric_project_report.tex index b3b83bb..d66a0f1 100644 --- a/report/esoteric_project_report.tex +++ b/report/esoteric_project_report.tex @@ -215,6 +215,7 @@ asdf \cite{davie1982recursive} talk about bnf form here + \begin{table}[h!] \begin{center} @@ -248,9 +249,29 @@ 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 \\ + \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} -- cgit v1.2.3 From bfe37a3570961ee3ddf29c291528649b1dbebe12 Mon Sep 17 00:00:00 2001 From: "chris.sutcliffe" Date: Mon, 8 Nov 2021 13:52:06 +0000 Subject: add complex to bnf table --- report/esoteric_project_report.pdf | Bin 213989 -> 202851 bytes report/esoteric_project_report.tex | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'report') diff --git a/report/esoteric_project_report.pdf b/report/esoteric_project_report.pdf index 4a9c351..edc2800 100644 Binary files a/report/esoteric_project_report.pdf and b/report/esoteric_project_report.pdf differ diff --git a/report/esoteric_project_report.tex b/report/esoteric_project_report.tex index cccd91d..f42a7a6 100644 --- a/report/esoteric_project_report.tex +++ b/report/esoteric_project_report.tex @@ -267,7 +267,7 @@ asdf LOGICAL ::= & TRUE\textbar FALSE \\ \hline - COMPLEX ::= & a combination of real and imaginary numbers \\ + COMPLEX ::= & a combination of real and imaginary numbers e.g. $3i$ where $i = \sqrt{-1}$\\ \hline REAL ::= & INTEGER\textbar RATIONAL\textbar IRRATIONAL\\ -- cgit v1.2.3