- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the specifications and operations of data structures in compiler design?
The major attributes for specifying data structures include the following −
Number of components − A data structure can be of fixed size if the number of components is even during its lifetime or of the variable size if the number of components transforms dynamically. Variable size data structure types generally define operations that insert and delete elements from structures.
Arrays and records are examples of fixed-size data structure types. Stacks, lists, sets, tables, and files are an example of variable size data types. Variable size data objects use a pointer data type that enables fixed-size data objects to be connected explicitly by the programmer.
Type of each component − A data structure is homogeneous if all its elements are of an equal type. It is heterogeneous if its elements are of multiple types. Arrays, sets, and files are generally homogeneous, whereas records and lists are generally heterogeneous.
Names to be used for selecting components − A data structure type requires a selection structure for recognizing a single element of the data structure. For an array, the name of a single component can be an integer subscript or sequence of subscripts, for a table, the name can be a programmer-defined identifier; for a record, the name is generally a programmer-defined identifier.
Maximum number of components − For a variable size data structure including a stack, a maximum size for the structure because of multiple components can be defined.
Operations on data structures − Specification of the domain and range of operations on data structure types can be given in much the similar form as for elementary data types. Some new classes of operations are of specific importance −
Component selection operations − Processing of data structures often proceeds by fetching each component of the structure. Two types of selection operations access components of a data structure and produce them accessible for processing by different operations such as random selection, in which an arbitrary component of the data structure is created, and sequential selection, in which components are selected in a predetermined sequence.
Whole-data structure operations − Operations can take whole data structures as arguments and create new data structures as results. The most language supports a definite set of such whole-data structure operations. For example, the addition of two arrays, assignment of one data to another, or a union operation on sets.
Insertion/deletion of components − Operations that convert the several components in a data structure have a major impact on storage representation and storage management for data structures.
Creation/destruction of data structures − Operations that create and destroy data structures also have a major impact on storage management for data structures.
- Related Articles
- What is role of different data structures in compiler design?
- What are the operations on sequential files in compiler design?
- What are the types of the translator in compiler design?
- What are Parsing Techniques in Compiler Design?
- What are Precedence Functions in compiler design?
- What are the attributes of programming languages in compiler design?
- What are the Rules of Regular Expressions in Compiler Design?
- What are Lists and Self-Organizing lists in compiler design?
- What is Design of Lexical Analysis in Compiler Design?
- Operations on Queue in Data Structures
- What is a Yagi-uda antenna? What are its design specifications?
- Data Structures Stack Primitive Operations
- What is Compiler Design?
- What are the different benefits of using programming languages in compiler design?
- Operations on an Array in Data Structures
