Re: syntax complexity

gah4 <>
Thu, 16 Feb 2023 11:33:01 -0800 (PST)

          From comp.compilers

Related articles
syntax complexity (gah4) (2023-02-15)
Re: syntax complexity (Thomas Koenig) (2023-02-16)
Re: syntax complexity (Hans-Peter Diettrich) (2023-02-16)
Re: syntax complexity (gah4) (2023-02-16)
Re: syntax complexity (gah4) (2023-02-16)
Re: syntax complexity (Roger L Costello) (2023-02-20)
Re: syntax complexity (gah4) (2023-02-20)
Re: syntax complexity (George Neuner) (2023-02-20)
Re: syntax complexity (2023-02-21)
syntax complexity (Christopher F Clark) (2023-02-21)
[4 later articles]
| List of all articles for this month |

From: gah4 <>
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:; posting-host=""; logging-data="14917"; mail-complaints-to=""
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:


> > 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.