To add a new scanner in source code, you should add a new section to the
file scanners.c. It might be easiest to clone one of the
existing scanners and modify it as necessary. For the hypothetical
language foo, you must define the functions
help_me_foo, as well as the tables
args_foo. If your scanner is
modeled after one of the existing scanners, you'll also need a
This is not a terribly difficult programming task, but it requires recompiling and installing the new version of mkid and xtokid. You should use xtokid to test the operation of the new scanner.
Once these functions and tables are ready, add function prototypes and
an entry to the
languages_0 table near the beginning of the file.
Be warned that the existing scanners are built for speed, not elegance or readability. You might wish to create a new scanner that's easier to read and understand if you don't feel that speed is so important.