#!/usr/bin/perl use strict; use warnings; use Parse::RecDescent; my $text = <new($grammar); if ($parser->data($text)) { print "ok\n"; }