/** @file\r
Generic but simple file parsing routines.\r
\r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
--*/\r
\r
FileName - name of the file to parse\r
\r
Returns:\r
- \r
+\r
\r
--*/\r
{\r
/*++\r
\r
Routine Description:\r
- Get the next token from the input stream. \r
+ Get the next token from the input stream.\r
\r
Arguments:\r
Str - pointer to a copy of the next token\r
FALSE - otherwise\r
\r
Notes:\r
- Preceeding white space is ignored. \r
+ Preceeding white space is ignored.\r
The parser's buffer pointer is advanced past the end of the\r
token.\r
\r
None.\r
\r
Returns:\r
- STATUS_SUCCESS - the file was closed \r
+ STATUS_SUCCESS - the file was closed\r
STATUS_ERROR - no file is currently open\r
\r
--*/\r
Routine Description:\r
\r
Given a source file, open the file and parse it\r
- \r
+\r
Arguments:\r
\r
SourceFile - name of file to parse\r
Returns:\r
\r
Standard status.\r
- \r
+\r
--*/\r
{\r
STATIC UINTN NestDepth = 0;\r
\r
Given a source file that's been opened, read the contents into an internal\r
buffer and pre-process it to remove comments.\r
- \r
+\r
Arguments:\r
\r
SourceFile - structure containing info on the file to process\r
Returns:\r
\r
Standard status.\r
- \r
+\r
--*/\r
{\r
//\r
Routine Description:\r
Preprocess a file to replace all carriage returns with NULLs so\r
we can print lines (as part of error messages) from the file to the screen.\r
- \r
+\r
Arguments:\r
SourceFile - structure that we use to keep track of an input file.\r
\r
Returns:\r
Nothing.\r
- \r
+\r
--*/\r
{\r
BOOLEAN InComment;\r
/*++\r
\r
Routine Description:\r
- Retrieve a quoted-string from the input file. \r
- \r
+ Retrieve a quoted-string from the input file.\r
+\r
Arguments:\r
Str - pointer to a copy of the quoted string parsed\r
Length - size of buffer pointed to by Str\r
TRUE - next token in input stream was a quoted string, and\r
the string value was returned in Str\r
FALSE - otherwise\r
- \r
+\r
--*/\r
{\r
SkipWhiteSpace (&mGlobals.SourceFile);\r
Routine Description:\r
Return TRUE of FALSE to indicate whether or not we've reached the end of the\r
file we're parsing.\r
- \r
+\r
Arguments:\r
NA\r
\r
Returns:\r
TRUE - EOF reached\r
FALSE - otherwise\r
- \r
+\r
--*/\r
{\r
SkipWhiteSpace (&mGlobals.SourceFile);\r