You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/modules/ROOT/pages/examples/magnet-link.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@
12
12
`magnet` is a URL scheme for identifying files by their content.
13
13
These files are usually identified by cryptographic hash value.
14
14
15
-
Magnet links are useful in peer-to-peer file sharing networks because they allow resources to be referred to without the need for a continuously available host..
15
+
Magnet links are useful in peer-to-peer file sharing networks because they allow resources to be referred to without the need for a continuously available host.
16
16
17
17
This example parses a magnet link into a new view type and prints its components to standard output.
Copy file name to clipboardExpand all lines: doc/modules/ROOT/pages/examples/mailto.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
10
10
= mailto URLs
11
11
12
-
`mailto` is a URL scheme for email addresses. `mailto` URL are used on websites to allow users to email a specific address directly from an HTML document.
12
+
`mailto` is a URL scheme for email addresses. `mailto` URLs are used on websites to allow users to email a specific address directly from an HTML document.
13
13
14
14
This example parses a mailto URL into a new view type and prints its components to standard output.
When a URL can appear in the context of a larger grammar, it may be desired to express the enclosing grammar in a single rule that incoporates the URL as an element.
104
+
When a URL can appear in the context of a larger grammar, it may be desired to express the enclosing grammar in a single rule that incorporates the URL as an element.
105
105
To achieve this, the library makes public the rules used to implement high-level parsing of complete strings as URL components, so that these components may be parsed as part of a larger string containing non-URL elements.
106
-
Here we present a rule suitable for parsing the the HTTP
106
+
Here we present a rule suitable for parsing the HTTP
Copy file name to clipboardExpand all lines: doc/modules/ROOT/pages/grammar/rules.adoc
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ A __Rule__ is an object which tries to match the beginning of an input character
14
14
It returns a cpp:boost::system::result[] containing a value if the match was successful, or an cpp:error_code[] if the match failed.
15
15
Rules are not invoked directly.
16
16
Instead they are passed as values to a cpp:grammar::parse[parse] function, along with the input character buffer to process.
17
-
The first overload requires that the entire input string match, otherwise else an error occurs.
17
+
The first overload requires that the entire input string match, otherwise an error occurs.
18
18
The second overload advances the input buffer pointer to the first unconsumed character upon success, allowing a stream of data to be parsed sequentially:
When a rule fails to match, or if the rule detects a unrecoverable problem with the input, it returns a result assigned from an cpp:error_code[] indicating the failure.
75
+
When a rule fails to match, or if the rule detects an unrecoverable problem with the input, it returns a result assigned from an cpp:error_code[] indicating the failure.
76
76
When using overloads of cpp:grammar::parse[parse] which have a character pointer as both an in and out parameter, it is up to the rule to define which character is pointed to upon error.
77
77
When the rule matches successfully, the pointer is always changed to point to the first unconsumed character in the input, or to the cpp:end[] pointer if all input was consumed.
78
78
79
-
It is the responsibilty of library and user-defined implementations of __compound rules__ (explained later) to rewind their internal pointer if a parsing operation was unsuccessful, and they wish to attempt parsing the same input using a different rule.
79
+
It is the responsibility of library and user-defined implementations of __compound rules__ (explained later) to rewind their internal pointer if a parsing operation was unsuccessful, and they wish to attempt parsing the same input using a different rule.
80
80
Users who extend the library's grammar by defining their own custom rules should follow the behaviors described above regarding the handling of errors and the modification of the caller's input pointer.
Copy file name to clipboardExpand all lines: doc/modules/ROOT/pages/index.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ This library understands the grammars related to URLs and provides functionality
25
25
== Features
26
26
27
27
While the library is general purpose, special care has been taken to ensure that the implementation and data representation are friendly to network programs which need to handle URLs efficiently and securely, including the case where the inputs come from untrusted sources.
28
-
Interfaces are provided for using error codes instead of exceptions as needed, and most algorithms have the means to opt-out of dynamic memory allocation.
28
+
Interfaces are provided for using error codes instead of exceptions as needed, and most algorithms have the means to optout of dynamic memory allocation.
29
29
Another feature of the library is that all modifications leave the URL in a valid state.
30
30
Code which uses this library is easy to read, flexible, and performant.
Copy file name to clipboardExpand all lines: doc/modules/ROOT/pages/quicklook.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,7 +234,7 @@ id=42&name=John Doe Jingleheimer-Schmidt
234
234
--
235
235
====
236
236
237
-
cpp:decode_view[] and its decoding functions are designed to perform no memory allocations unless the algorithm where its being used needs the result to be in another container.
237
+
cpp:decode_view[] and its decoding functions are designed to perform no memory allocations unless the algorithm where it's being used needs the result to be in another container.
238
238
The design also permits recycling objects to reuse their memory, and at least minimize the number of allocations by deferring them until the result is in fact needed by the application.
239
239
240
240
In the example above, the memory owned by `str` can be reused to store other results.
@@ -370,7 +370,7 @@ key = name, value = John Doe
370
370
371
371
== Modifying
372
372
373
-
The library provides the containers cpp:url[] and cpp:static_url[] which supporting modification of the URL contents.
373
+
The library provides the containers cpp:url[] and cpp:static_url[] supporting modification of the URL contents.
374
374
A cpp:url[] or cpp:static_url[] must be constructed from an existing cpp:url_view[].
375
375
376
376
Unlike the cpp:url_view[], which does not gain ownership of the underlying character buffer, the cpp:url[] container uses the default allocator to control a resizable character buffer which it owns.
0 commit comments