www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - spiritd, bug fix.

reply div0 <div0 users.sourceforge.net> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

A new release to fix a bug with the lexemeD directive which would cause
space skipping to fail in certain circumstances:

http://www.sstk.co.uk/spiritd.php

- --
My enormous talent is exceeded only by my outrageous laziness.
http://www.ssTk.co.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFL+BZvT9LetA9XoXwRAjuMAJ40njlVlK47ryw8gvlfZi2VZQX3aACgiig5
A7I91ni8/f/Us4locbHcQas=
=gMJY
-----END PGP SIGNATURE-----
May 22 2010
parent reply Richard Webb <richard.webb boldonjames.com> writes:
Hi,

I just tried to build the spiritd test app with the current DMD2, and got the
error:

spiritd\primitives.d(46): Error: template instance conv!(Match!(char)) matches
more than one template declaration, spiritd\match.d(70):conv(T) and
spiritd\match.d(71):conv(T)

Is the current D2 supposed to be supported?

Thanks,
Richard Webb
Jul 05 2010
parent reply div0 <div0 users.sourceforge.net> writes:
On 05/07/2010 13:54, Richard Webb wrote:
 Hi,

 I just tried to build the spiritd test app with the current DMD2, and got the
error:

 spiritd\primitives.d(46): Error: template instance conv!(Match!(char)) matches
 more than one template declaration, spiritd\match.d(70):conv(T) and
 spiritd\match.d(71):conv(T)

 Is the current D2 supposed to be supported?

 Thanks,
 Richard Webb

It works in D2 up to and including 2.036. 2.037 it doesn't work, it looks like a compiler bug was introduced. The change log for that version doesn't even mention templates http://d.puremagic.com/issues/show_bug.cgi?id=4430 -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk.co.uk
Jul 06 2010
parent Richard Webb <richard.webb boldonjames.com> writes:
fwiw, i tried to work around this by changing the second conv function to:

      T conv(T, U)(in Match!(U) arg) { return T(arg._len); }

and then got a bunch of errors like:

    spiritd\impl\parse.d(36): Error: variable m cannot be read at compile time

Which looks like bug 3809.
If i change parseImpl to initialize 't' manually rather than using the struct
initializer, then the test app compiles and appears to work ok.
Jul 06 2010