develooper Front page | perl.perl6.internals | Postings from February 2008

[perl #50968] [BUG] trouble with perl 6 grammars and capturing '.*?'

From:
Jerry Gay
Date:
February 18, 2008 14:01
Subject:
[perl #50968] [BUG] trouble with perl 6 grammars and capturing '.*?'
# New Ticket Created by  Jerry Gay 
# Please include the string:  [perl #50968]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=50968 >


in rakudo's perl6doc parser
(languages/perl6/src/utils/perl6doc/grammar.pg), i have the following:

  token pod_delimited_block {
      ^^ '=' <.unsp>? 'begin' <.ws> <block_type> <pod_option>* \n
      .*?
      ^^ '=' <.unsp>? 'end'   <.ws> $<block_type> \N*
      {*}
  }

i'd like to capture '.*?' either via an alias or better, via a
subrule. however, modifying the grammar to something that will
capture, like
  (.*?)
or
  $<body>=[.*?]
or
  <some_subrule>

causes the match to fail. smells like a pge bug to me.
~jerry



Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About