How simple is D for a compiler?
kellywilson at nowhere.com
kellywilson at nowhere.com
Fri Feb 24 08:14:57 PST 2006
In article <dtn7bk$2b9a$1 at digitaldaemon.com>, Bruno Medeiros says...
>
>Thomas Kuehne wrote:
>>
>> Frontend: Writing a parser for D is a joy.
>> (About a year a go I wrote a parser for and in D with ca. 200LOC.)
>>
>
>A parser in 200 LoC? Surely you meant a lexer? Or perhaps it's the 200
>LoC figure that is incorrect?
>
I would tend to agree here Bruno. Just the parse.c file supplied with dmd's
frontend is ~4700 LOC. The grammar file alone for my (incomplete) parser is
~1100. The Flex file is about 400 though, so maybe Thomas hand wrote the lexer
in 200? Maybe a typo and he meant 2000?
My two cents,
Kelly Wilson
More information about the Digitalmars-d
mailing list