#include "perms.h"

                                                                //      1  ! Testing comment removal
                                                                //      2  %begin
#line 2 "regression-run-tmp/semicomment.imp"
int main(int argc, char **argv) {
  __label__ _imp_endofblock;
  _imp_initialise(argc, argv);
                                                                //      3  
                                                                //      4  %constintegerarray fred(0:2) = ;! A comment here???!
_imp_current_line = 4; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 4 "regression-run-tmp/semicomment.imp"
const int FRED[3] = { 1, 2, 3,  };
                                                                //      5            1,2,
                                                                //      6            ! comment?
                                                                //      7            3
                                                                //      8  
                                                                //      9  %routine jim(%integer p,
_imp_current_line = 9; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 9 "regression-run-tmp/semicomment.imp"
void JIM( int P, int Q )
#line 9 "regression-run-tmp/semicomment.imp"
{
  __label__ _imp_endofblock;
                                                                //     10               %integer q)
                                                                //     11  %end
_imp_current_line = 11; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 11 "regression-run-tmp/semicomment.imp"
return;
_imp_endofblock: ;
} // End of block JIM at level 2
                                                                //     12  
                                                                //     13  
                                                                //     14  ! Imp77 allows multiple blank lines following a continuation (%c or ',' or '=')
                                                                //     15  
                                                                //     16  %constc
                                                                //     17  
                                                                //     18  
                                                                //     19  %integerarray sheila(0:2) =
_imp_current_line = 19; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 19 "regression-run-tmp/semicomment.imp"
const int SHEILA[3] = { 1, 2, 3,  };
                                                                //     20  
                                                                //     21  
                                                                //     22            1,2,
                                                                //     23  
                                                                //     24            3
                                                                //     25  
                                                                //     26  
                                                                //     27  %switch lab(1:4)
_imp_current_line = 27; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 27 "regression-run-tmp/semicomment.imp"
static int sw1_LAB_idx;
static const void * /*SWITCH*/ sw1_LAB[4] = { &&sw1_LAB_1, &&sw1_LAB_2, &&sw1_LAB_3, &&sw1_LAB_4,  };
                                                                //     28  %integer i
_imp_current_line = 28; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 28 "regression-run-tmp/semicomment.imp"
int I;
                                                                //     29  %constinteger one=1, two=2, three=3
_imp_current_line = 29; _imp_current_file = "regression-run-tmp/semicomment.imp";
                                                                //     30  
                                                                //     31  i = sheila(2)
_imp_current_line = 31; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 31 "regression-run-tmp/semicomment.imp"
I = SHEILA[2];
                                                                //     32  
                                                                //     33  lab(':'+one+two-':'):  !    i=9
_imp_current_line = 33; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 33 "regression-run-tmp/semicomment.imp"
sw1_LAB_3:;
                                                                //     34                                          ;! %commc
                                                                //     35                                           ! %ment { here
                                                                //     36  print string("test 0"); newline
_imp_current_line = 36; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 36 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("test 0"));
_imp_current_line = 36; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 36 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     37  print string("If there is output mentioning test 0 above, test 0 passed"); newline
_imp_current_line = 37; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 37 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("If there is output mentioning test 0 above, test 0 passed"));
_imp_current_line = 37; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 37 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     38  
                                                                //     39  %comment %c {}
                                                                //     40  print string("test 1"); newline   ;! The {} after the %c nullifies the continuation.
_imp_current_line = 40; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 40 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("test 1"));
_imp_current_line = 40; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 40 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     41  print string("If there is output mentioning test 1 above, test 1 passed"); newline
_imp_current_line = 41; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 41 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("If there is output mentioning test 1 above, test 1 passed"));
_imp_current_line = 41; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 41 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     42  
                                                                //     43  %comment %c
                                                                //     44  print string("test 2a failed - this is part of the comment above") %and newline; print string("test 2b failed - semicolons should not be honoured in %comments"); newline
                                                                //     45  print string("If there is no output mentioning test 2 above, test2 passed"); newline
_imp_current_line = 45; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 45 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("If there is no output mentioning test 2 above, test2 passed"));
_imp_current_line = 45; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 45 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     46  ! Trailing space below:
                                                                //     47  %comment %c 
                                                                //     48  print string("test 3"); newline
_imp_current_line = 48; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 48 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("test 3"));
_imp_current_line = 48; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 48 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     49  print string("If there is output mentioning test 3 above, test 3 passed"); newline
_imp_current_line = 49; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 49 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("If there is output mentioning test 3 above, test 3 passed"));
_imp_current_line = 49; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 49 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     50  
                                                                //     51  ! Trailing tab below:
                                                                //     52  %comment %c      
                                                                //     53  print string("test 4"); newline
_imp_current_line = 53; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 53 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("test 4"));
_imp_current_line = 53; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 53 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     54  print string("If there is output mentioning test 4 above, test 4 passed"); newline
_imp_current_line = 54; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 54 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("If there is output mentioning test 4 above, test 4 passed"));
_imp_current_line = 54; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 54 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     55  
                                                                //     56  
                                                                //     57  lab(':'+two+two*':'-':'*3): %comment %c
_imp_current_line = 57; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 57 "regression-run-tmp/semicomment.imp"
sw1_LAB_2:;
                                                                //     58  error?
                                                                //     59  
                                                                //     60                                          %comment ' { again
                                                                //     61                                          %comment   { 'again
                                                                //     62                                          %comment   { again } '
                                                                //     63  
                                                                //     64  %comment %c
                                                                //     65  
                                                                //     66  This this part of the comment in Imp77!
                                                                //     67  
                                                                //     68  ! %c
                                                                //     69  print string("Note that %c is not honoured within a '!' comment..."); newline
_imp_current_line = 69; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 69 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("Note that %c is not honoured within a '!' comment..."));
_imp_current_line = 69; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 69 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     70  
                                                                //     71  !  a comment with an unbalanced ' is a problem
                                                                //     72  print string("test 5 passed"); newline
_imp_current_line = 72; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 72 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("test 5 passed"));
_imp_current_line = 72; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 72 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     73  
                                                                //     74  {  a comment with an unbalanced ' is a problem
                                                                //     75  print string("test 6 passed"); newline
_imp_current_line = 75; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 75 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("test 6 passed"));
_imp_current_line = 75; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 75 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     76  
                                                                //     77  {  a comment with an unbalanced ' is a problem }
                                                                //     78  print string("test 7 passed"); newline
_imp_current_line = 78; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 78 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("test 7 passed"));
_imp_current_line = 78; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 78 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     79  
                                                                //     80  %comment  a comment with an unbalanced ' is a problem
                                                                //     81  print string("test 8 passed"); newline
_imp_current_line = 81; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 81 "regression-run-tmp/semicomment.imp"
_imp_PRINTSTRING(_imp_str_literal("test 8 passed"));
_imp_current_line = 81; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 81 "regression-run-tmp/semicomment.imp"
_imp_NEWLINE();
                                                                //     82  
                                                                //     83  lab(*):
_imp_current_line = 83; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 83 "regression-run-tmp/semicomment.imp"
sw1_LAB_default:;
                                                                //     84  !}
                                                                //     85  
                                                                //     86  ! The conclusion from these tests is that "!" or "{" after a label don't need special handling
                                                                //     87  ! but that we should pass "%comment" through untouched
                                                                //     88  
                                                                //     89  ! And that whitespace characters after "%c" are significant.
                                                                //     90  
                                                                //     91  %end{}%of%pro %gram
_imp_current_line = 91; _imp_current_file = "regression-run-tmp/semicomment.imp";
#line 91 "regression-run-tmp/semicomment.imp"
return 0;
sw1_LAB_1:;
sw1_LAB_4:;
goto sw1_LAB_default;
_imp_endofblock: ;
} // End of block _imp_main at level 1
#line 91 "regression-run-tmp/semicomment.imp"
// End of file
