<div class="gmail_quote">On Tue, Nov 5, 2013 at 3:54 PM, Dmitry Olshansky <span dir="ltr"><<a href="mailto:dmitry.olsh@gmail.com" target="_blank">dmitry.olsh@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="im">
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote"> </blockquote><br></div>I was also toying with the idea of exposing Builder interface for std.regex. But push/pop IMHO are better be implicitly designed-out:<br>
<br>auto re = atom('x').star(charClass(<u></u>unicode.Letter),atom('y')).<u></u>build();<br><br>... and letting the nesting be explicit.<br><br>Is the same as:<br>auto re = regex(`x(?:\p{L}y)*`);<br><br>Aimed for apps/libs that build regular expressions anyway and have no need in textual parser. 
<div class="im"><br></div></blockquote>
<div> </div>
<div>Another possible advantage is to reference external names inside your construction, thus naming other regexen or refencing external variables to deposit backreferences inside them. All in all, to get a regex construct that can interact with the external word.</div>

<div> </div>
<div> </div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="im"><br>What ANTLR does is similar technique - a regular lookahead to resolve ambiguity in the grammar (implicitly). A lot like LL(k) but with unlimited length (so called LL(*)). Of course, it generates LL(k) disambiguation where possible, then LL(*), failing that the usual backtracking. </div>
</blockquote>
<div> </div>
<div>I liked that idea since the author added it to ANTLR, but I never used it since.</div>
<div>I wonder whether that can be implemented inside another parser generator or if it uses some specific-to-ANTLR internal machinery.</div>
<div> </div>
<div> </div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="im"><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote"><br>*sigh*, I feel like I could write a paper on this stuff if I were in<br>grad school right now.  Alas, I am stuck doing 50-60 hours a week of<br>
soul-sucking business programming.<br></blockquote><br></div>I heard Sociomantic is hiring D programmers for coding some awesome stuff, you may as well apply :) </blockquote>
<div> </div>
<div> </div>
<div> </div>
<div>Well, I do 50-60 hours a week of fulfilling and challenging work, but the free time at the end is the same ;) I feel Chad's pain, though.</div>
<div> </div>
<div> </div>
<div> </div>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="im">
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Well, then again, my understanding<br>is that even though I can think of things that seem like they would make<br>
interesting topics for publishable papers, reality would have the profs<br>conscript me to do completely different things that are possibly just as<br>inane as the business programming.<br><br></blockquote></div>Speaking for my limited experience - at times it's like that. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">I worry that the greater threat to good AST manipulation tools in D is a<br>lack of free time, and not the DMD bugs as much.<br>
</blockquote><br></div>Good for you I guess, my developments in related area are blocked still :( 
<div class="HOEnZb"> </div></blockquote>
<div> </div>
<div>Walter is far from convinced that AST manipulation is a good thing. You would have to convince him first. His fear is that it will lead to unreadable code, and everyone using her own personnal version of D.</div>
<div> </div>
<div>AFAICT, nothing of the sort happened in Lisp (I mean, Lispers have balkanization, but *not* due to AST manipulation).</div>
<div> </div></div>