Index: trunk/lib/Text/FormBuilder.pm
===================================================================
--- trunk/lib/Text/FormBuilder.pm	(revision 77)
+++ trunk/lib/Text/FormBuilder.pm	(revision 80)
@@ -7,5 +7,5 @@
 use vars qw($VERSION @EXPORT);
 
-$VERSION = '0.10';
+$VERSION = '0.11_01';
 @EXPORT = qw(create_form);
 
@@ -296,4 +296,5 @@
         title => $self->{form_spec}{title},
         text  => $self->{form_spec}{description},
+        submit => $self->{form_spec}{submit},
         template => {
             type => 'Text',
@@ -963,4 +964,6 @@
         ...
     }
+    
+    !submit button label, button label 2, ...
 
 =head2 Directives
@@ -1013,4 +1016,12 @@
 A text note that can be inserted as a row in the form. This is useful for
 special instructions at specific points in a long form.
+
+=item C<!submit>
+
+A list of one or more submit button labels in a comma-separated list. Each label
+is a L<string|/Strings>. Multiple instances of this directive may be used; later
+lists are simply appended to the earlier lists. All the submit buttons are 
+rendered together at the bottom of the form. See L<CGI::FormBuilder> for an
+explanation of how the multiple submit buttons work together in a form.
 
 =back
@@ -1099,4 +1110,10 @@
     person*:text
 
+To set a limit to the maximum number of inputs a field can grow to, add
+a number after the C<*>:
+
+    # allow up to 5 musicians
+    musician*5:text
+
 To create a C<radio> or C<select> field that includes an "other" option,
 append the string C<+other> to the field type:
@@ -1223,8 +1240,11 @@
 =head2 Language/Parser
 
+Debug flag (that sets/unsets C<$::RD_TRACE> in the parser)
+
 Make sure that multiple runs of the parser don't share data.
 
-Allow renaming of the submit button; allow renaming and inclusion of a 
-reset button
+Allow renaming and inclusion of a reset button
+
+Warn/suggest using the C<!submit> directive if some uses C<foo:submit>?
 
 Set FB constructor options directly in the formspec (via a C<!fb> or similar
@@ -1245,5 +1265,6 @@
 option to C<< FB->new >>; will require FB 3.02 to run.
 
-Better integration with L<CGI::FormBuilder>'s templating system
+Better integration with L<CGI::FormBuilder>'s templating system; rely on the
+FB messages instead of trying to make our own.
 
 Allow for custom wrappers around the C<form_template>
Index: trunk/lib/Text/FormBuilder/grammar
===================================================================
--- trunk/lib/Text/FormBuilder/grammar	(revision 77)
+++ trunk/lib/Text/FormBuilder/grammar	(revision 80)
@@ -24,4 +24,5 @@
 	$rows,
 	$cols,
+	@submit,
     );
     my $context = 'line';	# start in line context by default
@@ -38,5 +39,5 @@
 	%formspec = ();  # clear the old formspec data
     }
-    (list_def | description_def | group_def | note | line)(s)
+    (list_def | description_def | group_def | note | unknown_block_directive | line)(s)
     {
 	# grab the last section, if there is any
@@ -59,4 +60,8 @@
 	    groups   => \%groups,
 	    sections => \@sections,
+	    ( @submit ? 
+		(submit => @submit == 1 ? $submit[0] : \@submit) :
+		()
+	    ),
 	}
     }
@@ -106,5 +111,5 @@
 field_line: <skip:'[ \t]*'> ( field | comment | blank ) "\n"
 
-line: <skip:'[ \t]*'> ( title | author | pattern_def | section_head | heading | group_field | field_group | unknown_directive | field | comment | blank ) "\n"
+line: <skip:'[ \t]*'> ( title | author | pattern_def | section_head | heading | submit | group_field | field_group | unknown_directive | field | comment | blank ) /\n+/
 
 title: '!title' /.*/
@@ -145,4 +150,10 @@
 
 heading: '!head' /.*/    { push @lines, [ 'head', $item[2] ] }
+
+submit: '!submit' string(s /\s*,\s*/)
+    {
+	#warn scalar(@{ $item[2] }) . ' submit button(s)';
+	push @submit, @{ $item[2] };
+    }
 
 group_field: '!field' group_name name label(?)
@@ -243,9 +254,9 @@
 
 # for simple multiword values not involving punctuation
-simple_multiword: <skip:''> /\w[\w\t ]*/ { $item[2] }
+simple_multiword: /\w/ <skip:''> /[\w\t ]*/ { $item[1] . $item[3] }
 
 # my attempt at a single-quoted, non-interpolating string
 # where the backslash can escape literal single quotes
-quoted_string: <skip:''> "'" /(\\'|[^'])*/ "'"
+quoted_string: "'" <skip:''> /(\\'|[^'])*/ "'"
     { $item[3] =~ s/\\'/'/g; $item[3] }
 
@@ -278,2 +289,5 @@
 unknown_directive: /\!\S*/ /.*/
     { warn "[Text::Formbuilder] Skipping unknown directive '$item[1]' at input text line $thisline\n"; }
+
+unknown_block_directive: /\!\S*/ var_name(?) block
+    { warn "[Text::Formbuilder] Skipping unknown block directive '$item[1]' at input text line $thisline\n"; }
