Whenever you encounter a token you first should search the


A compiler must examine tokens in a program and decide whether or not they are reserved words or identifiers defined by the user. Design a program that reads a Java program and makes a list of all the identifiers. To do this, you should make use of two dictionaries. The first dictionary should hold all the Java reserved words. The second dictionary should hold all the identifiers that you find. Whenever you encounter a token, you first should search the dictionary of reserved words. If the token is not a reserved word, you then should search the dictionary of identifiers. If the token is not in either dictionary, you should add it to the dictionary of identifiers.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Whenever you encounter a token you first should search the
Reference No:- TGS02196275

Expected delivery within 24 Hours