Explain the criteria to classify data structures used for language processors?
The data structures utilized in language processing can be classified upon the basis of the subsequent criteria:
1. Behavior of data structure (where a linear or non-linear data structure)
2. Reasons of a data structure (whether a search data structure or an assigned data structure)
3. Life time of a data structure (whether used throughout language processing or throughout target program execution)
A linear data structure contains a linear arrangement of components in the memory. A linear data structure needs a contiguous area of memory for its components. It poses a problem in situations where the size of a data structure is not easy to predict. The components of non linear data structures are accessed by using pointers. Therefore the components need not occupy contiguous area of memory.
Search Data structures are used throughout language processing to keep attribute information concerning various entities in the source program. Into this the entry for an entity is made only once, although may be searched for huge number of times. Assigned data structures are characterized through the fact which the address of memory area allocated to an entity is identify to the users. Therefore no search operations are conducted.