struct vs class for a simple token in my d lexer

Era Scarecrow rtcvb32 at yahoo.com
Mon May 14 22:34:48 PDT 2012


On Monday, 14 May 2012 at 18:00:42 UTC, Roman D. Boiko wrote:
> On Monday, 14 May 2012 at 17:37:02 UTC, Dmitry Olshansky wrote:
>> But hopefully you get the idea. See something simillar in 
>> std.regex, though pointer in there also serves for intrusive 
>> linked-list.

> Thanks, most likely I'll go your way.

  If you don't mind doing some lite informational reading, read up 
on 'lex and yacc'. ISBN: 1-56592-000-7; Hope I got that right. 
I'm not telling you to use C (or the other tools mind you), but 
it does go into handling tokens of multiple types as well as 
managing them using pointers and unions. A good portion of that 
can carry over for your lexer and project.


More information about the Digitalmars-d-learn mailing list