From 9b2cee24d03fcb9bbc97f4bbdb9cad9403fcaec5 Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Wed, 3 Aug 2011 17:10:52 +0200 Subject: [PATCH] Allow parsing of /*-style comments --- firmware/l0dable/mktable.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/l0dable/mktable.pl b/firmware/l0dable/mktable.pl index cc96e87..9c56a50 100755 --- a/firmware/l0dable/mktable.pl +++ b/firmware/l0dable/mktable.pl @@ -47,14 +47,14 @@ sub wanted { open(F,"<",$_) || die; while(){ chomp;s/\r$//; - if(m!^[^(]* ([\w]+)\s*\(.*\);\s*(//.*)?$!){ + if(m!^[^(]* ([\w]+)\s*\(.*\);\s*(//.*)?(/\*[^/]*\*/)?$!){ $id=$1; s/$id/(*)/; s/;//; s!//.*!!; $types{$id}="*($_)"; $files{$id}=$File::Find::name; - }elsif (m!^\s*extern\s[^(]* ([\w]+)\s*(\[\w*\]\s*)?;\s*(//.*)?$!){ + }elsif (m!^\s*extern\s[^(]* ([\w]+)\s*(\[\w*\]\s*)?;\s*(//.*)?(/\*[^/]*\*/)?$!){ $id=$1; s/extern //; my $star="*";