[Lxr-commits] CVS: lxr/scripts LCLInterpreter.pm,1.3,1.4
Brought to you by:
ajlittoz
From: Andre-Littoz <ajl...@us...> - 2013-11-07 16:44:25
|
Update of /cvsroot/lxr/lxr/scripts In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10560/scripts Modified Files: LCLInterpreter.pm Log Message: scripts/LCLInterpreter.pm: new features Rearchitecturing: interpreter isolated in its own sub (main loop now only dispatches) parse_statement can now handle multi-line statements New commands and upgrades to some others to benefit from new possibilities in QuestionAnswer.pm Interpretation globally more consistent and reliable Index: LCLInterpreter.pm =================================================================== RCS file: /cvsroot/lxr/lxr/scripts/LCLInterpreter.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- LCLInterpreter.pm 2 Sep 2013 16:46:00 -0000 1.3 +++ LCLInterpreter.pm 7 Nov 2013 16:44:21 -0000 1.4 @@ -42,7 +42,7 @@ ############################################################## # -# LXR Control Language Interpreter +# LXR Configuration Language Interpreter # ############################################################## @@ -70,13 +70,11 @@ # intervening whitespace. If more than one label is needed, repeat the # construct without intervening whitespace. [...1209 lines suppressed...] + my $start_block = qr/^${comstart}\@(?:w+:)*\s*${begin}\s/i; my $end_block = qr/^${comstart}\@\s*${end}\b/i; my $nesting = 0; @@ -1071,12 +1191,12 @@ $#choices = -1; $#answers = -1; - ($qtext, $qdeft, $choices, $answer) = split(/;/, shift); + ($qtext, $qdeft, $choices, $answer) = split(/(?<!\\);/, shift); if (defined($choices)) { - @choices = map({s/^\s*(.*)\s*$/$1/; $_} split(/,/, $choices)); + @choices = map({s/^\s*(.*)\s*$/$1/; $_} split(/(?<!\\),/, $choices)); } if (defined($answer)) { - @answers = map({s/^\s*(.*)\s*$/$1/; $_} split(/,/, $answer)); + @answers = map({s/^\s*(.*)\s*$/$1/; $_} split(/(?<!\\),/, $answer)); } $answer = get_user_choice ( $qtext |