Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Parsing syntax trees

by GrandFather (Saint)
on Dec 30, 2015 at 08:31 UTC ( [id://1151455]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use warnings;
    ...
    my $root    = $grammar->parse(\$input, 'Construct');
    
    ($$root)->traverse(sub {print "  " x $_[0]->{_depth}, $_[0]->getNodeVa
    +lue(), "\n"});
    
  2. or download this
    +
      *
    ...
      *
        3
        4
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1151455]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found