-
-
Notifications
You must be signed in to change notification settings - Fork 373
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
fix parser warnings for semicolons in function arguments #2676
Comments
Stanc3 produces
|
Hi,
I do not know how hard might be to catch this error, but in any case I also leave the comment here for future reference. EDIT: |
Stanc3 says the following on @bob-carpenter 's example model (top):
and the following for @csetraynor 's model:
after which we can add the missing semi-colon to get the following error:
Are these considered informative enough? It's sometimes hard to give a very informative error, like in the last case, because that parse rule appears in many different contexts (meaning it's hard to give an error message that is not entirely generic). Of course, it's possible to many the grammar more complicated to get more specific error messages, but it's a matter of weighing cost and benefit then. (The reason this last program isn't accepted is because |
Does it make sense to label this |
Hi @VMatthijs yes |
Fixed in stanc3. |
Summary:
The parser is producing a confusing warning for the following ill-formed Stan program:
See the Discourse topic for more examples
Current Output:
Expected Output:
Something like "expected , or )" pointing before the semicolon.
Current Version:
v2.18.0
The text was updated successfully, but these errors were encountered: