Re: Fortran 77 parser
- From: nospam@xxxxxxxxxxxxx (Richard Maine)
- Date: Fri, 4 Apr 2008 13:49:41 -0700
James Giles <jamesgiles@xxxxxxxxxxxxxxxx> wrote:
So, defining a simple concept: "Open context" means a symbol
that's not within parentheses and not in a string literal, hollerith
constant, or comment.
The Hollerith part is a pain because you can't readily tell whether
something is a Hollerith without parsing the statement, which is a bit
of a circularity issue. Plus the possibility that a quote or parens
might be part of a Hollerith makes the rest of it harder in the presence
of Hollerith also.
Of course, if you stick strictly to the f77 standard, even with the
Hollerith Appendix, Holleriths aren't allowed in many places, which
simplifies things. If you stick more strictly to the f77 standard (i.e.
without the Appendix), they can only be in Format statements (where they
aren't technically Hollerith constants, but instead edit descriptors,
even though they look a lot the same). Once you start allowing some of
the extensions that allow Hollerith all over the place, things can get
nasty. I think there are some cases of extensions in Format statements
that make things even nastier, perhaps even ambiguous. I seem to recall
things like making some commas optional having effects like that.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
.
- Follow-Ups:
- Re: Fortran 77 parser
- From: glen herrmannsfeldt
- Re: Fortran 77 parser
- From: James Giles
- Re: Fortran 77 parser
- References:
- Re: Fortran 77 parser
- From: Jon Harrop
- Re: Fortran 77 parser
- From: Tobias Burnus
- Re: Fortran 77 parser
- From: Jon Harrop
- Re: Fortran 77 parser
- From: glen herrmannsfeldt
- Re: Fortran 77 parser
- From: James Giles
- Re: Fortran 77 parser
- Prev by Date: Re: The structure contains one or more misaligned fields
- Next by Date: Re: Zero-size arrays
- Previous by thread: Re: Fortran 77 parser
- Next by thread: Re: Fortran 77 parser
- Index(es):