parse-recdescent

Why does my Parse::RecDescent give me all these warnings and errors?

Having a lot of pain with the following Perl file parsing code [last reply on PM @http://www.perlmonks.org/index.pl?node_id=754947] below: #!/usr/bin/perl -w use strict; use warnings; #use diagnostics; use Parse::RecDescent; use Data::Dumper; # Enable warnings within the Parse::RecDescent module. $::RD_ERRORS = 1; # Make sure the pa...

Parse::RecDescent - getting information from it.

Hi, I'm working with the Parse::RecDescent parser in Perl, and I seem to have the most terrible time getting information from it. The information readily available online does not seem to have non-trivial examples. Here is the code: event_function: object_list ':' event_list ';' <defer: { #item is a special character w...

Interpolating variables in a Parse::RecDescent regex

I'm working on a Parse::RecDescent grammar to read a given human-readable set of rules and then spit out a file that is much easier for a computer to read. One of the tokens is a list of "keywords"; about 26 different keywords. These may change over time, and may be referenced by multiple pieces of code. Consequently, I want to store th...

Is Perl's Parse::RecDescent thread safe?

I have a web application that uses a parser created with Parse::RecDescent. A parser object is needed in several parts of the application and since the parser takes quite a bit of memory I have up to now treated the parser object as a singleton. This works well in a pure CGI environment since only one expression is parsed by the same obj...

Printing and concatenation with Parse::RecDescent

I am testing the grammar from P::RD tutorial in order to develop my own grammar. I haven't figured out how to print a string declaration and append '$' to the front of it. For example "STRING sDir" should print out "$sDir". It is simple enough to just do a $string =~ s/STRING /\$/, but what about the case where there is assignment? eg. "...