Recent

Author Topic: PAS2PHP  (Read 2173 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
PAS2PHP
« on: October 11, 2019, 04:52:16 pm »
Hi guys, for a project that I have in mind I'd like to convert some pascal to php. I know that PAS2PHP (https://sourceforge.net/projects/pas2php/) exists (or I didn't understand how to make it work or that version is no longer compatible with lazarus). Does anyone have a working version with lazarus 2.1.0? thanks a lot
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: PAS2PHP
« Reply #1 on: October 11, 2019, 10:00:29 pm »
Hi guys, for a project that I have in mind I'd like to convert some pascal to php. I know that PAS2PHP (https://sourceforge.net/projects/pas2php/) exists (or I didn't understand how to make it work or that version is no longer compatible with lazarus). Does anyone have a working version with lazarus 2.1.0? thanks a lot
PAS2PHP - Pascal to PHP Transpiler
http://www.wascal.net/

"Pas2Php will translate a large subset of Object Pascal to PHP, allowing you to write web applications using Lazarus/FreePascal, and then run the application on a standard HTML/PHP server.
Over the last week, a lot of work has gone into Pas2Php. Most of the major issues are resolved. There are still a number of incompatibilities which are either not fixable, or have simple workarounds. As of v0.5, you should be able to write entire PHP applications in Pascal. The key to coding for Pas2Php is to understand the limitations of PHP. Read the example code provided, and always check the outputted PHP code to understand how this works.

As a guide to what Pas2Php can achieve... this web site is written in Pascal, and then converted to PHP. (The code is in the source package). Pas2Php uses the Pascal Parse Tree Classes (PasTree) which comes with FreePascal, and therefore the parsing limits are defined by this library.

You can download the latest source of Pas2Php from this site which includes an example project. There isn't much documentation, so, if you want to use Pas2Php, you will have to experiment with the code."


Documentation:
http://web.archive.org/web/20171024005817/http://www.wascal.net/?page=wascal/documentation
http://web.archive.org/web/20170701090856/http://www.wascal.net/doc/index.html


You should contact Pas2Php's author directly:
"You may contact me via: derek.john.evans at hotmail.com.
2014 Derek John Evans
http://web.archive.org/web/20171024005116/http://www.wascal.net/?page=contact"

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: PAS2PHP
« Reply #2 on: October 13, 2019, 12:22:07 pm »
You should contact Pas2Php's author directly:
"You may contact me via: derek.john.evans at hotmail.com.
2014 Derek John Evans
http://web.archive.org/web/20171024005116/http://www.wascal.net/?page=contact"

Thank you
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018