BLADE 0.2Alpha: Vector operations with mixins, expression templates, and asm

BCS BCS at pathlink.com
Tue Apr 10 10:54:20 PDT 2007


> KlausO wrote:
> 
>> Pragma schrieb:
>>>
>>> I had an earlier cut that looked a lot like this. :)  But there's a 
>>> very subtle problem lurking in there.  By making your entire grammar 
>>> one monster-sized template instance, you'll run into DMD's 
>>> identifier-length limit *fast*.  As a result it failed when I tried 
>>> to transcribe Enki's ENBF definition.  That's why I wrap each rule as 
>>> a CTFE-style function as it side-steps that issue rather nicely, 
>>> without generating too many warts.
>>>
>>
>> Another issue I ran into is circular template dependencies. You could 
>> get nasty error messages like
>>


The way my dparse sidesteps this (both the id length limit and forward 
references) is to have the parser functions specialized only on the name 
of the reduction, the grammar is carried in an outer scope (the mixed in 
template that is never used as an identifier). This also allows the 
inner template to specialize on anything that is defined.



More information about the Digitalmars-d mailing list