Of comments and semicolons

I finished the last few features of the UDL core language: comments and semicolons. Comments affect the lexer while semicolons affect the parser.

Comments are simple C-style single and multi-line comments. The lexer just skips right over them and they don’t make it to the parser.

Semicolons are used to break up keys on a single line allowing multiple keys per line. It also makes it convenient to specify an entire section on one line if necessary.

/*
Example object (
*/
[object example]
{
  // multiple keys on a line
  Texture textures/default.tga; Size "512 512"

  // single line section
  [Uniforms] { Color "1 1 0 1"; Offset "0.5 0.5" }
}

While neither of these features is particularly earth shattering they do fill out the usefulness of the language. Now it’s time to focus on converting my old python UDL parser into a simple UDL C Api.

Leave a Reply