-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax definitions #8
Comments
📑 DRAFT / NOTESThe parsing is handled in
🔭 Observation: For the four keywords ( For each keyword exists a corresponding
Some auxillary functions called on the way:
|
Curently, go-uci is a "best effort" parser and does not strictly follow the rules imposed on UCI files.
This is mainly due to the fact, that the parser function in the original UCI C source does not declare the syntax in an obvious way (i.e. I could not find such a declaration).
In PR #7, I've accepted a change, which expands the accepted characters for identifiers from
_a-zA-Z
to-_a-zA-Z0-9
. A valid UCI config file is/etc/config/wireless
, which contains entries likeContrast this with this statement from the OpenWRT wiki on the file syntax (last paragraph in that section):
The identifier
wifi-device
contains a hyphen, but does actually work and theuci
binary accepts it without error.It would be nice for the parser to be closer to
uci
/libuci
and reject invalid identifiers (also the setter/getter methods should only accept valid identifiers).A first step would be documenting the actually accepted file syntax, based on the C sources.
The text was updated successfully, but these errors were encountered: