22.1.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 77bad89f authored by di68kap's avatar di68kap

- Introduction.md: AST-Transformation vereinfacht

parent faab5240
......@@ -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
......
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