title: Parse HTACCESS directive arguments
body: <p>Following my <a href="https://stackoverflow.com/questions/7112069/tokenize-htaccess-files">previous question</a>, I need to parse directive arguments, like these:</p>
  
  <pre><code>Listen 80
  </code></pre>
  
  <p>The parameters can get a bit complicated, with any kind of whitespace between arguments as well as escaped arguments.</p>
  
  <p>My objective is to get a "complex" argument list like this:</p>
  
  <pre><code>cmd "C:\Documents and Settings\..." "msg=\"hello\"" msg="hello" "msg=""hello"""
  </code></pre>
  
  <p>into a TStringList of:</p>
  
  <pre><code>N | Text
  --+-------------------------------
  0 | cmd
  1 | C:\Documents and Settings\...
  2 | msg="hello"
  3 | msg="hello"
  4 | msg="hello"
  </code></pre>
  
  <p>One of my questions concern how quotes are escaped. I have two examples above, argument 2 and argument 4. In the first one, escaping is done by having a slash before the quote, while the second one is done by converting double (double)quotes into a single quote, a syntax associated with pascal (I think?)</p>
  
  <p>How would I go about parsing the arguments efficiently in objective pascal (Delphi)?</p>