см. http://en.wikipedia.org/wiki/Syntax_analysis