Re: Pascal analyzer - Yacc?



Borneq wrote:
I want to create Pascal code analyzer, language version Delphi/Kylix and Lazarus, this tool also will convert between Delphi/Kylix and Lazarus. I create library for Delphi and I want to use this library with Lazarus and LCL.
LCL and VCL are differ and I want to convert my library to avoid maintain two version.
I must parse Pascal code.

Keep in mind that you don't need to parse *all* Pascal code. You're making a tool to help you maintain your library, so you really only need to parse *your* Pascal code.

How big are the differences between what the Delphi IDE expects and what the Lazarus IDE expects? Do those differences really require you to parse and rewrite large amounts of your code? Or are the changes smaller, more local?

How have other cross-product libraries solved this problem?

Overall, I see your proposed solution as overkill for the problem you describe. I would have envisioned a unit or two with conditional compilation to unify the differences between the two Pascal dialects, leaving the rest of your project alone. At worst, maybe a Perl script. Am I being too naive? Are the differences really that big?

Where I found good Delphi grammar?

http://dgrok.excastle.com/Grammar.html

--
Rob
.



Relevant Pages

  • FPC/Lazarus linker crashes under Win98
    ... just tried the new Lazarus 0.9.12 on Win98 and the IDE and libraries ...
    (comp.lang.pascal.misc)
  • Re: Is there a future for Borland in .NET?
    ... because it then relies on another compiler to get anything ... > people with much existing Delphi code and ASM knowledge can use it as a ... Delphi has always dependancies on Microsoft Libraries? ... you must either compete on cost or compete on feature ...
    (borland.public.delphi.non-technical)
  • Re: Is FPC an option in BDS because of MSBuild?
    ... Delphi is more powerfull than Lazarus and this is unlikely to ... Delphi" will every become. ... a "FPC inside Delphi". ... Delphi IDE refactors *Delphi* source code, ...
    (borland.public.delphi.non-technical)
  • Re: Is there a future for Borland in .NET?
    ... because it then relies on another compiler to get anything ... with a few changes we now how Delphi for .Net for the ... Delphi has always dependancies on Microsoft Libraries? ... server product that support ASP.NET now. ...
    (borland.public.delphi.non-technical)
  • Re: Was hat Zukunft
    ... Doch MS will Fox nicht mehr und für kleine ... im Forum auch besprochen wurde. ... Du kannst im Lazarus ja in einem Text Feld Eingaben vorgeben ... Es ist auch möglich die Komponenten, die im Delphi ja als Source ...
    (microsoft.public.de.fox)