help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bison deterministic LALR parser for C++ (kind of complex langauge) w


From: John Levine
Subject: Re: Bison deterministic LALR parser for C++ (kind of complex langauge) without 'lexar hack' support
Date: 18 Aug 2012 20:39:24 -0000

>> You mean, Fortran is not parseable by Bison, is that what you mean?
>
>Not practical.

I've written Fortran 77 parsers in yacc.  It's quite easy.

The lexical structure of Fortran is dreadful, but once you understand
the hacks required, it's straightforward to pre-scan each statement to
figure out whether it's an assignment or something else.  After that,
the tokenization is somewhat context dependent, but not hard.

It got a lot easier after 1990 once you were allowed to pay attention
to spaces.

R's,
John



reply via email to

[Prev in Thread] Current Thread [Next in Thread]