Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Windows style line endings not supported #27

Closed
xmine64 opened this issue Jan 5, 2019 · 5 comments
Closed

Windows style line endings not supported #27

xmine64 opened this issue Jan 5, 2019 · 5 comments

Comments

@xmine64
Copy link
Contributor

xmine64 commented Jan 5, 2019

i have compiled pinecone with the make file and i got this error for every file i test.

$ ./pinecone ./examples/hello_world.pn
error in './examples/hello_world.pn' on line 1:
'   invalid token '
    print: "Hello World!"
                         ^
error in './examples/hello_world.pn' on line 2:
'   invalid token '

    ^
program not executed due to errors

I'm running on WSL Ubuntu 16.04 64-bit

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:        16.04
Codename:       xenial
$ uname -a
Linux DESKTOP-53JBK0N 4.4.0-17134-Microsoft #1-Microsoft Tue Apr 10 18:04:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux

image

@wmww
Copy link
Owner

wmww commented Jan 5, 2019

Ah, I'm willing to be I've tested on windows, but never with Windows line endings.

@wmww wmww changed the title 'invalid token' for each line of each file Windows style line endings not supported Jan 5, 2019
@xmine64
Copy link
Contributor Author

xmine64 commented Jan 5, 2019

oh ok. I'll use my text editor to convert line endings to unix CR

@xmine64 xmine64 closed this as completed Jan 5, 2019
@xmine64
Copy link
Contributor Author

xmine64 commented Jan 5, 2019

it worked. thank you.
your compiler isn't stable enough.

$ ./pinecone ./examples/hello_world.pn
Hello World!

@wmww wmww reopened this Jan 5, 2019
@wmww
Copy link
Owner

wmww commented Jan 5, 2019

your compiler isn't stable enough.

That may be, but in this instance it gave a semi-useful error message and exited gracefully. I'd call that plenty stable. I've tested once or twice on Windows, but never claimed to properly support anything but Linux (even when it was being developed and maintained).

Anyway, this should be fixed with 567d6c3, and there's also now a unit test for it.

Edit: I merged your PR #28 instead, which did exactly the same thing as my commit.

@wmww wmww closed this as completed Jan 5, 2019
@xmine64
Copy link
Contributor Author

xmine64 commented Jan 5, 2019

your compiler isn't stable enough.

That may be, but in this instance it gave a semi-useful error message and exited gracefully. I'd call that plenty stable. I've tested once or twice on Windows, but never claimed to properly support anything but Linux (even when it was being developed and maintained).

Anyway, this should be fixed with 567d6c3, and there's also now a unit test for it.

Edit: I merged your PR #28 instead, which did exactly the same thing as my commit.

this is a full linux environment running on top of windows nt kernel, not same as mingw or cygwin that are gnu ports to windows. i could download, install and run any deb package from orginal ubuntu repos and install it easily on my WSL.
i don't say your project is bad, buggy or other, i respect you and your project, that's a great work, but it's too clear to ignore chars like '\r' by default, same as '\t' and whitespace.
i didn't change any of your examples, even opening them.

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

No branches or pull requests

2 participants