Semantic defintions in standards

Jim Giles jlg at lanl.gov
Thu Aug 9 07:45:55 AEST 1990


>From article <1990Aug8.153448.2498 at zoo.toronto.edu>, by henry at zoo.toronto.edu (Henry Spencer):
> In article <652 at garth.UUCP> smryan at garth.UUCP (sous-realiste) writes:
> [...]
>>>any of the ``formal semantics'' methods?
>>Or even formal syntax?
> 
> Formal syntax notations are normal nowadays (well, I can't speak for
> the Fortran people :-), but they're normal everywhere else).  [...]

Well, the Fortran 77 standard gave syntax as "railroad tracks".  The
notation was actually equivalent to an LR(1) grammar for the language.
(The syntactical problems caused by insignificant blanks and misidentified
keywords can all be solved by a smart lexer - so the token level syntax
is LR(1).)

The Fortran 90 syntax is given is a pretty typical BNF notation.
I believe that it is again intended to be LR(1) - or even something
simpler for the free form input.

J. Giles



More information about the Comp.lang.c mailing list