Introduction

NML (NFO Meta Language) is a language that can be compiled into NFO, the standard language for NewGRFs. NFO is very powerful, but due to its nature it's very difficult to read and write. NML attempts to make make writing NewGRFs far easier, while maintaining the powerful features that NFO has to offer.

Using the tool

First you need to install PLY. This python module is used for building the lexer and parser, similar to lex/yacc. Version 3.3 is known to work, other versions may work as well, but this has not been tested. To write .grf files (as opposed to only .nfo files) you also need PIL.
To start, just run nmlc with the input file as argument. Output files should be given as "-o outputffile". So when you execute for example
nmlc data.nml -o data.nfo
the input is read from data.nml and output written to data.nfo, both in the current working directory.

Language specification

A full specification of the language is will be supplied here: http://hg.openttdcoop.org/nml/raw-file/tip/docs/index.html

Alternatively a set of examples / tutorials is will be given here: Examples

Program structure

Program structure