Notes on Programming in Oberon (R&W)

This page documents my experience with Programming in Oberon by Martin Reiser and N. E. Wirth.

EBNF in EBNF

Following is my representation of EBNF describing itself. See exercise 2.4 in Programming in Oberon: steps beyond Pascal and Modula, by Martin Reiser and Niklaus Wirth.

syntax" is understood by its English definition. Ellipses are used as a shorthand for identifying a contiguous sequence.

syntax = {statement}.
statement = identifier "=" expression ".".
identifier = letter {letter|digit}.
letter = "A" | "B" | ... | "Z" | "a" | ... | "z".
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9".
expression = term {"|" term}.
term = factor {factor}.
factor = identifier | string | "(" expression ")" | "[" expression "]" | "{" expression "}".
string = (letter | digit) ( letter | digit ) { letter | digit }.

©2014, 2019 David Egan Evans.