[Oberon] Understanding ORS.Mod.txt

Chris Burrows chris at cfbsoftware.com
Mon Jun 13 01:17:20 CEST 2016


> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Srinivas Nayak
> Sent: Sunday, 12 June 2016 11:02 PM
> To: ETH Oberon and related systems
> Subject: [Oberon] Understanding ORS.Mod.txt
> 
> Why we did, errpos := p + 4 ?
> How do I understand/interpret this?
> I was thinking, it should be errpos := p + 1 ...

This reasoning behind this is described in Section 12.4 'The Parser' in the
Project Oberon Book Chapters 10-15 which you can download from the link at:

http://www.projectoberon.com

Read the paragraph that starts with the sentence: 

'A fairly large part of the program is devoted to the discovery of errors.' 

The relevant statement here is:

'The parsing process must continue with some assumption and possibly *after
skipping a short piece* of the source text.' 

The document actually says 10 characters but it seems that has since been
reduced to a smaller value. Change that value to something else (e.g. any
number from 1 to 10) and recompile the compiler. Then compile a sample
source code file that has a few errors in it and observe the results.

Regards,
Chris

Chris Burrows
CFB Software




More information about the Oberon mailing list