-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathout
More file actions
2710 lines (2710 loc) · 54.7 KB
/
out
File metadata and controls
2710 lines (2710 loc) · 54.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
jp0
jp1
0a1,43
>
>
> 1: PROGRAM
> 2: VARS
> 3: x int
> 4: y int
> 5: p bool
> 6: ENDVARS
> 7: PROCEDURE q()
> 8: PROCEDURE p(val p int)
> 9: p:=3
> 10: p:=true
> 11: ENDPROCEDURE
> 12: p:=3
> 13: p(3)
> 14: p(true)
> 15: ENDPROCEDURE
> 16: PROCEDURE r(ref p int)
> 17: PROCEDURE p(val r int)
> 18: r:=4
> 19: r(3)
> 20: r(p)
> 21: r(y)
> 22: r(x)
> 23: p:=3
> 24: p:=true
> 25: p(3)
> 26: ENDPROCEDURE
> 27: r:=3
> 28: r(3)
> 29: r(p())
> 30: r(y)
> 31: r(x)
> 32: p:=3
> 33: p:=true
> 34: p(p)
> 35: ENDPROCEDURE
> 36: p:=3
> 37: p:=true
> 38: p(3)
> 39: ENDPROGRAM
>
>
135,150d177
< L. 10: Assignment with incompatible types.
< L. 12: Left expression of assignment is not referenceable.
< L. 14: Parameter 1 with incompatible types.
< L. 17: Identifier p already declared.
< L. 19: Operator ( must be applied to a procedure in an instruction.
< L. 20: Operator ( must be applied to a procedure in an instruction.
< L. 21: Operator ( must be applied to a procedure in an instruction.
< L. 22: Operator ( must be applied to a procedure in an instruction.
< L. 24: Assignment with incompatible types.
< L. 25: Operator ( must be applied to a procedure in an instruction.
< L. 27: Left expression of assignment is not referenceable.
< L. 28: Parameter 1 is expected to be referenceable but it is not.
< L. 29: Operator ( must be applied to a function in an expression.
< L. 29: Parameter 1 is expected to be referenceable but it is not.
< L. 33: Assignment with incompatible types.
< L. 34: Operator ( must be applied to a procedure in an instruction.
152c179,180
< L. 38: Operator ( must be applied to a procedure in an instruction.
---
> BIG PROBLEM! No case defined for kind true
> BIG PROBLEM! No case defined for kind (
jp2
179,195c179,180
< L. 12: The number of parameters in the call do not match.
< L. 13: Identifier v is undeclared.
< L. 13: Parameter 1 is expected to be referenceable but it is not.
< L. 13: Parameter 3 with incompatible types.
< L. 14: The number of parameters in the call do not match.
< L. 15: The number of parameters in the call do not match.
< L. 16: Identifier p22 is undeclared.
< L. 19: Parameter 1 is expected to be referenceable but it is not.
< L. 20: Parameter 1 with incompatible types.
< L. 29: Assignment with incompatible types.
< L. 30: Operator + with incompatible types.
< L. 30: Operator - with incompatible types.
< L. 30: Assignment with incompatible types.
< L. 31: Operator / with incompatible types.
< L. 32: Identifier p11 is undeclared.
< L. 37: Identifier p22 is undeclared.
< There are errors: no code generated
---
> BIG PROBLEM! No case defined for kind (
> Generating code:
jp3
129,140c129,145
< L. 7: Operator not with incompatible types.
< L. 8: Operator not with incompatible types.
< L. 8: Operator > with incompatible types.
< L. 9: Operator + with incompatible types.
< L. 10: Operator > with incompatible types.
< L. 10: Assignment with incompatible types.
< L. 13: Operator not with incompatible types.
< L. 13: Operator = with incompatible types.
< L. 14: Operator + with incompatible types.
< L. 17: Operator = with incompatible types.
< L. 18: Operator > with incompatible types.
< There are errors: no code generated
---
> BIG PROBLEM! No case defined for kind if
> Generating code:
> program
> parameters
> static_link
> endparameters
>
> variables
> _x 4
> _y 4
> _b 4
> endvariables
>
> stop
> endprogram
>
> Executing code:
jp4
289,317d288
< L. 14: Operator / with incompatible types.
< L. 15: Operator ( must be applied to a procedure in an instruction.
< L. 16: Operator not with incompatible types.
< L. 17: Operator = with incompatible types.
< L. 18: Operator + with incompatible types.
< L. 18: Operator = with incompatible types.
< L. 18: Assignment with incompatible types.
< L. 20: Operator not with incompatible types.
< L. 20: Operator = with incompatible types.
< L. 21: Operator + with incompatible types.
< L. 24: Operator = with incompatible types.
< L. 25: Operator > with incompatible types.
< L. 26: Operator / with incompatible types.
< L. 30: Left expression of assignment is not referenceable.
< L. 31: Operator ( must be applied to a function in an expression.
< L. 31: The number of parameters in the call do not match.
< L. 34: Identifier i already declared.
< L. 35: Assignment with incompatible types.
< L. 36: Operator ( must be applied to a procedure in an instruction.
< L. 37: Left expression of assignment is not referenceable.
< L. 38: Operator * with incompatible types.
< L. 38: Parameter 4 with incompatible types.
< L. 40: Left expression of assignment is not referenceable.
< L. 41: Parameter 1 is expected to be referenceable but it is not.
< L. 41: Parameter 1 with incompatible types.
< L. 42: Left expression of assignment is not referenceable.
< L. 43: Parameter 1 with incompatible types.
< L. 43: Parameter 2 is expected to be referenceable but it is not.
< L. 43: Parameter 4 is expected to be referenceable but it is not.
320c291
< L. 47: Operator ( must be applied to a procedure in an instruction.
---
> BIG PROBLEM! No case defined for kind (
jp5
97,110c97
< L. 8: Return with incompatible type.
< L. 11: Operator ( must be applied to a function in an expression.
< L. 12: Operator ( must be applied to a function in an expression.
< L. 12: The number of parameters in the call do not match.
< L. 13: Parameter 1 with incompatible types.
< L. 13: Operator + with incompatible types.
< L. 13: Assignment with incompatible types.
< L. 14: Operator ( must be applied to a function in an expression.
< L. 14: Parameter 2 with incompatible types.
< L. 14: Parameter 2 with incompatible types.
< L. 14: Parameter 2 is expected to be referenceable but it is not.
< L. 14: Parameter 2 with incompatible types.
< L. 14: Assignment with incompatible types.
< There are errors: no code generated
---
> Generating code:
jp6
123,130c123,128
< L. 14: Identifier x already declared.
< L. 17: Operator struct. with incompatible types.
< L. 17: Operator + with incompatible types.
< L. 18: Assignment with incompatible types.
< L. 21: Assignment with incompatible types.
< L. 24: Operator array[] with incompatible types.
< L. 23: Operator + with incompatible types.
< L. 22: Assignment with incompatible types.
---
> BIG PROBLEM! No case defined for kind array
> BIG PROBLEM! No case defined for kind [
> BIG PROBLEM! No case defined for kind [
> BIG PROBLEM! No case defined for kind [
> BIG PROBLEM! No case defined for kind [
> L. 22: Left expression of assignment is not referenceable.
jp7
155,157c155,159
< L. 21: Operator struct. with incompatible types.
< L. 23: Assignment with incompatible types.
< L. 27: Assignment with incompatible types.
---
> BIG PROBLEM! No case defined for kind array
> BIG PROBLEM! No case defined for kind [
> BIG PROBLEM! No case defined for kind [
> L. 27: Left expression of assignment is not referenceable.
> BIG PROBLEM! No case defined for kind (
jp8
229,250c229
< L. 9: Assignment with incompatible types.
< L. 11: Parameter 1 with incompatible types.
< L. 13: Operator + with incompatible types.
< L. 13: Parameter 1 is expected to be referenceable but it is not.
< L. 13: Parameter 1 with incompatible types.
< L. 14: Parameter 1 with incompatible types.
< L. 15: Parameter 1 with incompatible types.
< L. 21: Identifier p already declared.
< L. 22: Left expression of assignment is not referenceable.
< L. 23: Parameter 1 with incompatible types.
< L. 25: Parameter 1 with incompatible types.
< L. 26: Assignment with incompatible types.
< L. 28: Assignment with incompatible types.
< L. 30: Assignment with incompatible types.
< L. 32: Operator ( must be applied to a procedure in an instruction.
< L. 34: Left expression of assignment is not referenceable.
< L. 35: Parameter 1 with incompatible types.
< L. 37: Parameter 1 with incompatible types.
< L. 38: Parameter 1 with incompatible types.
< L. 39: Assignment with incompatible types.
< L. 40: Operator ( must be applied to a procedure in an instruction.
< L. 41: Operator ( must be applied to a procedure in an instruction.
---
> BIG PROBLEM! No case defined for kind array
253,254c232,233
< L. 44: The number of parameters in the call do not match.
< L. 45: Operator ( must be applied to a function in an expression.
---
> BIG PROBLEM! No case defined for kind (
> BIG PROBLEM! No case defined for kind (
jp9
252,272c252,253
< L. 13: Left expression of assignment is not referenceable.
< L. 15: The number of parameters in the call do not match.
< L. 16: The number of parameters in the call do not match.
< L. 17: Parameter 1 with incompatible types.
< L. 18: Identifier p22 is undeclared.
< L. 21: Parameter 1 with incompatible types.
< L. 22: Parameter 1 with incompatible types.
< L. 23: The number of parameters in the call do not match.
< L. 34: Field n already defined in the struct.
< L. 38: Identifier w is undeclared.
< L. 38: Identifier p12 is undeclared.
< L. 38: Left expression of assignment is not referenceable.
< L. 39: Operator + with incompatible types.
< L. 40: Operator / with incompatible types.
< L. 42: Identifier p11 is undeclared.
< L. 44: Field x is not defined in the struct.
< L. 46: Operator + with incompatible types.
< L. 47: Assignment with incompatible types.
< L. 48: Assignment with incompatible types.
< L. 51: Identifier p22 is undeclared.
< There are errors: no code generated
---
> BIG PROBLEM! No case defined for kind (
> Generating code:
jp10
223,251c223,243
< L. 14: Field c already defined in the struct.
< L. 17: Operator not with incompatible types.
< L. 18: Operator not with incompatible types.
< L. 18: Operator > with incompatible types.
< L. 19: Operator + with incompatible types.
< L. 19: Operator = with incompatible types.
< L. 19: Operator - with incompatible types.
< L. 19: Operator or with incompatible types.
< L. 21: Operator [] with incompatible types.
< L. 21: Operator + with incompatible types.
< L. 21: Assignment with incompatible types.
< L. 24: Operator not with incompatible types.
< L. 24: Operator = with incompatible types.
< L. 24: Operator = with incompatible types.
< L. 25: Field b is not defined in the struct.
< L. 25: Operator / with incompatible types.
< L. 25: Assignment with incompatible types.
< L. 28: Operator > with incompatible types.
< L. 28: Operator = with incompatible types.
< L. 28: Operator = with incompatible types.
< L. 29: Operator > with incompatible types.
< L. 29: Assignment with incompatible types.
< L. 30: Assignment with incompatible types.
< L. 31: Operator + with incompatible types.
< L. 31: Assignment with incompatible types.
< L. 32: Assignment with incompatible types.
< L. 33: Operator array[] with incompatible types.
< L. 33: Operator struct. with incompatible types.
< There are errors: no code generated
---
> BIG PROBLEM! No case defined for kind array
> BIG PROBLEM! No case defined for kind array
> BIG PROBLEM! No case defined for kind array
> BIG PROBLEM! No case defined for kind if
> Generating code:
> program
> parameters
> static_link
> endparameters
>
> variables
> _x 4
> _y 4
> _b 12
> _c 4
> endvariables
>
> stop
> endprogram
>
> Executing code:
jp11
201,221c201
< L. 8: Operator + with incompatible types.
< L. 15: Identifier x is undeclared.
< L. 16: Identifier x is undeclared.
< L. 18: Return with incompatible type.
< L. 29: Operator ( must be applied to a function in an expression.
< L. 30: Operator ( must be applied to a function in an expression.
< L. 30: The number of parameters in the call do not match.
< L. 31: Parameter 1 with incompatible types.
< L. 31: Operator + with incompatible types.
< L. 31: Assignment with incompatible types.
< L. 32: Operator ( must be applied to a function in an expression.
< L. 32: Parameter 2 with incompatible types.
< L. 32: Parameter 2 with incompatible types.
< L. 32: Parameter 2 is expected to be referenceable but it is not.
< L. 32: Parameter 2 with incompatible types.
< L. 32: Assignment with incompatible types.
< L. 34: Assignment with incompatible types.
< L. 35: Assignment with incompatible types.
< L. 36: Parameter 2 is expected to be referenceable but it is not.
< L. 36: Operator + with incompatible types.
< There are errors: no code generated
---
> Generating code:
jp12
273c273,275
< L. 12: Identifier x is undeclared.
---
> BIG PROBLEM! No case defined for kind array
> BIG PROBLEM! No case defined for kind array
> BIG PROBLEM! No case defined for kind [
275c277
< L. 13: Identifier x is undeclared.
---
> BIG PROBLEM! No case defined for kind [
277,278c279
< L. 14: Identifier x is undeclared.
< L. 14: Operator [] with incompatible types.
---
> BIG PROBLEM! No case defined for kind [
281,283c282,283
< L. 15: Identifier x is undeclared.
< L. 15: Operator [] with incompatible types.
< L. 16: Operator - with incompatible types.
---
> BIG PROBLEM! No case defined for kind [
> BIG PROBLEM! No case defined for kind (
284a285,286
> L. 17: Identifier p is undeclared.
> BIG PROBLEM! No case defined for kind (
286c288,289
< L. 18: Identifier x is undeclared.
---
> BIG PROBLEM! No case defined for kind [
> BIG PROBLEM! No case defined for kind (
288c291
< L. 19: Identifier x is undeclared.
---
> BIG PROBLEM! No case defined for kind [
290,296c293,296
< L. 20: Operator ( must be applied to a procedure in an instruction.
< L. 21: Operator ( must be applied to a procedure in an instruction.
< L. 21: The number of parameters in the call do not match.
< L. 22: Identifier m is undeclared.
< L. 22: Identifier x is undeclared.
< L. 22: Identifier y is undeclared.
< L. 22: Identifier a is undeclared.
---
> BIG PROBLEM! No case defined for kind (
> BIG PROBLEM! No case defined for kind (
> BIG PROBLEM! No case defined for kind [
> BIG PROBLEM! No case defined for kind [
298,299c298
< L. 23: Identifier m is undeclared.
< L. 23: Identifier a is undeclared.
---
> BIG PROBLEM! No case defined for kind [
301,302c300
< L. 24: Identifier m is undeclared.
< L. 24: Identifier a is undeclared.
---
> BIG PROBLEM! No case defined for kind [
304,306c302,303
< L. 25: Identifier x is undeclared.
< L. 25: Operator [] with incompatible types.
< L. 25: Identifier y is undeclared.
---
> BIG PROBLEM! No case defined for kind [
> BIG PROBLEM! No case defined for kind (
309,310c306
< L. 26: Identifier x is undeclared.
< L. 26: Operator struct. with incompatible types.
---
> BIG PROBLEM! No case defined for kind (
313c309
< L. 27: Identifier f is undeclared.
---
> BIG PROBLEM! No case defined for kind [
316,318c312
< L. 28: Identifier x is undeclared.
< L. 28: Operator array[] with incompatible types.
< L. 28: Operator [] with incompatible types.
---
> BIG PROBLEM! No case defined for kind [
321,323c315
< L. 29: Identifier x is undeclared.
< L. 29: Operator array[] with incompatible types.
< L. 29: Operator [] with incompatible types.
---
> BIG PROBLEM! No case defined for kind [
326c318
< L. 30: Identifier f is undeclared.
---
> BIG PROBLEM! No case defined for kind [
329,330c321
< L. 31: Identifier f is undeclared.
< L. 31: Operator struct. with incompatible types.
---
> BIG PROBLEM! No case defined for kind [
333,334c324
< L. 32: Identifier f is undeclared.
< L. 32: Operator struct. with incompatible types.
---
> BIG PROBLEM! No case defined for kind [
337c327
< L. 33: Identifier y is undeclared.
---
> BIG PROBLEM! No case defined for kind (
jp13
179,189c179,186
< L. 19: Identifier t already declared.
< L. 8: Return with incompatible type.
< L. 11: Return with incompatible type.
< L. 14: Return with incompatible type.
< L. 17: Return with incompatible type.
< L. 20: Return with incompatible type.
< L. 25: Referenceable expression required in read.
< L. 26: Referenceable expression required in read.
< L. 27: Referenceable expression required in read.
< L. 28: Basic type required in read.
< L. 31: Basic type required in writeln.
---
> BIG PROBLEM! No case defined for kind read
> BIG PROBLEM! No case defined for kind read
> BIG PROBLEM! No case defined for kind read
> BIG PROBLEM! No case defined for kind read
> BIG PROBLEM! No case defined for kind read
> BIG PROBLEM! No case defined for kind read
> BIG PROBLEM! No case defined for kind write
> BIG PROBLEM! No case defined for kind (
191,197c188,190
< L. 33: Instruction if requires a boolean condition.
< L. 34: Instruction while requires a boolean condition.
< L. 38: Instruction if requires a boolean condition.
< L. 39: Operator = with incompatible types.
< L. 43: Operator = with incompatible types.
< L. 44: The number of parameters in the call do not match.
< L. 44: Instruction while requires a boolean condition.
---
> BIG PROBLEM! No case defined for kind if
> BIG PROBLEM! No case defined for kind if
> BIG PROBLEM! No case defined for kind if
jp1~
15c15
< 13: p(3)
---
> 13: -p(3)
76,80c76,81
< | | | \__intconst(3)
< | | \__(
< | | | \__ident(p)
< | | | \__list
< | | | \__intconst(3)
---
> | | | \__-
> | | | \__intconst(3)
> | | | \__(
> | | | \__ident(p)
> | | | \__list
> | | | \__intconst(3)
178,193d178
< L. 10: Assignment with incompatible types.
< L. 12: Left expression of assignment is not referenceable.
< L. 14: Parameter 1 with incompatible types.
< L. 17: Identifier p already declared.
< L. 19: Operator ( must be applied to a procedure in an instruction.
< L. 20: Operator ( must be applied to a procedure in an instruction.
< L. 21: Operator ( must be applied to a procedure in an instruction.
< L. 22: Operator ( must be applied to a procedure in an instruction.
< L. 24: Assignment with incompatible types.
< L. 25: Operator ( must be applied to a procedure in an instruction.
< L. 27: Left expression of assignment is not referenceable.
< L. 28: Parameter 1 is expected to be referenceable but it is not.
< L. 29: Operator ( must be applied to a function in an expression.
< L. 29: Parameter 1 is expected to be referenceable but it is not.
< L. 33: Assignment with incompatible types.
< L. 34: Operator ( must be applied to a procedure in an instruction.
195c180,181
< L. 38: Operator ( must be applied to a procedure in an instruction.
---
> BIG PROBLEM! No case defined for kind true
> BIG PROBLEM! No case defined for kind (
jp20
jp21
81a82,83
> BIG PROBLEM! No case defined for kind true
> BIG PROBLEM! No case defined for kind false
82a85,86
> BIG PROBLEM! No case defined for kind true
> BIG PROBLEM! No case defined for kind false
100d103
< iload 1 t1
108d110
< iload 0 t1
131c133,134
< 1
---
> 5
> 4
133d135
< 0
jp22
59a60
> BIG PROBLEM! No case defined for kind while
73,105d73
< etiq while_1
< load _I t0
< iload 10 t1
< lesi t0 t1 t0
< fjmp t0 endwhile_1
< load _I t0
< iload 2 t1
< load _I t2
< iload 2 t3
< divi t2 t3 t2
< muli t1 t2 t1
< subi t0 t1 t0
< iload 0 t1
< equi t0 t1 t0
< fjmp t0 else_1
< load _I t0
< wrii t0
< wrln
< ujmp endif_1
< etiq else_1
< iload 2 t0
< load _I t1
< muli t0 t1 t0
< wrii t0
< wrln
< etiq endif_1
< aload _I t0
< load _I t1
< iload 1 t2
< addi t1 t2 t1
< stor t1 t0
< ujmp while_1
< etiq endwhile_1
110,118d77
< 2
< 2
< 6
< 4
< 10
< 6
< 14
< 8
< 18
jp23
60,95c60,64
< Generating code:
< program
< parameters
< static_link
< endparameters
<
< variables
< _A 80
< _S 8
< endvariables
<
< aload _S t0
< addi t0 4 t0
< iload 5 t1
< stor t1 t0
< aload _A t0
< aload _S t1
< addi t1 4 t1
< load t1 t1
< muli t1 8 t1
< addi t0 t1 t0
< aload _S t1
< copy t1 t0 8
< aload _A t0
< iload 5 t1
< muli t1 8 t1
< addi t0 t1 t0
< addi t0 4 t0
< load t0 t0
< wrii t0
< wrln
< stop
< endprogram
<
< Executing code:
< 5
---
> BIG PROBLEM! No case defined for kind array
> BIG PROBLEM! No case defined for kind [
> L. 13: Left expression of assignment is not referenceable.
> BIG PROBLEM! No case defined for kind [
> There are errors: no code generated
jp24
100a101,103
> BIG PROBLEM! No case defined for kind true
> BIG PROBLEM! No case defined for kind false
> BIG PROBLEM! No case defined for kind if
101a105,106
> BIG PROBLEM! No case defined for kind true
> BIG PROBLEM! No case defined for kind false
120d124
< iload 1 t1
128d131
< iload 0 t1
130,147d132
< load _X t0
< iload 3 t1
< muli t0 t1 t0
< iload 10 t1
< grti t0 t1 t0
< aload _S t1
< addi t1 4 t1
< load t1 t1
< land t0 t1 t0
< fjmp t0 endif_1
< aload _S t0
< addi t0 0 t0
< load _X t1
< stor t1 t0
< aload _S1 t0
< aload _S t1
< copy t1 t0 8
< etiq endif_1
162,163c147,148
< 5
< 1
---
> 4
> 4
jp25
128a129,132
> BIG PROBLEM! No case defined for kind false
> BIG PROBLEM! No case defined for kind (
> BIG PROBLEM! No case defined for kind write
> BIG PROBLEM! No case defined for kind write
130,249d133
< program
< parameters
< static_link
< endparameters
<
< variables
< _Y 4
< _X 4
< endvariables
<
< aload _Y t0
< iload 3 t1
< stor t1 t0
< aload _X t0
< iload 0 t1
< stor t1 t0
< iload 2 t0
< iload 3 t1
< muli t0 t1 t0
< iload 1 t1
< addi t0 t1 t0
< pushparam t0
< aload _Y t0
< pushparam t0
< aload static_link t0
< pushparam t0
< call program_P0
< killparam
< killparam
< killparam
< load _Y t0
< wrii t0
< wris " "
< load _X t0
< wrii t0
< wrln
< stop
< endprogram
<
< subroutine program_P0_P1
< parameters
< _V1
< _R1
< _R2
< static_link
< endparameters
<
< variables
< _Y1 4
< _X1 4
< endvariables
<
< load _R1 t0
< load _V1 t1
< stor t1 t0
< load static_link t0
< addi t0 offset(program_P0:_V0) t0
< iload 10 t1
< stor t1 t0
< load static_link t0
< load t0 t0
< addi t0 offset(program:_X) t0
< load static_link t1
< addi t1 offset(program_P0:_V0) t1
< load t1 t1
< load _R2 t2
< equi t1 t2 t1
< load static_link t2
< addi t2 offset(program_P0:_V0) t2
< load t2 t2
< load _R1 t3
< load t3 t3
< load static_link t4
< addi t4 offset(program_P0:_R0) t4
< load t4 t4
< load t4 t4
< addi t3 t4 t3
< equi t2 t3 t2
< land t1 t2 t1
< lnot t1 t1
< stor t1 t0
< retu
< endsubroutine
<
< subroutine program_P0
< parameters
< _V0
< _R0
< static_link
< endparameters
<
< variables
< endvariables
<
< load _V0 t0
< pushparam t0
< load _R0 t0
< pushparam t0
< load _R0 t0
< load t0 t0
< pushparam t0
< aload static_link t0
< pushparam t0
< call program_P0_P1
< killparam
< killparam
< killparam
< killparam
< load _V0 t0
< wrii t0
< wris " "
< load _R0 t0
< load t0 t0
< wrii t0
< wris " "
< retu
< endsubroutine
<
< Executing code:
< 10 7 7 1
jp26
106a107
> BIG PROBLEM! No case defined for kind while
108,204d108
< program
< parameters
< static_link
< endparameters
<
< variables
< _X 4
< _Y 4
< endvariables
<
< aload _X t0
< iload 1 t1
< stor t1 t0
< etiq while_1
< load _X t0
< iload 10 t1
< lesi t0 t1 t0
< fjmp t0 endwhile_1
< load _X t0
< pushparam t0
< aload _Y t0
< pushparam t0
< aload static_link t0
< pushparam t0
< call program_FACT
< killparam
< killparam
< killparam
< wris " El factorial de "
< load _X t0
< wrii t0
< wris " es: "
< load _Y t0
< wrii t0
< wris ""
< wrln
< aload _X t0
< load _X t1
< iload 1 t2
< addi t1 t2 t1
< stor t1 t0
< ujmp while_1
< etiq endwhile_1
< stop
< endprogram
<
< subroutine program_FACT
< parameters
< _X
< _F
< static_link
< endparameters
<
< variables
< _AUX 4
< endvariables
<
< load _X t0
< iload 1 t1
< equi t0 t1 t0
< fjmp t0 else_1
< load _F t0
< iload 1 t1
< stor t1 t0
< ujmp endif_1
< etiq else_1
< load _X t0
< iload 1 t1
< subi t0 t1 t0
< pushparam t0
< aload _AUX t0
< pushparam t0
< load static_link t0
< pushparam t0
< call program_FACT
< killparam
< killparam
< killparam
< load _F t0
< load _AUX t1
< load _X t2
< muli t1 t2 t1
< stor t1 t0
< etiq endif_1
< retu
< endsubroutine
<
< Executing code:
< El factorial de 1 es: 1
< El factorial de 2 es: 2
< El factorial de 3 es: 6
< El factorial de 4 es: 24
< El factorial de 5 es: 120
< El factorial de 6 es: 720
< El factorial de 7 es: 5040
< El factorial de 8 es: 40320
< El factorial de 9 es: 362880
jp27
97a98
> BIG PROBLEM! No case defined for kind while
99,192d99
< program
< parameters
< static_link
< endparameters
<
< variables
< _X 4
< _Y 4
< endvariables
<
< aload _X t0
< iload 1 t1
< stor t1 t0
< etiq while_1
< load _X t0
< iload 10 t1
< lesi t0 t1 t0
< fjmp t0 endwhile_1
< wris " El factorial de "
< load _X t0
< wrii t0
< wris " es: "
< pushparam 0
< load _X t0
< pushparam t0
< aload static_link t0
< pushparam t0
< call program_FACT
< killparam
< killparam
< popparam t0
< wrii t0
< wrln
< aload _X t0
< load _X t1
< iload 1 t2
< addi t1 t2 t1
< stor t1 t0
< ujmp while_1
< etiq endwhile_1
< stop
< endprogram
<
< subroutine program_FACT
< parameters
< returnvalue
< _X
< static_link
< endparameters
<
< variables
< _F 4
< endvariables
<
< load _X t0
< iload 1 t1
< equi t0 t1 t0
< fjmp t0 else_1
< aload _F t0
< iload 1 t1
< stor t1 t0
< ujmp endif_1
< etiq else_1
< aload _F t0
< pushparam 0
< load _X t1
< iload 1 t2
< subi t1 t2 t1
< pushparam t1
< load static_link t1
< pushparam t1
< call program_FACT
< killparam
< killparam
< popparam t1
< load _X t2
< muli t1 t2 t1
< stor t1 t0
< etiq endif_1
< load _F t0
< stor t0 returnvalue
< retu
< endsubroutine
<
< Executing code:
< El factorial de 1 es: 1
< El factorial de 2 es: 2
< El factorial de 3 es: 6
< El factorial de 4 es: 24
< El factorial de 5 es: 120
< El factorial de 6 es: 720
< El factorial de 7 es: 5040
< El factorial de 8 es: 40320
< El factorial de 9 es: 362880
jp28
578a579,582
> BIG PROBLEM! No case defined for kind (
> BIG PROBLEM! No case defined for kind (
> BIG PROBLEM! No case defined for kind if
> BIG PROBLEM! No case defined for kind (
580,1190d583
< program
< parameters
< static_link