added new project

This commit is contained in:
Chris Nutter committed 2021-02-24 00:20:22 -08:00
1 parent 6e02fc4e7f
commit 90cfba2c6f
113 files changed
+974 -297

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 629 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.
+83
View File
@@ -0,0 +1,83 @@
\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{abstract}
\usepackage{hyperref}
\graphicspath{ {./images/} }
\renewcommand{\abstractname}{Timestamps}
\renewcommand{\absleftindent}{}
\renewcommand{\absparindent}{}
\title{CPSC 362 Lecture - poof}
\author{Chris Nutter\thanks{Dedicated to @QuesoGrande}}
% --> Kachow
\begin{document}
\maketitle
\begin{abstract}
{07:38:48 PM}\\
Okay so he's talking mainly about the project and how far along people are.
People tend to not be incredibly far only a handful of people have created an FSM.
He said he is considering adjusting the project depending on our
position and understanding of the project.
\\\\
07:48:16 PM\\
Now he is going back to talking about how to implement a DFSM into code.
He's sorta doing psuedo-code mentioned below. \emph{Figure 4}
\\\\
08:06:36 PM\\
Taking a break then going to go over non-deterministic FSM (and NFAs).
\\\\
08:13:54 PM\\
You can get 90\% on the project if you document a FSM and diagram it without code. FYI.
Basically 90\% for desired output, 100\% for intended FSM.
\\\\
08:48:38 PM\\
Basically he's been making corrolations between video game idles and NFSM. He also mentioned
that this will be useful for regexp next week.
\\\\
09:11:51 PM\\
Next time, we are converting NFSM to DFSM. So make sure to understand FSM. lol
\end{abstract}
\clearpage
\tableofcontents
\clearpage
\section{FSM Recap}
A finite-state machine (FSM) or finite-state automaton (FSA, plural: automata),
finite automaton, or simply a state machine, is a mathematical model of computation.
It is an abstract machine that can be in exactly one of a finite number of states at
any given time. The FSM can change from one state to another in response to some inputs;
the change from one state to another is called a transition.\\\\
[1] An FSM is defined by a list of its states, its initial state, and the inputs that trigger each transition.
Finite-state machines are of two types—deterministic finite-state machines and non-deterministic finite-state machines.\\\\
A deterministic finite-state machine can be constructed equivalent to any non-deterministic one.
\\\\
\begin{center}\fbox{\includegraphics[width=13cm]{fsm.png}}\end{center}
\section{Chapter 2.2 - Deterministic FSM}
\fbox{\includegraphics[width=14cm]{example-fsm-problem.png}}
\\\\
\fbox{\includegraphics[width=14cm]{implementation-of-dfsm.png}}
\\\\
\fbox{\includegraphics[width=14cm]{implementation-dfsm-w-code.png}}
\begin{center}\line(1,0){250}\end{center}
\section{Chapter 2.3 - Non-Deterministic FSM (NFSM)}
\fbox{\includegraphics[width=14cm]{nfsm.png}}
\\\\
\fbox{\includegraphics[width=14cm]{ex1-nfsm.png}}
\\\\
\fbox{\includegraphics[width=14cm]{nfsm-epsilon.png}}
\\\\
\fbox{\includegraphics[width=14cm]{ex2-nfsm.png}}
\clearpage
\end{document}
Binary file not shown.
+63
View File
@@ -0,0 +1,63 @@
\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{abstract}
\usepackage{hyperref}
\usepackage{listings}
%\usepackage{indentfirst} % Can be finicky. Use primarily for homework.
\usepackage{amssymb}
\graphicspath{ {./images/} }
\renewcommand{\abstractname}{\large{Timestamps}}
\setlength{\parindent}{0.5in}
\title{CPSC 323 - Lecture}
\author{Chris Nutter\thanks{Dedicated to @QuesoGrande a.k.a. Jared D.}}
% --> Here we go, satellite radio, y'all get hit with a...
\begin{document}
\maketitle
\begin{abstract}
\noindent
\begin{center}\textbf{09/17/2020 - 07:02:20 PM}\end{center}
Make sure to submit project by 09-29-2020 by \textbf{ALL} group members.
\end{abstract}
% --> First Chapter
\section{Lecture}
\begin{figure}[!htb]
\centering
\fbox{\includegraphics[width=13.5cm]{nfa-dfa.png}}
\caption{NFA to DFA Conversion}
\end{figure}
\begin{figure}[!htb]
\centering
\fbox{\includegraphics[width=13.5cm]{dfsm-difference.png}}
\caption{DFSM Differences}
\end{figure}
% --> Next Chapter
\end{document}
% Possibly Important LaTeX Functions %
% ================================== %
% \begin{figure}[!htb]
% \centering
% \fbox{\includegraphics[width=13.8cm]{big_o.png}}
% \caption{Big(O) Notation}
% \end{figure}
% \begin{lstlisting}[language=Python]
% print('hello world')
% \end{lstlisting}
Binary file not shown.
Binary file not shown.
+35
View File
@@ -0,0 +1,35 @@
\documentclass[12pt,a4paper]{article}
\usepackage{hyperref}
\usepackage{listings}
\renewcommand{\baselinestretch}{1.4}
\hypersetup {
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=blue,
}
% --> Here we go, satellite radio, y'all get hit with a...
\begin{document}
\obeylines
\begin{center}
\LARGE\textbf{\\Project \#1 | Lexical Analysis\\\large(Extra Credit)\\}
\end{center}
\normalsize
\noindent \\My Name: \textbf{Chris Nutter}
\noindent My Email: \textbf{cdnutter@csu.fullerton.edu}
\noindent My CWID: \textbf{893272518}
\noindent My Teammate: \textbf{Jared Dyreson}
\begin{center}\line(1,0){250}\end{center}
\noindent I have provided the current iteration of our GitHub project located \href{https://github.com/JaredDyreson/Diablo/tree/devbranch/lexical_analysis}{here} and also as a zip file attached to the upload. If you have any questions regarding this email me at the email above.
\end{document}
Binary file not shown.
+41
View File
@@ -0,0 +1,41 @@
#include <iostream>
#include <string>
#include <cmath>
#include <stdio.h>
#include <ctype.h>
#include <regex>
#include <vector>
#include <tuple>
void processLine();
int main(int argc, char* argv[]) {
processLine();
}
void processLine() {
const std::regex r("(!([^!]|!!)*!)");
std::smatch sm;
std::string id = "! Hello ! int value = 0;";
std::vector<std::tuple<int, int>> collection;
if (std::regex_search(id, sm, r)) {
for (unsigned long int i=1; i<sm.size()-1; i++) {
std::cout << id << std::endl;
unsigned long int start = sm.position(i);
unsigned long int end = start + sm.length(i);
//std::cout << "start: " << start << " end: " << end << std::endl << std::endl;
collection.push_back(std::make_tuple(start, end));
for (auto element : collection) {
auto [x, y] = element;
if (x < end || y < start) { std::cout << "nice" << std::endl; }
else { std::cout << "BAD" << std::endl; }
std::cout << x << " " << y << std::endl;
}
}
}
}