Someone asked me what they thought was a good language for parsing KeyValues for some standalone application. The #1 factor that came to mind was "Does a parser exist for that language?"
Turns out it's harder to find parsers than I thought. I wanted to collect the results of my search in one place, so here goes:
Note: I haven't used or reviewed most of these personally
C++ Valve KeyValues Implementation:
KeyValues.h KeyValues.cpp - LOW portability (Requires lots of hl2sdk by default)
C++ SM TextParsers Implementation:
TextParsers.h TextParsers.cpp - MEDIUM portability (Linked version is psychonic's GDC fork port)
Node/Javascript
:
keyvalues-node - Should be portable, but their output format is questionable.
PHP:
SourceBans KeyValues/SMC_Parser implementation
PHP:
KVReader2.php another PHP implementation that doesn't use token_get_all
C#:
SteamKit implementation
Python:
py-keyvalues
Those are my finds thus far. I was hoping for a Python implementation personally, but I couldn't find one. Also: If anyone can give me formatted links for the bitbucket/sm repos that give latest version instead of revisioned version that would be helpful I think.
Edit: Got python, fixed repo links.