chiark / gitweb /
Do not require NMRA buffers to be cleared by ON; add hex byte value annotations to...
[trains.git] / hostside / parse-proto-spec
index 5865e425aa0d64dcc2659aeeca970c04bf64735f..1698ebab49f899f0f25c00868ce834cd2dbf6b57 100755 (executable)
@@ -53,9 +53,9 @@ sub process_line () {
     next unless defined $dirn;
     next unless m/^ ([<>]) / && $1 eq $dirn;
     die if m/\t/;
-    die unless m/^ [<>] ([01A-Za-z. ]+?)   +(\S.*)$/;
+    die unless
+ m/^ [<>] ([01A-Za-z. ]+?)(?:   +|\s+\([+? A-Z0-9a-z]+\)\s+)([^() \t\n].*)$/;
     $msg= $1; $rhs= $2;
-    $rhs =~ s/^\([A-Z][0-9A-Z]+\) +//;
     next if $rhs =~ m/^\}/;
     next if $msg =~ m/\.\.\./;
     $rhs =~ m/^([A-Z]+)\s/ or die "$rhs?";