title: Grammar for Linux command line with yacc and lex
body: <p>I'd like to write down a formal grammar for describing the command line usage of some GNU/Linux tools. </p>
  
  <p>First, I would like to define a grammar :</p>
  
  <pre><code>Start -&gt; COMMAND AXIS 
  
  AXIS -&gt; EMPTY | INTER
  
  INTER -&gt; VALUE | -OPT
  
  VALUE -&gt; any characters for files 
  
  OPT -&gt; OPION AXIS
  
  OPTION -&gt; WORD
  
  WORD -&gt; out | in | ... | LETTERS
  
  LETTERS -&gt; aLETTER |bLETTER | ... | zLETTER
  
  LETTER -&gt; a| b | c | ... | EMPTY | LETTERS
  
  EMPTY -&gt; 
  
  COMMAND -&gt; ls | tar | touch | openssl | vi | ... | cat 
  </code></pre>
  
  <p>I'll use this grammar with lex and yacc to parse commands. How can I do to define .l &amp; .c files ??</p>