Where 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?
            Asked
            
        
        
            Active
            
        
            Viewed 313 times
        
    1
            
            
         
    
    
        Eminem
        
- 7,206
- 15
- 53
- 95
- 
                    Read the code: http://bellard.org/tcc/ – SK-logic May 16 '11 at 19:51
1 Answers
1
            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.
 
    
    
        Community
        
- 1
- 1
 
    
    
        Gilles 'SO- stop being evil'
        
- 104,111
- 38
- 209
- 254