This section discusses properties and characteristics of grammars used to define the parsers as well as basic principles of parser operation.
The complexity of grammars used by parsers is far greater that complexity of grammars for lexers. With lexers it is usually not necessary to understand or analyze automaton generated from grammar. The behavior of lexer is simple and straightforward consequence of defined grammar rules. All errors can be corrected by just analyzing the lexer grammar.
In case of parser, defining the grammar is a very complex task which requires good understanding of parser operation principles, as well as some experience and intuition. If parser does not behave as expected it is often hard to understand the reason by just inspecting grammar. One must analyze generated automaton to find the source of error. Sometimes static analysis of automaton is not enough, and one must see that automaton in action to understand the error. All this means, that author of the grammar must understand not only how to write the grammar but also how this grammar is translated into automaton and how that automaton is doing its work.
Complete discussion of all aspects of parser creation process is outside of scope of this manual. Some more information can be found in publications listed in Bibliography section. Note however that available literature is focused mainly on theoretical aspects of algorithms, and rarely speaks about practical craft and art of defining parser grammars.
Information provided in this section is an absolute minimum necessary to start writing own parser grammars. Some additional learning as well as practice may be necessary before satisfactory results are achieved.