Index: trunk/Changes
===================================================================
--- trunk/Changes	(revision 64)
+++ trunk/Changes	(revision 66)
@@ -1,5 +1,10 @@
 Release history for Text::FormBuilder.
 
-0.09
+0.10
+    * added support for fields with 'other' (requires FB 3.02)
+    * added support for limited growth 'growable' fields
+    * allow end of field line comments
+    
+0.09 - 10 Mar 2005
     * single-line textfields can be given a maxlength
     * BUGFIX: !note and !description blocks can now
Index: trunk/lib/Text/FormBuilder.pm
===================================================================
--- trunk/lib/Text/FormBuilder.pm	(revision 64)
+++ trunk/lib/Text/FormBuilder.pm	(revision 66)
@@ -7,5 +7,5 @@
 use vars qw($VERSION @EXPORT);
 
-$VERSION = '0.09';
+$VERSION = '0.10';
 @EXPORT = qw(create_form);
 
@@ -241,8 +241,10 @@
         defined $$field{$_} or delete $$field{$_} foreach keys %{ $field };
         
-        unless ($FB_version >= '3.002') {
-            if ($$field{growable}) {
-                warn '[' . (caller(0))[3] . "] growable fields not supported by FB $FB_version (requires 3.002)";
-                delete $$field{growable};
+        unless ($FB_version >= '3.02') {
+            for (qw(growable other)) {
+                if ($$field{$_}) {
+                    warn '[' . (caller(0))[3] . "] '$_' fields not supported by FB $FB_version (requires 3.02)";
+                    delete $$field{$_};
+                }
             }
         }
@@ -509,5 +511,5 @@
                     $OUT .= qq[<th></th>];
                 } else {
-                    $OUT .= '<th class="label">' . ($$_{required} ? qq[<strong class="required">$$_{label}:</strong>] : "$$_{label}:") . '</th>';
+                    $OUT .= '<th class="label">' . ($$_{required} ? qq[<strong class="required">$$_{label}</strong>] : "$$_{label}") . '</th>';
                 }
                 
@@ -1160,7 +1162,11 @@
 =head1 TODO
 
-Document the commmand line tool
+=head2 Documentation/Tests
 
 Document use of the parser as a standalone module
+
+Better tests!
+
+=head2 Language/Parser
 
 Allow renaming of the submit button; allow renaming and inclusion of a 
@@ -1172,5 +1178,14 @@
 validate. These should cause C<build> to emit a warning before ignoring them.
 
+C<!include> directive to include external formspec files
+
+=head2 Code generation/Templates
+
+Alternative format using C<< <fieldset> >> tags instead of C<< <h2> >>
+section headers
+
 Make the generated modules into subclasses of CGI::FormBuilder
+
+Better integration with L<CGI::FormBuilder>'s templating system
 
 Allow for custom wrappers around the C<form_template>
@@ -1178,8 +1193,4 @@
 Maybe use HTML::Template instead of Text::Template for the built in template
 (since CGI::FormBuilder users may be more likely to already have HTML::Template)
-
-C<!include> directive to include external formspec files
-
-Better tests!
 
 =head1 BUGS
Index: trunk/lib/Text/FormBuilder/grammar
===================================================================
--- trunk/lib/Text/FormBuilder/grammar	(revision 64)
+++ trunk/lib/Text/FormBuilder/grammar	(revision 66)
@@ -1,3 +1,4 @@
-{ 
+{
+    #$::RD_TRACE = 1;
     my (
 	$context,      # line or group
@@ -56,5 +57,5 @@
     { $lists{$item{var_name}} = [ @options ]; @options = () }
 
-static_list: '{' option(s /,\s*/) /,?/ '}'
+static_list: '{' /\s*/ option(s /\s*,\s*/) /,?/ /\s*/ '}'
 
 dynamic_list: '&' <perl_codeblock>
@@ -160,12 +161,13 @@
 
 # this is the real heart of the thing
-field: name field_size(?) growable(?) label(?) hint(?) type(?) default(?) option_list(?) validate(?)
+field: name field_size(?) growable(?) label(?) hint(?) type(?) other(?) default(?) option_list(?) validate(?) comment(?)
     {
 	my $field = {
 	    name     => $item{name},
-	    growable => ($item{'growable(?)'}[0] ? 1 : 0),
+	    growable => $item{'growable(?)'}[0],
 	    label    => $item{'label(?)'}[0],
 	    comment  => $item{'hint(?)'}[0],
 	    type     => $item{'type(?)'}[0],
+	    other    => $item{'other(?)'}[0],
 	    value    => $item{'default(?)'}[0],
 	    list     => $list_var,
@@ -214,5 +216,7 @@
     { $rows = $item[1]; $cols = $item[3] }
 
-growable: '*'
+growable: '*' limit(?) { $item{'limit(?)'}[0] || 1 }
+
+limit: /\d+/
 
 label: '|' (simple_multiword | quoted_string) { $item[2] }
@@ -224,9 +228,10 @@
 builtin_field: /textarea|text|password|file|checkbox|radio|select|hidden|static/
 
+other: '+' 'other' { 1 }
 
 default: '=' (simple_multiword | quoted_string) { $item[2] }
 
 # for simple multiword values not involving punctuation
-simple_multiword: <skip:''> /[\w\t ]+/ { $item[2] }
+simple_multiword: <skip:''> /\w[\w\t ]+/ { $item[2] }
 
 # my attempt at a single-quoted, non-interpolating string
@@ -237,9 +242,9 @@
 option_list: options | list_var
     
-options: '{' option(s /,\s*/) '}'
+options: '{' option(s /,/) '}'
 
 list_var: /@[A-Z_]+/ { $list_var = $item[1] }
 
-option: (simple_multiword | value | quoted_string) display_text(?)
+option: (simple_multiword | quoted_string) display_text(?)
     { push @options, { $item[1] => $item{'display_text(?)'}[0] } }
 
