Re: syntax complexity

gah4 <gah4@u.washington.edu>
Thu, 16 Feb 2023 11:33:01 -0800 (PST)

          From comp.compilers

Related articles
syntax complexity gah4@u.washington.edu (gah4) (2023-02-15)
Re: syntax complexity tkoenig@netcologne.de (Thomas Koenig) (2023-02-16)
Re: syntax complexity DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-02-16)
Re: syntax complexity gah4@u.washington.edu (gah4) (2023-02-16)
Re: syntax complexity gah4@u.washington.edu (gah4) (2023-02-16)
Re: syntax complexity costello@mitre.org (Roger L Costello) (2023-02-20)
Re: syntax complexity gah4@u.washington.edu (gah4) (2023-02-20)
Re: syntax complexity gneuner2@comcast.net (George Neuner) (2023-02-20)
Re: syntax complexity anton@mips.complang.tuwien.ac.at (2023-02-21)
syntax complexity christopher.f.clark@compiler-resources.com (Christopher F Clark) (2023-02-21)
[4 later articles]
| List of all articles for this month |

From: gah4 <gah4@u.washington.edu>
Newsgroups: comp.compilers
Date: Thu, 16 Feb 2023 11:33:01 -0800 (PST)
Organization: Compilers Central
References: 23-02-045 23-02-047
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="14917"; mail-complaints-to="abuse@iecc.com"
Keywords: syntax, comment
Posted-Date: 16 Feb 2023 17:46:21 EST
In-Reply-To: 23-02-047

On Thursday, February 16, 2023 at 9:57:53 AM UTC-8, Hans-Peter Diettrich wrote:
> On 2/16/23 12:08 AM, gah4 wrote:


(snip)


> > One complication I see, is that syntax complexity as seen by people,
> > might be different from it as seen by programs.


> How do programs recognize syntax complexity?
> Number of rules and exceptions?


When I wrote that one, I was thinking about the places where Fortran uses
special characters and PL/I uses words.


          DO I=1,10,3


          DO I = 1 TO 10 BY 3;


I think about them in a different way, such that the thought complexity is different.


A compiler doesn't "think" in that way.


I suppose I agree with the above, the length of the standard, with some
assumptions on how it is written, or the length of the front end.
[Having written a couple of Fortran parsers, I can say that while the hacks
to deal with ignored spaces were ugly, they weren't that hard. PL/I has a
separate issue that the same token might be a keyword or a variable depending
on context, and the kinds of parsers you build with bison et al don't deal
very well with that. -John]


Post a followup to this message

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