WONKY



LOG | FILES | OVERVIEW



                                                                                                                                                                         
                                                                                                                                                                         
                                                                                                                                                                         
                                                                                                                                                                         
                                                                                                                                                                         
                                                                                                                                                                         
                                                                                                                                                                         
                                                                                                                                                                         
                                                                                                                                                                         
                                                                                                                                                                         
            <chonky>---------------------------<defined macro in preprocessing directive>                                                                                
                |                                                                                                                                                        
         <Map of all ids>                                                                                                                                            
          |            |                                                                                                                                                  
    Pointer to macro   |                                                                                                                                                 
                       |                                                                                                                                                 
                  Id number the translation                                                                                                                              
                  unit that the macro was                                                                                                                                
                  last defined                                                                                                                                           
                                                                                                                                                                         
                                                                                                                                                                         
                                       |                                                                                                                                 
                                       |                                                                                                                                 
                                       |                                                                                                                                 
                                       |                                                                                                                                 
                                       |                                                                                                                                 
                                       |                                                                                                                                 
                                       |                                                                                                                                 
                                       |                  += ID                                                                                                          
                                       |                  |                                                                                                              
                                       +---------<Macro Map>                                                                                                             
                                       |                  |                                                                                                              
                                       |                  += token ( with the macro token type )                                                                         
                                       |                                                                                                                                 
       pushing tokens                  |                                gets stored in
lexing ----------------> <Preprocessing Translation Unit> ----------------------------> <Source Map>
                            ^           |                                                |       |                     
                            |           |                                         -------+       +------> <Preprocessing Translation Unit>               
                            |           |                                         |                                   
                            |           |                                         V                                   
                            |           |                             V                                               
                            |           |                       included as                                           
                            |           |           (the string used to include the file)                             
                            |           | ( or if specified on command line then there must be some indication of that)
                            |           |                                                                             
                            |           |                                                                             
                            |           |                                                                             
            +---------------+           |                                                                             
            |               |           |                                                                             
            |               |           |                                                                             
            |         if we meet an     |                                                                             
            |         include of a      |                                                                             
            |         macro expansion   |                                                                             
            |         we push the cur-  |                                                                             
            |         rent pointer and  |                                                                             
            |         jump into the     |                                                                             
            |         tokens of the     |                                                                             
            |         thing that is     |                                                                             
            |         being pointed to  |                                                                             
            |              ^            |                                                                             
            |              |            |                                                                             
            |              |            |                                                                             
      which token <-+  call stack       |                                                                             
         is next     \     ^            |                                                                             
                      \    |            |                                                                             
                      <Token Ptr> ------|                                                                             
                     /     ^            |                                                                             
            +-------/      |            |                                                                             
            |              |            |                                                                              
            |              |            |                                                                             
            |     <Translation Data>    |                                                                             
        Number of          ^            | getting tokens ------> possible macro expansion
        tokens in          |            V                                  |
        macro argument     +----- parsing et al.                           |
        remaining                                                          V
   (better yet in current context)                                     <Denoted>
                                                                     __/       \
                                                                    /           +-----------------------------+   
                                                                   V                                          | 
                                               <Denoted Functionlike Macro>                                   | 
                                                |                     |                                       |
                                                |                     |                                       |
                                                V                     |                                       |
                                    <Macro Argument Tokens>           V                                       |
                                          ^                    <Macro Tokens>                                 |
                                          |                     |         |                                   |
                                          |                     |         V                                   |
                                          |                     |  <Normal Token>                             |
                                          |                     V                                             |
                                          +-----<Special Macro Argument Id Token>                             |
                                                                                                              |
                                                                                                              |
                                                                                                              V
                                                                                                    <Denoted Normal Macro>
                                                                                                              |
                                                                                                              |
                                                                                                              V
                                                                                                       <Macro Tokens>



Preprocessing Translation Unit
	push_token_into_preprocessing_translation_unit
	get_preprocessing_translation_unit
	delete_preprocessing_translation_unit
Token Ptr
	token_ptr_execute_preprocessing_directive
	token_ptr_execute_include_directive
	token_ptr_execute_define_directive
	token_ptr_execute_undefine_directive
	token_ptr_execute_if_directive
	token_ptr_execute_ifdef_directive
	token_ptr_execute_ifndef_directive
	token_ptr_execute_line_directive
	token_ptr_execute_error_token
	token_ptr_execute_pragma_token
	token_ptr_execute_functionlike_define_token
	token_ptr_jump_to_preprocessing_translation_unit
	token_ptr_jump_back_from_preprocessing_translation_unit
	get_token_under_ptr_then_move
	get_token_ptr
	token_ptr_jump_to_function_like_macro_argument
	delete_token_ptr
Source Name
	normalise_source_name
Denoted Functionlike Macro
	translation_unit_number
Denoted Macro
	translation_unit_number

Translation_Unit
	check_if_source_file_has_been_processed
	get_processed_source_file_with_name
	push_preprocessing_translation_unit_into_source_map
	Source Map

lex_source_file
	normalise_source_name
	check_if_source_file_has_been_processed
	load_source_file
	lex_preprocessing_directive
		lex_til_new_line
		parse_preprocessing_directive_tokens
	lex_source_file
		push_token_into_preprocessing_translation_unit
	push_preprocessing_translation_unit_into_source_map

token
	get_preprocessing_include_directive_token
	get_preprocessing_if_token
	get_preprocessing_ifdef_token
	get_preprocessing_ifndef_token
	get_preprocessing_undef_token
	get_preprocessing_normal_define_token
	get_preprocessing_functionlike_define_token
	get_preprocessing_undef_token
	get_preprocessing_line_token
	get_preprocessing_error_token
	get_preprocessing_pragma_token
	get_preprocessing_defined_functionlike_macro_token




                                                                                                                                                                   
                                                token                                                                                                              
                                                |   |                                                                                                              
                                     -----------+   +-----                                                                                                         
                                     |                   |                                                                                                         
                                     |            specific token struct				     
                              token type            members                                                                                                        
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                                token                                                                                                              
                                                  |                                                                                                                
                                                  |                                                                                                                
                                       Preprocessing Directive				       
                                        |           |      |                                                                                                       
                        ----------------+           |      +---------------------                                                                                  
                        |                           |                           |                                                                                  
                 Include Directive                  |                           |                                                                                  
                        |                           |                           |                                                                                  
                      tokens                        |                  Conditional Directive                                                                  
                     that might                     |                    |      |         |                                                               
                   expand into something            |             +------+      |         +-----                                                         
                                                    |             |         where to go        |                                                           
                                                    |        condition       if true           |                                                                   
                                                    |         tokens                     where to go                                                                
                                                    |                                      if false                                                                
                                                    |                                                                                                               
                                                    |                                                                                                               
                                                    |                                                                                                              
                                                    |                                                                                                              
                                                    |                                                                                                              
                                                    |                                                                                                              
                                                    |                                                                                                              
                            ------------------------+-----------------+---------------+---------------------+------------------------------+                       
                            |                       |                 |               |                     |                              |                       
                            |                Undefine Directive     Line Directive    |                     |                              |                       
                       +Define Directive-+          |                     |           |                     |                          Defined                      
                       |                 |          ID                 tokens         |                     |                          Functionlike     
                       |                 |                                        Error Directive           |                          Macro                          
                       |                 |                                            |                     |                                                         
            Function like define       Normal Define                                String                  |                                                          
             |     |      |             |        |                                                          |                                                          
            ID     |   tokens to       ID      tokens to				                    |
                   |    replace                replace id                                             Pragma Directive                                              
                   |     with                    with                                                       |                                                            
                   |                                                                                      type                                                        
              array with	      
              locations of                                                                                                                                         
              argument tokens                                                                                                                                      
                   |                                                                                                                                               
                   |                                                                                                                                               
        Function like define argument                                                                                                                       
         |                 |                                                                                                                                       
      pointer to        number of                                                                                                                                  
      first token       tokens in argument                                                                                                                         
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                   Translation_Data                                                                                                                
                                          |                                                                                                                        
                                    Token Pointer-------+                                                                                                          
                                     |         |        |                                                                                                          
                                Call stack  Location    |                                                                                                          
                                                        |                                                                                                          
                                                    Current Token                                                                                                  
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                                                                                                                                                                   
                               Token_Pointer			       
                                |     |   |                                                                                                                        
                             Current  |  Current                                                                                                                   
                              Token   |  Location                                                                                                                  
                                      |                                                                                                                            
                                    Call                                                                                                                           
                                    Stack