Files
CSC110/A-python-builtins/05-syntax-diagrams.html
Hykilpikonna 6fffdf686a deploy
2021-12-07 22:28:01 -05:00

117 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>A.5 Python Syntax Diagrams</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
</style>
<link rel="stylesheet" href="../tufte.css" />
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<div style="display:none">
\(
\newcommand{\NOT}{\neg}
\newcommand{\AND}{\wedge}
\newcommand{\OR}{\vee}
\newcommand{\XOR}{\oplus}
\newcommand{\IMP}{\Rightarrow}
\newcommand{\IFF}{\Leftrightarrow}
\newcommand{\TRUE}{\text{True}\xspace}
\newcommand{\FALSE}{\text{False}\xspace}
\newcommand{\IN}{\,{\in}\,}
\newcommand{\NOTIN}{\,{\notin}\,}
\newcommand{\TO}{\rightarrow}
\newcommand{\DIV}{\mid}
\newcommand{\NDIV}{\nmid}
\newcommand{\MOD}[1]{\pmod{#1}}
\newcommand{\MODS}[1]{\ (\text{mod}\ #1)}
\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\newcommand{\C}{\mathbb C}
\newcommand{\cA}{\mathcal A}
\newcommand{\cB}{\mathcal B}
\newcommand{\cC}{\mathcal C}
\newcommand{\cD}{\mathcal D}
\newcommand{\cE}{\mathcal E}
\newcommand{\cF}{\mathcal F}
\newcommand{\cG}{\mathcal G}
\newcommand{\cH}{\mathcal H}
\newcommand{\cI}{\mathcal I}
\newcommand{\cJ}{\mathcal J}
\newcommand{\cL}{\mathcal L}
\newcommand{\cK}{\mathcal K}
\newcommand{\cN}{\mathcal N}
\newcommand{\cO}{\mathcal O}
\newcommand{\cP}{\mathcal P}
\newcommand{\cQ}{\mathcal Q}
\newcommand{\cS}{\mathcal S}
\newcommand{\cT}{\mathcal T}
\newcommand{\cV}{\mathcal V}
\newcommand{\cW}{\mathcal W}
\newcommand{\cZ}{\mathcal Z}
\newcommand{\emp}{\emptyset}
\newcommand{\bs}{\backslash}
\newcommand{\floor}[1]{\left \lfloor #1 \right \rfloor}
\newcommand{\ceil}[1]{\left \lceil #1 \right \rceil}
\newcommand{\abs}[1]{\left | #1 \right |}
\newcommand{\xspace}{}
\newcommand{\proofheader}[1]{\underline{\textbf{#1}}}
\)
</div>
<header id="title-block-header">
<h1 class="title">A.5 Python Syntax Diagrams</h1>
</header>
<section>
<h2 id="literals">Literals</h2>
<p><img src="images/literals_diagram.png" alt="Literals diagram" /><br />
</p>
<h2 id="comprehensions">Comprehensions</h2>
<p><img src="images/comprehensions_diagram.png" alt="Comprehensions diagram" /><br />
</p>
<h2 id="assignment-statements">Assignment statements</h2>
<p><img src="images/assignment_statement_diagram.png" alt="Assignment statement diagram" /><br />
</p>
<h2 id="function-definitions">Function definitions</h2>
<p><img src="images/function_definition_diagram.png" alt="Function definition diagram" /><br />
</p>
<h2 id="data-class-definitions">Data class definitions</h2>
<p><img src="images/data_class_diagram.png" alt="Data class definition diagram" /><br />
</p>
<h2 id="if-statements">If statements</h2>
<p><img src="images/if_statement_diagram.png" alt="If statement diagram" /><br />
</p>
<h2 id="for-loop-statements">For loop statements</h2>
<p><img src="images/for_loop_diagram.png" alt="For loop statement diagram" /><br />
</p>
<h2 id="while-loop-statements">While loop statements</h2>
<p><img src="images/while_loop_diagram.png" alt="While loop statement diagram" /><br />
</p>
<h2 id="import-statements">Import statements</h2>
<p><img src="images/import_statement_diagram.png" alt="Import statement diagram" /><br />
</p>
<h2 id="raise-statements">Raise statements</h2>
<p><img src="images/raise_diagram.png" alt="Raise statement diagram" /><br />
</p>
<h2 id="try-except-statements">Try-except statements</h2>
<p><img src="images/try_except_diagram.png" alt="Try-except statement diagram" /><br />
</p>
</section>
<footer>
<a href="https://www.teach.cs.toronto.edu/~csc110y/fall/notes/">CSC110 Course Notes Home</a>
</footer>
</body>
</html>