I'm finding Shen's package mechanism to be frustrating to work with when I am editing a file and accidentally introduce a syntax error. Consider this simple file, foo.shen:
\\ Here is a function. It is a good one.
\\ Here is another function. It has a syntax error
This is what I see when I attempt to load it:
Shen, copyright (C) 2010-2015 Mark Tarver
running under Common Lisp, implementation: SBCL
port 1.8 ported by Mark Tarver
(0-) (load "foo.shen")
read error here:
(package foo
[]
\\ Here is a function. It is a
(1-)
In this trivial example, it's easy to find the error by inspection. But, with a large file with many functions, I have no choice but to look at the differences between my edited version and the last good version that I checked into source control. This is an extremely frustrating error reporting/correcting cycle for the Shen programmer to endure.
I suppose the reporting here is because the top-level package form failed to parse. It would be extremely value, however, to instead show the parse error on the failed second function definition rather than backtracking all the way back to the top. What would it take for Shen-YACC to be able to support that?
In a similar vein, has anyone have any examples of tracking line numbers when parsing a file with Shen-YACC for the purpose of error reporting? I have some vague ideas of how I might tackle it, but they are ugly and I'm hoping it's an already-solved problem.
Thanks,
Greg