Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time



You're reading the documentation for noerr. noerr is a tool, helping you to use noweb with programming languages that don't understand #line commands. I assume that you understood this sentence. If not, read about literate programming, noweb, and try to use it with e.g. Java.

General Description

noerr is a filter for noweb. It changes error messages from pointing to noweb-generated files to pointing to noweb-files. It does so by emulating the #line command of C as close als poosible while retaining flexibility.

If you put the option -L on the noweb-commandline, it expands to #line %L "%F"%N

This option inserts #line lines to point errors from included header-files back into the original. I'm going to do the same for tracing errors in source-files back to noweb-files.

The -L option generates #line %L "%F"%N, with %L being replaced by the referenced line and %F with the referenced file. This freely configurable. For examples look in my Makefile (Section [->]).


If you use noweb and have perl installed, you can use noerr.

noerr needs the line option you use with noweb and the compiler output as input. The line option is noerr's only command-line option. The Compiler-output comes from standard in.


Here is a little Java Program I used to test noerr.

//-*- java -*-
public class example

some text between the code blocks

fasel dummes Zeug;

public static void main(String argv[])
    hier gehts schief;

some more Text behind the last code block.

A simple

notangle -L'//line %L "%F"%N' noerr.nw >

leads to

//line 299 "noerr.nw"
fasel dummes Zeug;
//line 292 "noerr.nw"
public class example
//line 302 "noerr.nw"
public static void main(String argv[])
{hier gehts schief;}
//line 293 "noerr.nw"

Let's watch a usual compilation:

sven@home:/home/sven/uni/noerr > javac Class or interface declaration expected.
^ ';' expected.
{hier gehts schief;}
2 errors                               

I've got to go to just to find the line-line telling me, where to look in noerr.nw. I know we can do better. Let's watch noerr at work:

cd ~/uni/noerr/
make test
notangle -L -RMakefile noerr.nw > Makefile
notangle -L noerr.nw >
notangle -L'//line %L "%F"%N' noerr.nw >
javac 2>&1 | perl -L'//line %L "%F"%N'
noerr.nw:299: Class or interface declaration expected.
fasel dummes Zeug;
noerr.nw:303: ';' expected.
{hier gehts schief;}
2 errors

Compilation finished at Wed Dec  9 20:01:08

This looks better, doesn't it?


noerr is a filter for noweb error messages to improve error messages for languages missing #LINE directives.







No packages published