Re: syntax complexity (Anton Ertl)
Tue, 21 Feb 2023 18:39:55 GMT

          From comp.compilers

Related articles
[5 earlier articles]
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: ireegular expressions, syntax complexity (2023-02-22)
| List of all articles for this month |

From: (Anton Ertl)
Newsgroups: comp.compilers
Date: Tue, 21 Feb 2023 18:39:55 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
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 23-02-053 23-02-055
Injection-Info:; posting-host=""; logging-data="31324"; mail-complaints-to=""
Keywords: syntax, lex
Posted-Date: 22 Feb 2023 02:13:28 EST (Anton Ertl) writes:
>Regular expression syntax is missing an operator that signifies the
>intersection of the sets recognized by the operand regexps. Let's
>call this operator "&". Then this requirement for an FP number can be
>expressed as:
>[Wouldn't that pattern allow 1.2.3 ? -John]

Good point. The & operator makes it easy to fix this bug (once you
have found it):


But it suggests that I tried to put too many requirements into the
first part, so let's try again:

At most one "." in front of at most one "E": [0-9]*[.]?[0-9]*E?[0-9]*
At least one of "." or "E": .*[.E].*
At least one digit in front of and after "E": .*[0-9].*E[0-9]+

In total:


- anton
M. Anton Ertl

Post a followup to this message

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