Changeset 11 in text-formbuilder for trunk/lib/Text/FormBuilder/grammar


Ignore:
Timestamp:
10/22/04 10:10:54 (20 years ago)
Author:
peter
Message:

added a !head directive for section headers in forms
removed generated Parser.pm file from version control

File:
1 edited

Legend:

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

    r10 r11  
    1 { my ($title, $author, %lists, %patterns, @fields, $type, @options, $list_var, $size, $rows, $cols); } 
     1{ my ($title, $author, %lists, %patterns, @fields, @headings, $type, @options, $list_var, $size, $rows, $cols); } 
    22 
    33form_spec: (list_def | line)(s)  
     
    88            lists    => \%lists,  
    99            patterns => \%patterns,  
     10            headings => \@headings, 
    1011            fields   => \@fields, 
    1112        } 
     
    2930list_name: /[A-Z_]+/ 
    3031 
    31 line: <skip:'[ \t]*'> ( title | author | pattern_def | field | comment | blank ) "\n" 
     32line: <skip:'[ \t]*'> ( title | author | pattern_def | heading | field | comment | blank ) "\n" 
    3233 
    3334title: '!title' /.*/ 
     
    4344pattern_name: /[A-Z_]+/ 
    4445pattern: /.*/ 
     46 
     47heading: '!head' /.*/ 
     48    { warn "[Text::FormBuilder] Header before field " . scalar(@fields) . " redefined at input text line $thisline\n" if defined $headings[@fields]; 
     49    $headings[@fields] = $item[2] } 
    4550 
    4651field: name field_size(?) label(?) hint(?) type(?) default(?) option_list(?) validate(?) 
Note: See TracChangeset for help on using the changeset viewer.