Changeset 57 in text-formbuilder for trunk/lib/Text/FormBuilder


Ignore:
Timestamp:
01/18/05 15:19:14 (20 years ago)
Author:
peichman
Message:

BUGFIX: can have "unbalanced" quotes in note or description blocks (wrote own grammar rule instead of using the built-in <perl_codeblock> directive)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Text/FormBuilder/grammar

    r56 r57  
    6868    } 
    6969 
    70 description_def: '!description' <perl_codeblock> 
     70description_def: '!description' block 
    7171    { warn "[Text::FormBuilder] Description redefined at input text line $thisline\n" if defined $description; 
    7272     
     
    8585    } 
    8686 
    87 note: '!note' <perl_codeblock> 
     87note: '!note' block 
    8888    {    
    8989        (my $note = $item[2]) =~ s/^{\s*|\s*}$//g; 
     
    9191    } 
    9292 
     93# curly-brace delimited block, that can contain properly 
     94# nested curly brackets, along with any other characters 
     95# return with the '{...}' so that nested blocks get the 
     96# brackets treated as literals 
     97block: '{' <skip:''> block_content(s) '}' 
     98    { 
     99        '{' . join('', @{ $item[3] }) . '}'; 
     100    } 
     101 
     102block_content: /[^\{\}]+?/ | block 
     103 
    93104 
    94105field_line: <skip:'[ \t]*'> ( field | comment | blank ) "\n" 
     
    97108title: '!title' /.*/ 
    98109    { 
    99         warn "[Text::Formbuilder] Title redefined at input text line $thisline\n" if defined $title; 
     110        warn "[Text::FormBuilder] Title redefined at input text line $thisline\n" if defined $title; 
    100111        $title = $item[2]; 
    101112    } 
     
    103114author: '!author' /.*/ 
    104115    { 
    105         warn "[Text::Formbuilder] Author redefined at input text line $thisline\n" if defined $author; 
     116        warn "[Text::FormBuilder] Author redefined at input text line $thisline\n" if defined $author; 
    106117        $author = $item[2]; 
    107118    } 
Note: See TracChangeset for help on using the changeset viewer.