Changeset 57 in text-formbuilder for trunk/lib/Text
- Timestamp:
- 01/18/05 15:19:14 (20 years ago)
- Location:
- trunk/lib/Text
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Text/FormBuilder.pm
r56 r57 982 982 =back 983 983 984 B<Known BUG:> If you include an odd number of C<'> or C<"> characters in a985 C<!description> or C<!note>, then that directive will mistakenly be skipped.986 This is a bug casued by me taking a shortcut in the parser C<:-/>987 988 984 =head2 Fields 989 985 … … 1162 1158 =head1 TODO 1163 1159 1164 Improve the commmand line tools 1160 Document the commmand line tool 1165 1161 1166 1162 Allow renaming of the submit button; allow renaming and inclusion of a … … 1193 1189 =head1 BUGS 1194 1190 1195 Having a single C<'> or C<"> in a C<!description> or C<!note> directive causes that1196 directive to get skipped. This is an issue with the C<perl_codeblock> shortcut in1197 Parse::RecDescent.1198 1199 1191 Creating two $parsers in the same script causes the second one to get the data 1200 1192 from the first one. -
trunk/lib/Text/FormBuilder/grammar
r56 r57 68 68 } 69 69 70 description_def: '!description' <perl_codeblock>70 description_def: '!description' block 71 71 { warn "[Text::FormBuilder] Description redefined at input text line $thisline\n" if defined $description; 72 72 … … 85 85 } 86 86 87 note: '!note' <perl_codeblock>87 note: '!note' block 88 88 { 89 89 (my $note = $item[2]) =~ s/^{\s*|\s*}$//g; … … 91 91 } 92 92 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 97 block: '{' <skip:''> block_content(s) '}' 98 { 99 '{' . join('', @{ $item[3] }) . '}'; 100 } 101 102 block_content: /[^\{\}]+?/ | block 103 93 104 94 105 field_line: <skip:'[ \t]*'> ( field | comment | blank ) "\n" … … 97 108 title: '!title' /.*/ 98 109 { 99 warn "[Text::Form builder] 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; 100 111 $title = $item[2]; 101 112 } … … 103 114 author: '!author' /.*/ 104 115 { 105 warn "[Text::Form builder] 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; 106 117 $author = $item[2]; 107 118 }
Note: See TracChangeset
for help on using the changeset viewer.