Weblog: Specification
in Perl 6
|
|
is the Standard Perl 6 grammar and more or less part of the specs. Its a program, written in a subset of Perl 6 and by Larry Wall, that defines how Perl 6 should be parsed. It uses the parser engine Cursor.
Unfortunately no implementation can fully parse STD.pm yet, let alone build a compiler or interpreter based on it. However, by means of the "viv" tool described next, Perl 6 source code can be parsed by a near equivalent running in Perl 5.
Anyone can try STD.pm online. Join the #perl6 channel on irc.freenode.net, then address your command to the std: nick. For example:
std: say "hello";
The output is either an awesome error message, or the status 'ok' followed by the amount of time and megabytes of memory that 'viv' took to parse the source. The actual work is done by the 'tryfile' script, also in the src/perl6 directory of the pugs repository.
Updated by Tore H on Sep 26 4:23am
Posted by Herbert Breunung on Feb 20 12:13pm
The Synopses are the (almost) human readable documents which constantly kept up to date, (unlike other historic docs like apocalypses and exegeses.) mostly after discussions at the p6l mailing list.
History
The Perl 6 design process began with a call for RFC (requests for comments) in July 2000 at The Perl Conference 4 (todays OSCON). In the next one and half year 361 RFC came in and Larry Wall sorted them and answered with the Apocalyses. Damian Conway tried to make them easier accessible and enriched them with examples. He got help from Allison Randal and so the Exegeses were born. But people today are not very patient and want a quick diff between Perl 5 and 6. That is why the Synopses were written.
The Term
comes from the latin word for compare. Its mostly used today by theologians (like apocalypse and exegesis too) who call the 3 gospels (except John's) synoptical gospels, because the tell almost the same story in the same order, even some parts are in each version different or missing.
Links
Updated by Shlomi Fish on Mar 27 4:47am
Posted by Herbert Breunung on Feb 23 12:42pm
Perl 6 has a huge test suite (about 40 000 single tests), that is located here, in the svn repo of Pugs. Chief is Moritz Lenz and cares a lot about it.
Updated by Herbert Breunung on Feb 26 1:35pm
Posted by Herbert Breunung on Feb 20 1:24pm
Unless Perl 5, where the interpreter IS the de-facto specification, Perl 6 has the advantage of clear definition, which becomes clearer every day, since the language design team working on the syntax and the implementers finding ambiguous spots. Mainly the spec has 3 parts:
- The Synopses, the (almost) human readable documents which constantly kept up to date.
- The STD.pm, a Perl 6 grammar, that defines the Syntax and is part of some implementations.
- The Test Suite, which implementations has to pass, to deserve to be called "Perl 6".
See Also:
Updated by Herbert Breunung on Feb 26 1:34pm
Posted by Herbert Breunung on Feb 20 12:24pm
|
Weblog Navigation
Loading...
|