2018-02-23 18:58:03 +00:00
|
|
|
|
---
|
|
|
|
|
created_at: '2017-08-25T07:46:38.000Z'
|
|
|
|
|
title: How to Write Your Own Compiler (2009)
|
|
|
|
|
url: http://staff.polito.it/silvano.rivoira/HowToWriteYourOwnCompiler.htm
|
|
|
|
|
author: yinso
|
|
|
|
|
points: 246
|
|
|
|
|
story_text:
|
|
|
|
|
comment_text:
|
|
|
|
|
num_comments: 42
|
|
|
|
|
story_id:
|
|
|
|
|
story_title:
|
|
|
|
|
story_url:
|
|
|
|
|
parent_id:
|
|
|
|
|
created_at_i: 1503647198
|
|
|
|
|
_tags:
|
|
|
|
|
- story
|
|
|
|
|
- author_yinso
|
|
|
|
|
- story_15096881
|
|
|
|
|
objectID: '15096881'
|
|
|
|
|
|
|
|
|
|
---
|
2018-02-23 18:19:40 +00:00
|
|
|
|
[Source](http://staff.polito.it/silvano.rivoira/HowToWriteYourOwnCompiler.htm "Permalink to Table of Contents")
|
|
|
|
|
|
|
|
|
|
# Table of Contents
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ----- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
How to write your own compiler
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[Silvano Rivoira][1], Politecnico di Torino, 2009
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table of Contents
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1\. [Introduction][2]
|
|
|
|
|
|
|
|
|
|
2\. [Source language][3]
|
|
|
|
|
|
|
|
|
|
3\. [Lexical analysis][4]
|
|
|
|
|
|
|
|
|
|
4\. [Parsing][5]
|
|
|
|
|
|
|
|
|
|
5\. [Error handling][6]
|
|
|
|
|
|
|
|
|
|
6\. [Symbol table][7]
|
|
|
|
|
|
|
|
|
|
7\. [Types][8]
|
|
|
|
|
|
|
|
|
|
8\. [Type checking][9]
|
|
|
|
|
|
|
|
|
|
9\. [Code generation][10]
|
|
|
|
|
|
|
|
|
|
10\. [Object oriented code generation][11]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
previous [ToC][12] [next][2]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
![][13]![][14]![][15]![][16]
|
|
|
|
|
|
|
|
|
|
[1]: http://staff.polito.it/silvano.rivoira/
|
|
|
|
|
[2]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page298.htm
|
|
|
|
|
[3]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page348.htm
|
|
|
|
|
[4]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page359.htm
|
|
|
|
|
[5]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page370.htm
|
|
|
|
|
[6]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page381.htm
|
|
|
|
|
[7]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page392.htm
|
|
|
|
|
[8]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page403.htm
|
|
|
|
|
[9]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page414.htm
|
|
|
|
|
[10]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page425.htm
|
|
|
|
|
[11]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/Page322.htm
|
|
|
|
|
[12]: HowToWriteYourOwnCompiler.htm
|
|
|
|
|
[13]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/image3831.gif
|
|
|
|
|
[14]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/image3941.gif
|
|
|
|
|
[15]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/image4051.gif
|
|
|
|
|
[16]: http://staff.polito.it/HowToWriteYourOwnCompiler_file/image4161.gif
|
|
|
|
|
|