use lib './lib';
use lib '.';
use DSL::Entity::Foods;

my $pCOMMAND = DSL::Entity::Foods::Grammar;
$pCOMMAND.set-resources(DSL::Entity::Foods::resource-access-object());

#use Grammar::Tracer;

say $pCOMMAND.parse('chocolate chip cookie ice creams', rule => 'food-entity-command');

say $pCOMMAND.parse('fried tomatoese', rule => 'food-entity-command');
#
#say $pCOMMAND.subparse('beef stir - fried with green peppers in black bean sauce', rule => 'food-entity-command');


say $pCOMMAND.parse('i want arizona iced tea');
#
say $pCOMMAND.parse('i want mac n cheese');
#
say $pCOMMAND.parse('i want black-eyed peas');


say "=" x 60;

my @testCommands = (
'fried tomatoes',
'banana split'
);

#my @targets = ('Bulgarian', 'WL-System');
my @targets = ('WL-System');

for @testCommands -> $c {
    say "-" x 30;
    say $c;
    for @targets -> $t {
        say '-' x 30;
        say $t;
        say '-' x 30;
        my $start = now;
        my $res = ToFoodEntityCode($c, $t);
        say "time:", now - $start;
        say $res;
    }
}
