Recent

Author Topic: Using Lazarus modules in other applications.  (Read 4844 times)

simone

  • Hero Member
  • *****
  • Posts: 687
Re: Using Lazarus modules in other applications.
« Reply #15 on: December 18, 2024, 01:18:26 pm »
Thanks for the encouragement. A couple of years ago I had the opportunity to delve into fcl-passrc, a little-known but very interesting library. Given the almost non-existent documentation, I had a fundamental help from Michael V.C., who was fantastic.

In particular, I conducted an extensive test of the aforementioned parser, even on the most esoteric syntactic forms of freepascal, detecting some bugs that Michael has always fixed, with almost real-time commits.

The version of fcl-passrc currently available with FPC 3.2.2 is therefore not updated and I'm using the one available in trunk. This version is able to parse almost all the syntactic forms described in the user guide (plus some missing ones, such as generic routines, i.e. those that are not class methods, but free standing).

Two years ago I created a library (Pas2XML) that analyzes a freepascal source and generates the syntactic tree, represented in XML format and/or in a tree data structure. I have not disclosed it, but I can do so if anyone is interested.

Now I have planned to create a so-called structured (or contextual) diff for free-pascal. I don't think there are any for it. I'm aware of https://modelmaker-structured-difference-viewer.software.informer.com/, which is designed for Delphi and doesn't work very well with other fpc syntaxes. Indeed, as well known, structured diffs are not language agnostic.
« Last Edit: December 18, 2024, 01:22:45 pm by simone »
Microsoft Windows 10/11 64 bit - Lazarus 3.8/4.0 FPC 3.2.2 x86_64-win64-win32/win64

440bx

  • Hero Member
  • *****
  • Posts: 6017
Re: Using Lazarus modules in other applications.
« Reply #16 on: December 19, 2024, 04:56:02 am »
A couple of years ago I had the opportunity to delve into fcl-passrc, a little-known but very interesting library. Given the almost non-existent documentation, I had a fundamental help from Michael V.C., who was fantastic.

In particular, I conducted an extensive test of the aforementioned parser, even on the most esoteric syntactic forms of freepascal, detecting some bugs that Michael has always fixed, with almost real-time commits.
Is creating some basic step-by-step tutorial(s) something you'd consider ? hopefully along with a little bit of documentation (for the trunk version since that is the most current.)

Two years ago I created a library (Pas2XML) that analyzes a freepascal source and generates the syntactic tree, represented in XML format and/or in a tree data structure. I have not disclosed it, but I can do so if anyone is interested.
I'm interested.  I'd love to have a good look at the library and an example program that uses it.

FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

LV

  • Sr. Member
  • ****
  • Posts: 389
Re: Using Lazarus modules in other applications.
« Reply #17 on: December 19, 2024, 08:24:54 am »
I recently developed a small project using PascalScript, which essentially serves as a little IDE for PascalScript. It required a lot of manual work, and due to a lack of time, I have set the project aside for now. Utilizing ready-made modules from Lazarus is a great idea!

simone

  • Hero Member
  • *****
  • Posts: 687
Re: Using Lazarus modules in other applications.
« Reply #18 on: December 19, 2024, 11:30:33 am »
A couple of years ago I had the opportunity to delve into fcl-passrc, a little-known but very interesting library. Given the almost non-existent documentation, I had a fundamental help from Michael V.C., who was fantastic.

In particular, I conducted an extensive test of the aforementioned parser, even on the most esoteric syntactic forms of freepascal, detecting some bugs that Michael has always fixed, with almost real-time commits.
Is creating some basic step-by-step tutorial(s) something you'd consider ? hopefully along with a little bit of documentation (for the trunk version since that is the most current.)

Two years ago I created a library (Pas2XML) that analyzes a freepascal source and generates the syntactic tree, represented in XML format and/or in a tree data structure. I have not disclosed it, but I can do so if anyone is interested.
I'm interested.  I'd love to have a good look at the library and an example program that uses it.

I'm glad to see that there is interest.

I don't know if I have time for a tutorial. Probably a complete example of use can make most of the relevant things clear to a programmer of average experience.

My Pas2Xml library based on fcl-passrc could be useful for this purpose. Before publishing it I should do some polishing, but I can anticipate it to you via personal message, for a first scrutiny by you.

I work with the trunk version, which is not perfectly backwards compatible with the one distributed with fpc 3.2.2, for some subsequent changes.

Among other things, the trunk version seems to have some memory leaks, for which I recently opened a bug report.
Microsoft Windows 10/11 64 bit - Lazarus 3.8/4.0 FPC 3.2.2 x86_64-win64-win32/win64

440bx

  • Hero Member
  • *****
  • Posts: 6017
Re: Using Lazarus modules in other applications.
« Reply #19 on: December 19, 2024, 11:54:46 am »
I don't know if I have time for a tutorial. Probably a complete example of use can make most of the relevant things clear to a programmer of average experience.
That sounds good, I have average experience. :)

My Pas2Xml library based on fcl-passrc could be useful for this purpose. Before publishing it I should do some polishing, but I can anticipate it to you via personal message, for a first scrutiny by you.
Whatever is most convenient for you.  Let me know if there is anything I have to do.

I work with the trunk version, which is not perfectly backwards compatible with the one distributed with fpc 3.2.2, for some subsequent changes.
That isn't a problem.

Among other things, the trunk version seems to have some memory leaks, for which I recently opened a bug report.
Nothing's perfect. ;)
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

simone

  • Hero Member
  • *****
  • Posts: 687
Re: Using Lazarus modules in other applications.
« Reply #20 on: December 19, 2024, 12:42:59 pm »
@440bx I'm about to send via personal messaging my library with an example of use, test cases, etc.

Forgive some sloppiness in the code and the (moderate) use of OOP :)

When I have time I will publish on GitHub (or similar, but I'm not a git enthusiast).
Microsoft Windows 10/11 64 bit - Lazarus 3.8/4.0 FPC 3.2.2 x86_64-win64-win32/win64

440bx

  • Hero Member
  • *****
  • Posts: 6017
Re: Using Lazarus modules in other applications.
« Reply #21 on: December 19, 2024, 12:48:50 pm »
@440bx I'm about to send via personal messaging my library with an example of use, test cases, etc.
Thank you.

Forgive some sloppiness in the code and the (moderate) use of OOP :)
I'll survive ;)
FPC v3.2.2 and Lazarus v4.0rc3 on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018