On Monday, 14 July 2014 at 11:43:01 UTC, Philippe Sigaud via
Digitalmars-d-learn wrote:
You can try Pegged, a parser generator that works at
compile-time
(both the generator and the generated parser).
I did, and I got it to work. Unfortunately, the code used to in
the CTFE is left in the
I did, and I got it to work. Unfortunately, the code used to in the CTFE is
left in the final executable even though it is not used at runtime. So now
the question is, is there away to get rid of the excess baggage?
Not that I know of. Once code is injected, it's compiled into the executable.
I am trying to write some code that uses and matches to regular expressions
at compile time, but the compiler won't let me because matchFirst and
matchAll make use of malloc().
Is there an alternative that I can use that can be run at compile time?
You can try Pegged, a parser generator that
On 07/14/14 13:42, Philippe Sigaud via Digitalmars-d-learn wrote:
asserts get an entire copy of the parse tree. It's a bit wasteful, but
using 'immutable' directly does not work here, but this is OK:
enum res = MyRegex(abcabcdefFOOBAR); // compile-time parsing
immutable result = res;
On Mon, Jul 14, 2014 at 3:19 PM, Artur Skawina via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
On 07/14/14 13:42, Philippe Sigaud via Digitalmars-d-learn wrote:
asserts get an entire copy of the parse tree. It's a bit wasteful, but
using 'immutable' directly does not work here,
Hi
I am trying to write some code that uses and matches to regular
expressions at compile time, but the compiler won't let me
because matchFirst and matchAll make use of malloc().
Is there an alternative that I can use that can be run at compile
time?
Thanks in advance.
Jason