The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

Documentation

Prepare slides

Testing

Add tests for new features
Add test for dumping frozen file

Perl5

Create module Lamguage::m4 or Text::m4

Features

The feateres that need to be implemented are orded by chapters in the GNU m4 documentation.

Chapter 1 Introduction and preliminaries

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 -t or --trace

Chapter 2 Lexical and syntactic conventions

Nested quoted strings

Chapter 3 How to invoke macros

Recognize builtin macros
Recognize macros with arguments
Rescanning evaluated macros

Chapter 4 How to define new macros

Stack for macro definitions
Special arguments to macros

Chapter 5 Conditionals, loops and recursion

If and loops
Recursions

Chapter 6 How to debug macros and input

Implement debugging options
tracing

Chapter 7 Input control

Chapter 8 File inclusions

File inclusion
include path

Chapter 9 Diverting and undiverting output

Diversions

Chapter 10 Macros for text handling

implement all of them
Use POSIX regexes
Implement the builtin function patsubst

Chapter 11 Macros for doin arithmetic

implent all of them
Arithmetic expression parser, bc ???

Chapter 12 Running UNIX commands

Implement it

Chapter 13 Micellaneous builtin Functions

Implement all of them

Chapter 14 Fast loading of frozen states

more tests

Chapter 15 Compatability with other versions of m4

Document the differences between Parrot m4 and GNU m4