Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1834 > unrolled thread

[ANN] RE/flex 0.9.18 - a Flex-like lexical analyzer generator for C++

Started byRobert van Engelen <ravengelen@gmail.com>
First post2017-03-27 16:58 -0700
Last post2017-03-29 06:42 +0000
Articles 5 — 4 participants

Back to article view | Back to comp.compilers


Contents

  [ANN] RE/flex 0.9.18 - a Flex-like lexical analyzer generator for C++ Robert van Engelen <ravengelen@gmail.com> - 2017-03-27 16:58 -0700
    Re: [ANN] RE/flex 0.9.18 - a Flex-like lexical analyzer generator for C++ C Bergström <cbergstrom@pathscale.com> - 2017-03-28 18:03 +0800
      Re: [ANN] RE/flex 0.9.18 - a Flex-like lexical analyzer generator for C++ Kaz Kylheku <336-986-7787@kylheku.com> - 2017-03-28 17:32 +0000
        Re: [ANN] RE/flex 0.9.18 - a Flex-like lexical analyzer generator for C++ Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2017-03-29 02:13 +0200
          Re: [ANN] RE/flex 0.9.18 - a Flex-like lexical analyzer generator for C++ Kaz Kylheku <336-986-7787@kylheku.com> - 2017-03-29 06:42 +0000

#1834 — [ANN] RE/flex 0.9.18 - a Flex-like lexical analyzer generator for C++

FromRobert van Engelen <ravengelen@gmail.com>
Date2017-03-27 16:58 -0700
Subject[ANN] RE/flex 0.9.18 - a Flex-like lexical analyzer generator for C++
Message-ID<17-03-013@comp.compilers>
I'm pleased to share with this excellent compilers group that RE/flex 0.9.18
is released, moving the software out of beta into stable/production status.

After teaching 18 years of teaching Compiler Construction (and writing
technical papers on the subject) I grew frustrated with the lack of progress
with Flex. Flex has C++ bugs, no Unicode, no indent/nodent/dedent anchors, no
lazy repeats, no working performance option -p, outdated documentation,
etc...

A complete redesign for C++ was best, from the ground-up, based on C++ best
practices. RE/flex is released in free open source and licensed under the
BSD-3.

RE/flex is available on GitHub (the repo) and on SourceForge (packaged):

https://github.com/Genivia/RE-flex

https://sourceforge.net/projects/re-flex

If you work with Flex or with other lexical analyzer tools, then you might be
interested give RE/flex a try.

I put the documentation on a perma-link here: http://re-flex.sourceforge.net

Cheers

- Prof. Robert van Engelen

[toc] | [next] | [standalone]


#1835

FromC Bergström <cbergstrom@pathscale.com>
Date2017-03-28 18:03 +0800
Message-ID<17-03-014@comp.compilers>
In reply to#1834
Cool!

Is this meant as a flex drop-in replacement? iirc (we) PathScale have
sent patches to upstream Flex before and I don't remember if they were
responsive or not. If you are 1:1 compatible, have you tried to
replace the system flex and rebuild world or how extensively has this
been validated? You may find the BSD community to be interested and
empathetic if it can help them.

Further, if you are willing to dirty your hands and trash talk a bit -
maybe get the main editor from Phoronix to help you promote it.
Anything that resembles tabloid click-bait like news is always of
interest over there :D

Cheers,

./C


On Tue, Mar 28, 2017 at 7:58 AM, Robert van Engelen <ravengelen@gmail.com> wrote:
> I'm pleased to share with this excellent compilers group that RE/flex 0.9.18
> is released, moving the software out of beta into stable/production status. ...
>
> A complete redesign for C++ was best, from the ground-up, based on C++ best
> practices. RE/flex is released in free open source and licensed under the
> BSD-3.
>
> RE/flex is available on GitHub (the repo) and on SourceForge (packaged):
>
> https://github.com/Genivia/RE-flex
> https://sourceforge.net/projects/re-flex
>
> If you work with Flex or with other lexical analyzer tools, then you might be
> interested give RE/flex a try.
>
> I put the documentation on a perma-link here: http://re-flex.sourceforge.net

[toc] | [prev] | [next] | [standalone]


#1836

FromKaz Kylheku <336-986-7787@kylheku.com>
Date2017-03-28 17:32 +0000
Message-ID<17-03-015@comp.compilers>
In reply to#1835
On 2017-03-28, C BergstrC6m <cbergstrom@pathscale.com> wrote:
> Cool!
>
> Is this meant as a flex drop-in replacement? iirc (we) PathScale have
> sent patches to upstream Flex before and I don't remember if they were
> responsive or not. If you are 1:1 compatible, have you tried to
> replace the system flex and rebuild world or how extensively has this
> been validated? You may find the BSD community to be interested and
> empathetic if it can help them.

A nice feature in Flex might be parametrized named regexes:

You know how we can define

  ALF [A-Z]+

and later use

  {ALF}

?

OK; now what if we could have us some params:

  FOO{X} [0-9]{X}+#

then:

  {FOO Z}     /* expands to [0-9](Z)+# */

Thumbs up? Down?



Multiple params def:

  FOO{X Y Z} ... {X} ... {Y}+{Z}

Multiple params ref:

  {FOO [^x] . {ALF}}

Cheers ...
[You could whip that up in an hour as a preprocessor to flex, you know. -John]

[toc] | [prev] | [next] | [standalone]


#1837

FromHans-Peter Diettrich <DrDiettrich1@netscape.net>
Date2017-03-29 02:13 +0200
Message-ID<17-03-016@comp.compilers>
In reply to#1836
Am 28.03.2017 um 19:32 schrieb Kaz Kylheku:

> A nice feature in Flex might be parametrized named regexes:
>
> You know how we can define
>
>   ALF [A-Z]+
>
> and later use
>
>   {ALF}
[...]

This reminds me of CoCo/R, where such constructs and extensions are
available since decades. Or MetaS, with extended flexibility and
disambiguation beyond traditional regular expressions.

DoDi

[toc] | [prev] | [next] | [standalone]


#1838

FromKaz Kylheku <336-986-7787@kylheku.com>
Date2017-03-29 06:42 +0000
Message-ID<17-03-017@comp.compilers>
In reply to#1837
On 2017-03-29, Hans-Peter Diettrich <DrDiettrich1@netscape.net> wrote:
> Am 28.03.2017 um 19:32 schrieb Kaz Kylheku:
>
>> A nice feature in Flex might be parametrized named regexes:
>>
>> You know how we can define
>>
>>   ALF [A-Z]+
>>
>> and later use
>>
>>   {ALF}
> [...]
>
> This reminds me of CoCo/R, where such constructs and extensions are
> available since decades.

The above snippet refers to a feature of Lex that is already
described in the original 1975 paper "Lex --- A Lexical Analyzer Generator"
by M. E. Lesk and E. Schmidt.

It should probably remind everyone of, oh, #define ALF.

The extension I proposed is on the level of #define MAC(X).

[toc] | [prev] | [standalone]


Back to top | Article view | comp.compilers


csiph-web