Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.compilers > #3389

Re: syntax complexity

From gah4 <gah4@u.washington.edu>
Newsgroups comp.compilers
Subject Re: syntax complexity
Date 2023-02-16 11:33 -0800
Organization Compilers Central
Message-ID <23-02-050@comp.compilers> (permalink)
References <23-02-045@comp.compilers> <23-02-047@comp.compilers>

Show all headers | View raw


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]

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

syntax complexity gah4 <gah4@u.washington.edu> - 2023-02-15 15:08 -0800
  Re: syntax complexity Thomas Koenig <tkoenig@netcologne.de> - 2023-02-16 06:32 +0000
  Re: syntax complexity Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2023-02-16 12:03 +0100
    Re: syntax complexity gah4 <gah4@u.washington.edu> - 2023-02-16 11:33 -0800
      Re: syntax complexity gah4 <gah4@u.washington.edu> - 2023-02-16 16:08 -0800
      Re: syntax complexity Roger L Costello <costello@mitre.org> - 2023-02-20 15:09 +0000
        Re: syntax complexity gah4 <gah4@u.washington.edu> - 2023-02-20 09:57 -0800
          Re: syntax complexity anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2023-02-21 08:14 +0000
            Re: syntax complexity anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2023-02-21 18:39 +0000
              Re: ireegular expressions, syntax complexity anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2023-02-22 10:55 +0000
            Re: irregular expressions, syntax complexity arnold@freefriends.org (Aharon Robbins) - 2023-02-22 08:53 +0000
            Re: irregular expressions, syntax complexity Kaz Kylheku <864-117-4973@kylheku.com> - 2023-02-23 00:34 +0000
        Re: syntax complexity George Neuner <gneuner2@comcast.net> - 2023-02-20 13:49 -0500
      syntax complexity Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2023-02-21 20:54 +0200

csiph-web