Skip to main content

Posts

Showing posts with the label compiler

Lexical Analyzer

  The Lexical Analysis of a Computer Program is performed by the Lexical Analyzer. The Computer Program written in a high level language is used by the Lexical Analyzer. Such a Program is written using a finite set of symbols.  The task of making a distinction among Program Elements such as Reserved Words , Operators , Data Types , Variables, Constants , Delimiters , Sequencers , Iterators is performed by the Lexical Analyzer. The task of Lexical Analysis segregates the Program Elements such as Data Types , Operators , and Variables . These Elements are grouped to form clusters.  We have a cluster of Data Types present in a Computer Program. Operators that are in the Program are clustered separately. Similarly we have other clusters that represent distinct Program Elements. The Program Elements that are recognized by the Lexical Analyzer are called tokens. We can say that Reserved Words , Data Types , and Constants are the tokens that find recognition as such during...

Compilers

  A Compiler is a Computer Program that performs code translation. In fact, Compiler is a Language Translator.  A high level language program forms the input to a Compiler.  The output of a Compiler is termed as Object Code. The Compiler output may be a Binary Code. The code generated by the Compiler may be in the form of an Assembly Language Program. _______________________ _______________________ Note: Code Translators are also called Language Processors. _______________________ _______________________ The input to the Compiler is a source code. The source code is processed to obtain the object code. The source code is Programmer friendly. The object code may be a long string of 0s and 1s .  The source code is run through the Compiler. The resultant code that is obtained has a different form. The structure of the Compiled Code reflects the transformation that is performed.  Such transformational task of code translation is achieved by application of advanced p...