1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602
|
Revision history for Parse-RecDescent
1.00 Mon Aug 11 13:17:13 1997
- original version
1.01 Mon Sep 8 18:04:14 EST 1997
- changed "quotemeta" to "quotemeta $_" in Text::Balanced
to workaround bug in Perl 5.002 and 5.003
1.10 Tue Sep 30 14:51:49 EST 1997
- fixed fatal bug in tracing code
- added m<delim>...<delim> format for regex tokens
- added support for trailing modifiers (/.../gimsox) in regex tokens
- added $thisline variable
1.20 Thu Oct 2 11:46:57 EST 1997
- fixed handling of trailing regex modifiers (now no whitespace allowed
before between last delimiter and first modifier)
- added trace diagnostic for failure/success of actions
(demystifies failures caused by an action returning undef)
- added context for "Matched rule..." trace
- added a test so that an integer value (N>1) in the
$::RD_TRACE variable now truncates (to N characters) all
contexts reported in any trace
- added "start-up" actions: actions appearing before the first rule
were previously an error. They are now executed (once) at
the start of the parser's namespace.
1.21 Sat Oct 4 17:12:23 EST 1997
- modified truncation of context in trace diagnostics (successful
matches now report first N/2 and last N/2 chars, instead of first N)
- fixed incorrect version number in Balanced.pm
1.22 Tue Oct 7 11:53:27 EST 1997
- fixed lurking trace problem with certain pathological regexes
- fixed bug in generation of special namespaces (this was serious
as it prevented the use of more than one alternation in a parser,
as well as preventing the use of more than one parser in a script!
1.23 Fri Oct 17 10:15:22 EST 1997
- fixed error message generation for <error?:msg> directives
- fixed error message handling of empty productions
- fixed handling of multi-line start-up actions
- removed spurious debugging message for implicit subrule generation
- changed naming scheme for alternations (pseudo-rule's name now
describes location of alternation exactly)
- added support for repetition specifiers on alternations.
- Text::Balanced::extract_.... altered to honour the context in
which they are called (see Balanced.pod for details).
1.24
- fixed minor problem in tracing code (context string now correctly
reported for actions)
- added explicit namespace declaration at beginning of generated
code, to ensure that any "start code" is declared in the
appropriate namespace.
- fixed left recursion check on empty productions
- added $::RD_AUTOSTUB flag and associated autostubbing behaviour
(see new section - "Autostubbing" - in RecDescent.pod)
- eliminated hierarchical precedence between $::RD_HINT and
$::RD_TRACE. Enabling tracing now does _not_ automatically
turn on hinting (although error and warning messages are
still automatically enabled).
- fixed bug in Text::Balanced. Division now correctly handled
in code blocks.
1.25 Mon Feb 09 12:19:14 EST 1998
- Resynchronized numbering schemes for RecDescent and Balanced.
1.26 Wed Feb 25 13:52:15 EST 1998
- Fixed bug (and inefficiency) in <resync:pattern> directive.
- Improved checking of regexes within grammars
- Added subrule arguments (major change to internal grammar parser)
- Added <matchrule:...> directive
- started work on Compile() option (not complete yet - do not use!)
- Made generated code "use strict"
- Fixed bug which incorrectly warned against items
following a <error?> directive.
- Improved $thisline (added assignment and resync)
- Fixed expectation messages for subrules
- Rearranged tar file to co-operate with CPAN.pm
1.30 Fri May 22 05:52:06 1998
- Added <rulevar> directive
- Added culling of productions starting with <reject> or <rulevar>
- Cleaned up and improved format (and speed) of tracing code
- Added warning levels
- Optimized generation of token separator checking code.
- Fixed bug encountered when parsing a literal string
- Added $::RD_AUTOACTION to simplify standard actions at the
end of each production
1.31 Fri May 22 06:11:26 1998
- Fixed bug in naming archive file
1.33 Fri May 22 06:15:26 1998
1.35 Wed Jun 24 09:57:02 1998
- Removed "foreach my $var ( @list )" constructs,
which were biting users with perl 5.003 and earlier.
- Fixed bug calling &Parse::RecDescent::toksepcode
instead of &Parse::RecDescent::Rule::toksepcode
- Changed grammar so that colons in rule definitions
must appear on the same line as the rule name
(as documented). Added an explicit error message
when this is not the case.
- Added $thiscolumn, which indicates the current
column at any point in the parse.
- Added $thisoffset, which indicates the absolute
position in the original text string at any
point in the parse.
- Added $prevline and $prevcolumn, which indicate
line and column of the last char of the last
successfully matched item.
- Added @itempos which provides:
$itempos[$n]{offset}{from}
$itempos[$n]{offset}{to}
$itempos[$n]{line}{from}
$itempos[$n]{line}{to}
$itempos[$n]{column}{from}
$itempos[$n]{column}{to}
corresponding to each $item[$n].
See new documentation.
- Several trivial lexical changes to make xemacs happy
1.41 Mon Aug 10 14:52:53 1998
- Enhanced POD in response to user feedback
- Fixed subtle bug in Text::Balanced::extract_codeblock.
It only bit when '(?)' appeared in implicit subrules
- Added ability to pass args to the start-rule.
1.42 ????
- Added a test.pl
- Modified behaviour of repetitions, so that the results
of repeated subrules which succeed but don't consume are
preserved (at least up to the minimal number of repetitions)
- Fixed bug: @itempos now not incorrectly reset if grammar
contained alternations
- Fixed bug: Embedded unmatched '}' in regex tokens now works
correctly
- Miscellaneous tweaks to RecDescent.pod (e.g. updated meta-grammar)
1.43 Sat Aug 15 06:43:46 1998
- Resychronized Balanced.pm versions
1.50 Thu Aug 27 09:29:31 1998
- Changed <rulevar:...> parser to use extract_codeblock, so as to
handle embedded '>' chars (e.g. <rulevar: $tmp = $self->{tmp}> )
- Added <defer:...> to allow deferred actions which are
only executed if they are part of a rule that eventually succeeds.
(see the new section under "Directives" in RecDescent.pod)
- Fixed matching interpolated literals (was broken when literal
contained pattern metacharacters)
1.51 Thu Aug 27 16:25:08 1998
- Maintenance release, rectifying bad soft links in the 1.50
distributions
1.60 Wed Oct 21 09:44:15 1998
[Never released]
1.61 Wed Oct 21 11:06:19 1998
- Added <token:...> directive for supporting (future) token-stream
parsing (see pod)
- Added feature that data is consumed if passed as a reference
(see pod)
- Fixed bug in autogenerated errors: now ignores directives
- Modified behaviour of <defer> directive so that deferred
actions only executed if total parse succeeds (i.e. returns
a defined value)
- Made error messages "anti-deferred". That is, only those
errors invoked in paths that eventually caused a parse
to fail are printed - see documentation.
- Miscellaneous fixes for Text::Balanced subroutines
- Made private namespaces inherit Parse::RecDescent namespace
(leads to more intuitive behaviour when calling methods
of $thisparser)
- *** NON-BACKWARDS COMPATIBLE CHANGE! ***
Changed the behaviour of token separator specification.
Now uses <skip:...> directive. See pod for new details.
1.62 Wed Dec 9 11:26:29 1998
- Reinstated missing $prevoffset variable
- Corrected a possible bug with autoactions (thanks Mitchell)
- *** IMPORTANT CHANGE ***
$::RD_WARN now initialized 3 by default. Serious but
non-fatal errors are automatically reported, unless you
explicitly undefine $::RD_WARN.
- Fixed bug in AUTOLOADing non-method subs defined in
package Parse::RecDescent (thanks Mario)
1.63 Thu Mar 25 09:13:21 1999
- Rewrote documentation to replace the concept of a
token separator with that of a token prefix.
- Fixed obscure bug in replacement of rules containing
implicit subrules (alternations). Thanks Craig.
1.64 Sun Mar 28 05:44:14 1999
- Synchronized with Text::Balanced version
- Fixed obscure bug in the treatment of escaped backslashes
in literal tokens. Thanks Matthew.
1.65 Wed May 19 12:35:05 1999
- Added <leftop:...> and <rightop:...> directives
- Added level 2 warning and autoreject for lone <error?>
directive in a production.
1.66 Fri Jul 2 13:35:06 1999
- Improved error message when an action fails to parse
(Thanks Tuomas).
- Allowed predefined subroutines in package Parse::RecDescent
to be used as rules in grammars
- Changed error report on bad regexes to level 3 warning, since
compile-time interpolation failure may falsely invalidate
regexes that would work at run-time.
1.70 Fri Oct 8 14:15:36 1999
- Clarified use of "eofile" idiom in POD file
Clarified meaning of "free-form" in description of grammars
Fixed <resync> examples, which were invalidated by
earlier change in semantics of <error>. (Thanks Knut).
- Added grammar precompiler (see documentation)
- Tweaked message for <reject> optimization.
- Fixed bug when using '@' as a terminal (thanks Abigail)
- Fixed nasty bug when $return set to zero
- Added <score> and <autoscore> directives (see documentation)
1.77 Mon Nov 22 06:11:32 1999
- IMPORTANT: Now requires 5.005 or better.
- Added <perl_quotelike>, <perl_codeblock>, and <perl_variable>
directives (see documentation)
- Added <autotree> directive (see documentation)
- Added %item hash (see documentation - thanks Stef!)
- Tweaked internal parser in line with changes to Text::Balanced
- Added <nocheck> directive to switch off recursion checking and
other checks in stable grammars (see documentation).
- Refined code generation WRT positional variables ($thisoffset, etc)
- Added positional entries for %item (see documentation)
- Fixed bug with (missing) start actions under precompiler (thanks Theo)
1.78 Mon Mar 20 12:03:17 2000
- Fixed error messages and documentation for
Parse::RecDescent::Precompile (thanks Jim)
- Moved demos to /demo subdirectory
- Added tutorial in /tutorial subdirectory
- Added <autotree> directive
- Added (s /sep/) notation (thanks Greg)
- Circumvented \G and /gc calamities
- Added more comprehensible error message when parser invoked
through non-existent startrule (thanks Jeff)
- Fixed serious bug with creating new parsers after existing
ones had failed. (Thanks Paul)
- Fixed problem with nested implicit subrules (thanks Marc).
1.79 Mon Aug 21 11:27:39 2000
- Pod tweak (thanks Abigail)
- Documented need to use do{..} within some <reject:...>
directives (thanks Paul)
- Added Save method
- Fixed bug that was preventing precompiled parsers being
subsequently extended (thanks Jeff).
- Changed keys used by %item. Now uses "named positionals"
rather that simple positionals for non-subrule items
(see documentation)
- Added trimmer for surrounding whitespace in matchrules.
- Squelched bug in (not) handling invalid directives (thanks John)
1.80 Sat Jan 20 05:02:35 2001
- Fixed Save so that saved parsers can still be used after saving
(thanks Supun)
- Fixed bug in line number tracking (thanks Theo)
- Fixed bug in (s /pat/) shorthand (thanks Julien)
- Improved docs on <rulevar> (thanks Steve)
1.90 Tue Mar 25 01:17:38 2003
- BACKWARDS INCOMPATIBLE CHANGE: The key of an %item entry for
a repeated subrule now includes the repetition specifier.
For example, in:
sentence: subject verb word(s)
the various matched items will be stored in $item{'subject'},
$item{'verb'}, and $item{'word(s)'} (i.e. *not* in $item{'word'},
as it would have been in previous versions of the module).
(thanks Anthony)
- Changed argument passing behaviour. If no arguments specified
for subrule, it is now passed current rule's @arg instead. To
get old (no arguments) behaviour use: subrule[]
- Fixed bug in <reject> handling: failed to reject if $return
had been set. (thanks Nick)
- Added two useful demos of restructuring nested data (thanks Marc)
- Fixed doc bug re use of // (thanks Randal)
- Localized filehandles, like a good citizen should
- Misc doc bug fixes (thanks all)
- Fixed Text::Balance dependency in Makefile.PL (thanks Dominique)
- Fixed bug that @itempos wasn't set up if referred to only in
an autoaction. (thanks Eric)
- Fixed truncation bug in tracing contexts
- Dramatically improved speed of line counting (thanks John)
- Made item(s) and item(s /,/) behave consistently wrt %item
(thanks Marcel)
- Added prototype <autorule:...> handling
- Added outer block markers for <perl_codeblock>
- Fixed multi-grammar precompilation (thanks Dominique)
- Fixed numerous snafus in tutorial.html (thanks Ralph)
- Added nesting level information to traces
- Fixed resetting of $text after an <uncommit> rule.
1.91 Fri Mar 28 23:20:28 2003
- Updated Text::Balanced to fix various bugs
1.92 Wed Apr 2 04:45:37 2003
- Removed Text::Balanced from distribution (now a prereq only)
1.93 Wed Apr 2 22:25:14 2003
- Fixed fatal error with $tracelevel (thanks everyone)
1.94 Wed Apr 9 08:29:33 2003
- Replaced 'our' with 'use vars' to reinstate 5.005 compatibility.
1.95.1 Sun Sep 30 05:06:56 2007
- Updated README to reflect new status of Text::Balanced
(i.e. required but not included in the distribution)
- Fixed demo_logic (Thanks, Steve)
- Fixed autopropagation of arguments into repetitions (Thanks, Luke)
- Limited context info to 500 chars in traces (Thanks, Stephen)
- Added option to select base namespace for autotreeing (thanks Gaal)
- Improved formatting compatibility with 5.9.0 (thanks, David)
- Added support for $::RD_HINT = 0 to turn off hinting entirely
- Fixed bug in line handling
- Returned $return variable to documented behaviour
(i.e. setting return doesn't guarantee the match, only what is
returned if the match succeeds)
- Fixed nit in debugging of conditional regexes (thanks, Brian)
- Moved expectation creation to compile-time (thanks Franois)
- Removed redundant inheritances (i.e. @ISA elements)
in internal namespace (thanks Hugo)
- Added warning against C<return> in actions to "GOTCHAS" documentation
- Added demo_another_Cgrammar.pl (thanks Hendrik)
- Documented parens (thanks Robin)
- Removed incorrect meta-grammar from docs
1.96.0 Fri Oct 3 06:08:24 2008
- Propagated correct Changes file (thanks Matthew!)
- Added: <warn> <hint> <trace_build> <trace_parse> <nocheck>
-
1.962.0 Tue Aug 25 19:45:15 2009
- Doc bug fix (thanks Christophe)
- Fixed assymmetrical push/pop on @lines tracker (thanks Peter!)
- Bumped sub-version number hugely to fix CPAN indexing (thanks Jerome)
- Remove all occurrences of $& so we don't affect other regular expressions.
- Perl 5.6.0 required for use of $+[0] and $-[0] for replacement of $&.
1.962.1 Thu Aug 27 21:39:30 2009
- Fixed subtle bug in leftop and rightop caused by removal of $&
1.963 Thu Jan 21 09:13:19 2010
- Fixed even subtler bug in leftop and rightop caused by removal of $&
(Thanks Francesco)
1.964 Wed Feb 17 09:33:39 2010
- Fixed bug with undefined $1 when parsing literals (thanks Dan!)
- Fixed premature namespace destruction bug with compiled grammars
1.964001 Tue Feb 23 15:15:18 2010
- Updated version number because versioning is a neverending
nightmare in Perl 5 (thanks Matt)
1.965001 Sun Apr 4 15:00:10 2010
- Removed all references to /opts version of perl interpreter
- Added Parse::RecDescent::redirect_reporting_to()
to enable ERROR, TRACE, and TRACECONTEXT filehandles to be
easily redirected.
|