|laziness, impatience, and hubris|
P6: Beginning grammarby rir (Vicar)
|on Jun 02, 2010 at 16:56 UTC||Need Help??|
rir has asked for the
wisdom of the Perl Monks concerning the following question:
I have a match object that doesn't appear to contain what I'd like. The examples, I've found, are not working for me; I find SO5 a bit thick. Attempting this with a grammar is a learning exercise.
In the above, I'd like to grab ops, know their "type" and insert into a hash keyed on the shorts.
Is this arranged correctly to avoid a partial sop matching as a bop?
The input string will be small; should I walk the string or walk the match object? As an exercise, treating the problem like a larger language appeals?
How do I traverse $match?
$match is supposed to work just like $/, yes?
I don't care to capture seps or divs but I would like to abstract the values. Should this be done in the grammar? --by variables?