From 4db4a9d4819c8b9f0763c0a93c799d37e5f71f8d Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Mon, 21 Mar 2016 11:03:29 +1100 Subject: [PATCH] * lib/dg.exp (dg-get-options): Clean up regular expression and remove FIXME comment about it. --- ChangeLog | 5 +++++ lib/dg.exp | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed060be..1b8b095 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-03-21 Ben Elliston + + * lib/dg.exp (dg-get-options): Clean up regular expression and + remove FIXME comment about it. + 2016-03-20 Ben Elliston * baseboards/i960-sim.exp: Remove stale ??? comment. diff --git a/lib/dg.exp b/lib/dg.exp index dfd6a6c..8b4e3c0 100644 --- a/lib/dg.exp +++ b/lib/dg.exp @@ -189,9 +189,7 @@ proc dg-get-options { prog } { set tmp [grep $prog "{\[ \t\]\+dg-\[-a-z\]\+\[ \t\]\+.*\[ \t\]\+}" line] if {![string match "" $tmp]} { foreach i $tmp { - # FIXME: When to use "+" and "\+" isn't clear. - # Seems to me it took awhile to get this to work. - regexp "(\[0-9\]\+)\[ \t\]\+{\[ \t\]+(dg-\[-a-z\]+)\[ \t\]\+(.*)\[ \t\]+}\[^\}\]*(\n|$)" $i i line cmd args + regexp "(\[0-9\]+)\[ \t\]+{\[ \t\]+(dg-\[-a-z\]+)\[ \t\]+(.*)\[ \t\]+}\[^\}\]*(\n|$)" $i i line cmd args append result " { $cmd $line $args }" } } -- 2.7.4