Hi, To facilitate my error reporting, I'd like to know the largest that $thisoffset ever gets. For example, if I have some grammar with this rule:
sentence: subject verb object if it fails to parse an 'object', I'd like to get the $thisoffset as of the 'verb' which had been parsed, as if my rule was sentence: { RememberMax($thisoffset) } subject { RememberMax($thisoffset) } verb { RememberMax($thisoffset) } object { RememberMax($thisoffset) } Is there any way to access or automate this? Thanks. To contribute a little something, appended are fixes for a few typos (mostly spelling, but two coding) I've noticed in RecDescent.pod. Jeffrey -------------------------------------------------------------------------- *** RecDescent.pod-orig Mon Mar 3 10:18:26 2003 --- RecDescent.pod Mon Mar 3 10:26:30 2003 *************** *** 268,270 **** ! Repetition modifieres may include a separator pattern: --- 268,270 ---- ! Repetition modifiers may include a separator pattern: *************** *** 427,429 **** subrule's name, whilst all other items are stored under a "named ! positional" key that indictates their ordinal position within their item type: __STRINGI<n>__, __PATTERNI<n>__, __DIRECTIVEI<n>__, __ACTIONI<n>__: --- 427,429 ---- subrule's name, whilst all other items are stored under a "named ! positional" key that indicates their ordinal position within their item type: __STRINGI<n>__, __PATTERNI<n>__, __DIRECTIVEI<n>__, __ACTIONI<n>__: *************** *** 755,757 **** parser = new Parse::RecDescent (q{ ! expression: and_expr '&&' expression { [EMAIL PROTECTED] } --- 755,757 ---- parser = new Parse::RecDescent (q{ ! expression: and_expr '||' expression { [EMAIL PROTECTED] } *************** *** 913,915 **** non-existent subrule fails immediately. This typically occurs as a ! result of misspellings, and is a sufficiently common occurance that a warning is generated for such situations. --- 913,915 ---- non-existent subrule fails immediately. This typically occurs as a ! result of misspellings, and is a sufficiently common occurrence that a warning is generated for such situations. *************** *** 1286,1288 **** ! Spock: "Fascinating ',' (name | 'Captain') '.' | "Highly illogical, doctor." --- 1286,1288 ---- ! Spock: "Fascinating" ',' (name | 'Captain') '.' | "Highly illogical, doctor." *************** *** 1420,1422 **** ! See F<"DIAGNOSTICS"> for a list of the varous error and warning messages that Parse::RecDescent generates when these two variables are defined. --- 1420,1422 ---- ! See F<"DIAGNOSTICS"> for a list of the various error and warning messages that Parse::RecDescent generates when these two variables are defined. *************** *** 1664,1666 **** failed and so the deferred actions queued by those subrules were subsequently ! disgarded. The second production then succeeded, causing the entire parse to succeed, and so the deferred actions queued by the (second) match of --- 1664,1666 ---- failed and so the deferred actions queued by those subrules were subsequently ! discarded. The second production then succeeded, causing the entire parse to succeed, and so the deferred actions queued by the (second) match of *************** *** 2001,2003 **** ! To cater for such situtations, the C<E<lt>score:...E<gt>> can be used. The directive is equivalent to an unconditional C<E<lt>rejectE<gt>>, --- 2001,2003 ---- ! To cater for such situations, the C<E<lt>score:...E<gt>> can be used. The directive is equivalent to an unconditional C<E<lt>rejectE<gt>>,