print "";
if (field_description_len[structure[line]][field[line]] > 0) {
- for (i=1;i<=field_description_len[structure[line]][field[line]]; i++) {
+
+ print indentation "-- " field[line] " : " field_description[structure[line]][field[line]][1];
+
+ for (i=2;i<=field_description_len[structure[line]][field[line]]; i++) {
print indentation "-- " field_description[structure[line]][field[line]][i];
if (condition_description_len[condition[line]] > 0) {
if(field[line] != "")
{
- for(i=1;i<=condition_description_len[condition[line]];i++) {
+ gsub(/(, )*[Nn]eed [MNSR],*/, "", condition_description[condition[line]][1]);
+ print indentation "-- " field[line] " : " condition_description[condition[line]][1];
+
+ for(i=2;i<=condition_description_len[condition[line]];i++) {
gsub(/(, )*[Nn]eed [MNSR],*/, "", condition_description[condition[line]][i]);
print indentation "--" condition_description[condition[line]][i];
}
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 "=" ;
}
}
-/^[0-9]+\./ {
+/^[0-9]+(\.[0-9]+)*\t/ {
if (in_IE == "yes") { asn1_print(); }
in_IE = "no" ;
}
+/^[A-Za-z0-9-]+ message$/ {
+ # No need to print this
+ next;
+}
+
+/^[A-Za-z0-9-]+ information element$/ {
+ # No need to print this
+ next;
+}
+
/^-- ASN1START/ {
print "";
in_ASN1 = "yes";
/^-- ASN1STOP/ {
in_ASN1 = "no";
+ direct_print = "no" ;
next;
}
#print separator ;
}
- next_line = "" ;
+ if (next_line != "field description") {
+ next_line = "" ;
+ }
# #if (empty_line == "yes") {
# next;
# }
}
-/^–[[:space:]]+ParentIE-WithEM$/ {
+/^-[[:space:]]+ParentIE-WithEM$/ {
exit 0 ;
}
-/^–[[:space:]]+[A-Za-z0-9-]+$/ {
+/^-[[:space:]]+[A-Za-z0-9-]+$/ {
asn1_print();
# if (empty_line == "yes") {
next ;
}
+/^-[[:space:]]+Multiplicity and type constraints? definitions?$/ {
+
+ #print "Trouvé" ;
+ if (in_IE == "yes") {
+ asn1_print();
+ }
+ in_IE = "yes" ;
+ #print "Trouvé 2" ;
+
+ # In this case, directly print ASN.1 without processing
+ direct_print = "yes" ;
+
+ print ie_separator;
+ print "-- IE: Constants";
+ print "" ;
+ empty_line = "no" ;
+ conditions = "" ;
+
+ next ;
+}
+
+/^-[[:space:]]+End of [A-Za-z0-9-]+$/ {
+ if (in_IE == "yes") {
+ asn1_print();
+ }
+ in_IE = "yes" ;
+ empty_line = "no" ;
+ conditions = "" ;
+}
+
+/^NR-InterNodeDefinitions/ {
+
+ print ie_separator;
+ print "-- IE: NR-InterNodeDefinitions";
+ print "" ;
+ print ;
+
+ empty_line = "no" ;
+ conditions = "" ;
+
+ in_IE = "no" ;
+ direct_print = "yes" ;
+ next ;
+}
+
/^Conditional [Pp]resence/ {
add_line_after = "";
separator = "" ;
$0 = "Conditional presence" ;
- for(i=0;i<=140;i++) {
+ for(i=0;i<=70;i++) {
separator = separator "-" ;
}
# print separator;
add_line_after = "";
separator = "" ;
- for(i=0;i<=140;i++) {
+ for(i=0;i<=70;i++) {
separator = separator "-" ;
}
# print separator;
#}
# This is matched for any non-empty line
-/^[A-Za-z0-9-]+/ {
+/[A-Za-z0-9-]+/ {
if ((in_IE == "yes") && (in_ASN1 == "no")){
}
}
}
+
+ else if ((in_ASN1 == "yes") && (direct_print == "yes")) {
+ print ;
+ next ;
+ }
}
#/^[A-Za-z0-9-]+/ {
if((line_number==0) && (/^[[:space:]]*$/)) { next ; }
line_number++;
text[line_number] = $0;
-
+
+ if (/Multiplicity/) {
+ print "Trouvé 3";
+ print $0;
+ }
#print "text[" line_number "] est " text[line_number];
if (/^[A-Za-z0-9-]+[[:space:]]+:/) {
# remove suffix
if (/-- Cond [A-Za-z0-9_-]+$/) {
conditions = conditions " " $NF ;
}
- }
+ }
+ else if ((in_ASN1 == "yes") && (direct_print == "yes")) {
+ print ;
+ }
}