I don't have any experience with Parse::RecDescent, but couldn't you just use the array as the basis to generate a grammar rule? For example:
my @colors = qw(red green blue); my $rule = "color: " . join " | ", map "'$_'", @colors;
In reply to Re: Dynamic expansion of tokens with Parse::RecDescent
by revdiablo
in thread Dynamic expansion of tokens with Parse::RecDescent
by jaldhar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |