MrJoltCola wrote:
> At 03:21 AM 2/25/2005, Leopold Toetsch wrote:
>
>> MrJoltCola <mrjoltcola@no-spam> wrote:
>>
>> > I feel that this feature is for higher level languages.
>>
>> [ snip ]
>>
>> > ... PIR is for compilers, not people,
>>
My impression was that the target for compilers should be a yet
non-existent abstract syntax tree. Though I'm somewhat confused about
the distinction between parse trees and AST.
PIR and PAST could be considered as being just some languages. Why don't
they take the some route, and generate an AST that gets compiled into PBC?
However most compilers I have seen so far are generating PIR and go from
there.
>> PIR is foremost Parrot's primary assembly language. If it were for
>> compiles only, it wouldn't have needed "a = b + c" in the first place,
>> the "add" opcode is doing the same.
>
>
> It filled a need at the time I wrote it, because there was pretty much
> nothing else to write code in except PASM and Jako. It was supposed
> to be a thin layer (register allocation and instruction choosing and
> subs) over PASM.
It is certainly possible to write code in PIR. But it is even more
certain that this is no fun. Adding HERE documents remedies an immediate
need, especially for playing with compilers and test scripts.
> Nowadays we have a hoard of little toy compilers.
Which language of that hoard should be promoted to become THE standard
language for writing test scripts and the Parrot standard library?
PIR is too hard on people, and a scripting language like Ruby, Perl or
Python is propably to hard on Parrot.
It propably shouldn't a newly invented language either, because all
language designers are having fun with designing Perl6.
How about ECMAScript? It has an specification, it has objects and no
pointers.
CU, Bernhard
--
**************************************************
Dipl.-Physiker Bernhard Schmalhofer
Senior Developer
Biomax Informatics AG
Lochhamer Str. 11
82152 Martinsried, Germany
Tel: +49 89 895574-839
Fax: +49 89 895574-825
eMail: Bernhard.Schmalhofer@no-spam
Website: www.biomax.com
**************************************************