Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
OpenGEODE
Commits
e728ee23
Commit
e728ee23
authored
Feb 06, 2019
by
Maxime Perrotin
Browse files
Check presence of ASN.1 files in the parser
parent
2a423516
Changes
1
Hide whitespace changes
Inline
Side-by-side
opengeode/ogParser.py
View file @
e728ee23
...
...
@@ -3156,7 +3156,15 @@ def system_definition(root, parent):
str
(
child
.
type
))
if
asn1_files
:
system
.
ast
.
asn1Modules
=
DV
.
asn1Modules
system
.
ast
.
asn1_filenames
=
asn1_files
system
.
ast
.
asn1_filenames
=
[]
for
each
in
asn1_files
:
# check presence of ASN.1 file and store absolute path
# so that further parsing is insensitive to os.chdir calls
if
not
os
.
path
.
isfile
(
each
):
errors
.
append
(
"File not found: "
+
each
)
else
:
system
.
ast
.
asn1_filenames
.
append
(
os
.
path
.
abspath
(
each
))
#system.ast.asn1_filenames = asn1_files
for
each
in
signals
:
sig
,
err
,
warn
=
signal
(
each
)
errors
.
extend
(
err
)
...
...
@@ -4816,7 +4824,11 @@ def pr_file(root):
entities
=
[]
if
clause
.
type
==
lexer
.
ASN1
:
asn1_filename
=
clause
.
getChild
(
0
).
text
[
1
:
-
1
]
ast
.
asn1_filenames
.
append
(
asn1_filename
)
if
not
os
.
path
.
isfile
(
asn1_filename
):
errors
.
append
(
"File not found: "
+
asn1_filename
)
else
:
ast
.
asn1_filenames
.
append
(
os
.
path
.
abspath
(
asn1_filename
))
#ast.asn1_filenames.append(asn1_filename)
else
:
entities
.
append
(
clause
.
text
)
if
len
(
entities
)
==
1
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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