AminetAminet
Search:
81001 packages online
About
Recent
Browse
Search
Upload
Setup
Services

dev/lang/Draco2C.lha

Mirror:Random
Showing:m68k-amigaosppc-amigaosppc-morphosi386-arosi386-amithlonppc-warpupppc-powerupgeneric
No screenshot available
Short:Draco-to-C source code translator
Author:james.jacobs at bigpond.com (James Jacobs)
Uploader:james jacobs bigpond com (James Jacobs)
Type:dev/lang
Version:1.0b
Requires:OS2.0+
Architecture:m68k-amigaos >= 2.0.0
Date:2005-07-31
Download:http://aminet.net/dev/lang/Draco2C.lha - View contents
Readme:http://aminet.net/dev/lang/Draco2C.readme
Downloads:1283
This program attempts to translate source code from Draco to ANSI C. Draco
is a programming language by Chris Gray, the most recent version of which
is Draco 1.2, dated 28/1/89. As development of Draco has ceased, it is
important to be able to convert programs written in that language to C.
This program has been written with that end in mind.
  SAS/C source code is included.

Usage is as follows:

    1> Draco2C <file> [-a|AMIGATYPES]

For example:

    1> Draco2C sieve.d -a

Output goes to CON: by default. You can redirect this if desired:

    1> Draco2C sieve.d >sieve.c

The AMIGATYPES argument makes the program use Amiga-style type
definitions such as ULONG, etc., otherwise K&R-style type definitions
such as unsigned int, etc. are used.

It is assumed that the input file is a valid Draco file which conforms
to Draco syntax rules; passing malformed files will most likely cause
the program to hang. In most cases the .c file produced will require
some amount of hand editing before it will compile and run correctly;
however, the program at least does the repetitive gruntwork for you
automatically. It has been tested with a variety of Draco source code.

The following are supported:

(:, :), ($, $), /=, $-, $/, ^, # trigraphs.
and, bool, by, byte, case, char, corp, default, do, downto, elif, else,
 esac, false, fi, for, if, ignore, incase, int, long, nil, not, od, or,
 proc, short, then, true, type, uint, ulong, upto, ushort, while
signed, unsigned (these may be larger in C than they would be in Draco).
array notation.
in string literals: \e, ''
:=, ~=, *., ><, = operators.
include files.
argument lists.
constants.

The following are unsupported:

 at , arbptr, boid, code, dim, enum, error, free, make, new, pretend, range.
Operator types.
Pointer arithmetic.
I/O subsystem.
| prefix numeric absolute value operator.
[*] array sizing method.
Range notation (eg. 'a' .. 'z').
Extended while.
: (as used in I/O subsystem).
return codes.
"\(number)", "0bnumber" notation styles.
escaped quotes in strings.
* postfix dereferencing operator.

URL:   http://www.users.bigpond.com/james.jacobs/
EMail: james.jacobs at bigpond.com

James Jacobs of Amigan Software
30 July 2005


Contents of dev/lang/Draco2C.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                 8380   17584  47.7% -lh5- f881 Jul 30 19:50 Draco2C/Draco2C
[generic]                 1311    2447  53.6% -lh5- 14ea Jul 30 17:58 Draco2C/Draco2C.readme
[generic]                 6888   35489  19.4% -lh5- d38f Jul 30 19:47 Draco2C/Source/draco2c.c
[generic]                   86     102  84.3% -lh5- 73eb Jul 30 10:48 Draco2C/Source/draco2c.sasc
[generic]                  119     225  52.9% -lh5- 50a2 Jul 30 19:37 Draco2C/Source/lint.h
[generic]                  152     231  65.8% -lh5- d197 Nov 22  2003 Draco2C/Source/scoptions
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         6 files   16936   56078  30.2%            Jul 31 23:52

Aminet © 1992-2014 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>