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

delayed parsing #125

Merged
merged 3 commits into from
Apr 11, 2024
Merged

delayed parsing #125

merged 3 commits into from
Apr 11, 2024

Conversation

owestphal
Copy link
Member

Alternative zu #119, ohne Wechsel zu Megaparsec

This comment has been minimized.

@owestphal owestphal merged commit e0df94d into master Apr 11, 2024
19 checks passed
@owestphal owestphal deleted the delayed branch April 11, 2024 13:44
delayed = Delayed

parseDelayed :: Delayed a -> Parser a -> Either ParseError a
parseDelayed (Delayed str) p = parse p "(delayed input)" str
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taucht dieses "(delayed input)" dann eigentlich in den anzuzeigenden Fehlermeldungen auf? Für die Studierenden wäre der Begriff sicher verwirrend.

Copy link
Member Author

@owestphal owestphal Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ja tut es. In erster Linie wollte ich damit das Debuggen von Parserfehlern einfacher machen. Kann schon sein, dass das verwirrend ist. Ich denke aber, dass es erkennbar sein sollte, dass der Fehler aus dem verzögerten Parsen entsteht (evtl sogar aus welcher Phase genau, bei mehreren?). Vieleicht ist eine Formulierung besser, die Studierende eher als "neutrales Element" im Fehlerstring lesen. Evtl. "(task-parser-input)" oder "(answer string)"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wahrscheinlich ist "(answer string)" ganz gut.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants