Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
badw-it
DHParser
Commits
e64661d8
Commit
e64661d8
authored
Jan 09, 2018
by
eckhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- general TODO-List extended
parent
7a65086b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
TODO.md
TODO.md
+28
-2
No files found.
TODO.md
View file @
e64661d8
General TODO-Lis
t
=================
Ideas for further developmen
t
=================
============
Readability of Code
...
...
@@ -50,3 +50,29 @@ Challenges:
Some parsers cannot profit from the optimization. For example variable
delimiters, otherwise as all delimiters a good candidate for discarding
cannot be discarded any more.
Debugging
---------
Supplement the History-Recording functionality of DHParser with a tracing
debugger, i.e. a debugger that allows to trace particular parsers:
-
Add a tracing parser class that - like the Forward-Parser-class - "contains"
another parser without its calls being run through the parser guard, but
that records every call of the parser and its results, e.g. to trace the
`option`
-parser from the ebnf-parser (see DHParser/ebnf.py) you'd write:
`option = Trace(Series(Token("["), expression, Token("]"), mandatory=1))`
-
For the ebnf-representation a tracing-prefix could be added, say
`?`
, e.g.
`option = ?("[" §expression "]")`
or, alternatively,
`?option = "[" §expression "]"`
-
Another Alternative would be to add an EBNF-compiler directive, say
`@ trace`
,
so one could write
`@ trace = option`
at the beginning of the EBNF-code.
*
disadvantage: only parsers represented by symobols can be traced
(can always be circumvented by introducing further symbols.)
*
advantages: less clutter in the EBNF-code and easier to swith between
debugging and production code by simply commenting out the
trace-statements at the beginning.
\ No newline at end of file
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