forked from masak/yapsi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
53 lines (33 loc) · 1.1 KB
/
README
File metadata and controls
53 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
= Yapsi -- Yet Another Perl Six Implementation
This is an implementation of a Perl 6 compiler-and-runtime in Perl 6.
== Building Yapsi
$ ufo && make
== Features currently available in Yapsi
Right now you can do things like this:
$ bin/yapsi -e 'say 42'
42
$ bin/yapsi -e 'my $a; { $a = 5 }; say $a'
5
$ bin/yapsi -e 'my $a = 5; my $b := $a; $b = 41; ++$b; say $a'
42
$ bin/yapsi -e 'my $a = 42; while --$a { say $a }'
In other words, Yapsi currently handles declaration, immediate blocks,
assignment, binding, prefix increment/decrement, if/while, and say.
The compiler also detects syntax errors.
$ bin/yapsi -e 'say say'
Could not parse
== Near-future directions
Things we hope to implement in the immediate future:
* More loops
* Function calls
* Phasers
== Raison d'être
Besides being useful as a p6-in-p6 implementation, Yapsi also might work as
a fast vehicle for exploring the following underexplored areas of the Perl 6
spec:
* Phasers
* Constant folding
* Early catching of errors
* Increased communication between compiler and runtime
== License
Yapsi is released under Artistic 2.0. See LICENSE.