alliedmodders/amxmodx — pull request #101 by Arkshine (2014-08-03 23:29:21+00:00)
Title: Introduce TextParser API

Shamelessly stolen from SM.

It would too late to change AMXX config file format, but it's still useful for plugins, having an unified way to parse a config file.

Here some explanations about the first three commits, because it may appear messy:
* First is about importing stuffs as it is, and converting to AMXX way. Nothing special. At this point there an API only for SMC config. (I could have renamed to VDF but since It's a custom lib from SM, I preferred to keep SMC).

* Second is about to expose INI config format to API (available parser but not exposed), because in AMXX, INI-like format is probably more often used but a VDF format is appreciated, thus implemented both. Considering both format use the same kind of parser/hook system but with some differences ; I thought this would appropriate both format share the same natives. So I tried to modify parser and natives to support both. At the end, result was not really satisfying: INI was using SMC_ natives, and this was somehow confusing.

* Third is about splitting INI/SMC API. Even if it's kind of duplicate things, It's much better this way for readability , maintainability and future update. I had to revert some changes done in parsers, splitting pawn includes in 2 files *smc.inc and *ini.inc, with different prefix for natives (SMC_, INI_). This looks more natural and cleaner this way.

This includes also a fast test plugin and this seems to run fine.
Feel free to suggest if you think it should be organized differently, @TheDS.