Send commitlog mailing list submissions to
        commitlog@lists.openmoko.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openmoko.org/mailman/listinfo/commitlog
or, via email, send a message with subject or body 'help' to
        commitlog-requ...@lists.openmoko.org

You can reach the person managing the list at
        commitlog-ow...@lists.openmoko.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of commitlog digest..."
Today's Topics:

   1. r5984 - trunk/eda/boom (wer...@docs.openmoko.org)
--- Begin Message ---
Author: werner
Date: 2010-10-16 03:03:56 +0200 (Sat, 16 Oct 2010)
New Revision: 5984

Modified:
   trunk/eda/boom/gen2chr
   trunk/eda/boom/match.pl
Log:
Improve the diagnostics of gen2chr.

- boom/match.pl (sub_expand): print an explanation if available
- boom/match.pl (match_set_error): set the error explanation text
- boom/gen2chr: set the error explanation to the part number



Modified: trunk/eda/boom/gen2chr
===================================================================
--- trunk/eda/boom/gen2chr      2010-10-13 16:15:40 UTC (rev 5983)
+++ trunk/eda/boom/gen2chr      2010-10-16 01:03:56 UTC (rev 5984)
@@ -20,6 +20,7 @@
     next unless $id{$_} eq "$key $_";
     undef %field;
     $field{"REF"} = $_;
+    &match_set_error("$_");
     if (!&apply_rules()) {
        print "$id{$_}\n" if $negate;
        next;

Modified: trunk/eda/boom/match.pl
===================================================================
--- trunk/eda/boom/match.pl     2010-10-13 16:15:40 UTC (rev 5983)
+++ trunk/eda/boom/match.pl     2010-10-16 01:03:56 UTC (rev 5984)
@@ -147,7 +147,11 @@
     while ($s =~ 
/^([^\$]*)\$([A-Za-z_]\w*)(:(\d+))?|^([^\$]*)\${([A-Za-z_]\w*)(:(\d+))?}/) {
        my $name = "$2$6";
        $name .= "__$4$8" if defined($4) || defined($8);
-       die "don't know \"$name\"" unless defined $found{$name};
+       if (!defined $found{$name}) {
+               die "don't know \"$name\"".
+                 (defined $__match_error ?
+                 " (processing \"$__match_error\")" : "");
+       }
        $s = $1.$5.$found{$name}.$';
     }
     return $s;
@@ -197,4 +201,10 @@
 }
 
 
+sub match_set_error
+{
+    $__match_error = $_[0];
+}
+
+
 return 1;




--- End Message ---
_______________________________________________
commitlog mailing list
commitlog@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/commitlog

Reply via email to