Closed GoogleCodeExporter closed 9 years ago
The error message is certainly supposed to be related to the last file in the
parse list. So - if there is no line 177 in definitions.tll - it is a bug in
the location tracing of the lexer - let's fix it. (need a test case to recreate
it)
It is quite possible that a message is missing here - something like:
"back to <the file where definitions.tll is included from>
I don't like the idea each error message to include complete location: Here is
a small taster how it would look like:
<= "/home/taschi/work/private/toped/user_functions/general/definitions.tll"
line 177: col 29: syntax error, unexpected tknIDENTIFIER, expecting '{'
Hard enough to get the essence of the error message
Bottom line - I need a test case to recreate the problem and to fix the lexer's
tracker.
Original comment by krustev....@gmail.com
on 22 Jan 2012 at 11:56
I remember the error was actually in technology/helper.tll
and I agree, to including the complete path could make the error message quite
long. I had just something in mind like in one of your other error messages
"<= line 56: col 10: in file "general/wires.tll" : variable not defined in this
scope"
but your suggestion would be fine for me as long as the error-position can be
backtracked.
I'll try to create a test-case but as you can see a lot of files are included
-- could take some time.
Original comment by analogc...@gmx.net
on 23 Jan 2012 at 9:59
A missing info line:
Back to "<file name>" ...
is added in r2053.
Armin, would you try it and update this issue accordingly
Original comment by krustev....@gmail.com
on 23 Jan 2012 at 11:29
Original comment by krustev....@gmail.com
on 23 Jan 2012 at 11:30
Attached you will find a test case:
(error can be found in "bug5_tll2.tll")
Before rev2053:
=> #include "bug5.tll"
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc3.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc1.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc2.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc3.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc1.tll" ...
<= line 12: col 27: syntax error, unexpected ')'
error localization doesn't work properly
After rev2053:
=> #include "bug5.tll"
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc3.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc1.tll" ...
<= Back to "/home/xxx/toped/bugs/jan2012/bug5_inc3.tll" ...
<= Back to "/home/xxx/toped/bugs/jan2012/bug5.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc2.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc3.tll" ...
<= Back to "/home/xxx/toped/bugs/jan2012/bug5_inc2.tll" ...
<= Parsing "/home/xxx/toped/bugs/jan2012/bug5_inc1.tll" ...
<= Back to "/home/xxx/toped/bugs/jan2012/bug5_inc2.tll" ...
<= line 12: col 27: syntax error, unexpected ')'
<= Back to "/home/xxx/toped/bugs/jan2012/bug5.tll" ...
Seems, the analyser is working now more "accurate" ..
.. and fixes the issue
Original comment by analogc...@gmx.net
on 25 Jan 2012 at 8:27
Attachments:
Maybe just one more comment on this issue:
Obviously a small bug was involved with this issue which is fixed now. But
maybe this makes the newly introduced "back to .." information unnecessary.
Anyway, it could be valuable in the case of errors for debugging reasons. For
the default behavior the additional lines just blow up the number of messages.
This is my personal opinion .. but I don't mind if you like to have it as it
is now.
Original comment by analogc...@gmx.net
on 25 Jan 2012 at 9:06
Original comment by krustev....@gmail.com
on 1 Apr 2012 at 12:21
Original issue reported on code.google.com by
analogc...@gmx.net
on 20 Jan 2012 at 10:01