Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit a7c3bfda authored by eckhart's avatar eckhart
Browse files

- parser.py Grammar.static_analysis_pending__ made cython compatible (turned...

- parser.py Grammar.static_analysis_pending__ made cython compatible (turned into a list, because cython cannot write class attrributes for extension types)
parent 05cb32cd
...@@ -167,7 +167,7 @@ class EBNFGrammar(Grammar): ...@@ -167,7 +167,7 @@ class EBNFGrammar(Grammar):
""" """
expression = Forward() expression = Forward()
source_hash__ = "82a7c668f86b83f86515078e6c9093ed" source_hash__ = "82a7c668f86b83f86515078e6c9093ed"
static_analysis_pending__ = False static_analysis_pending__ = []
parser_initialization__ = ["upon instantiation"] parser_initialization__ = ["upon instantiation"]
COMMENT__ = r'#.*(?:\n|$)' COMMENT__ = r'#.*(?:\n|$)'
WHITESPACE__ = r'\s*' WHITESPACE__ = r'\s*'
...@@ -835,7 +835,7 @@ class EBNFCompiler(Compiler): ...@@ -835,7 +835,7 @@ class EBNFCompiler(Compiler):
+ ' source file' + ' source file'
+ ('. Grammar:' if self.grammar_source and show_source else '.')] + ('. Grammar:' if self.grammar_source and show_source else '.')]
definitions.append(('parser_initialization__', '["upon instantiation"]')) definitions.append(('parser_initialization__', '["upon instantiation"]'))
definitions.append(('static_analysis_pending__', 'True')) definitions.append(('static_analysis_pending__', '[True]'))
if self.grammar_source: if self.grammar_source:
definitions.append(('source_hash__', definitions.append(('source_hash__',
'"%s"' % md5(self.grammar_source, __version__))) '"%s"' % md5(self.grammar_source, __version__)))
...@@ -921,7 +921,7 @@ class EBNFCompiler(Compiler): ...@@ -921,7 +921,7 @@ class EBNFCompiler(Compiler):
self.grammar_name) self.grammar_name)
_ = grammar_class() _ = grammar_class()
grammar_python_src = grammar_python_src.replace( grammar_python_src = grammar_python_src.replace(
'static_analysis_pending__ = True', 'static_analysis_pending__ = False', 1) 'static_analysis_pending__ = [True]', 'static_analysis_pending__ = []', 1)
except NameError: except NameError:
pass # undefined name in the grammar are already cuaght and reported pass # undefined name in the grammar are already cuaght and reported
except GrammarError as error: except GrammarError as error:
......
...@@ -738,7 +738,7 @@ class Grammar: ...@@ -738,7 +738,7 @@ class Grammar:
# some default values # some default values
# COMMENT__ = r'' # type: str # r'#.*(?:\n|$)' # COMMENT__ = r'' # type: str # r'#.*(?:\n|$)'
# WSP_RE__ = mixin_comment(whitespace=r'[\t ]*', comment=COMMENT__) # type: str # WSP_RE__ = mixin_comment(whitespace=r'[\t ]*', comment=COMMENT__) # type: str
static_analysis_pending__ = True # type: bool static_analysis_pending__ = [True] # type: List[bool]
@classmethod @classmethod
...@@ -805,7 +805,7 @@ class Grammar: ...@@ -805,7 +805,7 @@ class Grammar:
result = self.static_analysis() result = self.static_analysis()
if result: if result:
raise GrammarError(result) raise GrammarError(result)
self.__class__.static_analysis_pending__ = False self.__class__.static_analysis_pending__.pop()
except (NameError, AttributeError): except (NameError, AttributeError):
pass # don't fail the initialization of PLACEHOLDER pass # don't fail the initialization of PLACEHOLDER
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment