Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(each line in the program)
- {
- for(each macro definition)
- {
- test if the macro appears;
- perform replacement if needed;
- }
- }
- for(each line in the program)
- {
- tokenize the line;
- for(each token in the line)
- {
- switch(based on the token type)
- {
- case(an identifier)
- lookup the identifier in the table of macro names;
- perform replacement as necessary;
- ....
- }
- }
- }
- int c = a + b
Add Comment
Please, Sign In to add comment