Changeset 260 for lang/perl/Text-Nyarlax

Show
Ignore:
Timestamp:
09/23/07 12:09:21 (16 months ago)
Author:
nyarla
Message:

lang/perl/Text-Nyarlax: I implemented parse of a BlockQuote? elements on Text::Nyarlax::Parser::PRD.

Location:
lang/perl/Text-Nyarlax/trunk
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Text-Nyarlax/trunk/lib/Text/Nyarlax/Parser/PRD.pm

    r251 r260  
    9999                        |   List[ marker => quotemeta( '#' ), name => 'OrderedList', indent => 0 ] 
    100100                        |   DefinitionList[ indent => 0 ] 
     101                        |   BlockQuote 
    101102                        |   Paragraph 
    102103 
     
    191192                            $elm->push_content( @{ $item{'ListContent'} } ); 
    192193                            $elm->join_content( text => "\n" ); 
     194                            $return = $elm; 
     195                        } 
     196 
     197    BlockQuote          :   />>>/ Blank Text(?) Blank /\n/ 
     198                                Content(s) 
     199                            /<<</ Blank URI(?) Blank /\n/ 
     200                        { 
     201                            my $elm = element( $item[0] ); 
     202                            $elm->push_content( @{ $item{'Content(s)'} } ); 
     203                            $elm->join_content( element => 'Section' ); 
     204                            $elm->attr->{'title'} = $item{'Text(?)'}->[0] if ( $item{'Text(?)'}->[0] ); 
     205                            $elm->attr->{'cite'}  = $item{'URI(?)'}->[0]  if ( $item{'URI(?)'}->[0] ); 
    193206                            $return = $elm; 
    194207                        } 
     
    349362                            { $return = { wikiname => $1, link => $2 } } 
    350363                        |  m{ 
    351                                 $RE{'URI'}{'HTTP'} 
     364                                $RE{'URI'} 
    352365                              | (?: (?! $bracket{'HyperLink'}->[1] ) [^\n] )+ 
    353366                            }x 
     
    360373                        |  m{$text_re} 
    361374 
     375    # Token 
     376    Text                :   /[^\n]+/ 
    362377    Blank               :   /[ \t]*/ 
    363  
    364378    Identifier          :   /[a-zA-Z]+/ 
    365  
     379    URI                 :   /$RE{'URI'}/ 
    366380__GRAMMER__ 
    367381