DCT: D compiler as a collection of libraries

Roman D. Boiko rb at d-coding.com
Mon May 14 12:21:49 PDT 2012


On Monday, 14 May 2012 at 19:13:39 UTC, Roman D. Boiko wrote:
> On Monday, 14 May 2012 at 19:04:20 UTC, Tove wrote:
>> What if there were two different lex:er modes... with 
>> different struct:s.
>>
>> 1. For an IDE with on the fly lexing:
>>  Assumption, the error rate is high.(need to keep much info)
>>
>> 2. For the compiler
>> Assumption, the error rate is non existent, and if there is an 
>> error it really doesn't matter if it's slow.
>>
>> So... when choosing the "compiler mode"... and there actually 
>> is an error, then just lex it again, to produce a pretty error 
>> message ;)
...
> The problem with multiple lexer implementations is that it might
> become much more difficult to maintain them.
Just to clarify: different modes in lexer in my view are like two
different implementations combined in a non-trivial way (unless
the difference is minor). So complexity goes from two factors:
different implementations and how to combine them. I try to avoid
this.


More information about the Digitalmars-d-announce mailing list