![]() |
Home | Libraries | People | FAQ | More |
Notation
RTSynthesized attribute. The rule or grammar's return type.
Arg1, Arg2, ArgNInherited attributes. Zero or more arguments.
L1, L2, LNZero or more local variables.
r,
r2Rules
gA grammar
pA parser expression
my_grammarA user defined grammar
Terminology
RT(Arg1,
Arg2 ...
,ArgN). The signature specifies the synthesized
(return value) and inherited (arguments) attributes.
locals<L1, L2 ...,
LN>.
The local variables.
The skip-parser type
Template Arguments
IteratorThe iterator type you will use for parsing.
A1, A2, A3Can be one of 1) Signature 2) Locals 3) Skipper.
|
Expression |
Description |
|---|---|
|
|
Rule declaration. |
|
|
Copy construct rule |
|
|
Assign rule |
|
|
return an alias of |
|
|
Get a copy of |
|
|
Naming a rule |
|
|
Getting the name of a rule |
|
debug(r) |
Debug rule |
|
|
Rule definition |
|
|
Auto-rule definition. The attribute of |
|
template <typename Iterator> struct my_grammar : grammar<Iterator, A1, A2, A3> { my_grammar() : my_grammar::base_type(start, name) { // Rule definitions start = /* ... */; } rule<Iterator, A1, A2, A3> start; // more rule declarations... };
|
Grammar definition. |
|
|
Naming a grammar |
|
|
Getting the name of a grammar |