On Tue, Oct 28, 2014 at 03:54:05PM +0000, Christian Weisgerber wrote:
> On 2014-10-28, Stuart Henderson <st...@openbsd.org> wrote:
> 
> > m4: /usr/obj/ports/bison-3.0.2/bison-3.0.2/data/location.cc at line 332: 
> > regular expression error in ^(.)[       ]*(::)?([^][:]|:[^:])*: invalid 
> > character class.
> 
> That's a regex problem.  Our regex(3) doesn't like [^][:].  That's
> meant to be a single character class: match any char but ']', '[',
> or ':'.  The issue is that the sequence [: is special and starts a
> standard character class name, e.g. [:alpha:].
> 
> I don't know if that particular RE or our regex engine should be
> considered at fault, but reordering the characters from [^][:] to
> [^]:[] fixes this particular instance.

gnu-m4 basically uses the old  emacs-regexp engines. And since that code
is an extension of basic m4, we can't properly say "hey, that's non standard"
since that's non standard anyway.

One improvement I did was adding THIS error message, which wasn't really
present. Which should enable one to track down AND patch the (hopefully few)
issues... there might be remaining problems, I haven't had time to look
closer.

As far as regexp goes, there's some twiddle function that does fudge the
regexp to conform MORE to gnu emacs regexp engine... It does not go much
farther than handle the ( / \( conundrum... Apart from having a full
equivalent to gnu emacs regexp in our m4, the less crazy way to fix things
is to patch those issues locally.


I want to chime in again that, yes, I know this blocks the bison update.

I don't think there's anything impossible in tracking down the few
compatibility issues with our m4 and fixing them... it's slightly annoying
but definitely do-able. I spent (literally) years getting our m4 to the
point where it's a *good* m4 (because the old FSF saw was that, basically
all other m4s were shit with weird limitations---which was true--- but is
no longer the case... we got autoconf to work, we got bison to work...
only the recent update broke  things, but I'm sure we're 99% of the way
there...  just need someone with a bit of time on their hands to look at
it.

Reply via email to