PrePAN

Sign in to PrePAN

Convert::Maker Make a conversion generator for fixed keys

Author
benkasminbullock@github
Date
URL
Status
In Review
Good

Synopsis

Use Convert::Maker 'make_convert';

my %hash = (
   abc => 'xyz',
   ab => 'dcf',
);

my $c = make_convert (\%hash);

Description

A conversion generator which outputs C code. The C code output converts hash keys to values in the style of Data::Munge's list2re or lex. Construct automata to translate a fixed list of inputs into a certain set of outcomes.

The projected use of this is in creating very fast converters for translating symbol tables into other symbols. For example, to convert "ASCII IPA" into Unicode symbols very rapidly, to convert Chinese characters into Pinyin, etc.

Comments

Please sign up to post a review.