[Lazarus] Parser
Marco van de Voort
marcov at stack.nl
Fri Jul 2 06:42:57 CEST 2010
On Thu, Jul 01, 2010 at 02:27:22PM +0200, Hans-Peter Diettrich wrote:
> > 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?
>
> IMO we could separate the language itself (syntax) from the RTL (semantics).
Hmm, what do you think RTL is in FPC context ? :-)
Note that the M2 port is so small is because it can use Pascal compiled
libraries. This means that dialect extensions etc to Pascal do not
necessarily have to be implemented for M2, making it mostly a parser thing.
.NET leaves the parser but requires a codegenerator change. So far so good.
With regards to libraries I have some doubts though. Will e.g. most code in
RTL/INC work for .NET without modification? (assuming we add a OS and arch
dir for .NET)
Moreover, if compromises are made, will they set well with the future .NET
port users, and won't this turn into a debate for more "native" .NET
functionality later ? ( Think Delphi.NET here)
> At least I can imagine the use of a different syntax at the procedure
> body (block, statement...) level, like already implemented for assembly
> language blocks. The requirement of *full* M2, Oberon or P# <g>
> compatibility IMO is very low, due to the few existing
> (public/commercial) projects in these languages.
It's the libraries that I fear. Now that Delphi.NET is gone, even Indy is
happy to remove all the TidBytes workarounds and allow pointers again.
For exactly the same reason, I don't think .NET and native in one project
will be a happy marriage.
> We also could make FPC an playground for language designers, which could
> implement their own languages in dedicated front-ends, as long as they
> use the existing FPC system library, tree nodes and other data
> structures, as far as these are hard-coded in the compiler, optimizer
> and code generators.
If it is just a playground, fork a playground. I don't want to see FPC as it
is carved up by continuous rewrites as a playground.
More information about the Lazarus
mailing list