The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
# Usage:
#   util/compile_p6grammar.pl examples/adder.grammar > Adder.pm
#   perl -Ilib -MAdder -e 'print Adder->add("3 + 23")->(), "\n"'

grammar Adder;

token add {
    (\d+) <.ws>? '+' <.ws>? (\d+) { return $/[0] + $/[1] }
}