no complaints. ;)
Basically, instead of ignoring single-line C-style comments in IDL source
files this change allows token.awk to ignore both single- and multi-line
C-style comments.
Chris -)-----
(This used to be commit
34f69f09f840b8990b718e8585785e2a6ad7c314)
exit 1;
}
+# ignore multi-line C comments.
+{
+ if (t = index($0, "/*")) {
+ if (t > 1)
+ tmp = substr($0, 1, t - 1)
+ else
+ tmp = ""
+ u = index(substr($0, t + 2), "*/")
+ while (u == 0) {
+ getline
+ t = -1
+ u = index($0, "*/")
+ }
+ if (u <= length($0) - 2)
+ $0 = tmp substr($0, t + u + 3)
+ else
+ $0 = tmp
+ }
+}
+
# ignore blank lines
/^[ \t]*$/ {
next;
next;
}
-# ignore C comments
-/^[ \t]*\/\*.*\*\// {
- next;
-}
-
/^[ \t]*module/ {
{if (module!="") parse_error("you can only specify one module name");}
start_module($2);