<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Tiger on transcendental kyberautism</title>
    <link>https://vyorkin.org/categories/tiger/</link>
    <description>Recent content in Tiger on transcendental kyberautism</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 21 Sep 2019 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://vyorkin.org/categories/tiger/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Making of Tiger #6, Stack frames</title>
      <link>https://vyorkin.org/posts/making-of-tiger-6-stack-frames/</link>
      <pubDate>Sat, 21 Sep 2019 00:00:00 +0000</pubDate>
      <guid>https://vyorkin.org/posts/making-of-tiger-6-stack-frames/</guid>
      <description>&lt;h2 id=&#34;intro&#34;&gt;&#xA;  Intro&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#intro&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;In this post we&amp;rsquo;re going to add support for stack frames.&#xA;Here I&amp;rsquo;ve made some notes while reading the chapter 6 to make sure I&#xA;understand things clearly.&lt;/p&gt;&#xA;&lt;h3 id=&#34;stack&#34;&gt;&#xA;  Stack&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#stack&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h3&gt;&#xA;&lt;p&gt;A stack is a region of memory that grows downward and shrinks&#xA;upward (like icicles). The top of the stack is it&amp;rsquo;s &lt;code&gt;lowest&lt;/code&gt;&#xA;memory address. We treat stack as a big array, with a&#xA;special register &amp;ndash; the &lt;strong&gt;stack pointer (SP)&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Making of Tiger #3, Parsing</title>
      <link>https://vyorkin.org/posts/making-of-tiger-3-parsing/</link>
      <pubDate>Sun, 08 Sep 2019 00:00:00 +0000</pubDate>
      <guid>https://vyorkin.org/posts/making-of-tiger-3-parsing/</guid>
      <description>&lt;h2 id=&#34;intro&#34;&gt;&#xA;  Intro&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#intro&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;In this chapter we’re going to build a parser for our Tiger&#xA;language. First, let’s do a quick recap of some important&#xA;concepts of the theory behind programming language parsers:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Parser generator&lt;/strong&gt; is the most common type of&#xA;&lt;a href=&#34;https://en.wikipedia.org/wiki/Compiler-compiler&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;compiler-compiler’s&lt;/a&gt;. It takes some formal grammar (typically&#xA;it is a &lt;a href=&#34;https://en.wikipedia.org/wiki/Context-free_grammar&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;context-free grammar&lt;/a&gt; in &lt;a href=&#34;https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;BNF&lt;/a&gt; or &lt;a href=&#34;https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;EBNF&lt;/a&gt; form), that&#xA;defines a syntax of a programming language.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;tiger-grammar-with-menhir&#34;&gt;&#xA;  Tiger grammar with Menhir&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#tiger-grammar-with-menhir&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;While reading the current paragraph I highly recommend&#xA;consulting the &lt;strong&gt;Tiger Language Reference Manual&lt;/strong&gt; that has a&#xA;precise description (along with a BNF notation) of everything&#xA;we’re going to define below.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Making of Tiger #2, Lexical Analysis</title>
      <link>https://vyorkin.org/posts/making-of-tiger-2-lexical-analysis/</link>
      <pubDate>Fri, 23 Aug 2019 00:00:00 +0000</pubDate>
      <guid>https://vyorkin.org/posts/making-of-tiger-2-lexical-analysis/</guid>
      <description>&lt;h2 id=&#34;intro&#34;&gt;&#xA;  Intro&#xA;  &lt;a class=&#34;heading-link&#34; href=&#34;#intro&#34;&gt;&#xA;    &lt;i class=&#34;fa-solid fa-link&#34; aria-hidden=&#34;true&#34; title=&#34;Link to heading&#34;&gt;&lt;/i&gt;&#xA;    &lt;span class=&#34;sr-only&#34;&gt;Link to heading&lt;/span&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&#xA;&lt;p&gt;We need a way to translate a program written in one&#xA;(human-friendly) language to another (machine-specific)&#xA;language. Generally, this work is splitted into 2 parts:&#xA;&lt;strong&gt;analysis&lt;/strong&gt; and &lt;strong&gt;synthesis&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;strong&gt;synthesis&lt;/strong&gt;-part (back end) is responsible for the code&#xA;generation and optimizations.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Analysis&lt;/strong&gt;-part (front end) is responsible for breaking the&#xA;program apart to understand its structure and meaning. There are&#xA;3 commonly used &lt;strong&gt;analysis&lt;/strong&gt; phases:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Making of Tiger #1, Intro</title>
      <link>https://vyorkin.org/posts/making-of-tiger-1-intro/</link>
      <pubDate>Thu, 22 Aug 2019 00:00:00 +0000</pubDate>
      <guid>https://vyorkin.org/posts/making-of-tiger-1-intro/</guid>
      <description>&lt;p&gt;Recently I&amp;rsquo;ve started reading the book by &lt;a href=&#34;https://en.wikipedia.org/wiki/Andrew_Appel&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Andrew W. Appel&lt;/a&gt; titled &lt;a href=&#34;https://www.amazon.com/Modern-Compiler-Implement-Andrew-Appel/dp/0521607647&#34;  class=&#34;external-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Modern compiler&#xA;implementation in ML&lt;/a&gt;. I&amp;rsquo;ve picked it up because I&amp;rsquo;ve heard some really good&#xA;reviews about the ML version of it. Also there are other editions available that&#xA;use C and Java. Each chapter covers a single phase of the compilation process&#xA;and comes with some initial ML code and programming excercies. At the end you&#xA;will have a working optimizing compiler.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
