PyBNF configuration parsing (pybnf.parse)

Grammar and methods for parsing the configuration file

pybnf.parse.parse_normalization_def(s)[source]

Parse the complicated normalization grammar If the grammar is specified incorrectly, it will end up calling something invalid the normalization type or the exp file, and this error will be caught later.

Parameters:

s – The string following the equals sign in the normalization key

Returns:

What to write in the config dictionary: A string, or a dictionary {expfile: string} or {expfile: (string, index_list)} or {expfile: (string, name_list)}