$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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