Question about SPirit parser terminology

Can anyone explain me what is the difference between a rule, grammar and parser in SPIRIT parser library. Thanks

satya_vajja wrote:
Can anyone explain me what is the difference between a rule, grammar and parser in SPIRIT parser library.
A grammar is a set of rules. Rules and grammars when instantiated, create immediately runnable parsers. Often times, rules and grammars are called parsers simply because rules and grammars *are* parsers, in the inheritance point of view (they inherit from the abstract parser base class). Schematically: parser / \ rule grammar grammar { rule a; rule b; rule c; rule start; }; HTH, -- Joel de Guzman joel at boost-consulting.com http://www.boost-consulting.com http://spirit.sf.net
participants (2)
-
Joel de Guzman
-
satya_vajja