Skip to content

Commit e3a3cc8

Browse files
ivanpanchtzlaine
authored andcommitted
Update rationale.qbk
1 parent f789199 commit e3a3cc8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/rationale.qbk

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ It has a different API, and other code that operates on text expects a string
202202
instead of some other container. Arrays of characters are already considered
203203
special by the standard library and common practice in C++.
204204

205-
Second, When you write a parser that parses multiple characters in a row, you
205+
Second, when you write a parser that parses multiple characters in a row, you
206206
are typically trying to produce a string attribute, rather than a few
207207
individual character values. When you use multiple non-character parsers in a
208208
row, you are typically trying to produce multiple values. For instance:
@@ -217,7 +217,7 @@ I've rarely written a parser like `parser_2` and wanted a
217217
`std::vector<std::string>`.
218218

219219
_Parser_ therefore makes the common case the default behavior, and provides
220-
you with the _merge_ and _sep_ directives to let you opt-in to generating the
220+
you with the _merge_ and _sep_ directives to let you opt in to generating the
221221
less-common attributes.
222222

223223
[heading Attribute compatibility rules are more strict than in Spirit]
@@ -266,7 +266,7 @@ complicated to implement and maintain.
266266

267267
I've been using Spirit 1 and later Spirit 2 since they were released. I did
268268
not know about the particular looseness discussed here; a user pointed it out
269-
on Github. In many years of using these libraries, I never fully learned all
269+
on GitHub. In many years of using these libraries, I never fully learned all
270270
the attribute-compatibility rules, and was often surprised by them.
271271

272272
Having a small set of rules that the user can internalize is vital; if the
@@ -298,7 +298,7 @@ that it succeeds (if it had failed, it would have cleared its attribute). It
298298
does not know that there is nothing after it that could continue the parse,
299299
nor that it is being used in to do a full parse. So, the over-all parse
300300
fails, but the part of the parse that fills in the out-param attribute does
301-
not know do clear its attribute.
301+
not know to clear its attribute.
302302

303303
This is why the explicit clearing behavior happens at the end of _p_. This is
304304
not without its downsides, though. Consider this.
@@ -314,7 +314,7 @@ not without its downsides, though. Consider this.
314314
Here, the explicit clearing replaces the previous value of `3`, even though
315315
the parser never touched the value! Destroying users' variables' state
316316
without need may seem like a bad idea, but consider the alternative _emdash_
317-
In the previous example, we had spurious values left in the out-param
317+
in the previous example, we had spurious values left in the out-param
318318
attribute. Here, without clearing, we would have had a value left in the
319319
out-param attribute, not because it was a partial result of the parse, but
320320
because the parse never touched it. This is certain to be confusing, or at
@@ -337,7 +337,7 @@ They do not even work correctly for ASCII values. This is because they use
337337
the C standard library's locale mechanism, which can be set to anything the
338338
current platform supports, and can be set by any code anywhere in your
339339
program; the locale is mutable global state. So, even if you use the default
340-
"C locale in your program, if you link against a library that sets the locale
340+
C locale in your program, if you link against a library that sets the locale
341341
to something that breaks ASCII character recognition (an EBCDIC locale, for
342342
instance), your program is now incorrect, regardless of the code you wrote.
343343

0 commit comments

Comments
 (0)