Wiki

Changes between Initial Version and Version 1 of CommandLine

Show
Ignore:
Timestamp:
08/08/09 12:31:36 (15 years ago)
Author:
Chuck
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CommandLine

    v1 v1  
     1== Command Line == 
     2 
     3{{{ 
     4cobra -h 
     5}}} 
     6or  
     7{{{ 
     8cobra -help 
     9}}} 
     10will dump a page detailing all the command line options supported.  
     11 
     12The 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 
     18In 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 
     23Commandline items that are not options ( begin with '-') are taken to be filenames.  
     24Cobra 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'). 
     25Filenames without any extension are assumed to be a cobra code file of the same name with a '.cobra' extension 
     26 
     27i.e 
     28{{{ 
     29cobra myProg.cobra  
     30cobra myProg 
     31}}} 
     32both 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 
     37TODO 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 
     54For 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] 
     58 
     59See also: LanguageTopics, LibraryTopics