<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title> - Kaleidoscope</title>
    <link rel="self" type="application/atom+xml" href="https://tangyingpeng.cn/tags/kaleidoscope/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://tangyingpeng.cn/"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-07-03T00:00:00+00:00</updated>
    <id>https://tangyingpeng.cn/tags/kaleidoscope/atom.xml</id>
    <entry xml:lang="en">
        <title>Kaleidoscope-day1</title>
        <published>2026-07-03T00:00:00+00:00</published>
        <updated>2026-07-03T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Unknown
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://tangyingpeng.cn/posts/kaleidoscope-day1/"/>
        <id>https://tangyingpeng.cn/posts/kaleidoscope-day1/</id>
        
        <content type="html" xml:base="https://tangyingpeng.cn/posts/kaleidoscope-day1/">&lt;p&gt;阅读了Kaleidoscope llvm教程的第一二章，大概初步了解了语言的部分词法和语法定义。&lt;&#x2F;p&gt;
&lt;p&gt;总结一下, 不完整的定义：&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color: #CDD6F4; background-color: #1E1E2E;&quot;&gt;&lt;code data-lang=&quot;plain&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;S: definition | external | expr | &amp;#39;;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;definition: &amp;#39;def&amp;#39; prototype expr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;external: &amp;#39;extern&amp;#39; prototype &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;prototype: IDENTIFIER &amp;#39;(&amp;#39; IDENTIFIER? (&amp;#39;,&amp;#39; IDENTIFIER)* &amp;#39;)&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;expr: primary | binaryExpr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;primary: NUMBER | &amp;#39;(&amp;#39; expr &amp;#39;)&amp;#39; | IDENTIFIER (&amp;#39;(&amp;#39; expr? (&amp;#39;,&amp;#39; expr)* &amp;#39;)&amp;#39;)?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;binaryExpr: primary ops expr&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;IDENTIFIER:  LETTER (LETTER | DIGIT)*&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;NUMBER: DIGIT+  ( &amp;#39;.&amp;#39; DIGIT+)?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;LETTER:  [a-zA-Z_]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;DIGIT: [0-9]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;</content>
        
    </entry>
</feed>
