Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
badw-it
DHParser
Commits
e3dd4513
Commit
e3dd4513
authored
Mar 02, 2020
by
di68kap
Browse files
Notationsbeschreibung aktualisiert
parent
5a13d4cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
DHParser/parse.pxd
View file @
e3dd4513
...
...
@@ -28,7 +28,7 @@ cdef class Parser:
# cpdef mixin_comment(whitespace, str)
# cpdef mixin_noempty(whitespace)
# cpdef mixin_no
n
empty(whitespace)
cdef
class
Grammar
:
cdef
dict
__dict__
...
...
DHParser/parse.py
View file @
e3dd4513
...
...
@@ -63,7 +63,7 @@ __all__ = ('ParserError',
'Whitespace'
,
'DropRegExp'
,
'mixin_comment'
,
'mixin_noempty'
,
'mixin_no
n
empty'
,
'MetaParser'
,
'UnaryParser'
,
'NaryParser'
,
...
...
@@ -649,13 +649,13 @@ def mixin_comment(whitespace: str, comment: str) -> str:
return
whitespace
def
mixin_noempty
(
whitespace
:
str
)
->
str
:
def
mixin_no
n
empty
(
whitespace
:
str
)
->
str
:
r
"""
Returns a regular expression pattern that matches only if the regular
expression pattern `whitespace` matches AND if the match is not empty.
If `whitespace`
already
match
es
the empty string '',
then it will be
returned unaltered.
If `whitespace`
does not
match the empty string '',
anyway,
then it will be
returned unaltered.
WARNING: `non_empty_ws` does not work regular expressions the matched
strings of which can be followed by a symbol that can also occur at
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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