Compiler Design Assignment

          R. SURESH            I MCA        20PA50


                     Compiler Constructing tools

    The compiler can use come specialized tools that help in implementing various of a compiler. These tools assist in the creation of an entire compiler or its parts. Some commonly used compiler constructing tools are,

 

                       Parser Generator

                      Scanner Generator

                      Syntax directed translation                 engines

                     Automatic code generators

                     Data-flow analysis engines

                     Compiler construction toolkits


                          Parser Generator

   It produces syntax analyzers (parsers) from the input that is based on a grammatical description of programming languages or on a context free grammar.

     It is useful as the syntax analysis phase is highly complex and consumes more and compilation time. 

Examples: PIC, EQM.


Input:   Grammatical description of a programming language

Output:  Syntax analyzers.

Parser generator takes the grammatical description of a programming language and produces syntax analyser.

                                                                                                                                                   tokens  

                                                            |

Context free   ->  Parser       ->     syntax    grammar          generator            analyser               

                                                              |

                                                          Parse tree


These produce syntax analyzers, normally from input that is based on a context free grammar.

It consumes large fraction of the running time of a compiler. 

Example-YACC(Yet Another Compiler Compiler).

 YAAC is an automatic tool that generates that parser program.

As we have discussed YACC in the first unit of this tutorial as you can go through the concept again to make things more clear.

The toolkits provide integrated set of routines for various phases of compiler. 

Compiler construction toolkits provide an integrated set of routines for construction of phases of compiler.

Comments