[Lazarus] Parser
Marco van de Voort
marcov at stack.nl
Thu Jul 1 09:32:11 CEST 2010
On Thu, Jul 01, 2010 at 08:48:00AM +0200, Florian Klaempfl wrote:
> >> And, frankly, the project is called "Free Pascal" for a simple reason:
> >> it is a *Pascal* compiler and a *Pascal* project.
> >
> > I'm sorry. Can't agree with that.
> >
> > I'm still dreaming of a FreeWirth (though admitted, M2 is so close (both
> > parsing, modulesystem and language type) that one could regard it as a
> > dialect.
>
> Aren't you against a e.g. .Net backend because it requires a completely
> different runtime :)? I think the same applies to M2 etc. as well?
No, I don't think so. Since they map semantically so much pretty much the
same, you can just have a sysm2 unit for some needed M2 extensions, and use
the System unit as is. The only standard unit which already exists is
"process" iirc. (for tprocess), but I have to be careful here, having used
a not entirely compliant M2 compiler.
The compiler is a bigger problem I think, scanner (case sensitive) and
parser must be separate. But they probably can share quite some helper
routines.
Topspeed Pascal and Modula2 could use eachothers modules without headers. It
is probably easier to do this than not. A FPC specific change would be to
stuff the .DEF into a ppu etc, and not read them on import, as is tradition.
The Pascal was more ISO like though, but it had TP compat too.
But it also depends on how strict you want to be. I don't necessarily opt
for 100% conformance and thus don't have to care about e.g. only export exactly the
standarized identifiers from SYSTEM. (though in theory, that could be
handled by a preproc symbol that hides it from M2 imports)
But there is a reason why I come up with fork-for-a-while schemes. I
actually have thought a long time about how I would organize this:-)
First show something, then talk about merging. But with M2 I hoped it was
sooner because less intrusive. (but my schedule would still be like 2 year
after a decent proof of concept for FPC to asorb it. And then even longer
to release it as stable.)
p.s. I must not forget a lottery ticket this month.
More information about the Lazarus
mailing list