Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: wclodius@earthlink.net (William Clodius) Newsgroups: comp.compilers Subject: Re: Parsing Fortran, was specifying semantics Date: Fri, 4 Jul 2014 15:57:53 -0600 Organization: Compilers Central Lines: 19 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-07-016@comp.compilers> References: <14-06-010@comp.compilers> <14-06-023@comp.compilers> <14-06-025@comp.compilers> <14-06-027@comp.compilers> <14-06-030@comp.compilers> <14-06-031@comp.compilers> <14-07-003@comp.compilers> <14-07-006@comp.compilers> <14-07-011@comp.compilers> <14-07-013@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: miucha.iecc.com 1404688448 13360 2001:470:1f07:1126:0:676f:7373:6970 (6 Jul 2014 23:14:08 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Sun, 6 Jul 2014 23:14:08 +0000 (UTC) Keywords: parse Posted-Date: 06 Jul 2014 19:14:08 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1306 glen herrmannsfeldt wrote: > > -- 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]