Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
DHParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
badw-it
DHParser
Commits
96d20898
Commit
96d20898
authored
Feb 18, 2019
by
di68kap
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- DHParser/parse.py ParserError Better string representation
parent
33f3e221
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
DHParser/parse.py
DHParser/parse.py
+3
-0
dhparser.py
dhparser.py
+2
-1
No files found.
DHParser/parse.py
View file @
96d20898
...
...
@@ -117,6 +117,9 @@ class ParserError(Exception):
self
.
rest
=
rest
# type: StringView
self
.
first_throw
=
first_throw
# type: bool
def
__str__
(
self
):
return
"%i: %s %s"
%
(
self
.
node
.
pos
,
self
.
rest
[:
25
],
repr
(
self
.
node
))
ResumeList
=
List
[
Union
[
str
,
Any
]]
# list of strings or regular expressiones
...
...
dhparser.py
View file @
96d20898
...
...
@@ -146,7 +146,8 @@ def recompile_grammar(grammar_src, force):
testing.create_test_templates(grammar_src, grammar_tests_dir)
with DHParser.log.logging(LOGGING):
# recompiles Grammar only if it has changed
if not dsl.recompile_grammar(grammar_src, force=force):
if not dsl.recompile_grammar(grammar_src, force=force,
notify=lambda: print('recompiling ' + grammar_src)):
print('\nErrors while recompiling "%s":' % grammar_src +
'\n--------------------------------------\n\n')
with open('{name}_ebnf_ERRORS.txt') as f:
...
...
Write
Preview
Markdown
is supported
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