fanatasma has asked for the wisdom of the Perl Monks concerning the following question:
The (simplified) code looks like this:... <ParamMap."HARDWARE"> { <ParamBool."MagnitudeImages"> { "true" "false" "true" } <ParamString."ProtectedSize"> { "350" } } ...
my $g=qr{ <nocontext:> <protocol> <rule: protocol> <[MATCH=element]>+ <minimize:> <rule: element> ( <MATCH=map> | <MATCH=p_str> | <MATCH=p_bool> ) #<min +imize:> <rule: map> \< ParamMap \. <name> > \{ <[element]>* \} <rule: p_str> \< ParamString \. <name> > \{ ( <[string]>* )? \} <rule: p_bool> \< ParamBool \. <name> > \{ #<debug: on> ( <[bool]>* )? \} <rule: string> <_qq> <[MATCH=literal]>* <_qq> <token: literal> [.'!\w_@\+\-\(\)\(\)\#{}\\\[\]]+ <token: _qq> \" <token: name> <_qq>\w*<_qq> <rule: bool> <_qq><MATCH=(true|false)><_qq> }xms;
$VAR1={ 'HARDWARE'=>[ 'PhaseImages'=>[ true, false, true ] 'RoFOV'=>[ '230.0000000000000000', ] ] } ...
My sincere apologies for the bad formating.$VAR1 = { 'protocol' => [ { 'name' => '"HARDWARE"', 'element' => [ { 'bool' => [ 'true', 'false', 'true' ], name' => '"MagnitudeImages"' }, { 'name' => '"ProtectedSize"', 'string' => [ [ '350' ] ] } ] } ] };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: results simplification of regexp::grammars
by talexb (Chancellor) on Feb 28, 2012 at 17:57 UTC | |
|
Re: results simplification of regexp::grammars
by Marshall (Canon) on Feb 28, 2012 at 19:02 UTC |