[fpc-pascal] Pascal Lexical Diagrams

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Mon Feb 1 11:13:51 CET 2016


Graeme Geldenhuys wrote:
> On 2016-01-30 12:26, Jürgen Hestermann wrote:> The look of the diagrams is very good.
> Call me old-fashioned, but what is wrong with the EBNF (ExtendedBackus-Naur Form) which is also an ISO standard.
>    https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_Form
> I think the EBNF syntax is crystal clear to read and follow.
> Here is an extract from my "Object Pascal Grammar" addendum to theofficial FPC Language Reference documentation:

[Badly-formatted stuff dropped]

Broadly speaking, I sympathise with your position. EBNF particularly 
makes more sense to people who for some reason need to know how to write 
a compiler for the target language.

However, Wirth used syntax diagrams in his description of Pascal, and 
didn't move to EBNF until later. As such it's part of the doctrine of 
the language, and discarding it would in effect be breaking backward 
compatibility.

http://www.standardpascal.org/The_Programming_Language_Pascal_1973.pdf

If you feel strongly about it I suggest doing the community a service by 
porting one of the diagrammers to Pascal, and then making sure that it 
can process your EBNF into diagrams suitable for the documentation. That 
would avoid having multiple language descriptions in different forms, 
which is obviously a hazard.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list