summaryrefslogtreecommitdiffstats
path: root/rasdl/rasdl.awk
diff options
context:
space:
mode:
Diffstat (limited to 'rasdl/rasdl.awk')
-rw-r--r--rasdl/rasdl.awk11
1 files changed, 11 insertions, 0 deletions
diff --git a/rasdl/rasdl.awk b/rasdl/rasdl.awk
new file mode 100644
index 0000000..79f99dc
--- /dev/null
+++ b/rasdl/rasdl.awk
@@ -0,0 +1,11 @@
+BEGIN { paren = 0; sec = 0; comm = 0 }
+/^ *$/ { next; }
+/\%\%/ { sec += 1; next; }
+sec!=1 { next; }
+/^\/\*$/ { comm = 1; next; }
+/^\*\// { comm = 0; next; }
+comm == 1 { next; }
+/^\/\*.*\*\// { next; }
+/{/ { x=$0; sub(/\{.*/, "", x); if(!paren) print x; paren += 1; }
+/}/ { paren -= 1; next; }
+!paren { print $0; }