Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
badw-it
DHParser
Commits
77bad89f
Commit
77bad89f
authored
Jul 10, 2017
by
di68kap
Browse files
- Introduction.md: AST-Transformation vereinfacht
parent
faab5240
Changes
1
Hide whitespace changes
Inline
Side-by-side
Introduction.md
View file @
77bad89f
...
...
@@ -342,10 +342,7 @@ the AST section, you'll see something like this:
# AST Transformations for the Lyrik-grammar
"+": remove_empty,
"bibliographisches": [remove_parser('NZ'), remove_tokens],
"autor": [],
"werk": [],
"untertitel": [],
"ort": [],
"autor, werk, untertitel, ort": [],
"jahr": [reduce_single_child],
"wortfolge": [flatten(has_name('WORT'), recursive=False), remove_last(is_whitespace), collapse],
"namenfolge": [flatten(has_name('NAME'), recursive=False), remove_last(is_whitespace), collapse],
...
...
@@ -353,13 +350,10 @@ the AST section, you'll see something like this:
"ziel": reduce_single_child,
"gedicht, strophe, text": [flatten, remove_parser('LEERZEILE'), remove_parser('NZ')],
"titel, serie": [flatten, remove_parser('LEERZEILE'), remove_parser('NZ'), collapse],
"zeile": [],
"vers": collapse,
"WORT": [],
"NAME": [],
"zeile": [],
"ZEICHENFOLGE, NZ, JAHRESZAHL": reduce_single_child,
"LEERZEILE": [],
"ENDE": [],
"WORT, NAME, LEERZEILE, ENDE": [],
":Whitespace": replace_content(lambda node : " "),
":Token, :RE": reduce_single_child,
"*": replace_by_single_child
...
...
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