Розробка програми-препроцесора, що виконує розбір тексту (Звіт з лабораторної роботи № 8), страница 5

            if (operandcount[opcode])

            if (parsetyp!=PT_WORD)

               {

                 printf("\nLine %d",number);

             printf(":Must comand not reguest an operands");

             exit(0);

             }

               if (0>(op1num=findstr(registers,lexbuf)))

                  {

                     printf("\nline %d",number);

                 printf(":Undefiner symbol %s",lexbuf);

                 exit(0);

                   }

             if (operandcount[opcode]==1)

                  {

                   if (opcode==OP_DEC)

                          op1num=op1num+8;

                    if (flag)

                    {

                     fprintf(F1,"\t%10i               \t%-s",number,cmdbuf);

                     flag=0;

                     if ((index > 0) && (index < macrotab[cmdidx].str_count))

                     {

                      cmdbuf[0]=0;

                      goto ifgets;

                     }

                   goto begin;

                  }

                   fprintf(F3,cmdbuf);

                   fprintf(F1,"\t%10i %6.4X  %s%c     \t%-s",number,offs,mnem[opcode],cop2[op1num],cmdbuf);

                   offs++;

                   if ((index > 0) && (index < macrotab[cmdidx].str_count))

                   {

                      cmdbuf[0]=0;

                      goto macrogets;

                   }

                   goto begin;

              }

                  parsep=parse(lexbuf,parsep);

                  if (operandcount[opcode]==1)

               if (parsetyp==PT_WORD)

                     {

                        printf("\nLine%d",number);

                  printf(":The command must be have one operand");

                  exit(0);

                 }

              if (parsetyp)

               {

                if (lexbuf[0]!=',')

               {

                     printf("\nline %d",number);

                     printf(":must be ','");

                     exit(0);

                }

                     parsep=parse(lexbuf,parsep);

                     if (operandcount[opcode==2])

                      if (parsetyp!=PT_WORD)

                       {

                         printf("\nline %d",number);

                         printf(":must comand delimited one operand ");

                         exit(0);

                   }

                  }

                   if (0>(op2num=findstr(registers,lexbuf)))

                        {

                          if (strtoi(lexbuf,&n))

                          {

                           if (0 > (op2num=find_sym(lexbuf)))

                           {

                             printf("\nline %d",number);

                             printf(":Undefiner symbol '%s'",lexbuf);

                             exit(0);

                            }

                            else

                            {

                              if (flag)

                                  {

                                     fprintf(F1,"\t%10i               \t%-s",number,cmdbuf);

                                     flag=0;

                                     if ((index > 0) && (index < macrotab[cmdidx].str_count))

                                     {

                                      cmdbuf[0]=0;

                                      goto ifgets;

                                     }

                                     goto begin;

                                   }

                               fprintf(F3,cmdbuf);

                               fprintf(F1,"\t%10i %6.4X  %s %4.4Xr  \t%-s",number,offs,mnem[opcode],symtab[op2num].ef_adr,cmdbuf);

                               offs=offs+operandcount[opcode];

                               if ((index > 0) && (index < macrotab[cmdidx].str_count))