Fix writer to look for longest URI first when allocating prefixes.
Use EBNF 0.2, with different context for calling terminal, and production, as well as new start_production element.