|
Boost Users : |
From: Joel de Guzman (djowel_at_[hidden])
Date: 2003-04-14 18:06:40
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net