[TUHS] > there is no way that FORTRAN can be described in any syntax
rly1 at embarqmail.com
Tue Dec 4 06:55:23 AEST 2018
Your message dated: Mon, 03 Dec 2018 15:10:32 -0500
> On 12/3/18, Ron Young <rly1 at embarqmail.com> wrote:
> > John Levine wrote a ftn77 subset parser using lex and yacc (the shar
> > file that I have is dated Nov 1988).
> Just curious--what parts of Fortran 77 did he leave out?
not sure... I'll check when I get home.
> Yes, full Fortran can be expressed in BNF and other formal syntax
> mechanisms. But I don't think you can use lex and yacc to generate a
> compiler for it.
agreed... but if you use Sale's classifier, you can insert
whitespace to convert the input to something that lex/yacc can
handle. Although in practice, using a hand-written lexer or
a state machine (like open-watcom IIRC) would probably be the
way to go.
> -Paul W.
Ron Young rly1 at embarqmail.com
More information about the TUHS