Page 4 of 6

Posted: Mon Jul 27, 2009 5:19 am
by AND51
Update!!
Now version 1.5 provides MULTILINE SYNTAX and some minor enhancements.

To activate the parsing mode, please set the -p or --param parameter. Parsing takes much time, so only activate it, if neccessary.

There are 3 parsing modes:
  1. Multiline with (CR)LF replacement. Each (CR)LF in the code will be replaced with +#CRLF$+. You can either enforce CRLFs, LFs or let the interpreter choose automatically. Depending on the OS (Linux or Windows) it will select CRLF or LF.
    Possible starting token: <<multi, <<multiline, <<here, <<crlf (enforces newlines to be CRLFs), <<lf (enforces LFs only
  2. Multiline without newline replacement: Simply sticks multiple lines together. Hint: Append a trailing space, if you want to normal text over multiple lines.
    Possible starting token: <<
  3. Insert an external file at the current position and handle it like mode 1, i. e. with CRLF-replacement.
    Possible staring token: <<include, <<file
Syntax:
Multiline code is started end ended with the token << (like the PB bit shift operator). It is inserted at where the starting token is located. Note that the first newline (directly after <<) and the last newline (directly before <<) do not count! If you need prepending/trailing newlines, you must hardcode them yourself.



Example mode 1:

Code: Select all

OpenConsole()
Print("<<multiline
<html>
<head>
	<title>My Website</title>
</head>
<body>
	This is HTML code
</body>
</html>
<<")
Note that you can put code after the ending token!! This code is being included when transforming multiline code to a single line of code.
Result wrote:OpenConsole()
Print("<html>"+#LF$+"<head>"+#LF$+" <title>My Website</title>"+#LF$+"</head>"+#LF$+"<body>"+#LF$+" This is HTML code"+#LF$+"</body>"+#LF$+"</html>")

Example mode 2:

Code: Select all

name$="Homer"
OpenConsole()
Print("<<
To do: 
feed pets,
 housework, 
meet "+name$+".
<<") : Debug "This should be on the same line"
Note: Don't forget to append a space (" ") after each line (feed pets) or before the next line (housework), if you want normal, readable text.
Result wrote:name$="Homer"
OpenConsole()
Print("To do: feed pets, housework, meet "+name$".") : Debug "This should be on the same line"
Note that you can interrupt multi line code and you can insert any variables or expressions - just like you can do with single line code. This also applies to mode 1.


Example mode 3:
File hello.txt

Code: Select all

Hello from an external file! My address is:

File address.dat

Code: Select all

Homer Simpson
Evergreen Terrace 13
Springfield
Sytnax:

Code: Select all

OpenConsole()
Print("<<file
/hello.txt
/gaga.tmp
/address.dat
<<")
Note that files that can't be read or that don't exist, are skipped.
Result wrote:OpenConsole()
Print("Hello from an external file! My address is:

Homer Simpson
Evergreen Terrace 13
Springfield

Posted: Tue Jul 28, 2009 8:46 pm
by TerryHough
I can't seem to extract the zip files for Vs 1.5

Posted: Tue Jul 28, 2009 11:17 pm
by AND51
I used 7-Zip with LZMA compression. With 7-Zip I can open the zip file without any problems.
I created a new package with Deflate compression, try this. Link is the same as usual.

Posted: Wed Jul 29, 2009 5:57 pm
by TerryHough
I can unzip it now.

I even got it to run once with the free Windows based Abyss server software available here. http://www.aprelium.com/abyssws/

After that it hasn't run again.

I've run Abyss for several years quite successfully. Never tried using PB in any way with it though. Really would be nice to have PB programs working with it.

Posted: Wed Jul 29, 2009 9:07 pm
by AND51
Don't forget that the PB Interpreter was invented & developed on Linux with Apache!
I got no experience with other OS's or other Webservers!
But it doesn't use any API, so you can adjust it for Windows easily. You just have to go along the code lines and change it where neccessary, e. g. change all frontslahes / by backslashes \ etc.
Just read this whole topic, to get more hints on what you could change.
For example, when the executable filname is being built, all frontslashes / are removed; however, on Windows you must also remove the : colon (the line with Define exe$=...).


> I've run Abyss for several years quite successfully.
CGI (Common Gateway Interface) is a worldwide standard for webservers interact with third party programs. You could even use every other language (C, C++, Delphi, ...) as long as they can read from STDIN and write to STDOUT. Actually, Perl and PHP are also external interpreters working via CGI, using the stdin/stdout-system.

Re: PB Interpreter » Use PB instead of PHP or Perl for websites!

Posted: Mon Dec 14, 2009 7:46 pm
by blueznl
Any new develoments for this one?

Re: PB Interpreter » Use PB instead of PHP or Perl for websites!

Posted: Tue Dec 22, 2009 8:22 pm
by X
Interested as well, looks like it died.

Re: PB Interpreter » Use PB instead of PHP or Perl for websi

Posted: Sat Jul 31, 2010 10:51 pm
by DoubleDutch
The link on the first thread comment (to the latest version) is bad. Does anyone have a valid link?

Re: PB Interpreter » Use PB instead of PHP or Perl for websi

Posted: Wed Aug 18, 2010 10:18 am
by cybergeek
dead links :cry: :cry: :cry:
i really want this

Re: PB Interpreter » Use PB instead of PHP or Perl for websi

Posted: Fri Aug 20, 2010 3:28 pm
by cybergeek
no good links?

Re: PB Interpreter » Use PB instead of PHP or Perl for websi

Posted: Mon Aug 23, 2010 4:17 pm
by AND51
Hello,

I've paused the developement of this project. The link you are requesting is just a Zip file containing the source code (version 1.5, see first page) plus the source compiled as linux-binary and windows-exe. Nothing more.
So if you take the source code from page one, you have exactly the same version as the dead link. I have no newer version, otherwise I would have published it here.

Sorry for the inconvenience. If I continue the work on this project, I'll let you know. :)

:idea: In the meantime, you could post links to your PureBasic-websites here to demonstrate the people, what you've made from this project.

Re: PB Interpreter » Use PB instead of PHP or Perl for websi

Posted: Tue Aug 24, 2010 11:20 am
by cybergeek
ok....

now i have uploaded my PB win32 installation with the interpreter.exe


and here is a pb file: http://umar.sitefrost.com/junk/hello.pb

it doesnt work


server runs Cpanel with linux and apache

Re: PB Interpreter » Use PB instead of PHP or Perl for websi

Posted: Tue Aug 24, 2010 11:49 am
by cas
cybergeek wrote:ok....

now i have uploaded my PB win32 installation to http://umar.sitefrost.com/pb/ with the interpreter.exe


and here is a pb file: http://umar.sitefrost.com/junk/hello.pb

it doesnt work


server runs Cpanel with linux and apache
I think that You are violating PureBasic license because now anyone can download paid version of PureBasic compiler from your site for free. Please remove that directory from public_html and put it somewhere else where it will not be accessible by browser, or at least protect it with .htaccess.

Re: PB Interpreter » Use PB instead of PHP or Perl for websi

Posted: Tue Aug 24, 2010 12:38 pm
by cybergeek
you edit your post and remove the link of my website

Re: PB Interpreter » Use PB instead of PHP or Perl for websi

Posted: Tue Aug 24, 2010 12:45 pm
by srod
That must still be illegal. Placing the PB compiler on a publicly accessible website...