bugvile, a vi-compatible text editor - Bugs: bug #29488, Flex alternative, reflex has a bug...


bug #29488: Flex alternative, reflex has a bug and a problem

Submitter:  None
Submitted:  Fri 09 Apr 2010 03:18:45 AM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup

Fri 09 Apr 2010 08:46:08 AM UTC, comment #1: 

I made the first change last September, so that's
already in the most recent snapshot from October.

The other change - either you're running from an older
source of vile (before a change in September), or you've
a new bug.

There's a current source for vile here:


Thomas Dickey <dickey>
Group administrator
Fri 09 Apr 2010 03:18:45 AM UTC, original submission:  

Hi Tom,
I have been a happy user of vile/winvile/Xvile for many years now and trying to build it from source on;
Cygwin + Windows 7

Building Cygwin failed as the flex version was too new so I used your flex alternative, reflex, and set the LEX variable.  Here I found 2 showstoppers and changed my copy of your source to fix them.

1. There is a bug on line 5 in skel.c  where I needed to add in the const pointer as defined in flexdef.h to make it compile.

 const char *skel[] =
TO -
 const char *const skel[] =

2. The version number reported by reflex on line 766 in main.c needs to have the flex_version last and unadorned.
printf(_("%s version %s (%s)\n"),
       program_name, flex_version, flex_patched);

TO -
printf(_("%s version (%s) %s\n"),
       program_name, flex_patched, flex_version);
Vile's configure script checks the version of flex/reflex by using sed to strip all the leading characters to the LAST space as sed uses a "greedy" pattern matching paradigm.
After sed has run the version number is lost.  Changing it as above allows configure to parse the string correctly.

-cheers David



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #20168:  flexdef.h added by None (34KiB - application/octet-stream)
file #20169:  main.c added by None (28KiB - application/octet-stream)
file #20167:  skel.c added by None (43KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dickey (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-25 dickey StatusNeed Info Works For Me
    2011-09-28 dickey StatusNone Need Info
    2010-04-09 None Attached File- Added skel.c, #20167
        Attached File- Added flexdef.h, #20168
        Attached File- Added main.c, #20169

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code