Skip to content
This repository
Newer
Older
100644 67 lines (42 sloc) 1.16 kb
5bb360e5 »
2008-01-21 Cardinal restart
1 =head1 TITLE
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
2
5bb360e5 »
2008-01-21 Cardinal restart
3 cardinal.pir - A cardinal compiler.
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
4
5bb360e5 »
2008-01-21 Cardinal restart
5 =head2 Description
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
6
5bb360e5 »
2008-01-21 Cardinal restart
7 This is the base file for the cardinal compiler.
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
8
5bb360e5 »
2008-01-21 Cardinal restart
9 This file includes the parsing and grammar rules from
10 the src/ directory, loads the relevant PGE libraries,
11 and registers the compiler under the name 'cardinal'.
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
12
5bb360e5 »
2008-01-21 Cardinal restart
13 =head2 Functions
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
14
5bb360e5 »
2008-01-21 Cardinal restart
15 =over 4
06b8a848 »
2006-07-30 [Cardinal] refactor to follow Perl6 AST/OST example
16
5bb360e5 »
2008-01-21 Cardinal restart
17 =item onload()
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
18
5bb360e5 »
2008-01-21 Cardinal restart
19 Creates the cardinal compiler using a C<PCT::HLLCompiler>
20 object.
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
21
5bb360e5 »
2008-01-21 Cardinal restart
22 =cut
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
23
5bb360e5 »
2008-01-21 Cardinal restart
24 .namespace [ 'cardinal::Compiler' ]
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
25
5bb360e5 »
2008-01-21 Cardinal restart
26 .loadlib 'cardinal_group'
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
27
5bb360e5 »
2008-01-21 Cardinal restart
28 .sub 'onload' :anon :load :init
29 load_bytecode 'PCT.pbc'
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
30
5bb360e5 »
2008-01-21 Cardinal restart
31 $P0 = get_hll_global ['PCT'], 'HLLCompiler'
32 $P1 = $P0.'new'()
33 $P1.'language'('cardinal')
34 $P1.'parsegrammar'('cardinal::Grammar')
35 $P1.'parseactions'('cardinal::Grammar::Actions')
362250e7 »
2006-10-02 [Cardinal] Closer to support for classes, blocking on .HLL bug
36 .end
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
37
5bb360e5 »
2008-01-21 Cardinal restart
38 =item main(args :slurpy) :main
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
39
5bb360e5 »
2008-01-21 Cardinal restart
40 Start compilation by passing any command line C<args>
41 to the cardinal compiler.
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
42
5bb360e5 »
2008-01-21 Cardinal restart
43 =cut
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
44
5bb360e5 »
2008-01-21 Cardinal restart
45 .sub 'main' :main
46 .param pmc args
4cfaaf2f »
2006-09-17 Cleanup and refactor for class support
47
5bb360e5 »
2008-01-21 Cardinal restart
48 $P0 = compreg 'cardinal'
49 $P1 = $P0.'command_line'(args)
4cfaaf2f »
2006-09-17 Cleanup and refactor for class support
50 .end
51
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
52
5bb360e5 »
2008-01-21 Cardinal restart
53 .include 'src/gen_builtins.pir'
54 .include 'src/gen_grammar.pir'
55 .include 'src/gen_actions.pir'
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
56
5bb360e5 »
2008-01-21 Cardinal restart
57 =back
272b0b9e »
2006-07-19 languages/cardinal Initial checkin
58
59 =cut
9af68170 »
2007-04-10 [cardinal] Added emacs/vim coda as per coding standards
60
61 # Local Variables:
62 # mode: pir
63 # fill-column: 100
64 # End:
65 # vim: expandtab shiftwidth=4:
5bb360e5 »
2008-01-21 Cardinal restart
66
Something went wrong with that request. Please try again.