Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update outer parser endColumn #2546

Merged
merged 5 commits into from
Apr 22, 2022
Merged

Update outer parser endColumn #2546

merged 5 commits into from
Apr 22, 2022

Conversation

radumereuta
Copy link
Contributor

There was an inconsistency between the Outer parser and Inner regarding the position of the last character of a term which created some issues in #2517.
Inner: notice the ^~ extends past the single character pointed by the error message.

[Error] Inner Parser: Parse error: unexpected token '[' following token '('.
	Source(nestedFunctionContextInFun.k)
	Location(8,16,8,17)
	8 |	rule 0 => #fun([[0 => 1]] <bar> 0 </bar>)(0)
	  .	               ^~

Outer:

 [Error] Compiler: Sort X was declared as a token. Productions of this sort...
        Source(tokenCheck.k)
        Location(10,16,10,21)
+       10 |      syntax X ::= fail()
+          .                   ^~~~~~
 [Error] Compiler: Sort Y was declared as a token. Productions of this sort...
        Source(tokenCheck.k)
        Location(13,16,13,16)
+       13 |      syntax Y ::= Z
+          .                   ^

The reasoning behind pointing the end column past the last character is to match with what the editor tells you when you select a piece of text.

@radumereuta radumereuta marked this pull request as ready for review April 18, 2022 17:52
@radumereuta radumereuta self-assigned this Apr 19, 2022
@radumereuta
Copy link
Contributor Author

Check to see if the instructions for installing stack are up to date. (see Docker file)
Bruce: stack was down at one point. Check that also.
Dwight: modify the docker file somewhere to rebuild stack.

@rv-jenkins rv-jenkins merged commit 9f8e454 into master Apr 22, 2022
@rv-jenkins rv-jenkins deleted the outerLocFix branch April 22, 2022 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants