编程语言和编译器 [英] Programming language and compiler

查看:146
本文介绍了编程语言和编译器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的朋友正在进行这次讨论,并意识到这可能是最好的问问这个问题的地方。

I was having this discussion with my friend and realized this might be the best place to ask this question ?

如何诞生一种新语言?这个新语言NEW必须用一些老语言写成OLD(例如C ++在C中初始化阶段),或者如何创建呢?
而且,如果没有编译器,这个语言NEW如何工作?那么,必须有一些编译器吗?谁编写了编译器?

How is a new language born ? This new language NEW must be written in some old language OLD (eg C++ was written in C in initial stages), or how is this created ?? And, how does this language NEW can work itself if there is no compiler for it ? So, there must be some compiler for it ? Who writes compiler for it ?

那么,这一切如何协同工作,新语言及其编译器,新语言与旧基本语言的关系?

So, how does all this work together, new language and its compiler, relation of new language with its old base language ?

推荐答案

您使用实现语言编写编译器,直到编译器开始编译足够的新语言来实现其余的新语言。

You write the compiler in an implementation language until such time that the compiler can begin to compile enough of the new language to be used to implement the rest of the new language.

这是它的工作原理。

编辑:为了澄清,评论者这个答案也是正确的。编译器不会用新语言编写,除非你想要。正如所说,有些不走这条路线,并保持原来的实现语言。

Just to clarify, the commentors on this answer are also correct. The compiler doesn't HAVE to be written in the new language unless you want to. As said, some don't go that route and stay with the original implementation language.

这篇关于编程语言和编译器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆