Repository navigation
Expand file tree
/
Copy pathNewLanguageDesign.html
More file actions
46 lines (40 loc) · 1.59 KB
/
Copy pathNewLanguageDesign.html
File metadata and controls
46 lines (40 loc) · 1.59 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="img/favicon.ico">
<title>Language Design</title>
</head>
<body>
<h1>Notes on a new language design</h1>
<h3>Resources</h3>
<ul>
<li> <a href="http://spw15.langsec.org/papers/couprie-nom.pdf"> Parser in Rust </a></li>
<li><a href="http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf">An Incremental Approach to Compiler Construction</a> </li>
<li><a href="http://www.diku.dk/~torbenm/Basics/">Basics of Compiler Design</a></li>
<li><a href="http://www.cs.man.ac.uk/~pjj/farrell/compmain.html">Compiler Basics</a></li>
<li><a href="http://rads.stackoverflow.com/amzn/click/0201403536">Compiler Construction</a> </li>
</ul>
<h3>Compiler Phases</h3>
<p>
Structures - Symbol Table, Syntax Tree,Intermediate Representation
Other parts - preprocessors, assemblers,loaders and link editors
Language = syntax + semantics.
To specify syntax - CFG or BNF, for semantics - more difficult - informal description
</p>
<h3>Context Free Grammars</h3>
4 Components :
<ul>
<li>set of non terminals</li>
<li>set of tokens - terminal symbols</li>
<li>set of productions</li>
<li>a designation of one of the non terminals as the start symbol.</li>
</ul>
<h3>Type System</h3>
Requirements - associate with each value, a type
Has a set of base types, a method for determining equivalence and rules for inferring type
May use an attribute grammar