back to the homepage

The Syntax of the Oberon Programming Language

The full syntax and specification of the Oberon language can be found in The Programming Language Oberon-07 (Revised Oberon)

Below is an overview of the syntax rules, in several sections, from the top rules to the most terminal ones.

At the very bottom of this page, the user can find the lists of all the syntax rules and the list of all the KEYWORDS defined by the Oberon Programming language.

Table of content:

  1. Top level rules
  2. Procedure rules
  3. Control structures rules
  4. Expression rules
  5. Types rules
  6. Terminals
  7. All the Oberon syntax rules
  8. All the Oberon KEYWORDS
  9. All the Oberon built-in procedures
    1. The regular built-in procedures
    2. The special SYSTEM built-in procedures


Oberon production rules:

Top level rules:
[TOC]



import ImportList module

Procedure rules:
[TOC]



DeclarationSequence FormalParameters FormalType FPSection ProcedureBody ProcedureCall ProcedureDeclaration ProcedureHeading ProcedureType

Control structures rules:
[TOC]



assignment case CaseLabelList CaseStatement ForStatement IfStatement label LabelRange RepeatStatement statement StatementSequence WhileStatement

Expression rules:
[TOC]



ActualParameters AddOperator designator element ExpList expression factor MulOperator relation selector set SimpleExpression term

Types rules:
[TOC]



ArrayType BaseType FieldList FieldListSequence IdentList length PointerType ProcedureType RecordType type TypeDeclaration VariableDeclaration

Terminals:
[TOC]



ConstDeclaration ConstExpression digit hexDigit ident identdef integer letter number qualident real ScaleFactor string

All the Oberon syntax rules:
[TOC]



ActualParameters AddOperator ArrayType assignment BaseType case CaseLabelList CaseStatement ConstDeclaration ConstExpression DeclarationSequence designator digit element ExpList expression factor FieldList FieldListSequence FormalParameters FormalType ForStatement FPSection hexDigit ident identdef IdentList IfStatement import ImportList integer label LabelRange length letter module MulOperator number PointerType ProcedureBody ProcedureCall ProcedureDeclaration ProcedureHeading ProcedureType qualident real RecordType relation RepeatStatement ScaleFactor selector set SimpleExpression statement StatementSequence string term type TypeDeclaration VariableDeclaration WhileStatement

All the Oberon KEYWORDS:
[TOC]



ARRAY BEGIN BY CASE CONST DIV DO ELSE ELSIF END FALSE FOR IF IMPORT IN IS MOD MODULE NIL OF OR POINTER PROCEDURE RECORD REPEAT RETURN THEN TO TRUE TYPE UNTIL VAR WHILE

All the Oberon built-in procedures:
[TOC]



The regular built-in procedures:
[TOC]



function procedures: ABS ASR CHR FLOOR FLT LEN LSL ODD ORD ROR
proper procedures: ASSERT DEC EXCL INC INCL NEW PACK UNPK

The special SYSTEM built-in procedures:
[TOC]



function procedures: SYSTEM.ADC SYSTEM.ADR SYSTEM.BIT SYSTEM.COND SYSTEM.SBC SYSTEM.SIZE SYSTEM.UML SYSTEM.VAL
proper procedures: SYSTEM.COPY SYSTEM.GET SYSTEM.LED SYSTEM.PUT