hyperrealm / libconfig

C/C++ library for processing configuration files
https://hyperrealm.github.io/libconfig/
GNU Lesser General Public License v2.1
1.1k stars 360 forks source link

Semicolon mandatory while reading cfg.readFile(filename); - for validation #166

Closed gaurav360 closed 4 years ago

gaurav360 commented 4 years ago

How to make semicolon mandatory while reading CFG file. Idea is to validate if missing semicolon is present or not.

hyperrealm commented 4 years ago

Change this production in the grammar.y file:

setting_terminator: / empty / | TOK_SEMICOLON | TOK_COMMA ;

to:

setting_terminator: TOK_SEMICOLON | TOK_COMMA ;