1.lexical analysis,which analyzes the character string presented to it and divides it up into tokens that are legal members of the vocabulary of the language in which the program is written (and may produce error messages if the character string is not parseable into a string of legal tokens);

2.syntactic analysis or parsing,which processes the sequence of tokens and produces an intermediate-level representation,such as a parse  tree or a sequential intermediate code,and a symbol  table that records the identifiers used in the program  and their attibutes.

3.checking of the program for static-semantic validity(or semantic checking),which takes as input the intermediate code and symbol table and determines whether the program satisfiers  the staic-semantic properties required by the source language.

4.code generation,which transforms the intermediate code into equivalent machine code in the form of a relocatable object module or directly runnable object code.

1.詞法分析,它分析呈現給它的字符串,並將其劃分為令牌,這些令牌是編寫程序的語言詞彙的合法成員(如果字符串不能解析成字符串,則可能產生錯誤消息。一串合法代幣);

2.語法分析或解析,它處理令牌序列並產生中間級表示,例如解析樹或順序中間代碼,以及記錄程序中使用的標識符及其屬性的符號表。

3.檢查程序的靜態語義有效性(或語義檢查),它將中間代碼和符號表作為輸入,並確定程序是否滿足源語言所需的基本語義屬性。

4.代碼生成,它以可重定位目標模塊或直接可運行目標代碼的形式將中間代碼轉換為等效的機器代碼。

High-level structure of a simple compiler高級結構的簡單編譯器的更多相关文章

  1. 浏览器的主要构成High Level Structure

    浏览器的主要组件包括: 1.     用户界面- 包括地址栏.后退/前进按钮.书签目录等,也就是你所看到的除了用来显示你所请求页面的主窗口之外的其他部分 2.     浏览器引擎- 用来查询及操作渲染 ...

  2. day20 Python 高阶函数,函数,嵌套,闭包 装饰器

    高阶函数定义 1.函数接收的参数是一个函数名 2.函数的返回值是一个函数名 3.满足上述条件任意一个都可以称之为高阶函数 一.函数的接收参数是一个函数名 import time def foo(): ...

  3. Python复习笔记(四)高阶函数/返回函数/匿名函数/偏函数/装饰器

    一.map/reduce map map()函数接收两个参数,一个是函数,一个是Iterable,map将传入的函数依次 作用到序列的每个元素,并把结果作为新的Iterator返回. reduce r ...

  4. file_get_contents高級用法

    首先解決file_get_contents的超時問題,在超時返回錯誤後就象js中的settimeout那樣進行一次嘗試,錯誤超過3次或者5次後就確認為無法連線伺服器而徹底放棄.這裡就簡單介紹兩種解決方 ...

  5. css高級技巧

    1.鼠標顯示 a:小手cursor:pointer b:默認cursor:default c:勾選文本cursor:text d:拖動cursor:move 2.css三種佈局模型 a.流動模型(默認 ...

  6. VLC祥解

    功能部份:   VLC媒體播放器的核心是libvlc ,它提供了界面,應用處理功能,如播放列表管理,音頻和視頻解碼和輸出,線程系統.所有libvlc源文件設在的/src目錄及其子目錄:   # con ...

  7. [转] 編程風格要素-The Elements of Programming Style 中文英文中英對照

    转自: http://www.loliman3000.com/tech/2fe33ce32906f0302412881.php 下面的程序風格規則提煉自Brian Kernighan和P. J. Pl ...

  8. C/C++开发工具大比拼【转】

    C/C++开发工具大比拼[转]  (http://hi.baidu.com/vipdowndown/blog/item/dcd7c1b5ad3209ef30add167.html) * NetBean ...

  9. Universal Asynchronous Receiver/Transmitter

    USART簡介與特性 NRZ標準資料格式(Mark/Space) 半雙工/全雙工 Synchronous 同步傳輸 CLOCK SKEW Asynchronous 非同步傳輸 半/全雙工.同步/非同步 ...

随机推荐

  1. Excel两列查找重复值

    判断A列的值在B列是否存在,如果存在则输出“yes” 在C1单元格使用如下公式: =IF(COUNTIF(A:A,B2)>0,"yes","")

  2. Tell Me About Yourself Example 1

    Tell Me About Yourself Employers ask this question because they want to know you have the relevant e ...

  3. java基础-温故而知新(02)

    基本数据的自动拆装箱及享元设计模式 1.1 自动装箱        -128~127 之间的整数,装在一个内存区域.         超过这个范围的整数,装在不同的内存区域. 1.2 自动拆箱     ...

  4. ELK-elasticsearch-6.3.2插件【head,bigdesk,cerebro[kopf]】安装

    参考博客:linux下ElasticSearch.6.2.2集群安装与head.Kibana.X-Pack..插件的配置安装 参考博客:ELK5.5.1 插件安装实践纪要(head/bigdesk/k ...

  5. Numbers

    Encoding style, data structure, more content about the list, use the list as a stack, use the list a ...

  6. Luogu P3462 [POI2007]ODW-Weights

    题目描述 While moving to a new compound the Byteotian Institute of Experimental Physics has encountered ...

  7. WPFの获取任意元素的位置

    如果布局在Grid中: 方法一: //_stackPanel为子元素,_grid为父元素 Point point = _stackPanel.TranslatePoint(new Point(0, 0 ...

  8. python五十五课——calendar模块

    4.calendar模块: 构造:calendar(year,[w=2,l=1,c=6]):返回year年的完整的日历信息对象 和闰年相关的函数如下: isleap(year):判断year是否是闰年 ...

  9. swift class的缺省基类(SwiftObject)与内存模型

    Hard Constraints on Resilience The root of a class hierarchy must remain stable, at pain of invalida ...

  10. Hue添加Spark notebook

    参考自https://blogs.msdn.microsoft.com/pliu/2016/06/18/run-hue-spark-notebook-on-cloudera/ 说明 使用Clouder ...