[Coco] RELIC Is Coming (was Re: [ON TOPIC] The Amsterdam Compiler Kit)

Boisy Pitre boisy at boisypitre.com
Tue Feb 27 13:41:59 EST 2007


Joel,

Ragin' Basic is a work in progress at the moment, so what it can do  
is compile very simple programs like:


PROCEDURE addtwo
PARAM result, a, b : INTEGER
result = a * b
END

PROCEDURE main
DIM x : INTEGER
RUN addtwo(x, 3, 4)
PRINT "3 * 4 = ";x
IF x < 5 THEN
	PRINT "The result is less than 5!"
ELSE
	PRINT "The result is greater than or equal to 5!"
ENDIF
END


Currently, REAL and user-defined types aren't support.  Array's are  
also not supported yet and a number of built-in Basic09 functions  
(FIX, RND, etc) have yet to be implemented.  However, procedures are  
supported, as are parameters.

There are milestones built-in to the project that Dr. Roden and I  
have set to insure that there is a base level of functionality in the  
compiler, and it will be functional, though not 100% compatible with  
Basic09.  I intend to launch the project when the spring semester  
ends in May by making the source fully available on SourceForge.  At  
that point, anyone interested in extending the Ragin' Basic front-end  
to be fully Basic09 compatible can.  Or create a whole new  
language... Or adapt a number of freely available PCCTS grammars to  
generate the i-code that is used by the back-end.

For those attending the fest next month, I'll be giving a seminar on  
the project.

Boisy

On Feb 27, 2007, at 12:27 PM, Joel Ewy wrote:

> Boisy, this looks really interesting.  I've recently started  
> looking at
> BASIC09 again, and having fun with it.  What kind of subset is "Ragin'
> Basic"?  I'd love to see this work.  Keep us informed!
>
> JCE
>
> Boisy Pitre wrote:
>> Hey M,
>>
>> I was going to wait and post on this in a few months, but I saw your
>> message.  Interesting.
>>
>> This closely mirrors a compiler project that I am working on for my
>> semester project in graduate school.  My compiler tool chain is
>> called RELIC (REtargetable Language Independent Compiler) and is
>> architected just like this one.  It is based on PCCTS (the Perdue
>> Compiler Construction Tool Set) and is a continuation of work I did
>> for my undergraduate compiler class.
>>
>> While RELIC can support other languages (and indeed there are PCCTS
>> grammar files for a number of popular ones), right now RELIC's front-
>> end language is "Ragin' Basic" which is a subset of Basic09.  That
>> front-end component reads in code from a file and puts it out to i-
>> code, which is then passed through an optimizer, then onto be6809, a
>> back-end which translates the i-code to 6809 assembly.  That code is
>> then pushed to rma then to rlink for linking.  I've created many
>> small test programs, and to automate the testing process, I run a
>> script which performs the compiler steps, then copies the executable
>> to an OS-9 disk image using ToolShed.  That disk is then mounted into
>> the emulator where I boot into NitrOS-9 and run the test cases.
>>
>> That's correct.  I am using the CoCo and NitrOS-9 as the basis
>> platform for my semester project.  The professor who is monitoring my
>> work started out as an Apple II head and thinks it's really cool.
>>
>> There are some shortcomings: the implementation of the Ragin' Basic
>> language in my current front-end is a bit limited and executables are
>> way bigger than they need to be because the optimizer needs work, but
>> I am creating NitrOS-9 executables that run on a CoCo using this
>> compiler tool chain, and they work.
>>
>> I plan on exhibiting the documentation and demonstrating the compiler
>> at the CoCoFest at my booth at the end of March.
>>
>> After I've completed the project (sometime in May), I fully intend to
>> make it available to the CoCo community to embrace and extend.
>>
>> Call me a cynic, but past efforts to get a true cross-compiler system
>> for the CoCo have always ended up yielding nothing.  There was gcc,
>> sdcc, and now this.  RELIC is running NOW under Linux and Mac OS X as
>> a cross compiler to CoCo/NitrOS-9 and is generating executables NOW.
>> My hope is that a lot of the talk about compilers that has been
>> generated on this list over the years will finally transform itself
>> into action, and interested parties will take RELIC to the next  
>> level.
>>
>> Boisy
>>
>> On Feb 26, 2007, at 2:24 AM, Mannequin* wrote:
>>
>>
>>> /me hears people in the background, "OMG! On topic post!!!!!
>>> 1111oneone"
>>>
>>> Yeah, I've run in to something that might interest a few of us here.
>>>
>>> http://tack.sourceforge.net/
>>>
>>> -M.
>>>
>>> -- 
>>> Coco mailing list
>>> Coco at maltedmedia.com
>>> http://five.pairlist.net/mailman/listinfo/coco
>>>
>>
>> --
>> Boisy G. Pitre
>> Email: boisy at boisypitre.com
>> Web: http://www.boisypitre.com/
>> Phone: 337-781-3570
>>
>>
>>
>>
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco

--
Boisy G. Pitre
Email: boisy at boisypitre.com
Web: http://www.boisypitre.com/
Phone: 337-781-3570





More information about the Coco mailing list