s-cherepanov / rose-r5rs

Automatically exported from code.google.com/p/rose-r5rs
0 stars 0 forks source link

Shebang support is broken #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Prepare a Scheme script file:

#!/usr/local/bin/rose

(display "hello")

2. Try to parse this file with rose

What is the expected output? What do you see instead?

Expected: ( display "hello" )
Actual: an error is reported.

Please use labels and text to provide additional information.

This error is caused by the following code in rose/parser/impl/r5rs_grammar.ipp:

 34     shebang
 35         =   lexeme[confix("#!", eol)[char_]]
 36         ;

It should be +char_ rather than char_.

Original issue reported on code.google.com by rhythm.mail on 3 Aug 2010 at 8:47

GoogleCodeExporter commented 9 years ago
I made a mistake, +char_ cannot help, it should be +(char_ - eol).

Original comment by rhythm.mail on 3 Aug 2010 at 9:12

GoogleCodeExporter commented 9 years ago
This bug has been fixed, see 
http://code.google.com/p/rose-r5rs/source/browse/include/rose/parser/impl/progra
m.ipp#35

Original comment by rhythm.mail on 4 Aug 2010 at 2:33