编译原理 Chapter1 Introduction 第一章 简介
2016-01-18 22:16
483 查看
本博客为博主阅读Alfred V. Aho 等所著 编译原理(英文版)过程中所记录的摘要;
Start date and time of this blog: Mon Jan 18, 2015 22:24
End date and time of this blog: to be updated
A software system for translating a program language into a form in which can be executed by a computer.
Two basic types of language translators:
(Why this picture is so big here on the CSDN page? It’s annoying. If you know why, plz comment bellow to help me get rid of this problem. Thx a lot.)
If a target program is generated, than we can feed the target program with inputs and it would not be long before target program creates outputs
However, an interpreter can usually give better error diagnostics than a compiler, because it executes the source program statement by statement.
A java source language program first be compiled into an intermediate form called bytecodes, which can then be interpreted by a virtual machine later. One of the advantages by doing this way is that the bytecodes can be reusable, which means you can interprete the bytecodes on any machines as long as they are installed with a java virtual machine, sometimes even through a network.
To speed up processing of inputs to outputs, some java compilers, called just-in-time compilers, translate the bytecodes into machine language immediately before they run the intermediate program to process the input.
Start date and time of this blog: Mon Jan 18, 2015 22:24
End date and time of this blog: to be updated
Main Part of this Blog
What is a compiler briefly?A software system for translating a program language into a form in which can be executed by a computer.
Two basic types of language translators:
1. Compiler:
A compiler translates the source language into an equivalent program, usually known as a target language. It is the compiler’s job to report any errors in the source program that it detects during the translation process.(Why this picture is so big here on the CSDN page? It’s annoying. If you know why, plz comment bellow to help me get rid of this problem. Thx a lot.)
If a target program is generated, than we can feed the target program with inputs and it would not be long before target program creates outputs
2. Interpreter:
Directly executes the operations specified in the source program on inputs supplied by the user, and gives out outputs.Contrasts:
The machine language target program produced by a compiler is usually much faster than an interpreter at mapping inputs to outputs.However, an interpreter can usually give better error diagnostics than a compiler, because it executes the source program statement by statement.
3. A hybrid type
Some translator combines compilation and interpretation in one system, such as Java language.A java source language program first be compiled into an intermediate form called bytecodes, which can then be interpreted by a virtual machine later. One of the advantages by doing this way is that the bytecodes can be reusable, which means you can interprete the bytecodes on any machines as long as they are installed with a java virtual machine, sometimes even through a network.
To speed up processing of inputs to outputs, some java compilers, called just-in-time compilers, translate the bytecodes into machine language immediately before they run the intermediate program to process the input.
相关文章推荐
- 使用Eclipse开发工具如何解决Java Compiler中Annotation Processin不出现的问题
- 解决“C compiler cannot create executables”的错误
- IntelliJ IDEA编译Android项目比Eclipse慢
- Error C3867解决方法
- 使用autoconf、automake进行外部编译
- Visual Web Developer 2005 速成版 生成DLL的问题
- assert 的两种用法
- Linux如何配置nVIDIA显卡驱动
- javascript的编写、调试
- 软件项目版本号的命名格式
- Tech memo of imx27 pdk (1) -- For kernel building on imx27 pdk with ltib
- 电子书籍下载网址
- C# 静态构造函数
- codeblock和C99标准
- boost链接库无法打开问题解决方法
- [转]New Features of C++0x
- java笔记
- ubuntu automake
- 利用pre-compiled headers技术以加速编译速度--以Borland C++ Builder为例(五)
- Project facet Java 1.8 is not supported by target runtime Apache Tomcat v8.0.