Modula-2 Reloaded

A Modern Typesafe & Literate Programming Notation

Site Menu

Project

Specification

Implementation

Recommendations

Reference

Needs Updating

Work in Progress

Wastebasket

Wiki Manual

edit SideBar

Output Format For Type BOOLEAN

Types

BOOLEAN

Syntax

The EBNF for the textual representation of boolean values is

Values and Value Lists
booleanValue :
    booleanNotation;

booleanValueList :
    booleanValue ( listSeparator booleanValue )* ;

listSeparator :
    defaultListSeparator | userDefinedListSeparator | newline ;

defaultListSeparator :
    ',' whitespace ;

userDefinedListSeparator :
    character whitespace? ;
Arrays and Array Lists
booleanArray :
     openingArrayDelimiter booleanValueList closingArrayDelimiter ;

booleanArrayList :
    booleanArray ( listSeparator booleanArray )* ;

openingArrayDelimiter :
    ( defaultOpeningArrayDelimiter | userDefinedOpeningArrayDelimiter ) whitespace ;

closingArrayDelimiter :
    whitespace ( defaultClosingArrayDelimiter | userDefinedOpeningArrayDelimiter ) ;

defaultOpeningArrayDelimiter :
    '{' ;

defaultClosingArrayDelimiter :
    '}' ;

userDefinedOpeningArrayDelimiter :
    '(' | '[' ;

userDefinedClosingArrayDelimiter :
    ')' | ']' ;
Boolean Notation
booleanNotation :
    unpaddedBooleanValue | leftPaddedBooleanValue | rightPaddedBooleanValue ;

leftPaddedBooleanValue :
    whitespace+ unpaddedBooleanValue ;

rightPaddedBooleanValue :
    unpaddedBooleanValue whitespace+ ;

whitespace :
    ' ' ;

unpaddedBooleanValue :
    simpleFormat | yesNoFormat ;

simpleFormat :
    'TRUE' | 'FALSE' ;

yesNoFormat :
    'YES' | 'NO' ;

newline :
    <runtime host dependent ASCII control sequence for new line> ;

Static Semantics

  • all values in a list are shown with identical formatting.