title: Are there different types of parsers?
body: <p>Consider this simple grammar:</p>
  
  <blockquote>
    <p>S -> a | b</p>
  </blockquote>
  
  <p>The set of strings that may be generated by the grammar is:</p>
  
  <blockquote>
    <p>{a, b}</p>
  </blockquote>
  
  <p>Thus, a grammar <em>generates</em> a set of strings.</p>
  
  <p>A parser for a grammar takes an input string and determines if the string could be generated by the grammar.</p>
  
  <p>Thus, a parser is a <em>recognizer</em> for a grammar.</p>
  
  <p>At least, that is one use of a parser.</p>
  
  <p>But oftentimes a parser is used for other things. For example, a parser for a grammar may take an input string and create a tree structure which contains the input data and conforms to the grammar.</p>
  
  <p>In that case the parser is not a recognizer, it is a data structure builder.</p>
  
  <p>I conclude that there are different types of parsers.</p>
  
  <p>Am I thinking logically? Are there indeed different types of parsers?</p>
  
  <p>Has someone created a list of the different types of things that parsers have been created for?</p>
  
  <p>Please let me know of any looseness or ambiguity in the above statements. I am trying to learn to be precise in statements about these concepts. For example, do you agree that "a grammar generates a set of strings"? Is that precise? correct?</p>