-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprelim-impl-lang.html
More file actions
145 lines (130 loc) · 6.71 KB
/
prelim-impl-lang.html
File metadata and controls
145 lines (130 loc) · 6.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<title>Compiler Implementation Language — Compiler Programming</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="_static/agogo.css" />
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="The EeZee Programming Language" href="ez-lang.html" />
<link rel="prev" title="Welcome to Compiler Programming!" href="index.html" />
</head><body>
<div class="header-wrapper" role="banner">
<div class="header">
<div class="headertitle"><a
href="index.html">Compiler Programming</a></div>
<div class="rel" role="navigation" aria-label="related navigation">
<a href="index.html" title="Welcome to Compiler Programming!"
accesskey="P">previous</a> |
<a href="ez-lang.html" title="The EeZee Programming Language"
accesskey="N">next</a> |
<a href="genindex.html" title="General Index"
accesskey="I">index</a>
</div>
</div>
</div>
<div class="content-wrapper">
<div class="content">
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="compiler-implementation-language">
<h1>Compiler Implementation Language<a class="headerlink" href="#compiler-implementation-language" title="Permalink to this headline">¶</a></h1>
<p>A compiler can be implemented in any language we choose. For a pedagogical project it is more convenient
to choose a language that is widely used, has garbage collection, and comes with excellent tools such
as IDEs and Debuggers.</p>
<p>Production quality compilers are often written in C, C++ or Rust. For us these languages are too difficult
to work with.</p>
<p>Lisp and Python appear to be popular languages in teaching projects. Lisp is not as widely used
as we would like our implementation language to be, and dynamically typed languages such as Python are
harder to work with as the project grows.</p>
<p>Compared to C, C++ and Rust, the programming language D appears to be much more suitable for this project,
from a technical standpoint, that is. It is a garbage collection language that has less friction and is pleasant to
work with. The main negatives are that it is not a popular language, and the tooling is not up to
the standards of other languages.</p>
<p>Go, Java, Kotlin, Swift and C# seem like good candidates. Java has some limitations that make it harder to write memory optimized
code that is often necessary in a production compiler, but we don’t care so much about that.</p>
<p>I decided to use Java because it is the language I am most familar with, has great tooling, and despite some
short comings, is widely understood by developers around the world. My first choice would have been D if it was
purely a question of technical preference.</p>
<p>The use of Java biases the implementation towards using some Object Orientation; this is just a consequence of the
most comfortable way of expressing some designs in Java.</p>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
</div>
<div class="sidebar">
<h3>Table of Contents</h3>
<p class="caption" role="heading"><span class="caption-text">Preliminaries</span></p>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="#">Compiler Implementation Language</a></li>
<li class="toctree-l1"><a class="reference internal" href="ez-lang.html">The EeZee Programming Language</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Parsing Techniques</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="lexical-analysis.html">Lexical Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="syntax-analysis.html">Syntax Analysis</a></li>
<li class="toctree-l1"><a class="reference internal" href="abstract-syntax-tree.html">Abstract Syntax Tree</a></li>
<li class="toctree-l1"><a class="reference internal" href="type-systems.html">Type Systems</a></li>
<li class="toctree-l1"><a class="reference internal" href="semantic-analysis.html">Semantic Analysis</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Backend Basics</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="intermediate-representations.html">Intermediate Representations</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Learning Resources</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="learning-resources.html">Learning Resources</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Reviews</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="compiler-books.html">Compiler Books</a></li>
</ul>
<div role="search">
<h3 style="margin-top: 1.5em;">Search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
<div class="footer-wrapper">
<div class="footer">
<div class="left">
<div role="navigation" aria-label="related navigaton">
<a href="index.html" title="Welcome to Compiler Programming!"
>previous</a> |
<a href="ez-lang.html" title="The EeZee Programming Language"
>next</a> |
<a href="genindex.html" title="General Index"
>index</a>
</div>
<div role="note" aria-label="source link">
<br/>
<a href="_sources/prelim-impl-lang.rst.txt"
rel="nofollow">Show Source</a>
</div>
</div>
<div class="right">
<div class="footer" role="contentinfo">
© Copyright 2024, Dibyendu Majumdar.
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.3.2.
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</body>
</html>