I've had occasion to parse some weather observation formats - METAR,
SYNOP, ACMOS; formats that seem to have been organically grown
rather than well-designed. Each of a few thousand weather stations
seems to use their own variation of a somewhat standardized format.
Here's a general overview of
I wanted to know, after matching a rule, what text the rule matched.
So I used two variables to remember what the remaining text and
offset were before and after the rule and just determined the
difference.
report : rulevar: local $rule_text
report : rulevar: local $rule_offset
report
On Tuesday, October 30, 2001, at 04:27 PM, Your Friend wrote:
I have a data structure which is
a hash of entries
where
an entry is a list/array of sets
Problem: I cannot figure out how to actually FILL the parsed data into
the structure. I can only decide if a string is
Hi Richard,
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.
I used your sample input and the Data::Denter'ed output is:
%
On Friday, November 9, 2001, at 01:11 PM, Randal L. Schwartz wrote:
Damian Especially if you have to change the count at some later point,
which
Damian would mess up any code relying on the type of value returned.
I prefer it the way it is. (1) may say match one, which is the
same as
On Donnerstag, Februar 7, 2002, at 02:14 Uhr, damian wrote:
Usually by anchoring the end of the match. That might be:
myrule: 'stuff' mysubrule(?) ...!ID
it seems necessary to return a { 1 } here, as the rule
fails otherwise, presumably because of the negative lookahead:
myrule: