Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
H
hostCompiledSimulation
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
hostCompiledSimulation
Commits
00a7f918
Commit
00a7f918
authored
May 28, 2014
by
Gaurav Kukreja
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Indentation in AliasFile.py, verified working.
parent
37eafe49
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
AliasFile.py
ir2c/src/AliasFile.py
+23
-23
No files found.
ir2c/src/AliasFile.py
View file @
00a7f918
...
...
@@ -4,30 +4,30 @@ import fn
def
process
(
sourceFile
,
fnHash
):
f
=
open
(
sourceFile
+
'.055t.alias'
);
#'.t29.alias1');
line
=
f
.
readline
();
re_fnStart
=
re
.
compile
(
';; Function'
);
re_word
=
re
.
compile
(
'
\
w+'
);
re_varStart
=
re
.
compile
(
'Referenced variables in '
);
re_varLine
=
re
.
compile
(
'Variable:'
);
re_getVar
=
re
.
compile
(
'Variable: |, |
\n
'
);
var_read
=
0
while
line
:
f
=
open
(
sourceFile
+
'.055t.alias'
);
#'.t29.alias1');
line
=
f
.
readline
();
re_fnStart
=
re
.
compile
(
';; Function'
);
re_word
=
re
.
compile
(
'
\
w+'
);
re_varStart
=
re
.
compile
(
'Referenced variables in '
);
re_varLine
=
re
.
compile
(
'Variable:'
);
re_getVar
=
re
.
compile
(
'Variable: |, |
\n
'
);
var_read
=
0
while
line
:
if
re_fnStart
.
match
(
line
):
m
=
re_word
.
findall
(
line
);
fnName
=
m
[
1
];
fnHash
[
fnName
]
=
fn
.
Function
(
fnName
);
#print fnName; #############debugging
m
=
re_word
.
findall
(
line
);
fnName
=
m
[
1
];
fnHash
[
fnName
]
=
fn
.
Function
(
fnName
);
#print fnName; #############debugging
if
var_read
==
1
:
if
re_varLine
.
match
(
line
):
m
=
re_getVar
.
split
(
line
);
m
[
3
]
=
re
.
sub
(
r'\{.*\}'
,
''
,
m
[
3
]);
fnHash
[
fnName
]
.
addVar
(
m
[
1
]
.
strip
(),
m
[
3
]
.
strip
());
elif
line
.
strip
():
var_read
=
0
;
if
re_varLine
.
match
(
line
):
m
=
re_getVar
.
split
(
line
);
m
[
3
]
=
re
.
sub
(
r'\{.*\}'
,
''
,
m
[
3
]);
fnHash
[
fnName
]
.
addVar
(
m
[
1
]
.
strip
(),
m
[
3
]
.
strip
());
elif
line
.
strip
():
var_read
=
0
;
if
re_varStart
.
match
(
line
):
var_read
=
1
;
line
=
f
.
readline
();
f
.
close
();
return
1
;
var_read
=
1
;
line
=
f
.
readline
();
f
.
close
();
return
1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment