Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
badw-it
DHParser
Commits
619e1bd6
Commit
619e1bd6
authored
Mar 25, 2019
by
di68kap
Browse files
- Fehlerhafte Punkte nach BelegTexten korrigiert. (Leider keine strengen Regeln gegeben.)
parent
30e6dd80
Changes
1
Hide whitespace changes
Inline
Side-by-side
DHParser/parse.py
View file @
619e1bd6
...
...
@@ -1630,7 +1630,7 @@ def mandatory_violation(grammar: Grammar,
needed by the AllOf- as well as the Series-parser.
:param grammar: the grammar
:param text_: the point, where the mandatory vi
al
oation. As usual the
:param text_: the point, where the mandatory vio
l
ation. As usual the
string view represents the remaining text from this point.
:param failed_on_lookahead: True if the violating parser was a
Lookahead-Parser.
...
...
@@ -1650,7 +1650,7 @@ def mandatory_violation(grammar: Grammar,
i
=
reloc
if
reloc
>=
0
else
0
location
=
grammar
.
document_length__
-
len
(
text_
)
err_node
=
Node
(
ZOMBIE_TAG
,
text_
[:
i
]).
with_pos
(
location
)
found
=
text_
[:
10
].
replace
(
'
\n
'
,
'
\\
n '
)
found
=
text_
[:
10
].
replace
(
'
\n
'
,
'
\\
n '
)
+
'...'
for
search
,
message
in
err_msgs
:
rxs
=
not
isinstance
(
search
,
str
)
if
rxs
and
text_
.
match
(
search
)
or
(
not
rxs
and
text_
.
startswith
(
search
)):
...
...
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