Commit 7acb08d8 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[5014] dhcp6.dox cleanup

parent 09aa7a35
...@@ -97,23 +97,25 @@ To solve those issues a two phase approach was proposed: ...@@ -97,23 +97,25 @@ To solve those issues a two phase approach was proposed:
PHASE 1: replace isc::data::fromJSON with bison-based parser. This will allow PHASE 1: replace isc::data::fromJSON with bison-based parser. This will allow
to have a single file that defines the actual syntax, much better syntax to have a single file that defines the actual syntax, much better syntax
checking, and provide more flexibility, like various comment types and checking, and provide more flexibility, like various comment types and
file inclusions. As a result, the parser still returns JSON structures, file inclusions. As a result, the parser still returns JSON structures that
but those are guaranteed to be correct from the grammar perspective. are guaranteed to be correct from the grammar perspective. Sticking with
the JSON structures also allows us to continue using existing parsers.
Furthermore, it is possible to implement default values at this level Furthermore, it is possible to implement default values at this level
as simply inserting extra JSON structures in places that are necessary. as simply inserting extra JSON structures in places that are necessary.
PHASE 2: simplify existing parsers by getting rid of the build/commit split. PHASE 2: simplify existing parsers by getting rid of the build/commit split.
Get rid of the inheritance contexts. Essentially the parser should Get rid of the inheritance contexts. Essentially the parser should
take JSON structure as a parameter and return the configuration structure take JSON structure as a parameter and return the configuration structure.
For example, for options this should essentially look like this: For example, for options this should essentially look like this:
@code @code
CfgOptionPtr parse(ConstElementPtr options) CfgOptionPtr parse(ConstElementPtr options)
@endcode @endcode
The whole complexity behind inheriting parsers should be removed The whole complexity behind inheriting contexts should be removed
and implemented in the parser. It should return extra JSON elements. from the existing parsers and implemented in the bison parser.
The details are TBD, but there is one example for setting up an It should return extra JSON elements. The details are TBD, but there is
renew-timer value on the subnet level that is ihnerited from the one example for setting up an renew-timer value on the subnet level that
global ("Dhcp6") level. This phase is still a bit loosely defined. is ihnerited from the global ("Dhcp6") level. This phase is still a bit
loosely defined.
There is now a fully working prototype for phase 1. It introduces bison There is now a fully working prototype for phase 1. It introduces bison
based parser. It is essentially defined in two files: dhcp6_lexer.ll, based parser. It is essentially defined in two files: dhcp6_lexer.ll,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment