-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
add tests for multi-platform end-of-line behavior #1416
Comments
Possibly comments aren't getting counted in terms of line numbers? |
I haven't and just tried a few examples and it seems fine Can you give me the whole program and I can try it here? Whatever's causing this issue would also cause runtime Are you running this Windows or Linux or Mac? They all have
|
I’m on a Mac — runtime errors are definitely off, too. On Apr 2, 2015, at 12:53 AM, Bob Carpenter [email protected] wrote:
|
Turns out it’s Windows newlines — the model was originally On Apr 2, 2015, at 1:03 AM, Michael Betancourt [email protected] wrote:
|
What do you want the behavior to be? The line counting is happening below the level of the parser Here's the iterator getting created in lang/parser.hpp:
It'd be easy to drop code in where I wrote the comment above.
|
So are the Windows newlines messing up Spirit directly? In the former case having a comment like “I detected Windows newlines On Apr 2, 2015, at 1:35 PM, Bob Carpenter [email protected] wrote:
|
I think the parser/iterator should treat end-of-line markers I'd guess that's what's happening now, but we need to add
Then we can follow your second suggestion:
I can take on doing both of these.
|
This is still an issue in stanc2, from my experience. It's been fixed in stanc3, however. |
I'm using a fresh copy of dev (both Stan and CmdStan). The new parser error line numbers look great, but they're consistently off the model I'm trying to build. For example,
while the model itself is given by
The parser should be identifying line 129.
Has anyone seen inconsistencies like this? If someone can confirm then I'll put together a simple reproducible example.
The text was updated successfully, but these errors were encountered: