-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.alpha
82 lines (49 loc) · 2.18 KB
/
README.alpha
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
=head1 NAME
README - This is the README file for a PIR implementation in PGE.
=head1 INTRODUCTION
A good test-case for the compiler tool suite of Parrot is
to compile its own assembler. This project aims to bring
a full PIR implementation using the Parrot compiler tools.
=head1 STATUS
Currently, only work is done on the parser. Only when the parser is
completed should work be done on the further transformations. When the
parser is changed, the generated parse tree will probably be different
as well, so any work on the later transformation phases should be
redone, which is a pain.
The following is an overview of what is parsed (mostly) correctly:
* most PIR constructs
* recognizes (almost) all Parrot instructions
(but doesn't handle their arguments yet)
See the TODO file for current issues.
The grammar files are split up into several .pg files. This makes
the edit-compile-test cycle faster.
Instead of .include-ing the generated files in the main file
(pirc.pir), the generated .pir files are compiled to bytecode
(.pbc) and loaded in pirc.pir. This prevents compiling all the
included files when compiling pirc.pir (which would really be
s l o w).
=head1 INSTRUCTIONS
Type
$ make
Easy huh? Please note that compiling may take a while.
The compiler is called 'pir.pbc', but the main source file
is called pirc.pir, otherwise it would be "pir.pir", which
is kinda strange.
After that, you can run the test suite:
$ make test
which will run a little perl script that runs all files in the
examples directory.
The 'examples' directory contains a number of test files
that are working. Running these can be done by typing:
$ ../../parrot pir.pbc examples/hello.pir
=head1 ACKNOWLEDGEMENTS
I stole the Makefile from Punie. The compiler driver (main file)
is assembled from code from Punie, ABC and Pheme (although I changed
a lot, so some things taken might be gone already).
Thanks to Jerry "particle" Gay for fixing numerous platform issues.
Thanks to Will "Coke" Coleda for helping setting up the test harness stuff.
=head1 AUTHOR
Klaas-Jan Stol <[email protected]>
=head1 MAINTAINER
Vasily Chekalkin <[email protected]> who gracefully took over from kjs.
=cut