void PpParse( // PARSE WHEN PREPROCESSING void ) { for(;;) { GetNextToken(); if( CurToken == T_EOF ) break; PrtToken(); } idMangleFini(); }
void CPragma( void ) // PROCESS A PRAGMA { bool check_end = true; SrcFileGuardStateSig(); CompFlags.in_pragma = 1; NextToken(); if( PragRecog( "include_alias" ) ) { pragIncludeAlias(); } else if( CompFlags.cpp_output ) { PPCTL_ENABLE_MACROS(); fprintf( CppFile, "#pragma " ); for( ; CurToken != T_NULL; ) { PrtToken(); GetNextToken(); } PPCTL_DISABLE_MACROS(); } else if( IS_ID_OR_KEYWORD( CurToken ) ) { if( PragIdRecog( "on" ) ) { pragFlag( true ); } else if( PragIdRecog( "off" ) ) { pragFlag( false ); } else if( PragIdRecog( "aux" ) || PragIdRecog( "linkage" ) ) { PragAux(); } else if( PragIdRecog( "library" ) ) { pragLibs(); } else if( PragIdRecog( "once" ) ) { pragOnce(); } else if( PragIdRecog( "extref" ) ) { pragExtRef(); } else if( PragIdRecog( "comment" ) ) { pragComment(); } else if( PragIdRecog( "pack" ) ) { pragPack(); } else if( PragIdRecog( "warning" ) ) { if( pragWarning() ) { /* ignore #pragma warning */ check_end = false; /* skip rest of line */ } } else if( PragIdRecog( "enable_message" ) ) { pragEnableMessage(); } else if( PragIdRecog( "disable_message" ) ) { pragDisableMessage(); } else if( PragIdRecog( "code_seg" ) ) { pragCodeSeg(); } else if( PragIdRecog( "data_seg" ) ) { pragDataSeg(); } else if( PragIdRecog( "initialize" ) ) { pragInitialize(); } else if( PragIdRecog( "init_seg" ) ) { pragInitSeg(); } else if( PragIdRecog( "inline_depth" ) ) { pragInlineDepth(); } else if( PragIdRecog( "template_depth" ) ) { pragTemplateDepth(); } else if( PragIdRecog( "inline_recursion" ) ) { pragInlineRecursion(); } else if( PragIdRecog( "intrinsic" ) ) { pragIntrinsic( true ); } else if( PragIdRecog( "function" ) ) { pragIntrinsic( false ); } else if( PragIdRecog( "destruct" ) ) { pragDestruct(); } else if( PragIdRecog( "enum" ) ) { pragEnum(); } else if( PragIdRecog( "dump_object_model" ) ) { pragDumpObjectModel(); } else if( startPragRecog( "read_only_file" ) ) { pragReadOnlyFile(); } else if( startPragRecog( "read_only_directory" ) ) { pragReadOnlyDir(); } else if( PragIdRecog( "include_alias" ) ) { pragIncludeAlias(); } else if( PragIdRecog( "message" ) ) { pragMessage(); } else if( PragIdRecog( "error" ) ) { pragError(); #ifndef NDEBUG } else if( PragIdRecog( "break" ) ) { pragBreak(); #endif } else { /* unknown pragma */ check_end = false; /* skip rest of line */ } } else { /* unknown pragma */ check_end = false; /* skip rest of line */ } if( check_end ) { endOfPragma(); } CompFlags.in_pragma = 0; }