1 | | = Cobra Command Line Options = |
2 | | |
3 | | {{{ |
4 | | cobra -h |
5 | | }}} |
6 | | or |
7 | | {{{ |
8 | | cobra -help |
9 | | }}} |
10 | | will dump a page detailing all the command line options supported. |
11 | | |
12 | | The compiler runs for each invocation in a particular mode of operation. These correspond to the 'commands on paths' |
13 | | * -compile ''or'' -c - compile the provided files and bind into an executable |
14 | | * -run-exe ''or'' -r - as for -compile but run the executable after successful compilation. This is the default mode if none other is given |
15 | | * -test - as for -compile but run the executables test cases after successful execution |
16 | | * -document - parse the provided files and generate documentation from the parse tree |
17 | | |
18 | | In addition there are three standalone commands |
19 | | * -help ''or'' -h - display the cobra commandline options and descriptions |
20 | | * -about - display info about cobra |
21 | | * -version - display the cobra executables version information |
22 | | |
23 | | Commandline items that are not options ( begin with '-') are taken to be filenames. |
24 | | Cobra can take one or a list of commandline given files to compile and the files can be cobra code ( filename ends in '.cobra') or C# code ( filename ends in '.cs'). |
25 | | Filenames without any extension are assumed to be a cobra code file of the same name with a '.cobra' extension |
26 | | |
27 | | i.e |
28 | | {{{ |
29 | | cobra myProg.cobra |
30 | | cobra myProg |
31 | | }}} |
32 | | both do the same thing - compile a cobra code file myProg.cobra to an executable and run it (if compilation succeeds) |
33 | | |
34 | | == Options == |
35 | | options form : -option:value, synonyms |
36 | | |
37 | | TODO Sections |
38 | | * Files:file |
39 | | * Controlling type of executable built -target/-t |
40 | | * Providing references and library search path -reference/-ref -library-directory/-lib -embed-run-time/-ert |
41 | | * Controlling compilation -include-{asserts, nil-checks, tests} |
42 | | * -optimize/-o -debug/-d -turbo/-t |
43 | | * -keep-intermediate-files/-kif |
44 | | * -contracts -verbosity/-v |
45 | | * Specifying executable and args for it -run-args/-- and -run |
46 | | * Error handling -detailed-stack-trace/dst -debugging-tips -exception-report -reveal-internal-exceptions |
47 | | * Development cycle - colorize -editor |
48 | | * Back end -sharp-compiler -sharp-args |
49 | | |
50 | | == Examples == |
51 | | |
52 | | == Working with Multiple Files == |
53 | | |
54 | | For now, see: |
55 | | |
56 | | * [http://cobra-language.com/forums/viewtopic.php?f=4&t=194 discussion: multiple files] |
57 | | * [http://cobra-language.com/forums/viewtopic.php?f=4&t=197 discussion: Importing Cobra Files] |
| 1 | See: CommandLine |