Skip to content
This repository has been archived by the owner on Oct 18, 2021. It is now read-only.

Context termination is too aggressive #160

Open
SquidDev opened this issue Jun 27, 2019 · 1 comment
Open

Context termination is too aggressive #160

SquidDev opened this issue Jun 27, 2019 · 1 comment
Assignees
Labels
bug Parser Issues/PRs relating to the parser

Comments

@SquidDev
Copy link
Member

Consider the following expression:

( let x = )

This gets converted into the following token stream:

( let x = $end $in )

As a result, we report on an unexpected end of block, rather than an unexpected closing parenthesis. This is because of the termination rules - ) closes the opening (, and so pops all parent contexts.

We need to keep the termination rules in some form - they're easier to manage than explicitly writing every single state transition in the context system. However, I think it's worth reviewing when implicit tokens are inserted, and if they should be inserted at all.

@SquidDev SquidDev added the bug label Jun 27, 2019
@SquidDev SquidDev self-assigned this Jun 27, 2019
@SquidDev
Copy link
Member Author

As a note to myself, see section 15 of the F# specification, which is where much of the context system's ideas come from.

@SquidDev SquidDev reopened this Jul 16, 2019
@plt-amy plt-amy added the Parser Issues/PRs relating to the parser label Oct 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Parser Issues/PRs relating to the parser
Projects
None yet
Development

No branches or pull requests

2 participants