WC3MapSpecification icon indicating copy to clipboard operation
WC3MapSpecification copied to clipboard

Formal grammars for WTS and TXT

Open WaterKnight opened this issue 1 year ago • 2 comments

Hi,

do we have formal grammars for WTS and TXT?

WTS can have comments with double forward slashes and there are edge considerations like what if there are no line breaks between the curly braces and the content string or in between different strings or if the string can be quoted or how to use curly braces in the content string etc.

TXT probably follows an INI specification but there are different INI variants. Here, you can have comments with double forward slashes, too (did not test hashtag or semicolon as it's often in other INIs). Values can be double quoted on the right side, otherwise the comma serves as a value separator.

There is a number of things that can go wrong in detail when writing a parser or serializer.

WaterKnight avatar Jul 16 '23 09:07 WaterKnight