开发者

Understanding the inner workings of a programming language

Where 开发者_JS百科would be a good place to start learning the inner workings of a programming language like C?

Would it be learning how a parser/lexer works?


No, not really. Parsing is only a small part of the complexity of a language, and not the most interesting part. Typing (for C, not such a big part either), optimization, code generation: those are the bulk of the compiler.

The first step is to know the language well. Get a book such as The C Programming Language by Brian Kernighan and Dennis Ritchie (“K&R”). Do the exercises.

Then you may find it interesting to learn how a compiler works.

A good way of measuring your understanding of C is to read the standard. (This is not a tutorial!) See how much you understand. See if you understand why the standard does things the way it does.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜