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
perl6 driver
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
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 Jul 28 2002, 7:48 am
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Sun, 28 Jul 2002 12:31:54 +0200
Local: Sun, Jul 28 2002 6:31 am
Subject: perl6 driver
Hi all,

thanks to Sean, finally a perl6 driver arrived in CVS.

To further improve/clean up/enhance it, I would need the help of various
people, working on different parts of the parrot project.

Though I could try to write some patches, to address below mentioned
items, I think, people involved with the very topic will get it better
and faster ;-)

0) Overview

perl6 currently does:
- tokenizing & parsing perl6 source (P6C/Parser ...)
- generate imcc byte code (P6C/IMCC ...) (.imc)
- call languages/imcc/imcc for generating assembler code (.pasm)
- call assamble.pl to produce byte code (.pbc)
- run parrot byte-code
or optionally
- compile byte code to executable (pbc2c, cc, ld)
- and run executable

planned is to call the optimizer too, though I don't know, if it is usable.

Perl6 passes appropriate command line options over to the programs and
captures STDERR to collect the output.

Currently it uses a lot of intermediate files for the various stages:
file.imc  ... intermediate compiler code
file.pasm ... parrot assembler
file.pbc  ... parrot byte code
file.c    ... opt. translated to c
file.o, file  opt.
file.warn ... warnings
file.tree ... opt. parser tree

These files are currently not deleted, though such option will come
soon. Finally all file handling should optionally go through pipes.

1) configuration

lib/Parrot/Config.pm doesn't currently provide all the information for
perl6 running without hard coded settings.

It would need additionally:
- a path (or list of paths), where to find above programs
- a list of all objects, needed to compile a binary, currently
   only $PConfig{pmc_classes_o} is there.

2) interface to programs

As perl6 calls all involved programs, they should obey to some common
interface.

- take input on STDIN or a file
- write output to STDOUT or file
- can handle a common subset of command line options:
   -V --version (print version info to STDOUT and exit)
   -h --help    (print help info to STDOUT and exit)
- print usage info to STDERR if invoked wrongly.

   Proposal:
   -v --verbose (increase verbose level by one)
                this clashes with perl5, keep it or leave it?
                It currently informs about the stages run.
   -w --warnings (enable warnings, or make it default enabled?)
   -Dx --debug=x (enable debugging at various stages)

- other switches should (if possible) be compatible with
   »man perlrun« aka »perldoc perlrun«.
   Long options are always ok.

3) errors, warnings, diags and info messages

- should of course go to STDERR
- should have a string in it, stating clearly in which subpart of
   the program the message originated.
- should have a string in it, stating the severity of the message
   i.e. /error|warn|info|diag|debug/i

Perl6 will provide means to filter and print messages by level
(i.e. -w level) and by grepping them.

Perl programs could use a mechanism shown in Sean's P6C/Util.pm
(which will eventually make it into a standalone module)

Standalone programs should write similar diagnostic messages.

All programs should of course:
- return with exitcode 0 for success, or !0 for errors.

4) Platforms

I can test perl6 only on i386/linux, so patches from users of different
platforms are welcome.

5) individual issues/questions

- assemble.pl
   How stable is the interface, may I »require« and call it's
   methods directly?

   Speaking from perl6 driver POV:
   Does/will anyone need the feature to assemble multiple
   .pasm files into one .pbc?

- optimizer.pl
   If assemble.pl's methods my be called directly the optimzer could
   be integrated.

Finally:

Patches, suggestions, ... welcome.

Thanks for reading til here,
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.
End of messages
« Back to Discussions « Newer topic     Older topic »