Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.compilers > #3400
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: ireegular expressions, syntax complexity |
| Date | 2023-02-22 10:55 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <23-02-061@comp.compilers> (permalink) |
| References | (4 earlier) <29156_1676600565_63EEE4F4_29156_1009_1_23-02-051@comp.compilers> <23-02-052@comp.compilers> <23-02-053@comp.compilers> <23-02-055@comp.compilers> <23-02-059@comp.compilers> |
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes: >anton@mips.complang.tuwien.ac.at (Anton Ertl) writes: >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]+ There's still a bug here, because that makes "E" non-optional. Let's make it optional: At least one digit, when using E one before and one after: .*[0-9].*(E[0-9]+)? In total: [0-9]*[.]?[0-9]*E?[0-9]*&.*[.E].*&.*[0-9].*(E[0-9]+)? - anton -- M. Anton Ertl anton@mips.complang.tuwien.ac.at http://www.complang.tuwien.ac.at/anton/ [This doesn't seem all that much simpler than the usual approach with alternation, give or take bugs: ([0-9]+\.[0-9]*|\.[0-9]+)(E[0-9]+)?|[0-9]+E[0-9]+ -John]
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar
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