yeye
parent
44c6bdcf57
commit
5a1698b3cc
Binary file not shown.
After Width: | Height: | Size: 379 KiB |
Binary file not shown.
After Width: | Height: | Size: 267 KiB |
Binary file not shown.
Binary file not shown.
|
@ -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.
|
@ -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.
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
|
@ -0,0 +1,53 @@
|
||||||
|
\documentclass[12pt,a4paper]{article}
|
||||||
|
|
||||||
|
\usepackage{graphicx}
|
||||||
|
\usepackage{abstract}
|
||||||
|
\usepackage{hyperref}
|
||||||
|
\usepackage{listings}
|
||||||
|
\usepackage{indentfirst}
|
||||||
|
\usepackage{amssymb}
|
||||||
|
|
||||||
|
\graphicspath{ {./images/} }
|
||||||
|
\renewcommand{\abstractname}{\large{Timestamps}}
|
||||||
|
|
||||||
|
\setlength{\parindent}{0.5in}
|
||||||
|
|
||||||
|
\title{\Large{CPSC 362}\\\LARGE\textbf{{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/19/2020 - 09:51:24 AM}\end{center}
|
||||||
|
She skipped me for the questioning. Hopefully I get marked in class.
|
||||||
|
\end{abstract}
|
||||||
|
|
||||||
|
\tableofcontents
|
||||||
|
|
||||||
|
% --> First Chapter
|
||||||
|
|
||||||
|
\section{Chapter 2}
|
||||||
|
\begin{center}\line(1,0){250}\end{center}
|
||||||
|
|
||||||
|
% --> Next Chapter
|
||||||
|
|
||||||
|
\end{document}
|
||||||
|
|
||||||
|
% Possibly Important LaTeX Functions %
|
||||||
|
% ================================== %
|
||||||
|
|
||||||
|
% \begin{figure}[hbtp]
|
||||||
|
% \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.
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
@ -4,7 +4,7 @@
|
||||||
\usepackage{abstract}
|
\usepackage{abstract}
|
||||||
\usepackage{hyperref}
|
\usepackage{hyperref}
|
||||||
\usepackage{listings}
|
\usepackage{listings}
|
||||||
%\usepackage{indentfirst} % Can be finicky. Use primarily for homework.
|
\usepackage{indentfirst}
|
||||||
\usepackage{amssymb}
|
\usepackage{amssymb}
|
||||||
|
|
||||||
\graphicspath{ {./images/} }
|
\graphicspath{ {./images/} }
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
% Possibly Important LaTeX Functions %
|
% Possibly Important LaTeX Functions %
|
||||||
% ================================== %
|
% ================================== %
|
||||||
|
|
||||||
% \begin{figure}[!htb]
|
% \begin{figure}[hbtp]
|
||||||
% \centering
|
% \centering
|
||||||
% \fbox{\includegraphics[width=13.8cm]{big_o.png}}
|
% \fbox{\includegraphics[width=13.8cm]{big_o.png}}
|
||||||
% \caption{Big(O) Notation}
|
% \caption{Big(O) Notation}
|
||||||
|
|
Loading…
Reference in New Issue