Is there a template syntax for alias-of-member?

Bill Baxter dnewsgroup at billbaxter.com
Fri Mar 7 11:19:08 PST 2008


Russell Lewis wrote:
> Bill Baxter wrote:
>> If that's not enough, try being more specific about what you are 
>> actually trying to do, and maybe someone can offer a better solution.
> 
> I'm trying to build a parser library.  The syntax I'm experimenting with 
> is:
>     parse(output_type, <member names>...)
> where the library figures out the type of each member and automatically 
> calls the correct parse() function at the right time.  (The order in 
> which you call the various member names determines the order in which 
> the various nonterminals must show up in the file being parsed.)
> 
> I already have the mechanics of the parser library working, but it's not 
> easy to use.  The point of the template is to auto-generate most of the 
> client-side code.

Ok.  So the literal "=1" part in your example would be replaced with a 
type specific parse function.

I think the direction you're going is the best you can hope for right 
now.  It's pretty darn decent, though, if you ask me.

--bb


More information about the Digitalmars-d-learn mailing list