Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 79 lines (52 sloc) 1.309 kb
58b341d0 » fperrad
2009-03-11 [C99] set SVN properties
1 # $Id$
f1c2b766 » allisonrandal
2009-03-10 [c99] Relocating c99 language to languages repository from
2 # Copyright (C) 2008, Parrot Foundation.
3
4 =head1 TITLE
5
6 c99.pir - A C99 compiler.
7
8 =head2 Description
9
10 This is the base file for the C99 compiler.
11
12 This file includes the parsing and grammar rules from
13 the src/ directory, loads the relevant PGE libraries,
14 and registers the compiler under the name 'C99'.
15
16 =head2 Functions
17
18 =over 4
19
20 =item onload()
21
22 Creates the C compiler using a C<PCT::HLLCompiler>
23 object.
24
25 =cut
26
27 .namespace [ 'C99';'Compiler' ]
28
29 .loadlib 'c99_group'
30
31 .sub 'onload' :anon :load :init
32 load_bytecode 'PCT.pbc'
33
34 $P0 = get_hll_global ['PCT'], 'HLLCompiler'
35 $P1 = $P0.'new'()
36 $P1.'language'('C99')
37 $P1.'parsegrammar'('C99::Grammar')
38 $P1.'parseactions'('C99::Grammar::Actions')
39 .end
40
41 =item main(args :slurpy) :main
42
43 Start compilation by passing any command line C<args>
44 to the C compiler.
45
46 =cut
47
48 .sub 'main' :main
49 .param pmc args
50
51 $P0 = compreg 'C99'
52 $P1 = $P0.'command_line'(args)
53 .end
54
55
56 .include 'src/gen_builtins.pir'
57 .include 'src/gen_grammar.pir'
58 .include 'src/gen_actions.pir'
59
60
61 .namespace [ 'C99';'Grammar' ]
62
63 .sub 'debug'
64 .param pmc match
65 .param pmc arg
66 .param pmc attrs :slurpy
67 printerr arg
68 printerr "\n"
69 .end
70
71 =back
72
73 =cut
74
75 # Local Variables:
76 # mode: pir
77 # fill-column: 100
78 # End:
79 # vim: expandtab shiftwidth=4 ft=pir:
80
Something went wrong with that request. Please try again.