On 2012-05-11 10:01, Roman D. Boiko wrote:
There were several discussions about the need for a D compiler library.
I propose my draft implementation of lexer for community review:
https://github.com/roman-d-boiko/dct
Lexer is based on Brian Schott's project
https://github.com/Hackerpilot/Dscanner, but it has been refactored and
extended (and more changes are on the way).
The goal is to have source code loading, lexer, parser and semantic
analysis available as parts of Phobos. These libraries should be
designed to be usable in multiple scenarios (e.g., refactoring, code
analysis, etc.).
My commitment is to have at least front end built this year (and
conforming to the D2 specification unless explicitly stated otherwise
for some particular aspect).
Please post any feed here. A dedicated project web-site will be created
later.
If think that the end goal of a project like this, putting a D frontend
in Phobos, should be that the compiler should be built using this
library. This would result in the compiler and library always being in
sync and having the same behavior. Otherwise it's easy this would be
just another tool that tries to lex and parse D code, always being out
of sync with the compiler and not having the same behavior.
For this to happen, for Walter to start using this, I think there would
be a greater change if the frontend was a port of the DMD frontend and
not changed too much.
--
/Jacob Carlborg