Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
Non TerminalsIndex#1 Compilation Unit syntax diagramcompilationUnit := definitionModule | implOrPrgmModule | blueprint ; Definition Module Syntax#2 Definition Module syntax diagramdefinitionModule := DEFINITION MODULE moduleIdent ( '[' blueprintToObey ']' )? ( FOR typeToExtend )? ';' ( import ';' )* definition* END moduleIdent '.' ; #2.1 Module Identifier, Blueprint Identifier, Type To Extend syntax diagrammoduleIdent := Ident ; blueprintIdent := Ident ; typeToExtend := Ident ; #2.2 Blueprint To Obey syntax diagramblueprintToObey := blueprintIdent ; #3 Import syntax diagramimport := IMPORT impexLib ( ',' moreImpexLibs | ALIAS unqualifiedAliases )? | libGenDirective ; #3.1 Import/Re-Export Library syntax diagramimpexLib := Ident reExport? ; #3.2 More Import/Re-Export Libraries syntax diagrammoreImpexLibs := impexLib ( ',' impexLib )* ; #3.3 Re-Export Tag syntax diagramreExport := '+' ; #3.4 Unqualified Aliases syntax diagramunqualifiedAliases := identList ; #4 Library Generation Directive syntax diagramlibGenDirective := GENLIB libIdent FROM template FOR templateParamList END ; #4.1 Library Identifier, Template, Placeholder syntax diagramlibIdent := Ident ; template := Ident ; placeholder := Ident ; #4.2 Replacement syntax diagramreplacement := NumberLiteral | StringLiteral | ChevronText ; #5 Identifier List syntax diagramidentList := Ident ( ',' Ident )* ; #6 Definition syntax diagramdefinition := CONST ( constDefinition ';' )+ | TYPE ( typeDefinition ';' )+ | VAR ( identList '=' typeIdent ';' )+ | procedureHeader ';' ; #6.1 Type Identifier syntax diagramtypeIdent := qualident ; #7 Constant Definition syntax diagramconstDefinition := ( '[' propertyToBindTo ']' | restrictedExport )? Ident '=' constExpression ; #7.1 Constant Expression syntax diagramconstExpression := expression ; #7.2 Restricted Export syntax diagramrestrictedExport := '*' ; #8 Type Definition syntax diagramtypeDefinition := restrictedExport? Ident '=' ( type | OPAQUE ) ; #9 Qualified Identifier syntax diagramqualident := Ident ( '.' Ident )* ; #10 Type syntax diagramtype := derivedType | equivType | subrangeType | enumType | setType | arrayType | recordType | pointerType | coroutineType | procedureType ; #10.1 Derived Type syntax diagramderivedType := typeIdent ; #10.2 Equivalence Type syntax diagramequivType := ALIAS OF typeIdent | CONST dynamicTypeIdent ; #10.3 Dynamic Type Identifier syntax diagramdynamicTypeIdent := typeIdent ; #11 Subrange Type syntax diagramsubrangeType := range OF ordinalOrScalarType ; #11.1 Range syntax diagramrange := '[' greaterThan? constExpression '..' lessThan? constExpression ']' ; #11.2 Greater Than syntax diagramgreaterThan := '>' ; #11.3 Less Than syntax diagramlessThan := '<' ; #11.4 Ordinal Or Scalar Type syntax diagramordinalOrScalarType := typeIdent ; #12 Enumeration Type syntax diagramenumType := '(' ( '+' enumTypeToExtend )? identList ')' ; #12.1 Enumeration Type To Extend syntax diagramenumTypeToExtend := typeIdent ; #12.2 Enumeration Type Identifier syntax diagramenumTypeIdent := typeIdent ; #13 Set Type syntax diagramsetType := SET OF enumTypeIdent ; #14 Array Type syntax diagramarrayType := ARRAY lessThan? valueCount ( ',' valueCount )* OF typeIdent ; #14.1 Value Count syntax diagramvalueCount := constExpression ; #15 Record Type syntax diagramrecordType := RECORD ( '(' recTypeToExtend ')' )? fieldList ( ';' fieldList )* ) ; #15.1 Field List syntax diagramfieldList : restrictedExport? variableDeclaration ( '=' constExpression )? ; #15.2 Record Type To Extend syntax diagramrecTypeToExtend := typeIdent ; #16 Pointer Type syntax diagrampointerType := POINTER TO CONST? typeIdent ; #17 Coroutine Type syntax diagramcoroutineType := COROUTINE '(' assocProcType ')' ; #17.1 Associated Procedure Type syntax diagramassocProcType : typeIdent ; #18 Procedure Type syntax diagramprocedureType := PROCEDURE ( formalType ( ',' formalType )* )? ( ':' returnedType )? ; #18.1 Formal Type syntax diagramformalType := simpleFormalType | attributedFormalType | variadicFormalType ; #19 Simple Formal Type syntax diagramsimpleFormalType := ( ARRAY OF )? typeIdent | castingFormalType ; #19.1 Casting Formal Type syntax diagramcastingFormalType := CAST ( ARRAY OF OCTET | addressTypeIdent ) ; #19.2 Address Type Identifier syntax diagramaddressTypeIdent := ( UNSAFE '.' )? ADDRESS ; #20 Attributed Formal Type syntax diagramattributedFormalType := ( CONST | NEW | VAR ) ( simpleFormalType | simpleVariadicFormalType ) ; #21 Simple Variadic Formal Type syntax diagramsimpleVariadicFormalType := ARGLIST reqNumOfArgs? OF simpleFormalType terminator? ; #21.1 Required Number Of Arguments syntax diagramreqNumOfArgs := greaterThan? constExpression ; #21.2 Argument List Terminator syntax diagramterminator := '|' constQualident ; #21.3 Constant Qualified Identifier syntax diagramconstQualident := qualident ; #22 Variadic Formal Type syntax diagramvariadicFormalType := ARGLIST reqNumOfArgs? OF ( '{' nonVariadicFormalType ( ';' nonVariadicFormalType )* '}' | simpleFormalType ) terminator? ; #23 Non-Variadic Formal Type syntax diagramnonVariadicFormalType := ( CONST | NEW | VAR )? simpleFormalType ; #24 Procedure Header syntax diagramprocedureHeader := PROCEDURE ( '[' ( entityToBindTo | COROUTINE ) ']' | restrictedExport )? procedureSignature ; #25 Procedure Signature syntax diagramprocedureSignature := Ident ( '(' formalParams ( ';' formalParams )* ')' )? ( ':' returnedType )? ; #26 Formal Parameters syntax diagramformalParams := identList ':' ( simpleFormalType | variadicFormalParams ) | attributedFormalParams ; #27 Attributed Formal Parameters syntax diagramattributedFormalParams := ( CONST | NEW | VAR ) identList ':' ( simpleFormalType | simpleVariadicFormalType ) ; #28 Variadic Formal Parameters syntax diagramvariadicFormalParams := ARGLIST reqNumOfArgs? OF ( ( '{' nonVariadicFormalParams ( ';' nonVariadicFormalParams )* '}') | simpleFormalType ) terminator? ; #29 Non-Variadic Formal Parameters syntax diagramnonVariadicFormalParams := ( CONST | NEW | VAR )? identList ':' simpleFormalType ; Implementation And Program Module Syntax#30 Implementation Or Program Module syntax diagramimplOrPrgmModule := IMPLEMENTATION? MODULE moduleIdent ';' ( privateImport ';' )* block moduleIdent '.' ; #31 Private Import syntax diagramprivateImport := IMPORT importLib ( ',' moreImportLibs | ALIAS privateAliases )? ; #31.1 Import Library syntax diagramimportLib := Ident ; #31.2 More Import Libraries syntax diagrammoreImportLibs := identList ; #31.3 Private Aliases syntax diagramprivateAliases := identList | '*' ; #32 Block syntax diagramblock := declaration* ( BEGIN statementSequence )? END ; #33 Declaration syntax diagramdeclaration := CONST ( Ident '=' constExpression ';' )+ | TYPE ( typeDeclaration ';' )+ | VAR ( variableDeclaration ';' )+ | ALIAS localAliases FOR origin ';' procedureHeader ';' block Ident ';' ; #33.1 Local Aliases syntax diagramlocalAliases := privateAliases ; #33.2 Origin syntax diagramorigin := ( Ident '.' )+ '*' ; #34 Type Declaration syntax diagramtypeDeclaration := Ident '=' ( type | indeterminateRecType ) ; #34.1 Indeterminate Record Type syntax diagramindeterminateRecType := '~' RECORD ( variableDeclaration ';' )+ indeterminateField END ; #34.2 Indeterminate Field syntax diagramindeterminateRecType := '~' Ident ':' ARRAY '~' discriminantFieldIdent OF typeIdent END ; #34.3 Discriminant Field Identifier syntax diagramdiscriminantFieldIdent := Ident ; #35 Variable Declaration syntax diagramvariableDeclaration := identList ':' ( ( ARRAY valueCount OF )? typeIdent | subrangeType ) ; #36 Statement Sequence syntax diagramstatementSequence := statement ( ';' statement )* ; #37 Statement syntax diagramstatement := memMgtOperation | updateOrProcCall | ifStatement | caseStatement | loopStatement | whileStatement | repeatStatement | forStatement | EXIT ; #38 Memory Management Operation syntax diagrammemMgtOperation := NEW designator ( OF initSize | := initValue )? | RETAIN designator | RELEASE designator ; #38.1 Initialisation Size, Initialisation Value syntax diagraminitSize := expression ; initValue := expression ; #39 Update Or Procedure Call syntax diagramupdateOrProcCall := designator ( incOrDecSuffix | ':=' expression | '(' expressionList ')' )? | COPY designator ':=' expression ; #39.1 Increment Or Decrement Suffix syntax diagramincOrDecSuffix := '++' | '--' ; #40 Return Or Yield Statement syntax diagramreturnStatement := ( RETURN | YIELD ) expression? ; #41 IF Statement syntax diagramifStatement := IF boolExpression THEN statementSequence ( ELSIF boolExpression THEN statementSequence )? ( ELSE statementSequence )? END ; #41.1 Boolean Expression syntax diagramboolExpression := expression ; #42 CASE Statement syntax diagramcaseStatement := CASE expression OF ( '|' case )+ ( ELSE statementSequence )? END ; #42.1 Case syntax diagramcase := caseLabels ( ',' caseLabels )* ':' statementSequence ; #42.2 Case Labels syntax diagramcaseLabels := constExpression ( '..' constExpression )? ; #43 LOOP Statement syntax diagramloopStatement := LOOP statementSequence END ; #44 WHILE Statement syntax diagramwhileStatement := WHILE boolExpression DO statementSequence END ; #45 REPEAT Statement syntax diagramrepeatStatement := REPEAT statementSequence UNTIL boolExpression ; #46 FOR Statement syntax diagramforStatement := FOR forLoopVariants IN iterableExpr DO statementSequence END ; #46.1 FOR Loop Variants syntax diagramforLoopVariants := accessor ascOrDesc? ( ',' value )? | VALUE value ascOrDesc? ; #46.2 Accessor, Value syntax diagramaccessor := Ident ; value := Ident ; #46.3 Iterable Expression syntax diagramiterableExpr := designator | '[' expression '..' expression ']' OF ordinalType ; #46.4 Ascender Or Descender syntax diagramascOrDesc := incOrDecSuffix ; #46.5 Ordinal Type syntax diagramordinalType := typeIdent ; #47 Designator syntax diagramdesignator := qualident designatorTail? ; #47.1 Designator Tail syntax diagramdesignatorTail := ( ( '[' exprListOrSlice ']' | '^' ) ( '.' Ident )* )+ ; #47.2 Expression List Or Slice syntax diagramexprListOrSlice := expression ( ( ',' expression )* | '..' expression? ) ; #48 Expression List syntax diagramexpressionList := expression ( ',' expression )* ; #49 Expression syntax diagramexpression := simpleExpression ( operL1 simpleExpression )? ; #49.1 Level-1 Operator syntax diagramoperL1 := '=' | '#' | '<' | '<=' | '>' | '>=' | IN | identityOp ; #49.2 Identity Operator syntax diagramidentityOp := '==' ; #50 Simple Expression syntax diagramsimpleExpression := term ( operL2 term )* | '-' simpleFactor ; #50.1 Level-2 Operator syntax diagramoperL2 := '+' | '-' | OR | concatOp ; #49.2 Concatenation Operator syntax diagramconcatOp := '&' ; #51 Term syntax diagramterm := simpleTerm ( operL3 simpleTerm )* ; #51.1 Level-3 Operator syntax diagramoperL3 := '*' | '/' | DIV | MOD | AND | setDiffOp ; #51.2 Set Difference Operator syntax diagramsetDiffOp := '\' ; #52 Simple Term syntax diagramsimpleTerm := NOT? factorOrTypeConv ; #53 Factor syntax diagramfactor := simpleFactor ( typeConvOp typeIdent )? ; #53.1 Type Conversion Operator syntax diagramtypeConvOp := '::' ; #54 Simple Factor syntax diagramsimpleFactor := NumberLiteral | StringLiteral | structuredValue | designatorOrFuncCall | '(' expression ')' ; #54.1 Designator Or Function Call syntax diagramdesignatorOrFuncCall := designator ( '(' expressionList? ')' )? ; #54.2 Structured Value syntax diagramstructuredValue := '{' valueComponent ( ',' valueComponent )* '}' ; #54.3 Value Component syntax diagramvalueComponent := constExpression (( BY | '..' )? constExpression )? | runtimeExpression ; #54.4 Runtime Expression syntax diagramruntimeExpression := expression ; Blueprint Syntax#55 Blueprint syntax diagramblueprint := BLUEPRINT blueprintIdent ( '[' blueprintToRefine ']' )? ( FOR blueprintForTypeToExtend )? ';' ( REFERENTIAL identList ';' )? MODULE TYPE '=' ( typeClassification ( ';' literalCompatibility)? | NONE ) ';' ( constraint ';' )* ( requirement ';' )* END blueprintIdent '.' ;
#55.1 Blueprint Identifier syntax diagramblueprintIdent := Ident ; #55.2 Blueprint To Refine, Blueprint For Type To Extend syntax diagramblueprintToRefine := blueprintIdent ; blueprintForTypeToExtend := blueprintIdent ; #56 Type Classification syntax diagramtypeClassification := '{' determinedClassification ( ';' refinableClassification )? ( ';' '*' )? '}' | '*' ; #56.1 Determined Classification syntax diagramdeterminedClassification := classificationIdent ( ',' classificationIdent )* ; #56.2 Refinable Classification syntax diagramrefinableClassification := '~' classificationIdent ( ',' '~' classificationIdent )* ; #56.3 Classification Identifier syntax diagramclassificationIdent := Ident ; #57 Literal Compatibility syntax diagramliteralCompatibility := TLITERAL '=' protoLiteral ( '|' protoLiteral )* ; #57.1 Proto-Literal syntax diagramprotoLiteral := protoLiteralIdent | structuredProtoLiteral ; #57.2 Proto-Literal Identifier syntax diagramprotoLiteralIdent := Ident ; #58 Structured Proto-Literal syntax diagramstructuredProtoLiteral := '{' ( ARGLIST reqValueCount? OF ( '{' builtinOrReferential ( ',' builtinOrReferential )* '}' | builtinOrReferential ) ) | builtinOrReferential '}' ; #58.1 Required Value Count syntax diagramreqValueCount := greaterThan? wholeNumber ; #58.2 Greater Than syntax diagramgreaterThan := '>' ; #58.3 Whole Number syntax diagramwholeNumber : NumberLiteral ; #58.4 Built-in Type Or Referential Identifier syntax diagrambuiltinOrReferential := Ident ; #59 Constraint syntax diagramconstraint := constraintTerm ( oneWayDependency | mutualDependencyOrExclusion ) ; #59.1 Constraint Term syntax diagramconstraintTerm := '(' classificationOrFlagIdent ')' | '[' bindableEntityOrProperty ']' ; #59.2 Bindable Entity Or Property syntax diagrambindableEntityOrProperty := entityToBindTo | propertyToBindTo ; #59.3 One-Way Dependency syntax diagramoneWayDependency := '->' termList ( '|' termList )* ; #59.4 Mutual Dependency Or Exclusion syntax diagrammutualDependencyOrExclusion := ( '<>' | '><' ) termList ; #59.5 Term List syntax diagramtermList := constraintTerm ( ',' constraintTerm )* ; #59.6 Classification Or Flag Identifier syntax diagramclassificationOrFlagIdent := Ident ; #60 Requirement syntax diagramrequirement := condition '->' ( typeRequirement | constRequirement | procRequirement ) ; #60.1 Condition syntax diagramcondition := NOT? boolConstIdent ; #60.2 Boolean Constant Identifier syntax diagramboolConstIdent := Ident ; #60.3 Type Requirement syntax diagramtypeRequirement := TYPE typeDefinition ; #61 Constant Requirement syntax diagramconstRequirement := CONST ( '[' propertyToBindTo ']' ( simpleConstRequirement | '=' NONE ) | restrictedExport? simpleConstRequirement ) ; #61.1 Simple Constant Requirement syntax diagramsimpleConstRequirement := Ident ( '=' constExpression | ':' builtinTypeIdent ) ; #61.2 Constant Expression syntax diagramconstExpression := expression ; #61.3 Built-in Type Identifier syntax diagrambuiltinTypeIdent := Ident ; #61.4 Restricted Export syntax diagramrestrictedExport := '*' ; #62 Property To Bind To syntax diagrampropertyToBindTo := memMgtProperty | collectionProperty | scalarProperty | TFLAGS ; #62.1 Memory Management Property syntax diagrammemMgtProperty := TDYN | TREFC ; #62.2 Collection Property syntax diagramcollectionProperty := TORDERED | TSORTED | TLIMIT ; #62.3 Scalar Property syntax diagramscalarProperty := TSCALAR | TMAX | TMIN ; #63 Procedure Requirement syntax diagramprocRequirement := PROCEDURE ( '[' ( entityToBindTo | COROUTINE ) ']' ( procedureSignature | '=' NONE ) | restrictedExport? procedureSignature ) ; #64 Entity To Bind To syntax diagramentityToBindTo := bindableResWord | bindableOperator | bindableMacro ; #64.1 Bindable Reserved Word syntax diagrambindableResWord := NEW | RETAIN | RELEASE | COPY | bindableFor ; #64.2 Bindable FOR syntax diagrambindableFor := FOR forBindingDifferentiator? ; #64.3 FOR Binding Differentiator syntax diagramforBindingDifferentiator := ':' ( '++' | '--' ) ; #64.4 Bindable Operator syntax diagrambindableOperator := '+' | '-' | '*' | '/' | '\' | '=' | '<' | '>' | '::' | IN | DIV | MOD | unaryMinus ; #64.5 Unary Minus syntax diagramunaryMinus := '+/-' ; #64.6 Bindable Macro syntax diagrambindableMacro := ABS | LENGTH | EXISTS | SUBSET | READ | READNEW | WRITE | WRITEF | SXF | VAL | multiBindableMacro1 | multiBindableMacro2 | multiBindableMacro3 ; #64.7 Multi-Bindable Macro 1 syntax diagrammultiBindableMacro1 := ( COUNT | VALUE | SEEK ) bindingDifferentiator1? ; #64.8 Binding Differentiator 1 syntax diagrambindingDifferentiator1 := ':' '#' ; #64.9 Multi-Bindable Macro 2 syntax diagrammultiBindableMacro2 := ( STORE | INSERT | REMOVE ) bindingDifferentiator2? ; #64.10 Binding Differentiator 2 syntax diagrambindingDifferentiator2 := ':' ( ',' | '#' | '*' ) ; #64.11 Multi-Bindable Macro 3 syntax diagrammultiBindableMacro3 := APPEND bindingDifferentiator3? ; #64.12 Binding Differentiator 3 syntax diagrambindingDifferentiator3 := ':' ( ',' | '*' ) ; |