forked from cpp-netlib/url
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
293 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,3 @@ constant c11-requires : | |
; | ||
|
||
build-project test ; | ||
build-project example ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[/ | ||
Copyright (c) 2019 Vinnie Falco ([email protected]) | ||
Copyright (c) 2021 Alan de Freitas ([email protected]) | ||
|
||
Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
|
||
Official repository: https://github.com/CPPAlliance/url | ||
] | ||
|
||
[section Customization points] | ||
|
||
Users can define customization points defining the logic to parse and store the results of | ||
grammar rules as part of the same library architecture. | ||
|
||
This allows arbitrary grammar logic in expressions that interact with the existing rules. | ||
Some use cases could include alternative or extended syntax for URLs and its components. | ||
|
||
These new function overloads may be defined in other namespaces with the `tag_invoke` | ||
customization point. | ||
|
||
[snippet_customization_1] | ||
|
||
The function [link url.ref.boost__urls__grammar__parse `parse`] relies on | ||
[@https://en.cppreference.com/w/cpp/language/adl argument-dependent lookup] to find these function | ||
overloads with the appropriate tag [link url.ref.boost__urls__grammar__parse_tag `grammar::parse_tag`]. | ||
|
||
At this point, the new rule can interact with existing rules in any of the parsing functions: | ||
|
||
[table [[Code][Output]] [[ | ||
[c++] | ||
[snippet_customization_2] | ||
][ | ||
[teletype] | ||
``` | ||
scheme: http | ||
lower: somelowercase | ||
``` | ||
]]] | ||
|
||
|
||
|
||
|
||
|
||
[endsect] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.