<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Compiling</title><link>https://sourceforge.net/p/argument/wiki/Compiling/</link><description>Recent changes to Compiling</description><atom:link href="https://sourceforge.net/p/argument/wiki/Compiling/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 05 Dec 2013 01:57:07 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/argument/wiki/Compiling/feed" rel="self" type="application/rss+xml"/><item><title>Compiling modified by Chris DeGreef</title><link>https://sourceforge.net/p/argument/wiki/Compiling/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,4 +1,4 @@
-It is very important to understand how to [interact with the parser], especially when setting up your own application to use it.  &lt;strong&gt;Please be sure you have read that page before proceeding.&lt;/strong&gt; since the same syntax is used to specify the parser behavior in your application.
+It is very important to understand [how to interact with Argument], especially when setting up your own application to use it.  &lt;strong&gt;Please be sure you have read that page before proceeding.&lt;/strong&gt; since the same syntax is used to specify the parser behavior in your application.

 The java code to define an Argument parser in your application is this.  

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris DeGreef</dc:creator><pubDate>Thu, 05 Dec 2013 01:57:07 -0000</pubDate><guid>https://sourceforge.net940f78de66cab73a639318ed05473f3c468bd15b</guid></item><item><title>Compiling modified by Chris DeGreef</title><link>https://sourceforge.net/p/argument/wiki/Compiling/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It is very important to understand how to &lt;span&gt;[interact with the parser]&lt;/span&gt;, especially when setting up your own application to use it.  &lt;strong&gt;Please be sure you have read that page before proceeding.&lt;/strong&gt; since the same syntax is used to specify the parser behavior in your application.&lt;/p&gt;
&lt;p&gt;The java code to define an Argument parser in your application is this.&lt;br /&gt;
&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;ICmdLine&lt;/span&gt; &lt;span class="n"&gt;argument&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="n"&gt;CmdLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;argument1&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;argument2&amp;quot;&lt;/span&gt; &lt;span class="p"&gt;...);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The parameter to the CmdLine constructor is a String[] where each element in the array is the definition of a single argument.  Of course, "argument1" and "argument2" are just placeholders in this example.  If we wanted a single boolean argument named --debug then it might look like this.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;ICmdLine&lt;/span&gt; &lt;span class="n"&gt;argument&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="n"&gt;CmdLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;-t boolean -k debug&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And if we needed a port command as well we would just add that too.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;ICmdLine&lt;/span&gt; &lt;span class="n"&gt;argument&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;new&lt;/span&gt; &lt;span class="n"&gt;CmdLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                     &lt;span class="s"&gt;&amp;quot;-t boolean -k debug&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
                     &lt;span class="s"&gt;&amp;quot;-t integer -k port&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;We can continue to add more commands to Argument by just extending this array.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Defining the Parser - Argument definitions&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Each argument is defined with a set of parameters.  You must have at least one argument defined.  But there is no maximum number of arguments for a single parser.  The most important of the parameters is Type and Key.  The other parameters modify the default behavior for the argument.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Argument&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Types]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--type&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Naming the arguments]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--key&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Multiple value Arguments]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--multiple&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Required]&lt;/span&gt; argument&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--required&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Case sensitive values]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--casesensitive&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Default values]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--default&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Constraining to a range]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--range&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Constraining to a regular expression]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--matches&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Constraining to a list of values]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--list&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Constraining to an enum class]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--enumList&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Help message]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--help&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;Advanced Topics&lt;/b&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Argument&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Positional]&lt;/span&gt; (unnamed) arguments&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Including &lt;span&gt;[specification files]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;@filename&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span&gt;[Embedded Parsers]&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;(&lt;code&gt;--begin --end&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Chris DeGreef</dc:creator><pubDate>Thu, 05 Dec 2013 01:56:30 -0000</pubDate><guid>https://sourceforge.netc2a73b7017d2d6198b0b88872520cb49862ba151</guid></item></channel></rss>