Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion more PIR syntax improvements
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Leopold Toetsch  
View profile  
 More options Mar 14 2004, 4:48 am
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Sun, 14 Mar 2004 10:42:21 +0100
Local: Sun, Mar 14 2004 4:42 am
Subject: [CVS ci] more PIR syntax improvements
PIR did parse since quite a time instructions like:

   $I0 = defined $P0[0]
   $P1 = clone $P2

but these were handled with explicite rules. And I found me often writing:

   len = length $S0

which wasn't a valid syntax.

I've now tossed the special handling of defined and clone. Instead PIR
allows now generally to write

   lhs = PARROT_OP args

so these instructions:

     $I0 = defined a
     $I0 = defined a[0]
     b = clone a
     $I0 = length s
     $N0 = sin 0
     $I0 = can $P0, "puts"
     $I0 = isa $P0, "scalar"

are now (amongst many more) valid PIR syntax. There are currently no
checks, if this instructions is something meaningfull too. It's just
converted to

   PARROT_OP lhs[, args]

So you can write:

    $I0 = add 10, 20

or even:
.sub _main
     $P0 = find_global "_s"
     $P0 = invokecc
     $S0 = "done\n"
     $S0 = print
     end
.end
.sub _s
     print "in sub\n"
     P1 = invoke
.end

where it really gets ugly. We could of course limit this syntax to more
useful constructs.

leo


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.