⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scan.c

📁 SRI international 发布的OAA框架软件
💻 C
📖 第 1 页 / 共 5 页
字号:

static void act97()
{ 
		NLA = 30;
    zzmode(START); zzskip();   
	}


static void act98()
{ 
		NLA = 31;
    zzskip();   
	}


static void act99()
{ 
		NLA = 32;
    zzline++; zzskip(); DAWDLE;   
	}


static void act100()
{ 
		NLA = 33;
    zzskip();   
	}

static unsigned char shift9[257] = {
  0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 3, 5, 5, 4, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 1, 5, 5, 5, 5, 2, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 
  5, 5, 5, 5, 5, 5, 5
};


static void act101()
{ 
		NLA = Eof;
	}


static void act102()
{ 
		NLA = Action;
    /* these do not nest */
    zzmode(START);
    NLATEXT[0] = ' ';
    NLATEXT[1] = ' ';
    zzbegexpr[0] = ' ';
    zzbegexpr[1] = ' ';
    if ( zzbufovf ) {
      err( eMsgd("action buffer overflow; size %d",ZZLEXBUFSIZE));
    }
    
/* MR1	10-Apr-97  MR1  Previously unable to put right shift operator	*/
    /* MR1					in DLG action			*/
    /* MR1			Doesn't matter what kind of action it is - reset*/
    
			      tokenActionActive=0;		 /* MR1 */
	}


static void act103()
{ 
		NLA = Pred;
    /* these do not nest */
    zzmode(START);
    NLATEXT[0] = ' ';
    NLATEXT[1] = ' ';
    zzbegexpr[0] = '\0';
    if ( zzbufovf ) {
      err( eMsgd("predicate buffer overflow; size %d",ZZLEXBUFSIZE));
    };
#ifdef __cplusplus__
    /* MR10 */                    list_apply(CurActionLabels, (void (*)(void *))mark_label_used_in_sem_pred);
#else
#ifdef __STDC__
    /* MR10 */                    list_apply(CurActionLabels, (void (*)(void *))mark_label_used_in_sem_pred);
#else
#ifdef __USE_PROTOS
    /* MRxx */                    list_apply(CurActionLabels, (void (*)(void *))mark_label_used_in_sem_pred);
#else
    /* MR10 */                    list_apply(CurActionLabels,mark_label_used_in_sem_pred);
#endif
#endif
#endif
	}


static void act104()
{ 
		NLA = PassAction;
    if ( topint() == ']' ) {
      popint();
      if ( istackempty() )	/* terminate action */
      {
        zzmode(START);
        NLATEXT[0] = ' ';
        zzbegexpr[0] = ' ';
        if ( zzbufovf ) {
          err( eMsgd("parameter buffer overflow; size %d",ZZLEXBUFSIZE));
        }
      }
      else {
        /* terminate $[..] and #[..] */
        if ( GenCC ) zzreplstr("))");
        else zzreplstr(")");
        zzmore();
      }
    }
    else if ( topint() == '|' ) { /* end of simple [...] */
      popint();
      zzmore();
    }
    else zzmore();
	}


static void act105()
{ 
		NLA = 37;
    
    zzmore();
    zzreplstr(inline_set(zzbegexpr+
    strlen("consumeUntil(")));
	}


static void act106()
{ 
		NLA = 38;
    zzmore();   
	}


static void act107()
{ 
		NLA = 39;
    zzline++; zzmore(); DAWDLE;   
	}


static void act108()
{ 
		NLA = 40;
    zzmore();   
	}


static void act109()
{ 
		NLA = 41;
    zzmore();   
	}


static void act110()
{ 
		NLA = 42;
    if ( !GenCC ) {zzreplstr("zzaRet"); zzmore();}
    else err("$$ use invalid in C++ mode");   
	}


static void act111()
{ 
		NLA = 43;
    if ( !GenCC ) {zzreplstr("zzempty_attr"); zzmore();}
    else err("$[] use invalid in C++ mode");   
	}


static void act112()
{ 
		NLA = 44;
    
    pushint(']');
    if ( !GenCC ) zzreplstr("zzconstr_attr(");
    else err("$[..] use invalid in C++ mode");
    zzmore();
	}


static void act113()
{ 
		NLA = 45;
    {
      static char buf[100];
      numericActionLabel=1;       /* MR10 */
      if ( strlen(zzbegexpr)>(size_t)85 )
      fatal("$i attrib ref too big");
      set_orel(atoi(zzbegexpr+1), &attribsRefdFromAction);
      if ( !GenCC ) sprintf(buf,"zzaArg(zztasp%d,%s)",
      BlkLevel-1,zzbegexpr+1);
      else sprintf(buf,"_t%d%s",
      BlkLevel-1,zzbegexpr+1);
      zzreplstr(buf);
      zzmore();
      UsedOldStyleAttrib = 1;
      if ( UsedNewStyleLabel )
      err("cannot mix old-style $i with new-style labels");
    }
	}


static void act114()
{ 
		NLA = 46;
    {
      static char buf[100];
      numericActionLabel=1;       /* MR10 */
      if ( strlen(zzbegexpr)>(size_t)85 )
      fatal("$i.field attrib ref too big");
      zzbegexpr[strlen(zzbegexpr)-1] = ' ';
      set_orel(atoi(zzbegexpr+1), &attribsRefdFromAction);
      if ( !GenCC ) sprintf(buf,"zzaArg(zztasp%d,%s).",
      BlkLevel-1,zzbegexpr+1);
      else sprintf(buf,"_t%d%s.",
      BlkLevel-1,zzbegexpr+1);
      zzreplstr(buf);
      zzmore();
      UsedOldStyleAttrib = 1;
      if ( UsedNewStyleLabel )
      err("cannot mix old-style $i with new-style labels");
    }
	}


static void act115()
{ 
		NLA = 47;
    {
      static char buf[100];
      static char i[20], j[20];
      char *p,*q;
      numericActionLabel=1;       /* MR10 */
      if (strlen(zzbegexpr)>(size_t)85) fatal("$i.j attrib ref too big");
      for (p=zzbegexpr+1,q= &i[0]; *p!='.'; p++) {
        if ( q == &i[20] )
        fatalFL("i of $i.j attrib ref too big",
        FileStr[CurFile], zzline );
        *q++ = *p;
      }
      *q = '\0';
      for (p++, q= &j[0]; *p!='\0'; p++) {
        if ( q == &j[20] )
        fatalFL("j of $i.j attrib ref too big",
        FileStr[CurFile], zzline );
        *q++ = *p;
      }
      *q = '\0';
      if ( !GenCC ) sprintf(buf,"zzaArg(zztasp%s,%s)",i,j);
      else sprintf(buf,"_t%s%s",i,j);
      zzreplstr(buf);
      zzmore();
      UsedOldStyleAttrib = 1;
      if ( UsedNewStyleLabel )
      err("cannot mix old-style $i with new-style labels");
    }
	}


static void act116()
{ 
		NLA = 48;
    { static char buf[300]; LabelEntry *el;
      zzbegexpr[0] = ' ';
      if ( CurRule != NULL &&
      strcmp(CurRule, &zzbegexpr[1])==0 ) {
        if ( !GenCC ) zzreplstr("zzaRet");
      }
      else if ( CurRetDef != NULL &&
      strmember(CurRetDef, &zzbegexpr[1])) {
        if ( hasMultipleOperands( CurRetDef ) ) {
          require (strlen(zzbegexpr)<=(size_t)285,
          "$retval attrib ref too big");
          sprintf(buf,"_retv.%s",&zzbegexpr[1]);
          zzreplstr(buf);
        }
        else zzreplstr("_retv");
      }
      else if ( CurParmDef != NULL &&
      strmember(CurParmDef, &zzbegexpr[1])) {
      ;
    }
    else if ( Elabel==NULL ) {
    { err("$-variables in actions outside of rules are not allowed"); }
  } else if ( (el=(LabelEntry *)hash_get(Elabel, &zzbegexpr[1]))!=NULL ) {
  /* MR10 */
  /* MR10 */                      /* element labels might exist without an elem when */
  /* MR10 */                      /*  it is a forward reference (to a rule)          */
  /* MR10 */
  /* MR10 */						if ( GenCC && (el->elem == NULL || el->elem->ntype==nRuleRef) )
  /* MR10 */							{ err(eMsg1("There are no token ptrs for rule references: '$%s'",&zzbegexpr[1])); }
  /* MR10 */
  /* MR10 */						if ( !GenCC && (el->elem == NULL || el->elem->ntype==nRuleRef) && GenAST) {
  /* MR10 */                          err("You can no longer use attributes returned by rules when also using ASTs");
  /* MR10 */                          err("   Use upward inheritance (\"rule >[Attrib a] : ... <<$a=...>>\")");
  /* MR10 */                      };
  /* MR10 */
  /* MR10 */                      /* keep track of <<... $label ...>> for semantic predicates in guess mode */
  /* MR10 */                      /* element labels contain pointer to the owners node                      */
  /* MR10 */
  /* MR10 */                      if (el->elem != NULL && el->elem->ntype == nToken) {
  /* MR10 */                        list_add(&CurActionLabels,el);
  /* MR10 */                      };
}
else
warn(eMsg1("$%s not parameter, return value, (defined) element label",&zzbegexpr[1]));
}
zzmore();
	}


static void act117()
{ 
		NLA = 49;
    zzreplstr("(*_root)"); zzmore(); chkGTFlag();   
	}


static void act118()
{ 
		NLA = 50;
    if ( GenCC ) {
      if (NewAST) zzreplstr("(newAST)");
      else zzreplstr("(new AST)");}
    else {zzreplstr("zzastnew()");} zzmore();
    chkGTFlag();
	}


static void act119()
{ 
		NLA = 51;
    zzreplstr("NULL"); zzmore(); chkGTFlag();   
	}


static void act120()
{ 
		NLA = 52;
    {
      static char buf[100];
      if ( strlen(zzbegexpr)>(size_t)85 )
      fatal("#i AST ref too big");
      if ( GenCC ) sprintf(buf,"_ast%d%s",BlkLevel-1,zzbegexpr+1);
      else sprintf(buf,"zzastArg(%s)",zzbegexpr+1);
      zzreplstr(buf);
      zzmore();
      set_orel(atoi(zzbegexpr+1), &AST_nodes_refd_in_actions);
      chkGTFlag();
    }
	}


static void act121()
{ 
		NLA = 53;
    
    zzline = atoi(zzbegexpr+5) - 1; zzline++; zzmore();
    getFileNameFromTheLineInfo(FileStr[CurFile], zzbegexpr);
	}


static void act122()
{ 
		NLA = 54;
    
    zzline++; zzmore();
	}


static void act123()
{ 
		NLA = 55;
    
    if ( !(strcmp(zzbegexpr, "#ifdef")==0 ||
    strcmp(zzbegexpr, "#if")==0 ||
    strcmp(zzbegexpr, "#else")==0 ||
    strcmp(zzbegexpr, "#endif")==0 ||
    strcmp(zzbegexpr, "#ifndef")==0 ||
    strcmp(zzbegexpr, "#define")==0 ||
    strcmp(zzbegexpr, "#pragma")==0 ||
    strcmp(zzbegexpr, "#undef")==0 ||
    strcmp(zzbegexpr, "#import")==0 ||
    strcmp(zzbegexpr, "#line")==0 ||
    strcmp(zzbegexpr, "#include")==0 ||
    strcmp(zzbegexpr, "#error")==0) )
    {
      static char buf[100];
      sprintf(buf, "%s_ast", zzbegexpr+1);
      /* MR27 */						list_add(&CurAstLabelsInActions, mystrdup(zzbegexpr+1));
      zzreplstr(buf);
      chkGTFlag();
    }
    zzmore();
	}


static void act124()
{ 
		NLA = 56;
    
    pushint(']');
    if ( GenCC ) {
      if (NewAST) zzreplstr("(newAST(");
      else zzreplstr("(new AST("); }
    else zzreplstr("zzmk_ast(zzastnew(),");
    zzmore();
    chkGTFlag();
	}


static void act125()
{ 
		NLA = 57;
    
    pushint('}');
    if ( GenCC ) {
      if (tmakeInParser) {
        zzreplstr("tmake(");
      }
      else {
        zzreplstr("ASTBase::tmake(");
      }
    }
    else {
      zzreplstr("zztmake(");
    }
    zzmore();
    chkGTFlag();
	}


static void act126()
{ 
		NLA = 58;
    zzmore();   
	}


static void act127()
{ 
		NLA = 59;
    
    if ( istackempty() )
    zzmore();
    else if ( topint()==')' ) {
      popint();
    }
    else if ( topint()=='}' ) {
      popint();
      /* terminate #(..) */
      zzreplstr(", NULL)");
    }
    zzmore();
	}


static void act128()
{ 
		NLA = 60;
    
    pushint('|');	/* look for '|' to terminate simple [...] */
    zzmore();
	}


static void act129()
{ 
		NLA = 61;
    
    pushint(')');
    zzmore();
	}


static void act130()
{ 
		NLA = 62;
    zzreplstr("]");  zzmore();   
	}


static void act131()
{ 
		NLA = 63;
    zzreplstr(")");  zzmore();   
	}


static void act132()
{ 
		NLA = 64;
    if (! tokenActionActive) zzreplstr(">");	 /* MR1 */
    zzmore();				         /* MR1 */
	}


static void act133()
{ 
		NLA = 65;
    zzmode(ACTION_CHARS); zzmore();  
	}


static void act134()
{ 
		NLA = 66;
    zzmode(ACTION_STRINGS); zzmore();  
	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -