非常简单的编译器 [英] very simple compiler

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

问题描述

你好,

我想编写一个非常简单的编译器.

如何找到一个简单的开源编译器,以便可以学习编写编译器?

谢谢

Hello,

I want to write a very simple compiler.

How can I find a simple open source compiler so that I can learn about writing a compiler?

Thanks

推荐答案

如何操作:开放源代码Visual Basic.Net编译器 [^ ]

对于其他/更多: ^ ]
How about this: Open Source Visual Basic.Net Compiler[^]

For other/more: Google Search result[^]


请同时考虑以下工具:

ANTLR [ ^ ]

下载站点上有一个C#版本:

ANTLR下载 [ ProGrammar [ ^ ]


该工具非常适合小型DSL或较大的语言.但是,它确实需要研究文档和样本.以前看过语法规范也将派上用场.

最好的问候,
Manfred
Please take also this tool into consideration:

ANTLR[^]

There is a C# version available on the download site:

ANTLR download[^]

Caution commercial product: This one is pretty easy to handle even for beginners. My sister could do it and she isn''t even a programmer/developer:
ProGrammar[^]


This tool is great for small DSLs or also for bigger languages. It does however take a bit of studying the documentation and the samples. Having seen a grammar specification before would also come in handy.

Best regards,
Manfred


您可以先查看 http://www.antlr.org/ [ ^ ]



http://boost-spirit.com/home/ [
You can start by looking at http://www.antlr.org/[^]

and

http://boost-spirit.com/home/[^]

Antlr is a parser generator, with lots of extra goodies. Generates code for java, c#, c, and other programming laguages.

boost spirit allows you to define your parser directly in C++, using constructs that closely resembles Extended Backus–Naur Form.

compilation involves parsing as the first step towards code generation.

parse programming language, possibly optimize, generate machine code - or possibly other stuff ...

Regards
Espen Harlinn


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

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