title: Unexpected symbol error in parse(text = str) with hyphen after a digit
body: <p>I am trying to parse a character string in R. 
  R throws an "unexpected symbol" or "unexpected end of input" exception when there is a digit followed by a hyphen in the string (please see the code). Searching and trying different ways to solve this issue didn't help. 
  Probably some lack of knowledge in my part. 
  Any help or advise would be highly appreciated.</p>
  
  <pre><code>&gt; str &lt;- "abc12-3def"
  &gt; parse(text = str)
  Error in parse(text = str) : &lt;text&gt;:1:8: unexpected symbol
  1: abc12-3def
            ^
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&gt; str &lt;- "abc123-"
  &gt; parse(text = str)
  Error in parse(text = str) : &lt;text&gt;:2:0: unexpected end of input
  1: abc123-
    ^
  </code></pre>
  
  <p>However, following examples all work normally</p>
  
  <pre><code>&gt; str &lt;- "abc123def"
  &gt; parse(text = str)
  expression(abc123def)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&gt; str &lt;- "abc123-def"
  &gt; parse(text = str)
  expression(abc123-def)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&gt; str &lt;- "abc12-3"
  &gt; parse(text = str)
  expression(abc12-3)
  </code></pre>
  
  <p>Thank you very much in advance!</p>