2
0
mirror of https://github.com/boostorg/spirit.git synced 2026-01-19 04:42:11 +00:00

Fix spelling of "occurr*".

This commit is contained in:
Lauri Nurmi
2015-03-29 13:30:24 +03:00
parent f51566bece
commit 78afafed86
8 changed files with 11 additions and 11 deletions

View File

@@ -133,7 +133,7 @@ struct conversion_grammar
// note that "fallback" is the last alternative here !
top = *(class2struct || subscript || fallback),
/////////////////////////////////////////////////////////////
// replace any occurrance of "class" by "struct"
// replace any occurrence of "class" by "struct"
class2struct = str_p("class") [emit_constant("struct")],
/////////////////////////////////////////////////////////////
// if the input maches "[some_number]"

View File

@@ -108,7 +108,7 @@ no_match (false). It can be one of:
[[Arg] [Description]]
[[first] [The position of the iterator when the rule with the handler was entered.]]
[[last] [The end of input.]]
[[error-pos] [The actual position of the iterator where the error occured.]]
[[error-pos] [The actual position of the iterator where the error occurred.]]
[[what] [What failed: a string describing the failure.]]
]

View File

@@ -87,7 +87,7 @@ Grammar:
default:
std::ostringstream ss_;
ss_ << "A syntax error occured: '" <<
ss_ << "A syntax error occurred: '" <<
lhs_token_.precedence_string () <<
"' against '" << rhs_token_.precedence_string () <<
"' at index " << state_.index () << ".";

View File

@@ -255,7 +255,7 @@ template <typename T>
};
// This class enables the transportation of parameters needed to call
// the occurence constraint checker from higher level calls
// the occurrence constraint checker from higher level calls
// It also serves to select the correct parse function call
// of the keyword parser. The implementation changes depending if it is
// called form a keyword parsing loop or not.

View File

@@ -254,7 +254,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi
// We have a bool array 'flags' with one flag for each parser as well as a 'counter'
// array.
// The kwd directive sets and increments the counter when a successeful parse occured
// The kwd directive sets and increments the counter when a successeful parse occurred
// as well as the slot of the corresponding parser to true in the flags array as soon
// the minimum repetition requirement is met and keeps that value to true as long as
// the maximum repetition requirement is met.
@@ -335,7 +335,7 @@ namespace boost { namespace spirit { namespace repository { namespace qi
// We have a bool array 'flags' with one flag for each parser as well as a 'counter'
// array.
// The kwd directive sets and increments the counter when a successeful parse occured
// The kwd directive sets and increments the counter when a successeful parse occurred
// as well as the slot of the corresponding parser to true in the flags array as soon
// the minimum repetition requirement is met and keeps that value to true as long as
// the maximum repetition requirement is met.

View File

@@ -92,7 +92,7 @@ A couple of input string variations run on the same parser:
[reference_keyword_list]
Now let's delcare a parser with some occurence constraints:
Now let's delcare a parser with some occurrence constraints:
[reference_keyword_list_constraint_rule]

View File

@@ -34,7 +34,7 @@ lit("keyword1") >> skipper+ >> '=' >> int_
All the keyword directives can be mixed inside a keyword list.
The kwd directive is very similar to the repeat directive in that it enables to enforce
keyword occurence constraints but also provides very interesting speed improvement
keyword occurrence constraints but also provides very interesting speed improvement
over the pure EBNF syntax or the Nabialek-Trick.
[heading Header]

View File

@@ -173,7 +173,7 @@ main()
//]
//[reference_keyword_list_constraint_rule
/*`The parser definition below uses the kwd directive occurence constraint variants to
/*`The parser definition below uses the kwd directive occurrence constraint variants to
make sure that the name and age keyword occur only once and allows the favorite color
entry to appear 0 or more times. */
constraint_person_rule %=
@@ -193,14 +193,14 @@ main()
,Hellen);
std::cout<<Hellen;
// Parsing this string will fail because the age and size minimum occurence requirements aren't met.
// Parsing this string will fail because the age and size minimum occurrence requirements aren't met.
test_phrase_parser_attr(
"name = \"Johny\" \n favorite color = \"blue\" \n favorite color = \"green\" "
,constraint_person_rule
,Johny );
/*`Parsing the first string will succeed but fail for the second string as the
occurence constraints aren't met. This code should print:[teletype]
occurrence constraints aren't met. This code should print:[teletype]
Person : Hellen, 10, 1.8
blue