title: Regular grammar produced strings?
body: <p>I have a paper that states:</p>
  
  <blockquote>
    <p>(...) languajes such as strings of x's followed by the same number of y's  (for example xxxxyyyy) cannot be specified by a regular grammar or Finite States Automaton because these devices have no mechanism for remembering how many x's were generated when the time comes to derive the y's. This shortcoming is remedied by means of rules such as S → xSy, which always generate an x and a y at the same time. (...) </p>
  </blockquote>
  
  <p>So, I don't understand this statement, as far as I know, such strings can be generated with the regular grammar with production rules:</p>
  
  <p>S → xS</p>
  
  <p>S → yS</p>
  
  <p>S → y</p>
  
  <p>Where x,y are terminals, S is the starting unique non terminal. This grammar produces the derivation </p>
  
  <p>S→xS→xxS→xxxS→xxxxS→xxxxyS→xxxxyyS→xxxxyyyS→xxxxyyyy</p>