Symbol declarations are newline-terminated, //-style comments are allowed in the code section, keywords as symbol names are allowed, template names cannot be differentiated from identifiers (in many cases) because JK parses COGs in the most stupid way possible.
COGs are parsed in two passes. They used something similar to the Dark Forces INF parser for the symbols section (which is basically what COG was, originally) and then tacked on a copy+pasted C BNF for the code section.
In addition to the usual assortment of literals, in the symbols section you can have template literals which are not delimited in any way. There are also a number of unhandled syntax errors in various LEC COGs (like invalid desc metadata) so you're looking at a whole lot of typing if you do the whole thing with a parser generator.
To fix the symbol name = keyword problem I ended up manually parsing the symbols section (like JK does) and feeding the result into the tokenizer (like JK probably does). Unfortunately that meant searching through the symbol table every time I hit a keyword token but that's JK for you!
I'm not really hung up about it, I enjoy using it as a symbol to represent how bad JK's design is.
If I were to pick up the project again the data files would be so different that it wouldn't really be possible to convert JK's content. Among other things, 3dos and keys would be completely scrapped. So would COG. It'd be so different that anybody who worked on it
would get sued for creating an unlicensed Star Wars game (instead of getting a C&D at the 11th hour like what would have happened with Sith 2).
Also, it'd be written in C# and it wouldn't use OpenGL. I love me some XNA.