title: How to "add" a parse error from an action in Jison?
body: <p>Is there a way to add a parse error from an action in Jison? Say I have something like this:</p>
  
  <pre><code>some_element
      : text '.' text
          { 
              if ($3 === "SOMETHING3")
                  // somehow add/throw a syntax error from here?
          }
      | text
          { $$ = { name: $1 }; }
      ;
  </code></pre>
  
  <p>I would like that "throw" to get recognized by the parser and provide me with an error such as this (which would be a standard parsing error normally, generated by rules):</p>
  
  <pre><code>Parse error on line 1:
  SOMETHING1.SOMETHING3
  -----------^
  Expecting 'SOMETHING1', 'SOMETHING2', got 'SOMETHING3'
  </code></pre>
  
  <p>Thanks.</p>