[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #6802 [Tor Client]: Make our config parsing less kludgy
#6802: Make our config parsing less kludgy
-------------------------+--------------------------------------------------
Reporter: nickm | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Tor: unspecified
Component: Tor Client | Version:
Keywords: | Parent:
Points: | Actualpoints:
-------------------------+--------------------------------------------------
If our only configuration types were strings, numbers, booleans, and so
forth, our existing configuration parsing mechanism would be nifty. But
right now, we do entirely too much with STRING, LINELIST, and worst still
LINELIST_V.
We've become decent at implementing some patterns to work around this, but
it would be neat to get much better.
So as first steps, I suggest that we:
* Split the parts of the configuration file parsing that handle the
abstract bits of config_format_t into their own file.
* Turn config_type_t into an OO thing, so that it's easier to add more.
* Teach the linelist types and the smartlist types to be a bit smarter
about what they are lists of, so that every list type doesn't need special
handling.
* Make our linelist_v types have an explicit syntax for sections.
* Implement an additional function to handle the common case of a line
that has some positional arguments and some k{=v} arguments.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6802>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs