]> nuage.metani.fr Git - 3GPP.git/blobdiff - awk/txt2asn.awk
Add description of commands used to check that the ASN.1 in generated files is exactl...
[3GPP.git] / awk / txt2asn.awk
index e871003fe7402ce57c8f7b5b18dbbfca0ce321d8..09cc066fdd49cfc354d9279c65f4bd78538fc20f 100755 (executable)
@@ -5,12 +5,12 @@ BEGIN {
     separator = "" ;
 
     wide_separator = "" ;
-    for(i=0;i<=140;i++) {
+    for(i=0;i<=70;i++) {
        wide_separator = wide_separator "-" ;
     }
 
     ie_separator = "-- " ;
-    for (i=0;i<=137;i++) {
+    for (i=0;i<=70;i++) {
        ie_separator = ie_separator "=" ;
     }
 }
@@ -101,8 +101,7 @@ BEGIN {
 /^-[[:space:]]+Multiplicity and type constraints? definitions$/ {
     if (empty_line == "yes") {
        print ie_separator;
-       print "-- Multiplicity and type constraints definitions";
-       print "" ;
+       print "-- IE: Constants";
        empty_line = "no" ;
        conditions = "" ;
     }
@@ -117,13 +116,11 @@ BEGIN {
 
 /^Conditional Presence/ {
     add_line_after = "";
-    separator = "" ;
-    
+    separator = ie_separator ;
+
     $0 = "Conditional presence" ;
-    for(i=0;i<=140;i++) {
-       separator = separator "-" ;
-    }
-#    print separator;
+  
+    print separator;
     #add_line_after = separator ;
     next_line = "condition" ;
 }
@@ -132,12 +129,9 @@ BEGIN {
 
 /field descriptions$/ {
     add_line_after = "";
-    separator = "" ;
 
-    for(i=0;i<=140;i++) {
-       separator = separator "-" ;
-    }
-#    print separator;
+    separator = ie_separator;
+    print separator;
 #   add_line_after = separator ;
     next_line = "field name" ;
 }
@@ -153,6 +147,7 @@ BEGIN {
     if (next_line == "field name") {
        
        print separator ;
+       separator = wide_separator ;
        
        $0 = "Field: " $0
        #add_line_after = " ";
@@ -160,6 +155,7 @@ BEGIN {
     }
     else if (next_line == "field description") {
        print separator ;
+       separator = wide_separator ;
        
        $0 = "Field: " $0
        #add_line_after = separator ;
@@ -176,6 +172,7 @@ BEGIN {
           
            if (index(conditions, $1) != 0) {
                print separator;
+               separator = wide_separator ;
                print "-- Condition: " $1;
                $1 = "";
            }