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

📄 ibrowser.l

📁 linux 下的源代码分析阅读器 red hat公司新版
💻 L
📖 第 1 页 / 共 2 页
字号:
	BEGIN( INITIAL );    }}^{ws}*{symbolname}{ws}+([Ee][Qq][Uu]){ws}+ {    /* walk over the indentation (if any) */    for ( p = yytext; isspace( *p ); sn_advance_column( 1 ), p++ );    /* remember where equality name starts */    savep = p;    /* walk over the equality name */    for ( ; !isspace( *p ); sn_advance_column( 1 ), p++ );    *p = 0;				/* NULL-terminate equality name	*/    setLower( savep );    sn_insert_symbol( SN_CONS_DEF	/* symbol type			*/	    , NULL			/* class name			*/	    , savep			/* identifier			*/	    , sn_current_file()		/* file name			*/	    , sn_line()			/* start line number		*/	    , sn_column() - strlen( savep )					/* start column number		*/	    , sn_line()			/* end line number		*/	    , sn_column()		/* end column number		*/	    , 0				/* attributes			*/	    , NULL			/* return types			*/	    , NULL			/* argument types		*/	    , NULL			/* argument names		*/	    , NULL			/* comment			*/	    , sn_line()			/* highlighting start line	*/	    , sn_column() - strlen( savep )					/* highlighting start column	*/	    , sn_line()			/* highlighting end line	*/	    , sn_column()		/* highlighting end column	*/	    );    sn_advance_column( yytext + yyleng - p );}^{ws}*({symbolname}":"){ws}*([Dd][BbSsWw]){ws}+	{    /* walk over the indentation (if any) */    for ( p = yytext; isspace( *p ); sn_advance_column( 1 ), p++ );    /* remember where symbol name starts */    savep = p;    /* walk over the symbol name */    for ( ; *p != ':'; sn_advance_column( 1 ), p++ );    *p = 0;				/* NULL-terminate symbol name	*/    setLower( savep );    sn_insert_symbol( SN_GLOB_VAR_DEF	/* symbol type			*/	    , NULL			/* class name			*/	    , savep			/* identifier			*/	    , sn_current_file()		/* file name			*/	    , sn_line()			/* start line number		*/	    , sn_column() - strlen( savep )					/* start column number		*/	    , sn_line()			/* end line number		*/	    , sn_column()		/* end column number		*/	    , 0				/* attributes			*/	    , NULL			/* return types			*/	    , NULL			/* argument types		*/	    , NULL			/* argument names		*/	    , NULL			/* comment			*/	    , sn_line()			/* highlighting start line	*/	    , sn_column() - strlen( savep )					/* highlighting start column	*/	    , sn_line()			/* highlighting end line	*/	    , sn_column()		/* highlighting end column	*/	    );    sn_advance_column( yytext + yyleng - p );}^{ws}*({symbolname}":") {    /* walk over the indentation (if any) */    for ( p = yytext; isspace( *p ); sn_advance_column( 1 ), p++ );    /* remember where symbol name starts */    savep = p;    /* walk over the symbol name */    for ( ; *p != ':'; sn_advance_column( 1 ), p++ );    *p = 0;				/* NULL-terminate symbol name	*/    emit_func_defn();    setLower( savep );    strcpy( last_label.name, savep );    last_label.line = sn_line();    last_label.column = sn_column() - strlen( savep );    last_label.length = strlen( savep );    last_label.flag = 1;    sn_advance_column( yytext + yyleng - p );}(([Aa][CcDdNn])|([Cc][Pp])|([OoXx][Rr])|([Ss][BbUu]))[Ii]{ws}+{symbolname}	{    /* walk over instruction mnemonic */    for ( p = yytext; !isspace( *p ); p++ );    /* walk over the whitespace between the opcode and the operand */    for ( ; isspace( *p ); p++ );    setLower( p );    sn_insert_xref( SN_REF_TO_CONSTANT	/* referenced symbol type	*/	    , SN_FUNC_DEF		/* scope type			*/	    , SN_REF_SCOPE_GLOBAL	/* scope level			*/	    , NULL			/* class name			*/	    , last_label.name		/* calling function name	*/	    , NULL			/* argument types		*/	    , NULL			/* namespace of symbol		*/	    , p				/* referenced symbol		*/	    , NULL			/* referenced argument types	*/	    , sn_current_file()		/* file name			*/	    , sn_line()			/* line number			*/	    , SN_REF_READ		/* access type			*/	    );    sn_advance_column( yyleng );}([Ll]([Dd][Aa])|([Hh][Ll][Dd])){ws}+{symbolname}	{    /* walk over instruction mnemonic */    for ( p = yytext; !isspace( *p ); p++ );    /* walk over the whitespace between the opcode and the operand */    for ( ; isspace( *p ); p++ );    setLower( p );    sn_insert_xref( SN_REF_TO_GLOB_VAR	/* referenced symbol type	*/	    , SN_FUNC_DEF		/* scope type			*/	    , SN_REF_SCOPE_GLOBAL	/* scope level			*/	    , NULL			/* class name			*/	    , last_label.name		/* calling function name	*/	    , NULL			/* argument types		*/	    , NULL			/* namespace of symbol		*/	    , p				/* referenced symbol		*/	    , NULL			/* referenced argument types	*/	    , sn_current_file()		/* file name			*/	    , sn_line()			/* line number			*/	    , SN_REF_READ		/* access type			*/	    );    sn_advance_column( yyleng );}([Ss]([Tt][Aa])|([Hh][Ll][Dd])){ws}+{symbolname}	{    /* walk over instruction mnemonic */    for ( p = yytext; !isspace( *p ); p++ );    /* walk over the whitespace between the opcode and the operand */    for ( ; isspace( *p ); p++ );    setLower( p );    sn_insert_xref( SN_REF_TO_GLOB_VAR	/* referenced symbol type	*/	    , SN_FUNC_DEF		/* scope type			*/	    , SN_REF_SCOPE_GLOBAL	/* scope level			*/	    , NULL			/* class name			*/	    , last_label.name		/* calling function name	*/	    , NULL			/* argument types		*/	    , NULL			/* namespace of symbol		*/	    , p				/* referenced symbol		*/	    , NULL			/* referenced argument types	*/	    , sn_current_file()		/* file name			*/	    , sn_line()			/* line number			*/	    , SN_REF_WRITE		/* access type			*/	    );    sn_advance_column( yyleng );}([Ll][Xx][Ii]){ws}+{allreg16}{ws}*,{ws}*{symbolname}	{    /* walk over instruction mnemonic and register definition */    for ( p = yytext; *p != ','; p++ );    /* walk over the whitespace between the comma and the second operand */    for ( ; isspace( *p ); p++ );    setLower( p );    sn_insert_xref( SN_REF_TO_CONSTANT	/* referenced symbol type	*/	    , SN_FUNC_DEF		/* scope type			*/	    , SN_REF_SCOPE_GLOBAL	/* scope level			*/	    , NULL			/* class name			*/	    , last_label.name		/* calling function name	*/	    , NULL			/* argument types		*/	    , NULL			/* namespace of symbol		*/	    , p				/* referenced symbol		*/	    , NULL			/* referenced argument types	*/	    , sn_current_file()		/* file name			*/	    , sn_line()			/* line number			*/	    , SN_REF_READ		/* access type			*/	    );    sn_advance_column( yyleng );}([Mm][Vv][Ii]){ws}+{allreg8}{ws}*,{ws}*{symbolname}	{    /* walk over instruction mnemonic and register definition */    for ( p = yytext; *p != ','; p++ );    /* walk over the whitespace between the comma and the second operand */    for ( ; isspace( *p ); p++ );    setLower( p );    sn_insert_xref( SN_REF_TO_CONSTANT	/* referenced symbol type	*/	    , SN_FUNC_DEF		/* scope type			*/	    , SN_REF_SCOPE_GLOBAL	/* scope level			*/	    , NULL			/* class name			*/	    , last_label.name		/* calling function name	*/	    , NULL			/* argument types		*/	    , NULL			/* namespace of symbol		*/	    , p				/* referenced symbol		*/	    , NULL			/* referenced argument types	*/	    , sn_current_file()		/* file name			*/	    , sn_line()			/* line number			*/	    , SN_REF_READ		/* access type			*/	    );    sn_advance_column( yyleng );}";".*\n {    /* walk over any spaces after the leading ';' */    for ( p = yytext, p++; isspace( *p ); p++ );    sn_insert_comment( NULL		/* class name			*/	    , last_label.name		/* function name		*/	    , sn_current_file()		/* file name			*/	    , p				/* comment			*/	    , sn_line()			/* start line of comment	*/	    , sn_column()		/* start column of comment	*/	    );    sn_advance_line();    sn_reset_column();}{string}	{      sn_advance_column( yyleng );	/* eat string literals */}.		{      sn_advance_column( yyleng );	/* eat intel8085 code text */}\n		{      sn_advance_line();      sn_reset_column();}%%  voidreset(){      sn_reset_line();      sn_reset_column();}intmain    ( int argc    , char *argv[]    ){      return sn_main( argc, argv, group, &yyin, yylex, reset );}

⌨️ 快捷键说明

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