Commit 10397695 authored by eckhart's avatar eckhart
Browse files

dokuemntation ergänzt

parent c59a4104
......@@ -928,7 +928,25 @@ be accessed via the symbol `COMMENT__`.
Lookahead and Lookbehind
------------------------
Lookahead and lookbehind operators are a convenient way to resolve or rather
avoid ambiguities while at the same time keeping the DSL lean. Assume for
example a simple DSL for writing definitions like:
>>> definitions = '''
... dog := carnivorous quadrupel that barks
... human := featherless biped'''
>>> definition_DSL = '''
... @literalws = right
... definitions = ~ definition { definition } EOF
... definition = definiendum ":=" definiens
... definiendum = word
... definiens = word { word }
... word = /[A-Z]?[a-z]*/
... EOF = /$/ '''
"""
Fail-tolerant Parsing
---------------------
......
@literalws = right
definitions = ~ definition { definition } EOF
definition = definiendum ":=" definiens
definiendum = word
definiens = word { word }
word = /[A-Z]?[a-z]*/
EOF = /$/
......@@ -53,7 +53,7 @@ packages = [
[tool.poetry.dependencies]
python = "^3.5"
regex = { version = "^2.5", optional = true }
regex = { version = "*", optional = true }
cython = { version = "^0.29", optional = true }
......
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