Handbook of Computer Science(cs) and IT

 

Displays

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 synchronising 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.

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95

Leave a Reply

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