Index: trunk/lib/Text/FormBuilder/grammar
===================================================================
--- trunk/lib/Text/FormBuilder/grammar	(revision 10)
+++ trunk/lib/Text/FormBuilder/grammar	(revision 11)
@@ -1,3 +1,3 @@
-{ my ($title, $author, %lists, %patterns, @fields, $type, @options, $list_var, $size, $rows, $cols); }
+{ my ($title, $author, %lists, %patterns, @fields, @headings, $type, @options, $list_var, $size, $rows, $cols); }
 
 form_spec: (list_def | line)(s) 
@@ -8,4 +8,5 @@
 	    lists    => \%lists, 
 	    patterns => \%patterns, 
+	    headings => \@headings,
 	    fields   => \@fields,
 	}
@@ -29,5 +30,5 @@
 list_name: /[A-Z_]+/
 
-line: <skip:'[ \t]*'> ( title | author | pattern_def | field | comment | blank ) "\n"
+line: <skip:'[ \t]*'> ( title | author | pattern_def | heading | field | comment | blank ) "\n"
 
 title: '!title' /.*/
@@ -43,4 +44,8 @@
 pattern_name: /[A-Z_]+/
 pattern: /.*/
+
+heading: '!head' /.*/
+    { warn "[Text::FormBuilder] Header before field " . scalar(@fields) . " redefined at input text line $thisline\n" if defined $headings[@fields];
+    $headings[@fields] = $item[2] }
 
 field: name field_size(?) label(?) hint(?) type(?) default(?) option_list(?) validate(?)
