D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
blackhat.pw
:
/
kunden
/
kunden
/
usr
/
share
/
doc
/
libparse-recdescent-perl
/
examples
/
Filename :
demo.pl
back
Copy
#! /usr/bin/perl -w package Foo; use base Parse::RecDescent; sub print_cat { print "Found ", @_[1..$#_], "\n"; } package main; $parse = new Parse::RecDescent(<<'EOG'); input : "cat" { $thisparser->print_cat($item[1]); } | "dog" { $thisparser->print_cat($item[1]); } EOG $parse = bless $parse, "Foo"; $parse->input("cat"); $parse->input("doggone");