Re: Parsing Fortran, was specifying semantics

wclodius@earthlink.net (William Clodius)
Fri, 4 Jul 2014 15:57:53 -0600

          From comp.compilers

Related articles
[4 earlier articles]
Re: specifying semantics, was Formatting of Language LRMs gneuner2@comcast.net (George Neuner) (2014-06-29)
Re: specifying semantics, was Formatting of Language LRMs ivan@ootbcomp.com (Ivan Godard) (2014-06-29)
Re: specifying semantics, was Formatting of Language LRMs anton@mips.complang.tuwien.ac.at (2014-07-02)
Re: specifying semantics, was Formatting of Language LRMs monnier@iro.umontreal.ca (Stefan Monnier) (2014-07-03)
Re: specifying semantics, was Formatting of Language LRMs DrDiettrich1@aol.com (Hans-Peter Diettrich) (2014-07-04)
Re: Parsing Fortran, was specifying semantics gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-07-04)
Re: Parsing Fortran, was specifying semantics wclodius@earthlink.net (2014-07-04)
| List of all articles for this month |

From: wclodius@earthlink.net (William Clodius)
Newsgroups: comp.compilers
Date: Fri, 4 Jul 2014 15:57:53 -0600
Organization: Compilers Central
References: 14-06-010 14-06-023 14-06-025 14-06-027 14-06-030 14-06-031 14-07-003 14-07-006 14-07-011 14-07-013
Keywords: parse
Posted-Date: 06 Jul 2014 19:14:08 EDT

glen herrmannsfeldt <gah@ugcs.caltech.edu> wrote:


> <snip>
> -- glen
> [To parse a Fortran statement you first have to decide whether it's an
> assignment or something else, after which you can use a simple
> contnext sensitive longest match to find the tokens. To see if it's
> an assignment, you look for an = sign that is not followed by a comma
> that is not inside parens, being sure to skip over 'literal' and
> 9hHollerith strings and noting that in typical dialects the statement
> REAL*4HFOO does not contain a Hollerith string.. It wasn't as hard as
> it sounds. -John]


WIth the proviso that what is termed an assignment in the initial
analysis may be further qualified as a statement function definiton in
the semantic analysis.
[Right. You have to look up the symbol and see if it's defined as an
array. -John]



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.