如何制作自己的自定义C编译器? [英] How do I make my own custom C compiler?

查看:160
本文介绍了如何制作自己的自定义C编译器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我觉得我对C和指针有点了解,呃。


同样,我想修复C .....而不是那么多制作C ++或Java或

C#甚至是D语言。


所以,如果我想制作我的自定义字样。 C编译器'与
当前的C99或ANSI C不同,我会从哪里开始?


谢谢。


Ok, I am think I am a little more knowledgeable about C and pointers, ughh.

And likewise, I want to fix C.....and not so much to make a C++ or Java or
C# or even D like language.

So, if I wanted to make my "custom" C compiler that''s different that the
current C99 or ANSI C, where would I start?

Thanks.


推荐答案

" smnoff" < rh的****** @ hotmail.com>写道:
"smnoff" <rh******@hotmail.com> writes:
好吧,我觉得我对C和指针有点了解,呃。
同样,我想修复C .....和与其说是制作C ++或Java或者C#甚至是D语言并非如此。
所以,如果我想制作我的自定义语言。 C编译器与'当前的C99或ANSI C不同,我将从哪里开始?
Ok, I am think I am a little more knowledgeable about C and pointers, ughh.
And likewise, I want to fix C.....and not so much to make a C++ or Java or
C# or even D like language.
So, if I wanted to make my "custom" C compiler that''s different that the
current C99 or ANSI C, where would I start?




作为从未编写过编译器的人,我建议:

(1)Red Dragon Book

(2)UNIX编译器构建简介,Axel T. Schreiner

和H.George Friedman,Jr。?它们将指导您完成smallC编译器的设计和实现。它是在1985年印刷的。

你可能仍然可以得到一份旧书。

-

无知,

Allan Adler< ar*@zurich.csail.mit.edu>

*免责声明:我是嘉宾,*不是麻省理工学院CSAIL的成员。我的行为和

*评论没有以任何方式反映在麻省理工学院。此外,我远在波士顿附近。



Speaking as someone who never wrote a compiler, I''d suggest:
(1) The Red Dragon Book
(2) Introduction to Compiler Construction with UNIX, by Axel T. Schreiner
and H.George Friedman, Jr.? They take you through the design and
implementation of a compiler for smallC. It was printed in 1985.
You might still be able to get a used copy.
--
Ignorantly,
Allan Adler <ar*@zurich.csail.mit.edu>
* Disclaimer: I am a guest and *not* a member of the MIT CSAIL. My actions and
* comments do not reflect in any way on MIT. Also, I am nowhere near Boston.


" smnoff" < rh的****** @ hotmail.com>写道:
"smnoff" <rh******@hotmail.com> writes:
好吧,我觉得我对C和指针有点了解,呃。

同样,我想修复C .....和与其说是制作C ++或Java或者C#,甚至是D语言。

所以,如果我想制作我的自定义语言。 C编译器与
当前的C99或ANSI C不同,我将从哪里开始?
Ok, I am think I am a little more knowledgeable about C and pointers, ughh.

And likewise, I want to fix C.....and not so much to make a C++ or Java or
C# or even D like language.

So, if I wanted to make my "custom" C compiler that''s different that the
current C99 or ANSI C, where would I start?




我将从现有的开放式开始源代码编译器,例如gcc或lcc。


-

Keith Thompson(The_Other_Keith) ks *** @ mib.org < http://www.ghoti.net/~kst>

圣地亚哥超级计算机中心< *> < http://users.sdsc.edu/~kst>

我们必须做点什么。这是事情。因此,我们必须这样做。



I''d start with an existing open-source compiler, such as gcc or lcc.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.




" smnoff" < rh的****** @ hotmail.com>在留言中写道

news:n7Nhg.5643

"smnoff" <rh******@hotmail.com> wrote in message
news:n7Nhg.5643


这篇关于如何制作自己的自定义C编译器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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