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"; }
