|
From: <qh...@us...> - 2010-03-12 09:11:16
|
Revision: 1929
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1929&view=rev
Author: qhuang8
Date: 2010-03-12 09:11:10 +0000 (Fri, 12 Mar 2010)
Log Message:
-----------
Fix two parser related issues:
1. /* start in INF, but left open
2. Allow "//" comment in UNI file #langdef line in UNI files.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/AutoGen/UniClassObject.py
trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
Modified: trunk/BaseTools/Source/Python/AutoGen/UniClassObject.py
===================================================================
--- trunk/BaseTools/Source/Python/AutoGen/UniClassObject.py 2010-03-12 07:53:17 UTC (rev 1928)
+++ trunk/BaseTools/Source/Python/AutoGen/UniClassObject.py 2010-03-12 09:11:10 UTC (rev 1929)
@@ -1,4 +1,4 @@
-# Copyright (c) 2007, Intel Corporation
+# Copyright (c) 2007 - 2010, Intel Corporation
# All rights reserved. This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -193,7 +193,7 @@
# Get Language definition
#
def GetLangDef(self, File, Line):
- Lang = Line.split()
+ Lang = Line.split(u"//")[0].split()
if len(Lang) != 3:
try:
FileIn = codecs.open(File, mode='rb', encoding='utf-16').read()
Modified: trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
===================================================================
--- trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2010-03-12 07:53:17 UTC (rev 1928)
+++ trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2010-03-12 09:11:10 UTC (rev 1929)
@@ -398,6 +398,9 @@
-1,
0
)
+ if IsFindBlockComment:
+ EdkLogger.error("Parser", FORMAT_INVALID, "Open block comments (starting with /*) are expected to end with */",
+ File=self.MetaFile)
self._Done()
## Data parser for the format in which there's path
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|