#1652: Line numbers in a particular IMCC stack trace are all wrong
--------------------+-------------------------------------------------------
Reporter: moritz | Owner: plobsing
Type: bug | Status: new
Priority: normal | Milestone:
Component: imcc | Version: 2.4.0
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
--------------------+-------------------------------------------------------
Changes (by plobsing):
* owner: => plobsing
Comment:
There are (at least) 2 things going wrong here:
* line numbers are not being updated properly
* the frame stack is getting confused somewhere
The line number updating is wonky in general because it expects to update
on "^{WS}*" (and a couple other places as a kludge). Lex attempts to match
the *longest* token at the current location. When there is non-whitespace
at the beginning of the line, the beginning of line rule will be zero-
width and won't get executed. The correct handling of this would be to
update the line numbers at EOL, which is guarranteed non-zero width. A
workaround for the time being is to indent all code (except heredocs).
When I indent sections near the include points, I get:
{{{
error:imcc:syntax error, unexpected DOT, expecting $end ('.')
in file 'src/builtins/EnumMap.pir' line 30
included from 'src/gen/builtins.pir' line 98
included from 'src/Perl6/Compiler.pir' line 1
}}}
The line numbers are correct, but associated with the wrong files. I am
still investigating this frame stack corruption.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1652#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets