Beginner compiling principle, Saga.

Source: Internet
Author: User

About one months of time, has been learning the principle of compiling, until May 31 I still look at the compilation principle of video tutorial, but I directly in fact, I have a lot of knowledge of the lack of, for example, I have no way to parse the abstract syntax tree into the assembly code or Java bytecode, Because it's a whole new field for me, and I know I'm going to have a compiler course for 4, and I've been using Java to write compilers, a very important reason is that my C language level is not enough to support me in a more complex area, so I feel like it's time to put the compilation principle in place. , recall this period of learning, the process I deeply realized that the algorithm is more directly the importance of mathematics in computer learning, while compiling the principle of learning, although just about to learn a bit of knowledge of the front end, the realization of a language can not be counted as a language, I did not even complete the regular expression parser, But I still feel great harvest, this time put down the principle of compiling, is to better continue after. Here are some summaries of the current phase of learning.

Front:

    1. Lexer's words are mainly the transfer of state between the various automata, according to the lexical design of the language (here is usually described by regular expressions) rules will be the character flow into a string of tokens. Methods there are two types of hand-and lexical analyzer generators: I've already implemented it because of my hand, and I want to be able to complete my own parser builder in the next stage of learning how to compile.
    2. Parser the first complement is of course the completion of the language of the CFG, and then according to the CFG manual recursive descent or the parser generator to complete the grammar check, the generation of AST: Recursive drop I also completed, the next stage also want to complete their own lexical analyzer generator.
    3. The third stage is the last stage of my study, that is, the type check and code generation phase, at this stage I just implemented a simple stack of computer interpreter to explain their own production of the stack bytecode, even functions are not supported, while not nested and so on, The next stage is to achieve a more mature target code or a direct X86,java byte code.

Today is June 9, the blog I stopped for 10 days, the 10 days broken more than two reasons, the first is because I bought an alien, just went to college when I was afraid of myself like high school addicted to the game so freshman came to school to buy is MBP, so I have been programming learning has been using MBP, Recently also want to experience the feeling of windows, so bought a Taiwan top with aliens, can only say a variety of not accustomed to, there is no way to program on Windows, but write blog this open live writer really very good ah, another spit slot this alien is really great heavy ah, This charger is really a block of bricks. Another reason is that I am reading a book called "Linux C programming One-stop learning", I read the first part of the book and the second part, although the last semester to learn C (I accept the 3-year undergraduate English undergraduate system, I first studied the language for a year, so now is a sophomore, I formally learn to program a year), C language, but also I contact the first programming language, although I think of c language learning than students have to solid, but actually know my C language level is still far from enough, so I decided to pick up and consolidate C language, this 10 days I swallowed to read the first two stages, there are before the foundation of Learning, A lot of content for me is not unfamiliar, for me the difficulty lies in the x86 assembly, and linker, loader and other Linux toolchain. So after this period of time I will try to use C language, at the same time in order to learn the assembly I decided to start again to see the book-"in-depth understanding of computer systems", this book I have only read the previous chapters, the feeling harvest quite abundant, now also want to start again to see, see "Long Book Learn compiling principle" this series, , actually see is video, dragon book Words I also bought, but really is if you do not understand, I still suggest from the video start, otherwise also can not read dragon book ... At the same time this is the first series I began to record the blog, the next one of the series of the name I have been thinking about reading Csapp, mainly to csapp this book mainly, of course, may also include some C language small projects and the like. So from tomorrow onwards to continue to update the blog ...

Beginner compiling principle, Saga.

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.