isa_parser.py (11327:1e7b883dffc6) isa_parser.py (11328:9512d2e25f14)
1# Copyright (c) 2014 ARM Limited
2# All rights reserved
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 1039 unchanged lines hidden (view full) ---

1048# Regular expression object to match C++ strings
1049stringRE = re.compile(r'"([^"\\]|\\.)*"')
1050
1051# Regular expression object to match C++ comments
1052# (used in findOperands())
1053commentRE = re.compile(r'(^)?[^\S\n]*/(?:\*(.*?)\*/[^\S\n]*|/[^\n]*)($)?',
1054 re.DOTALL | re.MULTILINE)
1055
1# Copyright (c) 2014 ARM Limited
2# All rights reserved
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 1039 unchanged lines hidden (view full) ---

1048# Regular expression object to match C++ strings
1049stringRE = re.compile(r'"([^"\\]|\\.)*"')
1050
1051# Regular expression object to match C++ comments
1052# (used in findOperands())
1053commentRE = re.compile(r'(^)?[^\S\n]*/(?:\*(.*?)\*/[^\S\n]*|/[^\n]*)($)?',
1054 re.DOTALL | re.MULTILINE)
1055
1056# Regular expression object to match assignment statements
1057# (used in findOperands())
1058assignRE = re.compile(r'\s*=(?!=)', re.MULTILINE)
1056# Regular expression object to match assignment statements (used in
1057# findOperands()). If the code immediately following the first
1058# appearance of the operand matches this regex, then the operand
1059# appears to be on the LHS of an assignment, and is thus a
1060# destination. basically we're looking for an '=' that's not '=='.
1061# The heinous tangle before that handles the case where the operand
1062# has an array subscript.
1063assignRE = re.compile(r'(\[[^\]]+\])?\s*=(?!=)', re.MULTILINE)
1059
1060def makeFlagConstructor(flag_list):
1061 if len(flag_list) == 0:
1062 return ''
1063 # filter out repeated flags
1064 flag_list.sort()
1065 i = 1
1066 while i < len(flag_list):

--- 1361 unchanged lines hidden ---
1064
1065def makeFlagConstructor(flag_list):
1066 if len(flag_list) == 0:
1067 return ''
1068 # filter out repeated flags
1069 flag_list.sort()
1070 i = 1
1071 while i < len(flag_list):

--- 1361 unchanged lines hidden ---