Changeset 16 in text-formbuilder for trunk/lib/Text/FormBuilder/grammar
- Timestamp:
- 11/03/04 15:18:24 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Text/FormBuilder/grammar
r14 r16 14 14 } 15 15 16 list_def: '!list' list_name (static_list | dynamic_list)17 { $lists{$item{ list_name}} = [ @options ]; @options = () }16 list_def: '!list' var_name (static_list | dynamic_list) 17 { $lists{$item{var_name}} = [ @options ]; @options = () } 18 18 19 19 static_list: '{' option(s /,\s*/) /,?/ '}' … … 29 29 } 30 30 31 list_name: /[A-Z_]+/32 33 31 description_def: '!description' <perl_codeblock> 34 32 { warn "[Text::FormBuilder] Description redefined at input text line $thisline\n" if defined $description; … … 38 36 } 39 37 40 line: <skip:'[ \t]*'> ( title | author | pattern_def | heading | field | comment | blank ) "\n"38 line: <skip:'[ \t]*'> ( title | author | pattern_def | heading | unknown_directive | field | comment | blank ) "\n" 41 39 42 40 title: '!title' /.*/ … … 47 45 { $author = $item[2] } 48 46 49 pattern_def: '!pattern' pattern_name pattern50 { $patterns{$item{ pattern_name}} = $item{pattern} }47 pattern_def: '!pattern' var_name pattern 48 { $patterns{$item{var_name}} = $item{pattern} } 51 49 52 pattern_name: /[A-Z_]+/53 50 pattern: /.*/ 54 51 … … 88 85 name: identifier 89 86 87 var_name: /[A-Z_]+/ 88 90 89 field_size: '[' ( row_col | size ) ']' 91 90 … … 123 122 124 123 identifier: /\w+/ 124 125 # skip unknown directives with a warning 126 unknown_directive: /\!\S*/ /.*/ 127 { warn "[Text::Formbuilder] Skipping unknown directive '$item[1]' at input text line $thisline\n"; }
Note: See TracChangeset
for help on using the changeset viewer.