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

"#{1/2}/" parse error #169

Open
vird opened this issue Nov 15, 2015 · 7 comments
Open

"#{1/2}/" parse error #169

vird opened this issue Nov 15, 2015 · 7 comments

Comments

@vird
Copy link

vird commented Nov 15, 2015

iced> "#{1/2}/"
[stdin]:1:1: error: missing ", starting
"#{a/2}/"
^

coffee> "#{1/2}/"
'0.5/'

Other 'fun' stuff

"""
#{a/2}/
"""

MISSING }, STARTING

"#{1/2});/}"

UNMATCHED }
@vird vird changed the title "#{1/2}/" "#{1/2}/" parse error Nov 16, 2015
@zapu
Copy link
Collaborator

zapu commented Dec 5, 2015

Looks like the lexer has changed a bit, and the strings are parsed differently now in CoffeeScript.

coffee -t -e "\"#{2}/\""
[STRING_START (] [( (] [NUMBER 2] [) )] [+ +] [STRING "/"] [STRING_END )] [TERMINATOR \n]

iced -t -e "\"#{1}/\""
[( (] [STRING ""] [+ +] [NUMBER 1] [+ +] [STRING "/"] [) )] [TERMINATOR \n]

I tried to swap grammar and lexer from latest CoffeeScript to IcedCoffeeScript but the changes are too significant for me to cherry pick things and apply.

@maxtaco
Copy link
Owner

maxtaco commented Dec 5, 2015

How about ICS version 3?

On Saturday, December 5, 2015, Michał Zochniak notifications@github.com
wrote:

Looks like the lexer has changed a bit, and the strings are parsed
differently now in CoffeeScript.

coffee -t -e ""#{2}/""
[STRING_START (] [( (] [NUMBER 2] [) )] [+ +] [STRING "/"] [STRING_END )] [TERMINATOR \n]

iced -t -e ""#{1}/""
[( (] [STRING ""] [+ +] [NUMBER 1] [+ +] [STRING "/"] [) )] [TERMINATOR \n]

I tried to swap grammar and lexer from latest CoffeeScript to
IcedCoffeeScript but the changes are too significant for me to cherry pick
things and apply.


Reply to this email directly or view it on GitHub
#169 (comment)
.

@zapu
Copy link
Collaborator

zapu commented Dec 5, 2015

iced3 is already on the new grammar/lexer so it works there.

@vird
Copy link
Author

vird commented Dec 5, 2015

iced -v
IcedCoffeeScript version 108.0.9
still reproduced. Where can i find iced3?

@zapu
Copy link
Collaborator

zapu commented Dec 5, 2015

It is still work in progress, unfortunately. You can follow this PR if you are interested: #168

@zapu
Copy link
Collaborator

zapu commented Dec 6, 2015

@vird may I ask what's your use case? Would you be able to test new iced3, even by just installing it in test environment and running your application's test suite against it? Thanks

@vird
Copy link
Author

vird commented Dec 6, 2015

@zapu I use iced for generating opencl kernels source code. So I have code something like this

code = """
  int offset = size_x + #{other_offset/2}; // comment
  """

btw. What's a proper method for install iced3? I download branch. I can use ./bin/coffee but i don't know how to install globally.

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

No branches or pull requests

3 participants