sLKz / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

support for shebang? #156

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a C source file with the line '#!/path/to/picoc -s'
2. make the C source file executable: 'chmod +x foo.c'
3. execute: 'sh$: ./foo.c'

What is the expected output? What do you see instead?
The desired output: have picoc discard any line beginning with #!
Actual output: ... '#' is undefined

What version of the product are you using? On what operating system?
Version: 2.1
OS: Linux : Debian 6 : x86-32 : bash

Please provide any additional information below.

I really tried to hack the lexer and parser,
including enabling DEBUG_LEXER and DEBUG_EXPRESSIONS.
Results varied wildy, yet I could not figure out
how the isCident and LexGetWord and LexGetToken
worked to parse #define, #if, etc.
I could get notification of '#' as an identifier,
but could not get the lexer/parser to skip everything
until EndOfLine :^( ...

Original issue reported on code.google.com by Tarkin...@gmail.com on 27 Apr 2012 at 12:00

GoogleCodeExporter commented 9 years ago
Sorry, should have put 'Enhancement' in the name.

Original comment by Tarkin...@gmail.com on 27 Apr 2012 at 4:00

GoogleCodeExporter commented 9 years ago
Support for shebang is now added to the mainline version.

Original comment by zik.sale...@gmail.com on 28 Aug 2012 at 10:28

GoogleCodeExporter commented 9 years ago
Completed

Original comment by zik.sale...@gmail.com on 28 Aug 2012 at 10:29