Re: problem filling a data structure
[email protected] (Your Friend)
| Newsgroups | perl.recdescent |
|---|---|
| Message-ID | <[email protected]> |
Hello Marcel,
On Tue, Oct 30, 2001 at 09:44:08PM +0100, Marcel Grunauer wrote:
> Try this grammar, which you have to feed the input as one big
> string. It uses a global variable, $::res into which the results
> are assembled. At the end the variable is also returned for
> convenience.
Thank you for the example. Although the provided gramar sticks in a
endless loop, there are some hints in it that will help me to achieve
what I need. Especially the <rulevar: ..:> directive should be
extremly helpful.
Alas, new problems arose. A:
<rulevar: local $meaning = Set::Scalar->new>
didn´t work. Which is because of the '>'. So I tried a
<rulevar: local $meaning = do{Set::Scalar->new}>
which does the trick.
Mainly because I don´t really understand Parse::RecDescent on a good
level, I applied some of Marcels suggestions to my gramar instead
modifying his as I simply don´t understand how it works. My solution works
now 95% :-). As soon as I get the correct behaviour, I would be glad
to post the resulting code here for validation. Mainly because I feel
I´m doing some kind of "Low level P::RD" programming not using the
majority of its features/possibilities.
BTW: Does anybody know what happened to the perlmonks website?
Bye,
Richard