Several articles about compilation principles

Source: Internet
Author: User
Tags lexer

If you are a programmer who has never been in a computer lesson. like me, it must have been translated by various computer terms, what algorithms, and how they are compiled. after you have been renewed, you have bought an introduction to algorithms. The Tiger books go back, and the results are very hard. What is even harder is the books written by Chinese people, especially university textbooks, it's not your IQ problem.

As an ordinary application developer, I believe most people have not really completed the thick books. I always think that when you are in college, is such a person ill. when I graduated from college, I don't want to have fun. I stare at the screen in my office every day, but DIAO Si (I admit I am such a hacker ). even if I have been so careless and confused, I have never used it. when I was working on a project, I was still coding for a week, and I couldn't see any interface, so the boss was stunned: "What ?!, Why can't I see it now ?! "The function has not been added in two weeks, and the interface has not changed." What? What are you doing during this time? "

You won't believe what others say. If you don't use the compilation principle when writing js every day, you have to spend time to understand it. Then I recommend several articles, let's take a look at the so-called compilation principles. it saves you a little time to spend time with your family and exercise, so that when the technology is not prominent, the cervical spine is already prominent.

Create a Language Compiler for the. NET Framework

Http://msdn.microsoft.com/en-us/magazine/cc136756.aspx

If you are. NET Program ape, this article is prepared for you, this article uses C # To implement a simple language and finally generate the IL code. just print a dozen pages. the so-called lexical analysis (Lexer), the Syntax analyzer (Parser) generates the Abstract Syntax Tree AST (Abstract Syntax Tree), which is available at the compiler backend. what else do you need to know.

Let's Build a Compiler

Http://compilers.iecc.com/crenshaw/

It was written by Phd in physics. I was not long before I wrote these articles. it's just as easy to understand as it's about physics. the code is Pascal's. I am not very interested in reading the first article.

I have obviously had no chance in my life. I would not write a Mao compiler if I had the chance. Even the IronPython conversion is so short-lived, but I went to Hacker, there may still be a need to write a converter, so let's take a look at anlr. as long as you know a little about NBNF and write a grammar program, it will generate all your lexer and parser to generate java, python, and c.

Explore anlr

Http://dreamhead.blogbus.com/logs/10756716.html

Five minute introduction to anlr 3

Http://www.antlr.org/wiki/display/ANTLR3/Five+minute+introduction+to+ANTLR+3

OK. It's almost the same. I haven't had a full weekend off for a long time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.