Changeset 10 in text-formbuilder for trunk/lib/Text/FormBuilder/grammar
- Timestamp:
- 10/21/04 16:55:26 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Text/FormBuilder/grammar
r1 r10 12 12 } 13 13 14 list_def: '!list' list_name '{' option(s /,\s*/) /,?/ '}'14 list_def: '!list' list_name (static_list | dynamic_list) 15 15 { $lists{$item{list_name}} = [ @options ]; @options = () } 16 17 static_list: '{' option(s /,\s*/) /,?/ '}' 18 19 dynamic_list: '&' <perl_codeblock> 20 { 21 my @results = (eval $item[2]); 22 if (ref $results[0] eq 'HASH') { 23 @options = @results; 24 } else { 25 @options = map { { $_ => $_ } } @results; 26 } 27 } 16 28 17 29 list_name: /[A-Z_]+/
Note: See TracChangeset
for help on using the changeset viewer.