… | |
… | |
259 | # Property |
259 | # Property |
260 | $name = $1; |
260 | $name = $1; |
261 | $name =~ y/a-z//d; # believe me, they exist |
261 | $name =~ y/a-z//d; # believe me, they exist |
262 | $prop = $property->{$name}; |
262 | $prop = $property->{$name}; |
263 | |
263 | |
264 | while ($self->{sgf} =~ /\G $ws \[ ( (?: [^\\\]]+ | \\. | \] (?! \s* [A-Z\[;()] ) )* ) \] /sgocx) { |
264 | while ($self->{sgf} =~ |
|
|
265 | / |
|
|
266 | \G $ws |
|
|
267 | \[ |
|
|
268 | ( |
|
|
269 | (?: |
|
|
270 | [^\\\]]+ # any sequence without \ or ] |
|
|
271 | | \\. # any quoted char |
|
|
272 | | \] # hack to allow ] followed by somehting that doesn't look like SGF |
|
|
273 | (?! \s* (?: [A-Z]+\[ | [\[;()] ) ) |
|
|
274 | )* |
|
|
275 | ) |
|
|
276 | \] |
|
|
277 | /sgocx |
|
|
278 | ) { |
265 | # PropValue |
279 | # PropValue |
266 | $value = $1; |
280 | $value = $1; |
267 | if ($prop) { |
281 | if ($prop) { |
268 | @val = $prop->{in}->($self, $value, $prop); |
282 | @val = $prop->{in}->($self, $value, $prop); |
269 | |
283 | |