Catalog · How the catalog works
delphi-language-spec
DRAFT Unofficial, community-driven language specification for the Delphi programming language (Object Pascal) — including lexical rules, grammar, and semantic details.
- ★ 11 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
# Delphi Language Specification
Overview
This repository provides a structured, version-controlled specification of the Delphi programming language. It is community-driven and unofficial, but designed to complement Embarcadero’s official documentation with a normative, open, and maintained specification.

Goals
- Provide a canonical, open reference for the Delphi language.
- Capture lexical rules, grammar, and semantics in a structured way.
- Enable tool authors (parsers, linters, formatters) to rely on a machine-readable spec.
- Maintain historical versions and track changes across Delphi releases.
Structure
????????? spec/
??? ????????? 01-lexical.md # identifiers, keywords, literals, operators, and compiler directives
??? ????????? 02-directives.md # conditional compilation and compiler options
??? ????????? 03-grammar-ebnf.md # complete grammar of the Delphi language
??? ????????? 04-semantics-types.md # built-in and user-defined types
??? ????????? 05-semantics-generics.md # generic types and constraints
??? ????????? 06-semantics-classes.md # class declarations, inheritance, visibility
??? ????????? 07-semantics-expressions.md # operator precedence and evaluation
??? ????????? 08-semantics-statements.md # control flow, blocks, procedures
??? ????????? 09-attributes-and-helpers.md # metadata and helper types
??? ????????? 10-operator-resolution.md # overload resolution rules
??? ????????? 11-managed-types-and-rtlifetimes.md # memory management and finalization
????????? data/
??? ????????? lexical.json # machine-readable tables for keywords, operators, literals
????????? grammar/
??? ????????? Delphi.ebnf # machine-readable grammar file
????????? tools/
??? ????????? linter/ # Spec checker (TODO: More tests)
??? more to come...
????????? README.mdContributing
Contributions are welcome! Please:
- Open an issue to discuss proposed changes (lexical rules, grammar, semantics).
- Submit a pull request with edits to the relevant
spec/*.mdfiles. - Ensure any changes to keywords, operators, or literals are reflected in
data/lexical.json.
PR Template Checklist
- [ ] Mark change as Normative (alters language rules) or Informative (examples, notes).
- [ ] Update
/data/lexical.jsonif tokens/keywords/literals are changed. - [ ] Update examples to reflect changes.
This project is currently not affiliated with or endorsed by Embarcadero Technologies. “Delphi” is a trademark of Embarcadero.

