Quick start manual
Delphi grammar
A-1
Appendix
A
Appendix A
Delphi grammar
Goal -> (Program | Package | Library | Unit)
Program -> [PROGRAM Ident ['(' IdentList ')'] ';']
ProgramBlock '.'
Unit -> UNIT Ident [PortabilityDirective] ';'
InterfaceSection
ImplementationSection
InitSection '.'
Package -> PACKAGE Ident ';'
[RequiresClause]
[ContainsClause]
END '.'
Library -> LIBRARY Ident ';'
ProgramBlock '.'
ProgramBlock -> [UsesClause]
Block
UsesClause -> USES IdentList ';'
PortabilityDirective -> platform
-> deprecated
-> library
InterfaceSection -> INTERFACE
[UsesClause]
[InterfaceDecl]...
InterfaceDecl -> ConstSection
-> TypeSection
-> VarSection
-> ExportedHeading
ExportedHeading -> ProcedureHeading ';' [Directive]
-> FunctionHeading ';' [Directive]