CSC 4101 Chapter : Homework3
Document Summary
When the eq? function in scheme is used for comparing symbols it must return #t if and only if the the two symbols have the same name (where uppercase and lowercase characters are not distin- guished). With our current implementation, the parser constructs a new ident object for every occurrence of a symbol. For comparing symbols, it is, therefore, necessary to use string comparison for comparing the names stored in these ident objects. Explain, how you would modify your processing of symbols (data structure, lexical analysis, and parsing), so that eq? could be implemented using simple pointer comparison, i. e. , using == in c#, c++, or java: (10 pts) Suppose, we need to debug somebody else"s program. We suspect that there is a problem with the method wizbang() in class widget or with how that method is called. Widget, nor can we modify the client code that contains the calls to widget. wizbang(), since we don"t have those sources.