mirror of
https://github.com/Z3Prover/z3
synced 2025-06-06 22:23:22 +00:00
Fixed regular expressions in build scripts to expect cross-platform newlines.
This commit is contained in:
parent
6e1c246454
commit
fc05eb65bd
1 changed files with 5 additions and 3 deletions
|
@ -2592,7 +2592,7 @@ def mk_z3consts_py(api_files):
|
||||||
if Z3PY_SRC_DIR is None:
|
if Z3PY_SRC_DIR is None:
|
||||||
raise MKException("You must invoke set_z3py_dir(path):")
|
raise MKException("You must invoke set_z3py_dir(path):")
|
||||||
|
|
||||||
blank_pat = re.compile("^ *$")
|
blank_pat = re.compile("^ *\r?$")
|
||||||
comment_pat = re.compile("^ *//.*$")
|
comment_pat = re.compile("^ *//.*$")
|
||||||
typedef_pat = re.compile("typedef enum *")
|
typedef_pat = re.compile("typedef enum *")
|
||||||
typedef2_pat = re.compile("typedef enum { *")
|
typedef2_pat = re.compile("typedef enum { *")
|
||||||
|
@ -2654,7 +2654,7 @@ def mk_z3consts_py(api_files):
|
||||||
z3consts.write('\n')
|
z3consts.write('\n')
|
||||||
mode = SEARCHING
|
mode = SEARCHING
|
||||||
elif len(words) <= 2:
|
elif len(words) <= 2:
|
||||||
pass
|
assert False, "Invalid %s, line: %s" % (api_file, linenum)
|
||||||
else:
|
else:
|
||||||
if words[2] != '':
|
if words[2] != '':
|
||||||
if len(words[2]) > 1 and words[2][1] == 'x':
|
if len(words[2]) > 1 and words[2][1] == 'x':
|
||||||
|
@ -2672,7 +2672,7 @@ def mk_z3consts_py(api_files):
|
||||||
|
|
||||||
# Extract enumeration types from z3_api.h, and add .Net definitions
|
# Extract enumeration types from z3_api.h, and add .Net definitions
|
||||||
def mk_z3consts_dotnet(api_files):
|
def mk_z3consts_dotnet(api_files):
|
||||||
blank_pat = re.compile("^ *$")
|
blank_pat = re.compile("^ *\r?$")
|
||||||
comment_pat = re.compile("^ *//.*$")
|
comment_pat = re.compile("^ *//.*$")
|
||||||
typedef_pat = re.compile("typedef enum *")
|
typedef_pat = re.compile("typedef enum *")
|
||||||
typedef2_pat = re.compile("typedef enum { *")
|
typedef2_pat = re.compile("typedef enum { *")
|
||||||
|
@ -2742,6 +2742,8 @@ def mk_z3consts_dotnet(api_files):
|
||||||
z3consts.write(' %s = %s,\n' % (k, i))
|
z3consts.write(' %s = %s,\n' % (k, i))
|
||||||
z3consts.write(' }\n\n')
|
z3consts.write(' }\n\n')
|
||||||
mode = SEARCHING
|
mode = SEARCHING
|
||||||
|
elif len(words) <= 2:
|
||||||
|
assert False, "Invalid %s, line: %s" % (api_file, linenum)
|
||||||
else:
|
else:
|
||||||
if words[2] != '':
|
if words[2] != '':
|
||||||
if len(words[2]) > 1 and words[2][1] == 'x':
|
if len(words[2]) > 1 and words[2][1] == 'x':
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue