anchor.diff:  body. Using the above example `Foo { A = 1, B = 2 }` will be replaced by
   `{ C = 3 }`.
   
  -=== Adding unit extensions ===
  +=== Using DefRule to define custom build rules
  +
  +DefRule is a declarative way to introduce new DAG-building primitives,
  +typically by calling out to external tools. Here is a simple example, taken
  +from the `generator-simple` example:
  +
  +.DefRule example
  +[source,lua]
  +-------------------------------------------------------------------------------
  +local common = {
  +    Env = {
  +        GENSCRIPT = "generate-file.py",
  +    },
  +}
  +
  +Build {
  +    Units = function()
  +
  +        -- A rule to call out to a python file generator.
  +        DefRule {
  +            Name               = "GenerateFile",
  +            Pass               = "CodeGeneration",
  +            ConfigInvariant    = true,
  +            Command            = "python $(GENSCRIPT) $(<) $(@)",
  +            ImplicitInputs     = { "$(GENSCRIPT)" },
  +            Blueprint = {
  +                Input  = { Type = "string", Required = true },
  +                Output = { Type = "string", Required = true },
  +            },
  +            Setup = function (env, data)
  +                return {
  +                    InputFiles  = { data.Input },
  +                    OutputFiles = { "$(OBJECTROOT)/" .. data.Output },
  +                }
  +            end,
  +        }
  +
  +        local testprog = Program {
  +            Name = "testprog",
  +            Sources = {
  +                "main.c",
  +                -- Generate a source file, feed the .c file back into the unit
  +                GenerateFile {
  +                    Input = "data.txt",
  +                    Output = "data.c"
  +                },
  +            }
  +        }
  +        Default(testprog)
  +    end,
  +
  +    Passes = {
  +        CodeGeneration = { Name="Generate sources", BuildOrder = 1 },
  +    },
  +
  +    Configs = {
  +      -- ...
  +    },
  +}
  +
  +-------------------------------------------------------------------------------
  +
  +=== Adding unit extensions
   
   Unit extensions hook capture data during parsing which can later be transformed
  -into DAG nodes for building. To create one, start with this template script:
  +into DAG nodes for building. These are more complex than `DefRule` invocations,
  +but can do anything.
  +
  +To create one, start with this template script:
   
   .Unit Script Template
   [source,lua]
  
positive.code: }
  -------------------------------------------------------------------------------
  
  <<<
  
  == Unit Syntax ==
  
  This section describes the default syntax elements that are available for use
  in the units file. You can add your own unit syntax via extension.
  
  === Configuration Filtering ===
  
  It is often desirable to include various bits of data for a certain
  configuration only, for example to include a source file only in the debug
  
negative.code: 
  Stay away from funny characters in the names, alphanumeric is a safe bet.
  
  ==== Native Unit Config property
  
  Specifies what configuration(s) this unit will be present in. Configuration
  pattern matching is applied as usual. For example, to include a unit only in
  