'------------------------------------------------------------------------------
'
'                                 C2PB
'
'                           By Randall L Glass
'
'                             Copyright 2002
'
'
'------------------------------------------------------------------------------


    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-------------------------------------------------------------------------------
Contact Info: rlglass2@yahoo.com
-------------------------------------------------------------------------------

Remember the days when vcrs first came out. The BETA vcr was clearly
the better machine. The picture was much much better then the VHS.

So why didn't the BETA become the vcr standard ?

It was because that there was more movies on tape for the VHS then for the
BETA.

Powerbasic is the clearly a munch better computer language then C.

And why pray tell is C so popular ?

C is definately a terrible programming language.

The reason is this. There is way more source code for C then PowerBasic.
The only way to make PowerBasic the number 1 programming language is to make
sure there is more source code for it then C.

And now that wealth of C source code on the net is now available to be
translated to PowerBasic.

C2PB enables PowerBasic programmers to translate C to PowerBasic.

It will do about 85 Percent of the work for you.

You will need a C refernece book most likely. Also some of the C is left
untranslated.

You will need to use the C reference to translate C strings to PowerBasic
Strings. And to translate file input and output statements.

C2PB might translate some subsets of C++.

------------------------------------------------------------------------------
I am including a GNU C preprocessor.

You will need to use the C prepressor first enable you to translate the C.

Also you will need C include files. (hint C include files have a extension of
".H")

Borland has a software museum; where you can download old C compilers for
free. You can get the include files from there.

Syntax:

CPP -P -I include directory CFileIn CPrecprocessFile

C2pb CPrecprocessFile

-----------------------------------------------

Hint on translating C while

WHILE ++I  ' must replace with assignment,if and gotos
         statements
WEND

WhileLoop:
INCR I
IF I = 0 THEN GOTO WendLabel
         statements
GOTO WhileLoop
WendLabel
-------------------------------------------------------------------------------

I am including the extended bnf for the C language.

To use it you will need to download my recursive descent compiler complier
from http://www.powerbasic.com/files/pub/pbdos/tools/rdcc.zip.

-------------------------------------------------------------------------------

I am also including a alpha version C PreProcessor. It is close to being
finished.

You can probably use the expression evaluator in other programs.

Also you can probably use the scanner in the PreProcessor.

-------------------------------------------------------------------------------
C2PB is a beta version.
------------------------------------------------------------------------------
