Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

Parser Error Reporting Does Not Support Label Errors #4

@joebobmiles

Description

@joebobmiles

I'm leaving this as a note to myself of where I'm leaving off with this project.

Currently the error reporting mechanism for the parser only supports token or parse errors, where all the information for the error can be relayed through a combination of an error message string and/or the token type name.

With the introduction of labels, this no longer holds true. Because we could encounter previously undeclared label, our model of simply passing combining the string and the token type name doesn't work. This is because the undeclared label could be a valid label and also not violate the parser rules. A hack would be to sprintf() the error message string before passing it to the error generator. It would work, but at that point the error may as well be generated in place as opposed to using the existing error generator.

I'm keen on re-writing the error generator as more of an error logger that accepts an error and adds it to the error stack that gets unwound at the end of parsing the program.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions