Lines Matching +full:sync +full:- +full:token

3  * Module Name: prscan - Preprocessor start-up and file scan module
11 * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
108 * any of its subsidiaries will export/re-export any technical data, process,
130 * 3. Neither the names of the above-listed copyright holders nor the names
256 #define ASL_DIRECTIVE_NOT_FOUND -1
291 * initialization and re-initialization between compiles during
340 while ((AslGbl_DefineList) && (!AslGbl_DefineList->Persist)) in PrTerminatePreprocessor()
343 AslGbl_DefineList = DefineInfo->Next; in PrTerminatePreprocessor()
345 ACPI_FREE (DefineInfo->Replacement); in PrTerminatePreprocessor()
346 ACPI_FREE (DefineInfo->Identifier); in PrTerminatePreprocessor()
414 * DESCRIPTION: Preprocess one entire file, line-by-line.
427 char *Token; in PrPreprocessInputFile() local
437 /* Scan source line-by-line and process directives. Then write the .i file */ in PrPreprocessInputFile()
452 Token = PrGetNextToken (AslGbl_MainTokenBuffer, PR_TOKEN_SEPARATORS, &Next); in PrPreprocessInputFile()
457 if (Token && (*Token == '#')) in PrPreprocessInputFile()
459 if (strlen (Token) == 1) in PrPreprocessInputFile()
461 Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, &Next); in PrPreprocessInputFile()
465 Token++; /* Skip leading # */ in PrPreprocessInputFile()
470 PrDoDirective (Token, &Next); in PrPreprocessInputFile()
486 while (Token) in PrPreprocessInputFile()
488 DefineInfo = PrMatchDefine (Token); in PrPreprocessInputFile()
491 if (DefineInfo->Body) in PrPreprocessInputFile()
496 "Matched Macro: %s->%s\n", in PrPreprocessInputFile()
497 AslGbl_CurrentLineNumber, DefineInfo->Identifier, in PrPreprocessInputFile()
498 DefineInfo->Replacement); in PrPreprocessInputFile()
500 PrDoMacroInvocation (AslGbl_MainTokenBuffer, Token, in PrPreprocessInputFile()
505 ReplaceString = DefineInfo->Replacement; in PrPreprocessInputFile()
509 TokenOffset = Token - AslGbl_MainTokenBuffer + OffsetAdjust; in PrPreprocessInputFile()
511 &AslGbl_CurrentLineBuffer[TokenOffset], strlen (Token), in PrPreprocessInputFile()
516 OffsetAdjust += strlen (ReplaceString) - strlen (Token); in PrPreprocessInputFile()
519 "Matched #define: %s->%s\n", in PrPreprocessInputFile()
520 AslGbl_CurrentLineNumber, Token, in PrPreprocessInputFile()
525 Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, &Next); in PrPreprocessInputFile()
546 * PARAMETERS: Directive - Pointer to directive name token
547 * Next - "Next" buffer from GetNextToken
560 char *Token = AslGbl_MainTokenBuffer; in PrDoDirective() local
589 * so that error/warning messages are kept in sync with the in PrDoDirective()
609 AslGbl_DirectiveStack->IgnoringThisCodeBlock) in PrDoDirective()
641 /* Not executing the ELSE part -- all done here */ in PrDoDirective()
680 Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, Next); in PrDoDirective()
681 if (!Token) in PrDoDirective()
710 PrPushDirective (Directive, Token); in PrDoDirective()
730 TokenOffset = Token - AslGbl_MainTokenBuffer; in PrDoDirective()
735 &AslGbl_CurrentLineBuffer[TokenOffset-1], &Value); in PrDoDirective()
741 PrPushDirective (Directive, Token); in PrDoDirective()
755 PrPushDirective (Directive, Token); in PrDoDirective()
756 if (!PrMatchDefine (Token)) in PrDoDirective()
766 PrPushDirective (Directive, Token); in PrDoDirective()
767 if (PrMatchDefine (Token)) in PrDoDirective()
780 TokenOffset = Token - AslGbl_MainTokenBuffer + strlen (Token); in PrDoDirective()
786 "%s ERROR - line %u: #define macros are not supported yet\n", in PrDoDirective()
790 PrAddMacro (Token, Next); in PrDoDirective()
827 "New #define: %s->%s\n", in PrDoDirective()
828 AslGbl_LogicalLineNumber, Token, Token2); in PrDoDirective()
830 PrAddDefine (Token, Token2, FALSE); in PrDoDirective()
839 THIS_TOKEN_OFFSET (Token)); in PrDoDirective()
848 Token = PrGetNextToken (NULL, " \"<>", Next); in PrDoDirective()
849 if (!Token) in PrDoDirective()
856 Token); in PrDoDirective()
858 PrDoIncludeFile (Token); in PrDoDirective()
863 Token = PrGetNextToken (NULL, " \"<>", Next); in PrDoDirective()
864 if (!Token) in PrDoDirective()
877 AslGbl_CurrentLineNumber, Token, Token2); in PrDoDirective()
879 PrDoIncludeBuffer (Token, Token2); in PrDoDirective()
884 TokenOffset = Token - AslGbl_MainTokenBuffer; in PrDoDirective()
887 &AslGbl_CurrentLineBuffer[TokenOffset-1], &Value); in PrDoDirective()
895 Token); in PrDoDirective()
907 if (!strcmp (Token, "disable")) in PrDoDirective()
909 Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, Next); in PrDoDirective()
910 if (!Token) in PrDoDirective()
915 TokenOffset = Token - AslGbl_MainTokenBuffer; in PrDoDirective()
918 else if (!strcmp (Token, "message")) in PrDoDirective()
920 Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, Next); in PrDoDirective()
921 if (!Token) in PrDoDirective()
926 TokenOffset = Token - AslGbl_MainTokenBuffer; in PrDoDirective()
932 THIS_TOKEN_OFFSET (Token)); in PrDoDirective()
941 "#undef: %s\n", AslGbl_CurrentLineNumber, Token); in PrDoDirective()
943 PrRemoveDefine (Token); in PrDoDirective()
949 THIS_TOKEN_OFFSET (Token)); in PrDoDirective()
978 * PARAMETERS: Handle - Open file handle for the source file
981 * AE_OK - Normal line, OK status
982 * ASL_IGNORE_LINE - Line is blank or part of a multi-line
984 * ASL_EOF - End-of-file reached
1052 /* Check for multi-line comment start */ in PrGetNextLine()
1059 /* Check for single-line comment start */ in PrGetNextLine()
1084 /* Check for multi-line comment end */ in PrGetNextLine()
1102 /* Always exit on end-of-line */ in PrGetNextLine()
1106 /* Handle multi-line comments */ in PrGetNextLine()
1113 /* End of single-line comment */ in PrGetNextLine()
1138 * PARAMETERS: Directive - Pointer to directive name token
1140 * RETURN: Index into command array, -1 if not found
1174 * PARAMETERS: Directive - Encoded directive ID
1175 * Argument - String containing argument to the
1200 Info->Next = AslGbl_DirectiveStack; in PrPushDirective()
1201 Info->Directive = Directive; in PrPushDirective()
1202 Info->IgnoringThisCodeBlock = AslGbl_IgnoringThisCodeBlock; in PrPushDirective()
1203 AcpiUtSafeStrncpy (Info->Argument, Argument, MAX_ARGUMENT_LENGTH); in PrPushDirective()
1206 "Pr(%.4u) - [%u %s] %*s Pushed [#%s %s]: IgnoreFlag = %s\n", in PrPushDirective()
1251 /* Pop one item, keep globals up-to-date */ in PrPopDirective()
1253 AslGbl_IfDepth--; in PrPopDirective()
1254 AslGbl_IgnoringThisCodeBlock = Info->IgnoringThisCodeBlock; in PrPopDirective()
1255 AslGbl_DirectiveStack = Info->Next; in PrPopDirective()
1258 "Pr(%.4u) - [%u %s] %*s Popped [#%s %s]: IgnoreFlag now = %s\n", in PrPopDirective()
1262 AslGbl_DirectiveInfo[Info->Directive].Name, in PrPopDirective()
1263 Info->Argument, AslGbl_IgnoringThisCodeBlock ? "TRUE" : "FALSE"); in PrPopDirective()
1273 * PARAMETERS: Action - Action being performed
1274 * DirectiveName - Directive being processed
1288 DbgPrint (ASL_DEBUG_OUTPUT, "Pr(%.4u) - [%u %s] " in PrDbgPrint()
1301 * PARAMETERS: Pathname - Name of the input file
1324 * PARAMETERS: Pathname - Name of the input binary file
1325 * BufferName - ACPI namepath of the buffer