@@ -141,7 +141,7 @@ relation unparse_class_str: (int, Absyn.Class,string,string,string) => string =
141
141
select_string(f, "final ","") => s2 &
142
142
unparse_restriction_str (r) => s3 &
143
143
int_add(i,1) => i' &
144
- unparse_class_part_str_lst(i',parts) => s4 &
144
+ unparse_class_part_str_lst(i',parts,true ) => s4 &
145
145
unparse_string_comment_option(optcmt) => s5 &
146
146
Util.string_append_list([is, s1, s2, re, io, s3, " ", n, s5, "\n", s4, is, "end ", n]) => str
147
147
-----------------------------
@@ -455,67 +455,75 @@ relation print_external_decl : Absyn.ExternalDecl => () =
455
455
456
456
end
457
457
458
- relation unparse_class_part_str_lst: (int, Absyn.ClassPart list) => string =
458
+ relation unparse_class_part_str_lst: (int, Absyn.ClassPart list,bool)
459
+ => string =
459
460
460
- axiom unparse_class_part_str_lst (_,[]) => ""
461
+ axiom unparse_class_part_str_lst (_,[],false ) => ""
461
462
462
- rule unparse_class_part_str(i,x) => s1 &
463
- unparse_class_part_str_lst(i,xs) => s2 &
463
+ rule unparse_class_part_str(i,x,skippublic ) => s1 &
464
+ unparse_class_part_str_lst(i,xs,false ) => s2 &
464
465
string_append(s1,s2) => res
465
466
----------------------
466
- unparse_class_part_str_lst(i,x::xs) => res
467
+ unparse_class_part_str_lst(i,x::xs,skippublic ) => res
467
468
end
468
469
469
- relation unparse_class_part_str: (int, Absyn.ClassPart) => string =
470
+ relation unparse_class_part_str: (int, Absyn.ClassPart,bool ) => string =
470
471
471
- axiom unparse_class_part_str(i, Absyn.PUBLIC([])) => ""
472
- axiom unparse_class_part_str(i, Absyn.PROTECTED([])) => ""
473
- axiom unparse_class_part_str(i, Absyn.EQUATIONS([])) => ""
474
- axiom unparse_class_part_str(i, Absyn.INITIALEQUATIONS([])) => ""
475
- axiom unparse_class_part_str(i, Absyn.ALGORITHMS([])) => ""
476
- axiom unparse_class_part_str(i, Absyn.INITIALALGORITHMS([])) => ""
472
+ axiom unparse_class_part_str(i, Absyn.PUBLIC([]),_ ) => ""
473
+ axiom unparse_class_part_str(i, Absyn.PROTECTED([]),_ ) => ""
474
+ axiom unparse_class_part_str(i, Absyn.EQUATIONS([]),_ ) => ""
475
+ axiom unparse_class_part_str(i, Absyn.INITIALEQUATIONS([]),_ ) => ""
476
+ axiom unparse_class_part_str(i, Absyn.ALGORITHMS([]),_ ) => ""
477
+ axiom unparse_class_part_str(i, Absyn.INITIALALGORITHMS([]),_ ) => ""
477
478
478
479
rule unparse_elementitem_str_lst(i,el) => s1 &
479
480
int_sub(i,1) => i' &
480
481
indent_str(i') => is &
481
- Util.string_append_list([is,"public \n", s1]) => str
482
+ Util.string_append_list([is,s1]) => str
482
483
-----------------------------------------------
483
- unparse_class_part_str(i, Absyn.PUBLIC(el)) => str
484
+ unparse_class_part_str(i, Absyn.PUBLIC(el),true ) => str
484
485
486
+ rule unparse_elementitem_str_lst(i,el) => s1 &
487
+ int_sub(i,1) => i' &
488
+ indent_str(i') => is &
489
+ Util.string_append_list([is,"public \n",s1]) => str
490
+ -----------------------------------------------
491
+ unparse_class_part_str(i, Absyn.PUBLIC(el),false) => str
492
+
485
493
rule unparse_elementitem_str_lst(i,el) => s1 &
486
494
int_sub(i,1) => i' &
487
495
indent_str(i') => is &
488
496
Util.string_append_list([is,"protected \n",s1]) => str
489
497
---------------------------------------
490
- unparse_class_part_str(i, Absyn.PROTECTED(el)) => str
498
+ unparse_class_part_str(i, Absyn.PROTECTED(el),_ ) => str
491
499
492
500
rule unparse_equationitem_str_lst(i,eqs,";\n") => s1 &
493
501
int_sub(i,1) => i' &
494
502
indent_str(i') => is &
495
503
Util.string_append_list(["\n",is,"equation \n",s1]) => str
496
504
--------------------------------------
497
- unparse_class_part_str(i, Absyn.EQUATIONS(eqs)) => str
505
+ unparse_class_part_str(i, Absyn.EQUATIONS(eqs),_ ) => str
498
506
499
507
rule unparse_equationitem_str_lst(i,eqs,";\n") => s1 &
500
508
int_sub(i,1) => i' &
501
509
indent_str(i') => is &
502
510
Util.string_append_list(["\n",is,"initial equation \n",s1]) => str
503
511
--------------------------------------
504
- unparse_class_part_str(i, Absyn.INITIALEQUATIONS(eqs)) => str
512
+ unparse_class_part_str(i, Absyn.INITIALEQUATIONS(eqs),_ ) => str
505
513
506
514
rule unparse_algorithm_str_lst(i,eqs,"\n") => s1 &
507
515
int_sub(i,1) => i' &
508
516
indent_str(i') => is &
509
517
Util.string_append_list([is,"algorithm \n",s1]) => str
510
518
--------------------------------------
511
- unparse_class_part_str(i, Absyn.ALGORITHMS(eqs)) => str
519
+ unparse_class_part_str(i, Absyn.ALGORITHMS(eqs),_ ) => str
512
520
513
521
rule unparse_algorithm_str_lst(i,eqs,"\n") => s1 &
514
522
int_sub(i,1) => i' &
515
523
indent_str(i') => is &
516
524
Util.string_append_list([is,"initial algorithm \n",s1]) => str
517
525
-----------------------------------------------
518
- unparse_class_part_str(i, Absyn.INITIALALGORITHMS(eqs)) => str
526
+ unparse_class_part_str(i, Absyn.INITIALALGORITHMS(eqs),_ ) => str
519
527
520
528
rule get_extlang_str(lang) => langstr &
521
529
print_component_ref_str output => outputstr &
@@ -524,7 +532,7 @@ axiom unparse_class_part_str(i, Absyn.INITIALALGORITHMS([])) => ""
524
532
indent_str(i) => is &
525
533
Util.string_append_list(["\n", is, "external ",langstr," ", outputstr, "=",ident,"(",expstr,");\n"]) => str
526
534
--------------------------------------
527
- unparse_class_part_str(i, Absyn.EXTERNAL(Absyn.EXTERNALDECL(SOME(ident),lang,SOME(output),expl)))
535
+ unparse_class_part_str(i, Absyn.EXTERNAL(Absyn.EXTERNALDECL(SOME(ident),lang,SOME(output),expl)),_ )
528
536
=> str
529
537
530
538
rule get_extlang_str(lang) => langstr &
@@ -533,13 +541,13 @@ axiom unparse_class_part_str(i, Absyn.INITIALALGORITHMS([])) => ""
533
541
indent_str(i) => is &
534
542
Util.string_append_list(["\n", is, "external ", langstr," ",ident,"(",expstr,");\n"]) => str
535
543
--------------------------------------
536
- unparse_class_part_str(i, Absyn.EXTERNAL(Absyn.EXTERNALDECL(SOME(ident),lang,NONE,expl)))
544
+ unparse_class_part_str(i, Absyn.EXTERNAL(Absyn.EXTERNALDECL(SOME(ident),lang,NONE,expl)),_ )
537
545
=> str
538
546
539
547
rule indent_str(i) => is &
540
548
Util.string_append_list(["\n",is,"external;\n"]) => res
541
549
-----------------
542
- unparse_class_part_str(i, Absyn.EXTERNAL(Absyn.EXTERNALDECL(NONE,_,NONE,_)))
550
+ unparse_class_part_str(i, Absyn.EXTERNAL(Absyn.EXTERNALDECL(NONE,_,NONE,_)),_ )
543
551
=> res
544
552
end
545
553
0 commit comments