title: EBNF / parboiled: how to translate regexp into PEG?
body: <p>This is a question both specific to the parboiled parser framework, and to BNF/PEG in general.</p>
  
  <p>Let's say I have the fairly simple regular expression</p>
  
  <pre><code>^\\s*([A-Za-z_][A-Za-z_0-9]*)\\s*=\\s*(\\S+)\\s*$
  </code></pre>
  
  <p>which represents the pseudo-EBNF of</p>
  
  <pre><code>&lt;line&gt;               ::= &lt;ws&gt;? &lt;identifier&gt; &lt;ws&gt;? '=' &lt;nonwhitespace&gt; &lt;ws&gt;?
  &lt;ws&gt;                 ::= (' ' | '\t' | {other whitespace characters})+
  &lt;identifier&gt;         ::= &lt;identifier-head&gt; &lt;identifier-tail&gt;
  &lt;identifier-head&gt;    ::= &lt;letter&gt; | '_'    
  &lt;identifier-tail&gt;    ::= (&lt;letter&gt; | &lt;digit&gt; | '_')*
  &lt;letter&gt;             ::= ('A'..'Z') | ('a'..'z')
  &lt;digit&gt;              ::= '0'..'9'
  &lt;nonwhitespace&gt;      ::= ___________
  </code></pre>
  
  <p>How would you define nonwhitespace (one or more characters that aren't whitespace) in EBNF?</p>
  
  <p>For those of you familiar with the Java parboiled library, how could you implement a rule that defines nonwhitespace?</p>