NFORenum

About

NFORenum is a format correcter and linter for the NFO programming language.

It takes as input any number of files that contain something that vaguely resembles valid NFO, and produces, to the best of its ability, encodable NFO files, one for each input file.
It also detects and warns about some common mistakes made in NFO coding. All errors that will cause TTDPatch to reject the GRF during the initialization or activation phases should be detected; if any are not, it is a bug and should be reported as such.
Sprites that are too short, not of the correct type (real/pseudo/&c.), too long, or otherwise not in agreement with their data or the preceeding sprites are all detected.

A pretty-printer is included. If enabled, it reformats code basically according to these instructions.

Download

The latest release version of NFORenum is 3.4.6 (r1795).
Source code may be acquired by checking out revision 1795 of /misc/nforenum from TTDPatch's SVN repository, or from the web interface
See the NFORenum thread for a partial changelog or the included CHANGELOG.txt file for a more complete changelog. A list of all changes can be acquired from the SVN server.
A prebuilt Windows executable can be found here. Some old versions are available in the old/ directory.
The latest public build (somewhat experimental) is hiding in the corner. Please read this forum post before downloading.

The following data files have been updated since the above release:

FileDate (GMT)Changes
2v.dat2008/Feb/02 19:21Variable 12.
0.dat2008/Feb/06 04:53Bridge properties 10..12.
2v.dat2008/Apr/18 03:35Fix parameter limits on station variable 60.
0.dat2008/Oct/11 23:58Make train prop 1A is an extended byte; add RV prop 20, Ship/plane props 1B, bridge props 00 and 13, and house props 21 and 22; newobjects support
2v.dat2008/Oct/11 23:58Global variables 11, 23, 24; house var 47 and 65; industry var 46; veh var 49; newobjects support
79Dv.dat2008/Oct/11 23:58Variables A2..A4
5.dat2008/Oct/11 23:58Type 15 takes 91h sprites.
TextIDs.dat2008/Oct/11 23:58TTDPatch texts through F99A
callbacks.dat2008/Oct/11 23:58Newobjects support
feat.dat2008/Oct/11 23:58Newobjects support
0f8.dat2009/Apr/17 00:07General variables prop 11
2r.dat2009/Apr/17 01:48Random bits for newobjects

To use these files, place them in your .renum directory/directories.