77 |
} |
} |
78 |
), |
), |
79 |
q( |
q( |
80 |
if ($in =~ s/^\s*(\S+)\s*(.*)\s*$//) { |
if ($in =~ s/^\s*(\S+)\s+(.*)\s*$//) { |
81 |
$atom->{type} = 'KEY_VALUE'; |
$atom->{type} = 'KEY_VALUE'; |
82 |
$atom->{key} = $1; |
$atom->{key} = $1; |
83 |
$atom->{value} = $2; |
$atom->{value} = $2; |
85 |
$matched = 1; |
$matched = 1; |
86 |
} |
} |
87 |
), |
), |
88 |
|
q( |
89 |
|
if ($in =~ s/^\s*(\S+)\s*$//) { |
90 |
|
$atom->{type} = 'VALUE'; |
91 |
|
$atom->{value} = $1; |
92 |
|
$atom->{sections} = [ @{$out->{current_sections}} ]; |
93 |
|
$matched = 1; |
94 |
|
} |
95 |
|
), |
96 |
|
q( |
97 |
|
if ($in =~ s/^\s*Load\s*(.*)\s*$//) { |
98 |
|
$atom->{type} = 'VALUE'; |
99 |
|
$atom->{type2} = 'XF86_LOAD'; |
100 |
|
my $tmp = $1; |
101 |
|
$tmp =~ s/^\s*"([^"]*)"// and $atom->{value} = $1; |
102 |
|
$atom->{value} = $1; |
103 |
|
$in = $tmp; #to allow the engine to check if some stuff were not interpreted |
104 |
|
$atom->{sections} = [ @{$out->{current_sections}} ]; |
105 |
|
$matched = 1; |
106 |
|
} |
107 |
|
), |
108 |
], |
], |
109 |
comments => [ ['#'] ], |
comments => [ ['#'] ], |
110 |
comment_output => q( |
comment_output => q( |
112 |
/^(\s*)$/ ? "$_\n" : "$indent#$_\n" |
/^(\s*)$/ ? "$_\n" : "$indent#$_\n" |
113 |
), |
), |
114 |
output => { |
output => { |
115 |
|
VALUE => q( |
116 |
|
my ($value) = $atom->{value}; |
117 |
|
$atom->{type2} eq 'XF86_LOAD' and |
118 |
|
return $INDENT_SPACES x $out->{current_indentation} . qq(Load "$value"\n); |
119 |
|
return $INDENT_SPACES x $out->{current_indentation} . qq($value\n); |
120 |
|
), |
121 |
KEY_VALUE => q( |
KEY_VALUE => q( |
122 |
my ($key, $value) = ($atom->{key}, $atom->{value}); |
my ($key, $value) = ($atom->{key}, $atom->{value}); |
123 |
#my $sections = join ('_', map { $_->{name} } @{$atom->{sections}} ); |
#my $sections = join ('_', map { $_->{name} } @{$atom->{sections}} ); |