Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1917
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.iecc.com!.POSTED.news.iecc.com!nerds-end |
|---|---|
| From | Ulya Trofimovich <skvadrik@gmail.com> |
| Newsgroups | comp.compilers |
| Subject | Re: re2c-1.0 released! |
| Date | Fri, 8 Sep 2017 23:40:02 +0100 |
| Organization | Compilers Central |
| Lines | 31 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <17-09-012@comp.compilers> (permalink) |
| References | <17-08-007@comp.compilers> <17-09-001@comp.compilers> <17-09-003@comp.compilers> <17-09-010@comp.compilers> <17-09-011@comp.compilers> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="27723"; mail-complaints-to="abuse@iecc.com" |
| Keywords | lex, comment |
| Posted-Date | 09 Sep 2017 15:26:13 EDT |
| X-submission-address | compilers@iecc.com |
| X-moderator-address | compilers-request@iecc.com |
| X-FAQ-and-archives | http://compilers.iecc.com |
| Content-Language | en-US |
| Xref | csiph.com comp.compilers:1917 |
Show key headers only | View raw
> However, you raise an interesting point. There are plenty of regexes I > use at work that are fixed, so they could indeed just use generated > code to save the construction cost at runtime. The only reason I > haven't done this up until now is that it makes maintenance easier to > just have a string you can tweak directly in the source. The holy > grail (I believe) is sufficiently powerful meta-programming to do the > whole thing at compile time, although you could of course do it today > with custom build steps to generate code via re2c or whatever other > tool (that kind of thing tends to scare developers where I work). I think in future C++ will add compiled regular expressions as a language extension. It seems logical in a compiled language, and it would definitely simplify the toolchain. > I'm currently playing with searching using LALR(1) grammars and have > written a search tool gram_grep which I will be extending soon. I > would like to put together an LR(*) algorithm to make defining rules > easier for people, but I don't know when I'll have the time to really > get into that. At some point I also wrote a LALR(1) parser generator which main feature is generating direct-code parsers (as opposed to table-based parsers generated e.g. by bison). In my case (parsing JavaScript) it resulted in about 2x speedup over bison's parser (minus one dereference on each iteration of the parser loop). Maybe you would also like to experiment with this approach (a.k.a. 'recursive ascent'). Ulya [If you want C++ extended with RE's, that's essentially what flex is. -John]
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
re2c-1.0 released! Ulya Trofimovich <skvadrik@gmail.com> - 2017-08-27 18:25 +0100
Re: re2c-1.0 released! Kaz Kylheku <398-816-0742@kylheku.com> - 2017-09-02 11:18 -0400
Re: re2c-1.0 released! anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-09-02 17:02 +0000
Re: re2c-1.0 released! Kaz Kylheku <398-816-0742@kylheku.com> - 2017-09-03 15:14 +0000
Re: re2c-1.0 released! Ulya Trofimovich <skvadrik@gmail.com> - 2017-09-03 17:58 +0100
Re: re2c-1.0 released! Ulya Trofimovich <skvadrik@gmail.com> - 2017-09-03 18:31 +0100
Re: re2c-1.0 released! Ben Hanson <jamin.hanson@googlemail.com> - 2017-09-04 05:19 -0700
Re: re2c-1.0 released! Ulya Trofimovich <skvadrik@gmail.com> - 2017-09-08 23:40 +0100
Re: re2c-1.0 released! Kaz Kylheku <398-816-0742@kylheku.com> - 2017-09-02 11:18 -0400
Re: re2c-1.0 released! George Neuner <gneuner2@comcast.net> - 2017-09-02 14:11 -0400
Re: re2c-1.0 released! Ulya Trofimovich <skvadrik@gmail.com> - 2017-09-03 09:00 +0100
Re: re2c-1.0 released! Ben Hanson <jamin.hanson@googlemail.com> - 2017-09-03 03:13 -0700
Re: re2c-1.0 released! Ben Hanson <jamin.hanson@googlemail.com> - 2017-09-03 03:16 -0700
csiph-web