2 Copyright (C) 2007-2008, The Perl Foundation
7 src/main.c - the Entry Point to Parrot Programs
24 #include "parrot/parrot.h"
25 #include "parrot/embed.h"
26 #include "parrot/imcc.h"
30 =item C<int main(int argc, char * argv[])>
32 The entry point from the command line into Parrot.
39 main(int argc
, const char * argv
[])
41 const char *sourcefile
;
45 Parrot_set_config_hash();
47 interp
= Parrot_new(NULL
);
48 imcc_initialize(interp
);
50 /* We parse the arguments, but first store away the name of the Parrot
51 executable, since parsing destroys that and we want to make it
53 Parrot_set_executable_name(interp
, string_from_cstring(interp
, argv
[0], 0));
55 sourcefile
= parseflags(interp
, &argc
, &argv
);
56 status
= imcc_run(interp
, sourcefile
, argc
, argv
);
59 /* Clean-up after ourselves */
60 Parrot_destroy(interp
);
61 Parrot_exit(interp
, 0);
70 F<compilers/imcc/main.c>, unfortunately.
78 * c-file-style: "parrot"
80 * vim: expandtab shiftwidth=4: