summaryrefslogtreecommitdiffstats
path: root/qlparser/rasml.awk
diff options
context:
space:
mode:
Diffstat (limited to 'qlparser/rasml.awk')
-rw-r--r--qlparser/rasml.awk9
1 files changed, 9 insertions, 0 deletions
diff --git a/qlparser/rasml.awk b/qlparser/rasml.awk
new file mode 100644
index 0000000..124d6ab
--- /dev/null
+++ b/qlparser/rasml.awk
@@ -0,0 +1,9 @@
+BEGIN { paren = 0; sec = 0 }
+/\%\%/ { sec += 1; next; }
+sec!=1 { next; }
+# /^ *$/ { next; }
+/\/\// && !paren { x=$0; sub(/\/\/.*/, "", x); print x; next; }
+/{/ { x=$0; sub(/\{.*/, "", x); if(!paren) print x; paren += 1; }
+/(\/\*)/ { paren += 1; }
+/}|(\*\/)/ { paren -= 1; next; }
+!paren { print $0; }