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 c9dea012 authored by di68kap's avatar di68kap
Browse files

EBNF-Beispiel enthält mehr Erklärungen in Form von Kommentaren

parent d92d87d3
......@@ -2447,9 +2447,9 @@ ReprType = Union[str, unrepr]
VALID_DIRECTIVES = {
'comment': r'Regular expression for comments, e.g. /#.*(?:\n|$)/',
'whitespace': r'Regular expression for whitespace, e.g. /\s*/',
'whitespace': r'Regular expression for whitespace or one of: horizontal, linefeed, vertical',
'literalws': 'Controls implicit whitespace adjacent to literals: left, right, both, none',
'ignorecase': 'Controls case-sensitivity: on, off',
'ignorecase': 'Controls case-sensitivity: True, False',
'[preprocessor_]tokens': 'List of the names of all preprocessor tokens',
'disposable': 'List of symbols that shall not be turned into tag-names',
'drop': 'List of tags to be dropped with all their content from the tree, '
......@@ -2783,11 +2783,13 @@ class EBNFCompiler(Compiler):
tt_name = self.grammar_name + '_AST_transformation_table'
transtable = [tt_name + ' = {',
' # AST Transformations for the ' + self.grammar_name + '-grammar',
' "<": flatten,']
' # "<": flatten',
' # "*": replace_by_single_child',
' # ">: []']
for name in self.rules:
transformations = '[]'
transtable.append(' "' + name + '": %s,' % transformations)
transtable += [' "*": replace_by_single_child', '}', '']
transtable += ['}', '']
transtable += [TRANSFORMER_FACTORY.format(NAME=self.grammar_name, ID=self.grammar_id)]
return '\n'.join(transtable)
......
......@@ -6,13 +6,30 @@
#
#######################################################################
@ whitespace = linefeed # implicit whitespace, includes linefeed, but not empty lines
@ literalws = right # literals have implicit whitespace on the right hand side
@ comment = /#.*/ # comments range from a '#'-character to the end of the line
@ ignorecase = False # literals and regular expressions are case-sensitive
# Regular expression for implicit whitespace or one of: horizontal, linefeed, vertical
# Implicit whitespace is denoted by the tilde-character: ~
@ whitespace = linefeed
# Implicit whitespace adjacent to literals: left, right, both, none
# E.g. if @literalws = right then ")" means the same as `)`~
@ literalws = right
# Regular expression for comments, e.g. /#.*(?:\n|$)/
# Use: /(?:\/\/.*)|(?:\/\*(?:.|\n)*?\*\/)/ for C++-style comments: /* ... */ or // to EOL
@ comment = /#.*/
# Case-sensitivity: True, False
@ ignorecase = False
# Tree-simplification while parsing: none, flatten, merge_treetops, merge
@ reduction = flatten # anonymous nodes are being reduced where possible
@ disposable = EOF # EOF is considered a disposable symbol that can also be reduced
@ drop = EOF, whitespace # EOF and insignificant whitespace (tilde) will be dropped
# Tags that may be replaced with their content while parsing
@ disposable = EOF
# Tags that will be dropped with all their content while parsing
# Here, EOF and insignificant whitespace (tilde) will be dropped
@ drop = EOF, whitespace
#######################################################################
......
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