Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1908
| Path | csiph.com!goblin3!goblin.stu.neva.ru!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end |
|---|---|
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
| Newsgroups | comp.compilers |
| Subject | Re: re2c-1.0 released! |
| Date | Sat, 02 Sep 2017 17:02:40 GMT |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Lines | 40 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <17-09-003@comp.compilers> (permalink) |
| References | <17-08-007@comp.compilers> <17-09-001@comp.compilers> |
| Injection-Info | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="33930"; mail-complaints-to="abuse@iecc.com" |
| Keywords | lex |
| Posted-Date | 02 Sep 2017 23:50:13 EDT |
| X-submission-address | compilers@iecc.com |
| X-moderator-address | compilers-request@iecc.com |
| X-FAQ-and-archives | http://compilers.iecc.com |
| Xref | csiph.com comp.compilers:1908 |
Show key headers only | View raw
Kaz Kylheku <398-816-0742@kylheku.com> writes: >Briefly, why would you do some hacky regex thing in lex with \1, \2, >\3, when in the level immediately above yylex() you have proper phrase >recognition, with $1, $2, $3. These don't do the same thing. Taking your example from the other posting, do you want to recognize 2017 -08 /* bla bla */ - 28 as date? If so, do it at the parser level, if not, the scanner. I dimly remember a case of a lexeme type with internal structure that was reflected in the regexp, where I then had to write C code manually repeating some of the work that the scanner had already done, and wishing for a feature like that provided by the OP. Unfortunately, and I do not remember details, that has been long ago. >> It may seem that >> only a lack of effort prevents developers of lexer generators like Flex >> from implementing it (as well as fixing the ever-broken trailing >> contexts [3]). > >Lack of justification due to, I suspect, lack of demand from >sophisticated users of the tools, who use them for their intended >purpose. Or maybe just accepting the limitations of the tool and working around them, without sending a feature request to the maintainer (I didn't, at the time). - anton -- M. Anton Ertl anton@mips.complang.tuwien.ac.at http://www.complang.tuwien.ac.at/anton/
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