Displays in Compiler Design Tutorial Study Notes With Examples

Displays in Compiler Design Tutorial Study Notes With Examples


The  array of pointer which is used to access activation records is known as  displays,

For each level, Moro will be an array wary a;; given below

Current activation record at level 1.

Current activation record at level 2.

Current activation record at level 3,.

 Error Detection and Recovery

  • The parser should be able to five an error free message which should be meaningful.
  • The parser should also be capable of recovering from the errors and it should be able enough to continue the parsing with the rest of the input.

Error Recovery Techniques

Panic Mode Error Recovery

Skipping the input symbols until a synchronizing token is found.

 Phrase Level Error Recovery

Each empty entry in the parsing table is filled with a pointer to a specific error routine to take care that error case.

Error Productions

If we have a good idea of the common errors that might be encountered, we can augment the grammar with productions that generate erroneous constructs. When an error production is used by the parser, we can generate appropriate error diagnostics. Since, it is almost impossible to know all the errors that can be made by the programmers, this method Is not practical.

Global Correction

Ideally, we would like a compiler to make as few changes as possible in processing incorrect inputs. We have to globally analyze the input to find the error. This is an expensive method and it is not in practice.

Sorting in Design and Analysis of Algorithm Study Notes with Example

Learn Sorting in Handbook Series:  Click here 

Follow Us on Social Platforms to get Updated : twiter,  facebookGoogle Plus

Leave a Reply

Your email address will not be published. Required fields are marked *