Re: syntax complexity

gah4 <>
Mon, 20 Feb 2023 09:57:20 -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)
Re: syntax complexity (Nils M Holm) (2023-02-21)
Re: syntax complexity (2023-02-21)
Re: irregular expressions, syntax complexity (2023-02-22)
[2 later articles]
| List of all articles for this month |

From: gah4 <>
Newsgroups: comp.compilers
Date: Mon, 20 Feb 2023 09:57:20 -0800 (PST)
Organization: Compilers Central
References: <AQHZRT1Nf7Ln0mpyG0extuZP9rnVPQ==> 23-02-045 23-02-047 23-02-050 <29156_1676600565_63EEE4F4_29156_1009_1_23-02-051@comp.compilers> 23-02-052
Injection-Info:; posting-host=""; logging-data="49952"; mail-complaints-to=""
Keywords: syntax, design, comment
Posted-Date: 20 Feb 2023 14:42:04 EST
In-Reply-To: 23-02-052

On Monday, February 20, 2023 at 9:46:04 AM UTC-8, Roger L Costello wrote:

> Scenario: you have a language that has a BNF. You write a statement in the language.
> It is a relatively simple, basic statement. The statement conforms to the BNF.
> To show its conformance, you write the derivation of the statement.
> Surprisingly, deriving the statement takes many, many rules.
> Does that signify that the language's syntax is too complex?

One suggestion above based it on the size of the standard. That isn't
quite as good as it could be, as some standard writers are wordier
than others, but maybe not so bad.

Another choice is on the size of the BNF.

I don't think I would rate it on one statement, but the whole BNF of
the language. One statement, such as an assignment statement, could
use a lot of rules. Whole language syntax complexity should be on the
whole BNF.

One complication, depending on how you write BNF. Some statements,
such as in PL/I, have items that can be in any order, but you only
have at most one of each. That is complicated to write in BNF, but I
don't believe complicates the syntax, as seen by people.
[There are definitely things that are hard to say in BNF, even though
they're intuitively simple. Another is floating point numbers with
optional "." and "E" but you need at least one of them. -John]

Post a followup to this message

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