Documentation

Prepare slides

Internal

For matching use PGE instead of PCRE.

Testing

Modify 'output_is' such that GNU m4 is only tested when available.
Add tests for new features
Add test for dumping frozen file

Features

The features that need to be implemented are arranged by chapters in the GNU m4 documentation.

Chapter 1 Introduction and preliminaries

read from STDIN, when no file is passed
Add some tests with Autoconf macros
Parsing of short options
recognize unambigous long options
Option -G or --traditional
Option -E or --fatal-warnings
Option -d or --debug
Option -l or --arglength
Option -o or --error-output
Option -I or --include
Option -e or --interactive
Option -s or --synclines
Option -P or --prefix-builtins
Option -W or --word-regexp
Option -H or --hash-size
Option -L or --nesting-limit
Option -Q or --quiet or --silent
Option -B, -S, -T
Option -N or --diversions
Option -D or --define
Option -U or --undefine
Option -t or --trace

Chapter 2 Lexical and syntactic conventions

Nested quoted strings

Chapter 3 How to invoke macros

Option -P or --prefix-builtins
trailing whitespace in macro calls
warnings for inappropriate number of arguments
implement option '--changeword'
recognize unquoted parenthesis in macros

Chapter 4 How to define new macros

implement indirect macro calls
implement 'pushdef' and 'popdef'
implement 'defn'
Do 'input_stack' properly
Special arguments to macros

Chapter 5 Conditionals, loops and recursion

implement 'shift'
implement 'ifelse' used as switch
Write tests with recursion

Chapter 6 How to debug macros and input

implement macro 'dumpdef'
Implement debugging options
implement tracing
implement 'debugfile'

Chapter 7 Input control

everything

Chapter 8 File inclusions

File inclusion
include path
implement 'include'
implement 'sinclude'

Chapter 9 Diverting and undiverting output

Diversions

Chapter 10 Macros for text handling

macro b<translit> add as an op or port from GNU m4
macros b<regexp> and b<patsubst> POSIX regexes

Chapter 11 Macros for doing arithmetic

incr, decr of large numbers
radix support for `eval'

Chapter 12 Running UNIX commands

Why isn't there a 'system' in Parrot?
names for temporary files

Chapter 13 Micellaneous builtin Functions

Macro b<__file__>
Macro b<__line__>

Chapter 14 Fast loading of frozen states

Needs to be fixed, as the rx_* ops are gone
more tests

Chapter 15 Compatability with other versions of m4

Document the differences between Parrot m4 and GNU m4