From the smb.conf manpage:
The file consists of sections and parameters. A section
begins with the name of the section in square brackets and
continues until the next section begins. Sections contain
parameters of the form
name = value
The file is line-based - that is, each newline-terminated
line represents either a comment, a section name or a param-
Section and parameter names are not case sensitive.
That would indicate the INI file grammar would be a good start. There are a couple peripheral cases which come into play:
Any line beginning with a semicolon (';') or a hash ('#')
character is ignored, as are lines containing only whi-
Any line ending in a '\' is continued on the next line in
the customary UNIX fashion.
But, those rules should be easy to fit into a grammar.
Has or did anyone end up writing a grammar for smb.conf?
Is there any document that can help in writing grammar files?
smb.conf is a unix core file
that should be included in the base product without anyone required to write a grammar
count this as a RFE