| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 | 1. Rapid-Q alternative found! --- BTP #1026 | I just tried BTP (Basic To Pascal translator), very close to Rapid-Q, recommend all of you, Rapid-Q lovers, take a try also:
http://www.binaryuniverse.com/btp.htm
1) Download btpwinsetup.exe, 16.2MB, FPC (Free Pascal Compiler) included. Default install in c:\fpc. 2) Download btpwin2003_06_23.rar (or later), un-rar to c:\fpc\bin\win32 3) Setup a tool in your source editor, for example, I use Crimson Editor: Command: C:\FPC\bin\win32\btp.exe Argument: "$(FilePath)" 4) Open examples in C:\FPC\btp\examples to view and try. btp.exe will translate the .btp source into pascal then call fpc then upx, all in one command, create a exe finally(seems smaller than RQ's). | 2. Re: Rapid-Q alternative found! --- BTP #1027 Posted by: 2003-07-03 22:07:24 | Last Week when I tried to install btpwinsetup.exe (size 17 030 671), NORTON ANTIVIRUS sent me a virus warning for "BACK DOOR LOLOK B"
At first try today I still got that warning. I decided to UPGRADE the NORTON virus definitions, to reboot and to retry the instalation.
NO VIRUS WARNING ANYMORE ! It's now installed.
So the previous virus warning was ERRONEOUS. If this happen to somebody else, BTP IS SAFE.
For RAPIDQ JFE USERS : to translate and compile .BTP files, simply link the extension .btp to your RapidQ JFE (will use RQ Syntaxe color) then create a new TOOL under JFE : named ???BTP??? or whaterver you decide application : C:FPCBINbtp.exe (point your btp.exe start directory : $PATH parameters : $PATH$FILE
Jacques | 3. Reply from the author #1028 | From: Prof. Roberto A. Berrospe Machin To: Guidance Size: 1 KB Well, thanks.. yea, btp is a very hard work i have created myself trying to build the syntax like the rapidq compiler. But need a lot of work and i need help from programers because i very hard to implement a good compiler working alone... :)
Talking about the forum, i dont have problems if you like to use that you have recomended to me, but i dont like to moderate it, because i have a very low time to dedicate to the forum, im working and in the free time i dedicate a little time to work with BTP.
Well, if you know about any programer can helpme with BTP please put in contact with me....!
Enjoy BTP... Up the free soft! jeje
:)
Grettings... | 4. Re: Rapid-Q alternative found! --- BTP #1029 Posted by: 2003-07-05 08:54:59 | That RapidQ to Pascal Trabnslator should be written in RapidQ, not in Pascal !
To see what FPC (Free Pascal Compiler) and Lazarus can do
http://www.lazarus.freepascal.org/
Dev-Pas (Mucgh like Dev-Cpp) http://www.bloodshed.net/devpascal.html
http://www.freepascal.org/
Jacques | 5. Re: Rapid-Q alternative found! --- BTP #1030 | Have you checked its source? Should be BTP itself now, I have a glance of the declaration by the author, somewhere, not confirmed yet. | 6. Re: Rapid-Q alternative found! --- BTP #1031 Posted by: 2003-07-05 19:06:31 | Yes, I had a look at the file btp.atg (BTP Compiler source)! But I have not been able to compile it using FPC ! I Dont know much about compiling Pascal ;)
You wrote "Should be BTP itself now" ! Did you try to compile Simple Basic console code ? Print 69 * 96 or Print (69 * 96) returns an error ...
The returned errors relates to the compiler Pascal translation file of the basic code and that .Pas file is deleted by the BTP compiler ... In these conditions it's hard to work on the compiler :)
Anyway, it's a great Job, showing us how to give a second life to RapidQ.
Did you have succes working with Lazarus (+ FPC ???) ? If you tried !
Jacques | 7. Re: Rapid-Q alternative found! --- BTP #1048 Posted by: 2003-07-26 03:00:21 | Hey guys.. i have writed a mail to RapidQ forum.. Well in the new version as i write to group, i have corrected a lots of bugs.. and now for example PRINT (69 * 96) Work fine. And I have added a lots of new functions.
But i have moved the project to BLOC (http://bloc.arachnoware.com) The file you find here is old, but i whant to upload the last release in the next week...
In the other hand.. if you like to analize the source of the generated pascal file, try to use the directive $COMPILE OFF at the first line of the basic code.. This prevent to compile the pascal code and dont delete the .pas file.
About the source code of BTP (now BLOC) the real source code is a misture of Cocor (EBNF) and Pascal. I decide to use the cocor compiler compiler because it facilites all the work using a sintax like (BNF) but extended (EBNF) and is really good for understand the compiler source...
If you like to compile the bTP source code, first look at the file called BTP.ATG that is the cocor source code... you need to translate it to a 100% pascal code using cocor like this..
cocor -c btp.atg
this generates the btp.pas, btpp.pas and btps.pas. this files are the main compiler module (btp.pas), the parser (btpp.pas) and the scanner (btps.pas).
Now the next steep for compile the final exe is simply.
fpc -So btp.pas
this compiles the btp to an executable. The -So activate the compatibility with turbo pascal, because cocor is thinked for work with turbo pascal, but this is not a problem for fpc.
(note: the cocor i include in the distribution is very modifyed by me, is not the original)
Well, it is very easy to understand cocor. the cocor work like functions.. so look at this..
btp = {programbody}. programbody = DIMDecl. DIMDecl = "DIM" identifier "AS " ("STRING" | "INTEGER").
As you can see, this is a BNF like source code.
This works like this.. the BTP is the main function that expect some in the programbody.
The programbody with braces {programbody} is for iterations because all you put in {} is repeated while a condition is executed, like EOF.
well, the programbody function search for a DIMDecl Function...
The DIMDecl function need to find the "DIM" string, after need and identifier, the "AS" string, and one off "STRING" or "INTEGER" strings..
As you can see there are new things; like the STRING and INTEGER in parentesis.
The parentesis in cocor is used for grouping. In this case is used for select two oprtion "THIS" or "THIS" wheres | says OR; so "STRING" or "INTEGER" and grouping it ("STRING" | "INTEGER").
You need to see all before equals sym (=) as a function.. this in pascal is some like this...
function _DIMDecl(); begin getankeyword; if thekeyword = DIM then begin getanewidentifier; getanewkeyword; if thekeyword = AS then begin getanewkeyword; If (thekeyword = STRING) or (thekeyword = INTEGER) then exit else Error(3); end else Error(2); end else Error(1); end;
There are other needed thing like a manner of add my actions.. the pascal actions when something is occurred need the use of (. and .)
for example, i like to print "DIM FOUND" when the dim is encounter in a the source code, well i can use (. .) for make this real!...
btp = {programbody}. programbody = DIMDecl. DIMDecl = "DIM" (. WriteLn('DIM FOUND') .) identifier "AS " ("STRING" | "INTEGER").
The added code (. WriteLn('DIM FOUND') .) uses the pascal WriteLn for take the action to write the console the message of a DIM Found....
But the cocor have a lots of utils things, as you can see in my BTP.ATG at the first lines i declare my own function and procedures, variables, types and const, used by me for take an action when is needed...
So, you can learn some of the usedfull cocor compiler compiler for make your life more easy.. :)
the diferences betwen pascal and basic are not very complicated..
you need to know the lines ends with ";" and an asignation uses ":=" instead "=", the functions and procedure, ifs, fors, etcs.. begins with "BEGIN" and ends with "END;"
You can see the code i generate with BTP (BLOC NOW) for learn some pascal...
Dont Forget to use $COMPILE OFF to obtain the main pascal source code.
Well, grettings.. in some days im online 24h for day ;) i have contrated an fixed internet conection.
Gretings..
Prof. Roberto A. Berrospe Machin | 8. Re: Rapid-Q alternative found! --- BTP #6063 Posted by: 2005-04-30 17:38:27 | Hello everybody!
I am happy to know the effort to develop an alternative for RapidQ compiler especially BTP which from the mails in the forum I understand is a translator from Basic to Pascal. However, there is another alternative being developed called 'HotBasic'. It is claimed that it is a true compiler creating native machine code and it not a psuedo-compiler or interpreter. By if you want to download and use Version 1.1 or above, you have to register it for 69 dollars!
I wish to know from Prof. Roberto whether BTP is able to translate GUI applications also. I have found GUI programming very easy using RapidQ. I would also like to know whether FPC provides a GUI library.
Best wishes,
Nirmal | Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
|
|