# Import Modules\r
#\r
\r
+from __future__ import print_function\r
import re\r
import Common.LongFilePathOs as os\r
import sys\r
\r
def PrintFragments(self):\r
\r
- print '################# ' + self.FileName + '#####################'\r
+ print('################# ' + self.FileName + '#####################')\r
\r
- print '/****************************************/'\r
- print '/*************** COMMENTS ***************/'\r
- print '/****************************************/'\r
+ print('/****************************************/')\r
+ print('/*************** COMMENTS ***************/')\r
+ print('/****************************************/')\r
for comment in FileProfile.CommentList:\r
- print str(comment.StartPos) + comment.Content\r
+ print(str(comment.StartPos) + comment.Content)\r
\r
- print '/****************************************/'\r
- print '/********* PREPROCESS DIRECTIVES ********/'\r
- print '/****************************************/'\r
+ print('/****************************************/')\r
+ print('/********* PREPROCESS DIRECTIVES ********/')\r
+ print('/****************************************/')\r
for pp in FileProfile.PPDirectiveList:\r
- print str(pp.StartPos) + pp.Content\r
+ print(str(pp.StartPos) + pp.Content)\r
\r
- print '/****************************************/'\r
- print '/********* VARIABLE DECLARATIONS ********/'\r
- print '/****************************************/'\r
+ print('/****************************************/')\r
+ print('/********* VARIABLE DECLARATIONS ********/')\r
+ print('/****************************************/')\r
for var in FileProfile.VariableDeclarationList:\r
- print str(var.StartPos) + var.Modifier + ' '+ var.Declarator\r
+ print(str(var.StartPos) + var.Modifier + ' '+ var.Declarator)\r
\r
- print '/****************************************/'\r
- print '/********* FUNCTION DEFINITIONS *********/'\r
- print '/****************************************/'\r
+ print('/****************************************/')\r
+ print('/********* FUNCTION DEFINITIONS *********/')\r
+ print('/****************************************/')\r
for func in FileProfile.FunctionDefinitionList:\r
- print str(func.StartPos) + func.Modifier + ' '+ func.Declarator + ' ' + str(func.NamePos)\r
+ print(str(func.StartPos) + func.Modifier + ' '+ func.Declarator + ' ' + str(func.NamePos))\r
\r
- print '/****************************************/'\r
- print '/************ ENUMERATIONS **************/'\r
- print '/****************************************/'\r
+ print('/****************************************/')\r
+ print('/************ ENUMERATIONS **************/')\r
+ print('/****************************************/')\r
for enum in FileProfile.EnumerationDefinitionList:\r
- print str(enum.StartPos) + enum.Content\r
+ print(str(enum.StartPos) + enum.Content)\r
\r
- print '/****************************************/'\r
- print '/*********** STRUCTS/UNIONS *************/'\r
- print '/****************************************/'\r
+ print('/****************************************/')\r
+ print('/*********** STRUCTS/UNIONS *************/')\r
+ print('/****************************************/')\r
for su in FileProfile.StructUnionDefinitionList:\r
- print str(su.StartPos) + su.Content\r
+ print(str(su.StartPos) + su.Content)\r
\r
- print '/****************************************/'\r
- print '/********* PREDICATE EXPRESSIONS ********/'\r
- print '/****************************************/'\r
+ print('/****************************************/')\r
+ print('/********* PREDICATE EXPRESSIONS ********/')\r
+ print('/****************************************/')\r
for predexp in FileProfile.PredicateExpressionList:\r
- print str(predexp.StartPos) + predexp.Content\r
+ print(str(predexp.StartPos) + predexp.Content)\r
\r
- print '/****************************************/' \r
- print '/************** TYPEDEFS ****************/'\r
- print '/****************************************/'\r
+ print('/****************************************/')\r
+ print('/************** TYPEDEFS ****************/')\r
+ print('/****************************************/')\r
for typedef in FileProfile.TypedefDefinitionList:\r
- print str(typedef.StartPos) + typedef.ToType\r
+ print(str(typedef.StartPos) + typedef.ToType)\r
\r
if __name__ == "__main__":\r
\r
collector = CodeFragmentCollector(sys.argv[1])\r
collector.PreprocessFile()\r
- print "For Test."\r
+ print("For Test.")\r